{"version":3,"sources":["webpack:///./cartridges/app_storefront_base/cartridge/client/default/js/storeLocator.js","webpack:///./cartridges/app_storefront_base/cartridge/client/default/js/storeLocator/storeLocator.js","webpack:///./cartridges/app_tfg/cartridge/client/default/js/components/searchStores.js","webpack:///./node_modules/tippy.js/esm/index.all.js","webpack:///./cartridges/app_tfg/cartridge/client/default/js/components/tooltip.js","webpack:///./cartridges/app_tfg/cartridge/client/default/js/sfra/storeLocator.js","webpack:///./cartridges/app_tfg/cartridge/client/default/js/storeLocator/storeLocator.js","webpack:///./cartridges/app_tfg/cartridge/scripts/helpers/urlHelpers.js","webpack:///./node_modules/tippy.js/node_modules/popper.js/dist/esm/popper.js"],"names":["processInclude","$","require","newUrl","key","encodeURIComponent","params","infowindow","google","latlng","mapOptions","scrollwheel","zoom","center","map","mapdiv","JSON","bounds","markerImg","path","fillColor","fillOpacity","scale","strokeColor","strokeWeight","anchor","labelOrigin","Object","item","lable","parseInt","storeLocation","marker","position","title","icon","label","text","color","fontSize","content","infoWindowHtml","$resultsDiv","$mapDiv","hasResults","data","maps","dialog","element","spinner","$form","radius","url","urlParams","payload","postalCode","appendToUrl","type","dataType","success","updateStoresResults","init","detectLocation","navigator","$detectLocationButton","lat","long","longitude","search","e","changeRadius","searchKeys","selectStore","selectedStore","storeID","searchRadius","searchPostalCode","storeDetailsHtml","event","updateSelectStoreButton","DEFAULT_COORDS","getLatLong","address","country","geocoder","Geocoder","Promise","resolve","componentRestrictions","geocode","results","status","geometry","location","lng","coodrs","getPosition","reject","geolocation","getCurrentPosition","form","coords","updatedUrl","replaceUrlParams","setAttribute","loadContent","searchStores","trigger","getAttribute","classList","contains","latitude","querySelector","value","countryField","DEFAULTS","arrow","animation","appendTo","placement","interactive","theme","maxWidth","getOptions","options","assign","initTooltip","selector","tippy","SELECTORS","SEARCH_STORE_BOX_ARROW","STORE_INFO_BOX_ARROW","STORE_LOCATOR_CONTAINER","STORE_LOCATOR_CONTAINER_SEARCH","STORE_LOCATOR_TABS_CONTAINER","STORES_DETAILS_CONTAINER","SEARCH_STORE_BOX_ARROW_LEFT_ARROW","SEARCH_STORE_BOX_ARROW_RIGHT_ARROW","STORE_INFO_BOX_ARROW_LEFT_ARROW","STORE_INFO_BOX_ARROW_RIGHT_ARROW","NAV_TAB","NAV_TAB_LIST","NAV_TAB_MAP","MAP_CANVAS","MAP_KEY","CLEAR_FILTERS","SEARCH_FORM","LOCATOR_FORM","TOOLTIP_FILTER_CONTAINER","TOOLTIP_SEARCH_RESULTS_CONTAINER","storesDetailsContainer","document","storeInfoBoxArrow","arrowLeft","arrowRight","tabsContainer","STARTING_COORDINATES","MAP_OPTIONS_CONFIG","mapTypeControl","streetViewControl","showPosition","isStoreDetails","getImageConfig","src","Point","createMapOptions","draggable","window","beesfra","config","customMapStyle","styles","parse","createMarker","markerOptions","name","Marker","createMarkerLink","link","createElement","innerHTML","href","storeUrl","target","createMarkerImg","img","mapWidgets","initialized","markers","initMapWidget","mapCanvas","InfoWindow","LatLng","Map","forEach","setMap","getJSONData","LatLngBounds","keys","imageConfig","googleMapsMarkerIconUrl","push","addListener","setOptions","open","extend","length","fitBounds","centerLatLong","listener","setZoom","setCenter","removeListener","resultsDiv","mapDiv","stores","remove","add","searchKey","locations","storesResultsHtml","addEventListener","storeResults","querySelectorAll","el","addressText","nearText","mobileScrollToResults","isLG","scrollIntoView","storeLocatorForm","closest","searchByLocation","postalCodeInput","dataset","stringify","action","error","code","PERMISSION_DENIED","alert","resources","storeLocator","errorLocationDisabled","filter","noFilter","getFirstSearchResult","queryParam","replace","invertedStoreFilter","removeParamsFromURL","checked","onlyfirst","dispatchEvent","CustomEvent","bubbles","cancelable","storeInfoOpen","tooltipContainer","tooltipContainerArrow","tooltipPlacement","enableTooltip","tooltip","initMap","resultsContainer","hasAttribute","base","showNearbyStores","hash","googleMapsApiKeyScript","scriptIntervalId","setInterval","clearInterval","onEvent","preventDefault","searchContainer","delegateTarget","searchButton","keyCode","click","numberOfCheckedFilters","initStoreSearchClose","storeLocatorContainer","searchStoreBoxArrow","searchStoreArrowLeft","searchStoreArrowRight","toggle","initStoreInfoClose","initMobileTabsListMap","storeLocatorTabsContainer","navTabList","navTabMap","mapKey","clearFilters","searchForm","checkboxes","checkbox","initializeTooltips","tooltipFilter","tooltipSearchResults","initSearchOnLoad","nonInputParams","hashParams","parseQueryString","param","input","panel","collapse","qsParts","reduce","qs","concat","join","setTimeout","searchFormFormData","FormData","URLSearchParams","toString","enableSearchButton","onreadystatechange","readyState","removeAttribute","module","superModule","baseAppendQueryParams","appendQueryParams","resultUrl","paramName","paramValue","paramPattern","newParamPair","newParamPart","RegExp","separator","indexOf","queryParamsToAppend","Array","isArray","call","queryString","split","obj","query","splitQuery","exports"],"mappings":";;;;;;;;;;;AAAA;AAAA;AAAa;;;AAEb,IAAIA,cAAJ;AAEAC,CAAC,CAADA,QAAC,CAADA,OAAkB,YAAY;AAC1BD,gBAAc,CAACE,mBAAO,CAAtBF,kHAAsB,CAAR,CAAdA;AADJC,G;;;;;;;;;;;;;;ACJA;AAAA;AACa;AAEb;;;;;;;AAMA,kCAAkC;AAC9B,MAAIE,MAAM,GAAV;AACAA,QAAM,IAAI,CAACA,MAAM,CAANA,iBAAwB,CAAxBA,UAAD,OAA2C,MAAM,CAAN,iBAAwB,eAAe;AACxF,WAAOC,GAAG,GAAHA,MAAYC,kBAAkB,CAACC,MAAM,CAA5C,GAA4C,CAAP,CAArC;AADiD,UAArDH,GAAqD,CAArDA;AAIA;AACH;AAED;;;;;AAGA,gBAAgB;AACZ;AACA,MAAII,UAAU,GAAG,IAAIC,MAAM,CAANA,KAFT,UAEK,EAAjB,CAFY,CAIZ;;AACA,MAAIC,MAAM,GAAG,IAAID,MAAM,CAANA,KAAJ,iBAAiC,CAA9C,SAAa,CAAb;AACA,MAAIE,UAAU,GAAG;AACbC,eAAW,EADE;AAEbC,QAAI,EAFS;AAGbC,UAAM,EAAEJ;AAHK,GAAjB;AAMAK,KAAG,GAAG,IAAIN,MAAM,CAAN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AY;AACZ;;AAEA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY;AACZ;;AAEA,SAAS,wBAAc;AACvB,WAAW;AACX;AACA;AACA;AACA,WAAW,IAAI;AACf,YAAY;AACZ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,IAAI;AACf,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,MAAM;AACjB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,IAAI;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,eAAe;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;;AAGH;AACA;AACA,GAAG;AACH;AACA,GAAG;;;AAGH;AACA;AACA,GAAG;;;AAGH;AACA;AACA,GAAG;AACH;AACA,GAAG;;;AAGH;AACA;AACA,GAAG;AACH;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;;AAEA;AACA,mFAAmF;AACnF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;;AAGH;;AAEA;AACA;AACA,GAAG;;;AAGH;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,YAAY;AACZ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,GAAG,IAAI;AACP;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,oDAAoD;AACpD,0DAA0D;AAC1D;AACA,oBAAoB;AACpB;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,YAAY;AACZ;;AAEA;AACA,uBAAuB;AACvB;AACA,GAAG,6BAA6B;;AAEhC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA,SAAS,wBAAc;AACvB;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;;AAEA;AACA,wDAAwD;;AAExD;AACA;AACA;AACA;AACA;;;AAGA,4BAA4B;;AAE5B,gCAAgC;;AAEhC,wBAAwB;;AAExB,wBAAwB;;AAExB,gCAAgC;;AAEhC,kEAAkE;;;AAGlE,qBAAqB;;AAErB,4HAA4H;;AAE5H;AACA;AACA;;AAEA,uBAAuB;;AAEvB,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG,EAAE,8BAA8B;;AAEnC,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;;AAGH;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA;AACA,uEAAuE;;AAEvE;AACA,yEAAyE;;AAEzE;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA,KAAK;;;AAGL;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B;AAC/B;;AAEA;AACA;AACA;AACA,KAAK;;;AAGL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAM;AACxC;AACA,KAAK;AACL,4BAA4B,8CAA8C;AAC1E;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA,KAAK;AACL,iCAAiC,wBAAc;AAC/C;;AAEA,QAAQ,wBAAc,wBAAwB,wBAAc;AAC5D;AACA;AACA;;AAEA,QAAQ,wBAAc;AACtB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,wBAAc;AAC7B,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;;;AAGA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA,KAAK;;;AAGL;AACA;AACA,KAAK;;;AAGL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA,OAAO;;;AAGP;AACA;AACA,OAAO;;;AAGP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,yCAAyC;AACpD,WAAW,OAAO;AAClB,YAAY;AACZ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,yBAAyB,qBAAqB;AAC9C;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;;AAEe,mDAAK,EAAC;AACrB;;;ACx4DA;AAEA,MAAMc,QAAQ,GAAG;AACfC,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,OAAP,GAAiB9E,IAAjB,C;;;;;;;;;;;;;;ACtEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,kCAAkC;AACjD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,IAAI;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,YAAY;AACvB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;AAMD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA,oBAAoB;AACpB;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,YAAY,OAAO;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,YAAY;AACvB,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;;AAEA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA,cAAc;AACd;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd,mBAAmB;AACnB,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,gBAAgB;;AAE5D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,gBAAgB;;AAEtF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,yDAAyD;;AAE9E;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B;AAC/B,2BAA2B;AAC3B,gCAAgC;;AAEhC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gDAAgD;;AAEhD;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,aAAa,MAAM;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,aAAa,MAAM;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,cAAc;AAC5B;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA,wBAAwB;AACxB,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,8BAA8B;AAC9B,4BAA4B;AAC5B;;AAEA,qCAAqC;AACrC;;AAEA;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,WAAW;AACzB,cAAc,OAAO;AACrB,aAAa,WAAW;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,WAAW;AAC1B;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,WAAW;AAC1B;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,WAAW;AAC1B;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,WAAW;AAC1B;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,WAAW;AAC1B;AACA,eAAe,mBAAmB;AAClC;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,WAAW;AAC1B;AACA;AACA,cAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,WAAW;AAC1B;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,WAAW;AAC1B;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,WAAW;AAC1B;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,WAAW;AAC1B;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,IAAI;AACJ;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,kCAAkC;;AAElC;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,WAAW,WAAW;AACtB;;AAEA;AACA;AACA,WAAW,WAAW;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,4BAA4B;AACzC,aAAa,YAAY;AACzB,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,cAAc;AACd,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B;AAC3B,iDAAiD,uCAAuC,kDAAkD;AAC1I,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA;AACA;;AAEe,qEAAM,EAAC;AACtB","file":"js/storeLocator.js","sourcesContent":["'use strict';\n\nvar processInclude = require('./util');\n\n$(document).ready(function () {\n processInclude(require('./storeLocator/storeLocator'));\n});\n","/* globals google */\n'use strict';\n\n/**\n * appends params to a url\n * @param {string} url - Original url\n * @param {Object} params - Parameters to append\n * @returns {string} result url with appended parameters\n */\nfunction appendToUrl(url, params) {\n var newUrl = url;\n newUrl += (newUrl.indexOf('?') !== -1 ? '&' : '?') + Object.keys(params).map(function (key) {\n return key + '=' + encodeURIComponent(params[key]);\n }).join('&');\n\n return newUrl;\n}\n\n/**\n * Uses google maps api to render a map\n */\nfunction maps() {\n var map;\n var infowindow = new google.maps.InfoWindow();\n\n // Init U.S. Map in the center of the viewport\n var latlng = new google.maps.LatLng(37.09024, -95.712891);\n var mapOptions = {\n scrollwheel: false,\n zoom: 4,\n center: latlng\n };\n\n map = new google.maps.Map($('.map-canvas')[0], mapOptions);\n var mapdiv = $('.map-canvas').attr('data-locations');\n\n mapdiv = JSON.parse(mapdiv);\n\n var bounds = new google.maps.LatLngBounds();\n\n // Customized google map marker icon with svg format\n var markerImg = {\n path: 'M13.5,30.1460153 L16.8554555,25.5 L20.0024287,25.5 C23.039087,25.5 25.5,' +\n '23.0388955 25.5,20.0024287 L25.5,5.99757128 C25.5,2.96091298 23.0388955,0.5 ' +\n '20.0024287,0.5 L5.99757128,0.5 C2.96091298,0.5 0.5,2.96110446 0.5,5.99757128 ' +\n 'L0.5,20.0024287 C0.5,23.039087 2.96110446,25.5 5.99757128,25.5 L10.1445445,' +\n '25.5 L13.5,30.1460153 Z',\n fillColor: '#0070d2',\n fillOpacity: 1,\n scale: 1.1,\n strokeColor: 'white',\n strokeWeight: 1,\n anchor: new google.maps.Point(13, 30),\n labelOrigin: new google.maps.Point(12, 12)\n };\n\n Object.keys(mapdiv).forEach(function (key) {\n var item = mapdiv[key];\n var lable = parseInt(key, 10) + 1;\n var storeLocation = new google.maps.LatLng(item.latitude, item.longitude);\n var marker = new google.maps.Marker({\n position: storeLocation,\n map: map,\n title: item.name,\n icon: markerImg,\n label: { text: lable.toString(), color: 'white', fontSize: '16px' }\n });\n\n marker.addListener('click', function () {\n infowindow.setOptions({\n content: item.infoWindowHtml\n });\n infowindow.open(map, marker);\n });\n\n // Create a minimum bound based on a set of storeLocations\n bounds.extend(marker.position);\n });\n // Fit the all the store marks in the center of a minimum bounds when any store has been found.\n if (mapdiv && mapdiv.length !== 0) {\n map.fitBounds(bounds);\n }\n}\n\n/**\n * Renders the results of the search and updates the map\n * @param {Object} data - Response from the server\n */\nfunction updateStoresResults(data) {\n var $resultsDiv = $('.results');\n var $mapDiv = $('.map-canvas');\n var hasResults = data.stores.length > 0;\n\n if (!hasResults) {\n $('.store-locator-no-results').show();\n } else {\n $('.store-locator-no-results').hide();\n }\n\n $resultsDiv.empty()\n .data('has-results', hasResults)\n .data('radius', data.radius)\n .data('search-key', data.searchKey);\n\n $mapDiv.attr('data-locations', data.locations);\n\n if ($mapDiv.data('has-google-api')) {\n maps();\n } else {\n $('.store-locator-no-apiKey').show();\n }\n\n if (data.storesResultsHtml) {\n $resultsDiv.append(data.storesResultsHtml);\n }\n}\n\n/**\n * Search for stores with new zip code\n * @param {HTMLElement} element - the target html element\n * @returns {boolean} false to prevent default event\n */\nfunction search(element) {\n var dialog = element.closest('.in-store-inventory-dialog');\n var spinner = dialog.length ? dialog.spinner() : $.spinner();\n spinner.start();\n var $form = element.closest('.store-locator');\n var radius = $('.results').data('radius');\n var url = $form.attr('action');\n var urlParams = { radius: radius };\n\n var payload = $form.is('form') ? $form.serialize() : { postalCode: $form.find('[name=\"postalCode\"]').val() };\n\n url = appendToUrl(url, urlParams);\n\n $.ajax({\n url: url,\n type: $form.attr('method'),\n data: payload,\n dataType: 'json',\n success: function (data) {\n spinner.stop();\n updateStoresResults(data);\n $('.select-store').prop('disabled', true);\n }\n });\n return false;\n}\n\nmodule.exports = {\n init: function () {\n if ($('.map-canvas').data('has-google-api')) {\n maps();\n } else {\n $('.store-locator-no-apiKey').show();\n }\n\n if (!$('.results').data('has-results')) {\n $('.store-locator-no-results').show();\n }\n },\n\n detectLocation: function () {\n // clicking on detect location.\n $('.detect-location').on('click', function () {\n $.spinner().start();\n if (!navigator.geolocation) {\n $.spinner().stop();\n return;\n }\n\n navigator.geolocation.getCurrentPosition(function (position) {\n var $detectLocationButton = $('.detect-location');\n var url = $detectLocationButton.data('action');\n var radius = $('.results').data('radius');\n var urlParams = {\n radius: radius,\n lat: position.coords.latitude,\n long: position.coords.longitude\n };\n\n url = appendToUrl(url, urlParams);\n $.ajax({\n url: url,\n type: 'get',\n dataType: 'json',\n success: function (data) {\n $.spinner().stop();\n updateStoresResults(data);\n $('.select-store').prop('disabled', true);\n }\n });\n });\n });\n },\n\n search: function () {\n $('.store-locator-container form.store-locator').submit(function (e) {\n e.preventDefault();\n search($(this));\n });\n $('.store-locator-container .btn-storelocator-search[type=\"button\"]').click(function (e) {\n e.preventDefault();\n search($(this));\n });\n },\n\n changeRadius: function () {\n $('.store-locator-container .radius').change(function () {\n var radius = $(this).val();\n var searchKeys = $('.results').data('search-key');\n var url = $('.radius').data('action-url');\n var urlParams = {};\n\n if (searchKeys.postalCode) {\n urlParams = {\n radius: radius,\n postalCode: searchKeys.postalCode\n };\n } else if (searchKeys.lat && searchKeys.long) {\n urlParams = {\n radius: radius,\n lat: searchKeys.lat,\n long: searchKeys.long\n };\n }\n\n url = appendToUrl(url, urlParams);\n var dialog = $(this).closest('.in-store-inventory-dialog');\n var spinner = dialog.length ? dialog.spinner() : $.spinner();\n spinner.start();\n $.ajax({\n url: url,\n type: 'get',\n dataType: 'json',\n success: function (data) {\n spinner.stop();\n updateStoresResults(data);\n $('.select-store').prop('disabled', true);\n }\n });\n });\n },\n selectStore: function () {\n $('.store-locator-container').on('click', '.select-store', (function (e) {\n e.preventDefault();\n var selectedStore = $(':checked', '.results-card .results');\n var data = {\n storeID: selectedStore.val(),\n searchRadius: $('#radius').val(),\n searchPostalCode: $('.results').data('search-key').postalCode,\n storeDetailsHtml: selectedStore.siblings('label').find('.store-details').html(),\n event: e\n };\n\n $('body').trigger('store:selected', data);\n }));\n },\n updateSelectStoreButton: function () {\n $('body').on('change', '.select-store-input', (function () {\n $('.select-store').prop('disabled', false);\n }));\n }\n};\n","/* globals google */\nimport { loadContent } from '../util/fetchutils'; // eslint-disable-line\nimport { replaceUrlParams } from '../../../../scripts/helpers/urlHelpers';\n\nconst DEFAULT_COORDS = { lat: 0, long: 0 };\n\nconst getLatLong = (address, country) => {\n const geocoder = new google.maps.Geocoder();\n return new Promise((resolve) => {\n const params = { address };\n\n if (country) {\n params.componentRestrictions = { country };\n }\n\n geocoder.geocode(params, (results, status) => {\n if (status === 'OK') {\n const lat = results[0].geometry.location.lat();\n const long = results[0].geometry.location.lng();\n\n const coodrs = { lat, long };\n\n return resolve(coodrs);\n }\n\n return resolve(DEFAULT_COORDS);\n });\n });\n};\n\nconst getPosition = () => new Promise(((resolve, reject) => {\n if (!navigator.geolocation) {\n reject();\n } else {\n navigator.geolocation.getCurrentPosition(async position => resolve(position));\n }\n}));\n\nconst search = async (form, url, coords) => {\n // Adding coords to action url in order to use them for the filter logic\n const updatedUrl = replaceUrlParams(url, coords);\n form.setAttribute('action', updatedUrl);\n\n const { content } = await loadContent(form, null, coords);\n\n return content;\n};\n\n// eslint-disable-next-line import/prefer-default-export\nexport const searchStores = async (form, trigger) => {\n let coords = DEFAULT_COORDS;\n const url = form.getAttribute('action');\n\n if (trigger && trigger.classList.contains('detect-location')) {\n const position = await getPosition();\n\n coords = {\n lat: position.coords.latitude,\n long: position.coords.longitude,\n };\n } else {\n const address = form.querySelector('[name=\"postalCode\"]').value;\n\n const countryField = form.querySelector('[name$=\"_country\"]');\n const country = countryField ? countryField.value : '';\n\n try {\n coords = await getLatLong(address, country);\n } catch (e) {\n // Fallback to 0, 0\n }\n }\n\n return search(form, url, coords);\n};\n","/**!\n* tippy.js v4.0.3\n* (c) 2017-2019 atomiks\n* MIT License\n*/\nimport Popper from 'popper.js';\n\nvar css = \".tippy-iOS{cursor:pointer!important}.tippy-notransition{transition:none}.tippy-popper{transition-timing-function:cubic-bezier(.165,.84,.44,1);max-width:calc(100% - 10px);pointer-events:none;outline:0}.tippy-popper[x-placement^=top] .tippy-backdrop{border-radius:40% 40% 0 0}.tippy-popper[x-placement^=top] .tippy-roundarrow{bottom:-8px;-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=top] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.tippy-popper[x-placement^=top] .tippy-arrow{border-top:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;bottom:-7px;margin:0 6px;-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=top] .tippy-backdrop{-webkit-transform-origin:0 25%;transform-origin:0 25%}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-55%);transform:scale(1) translate(-50%,-55%)}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%,-45%);transform:scale(.2) translate(-50%,-45%);opacity:0}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}.tippy-popper[x-placement^=top] [data-animation=perspective]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(-10px) rotateX(0);transform:perspective(700px) translateY(-10px) rotateX(0)}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateY(0) rotateX(60deg);transform:perspective(700px) translateY(0) rotateX(60deg)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=top] [data-animation=scale]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(-10px) scale(1);transform:translateY(-10px) scale(1)}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px) scale(.5);transform:translateY(-10px) scale(.5)}.tippy-popper[x-placement^=bottom] .tippy-backdrop{border-radius:0 0 30% 30%}.tippy-popper[x-placement^=bottom] .tippy-roundarrow{top:-8px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.tippy-popper[x-placement^=bottom] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(0);transform:rotate(0)}.tippy-popper[x-placement^=bottom] .tippy-arrow{border-bottom:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;top:-7px;margin:0 6px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.tippy-popper[x-placement^=bottom] .tippy-backdrop{-webkit-transform-origin:0 -50%;transform-origin:0 -50%}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-45%);transform:scale(1) translate(-50%,-45%)}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%);transform:scale(.2) translate(-50%);opacity:0}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}.tippy-popper[x-placement^=bottom] [data-animation=perspective]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(10px) rotateX(0);transform:perspective(700px) translateY(10px) rotateX(0)}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateY(0) rotateX(-60deg);transform:perspective(700px) translateY(0) rotateX(-60deg)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=bottom] [data-animation=scale]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(10px) scale(1);transform:translateY(10px) scale(1)}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px) scale(.5);transform:translateY(10px) scale(.5)}.tippy-popper[x-placement^=left] .tippy-backdrop{border-radius:50% 0 0 50%}.tippy-popper[x-placement^=left] .tippy-roundarrow{right:-16px;-webkit-transform-origin:33.33333333% 50%;transform-origin:33.33333333% 50%}.tippy-popper[x-placement^=left] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.tippy-popper[x-placement^=left] .tippy-arrow{border-left:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;right:-7px;margin:3px 0;-webkit-transform-origin:0 50%;transform-origin:0 50%}.tippy-popper[x-placement^=left] .tippy-backdrop{-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-75%,-50%);transform:scale(.2) translate(-75%,-50%);opacity:0}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(-20px);transform:translateX(-20px)}.tippy-popper[x-placement^=left] [data-animation=perspective]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(-10px) rotateY(0);transform:perspective(700px) translateX(-10px) rotateY(0)}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateX(0) rotateY(-60deg);transform:perspective(700px) translateX(0) rotateY(-60deg)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=left] [data-animation=scale]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(-10px) scale(1);transform:translateX(-10px) scale(1)}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px) scale(.5);transform:translateX(-10px) scale(.5)}.tippy-popper[x-placement^=right] .tippy-backdrop{border-radius:0 50% 50% 0}.tippy-popper[x-placement^=right] .tippy-roundarrow{left:-16px;-webkit-transform-origin:66.66666666% 50%;transform-origin:66.66666666% 50%}.tippy-popper[x-placement^=right] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.tippy-popper[x-placement^=right] .tippy-arrow{border-right:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;left:-7px;margin:3px 0;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.tippy-popper[x-placement^=right] .tippy-backdrop{-webkit-transform-origin:-50% 0;transform-origin:-50% 0}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-25%,-50%);transform:scale(.2) translate(-25%,-50%);opacity:0}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(20px);transform:translateX(20px)}.tippy-popper[x-placement^=right] [data-animation=perspective]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(10px) rotateY(0);transform:perspective(700px) translateX(10px) rotateY(0)}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateX(0) rotateY(60deg);transform:perspective(700px) translateX(0) rotateY(60deg)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=right] [data-animation=scale]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(10px) scale(1);transform:translateX(10px) scale(1)}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px) scale(.5);transform:translateX(10px) scale(.5)}.tippy-tooltip{position:relative;color:#fff;border-radius:4px;font-size:.9rem;padding:.3rem .6rem;line-height:1.4;text-align:center;will-change:transform;background-color:#333}.tippy-tooltip[data-size=small]{padding:.2rem .4rem;font-size:.75rem}.tippy-tooltip[data-size=large]{padding:.4rem .8rem;font-size:1rem}.tippy-tooltip[data-animatefill]{overflow:hidden;background-color:transparent}.tippy-tooltip[data-interactive],.tippy-tooltip[data-interactive] path{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow,.tippy-roundarrow{position:absolute;width:0;height:0}.tippy-roundarrow{width:24px;height:8px;fill:#333;pointer-events:none}.tippy-backdrop{position:absolute;will-change:transform;background-color:#333;border-radius:50%;width:calc(110% + 2rem);left:50%;top:50%;z-index:-1;transition:all cubic-bezier(.46,.1,.52,.98);-webkit-backface-visibility:hidden;backface-visibility:hidden}.tippy-backdrop:after{content:\\\"\\\";float:left;padding-top:100%}.tippy-backdrop+.tippy-content{transition-property:opacity;will-change:opacity}.tippy-backdrop+.tippy-content[data-state=visible]{opacity:1}.tippy-backdrop+.tippy-content[data-state=hidden]{opacity:0}\";\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar version = \"4.0.3\";\n\nvar isBrowser = typeof window !== 'undefined';\nvar ua = isBrowser && navigator.userAgent;\nvar isIE = /MSIE |Trident\\//.test(ua);\nvar isUCBrowser = /UCBrowser\\//.test(ua);\nvar isIOS = isBrowser && /iPhone|iPad|iPod/.test(navigator.platform) && !window.MSStream;\n\nvar Defaults = {\n a11y: true,\n allowHTML: true,\n animateFill: true,\n animation: 'shift-away',\n appendTo: function appendTo() {\n return document.body;\n },\n aria: 'describedby',\n arrow: false,\n arrowType: 'sharp',\n boundary: 'scrollParent',\n content: '',\n delay: [0, 20],\n distance: 10,\n duration: [325, 275],\n flip: true,\n flipBehavior: 'flip',\n flipOnUpdate: false,\n followCursor: false,\n hideOnClick: true,\n ignoreAttributes: false,\n inertia: false,\n interactive: false,\n interactiveBorder: 2,\n interactiveDebounce: 0,\n lazy: true,\n maxWidth: 350,\n multiple: false,\n offset: 0,\n onHidden: function onHidden() {},\n onHide: function onHide() {},\n onMount: function onMount() {},\n onShow: function onShow() {},\n onShown: function onShown() {},\n placement: 'top',\n popperOptions: {},\n role: 'tooltip',\n showOnInit: false,\n size: 'regular',\n sticky: false,\n target: '',\n theme: 'dark',\n touch: true,\n touchHold: false,\n trigger: 'mouseenter focus',\n updateDuration: 0,\n wait: null,\n zIndex: 9999\n /**\n * If the set() method encounters one of these, the popperInstance must be\n * recreated\n */\n\n};\nvar POPPER_INSTANCE_DEPENDENCIES = ['arrow', 'arrowType', 'boundary', 'distance', 'flip', 'flipBehavior', 'flipOnUpdate', 'offset', 'placement', 'popperOptions'];\n\nvar Selectors = {\n POPPER: '.tippy-popper',\n TOOLTIP: '.tippy-tooltip',\n CONTENT: '.tippy-content',\n BACKDROP: '.tippy-backdrop',\n ARROW: '.tippy-arrow',\n ROUND_ARROW: '.tippy-roundarrow'\n};\n\nvar elementProto = isBrowser ? Element.prototype : {};\nvar matches = elementProto.matches || elementProto.matchesSelector || elementProto.webkitMatchesSelector || elementProto.mozMatchesSelector || elementProto.msMatchesSelector;\n/**\n * Ponyfill for Array.from - converts iterable values to an array\n * @param {ArrayLike} value\n * @return {any[]}\n */\n\nfunction arrayFrom(value) {\n return [].slice.call(value);\n}\n/**\n * Ponyfill for Element.prototype.closest\n * @param {Element} element\n * @param {String} parentSelector\n * @return {Element}\n */\n\nfunction closest(element, parentSelector) {\n return (elementProto.closest || function (selector) {\n var el = this;\n\n while (el) {\n if (matches.call(el, selector)) return el;\n el = el.parentElement;\n }\n }).call(element, parentSelector);\n}\n/**\n * Works like Element.prototype.closest, but uses a callback instead\n * @param {Element} element\n * @param {Function} callback\n * @return {Element}\n */\n\nfunction closestCallback(element, callback) {\n while (element) {\n if (callback(element)) return element;\n element = element.parentElement;\n }\n}\n\n/**\n * Determines if a value is a \"bare\" virtual element (before mutations done\n * by `polyfillElementPrototypeProperties()`). JSDOM elements show up as\n * [object Object], we can check if the value is \"element-like\" if it has\n * `addEventListener`\n * @param {any} value\n * @return {Boolean}\n */\n\nfunction isBareVirtualElement(value) {\n return {}.toString.call(value) === '[object Object]' && !value.addEventListener;\n}\n/**\n * Safe .hasOwnProperty check, for prototype-less objects\n * @param {Object} obj\n * @param {String} key\n * @return {Boolean}\n */\n\nfunction hasOwnProperty(obj, key) {\n return {}.hasOwnProperty.call(obj, key);\n}\n/**\n * Returns an array of elements based on the value\n * @param {any} value\n * @return {Array}\n */\n\nfunction getArrayOfElements(value) {\n if (isSingular(value)) {\n return [value];\n }\n\n if (value instanceof NodeList) {\n return arrayFrom(value);\n }\n\n if (Array.isArray(value)) {\n return value;\n }\n\n try {\n return arrayFrom(document.querySelectorAll(value));\n } catch (e) {\n return [];\n }\n}\n/**\n * Returns a value at a given index depending on if it's an array or number\n * @param {any} value\n * @param {Number} index\n * @param {any} defaultValue\n */\n\nfunction getValue(value, index, defaultValue) {\n if (Array.isArray(value)) {\n var v = value[index];\n return v == null ? defaultValue : v;\n }\n\n return value;\n}\n/**\n * Debounce utility\n * @param {Function} fn\n * @param {Number} ms\n */\n\nfunction debounce(fn, ms) {\n var timeoutId;\n return function () {\n var _this = this,\n _arguments = arguments;\n\n clearTimeout(timeoutId);\n timeoutId = setTimeout(function () {\n return fn.apply(_this, _arguments);\n }, ms);\n };\n}\n/**\n * Prevents errors from being thrown while accessing nested modifier objects\n * in `popperOptions`\n * @param {Object} obj\n * @param {String} key\n * @return {Object|undefined}\n */\n\nfunction getModifier(obj, key) {\n return obj && obj.modifiers && obj.modifiers[key];\n}\n/**\n * Determines if an array or string includes a value\n * @param {Array|String} a\n * @param {any} b\n * @return {Boolean}\n */\n\nfunction includes(a, b) {\n return a.indexOf(b) > -1;\n}\n/**\n * Determines if the value is singular-like\n * @param {any} value\n * @return {Boolean}\n */\n\nfunction isSingular(value) {\n return !!value && value.isVirtual || value instanceof Element;\n}\n/**\n * Tricking bundlers, linters, and minifiers\n * @return {String}\n */\n\nfunction innerHTML() {\n return 'innerHTML';\n}\n/**\n * Evaluates a function if one, or returns the value\n * @param {any} value\n * @param {any[]} args\n * @return {Boolean}\n */\n\nfunction evaluateValue(value, args) {\n return typeof value === 'function' ? value.apply(null, args) : value;\n}\n/**\n * Sets a popperInstance `flip` modifier's enabled state\n * @param {Object[]} modifiers\n * @param {any} value\n */\n\nfunction setFlipModifierEnabled(modifiers, value) {\n modifiers.filter(function (m) {\n return m.name === 'flip';\n })[0].enabled = value;\n}\n\n/**\n * Returns a new `div` element\n * @return {HTMLDivElement}\n */\n\nfunction div() {\n return document.createElement('div');\n}\n/**\n * Sets the innerHTML of an element while tricking linters & minifiers\n * @param {HTMLElement} el\n * @param {Element|String} html\n */\n\nfunction setInnerHTML(el, html) {\n el[innerHTML()] = html instanceof Element ? html[innerHTML()] : html;\n}\n/**\n * Sets the content of a tooltip\n * @param {HTMLElement} contentEl\n * @param {Object} props\n */\n\nfunction setContent(contentEl, props) {\n if (props.content instanceof Element) {\n setInnerHTML(contentEl, '');\n contentEl.appendChild(props.content);\n } else {\n contentEl[props.allowHTML ? 'innerHTML' : 'textContent'] = props.content;\n }\n}\n/**\n * Returns the child elements of a popper element\n * @param {HTMLElement} popper\n * @return {Object}\n */\n\nfunction getChildren(popper) {\n return {\n tooltip: popper.querySelector(Selectors.TOOLTIP),\n backdrop: popper.querySelector(Selectors.BACKDROP),\n content: popper.querySelector(Selectors.CONTENT),\n arrow: popper.querySelector(Selectors.ARROW) || popper.querySelector(Selectors.ROUND_ARROW)\n };\n}\n/**\n * Adds `data-inertia` attribute\n * @param {HTMLElement} tooltip\n */\n\nfunction addInertia(tooltip) {\n tooltip.setAttribute('data-inertia', '');\n}\n/**\n * Removes `data-inertia` attribute\n * @param {HTMLElement} tooltip\n */\n\nfunction removeInertia(tooltip) {\n tooltip.removeAttribute('data-inertia');\n}\n/**\n * Creates an arrow element and returns it\n * @return {HTMLDivElement}\n */\n\nfunction createArrowElement(arrowType) {\n var arrow = div();\n\n if (arrowType === 'round') {\n arrow.className = 'tippy-roundarrow';\n setInnerHTML(arrow, '');\n } else {\n arrow.className = 'tippy-arrow';\n }\n\n return arrow;\n}\n/**\n * Creates a backdrop element and returns it\n * @return {HTMLDivElement}\n */\n\nfunction createBackdropElement() {\n var backdrop = div();\n backdrop.className = 'tippy-backdrop';\n backdrop.setAttribute('data-state', 'hidden');\n return backdrop;\n}\n/**\n * Adds interactive-related attributes\n * @param {HTMLElement} popper\n * @param {HTMLElement} tooltip\n */\n\nfunction addInteractive(popper, tooltip) {\n popper.setAttribute('tabindex', '-1');\n tooltip.setAttribute('data-interactive', '');\n}\n/**\n * Removes interactive-related attributes\n * @param {HTMLElement} popper\n * @param {HTMLElement} tooltip\n */\n\nfunction removeInteractive(popper, tooltip) {\n popper.removeAttribute('tabindex');\n tooltip.removeAttribute('data-interactive');\n}\n/**\n * Applies a transition duration to a list of elements\n * @param {Array} els\n * @param {Number} value\n */\n\nfunction applyTransitionDuration(els, value) {\n els.forEach(function (el) {\n if (el) {\n el.style.transitionDuration = \"\".concat(value, \"ms\");\n }\n });\n}\n/**\n * Add/remove transitionend listener from tooltip\n * @param {Element} tooltip\n * @param {String} action\n * @param {Function} listener\n */\n\nfunction toggleTransitionEndListener(tooltip, action, listener) {\n // UC Browser hasn't adopted the `transitionend` event despite supporting\n // unprefixed transitions...\n var eventName = isUCBrowser && document.body.style.WebkitTransition !== undefined ? 'webkitTransitionEnd' : 'transitionend';\n tooltip[action + 'EventListener'](eventName, listener);\n}\n/**\n * Returns the popper's placement, ignoring shifting (top-start, etc)\n * @param {Element} popper\n * @return {String}\n */\n\nfunction getPopperPlacement(popper) {\n var fullPlacement = popper.getAttribute('x-placement');\n return fullPlacement ? fullPlacement.split('-')[0] : '';\n}\n/**\n * Sets the visibility state to elements so they can begin to transition\n * @param {Array} els\n * @param {String} state\n */\n\nfunction setVisibilityState(els, state) {\n els.forEach(function (el) {\n if (el) {\n el.setAttribute('data-state', state);\n }\n });\n}\n/**\n * Triggers reflow\n * @param {Element} popper\n */\n\nfunction reflow(popper) {\n void popper.offsetHeight;\n}\n/**\n * Adds/removes theme from tooltip's classList\n * @param {HTMLDivElement} tooltip\n * @param {String} action\n * @param {String} theme\n */\n\nfunction toggleTheme(tooltip, action, theme) {\n theme.split(' ').forEach(function (themeName) {\n tooltip.classList[action](themeName + '-theme');\n });\n}\n/**\n * Constructs the popper element and returns it\n * @param {Number} id\n * @param {Object} props\n * @return {HTMLDivElement}\n */\n\nfunction createPopperElement(id, props) {\n var popper = div();\n popper.className = 'tippy-popper';\n popper.id = \"tippy-\".concat(id);\n popper.style.zIndex = props.zIndex;\n\n if (props.role) {\n popper.setAttribute('role', props.role);\n }\n\n var tooltip = div();\n tooltip.className = 'tippy-tooltip';\n tooltip.style.maxWidth = props.maxWidth + (typeof props.maxWidth === 'number' ? 'px' : '');\n tooltip.setAttribute('data-size', props.size);\n tooltip.setAttribute('data-animation', props.animation);\n tooltip.setAttribute('data-state', 'hidden');\n toggleTheme(tooltip, 'add', props.theme);\n var content = div();\n content.className = 'tippy-content';\n content.setAttribute('data-state', 'hidden');\n\n if (props.interactive) {\n addInteractive(popper, tooltip);\n }\n\n if (props.arrow) {\n tooltip.appendChild(createArrowElement(props.arrowType));\n }\n\n if (props.animateFill) {\n tooltip.appendChild(createBackdropElement());\n tooltip.setAttribute('data-animatefill', '');\n }\n\n if (props.inertia) {\n addInertia(tooltip);\n }\n\n setContent(content, props);\n tooltip.appendChild(content);\n popper.appendChild(tooltip);\n return popper;\n}\n/**\n * Updates the popper element based on the new props\n * @param {HTMLDivElement} popper\n * @param {Object} prevProps\n * @param {Object} nextProps\n */\n\nfunction updatePopperElement(popper, prevProps, nextProps) {\n var _getChildren = getChildren(popper),\n tooltip = _getChildren.tooltip,\n content = _getChildren.content,\n backdrop = _getChildren.backdrop,\n arrow = _getChildren.arrow;\n\n popper.style.zIndex = nextProps.zIndex;\n tooltip.setAttribute('data-size', nextProps.size);\n tooltip.setAttribute('data-animation', nextProps.animation);\n tooltip.style.maxWidth = nextProps.maxWidth + (typeof nextProps.maxWidth === 'number' ? 'px' : '');\n\n if (nextProps.role) {\n popper.setAttribute('role', nextProps.role);\n } else {\n popper.removeAttribute('role');\n }\n\n if (prevProps.content !== nextProps.content) {\n setContent(content, nextProps);\n } // animateFill\n\n\n if (!prevProps.animateFill && nextProps.animateFill) {\n tooltip.appendChild(createBackdropElement());\n tooltip.setAttribute('data-animatefill', '');\n } else if (prevProps.animateFill && !nextProps.animateFill) {\n tooltip.removeChild(backdrop);\n tooltip.removeAttribute('data-animatefill');\n } // arrow\n\n\n if (!prevProps.arrow && nextProps.arrow) {\n tooltip.appendChild(createArrowElement(nextProps.arrowType));\n } else if (prevProps.arrow && !nextProps.arrow) {\n tooltip.removeChild(arrow);\n } // arrowType\n\n\n if (prevProps.arrow && nextProps.arrow && prevProps.arrowType !== nextProps.arrowType) {\n tooltip.replaceChild(createArrowElement(nextProps.arrowType), arrow);\n } // interactive\n\n\n if (!prevProps.interactive && nextProps.interactive) {\n addInteractive(popper, tooltip);\n } else if (prevProps.interactive && !nextProps.interactive) {\n removeInteractive(popper, tooltip);\n } // inertia\n\n\n if (!prevProps.inertia && nextProps.inertia) {\n addInertia(tooltip);\n } else if (prevProps.inertia && !nextProps.inertia) {\n removeInertia(tooltip);\n } // theme\n\n\n if (prevProps.theme !== nextProps.theme) {\n toggleTheme(tooltip, 'remove', prevProps.theme);\n toggleTheme(tooltip, 'add', nextProps.theme);\n }\n}\n/**\n * Runs the callback after the popper's position has been updated\n * update() is debounced with Promise.resolve() or setTimeout()\n * scheduleUpdate() is update() wrapped in requestAnimationFrame()\n * @param {Popper} popperInstance\n * @param {Function} callback\n */\n\nfunction afterPopperPositionUpdates(popperInstance, callback) {\n var popper = popperInstance.popper,\n options = popperInstance.options;\n var onCreate = options.onCreate,\n onUpdate = options.onUpdate;\n\n options.onCreate = options.onUpdate = function (data) {\n reflow(popper);\n callback();\n onUpdate(data);\n options.onCreate = onCreate;\n options.onUpdate = onUpdate;\n };\n}\n/**\n * Hides all visible poppers on the document\n * @param {Object} options\n */\n\nfunction hideAll() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n checkHideOnClick = _ref.checkHideOnClick,\n exclude = _ref.exclude,\n duration = _ref.duration;\n\n arrayFrom(document.querySelectorAll(Selectors.POPPER)).forEach(function (popper) {\n var instance = popper._tippy;\n\n if (instance && (checkHideOnClick ? instance.props.hideOnClick === true : true) && (!exclude || popper !== exclude.popper)) {\n instance.hide(duration);\n }\n });\n}\n/**\n * Determines if the mouse cursor is outside of the popper's interactive border\n * region\n * @param {String} popperPlacement\n * @param {ClientRect} popperRect\n * @param {MouseEvent} event\n * @param {Object} props\n * @return {Boolean}\n */\n\nfunction isCursorOutsideInteractiveBorder(popperPlacement, popperRect, event, props) {\n if (!popperPlacement) {\n return true;\n }\n\n var x = event.clientX,\n y = event.clientY;\n var interactiveBorder = props.interactiveBorder,\n distance = props.distance;\n var exceedsTop = popperRect.top - y > (popperPlacement === 'top' ? interactiveBorder + distance : interactiveBorder);\n var exceedsBottom = y - popperRect.bottom > (popperPlacement === 'bottom' ? interactiveBorder + distance : interactiveBorder);\n var exceedsLeft = popperRect.left - x > (popperPlacement === 'left' ? interactiveBorder + distance : interactiveBorder);\n var exceedsRight = x - popperRect.right > (popperPlacement === 'right' ? interactiveBorder + distance : interactiveBorder);\n return exceedsTop || exceedsBottom || exceedsLeft || exceedsRight;\n}\n/**\n * Returns the distance offset, taking into account the default offset due to\n * the transform: translate() rule (10px) in CSS\n * @param {Number} distance\n * @return {String}\n */\n\nfunction getOffsetDistanceInPx(distance) {\n return -(distance - 10) + 'px';\n}\n\nvar PASSIVE = {\n passive: true\n};\nvar PADDING = 3;\n\nvar isUsingTouch = false;\nfunction onDocumentTouch() {\n if (isUsingTouch) {\n return;\n }\n\n isUsingTouch = true;\n\n if (isIOS) {\n document.body.classList.add('tippy-iOS');\n }\n\n if (window.performance) {\n document.addEventListener('mousemove', onDocumentMouseMove);\n }\n}\nvar lastMouseMoveTime = 0;\nfunction onDocumentMouseMove() {\n var now = performance.now(); // Chrome 60+ is 1 mousemove per animation frame, use 20ms time difference\n\n if (now - lastMouseMoveTime < 20) {\n isUsingTouch = false;\n document.removeEventListener('mousemove', onDocumentMouseMove);\n\n if (!isIOS) {\n document.body.classList.remove('tippy-iOS');\n }\n }\n\n lastMouseMoveTime = now;\n}\nfunction onDocumentClick(_ref) {\n var target = _ref.target;\n\n // Simulated events dispatched on the document\n if (!(target instanceof Element)) {\n return hideAll();\n } // Clicked on an interactive popper\n\n\n var popper = closest(target, Selectors.POPPER);\n\n if (popper && popper._tippy && popper._tippy.props.interactive) {\n return;\n } // Clicked on a reference\n\n\n var reference = closestCallback(target, function (el) {\n return el._tippy && el._tippy.reference === el;\n });\n\n if (reference) {\n var instance = reference._tippy;\n var isClickTrigger = includes(instance.props.trigger, 'click');\n\n if (isUsingTouch || isClickTrigger) {\n return hideAll({\n exclude: instance,\n checkHideOnClick: true\n });\n }\n\n if (instance.props.hideOnClick !== true || isClickTrigger) {\n return;\n }\n\n instance.clearDelayTimeouts();\n }\n\n hideAll({\n checkHideOnClick: true\n });\n}\nfunction onWindowBlur() {\n var _document = document,\n activeElement = _document.activeElement;\n\n if (activeElement && activeElement.blur && activeElement._tippy) {\n activeElement.blur();\n }\n}\n/**\n * Adds the needed global event listeners\n */\n\nfunction bindGlobalEventListeners() {\n document.addEventListener('click', onDocumentClick, true);\n document.addEventListener('touchstart', onDocumentTouch, PASSIVE);\n window.addEventListener('blur', onWindowBlur);\n}\n\nvar keys = Object.keys(Defaults);\n/**\n * Determines if an element can receive focus\n * @param {Element|Object} el\n * @return {Boolean}\n */\n\nfunction canReceiveFocus(el) {\n return el instanceof Element ? matches.call(el, 'a[href],area[href],button,details,input,textarea,select,iframe,[tabindex]') && !el.hasAttribute('disabled') : true;\n}\n/**\n * Returns an object of optional props from data-tippy-* attributes\n * @param {Element|Object} reference\n * @return {Object}\n */\n\nfunction getDataAttributeOptions(reference) {\n return keys.reduce(function (acc, key) {\n var valueAsString = (reference.getAttribute(\"data-tippy-\".concat(key)) || '').trim();\n\n if (!valueAsString) {\n return acc;\n }\n\n if (key === 'content') {\n acc[key] = valueAsString;\n } else {\n try {\n acc[key] = JSON.parse(valueAsString);\n } catch (e) {\n acc[key] = valueAsString;\n }\n }\n\n return acc;\n }, {});\n}\n/**\n * Polyfills the virtual reference (plain object) with Element.prototype props\n * Mutating because DOM elements are mutated, adds `_tippy` property\n * @param {Object} virtualReference\n */\n\nfunction polyfillElementPrototypeProperties(virtualReference) {\n var polyfills = {\n isVirtual: true,\n attributes: virtualReference.attributes || {},\n setAttribute: function setAttribute(key, value) {\n virtualReference.attributes[key] = value;\n },\n getAttribute: function getAttribute(key) {\n return virtualReference.attributes[key];\n },\n removeAttribute: function removeAttribute(key) {\n delete virtualReference.attributes[key];\n },\n hasAttribute: function hasAttribute(key) {\n return key in virtualReference.attributes;\n },\n addEventListener: function addEventListener() {},\n removeEventListener: function removeEventListener() {},\n classList: {\n classNames: {},\n add: function add(key) {\n virtualReference.classList.classNames[key] = true;\n },\n remove: function remove(key) {\n delete virtualReference.classList.classNames[key];\n },\n contains: function contains(key) {\n return key in virtualReference.classList.classNames;\n }\n }\n };\n\n for (var key in polyfills) {\n virtualReference[key] = polyfills[key];\n }\n}\n\n/**\n * Evaluates the props object by merging data attributes and\n * disabling conflicting options where necessary\n * @param {Element} reference\n * @param {Object} props\n * @return {Object}\n */\n\nfunction evaluateProps(reference, props) {\n var out = _extends({}, props, {\n content: evaluateValue(props.content, [reference])\n }, props.ignoreAttributes ? {} : getDataAttributeOptions(reference));\n\n if (out.arrow || isUCBrowser) {\n out.animateFill = false;\n }\n\n return out;\n}\n/**\n * Validates an object of options with the valid default props object\n * @param {Object} options\n * @param {Object} defaults\n */\n\nfunction validateOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var defaults = arguments.length > 1 ? arguments[1] : undefined;\n Object.keys(options).forEach(function (option) {\n if (!hasOwnProperty(defaults, option)) {\n throw new Error(\"[tippy]: `\".concat(option, \"` is not a valid option\"));\n }\n });\n}\n\nvar idCounter = 1;\n/**\n * Creates and returns a Tippy object. We're using a closure pattern instead of\n * a class so that the exposed object API is clean without private members\n * prefixed with `_`.\n * @param {Element} reference\n * @param {Object} collectionProps\n * @return {Object} instance\n */\n\nfunction createTippy(reference, collectionProps) {\n var props = evaluateProps(reference, collectionProps); // If the reference shouldn't have multiple tippys, return null early\n\n if (!props.multiple && reference._tippy) {\n return null;\n }\n /* ======================= 🔒 Private members 🔒 ======================= */\n // The last trigger event object that caused the tippy to show\n\n\n var lastTriggerEvent = {}; // The last mousemove event object created by the document mousemove event\n\n var lastMouseMoveEvent = null; // Timeout created by the show delay\n\n var showTimeoutId = 0; // Timeout created by the hide delay\n\n var hideTimeoutId = 0; // Flag to determine if the tippy is preparing to show due to the show timeout\n\n var isPreparingToShow = false; // The current `transitionend` callback reference\n\n var transitionEndListener = function transitionEndListener() {}; // Array of event listeners currently attached to the reference element\n\n\n var listeners = []; // Private onMouseMove handler reference, debounced or not\n\n var debouncedOnMouseMove = props.interactiveDebounce > 0 ? debounce(onMouseMove, props.interactiveDebounce) : onMouseMove; // Node the tippy is currently appended to\n\n var parentNode = null;\n /* ======================= 🔑 Public members 🔑 ======================= */\n // id used for the `aria-describedby` / `aria-labelledby` attribute\n\n var id = idCounter++; // Popper element reference\n\n var popper = createPopperElement(id, props); // Prevent a tippy with a delay from hiding if the cursor left then returned\n // before it started hiding\n\n popper.addEventListener('mouseenter', function (event) {\n if (instance.props.interactive && instance.state.isVisible && lastTriggerEvent.type === 'mouseenter') {\n prepareShow(event);\n }\n });\n popper.addEventListener('mouseleave', function () {\n if (instance.props.interactive && lastTriggerEvent.type === 'mouseenter') {\n document.addEventListener('mousemove', debouncedOnMouseMove);\n }\n }); // Popper element children: { arrow, backdrop, content, tooltip }\n\n var popperChildren = getChildren(popper); // The state of the tippy\n\n var state = {\n // If the tippy is currently enabled\n isEnabled: true,\n // show() invoked, not currently transitioning out\n isVisible: false,\n // If the tippy has been destroyed\n isDestroyed: false,\n // If the tippy is on the DOM (transitioning out or in)\n isMounted: false,\n // show() transition finished\n isShown: false // Popper.js instance for the tippy is lazily created\n\n };\n var popperInstance = null; // 🌟 tippy instance\n\n var instance = {\n // properties\n id: id,\n reference: reference,\n popper: popper,\n popperChildren: popperChildren,\n popperInstance: popperInstance,\n props: props,\n state: state,\n // methods\n clearDelayTimeouts: clearDelayTimeouts,\n set: set,\n setContent: setContent$$1,\n show: show,\n hide: hide,\n enable: enable,\n disable: disable,\n destroy: destroy\n };\n addTriggersToReference();\n\n if (!props.lazy) {\n createPopperInstance();\n instance.popperInstance.disableEventListeners();\n }\n\n if (props.showOnInit) {\n prepareShow();\n } // Ensure the reference element can receive focus (and is not a delegate)\n\n\n if (props.a11y && !props.target && !canReceiveFocus(reference)) {\n reference.setAttribute('tabindex', '0');\n } // Install shortcuts\n\n\n reference._tippy = instance;\n popper._tippy = instance;\n return instance;\n /* ======================= 🔒 Private methods 🔒 ======================= */\n\n /**\n * Positions the virtual reference near the mouse cursor\n */\n\n function positionVirtualReferenceNearCursor(event) {\n var _lastMouseMoveEvent = lastMouseMoveEvent = event,\n clientX = _lastMouseMoveEvent.clientX,\n clientY = _lastMouseMoveEvent.clientY;\n\n if (!instance.popperInstance) {\n return;\n } // Ensure virtual reference is padded to prevent tooltip from\n // overflowing. Maybe Popper.js issue?\n\n\n var placement = getPopperPlacement(instance.popper);\n var padding = instance.popperChildren.arrow ? PADDING + 16 : PADDING;\n var isVerticalPlacement = includes(['top', 'bottom'], placement);\n var isHorizontalPlacement = includes(['left', 'right'], placement); // Top / left boundary\n\n var x = isVerticalPlacement ? Math.max(padding, clientX) : clientX;\n var y = isHorizontalPlacement ? Math.max(padding, clientY) : clientY; // Bottom / right boundary\n\n if (isVerticalPlacement && x > padding) {\n x = Math.min(clientX, window.innerWidth - padding);\n }\n\n if (isHorizontalPlacement && y > padding) {\n y = Math.min(clientY, window.innerHeight - padding);\n }\n\n var rect = instance.reference.getBoundingClientRect();\n var followCursor = instance.props.followCursor;\n var isHorizontal = followCursor === 'horizontal';\n var isVertical = followCursor === 'vertical';\n instance.popperInstance.reference = {\n getBoundingClientRect: function getBoundingClientRect() {\n return {\n width: 0,\n height: 0,\n top: isHorizontal ? rect.top : y,\n bottom: isHorizontal ? rect.bottom : y,\n left: isVertical ? rect.left : x,\n right: isVertical ? rect.right : x\n };\n },\n clientWidth: 0,\n clientHeight: 0\n };\n instance.popperInstance.scheduleUpdate();\n\n if (followCursor === 'initial' && instance.state.isVisible) {\n removeFollowCursorListener();\n }\n }\n /**\n * Creates the tippy instance for a delegate when it's been triggered\n */\n\n\n function createDelegateChildTippy(event) {\n var targetEl = closest(event.target, instance.props.target);\n\n if (targetEl && !targetEl._tippy) {\n createTippy(targetEl, _extends({}, instance.props, {\n content: evaluateValue(collectionProps.content, [targetEl]),\n appendTo: collectionProps.appendTo,\n target: '',\n showOnInit: true\n }));\n prepareShow(event);\n }\n }\n /**\n * Setup before show() is invoked (delays, etc.)\n */\n\n\n function prepareShow(event) {\n clearDelayTimeouts();\n\n if (instance.state.isVisible) {\n return;\n } // Is a delegate, create an instance for the child target\n\n\n if (instance.props.target) {\n return createDelegateChildTippy(event);\n }\n\n isPreparingToShow = true;\n\n if (instance.props.wait) {\n return instance.props.wait(instance, event);\n } // If the tooltip has a delay, we need to be listening to the mousemove as\n // soon as the trigger event is fired, so that it's in the correct position\n // upon mount.\n // Edge case: if the tooltip is still mounted, but then prepareShow() is\n // called, it causes a jump.\n\n\n if (hasFollowCursorBehavior() && !instance.state.isMounted) {\n document.addEventListener('mousemove', positionVirtualReferenceNearCursor);\n }\n\n var delay = getValue(instance.props.delay, 0, Defaults.delay);\n\n if (delay) {\n showTimeoutId = setTimeout(function () {\n show();\n }, delay);\n } else {\n show();\n }\n }\n /**\n * Setup before hide() is invoked (delays, etc.)\n */\n\n\n function prepareHide() {\n clearDelayTimeouts();\n\n if (!instance.state.isVisible) {\n return removeFollowCursorListener();\n }\n\n isPreparingToShow = false;\n var delay = getValue(instance.props.delay, 1, Defaults.delay);\n\n if (delay) {\n hideTimeoutId = setTimeout(function () {\n if (instance.state.isVisible) {\n hide();\n }\n }, delay);\n } else {\n hide();\n }\n }\n /**\n * Removes the follow cursor listener\n */\n\n\n function removeFollowCursorListener() {\n document.removeEventListener('mousemove', positionVirtualReferenceNearCursor);\n lastMouseMoveEvent = null;\n }\n /**\n * Cleans up old listeners\n */\n\n\n function cleanupOldMouseListeners() {\n document.body.removeEventListener('mouseleave', prepareHide);\n document.removeEventListener('mousemove', debouncedOnMouseMove);\n }\n /**\n * Event listener invoked upon trigger\n */\n\n\n function onTrigger(event) {\n if (!instance.state.isEnabled || isEventListenerStopped(event)) {\n return;\n }\n\n if (!instance.state.isVisible) {\n lastTriggerEvent = event; // Use the `mouseenter` event as a \"mock\" mousemove event for touch\n // devices\n\n if (isUsingTouch && includes(event.type, 'mouse')) {\n lastMouseMoveEvent = event;\n }\n } // Toggle show/hide when clicking click-triggered tooltips\n\n\n if (event.type === 'click' && instance.props.hideOnClick !== false && instance.state.isVisible) {\n prepareHide();\n } else {\n prepareShow(event);\n }\n }\n /**\n * Event listener used for interactive tooltips to detect when they should\n * hide\n */\n\n\n function onMouseMove(event) {\n var referenceTheCursorIsOver = closestCallback(event.target, function (el) {\n return el._tippy;\n });\n var isCursorOverPopper = closest(event.target, Selectors.POPPER) === instance.popper;\n var isCursorOverReference = referenceTheCursorIsOver === instance.reference;\n\n if (isCursorOverPopper || isCursorOverReference) {\n return;\n }\n\n if (isCursorOutsideInteractiveBorder(getPopperPlacement(instance.popper), instance.popper.getBoundingClientRect(), event, instance.props)) {\n cleanupOldMouseListeners();\n prepareHide();\n }\n }\n /**\n * Event listener invoked upon mouseleave\n */\n\n\n function onMouseLeave(event) {\n if (isEventListenerStopped(event)) {\n return;\n }\n\n if (instance.props.interactive) {\n document.body.addEventListener('mouseleave', prepareHide);\n document.addEventListener('mousemove', debouncedOnMouseMove);\n return;\n }\n\n prepareHide();\n }\n /**\n * Event listener invoked upon blur\n */\n\n\n function onBlur(event) {\n if (event.target !== instance.reference) {\n return;\n }\n\n if (instance.props.interactive && event.relatedTarget && instance.popper.contains(event.relatedTarget)) {\n return;\n }\n\n prepareHide();\n }\n /**\n * Event listener invoked when a child target is triggered\n */\n\n\n function onDelegateShow(event) {\n if (closest(event.target, instance.props.target)) {\n prepareShow(event);\n }\n }\n /**\n * Event listener invoked when a child target should hide\n */\n\n\n function onDelegateHide(event) {\n if (closest(event.target, instance.props.target)) {\n prepareHide();\n }\n }\n /**\n * Determines if an event listener should stop further execution due to the\n * `touchHold` option\n */\n\n\n function isEventListenerStopped(event) {\n var supportsTouch = 'ontouchstart' in window;\n var isTouchEvent = includes(event.type, 'touch');\n var touchHold = instance.props.touchHold;\n return supportsTouch && isUsingTouch && touchHold && !isTouchEvent || isUsingTouch && !touchHold && isTouchEvent;\n }\n /**\n * Creates the popper instance for the instance\n */\n\n\n function createPopperInstance() {\n var popperOptions = instance.props.popperOptions;\n var _instance$popperChild = instance.popperChildren,\n tooltip = _instance$popperChild.tooltip,\n arrow = _instance$popperChild.arrow;\n instance.popperInstance = new Popper(instance.reference, instance.popper, _extends({\n placement: instance.props.placement\n }, popperOptions, {\n modifiers: _extends({}, popperOptions ? popperOptions.modifiers : {}, {\n preventOverflow: _extends({\n boundariesElement: instance.props.boundary,\n padding: PADDING\n }, getModifier(popperOptions, 'preventOverflow')),\n arrow: _extends({\n element: arrow,\n enabled: !!arrow\n }, getModifier(popperOptions, 'arrow')),\n flip: _extends({\n enabled: instance.props.flip,\n // The tooltip is offset by 10px from the popper in CSS,\n // we need to account for its distance\n padding: instance.props.distance + PADDING,\n behavior: instance.props.flipBehavior\n }, getModifier(popperOptions, 'flip')),\n offset: _extends({\n offset: instance.props.offset\n }, getModifier(popperOptions, 'offset'))\n }),\n onUpdate: function onUpdate(data) {\n if (instance.props.flip && !instance.props.flipOnUpdate) {\n if (data.flipped) {\n instance.popperInstance.options.placement = data.placement;\n }\n\n setFlipModifierEnabled(instance.popperInstance.modifiers, false);\n }\n\n var styles = tooltip.style;\n styles.top = '';\n styles.bottom = '';\n styles.left = '';\n styles.right = '';\n styles[getPopperPlacement(instance.popper)] = getOffsetDistanceInPx(instance.props.distance);\n\n if (popperOptions.onUpdate) {\n popperOptions.onUpdate(data);\n }\n }\n }));\n }\n /**\n * Mounts the tooltip to the DOM, callback to show tooltip is run **after**\n * popper's position has updated\n */\n\n\n function mount(callback) {\n var shouldEnableListeners = !hasFollowCursorBehavior() && !(instance.props.followCursor === 'initial' && isUsingTouch);\n\n if (!instance.popperInstance) {\n createPopperInstance();\n\n if (!shouldEnableListeners) {\n instance.popperInstance.disableEventListeners();\n }\n } else {\n if (!hasFollowCursorBehavior()) {\n instance.popperInstance.scheduleUpdate();\n\n if (shouldEnableListeners) {\n instance.popperInstance.enableEventListeners();\n }\n }\n\n setFlipModifierEnabled(instance.popperInstance.modifiers, instance.props.flip);\n } // If the instance previously had followCursor behavior, it will be\n // positioned incorrectly if triggered by `focus` afterwards.\n // Update the reference back to the real DOM element\n\n\n instance.popperInstance.reference = instance.reference;\n var arrow = instance.popperChildren.arrow;\n\n if (hasFollowCursorBehavior()) {\n if (arrow) {\n arrow.style.margin = '0';\n }\n\n var delay = getValue(instance.props.delay, 0, Defaults.delay);\n\n if (lastTriggerEvent.type) {\n positionVirtualReferenceNearCursor(delay && lastMouseMoveEvent ? lastMouseMoveEvent : lastTriggerEvent);\n }\n } else if (arrow) {\n arrow.style.margin = '';\n }\n\n afterPopperPositionUpdates(instance.popperInstance, callback);\n var appendTo = instance.props.appendTo;\n parentNode = appendTo === 'parent' ? instance.reference.parentNode : evaluateValue(appendTo, [instance.reference]);\n\n if (!parentNode.contains(instance.popper)) {\n parentNode.appendChild(instance.popper);\n instance.props.onMount(instance);\n instance.state.isMounted = true;\n }\n }\n /**\n * Determines if the instance is in `followCursor` mode\n */\n\n\n function hasFollowCursorBehavior() {\n return instance.props.followCursor && !isUsingTouch && lastTriggerEvent.type !== 'focus';\n }\n /**\n * Updates the tooltip's position on each animation frame + timeout\n */\n\n\n function makeSticky() {\n applyTransitionDuration([instance.popper], isIE ? 0 : instance.props.updateDuration);\n\n var updatePosition = function updatePosition() {\n if (instance.popperInstance) {\n instance.popperInstance.scheduleUpdate();\n }\n\n if (instance.state.isMounted) {\n requestAnimationFrame(updatePosition);\n } else {\n applyTransitionDuration([instance.popper], 0);\n }\n };\n\n updatePosition();\n }\n /**\n * Invokes a callback once the tooltip has fully transitioned out\n */\n\n\n function onTransitionedOut(duration, callback) {\n onTransitionEnd(duration, function () {\n if (!instance.state.isVisible && parentNode && parentNode.contains(instance.popper)) {\n callback();\n }\n });\n }\n /**\n * Invokes a callback once the tooltip has fully transitioned in\n */\n\n\n function onTransitionedIn(duration, callback) {\n onTransitionEnd(duration, callback);\n }\n /**\n * Invokes a callback once the tooltip's CSS transition ends\n */\n\n\n function onTransitionEnd(duration, callback) {\n // Make callback synchronous if duration is 0\n if (duration === 0) {\n return callback();\n }\n\n var tooltip = instance.popperChildren.tooltip;\n\n var listener = function listener(e) {\n if (e.target === tooltip) {\n toggleTransitionEndListener(tooltip, 'remove', listener);\n callback();\n }\n };\n\n toggleTransitionEndListener(tooltip, 'remove', transitionEndListener);\n toggleTransitionEndListener(tooltip, 'add', listener);\n transitionEndListener = listener;\n }\n /**\n * Adds an event listener to the reference and stores it in `listeners`\n */\n\n\n function on(eventType, handler) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n instance.reference.addEventListener(eventType, handler, options);\n listeners.push({\n eventType: eventType,\n handler: handler,\n options: options\n });\n }\n /**\n * Adds event listeners to the reference based on the `trigger` prop\n */\n\n\n function addTriggersToReference() {\n if (instance.props.touchHold && !instance.props.target) {\n on('touchstart', onTrigger, PASSIVE);\n on('touchend', onMouseLeave, PASSIVE);\n }\n\n instance.props.trigger.trim().split(' ').forEach(function (eventType) {\n if (eventType === 'manual') {\n return;\n }\n\n if (!instance.props.target) {\n on(eventType, onTrigger);\n\n switch (eventType) {\n case 'mouseenter':\n on('mouseleave', onMouseLeave);\n break;\n\n case 'focus':\n on(isIE ? 'focusout' : 'blur', onBlur);\n break;\n }\n } else {\n switch (eventType) {\n case 'mouseenter':\n on('mouseover', onDelegateShow);\n on('mouseout', onDelegateHide);\n break;\n\n case 'focus':\n on('focusin', onDelegateShow);\n on('focusout', onDelegateHide);\n break;\n\n case 'click':\n on(eventType, onDelegateShow);\n break;\n }\n }\n });\n }\n /**\n * Removes event listeners from the reference\n */\n\n\n function removeTriggersFromReference() {\n listeners.forEach(function (_ref) {\n var eventType = _ref.eventType,\n handler = _ref.handler,\n options = _ref.options;\n instance.reference.removeEventListener(eventType, handler, options);\n });\n listeners = [];\n }\n /**\n * Returns inner elements used in show/hide methods\n */\n\n\n function getInnerElements() {\n return [instance.popperChildren.tooltip, instance.popperChildren.backdrop, instance.popperChildren.content];\n }\n /* ======================= 🔑 Public methods 🔑 ======================= */\n\n /**\n * Enables the instance to allow it to show or hide\n */\n\n\n function enable() {\n instance.state.isEnabled = true;\n }\n /**\n * Disables the instance to disallow it to show or hide\n */\n\n\n function disable() {\n instance.state.isEnabled = false;\n }\n /**\n * Clears pending timeouts related to the `delay` prop if any\n */\n\n\n function clearDelayTimeouts() {\n clearTimeout(showTimeoutId);\n clearTimeout(hideTimeoutId);\n }\n /**\n * Sets new props for the instance and redraws the tooltip\n */\n\n\n function set() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n validateOptions(options, Defaults);\n var prevProps = instance.props;\n var nextProps = evaluateProps(instance.reference, _extends({}, instance.props, options, {\n ignoreAttributes: true\n }));\n nextProps.ignoreAttributes = hasOwnProperty(options, 'ignoreAttributes') ? options.ignoreAttributes : prevProps.ignoreAttributes;\n instance.props = nextProps;\n\n if (hasOwnProperty(options, 'trigger') || hasOwnProperty(options, 'touchHold')) {\n removeTriggersFromReference();\n addTriggersToReference();\n }\n\n if (hasOwnProperty(options, 'interactiveDebounce')) {\n cleanupOldMouseListeners();\n debouncedOnMouseMove = debounce(onMouseMove, options.interactiveDebounce);\n }\n\n updatePopperElement(instance.popper, prevProps, nextProps);\n instance.popperChildren = getChildren(instance.popper);\n\n if (instance.popperInstance) {\n instance.popperInstance.update();\n\n if (POPPER_INSTANCE_DEPENDENCIES.some(function (prop) {\n return hasOwnProperty(options, prop);\n })) {\n instance.popperInstance.destroy();\n createPopperInstance();\n\n if (!instance.state.isVisible) {\n instance.popperInstance.disableEventListeners();\n }\n\n if (instance.props.followCursor && lastMouseMoveEvent) {\n positionVirtualReferenceNearCursor(lastMouseMoveEvent);\n }\n }\n }\n }\n /**\n * Shortcut for .set({ content: newContent })\n */\n\n\n function setContent$$1(content) {\n set({\n content: content\n });\n }\n /**\n * Shows the tooltip\n */\n\n\n function show() {\n var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getValue(instance.props.duration, 0, Defaults.duration[0]);\n\n if (instance.state.isDestroyed || !instance.state.isEnabled || isUsingTouch && !instance.props.touch) {\n return;\n } // Destroy tooltip if the reference element is no longer on the DOM\n\n\n if (!instance.reference.isVirtual && !document.documentElement.contains(instance.reference)) {\n return destroy();\n } // Do not show tooltip if the reference element has a `disabled` attribute\n\n\n if (instance.reference.hasAttribute('disabled')) {\n return;\n }\n\n if (instance.props.onShow(instance) === false) {\n return;\n }\n\n instance.popper.style.visibility = 'visible';\n instance.state.isVisible = true;\n\n if (instance.props.interactive) {\n instance.reference.classList.add('tippy-active');\n } // Prevent a transition if the popper is at the opposite placement\n\n\n applyTransitionDuration([instance.popper, instance.popperChildren.tooltip, instance.popperChildren.backdrop], 0);\n mount(function () {\n if (!instance.state.isVisible) {\n return;\n } // Arrow will sometimes not be positioned correctly. Force another update\n\n\n if (!hasFollowCursorBehavior()) {\n instance.popperInstance.update();\n } // Allow followCursor: 'initial' on touch devices\n\n\n if (isUsingTouch && instance.props.followCursor === 'initial') {\n positionVirtualReferenceNearCursor(lastMouseMoveEvent);\n }\n\n applyTransitionDuration([instance.popper], props.updateDuration);\n applyTransitionDuration(getInnerElements(), duration);\n\n if (instance.popperChildren.backdrop) {\n instance.popperChildren.content.style.transitionDelay = Math.round(duration / 12) + 'ms';\n }\n\n if (instance.props.sticky) {\n makeSticky();\n }\n\n setVisibilityState(getInnerElements(), 'visible');\n onTransitionedIn(duration, function () {\n instance.popperChildren.tooltip.classList.add('tippy-notransition');\n\n if (instance.props.aria) {\n instance.reference.setAttribute(\"aria-\".concat(instance.props.aria), instance.popper.id);\n }\n\n instance.props.onShown(instance);\n instance.state.isShown = true;\n });\n });\n }\n /**\n * Hides the tooltip\n */\n\n\n function hide() {\n var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getValue(instance.props.duration, 1, Defaults.duration[1]);\n\n if (instance.state.isDestroyed || !instance.state.isEnabled) {\n return;\n }\n\n if (instance.props.onHide(instance) === false) {\n return;\n }\n\n instance.popperChildren.tooltip.classList.remove('tippy-notransition');\n\n if (instance.props.interactive) {\n instance.reference.classList.remove('tippy-active');\n }\n\n instance.popper.style.visibility = 'hidden';\n instance.state.isVisible = false;\n instance.state.isShown = false;\n applyTransitionDuration(getInnerElements(), duration);\n setVisibilityState(getInnerElements(), 'hidden');\n onTransitionedOut(duration, function () {\n if (!isPreparingToShow) {\n removeFollowCursorListener();\n }\n\n if (instance.props.aria) {\n instance.reference.removeAttribute(\"aria-\".concat(instance.props.aria));\n }\n\n instance.popperInstance.disableEventListeners();\n instance.popperInstance.options.placement = instance.props.placement;\n parentNode.removeChild(instance.popper);\n instance.props.onHidden(instance);\n instance.state.isMounted = false;\n });\n }\n /**\n * Destroys the tooltip\n */\n\n\n function destroy(destroyTargetInstances) {\n if (instance.state.isDestroyed) {\n return;\n } // If the popper is currently mounted to the DOM, we want to ensure it gets\n // hidden and unmounted instantly upon destruction\n\n\n if (instance.state.isMounted) {\n hide(0);\n }\n\n removeTriggersFromReference();\n delete instance.reference._tippy;\n\n if (instance.props.target && destroyTargetInstances) {\n arrayFrom(instance.reference.querySelectorAll(instance.props.target)).forEach(function (child) {\n if (child._tippy) {\n child._tippy.destroy();\n }\n });\n }\n\n if (instance.popperInstance) {\n instance.popperInstance.destroy();\n }\n\n instance.state.isDestroyed = true;\n }\n}\n\n/**\n * Groups an array of instances by taking control of their props during\n * certain lifecycles.\n * @param {Object[]} targets\n * @param {Object} options\n */\nfunction group(instances) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$delay = _ref.delay,\n delay = _ref$delay === void 0 ? instances[0].props.delay : _ref$delay,\n _ref$duration = _ref.duration,\n duration = _ref$duration === void 0 ? 0 : _ref$duration;\n\n var isAnyTippyOpen = false;\n instances.forEach(function (instance) {\n instance._originalProps = {\n duration: instance.props.duration,\n onHide: instance.props.onHide,\n onShow: instance.props.onShow,\n onShown: instance.props.onShown\n };\n });\n\n function setIsAnyTippyOpen(value) {\n isAnyTippyOpen = value;\n updateInstances();\n }\n\n function onShow(instance) {\n instance._originalProps.onShow(instance);\n\n instances.forEach(function (instance) {\n instance.set({\n duration: duration\n });\n instance.hide();\n });\n setIsAnyTippyOpen(true);\n }\n\n function onHide(instance) {\n instance._originalProps.onHide(instance);\n\n setIsAnyTippyOpen(false);\n }\n\n function onShown(instance) {\n instance._originalProps.onShown(instance);\n\n instance.set({\n duration: instance._originalProps.duration\n });\n }\n\n function updateInstances() {\n instances.forEach(function (instance) {\n instance.set({\n onShow: onShow,\n onShown: onShown,\n onHide: onHide,\n delay: isAnyTippyOpen ? [0, Array.isArray(delay) ? delay[1] : delay] : delay,\n duration: isAnyTippyOpen ? duration : instance._originalProps.duration\n });\n });\n }\n\n updateInstances();\n}\n\nvar globalEventListenersBound = false;\n/**\n * Exported module\n * @param {String|Element|Element[]|NodeList|Object} targets\n * @param {Object} options\n * @return {Object}\n */\n\nfunction tippy(targets, options) {\n validateOptions(options, Defaults);\n\n if (!globalEventListenersBound) {\n bindGlobalEventListeners();\n globalEventListenersBound = true;\n }\n\n var props = _extends({}, Defaults, options); // If they are specifying a virtual positioning reference, we need to polyfill\n // some native DOM props\n\n\n if (isBareVirtualElement(targets)) {\n polyfillElementPrototypeProperties(targets);\n }\n\n var instances = getArrayOfElements(targets).reduce(function (acc, reference) {\n var instance = reference && createTippy(reference, props);\n\n if (instance) {\n acc.push(instance);\n }\n\n return acc;\n }, []);\n return isSingular(targets) ? instances[0] : instances;\n}\n/**\n * Static props\n */\n\n\ntippy.version = version;\ntippy.defaults = Defaults;\n/**\n * Static methods\n */\n\ntippy.setDefaults = function (partialDefaults) {\n Object.keys(partialDefaults).forEach(function (key) {\n Defaults[key] = partialDefaults[key];\n });\n};\n\ntippy.hideAll = hideAll;\ntippy.group = group;\n/**\n * Auto-init tooltips for elements with a `data-tippy=\"...\"` attribute\n */\n\nfunction autoInit() {\n arrayFrom(document.querySelectorAll('[data-tippy]')).forEach(function (el) {\n var content = el.getAttribute('data-tippy');\n\n if (content) {\n tippy(el, {\n content: content\n });\n }\n });\n}\n\nif (isBrowser) {\n setTimeout(autoInit);\n}\n\n/**\n * Injects a string of CSS styles to a style node in \n * @param {String} css\n */\n\nfunction injectCSS(css) {\n if (isBrowser) {\n var style = document.createElement('style');\n style.type = 'text/css';\n style.textContent = css;\n var head = document.head;\n var firstChild = head.firstChild;\n\n if (firstChild) {\n head.insertBefore(style, firstChild);\n } else {\n head.appendChild(style);\n }\n }\n}\n\ninjectCSS(css);\n\nexport default tippy;\n//# sourceMappingURL=index.all.js.map\n","import tippy from 'tippy.js';\n\nconst DEFAULTS = {\n arrow: true,\n animation: 'fade',\n appendTo: 'parent',\n placement: 'top',\n interactive: true,\n theme: 'light-border',\n maxWidth: 240,\n};\n\nconst getOptions = options => Object.assign({}, DEFAULTS, options || {});\n\nconst initTooltip = (selector, options) => {\n tippy(selector, getOptions(options));\n};\n\nexport default (selector, options) => {\n initTooltip(selector, options);\n};\n","import 'app_storefront_base/storeLocator';\n","/* globals google */\n\nimport base from '~base';\n\nimport $ from 'jquery';\nimport { fetchOptionsGet, removeParamsFromURL, loadContent } from '../util/fetchutils'; // eslint-disable-line\nimport { appendToUrl, parseQueryString } from '../util/urlutils';\nimport {\n onEvent, getJSONData, isLG, // eslint-disable-line import/named\n} from '../util/domutils';\nimport { replaceUrlParams } from '../../../../scripts/helpers/urlHelpers';\nimport { searchStores } from '../components/searchStores';\nimport tooltip from '../components/tooltip';\n\nconst SELECTORS = {\n SEARCH_STORE_BOX_ARROW: '.toggle-store-locator-container-left',\n STORE_INFO_BOX_ARROW: '.toggle-store-locator-container-right',\n STORE_LOCATOR_CONTAINER: '.store-locator-container',\n STORE_LOCATOR_CONTAINER_SEARCH: '.store-locator-container-search',\n STORE_LOCATOR_TABS_CONTAINER: '.store-locator-tabs-container',\n STORES_DETAILS_CONTAINER: '.stores-details-container',\n SEARCH_STORE_BOX_ARROW_LEFT_ARROW: '.toggle-store-locator-container-left .icon-chevron-left',\n SEARCH_STORE_BOX_ARROW_RIGHT_ARROW: '.toggle-store-locator-container-left .icon-chevron-right',\n STORE_INFO_BOX_ARROW_LEFT_ARROW: '.toggle-store-locator-container-right .icon-chevron-left',\n STORE_INFO_BOX_ARROW_RIGHT_ARROW: '.toggle-store-locator-container-right .icon-chevron-right',\n NAV_TAB: '.store-locator-tab',\n NAV_TAB_LIST: '.tab-list',\n NAV_TAB_MAP: '.tab-map',\n MAP_CANVAS: '.map-canvas',\n MAP_KEY: '.mobile-map-key',\n CLEAR_FILTERS: '.clear-filters',\n SEARCH_FORM: '.search-form',\n LOCATOR_FORM: 'form.store-locator',\n TOOLTIP_FILTER_CONTAINER: '.storelocator-arrow-tooltip-filter',\n TOOLTIP_SEARCH_RESULTS_CONTAINER: '.storelocator-arrow-tooltip-results',\n};\n\n// Reused DOM elements throughout different functions\nconst storesDetailsContainer = document.querySelector(SELECTORS.STORES_DETAILS_CONTAINER);\nconst storeInfoBoxArrow = document.querySelector(SELECTORS.STORE_INFO_BOX_ARROW);\nconst arrowLeft = document.querySelector(SELECTORS.STORE_INFO_BOX_ARROW_LEFT_ARROW);\nconst arrowRight = document.querySelector(SELECTORS.STORE_INFO_BOX_ARROW_RIGHT_ARROW);\nconst tabsContainer = document.querySelector(SELECTORS.STORE_LOCATOR_TABS_CONTAINER);\n\n// Init UK Map in the center of the viewport\nconst STARTING_COORDINATES = {\n lat: 55.3617609,\n long: -3.4433238,\n};\n\nconst MAP_OPTIONS_CONFIG = {\n scrollwheel: true,\n zoom: 6,\n mapTypeControl: false,\n streetViewControl: false,\n};\n\n// Add objects definitions inside the showPosition function to ensure that google is defined\nconst showPosition = () => {\n const isStoreDetails = () => !!document.querySelector('.store-details-page-container');\n\n const getImageConfig = url => ({\n src: url,\n scale: isStoreDetails() ? 2.5 : 1.1,\n anchor: new google.maps.Point(13, 30),\n labelOrigin: new google.maps.Point(12, 12),\n });\n\n const createMapOptions = (mapOptions, center) => {\n const options = {\n scrollwheel: mapOptions.scrollwheel,\n zoom: mapOptions.zoom,\n center,\n mapTypeControl: mapOptions.mapTypeControl,\n streetViewControl: mapOptions.streetViewControl,\n };\n\n if (isStoreDetails()) {\n options.draggable = false;\n }\n\n if (window.beesfra && window.beesfra.config && window.beesfra.config.customMapStyle) {\n options.styles = JSON.parse(window.beesfra.config.customMapStyle);\n }\n\n return options;\n };\n\n const createMarker = (storeLocation, map, item, markerImg) => {\n const markerOptions = {\n position: storeLocation,\n map,\n title: item.name,\n icon: markerImg,\n };\n\n const marker = new google.maps.Marker(markerOptions);\n\n return marker;\n };\n\n const createMarkerLink = (item) => {\n const link = document.createElement('a');\n link.innerHTML = item.name;\n link.href = item.storeUrl;\n link.target = '_blank';\n\n return link;\n };\n\n const createMarkerImg = img => ({\n url: img.src,\n scale: img.scale,\n anchor: img.anchor,\n labelOrigin: img.labelOrigin,\n });\n\n const mapWidgets = {\n map: null,\n infowindow: null,\n initialized: false,\n markers: [],\n };\n\n const initMapWidget = () => {\n if (!mapWidgets.initialized) {\n const mapCanvas = document.querySelector(SELECTORS.MAP_CANVAS);\n mapWidgets.infowindow = new google.maps.InfoWindow();\n // Init UK Map in the center of the viewport\n const latlng = new google.maps.LatLng(STARTING_COORDINATES.lat, STARTING_COORDINATES.long);\n\n const mapOptions = createMapOptions(MAP_OPTIONS_CONFIG, latlng);\n mapWidgets.map = new google.maps.Map(mapCanvas, mapOptions);\n mapWidgets.initialized = true;\n }\n };\n\n if (!mapWidgets.initialized) {\n initMapWidget();\n } else {\n mapWidgets.markers.forEach((marker) => {\n marker.setMap(null);\n });\n }\n\n const mapCanvas = document.querySelector(SELECTORS.MAP_CANVAS);\n\n const mapdiv = getJSONData(mapCanvas, 'locations', {});\n\n const bounds = new google.maps.LatLngBounds();\n\n Object.keys(mapdiv).forEach((key) => {\n const item = mapdiv[key];\n const imageConfig = getImageConfig(item.googleMapsMarkerIconUrl);\n const markerImg = createMarkerImg(imageConfig);\n const storeLocation = new google.maps.LatLng(item.latitude, item.longitude);\n const marker = createMarker(storeLocation, mapWidgets.map, item, markerImg);\n\n mapWidgets.markers.push(marker);\n\n marker.addListener('click', () => {\n mapWidgets.infowindow.setOptions({\n content: createMarkerLink(item),\n });\n mapWidgets.infowindow.open(mapWidgets.map, marker);\n });\n\n // Create a minimum bound based on a set of store locations\n bounds.extend(marker.position);\n });\n\n // Fit all the store marks in the center of a minimum bounds when any store has been found.\n if (mapdiv && mapdiv.length !== 0) {\n mapWidgets.map.fitBounds(bounds);\n const centerLatLong = new google.maps.LatLng(mapdiv[0].latitude, mapdiv[0].longitude);\n const listener = google.maps.event.addListener(mapWidgets.map, 'idle', () => {\n mapWidgets.map.setZoom(14);\n mapWidgets.map.setCenter(centerLatLong);\n\n google.maps.event.removeListener(listener);\n });\n }\n};\n\nconst updateStoresResults = (data) => {\n const resultsDiv = document.querySelector('.results');\n const mapDiv = document.querySelector(SELECTORS.MAP_CANVAS);\n const hasResults = data.stores.length;\n\n if (!hasResults || hasResults === 0) {\n document.querySelector('.store-locator-no-results').classList.remove('d-none');\n document.querySelector('.store-locator-no-results').classList.add('d-block');\n } else {\n document.querySelector('.store-locator-no-results').classList.add('d-none');\n document.querySelector('.store-locator-no-results').classList.remove('d-block');\n }\n\n resultsDiv.innerHTML = '';\n\n resultsDiv.setAttribute('data-has-results', hasResults);\n // resultsDiv.setAttribute('data-radius', data.radius);\n resultsDiv.setAttribute('data-search-key', data.searchKey);\n\n mapDiv.setAttribute('data-locations', data.locations);\n\n if (mapDiv.getAttribute('data-has-google-api')) {\n showPosition();\n } else {\n document.querySelector('.store-locator-no-apiKey').classList.remove('d-none');\n }\n\n if (data.storesResultsHtml && data.stores.length) {\n resultsDiv.innerHTML = data.storesResultsHtml;\n document.querySelector('.store-locator .results .store-show-more').addEventListener('click', () => {\n const storeResults = document.querySelectorAll('.store-locator .results .card-body');\n storeResults.forEach((el) => {\n el.classList.remove('hidden-md-down');\n });\n document.querySelector('.store-locator .results .store-show-more').remove();\n });\n } else {\n resultsDiv.innerHTML = '';\n }\n\n const addressText = document.querySelector('#store-postal-code').value;\n if (addressText) {\n const nearText = document.querySelector('.search-near-text');\n if (nearText) {\n nearText.innerHTML = `\"${addressText}\"`;\n }\n }\n};\n\nconst mobileScrollToResults = () => {\n if (!isLG()) {\n document.querySelector('.store-locator-tabs-container').scrollIntoView();\n }\n};\n\nconst search = async (element) => {\n const storeLocatorForm = element.closest('.store-locator');\n\n const content = await searchStores(storeLocatorForm);\n updateStoresResults(content);\n mobileScrollToResults();\n};\n\nconst searchByLocation = () => new Promise(((resolve) => {\n const postalCodeInput = document.querySelector('#store-postal-code');\n\n if (postalCodeInput) {\n document.querySelector('#store-postal-code').value = '';\n\n if (!navigator.geolocation) {\n return;\n }\n\n navigator.geolocation.getCurrentPosition(async (position) => {\n const mapCanvas = document.querySelector(SELECTORS.MAP_CANVAS);\n mapCanvas.dataset.locations = JSON.stringify([\n {\n infoWindowHtml: '',\n latitude: position.coords.latitude,\n longitude: position.coords.longitude,\n name: 'My position',\n },\n ]);\n\n const storeLocatorForm = document.querySelector('.store-locator-container .store-locator');\n const coords = {\n lat: position.coords.latitude,\n long: position.coords.longitude,\n };\n const { content } = await loadContent(storeLocatorForm, null, coords);\n\n updateStoresResults(content);\n\n const updatedUrl = replaceUrlParams(storeLocatorForm.action, coords);\n storeLocatorForm.setAttribute('action', updatedUrl);\n\n resolve();\n }, (error) => {\n if (error.code === error.PERMISSION_DENIED) {\n // eslint-disable-next-line no-alert\n alert(window.beesfra.resources.storeLocator.errorLocationDisabled);\n }\n });\n }\n}));\n\n/**\n * Makes an ajax call that filters the stores based on the element that is passed\n * @param {*} element filtering element\n * @param {Boolean} noFilter if true no filtering is applied from the passed element\n * @param {Boolean} getFirstSearchResult adds onlyfirst parameter to url which then should return only the first store\n */\nconst filter = (element, noFilter, getFirstSearchResult) => {\n const storeLocatorForm = document.querySelector(SELECTORS.LOCATOR_FORM);\n let url = storeLocatorForm.getAttribute('action');\n let queryParam = element.getAttribute('name').replace('_brandFilter', '');\n const invertedStoreFilter = element.classList.contains('inverted-filter');\n if (invertedStoreFilter) {\n queryParam = queryParam.replace('_inverted', '');\n }\n\n let payload;\n url = removeParamsFromURL(url, [queryParam]);\n\n if (element.checked && !noFilter) {\n payload = {\n [queryParam]: !invertedStoreFilter,\n };\n url = appendToUrl(url, payload);\n }\n\n storeLocatorForm.setAttribute('action', url);\n\n if (getFirstSearchResult) {\n url = appendToUrl(url, {\n onlyfirst: true,\n });\n }\n\n storeLocatorForm.action = url;\n storeLocatorForm.dispatchEvent(new CustomEvent('submit', { bubbles: true, cancelable: true }));\n};\n\nconst storeInfoOpen = () => {\n storesDetailsContainer.classList.remove('d-none');\n storeInfoBoxArrow.classList.remove('hide-right');\n arrowLeft.classList.add('d-none');\n arrowRight.classList.remove('d-none');\n tabsContainer.classList.remove('non-active');\n};\n\nconst initTooltip = (tooltipContainer, tooltipContainerArrow, tooltipPlacement) => {\n const enableTooltip = !tooltipContainerArrow.classList.contains('d-none');\n\n if (enableTooltip) {\n tooltip(tooltipContainer, {\n placement: tooltipPlacement,\n });\n }\n};\n\nconst initMap = () => {\n const mapCanvas = document.querySelector(SELECTORS.MAP_CANVAS);\n const resultsContainer = document.querySelector('.results');\n\n if (mapCanvas && document.querySelector(SELECTORS.MAP_CANVAS).hasAttribute('data-has-google-api')) {\n showPosition();\n } else {\n document.querySelector('.store-locator-no-apiKey').classList.add('d-block');\n }\n\n if (resultsContainer && !document.querySelector('.results').hasAttribute('data-has-results')) {\n document.querySelector('.store-locator-no-results').classList.add('d-block');\n }\n};\n\nbase.showNearbyStores = async () => {\n if (!window.location.hash) {\n await searchByLocation();\n storeInfoOpen();\n }\n};\n\nbase.init = () => {\n let googleMapsApiKeyScript = document.querySelector('script[src*=\"/maps/api/\"]');\n\n if (googleMapsApiKeyScript) {\n initMap();\n } else {\n const scriptIntervalId = setInterval(() => {\n googleMapsApiKeyScript = document.querySelector('script[src*=\"/maps/api/\"]');\n\n if (googleMapsApiKeyScript) {\n initMap();\n clearInterval(scriptIntervalId);\n }\n }, 500);\n }\n};\n\nbase.detectLocation = () => {\n onEvent(document, 'click', '.detect-location', async (e) => {\n e.preventDefault();\n await searchByLocation();\n storeInfoOpen();\n });\n};\n\nbase.search = () => {\n const searchContainer = document.querySelector(SELECTORS.STORE_LOCATOR_CONTAINER_SEARCH);\n onEvent(document, 'submit', '.store-locator-container form.store-locator', async (e) => {\n e.preventDefault();\n await search(e.delegateTarget);\n storeInfoOpen();\n });\n\n onEvent(document, 'click', '.store-locator-container .btn-storelocator-search[type=\"button\"]', async (e) => {\n e.preventDefault();\n await search(e.delegateTarget);\n storeInfoOpen();\n });\n\n if (searchContainer) {\n searchContainer.addEventListener('keypress', (e) => {\n const searchButton = document.querySelector('.store-locator-container .btn-storelocator-search');\n\n // ASCII CR decimal code for Enter is 13\n if (e.keyCode === 13) {\n e.preventDefault();\n searchButton.click();\n }\n });\n }\n};\n\nbase.filter = () => {\n onEvent(document, 'change', '#accordion-filter-stores input[type=checkbox]', (e) => {\n filter(e.delegateTarget);\n });\n onEvent(document, 'change', '.store-filter input[type=checkbox]', (e) => {\n const numberOfCheckedFilters = document.querySelectorAll('.store-filter input[type=\"checkbox\"]:checked');\n\n if (numberOfCheckedFilters.length === 2) {\n filter(e.delegateTarget, true);\n } else if (numberOfCheckedFilters.length === 1) {\n filter(numberOfCheckedFilters[0]);\n } else {\n filter(e.delegateTarget, null, true);\n }\n });\n};\n\nbase.initStoreSearchClose = () => {\n const storeLocatorContainer = document.querySelector(SELECTORS.STORE_LOCATOR_CONTAINER_SEARCH);\n const searchStoreBoxArrow = document.querySelector(SELECTORS.SEARCH_STORE_BOX_ARROW);\n const searchStoreArrowLeft = document.querySelector(SELECTORS.SEARCH_STORE_BOX_ARROW_LEFT_ARROW);\n const searchStoreArrowRight = document.querySelector(SELECTORS.SEARCH_STORE_BOX_ARROW_RIGHT_ARROW);\n\n onEvent(document, 'click', SELECTORS.SEARCH_STORE_BOX_ARROW, () => {\n storeLocatorContainer.classList.toggle('d-none');\n searchStoreBoxArrow.classList.toggle('hide-left');\n searchStoreArrowLeft.classList.toggle('d-none');\n searchStoreArrowRight.classList.toggle('d-none');\n });\n};\n\nbase.initStoreInfoClose = () => {\n onEvent(document, 'click', SELECTORS.STORE_INFO_BOX_ARROW, () => {\n storesDetailsContainer.classList.toggle('d-none');\n storeInfoBoxArrow.classList.toggle('hide-right');\n arrowLeft.classList.toggle('d-none');\n arrowRight.classList.toggle('d-none');\n });\n};\n\nbase.initMobileTabsListMap = () => {\n const storeLocatorTabsContainer = document.querySelector('.store-locator-tabs-container');\n const navTabList = document.querySelector(SELECTORS.NAV_TAB_LIST);\n const navTabMap = document.querySelector(SELECTORS.NAV_TAB_MAP);\n const mapCanvas = document.querySelector(SELECTORS.MAP_CANVAS);\n const mapKey = document.querySelector(SELECTORS.MAP_KEY);\n\n if (storeLocatorTabsContainer) {\n onEvent(storeLocatorTabsContainer, 'click', SELECTORS.NAV_TAB, () => {\n navTabList.classList.toggle('active-tab');\n navTabMap.classList.toggle('active-tab');\n mapCanvas.classList.toggle('d-none');\n mapKey.classList.toggle('d-none');\n storesDetailsContainer.classList.toggle('d-none');\n });\n }\n};\n\nbase.clearFilters = () => {\n const searchForm = document.querySelector(SELECTORS.SEARCH_FORM);\n\n if (searchForm) {\n onEvent(searchForm, 'click', SELECTORS.CLEAR_FILTERS, () => {\n const checkboxes = searchForm.querySelectorAll('input[type=\"checkbox\"]');\n checkboxes.forEach((checkbox) => {\n if (checkbox.checked) {\n // Trigger click instead of checkbox.checked = false in order to fetch updated data again\n checkbox.click();\n }\n });\n });\n }\n};\n\nbase.initializeTooltips = () => {\n const tooltipFilter = SELECTORS.TOOLTIP_FILTER_CONTAINER;\n const tooltipSearchResults = SELECTORS.TOOLTIP_SEARCH_RESULTS_CONTAINER;\n let tooltipContainerArrow;\n\n if (tooltipFilter) {\n onEvent(document, 'click', tooltipFilter, () => {\n tooltipContainerArrow = document.querySelector('.storelocator-arrow-tooltip-filter .icon-chevron-right');\n initTooltip(tooltipFilter, tooltipContainerArrow, 'right');\n });\n }\n\n if (tooltipSearchResults) {\n onEvent(document, 'click', tooltipSearchResults, () => {\n tooltipContainerArrow = document.querySelector('.storelocator-arrow-tooltip-results .icon-chevron-left');\n initTooltip(tooltipSearchResults, tooltipContainerArrow, 'left');\n });\n }\n};\n\nbase.initSearchOnLoad = () => {\n const searchForm = document.querySelector(SELECTORS.LOCATOR_FORM);\n\n if (window.location.hash && window.location.hash.length && searchForm) {\n const nonInputParams = [];\n const hashParams = parseQueryString(window.location.hash);\n\n Object.keys(hashParams).forEach((param) => {\n const input = document.querySelector(`[name=\"${param}\"]`);\n\n if (input) {\n if (hashParams[param] === 'true' || hashParams[param] === 'on') {\n const panel = input.closest('.collapse');\n\n input.checked = true;\n\n if (panel) {\n $(panel).collapse('show');\n }\n } else {\n input.checked = false;\n }\n\n if (typeof hashParams[param] === 'string') {\n input.value = hashParams[param];\n }\n } else {\n nonInputParams.push(param);\n }\n });\n\n if (nonInputParams.length) {\n const qsParts = nonInputParams.reduce((qs, param) => qs.concat(`${param}=${hashParams[param]}`), []);\n\n searchForm.action += `?${qsParts.join('&')}`;\n }\n\n searchForm.dispatchEvent(new CustomEvent('submit', { bubbles: true, cancelable: true }));\n }\n\n searchForm.addEventListener('submit', () => {\n setTimeout(() => {\n const searchFormFormData = new FormData(searchForm);\n\n window.location.hash = new URLSearchParams(searchFormFormData).toString();\n });\n });\n};\n\nbase.enableSearchButton = () => {\n document.onreadystatechange = () => {\n if (document.readyState === 'complete'\n && (document.querySelector('.btn-storelocator-search')\n && document.querySelector('#store-postal-code'))) {\n if (document.querySelector('.btn-storelocator-search').hasAttribute('disabled')) {\n document.querySelector('.btn-storelocator-search').removeAttribute('disabled');\n }\n if (document.querySelector('#store-postal-code').hasAttribute('disabled')) {\n document.querySelector('#store-postal-code').removeAttribute('disabled');\n }\n }\n };\n};\n\nexport default base;\n","'use strict';\n\nconst base = module.superModule || {};\nconst baseAppendQueryParams = base.appendQueryParams;\n\n/**\n * Replaces query param values in a URL, or adds them if they don't exist\n *\n * @param {string} target An URL endpoint with or without query params\n * e.g. http://someresource or http://someresource?xyz=123\n * @param {Object} params Object of query params to replace on the URL\n * e.g. { var1: val1, var2: val2 }\n * @return {string} Target URL with query param values replaced\n */\nbase.replaceUrlParams = function (url, params) {\n let resultUrl = url.toString();\n\n Object.keys(params).forEach(function (paramName) {\n let paramValue = params[paramName];\n let paramPattern = '(&|\\\\?)' + paramName + '=[^&?]+';\n let newParamPair = paramName + '=' + encodeURIComponent(paramValue);\n\n if (resultUrl.search(paramPattern) >= 0) {\n let newParamPart = '$1' + newParamPair;\n\n resultUrl = resultUrl.replace(new RegExp(paramPattern), newParamPart);\n } else {\n let separator = resultUrl.indexOf('?') >= 0 ? '&' : '?';\n\n resultUrl = resultUrl + separator + newParamPair;\n }\n });\n\n return resultUrl;\n};\n\n/**\n * The SFRA QueryString class cannot handle URLs without a query string (that don't contain a '?'),\n * returning an object that contains an entry whose key is the URL, and whose value is undefined.\n * The base appendQueryParams logic ignores this case, whichi leads to broken search permalinks\n * when storefront category URLs are enabled\n *\n * This function intercepts such cases and calls replaceUrlParams isntead, which handles them correctly\n *\n * @param {string} target - An URL endpoint with or without query params\n * e.g. http://someresource or http://someresource?xyz=123\n * @param {Object|string[]} queryParamsToAppend - Object or list of query params strings with or\n * without resource path prepended, where resource path is discarded\n * e.g., ['xyz=123'] or ['http://someresource?xyz=123'] or { var1: val1, var2: val2 }\n * @return {string} - Target URL appended with query params from sourceQueryString\n */\nbase.appendQueryParams = function (target, queryParamsToAppend) {\n if (Array.isArray(queryParamsToAppend) || target.indexOf('?') >= 0) {\n return baseAppendQueryParams.call(null, target, queryParamsToAppend);\n }\n\n return base.replaceUrlParams(target, queryParamsToAppend);\n};\n\nbase.parseQueryString = function (queryString) {\n if (queryString) {\n return queryString.split('&').reduce(function (obj, query) {\n const splitQuery = query.split('=');\n obj[splitQuery[0]] = splitQuery[1];\n return obj;\n }, {});\n }\n return {};\n};\n\nmodule.exports = base;\n","/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.14.7\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nvar longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\nvar timeoutDuration = 0;\nfor (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n timeoutDuration = 1;\n break;\n }\n}\n\nfunction microtaskDebounce(fn) {\n var called = false;\n return function () {\n if (called) {\n return;\n }\n called = true;\n window.Promise.resolve().then(function () {\n called = false;\n fn();\n });\n };\n}\n\nfunction taskDebounce(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n setTimeout(function () {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nvar supportsMicroTasks = isBrowser && window.Promise;\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nfunction isFunction(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nfunction getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n var window = element.ownerDocument.defaultView;\n var css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nfunction getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nfunction getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body;\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body;\n case '#document':\n return element.body;\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n\n var _getStyleComputedProp = getStyleComputedProperty(element),\n overflow = _getStyleComputedProp.overflow,\n overflowX = _getStyleComputedProp.overflowX,\n overflowY = _getStyleComputedProp.overflowY;\n\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n\nvar isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nvar isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nfunction isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nfunction getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n var noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n var offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n var nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n\nfunction isOffsetContainer(element) {\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY') {\n return false;\n }\n return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nfunction getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nfunction findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n var start = order ? element1 : element2;\n var end = order ? element2 : element1;\n\n // Get common ancestor container\n var range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n var commonAncestorContainer = range.commonAncestorContainer;\n\n // Both nodes are inside #document\n\n if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n var element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nfunction getScroll(element) {\n var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n\n var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n var html = element.ownerDocument.documentElement;\n var scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nfunction includeScroll(rect, element) {\n var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n var modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nfunction getBordersSize(styles, axis) {\n var sideA = axis === 'x' ? 'Left' : 'Top';\n var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);\n}\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);\n}\n\nfunction getWindowSizes(document) {\n var body = document.body;\n var html = document.documentElement;\n var computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle)\n };\n}\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nfunction getClientRect(offsets) {\n return _extends({}, offsets, {\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height\n });\n}\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nfunction getBoundingClientRect(element) {\n var rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n } else {\n rect = element.getBoundingClientRect();\n }\n } catch (e) {}\n\n var result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n\n // subtract scrollbar size from sizes\n var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n var width = sizes.width || element.clientWidth || result.right - result.left;\n var height = sizes.height || element.clientHeight || result.bottom - result.top;\n\n var horizScrollbar = element.offsetWidth - width;\n var vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n var styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var isIE10 = isIE(10);\n var isHTML = parent.nodeName === 'HTML';\n var childrenRect = getBoundingClientRect(children);\n var parentRect = getBoundingClientRect(parent);\n var scrollParent = getScrollParent(children);\n\n var styles = getStyleComputedProperty(parent);\n var borderTopWidth = parseFloat(styles.borderTopWidth, 10);\n var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if (fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n var offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n var marginTop = parseFloat(styles.marginTop, 10);\n var marginLeft = parseFloat(styles.marginLeft, 10);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var html = element.ownerDocument.documentElement;\n var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n var width = Math.max(html.clientWidth, window.innerWidth || 0);\n var height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n var scrollTop = !excludeScroll ? getScroll(html) : 0;\n var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n var offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width: width,\n height: height\n };\n\n return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nfunction isFixed(element) {\n var nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n var parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nfunction getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n var el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n}\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n // NOTE: 1 DOM access here\n\n var boundaries = { top: 0, left: 0 };\n var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n\n // Handle viewport case\n if (boundariesElement === 'viewport') {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n } else {\n // Handle other cases based on DOM element used as boundaries\n var boundariesNode = void 0;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n var _getWindowSizes = getWindowSizes(popper.ownerDocument),\n height = _getWindowSizes.height,\n width = _getWindowSizes.width;\n\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n var isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0;\n boundaries.top += isPaddingNumber ? padding : padding.top || 0;\n boundaries.right -= isPaddingNumber ? padding : padding.right || 0;\n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;\n\n return boundaries;\n}\n\nfunction getArea(_ref) {\n var width = _ref.width,\n height = _ref.height;\n\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n\n var rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height\n }\n };\n\n var sortedAreas = Object.keys(rects).map(function (key) {\n return _extends({\n key: key\n }, rects[key], {\n area: getArea(rects[key])\n });\n }).sort(function (a, b) {\n return b.area - a.area;\n });\n\n var filteredAreas = sortedAreas.filter(function (_ref2) {\n var width = _ref2.width,\n height = _ref2.height;\n return width >= popper.clientWidth && height >= popper.clientHeight;\n });\n\n var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n\n var variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? '-' + variation : '');\n}\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nfunction getReferenceOffsets(state, popper, reference) {\n var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nfunction getOuterSizes(element) {\n var window = element.ownerDocument.defaultView;\n var styles = window.getComputedStyle(element);\n var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n var result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x\n };\n return result;\n}\n\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nfunction getOppositePlacement(placement) {\n var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n var popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n var popperOffsets = {\n width: popperRect.width,\n height: popperRect.height\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n var mainSide = isHoriz ? 'top' : 'left';\n var secondarySide = isHoriz ? 'left' : 'top';\n var measurement = isHoriz ? 'height' : 'width';\n var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(function (cur) {\n return cur[prop] === value;\n });\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n var match = find(arr, function (obj) {\n return obj[prop] === value;\n });\n return arr.indexOf(match);\n}\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nfunction runModifiers(modifiers, data, ends) {\n var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(function (modifier) {\n if (modifier['function']) {\n // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nfunction update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nfunction isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(function (_ref) {\n var name = _ref.name,\n enabled = _ref.enabled;\n return enabled && name === modifierName;\n });\n}\n\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nfunction getSupportedPropertyName(property) {\n var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (var i = 0; i < prefixes.length; i++) {\n var prefix = prefixes[i];\n var toCheck = prefix ? '' + prefix + upperProp : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nfunction destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicity asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nfunction getWindow(element) {\n var ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n var isBody = scrollParent.nodeName === 'BODY';\n var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nfunction enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nfunction disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nfunction isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setStyles(element, styles) {\n Object.keys(styles).forEach(function (prop) {\n var unit = '';\n // add unit if the value is numeric and is one of the following\n if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function (prop) {\n var value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nfunction applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n // compute reference element offsets\n var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n\n/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nfunction getRoundedOffsets(data, shouldRound) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var round = Math.round,\n floor = Math.floor;\n\n var noRound = function noRound(v) {\n return v;\n };\n\n var referenceWidth = round(reference.width);\n var popperWidth = round(popper.width);\n\n var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n var isVariation = data.placement.indexOf('-') !== -1;\n var sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;\n var verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right)\n };\n}\n\nvar isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeStyle(data, options) {\n var x = options.x,\n y = options.y;\n var popper = data.offsets.popper;\n\n // Remove this legacy support in Popper.js v2\n\n var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'applyStyle';\n }).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n }\n var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n\n var offsetParent = getOffsetParent(data.instance.popper);\n var offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n var styles = {\n position: popper.position\n };\n\n var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);\n\n var sideA = x === 'bottom' ? 'top' : 'bottom';\n var sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n var prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n var left = void 0,\n top = void 0;\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n var invertTop = sideA === 'bottom' ? -1 : 1;\n var invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = sideA + ', ' + sideB;\n }\n\n // Attributes\n var attributes = {\n 'x-placement': data.placement\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = _extends({}, attributes, data.attributes);\n data.styles = _extends({}, styles, data.styles);\n data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);\n\n return data;\n}\n\n/**\n * Helper used to know if the given modifier depends from another one.
\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n var requesting = find(modifiers, function (_ref) {\n var name = _ref.name;\n return name === requestingName;\n });\n\n var isRequired = !!requesting && modifiers.some(function (modifier) {\n return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n });\n\n if (!isRequired) {\n var _requesting = '`' + requestingName + '`';\n var requested = '`' + requestedName + '`';\n console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n }\n return isRequired;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction arrow(data, options) {\n var _data$offsets$arrow;\n\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n var arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn('WARNING: `arrow.element` must be child of its popper element!');\n return data;\n }\n }\n\n var placement = data.placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n var len = isVertical ? 'height' : 'width';\n var sideCapitalized = isVertical ? 'Top' : 'Left';\n var side = sideCapitalized.toLowerCase();\n var altSide = isVertical ? 'left' : 'top';\n var opSide = isVertical ? 'bottom' : 'right';\n var arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n var css = getStyleComputedProperty(data.instance.popper);\n var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);\n var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);\n var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n\n return data;\n}\n\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nfunction getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n\n/**\n * List of accepted placements to use as values of the `placement` option.
\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.
\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];\n\n// Get rid of `auto` `auto-start` and `auto-end`\nvar validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nfunction clockwise(placement) {\n var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var index = validPlacements.indexOf(placement);\n var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n\nvar BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise'\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);\n\n var placement = data.placement.split('-')[0];\n var placementOpposite = getOppositePlacement(placement);\n var variation = data.placement.split('-')[1] || '';\n\n var flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach(function (step, index) {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n var popperOffsets = data.offsets.popper;\n var refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n var floor = Math.floor;\n var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n\n var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;\n\n // flip the variation if required\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction keepTogether(data) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var placement = data.placement.split('-')[0];\n var floor = Math.floor;\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var side = isVertical ? 'right' : 'bottom';\n var opSide = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n var value = +split[1];\n var unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n var element = void 0;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n var rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n var size = void 0;\n if (unit === 'vh') {\n size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n } else {\n size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n var offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n return frag.trim();\n });\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n var divider = fragments.indexOf(find(fragments, function (frag) {\n return frag.search(/,|\\s/) !== -1;\n }));\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n var splitRegex = /\\s*,\\s*|\\s+/;\n var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map(function (op, index) {\n // Most of the units rely on the orientation of the popper\n var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n var mergeWithPrevious = false;\n return op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce(function (a, b) {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(function (str) {\n return toValue(str, measurement, popperOffsets, referenceOffsets);\n });\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach(function (op, index) {\n op.forEach(function (frag, index2) {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nfunction offset(data, _ref) {\n var offset = _ref.offset;\n var placement = data.placement,\n _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var basePlacement = placement.split('-')[0];\n\n var offsets = void 0;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction preventOverflow(data, options) {\n var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n var transformProp = getSupportedPropertyName('transform');\n var popperStyles = data.instance.popper.style; // assignment to help minification\n var top = popperStyles.top,\n left = popperStyles.left,\n transform = popperStyles[transformProp];\n\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n var order = options.priority;\n var popper = data.offsets.popper;\n\n var check = {\n primary: function primary(placement) {\n var value = popper[placement];\n if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return defineProperty({}, placement, value);\n },\n secondary: function secondary(placement) {\n var mainSide = placement === 'right' ? 'left' : 'top';\n var value = popper[mainSide];\n if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n }\n return defineProperty({}, mainSide, value);\n }\n };\n\n order.forEach(function (placement) {\n var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = _extends({}, popper, check[side](placement));\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction shift(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n var _data$offsets = data.offsets,\n reference = _data$offsets.reference,\n popper = _data$offsets.popper;\n\n var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n var side = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n var shiftOffsets = {\n start: defineProperty({}, side, reference[side]),\n end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n };\n\n data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n var refRect = data.offsets.reference;\n var bound = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'preventOverflow';\n }).boundaries;\n\n if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction inner(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.
\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nvar modifiers = {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
\n * It will read the variation of the `placement` property.
\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.
\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.
\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.
\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent'\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]'\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport'\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right'\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined\n }\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor.
\n * These can be overridden using the `options` argument of Popper.js.
\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nvar Defaults = {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: function onCreate() {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: function onUpdate() {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers: modifiers\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n\n// Utils\n// Methods\nvar Popper = function () {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n function Popper(reference, popper) {\n var _this = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, Popper);\n\n this.scheduleUpdate = function () {\n return requestAnimationFrame(_this.update);\n };\n\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = _extends({}, Popper.Defaults, options);\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: []\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n return _extends({\n name: name\n }, _this.options.modifiers[name]);\n })\n // sort the modifiers by order\n .sort(function (a, b) {\n return a.order - b.order;\n });\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(function (modifierOptions) {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n var eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n\n\n createClass(Popper, [{\n key: 'update',\n value: function update$$1() {\n return update.call(this);\n }\n }, {\n key: 'destroy',\n value: function destroy$$1() {\n return destroy.call(this);\n }\n }, {\n key: 'enableEventListeners',\n value: function enableEventListeners$$1() {\n return enableEventListeners.call(this);\n }\n }, {\n key: 'disableEventListeners',\n value: function disableEventListeners$$1() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n\n }]);\n return Popper;\n}();\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.
\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\n\nexport default Popper;\n//# sourceMappingURL=popper.js.map\n"],"sourceRoot":""}