{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./node_modules/preact/dist/preact.umd.js","webpack:///./static/src/store/store.js","webpack:///./static/src/utils/utils.js","webpack:///./static/src/store/actions.js","webpack:///./static/src/utils/tracking.js","webpack:///./static/src/utils/clientUtils.js","webpack:///./static/src/utils/formatDateTime.js","webpack:///./node_modules/qs/lib/index.js","webpack:///./static/src/components/shared/svgIcons/svgIcons.sss?7365","webpack:///./static/src/components/shared/modal/modal.sss?5743","webpack:///./static/src/base/error404/error404App.sss?c1c4","webpack:///./static/src/components/shared/cookiesModal/cookiesModal.sss?764a","webpack:///./static/src/utils/pure.js","webpack:///./static/src/components/core/link/link.sss?18ee","webpack:///./static/src/components/core/link/route.js","webpack:///./static/src/utils/dataProviderToTicketProvider.js","webpack:///./static/src/components/shared/modal/exitModal.sss?b554","webpack:///./node_modules/freezer-js/src/utils.js","webpack:///./static/src/models/Geo.js","webpack:///./static/src/utils/gdpr/cleanCategoryName.common.js","webpack:///./node_modules/qs/lib/utils.js","webpack:///./node_modules/shallow-equals/index.js","webpack:///./static/src/utils/preprocessScreenings.js","webpack:///./node_modules/whatwg-fetch/fetch.js","webpack:///./node_modules/qs/lib/formats.js","webpack:///./node_modules/freezer-js/src/emitter.js","webpack:///./node_modules/freezer-js/freezer.js","webpack:///./static/src/models/Theater.js","webpack:///./static/src/store/ticketingPublic.js","webpack:///./static/src/models/Exhibitor.js","webpack:///./static/src/models/Screening.js","webpack:///./static/src/models/Format.js","webpack:///./static/src/components/shared/svgIcons/svgIcons.js","webpack:///./static/src/utils/copy.js","webpack:///./static/src/components/shared/modal/exitModal.js","webpack:///./static/src/utils/staticData.js","webpack:///./static/src/components/core/link/link.js","webpack:///./static/src/utils/removeDiacritics.js","webpack:///./static/src/utils/diacritics.js","webpack:///./static/src/models/Movie.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/qs/lib/stringify.js","webpack:///./node_modules/qs/lib/parse.js","webpack:///./node_modules/object-assign/index.js","webpack:///./node_modules/freezer-js/src/freezer.js","webpack:///./node_modules/node-libs-browser/node_modules/process/browser.js","webpack:///./node_modules/freezer-js/src/frozen.js","webpack:///./node_modules/freezer-js/src/nodeCreator.js","webpack:///./static/src/utils/historyPushEvent.js","webpack:///./static/src/base-styles/global.sss?b591","webpack:///./static/src/utils/gdpr/oneTrust/categories.js","webpack:///./static/src/utils/gdpr/oneTrust/queue.js","webpack:///./static/src/utils/gdpr/oneTrust/Pixel.js","webpack:///./static/src/utils/gdpr/oneTrust/maybeHandle.js","webpack:///./static/src/utils/gdpr/oneTrust/connectToOneTrust.js","webpack:///./static/src/utils/gdpr/oneTrust/createPixelComponent.js","webpack:///./static/src/utils/gdpr/oneTrust/index.js","webpack:///./static/src/utils/gdpr/oneTrust/iframe.js","webpack:///./static/src/utils/smoothScroll.js","webpack:///./static/src/utils/geoFencing.js","webpack:///./static/src/store/update.js","webpack:///./static/src/components/shared/cookiesModal/cookiesModal.js","webpack:///./static/src/base/error404/error404Doc.js","webpack:///./static/src/components/shared/modal/modal.js","webpack:///./static/src/base/error404/error404App.js","webpack:///./static/src/base/error404/error404.js"],"names":["root","factory","exports","module","define","amd","a","i","self","this","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","VNode","options","stack","EMPTY_CHILDREN","h","nodeName","attributes","children","lastSimple","child","simple","arguments","length","push","pop","undefined","String","vnode","extend","obj","props","applyRef","ref","current","defer","Promise","resolve","then","setTimeout","cloneElement","slice","NO_RENDER","SYNC_RENDER","FORCE_RENDER","ASYNC_RENDER","ATTR_KEY","IS_NON_DIMENSIONAL","items","enqueueRender","component","_dirty","debounceRendering","rerender","renderComponent","isSameNodeType","node","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","toLowerCase","getNodeProps","defaultProps","removeNode","parentNode","removeChild","setAccessor","old","isSvg","style","cssText","_i","test","innerHTML","__html","useCapture","replace","substring","addEventListener","eventProxy","removeEventListener","_listeners","e","removeAttribute","removeAttributeNS","setAttributeNS","setAttribute","className","type","event","mounts","diffLevel","isSvgMode","flushMounts","shift","afterMount","componentDidMount","diff","dom","context","mountAll","parent","componentRoot","ownerSVGElement","ret","idiff","appendChild","out","prevSvgMode","_component","nodeValue","document","createTextNode","replaceChild","recollectNodeTree","vnodeName","originalComponent","oldDom","isDirectOwner","isOwner","_parentComponent","constructor","setComponentProps","base","unmountComponent","createComponent","nextBase","buildComponentFromVNode","createElementNS","createElement","firstChild","fc","vchildren","nextSibling","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","len","childrenLen","vlen","j","f","vchild","_child","__key","trim","_key","insertBefore","_i2","innerDiffNode","dangerouslySetInnerHTML","attrs","diffAttributes","unmountOnly","removeChildren","lastChild","next","previousSibling","recyclerComponents","Ctor","inst","render","Component","doRender","splice","state","renderMode","_disable","__ref","getDerivedStateFromProps","componentWillMount","componentWillReceiveProps","prevContext","prevProps","syncComponentUpdates","isChild","previousProps","previousState","prevState","previousContext","isUpdate","initialBase","initialChildComponent","skip","snapshot","rendered","cbase","shouldComponentUpdate","componentWillUpdate","getChildContext","getSnapshotBeforeUpdate","childComponent","toUnmount","childProps","baseParent","componentRef","componentDidUpdate","afterUpdate","_renderCallbacks","beforeUnmount","componentWillUnmount","inner","merge","createRef","setState","callback","forceUpdate","preact","default","Store","Freezer","on","reactionName","dispatch","Error","cached","getIEVersion","window","navigator","ua","userAgent","ieIndex","indexOf","parseInt","getVersion","eventName","Event","dispatchEvent","dbounce","timer","args","thisArg","trigger","apply","clearTimeout","expandClasses","classes","Array","isArray","map","hasMap","list","keys","filter","join","joinClasses","concat","accessNested","path","def","split","prop","asList","k","addToQuery","q","forEach","toQueryString","query","reduce","v","addedVal","encodeURIComponent","parseDate","Date","match","Number","isNaN","date","joinPaths","slash","il","part","charAt","reduceTextJsx","jsxArray","line","pathOnly","rpath","decodeURIComponent","index","lastIndexOf","res","substr","qsIndex","pointIndex","isObject","getStylingImagePath","appData","imgName","defaultImg","UPDATE_STORE","BEFORE_LOAD","PAGE_STATE_LOADED","START_API","URL_CHANGED","CLOSE_APP","UPDATE_LOADER","SET_ACTIVE_PAGE","SET_CLIENT_SIZE","START_FORCE_CLIENT_ORIENTATION","STOP_FORCE_CLIENT_ORIENTATION","SET_BACKGROUND_VIDEO_PLAYING","SET_BACKGROUND_VIDEO_ENABLED","SET_BACKGROUND_VIDEO_MUTED","SET_BACKGROUND_ELEMENT","UPDATE_BACKGROUND_SETTINGS","SET_SIDE_NAV_OPEN","SET_SIDE_NAV_ACTIVE","LINK_CLICKED","EXTERNAL_LINK_CLICKED","HEADER_HIDDEN","SET_CLIENT_GEO","UPDATE_DYNAMIC_DATA","SET_THEATERS","CLOSE_TICKETING","SHOW_MODAL","HIDE_MODAL","UPDATE_MODAL","SHOW_COOKIES_MODAL","QUIZ_STARTED","RIGHT_OR_WRONG_QUIZ_FINISHED","SET_USER_REGION_MODAL_DISMISSED","SET_IOSFIXEDFIX","SCROLL_LOCK","SCROLL_UNLOCK","ONETRUST_SHOW","ENABLE_STORAGE","DISABLE_STORAGE","ENABLE_PIXELS","DISABLE_PIXELS","gaEnabled","gaCategory","gaPrefixList","tracked","isInit","queue","gaQueue","track","data","__INITIAL_STATE__","editable","ni","once","suffix","useCustomPageTrack","activePage","trackingSuffix","id","currentTime","getTime","actionName","toUpperCase","emit","isBeacon","sendBeacon","preq","powTracker","getRequest","baseUrl","getTrackerUrl","startsWith","beacon","trackEvent","region","meta","slug","tData","hitType","eventCategory","eventAction","gaAction","eventLabel","toString","eventValue","nonInteraction","gaCustom","ga","trackLinkOut","href","trackId","label","actions","initTracker","isToolkitIframe","location","search","disableTracking","__IS_DEMO__","__IS_LOCAL__","studio","title","viewMode","getSize","getDims","customReferrer","referrer","campaign","campaignValue","newSearch","newUrl","protocol","host","pathname","hash","setCustomUrl","__IS_FACEBOOK__","url","setReferrerUrl","setCustomVariable","ev","coppa","useGoogleAnalytics","apis","tracking","googleAnalytics","gad","actuallyLoadGA","w","getElementsByTagName","async","src","anonymize","namePrefix","optsObj","cookieExpires","setupGA","category","gaEv","oneTrustCategory","powsterOneTrust","trackingScript","querySelector","onload","script","body","updateDataLayer","dataLayer","googleTagManagerActive","updateDataLayerPageView","pageId","firstLoad","page","geoFromIp","buildClientStoreData","initialState","canvas","dimensions","device","getDevice","deviceSize","orientation","width","height","isIOS","agent","getIsIOS","iOSVersion","exec","parseFloat","getIOSVersion","isIE","msie","rv","edge","getIsIE","isEdge","getIsEdge","isFirefox","isTouch","msMaxTouchPoints","isChrome","chrome","getIsChrome","isSafari","hasWebGL","getContext","pixelConsent","header","order","sideNavActive","sideNavBelow","client","breakpoints","Infinity","innerWidth","innerHeight","calculateShowtimesStatus","activeDate","forceLive","pages","now","showtimes","getGeoFromIPAsync","apiRoot","fetch","json","catch","countryCode","getPath","showtimesStatus","store","getPageTitle","copy","activePageName","$copy","release","attribute","_getCopyWithParams","_n","g","getCopyWithParams","assign","PAGE_NAME","RELEASE_DATE","formatDateTime","$DATE_FORMAT","$DATETIME_LOCALE","$DYNAMIC_TITLE","getAC_ID","cookie","find","objectAssign","require","format","localeDefaults","ch","tokenLen","result","baseFunctions","parseRepeatPattern","$TIME_SEPARATOR","$DATE_SEPARATOR","parseQuoted","transforms","str","pad","getHours","H","getMinutes","getSeconds","noZeroes","getMilliseconds","vl","F","isUppercase","designator","$AM","$PM","T","getDate","trf","getDay","day","$ORD","M","getMonth","y","getFullYear","z","getTimezoneOffset","hours","Math","abs","pos","quote","stringify","parse","formats","nextProps","nextState","isShallowEqual","isSameProp","b","pureRenderDecorator","route","history","pushState","yandex","kinohod","rambler","global","Utils","ob","createNonEnumerable","proto","ne","error","message","err","console","each","clbk","addNE","configurable","writable","createNE","nextTick","fn","dirty","hasPostMessage","postMessage","Window","processQueue","source","stopPropagation","flushQueue","removeListener","findPivot","__","pivot","found","parents","isLeaf","freezeInstances","cons","Boolean","warn","process","Geo","lat","lon","city","setGoogleLatLng","google","maps","googleLatLng","LatLng","val","MILES_FACTOR","JSON","otherGeo","dl","dL","unit","precision","deg2rad","PI","φ1","φ2","Δφ","Δλ","sinφ","sin","sinλ","cos","atan2","sqrt","kmToMiles","roundTo","pow","round","has","hexTable","array","arrayToObject","plainObjects","target","acc","combine","compact","refs","item","compacted","compactQueue","decode","decoder","charset","strWithoutPlus","unescape","encode","defaultEncoder","string","escape","$0","charCodeAt","isBuffer","isRegExp","allowPrototypes","mergeTarget","targetItem","compare","aIsArray","bIsArray","aTypeof","flat","shallowArray","ka","kb","shallowObject","getDateTimestamp","getDateRange","from","to","inRange","range","pad2","cleanTime","time","parts","caches","getIncluded","included","inc","formatCache","movieCache","formatSlug","thCache","specialTheaters","indicator","masterId","comments","commentsList","special","newTheater","nid","nTh","theater_master_id","splitTheater","theater_id","disabledScreenings","disabledScreeningsContexts","ctx","theater","identifier","pid","ptid","provider_id","provider_theater_id","getTheaterId","provider","localFormatCache","screening","every","mid","movie_id","movie","format_id","fid","fObj","getFormat","tid","customFormats","main","customFormatsList","dataObj","append","dateRanges","times","theaters","theaterNot","theatersNot","domain","domains","country","countries","sort","sDate","sTime","matching","formatCond","thId","desired","exId","exhibitor","formatObject","srcMovie","lookup","editFormat","support","searchParams","iterable","blob","Blob","formData","arrayBuffer","viewClasses","isDataView","DataView","isPrototypeOf","isArrayBufferView","ArrayBuffer","isView","Headers","normalizeName","normalizeValue","oldValue","set","iteratorFor","values","entries","iterator","methods","Request","clone","_bodyInit","Body","Response","status","statusText","headers","response","redirectStatuses","redirect","RangeError","input","init","reject","request","xhr","XMLHttpRequest","rawHeaders","getAllResponseHeaders","responseURL","responseText","onerror","TypeError","ontimeout","open","method","credentials","withCredentials","responseType","setRequestHeader","send","polyfill","done","getOwnPropertyNames","consumed","bodyUsed","fileReaderReady","reader","readBlobAsArrayBuffer","FileReader","promise","readAsArrayBuffer","bufferClone","buf","view","Uint8Array","byteLength","buffer","_initBody","_bodyText","_bodyBlob","FormData","_bodyFormData","URLSearchParams","_bodyArrayBuffer","rejected","text","readAsText","chars","fromCharCode","readArrayBufferAsText","upcased","form","bytes","bodyInit","ok","percentTwenties","util","Format","RFC1738","RFC3986","formatters","BEFOREALL","AFTERALL","specialEvents","emitterProto","listener","listeners","_events","off","returnValue","lastValue","onceListeners","Emitter","customDefault","replaceURLParameters","end","checkTicketProviderIds","mainTheater","alternateTheater","dataProviderToTicketProvider","providerId","screenings","srcTicketProviders","s2","time24","attachTicketProvider","tms_id","fandango","movietickets","atom","movies","datetime","sc2","Theater","attr","clientGeo","theaterMasters","theaterMasterDoc","firstBatch","pinned","providers","regionProviders","active","addr","address","useEnglishCopy","name_en","address_en","city_en","addedMoviesCache","activeScreenings","filteredScreenings","filterPass","logo","activeExhibitor","activeScreening","addressParts","fullAddress","website","distanceUnit","$DISTANCE_UNIT","masterDoc","providerTheaterId","providerExhibitorId","provider_exhibitor_id","geo","distance","distanceFrom","enabled","disabledList","wwm_ticketing","movietickets_theater_id","fandango_theater_id","atom_theater_id","getRank","rank","currMaster","currRank","masterRank","hasBadDeeplinks","computeUrls","exhibitorDomain","midnightFix","nextDayDatetime","offsetDate","isDirectTicketingEnabled","mxLinks","deeplinksObj","overrideDeeplinks","isValidDLContext","powRefQueryString","affiliate","tProviders","ticketProviders","override","useCinemaUrls","movieSlug","studioSlug","addAffiliateCode","qsPos","parsedQS","qs","strictNullHandling","affiliateCode","matchingDeeplink","provider_movie_id","hour","minute","dateFormat","stDate","potentialMatches","preventDeeplinkOverride","urls","screeningUrl","allowedTicketProvider","cinema","ticketProvider","formattedDate","movieFandango","doc","movie_code_id","fandangoUrl","movieId","movieticketsMovieId","dateTime","tz_offset","customAtomURL","disabledTicketsProviders","store_","gateways","AUTHNET","VANTIV","PXPAY","VERIFONE2","BRAINTREE","MASTERCARD","enableDirectTicketing","forceDirectTicketing","ticketingEnabled","paymentEnabled","gateway","top","getRelativeUrl","pageSlug","activePath","getRelativeRoot","appendIndex","getIframeCommunicatorUrl","Exhibitor","logo_file","timeOfDayMapping","tomorrow","setDate","beginningOfToday","todayStr","tomorrowStr","datesCache","Screening","offset","sign","minutes","getTZOffsetString","providerScreeningId","provider_screening_id","setDateTime","iso","force","STDate","setHours","getSTDate","timeSplit","timeOfDay","TimeOfDay","createDatetime","nextDay","nextDaySTDate","toISOString","isPast","days","months","years","yoff","moff","doff","UTC","dateStr","year","month","valueOf","dayShort","monthShort","dateNum","ddmmyyyy","yyyymmdd","$DATE_FILTER_FORMAT","$TODAY","$TOMORROW","hour24","getTimeOfDayId","SVGContent","createSVGTree","content","refresh","oldProps","el","names","setAttributes","containerProps","svgRenderer","svgContent","class","wrapper","SvgVideos","svgIcon","viewBox","SvgSynopsis","SvgShowtimes","SvgShare","svgShareIcon","SvgLink","xmlns","SvgUser","svgUserIcon","x","rx","ry","cx","cy","SvgHeart","SvgCopy","fill-rule","SvgEdit","svgBase","SvgSearch","SvgMarker","SvgStar","SvgFullScreenOpen","SvgFullScreenClose","SvgCarrotDown","transform","SvgCarrotUp","SvgTick","SvgArrowRight","SvgFatArrowRight","SvgBin","SvgSpeaker","version","stroke-width","stroke-linejoin","fill","stroke-linecap","SvgMuted","SvgImax","font-family","font-size","font-weight","letter-spacing","word-spacing","stroke","SvgImax3d","SvgRealD","SvgTrain","SvgCar","SvgGuy","SvgLinkOut","SvgCompass","compass","SvgCart","SvgPlay","isCopySet","getCopy","copyKey","opts","fallback","fromCopy","copyItem","realKey","regex","RegExp","ExitModal","pure","closeModal","openLink","strippedVanity","vanity","container","getTitle","extraOnClick","ignoreExitModal","trackLabel","button","onClick","staticData","isStaticDataSet","isServer","Link","fullProps","ariaLabel","iconStyle","iconClass","linkClass","noMergeQS","queryString","childId","removeSourceQS","renderCustomChild","exitModal","childHTML","HTMLTag","scrollSection","getStaticData","pagePath","newQS","baseQS","removeV","queryStringObj","newQSString","generateOnClick","handlePageLinkClick","clickOut","IconComponent","svg","anchorLink","iconLink","link","inside","iconLinkUrl","iconLinkSvg","extraSpanProps","aria-label","fList","useExitModal","preventDefault","getRelativePageUrl","mergeQS","stopImmediatePropagation","beforePageChange","confirmation","confirm","currentTarget","getAttribute","trackData","goToPage","diacriticsMap","removeDiacritics","letters","replacement","letter","Movie","slugOverride","movietickets_movie_id","group","fandango_movie_id","Function","utils","arrayPrefixGenerators","brackets","prefix","comma","indices","repeat","pushToArray","arr","valueOrArray","toISO","defaultFormat","defaults","addQueryPrefix","allowDots","charsetSentinel","delimiter","encoder","encodeValuesOnly","formatter","serializeDate","skipNulls","generateArrayPrefix","objKeys","normalizeStringifyOptions","arrayFormat","joined","arrayLimit","depth","ignoreQueryPrefix","interpretNumericEntities","parameterLimit","parseArrays","numberStr","parseKeys","givenKey","segment","chain","leaf","cleanRoot","0","parseObject","normalizeParseOptions","tempObj","cleanStr","limit","skipIndex","bracketEqualsPos","parseValues","newObj","getOwnPropertySymbols","propIsEnumerable","propertyIsEnumerable","toObject","test1","test2","test3","shouldUseNative","symbols","Frozen","detachedWarn","lastCall","initialValue","frozen","me","ops","live","pivotTriggers","pivotTicking","triggerNow","_","notify","onStore","update","addToPivotTriggers","freezeFn","mutable","freeze","updateRoot","prevNode","updated","getListener","hub","reset","getEventHub","getData","setData","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","run","marker","runClearTimeout","Item","noop","browser","env","argv","versions","addListener","removeAllListeners","prependListener","prependOnceListener","binding","cwd","chdir","dir","umask","nodeCreator","addParent","trans","isFrozen","copyMeta","removeParent","refreshParents","fixChildren","remove","deleteIndex","transact","transacting","unpivot","oldChild","newChild","oldNode","param","ticking","createListener","commonMethods","msg","toJS","js","arrayMethods","els","unshift","prepend","toRemove","toAdd","FrozenArray","objectMethods","filtered","FrozenObject","createArray","__proto__","categories","changeListeners","STRICTLY_NECESSARY","FUNCTIONAL","TARGETING","ADVERTISING","dict","ids","addChangeListener","removeChangeListener","_queue","triggerOrQueue","managed","shouldQueue","pixel","add","Pixel","maybeHandle","cleanCategory","createTrigger","connectToOneTrust","C","onOneTrustCategoriesChange","nextCategories","oneTrustCategories","oneTrustAllowed","createPixelComponent","Components","onCategoriesChange","cleanCategoryName","displayModal","api","Optanon","OneTrust","ToggleInfoDisplay","allowedCategories","bubbles","cancelable","detail","E","CustomEvent","FakeEvent","createEvent","initCustomEvent","prevQueue","isOptatonInitialised","existingOptanonWrapper","OptanonWrapper","getCookie","cname","ca","value1","frames","pass_data","OptanonConsent","OptanonAlertBoxClosed","oneTrust","displayInIframe","checkAndHideOneTrust","getElementById","getElementsByClassName","display","IframeOptanonWrapper","oneTrustFix","buttons","querySelectorAll","close","banner","opacity","transition","bg","eventHandler","attachEvent","activeGroups","OptanonActiveGroups","getScroll","elem","hor","pageXOffset","documentElement","scrollLeft","pageYOffset","scrollTop","endScroll","_smthscrl","cancelAnimationFrame","relativeToKeywords","middle","bottom","oneDir","horizontal","currentScroll","dirIndex","previousScroll","Element","last","parentElement","offsetParent","getElemPos","sizeProp","relativeTo","maxPos","offsetStart","minPos","offsetEnd","max","rT","scrollTo","setScroll","directions","ver","both","loop","requestAnimationFrame","start","duration","easing","direction","smoothScrollTo","dur","settings","scrollingElement","scrollHeight","compatMode","timeStart","isFinite","stop","cache","redirectState","geoFencedLocation","hostname","destinationHost","getGeo","validOrientations","refCount","Modal","acceptCookies","sendResult","rejectCookies","$COOKIES_MODAL_TITLE","$COOKIES_MODAL_TEXT","yes","$COOKIES_MODAL_ACCEPT","no","$COOKIES_MODAL_DENY","updateBackground","background","detectCurrentPage","bestMatch","bestMatchCount","baseHtml","storeData","loader","trackPageView","videoEnabled","allowBgVideo","noSmoothScrollTopTransitionDuration","desc","$META_DESCRIPTION","ogDesc","$META_OGDESCRIPTION","twitterDesc","ogMetaTitle","$META_OGTITLE","$META_TITLE","twitterMetaTitle","imageRegion","roots","defaultShareImage","$META_IMAGE","shareImage","twitterShareImage","ogMetaImage","twitterMetaImage","ogMetaImageSecureUrl","ogMetaSiteName","$META_OGSITENAME","videoPlaying","muted","element","sideNavOpen","hidden","headerStore","isTablet","hideHeader","started","quizId","quiz","quizFinished","clientStore","uiState","orientationChanged","overlayOrientation","originalSetItem","originalCookieDescriptor","storageEnabled","setItemQueue","cookieQueue","disableStorage","localStorage","setItem","getOwnPropertyDescriptor","Document","HTMLDocument","enableStorage","CookiesModal","accept","preventCookies","cookies","blockClose","backdropColor","fadeIn","requireUserConsent","evidon","priorConsentCallback","consentWithdrawnCallback","loadScripts","detectedPage","showbarebones","embedmode","classList","forceFullHeader","iframe","embedMode","onUrlChange","onpushstate","onreplacestate","dates","updateSize","isFirstVisit","getItem","geoFence","geofencing","redirectObj","redirection","appRegion","dynamicData","regionData","ignoreGeoFence","allowRegions","optionsList","getActiveRedirect","option","activeRedirect","checklist","countryNot","all","listResults","noActivePage","defaultLink","geoFencing","redirected","pixelsLoaded","loadStaticPixels","STATIC_PIXELS","pixelsElem","execScripts","tagName","preventTrackingOnLoad","useOneTrust","scriptId","noCookies","insightsCategory","regionModalDismissed","user","missedPageId","appBasePath","missedPath","from404","redirectTo","redirectOnLoadAfterShowtimes","redirectOnLoad","visibilityChange","loaded","beforeLoad","loadAPI","msHidden","webkitHidden","inactiveModal","fontSize","maxWidth","margin","padding","textAlign","textTransform","border","borderRadius","lineHeight","cursor","modal","lastTrackedPage","extraOptions","offsetWidth","offsetHeight","extra","cb","iosFixedFix","Error404","relativeRoot","reload","styleLinks","headerScripts","buildDate","initialStateGlobals","cleanInitialState","buildLocation","initialData","renderGlobalsScript","pageTitle","scripts","renderHeaderScrips","lang","http-equiv","rel","image","font","Content","extraProps","simpleContent","_content","backgroundStyle","containerStyle","useFadeIn","animationDuration","Error404App","syncStoreState","lookupBrowser","lookupPlatform","startTimer","stopTimer","updateTime","appState","initialStore","count","scrollLocked","storeState","is","setInterval","clearInterval","platform","container404","errorContainer","errorText","$404_COPY","errorTextUnderline","errorMainText","__START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HHt4C,eAPmB,MAON,GAPM,IAUhBs4C,EAFH50C,kBARmB,MAQN,GARM,IAUhB40C,EADHpsC,cATmB,MASN,GATM,IAchBlM,EADHuN,YAbmB,MAaV,GAbU,EAgBdozB,EAAWx0C,KAAK8rD,cAAc/rC,GAC9B4sC,EAAW3sD,KAAK+rD,eAAehsC,GAErC,OACC,mBAAKilB,MAAO9zB,YAAYhP,KAAE+iC,QAAS1tB,EAAWE,GAAIsI,EAAOhC,WAAYy2B,EAASmY,EAAUL,GAAgBpqD,KAAEoqD,eACzG,mBAAKtnB,MAAO9iC,KAAE0qD,cACb,mBAAK5nB,MAAO9iC,KAAE2qD,gBACb,mBAAK7nB,MAAO9iC,KAAE4qD,WAAY1rC,EAAK2rC,WAC/B,mBAAK/nB,MAAO9iC,KAAE8qD,sBAEf,mBAAKhoB,MAAO9iC,KAAE+qD,eACZjtD,KAAKkM,MAAMmgD,QAGd,YAAC,GAAWF,EAAS1C,OAAS,U,gCA5HO19C,aCKzC,GAbA,0EAawB,oBAAbtD,SAA0B,QAOhC6G,OAFH2H,GALmC,GAKnCA,kBACAi2C,GANmC,GAMnCA,kBAGGA,IAA2C,0BAAtBA,KACxBj2C,GAAkBM,WAAaN,GAAkBpD,QAAQ0M,MAAM2sC,KAGhE,IAAMd,GAAe3uC,YAAqBxG,IAI1CnL,iBACC,YAAC,GAAD,CAAasgD,aAAcA,KAC3B3jD,SAASuU,KAAMvU,SAAS0yC,eAAe","file":"error404.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})((typeof self !== 'undefined' ? self : this), function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 46);\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(factory((global.preact = {})));\n}(this, (function (exports) { 'use strict';\n\n\tvar VNode = function VNode() {};\n\n\tvar options = {};\n\n\tvar stack = [];\n\n\tvar EMPTY_CHILDREN = [];\n\n\tfunction h(nodeName, attributes) {\n\t\tvar children = EMPTY_CHILDREN,\n\t\t    lastSimple = void 0,\n\t\t    child = void 0,\n\t\t    simple = void 0,\n\t\t    i = void 0;\n\t\tfor (i = arguments.length; i-- > 2;) {\n\t\t\tstack.push(arguments[i]);\n\t\t}\n\t\tif (attributes && attributes.children != null) {\n\t\t\tif (!stack.length) stack.push(attributes.children);\n\t\t\tdelete attributes.children;\n\t\t}\n\t\twhile (stack.length) {\n\t\t\tif ((child = stack.pop()) && child.pop !== undefined) {\n\t\t\t\tfor (i = child.length; i--;) {\n\t\t\t\t\tstack.push(child[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (typeof child === 'boolean') child = null;\n\n\t\t\t\tif (simple = typeof nodeName !== 'function') {\n\t\t\t\t\tif (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false;\n\t\t\t\t}\n\n\t\t\t\tif (simple && lastSimple) {\n\t\t\t\t\tchildren[children.length - 1] += child;\n\t\t\t\t} else if (children === EMPTY_CHILDREN) {\n\t\t\t\t\tchildren = [child];\n\t\t\t\t} else {\n\t\t\t\t\tchildren.push(child);\n\t\t\t\t}\n\n\t\t\t\tlastSimple = simple;\n\t\t\t}\n\t\t}\n\n\t\tvar p = new VNode();\n\t\tp.nodeName = nodeName;\n\t\tp.children = children;\n\t\tp.attributes = attributes == null ? undefined : attributes;\n\t\tp.key = attributes == null ? undefined : attributes.key;\n\n\t\tif (options.vnode !== undefined) options.vnode(p);\n\n\t\treturn p;\n\t}\n\n\tfunction extend(obj, props) {\n\t  for (var i in props) {\n\t    obj[i] = props[i];\n\t  }return obj;\n\t}\n\n\tfunction applyRef(ref, value) {\n\t  if (ref) {\n\t    if (typeof ref == 'function') ref(value);else ref.current = value;\n\t  }\n\t}\n\n\tvar defer = typeof Promise == 'function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n\n\tfunction cloneElement(vnode, props) {\n\t  return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\n\t}\n\n\tvar NO_RENDER = 0;\n\n\tvar SYNC_RENDER = 1;\n\n\tvar FORCE_RENDER = 2;\n\n\tvar ASYNC_RENDER = 3;\n\n\tvar ATTR_KEY = '__preactattr_';\n\n\tvar IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\n\tvar items = [];\n\n\tfunction enqueueRender(component) {\n\t\tif (!component._dirty && (component._dirty = true) && items.push(component) == 1) {\n\t\t\t(options.debounceRendering || defer)(rerender);\n\t\t}\n\t}\n\n\tfunction rerender() {\n\t\tvar p = void 0;\n\t\twhile (p = items.pop()) {\n\t\t\tif (p._dirty) renderComponent(p);\n\t\t}\n\t}\n\n\tfunction isSameNodeType(node, vnode, hydrating) {\n\t\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\t\t\treturn node.splitText !== undefined;\n\t\t}\n\t\tif (typeof vnode.nodeName === 'string') {\n\t\t\treturn !node._componentConstructor && isNamedNode(node, vnode.nodeName);\n\t\t}\n\t\treturn hydrating || node._componentConstructor === vnode.nodeName;\n\t}\n\n\tfunction isNamedNode(node, nodeName) {\n\t\treturn node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\n\t}\n\n\tfunction getNodeProps(vnode) {\n\t\tvar props = extend({}, vnode.attributes);\n\t\tprops.children = vnode.children;\n\n\t\tvar defaultProps = vnode.nodeName.defaultProps;\n\t\tif (defaultProps !== undefined) {\n\t\t\tfor (var i in defaultProps) {\n\t\t\t\tif (props[i] === undefined) {\n\t\t\t\t\tprops[i] = defaultProps[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn props;\n\t}\n\n\tfunction createNode(nodeName, isSvg) {\n\t\tvar node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName);\n\t\tnode.normalizedNodeName = nodeName;\n\t\treturn node;\n\t}\n\n\tfunction removeNode(node) {\n\t\tvar parentNode = node.parentNode;\n\t\tif (parentNode) parentNode.removeChild(node);\n\t}\n\n\tfunction setAccessor(node, name, old, value, isSvg) {\n\t\tif (name === 'className') name = 'class';\n\n\t\tif (name === 'key') {} else if (name === 'ref') {\n\t\t\tapplyRef(old, null);\n\t\t\tapplyRef(value, node);\n\t\t} else if (name === 'class' && !isSvg) {\n\t\t\tnode.className = value || '';\n\t\t} else if (name === 'style') {\n\t\t\tif (!value || typeof value === 'string' || typeof old === 'string') {\n\t\t\t\tnode.style.cssText = value || '';\n\t\t\t}\n\t\t\tif (value && typeof value === 'object') {\n\t\t\t\tif (typeof old !== 'string') {\n\t\t\t\t\tfor (var i in old) {\n\t\t\t\t\t\tif (!(i in value)) node.style[i] = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (var _i in value) {\n\t\t\t\t\tnode.style[_i] = typeof value[_i] === 'number' && IS_NON_DIMENSIONAL.test(_i) === false ? value[_i] + 'px' : value[_i];\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (name === 'dangerouslySetInnerHTML') {\n\t\t\tif (value) node.innerHTML = value.__html || '';\n\t\t} else if (name[0] == 'o' && name[1] == 'n') {\n\t\t\tvar useCapture = name !== (name = name.replace(/Capture$/, ''));\n\t\t\tname = name.toLowerCase().substring(2);\n\t\t\tif (value) {\n\t\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\n\t\t\t} else {\n\t\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\n\t\t\t}\n\t\t\t(node._listeners || (node._listeners = {}))[name] = value;\n\t\t} else if (name !== 'list' && name !== 'type' && !isSvg && name in node) {\n\t\t\ttry {\n\t\t\t\tnode[name] = value == null ? '' : value;\n\t\t\t} catch (e) {}\n\t\t\tif ((value == null || value === false) && name != 'spellcheck') node.removeAttribute(name);\n\t\t} else {\n\t\t\tvar ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''));\n\n\t\t\tif (value == null || value === false) {\n\t\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name);\n\t\t\t} else if (typeof value !== 'function') {\n\t\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value);\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction eventProxy(e) {\n\t\treturn this._listeners[e.type](options.event && options.event(e) || e);\n\t}\n\n\tvar mounts = [];\n\n\tvar diffLevel = 0;\n\n\tvar isSvgMode = false;\n\n\tvar hydrating = false;\n\n\tfunction flushMounts() {\n\t\tvar c = void 0;\n\t\twhile (c = mounts.shift()) {\n\t\t\tif (options.afterMount) options.afterMount(c);\n\t\t\tif (c.componentDidMount) c.componentDidMount();\n\t\t}\n\t}\n\n\tfunction diff(dom, vnode, context, mountAll, parent, componentRoot) {\n\t\tif (!diffLevel++) {\n\t\t\tisSvgMode = parent != null && parent.ownerSVGElement !== undefined;\n\n\t\t\thydrating = dom != null && !(ATTR_KEY in dom);\n\t\t}\n\n\t\tvar ret = idiff(dom, vnode, context, mountAll, componentRoot);\n\n\t\tif (parent && ret.parentNode !== parent) parent.appendChild(ret);\n\n\t\tif (! --diffLevel) {\n\t\t\thydrating = false;\n\n\t\t\tif (!componentRoot) flushMounts();\n\t\t}\n\n\t\treturn ret;\n\t}\n\n\tfunction idiff(dom, vnode, context, mountAll, componentRoot) {\n\t\tvar out = dom,\n\t\t    prevSvgMode = isSvgMode;\n\n\t\tif (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n\t\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\t\t\tif (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n\t\t\t\tif (dom.nodeValue != vnode) {\n\t\t\t\t\tdom.nodeValue = vnode;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tout = document.createTextNode(vnode);\n\t\t\t\tif (dom) {\n\t\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\t\t\t\t\trecollectNodeTree(dom, true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tout[ATTR_KEY] = true;\n\n\t\t\treturn out;\n\t\t}\n\n\t\tvar vnodeName = vnode.nodeName;\n\t\tif (typeof vnodeName === 'function') {\n\t\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\n\t\t}\n\n\t\tisSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n\t\tvnodeName = String(vnodeName);\n\t\tif (!dom || !isNamedNode(dom, vnodeName)) {\n\t\t\tout = createNode(vnodeName, isSvgMode);\n\n\t\t\tif (dom) {\n\t\t\t\twhile (dom.firstChild) {\n\t\t\t\t\tout.appendChild(dom.firstChild);\n\t\t\t\t}\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n\t\t\t\trecollectNodeTree(dom, true);\n\t\t\t}\n\t\t}\n\n\t\tvar fc = out.firstChild,\n\t\t    props = out[ATTR_KEY],\n\t\t    vchildren = vnode.children;\n\n\t\tif (props == null) {\n\t\t\tprops = out[ATTR_KEY] = {};\n\t\t\tfor (var a = out.attributes, i = a.length; i--;) {\n\t\t\t\tprops[a[i].name] = a[i].value;\n\t\t\t}\n\t\t}\n\n\t\tif (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n\t\t\tif (fc.nodeValue != vchildren[0]) {\n\t\t\t\tfc.nodeValue = vchildren[0];\n\t\t\t}\n\t\t} else if (vchildren && vchildren.length || fc != null) {\n\t\t\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);\n\t\t\t}\n\n\t\tdiffAttributes(out, vnode.attributes, props);\n\n\t\tisSvgMode = prevSvgMode;\n\n\t\treturn out;\n\t}\n\n\tfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\n\t\tvar originalChildren = dom.childNodes,\n\t\t    children = [],\n\t\t    keyed = {},\n\t\t    keyedLen = 0,\n\t\t    min = 0,\n\t\t    len = originalChildren.length,\n\t\t    childrenLen = 0,\n\t\t    vlen = vchildren ? vchildren.length : 0,\n\t\t    j = void 0,\n\t\t    c = void 0,\n\t\t    f = void 0,\n\t\t    vchild = void 0,\n\t\t    child = void 0;\n\n\t\tif (len !== 0) {\n\t\t\tfor (var i = 0; i < len; i++) {\n\t\t\t\tvar _child = originalChildren[i],\n\t\t\t\t    props = _child[ATTR_KEY],\n\t\t\t\t    key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\n\t\t\t\tif (key != null) {\n\t\t\t\t\tkeyedLen++;\n\t\t\t\t\tkeyed[key] = _child;\n\t\t\t\t} else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\n\t\t\t\t\tchildren[childrenLen++] = _child;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (vlen !== 0) {\n\t\t\tfor (var _i = 0; _i < vlen; _i++) {\n\t\t\t\tvchild = vchildren[_i];\n\t\t\t\tchild = null;\n\n\t\t\t\tvar _key = vchild.key;\n\t\t\t\tif (_key != null) {\n\t\t\t\t\tif (keyedLen && keyed[_key] !== undefined) {\n\t\t\t\t\t\tchild = keyed[_key];\n\t\t\t\t\t\tkeyed[_key] = undefined;\n\t\t\t\t\t\tkeyedLen--;\n\t\t\t\t\t}\n\t\t\t\t} else if (min < childrenLen) {\n\t\t\t\t\t\tfor (j = min; j < childrenLen; j++) {\n\t\t\t\t\t\t\tif (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n\t\t\t\t\t\t\t\tchild = c;\n\t\t\t\t\t\t\t\tchildren[j] = undefined;\n\t\t\t\t\t\t\t\tif (j === childrenLen - 1) childrenLen--;\n\t\t\t\t\t\t\t\tif (j === min) min++;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\tchild = idiff(child, vchild, context, mountAll);\n\n\t\t\t\tf = originalChildren[_i];\n\t\t\t\tif (child && child !== dom && child !== f) {\n\t\t\t\t\tif (f == null) {\n\t\t\t\t\t\tdom.appendChild(child);\n\t\t\t\t\t} else if (child === f.nextSibling) {\n\t\t\t\t\t\tremoveNode(f);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdom.insertBefore(child, f);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (keyedLen) {\n\t\t\tfor (var _i2 in keyed) {\n\t\t\t\tif (keyed[_i2] !== undefined) recollectNodeTree(keyed[_i2], false);\n\t\t\t}\n\t\t}\n\n\t\twhile (min <= childrenLen) {\n\t\t\tif ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);\n\t\t}\n\t}\n\n\tfunction recollectNodeTree(node, unmountOnly) {\n\t\tvar component = node._component;\n\t\tif (component) {\n\t\t\tunmountComponent(component);\n\t\t} else {\n\t\t\tif (node[ATTR_KEY] != null) applyRef(node[ATTR_KEY].ref, null);\n\n\t\t\tif (unmountOnly === false || node[ATTR_KEY] == null) {\n\t\t\t\tremoveNode(node);\n\t\t\t}\n\n\t\t\tremoveChildren(node);\n\t\t}\n\t}\n\n\tfunction removeChildren(node) {\n\t\tnode = node.lastChild;\n\t\twhile (node) {\n\t\t\tvar next = node.previousSibling;\n\t\t\trecollectNodeTree(node, true);\n\t\t\tnode = next;\n\t\t}\n\t}\n\n\tfunction diffAttributes(dom, attrs, old) {\n\t\tvar name = void 0;\n\n\t\tfor (name in old) {\n\t\t\tif (!(attrs && attrs[name] != null) && old[name] != null) {\n\t\t\t\tsetAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);\n\t\t\t}\n\t\t}\n\n\t\tfor (name in attrs) {\n\t\t\tif (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\n\t\t\t\tsetAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);\n\t\t\t}\n\t\t}\n\t}\n\n\tvar recyclerComponents = [];\n\n\tfunction createComponent(Ctor, props, context) {\n\t\tvar inst = void 0,\n\t\t    i = recyclerComponents.length;\n\n\t\tif (Ctor.prototype && Ctor.prototype.render) {\n\t\t\tinst = new Ctor(props, context);\n\t\t\tComponent.call(inst, props, context);\n\t\t} else {\n\t\t\tinst = new Component(props, context);\n\t\t\tinst.constructor = Ctor;\n\t\t\tinst.render = doRender;\n\t\t}\n\n\t\twhile (i--) {\n\t\t\tif (recyclerComponents[i].constructor === Ctor) {\n\t\t\t\tinst.nextBase = recyclerComponents[i].nextBase;\n\t\t\t\trecyclerComponents.splice(i, 1);\n\t\t\t\treturn inst;\n\t\t\t}\n\t\t}\n\n\t\treturn inst;\n\t}\n\n\tfunction doRender(props, state, context) {\n\t\treturn this.constructor(props, context);\n\t}\n\n\tfunction setComponentProps(component, props, renderMode, context, mountAll) {\n\t\tif (component._disable) return;\n\t\tcomponent._disable = true;\n\n\t\tcomponent.__ref = props.ref;\n\t\tcomponent.__key = props.key;\n\t\tdelete props.ref;\n\t\tdelete props.key;\n\n\t\tif (typeof component.constructor.getDerivedStateFromProps === 'undefined') {\n\t\t\tif (!component.base || mountAll) {\n\t\t\t\tif (component.componentWillMount) component.componentWillMount();\n\t\t\t} else if (component.componentWillReceiveProps) {\n\t\t\t\tcomponent.componentWillReceiveProps(props, context);\n\t\t\t}\n\t\t}\n\n\t\tif (context && context !== component.context) {\n\t\t\tif (!component.prevContext) component.prevContext = component.context;\n\t\t\tcomponent.context = context;\n\t\t}\n\n\t\tif (!component.prevProps) component.prevProps = component.props;\n\t\tcomponent.props = props;\n\n\t\tcomponent._disable = false;\n\n\t\tif (renderMode !== NO_RENDER) {\n\t\t\tif (renderMode === SYNC_RENDER || options.syncComponentUpdates !== false || !component.base) {\n\t\t\t\trenderComponent(component, SYNC_RENDER, mountAll);\n\t\t\t} else {\n\t\t\t\tenqueueRender(component);\n\t\t\t}\n\t\t}\n\n\t\tapplyRef(component.__ref, component);\n\t}\n\n\tfunction renderComponent(component, renderMode, mountAll, isChild) {\n\t\tif (component._disable) return;\n\n\t\tvar props = component.props,\n\t\t    state = component.state,\n\t\t    context = component.context,\n\t\t    previousProps = component.prevProps || props,\n\t\t    previousState = component.prevState || state,\n\t\t    previousContext = component.prevContext || context,\n\t\t    isUpdate = component.base,\n\t\t    nextBase = component.nextBase,\n\t\t    initialBase = isUpdate || nextBase,\n\t\t    initialChildComponent = component._component,\n\t\t    skip = false,\n\t\t    snapshot = previousContext,\n\t\t    rendered = void 0,\n\t\t    inst = void 0,\n\t\t    cbase = void 0;\n\n\t\tif (component.constructor.getDerivedStateFromProps) {\n\t\t\tstate = extend(extend({}, state), component.constructor.getDerivedStateFromProps(props, state));\n\t\t\tcomponent.state = state;\n\t\t}\n\n\t\tif (isUpdate) {\n\t\t\tcomponent.props = previousProps;\n\t\t\tcomponent.state = previousState;\n\t\t\tcomponent.context = previousContext;\n\t\t\tif (renderMode !== FORCE_RENDER && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === false) {\n\t\t\t\tskip = true;\n\t\t\t} else if (component.componentWillUpdate) {\n\t\t\t\tcomponent.componentWillUpdate(props, state, context);\n\t\t\t}\n\t\t\tcomponent.props = props;\n\t\t\tcomponent.state = state;\n\t\t\tcomponent.context = context;\n\t\t}\n\n\t\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\n\t\tcomponent._dirty = false;\n\n\t\tif (!skip) {\n\t\t\trendered = component.render(props, state, context);\n\n\t\t\tif (component.getChildContext) {\n\t\t\t\tcontext = extend(extend({}, context), component.getChildContext());\n\t\t\t}\n\n\t\t\tif (isUpdate && component.getSnapshotBeforeUpdate) {\n\t\t\t\tsnapshot = component.getSnapshotBeforeUpdate(previousProps, previousState);\n\t\t\t}\n\n\t\t\tvar childComponent = rendered && rendered.nodeName,\n\t\t\t    toUnmount = void 0,\n\t\t\t    base = void 0;\n\n\t\t\tif (typeof childComponent === 'function') {\n\n\t\t\t\tvar childProps = getNodeProps(rendered);\n\t\t\t\tinst = initialChildComponent;\n\n\t\t\t\tif (inst && inst.constructor === childComponent && childProps.key == inst.__key) {\n\t\t\t\t\tsetComponentProps(inst, childProps, SYNC_RENDER, context, false);\n\t\t\t\t} else {\n\t\t\t\t\ttoUnmount = inst;\n\n\t\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\n\t\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\n\t\t\t\t\tinst._parentComponent = component;\n\t\t\t\t\tsetComponentProps(inst, childProps, NO_RENDER, context, false);\n\t\t\t\t\trenderComponent(inst, SYNC_RENDER, mountAll, true);\n\t\t\t\t}\n\n\t\t\t\tbase = inst.base;\n\t\t\t} else {\n\t\t\t\tcbase = initialBase;\n\n\t\t\t\ttoUnmount = initialChildComponent;\n\t\t\t\tif (toUnmount) {\n\t\t\t\t\tcbase = component._component = null;\n\t\t\t\t}\n\n\t\t\t\tif (initialBase || renderMode === SYNC_RENDER) {\n\t\t\t\t\tif (cbase) cbase._component = null;\n\t\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (initialBase && base !== initialBase && inst !== initialChildComponent) {\n\t\t\t\tvar baseParent = initialBase.parentNode;\n\t\t\t\tif (baseParent && base !== baseParent) {\n\t\t\t\t\tbaseParent.replaceChild(base, initialBase);\n\n\t\t\t\t\tif (!toUnmount) {\n\t\t\t\t\t\tinitialBase._component = null;\n\t\t\t\t\t\trecollectNodeTree(initialBase, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (toUnmount) {\n\t\t\t\tunmountComponent(toUnmount);\n\t\t\t}\n\n\t\t\tcomponent.base = base;\n\t\t\tif (base && !isChild) {\n\t\t\t\tvar componentRef = component,\n\t\t\t\t    t = component;\n\t\t\t\twhile (t = t._parentComponent) {\n\t\t\t\t\t(componentRef = t).base = base;\n\t\t\t\t}\n\t\t\t\tbase._component = componentRef;\n\t\t\t\tbase._componentConstructor = componentRef.constructor;\n\t\t\t}\n\t\t}\n\n\t\tif (!isUpdate || mountAll) {\n\t\t\tmounts.push(component);\n\t\t} else if (!skip) {\n\n\t\t\tif (component.componentDidUpdate) {\n\t\t\t\tcomponent.componentDidUpdate(previousProps, previousState, snapshot);\n\t\t\t}\n\t\t\tif (options.afterUpdate) options.afterUpdate(component);\n\t\t}\n\n\t\twhile (component._renderCallbacks.length) {\n\t\t\tcomponent._renderCallbacks.pop().call(component);\n\t\t}if (!diffLevel && !isChild) flushMounts();\n\t}\n\n\tfunction buildComponentFromVNode(dom, vnode, context, mountAll) {\n\t\tvar c = dom && dom._component,\n\t\t    originalComponent = c,\n\t\t    oldDom = dom,\n\t\t    isDirectOwner = c && dom._componentConstructor === vnode.nodeName,\n\t\t    isOwner = isDirectOwner,\n\t\t    props = getNodeProps(vnode);\n\t\twhile (c && !isOwner && (c = c._parentComponent)) {\n\t\t\tisOwner = c.constructor === vnode.nodeName;\n\t\t}\n\n\t\tif (c && isOwner && (!mountAll || c._component)) {\n\t\t\tsetComponentProps(c, props, ASYNC_RENDER, context, mountAll);\n\t\t\tdom = c.base;\n\t\t} else {\n\t\t\tif (originalComponent && !isDirectOwner) {\n\t\t\t\tunmountComponent(originalComponent);\n\t\t\t\tdom = oldDom = null;\n\t\t\t}\n\n\t\t\tc = createComponent(vnode.nodeName, props, context);\n\t\t\tif (dom && !c.nextBase) {\n\t\t\t\tc.nextBase = dom;\n\n\t\t\t\toldDom = null;\n\t\t\t}\n\t\t\tsetComponentProps(c, props, SYNC_RENDER, context, mountAll);\n\t\t\tdom = c.base;\n\n\t\t\tif (oldDom && dom !== oldDom) {\n\t\t\t\toldDom._component = null;\n\t\t\t\trecollectNodeTree(oldDom, false);\n\t\t\t}\n\t\t}\n\n\t\treturn dom;\n\t}\n\n\tfunction unmountComponent(component) {\n\t\tif (options.beforeUnmount) options.beforeUnmount(component);\n\n\t\tvar base = component.base;\n\n\t\tcomponent._disable = true;\n\n\t\tif (component.componentWillUnmount) component.componentWillUnmount();\n\n\t\tcomponent.base = null;\n\n\t\tvar inner = component._component;\n\t\tif (inner) {\n\t\t\tunmountComponent(inner);\n\t\t} else if (base) {\n\t\t\tif (base[ATTR_KEY] != null) applyRef(base[ATTR_KEY].ref, null);\n\n\t\t\tcomponent.nextBase = base;\n\n\t\t\tremoveNode(base);\n\t\t\trecyclerComponents.push(component);\n\n\t\t\tremoveChildren(base);\n\t\t}\n\n\t\tapplyRef(component.__ref, null);\n\t}\n\n\tfunction Component(props, context) {\n\t\tthis._dirty = true;\n\n\t\tthis.context = context;\n\n\t\tthis.props = props;\n\n\t\tthis.state = this.state || {};\n\n\t\tthis._renderCallbacks = [];\n\t}\n\n\textend(Component.prototype, {\n\t\tsetState: function setState(state, callback) {\n\t\t\tif (!this.prevState) this.prevState = this.state;\n\t\t\tthis.state = extend(extend({}, this.state), typeof state === 'function' ? state(this.state, this.props) : state);\n\t\t\tif (callback) this._renderCallbacks.push(callback);\n\t\t\tenqueueRender(this);\n\t\t},\n\t\tforceUpdate: function forceUpdate(callback) {\n\t\t\tif (callback) this._renderCallbacks.push(callback);\n\t\t\trenderComponent(this, FORCE_RENDER);\n\t\t},\n\t\trender: function render() {}\n\t});\n\n\tfunction render(vnode, parent, merge) {\n\t  return diff(merge, vnode, {}, false, parent, false);\n\t}\n\n\tfunction createRef() {\n\t\treturn {};\n\t}\n\n\tvar preact = {\n\t\th: h,\n\t\tcreateElement: h,\n\t\tcloneElement: cloneElement,\n\t\tcreateRef: createRef,\n\t\tComponent: Component,\n\t\trender: render,\n\t\trerender: rerender,\n\t\toptions: options\n\t};\n\n\texports.default = preact;\n\texports.h = h;\n\texports.createElement = h;\n\texports.cloneElement = cloneElement;\n\texports.createRef = createRef;\n\texports.Component = Component;\n\texports.render = render;\n\texports.rerender = rerender;\n\texports.options = options;\n\n\tObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=preact.umd.js.map\n","import Freezer from \"freezer-js\";\n\nconst Store = new Freezer(\n\t{},\n\t{\n\t\t// live: true\n\t}\n);\n\nStore.on('afterAll', function(reactionName) {\n\t// UNCOMMENT THIS TO LOG EVENTS\n\t//   PLEASE COMMENT BACK BEFORE PUSHING\n\t// console.log(...arguments);\n\n\tif (reactionName === 'update') {\n\t\treturn;\n\t}\n\tdispatch(reactionName);\n});\n\n\nStore.on(undefined, () => {\n\t// console.trace();\n\tthrow new Error('Undefined action! Please define your actions!');\n});\n\nconst getIEVersion = (function() {\n\tfunction getVersion() {\n\t\tif (typeof window === 'undefined' || !window.navigator) {\n\t\t\treturn 0;\n\t\t}\n\t\tlet ua = window.navigator.userAgent;\n\t\tlet ieIndex = ua.indexOf('MSIE');\n\n\t\t// If IE, return version number\n\t\tif (ieIndex >= 0) {\n\t\t\treturn parseInt(ua.slice(ieIndex + 5));\n\t\t}\n\t\t// Look for IE 11 updated user agent string\n\t\tif (/Trident\\/7\\./.test(ua)) {\n\t\t\treturn 11;\n\t\t}\n\t\t// Not IE\n\t\treturn 0;\n\t}\n\n\tlet cached = null;\n\treturn () => cached === null ? (cached = getVersion()) : cached;\n})();\n\nfunction dispatch(eventName) {\n\t// Only dispatch events on window for non-ie browsers (???)\n\tif (typeof window === 'undefined' || getIEVersion()) {\n\t\treturn;\n\t}\n\tconst event = new Event(eventName);\n\twindow.dispatchEvent(event);\n}\n\nif (typeof window !== 'undefined') {\n\twindow.Store = Store;\n\tdispatch('NEW_STORE');\n}\n\nexport default Store;\n","import { h } from 'preact';\n\n// Make a function only called once per frame max (useful for events triggered a lot, like resize)\n// THIS IS ACTUALLY THROTTLING AND NOT DEBOUNCING (we should rename that)\nfunction debounce(f, precall) {\n\tlet waiting = false;\n\tlet args = [];\n\tlet that = null;\n\tfunction trigger() { waiting = false; f.apply(that, args); }\n\tlet onEvent = function () {\n\t\tif (waiting) return;\n\t\twaiting = true;\n\t\targs = arguments;\n\t\tthat = this;\n\t\trequestAnimationFrame(trigger);\n\t};\n\tif (precall) f.apply(this, [].slice.call(arguments, 2));\n\treturn onEvent;\n}\n\n// Actual debouncing\nfunction dbounce(f, d) {\n\tif (d == undefined) d = 250;\n\tlet timer = null, args = [], thisArg = null;\n\tfunction trigger() { f.apply(thisArg, args); }\n\tfunction onEvent() {\n\t\tthisArg = this;\n\t\targs = [].slice.call(arguments);\n\t\tclearTimeout(timer);\n\t\ttimer = setTimeout(trigger, d);\n\t}\n\treturn onEvent;\n}\n\n// Other throttling with custom timing\nfunction throttle(fn, threshhold, scope) {\n\tif (threshhold == undefined) threshhold = 250;\n\tlet last;\n\tlet deferTimer;\n\treturn function () {\n\t\tlet context = scope || this;\n\n\t\tlet now = +new Date;\n\t\tlet args = arguments;\n\t\tif (last && now < last + threshhold) {\n\t\t\t// hold on to it\n\t\t\tclearTimeout(deferTimer);\n\t\t\tdeferTimer = setTimeout(function () {\n\t\t\t\tlast = now;\n\t\t\t\tfn.apply(context, args);\n\t\t\t}, threshhold);\n\t\t} else {\n\t\t\tlast = now;\n\t\t\tfn.apply(context, args);\n\t\t}\n\t};\n}\n\n// Make a function only callable once\n// Saves the return value and returns it for subsequent calls\nfunction once(f) {\n\tlet done = false;\n\tlet result;\n\treturn function () {\n\t\tif (done) return result;\n\t\tdone = true;\n\t\treturn result = f.apply(this, arguments);\n\t};\n}\n\n// DOM classNames handling\n\n// Long versions accepting arrays\n// function hasClass(elem, className) {\n// \tif (!elem || !className) return false;\n// \tlet arr = Array.isArray(className) ? className : className.split(' ');\n// \tif(arr.length > 1) return arr.every(cn=>hasClass(elem, cn));\n// \tclassName = arr[0];\n// \treturn (' ' + elem.className + ' ').indexOf(' ' + className + ' ') !== -1;\n// }\n// function addClass(elem, className) {\n// \tif (!elem || !className) return;\n// \tlet arr = Array.isArray(className) ? className : className.split(' ');\n// \tif(arr.length > 1) return arr.forEach(cn=>addClass(elem, cn));\n// \tclassName = arr[0];\n// \tif(!hasClass(elem, className))\n// \t\telem.className += ' ' + className;\n// }\n// function removeClass(elem, className) {\n// \tif (!elem || !className) return;\n// \tlet arr = Array.isArray(className) ? className : className.split(' ');\n// \tif(arr.length > 1) return arr.forEach(cn=>removeClass(elem, cn));\n// \tclassName = arr[0];\n// \tif(hasClass(elem, className))\n// \t\telem.className = (' ' + elem.className + ' ').replace(className, ' ').slice(1,-1);\n// }\n// function toggleClass(e,c) { (hasClass(e,c) ? removeClass : addClass)(e,c); }\n\n// Short versions\nfunction hasClass(e, c) { return (' ' + e.className + ' ').indexOf(' ' + c + ' ') !== -1; }\nfunction addClass(e, c) { if (!hasClass(e, c)) e.className += (e.className ? ' ' : '') + c; }\n// function removeClass(e, c) { e.className = e.className.split(' ').filter(v => v != c).join(' '); }\nfunction removeClass(e, c) { e.className = (' ' + e.className + ' ').replace(' ' + c + ' ', ' ').slice(1, -1); }\nfunction triggerAnim(e, c) { removeClass(e, c); e.offsetWidth; addClass(e, c); }\nfunction toggleClass(e, c) { (hasClass(e, c) ? removeClass : addClass)(e, c); }\n\n// Easy way to add a class based on a condition (also check the class exists)\nfunction condClass(cond, className) {\n\tif (arguments.length === 1) {\n\t\tclassName = cond;\n\t\tcond = true;\n\t}\n\tif (Array.isArray(className)) return className.map(cn => condClass(cond, cn)).join('');\n\treturn cond && className && typeof className === 'string' ? ' ' + className : '';\n}\n\n// Turns an object to a string\n// { abc: true, def: false, xyz: true } -> 'abc xyz'\n// Warning: s can have a special value and be used as a lookup object (e.g. imported sss)\n//   will use s.abc instead of 'abc' if s object specified and the value exists\nfunction expandClasses(classes) {\n\tif (!classes || typeof classes !== 'object' || Array.isArray(classes)) {\n\t\treturn classes;\n\t}\n\tlet mapKey = 's';\n\tlet map = classes[mapKey];\n\tlet hasMap = map && typeof map === 'object';\n\tlet list = Object.keys(classes).filter(key => (!hasMap || key !== mapKey) && classes[key]);\n\tif (map) {\n\t\tlist = list.map(e => map[e] || e);\n\t}\n\treturn list.join(' ');\n}\n/**\n * Join several classes together.\n *\n * @example\n * joinClasses('square', 'blue', false && 'active');\n * // returns 'square blue'\n * @param {...string} classNames - the class names to join\n * @return {string} the full class name\n */\nfunction joinClasses() {\n\treturn [].concat.apply([], arguments).map(expandClasses).filter(e => e).join(' ');\n}\n\n// Clamp a value between two bounds\nfunction clamp(v, min, max) { return v > min ? v < max ? v : max : min; }\n\n// Access to a property of a nested object, or return a default value if the path cannot be accessed\n// For example, if obj is { nested: { property : [ 'hello' ] } }\n// to get 'hello', path would need to be 'nested.property.0' or ['nested', 'property', 0]\n// if we use 'non.existing.path' as a path, it would return def\nfunction accessNested(obj, path, def) {\n\tif (typeof path === 'string') path = path.split('.');\n\tif (!Array.isArray(path)) return def; // Path is not an array\n\tif (!path.length) return obj;\n\tlet prop = path[0];\n\tif (obj && obj.hasOwnProperty(prop)) return accessNested(obj[prop], path.slice(1), def);\n\treturn def;\n}\n// mini version with less checks for console one-liners:\n// var n=(o,p,k)=>(o&&(p=p.split?p.split('.'):p).length)?n(o[p.shift()],p):o;\n\n// Used for example with appData.pages.showtimes.data.stuff, when you can specify either one or a lsit of values\n// if an array, returns it\n// if a string (e.g. 'hello'), returns ['hello']\n// if an object (e.g. {1: 'abc', 2: 'def'}) returns ['abc', 'def']\n// if an object of booleans (e.g. {abc: true, def: true, ghi: false}) returns ['abc', 'def']\n// Also removes falsy values (i.e. disabled items)\nfunction asList(value) {\n\tif (!value) return [];\n\tif (typeof value !== 'object') return [value];\n\tif (!Array.isArray(value)) value = Object.keys(value).map(k => typeof value[k] === 'boolean' ? value[k] && k : value[k]);\n\treturn value.filter(e => e);\n}\n\n/* ---- ARRAY STUFF ---- */\n\n// Returns an array with only unique values (remove duplicates)\nfunction arrayUnique(array) {\n\t// Move to sets when widely available : return [...new Set(array)];\n\tif (!array || !Array.isArray(array)) return array;\n\treturn array.reduce((result, elem) => {\n\t\tif (result.indexOf(elem) === -1) result.push(elem);\n\t\treturn result;\n\t}, []);\n}\n\n// Returns the union of a set of arrays ([1,2,3], [2,3,4] => [1,2,3,4])\nfunction arrayUnion(/* array1, array2, ... */) {\n\treturn arrayUnique([].concat.apply([], arguments));\n}\n\n/* ---- ----------- ---- */\n\n// Return a date based on a date set in thundr\n// If a number, consider it a timestamp\n// If a string yyyy-MM-dd, get the beginning of this day in local time (usually release dates for example are local)\n// If something else tries new Date(val)\nfunction appDataDate(val) {\n\tif (!isNaN(val)) {\n\t\treturn new Date(+val);\n\t}\n\tif (typeof val === 'string') {\n\t\tlet m = val.match(/^(\\d{4})-(\\d{1,2})-(\\d{1,2})$/);\n\t\treturn m ? new Date(+m[1], m[2] - 1, +m[3]) : new Date(val);\n\t}\n\treturn new Date(NaN);\n}\n\nfunction sortObjectByOrder(object, mapCallback, property) {\n\tif (!object) {\n\t\treturn [];\n\t}\n\tproperty = property || 'order';\n\tlet getProperty = typeof property === 'function' ? property : obj => obj && obj[property];\n\n\tlet objectByOrder = Object.keys(object).map(k => ({ key: k, value: object[k] })).sort((obj1, obj2) => {\n\t\tif (!obj1.value) return 1;\n\t\tif (!obj2.value) return -1;\n\n\t\tlet prop1 = getProperty(obj1.value, obj1.key);\n\t\tlet prop2 = getProperty(obj2.value, obj2.key);\n\t\t// Keep it ==, not === to also get nulls\n\t\tlet noProp1 = prop1 == undefined;\n\t\tlet noProp2 = prop2 == undefined;\n\t\t// If both don't have an order set, sort them by keys (so that it works with 1, 2, etc.)\n\t\tif (noProp1 && noProp2) return obj1.key.localeCompare(obj2.key, undefined, { numeric: true });\n\t\tif (noProp1) return 1;\n\t\tif (noProp2) return -1;\n\n\t\tlet stringCompare = isNaN(prop1) || isNaN(prop2);\n\t\t// sort them by order\n\t\treturn stringCompare ? prop1.toString().localeCompare(prop2.toString()) : prop1 - prop2;\n\t});\n\n\tif (typeof mapCallback !== 'function') {\n\t\tmapCallback = value => value;\n\t}\n\treturn objectByOrder.map(el => mapCallback(el.value, el.key));\n}\n\nfunction addToQuery(q, path, o) {\n\tif (o == null) {\n\t\treturn q;\n\t}\n\tif (typeof o !== 'object') {\n\t\treturn q[path] = o;\n\t}\n\tconst ks = Object.keys(o);\n\tks.forEach(k => addToQuery(q, path + '[' + k + ']', o[k]));\n\treturn q;\n}\nfunction toQueryString(obj) {\n\tif (!obj) return '';\n\tlet value = obj;\n\tif (typeof obj !== 'string') {\n\t\tlet query = {};\n\t\tObject.keys(obj).forEach(key => addToQuery(query, key, obj[key]));\n\t\tvalue = Object.keys(query).reduce((a, k) => {\n\t\t\tlet v = query[k];\n\t\t\tif (v == null) return a;\n\t\t\tlet addedVal = encodeURIComponent(k);\n\t\t\tif (typeof v !== 'boolean' && v !== '') {\n\t\t\t\taddedVal += '=' + encodeURIComponent(v);\n\t\t\t}\n\t\t\ta.push(addedVal);\n\t\t\treturn a;\n\t\t}, []).join('&');\n\t}\n\treturn value ? '?' + value : '';\n}\n\n/**\n * Make an object with all the paths that exist in the given object and\n * specifying where they are coming from\n * @param\t{Object} obj - The base object that it will compare to\n * @param\t{Array} options - array of different object which it will use to compare to, to match with the base object\n */\nfunction defaultLevelsDeep(obj, options) {\n\t// NOTE: Options Structure [{title:'TITLE|STRING|', object:DATA|OBJECT|},...];\n\tlet objPaths = {};\n\tcreateObjectPathDeep(obj, objPaths, options);\n\treturn objPaths;\n}\n\nfunction createObjectPathDeep(obj, pathsObj, optionsRef, path = '') {\n\tlet options = optionsRef.slice();\n\tObject.keys(obj).map((key) => {\n\t\tlet newPath = `${path}${key}.`;\n\t\tlet newOptions = options.filter((option) => {\n\t\t\treturn option.object && option.object.hasOwnProperty(key);\n\t\t});\n\n\t\tif (typeof obj[key] === 'object' && obj[key] !== null) {\n\t\t\tlet newOptionsTest = newOptions.map(option => {\n\t\t\t\tlet newOption = Object.create(option);\n\t\t\t\tnewOption.object = option.object[key];\n\t\t\t\tnewOption.title = option.title;\n\t\t\t\treturn newOption;\n\t\t\t});\n\n\t\t\tcreateObjectPathDeep(obj[key],pathsObj,newOptionsTest, newPath);\n\t\t}\n\t\tlet levels = [];\n\t\tif (newOptions.length > 0) {\n\t\t\tnewOptions.forEach((option) => {\n\t\t\t\tlevels.push(option.title);\n\t\t\t});\n\t\t}\n\n\t\tpathsObj[newPath] = levels;\n\n\t\treturn key;\n\t});\n}\n\n/**\n * Delete all the null properties in a specified object\n * @param  {Object} defaults - the object that needs to be filtered\n * @param  {Boolean} recurse - does it need to keep looking\n */\nfunction deleteNulls(defaults, recurse) {\n\tfor (let i in defaults) {\n\t\tif (defaults[i] === null) {\n\t\t\tdelete defaults[i];\n\t\t} else if (recurse && typeof defaults[i] === 'object') {\n\t\t\tdeleteNulls(defaults[i], recurse);\n\t\t}\n\t}\n}\n\n// Replace the content in a VNode by some other VNode\n// for example, to put 'cat' in bold\n// let result = replaceWithVNode(<div>I love my cat, he is the best</div>, 'cat', <b>cat</b>);\n// - OR (works with regexp and callback functions) -\n// let result = replaceWithVNode(<div>My cat ♥ your dog</div>, /\\b(cat|dog)\\b/g, match => <b>{match[1]}</b>);\n// /!\\ changes the src object (and returns it) !\n// Count is used to prevent infinite recursion, do not specify it for your initial call\nfunction replaceWithVNode(src, search, replace, count) {\n\tif (!src || !search) return src;\n\t// Check input\n\tcount = (+count || 0) + 1;\n\t// Prevent deep recursion ?\n\tif (count > 20) return src;\n\tsearch = _toRegexp(search);\n\tlet replaceFunc = replace;\n\tif (typeof replace !== 'function') replaceFunc = () => replace;\n\t// Array\n\tif (Array.isArray(src)) {\n\t\treturn src.reduce((arr, elem) => arr.concat(replaceWithVNode(elem, search, replace, count)), []);\n\t}\n\t// VNode\n\tif (typeof src === 'object' && src.children) {\n\t\tsrc.children = src.children.reduce((arr, child) => arr.concat(replaceWithVNode(child, search, replace, count)), []);\n\t\treturn src;\n\t}\n\t// Make sure to cast to string\n\tsrc = src + '';\n\tlet result = [];\n\tlet cPos = 0, found;\n\twhile (found = search.exec(src)) { // eslint-disable-line no-cond-assign\n\t\tresult.push(src.slice(cPos, found.index), replaceFunc(found));\n\t\tcPos = found.index + found[0].length;\n\t\t// The regex is not global, stop at the first match (otherwise inifnite loop - stays on the same match when doing exec multiple times)\n\t\tif (!search.global) break;\n\t}\n\t// No match at all, just return the source instead of an array containing the source\n\tif (!result.length) return src;\n\t// Don't forget the part between the end of the last match and the end of the string\n\tresult.push(src.slice(cPos));\n\treturn result;\n}\n// Utility for replaceWithVNode (changes a string to regexp, with escaped special chars : '(cat|dog)' matches that literally instead of cat OR dog)\nfunction _toRegexp(s) {\n\tif (s instanceof RegExp) return s;\n\treturn new RegExp((s + '').replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), 'g'); // eslint-disable-line no-useless-escape\n}\n\nlet _classCheck = (el, attr, val) => el.attributes && ~(' ' + (el.attributes.class || el.attributes.className || '') + ' ').indexOf(' ' + val + ' ');\nlet _attributeCheck = (el, attr, val) => attr ? el.attributes && (val ? el.attributes[attr] == val : el.attributes.hasOwnProperty(attr)) : (val ? val === '*' || el.nodeName === val : false);\nfunction _matchSelector(node, selector) {\n\tif (!node) return false;\n\treturn selector.every(s => {\n\t\tlet attr = undefined, val = undefined, fn = _attributeCheck;\n\t\tif (s[0] === '.') fn = _classCheck, val = s.slice(1);\n\t\telse if (s[0] === '#') attr = 'id', val = s.slice(1);\n\t\telse if (s[0] === '[') {\n\t\t\tlet match = s.match(/^\\[([^=]+)(=(['\"]?)(.+)\\3)?\\]$/);\n\t\t\tif (match) attr = match[1], val = match[4];\n\t\t} else val = s;\n\t\treturn fn(node, attr, val);\n\t});\n}\n\n// Return the subelement matching the selector\n// - node: VNode in which to perform the search (for example <div class=\"myElement\"><input id=\"val\" disabled /></div>)\n// - selector: CSS-like selector for the element you want to find\n// - asPath: if true returns the path to access the match (as an array of strings), instead of returning the matching element itself. Can be used in accessNested. (e.g. ['children', '2', 'children', '1'])\n// - direct/currentPath/childrenOffset : Internal use\n// Supported selector things :\n// - + (adjacent)\n// - ~ (sibling)\n// -   (space ; descendant)\n// - > (direct child)\n// - .class\n// - #id\n// - [attribute]\n// - [attribute=\"value\"]\nfunction findInVNode(node, selector, asPath, direct, currentPath, childrenOffset) {\n\t// if(!node) return;\n\tcurrentPath = currentPath || [];\n\tlet parts = selector;\n\tif (!Array.isArray(selector)) parts = (selector || '').split(/\\s*(\\+|>|~|\\s)\\s*/g);\n\tif (!parts[0]) return undefined;\n\n\n\tlet sel = parts[0].split(/(\\[[^\\]]+\\]|[.#]?[^.#\\[]+)/g).filter(e => e); // eslint-disable-line no-useless-escape\n\tlet srcIsArray = Array.isArray(node);\n\tif (!srcIsArray) node = [node];\n\tfor (let i = 0, l = node.length; i < l; i++) {\n\t\tlet el = node[i];\n\t\tif (!el) continue;\n\t\tlet nextNodes, nextSelector = parts, nextPath = currentPath.slice();\n\t\tlet nextOffset = 0;\n\t\tif (srcIsArray) nextPath.push(i + (childrenOffset || 0));\n\t\tif (_matchSelector(el, sel)) {\n\t\t\tif (parts.length < 2) {\n\t\t\t\tif (asPath) {\n\t\t\t\t\tif (srcIsArray) currentPath.push(i + (childrenOffset || 0));\n\t\t\t\t\t// return currentPath.join('.');\n\t\t\t\t\treturn currentPath;\n\t\t\t\t}\n\t\t\t\treturn el;\n\t\t\t}\n\t\t\tnextNodes = el.children;\n\t\t\tnextPath.push('children');\n\t\t\tdirect = false;\n\t\t\tlet inter = parts[1];\n\t\t\tif (inter === '>') {\n\t\t\t\tdirect = true;\n\t\t\t} else if (inter === '~' || inter === '+') {\n\t\t\t\tnextNodes = inter === '+' ? node.slice(i + 1, i + 2) : node.slice(i + 1);\n\t\t\t\tnextPath = currentPath.slice();\n\t\t\t\tnextOffset = (childrenOffset || 0) + i + 1;\n\t\t\t\tdirect = true;\n\t\t\t}\n\t\t\tnextSelector = parts.slice(2);\n\t\t} else if (!direct && el.children) {\n\t\t\tnextNodes = el.children;\n\t\t\tnextPath.push('children');\n\t\t}\n\t\tif (nextNodes) {\n\t\t\tlet nextResult = findInVNode(nextNodes, nextSelector, asPath, direct, nextPath, nextOffset);\n\t\t\tif (nextResult) {\n\t\t\t\treturn nextResult;\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Parse dates in a few formats (e.g. dd/mm/yyyy ; yyyy-mm-dd)\nfunction parseDate(d) {\n\tif (!d || d instanceof Date) return d;\n\tif (typeof d === 'number') return new Date(d);\n\tif (typeof d !== 'string') return undefined;\n\tlet match = d.match(/^(?:(?:([0-9]{1,2})\\/)?([0-9]{1,2})\\/)?([0-9]{4})$/);\n\tif (match) return new Date(+match[3], +(match[2] || 1) - 1, +(match[1] || 1));\n\t// Handled be new Date(string) but depends on timezone so we need to handle that \"manually\" as well\n\t// Because it gives an UTC date and we want to be able to use getDate() instead of getUTCDate()\n\tmatch = d.match(/^(\\d{1,4})-(\\d{1,2})(?:-(\\d{1,2})(T\\d{1,2}:\\d{1,2}:\\d{1,2}(\\.\\d+)?Z?)?)?$/);\n\tif (match) return new Date(+match[1], +match[2] - 1, +(match[3] || 1));\n\tif (!Number.isNaN(+d)) return new Date(+d);\n\tconst date = new Date(d);\n\treturn isNaN(date) ? undefined : date;\n}\n\n/**\n * Join several parts of a path together.\n *\n * @example\n * // returns 'http://myserver.com/images/title.jpg'\n * joinPaths('http://myserver.com', 'images', '/title.jpg');\n * @param {...string} parts - the path parts to join\n * @return {string} the final path containing all the parts\n */\nfunction joinPaths() {\n\tlet path = '';\n\tlet slash = false; // whether slash is needed before\n\tfor (let i = 0, il = arguments.length; i < il; i++) {\n\t\tlet part = arguments[i];\n\t\tif (!part) continue;\n\t\t// ^ ensure empty string is not counted as a path part\n\t\tif (i > 0 && part.charAt(0) === '/') {\n\t\t\tpart = part.substring(1);\n\t\t}\n\t\tpath += slash ? '/' + part : part;\n\t\tslash = path.charAt(path.length - 1) !== '/';\n\t}\n\treturn path;\n}\n\n/**\n * Return whether the given object has only numeric key strings.\n * Can be used to detect if an object is in reality an array.\n *\n * @example\n * hasOnlyNumericKeys({\"0\": \"foo\", \"1\": \"bar\", \"3\": \"baz\"}); // true\n * hasOnlyNumericKeys({\"0\": \"foo\", \"sam\": \"bar\"}); // false\n * hasOnlyNumericKeys({\"0\": \"foo\", \"Infinity\": \"bar\"}); // false\n * @param {Object} obj - the input object\n * @return {boolean} true if obj is an array with string keys, false otherwise\n */\nfunction hasOnlyNumericKeys(obj) {\n\tfor (const key in obj) {\n\t\tif (!isFinite(+key)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n/**\n * Convert an object to an array. (stricter version of asList)\n * Non-numeric/Infinite keys will be removed in the array representation of the\n * object.\n *\n * @param {Object} obj - the input object\n * @return {Array} an array equivalent to obj\n */\nfunction objToArr(obj) {\n\tconst arr = [];\n\tfor (const key in obj) {\n\t\tconst idx = +key;\n\t\tif (isFinite(idx)) {\n\t\t\tarr[idx] = obj[key];\n\t\t}\n\t}\n\treturn arr;\n}\n\n/**\n * Sanitize recursively an object created in Thundr.\n * Note that numeric value will be casted to Number unless a '@s' is explicitely\n * specified at the end of the key.\n *\n * @example\n * sanitizeObj({\"power\": \"45\", \"range\": {\"0\": \"-5.6\", \"1\": \"5.2\"}, \"id@s\": \"124\"})\n * // return {\"power\": 45, \"range\": [-5.6, 5.2], \"id\": \"124\"}\n * @param {Object} obj - the input object\n * @param {Object|Array} the sanitized object or array\n */\nfunction sanitizeObj(obj) {\n\tconst out = {};\n\tfor (let key in obj) {\n\t\tlet val = obj[key];\n\t\tif (val != null && typeof val === 'object') {\n\t\t\tval = sanitizeObj(val);\n\t\t} else if (key.endsWith('@s')) {\n\t\t\tkey = key.substring(0, key.length - 2);\n\t\t} else {\n\t\t\tval = isFinite(+val) ? +val : val;\n\t\t}\n\t\tout[key] = val;\n\t}\n\tif (hasOnlyNumericKeys(out)) {\n\t\treturn objToArr(out);\n\t}\n\treturn out;\n}\n\n/**\n * Convert a multiline text to an array of JSX elements.\n *\n * @param {string} text - string with 0 or more \\n\n * @return {Array.<string|JSX>} an array of JSX elements\n */\nconst textToJsxArray = (() => {\n\tfunction reduceTextJsx(jsxArray, line, i) {\n\t\tif (i > 0) {\n\t\t\tjsxArray.push(<br />);\n\t\t}\n\t\tjsxArray.push(line);\n\t\treturn jsxArray;\n\t}\n\n\treturn (text) => {\n\t\tlet lines = text;\n\t\tif (typeof lines === 'string') lines = text.split('\\n');\n\t\tconst jsxArray = lines.reduce(reduceTextJsx, []);\n\t\treturn jsxArray;\n\t};\n})();\n\n/**\n * Return the part part of a URI.\n *\n * @example\n * pathOnly('this/is/a/folder/file.txt');\n * // ^ returns 'this/is/a/folder/'\n *\n * @param {string} path - the full URI of a resource\n * @return {string} only the path part of the resource\n */\nfunction pathOnly(path) {\n\tlet rpath = decodeURIComponent(path);\n\tconst index = rpath.lastIndexOf('/');\n\tif (index === -1 || index === rpath.length - 1) return rpath;\n\tlet res = rpath.substr(index + 1);\n\tconst qsIndex = res.indexOf('?');\n\tif (qsIndex > -1) {\n\t\tres = res.substring(0, qsIndex);\n\t\trpath = rpath.substring(0, index + 1 + qsIndex);\n\t}\n\tif (res.length === 0) return rpath;\n\tconst pointIndex = res.lastIndexOf('.');\n\tif (pointIndex === -1 || pointIndex === res.length - 1) return rpath + '/';\n\treturn rpath.substring(0, index + 1);\n}\n\n/**\n * Return whether a variable is a JS (key, value) object.\n *\n * @param {*} obj - the object to test\n * @return {!boolean} true if obj is an object, false otherwise\n */\nfunction isObject(obj) {\n\treturn obj !== null && typeof obj === 'object' && !Array.isArray(obj);\n}\n\n/**\n * Return whether a variable is a valid numberic value (string number are allowed).\n *\n * @param {*} obj - the object to test\n * @return {!boolean} true if val is numeric, false otherwise\n */\nfunction isNumeric(val) {\n\treturn !isNaN(parseFloat(val)) && isFinite(val);\n}\n\n/**\n * Access a deep member of an object and create intermediates if they are undefined.\n *\n * @param {!Object} obj - the object to look in\n * @param {Array.<string>|string} path - the path of the member in the object\n * @param {*=} def - the default value\n */\nfunction accessOrCreateNested(obj, path, def) {\n\tif (typeof path === 'string') path = path.split('.');\n\tconst levelCount = path.length;\n\tif (levelCount === 0) return obj;\n\n\tfor (let i = 0; i < levelCount; i++) {\n\t\tif (obj === null || typeof obj !== 'object') {\n\t\t\tconsole.error(`Cannot access property \"${path.slice(i).join('.')}\" in ` +\n\t\t\t\t`\"${path.slice(0, i).join('.')} (object is ${typeof obj})`);\n\t\t\treturn;\n\t\t}\n\t\tconst level = path[i];\n\t\tif (!obj.hasOwnProperty(level)) {\n\t\t\tif (i < levelCount - 1) {\n\t\t\t\tobj[level] = {};\n\t\t\t} else {\n\t\t\t\tobj[level] = def;\n\t\t\t}\n\t\t}\n\t\tobj = obj[level];\n\t}\n\treturn obj;\n}\n\n/**\n * Parse an string array of numeric numbers.\n *\n * @example\n * parseNumericArray('5, 2, 1.2, 7'); // returns [5, 2, 1.2, 7]\n *\n * @param {string} arrayStr - the string array\n * @return {Array.<number>|null} the array of numeric value, or null in case the parsing failed\n */\nfunction parseNumericArray(arrayStr) {\n\tif (typeof arrayStr !== 'string') return null;\n\tconst parts = arrayStr.split(/[|/,;]/);\n\t// use ES5 loop to early out in case of non-numeric value\n\tconst il = parts.length;\n\tfor (let i = 0; i < il; i++) {\n\t\tconst val = parseFloat(parts[i].trim());\n\t\tif (!isFinite(val)) return null;\n\t\tparts[i] = val;\n\t}\n\treturn parts;\n}\n\n/**\n * Quick helper to choose whether a node should be displayed.\n *\n * @example\n * <div style={displayWhen(isLoading)} />\n *\n * @param {boolean} cond - the condition to display the node\n * @return {{display: string}} the element display style\n */\nconst displayWhen = (cond) => ({ display: cond ? 'block' : 'none' });\n\n/**\n * Return whether the given number is an integer or almost.\n *\n * @example\n * isIntegerOrAlmost(9.5); // false\n * isIntegerOrAlmost(10.00000223); // true\n * isIntegerOrAlmost(-10); // true\n *\n * @param {!number} n - the integer to test\n * @return {!boolean}\n */\nconst isIntegerOrAlmost = n => Math.abs(n - Math.round(n)) < 1e-6;\n\n/**\n * Return the formatted price\n * Note that we might have to change that later for different currencies.\n *\n * @example\n * formatNumber(12.000003); // returns \"12\"\n * formatNumber(12.100003); // returns \"12.1\"\n *\n * @param {!number} price - the price amount to convert\n * @return {!string} the formatted price\n */\nconst formatPrice = price => price.toFixed(isIntegerOrAlmost(price) ? 0 : 2);\n\n/**\n * Return the uri of an image if it exists in appData -> styling -> images || returns the default image path\n *\n * @param {*} obj - appData\n * @param {!string} imgName - name of image we are trying to find\n * @param {!string} defaultImg - value returned if the imgName doesn't exist\n * @return {!string} path of the onesheet stored in appData or default value\n */\nfunction getStylingImagePath(appData, imgName, defaultImg) {\n\treturn accessNested(appData, ['styling', 'images', imgName]) || defaultImg;\n}\n\n/**\n * Transforms HTML tags in HTML entities for safe rendering.\n *\n * @example\n * encodeHtml('<script>'); // returns \"&lt;script&gt;\"\n * encodeHtml('%3Cscript%3E'); // returns \"%3Cscript%3E\"\n *\n * @param {!string} str - the string to encode\n * @return {!string} the string with HTML tags replaced with HTML entities\n */\nconst encodeHtml = (str) => {\n\treturn (str.toString())\n\t\t.replace(/</g, '&lt;')\n\t\t.replace(/>/g, '&gt;')\n\t\t.replace(/%3C/g, '&lt;')\n\t\t.replace(/%3E/g, '&gt;');\n};\n\n/**\n * Transforms HTML tags in HTML entities recursively in any object.\n *\n * @param {*} obj - the input object\n * @return {*} the same object with all string encoded with HTML entities\n */\nconst encodeHtmlRecursively = (obj) => {\n\tif (typeof obj === 'string') return encodeHtml(obj);\n\tif (Array.isArray(obj)) return obj.map(e => encodeHtmlRecursively(e));\n\tif (isObject(obj)) {\n\t\tfor (const key in obj) obj[key] = encodeHtmlRecursively(obj[key]);\n\t}\n\treturn obj;\n};\n\n\nexport { debounce, throttle, dbounce, once };\nexport { accessNested, accessOrCreateNested };\nexport { hasClass, addClass, removeClass, triggerAnim, toggleClass, condClass, joinClasses };\nexport { clamp };\nexport { asList };\nexport { arrayUnique, arrayUnion };\nexport { appDataDate };\nexport { sortObjectByOrder };\nexport { addToQuery, toQueryString };\nexport { defaultLevelsDeep };\nexport { deleteNulls };\nexport { replaceWithVNode, findInVNode };\nexport { parseDate };\nexport { joinPaths };\nexport { hasOnlyNumericKeys, objToArr, sanitizeObj };\nexport { textToJsxArray };\nexport { pathOnly };\nexport { isObject, isNumeric };\nexport { parseNumericArray };\nexport { displayWhen };\nexport { isIntegerOrAlmost };\nexport { formatPrice };\nexport { getStylingImagePath };\nexport { encodeHtml, encodeHtmlRecursively };\n","/* Action Types\n-----------------------*/\n\nexport const UPDATE_STORE      = 'UPDATE_STORE';\nexport const BEFORE_LOAD       = 'BEFORE_LOAD';\nexport const PAGE_STATE_LOADED = 'PAGE_STATE_LOADED';\nexport const START_API         = 'START_API';\nexport const GMAPS_LOADED      = 'GMAPS_LOADED';\nexport const URL_CHANGED       = 'URL_CHANGED';\n\nexport const CLOSE_APP = 'CLOSE_APP';\n\n// Loader\nexport const UPDATE_LOADER = 'UPDATE_LOADER';\n\n// Bg Status\nexport const SET_BG_STATUS   = 'SET_BG_STATUS';\nexport const SET_ACTIVE_PAGE = 'SET_ACTIVE_PAGE';\n\n// App Dimensions/Browser Stats\nexport const SET_CLIENT_SIZE                = 'SET_CLIENT_SIZE';\nexport const START_FORCE_CLIENT_ORIENTATION = 'START_FORCE_CLIENT_ORIENTATION';\nexport const STOP_FORCE_CLIENT_ORIENTATION  = 'STOP_FORCE_CLIENT_ORIENTATION';\n\n// Background\nexport const SET_BACKGROUND_VIDEO_PLAYING = 'SET_BACKGROUND_VIDEO_PLAYING';\nexport const SET_BACKGROUND_VIDEO_ENABLED = 'SET_BACKGROUND_VIDEO_ENABLED';\nexport const SET_BACKGROUND_VIDEO_MUTED   = 'SET_BACKGROUND_VIDEO_MUTED';\nexport const SET_BACKGROUND_ELEMENT       = 'SET_BACKGROUND_ELEMENT';\nexport const UPDATE_BACKGROUND_SETTINGS   = 'UPDATE_BACKGROUND_SETTINGS';\n\n// Home page\nexport const CALENDAR_CLICKED       = 'CALENDAR_CLICKED';\nexport const MESSENGER_CLICKED      = 'MESSENGER_CLICKED';\nexport const HOMEPAGE_TRAILER_ENDED = 'HOMEPAGE_TRAILER_ENDED';\nexport const CLICKED_FOLLOW         = 'CLICKED_FOLLOW';\n\n// Menu\nexport const SET_SIDE_NAV_OPEN     = 'SET_SIDE_NAV_OPEN';\nexport const SET_SIDE_NAV_ACTIVE   = 'SET_SIDE_NAV_ACTIVE';\nexport const CLICKED_SHARE         = 'CLICKED_SHARE';\nexport const LINK_CLICKED          = 'LINK_CLICKED';\nexport const EXTERNAL_LINK_CLICKED = 'EXTERNAL_LINK_CLICKED';\nexport const HEADER_HIDDEN         = 'HEADER_HIDDEN';\n\n// Footer\n// export const FOOTER_SIZE = 'FOOTER_SIZE';\n\n// Client Geo\nexport const SET_CLIENT_GEO = 'SET_CLIENT_GEO';\nexport const GET_SCREENINGS = 'GET_SCREENINGS';\n\n// Dynamic Data\nexport const UPDATE_DYNAMIC_DATA = 'UPDATE_DYNAMIC_DATA';\n\n// Theaters\nexport const SET_THEATERS                       = 'SET_THEATERS';\nexport const ADD_THEATERS                       = 'ADD_THEATERS';\nexport const SELECT_THEATER                     = 'SELECT_THEATER';\nexport const SELECT_MACCS_THEATER               = 'SELECT_MACCS_THEATER';\nexport const VISIBLE_MACCS_THEATER              = 'VISIBLE_MACCS_THEATER';\n// export const SELECT_FIRST_THEATER               = 'SELECT_FIRST_THEATER';\nexport const SET_MAP_OPEN                       = 'SET_MAP_OPEN';\nexport const SET_CITIES                         = 'SET_CITIES';\nexport const SET_CITY_SHOW_COUNT                = 'SET_CITY_SHOW_COUNT';\nexport const SELECT_NEARBY_CITY                 = 'SELECT_NEARBY_CITY';\nexport const UPDATE_THEATER_FILTERED_SCREENINGS = 'UPDATE_THEATER_FILTERED_SCREENINGS';\nexport const AFTER_THEATERS_UPDATE              = 'AFTER_THEATERS_UPDATE';\nexport const EXTRA_THEATERS                     = 'EXTRA_THEATERS';\nexport const DO_LOCATION_SEARCH                 = 'DO_LOCATION_SEARCH';\nexport const FIRST_DATA_LOADED                  = 'FIRST_DATA_LOADED';\nexport const SCREENINGS_LOADED                  = 'SCREENINGS_LOADED';\nexport const SELECT_ST_DATE                     = 'SELECT_ST_DATE';\nexport const SELECT_PROVIDER                    = 'SELECT_PROVIDER';\nexport const SELECT_TIME                        = 'SELECT_TIME'; // DON'T USE FOR TRACKING, use SELECT_SCREENING INSTEAD\nexport const SELECT_SCREENING                   = 'SELECT_SCREENING';\nexport const TICKET_LINK_CLICKED                = 'TICKET_LINK_CLICKED';\nexport const SHOW_SCREENING_AUTH                = 'SHOW_SCREENING_AUTH';\n\n// Ticketing\nexport const OPEN_TICKETING               = 'OPEN_TICKETING';\nexport const REOPEN_TICKETING             = 'REOPEN_TICKETING';\nexport const GO_TICKETING_TYPES           = 'GO_TICKETING_TYPES';\nexport const UPDATE_TICKET_TYPE_QUANTITY  = 'UPDATE_TICKET_TYPE_QUANTITY';\nexport const CREATE_OR_UPDATE_ORDER       = 'CREATE_OR_UPDATE_ORDER';\nexport const UPDATE_ORDER_TICKETS         = 'UPDATE_ORDER_TICKETS';\nexport const GO_TICKETING_SEATING         = 'GO_TICKETING_SEATING';\nexport const PICK_OR_UNPICK_SEATS         = 'PICK_OR_UNPICK_SEATS';\nexport const UPDATE_TICKETING_SEATS       = 'UPDATE_TICKETING_SEATS';\nexport const FLUSH_SEAT_LAYOUT            = 'FLUSH_SEAT_LAYOUT';\nexport const GO_TICKETING_REVIEW          = 'GO_TICKETING_REVIEW';\nexport const GO_TICKETING_CONTACT_DETAILS = 'GO_TICKETING_CONTACT_DETAILS';\nexport const GO_TICKETING_PAYMENT         = 'GO_TICKETING_PAYMENT';\nexport const OPEN_PAYMENT                 = 'OPEN_PAYMENT';\nexport const PAYMENT_MESSAGE_RECEIVED     = 'PAYMENT_MESSAGE_RECEIVED';\nexport const CLOSE_PAYMENT                = 'CLOSE_PAYMENT';\nexport const TICKET_PURCHASE_COMPLETE     = 'TICKET_PURCHASE_COMPLETE';\nexport const SET_TICKETING_MESSAGE        = 'SET_TICKETING_MESSAGE';\nexport const CLEAR_TICKETING_MESSAGE      = 'CLEAR_TICKETING_MESSAGE';\nexport const GO_TICKETING_TIMEOUT         = 'GO_TICKETING_TIMEOUT';\nexport const CLOSE_TICKETING              = 'CLOSE_TICKETING';\n\n// Filters\nexport const CHECK_FILTERS         = 'CHECK_FILTERS';\nexport const RELOAD_FILTERS        = 'RELOAD_FILTERS';\nexport const TOGGLE_FILTER         = 'TOGGLE_FILTER';\nexport const FILTER_EXCLUDE        = 'FILTER_EXCLUDE';\nexport const FILTER_DISABLE        = 'FILTER_DISABLE';\nexport const SET_FILTER_VISIBILITY = 'SET_FILTER_VISIBILITY';\nexport const RESET_FILTER          = 'RESET_FILTER';\nexport const RESET_FILTERS         = 'RESET_FILTERS';\nexport const APPLY_FILTERS         = 'APPLY_FILTERS';\nexport const SEARCH_NEW_CITY       = 'SEARCH_NEW_CITY';\n\n// Modal\nexport const SHOW_MODAL          = 'SHOW_MODAL';\nexport const HIDE_MODAL          = 'HIDE_MODAL';\nexport const UPDATE_MODAL        = 'UPDATE_MODAL';\nexport const SHOW_COOKIES_MODAL  = 'SHOW_COOKIES_MODAL';\n// MODAL RESULTS (should probably move that somewhere else)\nexport const MODAL_RESULT_OK     = 'OK';\nexport const MODAL_RESULT_CANCEL = 'CANCEL';\n\nexport const APP_LIST_SCROLLED        = 'APP_LIST_SCROLLED';\nexport const MOVIES_LIST_SCROLLED     = 'MOVIES_LIST_SCROLLED';\nexport const SCREENINGS_LIST_SCROLLED = 'SCREENINGS_LIST_SCROLLED';\nexport const EVENT_DATA_LIST_SCROLLED = 'EVENT_DATA_LIST_SCROLLED';\n\n// QUIZ\nexport const QUIZ_STARTED = 'QUIZ_STARTED';\nexport const RIGHT_OR_WRONG_QUIZ_FINISHED = 'RIGHT_OR_WRONG_QUIZ_FINISHED';\n\n// USER\nexport const SET_USER = 'SET_USER';\nexport const SET_USER_REGION_MODAL_DISMISSED = 'SET_USER_REGION_MODAL_DISMISSED';\n\nexport const SET_IOSFIXEDFIX = 'SET_IOSFIXEDFIX';\n\n// YOUTUBE\nexport const YOUTUBE_READY    = 'YOUTUBE_READY';\nexport const YOUTUBE_PROGRESS = 'YOUTUBE_PROGRESS';\nexport const YOUTUBE_ENDED    = 'YOUTUBE_ENDED';\nexport const YOUTUBE_PAUSE    = 'YOUTUBE_PAUSE';\nexport const YOUTUBE_PLAY     = 'YOUTUBE_PLAY';\nexport const YOUTUBE_START    = 'YOUTUBE_START';\n\n// VR\nexport const VR_SET_MODE = 'VR_SET_MODE';\n\n// SCROLL CONTROLS\nexport const SCROLL_LOCK   = 'SCROLL_LOCK';\nexport const SCROLL_UNLOCK = 'SCROLL_UNLOCK';\n\n// TRACKING\nexport const ONETRUST_SHOW   = 'ONETRUST_SHOW';\nexport const ENABLE_STORAGE  = 'ENABLE_STORAGE';\nexport const DISABLE_STORAGE = 'DISABLE_STORAGE';\nexport const ENABLE_PIXELS   = 'ENABLE_PIXELS';\nexport const DISABLE_PIXELS  = 'DISABLE_PIXELS';\n\n// AUTHENTICATION\nexport const AUTH_RESPONSE = 'AUTH_RESPONSE';\nexport const AUTH_CLEAR    = 'AUTH_CLEAR';\n","/* global powTracker */\n\nimport Store from 'store/store';\nimport * as actions from 'store/actions';\nimport { getSize, getDims } from 'utils/clientUtils';\nimport { isObject, accessNested } from 'utils/utils';\n\nlet gaEnabled = false;\nlet gaCategory = '';\nlet gaPrefixList = [];\nlet tracked = {};\n\nlet isInit = false;\nlet queue = [];\nlet gaQueue = [];\n\n/**\n * Call this function to track an action\n * @param  {Object} data\n */\nexport function track(data) {\n\tif (typeof window === 'undefined') {\n\t\tconsole.trace('TRACKING SERVER-SIDE');\n\t\treturn;\n\t}\n\n\t// Edit is enabled, so stop tracking\n\tif (__INITIAL_STATE__.editable) {\n\t\treturn;\n\t}\n\n\tif (typeof data === 'string') data = { a: data };\n\tlet {\n\t\ta, // action name\n\t\tl, // label, used for action value like the theater id that was clicked\n\t\tni, // non-interactive, used to help determine bounce rate though currently not used with the piwik-based tracker\n\t\tonce, // should the event only be called once\n\t\tv, // event value (google analytics only)\n\t\tuseCustomPageTrack // if true, add potential activePage tracking suffix\n\t} = data;\n\n\t// (temporarily <- :/) separate static from standard\n\ta = 'static-' + a;\n\n\tlet suffix = '';\n\tif (useCustomPageTrack) {\n\t\tlet activePage = Store.get().activePage;\n\t\tif (activePage && activePage.trackingSuffix && activePage.id !== 'showtimes') {\n\t\t\t// true: use the page id as the suffix (e.g. event-name-pageid)\n\t\t\t// string: use this value as the suffix\n\t\t\tsuffix = activePage.trackingSuffix === true ? activePage.id : activePage.trackingSuffix;\n\t\t}\n\t}\n\tif (suffix) {\n\t\ta += '-' + suffix;\n\t}\n\n\tlet currentTime = new Date().getTime();\n\t// check if time difference is less than 100ms or if it should only be called once\n\tif (tracked[a] && (currentTime - tracked[a] < 100 || once)) return;\n\t// store time of last tracking\n\ttracked[a] = currentTime;\n\n\t// Tracking debuging\n\t// console.trace();\n\t// console.debug(`%cTRACK: %c${a} ${typeof l !== 'undefined' ? '[label:' + l + ']' : ''}`, 'color:blue; font-weight: bold;', 'font-style: italic;');\n\n\t// Send out event to store for pixels\n\ttry {\n\t\tlet actionName = a.replace(/^static-/, '').toUpperCase();\n\t\tactionName = actionName.replace(/[- ]/g, '_');\n\t\tStore.emit('TRACK_' + actionName, data);\n\t} catch(e) {\n\t\tconsole.log('Error during track event', e);\n\t}\n\n\t// powT.trackEvent('cat', a, l);\n\tif (isInit && data.isBeacon) {\n\t\tbeacon(a, l);\n\t\treturn;\n\t}\n\tif (isInit) {\n\t\tpowTracker.trackEvent(a, l);\n\t} else {\n\t\tqueue.push([a, l]);\n\t}\n\n\t// -- GOOGLE ANALYTICS\n\tif (a.slice(0, 7) === 'static-') {\n\t\t// Test before slicing in case we remove \"static-\" in the future\n\t\ta = a.slice(7);\n\t}\n\tlet region = __INITIAL_STATE__.appData.meta.region.slug;\n\tlet tData = {\n\t\thitType: 'event',\n\t\teventCategory: data.gaCategory || gaCategory,\n\t\teventAction: data.gaAction || ('website/core/' + region + '/' + a)\n\t};\n\tif (l) tData.eventLabel = l.toString();\n\tif (v) tData.eventValue = parseInt(v);\n\tif (ni) tData.nonInteraction = 1;\n\tgaCustom('send', tData);\n}\n\nexport function gaCustom(eventName) {\n\tif (gaEnabled) {\n\t\tlet args = [].slice.call(arguments, 1);\n\t\tgaPrefixList.forEach(name => ga.apply(ga, [name + eventName].concat(args)));\n\t} else {\n\t\t// if(!window.gaQueue) window.gaQueue = [];\n\t\t// window.gaQueue.push(arguments);\n\t\tgaQueue.push(arguments);\n\t}\n}\n\nfunction beacon(a, n) {\n\tif (typeof navigator !== 'undefined' && navigator.sendBeacon) {\n\t\tlet preq = '?e_a=' + encodeURIComponent(a);\n\t\tif (n !== undefined) {\n\t\t\tpreq += '&e_n=' + encodeURIComponent(n);\n\t\t}\n\t\t// let data = powT.getRequest(preq);\n\t\t// let baseUrl = powT.getTrackerUrl();\n\t\tlet data = powTracker.getRequest(preq);\n\t\tlet baseUrl = powTracker.getTrackerUrl() || '//:0';\n\t\tif (baseUrl.startsWith('//:0')) return;\n\t\ttry {\n\t\t\tnavigator.sendBeacon(baseUrl + data);\n\t\t} catch (e) {\n\t\t\tconsole.log('failed to send beacon', baseUrl + data);\n\t\t}\n\t}\n}\n\n/**\n * Tracking function for going to an external link\n * @param  {String} href\n * @param  {String} trackId\n * @param  {String} label\n */\nexport function trackLinkOut(href, trackId, label) {\n\tlabel = label instanceof Event ? undefined : label;\n\tStore.emit(actions.EXTERNAL_LINK_CLICKED, { href, trackId, label });\n\ttrack({ a: trackId || 'clicked-link-out', l: label || href });\n}\n\nfunction setupGA(id, name, anonymize, ref, activePage, campaign) {\n\tif (!id) return;\n\tlet namePrefix = name ? name + '.' : '';\n\tlet optsObj = { cookieExpires: 31536000 };\n\tif (name) optsObj.name = name;\n\tga('create', id, optsObj);\n\tif (anonymize) ga(namePrefix + 'set', 'anonymizeIp', true);\n\tif (ref) ga(namePrefix + 'set', 'referrer', decodeURIComponent(ref));\n\tif (campaign) ga(namePrefix + 'set', 'campaignName', campaign);\n\tif (activePage) {\n\t\tga(namePrefix + 'set', 'page', activePage.path + location.search);\n\t}\n\tga(namePrefix + 'send', 'pageview');\n\n\tgaPrefixList.push(namePrefix);\n}\n\n/**\n * Init piwik tracking\n * @param  {Object} appData - appData coming from thundr\n */\nexport function initTracker(appData, options) {\n\tlet isToolkitIframe = location.search.match(/[?&]toolkit=true(&|$)/);\n\tlet disabled = !appData || (appData.options && appData.options.disableTracking) || isToolkitIframe;\n\tif (disabled || isInit || window.__IS_DEMO__ || window.__IS_LOCAL__) {\n\t\treturn;\n\t}\n\tif (typeof powTracker === 'undefined') {\n\t\tlet trackingScript = document.querySelector('script[src*=\"tracking.powster.com\"]');\n\t\tif (trackingScript) {\n\t\t\ttrackingScript.onload = initTracker.bind(this, appData, options);\n\t\t} else {\n\t\t\tlet script = document.createElement('script');\n\t\t\tscript.src = 'https://tracking.powster.com/js/tracker.js';\n\t\t\tscript.onload = initTracker.bind(this, appData, options);\n\t\t\tdocument.body.appendChild(script);\n\t\t}\n\t\treturn;\n\t}\n\tisInit = true;\n\n\tconst studio = appData.meta.studio.slug;\n\tconst title = appData.meta.title.slug;\n\tconst region = appData.meta.region.slug;\n\tconst viewMode = getSize(getDims());\n\tconst pageType = 'website';\n\tconst ref = window.customReferrer || document.referrer;\n\n\tpowTracker.initTracker(\n\t\taccessNested(appData, 'apis.tracking.insights.root') + '/t',\n\t\taccessNested(appData, 'meta.title.slug'),\n\t\toptions\n\t);\n\n\t// Make sure the campaign url parameter is always lowercase\n\tlet search = location.search;\n\tlet campaign = search.match(/(?:\\?|&)(campaign)=([^&]+)/i);\n\tlet campaignValue = decodeURIComponent((campaign && campaign[2]) || '');\n\tif (campaign && campaign[1] !== 'campaign') {\n\t\tlet newSearch = search.replace(/(\\?|&)campaign=/i, '$1campaign=');\n\t\tlet newUrl =\n\t\t\tlocation.protocol +\n\t\t\t'//' +\n\t\t\tlocation.host +\n\t\t\tlocation.pathname +\n\t\t\tnewSearch +\n\t\t\tlocation.hash;\n\t\tpowTracker.setCustomUrl(newUrl);\n\t}\n\tif (window.__IS_FACEBOOK__) {\n\t\tpowTracker.setCustomUrl(appData.meta.url + '?campaign=fbtab');\n\t\tcampaignValue = 'fbtab';\n\t}\n\n\tif (ref) {\n\t\t// powT.setReferrerUrl(decodeURIComponent(ref));\n\t\tpowTracker.setReferrerUrl(decodeURIComponent(ref));\n\t}\n\t// powT.setCampaignNameKey(\"campaign\");\n\t// powT.setCustomVariable(1, \"studio\", studio, \"visit\");\n\t// powT.setCustomVariable(2, \"movie\", title, \"visit\");\n\t// powT.setCustomVariable(3, \"region\", region, \"visit\");\n\t// powT.setCustomVariable(4, \"page_type\", pageType, \"visit\");\n\t// powT.setCustomVariable(5, \"view_mode\", viewMode, \"visit\");\n\t// powT.trackPageView();\n\n\t// Powster Tracking\n\tpowTracker.setCustomVariable(1, 'studio', studio);\n\tpowTracker.setCustomVariable(2, 'movie', title);\n\tpowTracker.setCustomVariable(3, 'region', region);\n\tpowTracker.setCustomVariable(4, 'page_type', pageType);\n\tpowTracker.setCustomVariable(5, 'view_mode', viewMode);\n\t// Initial Page view event\n\tpowTracker.trackEvent('visit');\n\n\t// powT.trackPageView();\n\tqueue.forEach(ev => {\n\t\t// powT.trackEvent(__INITIAL_STATE__.appData.meta.title.slug, ev[0], ev[1])\n\t\tpowTracker.trackEvent(ev[0], ev[1]);\n\t});\n\n\t// Google analytics ?\n\tif (\n\t\t!appData.options.coppa &&\n\t\tappData.options.useGoogleAnalytics &&\n\t\tappData.apis.tracking.googleAnalytics\n\t) {\n\t\tlet gad = appData.apis.tracking.googleAnalytics;\n\t\tlet actuallyLoadGA = function() {\n\t\t\tif (gaEnabled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tgaEnabled = true;\n\t\t\t(\n\t\t\t\tfunction(p, o, w, s, t, e, r) {\n\t\t\t\t\tp['GoogleAnalyticsObject'] = t;\n\t\t\t\t\t(p[t] = p[t] || function() { (p[t].q = p[t].q || []).push(arguments); }),\n\t\t\t\t\t(p[t].l = 1 * new Date());\n\t\t\t\t\t(e = o.createElement(w)), (r = o.getElementsByTagName(w)[0]);\n\t\t\t\t\te.async = 1; e.src = s;\n\t\t\t\t\tr.parentNode.insertBefore(e, r);\n\t\t\t\t}\n\t\t\t)(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');\n\n\t\t\t// TODO: this as a param ?\n\t\t\tlet activePage = Store.get().activePage;\n\t\t\tlet anonymize = true;\n\n\t\t\t// setupGA(gad.global);\n\t\t\t// setupGA(gad.showtimes, 'showtimes');\n\t\t\t// setupGA(gad.local, 'local');\n\t\t\tObject.keys(gad).forEach(name => {\n\t\t\t\tlet id = gad[name];\n\t\t\t\tif (typeof id !== 'string' || id.slice(0, 3) !== 'UA-') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsetupGA(\n\t\t\t\t\tid,\n\t\t\t\t\tname === 'global' ? null : name,\n\t\t\t\t\tanonymize,\n\t\t\t\t\tref,\n\t\t\t\t\tactivePage,\n\t\t\t\t\tcampaignValue\n\t\t\t\t);\n\t\t\t});\n\t\t\tgaCategory = gad.category;\n\t\t\tgaQueue.forEach(gaEv => {\n\t\t\t\tif (gaEv[1] && gaEv[1].eventCategory === '') {\n\t\t\t\t\tgaEv[1].eventCategory = gaCategory;\n\t\t\t\t}\n\t\t\t\tgaCustom.apply(window, gaEv);\n\t\t\t});\n\t\t};\n\n\t\tif (gad.oneTrustCategory) {\n\t\t\tif (window.powsterOneTrust && window.powsterOneTrust.indexOf(gad.oneTrustCategory) !== -1) {\n\t\t\t\tactuallyLoadGA();\n\t\t\t}\n\t\t\twindow.addEventListener('powster.onetrust.' + gad.oneTrustCategory, actuallyLoadGA);\n\t\t} else {\n\t\t\tactuallyLoadGA();\n\t\t}\n\t}\n\n\ttrack({ a: 'page_is', ni: 1 });\n}\n\nexport function updateDataLayer(obj) {\n\t// Nothing to do here if there is no dataLayer\n\tif (!window.dataLayer || typeof dataLayer.push !== 'function' || !window.googleTagManagerActive) {\n\t\treturn;\n\t}\n\n\tdataLayer.push(obj);\n}\n\n/**\n * Update the data layer with info about the current screening\n * @param  {Object} screening\n * @param  {Object} theater\n * @param  {string} event\n * @param  {string} href\n * @param  {string} provider\n */\nexport function updateDataLayerScreening(\n\tscreening,\n\ttheater,\n\tevent,\n\thref,\n\tcta,\n\tprovider\n) {\n\tif (!screening) return;\n\tlet obj = {};\n\tif (event) {\n\t\tobj.event = event;\n\t}\n\tif (href) {\n\t\tobj.href = href;\n\t}\n\tif (screening.movie && screening.movie.title) {\n\t\tobj.filmTitle = screening.movie.title;\n\t}\n\tif (theater) {\n\t\tif (isObject(theater.location)) {\n\t\t\tif (typeof theater.location.toJS === 'function') {\n\t\t\t\tobj.location = theater.location.toJS();\n\t\t\t} else {\n\t\t\t\tobj.location = theater.location;\n\t\t\t}\n\t\t}\n\t\tobj.theater = theater.name;\n\t\tif (theater.exhibitor) {\n\t\t\tobj.exhibitor = theater.exhibitor.domain;\n\t\t}\n\t}\n\tif (screening.stDate) {\n\t\tobj.day = screening.stDate.ddmmyyyy;\n\t}\n\tif (screening.time24) {\n\t\tobj.time = screening.time24;\n\t}\n\n\tobj.cta = cta || undefined;\n\t// NOTE: ^ Clients want undefined when cta not present\n\n\tif (provider) {\n\t\tobj.provider = provider;\n\t}\n\n\tupdateDataLayer(obj);\n}\n\n/**\n * Update the data layer when the page changes\n * @param  {String} pageId\n * @param  {Boolean} firstLoad\n */\nexport function updateDataLayerPageView(pageId, firstLoad) {\n\t// Let's send a different event depending if it's the initial load\n\t// or just a page change\n\tupdateDataLayer({\n\t\tevent: firstLoad ? 'page_load' : 'page_change',\n\t\tpage: pageId\n\t});\n}\n","import queryString from 'qs';\nimport formatDateTime from 'utils/formatDateTime';\nimport Store from 'store/store';\nimport * as actions from 'store/actions';\nimport Geo from 'models/Geo';\nimport Theater from 'models/Theater';\nimport Exhibitor from 'models/Exhibitor';\nimport Screening from 'models/Screening';\nimport Format from 'models/Format';\nimport Movie from 'models/Movie';\nimport { addToQuery, toQueryString, accessNested, asList, parseDate } from 'utils/utils';\nimport { track } from 'utils/tracking';\nimport preprocessScreenings from 'utils/preprocessScreenings';\n// import { gateways } from 'store/ticketingPublic';\n\n\n/**\n * Add Client data to the initial state of the store\n * @return {Object} The current initial State\n */\nfunction buildClientStoreData(initialState) {\n\t// NOTE: this is a random hack to make hover work on mobile in the navigation\n\t// Should we maybe put it somewhere else ? Seems a bit weird to have it in that function\n\twindow.addEventListener('touchend', () => {});\n\n\twindow.addEventListener('unload', (ev) => {\n\t\tStore.emit(actions.CLOSE_APP, ev);\n\t});\n\n\tconst dimensions = getDims();\n\tconst device = getDevice();\n\tconst deviceSize = getSize(dimensions, device);\n\tconst orientation = dimensions.width > dimensions.height ? 'landscape' : 'portrait';\n\tconst isIOS = getIsIOS(device);\n\tconst iOSVersion = getIOSVersion();\n\tconst isIE = getIsIE();\n\tconst isEdge = getIsEdge();\n\tconst isFirefox = getIsFirefox();\n\tconst isTouch = !!('ontouchstart' in window) || window.navigator.msMaxTouchPoints > 0;\n\tconst isChrome = !!getIsChrome();\n\tconst isSafari = getIsSafari();\n\tconst hasWebGL = getHasWebGL();\n\tconst pixelConsent = accessNested(initialState, 'appData.options.requireUserConsent', true);\n\n\tif (initialState.header) {\n\t\tconst order = ['none', 'mobile', 'tablet', 'desktop'];\n\t\tinitialState.header.sideNavActive = order.indexOf(deviceSize) <= order.indexOf(initialState.header.sideNavBelow);\n\t}\n\n\tinitialState.client = {\n\t\tdimensions,\n\t\tdeviceSize,\n\t\tdevice,\n\t\torientation,\n\t\tisIOS,\n\t\tiOSVersion,\n\t\tisEdge,\n\t\tisIE,\n\t\tisFirefox,\n\t\tisChrome,\n\t\tisTouch,\n\t\tisSafari,\n\t\thasWebGL,\n\t\tpixelConsent\n\t};\n\n\treturn initialState;\n}\n\nfunction getSize(dimensions = getDims(), device = getDevice()) {\n\t// const largeDesktopStartWidth = 1280; //not using this...yet. (Be careful ! We use the result of this function in the tracking)\n\tconst breakpoints = [[768, 'mobile'], [1024, 'tablet'], [Infinity, 'desktop']];\n\n\tfor (let i = 0; i < breakpoints.length; i++) {\n\t\tif (dimensions.width < breakpoints[i][0]){\n\t\t\tif(device == \"iphone\" && i == 1) return breakpoints[0][1]; //because iPhone x\n\t\t\telse return breakpoints[i][1];\n\t\t}\n\t}\n\n\treturn 'unknown';\n}\n\nfunction getDims() {\n\treturn {\n\t\twidth: window.innerWidth,\n\t\theight: window.innerHeight\n\t};\n}\n\n\nfunction getQueryParameterByName(name, url) {\n\tif (!url) url = window.location.href;\n\tname = name.replace(/[\\[\\]]/g, '\\\\$&'); // eslint-disable-line\n\tconst regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)');\n\tconst results = regex.exec(url);\n\tif (!results) return null;\n\tif (!results[2]) return '';\n\treturn decodeURIComponent(results[2].replace(/\\+/g, ' '));\n}\n\nfunction updateQueryStringItem(key, value, state, usePush) {\n\tconst parsedQS = queryString.parse(location.search.slice(1));\n\tif (typeof key !== 'object') {\n\t\tif (value !== null) {\n\t\t\tparsedQS[key] = value;\n\t\t} else {\n\t\t\tdelete parsedQS[key];\n\t\t}\n\t} else {\n\t\tusePush = state;\n\t\tstate = value;\n\t\tfor (const p in key) {\n\t\t\tif (key.hasOwnProperty(p)) {\n\t\t\t\tconst v = key[p];\n\t\t\t\tif (v !== null) {\n\t\t\t\t\tparsedQS[p] = v;\n\t\t\t\t} else {\n\t\t\t\t\tdelete parsedQS[p];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tlet qs = queryString.stringify(parsedQS);\n\tqs = qs ? '?' + qs : '';\n\tconst method = usePush ? 'pushState' : 'replaceState';\n\thistory[method](state, '', (location.pathname || '') + qs);\n}\n\n/**\n * Get the Device data.\n * @return {Object} Device data object\n */\nfunction getDevice() {\n\tif (typeof window !== 'undefined') {\n\t\tconst agent = ('' + navigator.userAgent).toLowerCase();\n\t\tif (agent.indexOf('android') !== -1) {\n\t\t\treturn 'android';\n\t\t}\n\t\tif (agent.indexOf('iphone') !== -1) {\n\t\t\treturn 'iphone';\n\t\t}\n\t\tif (agent.indexOf('ipad') !== -1) {\n\t\t\treturn 'ipad';\n\t\t}\n\t}\n\treturn 'desktop';\n}\n\nfunction findParent(el, tagName) {\n\ttagName = tagName.toUpperCase();\n\tlet parent = el.parentElement;\n\twhile (parent) {\n\t\tif (parent.tagName === tagName) {\n\t\t\treturn parent;\n\t\t}\n\t\tparent = parent.parentElement;\n\t}\n}\n\n\n/**\n * Is the browser Chrome?\n * @return {boolean|string} is the browser chrome\n */\nfunction getIsChrome() {\n\tif (getIsEdge()) return false;\n\tif (typeof window !== 'undefined') {\n\t\treturn (navigator.userAgent.match('CriOS') || !!window.chrome);\n\t}\n\treturn false;\n}\n\n\n/**\n * Is the browser IE (or Edge)?\n * @return {boolean|string} is the browser ie/which version\n */\nfunction getIsIE() {\n\tif (typeof window === 'undefined') {\n\t\treturn;\n\t}\n\tconst ua = window.navigator.userAgent;\n\n\tconst msie = ua.indexOf('MSIE ');\n\tif (msie > 0) {\n\t\t// IE 10 or older => return version number\n\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t}\n\n\tconst trident = ua.indexOf('Trident/');\n\tif (trident > 0) {\n\t\t// IE 11 => return version number\n\t\tconst rv = ua.indexOf('rv:');\n\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t}\n\n\tconst edge = ua.indexOf('Edge/');\n\tif (edge > 0) {\n\t\t// Edge (IE 12+) => return version number\n\t\treturn parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t}\n\n\t// other browser\n\treturn false;\n}\n\n/**\n * Is the browser Edge?\n * @return {boolean|string} is the browser edge\n */\nfunction getIsEdge() {\n\tconst ua = window.navigator.userAgent;\n\tconst edge = ua.indexOf('Edge/');\n\tif (edge > 0) {\n\t\treturn parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t}\n\treturn false;\n}\n\n/**\n * Is the browser Firefox?\n * @return {boolean} is the browser firefox\n */\nfunction getIsFirefox() {\n\treturn window.navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\n}\n\n/**\n * Is the device IOS?\n * @return {boolean} is the device ios\n */\nfunction getIsIOS() {\n\tif (typeof window === 'undefined') {\n\t\treturn false;\n\t}\n\tconst agent = ('' + navigator.userAgent).toLowerCase();\n\treturn agent.indexOf('ipad') !== -1 || agent.indexOf('iphone') !== -1;\n}\n\n/**\n * Get version of ios (if it is ios).\n * @return {string} version of ios\n */\nfunction getIOSVersion() {\n\tlet match = /CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent);\n\tif (!match) {\n\t\treturn false;\n\t}\n\tif (!match[1]) {\n\t\treturn 3.2;\n\t}\n\treturn parseFloat(match[1].replace('_', '.').replace(/_/g, '')) || false;\n}\n\n/**\n * Return whether WebGL is available.\n * @return {boolean} true if WebGL is available, false otherwise\n */\nfunction getHasWebGL() {\n\tconst canvas = document.createElement('canvas');\n\tconst gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n\treturn !!gl;\n}\n\nfunction getIsSafari() {\n\treturn navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1;\n}\n\n/**\n * Calculate the status of showtimes (is it live yet or not).\n * @param {Date} activeDate - the date that showtimes is going live\n * @param {boolean} forceLive - Should we force showtimes to go live (-1 to prevent live status)\n * @param {Object} pages - All the pages that the app has\n * @return {boolean} is showtimes live or not\n */\nfunction calculateShowtimesStatus(activeDate, forceLive, pages) {\n\treturn (activeDate <= Date.now() || forceLive || (pages.showtimes && pages.showtimes.path === '/')) && forceLive !== -1;\n}\n\n\n/**\n * Get the _pk_id/ac_id\n */\nfunction getAC_ID() {\n\tconst cookie = document.cookie.split(';')\n\t\t.find(c => c.trim().slice(0, 6) === '_pk_id');\n\n\tif (cookie) return cookie.split('=')[1].split('.')[0];\n\telse return null;\n}\n\nif (typeof window !== 'undefined') window.getAC_ID = getAC_ID;\n\n/**\n * Get the client geo from ip\n**/\nlet geoFromIp;\nfunction getGeoFromIPAsync(apiRoot) {\n\tif (geoFromIp) {\n\t\treturn geoFromIp;\n\t}\n\tapiRoot = apiRoot || accessNested(Store.get(), 'appData.apis.stdata.root') || 'https://stdata.powster.com';\n\treturn geoFromIp = fetch(apiRoot + '/geo').then(res => res.json()).catch(e => {\n\t\t// If error, try getting the capital city of the app region\n\t\tlet countryCode = accessNested(Store.get(), 'appData.meta.region.slug') || 'us';\n\t\tif (countryCode === 'intl' || countryCode === 'mde' || countryCode === 'lam') {\n\t\t\tthrow e;\n\t\t}\n\t\treturn fetch(apiRoot + '/capital?country=' + countryCode).then(r => r.json());\n\t}).then(data => {\n\t\tif (data && data.countryCode) {\n\t\t\tdata.countryCode = data.countryCode.toLowerCase();\n\t\t}\n\t\treturn data;\n\t}).catch(e => {\n\t\tgeoFromIp = null;\n\t\tthrow e;\n\t});\n}\n\nfunction rawSearchLocation(address, apiKey, srcRegion) {\n\tconst q = {\n\t\taddress,\n\t\tkey: apiKey\n\t};\n\n\tlet region = srcRegion;\n\tif (region) {\n\t\t// Special cases (ccTLD, not ISO ; see https://developers.google.com/maps/documentation/geocoding/intro#RegionCodes)\n\t\tif (region === 'gb') region = 'uk';\n\t\tq.region = region;\n\t}\n\n\treturn fetch('https://maps.googleapis.com/maps/api/geocode/json' + toQueryString(q))\n\t\t.then(res => res.json())\n\t\t.then(data => {\n\t\t\tif (data.status !== 'OK') {\n\t\t\t\tStore.emit(actions.SET_THEATERS, []);\n\t\t\t\tStore.get().showtimes.set({ loading: false, error: 'GEOCODING' });\n\t\t\t\ttrack({ a: 'location_fail', l: status });\n\t\t\t\t// probably 'ZERO_RESULTS' (we should check though)\n\t\t\t\treturn Promise.reject();\n\t\t\t}\n\t\t\tconst firstResult = findLocationInRegion(data.results, srcRegion);\n\t\t\tlet getCity = Promise.resolve();\n\t\t\tlet apiRoot = accessNested(Store.get(), 'appData.apis.stdata.root') || 'https://stdata.powster.com';\n\t\t\tif (firstResult.isCountry) {\n\t\t\t\tgetCity = fetch(apiRoot + '/capital?country=' + firstResult.countryCode).then(r => r.json());\n\t\t\t} else if (firstResult.types.indexOf('administrative_area_level_1') !== -1 && firstResult.countryCode === 'us') {\n\t\t\t\tgetCity = fetch(apiRoot + '/capital?state=' + firstResult.formatted_address.replace(/, USA$/i, '')).then(r => r.json());\n\t\t\t}\n\t\t\treturn getCity.catch(() => undefined).then(geoData => {\n\t\t\t\tif (!geoData) {\n\t\t\t\t\tconst countryCode = firstResult.countryCode;\n\t\t\t\t\tconst city = firstResult.cityName;\n\t\t\t\t\tconst location = firstResult.geometry.location;\n\t\t\t\t\tconst lat = location.lat;\n\t\t\t\t\tconst lon = location.lng;\n\t\t\t\t\tgeoData = {\n\t\t\t\t\t\tlat, lon, countryCode, city: city || address\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tgeoData.countryCode = (geoData.countryCode || srcRegion || '').toLowerCase();\n\t\t\t\tgeoData.src = address;\n\t\t\t\treturn new Geo(geoData);\n\t\t\t});\n\t\t});\n}\n\nfunction searchLocation(loc, gmapsApiKey, region, source) {\n\t// Start the loading animation when we start geocoding, not when it's done\n\tStore.get().showtimes.set({ loading: true });\n\n\ttrack({ a: 'location_search' });\n\n\treturn rawSearchLocation(loc, gmapsApiKey, region).then(result => {\n\t\t// Update the actual location\n\t\tStore.emit(actions.SET_CLIENT_GEO, result, source || 'search');\n\t\ttrack({ a: 'location', l: 'SUCCESS' });\n\t}).catch(() => {\n\t\tStore.emit(actions.SET_THEATERS, []);\n\t\tStore.get().showtimes.set({ loading: false, error: 'GEOCODING' });\n\t\ttrack({ a: 'location_fail', l: status });\n\t});\n}\n\n\n/**\n * Find the location located in the region (if it exists).\n * @param {Array} geos - array with all the possible geos\n * @param {Array} srcRegion - region in which we're doing the search\n * @return {Object} the best matching geo object to the active region\n */\nfunction findLocationInRegion(geos, srcRegion) {\n\t// Stop at the first one ?\n\tgeos.forEach((geo, index) => {\n\t\tgeo.sourceIndex = index;\n\t\tgeo.isCountry = geo.types.indexOf('country') !== -1;\n\n\t\tconst countryComp = geo.address_components.find(comp => (comp.types || []).indexOf('country') !== -1 && (comp.short_name || '').length === 2);\n\t\tif (countryComp) {\n\t\t\tgeo.countryCode = countryComp.short_name.toLowerCase();\n\t\t}\n\t\tgeo.isInCurrentCountry = geo.countryCode === srcRegion;\n\n\t\tconst cityComp = geo.address_components.find(comp => comp.types.indexOf('locality') !== -1);\n\t\tif (cityComp) {\n\t\t\tgeo.cityName = cityComp.long_name;\n\t\t}\n\t});\n\tgeos.sort((geoA, geoB) => {\n\t\t// If one of them is a country put it at the bottom\n\t\tif (geoA.isCountry !== geoB.isCountry) return geoA.isCountry ? 1 : -1;\n\t\tif (geoA.isInCurrentCountry !== geoB.isInCurrentCountry) {\n\t\t\treturn geoA.isInCurrentCountry ? -1 : 1;\n\t\t}\n\t\treturn geoA.sourceIndex - geoB.sourceIndex;\n\t});\n\treturn geos[0];\n}\n\n/**\n * Generates a fake API response with a bunch of screenings\n * TODO: Move that to the back-end. Create an endpoint stdata/screenings/fake and just call it\n */\nfunction generateFakeTimes(geo) {\n\tgeo = geo || {};\n\tconst formats = [{\n\t\ttype: 'formats',\n\t\tid: Math.random() + '',\n\t\tattributes: { name: '2d' }\n\t}];\n\tconst movies = [{\n\t\ttype: 'movies',\n\t\tid: Math.random() + '',\n\t\tattributes: {\n\t\t\tprovider_id: 'wwm',\n\t\t\tprovider_movie_id: Math.random() + '',\n\t\t\tformat_id: formats[0].id,\n\t\t\ttitle: 'Dummy movie'\n\t\t}\n\t}];\n\tconst theaters = [];\n\tfor (let i = ~~(Math.random() * 10 + 1); i--;) {\n\t\ttheaters.push(\n\t\t\t{\n\t\t\t\ttype: 'theaters',\n\t\t\t\tid: Math.random() + '',\n\t\t\t\tattributes: {\n\t\t\t\t\tname: 'Dummy Theater #' + (i + 1),\n\t\t\t\t\taddress: 'Nowhere',\n\t\t\t\t\tcity: '???',\n\t\t\t\t\tcountry: geo.countryCode || 'gb',\n\t\t\t\t\turl: 'http://google.com',\n\t\t\t\t\tlat: (geo.lat || 0) + (Math.random() - .5) * .08,\n\t\t\t\t\tlon: (geo.lon || 0) + (Math.random() - .5) * .16,\n\t\t\t\t\ttz: 'Europe/London',\n\t\t\t\t\tprovider_id: 'wwm',\n\t\t\t\t\tprovider_theater_id: Math.random() + ''\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\tconst screenings = [];\n\tconst now = Date.now();\n\tfor (let i = ~~(Math.random() * 50 + 50); i--;) {\n\t\tconst sTime = new Date(now + Math.random() * 7 * 24 * 60 * 60 * 1000);\n\t\tscreenings.push(\n\t\t\t{\n\t\t\t\ttype: 'screenings',\n\t\t\t\tid: '8ac5ca20-f78f-11e6-9bb3-efc78af321f4',\n\t\t\t\tattributes: {\n\t\t\t\t\tmovie_id: movies[0].id,\n\t\t\t\t\ttheater_id: theaters[~~(Math.random() * theaters.length)].id,\n\t\t\t\t\tprovider_id: 'wwm',\n\t\t\t\t\tdate: sTime.toISOString(),\n\t\t\t\t\ttime: formatDateTime(sTime, 'hh\\\\:mm\\\\:ss'),\n\t\t\t\t\turl: 'http://google.com',\n\t\t\t\t\tis_visible: true\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\treturn {\n\t\tdata: screenings,\n\t\tincluded: formats.concat(movies).concat(theaters),\n\t\tmeta: []\n\t};\n}\n\n// Switch things like be_fr to be\nfunction getCountry2(country) {\n\treturn country && (country + '').toLowerCase().replace(/^([a-z]+)_.+$/, '$1');\n}\n\nfunction getBoundingRegions(state) {\n\tlet br = accessNested(state, 'activePage.data.boundingRegions') || accessNested(state, 'appData.pages.showtimes.data.boundingRegions') || [];\n\tlet disabledBr = [];\n\tlet extraBr = [];\n\tif (!Array.isArray(br)) {\n\t\tdisabledBr = Object.keys(br).filter(k => br[k] === false);\n\t\textraBr = Object.keys(br).filter(k => br[k] === true);\n\t}\n\tif (accessNested(state, 'appData.options.autoBoundingRegions')) {\n\t\tconst dynamicData = Store.get().dynamicData;\n\t\tif (dynamicData && dynamicData.regions) {\n\t\t\tconst regions = dynamicData.regions;\n\t\t\tbr = Object.keys(regions).filter(k => regions[k]);\n\t\t}\n\t}\n\tif (br.toJS) br = br.toJS();\n\n\t// Convert to array\n\tbr = asList(br);\n\tif (br.indexOf('intl') !== -1) return null;\n\n\t// Turn into object for duplicate removal\n\tlet brObject = {};\n\tbr.concat(extraBr, accessNested(state, 'appData.meta.region.slug')).forEach(country => {\n\t\tif (!country) return;\n\t\t// Turn it into a regular country code\n\t\tlet country2 = getCountry2(country);\n\t\tif (disabledBr.indexOf(country2) !== -1) {\n\t\t\treturn;\n\t\t}\n\t\t// Also check the full country if country2 is different\n\t\tif (country2 !== country && disabledBr.indexOf(country) !== -1) {\n\t\t\treturn;\n\t\t}\n\t\tbrObject[country2] = true;\n\t});\n\n\treturn Object.keys(brObject);\n}\n\n// TODO: We should probably merge getGeoScreeningsAsync and getTheatersScreeningsAsync they are very similar\n// (do we even still use getTheatersScreeningsAsync ?)\n\n/**\n * Get screenings from location\n * @param {Object} geo\n * @param {Object} state current Store (used for bounding region check etc.\n * @param {Boolean} noBoundingRegionCheck Do not check the region\n */\nfunction getGeoScreeningsAsync(geo, state, noBoundingRegionCheck) {\n\tconst { appData } = state || {};\n\tif (appData && accessNested(appData, 'options.generateFakeTimes')) {\n\t\treturn Promise.resolve(generateFakeTimes(geo));\n\t}\n\n\tconst { lat, lon, countryCode } = geo;\n\tconst stdataApiRoot = appData.apis.stdata.root;\n\n\tlet be = accessNested(state, 'activePage.data.blockedExhibitors', {});\n\t// convert blockedExhibitors to object if it's an array\n\tif (Array.isArray(be)) {\n\t\tbe = be.reduce((be, exhibitor) => {\n\t\t\tbe[exhibitor] = true;\n\t\t\treturn be;\n\t\t}, {});\n\t}\n\n\tconst br = getBoundingRegions(state);\n\tif (br && !noBoundingRegionCheck) {\n\t\tif (br.indexOf(getCountry2(countryCode)) === -1) {\n\t\t\treturn Promise.reject('BOUNDING_REGION');\n\t\t}\n\t}\n\n\tconst q = {\n\t\t'include[0]': 'theaters',\n\t\t'include[1]': 'exhibitors',\n\t\t'include[2]': 'movies',\n\t\t'include[3]': 'formats'\n\t};\n\n\taddTitleFilterToQuery(q, appData);\n\n\t// blockedExhibitors.forEach(x => addToQuery(q, 'filter[exhibitors][exclude][domain]', x));\n\taddToQuery(q, 'filter[exhibitors][exclude][domain]', Object.keys(be).filter(d => d && be[d]));\n\n\tconst removeRadiusRestriction = accessNested(state, 'activePage.data.useGlobalScreenings');\n\n\t// gets every screening in the world if useGlobalScreenings is enabld in thundr\n\tif (!removeRadiusRestriction) {\n\t\tq['filter[theaters][lat]'] = lat;\n\t\tq['filter[theaters][lon]'] = lon;\n\t\tconst radiusFactor = accessNested(state, 'activePage.data.radiusFactor', 1);\n\t\tif (radiusFactor !== 1) q['filter[theaters][rf]'] = radiusFactor;\n\t}\n\n\tif (br) {\n\t\taddToQuery(q, 'filter[theaters][country]', br.filter(r => r.match(/^[a-z]{2}$/)));\n\t}\n\n\tlet blockedProviders = asList(accessNested(state, 'activePage.data.blockedProviders', {}));\n\taddToQuery(q, 'filter[providers][id_not]', blockedProviders);\n\n\treturn fetch(stdataApiRoot + '/screenings' + toQueryString(q), {\n\t\tmethod: 'GET',\n\t\theaders: {\n\t\t\t'Accept': 'application/vnd.api+json',\n\t\t\t'Content-Type': 'application/vnd.api+json'\n\t\t}\n\t}).then(res => res.json());\n}\n\n\n// SET CONTAINING TO TRUE IF ids ARE SCREENINGS IDS AND YOU WANT ALL SCREENINGS FROM THE THEATERS CONTAINING THEM\n// (otherwise ids are theaters ids)\nfunction getTheatersScreeningsAsync({ appData, client }, ids, containing) {\n\tconst stdataApiRoot = appData.apis.stdata.root;\n\n\tif (accessNested(appData, 'options.generateFakeTimes')) {\n\t\treturn Promise.resolve(generateFakeTimes(client));\n\t}\n\n\tconst q = {\n\t\t'include[0]': 'theaters',\n\t\t'include[1]': 'exhibitors',\n\t\t'include[2]': 'movies',\n\t\t'include[3]': 'formats'\n\t};\n\n\taddTitleFilterToQuery(q, appData);\n\n\tconst prop = containing ? 'theater_containing' : 'theater_id';\n\tids.forEach((id, idx) => {\n\t\tq['filter[' + prop + '][' + idx + ']'] = id;\n\t});\n\n\treturn fetch(`${stdataApiRoot}/screenings${toQueryString(q)}`, {\n\t\tmethod: 'GET',\n\t\theaders: {\n\t\t\t'Accept': 'application/vnd.api+json',\n\t\t\t'Content-Type': 'application/vnd.api+json'\n\t\t}\n\t}).then((res) => (res.json()));\n}\n\nfunction processScreeningsApi({ data = [], included = [] }, clientGeo, appData, activePage, theaterMasters, firstBatch) {\n\tif (typeof preprocessScreenings === 'function') {\n\t\tconst ret = preprocessScreenings(data, included, appData);\n\t\tif (ret && ret.data) data = ret.data;\n\t\tif (ret && ret.included) included = ret.included;\n\t}\n\n\tactivePage = activePage || accessNested(appData, 'pages.showtimes') || {};\n\n\t// filter out any data from providers that we should ignore\n\tconst cc = clientGeo.countryCode;\n\tconst ignore = accessNested(activePage, 'data.ignoreProviderRegions', {});\n\tdata = data.filter(s => !ignore[s.attributes.provider_id] || !ignore[s.attributes.provider_id][cc]);\n\tincluded = included.filter(t => !t.attributes.provider_id || (!ignore[t.attributes.provider_id] || !ignore[t.attributes.provider_id][cc]));\n\n\t// const formats = included.filter(({ type }) => (type === 'formats')).map((f) => (new Format(f.id, f.attributes)));\n\tconst formatNames = accessNested(activePage, 'data.formatNames', {});\n\tconst formatsLookup = included.filter(({ type }) => type === 'formats').reduce((prev, f) => {\n\t\t// if (f.attributes.name === 'standard') return prev;\n\t\tconst name = f.attributes.name;\n\t\tconst newName = formatNames[name] || formatNames[name.toLowerCase().replace(/\\s/g, '')];\n\t\tif (newName) {\n\t\t\tf.attributes.name = newName;\n\t\t}\n\t\tprev[f.id] = new Format(f.id, f.attributes);\n\t\treturn prev;\n\t}, {});\n\t// let movies = included.filter(({ type }) => (type === 'movies')).map((m) => (new Movie(m.id, m.attributes, formats.find((f) => (f.id === m.attributes.format_id)))));\n\tconst movieNames = accessNested(activePage, 'data.movieNames', {});\n\tconst moviesLookup = included.filter(({ type }) => type === 'movies').reduce((prev, m) => {\n\t\tconst format = formatsLookup[m.attributes.format_id];\n\t\tconst newName = movieNames[m.id] || movieNames[m.attributes.provider_id + ':' + m.attributes.provider_movie_id];\n\t\tif (newName) {\n\t\t\tm.attributes.title = newName;\n\t\t}\n\t\tprev[m.id] = new Movie(m.id, m.attributes, format);\n\t\treturn prev;\n\t}, {});\n\n\tconst theaterMasterDocs = included.filter(({ type }) => (type === 'theater_masters')).reduce((prev, t) => {\n\t\tprev[t.id] = t.attributes.doc;\n\t\treturn prev;\n\t}, {});\n\n\tconst movies = Object.values(moviesLookup);\n\n\tconst atomIds = accessNested(activePage, 'data.atomIds', {});\n\tconst www2dMovie = movies.find(m => {\n\t\tconst isWebedia = m.provider_id === 'wwm' || m.provider_id === 'webus';\n\t\treturn isWebedia && m.format && m.format.name.toLowerCase() === '2d';\n\t\t// ^ Sometimes, Webedia IDs will vary based on the format\n\t\t// Atom however should be matched with 2d movie IDs only\n\t});\n\tconst www2dMovieId = www2dMovie && (www2dMovie.provider_movie_id.split('|')[0]);\n\tconst mainAtom = atomIds.main || www2dMovieId || undefined;\n\tmovies.forEach((m) => {\n\t\tif (m.atom) return;\n\t\tlet atomId = mainAtom;\n\t\tconst mid = m.provider_id + ':' + m.provider_movie_id;\n\t\tif (atomIds[mid]) {\n\t\t\tatomId = atomIds[mid];\n\t\t}\n\t\tm.atom = atomId;\n\t});\n\n\tconst screeningDates = accessNested(activePage, 'data.screeningDates', {});\n\tconst dFrom = parseDate(screeningDates.from);\n\tconst dTo = parseDate(screeningDates.to);\n\t// TODO: ability to put a list of dates instead of from / to\n\tconst checkScreening = screening => {\n\t\t// if (!screening.movie) return false;\n\t\tif (screening.isPast) return false;\n\t\tif (dFrom && screening.stDate && screening.stDate.date < dFrom) return false;\n\t\tif (dTo && screening.stDate && screening.stDate.date > dTo) return false;\n\t\treturn true;\n\t};\n\tconst theaterScreenings = data.reduce((all, s) => {\n\t\tlet movie = moviesLookup[s.attributes.movie_id];\n\t\tif (!movie) return all;\n\t\tconst screening = new Screening(s.id, s.attributes, movie, appData);\n\t\tlet existing = all[screening.theater_id] || [];\n\t\tlet add = checkScreening(screening);\n\t\t// Do not add dateless screenings if they are not the only screening\n\t\tif (!screening.date && existing.length && existing.some(s => s.movie === screening.movie)) {\n\t\t\tadd = false;\n\t\t}\n\t\t// Only allow 1 timeless screening per date\n\t\tif (!screening.time && existing.some(s => s.date === screening.date && s.movie === screening.movie)) {\n\t\t\tadd = false;\n\t\t}\n\t\tif (add) {\n\t\t\t// Remove any dateless screening\n\t\t\tif (screening.date && existing.length === 1 && !existing[0].date) {\n\t\t\t\texisting.shift();\n\t\t\t}\n\t\t\t// Remove potential timeless screening for the current date\n\t\t\tif (screening.time) {\n\t\t\t\t// Is there a way to optimize that ?\n\t\t\t\tlet noTimeIndex = existing.findIndex(s => !s.time && s.date === screening.date);\n\t\t\t\tif (noTimeIndex !== -1) {\n\t\t\t\t\texisting.splice(noTimeIndex, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Add the screening\n\t\t\tif (!all[screening.theater_id]) {\n\t\t\t\tall[screening.theater_id] = [];\n\t\t\t}\n\t\t\tall[screening.theater_id].push(screening);\n\t\t}\n\t\treturn all;\n\t}, {});\n\n\tconst exhibitorsLookup = included.filter(({ type }) => type === 'exhibitors').reduce((prev, e) => {\n\t\tprev[e.id] = new Exhibitor(e.id, e.attributes);\n\t\treturn prev;\n\t}, {});\n\n\tlet pinned = asList(accessNested(activePage, 'data.pinnedTheaters'));\n\tlet rawTheaters = included.filter(({ type }) => type === 'theaters');\n\tconst theaters = rawTheaters.map(t => new Theater(\n\t\tt.id,\n\t\tt.attributes,\n\t\t{\n\t\t\tpinned: pinned.indexOf(t.id) !== -1,\n\t\t\tscreenings: theaterScreenings[t.id] || [],\n\t\t\texhibitor: exhibitorsLookup[t.attributes.exhibitor_id],\n\t\t\ttheaterMasterDoc: t.attributes.theater_master_id && theaterMasterDocs[t.attributes.theater_master_id],\n\t\t\tclientGeo,\n\t\t\tappData,\n\t\t\ttheaterMasters,\n\t\t\tfirstBatch,\n\t\t\tactivePage\n\t\t}\n\t)).filter(t => t.enabled);\n\n\tconst getUniques = (arr, accessor) => arr.reduce((f, v) => (v = accessor ? accessor(v) : v, f.indexOf(v) === -1 && f.push(v), f), []);\n\tconst finalScreenings = [].concat.apply([], theaters.map(t => t.screenings));\n\tconst finalMovies = getUniques(finalScreenings, s => s.movie).filter(e => e);\n\tconst finalFormats = getUniques(finalMovies, m => m.format);\n\n\treturn {\n\t\tformats:    finalFormats,\n\t\tmovies:     finalMovies,\n\t\tscreenings: finalScreenings,\n\t\texhibitors: Object.values(exhibitorsLookup),\n\t\ttheaters:   theaters\n\t};\n}\n\n\nfunction getCitiesAsync(state) {\n\tconst { appData, client, overrideCountry, activePage } = state;\n\tconst stdataApiRoot = appData.apis.stdata.root;\n\tconst citiesFilters = Store.get().showtimes.citiesFilters; // probably not safe, but we need to get the latest version of the filters\n\tconst targetCountry = overrideCountry || client.geo.countryCode;\n\n\tconst q = {};\n\n\tif (targetCountry !== 'intl') {\n\t\tlet countries = getBoundingRegions(state);\n\t\tif (countries) {\n\t\t\tif (countries.indexOf(targetCountry) === -1) {\n\t\t\t\tcountries.push(targetCountry);\n\t\t\t}\n\t\t\tcountries = countries.filter(r => r.match(/^[a-z]{2}$/));\n\t\t\taddToQuery(q, 'filter[theaters][country]', countries);\n\t\t}\n\t}\n\n\tconst ignoreProviderRegions = accessNested(activePage, 'data.ignoreProviderRegions', {});\n\tconst ignoreCityProviderRegions = accessNested(activePage, 'data.ignoreCityProviderRegions', {});\n\tconst ignore = Object.assign({}, ignoreProviderRegions, ignoreCityProviderRegions);\n\taddToQuery(q, 'filter[ignoreProviderRegions]', Object.keys(ignore).map(provider => {\n\t\tlet list = ignore[provider] || {};\n\t\tlet countries = Object.keys(list).filter(k => list[k]);\n\t\tif (countries.length) {\n\t\t\treturn { provider, countries };\n\t\t}\n\t}).filter(e => e));\n\n\tif (citiesFilters && citiesFilters.pidmod) {\n\t\t// Get the cities specific to a pidmod instead of for all screenings\n\t\taddToQuery(q, 'filter[movies][pidmod]', [citiesFilters.pidmod]);\n\t} else {\n\t\taddTitleFilterToQuery(q, appData);\n\t}\n\n\tif (appData.options && appData.options.citiesUseMovieAggregate) {\n\t\taddToQuery(q, 'useMovieAggregate', 'true');\n\t}\n\n\tconst fetchPath = stdataApiRoot + '/cities' + toQueryString(q);\n\n\treturn fetch(fetchPath, {\n\t\tmethod: 'GET',\n\t\theaders: {\n\t\t\t'Accept': 'application/vnd.api+json',\n\t\t\t'Content-Type': 'application/vnd.api+json'\n\t\t}\n\t}).then(res => res.json());\n}\n\nfunction addTitleFilterToQuery(q, appData) {\n\tlet store = Store.get();\n\tlet pageData = accessNested(store, 'activePage.data') || accessNested(appData || store.appData, 'pages.showtimes.data') || {};\n\tconst overrideMovieIds = asList(pageData.overrideMovieIds);\n\tconst extraMovieIds    = asList(pageData.extraMovieIds);\n\tconst movieMasterIds   = asList(appData.meta.movieMasterIds);\n\tconst titleSlugs       = [appData.meta.title.slug].concat(asList(pageData.extraTitleSlugs));\n\n\tif (overrideMovieIds && overrideMovieIds.length) {\n\t\taddToQuery(q, 'filter[movies][pidmod]', overrideMovieIds);\n\t} else {\n\t\tif (movieMasterIds.length) {\n\t\t\taddToQuery(q, 'filter[movies][mmid]', movieMasterIds);\n\t\t} else {\n\t\t\taddToQuery(q, 'filter[titles][slug]', titleSlugs);\n\t\t}\n\t\tif (extraMovieIds && extraMovieIds.length) {\n\t\t\taddToQuery(q, 'filter[movies][pidmod]', extraMovieIds);\n\t\t}\n\t}\n\n\treturn q;\n}\n\nfunction isInViewport(element, offsets = {}) {\n\tconst rect = element.getBoundingClientRect();\n\tconst html = document.documentElement;\n\n\treturn (\n\t\trect.top >= (offsets.top || 0) &&\n\t\trect.left >= 0 &&\n\t\trect.bottom <= (window.innerHeight || html.clientHeight) &&\n\t\trect.right <= (window.innerWidth || html.clientWidth)\n\t);\n}\n\n// Returns the path of a page\nfunction getPath(page, showtimesStatus) {\n\tlet store = null;\n\tconst getStore = () => store || (store = Store.get());\n\tif (typeof page === 'string') {\n\t\tpage = accessNested(getStore(), ['appData', 'pages', page]);\n\t}\n\tif (!page) return undefined;\n\n\t// if (showtimesStatus === undefined) {\n\t// \tshowtimesStatus = accessNested(getStore(), 'showtimes.status');\n\t// }\n\t// return page['path' + (showtimesStatus ? 'After' : 'Before') + 'Showtimes'] || page.path;\n\treturn page.path;\n}\n\nfunction getPageTitle(activePage, appData) {\n\tappData = appData || Store.get().appData;\n\tconst copy = appData.copy;\n\n\t// Hm ... This doesn't very feel like a very clean thing to do (not localized, etc.)\n\t// const activePageName = activePage.id[0].toUpperCase() + activePage.id.slice(1);\n\tconst activePageName = copy[activePage.$copy] || '';\n\tconst release = parseDate(accessNested(appData, 'meta.dates.release', 0));\n\tconst params = Object.assign({\n\t\tPAGE_NAME: activePageName,\n\t\tRELEASE_DATE: formatDateTime(release, copy.$DATE_FORMAT || 'MMMM d, yyyy', copy.$DATETIME_LOCALE)\n\t}, copy);\n\n\tconst altTitle = '$' + (activePage.id || '').toUpperCase() + '_ALT_TITLE';\n\tconst pageTitle = copy[altTitle] || copy.$DYNAMIC_TITLE;\n\treturn getCopyWithParams(params, pageTitle);\n}\n\n/**\n * Return the current Piwik identifier from the cookies.\n *\n * @return {string} the current piwik id, if found\n */\nconst getPiwikId = () => {\n\tif (!document || !document.cookie) return;\n\tconst cookies = document.cookie.split('; ');\n\tfor (const cookie of cookies) {\n\t\tconst [key, value] = cookie.split('=');\n\t\tif (key.startsWith('_pk_id')) {\n\t\t\treturn value.substr(0, 16);\n\t\t}\n\t}\n};\n\n// ↓ This should be in utils.js tbh\n\n// Gets a copy value, and replaces %$THING% by other copy data\n// Example:\n// copy = {\n// \t'$MSG': 'Hello %$NAME%',\n// \t'$NAME': '%$FIRST_NAME% %$SURNAME%',\n// \t'$FIRST_NAME': 'John',\n// \t'$SURNAME': 'Doe'\n// };\n// getCopyWithParams(copy, '$MSG'); // Hello John Doe\n// getCopyWithParams(copy, 'Bye %$NAME%'); // Bye John Doe (if attribute is not a copy element, it uses that value directly)\n// getCopyWithParams(copy, '%$FIRST_NAME% is %$MOOD%'); // John is $MOOD (if a variable is not defined, outputs its name)\n// getCopyWithParams(copy, '100% with %$SURNAME%'); // 100% with Doe (a % sign alone still works)\n// getCopyWithParams(copy, 'a \\\\%protected% part'); // a %protected% part (prepend with a \\ to prevent parsing ; warning : needs to be doubled in string literals because of default JS escaping)\nfunction _getCopyWithParams(copy, attribute, _n) {\n\t// Prevent infinite recursion (e.g. $A = %$B%, $B = %$A%)\n\tif (++_n > 10) return attribute;\n\t// let content = copy.hasOwnProperty(attribute) ? copy[attribute] : attribute;\n\tconst content = accessNested(copy, attribute, attribute) + ''; // Allow using %subObject.$VALUE%\n\treturn content.replace(/(\\\\)?%([^% ]+)%/g, (m, s, g) => s ? '%' + g + '%' : _getCopyWithParams(copy, g, _n));\n}\nfunction getCopyWithParams(copy, attribute) { return _getCopyWithParams(copy, attribute, 0); }\n\n\n// Returns a tt image name based on some conditional data (used in home)\nfunction getSizeBasedTT(data, client, baseName, alternateName) {\n\tbaseName = baseName || 'tt.png';\n\talternateName = alternateName || 'tt2.png';\n\tif (!data) {\n\t\treturn baseName;\n\t}\n\n\tclient = client || Store.get().client;\n\tif (typeof data === 'string') {\n\t\tdata = { 1: data };\n\t}\n\n\tlet values = Object.keys(data).map(k => {\n\t\tlet val = data[k];\n\t\tif (val && typeof val === 'object' && !val.name) {\n\t\t\tval = Object.assign({ name: k + '.png' }, val);\n\t\t}\n\t\treturn val;\n\t}).filter(e => e);\n\n\tlet groups = [];\n\tif (values.every(val => typeof val === 'object')) {\n\t\tgroups = values.sort((a, b) => {\n\t\t\tif (a.order && b.order) return a.order - b.order;\n\t\t\tif (a.order) return -1;\n\t\t\tif (b.order) return 1;\n\t\t\treturn values.indexOf(a) - values.indexOf(b);\n\t\t});\n\t} else {\n\t\tgroups = [data];\n\t}\n\n\tlet dSize = client.deviceSize;\n\tlet device = client.device;\n\tlet orientation = client.orientation;\n\tlet result = groups.find(group => {\n\t\tlet { name, order, ...conditions } = group;\n\t\tconditions = asList(conditions);\n\t\treturn !conditions.length || conditions.some(cond => {\n\t\t\tif (!cond) return false;\n\t\t\tlet ok = true;\n\t\t\tif (cond[0] === \"!\") {\n\t\t\t\tok = false;\n\t\t\t\tcond = cond.slice(1);\n\t\t\t}\n\n\t\t\tlet [cDevice, cOrientation] = cond.split(\":\");\n\t\t\tif (cDevice && cDevice !== \"*\") {\n\t\t\t\tlet invalid = false;\n\t\t\t\tif (cDevice.startsWith(\"device=\")) {\n\t\t\t\t\tinvalid = cDevice.slice(7) !== device;\n\t\t\t\t} else if (cDevice.startsWith(\"size=\")) {\n\t\t\t\t\tinvalid = cDevice.slice(5) !== dSize;\n\t\t\t\t} else {\n\t\t\t\t\tinvalid = cDevice !== dSize && cDevice !== device;\n\t\t\t\t}\n\t\t\t\tif (invalid) return !ok;\n\t\t\t}\n\t\t\tif (cOrientation && cOrientation !== \"*\" && cOrientation !== orientation) return !ok;\n\t\t\treturn ok;\n\t\t});\n\t});\n\n\treturn result ? result.name || alternateName : baseName;\n}\n\n// Should put that in the appData\nconst staticSigningService = 'https://static-maps.s-prod.pow.io';\n// const staticSigningService = 'https://static-maps.s-test.pow.io';\n// const staticSigningService = 'http://localhost:6661';\n\n// Request a signed static maps url and puts it in the store when done (also returns a Promise with the result)\nfunction requestSignedStaticMapUrl(url) {\n\tlet store = Store.get();\n\tlet urls = store.showtimes.staticMaps;\n\tif (urls[url]) {\n\t\treturn Promise.resolve(urls[url]);\n\t}\n\turls.set(url, { loading: true });\n\n\tlet data = {\n\t\turl: url,\n\t\tstudio: accessNested(store, 'appData.meta.studio.slug')\n\t};\n\n\ttrack({ a: 'request-static-map' });\n\t// Dummy version\n\t// return new Promise(resolve => setTimeout(() => resolve({ signed: url }), 5000)).then(result => {\n\treturn fetch(staticSigningService + '/sign', {\n\t\tmethod: 'POST',\n\t\theaders: {\n\t\t\t'Accept': 'application/json',\n\t\t\t'Content-Type': 'application/json'\n\t\t},\n\t\tbody: JSON.stringify(data)\n\t}).then(res => res.json()).then(result => {\n\t\tlet urls = Store.get().showtimes.staticMaps;\n\t\turls.set(url, result);\n\t\treturn result;\n\t}).catch(err => {\n\t\tconsole.log('Static map signature error', err);\n\t\tStore.get().showtimes.staticMaps.set('error', true);\n\t\t// Store.emit(actions.LOAD_DYNAMIC_MAP);\n\t});\n}\n\nconst trackNearestShowtimeTicketClick = (() => {\n\tlet tracked = false;\n\n\treturn (theater) => {\n\t\tif (tracked) return; // Track only once per session\n\t\ttracked = true;\n\n\t\tconst params = queryString.parse(window.location.search.substr(1));\n\t\tif (params.r === 'nearest-cinema') {\n\t\t\tlet eventType = 'no_result';\n\t\t\tlet eventValue = params.tmid || params.tid;\n\t\t\tif (params.tmid || params.tid) {\n\t\t\t\tif ((params.tmid && params.tmid === theater.masterId) || (params.tid && params.tid === theater.id)) {\n\t\t\t\t\teventType = 'right_guess';\n\t\t\t\t} else {\n\t\t\t\t\teventValue += ' => ' + (theater.masterId || theater.id);\n\t\t\t\t\teventType = 'wrong_guess';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttrack({ a: 'ticket_click_nearest_showtime_' + eventType, l: eventValue, useCustomPageTrack: true });\n\t\t}\n\t};\n})();\n\nexport {\n\tgetGeoFromIPAsync,\n\tgetGeoScreeningsAsync,\n\trawSearchLocation,\n\tsearchLocation,\n\tgetTheatersScreeningsAsync,\n\tprocessScreeningsApi,\n\tgetCitiesAsync,\n\tbuildClientStoreData,\n\tgetSize,\n\tgetDims,\n\tgetDevice,\n\tupdateQueryStringItem,\n\tcalculateShowtimesStatus,\n\tgetAC_ID,\n\tisInViewport,\n\tgetQueryParameterByName,\n\tfindParent,\n\tgetPath,\n\tgetPageTitle,\n\tgetPiwikId,\n\tgetCopyWithParams,\n\tgetSizeBasedTT,\n\tgetIsIOS,\n\tgetIsIE,\n\tgetIsChrome,\n\trequestSignedStaticMapUrl,\n\ttrackNearestShowtimeTicketClick\n};\n","// TODO: use Object.assign ?\nconst objectAssign = require('object-assign');\n\n// Live testing http://jsfiddle.net/es9qy5v0/2/\n//   (see documentation/dateFormat.md for more info)\n\n// Based on .Net DateTimeFormat.Format\n// See https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx for list of format specifiers\n// MODIFICATIONS :\n//  - unsupported: g (Era), K (time zone info)\n//  - f and F are only precise up to 3 (= milliseconds)\n//  - t/tt is lowercase and supports T/TT for uppercase alternative\n//  - added oo for ordinal version of the date (e.g. 12th)\n//  - adding more M or d changes the case:\n//     - 1 = number            1\n//     - 2 = padded number     01\n//     - 3 = standard short    Jan\n//     - 4 = standard long     January\n//     - 5 = uppercase short   JAN\n//     - 6 = uppercase long    JANUARY\n//     - 7 = lowercase short   jan\n//     - 8 = lowercase long    january\n// Be careful to use \\\\ instead of \\ when in a json/js string literal to prevent default backslash behaviour\n// (Base implementation used as reference :\n//   'FormatCustomized' @ http://referencesource.microsoft.com/#mscorlib/system/globalization/datetimeformat.cs,429)\nmodule.exports = function formatDateTime(date, format, copy) {\n\tif (!date || !format) return '';\n\tif (!(date instanceof Date)) {\n\t\tdate = new Date(date);\n\t}\n\tif (copy) {\n\t\tcopy = objectAssign({}, localeDefaults, copy);\n\t} else {\n\t\tcopy = localeDefaults;\n\t}\n\tlet result = '';\n\tlet i, l, ch, tokenLen;\n\tfor (i = 0, l = format.length; i < l; i += tokenLen) {\n\t\ttokenLen = 1;\n\t\tch = format[i];\n\t\tif (baseFunctions.hasOwnProperty(ch)) {\n\t\t\ttokenLen = parseRepeatPattern(format, i, ch, l);\n\t\t\tresult += baseFunctions[ch](date, tokenLen, copy);\n\t\t} else {\n\t\t\tswitch(ch) {\n\t\t\t\tcase ':':\n\t\t\t\t\tresult += copy.$TIME_SEPARATOR;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/':\n\t\t\t\t\tresult += copy.$DATE_SEPARATOR;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\'':\n\t\t\t\tcase '\"':\n\t\t\t\t\ttokenLen = parseQuoted(format, i); // Length including quotes\n\t\t\t\t\t// Add the string without quotes\n\t\t\t\t\tresult += format.substr(i + 1, tokenLen - 2);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\\\':\n\t\t\t\t\ttokenLen = 2;\n\t\t\t\t\tif (i < l - 1) {\n\t\t\t\t\t\tresult += format[i + 1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If \\ is the last character of the string, add it as a literal\n\t\t\t\t\t\tresult += '\\\\';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tresult += ch;\n\t\t\t}\n\t\t}\n\t}\n\treturn result;\n};\n\n// Default that should be used if no copy is specified\nlet localeDefaults = {\n\t\"$AM\": \"am\",\n\t\"$PM\": \"pm\",\n\t\"$TIME_SEPARATOR\": \":\",\n\t\"$DATE_SEPARATOR\": \"/\",\n\t\"$DAYS_SHORT\": [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n\t\"$DAYS_FULL\": [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n\t\"$MONTHS_SHORT\": [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n\t\"$MONTHS_FULL\": [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n\t\"$ORD\": [\n\t\t//0     1     2     3     4     5     6     7     8     9\n\t\t\"th\", \"st\", \"nd\", \"rd\", \"th\", \"th\", \"th\", \"th\", \"th\", \"th\",\n\t\t//10   11    12    13    14    15    16    17    18    19\n\t\t\"th\", \"th\", \"th\", \"th\", \"th\", \"th\", \"th\", \"th\", \"th\", \"th\",\n\t\t//20   21    22    23    24    25    26    27    28    29\n\t\t\"th\", \"st\", \"nd\", \"rd\", \"th\", \"th\", \"th\", \"th\", \"th\", \"th\",\n\t\t//30   31\n\t\t\"th\", \"st\"\n\t]\n};\n\nlet transforms = [\n\tstr => str,\n\tstr => (str || '').toUpperCase(),\n\tstr => (str || '').toLowerCase()\n];\n// Specifiers implementations\nlet baseFunctions = {\n\th: (d, l) => pad((d.getHours() % 12) || 12, l),\n\tH: (d, l) => pad(d.getHours(), l),\n\tm: (d, l) => pad(d.getMinutes(), l),\n\ts: (d, l) => pad(d.getSeconds(), l),\n\tf: (d, l, copy, noZeroes) => {\n\t\tlet v = d.getMilliseconds();\n\t\tlet vl = l;\n\t\twhile (vl++ < 3) v = ~~(v / 10);\n\t\twhile (vl-- > 4) v *= 10;\n\t\tif (noZeroes && !v) return '';\n\t\treturn pad(v, l);\n\t},\n\tF: (d, l, copy) => baseFunctions.f(d, l, copy, true),\n\tt: (d, l, copy, isUppercase) => {\n\t\tlet designator = d.getHours() < 12 ? copy.$AM : copy.$PM;\n\t\tdesignator = isUppercase ? designator.toUpperCase() : designator.toLowerCase();\n\t\tif (l == 1) designator = designator.slice(0, 1);\n\t\treturn designator;\n\t},\n\tT: (d, l, copy) => baseFunctions.t(d, l, copy, true),\n\td: (d, l, copy) => {\n\t\tif (l <= 2) return pad(d.getDate(), l);\n\t\tl -= 3;\n\t\tlet mode = l % 2, trf = transforms[(l >> 1) % transforms.length];\n\t\treturn trf(copy[mode ? '$DAYS_FULL' : '$DAYS_SHORT'][d.getDay()]);\n\t},\n\to: (d, l, copy) => {\n\t\tlet day = d.getDate();\n\t\treturn pad(day, l) + copy.$ORD[day];\n\t},\n\tM: (d, l, copy) => {\n\t\tif (l <= 2) return pad(d.getMonth() + 1, l);\n\t\tl -= 3;\n\t\tlet mode = l % 2, trf = transforms[(l >> 1) % transforms.length];\n\t\treturn trf(copy[mode ? '$MONTHS_FULL' : '$MONTHS_SHORT'][d.getMonth()]);\n\t},\n\ty: (d, l) => {\n\t\tlet v = d.getFullYear();\n\t\tif (l <= 2) v %= 100;\n\t\treturn pad(v, l);\n\t},\n\tz: (d, l, copy) => {\n\t\tlet v = d.getTimezoneOffset();\n\t\tlet ret = v < 0 ? '-' : '+';\n\t\tv = Math.abs(v);\n\t\tlet hours = ~~(v / 60);\n\t\tret += pad(hours, l <= 2 ? l : 2);\n\t\t// Add minutes\n\t\tif (l > 2) ret += copy.$TIME_SEPARATOR + pad(v - 60 * hours, 2);\n\t\treturn ret;\n\t}\n};\n\n// Detect how many of the same character are in a row\nfunction parseRepeatPattern(format, pos, ch, l) {\n\tlet i = pos + 1;\n\tif (l == undefined) l = format.length;\n\tfor (; i < l && format[i] === ch; i++);\n\treturn i - pos;\n}\n// Detect a quoted string length (starting at a specified position)\nfunction parseQuoted(format, pos) {\n\tlet quote = format[pos];\n\tlet next = pos;\n\tdo {\n\t\tnext = format.indexOf(quote, next + 1);\n\t} while(next !== -1 && format[next - 1] === '\\\\');\n\tif (next === -1) next = format.length;\n\treturn next - pos + 1;\n}\n\n// Cast a positive int to string making sure it is at least the specified length\n// If the string representation of the number is less than desired, 0s are added in front of it\nfunction pad(n, l) {\n\tlet v = n + '', vl = v.length;\n\twhile (vl++ < l) v = '0' + v;\n\treturn v;\n}\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n    formats: formats,\n    parse: parse,\n    stringify: stringify\n};\n","// extracted by extract-css-chunks-webpack-plugin\nmodule.exports = {\"svgBase\":\"svgIcons__svgBase__qujJH\",\"wrapper\":\"svgIcons__wrapper__xD2Gz\",\"svgIcon\":\"svgIcons__svgIcon__1IK41\",\"svgUserIcon\":\"svgIcons__svgUserIcon__YIrc7 svgIcons__svgIcon__1IK41\",\"svgShareIcon\":\"svgIcons__svgShareIcon__3NAaX svgIcons__svgIcon__1IK41\",\"compass\":\"svgIcons__compass__mWUSD\"};","// extracted by extract-css-chunks-webpack-plugin\nmodule.exports = {\"fadeIn\":\"modal__fadeIn__2B-n8\",\"container\":\"modal__container__1MlHy\",\"background\":\"modal__background__1PLJJ\",\"modal\":\"modal__modal__2kiFZ\",\"themed\":\"modal__themed__2d3kI\",\"title\":\"modal__title__prLoN\",\"content\":\"modal__content__3zVjS\",\"simpleContent\":\"modal__simpleContent__1fvjd\",\"regionModal\":\"modal__regionModal__1tLLl\"};","// extracted by extract-css-chunks-webpack-plugin\nmodule.exports = {\"scrollLocked\":\"error404App__scrollLocked__3_s1r\",\"wrapper\":\"error404App__wrapper__1P-wm\",\"container404\":\"error404App__container404__32tos\",\"errorText\":\"error404App__errorText__3f7iq\",\"errorTextUnderline\":\"error404App__errorTextUnderline__26jCg\",\"errorMainText\":\"error404App__errorMainText__3YFNv\"};","// extracted by extract-css-chunks-webpack-plugin\nmodule.exports = {\"container\":\"cookiesModal__container__1WKgP\",\"title\":\"cookiesModal__title__2wzdo\",\"text\":\"cookiesModal__text__1Lw73\",\"buttons\":\"cookiesModal__buttons__1Eh_o\",\"yes\":\"cookiesModal__yes__3n3Ql\",\"no\":\"cookiesModal__no__3_AJg\"};","import isShallowEqual from 'shallow-equals';\n\n/**\n * Tells if a component should update given it's next props\n * and state.\n *\n * @param object nextProps Next props.\n * @param object nextState Next state.\n */\nfunction shouldComponentUpdate(nextProps, nextState) {\n\treturn !isShallowEqual(nextProps, this.props, isSameProp) || !isShallowEqual(nextState, this.state);\n}\n\n/**\n * Makes the given component \"pure\".\n *\n * @param object component Component.\n */\nfunction pureRenderDecorator(component) {\n\tcomponent.prototype.shouldComponentUpdate = shouldComponentUpdate;\n}\n\n\n\nfunction isSameProp(a, b){\n\treturn a === b || (Array.isArray(a) && Array.isArray(b) && !a.length && !b.length);\n}\n\n\n\nexport default pureRenderDecorator;\n","// extracted by extract-css-chunks-webpack-plugin\nmodule.exports = {\"link\":\"link__link__1xGDg\",\"top\":\"link__top__2Brbt\",\"iconLink\":\"link__iconLink__2vMSB link__link__1xGDg\",\"iconLinkSvg\":\"link__iconLinkSvg__3BJsH\",\"iconLinkUrl\":\"link__iconLinkUrl__3vuXN\"};","export default function route(url, pageId) {\n\tif (typeof history !== 'undefined') {\n\n\t\t// console.log('push state', pageId);\n\t\t// Push the new url to the pushState\n\t\t// the history listen even in the update file will take care of the rest\n\t\t// debugger;\n\t\thistory.pushState({ pageId }, '', url);\n\t}\n}\n","module.exports = {\n\tyandex: 'yandex',\n\tkinohod: 'kinohod',\n\trambler: 'rambler'\n};\n","// extracted by extract-css-chunks-webpack-plugin\nmodule.exports = {\"container\":\"exitModal__container__15Go4\",\"title\":\"exitModal__title__36jsu\",\"button\":\"exitModal__button__2Zb9j\"};","'use strict';\n\n//#build\nvar global = typeof global !== 'undefined' ?\n\tglobal :\n\ttypeof self !== 'undefined' ?\n\t\tself :\n\t\ttypeof window !== 'undefined' ?\n\t\t\twindow :\n\t\t\t{};\n\nvar Utils = {\n\textend: function( ob, props ){\n\t\tfor( var p in props ){\n\t\t\tob[p] = props[p];\n\t\t}\n\t\treturn ob;\n\t},\n\n\tcreateNonEnumerable: function( obj, proto ){\n\t\tvar ne = {};\n\t\tfor( var key in obj )\n\t\t\tne[key] = {value: obj[key] };\n\t\treturn Object.create( proto || {}, ne );\n\t},\n\n\terror: function( message ){\n\t\tvar err = new Error( message );\n\t\tif( console )\n\t\t\treturn console.error( err );\n\t\telse\n\t\t\tthrow err;\n\t},\n\n\teach: function( o, clbk ){\n\t\tvar i,l,keys;\n\t\tif( o && o.constructor === Array ){\n\t\t\tfor (i = 0, l = o.length; i < l; i++)\n\t\t\t\tclbk( o[i], i );\n\t\t}\n\t\telse {\n\t\t\tkeys = Object.keys( o );\n\t\t\tfor( i = 0, l = keys.length; i < l; i++ )\n\t\t\t\tclbk( o[ keys[i] ], keys[i] );\n\t\t}\n\t},\n\n\taddNE: function( node, attrs ){\n\t\tfor( var key in attrs ){\n\t\t\tObject.defineProperty( node, key, {\n\t\t\t\tenumerable: false,\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: attrs[ key ]\n\t\t\t});\n\t\t}\n\t},\n\n\t/**\n\t * Creates non-enumerable property descriptors, to be used by Object.create.\n\t * @param  {Object} attrs Properties to create descriptors\n\t * @return {Object}       A hash with the descriptors.\n\t */\n\tcreateNE: function( attrs ){\n\t\tvar ne = {};\n\n\t\tfor( var key in attrs ){\n\t\t\tne[ key ] = {\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: attrs[ key ]\n\t\t\t}\n\t\t}\n\n\t\treturn ne;\n\t},\n\n\t// nextTick - by stagas / public domain\n\tnextTick: (function () {\n    var queue = [],\n\t\tdirty = false,\n\t\tfn,\n\t\thasPostMessage = !!global.postMessage && (typeof Window !== 'undefined') && (global instanceof Window),\n\t\tmessageName = 'nexttick',\n\t\ttrigger = (function () {\n\t\t\treturn hasPostMessage\n\t\t\t\t? function trigger () {\n\t\t\t\tglobal.postMessage(messageName, '*');\n\t\t\t}\n\t\t\t: function trigger () {\n\t\t\t\tsetTimeout(function () { processQueue() }, 0);\n\t\t\t};\n\t\t}()),\n\t\tprocessQueue = (function () {\n\t\t\treturn hasPostMessage\n\t\t\t\t? function processQueue (event) {\n\t\t\t\t\tif (event.source === global && event.data === messageName) {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tflushQueue();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t: flushQueue;\n    \t})()\n    ;\n\n    function flushQueue () {\n\t\t\t\tdirty = false;\n        while (fn = queue.shift()) {\n            fn();\n        }\n    }\n\n    function nextTick (fn) {\n        queue.push(fn);\n        if (dirty) return;\n        dirty = true;\n        trigger();\n    }\n\n    if (hasPostMessage) global.addEventListener('message', processQueue, true);\n\n    nextTick.removeListener = function () {\n        global.removeEventListener('message', processQueue, true);\n    }\n\n    return nextTick;\n  })(),\n\n  findPivot: function( node ){\n  \t\tif( !node || !node.__ )\n  \t\t\treturn;\n\n  \t\tif( node.__.pivot )\n  \t\t\treturn node;\n\n  \t\tvar found = 0,\n  \t\t\tparents = node.__.parents,\n  \t\t\ti = 0,\n  \t\t\tparent\n  \t\t;\n\n  \t\t// Look up for the pivot in the parents\n  \t\twhile( !found && i < parents.length ){\n  \t\t\tparent = parents[i];\n  \t\t\tif( parent.__.pivot )\n  \t\t\t\tfound = parent;\n  \t\t\ti++;\n  \t\t}\n\n  \t\tif( found ){\n  \t\t\treturn found;\n  \t\t}\n\n  \t\t// If not found, try with the parent's parents\n  \t\ti=0;\n  \t\twhile( !found && i < parents.length ){\n\t  \t\tfound = this.findPivot( parents[i] );\n\t  \t\ti++;\n\t  \t}\n\n  \t\treturn found;\n  },\n\n\tisLeaf: function( node, freezeInstances ){\n\t\tvar cons;\n\t\treturn !node || !(cons = node.constructor) || (freezeInstances ?\n\t\t\t(cons === String || cons === Number || cons === Boolean) :\n\t\t\t(cons !== Object && cons !== Array)\n\t\t);\n\t},\n\n\twarn: function(){\n\t\tvar args;\n\t\tif( typeof process === 'undefined' || process.env.NODE_ENV !== 'production' ){\n\t\t\tif( !arguments[0] && typeof console !== 'undefined' ){\n\t\t\t\targs = Array.prototype.slice.call( arguments, 1 );\n\t\t\t\targs[0] = 'Freezer.js WARNING: ' + args[0];\n\t\t\t\tconsole.warn.apply( console, args );\n\t\t\t}\n\t\t}\n\t}\n};\n\n//#build\n\n\nmodule.exports = Utils;\n","export default class Geo {\n\n\tstatic MILES_FACTOR = 0.621371192\n\tstatic kmToMiles(val) {\n\t\treturn val * Geo.MILES_FACTOR;\n\t}\n\tstatic milesToKm(val) {\n\t\treturn val / Geo.MILES_FACTOR;\n\t}\n\n\tsetGoogleLatLng() {\n\t\tif (typeof window !== 'undefined' && window.google && window.google.maps) {\n\t\t\tthis.googleLatLng = new window.google.maps.LatLng(this.lat, this.lon);\n\t\t}\n\n\t\treturn this.googleLatLng;\n\t}\n\n\ttoGoogleLatLng() {\n\t\treturn this.googleLatLng || this.setGoogleLatLng();\n\t}\n\n\tconstructor({ lat, lon, countryCode, city, src }) {\n\t\tthis.lat         = lat;\n\t\tthis.lon         = lon;\n\t\tthis.city        = city;\n\t\tthis.countryCode = countryCode;\n\t\tthis.src         = src;\n\n\t\tthis.setGoogleLatLng();\n\t}\n\n\tupdate({ lat, lon }) {\n\t\tthis.lat = lat;\n\t\tthis.lon = lon;\n\n\t\tthis.setGoogleLatLng();\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify({\n\t\t\tlat:         this.lat,\n\t\t\tlon:         this.lon,\n\t\t\tcity:        this.city,\n\t\t\tcountryCode: this.countryCode\n\t\t});\n\t}\n\n\tequals(otherGeo) {\n\t\tif (!(otherGeo instanceof Geo)) return undefined;\n\t\treturn otherGeo.lat === this.lat && otherGeo.lon === this.lon;\n\t}\n\n\tquickDistIndicator(otherGeo) {\n\t\tlet dl = otherGeo.lat - this.lat;\n\t\tlet dL = otherGeo.lon - this.lon;\n\n\t\treturn dl * dl + dL * dL;\n\t}\n\n\tdistanceFrom(otherGeo, unit, precision) {\n\t\tif (!(otherGeo instanceof Geo)) return undefined;\n\n\t\tlet R = 6371; // km\n\t\tlet deg2rad = Math.PI / 180;\n\t\tlet φ1 = otherGeo.lat * deg2rad;\n\t\tlet φ2 = this.lat * deg2rad;\n\t\t// let Δφ = (this.lat - otherGeo.lat) * deg2rad;\n\t\tlet Δφ = φ2 - φ1;\n\t\tlet Δλ = (this.lon - otherGeo.lon) * deg2rad;\n\n\t\tlet sinφ = Math.sin(Δφ / 2);\n\t\tlet sinλ = Math.sin(Δλ / 2);\n\t\tlet a = sinφ * sinφ + Math.cos(φ1) * Math.cos(φ2) * sinλ * sinλ;\n\t\tlet c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n\t\tlet value = R * c;\n\t\tif (unit === 'mi') value = Geo.kmToMiles(value);\n\n\t\tif (precision != undefined) {\n\t\t\tlet roundTo = Math.pow(10, ~~precision);\n\t\t\tvalue = Math.round(value * roundTo) / roundTo;\n\t\t\t// .toFixed ?\n\t\t}\n\n\t\treturn value;\n\t}\n\n}\n","const cleanCategoryName = s => typeof s === 'string' && s.trim().length\n\t\t? s.trim().toUpperCase()\n\t\t: undefined;\n\nmodule.exports = cleanCategoryName;\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar hexTable = (function () {\n    var array = [];\n    for (var i = 0; i < 256; ++i) {\n        array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n    }\n\n    return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n    while (queue.length > 1) {\n        var item = queue.pop();\n        var obj = item.obj[item.prop];\n\n        if (isArray(obj)) {\n            var compacted = [];\n\n            for (var j = 0; j < obj.length; ++j) {\n                if (typeof obj[j] !== 'undefined') {\n                    compacted.push(obj[j]);\n                }\n            }\n\n            item.obj[item.prop] = compacted;\n        }\n    }\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n    var obj = options && options.plainObjects ? Object.create(null) : {};\n    for (var i = 0; i < source.length; ++i) {\n        if (typeof source[i] !== 'undefined') {\n            obj[i] = source[i];\n        }\n    }\n\n    return obj;\n};\n\nvar merge = function merge(target, source, options) {\n    if (!source) {\n        return target;\n    }\n\n    if (typeof source !== 'object') {\n        if (isArray(target)) {\n            target.push(source);\n        } else if (target && typeof target === 'object') {\n            if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {\n                target[source] = true;\n            }\n        } else {\n            return [target, source];\n        }\n\n        return target;\n    }\n\n    if (!target || typeof target !== 'object') {\n        return [target].concat(source);\n    }\n\n    var mergeTarget = target;\n    if (isArray(target) && !isArray(source)) {\n        mergeTarget = arrayToObject(target, options);\n    }\n\n    if (isArray(target) && isArray(source)) {\n        source.forEach(function (item, i) {\n            if (has.call(target, i)) {\n                var targetItem = target[i];\n                if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n                    target[i] = merge(targetItem, item, options);\n                } else {\n                    target.push(item);\n                }\n            } else {\n                target[i] = item;\n            }\n        });\n        return target;\n    }\n\n    return Object.keys(source).reduce(function (acc, key) {\n        var value = source[key];\n\n        if (has.call(acc, key)) {\n            acc[key] = merge(acc[key], value, options);\n        } else {\n            acc[key] = value;\n        }\n        return acc;\n    }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n    return Object.keys(source).reduce(function (acc, key) {\n        acc[key] = source[key];\n        return acc;\n    }, target);\n};\n\nvar decode = function (str, decoder, charset) {\n    var strWithoutPlus = str.replace(/\\+/g, ' ');\n    if (charset === 'iso-8859-1') {\n        // unescape never throws, no try...catch needed:\n        return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n    }\n    // utf-8\n    try {\n        return decodeURIComponent(strWithoutPlus);\n    } catch (e) {\n        return strWithoutPlus;\n    }\n};\n\nvar encode = function encode(str, defaultEncoder, charset) {\n    // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n    // It has been adapted here for stricter adherence to RFC 3986\n    if (str.length === 0) {\n        return str;\n    }\n\n    var string = str;\n    if (typeof str === 'symbol') {\n        string = Symbol.prototype.toString.call(str);\n    } else if (typeof str !== 'string') {\n        string = String(str);\n    }\n\n    if (charset === 'iso-8859-1') {\n        return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n            return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n        });\n    }\n\n    var out = '';\n    for (var i = 0; i < string.length; ++i) {\n        var c = string.charCodeAt(i);\n\n        if (\n            c === 0x2D // -\n            || c === 0x2E // .\n            || c === 0x5F // _\n            || c === 0x7E // ~\n            || (c >= 0x30 && c <= 0x39) // 0-9\n            || (c >= 0x41 && c <= 0x5A) // a-z\n            || (c >= 0x61 && c <= 0x7A) // A-Z\n        ) {\n            out += string.charAt(i);\n            continue;\n        }\n\n        if (c < 0x80) {\n            out = out + hexTable[c];\n            continue;\n        }\n\n        if (c < 0x800) {\n            out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);\n            continue;\n        }\n\n        if (c < 0xD800 || c >= 0xE000) {\n            out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);\n            continue;\n        }\n\n        i += 1;\n        c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));\n        out += hexTable[0xF0 | (c >> 18)]\n            + hexTable[0x80 | ((c >> 12) & 0x3F)]\n            + hexTable[0x80 | ((c >> 6) & 0x3F)]\n            + hexTable[0x80 | (c & 0x3F)];\n    }\n\n    return out;\n};\n\nvar compact = function compact(value) {\n    var queue = [{ obj: { o: value }, prop: 'o' }];\n    var refs = [];\n\n    for (var i = 0; i < queue.length; ++i) {\n        var item = queue[i];\n        var obj = item.obj[item.prop];\n\n        var keys = Object.keys(obj);\n        for (var j = 0; j < keys.length; ++j) {\n            var key = keys[j];\n            var val = obj[key];\n            if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n                queue.push({ obj: obj, prop: key });\n                refs.push(val);\n            }\n        }\n    }\n\n    compactQueue(queue);\n\n    return value;\n};\n\nvar isRegExp = function isRegExp(obj) {\n    return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n    if (!obj || typeof obj !== 'object') {\n        return false;\n    }\n\n    return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nvar combine = function combine(a, b) {\n    return [].concat(a, b);\n};\n\nmodule.exports = {\n    arrayToObject: arrayToObject,\n    assign: assign,\n    combine: combine,\n    compact: compact,\n    decode: decode,\n    encode: encode,\n    isBuffer: isBuffer,\n    isRegExp: isRegExp,\n    merge: merge\n};\n","module.exports = shallow\n\nfunction shallow(a, b, compare) {\n  var aIsArray = Array.isArray(a)\n  var bIsArray = Array.isArray(b)\n\n  if (aIsArray !== bIsArray) return false\n\n  var aTypeof = typeof a\n  var bTypeof = typeof b\n\n  if (aTypeof !== bTypeof) return false\n  if (flat(aTypeof)) return compare\n    ? compare(a, b)\n    : a === b\n\n  return aIsArray\n    ? shallowArray(a, b, compare)\n    : shallowObject(a, b, compare)\n}\n\nfunction shallowArray(a, b, compare) {\n  var l = a.length\n  if (l !== b.length) return false\n\n  if (compare) {\n    for (var i = 0; i < l; i++)\n      if (!compare(a[i], b[i])) return false\n  } else {\n    for (var i = 0; i < l; i++) {\n      if (a[i] !== b[i]) return false\n    }\n  }\n\n  return true\n}\n\nfunction shallowObject(a, b, compare) {\n  var ka = 0\n  var kb = 0\n\n  if (compare) {\n    for (var key in a) {\n      if (\n        a.hasOwnProperty(key) &&\n        !compare(a[key], b[key])\n      ) return false\n\n      ka++\n    }\n  } else {\n    for (var key in a) {\n      if (\n        a.hasOwnProperty(key) &&\n        a[key] !== b[key]\n      ) return false\n\n      ka++\n    }\n  }\n\n  for (var key in b) {\n    if (b.hasOwnProperty(key)) kb++\n  }\n\n  return ka === kb\n}\n\nfunction flat(type) {\n  return (\n    type !== 'function' &&\n    type !== 'object'\n  )\n}\n","import Store from 'store/store';\nimport { accessNested } from 'utils/utils';\n\n// \"yyyy-MM-dd\" => timestamp\nfunction getDateTimestamp(str) {\n\tif (!str) return undefined;\n\tlet match = str.match(/^(\\d{4})-(\\d{2})-(\\d{2})$/);\n\tif (!match) return undefined;\n\treturn +new Date(+match[1], match[2] - 1, +match[3]);\n}\n// \"yyyy-MM-dd to yyyy-MM-dd\" => [timestampFrom, timestampTo]\nfunction getDateRange(str) {\n\tlet match = str.match(/^((?:!|not)\\s*)?(\\S+)(?:\\s*(?:to|->)\\s*(\\S+))?$/i);\n\tif (!match) return undefined;\n\tlet from = getDateTimestamp(match[2]);\n\tlet to = match[3] ? getDateTimestamp(match[3]) : from;\n\tif (!from || !to) return undefined;\n\treturn [from, to, !!match[1]];\n}\nfunction inRange(value, range) {\n\treturn range && (value >= range[0] && value <= range[1]) === !range[2];\n}\n\nfunction pad2(n) {\n\tif (!+n) n = 0;\n\treturn ('0' + n).slice(-2);\n}\nfunction cleanTime(time) {\n\tif (!time || typeof time !== 'string') return null;\n\tlet parts = time.match(/^(\\d{1,2})(?::(\\d{1,2})(?::(\\d{1,2}))?)?$/);\n\tif (!parts) return null;\n\treturn pad2(parts[1]) + ':' + pad2(parts[2]) + ':' + pad2(parts[3]);\n}\nfunction getTheaterId(identifier, included) {\n\tif (!identifier || typeof identifier !== 'string') return null;\n\tlet parts = identifier.split(':');\n\tif (parts.length < 2) {\n\t\treturn identifier;\n\t}\n\tlet pid = parts.shift();\n\tlet ptid = parts.join(':');\n\tlet match = included && included.find(inc => inc.type === 'theaters' && inc.attributes.provider_id === pid && inc.attributes.provider_theater_id === ptid);\n\treturn match && match.id;\n}\n\nlet caches = {};\nfunction getIncluded(included, type, id) {\n\tif (!included || !type || !id) return;\n\tif (!caches[type]) {\n\t\tcaches[type] = {};\n\t}\n\tif (caches[type][id]) {\n\t\treturn caches[type][id];\n\t}\n\treturn caches[type][id] = included.find(inc => inc.type === type && inc.id === id);\n}\n\nlet formatCache = {};\nlet movieCache = {};\nfunction editFormat(included, screening, format) {\n\tif (!included || !screening || !format) return;\n\tif (typeof format === 'string') {\n\t\tlet search = format.toLowerCase();\n\t\tif (formatCache[search]) {\n\t\t\tformat = formatCache[search];\n\t\t} else {\n\t\t\tlet result = included.find(inc => (\n\t\t\t\tinc.type === 'formats' && inc.attributes.name.toLowerCase() === search\n\t\t\t));\n\t\t\tif (!result) {\n\t\t\t\tresult = {\n\t\t\t\t\ttype: 'formats',\n\t\t\t\t\tid: search,\n\t\t\t\t\tattributes: { name: format }\n\t\t\t\t};\n\t\t\t\tincluded.push(result);\n\t\t\t}\n\t\t\tformatCache[search] = format = result;\n\t\t}\n\t}\n\tif (!format || !format.id) return;\n\tlet mid = screening.attributes.movie_id;\n\tlet srcMovie = included.find(inc => (\n\t\tinc.type === 'movies' && inc.id === mid\n\t));\n\tif (!srcMovie || srcMovie.attributes.format_id === format.id) return;\n\tlet lookup = [srcMovie.attributes.provider_id, format.id].join('|');\n\tlet movie = movieCache[lookup];\n\tif (!movie) {\n\t\tmovie = included.find(inc => (\n\t\t\tinc.type === 'movies' && inc.attributes.format_id === format.id && inc.attributes.provider_id === srcMovie.attributes.provider_id\n\t\t));\n\t\tif (!movie) {\n\t\t\t// Urgh\n\t\t\tmovie = JSON.parse(JSON.stringify(srcMovie));\n\t\t\tmovie.attributes.format_id = format.id;\n\t\t\tmovie.id += '|' + format.id;\n\t\t\tincluded.push(movie);\n\t\t}\n\t\tmovieCache[lookup] = movie;\n\t}\n\tif (!movie || !movie.id) return;\n\tscreening.attributes.movie_id = movie.id;\n}\n\nfunction clearCaches() {\n\tcaches = {};\n\tformatCache = {};\n\tmovieCache = {};\n}\n\nfunction formatSlug(name) {\n\tif (!name) return name;\n\treturn name.toLowerCase().replace(/ /g, '');\n}\n\nexport default function(data, included, appData) {\n\tclearCaches();\n\n\tlet store = Store.get();\n\n\tif (accessNested(store, 'activePage.data.splitSpecialTheaters', true)) {\n\t\tlet thCache = {};\n\t\tlet splitTheater = (id, data) => {\n\t\t\tlet nid = id + ':' + data.indicator;\n\t\t\tif (thCache[nid]) {\n\t\t\t\treturn thCache[nid];\n\t\t\t}\n\t\t\tlet src = included.find(i => i.type === 'theaters' && i.id === id);\n\t\t\tif (!src) return;\n\t\t\tlet nTh = JSON.parse(JSON.stringify(src));\n\t\t\tnTh.id = nid;\n\t\t\tnTh.attributes.name += ' (' + data.name + ')';\n\t\t\tnTh.attributes.theater_master_id += ':' + data.indicator;\n\t\t\tnTh.attributes.theater_master_id = data.masterId || (nTh.attributes.theater_master_id + ':' + data.indicator);\n\t\t\tthCache[nid] = nTh;\n\t\t\tincluded.push(nTh);\n\t\t\treturn nTh;\n\t\t};\n\t\tlet specialTheaters = [\n\t\t\t{ indicator: 'dome', name: 'Dome' },\n\t\t\t// Hardcoded Curzon Bloomsbury dochouse id - ugly I know but \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:dochouse\" is not a valid guid\n\t\t\t// And need to match powster dochouse to the split version of webedia\n\t\t\t{ indicator: 'dochouse', name: 'DocHouse', masterId: '98e24e12-d9bb-11e7-9354-db0c57537af4' }\n\t\t];\n\t\tdata.forEach(s => {\n\t\t\tlet comments = accessNested(s, 'attributes.doc.comments');\n\t\t\tif (!comments) return;\n\t\t\tlet commentsList = comments.toLowerCase().split(';');\n\t\t\t// Using find to have a break behaviour (stops after the first found)\n\t\t\tspecialTheaters.find(special => {\n\t\t\t\tif (commentsList.indexOf(special.indicator) === -1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet newTheater = splitTheater(s.attributes.theater_id, special);\n\t\t\t\tif (newTheater) {\n\t\t\t\t\ts.attributes.theater_id = newTheater.id;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\tlet disabledScreenings = accessNested(store, 'activePage.data.disabledScreenings') || {};\n\tlet disabledScreeningsContexts = [disabledScreenings].concat(\n\t\tObject.keys(disabledScreenings).map(k => disabledScreenings[k])\n\t).filter(ctx => ctx && Object.keys(ctx).length);\n\n\tif (disabledScreeningsContexts.length) {\n\t\tdisabledScreeningsContexts = disabledScreeningsContexts.map(ctx => {\n\t\t\tctx = Object.assign({}, ctx);\n\t\t\tif (ctx.date) {\n\t\t\t\tctx.date = ctx.date.split(',').map(part => getDateRange(part.trim())).filter(e => e);\n\t\t\t}\n\t\t\tif (ctx.time) {\n\t\t\t\tctx.time = ctx.time.split(',').map(part => cleanTime(part.trim())).filter(e => e);\n\t\t\t}\n\t\t\tif (ctx.format) {\n\t\t\t\tctx.format = ctx.format.split(',').map(part => formatSlug(part.trim())).filter(e => e);\n\t\t\t}\n\t\t\tif (ctx.theater) {\n\t\t\t\tctx.theater = ctx.theater.split(',').map(part => getTheaterId(part.trim(), included)).filter(e => e);\n\t\t\t}\n\t\t\tif (ctx.provider) {\n\t\t\t\tctx.provider = ctx.provider.split(',').map(part => part.trim()).filter(e => e);\n\t\t\t}\n\t\t\treturn ctx;\n\t\t});\n\t\tlet localFormatCache = {};\n\t\tlet getFormat = screening => {\n\t\t\tlet mid = screening.attributes.movie_id;\n\t\t\tif (localFormatCache[mid]) {\n\t\t\t\treturn localFormatCache[mid];\n\t\t\t}\n\t\t\tlet format = null;\n\t\t\tlet movie = included.find(inc => inc.type === 'movies' && inc.id === mid);\n\t\t\tif (movie && movie.attributes.format_id) {\n\t\t\t\tlet fid = movie.attributes.format_id;\n\t\t\t\tlet fObj = included.find(inc => inc.type === 'formats' && inc.id === fid);\n\t\t\t\tformat = fObj && fObj.attributes.name;\n\t\t\t}\n\t\t\treturn localFormatCache[mid] = format;\n\t\t};\n\t\tdata = data.filter(screening => {\n\t\t\t// If one context validates, filter out the screening\n\t\t\treturn !disabledScreeningsContexts.find(ctx => {\n\t\t\t\treturn Object.keys(ctx).every(key => {\n\t\t\t\t\tlet val = ctx[key];\n\t\t\t\t\tif (val === null) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (key) {\n\t\t\t\t\t\tcase 'date':\n\t\t\t\t\t\t\tlet date = getDateTimestamp((screening.attributes.date || '').slice(0, 10));\n\t\t\t\t\t\t\treturn date && ctx.date.find(range => inRange(date, range));\n\t\t\t\t\t\tcase 'time':\n\t\t\t\t\t\t\tlet time = screening.attributes.time;\n\t\t\t\t\t\t\treturn time && ctx.time.indexOf(time) !== -1;\n\t\t\t\t\t\tcase 'format':\n\t\t\t\t\t\t\tlet slug = formatSlug(getFormat(screening));\n\t\t\t\t\t\t\treturn slug && ctx.format.indexOf(slug) !== -1;\n\t\t\t\t\t\tcase 'theater':\n\t\t\t\t\t\t\tlet tid = screening.attributes.theater_id;\n\t\t\t\t\t\t\treturn tid && ctx.theater.indexOf(tid) !== -1;\n\t\t\t\t\t\tcase 'provider':\n\t\t\t\t\t\t\tlet provider = screening.attributes.provider_id;\n\t\t\t\t\t\t\treturn provider && ctx.provider.indexOf(provider) !== -1;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\tlet customFormats = accessNested(store, 'activePage.data.customFormats') || {};\n\tif (customFormats.format) {\n\t\tcustomFormats = {\n\t\t\tmain: customFormats\n\t\t};\n\t}\n\t// Prebuild the object to make things faster\n\tlet customFormatsList = Object.keys(customFormats).map((prop, index) => {\n\t\tlet data = customFormats[prop];\n\t\tif (!data || typeof data !== 'object' || !data.format) return;\n\t\tlet dataObj = {\n\t\t\tformat: data.format,\n\t\t\tappend: !!data.append\n\t\t};\n\t\tif (data.date) {\n\t\t\tdataObj.dateRanges = data.date.split(',').map(part => getDateRange(part.trim())).filter(e => e);\n\t\t}\n\t\tif (data.time) {\n\t\t\tdataObj.times = data.time.split(',').map(time => cleanTime(time.trim())).filter(e => e);\n\t\t}\n\t\t// if (data.theaterName) {\n\t\t// Issue with theaters having a comma in the name\n\t\t// \tdataObj.theaterName = data.theaterName.split(',');\n\t\t// }\n\t\tif (data.theater) {\n\t\t\tdataObj.theaters = data.theater.split(',').map(theater => theater.trim()).filter(e => e);\n\t\t} else  if (data.theaterNot) {\n\t\t\tdataObj.theatersNot = data.theaterNot.split(',').map(theater => theater.trim()).filter(e => e);\n\t\t}\n\t\tif (data.domain) {\n\t\t\tdataObj.domains = data.domain.split(',').map(domain => domain.trim()).filter(e => e);\n\t\t}\n\t\tif (data.country) {\n\t\t\tdataObj.countries = data.country.split(',').map(country => country.trim()).filter(e => e);\n\t\t}\n\t\tdataObj.order = data.order || (index + 100);\n\t\treturn dataObj;\n\t}).filter(e => e);\n\tcustomFormatsList.sort((a, b) => a.order - b.order);\n\tif (customFormatsList.length) {\n\t\tdata.forEach(screening => {\n\t\t\tlet sDate = getDateTimestamp((screening.attributes.date || '').slice(0, 10));\n\t\t\tlet sTime = screening.attributes.time;\n\t\t\tlet matching = customFormatsList.find(formatCond => {\n\t\t\t\tif (formatCond.dateRanges) {\n\t\t\t\t\tif (!sDate || !formatCond.dateRanges.find(range => inRange(sDate, range))) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (formatCond.times) {\n\t\t\t\t\tif (!sTime || formatCond.times.indexOf(sTime) === -1) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (formatCond.theaters || formatCond.theatersNot) {\n\t\t\t\t\tlet thId = screening.attributes.theater_id;\n\t\t\t\t\tlet theater = getIncluded(included, 'theaters', thId);\n\t\t\t\t\tlet ptid = accessNested(theater, 'attributes.provider_id') + ':' + accessNested(theater, 'attributes.provider_theater_id');\n\t\t\t\t\tif (\n\t\t\t\t\t\t(formatCond.theaters && !formatCond.theaters.find(desired => thId === desired || ptid === desired))\n\t\t\t\t\t\t|| (formatCond.theatersNot && formatCond.theatersNot.find(desired => thId === desired || ptid === desired))\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (formatCond.domains) {\n\t\t\t\t\tlet thId = screening.attributes.theater_id;\n\t\t\t\t\tlet theater = getIncluded(included, 'theaters', thId);\n\t\t\t\t\tlet exId = accessNested(theater, 'attributes.exhibitor_id');\n\t\t\t\t\tlet exhibitor = getIncluded(included, 'exhibitors', exId);\n\t\t\t\t\tlet domain = accessNested(exhibitor, 'attributes.domain');\n\t\t\t\t\tif (!domain || formatCond.domains.indexOf(domain) === -1) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (formatCond.countries) {\n\t\t\t\t\tlet thId = screening.attributes.theater_id;\n\t\t\t\t\tlet theater = getIncluded(included, 'theaters', thId);\n\t\t\t\t\tlet country = accessNested(theater, 'attributes.country');\n\t\t\t\t\tif (!country || formatCond.countries.indexOf(country) === -1) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t});\n\t\t\tif (matching) {\n\t\t\t\tlet format = matching.format;\n\t\t\t\tif (matching.append) {\n\t\t\t\t\tlet movie = getIncluded(included, 'movies', screening.attributes.movie_id);\n\t\t\t\t\tlet formatObject = getIncluded(included, 'formats', movie && movie.attributes.format_id);\n\t\t\t\t\tif (formatObject) {\n\t\t\t\t\t\tformat = formatObject.attributes.name + ' ' + format;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\teditFormat(included, screening, format);\n\t\t\t}\n\t\t});\n\t}\n\n\treturn {\n\t\tdata: data,\n\t\tincluded: included\n\t};\n}\n\nexport {\n\tgetDateTimestamp,\n\tgetDateRange,\n\tinRange,\n\teditFormat,\n\tgetIncluded,\n\tclearCaches\n};\n","/*** IMPORTS FROM imports-loader ***/\n(function() {\n\n(function(self) {\n  'use strict';\n\n  if (self.fetch) {\n    return\n  }\n\n  var support = {\n    searchParams: 'URLSearchParams' in self,\n    iterable: 'Symbol' in self && 'iterator' in Symbol,\n    blob: 'FileReader' in self && 'Blob' in self && (function() {\n      try {\n        new Blob()\n        return true\n      } catch(e) {\n        return false\n      }\n    })(),\n    formData: 'FormData' in self,\n    arrayBuffer: 'ArrayBuffer' in self\n  }\n\n  if (support.arrayBuffer) {\n    var viewClasses = [\n      '[object Int8Array]',\n      '[object Uint8Array]',\n      '[object Uint8ClampedArray]',\n      '[object Int16Array]',\n      '[object Uint16Array]',\n      '[object Int32Array]',\n      '[object Uint32Array]',\n      '[object Float32Array]',\n      '[object Float64Array]'\n    ]\n\n    var isDataView = function(obj) {\n      return obj && DataView.prototype.isPrototypeOf(obj)\n    }\n\n    var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n      return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n    }\n  }\n\n  function normalizeName(name) {\n    if (typeof name !== 'string') {\n      name = String(name)\n    }\n    if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n      throw new TypeError('Invalid character in header field name')\n    }\n    return name.toLowerCase()\n  }\n\n  function normalizeValue(value) {\n    if (typeof value !== 'string') {\n      value = String(value)\n    }\n    return value\n  }\n\n  // Build a destructive iterator for the value list\n  function iteratorFor(items) {\n    var iterator = {\n      next: function() {\n        var value = items.shift()\n        return {done: value === undefined, value: value}\n      }\n    }\n\n    if (support.iterable) {\n      iterator[Symbol.iterator] = function() {\n        return iterator\n      }\n    }\n\n    return iterator\n  }\n\n  function Headers(headers) {\n    this.map = {}\n\n    if (headers instanceof Headers) {\n      headers.forEach(function(value, name) {\n        this.append(name, value)\n      }, this)\n    } else if (Array.isArray(headers)) {\n      headers.forEach(function(header) {\n        this.append(header[0], header[1])\n      }, this)\n    } else if (headers) {\n      Object.getOwnPropertyNames(headers).forEach(function(name) {\n        this.append(name, headers[name])\n      }, this)\n    }\n  }\n\n  Headers.prototype.append = function(name, value) {\n    name = normalizeName(name)\n    value = normalizeValue(value)\n    var oldValue = this.map[name]\n    this.map[name] = oldValue ? oldValue+','+value : value\n  }\n\n  Headers.prototype['delete'] = function(name) {\n    delete this.map[normalizeName(name)]\n  }\n\n  Headers.prototype.get = function(name) {\n    name = normalizeName(name)\n    return this.has(name) ? this.map[name] : null\n  }\n\n  Headers.prototype.has = function(name) {\n    return this.map.hasOwnProperty(normalizeName(name))\n  }\n\n  Headers.prototype.set = function(name, value) {\n    this.map[normalizeName(name)] = normalizeValue(value)\n  }\n\n  Headers.prototype.forEach = function(callback, thisArg) {\n    for (var name in this.map) {\n      if (this.map.hasOwnProperty(name)) {\n        callback.call(thisArg, this.map[name], name, this)\n      }\n    }\n  }\n\n  Headers.prototype.keys = function() {\n    var items = []\n    this.forEach(function(value, name) { items.push(name) })\n    return iteratorFor(items)\n  }\n\n  Headers.prototype.values = function() {\n    var items = []\n    this.forEach(function(value) { items.push(value) })\n    return iteratorFor(items)\n  }\n\n  Headers.prototype.entries = function() {\n    var items = []\n    this.forEach(function(value, name) { items.push([name, value]) })\n    return iteratorFor(items)\n  }\n\n  if (support.iterable) {\n    Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n  }\n\n  function consumed(body) {\n    if (body.bodyUsed) {\n      return Promise.reject(new TypeError('Already read'))\n    }\n    body.bodyUsed = true\n  }\n\n  function fileReaderReady(reader) {\n    return new Promise(function(resolve, reject) {\n      reader.onload = function() {\n        resolve(reader.result)\n      }\n      reader.onerror = function() {\n        reject(reader.error)\n      }\n    })\n  }\n\n  function readBlobAsArrayBuffer(blob) {\n    var reader = new FileReader()\n    var promise = fileReaderReady(reader)\n    reader.readAsArrayBuffer(blob)\n    return promise\n  }\n\n  function readBlobAsText(blob) {\n    var reader = new FileReader()\n    var promise = fileReaderReady(reader)\n    reader.readAsText(blob)\n    return promise\n  }\n\n  function readArrayBufferAsText(buf) {\n    var view = new Uint8Array(buf)\n    var chars = new Array(view.length)\n\n    for (var i = 0; i < view.length; i++) {\n      chars[i] = String.fromCharCode(view[i])\n    }\n    return chars.join('')\n  }\n\n  function bufferClone(buf) {\n    if (buf.slice) {\n      return buf.slice(0)\n    } else {\n      var view = new Uint8Array(buf.byteLength)\n      view.set(new Uint8Array(buf))\n      return view.buffer\n    }\n  }\n\n  function Body() {\n    this.bodyUsed = false\n\n    this._initBody = function(body) {\n      this._bodyInit = body\n      if (!body) {\n        this._bodyText = ''\n      } else if (typeof body === 'string') {\n        this._bodyText = body\n      } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n        this._bodyBlob = body\n      } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n        this._bodyFormData = body\n      } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n        this._bodyText = body.toString()\n      } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n        this._bodyArrayBuffer = bufferClone(body.buffer)\n        // IE 10-11 can't handle a DataView body.\n        this._bodyInit = new Blob([this._bodyArrayBuffer])\n      } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n        this._bodyArrayBuffer = bufferClone(body)\n      } else {\n        throw new Error('unsupported BodyInit type')\n      }\n\n      if (!this.headers.get('content-type')) {\n        if (typeof body === 'string') {\n          this.headers.set('content-type', 'text/plain;charset=UTF-8')\n        } else if (this._bodyBlob && this._bodyBlob.type) {\n          this.headers.set('content-type', this._bodyBlob.type)\n        } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n          this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n        }\n      }\n    }\n\n    if (support.blob) {\n      this.blob = function() {\n        var rejected = consumed(this)\n        if (rejected) {\n          return rejected\n        }\n\n        if (this._bodyBlob) {\n          return Promise.resolve(this._bodyBlob)\n        } else if (this._bodyArrayBuffer) {\n          return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n        } else if (this._bodyFormData) {\n          throw new Error('could not read FormData body as blob')\n        } else {\n          return Promise.resolve(new Blob([this._bodyText]))\n        }\n      }\n\n      this.arrayBuffer = function() {\n        if (this._bodyArrayBuffer) {\n          return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n        } else {\n          return this.blob().then(readBlobAsArrayBuffer)\n        }\n      }\n    }\n\n    this.text = function() {\n      var rejected = consumed(this)\n      if (rejected) {\n        return rejected\n      }\n\n      if (this._bodyBlob) {\n        return readBlobAsText(this._bodyBlob)\n      } else if (this._bodyArrayBuffer) {\n        return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n      } else if (this._bodyFormData) {\n        throw new Error('could not read FormData body as text')\n      } else {\n        return Promise.resolve(this._bodyText)\n      }\n    }\n\n    if (support.formData) {\n      this.formData = function() {\n        return this.text().then(decode)\n      }\n    }\n\n    this.json = function() {\n      return this.text().then(JSON.parse)\n    }\n\n    return this\n  }\n\n  // HTTP methods whose capitalization should be normalized\n  var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n  function normalizeMethod(method) {\n    var upcased = method.toUpperCase()\n    return (methods.indexOf(upcased) > -1) ? upcased : method\n  }\n\n  function Request(input, options) {\n    options = options || {}\n    var body = options.body\n\n    if (input instanceof Request) {\n      if (input.bodyUsed) {\n        throw new TypeError('Already read')\n      }\n      this.url = input.url\n      this.credentials = input.credentials\n      if (!options.headers) {\n        this.headers = new Headers(input.headers)\n      }\n      this.method = input.method\n      this.mode = input.mode\n      if (!body && input._bodyInit != null) {\n        body = input._bodyInit\n        input.bodyUsed = true\n      }\n    } else {\n      this.url = String(input)\n    }\n\n    this.credentials = options.credentials || this.credentials || 'omit'\n    if (options.headers || !this.headers) {\n      this.headers = new Headers(options.headers)\n    }\n    this.method = normalizeMethod(options.method || this.method || 'GET')\n    this.mode = options.mode || this.mode || null\n    this.referrer = null\n\n    if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n      throw new TypeError('Body not allowed for GET or HEAD requests')\n    }\n    this._initBody(body)\n  }\n\n  Request.prototype.clone = function() {\n    return new Request(this, { body: this._bodyInit })\n  }\n\n  function decode(body) {\n    var form = new FormData()\n    body.trim().split('&').forEach(function(bytes) {\n      if (bytes) {\n        var split = bytes.split('=')\n        var name = split.shift().replace(/\\+/g, ' ')\n        var value = split.join('=').replace(/\\+/g, ' ')\n        form.append(decodeURIComponent(name), decodeURIComponent(value))\n      }\n    })\n    return form\n  }\n\n  function parseHeaders(rawHeaders) {\n    var headers = new Headers()\n    // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n    // https://tools.ietf.org/html/rfc7230#section-3.2\n    var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ')\n    preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n      var parts = line.split(':')\n      var key = parts.shift().trim()\n      if (key) {\n        var value = parts.join(':').trim()\n        headers.append(key, value)\n      }\n    })\n    return headers\n  }\n\n  Body.call(Request.prototype)\n\n  function Response(bodyInit, options) {\n    if (!options) {\n      options = {}\n    }\n\n    this.type = 'default'\n    this.status = options.status === undefined ? 200 : options.status\n    this.ok = this.status >= 200 && this.status < 300\n    this.statusText = 'statusText' in options ? options.statusText : 'OK'\n    this.headers = new Headers(options.headers)\n    this.url = options.url || ''\n    this._initBody(bodyInit)\n  }\n\n  Body.call(Response.prototype)\n\n  Response.prototype.clone = function() {\n    return new Response(this._bodyInit, {\n      status: this.status,\n      statusText: this.statusText,\n      headers: new Headers(this.headers),\n      url: this.url\n    })\n  }\n\n  Response.error = function() {\n    var response = new Response(null, {status: 0, statusText: ''})\n    response.type = 'error'\n    return response\n  }\n\n  var redirectStatuses = [301, 302, 303, 307, 308]\n\n  Response.redirect = function(url, status) {\n    if (redirectStatuses.indexOf(status) === -1) {\n      throw new RangeError('Invalid status code')\n    }\n\n    return new Response(null, {status: status, headers: {location: url}})\n  }\n\n  self.Headers = Headers\n  self.Request = Request\n  self.Response = Response\n\n  self.fetch = function(input, init) {\n    return new Promise(function(resolve, reject) {\n      var request = new Request(input, init)\n      var xhr = new XMLHttpRequest()\n\n      xhr.onload = function() {\n        var options = {\n          status: xhr.status,\n          statusText: xhr.statusText,\n          headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n        }\n        options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n        var body = 'response' in xhr ? xhr.response : xhr.responseText\n        resolve(new Response(body, options))\n      }\n\n      xhr.onerror = function() {\n        reject(new TypeError('Network request failed'))\n      }\n\n      xhr.ontimeout = function() {\n        reject(new TypeError('Network request failed'))\n      }\n\n      xhr.open(request.method, request.url, true)\n\n      if (request.credentials === 'include') {\n        xhr.withCredentials = true\n      } else if (request.credentials === 'omit') {\n        xhr.withCredentials = false\n      }\n\n      if ('responseType' in xhr && support.blob) {\n        xhr.responseType = 'blob'\n      }\n\n      request.headers.forEach(function(value, name) {\n        xhr.setRequestHeader(name, value)\n      })\n\n      xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n    })\n  }\n  self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = global.fetch;\n}.call(global));","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nvar util = require('./utils');\n\nvar Format = {\n    RFC1738: 'RFC1738',\n    RFC3986: 'RFC3986'\n};\n\nmodule.exports = util.assign(\n    {\n        'default': Format.RFC3986,\n        formatters: {\n            RFC1738: function (value) {\n                return replace.call(value, percentTwenties, '+');\n            },\n            RFC3986: function (value) {\n                return String(value);\n            }\n        }\n    },\n    Format\n);\n","'use strict';\n\nvar Utils = require( './utils' );\n\n\n\n//#build\n\n\nvar BEFOREALL = 'beforeAll',\n\tAFTERALL = 'afterAll'\n;\nvar specialEvents = [BEFOREALL, AFTERALL];\n\n// The prototype methods are stored in a different object\n// and applied as non enumerable properties later\nvar emitterProto = {\n\ton: function( eventName, listener, once ){\n\t\tvar listeners = this._events[ eventName ] || [];\n\n\t\tlisteners.push({ callback: listener, once: once});\n\t\tthis._events[ eventName ] =  listeners;\n\n\t\treturn this;\n\t},\n\n\tonce: function( eventName, listener ){\n\t\treturn this.on( eventName, listener, true );\n\t},\n\n\toff: function( eventName, listener ){\n\t\tif( typeof eventName === 'undefined' ){\n\t\t\tthis._events = {};\n\t\t}\n\t\telse if( typeof listener === 'undefined' ) {\n\t\t\tthis._events[ eventName ] = [];\n\t\t}\n\t\telse {\n\t\t\tvar listeners = this._events[ eventName ] || [],\n\t\t\t\ti\n\t\t\t;\n\n\t\t\tfor (i = listeners.length - 1; i >= 0; i--) {\n\t\t\t\tif( listeners[i].callback === listener )\n\t\t\t\t\tlisteners.splice( i, 1 );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\temit: function( eventName ){\n\t\tvar args = [].slice.call( arguments, 1 ),\n\t\t\tlisteners = this._events[ eventName ] || [],\n\t\t\tonceListeners = [],\n\t\t\tspecial = specialEvents.indexOf( eventName ) !== -1,\n\t\t\ti, listener, returnValue, lastValue\n\t\t;\n\n\t\tspecial || this.emit.apply( this, [BEFOREALL, eventName].concat( args ) );\n\n\t\t// Call listeners\n\t\tfor (i = 0; i < listeners.length; i++) {\n\t\t\tlistener = listeners[i];\n\n\t\t\tif( listener.callback )\n\t\t\t\tlastValue = listener.callback.apply( this, args );\n\t\t\telse {\n\t\t\t\t// If there is not a callback, remove!\n\t\t\t\tlistener.once = true;\n\t\t\t}\n\n\t\t\tif( listener.once )\n\t\t\t\tonceListeners.push( i );\n\n\t\t\tif( lastValue !== undefined ){\n\t\t\t\treturnValue = lastValue;\n\t\t\t}\n\t\t}\n\n\t\t// Remove listeners marked as once\n\t\tfor( i = onceListeners.length - 1; i >= 0; i-- ){\n\t\t\tlisteners.splice( onceListeners[i], 1 );\n\t\t}\n\n\t\tspecial || this.emit.apply( this, [AFTERALL, eventName].concat( args ) );\n\n\t\treturn returnValue;\n\t},\n\n\ttrigger: function(){\n\t\tUtils.warn( false, 'Method `trigger` is deprecated and will be removed from freezer in upcoming releases. Please use `emit`.' );\n\t\treturn this.emit.apply( this, arguments );\n\t}\n};\n\n// Methods are not enumerable so, when the stores are\n// extended with the emitter, they can be iterated as\n// hashmaps\nvar Emitter = Utils.createNonEnumerable( emitterProto );\n//#build\n\nmodule.exports = Emitter;\n","var Freezer = require('./src/freezer');\nmodule.exports = Freezer;","import qs from 'qs';\nimport Geo from 'models/Geo';\nimport { isDirectTicketingEnabled } from 'store/ticketingPublic';\nimport { accessNested, asList } from 'utils/utils';\nimport formatDateTime from 'utils/formatDateTime';\nimport dataProviderToTicketProvider from 'utils/dataProviderToTicketProvider';\n\n// Finds the first non-undefined and non-null value (equivalent to v1 || v2 || v3 ... except returns the value if it's not null/undefined, even if falsy like 0, '' or false)\nfunction customDefault(...args) {\n\treturn args.find(v => v != undefined);\n}\n\nfunction replaceURLParameters(url, studio, movie, region) {\n\t// getCopyWithParams from utils/clientUtils\n\t// return getCopyWithParams({ $MOVIE: movie, $STUDIO: studio, $REGION: region }, url);\n\treturn url.replace(/=(?:\\$|%24)(STUDIO|MOVIE|REGION)(&|$)/g, (match, type, end) => {\n\t\tswitch (type) {\n\t\t\tcase 'STUDIO':\n\t\t\t\treturn '=' + ( studio ) + end;\n\t\t\tcase 'MOVIE':\n\t\t\t\treturn '=' + ( movie ) + end;\n\t\t\tcase 'REGION':\n\t\t\t\treturn '=' + ( region ) + end;\n\t\t\tdefault:\n\t\t\t\treturn match;\n\t\t}\n\t});\n}\n\n// Makes sure mainTheater has fandango and movietickets ids from alternateTheater if it doesn't have its own\nfunction checkTicketProviderIds(mainTheater, alternateTheater) {\n\tif (dataProviderToTicketProvider[alternateTheater.providerId]) {\n\t\treturn attachTicketProvider(mainTheater, alternateTheater);\n\t}\n\tif (!mainTheater.tms_id) mainTheater.tms_id = alternateTheater.tms_id;\n\tif (!mainTheater.fandango) mainTheater.fandango = alternateTheater.fandango;\n\tif (!mainTheater.movietickets) mainTheater.movietickets = alternateTheater.movietickets;\n\tif (!mainTheater.atom) mainTheater.atom = alternateTheater.atom;\n\tmainTheater.movies.forEach(m => {\n\t\tif (m.fandango && m.movietickets && m.atom) return;\n\t\tmainTheater.screenings.find(screening => {\n\t\t\tif (screening.movie.id !== m.id || !screening.datetime) return;\n\t\t\tlet matching = alternateTheater.screenings.filter(sc2 => +sc2.datetime === +screening.datetime);\n\t\t\tif (matching.length !== 1) return;\n\t\t\tif (!m.fandango) m.fandango = matching[0].movie.fandango;\n\t\t\tif (!m.movietickets) m.movietickets = matching[0].movie.movietickets;\n\t\t\tif (!m.atom) m.atom = matching[0].movie.atom;\n\t\t\treturn true;\n\t\t});\n\t});\n}\nfunction attachTicketProvider(theater, alternateTheater) {\n\talternateTheater.screenings.forEach(screening => {\n\t\tif (!screening.srcTicketProviders) {\n\t\t\treturn;\n\t\t}\n\t\tlet matching = theater.screenings.find(s2 => s2.date === screening.date && s2.time24 === screening.time24);\n\t\tif (matching) {\n\t\t\tmatching.srcTicketProviders = Object.assign({}, matching.srcTicketProviders, screening.srcTicketProviders);\n\t\t}\n\t});\n}\n\nexport default class Theater {\n\t// TODO: pass in currentPage to avoid hardcoded \"pages.showtimes.data\"\n\tconstructor(id, attr, { screenings, exhibitor, clientGeo, appData, theaterMasters, theaterMasterDoc, firstBatch, pinned, activePage }) {\n\t\tlet copy = appData.copy;\n\t\tlet providers = accessNested(activePage, 'data.providers') || accessNested(appData, 'pages.showtimes.data.providers') || {};\n\t\tlet regionProviders = accessNested(appData, 'pages.showtimes.data.providerLocation');\n\t\tthis.id = id;\n\t\tthis.pinned = attr.pinned !== undefined ? attr.pinned : !!pinned;\n\t\tthis.active = false;\n\t\tthis.name = attr.name;\n\t\tlet addr = attr.address;\n\t\tlet city = attr.city;\n\t\tif (appData.options.useEnglishCopy) {\n\t\t\tthis.name = attr.name_en || attr.name;\n\t\t\taddr =  attr.address_en || attr.address;\n\t\t\tcity =  attr.city_en || attr.city;\n\t\t}\n\t\tthis.screenings = screenings;\n\t\tlet addedMoviesCache = {};\n\t\tthis.movies = screenings.reduce((a, s) => {\n\t\t\tif (!s.movie || addedMoviesCache[s.movie.id]) return a;\n\t\t\taddedMoviesCache[s.movie.id] = true;\n\t\t\ta.push(s.movie);\n\t\t\treturn a;\n\t\t}, []);\n\n\t\tthis.activeScreenings = screenings;\n\t\t// if (filters) {\n\t\t// \tthis.activeScreenings = this.activeScreenings.filter((s) => {\n\t\t// \t\tlet passes = inactiveScreeningsFilter(filters.format, s.movie.format);\n\t\t// \t\treturn passes;\n\t\t// \t});\n\t\t// }\n\t\tthis.filteredScreenings = screenings;\n\t\tthis.filterPass = this.filteredScreenings.length ? true : false;\n\t\tthis.exhibitor = exhibitor;\n\t\tthis.logo = (exhibitor && exhibitor.logo) ? exhibitor.logo : 'default.png';\n\t\tthis.activeExhibitor = true;\n\t\tthis.activeScreening = null;\n\t\tlet addressParts = [addr, city];\n\t\t// For webedia US, also add the state to the displayed address\n\t\tif (attr.country === 'us' && (attr.provider_id === 'webus' || attr.provider_id === 'wwm' || attr.provider_id === 'mx') && attr.state) {\n\t\t\taddressParts.push(attr.state);\n\t\t}\n\t\tlet fullAddress = addressParts.filter(e => e).join(', ');\n\t\tthis.location = {\n\t\t\t'country' : attr.country,\n\t\t\t'fullAddress': fullAddress,\n\t\t\t'address': addr,\n\t\t\t'city': city,\n\t\t\t'state': attr.state\n\t\t};\n\t\tlet website = attr.url;\n\t\tif (website) {\n\t\t\t// Apparently sometimes the importers are giving us multiple websites separated by , or space\n\t\t\t// (think this should rather be fixed in the backend)\n\t\t\twebsite = website.split(',')[0].split(' ')[0];\n\t\t\tif (website.lastIndexOf('http://', 0) !== 0 && website.lastIndexOf('https://', 0) !== 0)\n\t\t\t\twebsite = 'http://' + website;\n\t\t\tthis.website = website;\n\t\t}\n\t\t// if(!this.website && exhibitor && exhibitor.domain) {\n\t\t// \tthis.website = 'http://' + exhibitor.domain;\n\t\t// }\n\t\tconst distanceUnit = copy['$' + (attr.country || '').toUpperCase() + '_DISTANCE_UNIT'] || copy.$DISTANCE_UNIT;\n\n\t\tthis.masterId = attr.theater_master_id;\n\t\tthis.masterDoc = theaterMasterDoc || {};\n\t\tthis.providerId = attr.provider_id;\n\t\tthis.providerTheaterId = attr.provider_theater_id;\n\t\tthis.pid = this.providerId + ':' + this.providerTheaterId;\n\t\tthis.providerExhibitorId = attr.provider_exhibitor_id;\n\t\tthis.geo = new Geo({ lat: attr.lat, lon: attr.lon, countryCode: attr.country, city: city });\n\t\tthis.distance = this.geo.distanceFrom(clientGeo, distanceUnit);\n\t\tthis.distanceUnit = distanceUnit;\n\t\tthis.enabled = this.screenings.length > 0;\n\n\t\tlet disabledList = asList(accessNested(appData, 'pages.showtimes.data.disabledTheaters', []));\n\t\tif (disabledList.indexOf(this.id) !== -1 || disabledList.indexOf(this.pid) !== -1) {\n\t\t\tthis.enabled = false;\n\t\t}\n\n\t\tif (attr.wwm_ticketing) {\n\t\t\tthis.movietickets = attr.movietickets_theater_id;\n\t\t\tthis.fandango = attr.fandango_theater_id;\n\t\t\tthis.tms_id = attr.tms_id;\n\t\t}\n\t\tthis.atom = attr.atom_theater_id;\n\t\tthis.firstBatch = firstBatch;\n\n\t\tlet getRank = t => +customDefault(accessNested(regionProviders, [t.location.country, t.providerId, 'rank']), (providers[t.providerId] || {}).rank, 100);\n\n\t\tif (theaterMasters && this.masterId && this.enabled) {\n\t\t\tlet currMaster = theaterMasters[this.masterId];\n\t\t\tif (currMaster && providers) {\n\t\t\t\tlet currRank = getRank(this);\n\t\t\t\tlet masterRank = getRank(currMaster);\n\t\t\t\tif (this.hasBadDeeplinks()) {\n\t\t\t\t\tcurrRank = Infinity;\n\t\t\t\t}\n\t\t\t\tif (currMaster.hasBadDeeplinks()) {\n\t\t\t\t\tmasterRank = Infinity;\n\t\t\t\t}\n\t\t\t\tif (currRank < masterRank) {\n\t\t\t\t\tcheckTicketProviderIds(this, currMaster);\n\t\t\t\t\tcurrMaster.enabled = false;\n\t\t\t\t\ttheaterMasters[this.masterId] = this;\n\t\t\t\t} else {\n\t\t\t\t\tcheckTicketProviderIds(currMaster, this);\n\t\t\t\t\t// After potentially getting new fandango ids, recalculate the urls\n\t\t\t\t\tcurrMaster.computeUrls(appData, activePage);\n\t\t\t\t\tthis.enabled = false;\n\t\t\t\t}\n\t\t\t} else theaterMasters[this.masterId] = this;\n\t\t}\n\n\t\t// TODO: currentPage\n\t\tlet exhibitorDomain = accessNested(this, 'exhibitor.domain', '');\n\t\tlet mfixList = asList(accessNested(appData, 'pages.showtimes.data.midnightFix', {}));\n\t\tlet midnightFix = mfixList.indexOf(exhibitorDomain) !== -1;\n\t\tthis.screenings.forEach(screening => {\n\t\t\tif (midnightFix && screening.nextDayDatetime) {\n\t\t\t\tscreening.offsetDate(-1, 0, 0, appData.copy);\n\t\t\t}\n\t\t});\n\t\tthis.computeUrls(appData, activePage);\n\t}\n\n\t// Returns whether this theater has bad quality deeplinks\n\t// For instance, MX without instant ticketing may have theater homepage links only\n\t// Those theater should have the lowest priority in the ranking\n\thasBadDeeplinks() {\n\t\tif (this.providerId === 'mx' && !isDirectTicketingEnabled(this)) {\n\t\t\tlet mxLinks = accessNested(this.masterDoc, 'mxLinks');\n\t\t\tif (typeof mxLinks === 'undefined') {\n\t\t\t\tmxLinks = accessNested(this.masterDoc, 'mx_links', false);\n\t\t\t}\n\t\t\treturn mxLinks !== true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// Computes the screenings urls of a theater (fandango etc.)\n\tcomputeUrls(appData, activePage) {\n\t\tlet exhibitorDomain = accessNested(this, 'exhibitor.domain', '');\n\n\t\t// TODO: currentPage\n\t\tlet deeplinksObj = accessNested(appData, 'pages.showtimes.data.overrideDeeplinks', {});\n\t\tlet overrideDeeplinks = deeplinksObj[exhibitorDomain] || deeplinksObj['*'] || deeplinksObj;\n\t\tlet isValidDLContext = ctx => (ctx.url || ctx.url === false) || ctx.movietickets || typeof ctx.fandango !== 'undefined';\n\t\tlet powRefQueryString = accessNested(appData, 'pages.showtimes.data.powRefQueryString', 'referral=powster');\n\n\t\tif (typeof overrideDeeplinks === 'string') {\n\t\t\toverrideDeeplinks = [{ url: overrideDeeplinks }];\n\t\t} else if (isValidDLContext(overrideDeeplinks)) {\n\t\t\toverrideDeeplinks = [overrideDeeplinks];\n\t\t} else if (!Array.isArray(overrideDeeplinks)) {\n\t\t\toverrideDeeplinks = Object.keys(overrideDeeplinks).map(k => {\n\t\t\t\t// If it's a domain obj, do not list it\n\t\t\t\tif (k.match(/^\\w{2,}\\.\\w{2,}$/)) return;\n\t\t\t\treturn overrideDeeplinks[k];\n\t\t\t});\n\t\t}\n\t\toverrideDeeplinks = overrideDeeplinks.filter(e => e).sort((a, b) => {\n\t\t\tif (a.order == b.order) return 0;\n\t\t\tif (a.order == undefined) return 1;\n\t\t\tif (b.order == undefined) return -1;\n\t\t\treturn a.order - b.order;\n\t\t});\n\n\t\t// Checks an overrideDeeplink context object\n\t\tlet checkDLContext = (ctx, s) => {\n\t\t\tif (!isValidDLContext(ctx)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Check that every recognized key in the context object is validated for this screening\n\t\t\treturn Object.keys(ctx).every(key => {\n\t\t\t\tlet val = ctx[key];\n\t\t\t\tif (!val) return true;\n\t\t\t\tswitch (key) {\n\t\t\t\t\tcase 'exhibitor':\n\t\t\t\t\tcase 'domain':\n\t\t\t\t\t\treturn val.split(',').map(e => e.trim()).indexOf(exhibitorDomain) !== -1;\n\t\t\t\t\tcase 'movie':\n\t\t\t\t\t\tlet movie = s.movie;\n\t\t\t\t\t\treturn val === movie.id || val === movie.provider_id + ':' + movie.provider_movie_id;\n\t\t\t\t\tcase 'format': return val === s.movie.format.slug;\n\t\t\t\t\tcase 'hour':\n\t\t\t\t\t\tif (val.length > 2) {\n\t\t\t\t\t\t\treturn +val.slice(0, 2) === s.hour && +val.slice(2) === s.minute;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn +val === s.hour;\n\t\t\t\t\tcase 'minute': return +val === s.minute;\n\t\t\t\t\tcase 'day':\n\t\t\t\t\tcase 'date':\n\t\t\t\t\t\tlet dateFormat = 'ddMM';\n\t\t\t\t\t\tif (val.match(/^\\d{2}-\\d{2}$/)) {\n\t\t\t\t\t\t\tdateFormat = 'MM-dd';\n\t\t\t\t\t\t} else if (val.match(/^\\d{4}-\\d{2}-\\d{2}$/)) {\n\t\t\t\t\t\t\tdateFormat = 'yyyy-MM-dd';\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn val === formatDateTime(s.stDate.date, dateFormat);\n\t\t\t\t\tcase 'theater':\n\t\t\t\t\t\tconst potentialMatches = [this.id, this.pid];\n\t\t\t\t\t\treturn val.split(',').find(val => potentialMatches.indexOf(val.trim()) !== -1);\n\t\t\t\t\tcase 'nameContains':\n\t\t\t\t\t\treturn this.name.toLowerCase().indexOf(val.toLowerCase()) !== -1;\n\t\t\t\t}\n\t\t\t\t// Not a valid condition, ignore\n\t\t\t\treturn true;\n\t\t\t});\n\t\t};\n\n\t\tlet affiliate = appData.meta.affiliate || 'pow';\n\t\tlet tProviders = this.providers = [];\n\t\tlet ticketProviders = accessNested(appData, 'pages.showtimes.data.ticketProviders', {});\n\n\t\tif (activePage\n\t\t\t&& activePage.data\n\t\t\t&& activePage.data.ticketProviders\n\t\t\t&& typeof activePage.data.ticketProviders === 'object'\n\t\t\t&& activePage.data.ticketProviders.override\n\t\t) {\n\t\t\tticketProviders = activePage.data.ticketProviders;\n\t\t}\n\n\n\t\t// Retro-compatibility for apps that relied on the global showtimes page value (TODO: remove that when not needed anymore)\n\t\tlet useCinemaUrls = customDefault(accessNested(activePage, 'data.useCinemaUrls'), accessNested(appData, 'pages.showtimes.data.useCinemaUrls'), true);\n\t\tif (dataProviderToTicketProvider[this.providerId]) {\n\t\t\tuseCinemaUrls = false;\n\t\t}\n\n\t\tconst affiliateCodeExhibitors = [\n\t\t\t'amccinemas.co.uk',\n\t\t\t'amctheatres.com',\n\t\t\t'amccinemas.com.hk'\n\t\t];\n\t\tconst movieSlug = accessNested(appData, 'meta.title.slug', '');\n\t\tconst studioSlug = accessNested(appData, 'meta.studio.slug', '');\n\t\tconst region = accessNested(appData, 'meta.region.slug', '');\n\n\t\tlet addAffiliateCode = url => {\n\t\t\t// (Vue only at the moment - add the movie name to the affiliate code)\n\t\t\turl = replaceURLParameters(url, studioSlug, movieSlug, region);\n\t\t\treturn url.replace(/([?&])SC_CMP=AFF_POW(&|$)/, '$1SC_CMP=AFF_POW_' + movieSlug + '$2');\n\t\t};\n\n\t\tif (affiliateCodeExhibitors.indexOf(exhibitorDomain) !== -1) {\n\t\t\taddAffiliateCode = url => {\n\t\t\t\tlet parts = url.split('#');\n\t\t\t\turl = parts.shift();\n\t\t\t\tlet hash = parts.length ? '#' + parts.join('#') : '';\n\t\t\t\tlet qsPos = url.indexOf('?');\n\n\t\t\t\tlet parsedQS = {};\n\t\t\t\tif (qsPos !== -1) {\n\t\t\t\t\tparsedQS = qs.parse(url.slice(qsPos + 1), { strictNullHandling: true });\n\t\t\t\t\turl = url.slice(0, qsPos);\n\t\t\t\t}\n\t\t\t\tparsedQS.affiliateCode = 'pow';\n\n\t\t\t\turl += '?' + qs.stringify(parsedQS, { strictNullHandling: true }) + hash;\n\t\t\t\treturn replaceURLParameters(url, studioSlug, movieSlug, region);\n\t\t\t};\n\t\t}\n\n\t\tthis.screenings.forEach(screening => {\n\t\t\tlet matchingDeeplink = overrideDeeplinks.find(dl => checkDLContext(dl, screening)) || overrideDeeplinks;\n\t\t\tif (!screening.preventDeeplinkOverride && matchingDeeplink && (matchingDeeplink.url || matchingDeeplink.url === false)) {\n\t\t\t\tscreening.url = matchingDeeplink.url;\n\t\t\t}\n\n\t\t\tlet urls = screening.urls = {};\n\t\t\tlet screeningUrl = screening.url;\n\t\t\t// If we the screeningsUrl is not set to false, but we want to use cinema url.\n\t\t\tif (!screeningUrl && screeningUrl !== false && useCinemaUrls && this.website) {\n\t\t\t\tscreeningUrl = this.website;\n\t\t\t}\n\t\t\tif (screeningUrl && !urlContainsBlacklistTheater(screeningUrl, this) && allowedTicketProvider('cinema', screening)) {\n\t\t\t\tif (tProviders.indexOf('cinema') === -1) tProviders.push('cinema');\n\t\t\t\turls.cinema = addAffiliateCode(screeningUrl);\n\t\t\t}\n\n\t\t\tif (screening.srcTicketProviders) {\n\t\t\t\tObject.keys(screening.srcTicketProviders).forEach(ticketProvider => {\n\t\t\t\t\tif (!allowedTicketProvider(ticketProvider, screening)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\turls[ticketProvider] = screening.srcTicketProviders[ticketProvider];\n\t\t\t\t\tif (tProviders.indexOf(ticketProvider) === -1) tProviders.push(ticketProvider);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tlet movie = screening.movie;\n\n\t\t\tif (allowedTicketProvider('fandango', screening)) {\n\t\t\t\tif (matchingDeeplink && (typeof matchingDeeplink.fandango === 'string' || matchingDeeplink.fandango === false)) {\n\t\t\t\t\tif (matchingDeeplink.fandango) {\n\t\t\t\t\t\tif (tProviders.indexOf('fandango') === -1) tProviders.push('fandango');\n\t\t\t\t\t\turls.fandango = matchingDeeplink.fandango;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst movieFandango = (screening.doc && screening.doc.movie_code_id) || movie.fandango;\n\t\t\t\t\tif (screening.fandangoUrl) {\n\t\t\t\t\t\tif (tProviders.indexOf('fandango') === -1) tProviders.push('fandango');\n\t\t\t\t\t\turls.fandango = screening.fandangoUrl;\n\t\t\t\t\t} else if (this.fandango && !!ticketProviders.fandango && movieFandango && screening.datetime && this.tms_id) {\n\t\t\t\t\t\tif (tProviders.indexOf('fandango') === -1) tProviders.push('fandango');\n\t\t\t\t\t\tconst formattedDate = formatDateTime(screening.datetime, 'MM\\\\-dd\\\\-yyyy\\\\+HH\\\\:mm');\n\t\t\t\t\t\turls.fandango = 'http://www.fandango.com/redirect.aspx?&mid=' + movieFandango + '&a=&tid=' + this.tms_id +\n\t\t\t\t\t\t'&dte=0&date=' + formattedDate + '&' + powRefQueryString;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.movietickets && !!ticketProviders.movietickets && movie.movietickets && screening.datetime && allowedTicketProvider('movietickets', screening)) {\n\t\t\t\tif (tProviders.indexOf('movietickets') === -1) tProviders.push('movietickets');\n\t\t\t\tif (matchingDeeplink && matchingDeeplink.movietickets) {\n\t\t\t\t\turls.movietickets = matchingDeeplink.movietickets;\n\t\t\t\t} else if (this.location.country === 'us') {\n\t\t\t\t\tconst movieId = screening.movieticketsMovieId || movie.movietickets;\n\t\t\t\t\tconst dateTime = formatDateTime(screening.datetime, 'yyyy\\\\-MM\\\\-dd\\\\THH\\\\:mm');\n\t\t\t\t\turls.movietickets = `https://www.movietickets.com/switchboard/checkout?tid=${this.movietickets}&mid=${movieId}&datetime=${dateTime}&a=${affiliate}`;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.atom && !!ticketProviders.atom && movie.atom && screening.datetime && screening.tz_offset && allowedTicketProvider('atom', screening)) {\n\t\t\t\tif (tProviders.indexOf('atom') === -1) tProviders.push('atom');\n\t\t\t\t// urls.atom = `atom:///ViewVenueDetails?venueId=${this.atom}`;\n\t\t\t\tlet formattedDate;\n\t\t\t\tif (screening.nextDayDatetime) {\n\t\t\t\t\tformattedDate = formatDateTime(screening.nextDayDatetime, 'yyyy\\\\-MM\\\\-dd\\\\THH\\\\:mm\\\\:ss');\n\t\t\t\t} else {\n\t\t\t\t\tformattedDate = formatDateTime(screening.datetime, 'yyyy\\\\-MM\\\\-dd\\\\THH\\\\:mm\\\\:ss');\n\t\t\t\t}\n\t\t\t\tif (movie.hasOwnProperty('customAtomURL')) {\n\t\t\t\t\turls.atom = movie.customAtomURL;\n\t\t\t\t} else {\n\t\t\t\t\turls.atom = `https://www.atomtickets.com/checkout/redirect?venueId=${this.atom}&productionId=${movie.atom}&showtime=${formattedDate}${screening.tz_offset}`;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t// let ticketProviders = appData.pages.showtimes.data.ticketProviders;\n\t\ttProviders.sort((a, b) => ((ticketProviders[a] && ticketProviders[a].order) || 0) - ((ticketProviders[b] && ticketProviders[b].order) || 0));\n\t}\n}\n\n// Update the screenings\nfunction validateFilter(filter, obj, tester) {\n\tif (!filter) return true;\n\tif (!obj) return filter.allowNulls || !filter.current || !filter.current.length;\n\tlet mp = filter.matchProp || 'id';\n\tif (typeof tester !== 'function') {\n\t\tlet isArray = Array.isArray(obj);\n\t\ttester = v => isArray ? obj.indexOf(v[mp]) !== -1 : obj[mp] === v[mp];\n\t}\n\tif (filter.excluded && filter.excluded.find(v => tester(v, obj, filter)))\n\t\treturn false;\n\treturn !filter.current || !filter.current.length || filter.current.find(v => tester(v, obj, filter));\n}\n\nfunction inactiveScreeningsFilter(filter, obj) {\n\tif (!obj || !filter || !filter.disabled || !filter.disabled.length) return true;\n\tlet mp = filter.matchProp || 'id';\n\tlet val = obj[mp];\n\n\treturn !filter.disabled.find(v => v[mp] == val);\n}\n\nfunction validateMovie(val, obj) {\n\tif (!val) return false;\n\tif (obj.id === val.id || obj.provider_id + ':' + obj.provider_movie_id === val.id) return true;\n\treturn val.slug && val.slug === obj.slug;\n}\n\nfunction validateFormat(theater) {\n\treturn (val, obj, filter) => {\n\t\tlet mp = filter.matchProp || 'id';\n\t\tif (val.reald && !accessNested(theater, 'masterDoc.reald')) return false;\n\t\treturn obj[mp] === val[mp];\n\t};\n}\n\n// Tester function for theater filter - check id and provider id\nfunction validateTheater(val, obj) {\n\tif (!val || !val.id) return false;\n\tval = val.id;\n\tif (obj.id === val) return true;\n\tlet vals = val.split(':');\n\tlet prov = vals.shift();\n\tlet pid = vals.join(':');\n\tif (!prov || !pid) return false;\n\treturn obj.providerId === prov && (pid === '*' || obj.providerTheaterId === pid);\n}\n\nexport function filterTheater(theater, filters) {\n\n\ttheater.activeScreenings = theater.screenings.filter((s) => {\n\t\tlet passes = inactiveScreeningsFilter(filters.format, s.movie.format);\n\t\treturn passes;\n\t});\n\n\ttheater.filteredScreenings = theater.activeScreenings.filter((s) => {\n\t\tlet passes = validateFilter(filters.timeOfDay, s.timeOfDay) &&\n\t\t\tvalidateFilter(filters.movie, s.movie, validateMovie) &&\n\t\t\tvalidateFilter(filters.format, s.movie.format, validateFormat(theater)) &&\n\t\t\tvalidateFilter(filters.stDate, s.nextDaySTDate || s.stDate) &&\n\t\t\tvalidateFilter(filters.hour, { id: s.hour }) &&\n\t\t\tvalidateFilter(filters.minute, { id: s.minute }) &&\n\t\t\t// validateFilter(filters.exhibitor, theater.exhibitor) &&\n\t\t\tvalidateFilter(filters.ticketProvider, theater.providers);\n\t\treturn passes;\n\t}).sort((a, b) => a.datetime < b.datetime ? -1 : 1);\n\n\tlet filterPass = theater.filteredScreenings.length ? true : false;\n\n\t// remove active if doesn't pass filter (no filtered screenings)\n\ttheater.active = theater.active && !filterPass ? false : theater.active;\n\n\t// Is it active\n\ttheater.activeExhibitor =\n\t\tvalidateFilter(filters.exhibitor, theater.exhibitor) &&\n\t\tvalidateFilter(filters.theater, theater, validateTheater);\n\tlet pid = theater.providerId;\n\tif (pid === 'wwm' || pid === 'webuk' || pid === 'webus') {\n\t\ttheater.activeExhibitor = theater.activeExhibitor && validateFilter(filters.webedia, theater);\n\t}\n\n\t// Edit the instance but also return the properties to update the store object properly\n\n\t// in case we need to sort by date instead of distance\n\t// let firstDatetime = theater.firstDatetime = theater.filteredScreenings.length && theater.filteredScreenings[0].datetime;\n\t// let firstDate = theater.firstDate = accessNested(theater, 'filteredScreenings.0.stDate.date');\n\tlet firstDate = theater.firstDate = theater.filteredScreenings.reduce((p, s) => {\n\t\tlet date = accessNested(s, 'stDate.date');\n\t\tif (!p) return +date;\n\t\treturn date ? Math.min(p, date) : p;\n\t}, undefined);\n\n\treturn {\n\t\tfilteredScreenings: theater.filteredScreenings,\n\t\tactiveExhibitor: theater.activeExhibitor,\n\t\t// firstDatetime,\n\t\tfirstDate,\n\t\tfilterPass,\n\t\tactive: theater.active\n\t};\n}\n\n/**\n * Test if URL contains blacklisted theater.\n *\n * @param {string} url The url to test for.\n * @returns {boolean} True is the url contains the theater hostname.\n */\nfunction urlContainsBlacklistTheater(url, theater) {\n\tif (theater.providerId === 'pow') {\n\t\treturn false;\n\t}\n\tlet matcher = /((\\w*\\.)?(arclightcinemas\\.com|pacifictheatres\\.com))/i;\n\treturn matcher.test(url);\n}\n\nfunction allowedTicketProvider(provider, screening) {\n\tif (screening.disabledTicketsProviders && screening.disabledTicketsProviders.indexOf(provider) !== -1) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n","/**\n * Base file for all ticketing stuff\n * Contains MX enums and structures, typedefs and helpers.\n *\n * @module ticketing/public\n */\n\nimport { h } from 'preact';\nimport { isObject, accessNested, joinPaths, pathOnly } from 'utils/utils';\nimport Store from 'store/store';\nimport { getRelativeRoot } from 'components/core/link/link';\n\nconst IS_DEMO = typeof window !== 'undefined' && accessNested(window, '__INITIAL_STATE__.' +\n\t'appData.options.isDemoTicketing', false);\n\nconst IFRAME_COMMUNICATOR_PAGE_SLUG = 'iframe-communicator';\nconst PRINT_YOUR_TICKET_PAGE_SLUG = 'print-your-ticket';\n\n/** Fallback deeplinks providers (ordered by preference) */\nconst deeplinkProviders = ['cinema', 'fandango', 'movietickets', 'atom'];\n\n/**\n * Return whether ticketing is in demo mode.\n * Demo ticketing does use test data.\n *\n * @function\n * @return {!boolean} true if demo ticketing is enabled, false otherwise\n */\nexport const isDemoTicketing = () => IS_DEMO;\n\n/**\n * Available gateway identifiers\n * If you add a gateway here, then every exhibitor using this gateway will have direct\n * ticketing enable on the platform.\n *\n * @readonly\n * @enum {string}\n */\nexport const gateways = {\n\tAUTHNET:    'authnet',\n\tVANTIV:     'vantiv',\n\tPXPAY:      'pxpay',\n\tVERIFONE2:  'verifone2',\n\tBRAINTREE:  'braintree',\n\tMASTERCARD: 'mastercard'\n\t// PAYEEZY:   'payeezy'\n};\n\n/**\n * Payment gateway configurations.\n * For each payment gateway, the configuration of the payments.\n *\n * @readonly\n */\nexport const gatewayConfigs = {\n\tauthnet: {\n\t\tuseIframeComm: true\n\t},\n\tvantiv: {\n\t\tuseIframeComm: true\n\t},\n\tpxpay: {\n\t\tuseIframeComm: true\n\t},\n\tverifone2: {\n\t\tuseIframeComm: true\n\t},\n\tbraintree: {\n\t\tuseIframeComm: false\n\t},\n\tmastercard: {\n\t\tuseIframeComm: false\n\t}\n\t// payeezy: {\n\t// \tuseIframeComm: true\n\t// }\n};\n\n/**\n * Temporary default gateway for ticketing.\n * As the gateway is not available in the doc yet, you can use this for test purposes.\n *\n * @type {string}\n */\nexport const defaultGateway = gateways.AUTHNET;\n\n/**\n * Indicate the current status of the seat\n *\n * @readonly\n * @enum {number}\n * @see {@link https://bit.ly/2GKuww5|MX Ticketing Documentation}\n */\nexport const seatStatus = {\n\tAVAILABLE:   0,\n\tSOLD:        1,\n\tHOUSE:       2,\n\tWHEELCHAIR:  3,\n\tRESERVED:    4,\n\tBROKEN:      5,\n\tPLACEHOLDER: 6,\n\tCOMPANION:   7\n};\n\n/**\n * Enumeration of MX errors.\n * Can be used for localisation.\n *\n * @readonly\n * @enum {number}\n * @see {@link https://goo.gl/AuhR9D|MX Documentation}\n */\nexport const mxErrors = {\n\tUNEXPECTED_ERROR:                       10000, // An unexpected error/database error/component error has occurred\n\tCINEMA_CHAIN_CONFIG_ISSUE:              10001, // There's a configuration issue with the cinema chain requested\n\tAUTHORISATION_EXCEPTION:                10002, // An internal error occurred while trying to authorise the request\n\tVENDOR_CONFIGURATION_EXCEPTION:         10003, // There's a configuration issue with the authenticated vendor\n\n\tCINEMA_TICKET_SERVICE_ACCESS_ERROR:     20000, // Unable to reach the cinema's ticketing service\n\tCINEMA_TICKET_SERVICE_TIMEOUT:          20001, // Cinema’s ticketing service failed to respond in a timely manner\n\tCANT_CONNECT_TO_SITE:                   20002, // The Cinema’s ticketing service failed to connect to the specified site\n\tCANT_CONNECT_TO_LOYALTY:                20003, // The cinema’s ticketing service failed to connect to its loyalty system\n\n\tUNEXPECTED_CINEMA_TICKET_SERVICE_ERROR: 30000, // An unexpected error occurred at the cinema’s ticketing service\n\tFAILED_TO_RETRIEVE_SEATS_FOR_ORDER:     30001, // Seats were booked, but an unexpected error occurred while trying to retrieve seat information. Try to retrieve the order again\n\tFAILED_TO_PROCESS_ORDER_VALUE:          30002, // An unexpected error occurred while trying to calculate the order total. The order was cancelled\n\tREFUND_BOOKING_FAILED:                  30003, // The cinema's ticketing service was unable to refund this booking.\n\n\tCINEMA_TICKET_SERVICE_CONFIG_ERROR:     31001, // The cinema’s ticketing service has not been correctly configured with MXTransact\n\tCINEMA_TICKET_SERVICE_NOT_FOUND:        31002, // A site existing in MXTransact does not exist at cinema\n\n\tBOOKING_FEE_CONFIG_ERROR:               32001, // There’s a problem with the cinema’s ticketing service booking fee configuration\n\tPAYMENT_CONFIG_ERROR:                   32002, // There’s a problem with the cinema’s ticketing service payment configuration\n\n\tCINEMA_CHAIN_NOT_FOUND:                 40001, // The requested cinema chain cannot be found\n\tSITE_NOT_FOUND:                         40002, // The specified site cannot be found\n\tSHOWTIME_NOT_FOUND:                     40003, // The specified Showtime cannot be found\n\tTICKET_TYPES_MANDATORY:                 40004, // The client must provide the ticket types for the request.\n\tCONCESSIONS_NOT_SUPPORTED:              40005, // An attempt to purchase concessions was made, but Concessions are not supported in the API\n\tSHOWTIME_DOES_NOT_SUPPORT_SEATING:      40006, // An attempt to get screen layout was made, however, the Showtime is not configured to be seat-allocated\n\tTOTAL_PAYMENT_AMOUNT_IS_INSUFFICIENT:   40007, // The total payment amount specified doesn’t match the order total\n\tMULTI_SITE_ORDER_NOT_SUPPORTED:         40008, // A single order cannot contain sessions at more than one site\n\tORDER_DOES_NOT_EXISTS:                  40009, // Could not find an order with the specified ID\n\tNO_SEAT_MAP_FOR_SOLD_OUT_SHOWTIMES:     40010, // Seat map data was requested for a showtime that is already sold out\n\tTICKET_TYPE_NOT_FOUND:                  40011, // The requested ticket type was not found for the showtime\n\tREQUEST_TOO_LARGE:                      40012, // The request was too large.\n\tCUSTOMER_DETAILS_NOT_SET:               40013, // Customer details were not set for the order.\n\tVENDOR_ACCESS_NOT_ALLOWED:              40014, // You have no access to the Cinema Chain requested.\n\tREFUND_PAST_SCREENINGS_NOT_ALLOWED:     40015, // Cannot refund a booking when one or more tickets that are part of the booking are for screenings that have already screened.\n\tREFUND_CINEMA_CHAIN_NOT_ALLOWED:        40016, // The cinema chain does not allow refunds\n\tBOOKINS_BELONGS_TO_ANOTHER_VEND0R:      40017, // Cannot refund a booking made through a different vendor.\n\tINSUFFICIENT_CUSTOMER_DETAILS:          40018, // An email, name and/or phone number must be provided.\n\tLOYALTY_NOT_ALLOWED_FOR_CINEMA_CHAIN:   40019, // The cinema chain does not allow loyalty.\n\tINSUFFICIENT_LOYALTY_MEMBER_DETAILS:    40020, // Insufficient loyalty membership details.\n\tTICKET_TYPES_FOR_PAST_SCREENINGS:       40021, // Ticket types not available for past screenings.\n\n\tSEATS_UNAVAILABLE:                      41001, // The requested seats are not available\n\tNO_CONTIGUOUS_SEATS:                    41002, // The selected seats could not be automatically allocated in a single row\n\tBOOKING_DOES_NOT_EXIST:                 41003, // A booking with the specified ID does not exist\n\tBOOKING_ALREADY_CANCELLED:              41004, // The specified booking has already been cancelled\n\tSHOWTIME_UNAVAILABLE:                   41005, // The requested showtime is not available at the cinema’s ticketing service\n\tTICKET_NOT_FOR_SALE:                    41006, // Selected tickets are not currently for sale for this showtime\n\tSELECTED_SEATS_INVALID_FOR_THE_TICKET:  41007, // Selected seats are not valid for the tickets in the order\n\tORDER_ALREADY_BEING_COMPLETED:          41008, // A request to complete the order was already made and is currently in progress.\n\tORDER_CANNOT_BE_UNIQUELY_IDENTIFIED:    41009, // The cinema's ticketing service was not able to identify the requested order\n\tCOULD_NOT_GET_TICKET_TYPES_FOR_SESSION: 41010, // Could not get ticket types for the requested session. Please make sure the session is still available\n\tLOYALTY_MEMBER_NOT_FOUND:               41011  // Loyalty member could not be found.\n};\n\n/**\n * Enumeration of Powster ticketing server errors.\n * Can be used for localisation.\n *\n * @readonly\n * @enum {number}\n * @see {@link https://goo.gl/55yo3T|Powster Ticketing Error codes}\n */\nexport const powErrors = {\n\tINVALID_API_KEY:         101, // Invalid API developer key\n\tAUTH_FAIL:               102, // Authentication failed\n\tAUTH_EXPIRED:            103, // Authentication expired\n\n\tINVALID_EXHIBITOR:       301, // Unknown or incorrect exhibitor\n\n\tINVALID_ORDER:           501, // The order structure returned by MX is not valid\n\tNO_ORDER:                502, // The provided order does not exist in the ticketing database\n\tCOMPLETE_ORDER_FAIL:     503, // Failed to complete the order and get a proper booking reference\n\tNO_BOOKING_REF:          504, // The provided order does not have any booking reference\n\tNOT_YOUR_ORDER:          507, // You don't have access to this order\n\tPRIVATE_SCREENING:       508, // You don't have access to this screening\n\tTOO_MANY_ORDERS:         509, // Number of bookings for promotion exceeded\n\tTOO_MANY_TICKETS:        510, // Number of available tickets for promotion exceeded\n\n\tTRANSACTION_FAIL:        601, // The transaction was rejected\n\tNO_MERCHANT:             602, // The merchant does not exist\n\tTRANSACTION_VOID_FAIL:   603, // The given transaction cannot be voided\n\tNO_MERCHANT_CREDENTIALS: 604, // Could not acquire merchant credentials for the given site\n\n\tINVALID_PRICE:           901, // The price returned by MX is not a valid amount\n\tINVALID_BOOKING_FEE:     902  // Incorrect custom booking fee\n};\n\n/**\n * Return the key associated with a MX error code for localisation.\n *\n * @function\n * @param {!number} code - the MX error code\n * @return {string} the key associated with the given error id, or undefined if not found\n */\nexport const getMxErrorKey = (code) => Object.keys(mxErrors).find((key) => mxErrors[key] === code);\n\n/**\n * Return the key associated with a Powster Ticketing error code for localisation.\n *\n * @function\n * @param {!number} code - the Powster Ticketing error code\n * @return {string} the key associated with the given error id, or undefined if not found\n */\nexport const getPowErrorKey = (code) => Object.keys(powErrors).find((key) => powErrors[key] === code);\n\n/**\n * Return whether the given object is a valid error (as defined in the ticketing API)\n *\n * @param {*} obj - the variable to test\n * @return {!boolean} true if obj is an error object, false otherwise\n */\nconst isErrorObject = (obj) => {\n\tif (!isObject(obj) || !isObject(obj.data)) return false;\n\treturn isObject(obj.data.error) && typeof obj.data.from === 'string';\n};\n\n/**\n * Return whether the given object is a valid MX error (as defined in the MX API)\n *\n * @param {*} obj - the variable to test\n * @return {!boolean} true if obj is an MX error object, false otherwise\n */\nexport const isMxErrorObject = (obj) => {\n\treturn isErrorObject(obj) && obj.data.from === 'mx' &&\n\t\ttypeof obj.data.error.errorCode === 'number' &&\n\t\ttypeof obj.data.error.errorCodeDescription === 'string';\n};\n\n/**\n * Return whether the given object is a valid Powster Ticketing error.\n *\n * @param {*} obj - the variable to test\n * @return {!boolean} true if obj is a Powster Ticketing error object, false otherwise\n */\nexport const isPowErrorObject = (obj) => {\n\treturn isErrorObject(obj) && obj.data.from === 'pow' && typeof obj.data.error.code === 'number';\n};\n\n/**\n * @global\n * @typedef {Object} SeatLayout\n * @property {number} boundaryRight - the rightmost position of the map, in percentage 0-100\n * @property {number} boundaryLeft - the leftmost position of the map, in percentage 0-100\n * @property {number} boundaryTop - the topmost position of the map, in percentage 0-100\n * @property {number} screenStart - the leftmost position of the screen, in percentage 0-100\n * @property {number} screenWidth - the width of the screen, in percentage 0-100\n * @property {Array.<AreaCategory>} areaCategories - list of AreaCategories in the screen layout\n * @property {Array.<Area>} areas - list of Areas in the screen layout\n */\n\n/**\n * @global\n * @typedef {Object} AreaCategory\n * @property {string} areaCategoryCode - the ID of the area category\n * @property {number} seatsToAllocate - number of seats that must be allocated for the area category\n * @property {number} seatsAllocatedCount - number of seats that have been automatically allcoated\n * @property {number} seatsNotAllocatedCount - number of seats that have not been allocated\n * @property {Array.<SeatPosition>} selectedSeats - list of SeatPositions for the allocated seats\n */\n\n/**\n * @global\n * @typedef {Object} SeatPosition\n * @property {number} areaNumber - identifies which area the seat belongs to (1 based)\n * @property {number} rowIndex - the row within the area the seat belongs to (0 based)\n * @property {number} columnIndex - the column within the area the seat belongs to (0 based)\n */\n\n/**\n * @global\n * @typedef {Object} Area\n * @property {number} number - uniquely identifies the area within the seat layout\n * @property {string} areaCategoryCode - the area category code this area belong to\n * @property {number} numberOfSeats - total number of seats within this area\n * @property {number} columnCount - number of columns of seats in the area\n * @property {number} rowCount - number of rows of seats in the area\n * @property {string} description - textual description of the area (e.g. \"Premium\", \"Stalls\")\n * @property {number} left - the leftmost position of the area within the screen layout (0-100)\n * @property {number} top - the topmost position of the area within the screen layout (0-100)\n * @property {number} width - the width of the area within the screen layout (0-100)\n * @property {number} height - the height of the area within the screen layout (0-100)\n * @property {Array.<Row>} rows - list of Rows in the area\n */\n\n/**\n * @global\n * @typedef {Object} Row\n * @property {string} rowLabel - the name of the row\n * @property {Array.<Seat>} seats - list of seats in the row\n */\n\n/**\n * @global\n * @typedef {Object} Seat\n * @property {SeatPosition} position - the seat position object\n * @property {Array.<SeatPosition>} seatsInGroup - list of seat positions for grouped seats (sofas)\n * @property {string} seatLabel - name of the seat (commonly rowLable + seatLabel, e.g. \"A12\")\n * @property {SeatStatus} status - the current seat status\n * @property {SeatStatus} originalStatus - the seat status before being reserved\n */\n\n/**\n * Return whether direct ticketing is enabled for a specific theater.\n *\n * @function\n * @param {Theater} theater - the theater of the active screening\n * @return {boolean} true if direct ticketing is enabled, false otherwise\n */\nexport const isDirectTicketingEnabled = (() => {\n\tlet store_;\n\n\treturn (theater) => {\n\t\tif (!store_) store_ = Store.get();\n\n\t\tif (!store_.appData.options.enableDirectTicketing) return false;\n\t\tif (store_.appData.options.forceDirectTicketing) return true;\n\n\t\tif (window.__IS_FACEBOOK__) return false;\n\n\t\tif (document.location.protocol !== 'https:' && !window.__IS_DEMO__ && !window.__IS_LOCAL__) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst exhibitor = theater.exhibitor;\n\t\tif (!exhibitor) return false;\n\n\t\t// Check if ticketing is explicitly disabled in the theater master doc\n\t\tlet ticketingEnabled = accessNested(theater, 'masterDoc.ticketing.enabled', true);\n\t\tif (!ticketingEnabled) return false;\n\n\t\t// Check that ticketing is explicitly enabled in the exhibitor doc\n\t\tticketingEnabled = accessNested(exhibitor, 'doc.ticketing.enabled', false);\n\t\tconst paymentEnabled = accessNested(exhibitor, 'doc.payment.enabled', false);\n\n\t\t// TODO: Override on theater level\n\t\tif (!ticketingEnabled || !paymentEnabled) return false;\n\n\t\t// Make sure the payment gateway is known and supported\n\t\tconst gateway = accessNested(exhibitor, 'doc.payment.gateway', '');\n\t\tif (Object.values(gateways).indexOf(gateway) === -1) return false;\n\n\t\t// TEMP: Disable ticketing when the site is being iframed and the gateway is Mastercard\n\t\tif (window.self !== window.top && gateway === gateways.MASTERCARD) return false;\n\n\t\treturn true;\n\t};\n})();\n\n/**\n * Return a fallback url to be used in case of problem during the ticketing.\n *\n * @param {!Theater} theater - the theater of the screening\n * @param {!Screening} screening - the screening object\n * @return {string} a fallback URL\n */\nexport const getFallbackUrl = (theater, screening) => {\n\tlet fallbackUrl = theater.website;\n\tconst { urls } = screening;\n\n\tif (Object.keys(urls).length > 0) {\n\t\tfor (const providerName of deeplinkProviders) {\n\t\t\tconst url = urls[providerName];\n\t\t\tif (url) {\n\t\t\t\tfallbackUrl = url;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fallbackUrl;\n};\n\n/**\n * @global\n * @typedef {Object} TicketType\n * @property {string} id - the ID of the ticket type\n * @property {string} description - the name of the type of the ticket\n * @property {string} areaCategoryCode - the ID of the area category\n */\n\n/**\n * @global\n * @typedef {Object} AreaCategoryDef\n * @property {string} areaCategoryCode - the ID of the area category\n * @property {Array.<string>} descriptions - an array of all the ticket types names in this area\n */\n\n/**\n * Return an array of all the different area categories found.\n *\n * @param {!Array.<TicketType>} ticketTypes - the array of all ticket types\n * @return {!Array.<AreaCategoryDef>} an array of area category definitions\n */\nexport const getAreaCategories = (ticketTypes) => {\n\tconst areaCategories = [];\n\n\tfor (const { areaCategoryCode, description } of ticketTypes) {\n\t\tconst areaCategory = areaCategories.find(category => {\n\t\t\treturn category.areaCategoryCode === areaCategoryCode;\n\t\t});\n\t\tif (areaCategory) {\n\t\t\tareaCategory.descriptions.push(description);\n\t\t} else {\n\t\t\tareaCategories.push({ areaCategoryCode, descriptions: [description] });\n\t\t}\n\t}\n\n\treturn areaCategories;\n};\n\n/**\n * Return the tickets reserved by the user as a formatted string.\n *\n * @param {Object} tickets - the map of tickets selected by the user\n * @param {string=} areaCategoryCode - filter the tickets in a specific area category\n * @return {string} a textual representation of the booked tickets\n */\nexport const getTicketsText = (tickets, areaCategoryCode) => {\n\tconst ticketTypeStrs = [];\n\n\tfor (const ticketTypeId in tickets) {\n\t\tconst ticketType = tickets[ticketTypeId];\n\t\tif (!areaCategoryCode || ticketType.areaCategoryCode === areaCategoryCode) {\n\t\t\tticketTypeStrs.push(`${ticketType.description} \\u00D7 ${ticketType.quantity}`);\n\t\t}\n\t}\n\n\treturn ticketTypeStrs.join(', ');\n};\n\n/**\n * Return the number of ticket selected by the user.\n *\n * @param {Object=} ticketing - the ticketing state\n * @return {!number} the number of ticket purchased by the user\n */\nconst getTicketCount = (ticketing) => {\n\tif (!ticketing) ticketing = Store.get().showtimes.ticketing;\n\tconst tickets = ticketing.tickets.toJS();\n\n\tlet ticketCount = 0;\n\tfor (const ticketType in tickets) {\n\t\tticketCount += tickets[ticketType].quantity;\n\t}\n\n\treturn ticketCount;\n};\n\n/**\n * @typedef {Object.<string, TicketType>} TicketsMap\n */\n\n/**\n * Return the number of seat selectable by the user.\n *\n * @param {!Object.<string, TicketType>} tickets - the ticketing state\n * @return {!number} the numbe of seat selectable by the user\n */\nconst getTicketWithSeatCount = (ticketing) => {\n\tif (!ticketing) ticketing = Store.get().showtimes.ticketing;\n\tconst tickets = ticketing.tickets.toJS();\n\n\tlet seatCount = 0;\n\tfor (const ticketType in tickets) {\n\t\tif (tickets[ticketType].isAllocatedSeating) {\n\t\t\tseatCount += tickets[ticketType].quantity;\n\t\t}\n\t}\n\n\treturn seatCount;\n};\n\n/**\n * Return whether two seats position are equal.\n *\n * @function\n * @param {!SeatPosition} seatPos1 - the first seat position\n * @param {!SeatPosition} seatPos2 - the second seat position\n * @return {!boolean} true if the seat positions are equal, false otherwise\n */\nexport const areSeatPositionsEqual = (seatPos1, seatPos2) => {\n\treturn seatPos1.areaNumber === seatPos2.areaNumber &&\n\t\tseatPos1.rowIndex === seatPos2.rowIndex &&\n\t\tseatPos1.columnIndex === seatPos2.columnIndex;\n};\n\n/**\n * Return whether two seats objects reference the same seat.\n *\n * @function\n * @param {!Seat} seat1 - the first seat\n * @param {!Seat} seat2 - the second seat\n * @return {!boolean} true if the seats are equal, false otherwise\n */\nexport const areSeatsEqual = (seat1, seat2) => {\n\treturn areSeatPositionsEqual(seat1.position, seat2.position);\n};\n\n/**\n * Return whether a seat is a wheelchair.\n *\n * @param {!Seat} seat - the seat to test\n * @return {!boolean} true if the seat is a wheelchair, false otherwise\n */\nexport const isWheelchair = (seat) => (\n\tseat.status === seatStatus.WHEELCHAIR || seat.originalStatus === seatStatus.WHEELCHAIR\n);\n\n/**\n * Return whether a seat is a companion seat.\n *\n * @param {!Seat} seat - the seat to test\n * @return {!boolean} true if the seat is a companion seat, false otherwise\n */\nexport const isCompanionSeat = (seat) => (\n\tseat.status === seatStatus.COMPANION || seat.originalStatus === seatStatus.COMPANION\n);\n\n/**\n * Return whether the seat is reserved for a disabled person/companion.\n *\n * @function\n * @param {!Seat} seat - the seat to test\n * @return {!boolean} true if the seat is a wheelchair or a companion seat, false otherwise\n */\nexport const isSeatForDisablePeople = (seat) => isWheelchair(seat) || isCompanionSeat(seat);\n\n/**\n * Return whether all seats in a array are adjacent ot each other.\n *\n * @function\n * @param {!Array.<SeatPosition>} positions - an array of seat positions\n * @return {!boolean} true if all seat positions are contiguous\n */\nconst areSeatPositionsContiguous = (positions) => {\n\tconst count = positions.length;\n\tif (count < 2) return true;\n\n\tconst areaNumber = positions[0].areaNumber;\n\tconst rowIndex = positions[0].rowIndex;\n\n\t// check area and row\n\tfor (let i = 0; i < count; i++) {\n\t\tconst position = positions[i];\n\t\tif (position.areaNumber !== areaNumber || position.rowIndex !== rowIndex) return false;\n\t}\n\n\t// check contiguity\n\tconst columnIndices = positions.map(({ columnIndex }) => columnIndex);\n\tcolumnIndices.sort((a, b) => a - b);\n\tfor (let i = 1; i < count; i++) {\n\t\tif (columnIndices[i] !== columnIndices[i - 1] + 1) return false;\n\t}\n\n\treturn true;\n};\n\n/**\n * @typedef {Function} BinaryComparator\n * @param {!*} element - the element to compare\n * @param {*=} objective - the objective to reach\n * @return {!number} a negative if the objective is in the upper bound, a positive for the lower bound\n */\n\n/**\n * Perform a binary search on an array of element to reach the given objective\n *\n * @function\n * @param {!Array.<*>} array - an array of elements to search in\n * @param {!BinaryComparator} compare - a binary search comparator\n * @param {*=} objective - an optional parameter to the comparator\n * @return {*} the element, if found\n */\nconst binarySearch = (array, compare, objective) => {\n\tlet minIndex = 0;\n\tlet maxIndex = array.length - 1;\n\tlet currentIndex;\n\n\twhile (minIndex <= maxIndex) {\n\t\tcurrentIndex = (minIndex + maxIndex) >> 1;\n\t\tconst result = compare(array[currentIndex], objective);\n\t\tif (result < 0) {\n\t\t\tminIndex = currentIndex + 1;\n\t\t} else if (result > 0) {\n\t\t\tmaxIndex = currentIndex - 1;\n\t\t} else {\n\t\t\treturn array[currentIndex];\n\t\t}\n\t}\n\n\treturn null;\n};\n\n/**\n * Compare a seat with a column index to perform a binary comparison.\n *\n * @function\n * @type {BinaryComparator}\n * @param {!Seat} seat - the seat to test\n * @param {!number} columnIndex - the column index we're looking for\n * @return {!number} a negative if the objective is in the upper bound, a positive for the lower bound\n */\nconst compareSeatAtPosition = (seat, columnIndex) => seat.position.columnIndex - columnIndex;\n\n/**\n * Return the seat at the given position from a given seat layout.\n *\n * @function\n * @param {!SeatLayout} seatLayout - the seat layout, as defined in the MX API\n * @param {!SeatPosition} seatPosition - the position of the seat to get\n * @return {Seat} the seat from the layout at the given position, if it exists\n */\nconst getSeatAtPositionLayout = (seatLayout, seatPosition) => {\n\tconst { areaNumber, rowIndex, columnIndex } = seatPosition;\n\n\tconst area = seatLayout.areas.find(({ number }) => number === areaNumber);\n\tif (!area) return null;\n\n\tconst { rows } = area;\n\tlet row;\n\t// Attempt to guess the row in constant time\n\tif (rowIndex > 0 && rows.length > rowIndex && rows[rowIndex].seats.length > 0 &&\n\t\trows[rowIndex].seats[0].position.rowIndex === rowIndex) {\n\t\trow = rows[rowIndex];\n\t} else {\n\t\trow = rows.find(({ seats }) => seats.length > 0 && seats[0].position.rowIndex === rowIndex);\n\t}\n\tif (!row) return null;\n\n\t// We'll rarely be able to find the seat in constant time, it's not worth trying\n\treturn binarySearch(row.seats, compareSeatAtPosition, columnIndex);\n};\n\n/**\n * @global\n * @typedef {Array.<Array.<Array.<Seat>>>} SeatLookup\n */\n\n/**\n * Return a seat lookup from a seat layout, that can be used to speed us seat search.\n *\n * @function\n * @param {!SeatLayout} seatLayout - the seat layout, as defined in the MX API\n * @return {!SeatLookup} the corresponding seat lookup structure\n */\nexport const createSeatLookup = (seatLayout) => {\n\tconst lookup = [];\n\tlookup.isSeatLookup = true;\n\n\t// Create the structure\n\tconst { areas } = seatLayout;\n\tfor (const { rowCount, columnCount } of areas) {\n\t\tconst areaLookup = [];\n\t\tfor (let i = 0; i < rowCount; i++) {\n\t\t\tconst rowLookup = [];\n\t\t\tfor (let j = 0; j < columnCount; j++) {\n\t\t\t\trowLookup.push(null);\n\t\t\t}\n\t\t\tareaLookup.push(rowLookup);\n\t\t}\n\t\tlookup.push(areaLookup);\n\t}\n\t// Fill in the seats\n\tfor (const { rows } of areas) {\n\t\tfor (const { seats } of rows) {\n\t\t\tfor (const seat of seats) {\n\t\t\t\tconst { areaNumber, rowIndex, columnIndex } = seat.position;\n\t\t\t\tlookup[areaNumber - 1][rowIndex][columnIndex] = seat;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn lookup;\n};\n\n/**\n * Return the seat at the given position from a given seat layout.\n *\n * @function\n * @param {!SeatLayout} seatLayout - the seat layout, as defined in the MX API\n * @param {!SeatPosition} seatPosition - the position of the seat to get\n * @return {Seat} the seat from the layout at the given position, if it exists\n */\nconst getSeatAtPositionLookup = (seatLookup, seatPosition) => {\n\tconst areaLookup = seatLookup[seatPosition.areaNumber - 1];\n\tif (!areaLookup) return null;\n\n\tconst rowLookup = areaLookup[seatPosition.rowIndex];\n\tif (!rowLookup) return null;\n\n\treturn rowLookup[seatPosition.columnIndex] || null;\n};\n\n/**\n * Return the seat at the given position from a given seat layout.\n *\n * @function\n * @param {!SeatLayout} seatLayout - the seat layout, as defined in the MX API\n * @param {!SeatPosition} seatPosition - the position of the seat to get\n * @return {Seat} the seat from the layout at the given position, if it exists\n */\nexport const getSeatAtPosition = (seatLayout, seatPosition) => {\n\tif (seatLayout.lookup && seatLayout.lookup.isSeatLookup) {\n\t\treturn getSeatAtPositionLookup(seatLayout.lookup, seatPosition);\n\t}\n\treturn getSeatAtPositionLayout(seatLayout, seatPosition);\n};\n\n/**\n * Return the first wheelchair found in an array of seat positions.\n *\n * @function\n * @param {!SeatLayout} seatLayout - the seat layout, as defined in the MX API\n * @param {!Array.<SeatPosition>} seatsInGroup - array of seat positions in a disabled seats group\n * @return {Seat} the wheelchair of the group, or null if not found\n */\nexport const findWheelchairInGroup = (seatLayout, seatsInGroup) => {\n\tif (!Array.isArray(seatsInGroup)) {\n\t\tconsole.error('ticketingPublic.js: findWheelchairInGroup(): seatsInGroup is not an array',\n\t\t\tseatsInGroup);\n\t\treturn null;\n\t}\n\tif (seatsInGroup.length === 0) return null;\n\n\tfor (const seatPosition of seatsInGroup) {\n\t\tconst seat = getSeatAtPosition(seatLayout, seatPosition);\n\t\tif (seat && isWheelchair(seat)) {\n\t\t\treturn seat;\n\t\t}\n\t}\n\n\treturn null;\n};\n\n/**\n * Return whether the given seat is a sofa.\n *\n * @function\n * @param {!Seat} seat - the seat to test\n * @param {!SeatLayout} seatLayout - the seat layout, as defined in the MX API\n * @return {!boolean} true if the given seat is a sofa, false otherwise\n */\nexport const isSofa = (seat, seatLayout) => {\n\tconst { seatsInGroup } = seat;\n\tif (seatsInGroup.length < 2) return false;\n\tif (isWheelchair(seat)) return false;\n\tif (isCompanionSeat(seat) && findWheelchairInGroup(seatLayout, seatsInGroup)) return false;\n\treturn areSeatPositionsContiguous(seatsInGroup);\n};\n\n/**\n * @global\n * @typedef {Object} SelectedSeat\n * @property {string} rowName - the label of the row containing the seat\n * @property {string} seatName - the label of the seat selected\n * @property {number} ticketId - the identifier of the ticket used to reserve this seat\n */\n\n/**\n * @global\n * @typedef {Object} GroupedTicket\n * @property {string} ticketTypeId - the ID of the ticket type\n * @property {string} ticketTypeDescription - the name of the type of the ticket\n * @property {number} priceEach - the price for one ticket of this type\n * @property {number} quantity - the number of ticket of this type\n * @property {Array.<number>} ticketIds - the list of ticket identifiers in this group\n */\n\n/**\n * @global\n * @typedef {Object} TicketingSeat\n * @property {string} areaCategoryCode - the ID of the area category\n * @property {string} label - the full label of the seat\n * @property {string} rowName - the name of the seat row\n * @property {string} seatName - the name of the seat\n */\n\n/**\n * Return an array of selected seat labels per area category.\n *\n * @function\n * @param {!Array.<SelectedSeat>} selectedSeats - the array of selected seats, as returned by MX\n * @param {!Array.<GroupedTicket>} groupedTickets - the array of grouped tickets, as returned by MX\n * @param {!Array.<TicketType>} ticketTypes - the array of ticket types, as returned by MX\n * @return {!Array.<TicketingSeat>} an array of selected seat\n */\nexport const getSeats = (selectedSeats, groupedTickets, ticketTypes) => {\n\tconst seats = [];\n\n\tfor (const selectedSeat of selectedSeats) {\n\t\tconst { rowName, seatName, ticketId } = selectedSeat;\n\n\t\tconst areaCategory = groupedTickets.find(({ ticketIds }) => ticketIds.indexOf(ticketId) > -1);\n\t\tif (areaCategory) {\n\t\t\tconst { ticketTypeId } = areaCategory;\n\n\t\t\tconst ticketType = ticketTypes.find(({ id }) => id === ticketTypeId);\n\t\t\tif (ticketType) {\n\t\t\t\tseats.push({\n\t\t\t\t\tareaCategoryCode: ticketType.areaCategoryCode,\n\t\t\t\t\tlabel: rowName + seatName,\n\t\t\t\t\trowName,\n\t\t\t\t\tseatName\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tconsole.warn('ticketingPublic:getSeats(): Could not find ticket type for ' +\n\t\t\t\t\t'the area category:', areaCategory, 'in:', ticketTypes);\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.warn('ticketingPublic:getSeats(): Could not find the grouped ' +\n\t\t\t\t'tickets for the selected seat:', selectedSeat, 'in:', groupedTickets);\n\t\t}\n\t}\n\n\tseats.sort((seat1, seat2) => {\n\t\tconst { areaCategoryCode: area1 } = seat1;\n\t\tconst { areaCategoryCode: area2 } = seat2;\n\t\tif (area1 !== area2) {\n\t\t\treturn area1.localeCompare(area2, undefined, { numeric: true });\n\t\t}\n\t\tif (seat1.rowName !== seat2.rowName) {\n\t\t\treturn seat1.rowName.localeCompare(seat2.rowName);\n\t\t}\n\t\treturn seat1.seatName - seat2.seatName;\n\t});\n\n\treturn seats;\n};\n\n/**\n * @global\n * @typedef {Object} PickedSeat\n * @property {Seat} seat - the MX structure holding the seat\n * @property {number} lastAction - the timestamp of the last move for this seat\n */\n\n/**\n * Return whether all the seats of a sofa are picked.\n *\n * @param {!Array.<SeatPosition>} seatsInGroup - position of each seat in the sofa\n * @param {!Array.<PickedSeat>} pickedSeat - the array of picked seats\n * @return {!boolean} true if all seats are picked, false otherwise\n */\nconst areAllSeatsInSofaPicked = (seatsInGroup, pickedSeats) => {\n\tfor (const seatPosition of seatsInGroup) {\n\t\tconst pickedSeat = pickedSeats.find((pickedSeat) => {\n\t\t\treturn areSeatPositionsEqual(pickedSeat.seat.position, seatPosition);\n\t\t});\n\t\tif (!pickedSeat) return false;\n\t}\n\treturn true;\n};\n\n/**\n * Remove every seat of a sofa from the array of picked seats.\n *\n * @param {!Array.<SeatPosition>} seatsInGroup - position of each seat in the sofa\n * @param {!Array.<PickedSeat>} pickedSeats - the array of picked seats\n */\nconst removeSofaFromPickedSeats = (seatsInGroup, pickedSeats) => {\n\tfor (const seatPosition of seatsInGroup) {\n\t\tconst index = pickedSeats.findIndex((pickedSeat) => {\n\t\t\treturn areSeatPositionsEqual(pickedSeat.seat.position, seatPosition);\n\t\t});\n\t\tif (index > -1) pickedSeats.splice(index, 1);\n\t}\n};\n\n/**\n * Handler used for sorting an array of picked seats.\n *\n * @function\n * @param {PickedSeat} pickedSeat1 - the first picked seat\n * @param {PickedSeat} pickedSeat2 - the second picked seat\n * @return {number} how to sort the given picked seats.\n */\nconst pickedSeatsSorterStable = (pickedSeat1, pickedSeat2) => {\n\tconst pos1 = pickedSeat1.seat.position;\n\tconst pos2 = pickedSeat2.seat.position;\n\n\tlet diff = pos1.areaNumber - pos2.areaNumber;\n\tif (diff !== 0) return diff;\n\n\tdiff = pos1.rowIndex - pos2.rowIndex;\n\tif (diff !== 0) return diff;\n\n\t// NOTE: column indices are in reverse order\n\treturn pos2.columnIndex - pos1.columnIndex;\n};\n\n/**\n * Return the array of picked seats from the given seat layout.\n *\n * @function\n * @param {!SeatLayout} seatLayout - the seat layout, as defined in the MX API\n * @param {boolean=} removeIncompleteSofas - whether to discard incompletely picked sofas\n * @param {boolean=} sort - whether to sort the picked seats array\n * @return {!Array.<PickedSeat>} the array of picked seats taken from the seating map\n */\nexport const getPickedSeats = (seatLayout, removeIncompleteSofas = true, sort = true) => {\n\tconst pickedSeats = [];\n\tconst lastAction = Date.now();\n\n\tfor (const areaCategory of seatLayout.areaCategories) {\n\t\tfor (const seatPosition of areaCategory.selectedSeats) {\n\t\t\tconst seat = getSeatAtPosition(seatLayout, seatPosition);\n\t\t\tif (seat) {\n\t\t\t\tpickedSeats.push({ seat, lastAction });\n\t\t\t} else {\n\t\t\t\tconsole.warn('ticketingPublic:getPickedSeats(): Could not find seat at position:',\n\t\t\t\t\tseatPosition, 'in layout:', seatLayout);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (removeIncompleteSofas) {\n\t\t// Remove any picked sofa that doesn't have all its seats picked\n\t\tconst sofas = new Set();\n\t\t// TODO: The Set is useless in this case because all sofa arrays have independent refs\n\t\tfor (const { seat } of pickedSeats) {\n\t\t\tif (isSofa(seat, seatLayout)) sofas.add(seat.seatsInGroup);\n\t\t}\n\t\tfor (const sofa of sofas) {\n\t\t\tif (!areAllSeatsInSofaPicked(sofa, pickedSeats)) {\n\t\t\t\tremoveSofaFromPickedSeats(sofa, pickedSeats);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (sort) {\n\t\tpickedSeats.sort(pickedSeatsSorterStable);\n\t}\n\n\treturn pickedSeats;\n};\n\n/**\n * @global\n * @typedef {Object} SeatBoundingBox\n * @property {number} left - the leftmost position in the seating areas\n * @property {number} right - the rightmost position in the seating areas\n * @property {number} top - the topmost position in the seating areas\n * @property {number} bottom - the bottommost position in the seating areas\n */\n\n/**\n * Return the actual bounding box of the given seat layout.\n * The bounding box returned by MX does include:\n * <ul>\n *   <li>space between the screen and the seating areas</li>\n *   <li>empty seating rows</li>\n *   <li>screen width</li>\n * </ul>\n * The bounding box returned by this function only includes the seating area.\n *\n * @function\n * @param {!SeatLayout} seatLayout - the seat layout, as returned by MX\n * @return {!SeatBoundingBox} the bounding box of the seating areas\n */\nexport const getSeatLayoutBoundingBox = (seatLayout) => {\n\tconst box = {\n\t\tleft:   100.0,\n\t\tright:  0.0,\n\t\ttop:    100.0,\n\t\tbottom: 0.0\n\t};\n\n\tseatLayout.areas.forEach((area) => {\n\t\tconst { left, top, width, height, columnCount, rowCount, rows } = area;\n\t\tconst cellWidth = width / columnCount;\n\t\tconst cellHeight = height / rowCount;\n\n\t\tfor (let i = 0, il = rows.length; i < il; i++) {\n\t\t\tconst { seats } = rows[i];\n\t\t\tfor (let j = 0, jl = seats.length; j < jl; j++) {\n\t\t\t\tconst { columnIndex, rowIndex } = seats[j].position;\n\t\t\t\tbox.left = Math.min(left + columnIndex * cellWidth, box.left);\n\t\t\t\tbox.right = Math.max(left + (columnIndex + 1) * cellWidth, box.right);\n\t\t\t\tbox.top = Math.min(top + (rowIndex) * cellHeight, box.top);\n\t\t\t\tbox.bottom = Math.max(top + (rowIndex + 1) * cellHeight, box.bottom);\n\t\t\t}\n\t\t}\n\t});\n\n\t// Clip the bounding box in case of incorrect size\n\tif (box.left > box.right) box.left = box.right;\n\tif (box.top > box.bottom) box.top = box.bottom;\n\n\treturn box;\n};\n\n/**\n * Return whether the seats of a seat layout have a unique name.\n *\n * @function\n * @param {!SeatLayout} seatLayout - the seat layout, as returned by MX\n * @return {!boolean} true if each seat has a unique name, false otherwise\n */\nexport const hasUniqueSeatLabels = (seatLayout) => {\n\tconst set = new Set();\n\tconst { areas } = seatLayout;\n\n\tfor (let i = 0, il = areas.length; i < il; i++) {\n\t\tconst { rows } = areas[i];\n\n\t\tfor (let j = 0, jl = rows.length; j < jl; j++) {\n\t\t\tconst { seats } = rows[j];\n\n\t\t\tfor (let k = 0, kl = rows.length; k < kl; k++) {\n\t\t\t\tif (seats[k]) {\n\t\t\t\t\tconst { seatLabel } = seats[k];\n\n\t\t\t\t\tif (set.has(seatLabel)) return false;\n\t\t\t\t\tset.add(seatLabel);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true;\n};\n\n/**\n * Return the URL of the \"Print your ticket\" page.\n *\n * @return {string} the URL of the showtime ticket.\n */\nconst getRelativeUrl = (pageSlug) => {\n\tconst store = Store.get();\n\n\tconst page = accessNested(store, ['appData', 'pages', pageSlug], '');\n\tconst activePage = accessNested(store, 'activePage');\n\tconst activePath = getRelativeRoot(activePage.path);\n\n\t// On staging https, we need to append index.html\n\tconst appendIndex = window.location.pathname.split('/').pop() === 'index.html';\n\n\t// NOTE: We don't need to populate the ?redirect=off parameter\n\t//       because the iframe communicator doesn't have any geo fencing\n\n\tlet url = joinPaths(pathOnly(window.location.href), activePath, page.path);\n\tif (appendIndex) url = joinPaths(url, 'index.html');\n\n\treturn url;\n};\n\n/**\n* Return the URL of the payment notification page.\n*\n* @return {string} the URL to give to payment gateways as a callback.\n*/\nexport const getIframeCommunicatorUrl = () => getRelativeUrl(IFRAME_COMMUNICATOR_PAGE_SLUG);\nif (typeof window !== 'undefined') window.getIframeCommunicatorUrl = getIframeCommunicatorUrl;\n\n/**\n * Return the URL of the \"Print your ticket\" page.\n *\n * @return {string} the URL of the showtime ticket.\n */\nexport const getPrintYourTicketUrl = () => getRelativeUrl(PRINT_YOUR_TICKET_PAGE_SLUG);\n\n/**\n * Return whether the iframe communicator is ready.\n *\n * @return {Promise} true if the iframe communicator is ready, false otherwise.\n */\nexport const checkIframeCommunicatorUrl = (() => {\n\tlet prom_;\n\treturn function () {\n\t\tif (!prom_) {\n\t\t\tprom_ = fetch(getIframeCommunicatorUrl()).then(res => {\n\t\t\t\tif (res.status !== 200 && res.status !== 304) {\n\t\t\t\t\tthrow new Error('Error while getting iframe coomunicator');\n\t\t\t\t}\n\t\t\t\treturn res.text();\n\t\t\t}).then(res => {\n\t\t\t\tif (res.indexOf('PAYMENT_MESSAGE_RECEIVED') === -1) {\n\t\t\t\t\tthrow new Error('Incorrect setup for iframe communicator');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn prom_;\n\t};\n})();\n\n/**\n * Generate the card number placeholder to be used in payment forms.\n * This function is here to prevent security softwares from flagging raw card numbers as an issue.\n *\n * @return {!string} the card number placeholder\n */\nexport const generateCardNumPlaceholder = () => {\n\tconst a = [];\n\tfor (let i = 0; i < 19; i++) {\n\t\ta[i] = (i + 1) % 5 === 0 ? 0x20 : 0x31 + 3 * (i === 0);\n\t}\n\treturn String.fromCharCode.apply(null, a);\n};\n","export default class Exhibitor {\n\n\tconstructor(id, attr) {\n\t\tthis.id = id;\n\n\t\tthis.name = attr.name; // only used for MX so far\n\t\tthis.domain = attr.domain;\n\t\tthis.logo = attr.logo_file;\n\n\t\t// Contains ticketing info, and maybe other things in the future\n\t\tthis.doc = attr.doc;\n\n\t\t// add other theater attributes here\n\t}\n\n}\n","import formatDateTime from 'utils/formatDateTime';\nimport dataProviderToTicketProvider from 'utils/dataProviderToTicketProvider';\n\nconst timeOfDayMapping = {};\n\nlet now = new Date();\nlet tomorrow = new Date(+now);\ntomorrow.setDate(tomorrow.getDate() + 1);\nlet beginningOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate());\nlet todayStr = formatDateTime(now, 'dd\\\\/MM\\\\/yyyy');\nlet tomorrowStr = formatDateTime(tomorrow, 'dd\\\\/MM\\\\/yyyy');\nlet datesCache = {};\n\nexport default class Screening {\n\tstatic clearDatesCache() {\n\t\tdatesCache = {};\n\t}\n\n\tconstructor(id, attr, movie, appData) {\n\t\tlet copy = appData.copy;\n\n\t\t// Make all attributes from attr available (e.g. time, url, theater_id, cta, ...)\n\t\tObject.assign(this, attr);\n\t\tif (attr.tz_offset) {\n\t\t\tthis.tz_offset = getTZOffsetString(attr.tz_offset);\n\t\t}\n\n\t\tlet ticketProvider = dataProviderToTicketProvider[attr.provider_id];\n\t\tif (ticketProvider && this.url) {\n\t\t\tif (!this.srcTicketProviders) {\n\t\t\t\tthis.srcTicketProviders = {};\n\t\t\t}\n\t\t\tthis.srcTicketProviders[ticketProvider] = this.url;\n\t\t\tdelete this.url;\n\t\t}\n\n\t\tthis.id = id;\n\t\tthis.movie = movie;\n\n\t\tthis.providerScreeningId = attr.provider_screening_id;\n\n\t\tthis.setDateTime(attr.date, attr.time, copy);\n\t}\n\n\tgetSTDate(iso, copy, force) {\n\t\t// Force is breaking refs, you should use Screening.clearDatesCache() instead\n\t\tforce = false;\n\t\tif (force || !datesCache.hasOwnProperty(iso)) {\n\t\t\tdatesCache[iso] = new STDate(iso, copy);\n\t\t}\n\t\treturn datesCache[iso];\n\t}\n\n\tcreateDatetime(date, hour, minute) {\n\t\tlet datetime = new Date(date);\n\t\tdatetime.setHours(hour, minute, 0, 0);\n\t\treturn datetime;\n\t}\n\n\tsetDateTime(date, time, copy, force) {\n\t\tthis.date = date;\n\t\tthis.stDate = date && this.getSTDate(date, copy, force);\n\t\tif (time) {\n\t\t\tthis.time24 = time;\n\t\t\tlet timeSplit = time.split(':');\n\t\t\tthis.hour = +timeSplit[0];\n\t\t\tthis.minute = +timeSplit[1];\n\n\t\t\tlet timeOfDay = new TimeOfDay(this.hour, copy);\n\t\t\tif (!force && timeOfDayMapping.hasOwnProperty(timeOfDay.id))\n\t\t\t\tthis.timeOfDay = timeOfDayMapping[timeOfDay.id];\n\t\t\telse {\n\t\t\t\tthis.timeOfDay = (timeOfDayMapping[timeOfDay.id] = timeOfDay);\n\t\t\t}\n\n\t\t\tthis.datetime = this.createDatetime(this.stDate ? this.stDate.date : now, this.hour, this.minute);\n\n\t\t\tif (this.hour <= 2) {\n\t\t\t\tlet nextDay = new Date(date || +now);\n\t\t\t\tnextDay.setDate(nextDay.getDate() + 1);\n\t\t\t\tthis.nextDaySTDate = this.getSTDate(nextDay.toISOString(), copy);\n\t\t\t\tthis.nextDayDatetime = this.createDatetime(this.nextDaySTDate ? this.nextDaySTDate.date : now, this.hour, this.minute);\n\t\t\t} else {\n\t\t\t\tdelete this.nextDaySTDate;\n\t\t\t\tdelete this.nextDayDatetime;\n\t\t\t}\n\n\t\t\tthis.isPast = (this.nextDayDatetime || this.datetime) < now;\n\t\t} else {\n\t\t\tdelete this.time24;\n\t\t\tdelete this.hour;\n\t\t\tdelete this.minute;\n\t\t\tdelete this.timeOfDay;\n\t\t\tdelete this.datetime;\n\t\t\tdelete this.nextDaySTDate;\n\t\t\tdelete this.nextDayDatetime;\n\t\t\tif (this.stDate) {\n\t\t\t\tthis.isPast = this.stDate.date < beginningOfToday;\n\t\t\t}\n\t\t}\n\t}\n\n\toffsetDate(days, months, years, copy) {\n\t\tif (!this.date) return;\n\t\tlet parts = this.date.slice(0, 10).split('-');\n\t\tlet yoff = (+years || 0);\n\t\tlet moff = (+months || 0);\n\t\tlet doff = (+days || 0);\n\t\tlet d = new Date(Date.UTC(+parts[0] + yoff, parts[1] - 1 + moff, +parts[2] + doff));\n\t\tthis.setDateTime(d.toISOString(), this.time24, copy);\n\t}\n}\n\nexport class STDate {\n\tconstructor(dateStr, copy) {\n\t\t//2016-08-04\n\t\tlet year = +dateStr.slice(0,4);\n\t\tlet month = +dateStr.slice(5,7);\n\t\tlet day = +dateStr.slice(8,10);\n\t\tlet date = new Date(year, month - 1, day);\n\n\t\t//  TESTING: REMOVE THIS\n\t\t// date.setDate(date.getDate() + ~~(Math.random() * 10));\n\t\t// !!!!!!!!!!!!!!!!!\n\t\tthis.id = date.valueOf();\n\t\tthis.date = date;\n\n\t\t// this.dayShort = copy.$DATETIME_LOCALE.$DAYS_SHORT[date.getDay()];\n\t\t// this.monthShort = copy.$DATETIME_LOCALE.$MONTHS_SHORT[date.getMonth()];\n\t\t// this.dateNum = ('00'+date.getDate()).slice(-2);\n\t\t// We could format only where needed\n\t\tthis.dayShort = formatDateTime(date, 'ddd', copy.$DATETIME_LOCALE);\n\t\tthis.monthShort = formatDateTime(date, 'MMM', copy.$DATETIME_LOCALE);\n\t\tthis.dateNum = formatDateTime(date, 'dd', copy.$DATETIME_LOCALE);\n\t\t// \\\\/ because we always want an actual '/' instead of the locale date separator (which is a / anyway because we don't pass a locale)\n\t\tthis.ddmmyyyy = formatDateTime(date, 'dd\\\\/MM\\\\/yyyy');\n\t\tthis.yyyymmdd = formatDateTime(date, 'yyyy-MM-dd');\n\n\t\tthis.label = formatDateTime(date, copy.$DATE_FILTER_FORMAT || 'ddd MMMMM dd', copy.$DATETIME_LOCALE);\n\t\t// this.label = this.dayShort + ' ' + this.monthShort.toUpperCase() + ' ' + this.dateNum;\n\n\t\tif (this.ddmmyyyy === todayStr) {\n\t\t\tthis.label = copy.$TODAY;\n\t\t} else if (this.ddmmyyyy === tomorrowStr) {\n\t\t\tthis.label = copy.$TOMORROW;\n\t\t}\n\t}\n}\n\nclass TimeOfDay {\n\tconstructor(hour24, copy) {\n\t\tthis.id = getTimeOfDayId(hour24);\n\t\tthis.label = copy[this.id];\n\t}\n}\n\nfunction getTimeOfDayId(hour24) {\n\tif (hour24 >= 22 || hour24 <= 3) {\n\t\treturn '$LATE';\n\t} else if (hour24 >= 18 && hour24 < 22) {\n\t\treturn '$EVENING';\n\t} else if (hour24 >= 12 && hour24 < 18) {\n\t\treturn '$AFTERNOON';\n\t} else if (hour24 > 3 && hour24 < 12) {\n\t\treturn '$MORNING';\n\t} else {\n\t\treturn '$UNKNOWN';\n\t}\n}\n\nfunction getTZOffsetString(offset) {\n\tlet sign = (offset.hours && offset.hours < 0) || (offset.minutes && offset.minutes < 0) ? '-' : '+';\n\tlet hours = offset.hours ? Math.abs(offset.hours) : 0;\n\thours = hours < 10 ? `0${hours}` : hours.toString();\n\tlet minutes = offset.minutes ? Math.abs(offset.hours) : 0;\n\tminutes = minutes < 10 ? `0${minutes}` : minutes.toString();\n\n\treturn `${sign}${hours}:${minutes}`;\n}\n","export default class Format {\n\n\tconstructor(id, attributes) {\n\t\tthis.id = id;\n\t\tObject.assign(this, attributes);\n\t\tthis.name = this.name || '?';\n\t\tthis.label = this.name;\n\t\tthis.slug = this.name.toLowerCase().replace(/\\s/g, '');\n\t}\n\n}\n","import { h, Component } from 'preact';\nimport s from 'components/shared/svgIcons/svgIcons.sss';\n\n// --- try to use https://jakearchibald.github.io/svgomg/ to reduce the size of your svgs ---\n// --- Also (see more details above the exports), if a SVG is very specific to a movie, use svgRenderer instead of adding it to this file ---\n\n\n// Creates an immutable svg element\n// Avoids using innerHTML (slow)\nclass SVGContent extends Component {\n\n\trefresh(props) {\n\t\tif (typeof document === 'undefined') return;\n\t\tprops = props || this.props;\n\t\tthis.inner = this.createSVGTree(props.content);\n\t\tif (this.inner && this.base) {\n\t\t\tthis.base.appendChild(this.inner);\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.refresh();\n\t}\n\n\t// shouldComponentUpdate() {\n\t// \treturn false;\n\t// }\n\n\tcomponentDidUpdate(oldProps) {\n\t\tif (oldProps.children !== this.props.children) {\n\t\t\tthis.refresh();\n\t\t} else if (this.base && this.inner && this.base.childNodes.length !== 1) {\n\t\t\twhile (this.base.firstChild) {\n\t\t\t\tthis.base.removeChild(this.base.firstChild);\n\t\t\t}\n\t\t\tthis.base.appendChild(this.inner);\n\t\t}\n\t}\n\n\tsetAttributes(el, attrs) {\n\t\tif (!el || !attrs) return;\n\t\tconst names = Object.keys(attrs);\n\t\tfor (let i = 0, l = names.length; i < l; i++) {\n\t\t\tconst name = names[i];\n\t\t\tel.setAttribute(name, attrs[name]);\n\t\t}\n\t}\n\n\tcreateSVGTree(source) {\n\t\tif (!source) return null;\n\t\tconst el = document.createElementNS('http://www.w3.org/2000/svg', source.nodeName);\n\t\tthis.setAttributes(el, source.attributes);\n\t\tif (source.children) {\n\t\t\tfor (let i = 0, l = source.children.length; i < l; i++) {\n\t\t\t\tconst ch = this.createSVGTree(source.children[i]);\n\t\t\t\tif (ch) el.appendChild(ch);\n\t\t\t}\n\t\t}\n\t\treturn el;\n\t}\n\n\trender(props) {\n\t\tconst containerProps = Object.assign({}, props);\n\t\tdelete containerProps.content;\n\t\treturn (<div {...containerProps} />);\n\t}\n\n}\n\nfunction svgRenderer(svgContent) {\n\t// http://stackoverflow.com/a/25184858/1336843\n\t// To reduce document size, we should probably inline it (body.appendChild and display: none) the first time, and use the `use` tag !\n\n\treturn ({ ...props }) => (<SVGContent {...props} class={[s.wrapper].concat(props.class).filter(e => e).join(' ')} content={svgContent} />);\n}\n\nconst SvgVideos = svgRenderer(<svg class={s.svgIcon} viewBox='0 0 50 50'>\n\t<path d='M 20 18 L 34 25 L 20 33 L 20 18 ZM 10 12 C 7.1494 12 5 14.2457 5 17 L 5 34 C 5 36.7542 7.1494 39 10 39 L 40 39 C 42.8503 39 45 36.7542 45 34 L 45 17 C 45 14.2457 42.8503 12 40 12 L 10 12 Z' />\n</svg>);\n\nconst SvgSynopsis = svgRenderer(<svg class={s.svgIcon} viewBox='0 0 50 50'>\n\t<path d='M 30.9396 10.3793 C 30.9396 11.1035 30.4849 11.5172 30 12 C 26.6056 15.3793 23.3937 18.6205 20 22 C 21.0945 18.293 16.9395 17.2758 15 18 C 18.1516 14.3794 22.3635 10.6207 26 7 C 26.4847 7 26.8182 7 27.3027 7 C 29.9695 7 30.9396 8.931 30.9396 10.3793 ZM 37 27 C 37 28.6898 28.9092 36.8278 26 39 C 25.7578 38.7588 26 38.4828 26 38 C 26 35.8276 14 24.2414 14 24 C 13.7576 23.5172 13 22.6897 13 22.207 C 13 20.2758 14.0609 19 16 19 C 19.152 19 19 22.069 19 24 L 28 16 C 29.4549 17.4484 37 23.8621 37 27 ZM 25 39 C 25 40.6896 23.2119 42 22 42 C 19.333 42 19 39.2068 19 38 C 19 37.2758 19.8177 34 22 34 C 23.4543 34 25 38.2758 25 39 Z' />\n</svg>);\n\nconst SvgShowtimes = svgRenderer(<svg class={s.svgIcon} viewBox='0 0 50 50'>\n\t<path d='M 25.3158 11.6842 L 38.3158 24.6842 L 18 45 L 14.3438 41.3438 C 14.3438 41.3438 16.6093 39.1685 13.6316 36.3684 C 10.7015 33.6131 8.7465 35.7465 8.7465 35.7465 L 5 32 L 25.3158 11.6842 Z' />\n\t<path d='M 40.0263 22.9737 L 27.0263 9.9737 L 32 5 L 35.6563 8.6563 C 35.6563 8.6563 33.3907 10.8315 36.3684 13.6316 C 39.2985 16.3869 41.2535 14.2535 41.2535 14.2535 L 45 18 L 40.0263 22.9737 Z' />\n</svg>);\n\nconst SvgShare = svgRenderer(<svg class={s.svgShareIcon} viewBox='0 0 50 50'>\n\t<path d='M 6 25 C 6 21.9624 8.4624 19.5 11.5 19.5 C 14.5376 19.5 17 21.9624 17 25 C 17 28.0376 14.5376 30.5 11.5 30.5 C 8.4624 30.5 6 28.0376 6 25 Z' />\n\t<path d='M 30 14 C 30 10.9624 32.4624 8.5 35.5 8.5 C 38.5376 8.5 41 10.9624 41 14 C 41 17.0376 38.5376 19.5 35.5 19.5 C 32.4624 19.5 30 17.0376 30 14 Z' />\n\t<path d='M 30.5 36.5 C 30.5 33.7385 32.7385 31.5 35.5 31.5 C 38.2615 31.5 40.5 33.7385 40.5 36.5 C 40.5 39.2615 38.2615 41.5 35.5 41.5 C 32.7385 41.5 30.5 39.2615 30.5 36.5 Z' />\n\t<path d='M 35.5 13.9375 L 11.4375 25 L 35.5625 36.5625 ' />\n</svg>);\n\nconst SvgLink = svgRenderer(<svg class={s.svgIcon} viewBox='0 0 380 380' xmlns='http://www.w3.org/2000/svg'>\n\t<path d='M345.5 318.5q-20 20-47 20t-47-19l-105-105q-19-20-19-47t20-47l13-13q20-20 47.5-20t47.5 19l105 105q19 20 19 47t-20 47l-14 13zm-14-14l13-14q14-13 14.5-32.5t-13.5-32.5l-105-105q-14-13-32.5-13t-32.5 14l-14 14q-14 13-14.5 32.5t13.5 32.5l105 105q14 13 33 13t33-14zm-112-31q-20 20-47.5 20t-47.5-19l-105-105q-19-20-19-47t20-47l14-14q20-20 47-20t47 19l105 105q19 20 19 47.5t-20 47.5l-13 13zm-15-14l14-14q14-13 14.5-32.5t-13.5-32.5l-105-105q-14-13-33-13t-33 14l-13 13q-14 13-14.5 33t13.5 33l105 105q14 13 32.5 13t32.5-14z' />\n</svg>);\n\nconst SvgUser = svgRenderer(<svg class={s.svgUserIcon} viewBox='0 0 100.33333 137.33333'>\n\t<rect x='2.5' y='63.83333' width='95.33333' height='71' rx='27' ry='27'/>\n\t<circle cx='50' cy='33.33333' r='30.83333'/>\n</svg>);\n\nconst SvgHeart = svgRenderer(<svg viewBox='0 0 769 705' xmlns='http://www.w3.org/2000/svg'>\n\t<path d='M385.026 705.052C784.07 391.477 769.052 279.985 769.052 193.026S697.075 1 577.026 1s-192 128.026-192 128.026S313.076 1 193.026 1 1 106.067 1 193.026s-15.02 198.45 384.026 512.026z'/>\n</svg>);\n\nconst SvgCopy = svgRenderer(<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>\n\t<path d='M3.2 4c-.1 0-.2.1-.2.2v18.6c0 .1.1.2.2.2h14.6c.1 0 .2-.1.2-.2V4.2c0-.1-.1-.2-.2-.2H3.2zM4 5v17h13V5H4zm2-2h1V2h13v17h-1v1h2V1H6v2z' fill-rule='evenodd'/>\n</svg>);\n\nconst SvgEdit = svgRenderer(<svg class={s.svgBase} viewBox='0 0 528.899 528.899'>\n\t<path d='M328.883,89.125l107.59,107.589l-272.34,272.34L56.604,361.465L328.883,89.125z M518.113,63.177l-47.981-47.981c-18.543-18.543-48.653-18.543-67.259,0l-45.961,45.961l107.59,107.59l53.611-53.611C532.495,100.753,532.495,77.559,518.113,63.177z M0.3,512.69c-1.958,8.812,5.998,16.708,14.811,14.565l119.891-29.069L27.473,390.597L0.3,512.69z'/>\n</svg>);\n\nconst SvgSearch = svgRenderer(<svg class={s.svgBase} viewBox='0 0 512 512'>\n\t<path d='M496.131 435.698l-121.276-103.147c-12.537-11.283-25.945-16.463-36.776-15.963 28.628-33.534 45.921-77.039 45.921-124.588 0-106.039-85.961-192-192-192s-192 85.961-192 192 85.961 192 192 192c47.549 0 91.054-17.293 124.588-45.922-0.5 10.831 4.68 24.239 15.963 36.776l103.147 121.276c17.661 19.623 46.511 21.277 64.11 3.678s15.946-46.449-3.677-64.11zM192 320c-70.692 0-128-57.308-128-128s57.308-128 128-128 128 57.308 128 128-57.307 128-128 128z' />\n</svg>);\n\nconst SvgMarker = svgRenderer(<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'>\n\t<path d='M173.57 75.26q0 18.18-19.02 49.47T116.5 178l-19.04 22q-2.96-3.38-7.6-9.3t-16.92-22.62-21.78-31.5-17.12-32.35-7.6-28.97q0-30.87 21.55-52.64T100 .84t52 21.78 21.57 52.64z'/>\n</svg>);\n\nconst SvgStar = svgRenderer(<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>\n\t<path d='M8.28 7.92s-4.46.492-7.434.823c-.268.032-.505.21-.594.484s0 .556.197.735c2.21 2.016 5.53 5.036 5.53 5.036-.004 0-.912 4.392-1.516 7.323-.05.266.045.547.276.715.23.168.526.17.76.04 2.6-1.48 6.5-3.703 6.5-3.703l6.495 3.704c.237.13.533.127.763-.04.232-.17.328-.45.276-.713-.604-2.933-1.512-7.325-1.512-7.325s3.32-3.02 5.53-5.032c.198-.185.285-.468.198-.74s-.325-.45-.593-.48c-2.974-.334-7.435-.827-7.435-.827l-3.08-6.817C12.526.86 12.284.688 12 .688s-.53.173-.64.415C10.125 3.83 8.28 7.92 8.28 7.92z'/>\n</svg>);\n\nconst SvgFullScreenOpen = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg'  viewBox='0 0 8 8'>\n\t<path d='M0 0v4l1.5-1.5 1.5 1.5 1-1-1.5-1.5 1.5-1.5h-4zm5 4l-1 1 1.5 1.5-1.5 1.5h4v-4l-1.5 1.5-1.5-1.5z' />\n</svg>);\n\nconst SvgFullScreenClose = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'>\n\t<path d='M1 0l-1 1 1.5 1.5-1.5 1.5h4v-4l-1.5 1.5-1.5-1.5zm3 4v4l1.5-1.5 1.5 1.5 1-1-1.5-1.5 1.5-1.5h-4z' />\n</svg>);\n\n// Just a triangle. Is it supposed to be 'caret' ?\nconst SvgCarrotDown = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'>\n\t<path d='M0 0l4 4 4-4h-8z' transform='translate(0 2)' />\n</svg>);\n\nconst SvgCarrotUp = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'>\n\t<path d='M4 0l-4 4h8l-4-4z' transform='translate(0 2)' />\n</svg>);\n\nconst SvgTick = svgRenderer(<svg viewBox='0 0 16 13' xmlns='http://www.w3.org/2000/svg'>\n\t<path d='M5 8.993l-3-3-2 2 5.008 5.01 2.005-1.996L15.993 2l-2-2' fill-rule='evenodd'/>\n</svg>);\n\n// Flip it using CSS transforms\nconst SvgArrowRight = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'>\n\t<path d='M8.5 17.5c-.3 0-.5-.1-.7-.3s-.3-.4-.3-.7.1-.5.3-.7l5.7-5.7H1.4c-.6 0-1-.4-1-1s.4-1 1-1h12.1L7.7 2.3c-.2-.2-.3-.4-.3-.7s.1-.5.3-.7c.4-.4 1-.4 1.4 0l7.5 7.5c.4.4.4 1 0 1.4l-7.5 7.5c0 .1-.3.2-.6.2z'/>\n</svg>);\n\nconst SvgFatArrowRight = svgRenderer(<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 493.356 493.356\">\n\t<path d=\"M490.498,239.278l-109.632-99.929c-3.046-2.474-6.376-2.95-9.993-1.427c-3.613,1.525-5.427,4.283-5.427,8.282v63.954H9.136 c-2.666,0-4.856,0.855-6.567,2.568C0.859,214.438,0,216.628,0,219.292v54.816c0,2.663,0.855,4.853,2.568,6.563 c1.715,1.712,3.905,2.567,6.567,2.567h356.313v63.953c0,3.812,1.817,6.57,5.428,8.278c3.62,1.529,6.95,0.951,9.996-1.708 l109.632-101.077c1.903-1.902,2.852-4.182,2.852-6.849C493.356,243.367,492.401,241.181,490.498,239.278z\"/>\n</svg>);\n\nconst SvgBin = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 21'>\n\t<path d='M17.5 3H14V1c0-.5-.5-1-1-1H5c-.5 0-1 .5-1 1v2H.5c-.3 0-.5.2-.5.5v2c0 .3.2.5.5.5h.6l1.8 14.5c.1.3.3.5.6.5h11c.3 0 .5-.2.6-.5L16.9 6h.6c.3 0 .5-.2.5-.5v-2c0-.3-.2-.5-.5-.5zM5 1h8v2H5V1zm9.1 19h-1.5l.9-10.4c0-.3-.2-.6-.5-.6s-.5.2-.5.5L11.6 20H9.5V9.5c0-.3-.2-.5-.5-.5s-.5.2-.5.5V20H6.4L5.5 9.5c0-.3-.2-.5-.5-.5s-.5.3-.5.6L5.4 20H3.9L2.2 6h13.6l-1.7 14zM17 5H1V4h16v1z'/>\n</svg>);\n\nconst SvgSpeaker = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' version='1' viewBox='0 0 75 75'>\n\t<g stroke-width='5' style='stroke: currentColor'>\n\t\t<path style='fill: currentColor' stroke-linejoin='round' d='M39.39 13.77L22.234 28.605H6V47.7h15.99l17.4 15.05V13.77z'/>\n\t\t<path d='M48.128 49.03c1.93-3.096 3.062-6.74 3.062-10.653 0-3.978-1.164-7.674-3.147-10.8m7.04-7.04c3.694 4.986 5.883 11.157 5.883 17.84 0 6.62-2.15 12.738-5.788 17.7m6.532 6.533c5.267-6.665 8.418-15.08 8.418-24.232 0-9.217-3.192-17.682-8.52-24.368' fill='none' stroke-linecap='round'/>\n\t</g>\n</svg>);\n\nconst SvgMuted = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' version='1' viewBox='0 0 75 75'>\n\t<g style='stroke: currentColor' stroke-width='5'>\n\t\t<path stroke-linejoin='round' style='fill: currentColor' d='M39.39 13.77L22.234 28.605H6V47.7h15.99l17.4 15.05V13.77z'/>\n\t\t<path d='M48.652 50.27l20.743-24.3m0 24.3l-20.743-24.3' fill='none' stroke-linecap='round'/>\n\t</g>\n</svg>);\n\nconst SvgImax = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 305.55 57.175' >\n\t<path d='M46.982 56.985l.022-40.99h2.983l20.02 40.946h12.95l20.02-40.923 3.158-.066-.11 41.035h16.02L122 .947l-27.974.088-17.545 32.97L59.865.99l-28.86.09-.043 55.905zM0 0h18.992v57.002H0zM154.25.77l-28.624 56.217 18.03.188 5.657-10.094 35.53-.186 4.94 9.906 18.75.187L179.906.77zM167 12.8l12 21.937-23.156.157zM235.938.943l-21.125.125 21.75 25.625-26.375 30.25 22.625.125 18.5-20.625 17.625 20.625 23.375-.125-26.375-30.125 21.625-25.625-21.75-.375-14.5 18.125z'/>\n\t<path d='M295.608 8.126h2.083c.747 0 1.277-.122 1.59-.365.316-.243.473-.642.473-1.2 0-.25-.05-.48-.15-.682-.1-.202-.238-.363-.417-.48-.143-.1-.316-.17-.52-.212-.202-.043-.542-.065-1.02-.065h-2.038zm-1.018 4.64v-8.56h2.904c.646 0 1.12.028 1.424.084.303.056.567.147.792.272.35.198.62.47.808.813.187.344.28.732.28 1.164 0 .533-.12.985-.365 1.356-.243.372-.57.6-.98.69.313.05.55.203.708.456.16.252.27.742.33 1.47l.11 1.25c.013.185.04.335.08.45.042.116.104.208.186.278v.277h-1.055c-.072-.14-.125-.282-.156-.427-.03-.145-.055-.323-.07-.532l-.097-1.104c-.054-.735-.178-1.196-.37-1.383-.192-.186-.594-.28-1.205-.28h-2.304v3.727z' style='line-height:125%;-inkscape-font-specification:Swis721 Lt BT Bold' font-family='Swis721 Lt BT' font-size='11.811' font-weight='bold' letter-spacing='0' word-spacing='0'/>\n\t<path d='M506.563 464.3c0 4.383-3.806 7.937-8.5 7.937-4.695 0-8.5-3.554-8.5-7.937 0-4.384 3.805-7.938 8.5-7.938 4.694 0 8.5 3.554 8.5 7.938z' transform='matrix(.88297 0 0 .94554 -142.227 -430.4)' fill='none' stroke='currentColor' stroke-width='1.094' />\n</svg>);\n\nconst SvgImax3d = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 49'>\n\t<g fill-rule='evenodd'>\n\t\t<path d='M286.878.243c-9.088.883-12.223 4.09-12.72 13.018l-.187 3.36H288v-1.54c0-4.68.62-4.9 14.06-4.84 12.654.05 13.147.23 13.134 4.86-.012 3.98-.932 4.33-11.38 4.33H296v9.52l8.7.15c11.218.19 11.68.4 11.695 5.19.003 1.24-.25 2.17-.76 2.8l-.764.95-12.47.098-12.47.094-1.16-1.165c-1.03-1.03-1.16-1.444-1.16-3.594v-2.43h-14l.01 3.7c.01 8.355 3.24 12.35 10.95 13.55 5.48.85 36.03.23 38.85-.79 5.16-1.87 6.73-4.67 6.76-12.06.02-7.542-1.573-9.81-7.75-11-1.42-.272-1.34-.433.496-.974 5.09-1.51 6.1-3.16 6.1-10.01 0-7.075-1.08-9.606-4.89-11.446-1.664-.803-1.56-.77-4.112-1.402-2.183-.542-28.28-.81-33.122-.34M181.27 1.37c13.814 16.197 17.884 21.43 17.62 21.624l-22.225 25.22h19.407l15.8-17.717 15.193 17.73 19.766-.213-22.56-24.967C240.05 3.96 241.64 2.112 242.23 1.53c1.2-1.2.468-1.315-8.402-1.315h-8.975l-2.28 2.7-10.742 12.887c-6.86-8.16-9.63-11.37-12.65-15.087-.3-.374-2.73-.5-9.62-.5h-9.22l.94 1.154M247.2.48c-3.76 1.467-2.844 7.086 1.6 6.932 1.275-.232 1.65-.455 2.2-1.2 2.198-2.98-.484-7.026-3.8-5.732M336 24.215V48.26l25.1-.15c13.805-.08 25.64-.28 26.3-.44 11.118-2.713 12.4-5.2 12.4-24.055 0-16.66-1.816-20.564-10.4-22.362-.66-.138-1.65-.373-2.2-.52-.55-.15-12.295-.336-26.1-.416L336 .17M0 24.416v23.8h15.2V.616H0v23.8m25.6 0v23.8h13.6v-34.4h2.817l4.63 9.5c2.547 5.224 5.873 12.01 7.392 15.08 3.48 7.22 4.04 8.97 4.4 9.6.51.436.08.22 5.94.22h5.48l1.06-2.176 15.65-32.16 3.01-.286v34.62h13.2V.604L90.5.71c-11.93.1-11.84.078-12.44.904-10.795 21.524-13.49 26.696-13.66 26.8-5.338-9.79-7.69-14.413-10-19.147L50.2.66 37.9.637 25.6.615m103.675.3c-22.988 45.697-23.04 46.06-23.275 46.5-.422.788-.304.8 7.565.8h7.993l4.242-8.37 30.123-.048 4.183 8.418c12.318 0 15.894-.06 15.894-.133-18.52-36.55-20.43-40.374-21.692-42.89L152.016.614h-11.408c-6.274 0-11.374.135-11.333.3m121.105.803c1.206.977 1.21 3.03.01 4.306-2.55 2.716-6.667-1.023-4.358-3.96.99-1.258 3.02-1.42 4.348-.346m-3.58 2.145c0 1.073.18 1.952.4 1.952.22 0 .4-.343.4-.763 0-.56.207-.7.8-.55.44.12.8.46.8.76 0 .31.16.56.357.56.196 0 .33-.85.3-1.89l-.057-1.9-1.5-.06-1.5-.05v1.95m2.4-.65c0 .34-.356.6-.8.6-.444 0-.8-.26-.8-.6 0-.33.356-.6.8-.6.444 0 .8.27.8.6M146.1 20.01c2.365 4.72 4.3 8.673 4.3 8.78l-19.485.425 3.2-6.4c7.227-14.448 6.267-14.223 11.985-2.806m235.732-6.9c3.074 1.49 3.458 2.84 3.3 11.59-.208 11.49.88 10.87-19.232 11.02l-15.1.12V12.19l14.63.028c14.135.027 14.687.057 16.402.89'/>\n\t\t<path fill='#fff' d='M102.988 24.6c0 13.2.05 18.542.112 11.87.06-6.67.06-17.47 0-24-.062-6.528-.112-1.07-.112 12.13M329.3 13c.005.88.087 1.193.183.695.096-.497.092-1.217-.008-1.6-.1-.382-.18.025-.174.905'/>\n\t</g>\n</svg>);\n\n// Path#1 : fill='#231f20'\nconst SvgRealD = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 603.34 69.17'>\n\t<path d='M502.58 3.05h-49.34v12.76h48.32a6.9 6.9 0 0 1 .37 13.79h-28.45v12.73h28.07a6.9 6.9 0 0 1 .37 13.79h-48.69v12.73h37.33l15.57-.55a19.6 19.6 0 0 0 9.91-32.32 19.67 19.67 0 0 0-13.46-32.92m66.16-.09h-35.53v13.12h34.78c13.05 0 20.24 7.05 20.24 19.87s-7 19.74-20.24 19.74h-20.81V29.52h-14V68.8h35.52c20.7 0 34.6-13.2 34.6-32.85s-13.9-33-34.6-33M259.09 56V3.03h-14.8v66.14h60.06V56h-45.26zM158.47 69.17h45.81l-7.1-12.8h-16.49l16.18-29.17 23.29 41.97h15.09L196.87 0l-38.4 69.17zM81.93 3.03h67.2V16.2h-67.2zm0 26.67v39.47h67.2V56H95.95V42.5h53.18V29.7h-67.2zm-13.65-6.93a19.77 19.77 0 0 0-18.71-19.7H-.01v12.78h48.54a6.93 6.93 0 0 1 .37 13.85H0v39.46h14V42.5h23.5l18.58 26.67h16l-19-27.22a19.58 19.58 0 0 0 15.14-19.17'/>\n\t<path fill='#27aae1' d='M369.59 2.97H333.9v13.18h35c13.11 0 20.33 7.09 20.33 20s-7 19.84-20.33 19.84h-20.97V29.65h-14v39.47h35.69c20.81 0 34.77-13.26 34.77-33s-14-33.14-34.77-33.14m31.54.3h4.62v.95h-1.7v4.75h-1.22V4.23h-1.7zm9.67 5.7h-1l-1.51-4.9v4.88h-1.14v-5.7h2l1.19 4.15 1.29-4.15h1.93v5.7h-1.14V4.08z'/>\n</svg>);\n\nconst SvgTrain = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\n\t<path d='M16,18h1c0.552,0,1-0.448,1-1V3c0-0.552-0.448-1-1-1H7C6.448,2,6,2.448,6,3v14c0,0.552,0.448,1,1,1h1l-4,4h2l1-1h10l1,1h2\n\t\tL16,18z M15,15c-0.552,0-1-0.448-1-1c0-0.552,0.448-1,1-1s1,0.448,1,1C16,14.552,15.552,15,15,15z M7.5,11V4h9v7H7.5z M10,14\n\t\tc0,0.552-0.448,1-1,1s-1-0.448-1-1c0-0.552,0.448-1,1-1S10,13.448,10,14z M8,20l2-2h4l2,2H8z'/>\n</svg>);\n\nconst SvgCar = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\n\t<path d='M19,11h-1l-1-6c0-0.552-0.448-1-1-1H8C7.448,4,7,4.448,7,5l-1,6H5c-0.552,0-1,0.448-1,1v5c0,0.552,0.448,1,1,1h1v1\n\tc0,0.552,0.448,1,1,1s1-0.448,1-1v-1h8v1c0,0.552,0.448,1,1,1s1-0.448,1-1v-1h1c0.552,0,1-0.448,1-1v-5C20,11.448,19.552,11,19,11z\n\tM7,15c-0.552,0-1-0.448-1-1s0.448-1,1-1s1,0.448,1,1S7.552,15,7,15z M7,11l1-6h8l1,6H7z M17,15c-0.552,0-1-0.448-1-1s0.448-1,1-1\n\ts1,0.448,1,1S17.552,15,17,15z'/>\n</svg>);\n\nconst SvgGuy = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\n\t<circle cx='12.5' cy='4.5' r='1.5'/>\n\t<path d='M17.304 11.068s-2.137-.395-2.173-.404c0 0-1.52-3.172-1.66-3.332l-.01-.002c-.275-.493-.8-.83-1.402-.83-.276 0-.53.075-.758.197l-.01-.003s-2.056 1.17-2.81 1.594c-.18.1-.32.245-.414.425L6.77 11.146c-.04.092-.063.192-.063.298 0 .415.337.752.752.752.28 0 .52-.165.65-.398l1.2-2.242.74-.416c-.056.16-.738 3.482-.738 3.482l-.69 3.934-2.364 2.97c-.136.156-.227.355-.227.58 0 .494.4.894.895.894.27 0 .5-.124.665-.31 0 0 2.614-3.196 2.83-3.45.238-.284.3-.426.336-.612.034-.186.433-2.587.433-2.587l2.286 2.29v3.78c0 .497.4.897.893.897s.893-.4.893-.893l-.004-4.506c0-.27-.105-.53-.29-.728l-2.234-2.234.49-2.38.65 1.244c.148.28.41.48.72.543.857.176 2.573.51 2.607.51.416 0 .752-.338.752-.753 0-.385-.29-.688-.66-.736z'/>\n</svg>);\n\nconst SvgLinkOut = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\n\t<path d='M20.6 2.9h-5.9c-.5 0-.9.4-.9.9s.4.9.9.9h3.9L10.2 13c-.3.3-.3.9 0 1.2.2.2.4.3.6.3.2 0 .4-.1.6-.3l8.3-8.3v3.7c0 .5.4.9.9.9s.9-.4.9-.9V3.7c0-.4-.4-.8-.9-.8z'/>\n\t<path d='M17.7 11.5c-.5 0-.9.4-.9.9v6.8c0 .3-.3.6-.6.6H5.3c-.3 0-.6-.3-.6-.6v-11c0-.3.3-.6.6-.6h6.8c.5 0 .9-.4.9-.9s-.4-.9-.9-.9H5.3C4 5.9 3 6.9 3 8.2v10.9c0 1.3 1 2.3 2.3 2.3h10.9c1.3 0 2.3-1 2.3-2.3v-6.8c0-.4-.4-.8-.8-.8z'/>\n</svg>);\n\nconst SvgCompass = svgRenderer(<svg xmlns='http://www.w3.org/2000/svg' class={s.compass} viewBox='0 0 24 24'>\n\t<path d='M16.77 7.098l-6.244 3.387c-.017.01-.03.023-.04.04L7.098 16.77c-.036.083.048.167.13.13l6.245-3.386c.017-.01.03-.023.04-.04L16.9 7.23c.037-.083-.047-.167-.13-.132zM12 13c-.552 0-1-.448-1-1s.448-1 1-1 1 .448 1 1-.448 1-1 1z'/>\n\t<path d='M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm0 15c-.276 0-.5.224-.5.5v.475C8.04 18.73 5.272 15.96 5.025 12.5H5.5c.276 0 .5-.224.5-.5s-.224-.5-.5-.5h-.475C5.272 8.04 8.04 5.272 11.5 5.025V5.5c0 .276.224.5.5.5s.5-.224.5-.5v-.475c3.46.246 6.228 3.014 6.475 6.475H18.5c-.276 0-.5.224-.5.5s.224.5.5.5h.475c-.246 3.46-3.014 6.228-6.475 6.475V18.5c0-.276-.224-.5-.5-.5z'/>\n</svg>);\n\nconst SvgCart = svgRenderer(<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 90 90\">\n\t<circle cx=\"37.673\" cy=\"78.012\" r=\"6.364\"></circle>\n\t<circle cx=\"73.627\" cy=\"78.012\" r=\"6.364\"></circle>\n\t<path d=\"M24.758,18.271L21.76,7.149h-3.333H15.74H8.486c-1.885,0-3.412,1.618-3.412,3.614c0,1.997,1.527,3.615,3.412,3.615h7.735   L31.31,70.337l0.03-0.007h48.65v-7.229H36.845l-1.702-6.312H79.99v-0.112l4.918-34.229L24.758,18.271z M76.483,37.167H63.467   l1.062-9.93l13.249,0.909L76.483,37.167z M44.926,37.167l-2.575-11.451L61.071,27l-1.089,10.167H44.926z M59.719,39.616   l-1.17,10.934H47.937l-2.458-10.934H59.719z M38.745,25.467l2.631,11.699H29.853l-3.381-12.54L38.745,25.467z M33.461,50.55   l-2.948-10.934h11.413l2.459,10.934H33.461z M62.034,50.55l1.171-10.934h12.928L74.565,50.55H62.034z\">\n\t</path>\n</svg>);\n\nconst SvgPlay = svgRenderer(<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"120 200 400 400\">\n\t<path d=\"M179.221,269.221c-70.294,70.294-70.293,184.264,0,254.558s184.265,70.294,254.559,0  c70.293-70.293,70.293-184.265,0-254.558C363.485,198.927,249.514,198.928,179.221,269.221z M408.323,498.324  c-56.235,56.229-147.411,56.231-203.646,0c-56.236-56.235-56.235-147.413,0-203.647c56.236-56.236,147.411-56.235,203.647-0.001  C464.559,350.913,464.559,442.088,408.323,498.324z\"/>\n\t<path d=\"M243.5,324.5c0-9.9,7.168-14.228,15.929-9.617l139.143,73.233c8.761,4.611,8.761,12.156,0,16.767   L259.43,478.115c-8.761,4.609-15.929,0.284-15.929-9.616L243.5,324.5z\"/>\n</svg>);\n\n// For single-use SVG specific to an app, use svgRenderer to avoid making this file too heavy\n// let MySvg = svgRenderer(<svg>your svg markup...</svg>);\n// Then use it as the others\n// <MySvg class={s.myClass} ... />\nexport {\n\tsvgRenderer,\n\tSvgVideos,\n\tSvgSynopsis,\n\tSvgShowtimes,\n\tSvgShare,\n\tSvgLink,\n\tSvgUser,\n\tSvgHeart,\n\tSvgCopy,\n\tSvgEdit,\n\tSvgSearch,\n\tSvgMarker,\n\tSvgStar,\n\tSvgFullScreenOpen,\n\tSvgFullScreenClose,\n\tSvgCarrotDown,\n\tSvgCarrotUp,\n\tSvgSpeaker,\n\tSvgMuted,\n\tSvgImax,\n\tSvgImax3d,\n\tSvgRealD,\n\tSvgTick,\n\tSvgArrowRight,\n\tSvgFatArrowRight,\n\tSvgBin,\n\tSvgTrain,\n\tSvgCar,\n\tSvgGuy,\n\tSvgLinkOut,\n\tSvgCompass,\n\tSvgCart,\n\tSvgPlay,\n\tSVGContent\n};\n","import Store from 'store/store';\n\n// Utils related to copy\n\nlet copy = {};\nlet isCopySet = false;\n\n/**\n * Gets copy for the provided key + replace variables inside that copy.\n *\n * @example\n * getCopy('GALLERY_ALT_TITLE', { movieName: 'Rogue One', studioName: 'Disney' });\n * // returns 'Rogue One: Gallery | Disney'\n *\n * getCopy('CURRENCY', { value: 20 });\n * // returns £20\n *\n * getCopy('GET_TICKETS');\n * // returns Get Tickets\n *\n * getCopy('DYNAMIC_TITLE', { movieName: 'Star Trek' });\n * // returns: Star Trek: Hello There | Star Trek\n *\n * getCopy('TICKETS', {}, 'tickets');\n * // TICKETS isn't in the copy object, so it will return the fallback\n * // returns: tickets\n *\n * @note If there are two keys KEY and $KEY defined in copy, you WON'T be able to access\n *       KEY with this function. Use appData instead (or find a different name).\n *\n * @param {string} copyKey - the copy key (with or without the starting $)\n * @param {Object} [opts={}] - options\n * @param {string} [fallback=''] - the fallback value\n * @return {string} the localized string\n */\nexport const getCopy = (copyKey, opts = {}, fallback = '', fromCopy) => {\n\tif (fromCopy && typeof fromCopy !== 'object') {\n\t\tfromCopy = null;\n\t}\n\n\tif (!fromCopy && !isCopySet) {\n\t\t// Haven't retrieved copy yet, so lets do that first\n\t\tconst store = Store.get();\n\t\tcopy = (store.appData && store.appData.copy ? store.appData.copy : store.copy) || {};\n\t\tisCopySet = true;\n\t}\n\n\tif (!fromCopy) {\n\t\tfromCopy = copy;\n\t}\n\n\tlet copyItem = null;\n\tif (copyKey) {\n\t\tif (copyKey.charAt(0) !== '$') {\n\t\t\tcopyItem = fromCopy['$' + copyKey];\n\t\t\tif (copyItem === undefined) copyItem = fromCopy[copyKey];\n\t\t} else {\n\t\t\tcopyItem = fromCopy[copyKey];\n\t\t\tif (copyItem === undefined) copyItem = fromCopy[copyKey.substr(1)];\n\t\t}\n\t}\n\tif (copyItem === undefined) copyItem = fallback;\n\n\t// Loop through all the options to see replace\n\tObject.keys(opts).forEach((key) => {\n\t\t// Transform movieName to MOVIE_NAME\n\t\tlet realKey = key;\n\t\tif (key.toUpperCase() !== key) {\n\t\t\trealKey = key.replace(/([A-Z])/g, ' $1').replace(/ /g, '_').toUpperCase();\n\t\t}\n\n\t\tconst regex = new RegExp('%' + realKey + '%', 'g');\n\t\t// Replace the keys with what was provided\n\t\tcopyItem = copyItem.replace(regex, opts[key]);\n\t});\n\n\treturn copyItem;\n};\n","import { h, Component } from 'preact';\nimport pure from 'utils/pure';\nimport Store from 'store/store';\nimport * as actions from 'store/actions';\nimport s from 'components/shared/modal/exitModal.sss';\nimport { track } from 'utils/tracking';\nimport { getCopy } from 'utils/copy';\nimport { Link } from 'components/core/link/link';\n\n\nexport default @pure class ExitModal extends Component {\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.closeModal = this.closeModal.bind(this);\n\t\tthis.openLink = this.openLink.bind(this);\n\t}\n\n\tcloseModal() {\n\t\tStore.emit(actions.HIDE_MODAL);\n\t\ttrack({ a:'exit_modal_click_cancel' });\n\t}\n\n\topenLink() {\n\t\tStore.emit(actions.HIDE_MODAL);\n\t}\n\n\tgetTitle() {\n\t\t// Should we use the current location.host instead of meta > vanity ?\n\t\t// Would be a bit weird if multiple vanities are available\n\t\tconst vanity = this.props.vanity || '';\n\t\t// get rid of the http://\n\t\tconst strippedVanity = vanity.split('://').pop();\n\t\tlet content = getCopy('EXIT_MODAL_TITLE', { vanity: strippedVanity });\n\t\treturn (\n\t\t\t<h2 class={s.title}>{content}</h2>\n\t\t);\n\t}\n\n\trender(props) {\n\t\t// the href that it needs to direct them to\n\t\tconst href = props.href;\n\n\t\treturn (\n\t\t\t<div class={s.container}>\n\t\t\t\t{this.getTitle()}\n\t\t\t\t<Link\n\t\t\t\t\thref={href}\n\t\t\t\t\textraOnClick={this.openLink}\n\t\t\t\t\tignoreExitModal\n\t\t\t\t\ttrackId=\"exit_modal_click_ok\"\n\t\t\t\t\ttrackLabel={href}\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\tclass={s.button}\n\t\t\t\t>\n\t\t\t\t\t{getCopy('OK')}\n\t\t\t\t</Link>\n\t\t\t\t<button onClick={this.closeModal} class={s.button}>{getCopy('CANCEL')}</button>\n\t\t\t</div>\n\t\t);\n\t}\n\n}\n","import Store from 'store/store';\n\n//\n// Utils related to static data\n//\n\nlet staticData = {};\nlet isStaticDataSet = false;\n\n\n// Use this function if you need to grab static data from the Store\n// This way you don't have to pass it down as a prop everywhere\n// Don't use for pageData unless you are sure the data won't get\n// updated anywhere\nexport const getStaticData = () => {\n\n\n\tif (!isStaticDataSet) {\n\t\t// Haven't retrieved data yet, so lets do that first\n\t\tlet store = Store.get();\n\t\tstaticData = store.appData;\n\t\tisStaticDataSet = true;\n\t}\n\n\n\treturn staticData;\n\n};\n","import { h } from 'preact';\nimport Store from 'store/store';\nimport * as actions from 'store/actions';\nimport qs from 'qs';\nimport { joinClasses, toQueryString, accessNested } from 'utils/utils';\nimport { getPath } from 'utils/clientUtils';\nimport { track, trackLinkOut } from 'utils/tracking';\nimport route from 'components/core/link/route';\nimport * as svg from 'components/shared/svgIcons/svgIcons.js';\nimport s from 'components/core/link/link.sss';\nimport ExitModal from 'components/shared/modal/exitModal';\nimport { getStaticData } from 'utils/staticData';\n\nconst isServer = typeof window === 'undefined';\n\n\n// Static data from the store\nlet staticData;\n\n/**\n * Link component to navigate through the site\n * @prop  {String} trackId - tracking id that gets called when clicked\n * @prop  {String} pageId - the id for the page it needs to navigate to\n * @prop  {String} href - href for component\n * @prop  {Object} activePage - whats the current active page, not required!\n * @prop  {String} iconStyle - styling that gets applied to icon\n * @prop  {String} iconClass - class that gets applied to icon\n * @prop  {String} linkClass - class that gets added to link\n * @prop  {Boolean} noMergeQS - should the query parameters not be merged\n * @prop  {Boolean} download - true to force download rather than link out\n * @return {Object}  link dom element\n */\nexport const Link = (fullProps) => {\n\tlet {\n\t\ttrackId,\n\t\ttrackLabel,\n\t\tariaLabel,\n\t\tchildren,\n\t\tpageId,\n\t\thref,\n\t\tactivePage,\n\t\tpages,\n\t\ticonStyle,\n\t\ticonClass,\n\t\tlinkClass,\n\t\tnoMergeQS,\n\t\tappData,\n\t\tqueryString,\n\t\tchildId,\n\t\tremoveSourceQS,\n\t\textraOnClick, // Function called on link click, in addition to the standard handlers\n\t\trenderCustomChild, // Enable when you want to ignore the span element and render your own children\n\t\texitModal,    // Use the exit modal - only useful if Features > exitModal is off in the appData\n\t\tignoreExitModal, // Ignore the exit modal for outbound links\n\t\tchildHTML,\n\t\tHTMLTag = 'a',\n\t\tscrollSection, // ID of section to scroll to\n\t\t...props\n\t} = fullProps;\n\n\tif (!staticData) {\n\t\t// Get the static data if it hasn't been loaded in yet\n\t\t// So we can use it in the click events etc...\n\t\tstaticData = getStaticData();\n\t}\n\n\tif (pageId) {\n\t\t// page id is provided, so its an \"internal\" link\n\t\tlet store, getStore = () => store || (store = Store.get());\n\t\tif (!activePage) {\n\t\t\t// No activePage provided\n\t\t\tactivePage = getStore().activePage;\n\t\t}\n\n\t\tif (!href) {\n\t\t\tlet pagePath = getPath(pageId);\n\t\t\tif (pagePath) {\n\t\t\t\t// See if the page provided actually exists\n\t\t\t\thref = getRelativeRoot(getPath(activePage)) + pagePath.slice(1);\n\t\t\t} else {\n\t\t\t\t// No luck in finding it\n\t\t\t\thref = '.';\n\t\t\t}\n\t\t\tif (scrollSection) {\n\t\t\t\thref += '#' + scrollSection;\n\t\t\t}\n\t\t} else if (href[0] === '/') {\n\t\t\t// Already provided with an href\n\t\t\thref = getRelativeRoot(getPath(activePage)) + href.substring(1);\n\t\t}\n\t}\n\n\n\tif (queryString || pageId) {\n\t\tif (!href) {\n\t\t\thref = typeof window === \"undefined\" ? \"\" : location.href;\n\t\t}\n\n\t\t// Keep the current page query string if internal link and not specified otherwise\n\t\tlet newQS = isServer || !pageId || noMergeQS ? {} : qs.parse(location.search.substr(1));\n\t\tif (!removeSourceQS) {\n\t\t\tlet baseQS = href.match(/\\?([^#]*)(#|$)/);\n\t\t\tnewQS = Object.assign(newQS, qs.parse((baseQS && baseQS[1]) || ''));\n\t\t}\n\t\tlet removeV = true;\n\t\tif (queryString) {\n\t\t\tlet queryStringObj = typeof queryString === 'string' ? qs.parse(queryString) : queryString;\n\t\t\tif (queryStringObj.v) {\n\t\t\t\tremoveV = false;\n\t\t\t}\n\t\t\tnewQS = Object.assign(newQS, queryStringObj);\n\t\t}\n\t\t// removes youtube ID from URL when navigating away from the specific video page\n\t\tif (removeV && newQS.hasOwnProperty(\"v\")) {\n\t\t\tdelete newQS.v;\n\t\t}\n\t\tlet newQSString = toQueryString(newQS);\n\t\thref = href.replace(/(\\?([^#]*))?(#|$)/, newQSString + '$3');\n\t}\n\n\tlet onClick;\n\t// Only redirect through page if it doesn't have a target blank\n\tif (pageId && fullProps.target !== '_blank') {\n\t\tonClick = generateOnClick(handlePageLinkClick.bind(this, pageId, !noMergeQS, trackId, trackLabel), extraOnClick);\n\t} else {\n\t\tonClick = generateOnClick(trackLinkOut.bind(this, href, trackId, trackLabel), extraOnClick, clickOut.bind(this, href, exitModal, !!ignoreExitModal));\n\t}\n\n\tconst IconComponent = svg[iconClass];\n\tconst anchorLink = (iconClass || iconStyle) ? s.iconLink : s.link;\n\n\tif (props.class) {\n\t\tlinkClass = props.class;\n\t\tdelete props.class;\n\t}\n\n\tlet inside = children;\n\tif (!renderCustomChild) {\n\t\tinside = [];\n\t\tif (iconStyle) {\n\t\t\tinside.push(\n\t\t\t\t<div style={iconStyle} class={s.iconLinkUrl} />\n\t\t\t);\n\t\t}\n\t\tif (IconComponent) {\n\t\t\tinside.push(\n\t\t\t\t<IconComponent class={s.iconLinkSvg} />\n\t\t\t);\n\t\t}\n\t\tconst extraSpanProps = {};\n\t\tif (childHTML) {\n\t\t\textraSpanProps.dangerouslySetInnerHTML = { __html: childHTML };\n\t\t}\n\t\tinside.push(\n\t\t\t<span class={anchorLink} id={childId} {...extraSpanProps}>\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t);\n\t}\n\n\treturn (\n\t\t<HTMLTag\n\t\t\tclass={joinClasses(s.top, linkClass)}\n\t\t\thref={href}\n\t\t\tonClick={onClick}\n\t\t\taria-label={ariaLabel || ''}\n\t\t\t{...props}\n\t\t>\n\t\t\t{inside}\n\t\t</HTMLTag>\n\t);\n};\n\nfunction generateOnClick() {\n\tlet fList = Array.prototype.concat.apply([], arguments);\n\tfList = fList.filter(f => typeof f === 'function');\n\tif (!fList.length) return;\n\t// Do not put an arrow function here so that we can use this and arguments\n\treturn function() {\n\t\tfList.forEach(f => {\n\t\t\t// try-catch to prevent pixel errors breaking everything\n\t\t\ttry {\n\t\t\t\tf.apply(this, arguments);\n\t\t\t} catch(e) {\n\t\t\t\tconsole.error(e);\n\t\t\t}\n\t\t});\n\t};\n}\n\nfunction clickOut(href, useExitModal, ignoreExitModal, ev) {\n\tif ((useExitModal || staticData.options.exitModal) && !ignoreExitModal) {\n\t\t// Display the exit modal before allowing the user to leave the site\n\t\tev.preventDefault();\n\t\t// NOTE: This may be annoying if you're looking at a screening far down the list and it brings you back up\n\t\t// We should find other ways to solve the issues caused by not having that\n\t\t// window.scrollTo(0, 0);\n\t\tStore.emit(actions.SHOW_MODAL, <ExitModal href={href} vanity={staticData.meta.url} />, null, { type: 'themed' });\n\t}\n}\n\nexport function getRelativeRoot(path) {\n\treturn (path.substring(1).match(/\\//g) || []).map(() => ('../')).join('');\n}\n\n// Get the relative url for a page.\n// page can be a string (page id) or a page appData object\nexport function getRelativePageUrl(page) {\n\tif (!page) return '.';\n\n\tlet href = '.';\n\tlet pagePath = getPath(page);\n\tif (pagePath) {\n\t\tlet activePage = Store.get().activePage;\n\t\thref = getRelativeRoot(getPath(activePage)) + pagePath.slice(1);\n\t}\n\n\treturn href;\n}\n\nexport function getAbsolutePageUrl(page) {\n\tlet relative = getRelativePageUrl(page);\n\tlet a = document.createElement('a');\n\ta.href = relative;\n\treturn a.href;\n}\n\nexport function goToPage(pageId, queryString, noMergeQS, hash) {\n\tif (!pageId) return;\n\tlet page = accessNested(Store.get(), ['appData', 'pages', pageId]);\n\tif (!page) {\n\t\treturn;\n\t}\n\tlet href = getRelativePageUrl(page);\n\n\t// Keep the current page query string if internal link and not specified otherwise\n\tlet newQS = isServer || noMergeQS ? {} : qs.parse(location.search.substr(1));\n\tif (queryString) {\n\t\tnewQS = Object.assign(newQS, typeof queryString === 'string' ? qs.parse(queryString) : queryString);\n\t}\n\tlet newQSString = toQueryString(newQS);\n\thref = href + newQSString;\n\tif (hash && typeof hash === 'string') {\n\t\thref += (hash[0] === '#' ? '' : '#') + hash;\n\t}\n\n\tStore.emit(actions.SET_ACTIVE_PAGE, page);\n\troute(href, pageId);\n}\nif (typeof window !== 'undefined') {\n\twindow.goToPage = goToPage;\n}\n\nfunction handlePageLinkClick(pageId, mergeQS, trackId, trackLabel, event) {\n\tif (event.stopImmediatePropagation) event.stopImmediatePropagation();\n\tevent.stopPropagation();\n\tevent.preventDefault();\n\n\tif (typeof window.beforePageChange === 'function') {\n\t\tlet confirmation = window.beforePageChange();\n\t\tif (confirmation && typeof confirmation === 'string' && !confirm(confirmation)) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tlet page = accessNested(Store.get(), ['appData', 'pages', pageId]);\n\tif (page) {\n\t\tStore.emit(actions.SET_ACTIVE_PAGE, page);\n\t}\n\tlet href = event.currentTarget.getAttribute('href');\n\troute(href, pageId);\n\n\ttrackId = trackId || 'clicked-' + pageId;\n\tlet trackData = { a: trackId };\n\tif (trackLabel) trackData.l = trackLabel;\n\ttrack(trackData);\n\n\tStore.emit(actions.LINK_CLICKED, { trackId, pageId, link: href });\n\treturn false;\n}\n","// http://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript\n// Could also use https://github.com/andrewrk/node-diacritics\nimport removalMap from 'utils/diacritics';\nconst removeDiacritics = (function() {\n\n\tconst diacriticsMap = removalMap.reduce((map, replacement) => {\n\t\tconst base = replacement.base;\n\t\t[...replacement.letters].forEach(letter => map[letter] = base);\n\t\treturn map;\n\t}, {});\n\n\treturn str => str.replace(/[^\\u0000-\\u007E]/g, a => diacriticsMap[a] || a);\n\n})();\n\nexport default removeDiacritics;\n","\nconst diacritics = [\n\t{ base: 'A',  letters: '\\u0041\\u24B6\\uFF21\\u00C0\\u00C1\\u00C2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\u00C3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\u00C4\\u01DE\\u1EA2\\u00C5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F' },\n\t{ base: 'AA', letters: '\\uA732' },\n\t{ base: 'AE', letters: '\\u00C6\\u01FC\\u01E2' },\n\t{ base: 'AO', letters: '\\uA734' },\n\t{ base: 'AU', letters: '\\uA736' },\n\t{ base: 'AV', letters: '\\uA738\\uA73A' },\n\t{ base: 'AY', letters: '\\uA73C' },\n\t{ base: 'B',  letters: '\\u0042\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181' },\n\t{ base: 'C',  letters: '\\u0043\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\u00C7\\u1E08\\u0187\\u023B\\uA73E' },\n\t{ base: 'D',  letters: '\\u0044\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779\\u00D0' },\n\t{ base: 'DZ', letters: '\\u01F1\\u01C4' },\n\t{ base: 'Dz', letters: '\\u01F2\\u01C5' },\n\t{ base: 'E',  letters: '\\u0045\\u24BA\\uFF25\\u00C8\\u00C9\\u00CA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\u00CB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E' },\n\t{ base: 'F',  letters: '\\u0046\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B' },\n\t{ base: 'G',  letters: '\\u0047\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E' },\n\t{ base: 'H',  letters: '\\u0048\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D' },\n\t{ base: 'I',  letters: '\\u0049\\u24BE\\uFF29\\u00CC\\u00CD\\u00CE\\u0128\\u012A\\u012C\\u0130\\u00CF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197' },\n\t{ base: 'J',  letters: '\\u004A\\u24BF\\uFF2A\\u0134\\u0248' },\n\t{ base: 'K',  letters: '\\u004B\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2' },\n\t{ base: 'L',  letters: '\\u004C\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780' },\n\t{ base: 'LJ', letters: '\\u01C7' },\n\t{ base: 'Lj', letters: '\\u01C8' },\n\t{ base: 'M',  letters: '\\u004D\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C' },\n\t{ base: 'N',  letters: '\\u004E\\u24C3\\uFF2E\\u01F8\\u0143\\u00D1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4' },\n\t{ base: 'NJ', letters: '\\u01CA' },\n\t{ base: 'Nj', letters: '\\u01CB' },\n\t{ base: 'O',  letters: '\\u004F\\u24C4\\uFF2F\\u00D2\\u00D3\\u00D4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\u00D5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\u00D6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\u00D8\\u01FE\\u0186\\u019F\\uA74A\\uA74C' },\n\t{ base: 'OI', letters: '\\u01A2' },\n\t{ base: 'OO', letters: '\\uA74E' },\n\t{ base: 'OU', letters: '\\u0222' },\n\t{ base: 'OE', letters: '\\u008C\\u0152' },\n\t{ base: 'oe', letters: '\\u009C\\u0153' },\n\t{ base: 'P',  letters: '\\u0050\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754' },\n\t{ base: 'Q',  letters: '\\u0051\\u24C6\\uFF31\\uA756\\uA758\\u024A' },\n\t{ base: 'R',  letters: '\\u0052\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782' },\n\t{ base: 'S',  letters: '\\u0053\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784' },\n\t{ base: 'T',  letters: '\\u0054\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786' },\n\t{ base: 'TZ', letters: '\\uA728' },\n\t{ base: 'U',  letters: '\\u0055\\u24CA\\uFF35\\u00D9\\u00DA\\u00DB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\u00DC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244' },\n\t{ base: 'V',  letters: '\\u0056\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245' },\n\t{ base: 'VY', letters: '\\uA760' },\n\t{ base: 'W',  letters: '\\u0057\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72' },\n\t{ base: 'X',  letters: '\\u0058\\u24CD\\uFF38\\u1E8A\\u1E8C' },\n\t{ base: 'Y',  letters: '\\u0059\\u24CE\\uFF39\\u1EF2\\u00DD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE' },\n\t{ base: 'Z',  letters: '\\u005A\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762' },\n\t{ base: 'a',  letters: '\\u0061\\u24D0\\uFF41\\u1E9A\\u00E0\\u00E1\\u00E2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\u00E3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\u00E4\\u01DF\\u1EA3\\u00E5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250' },\n\t{ base: 'aa', letters: '\\uA733' },\n\t{ base: 'ae', letters: '\\u00E6\\u01FD\\u01E3' },\n\t{ base: 'ao', letters: '\\uA735' },\n\t{ base: 'au', letters: '\\uA737' },\n\t{ base: 'av', letters: '\\uA739\\uA73B' },\n\t{ base: 'ay', letters: '\\uA73D' },\n\t{ base: 'b',  letters: '\\u0062\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253' },\n\t{ base: 'c',  letters: '\\u0063\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\u00E7\\u1E09\\u0188\\u023C\\uA73F\\u2184' },\n\t{ base: 'd',  letters: '\\u0064\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A' },\n\t{ base: 'dz', letters: '\\u01F3\\u01C6' },\n\t{ base: 'e',  letters: '\\u0065\\u24D4\\uFF45\\u00E8\\u00E9\\u00EA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\u00EB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD' },\n\t{ base: 'f',  letters: '\\u0066\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C' },\n\t{ base: 'g',  letters: '\\u0067\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F' },\n\t{ base: 'h',  letters: '\\u0068\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265' },\n\t{ base: 'hv', letters: '\\u0195' },\n\t{ base: 'i',  letters: '\\u0069\\u24D8\\uFF49\\u00EC\\u00ED\\u00EE\\u0129\\u012B\\u012D\\u00EF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131' },\n\t{ base: 'j',  letters: '\\u006A\\u24D9\\uFF4A\\u0135\\u01F0\\u0249' },\n\t{ base: 'k',  letters: '\\u006B\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3' },\n\t{ base: 'l',  letters: '\\u006C\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747' },\n\t{ base: 'lj', letters: '\\u01C9' },\n\t{ base: 'm',  letters: '\\u006D\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F' },\n\t{ base: 'n',  letters: '\\u006E\\u24DD\\uFF4E\\u01F9\\u0144\\u00F1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5' },\n\t{ base: 'nj', letters: '\\u01CC' },\n\t{ base: 'o',  letters: '\\u006F\\u24DE\\uFF4F\\u00F2\\u00F3\\u00F4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\u00F5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\u00F6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\u00F8\\u01FF\\u0254\\uA74B\\uA74D\\u0275' },\n\t{ base: 'oi', letters: '\\u01A3' },\n\t{ base: 'ou', letters: '\\u0223' },\n\t{ base: 'oo', letters: '\\uA74F' },\n\t{ base: 'p',  letters: '\\u0070\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755' },\n\t{ base: 'q',  letters: '\\u0071\\u24E0\\uFF51\\u024B\\uA757\\uA759' },\n\t{ base: 'r',  letters: '\\u0072\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783' },\n\t{ base: 's',  letters: '\\u0073\\u24E2\\uFF53\\u00DF\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B' },\n\t{ base: 't',  letters: '\\u0074\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787' },\n\t{ base: 'tz', letters: '\\uA729' },\n\t{ base: 'u',  letters:  '\\u0075\\u24E4\\uFF55\\u00F9\\u00FA\\u00FB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\u00FC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289' },\n\t{ base: 'v',  letters: '\\u0076\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C' },\n\t{ base: 'vy', letters: '\\uA761' },\n\t{ base: 'w',  letters: '\\u0077\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73' },\n\t{ base: 'x',  letters: '\\u0078\\u24E7\\uFF58\\u1E8B\\u1E8D' },\n\t{ base: 'y',  letters: '\\u0079\\u24E8\\uFF59\\u1EF3\\u00FD\\u0177\\u1EF9\\u0233\\u1E8F\\u00FF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF' },\n\t{ base: 'z',  letters: '\\u007A\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763' }\n];\n\nexport default diacritics;\n","// import slug from 'slugify';\nimport removeDiacritics from 'utils/removeDiacritics';\n\nexport default class Movie {\n\n\tconstructor(id, attr, format) {\n\t\tthis.id = id;\n\t\tthis.title = attr.title;\n\n\t\t// this.slug = slug(attr.title, { lower: true, remove: /[^\\w\\s\\-\\.\\_~]/g });\n\t\t// this.slug = attr.title.toLowerCase().replace(/\\s+/g, '-').replace(/[^-_a-z0-9]/g, '');\n\t\tthis.slug = attr.slugOverride || removeDiacritics(attr.title.toLowerCase()).replace(/[^\\w\\s_-]/g, '').replace(/[\\s_-]+/g, '-');\n\t\tthis.format = format;\n\n\t\t// add other theater attributes here\n\t\tthis.movietickets = attr.movietickets_movie_id;\n\t\tthis.atom = attr.atom;\n\n\t\tthis.provider_movie_id = attr.provider_movie_id;\n\t\tthis.provider_id = attr.provider_id;\n\n\t\t// Require for filter grouping\n\t\tthis.group = attr.group;\n\n\t\t// this.meta = attr.meta;\n\n\t\tthis.fandango = (attr.meta && attr.meta.movie_code_id) || attr.fandango_movie_id;\n\t}\n\n}\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","'use strict';\n\nvar utils = require('./utils');\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\n\nvar arrayPrefixGenerators = {\n    brackets: function brackets(prefix) {\n        return prefix + '[]';\n    },\n    comma: 'comma',\n    indices: function indices(prefix, key) {\n        return prefix + '[' + key + ']';\n    },\n    repeat: function repeat(prefix) {\n        return prefix;\n    }\n};\n\nvar isArray = Array.isArray;\nvar push = Array.prototype.push;\nvar pushToArray = function (arr, valueOrArray) {\n    push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaultFormat = formats['default'];\nvar defaults = {\n    addQueryPrefix: false,\n    allowDots: false,\n    charset: 'utf-8',\n    charsetSentinel: false,\n    delimiter: '&',\n    encode: true,\n    encoder: utils.encode,\n    encodeValuesOnly: false,\n    format: defaultFormat,\n    formatter: formats.formatters[defaultFormat],\n    // deprecated\n    indices: false,\n    serializeDate: function serializeDate(date) {\n        return toISO.call(date);\n    },\n    skipNulls: false,\n    strictNullHandling: false\n};\n\nvar isNonNullishPrimitive = function isNonNullishPrimitive(v) {\n    return typeof v === 'string'\n        || typeof v === 'number'\n        || typeof v === 'boolean'\n        || typeof v === 'symbol'\n        || typeof v === 'bigint';\n};\n\nvar stringify = function stringify(\n    object,\n    prefix,\n    generateArrayPrefix,\n    strictNullHandling,\n    skipNulls,\n    encoder,\n    filter,\n    sort,\n    allowDots,\n    serializeDate,\n    formatter,\n    encodeValuesOnly,\n    charset\n) {\n    var obj = object;\n    if (typeof filter === 'function') {\n        obj = filter(prefix, obj);\n    } else if (obj instanceof Date) {\n        obj = serializeDate(obj);\n    } else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n        obj = obj.join(',');\n    }\n\n    if (obj === null) {\n        if (strictNullHandling) {\n            return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key') : prefix;\n        }\n\n        obj = '';\n    }\n\n    if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {\n        if (encoder) {\n            var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key');\n            return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value'))];\n        }\n        return [formatter(prefix) + '=' + formatter(String(obj))];\n    }\n\n    var values = [];\n\n    if (typeof obj === 'undefined') {\n        return values;\n    }\n\n    var objKeys;\n    if (isArray(filter)) {\n        objKeys = filter;\n    } else {\n        var keys = Object.keys(obj);\n        objKeys = sort ? keys.sort(sort) : keys;\n    }\n\n    for (var i = 0; i < objKeys.length; ++i) {\n        var key = objKeys[i];\n\n        if (skipNulls && obj[key] === null) {\n            continue;\n        }\n\n        if (isArray(obj)) {\n            pushToArray(values, stringify(\n                obj[key],\n                typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix,\n                generateArrayPrefix,\n                strictNullHandling,\n                skipNulls,\n                encoder,\n                filter,\n                sort,\n                allowDots,\n                serializeDate,\n                formatter,\n                encodeValuesOnly,\n                charset\n            ));\n        } else {\n            pushToArray(values, stringify(\n                obj[key],\n                prefix + (allowDots ? '.' + key : '[' + key + ']'),\n                generateArrayPrefix,\n                strictNullHandling,\n                skipNulls,\n                encoder,\n                filter,\n                sort,\n                allowDots,\n                serializeDate,\n                formatter,\n                encodeValuesOnly,\n                charset\n            ));\n        }\n    }\n\n    return values;\n};\n\nvar normalizeStringifyOptions = function normalizeStringifyOptions(opts) {\n    if (!opts) {\n        return defaults;\n    }\n\n    if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {\n        throw new TypeError('Encoder has to be a function.');\n    }\n\n    var charset = opts.charset || defaults.charset;\n    if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n        throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n    }\n\n    var format = formats['default'];\n    if (typeof opts.format !== 'undefined') {\n        if (!has.call(formats.formatters, opts.format)) {\n            throw new TypeError('Unknown format option provided.');\n        }\n        format = opts.format;\n    }\n    var formatter = formats.formatters[format];\n\n    var filter = defaults.filter;\n    if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n        filter = opts.filter;\n    }\n\n    return {\n        addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n        allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n        charset: charset,\n        charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n        delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n        encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n        encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n        encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n        filter: filter,\n        formatter: formatter,\n        serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n        skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n        sort: typeof opts.sort === 'function' ? opts.sort : null,\n        strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n    };\n};\n\nmodule.exports = function (object, opts) {\n    var obj = object;\n    var options = normalizeStringifyOptions(opts);\n\n    var objKeys;\n    var filter;\n\n    if (typeof options.filter === 'function') {\n        filter = options.filter;\n        obj = filter('', obj);\n    } else if (isArray(options.filter)) {\n        filter = options.filter;\n        objKeys = filter;\n    }\n\n    var keys = [];\n\n    if (typeof obj !== 'object' || obj === null) {\n        return '';\n    }\n\n    var arrayFormat;\n    if (opts && opts.arrayFormat in arrayPrefixGenerators) {\n        arrayFormat = opts.arrayFormat;\n    } else if (opts && 'indices' in opts) {\n        arrayFormat = opts.indices ? 'indices' : 'repeat';\n    } else {\n        arrayFormat = 'indices';\n    }\n\n    var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];\n\n    if (!objKeys) {\n        objKeys = Object.keys(obj);\n    }\n\n    if (options.sort) {\n        objKeys.sort(options.sort);\n    }\n\n    for (var i = 0; i < objKeys.length; ++i) {\n        var key = objKeys[i];\n\n        if (options.skipNulls && obj[key] === null) {\n            continue;\n        }\n        pushToArray(keys, stringify(\n            obj[key],\n            key,\n            generateArrayPrefix,\n            options.strictNullHandling,\n            options.skipNulls,\n            options.encode ? options.encoder : null,\n            options.filter,\n            options.sort,\n            options.allowDots,\n            options.serializeDate,\n            options.formatter,\n            options.encodeValuesOnly,\n            options.charset\n        ));\n    }\n\n    var joined = keys.join(options.delimiter);\n    var prefix = options.addQueryPrefix === true ? '?' : '';\n\n    if (options.charsetSentinel) {\n        if (options.charset === 'iso-8859-1') {\n            // encodeURIComponent('&#10003;'), the \"numeric entity\" representation of a checkmark\n            prefix += 'utf8=%26%2310003%3B&';\n        } else {\n            // encodeURIComponent('✓')\n            prefix += 'utf8=%E2%9C%93&';\n        }\n    }\n\n    return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\n\nvar defaults = {\n    allowDots: false,\n    allowPrototypes: false,\n    arrayLimit: 20,\n    charset: 'utf-8',\n    charsetSentinel: false,\n    comma: false,\n    decoder: utils.decode,\n    delimiter: '&',\n    depth: 5,\n    ignoreQueryPrefix: false,\n    interpretNumericEntities: false,\n    parameterLimit: 1000,\n    parseArrays: true,\n    plainObjects: false,\n    strictNullHandling: false\n};\n\nvar interpretNumericEntities = function (str) {\n    return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n        return String.fromCharCode(parseInt(numberStr, 10));\n    });\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n    var obj = {};\n    var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n    var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n    var parts = cleanStr.split(options.delimiter, limit);\n    var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n    var i;\n\n    var charset = options.charset;\n    if (options.charsetSentinel) {\n        for (i = 0; i < parts.length; ++i) {\n            if (parts[i].indexOf('utf8=') === 0) {\n                if (parts[i] === charsetSentinel) {\n                    charset = 'utf-8';\n                } else if (parts[i] === isoSentinel) {\n                    charset = 'iso-8859-1';\n                }\n                skipIndex = i;\n                i = parts.length; // The eslint settings do not allow break;\n            }\n        }\n    }\n\n    for (i = 0; i < parts.length; ++i) {\n        if (i === skipIndex) {\n            continue;\n        }\n        var part = parts[i];\n\n        var bracketEqualsPos = part.indexOf(']=');\n        var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n        var key, val;\n        if (pos === -1) {\n            key = options.decoder(part, defaults.decoder, charset, 'key');\n            val = options.strictNullHandling ? null : '';\n        } else {\n            key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n            val = options.decoder(part.slice(pos + 1), defaults.decoder, charset, 'value');\n        }\n\n        if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n            val = interpretNumericEntities(val);\n        }\n\n        if (val && options.comma && val.indexOf(',') > -1) {\n            val = val.split(',');\n        }\n\n        if (has.call(obj, key)) {\n            obj[key] = utils.combine(obj[key], val);\n        } else {\n            obj[key] = val;\n        }\n    }\n\n    return obj;\n};\n\nvar parseObject = function (chain, val, options) {\n    var leaf = val;\n\n    for (var i = chain.length - 1; i >= 0; --i) {\n        var obj;\n        var root = chain[i];\n\n        if (root === '[]' && options.parseArrays) {\n            obj = [].concat(leaf);\n        } else {\n            obj = options.plainObjects ? Object.create(null) : {};\n            var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n            var index = parseInt(cleanRoot, 10);\n            if (!options.parseArrays && cleanRoot === '') {\n                obj = { 0: leaf };\n            } else if (\n                !isNaN(index)\n                && root !== cleanRoot\n                && String(index) === cleanRoot\n                && index >= 0\n                && (options.parseArrays && index <= options.arrayLimit)\n            ) {\n                obj = [];\n                obj[index] = leaf;\n            } else {\n                obj[cleanRoot] = leaf;\n            }\n        }\n\n        leaf = obj;\n    }\n\n    return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options) {\n    if (!givenKey) {\n        return;\n    }\n\n    // Transform dot notation to bracket notation\n    var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n    // The regex chunks\n\n    var brackets = /(\\[[^[\\]]*])/;\n    var child = /(\\[[^[\\]]*])/g;\n\n    // Get the parent\n\n    var segment = options.depth > 0 && brackets.exec(key);\n    var parent = segment ? key.slice(0, segment.index) : key;\n\n    // Stash the parent if it exists\n\n    var keys = [];\n    if (parent) {\n        // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n        if (!options.plainObjects && has.call(Object.prototype, parent)) {\n            if (!options.allowPrototypes) {\n                return;\n            }\n        }\n\n        keys.push(parent);\n    }\n\n    // Loop through children appending to the array until we hit depth\n\n    var i = 0;\n    while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n        i += 1;\n        if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n            if (!options.allowPrototypes) {\n                return;\n            }\n        }\n        keys.push(segment[1]);\n    }\n\n    // If there's a remainder, just add whatever is left\n\n    if (segment) {\n        keys.push('[' + key.slice(segment.index) + ']');\n    }\n\n    return parseObject(keys, val, options);\n};\n\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n    if (!opts) {\n        return defaults;\n    }\n\n    if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {\n        throw new TypeError('Decoder has to be a function.');\n    }\n\n    if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n        throw new Error('The charset option must be either utf-8, iso-8859-1, or undefined');\n    }\n    var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n\n    return {\n        allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n        allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n        arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n        charset: charset,\n        charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n        comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n        decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n        delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n        // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n        depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,\n        ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n        interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n        parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n        parseArrays: opts.parseArrays !== false,\n        plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n        strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n    };\n};\n\nmodule.exports = function (str, opts) {\n    var options = normalizeParseOptions(opts);\n\n    if (str === '' || str === null || typeof str === 'undefined') {\n        return options.plainObjects ? Object.create(null) : {};\n    }\n\n    var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n    var obj = options.plainObjects ? Object.create(null) : {};\n\n    // Iterate over the keys and setup the new object\n\n    var keys = Object.keys(tempObj);\n    for (var i = 0; i < keys.length; ++i) {\n        var key = keys[i];\n        var newObj = parseKeys(key, tempObj[key], options);\n        obj = utils.merge(obj, newObj, options);\n    }\n\n    return utils.compact(obj);\n};\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","'use strict';\r\n\r\nvar Utils = require( './utils.js' ),\r\n\tEmitter = require( './emitter' ),\r\n\tFrozen = require( './frozen' )\r\n;\r\n\r\n//#build\r\nvar Freezer = function( initialValue, options ) {\r\n\tvar me = this,\r\n\t\tops = options || {},\r\n\t\tstore = {\r\n\t\t\tlive: ops.live || false,\r\n\t\t\tfreezeInstances: ops.freezeInstances || false\r\n\t\t}\r\n\t;\r\n\r\n\t// Immutable data\r\n\tvar frozen;\r\n\tvar pivotTriggers = [], pivotTicking = 0;\r\n\tvar triggerNow = function( node ){\r\n\t\tvar _ = node.__,\r\n\t\t\ti\r\n\t\t;\r\n\r\n\t\tif( _.listener ){\r\n\t\t\tvar prevState = _.listener.prevState || node;\r\n\t\t\t_.listener.prevState = 0;\r\n\t\t\tFrozen.emit( prevState, 'update', node, true );\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < _.parents.length; i++) {\r\n\t\t\t_.store.notify( 'now', _.parents[i] );\r\n\t\t}\r\n\t};\r\n\r\n\tvar addToPivotTriggers = function( node ){\r\n\t\tpivotTriggers.push( node );\r\n\t\tif( !pivotTicking ){\r\n\t\t\tpivotTicking = 1;\r\n\t\t\tUtils.nextTick( function(){\r\n\t\t\t\tpivotTriggers = [];\r\n\t\t\t\tpivotTicking = 0;\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n\r\n\t// Last call to display info about orphan calls\r\n\tvar lastCall;\r\n\tstore.notify = function notify( eventName, node, options, name ){\r\n\t\tif( name ){\r\n\t\t\tif( lastCall && !lastCall.onStore ){\r\n\t\t\t\tdetachedWarn( lastCall );\r\n\t\t\t}\r\n\t\t\tlastCall = {name: name, node: node, options: options, onStore: false};\r\n\t\t}\r\n\r\n\t\tif( eventName === 'now' ){\r\n\t\t\tif( pivotTriggers.length ){\r\n\t\t\t\twhile( pivotTriggers.length ){\r\n\t\t\t\t\ttriggerNow( pivotTriggers.shift() );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttriggerNow( node );\r\n\t\t\t}\r\n\r\n\t\t\treturn node;\r\n\t\t}\r\n\r\n\t\tvar update = Frozen[eventName]( node, options );\r\n\r\n\t\tif( eventName !== 'pivot' ){\r\n\t\t\tvar pivot = Utils.findPivot( update );\r\n\t\t\tif( pivot ) {\r\n\t\t\t\taddToPivotTriggers( update );\r\n\t  \t\treturn pivot;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn update;\r\n\t};\r\n\r\n\tstore.freezeFn = ops.mutable === true ?\r\n\t\tfunction(){} :\r\n\t\tfunction( obj ){ Object.freeze( obj ); }\r\n\t;\r\n\r\n\t// Create the frozen object\r\n\tfrozen = Frozen.freeze( initialValue, store );\r\n\tfrozen.__.updateRoot = function( prevNode, updated ){\r\n\t\tif( prevNode === frozen ){\r\n\t\t\tfrozen = updated;\r\n\t\t\tif( lastCall ){\r\n\t\t\t\tlastCall.onStore = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if( lastCall ) {\r\n\t\t\tsetTimeout( function(){\r\n\t\t\t\tif( !lastCall.onStore ){\r\n\t\t\t\t\tdetachedWarn( lastCall );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t// Listen to its changes immediately\r\n\tvar listener = frozen.getListener(),\r\n\t\thub = {}\r\n\t;\r\n\r\n\tUtils.each(['on', 'off', 'once', 'emit', 'trigger'], function( method ){\r\n\t\tvar attrs = {};\r\n\t\tattrs[ method ] = listener[method].bind(listener);\r\n\t\tUtils.addNE( me, attrs );\r\n\t\tUtils.addNE( hub, attrs );\r\n\t});\r\n\r\n\tUtils.addNE( this, {\r\n\t\tget: function(){\r\n\t\t\treturn frozen;\r\n\t\t},\r\n\t\tset: function( node ){\r\n\t\t\tfrozen.reset( node );\r\n\t\t},\r\n\t\tgetEventHub: function(){\r\n\t\t\treturn hub;\r\n\t\t}\r\n\t});\r\n\r\n\tUtils.addNE( this, { getData: this.get, setData: this.set } );\r\n};\r\n\r\nfunction detachedWarn( lastCall ){\r\n\tUtils.warn( false, 'Method ' + lastCall.name + ' called on a detached node.', lastCall.node, lastCall.options );\r\n}\r\n\r\n//#build\r\n\r\nmodule.exports = Freezer;\r\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\n(function () {\n    try {\n        if (typeof setTimeout === 'function') {\n            cachedSetTimeout = setTimeout;\n        } else {\n            cachedSetTimeout = defaultSetTimout;\n        }\n    } catch (e) {\n        cachedSetTimeout = defaultSetTimout;\n    }\n    try {\n        if (typeof clearTimeout === 'function') {\n            cachedClearTimeout = clearTimeout;\n        } else {\n            cachedClearTimeout = defaultClearTimeout;\n        }\n    } catch (e) {\n        cachedClearTimeout = defaultClearTimeout;\n    }\n} ())\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","'use strict';\r\n\r\nvar Utils = require( './utils' ),\r\n\tnodeCreator = require( './nodeCreator'),\r\n\tEmitter = require('./emitter')\r\n;\r\n\r\n//#build\r\nvar Frozen = {\r\n\tfreeze: function( node, store ){\r\n\t\tif( node && node.__ ){\r\n\t\t\treturn node;\r\n\t\t}\r\n\r\n\t\tvar me = this,\r\n\t\t\tfrozen = nodeCreator.clone(node)\r\n\t\t;\r\n\r\n\t\tUtils.addNE( frozen, { __: {\r\n\t\t\tlistener: false,\r\n\t\t\tparents: [],\r\n\t\t\tstore: store\r\n\t\t}});\r\n\r\n\t\t// Freeze children\r\n\t\tUtils.each( node, function( child, key ){\r\n\t\t\tif( !Utils.isLeaf( child, store.freezeInstances ) ){\r\n\t\t\t\tchild = me.freeze( child, store );\r\n\t\t\t}\r\n\r\n\t\t\tif( child && child.__ ){\r\n\t\t\t\tme.addParent( child, frozen );\r\n\t\t\t}\r\n\r\n\t\t\tfrozen[ key ] = child;\r\n\t\t});\r\n\r\n\t\tstore.freezeFn( frozen );\r\n\r\n\t\treturn frozen;\r\n\t},\r\n\r\n\tmerge: function( node, attrs ){\r\n\t\tvar _ = node.__,\r\n\t\t\ttrans = _.trans,\r\n\r\n\t\t\t// Clone the attrs to not modify the argument\r\n\t\t\tattrs = Utils.extend( {}, attrs)\r\n\t\t;\r\n\r\n\t\tif( trans ){\r\n\t\t\tfor( var attr in attrs )\r\n\t\t\t\ttrans[ attr ] = attrs[ attr ];\r\n\t\t\treturn node;\r\n\t\t}\r\n\r\n\t\tvar me = this,\r\n\t\t\tfrozen = this.copyMeta( node ),\r\n\t\t\tstore = _.store,\r\n\t\t\tval, key, isFrozen\r\n\t\t;\r\n\r\n\t\tUtils.each( node, function( child, key ){\r\n\t\t\tisFrozen = child && child.__;\r\n\r\n\t\t\tif( isFrozen ){\r\n\t\t\t\tme.removeParent( child, node );\r\n\t\t\t}\r\n\r\n\t\t\tval = attrs[ key ];\r\n\t\t\tif( !val ){\r\n\t\t\t\tif( isFrozen )\r\n\t\t\t\t\tme.addParent( child, frozen );\r\n\t\t\t\treturn frozen[ key ] = child;\r\n\t\t\t}\r\n\r\n\t\t\tif( !Utils.isLeaf( val, store.freezeInstances ) )\r\n\t\t\t\tval = me.freeze( val, store );\r\n\r\n\t\t\tif( val && val.__ )\r\n\t\t\t\tme.addParent( val, frozen );\r\n\r\n\t\t\tdelete attrs[ key ];\r\n\r\n\t\t\tfrozen[ key ] = val;\r\n\t\t});\r\n\r\n\r\n\t\tfor( key in attrs ) {\r\n\t\t\tval = attrs[ key ];\r\n\r\n\t\t\tif( !Utils.isLeaf( val, store.freezeInstances ) )\r\n\t\t\t\tval = me.freeze( val, store );\r\n\r\n\t\t\tif( val && val.__ )\r\n\t\t\t\tme.addParent( val, frozen );\r\n\r\n\t\t\tfrozen[ key ] = val;\r\n\t\t}\r\n\r\n\t\t_.store.freezeFn( frozen );\r\n\r\n\t\tthis.refreshParents( node, frozen );\r\n\r\n\t\treturn frozen;\r\n\t},\r\n\r\n\treplace: function( node, replacement ) {\r\n\t\tvar me = this,\r\n\t\t\t_ = node.__,\r\n\t\t\tfrozen = replacement\r\n\t\t;\r\n\r\n\t\tif( !Utils.isLeaf( replacement, _.store.freezeInstances ) ) {\r\n\r\n\t\t\tfrozen = me.freeze( replacement, _.store );\r\n\t\t\tfrozen.__.parents = _.parents;\r\n\t\t\tfrozen.__.updateRoot = _.updateRoot;\r\n\r\n\t\t\t// Add the current listener if exists, replacing a\r\n\t\t\t// previous listener in the frozen if existed\r\n\t\t\tif( _.listener )\r\n\t\t\t\tfrozen.__.listener = _.listener;\r\n\t\t}\r\n\t\tif( frozen ){\r\n\t\t\tthis.fixChildren( frozen, node );\r\n\t\t}\r\n\t\tthis.refreshParents( node, frozen );\r\n\r\n\t\treturn frozen;\r\n\t},\r\n\r\n\tremove: function( node, attrs ){\r\n\t\tvar trans = node.__.trans;\r\n\t\tif( trans ){\r\n\t\t\tfor( var l = attrs.length - 1; l >= 0; l-- )\r\n\t\t\t\tdelete trans[ attrs[l] ];\r\n\t\t\treturn node;\r\n\t\t}\r\n\r\n\t\tvar me = this,\r\n\t\t\tfrozen = this.copyMeta( node ),\r\n\t\t\tisFrozen\r\n\t\t;\r\n\r\n\t\tUtils.each( node, function( child, key ){\r\n\t\t\tisFrozen = child && child.__;\r\n\r\n\t\t\tif( isFrozen ){\r\n\t\t\t\tme.removeParent( child, node );\r\n\t\t\t}\r\n\r\n\t\t\tif( attrs.indexOf( key ) !== -1 ){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif( isFrozen )\r\n\t\t\t\tme.addParent( child, frozen );\r\n\r\n\t\t\tfrozen[ key ] = child;\r\n\t\t});\r\n\r\n\t\tnode.__.store.freezeFn( frozen );\r\n\t\tthis.refreshParents( node, frozen );\r\n\r\n\t\treturn frozen;\r\n\t},\r\n\r\n\tsplice: function( node, args ){\r\n\t\tvar _ = node.__,\r\n\t\t\ttrans = _.trans\r\n\t\t;\r\n\r\n\t\tif( trans ){\r\n\t\t\ttrans.splice.apply( trans, args );\r\n\t\t\treturn node;\r\n\t\t}\r\n\r\n\t\tvar me = this,\r\n\t\t\tfrozen = this.copyMeta( node ),\r\n\t\t\tindex = args[0],\r\n\t\t\tdeleteIndex = index + args[1],\r\n\t\t\tchild\r\n\t\t;\r\n\r\n\t\t// Clone the array\r\n\t\tUtils.each( node, function( child, i ){\r\n\r\n\t\t\tif( child && child.__ ){\r\n\t\t\t\tme.removeParent( child, node );\r\n\r\n\t\t\t\t// Skip the nodes to delete\r\n\t\t\t\tif( i < index || i>= deleteIndex )\r\n\t\t\t\t\tme.addParent( child, frozen );\r\n\t\t\t}\r\n\r\n\t\t\tfrozen[i] = child;\r\n\t\t});\r\n\r\n\t\t// Prepare the new nodes\r\n\t\tif( args.length > 1 ){\r\n\t\t\tfor (var i = args.length - 1; i >= 2; i--) {\r\n\t\t\t\tchild = args[i];\r\n\r\n\t\t\t\tif( !Utils.isLeaf( child, _.store.freezeInstances ) )\r\n\t\t\t\t\tchild = this.freeze( child, _.store );\r\n\r\n\t\t\t\tif( child && child.__ )\r\n\t\t\t\t\tthis.addParent( child, frozen );\r\n\r\n\t\t\t\targs[i] = child;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// splice\r\n\t\tArray.prototype.splice.apply( frozen, args );\r\n\r\n\t\t_.store.freezeFn( frozen );\r\n\t\tthis.refreshParents( node, frozen );\r\n\r\n\t\treturn frozen;\r\n\t},\r\n\r\n\ttransact: function( node ) {\r\n\t\tvar me = this,\r\n\t\t\ttransacting = node.__.trans,\r\n\t\t\ttrans\r\n\t\t;\r\n\r\n\t\tif( transacting )\r\n\t\t\treturn transacting;\r\n\r\n\t\ttrans = node.constructor === Array ? [] : {};\r\n\r\n\t\tUtils.each( node, function( child, key ){\r\n\t\t\ttrans[ key ] = child;\r\n\t\t});\r\n\r\n\t\tnode.__.trans = trans;\r\n\r\n\t\t// Call run automatically in case\r\n\t\t// the user forgot about it\r\n\t\tUtils.nextTick( function(){\r\n\t\t\tif( node.__.trans )\r\n\t\t\t\tme.run( node );\r\n\t\t});\r\n\r\n\t\treturn trans;\r\n\t},\r\n\r\n\trun: function( node ) {\r\n\t\tvar me = this,\r\n\t\t\ttrans = node.__.trans\r\n\t\t;\r\n\r\n\t\tif( !trans )\r\n\t\t\treturn node;\r\n\r\n\t\t// Remove the node as a parent\r\n\t\tUtils.each( trans, function( child, key ){\r\n\t\t\tif( child && child.__ ){\r\n\t\t\t\tme.removeParent( child, node );\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tdelete node.__.trans;\r\n\r\n\t\tvar result = this.replace( node, trans );\r\n\t\treturn result;\r\n\t},\r\n\r\n\tpivot: function( node ){\r\n\t\tnode.__.pivot = 1;\r\n\t\tthis.unpivot( node );\r\n\t\treturn node;\r\n\t},\r\n\r\n\tunpivot: function( node ){\r\n\t\tUtils.nextTick( function(){\r\n\t\t\tnode.__.pivot = 0;\r\n\t\t});\r\n\t},\r\n\r\n\trefresh: function( node, oldChild, newChild ){\r\n\t\tvar me = this,\r\n\t\t\ttrans = node.__.trans,\r\n\t\t\tfound = 0\r\n\t\t;\r\n\r\n\t\tif( trans ){\r\n\r\n\t\t\tUtils.each( trans, function( child, key ){\r\n\t\t\t\tif( found ) return;\r\n\r\n\t\t\t\tif( child === oldChild ){\r\n\r\n\t\t\t\t\ttrans[ key ] = newChild;\r\n\t\t\t\t\tfound = 1;\r\n\r\n\t\t\t\t\tif( newChild && newChild.__ )\r\n\t\t\t\t\t\tme.addParent( newChild, node );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treturn node;\r\n\t\t}\r\n\r\n\t\tvar frozen = this.copyMeta( node ),\r\n\t\t\treplacement, __\r\n\t\t;\r\n\r\n\t\tUtils.each( node, function( child, key ){\r\n\t\t\tif( child === oldChild ){\r\n\t\t\t\tchild = newChild;\r\n\t\t\t}\r\n\r\n\t\t\tif( child && (__ = child.__) ){\r\n\t\t\t\tme.removeParent( child, node );\r\n\t\t\t\tme.addParent( child, frozen );\r\n\t\t\t}\r\n\r\n\t\t\tfrozen[ key ] = child;\r\n\t\t});\r\n\r\n\t\tnode.__.store.freezeFn( frozen );\r\n\r\n\t\tthis.refreshParents( node, frozen );\r\n\t},\r\n\r\n\tfixChildren: function( node, oldNode ){\r\n\t\tvar me = this;\r\n\t\tUtils.each( node, function( child ){\r\n\t\t\tif( !child || !child.__ )\r\n\t\t\t\treturn;\r\n\r\n\t\t\t// Update parents in all children no matter the child\r\n\t\t\t// is linked to the node or not.\r\n\t\t\tme.fixChildren( child );\r\n\r\n\t\t\tif( child.__.parents.length === 1 )\r\n\t\t\t\treturn child.__.parents = [ node ];\r\n\r\n\t\t\tif( oldNode )\r\n\t\t\t\tme.removeParent( child, oldNode );\r\n\r\n\t\t\tme.addParent( child, node );\r\n\t\t});\r\n\t},\r\n\r\n\tcopyMeta: function( node ){\r\n\t\tvar me = this,\r\n\t\t\tfrozen = nodeCreator.clone( node ),\r\n\t\t\t_ = node.__\r\n\t\t;\r\n\r\n\t\tUtils.addNE( frozen, {__: {\r\n\t\t\tstore: _.store,\r\n\t\t\tupdateRoot: _.updateRoot,\r\n\t\t\tlistener: _.listener,\r\n\t\t\tparents: _.parents.slice( 0 ),\r\n\t\t\ttrans: _.trans,\r\n\t\t\tpivot: _.pivot,\r\n\t\t}});\r\n\r\n\t\tif( _.pivot )\r\n\t\t\tthis.unpivot( frozen );\r\n\r\n\t\treturn frozen;\r\n\t},\r\n\r\n\trefreshParents: function( oldChild, newChild ){\r\n\t\tvar _ = oldChild.__,\r\n\t\t\tparents = _.parents.length,\r\n\t\t\ti\r\n\t\t;\r\n\r\n\t\tif( oldChild.__.updateRoot ){\r\n\t\t\toldChild.__.updateRoot( oldChild, newChild );\r\n\t\t}\r\n\t\tif( newChild ){\r\n\t\t\tthis.emit( oldChild, 'update', newChild, _.store.live );\r\n\t\t}\r\n\t\tif( parents ){\r\n\t\t\tfor (i = parents - 1; i >= 0; i--) {\r\n\t\t\t\tthis.refresh( _.parents[i], oldChild, newChild );\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tremoveParent: function( node, parent ){\r\n\t\tvar parents = node.__.parents,\r\n\t\t\tindex = parents.indexOf( parent )\r\n\t\t;\r\n\r\n\t\tif( index !== -1 ){\r\n\t\t\tparents.splice( index, 1 );\r\n\t\t}\r\n\t},\r\n\r\n\taddParent: function( node, parent ){\r\n\t\tvar parents = node.__.parents,\r\n\t\t\tindex = parents.indexOf( parent )\r\n\t\t;\r\n\r\n\t\tif( index === -1 ){\r\n\t\t\tparents[ parents.length ] = parent;\r\n\t\t}\r\n\t},\r\n\r\n\temit: function( node, eventName, param, now ){\r\n\t\tvar listener = node.__.listener;\r\n\t\tif( !listener )\r\n\t\t\treturn;\r\n\r\n\t\tvar ticking = listener.ticking;\r\n\r\n\t\tif( now ){\r\n\t\t\tif( ticking || param ){\r\n\t\t\t\tlistener.ticking = 0;\r\n\t\t\t\tlistener.emit( eventName, ticking || param, node );\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlistener.ticking = param;\r\n\t\tif( !listener.prevState ){\r\n\t\t\tlistener.prevState = node;\r\n\t\t}\r\n\r\n\t\tif( !ticking ){\r\n\t\t\tUtils.nextTick( function(){\r\n\t\t\t\tif( listener.ticking ){\r\n\t\t\t\t\tvar updated = listener.ticking,\r\n\t\t\t\t\t\tprevState = listener.prevState\r\n\t\t\t\t\t;\r\n\r\n\t\t\t\t\tlistener.ticking = 0;\r\n\t\t\t\t\tlistener.prevState = 0;\r\n\r\n\t\t\t\t\tlistener.emit( eventName, updated, node );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\tcreateListener: function( frozen ){\r\n\t\tvar l = frozen.__.listener;\r\n\r\n\t\tif( !l ) {\r\n\t\t\tl = Object.create(Emitter, {\r\n\t\t\t\t_events: {\r\n\t\t\t\t\tvalue: {},\r\n\t\t\t\t\twritable: true\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfrozen.__.listener = l;\r\n\t\t}\r\n\r\n\t\treturn l;\r\n\t}\r\n};\r\n\r\nnodeCreator.init( Frozen );\r\n//#build\r\n\r\nmodule.exports = Frozen;\r\n","'use strict';\n\nvar Utils = require( './utils.js' );\n\n//#build\nvar nodeCreator = {\n\tinit: function( Frozen ){\n\n\t\tvar commonMethods = {\n\t\t\tset: function( attr, value ){\n\t\t\t\tvar attrs = attr,\n\t\t\t\t\tupdate = this.__.trans,\n\t\t\t\t\tisArray = this.constructor === Array,\n\t\t\t\t\tmsg = 'Freezer arrays only accept numeric attributes, given: '\n\t\t\t\t;\n\n\t\t\t\tif( typeof attr !== 'object' ){\n\t\t\t\t\tif( isArray && parseInt(attr) != attr ){\n\t\t\t\t\t\tUtils.warn( 0, msg + attr );\n\t\t\t\t\t\treturn Utils.findPivot( this ) || this;\n\t\t\t\t\t}\n\t\t\t\t\tattrs = {};\n\t\t\t\t\tattrs[ attr ] = value;\n\t\t\t\t}\n\n\t\t\t\tif( !update ){\n\t\t\t\t\tfor( var key in attrs ){\n\t\t\t\t\t\tif( isArray && parseInt(key) != key ){\n\t\t\t\t\t\t\tUtils.warn( 0, msg + key );\n\t\t\t\t\t\t\treturn Utils.findPivot( this ) || this;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tupdate = update || this[ key ] !== attrs[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// No changes, just return the node\n\t\t\t\t\tif( !update )\n\t\t\t\t\t\treturn Utils.findPivot( this ) || this;\n\t\t\t\t}\n\n\t\t\t\tvar name = isArray ? 'array.set' : 'object.set';\n\t\t\t\treturn this.__.store.notify( 'merge', this, attrs, name );\n\t\t\t},\n\n\t\t\treset: function( attrs ) {\n\t\t\t\treturn this.__.store.notify( 'replace', this, attrs, 'object.replace' );\n\t\t\t},\n\n\t\t\tgetListener: function(){\n\t\t\t\treturn Frozen.createListener( this );\n\t\t\t},\n\n\t\t\ttoJS: function(){\n\t\t\t\tvar js;\n\t\t\t\tif( this.constructor === Array ){\n\t\t\t\t\tjs = new Array( this.length );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tjs = {};\n\t\t\t\t}\n\n\t\t\t\tUtils.each( this, function( child, i ){\n\t\t\t\t\tif( child && child.__ )\n\t\t\t\t\t\tjs[ i ] = child.toJS();\n\t\t\t\t\telse\n\t\t\t\t\t\tjs[ i ] = child;\n\t\t\t\t});\n\n\t\t\t\treturn js;\n\t\t\t},\n\n\t\t\ttransact: function(){\n\t\t\t\treturn this.__.store.notify( 'transact', this );\n\t\t\t},\n\n\t\t\trun: function(){\n\t\t\t\treturn this.__.store.notify( 'run', this );\n\t\t\t},\n\n\t\t\tnow: function(){\n\t\t\t\treturn this.__.store.notify( 'now', this );\n\t\t\t},\n\n\t\t\tpivot: function(){\n\t\t\t\treturn this.__.store.notify( 'pivot', this );\n\t\t\t}\n\t\t};\n\n\t\tvar arrayMethods = Utils.extend({\n\t\t\tpush: function( el ){\n\t\t\t\treturn this.append( [el], 'array.push' );\n\t\t\t},\n\n\t\t\tappend: function( els, name ){\n\t\t\t\tif( els && els.length )\n\t\t\t\t\treturn this.__.store.notify( 'splice', this, [this.length, 0].concat( els ), name || 'array.append' );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\tpop: function(){\n\t\t\t\tif( !this.length )\n\t\t\t\t\treturn this;\n\n\t\t\t\treturn this.__.store.notify( 'splice', this, [this.length -1, 1], 'array.pop' );\n\t\t\t},\n\n\t\t\tunshift: function( el ){\n\t\t\t\treturn this.prepend( [el], 'array.unshift' );\n\t\t\t},\n\n\t\t\tprepend: function( els ){\n\t\t\t\tif( els && els.length )\n\t\t\t\t\treturn this.__.store.notify( 'splice', this, [0, 0].concat( els ), 'array.prepend' );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\tshift: function(){\n\t\t\t\tif( !this.length )\n\t\t\t\t\treturn this;\n\n\t\t\t\treturn this.__.store.notify( 'splice', this, [0, 1], 'array.shift' );\n\t\t\t},\n\n\t\t\tsplice: function( index, toRemove, toAdd ){\n\t\t\t\treturn this.__.store.notify( 'splice', this, arguments, 'array.splice' );\n\t\t\t},\n\n\t\t\tsort: function(){\n\t\t\t\tvar mutable = this.slice();\n\t\t\t\tmutable.sort.apply(mutable, arguments);\n\t\t\t\treturn this.__.store.notify( 'replace', this, mutable, 'array.sort' );\n\t\t\t}\n\t\t}, commonMethods );\n\n\t\tvar FrozenArray = Object.create( Array.prototype, Utils.createNE( arrayMethods ) );\n\n\t\tvar objectMethods = Utils.createNE( Utils.extend({\n\t\t\tremove: function( keys ){\n\t\t\t\tvar filtered = [],\n\t\t\t\t\tk = keys\n\t\t\t\t;\n\n\t\t\t\tif( keys.constructor !== Array )\n\t\t\t\t\tk = [ keys ];\n\n\t\t\t\tfor( var i = 0, l = k.length; i<l; i++ ){\n\t\t\t\t\tif( this.hasOwnProperty( k[i] ) )\n\t\t\t\t\t\tfiltered.push( k[i] );\n\t\t\t\t}\n\n\t\t\t\tif( filtered.length )\n\t\t\t\t\treturn this.__.store.notify( 'remove', this, filtered, 'object.remove' );\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}, commonMethods));\n\n\t\tvar FrozenObject = Object.create( Object.prototype, objectMethods );\n\n\t\tvar createArray = (function(){\n\t\t\t// fast version\n\t\t\tif( [].__proto__ )\n\t\t\t\treturn function( length ){\n\t\t\t\t\tvar arr = new Array( length );\n\t\t\t\t\tarr.__proto__ = FrozenArray;\n\t\t\t\t\treturn arr;\n\t\t\t\t}\n\n\t\t\t// slow version for older browsers\n\t\t\treturn function( length ){\n\t\t\t\tvar arr = new Array( length );\n\n\t\t\t\tfor( var m in arrayMethods ){\n\t\t\t\t\tarr[ m ] = arrayMethods[ m ];\n\t\t\t\t}\n\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t})();\n\n\t\tthis.clone = function( node ){\n\t\t\tvar cons = node.constructor;\n\t\t\tif( cons === Array ){\n\t\t\t\treturn createArray( node.length );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( cons === Object ){\n\t\t\t\t\treturn Object.create( FrozenObject );\n\t\t\t\t}\n\t\t\t\t// Class instances\n\t\t\t\telse {\n\t\t\t\t\treturn Object.create( cons.prototype, objectMethods );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n//#build\n\nmodule.exports = nodeCreator;\n","if (typeof window !== 'undefined') {\n\tlet history = window.history;\n\t['pushState', 'replaceState'].forEach(fn => {\n\t\tlet base = history[fn].bind(history);\n\t\tlet eventName = 'on' + fn.toLowerCase();\n\t\thistory[fn] = (...args) => {\n\t\t\tlet returnValue = base(...args);\n\t\t\tif (typeof history[eventName] === 'function') {\n\t\t\t\thistory[eventName]({ state: args[0] });\n\t\t\t}\n\t\t\treturn returnValue;\n\t\t};\n\t});\n}\n","// extracted by extract-css-chunks-webpack-plugin\nmodule.exports = {\"cf\":\"global__cf__2jrVz\",\"pageTitles\":\"global__pageTitles__3rk3V\"};","const state = {\n\tcategories: [],\n\tchangeListeners: [],\n};\n\nexport const STRICTLY_NECESSARY = 'STRICTLY_NECESSARY';\nexport const FUNCTIONAL = 'FUNCTIONAL';\nexport const TARGETING = 'TARGETING';\nexport const ADVERTISING = 'ADVERTISING';\n\nconst dict = {\n\t'1': STRICTLY_NECESSARY,\n\t'3': FUNCTIONAL,\n\t'4': TARGETING,\n};\n\nexport const set = (ids) => {\n\tstate.categories = (Array.isArray(ids) ? ids : ids.split(',')).map(id => dict[id]).filter(a => !!a);\n\tstate.changeListeners.forEach(listener => listener(state.categories));\n};\n\nexport const get = () => state.categories;\n\nexport const has = (categories, category) => {\n\tif (typeof categories === 'string') {\n\t\treturn has(state.categories, categories);\n\t}\n\n\treturn categories.indexOf(category) !== -1;\n};\n\nexport const addChangeListener = (fn) => {\n\tstate.changeListeners = [...state.changeListeners, fn];\n};\n\nexport const removeChangeListener = (fn) => {\n\tstate.changeListeners = state.changeListeners.filter(a => a !== fn);\n};\n","import * as categories from './categories';\n\nlet _queue = [];\n\nexport const triggerOrQueue = (managed, shouldQueue, args) => {\n\tif (categories.has(managed.category)) {\n\t\treturn managed.pixel.apply(managed, args);\n\t}\n\n\tif (shouldQueue) {\n\t\treturn add(managed, args);\n\t}\n};\n\nexport const add = (managed, args) => {\n\t_queue = [..._queue, [managed, args]];\n};\n\nexport const drain = () => {\n\tconst prevQueue = [..._queue];\n\t_queue = [];\n\tprevQueue.forEach(([managed, args]) => triggerOrQueue(managed, managed.shouldQueue, args));\n};\n","import { triggerOrQueue } from './queue';\n/**\n * Class representing managed pixel\n */\nexport default class Pixel {\n\tconstructor(category, pixel, shouldQueue = false) {\n\t\tthis.category = category;\n\t\tthis.pixel = pixel;\n\t\tthis.shouldQueue = shouldQueue;\n\t}\n\n\tcreateTrigger() {\n\t\treturn (...args) => {\n\t\t\ttriggerOrQueue(this, this.shouldQueue, args);\n\t\t};\n\t}\n}\n","import Pixel from './Pixel';\nimport cleanCategory from '../cleanCategoryName.common';\n\nexport const maybeHandle = (oneTrustCategory, fn, shouldQueue) => {\n\tconst category = cleanCategory(oneTrustCategory);\n\tif (typeof category === 'undefined') {\n\t\treturn fn();\n\t}\n\n\tconst pixel = new Pixel(category, fn, shouldQueue);\n\treturn pixel.createTrigger()();\n};\n","// import { h, Component } from 'preact';\nimport { h } from 'preact';\nimport * as categories from './categories';\n\nexport default function connectToOneTrust(category, C) {\n\treturn class OneTrustComponent extends C {\n\t\tconstructor(props) {\n\t\t\tsuper(props);\n\t\t\tthis.onOneTrustCategoriesChange = this.onOneTrustCategoriesChange.bind(this);\n\t\t\tthis.state = this.state || {};\n\t\t\tthis.onOneTrustCategoriesChange(categories.get());\n\t\t}\n\n\t\tcomponentDidMount(...args) {\n\t\t\tif (typeof super.componentDidMount === 'function') {\n\t\t\t\tsuper.componentDidMount(...args);\n\t\t\t}\n\t\t\tcategories.addChangeListener(this.onOneTrustCategoriesChange);\n\t\t}\n\n\t\tcomponentWillUnmount(...args) {\n\t\t\tif (typeof super.componentWillUnmount === 'function') {\n\t\t\t\tsuper.componentWillUnmount(...args);\n\t\t\t}\n\t\t\tcategories.removeChangeListener(this.onOneTrustCategoriesChange);\n\t\t}\n\n\t\tonOneTrustCategoriesChange(nextCategories) {\n\t\t\tlet oneTrustCategories = [...nextCategories];\n\t\t\tlet oneTrustAllowed = categories.has(oneTrustCategories, category);\n\t\t\tthis.setState({ oneTrustCategories, oneTrustAllowed });\n\t\t}\n\t};\n}\n\n\n// OLD VERSION FOR REFERENCE\n\n// import { h, Component } from 'preact';\n// import * as categories from './categories';\n//\n// export default function connectToOneTrust(category, C) {\n// \treturn class OneTrustComponent extends Component {\n// \t\tconstructor(props) {\n// \t\t\tsuper(props);\n// \t\t\tthis.onCategoriesChange = this.onCategoriesChange.bind(this);\n// \t\t\tthis.state.categories = [...categories.get()];\n// \t\t}\n//\n// \t\tcomponentDidMount() {\n// \t\t\tcategories.addChangeListener(this.onCategoriesChange);\n// \t\t}\n//\n// \t\tcomponentWillUnmount() {\n// \t\t\tcategories.removeChangeListener(this.onCategoriesChange);\n// \t\t}\n//\n// \t\tonCategoriesChange(nextCategories) {\n// \t\t\tthis.setState({\n// \t\t\t\tcategories: [...nextCategories],\n// \t\t\t});\n// \t\t}\n//\n// \t\trender() {\n// \t\t\treturn (\n// \t\t\t\t<C\n// \t\t\t\t\t{...this.props}\n// \t\t\t\t\toneTrustAllowed={categories.has(this.state.categories, category)}\n// \t\t\t\t/>\n// \t\t\t);\n// \t\t}\n// \t};\n// }\n","import { h, Component } from 'preact';\nimport * as categories from './categories';\n\nexport default function createPixelComponent (...Components) {\n\t// NOTE: Should we have the class outside of this function and just return an instance instead ? Can pass Components as a prop\n\t// Not a big issue but feels weird to create a whole new class at every call of this function (in the pixels render)\n\treturn class PixelComponent extends Component {\n\t\tconstructor(props) {\n\t\t\tsuper(props);\n\t\t\tthis.onCategoriesChange = this.onCategoriesChange.bind(this);\n\t\t\tthis.state.categories = [...categories.get()];\n\t\t}\n\n\t\tcomponentDidMount() {\n\t\t\tcategories.addChangeListener(this.onCategoriesChange);\n\t\t}\n\n\t\tcomponentWillUnmount() {\n\t\t\tcategories.removeChangeListener(this.onCategoriesChange);\n\t\t}\n\n\t\tshouldComponentUpdate(nextProps, nextState) {\n\t\t\treturn nextState.categories !== this.state.categories\n\t\t\t\t|| nextProps.children !== this.props.children;\n\t\t}\n\n\t\tonCategoriesChange(nextCategories) {\n\t\t\tthis.setState({\n\t\t\t\tcategories: [...nextCategories],\n\t\t\t});\n\t\t}\n\n\t\trender() {\n\t\t\treturn (\n\t\t\t\t<div>\n\t\t\t\t\t{Components\n\t\t\t\t\t\t.filter(([category]) => categories.has(\n\t\t\t\t\t\t\tthis.state.categories,\n\t\t\t\t\t\t\tcategory\n\t\t\t\t\t\t))\n\t\t\t\t\t\t.map(([, C]) => (<C {...this.props} />))\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t};\n}\n","import { h } from 'preact';\nimport cleanCategory from '../cleanCategoryName.common';\nimport * as categories from './categories';\nimport * as queue from './queue';\nimport IframeOptanonWrapper from './iframe';\n\nexport { default as Pixel } from './Pixel';\nexport { maybeHandle } from './maybeHandle';\nexport { default as connectToOneTrust } from './connectToOneTrust';\nexport { default as createPixelComponent } from './createPixelComponent';\n\nexport { STRICTLY_NECESSARY, FUNCTIONAL, TARGETING, ADVERTISING } from './categories';\n\nexport const cleanCategoryName = cleanCategory;\n\nexport const displayModal = () => {\n\tif (typeof window === 'object') {\n\t\tconst api = window.Optanon || window.OneTrust;\n\t\tif (api && typeof api === 'object' && typeof api.ToggleInfoDisplay === 'function') {\n\t\t\tapi.ToggleInfoDisplay();\n\t\t}\n\t}\n};\n\nconst dispatchEvent = (name, data = {\n\tbubbles: false,\n\tcancelable: false,\n\tdetail: null,\n}) => {\n\tlet E = window.CustomEvent;\n\tif (typeof E !== 'function') {\n\t\t// eslint-disable-next-line\n\t\tfunction FakeEvent(name, data) {\n\t\t\tconst e = document.createEvent('CustomEvent');\n\t\t\te.initCustomEvent(name, data.bubbles, data.cancelable, data.detail);\n\t\t\treturn e;\n\t\t}\n\t\tFakeEvent.prototype = window.Event.prototype;\n\t\tE = FakeEvent;\n\t}\n\twindow.dispatchEvent(new E(name, data));\n};\n\ncategories.addChangeListener((allowedCategories) => {\n\twindow.powsterOneTrust = [...allowedCategories];\n\tallowedCategories.forEach((category) => dispatchEvent(`powster.onetrust.${category}`));\n});\n\ncategories.addChangeListener((allowedCategories) => {\n\tqueue.drain(allowedCategories);\n});\n\nfunction getCookie(name) {\n\tlet value = '; ' + document.cookie;\n\tlet parts = value.split('; ' + name + '=');\n\tif (parts.length == 2) {\n\t\treturn parts.pop().split(';').shift();\n\t}\n}\nif (typeof window !== 'undefined') {\n\tlet isOptatonInitialised = false;\n\tconst existingOptanonWrapper = window.OptanonWrapper;\n\n\twindow.OptanonWrapper = function() {\n\t\tif (existingOptanonWrapper && typeof existingOptanonWrapper === 'function') {\n\t\t\texistingOptanonWrapper();\n\t\t}\n\n\t\tif (window.dataLayer) {\n\t\t\twindow.dataLayer.push( { event: 'OneTrustGroupsUpdated' } ) ;\n\t\t}\n\n\t\tIframeOptanonWrapper();\n\n\t\tconst oneTrustFix = Store.get().appData.apis.tracking.oneTrust.oneTrustFix;\n\n\t\tif (oneTrustFix) {\n\t\t\tif (!getCookie('OptanonAlertBoxClosed')) {\n\t\t\t\tlet buttons = document.querySelectorAll('.optanon-white-button-middle, .accept-cookies-button');\n\n\t\t\t\t// eslint-disable-next-line\n\t\t\t\tfunction bindEvent(el, eventName, eventHandler) {\n\t\t\t\t\tif (!el) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (el.addEventListener) {\n\t\t\t\t\t\tel.addEventListener(eventName, eventHandler, false);\n\t\t\t\t\t} else if (el.attachEvent) {\n\t\t\t\t\t\tel.attachEvent('on' + eventName, eventHandler);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// ???\n\t\t\t\tconst close = () => {\n\t\t\t\t\tlet banner = document.getElementById('optanon');\n\t\t\t\t\tif (!banner) return;\n\t\t\t\t\tbanner.style.opacity = 0;\n\t\t\t\t\tbanner.style.transition = 'opacity .8s';\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tconst bg = document.getElementById('optanon-popup-bg');\n\t\t\t\t\t\tif (bg) {\n\t\t\t\t\t\t\tbg.style.display = 'none';\n\t\t\t\t\t\t\tbanner.style.opacity = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 800);\n\t\t\t\t};\n\n\t\t\t\t[...buttons].forEach(button => bindEvent(button, 'click', close));\n\t\t\t}\n\t\t}\n\n\n\t\tif (!isOptatonInitialised) {\n\t\t\tconst activeGroups = window.OptanonActiveGroups;\n\t\t\tcategories.set(activeGroups);\n\t\t\tisOptatonInitialised = true;\n\t\t}\n\t};\n\n\twindow.addEventListener('consent.onetrust', ({ detail }) => {\n\t\treturn categories.set(detail);\n\t});\n}\n","\nexport default function IframeOptanonWrapper() {\n\tfunction getCookie(cname) {\n\t\tlet name = cname + \"=\";\n\t\tlet decodedCookie = decodeURIComponent(document.cookie);\n\t\tlet ca = decodedCookie.split(';');\n\t\tfor(let i = 0; i <ca.length; i++) {\n\t\t\tlet c = ca[i];\n\t\t\twhile (c.charAt(0) == ' ') {\n\t\t\t\tc = c.substring(1);\n\t\t\t}\n\t\t\tif (c.indexOf(name) == 0) {\n\t\t\t\treturn c.substring(name.length, c.length);\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}\n\tlet value = getCookie(\"OptanonConsent\");\n\tlet value1 = getCookie(\"OptanonAlertBoxClosed\");\n\t//We won't need this after we confirm demo stage.\n\tif (window.self === window.top) {\n\t\tfor (let i = 0; i < window.frames.length; i++) {\n\t\t\tlet pass_data = {\n\t\t\t\t'OptanonConsent':value,\n\t\t\t\t'OptanonAlertBoxClosed':value1\n\t\t\t};\n\t\t\tif (typeof window.frames[0].postMessage === 'function') {\n\t\t\t\twindow.frames[0].postMessage(pass_data, '*');\n\t\t\t}\n\t\t}\n\t}\n\t// Iframed content\n\tif (window.self !== window.top) {\n\t\twindow.addEventListener('message', (event) => {\n\t\t\tif(!(event && event.data && event.data.OptanonConsent)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdocument.body.style.transform = \"none\";\n\t\t\tdocument.cookie = \"OptanonConsent=\" + event.data.OptanonConsent + \";path=/;\";\n\t\t\tif(event.data.OptanonAlertBoxClosed){\n\t\t\t\tdocument.cookie = \"OptanonAlertBoxClosed=\"+event.data.OptanonAlertBoxClosed+\";path=/;\";\n\t\t\t}\n\t\t});\n\t}\n\n\tfunction checkAndHideOneTrust() {\n\t\tif (document.getElementById(\"optanon\")) {\n\t\t\tdocument.getElementsByClassName(\"optanon-alert-box-wrapper\")[0].style.display = \"none\";\n\t\t\tdocument.getElementById(\"optanon\").style.display = \"none\";\n\t\t} else {\n\t\t\tsetTimeout(checkAndHideOneTrust, 100);\n\t\t}\n\t}\n\n\tif (window.__INITIAL_STATE__ &&\n\t\twindow.__INITIAL_STATE__.appData &&\n\t\twindow.__INITIAL_STATE__.appData.apis &&\n\t\twindow.__INITIAL_STATE__.appData.apis.tracking &&\n\t\twindow.__INITIAL_STATE__.appData.apis.tracking.oneTrust &&\n\t\twindow.__INITIAL_STATE__.appData.apis.tracking.oneTrust.displayInIframe &&\n\t\twindow.self !== window.top\n\t) {\n\n\t\tsetTimeout(checkAndHideOneTrust, 100);\n\t}\n}\n","/* SEE BELOW FOR HOW TO USE */\nlet isIOS = (function() {\n\tif (typeof navigator === 'undefined') {\n\t\treturn false;\n\t}\n\tconst agent = ('' + navigator.userAgent).toLowerCase();\n\treturn agent.indexOf('ipad') !== -1 || agent.indexOf('iphone') !== -1;\n})();\n\nlet now = Date.now || (() => new Date().getTime());\n\nfunction getScroll(elem, hor) {\n\tif (elem === window) {\n\t\treturn (hor ? window.pageXOffset || document.documentElement.scrollLeft : window.pageYOffset || document.documentElement.scrollTop) || 0;\n\t}\n\treturn hor ? elem.scrollLeft : elem.scrollTop;\n}\n\nfunction setScroll(elem, v, hor) {\n\tif (elem === window) {\n\t\twindow.scrollTo(hor ? v : getScroll(window, true), hor ? getScroll(window, false) : v);\n\t} else {\n\t\telem[hor ? 'scrollLeft' : 'scrollTop'] = v;\n\t}\n}\n\nfunction getElemPos(e, parent, hor) {\n\tlet prop = hor ? 'offsetLeft' : 'offsetTop';\n\tlet pos = e[prop];\n\tlet last = e;\n\n\twhile ((e = e.parentElement) && e !== parent)\n\t\tif (e === last.offsetParent) {\n\t\t\tlast = e;\n\t\t\tpos += e[prop];\n\t\t}\n\tif (parent !== window && e !== parent) return undefined;\n\treturn pos;\n\t// Other possibility\n\t// var eBounds = e.getBoundingClientRect(), pBounds = parent.getBoundingClientRect();\n\t// return eBounds.top - pBounds.top;\n}\n\nfunction endScroll(elem) {\n\tlet t = elem._smthscrl;\n\tif (!t) return;\n\tcancelAnimationFrame(t.timer);\n\tt.timer = null;\n\tif (typeof t.callback === 'function') {\n\t\tt.callback();\n\t}\n\tt.callback = null;\n}\n\nconst relativeToKeywords = { top: 0, middle: 50, bottom: 100 };\nfunction oneDir(elem, p, horizontal) {\n\tlet t = elem._smthscrl;\n\tlet currentScroll = getScroll(elem, horizontal);\n\tlet dirIndex = horizontal ? 1 : 0;\n\tif (t.previousScroll[dirIndex] == undefined) {\n\t\tt.previousScroll[dirIndex] = currentScroll;\n\t}\n\t// Try to not block the user from scrolling. The user shouldn't be forced to watch the full scrolling animation\n\t// Disabled that on iOS as it seemed to be stopping too early\n\t//   (guessing some rounding or smoothscroll happens, which changes the scroll without the user touching)\n\tif (currentScroll !== t.previousScroll[dirIndex] && !t.force && !isIOS) {\n\t\t// As mentioned above, this breaks on Ios, so only run this on devices\n\t\t// that supports it\n\t\treturn endScroll(elem);\n\t}\n\tlet to = t.to;\n\tif (Array.isArray(to)) {\n\t\tto = to[dirIndex];\n\t}\n\tif (to instanceof Element) {\n\t\tto = getElemPos(t.to, elem, horizontal);\n\t\tlet sizeProp = horizontal ? 'clientWidth' : 'clientHeight';\n\t\tif (t.relativeTo === 'view') {\n\t\t\tlet maxPos = to - t.offsetStart;\n\t\t\tlet minPos = to - (elem[sizeProp] - t.to[sizeProp]) + t.offsetEnd;\n\t\t\tto = Math.min(Math.max(currentScroll + t.offset, minPos), maxPos);\n\t\t} else {\n\t\t\tlet rT = t.relativeTo;\n\t\t\trT = (relativeToKeywords.hasOwnProperty(rT) ? relativeToKeywords[rT] : parseFloat(rT)) || 0;\n\t\t\tto -= Math.max(elem[sizeProp] - t.to[sizeProp], 0) * rT * .01;\n\t\t}\n\t}\n\tto -= t.offset;\n\n\tlet newValue = t.from[dirIndex] + p * (to - t.from[dirIndex]);\n\tsetScroll(elem, newValue, horizontal);\n\tt.previousScroll[dirIndex] = getScroll(elem, horizontal);\n}\n\nconst directions = {\n\tver: [false],\n\thor: [true],\n\tboth: [false, true]\n};\nfunction loop(elem) {\n\tlet t = elem._smthscrl;\n\tif (!t) {\n\t\treturn;\n\t}\n\t// If t.timer is null, the scrolling has been stopped, don't request the next frame\n\tif (t.timer) {\n\t\tt.timer = requestAnimationFrame(loop.bind(this, elem));\n\t}\n\tlet time = now() - t.start;\n\tlet duration = t.duration;\n\n\tif (time >= duration) {\n\t\ttime = duration;\n\t}\n\tlet p = duration ? t.easing(time / duration) : 1;\n\tlet directionsArray = directions[t.direction] || [];\n\tdirectionsArray.forEach(hor => oneDir(elem, p, hor));\n\tif (!duration || time >= duration) {\n\t\treturn endScroll(elem);\n\t}\n}\n\n// elem : element to scroll (parent container, having a scrollbar)\n//   - if elem is null or the string 'root', the script will use either body or the documentElement based on which is detected to have a scrollbar\n// to : scroll to this. Can be a number (scrollTop = v at the end) or an element ! (more on that later)\n// dur : duration (in ms). Default to 300. 0 to instant scroll.\n// settings : Object containing\n//   - callback : callback to be called after the scroll is ended (either goal reached or the user scrolled during it)\n//   - direction: 'ver' (default) for vertical, 'hor' for horizontal or 'both' (in this case, v can be an array of two numbers, [verticalPos, horizontalPos])\n//   - easing: a function taking a number v between 0 and 1 as argument and returning another number\n//       easing(0) should be 0 and easing(1) should be 1 ! (can be used to handle acceleration)\n//       default to ease-out-quad (decelerating)\n//       See https://gist.github.com/gre/1650294 for a list of basic functions\n//   - offset: number to be subtracted from the current scroll (useful if v is not a number)\n//       an offset of 20 would scroll 20 pixels past the required value\n//   - relativeTo: used when `v` is an element. Indicates where the element should be on the screen (works like background-position).\n//       'top' (default): top of v is aligned with the top of elem (eq to '0%')\n//       'bottom': bottom of v is aligned with the bottom of elem (eq to '100%')\n//       'middle': middle of v is aligned with the middle of elem (eq to '50%')\n//       'x%' or 'x': aligns the xth percent of v with the xth percent of elem\n//       'view': try to make the element visible (fully if possible)\n//          will not scroll if the element is already fully in view\n//          if v is bigger than elem, makes sure the top of v is visible\n//   - offsetStart: used when `v` is an element and relativeTo is 'view'. ensure a minimum margin from the top or left, depending on the direction (can be negative)\n//   - offsetEnd: used when `v` is an element and relativeTo is 'view'. ensure a minimum margin from the bottom or right, depending on the direction (can be negative)\n//   - force: boolean (default false) to force the smoothScroll to finish (even if the user scrolled)\nexport function smoothScrollTo(elem, to, dur, settings) {\n\tif (elem === null || elem === 'root') {\n\t\tlet doc = document;\n\t\telem = doc.scrollingElement || (\n\t\t\tdoc.documentElement.scrollHeight > doc.body.scrollHeight && doc.compatMode.startsWith('CSS1') ? doc.documentElement : doc.body\n\t\t);\n\t}\n\tif (!elem) {\n\t\treturn;\n\t}\n\tlet t = elem._smthscrl;\n\tif (t && t.timer) {\n\t\tendScroll(elem);\n\t}\n\tlet defaultEasing = (t => 1 - (t = 1 - t) * t);\n\tsettings = settings || {};\n\tlet dir = 'ver';\n\tswitch (settings.direction) {\n\t\tcase 'horizontal':\n\t\tcase 'hor':\n\t\t\tdir = 'hor';\n\t\t\tbreak;\n\t\tcase 'both':\n\t\t\tdir = 'both';\n\t\t\tbreak;\n\t}\n\t// Legacy horizontal mode\n\tif (settings.horizontal) dir = 'hor';\n\tlet currentScroll = [undefined, undefined];\n\tif (dir === 'ver' || dir === 'both') currentScroll[0] = getScroll(elem, false);\n\tif (dir === 'hor' || dir === 'both') currentScroll[1] = getScroll(elem, true);\n\tlet start = now();\n\tif (settings.timeStart) {\n\t\tstart = settings.timeStart < 60000 ? start + settings.timeStart : settings.timeStart;\n\t}\n\tif (typeof dur === 'function') {\n\t\tlet from = dir === 'both' ? currentScroll : currentScroll[dir === 'ver' ? 0 : 1];\n\t\tdur = dur(from, to, elem);\n\t}\n\tdur = Number.isFinite(+dur) ? Math.abs(+dur) : 300;\n\tt = elem._smthscrl = {\n\t\ttimer: null,\n\t\teasing: typeof settings.easing === 'function' ? settings.easing : defaultEasing,\n\t\tto: to,\n\t\tdirection: dir,\n\t\toffset: settings.offset || 0,\n\t\trelativeTo: settings.relativeTo || 'top',\n\t\toffsetStart: settings.offsetStart || 0,\n\t\toffsetEnd: settings.offsetEnd || 0,\n\t\tfrom: currentScroll,\n\t\tpreviousScroll: [undefined, undefined],\n\t\tduration: dur,\n\t\tforce: !!settings.force,\n\t\tcallback: settings.callback,\n\t\tstart: start\n\t};\n\tt.timer = requestAnimationFrame(loop.bind(this, elem));\n\treturn { stop: endScroll.bind(this, elem) };\n}\n\n// Like smoothScrollTo but with v being an offset instead of an absolute value (v can't be an element)\nexport function smoothScrollBy(elem, v, d, settings) {\n\tsmoothScrollTo(elem, getScroll(elem, settings && settings.horizontal) + v, d, settings);\n}\n\n// Old way to scroll to an element\n// Use smoothScrollTo with v an element to achieve this now.\n// export function scrollToElem(elem, elem2, d, settings) {\n// \tlet top = getElemPos(elem2, elem, settings.horizontal);\n// \tif (top == undefined) return;\n// \tsmoothScrollTo(elem, top, d, settings);\n// }\n\nexport function isSmoothScrolling(elem) {\n\tlet t = elem._smthscrl;\n\treturn t && t.timer;\n}\n","import { getGeoFromIPAsync } from \"utils/clientUtils\";\nimport { accessNested, isObject, joinPaths } from \"utils/utils\";\n\n\nlet redirectState = (geoFencedLocation) => {\n\tif (!geoFencedLocation) {\n\t\treturn;\n\t}\n\tif (location.hostname === 'localhost' || location.hostname === '127.0.0.1') {\n\t\tconsole.log('GEOFENCING GOING TO', geoFencedLocation);\n\t\treturn;\n\t}\n\tlet destinationHost = (/^((https?:)?\\/\\/)?([^/]+)/.exec(geoFencedLocation) || [])[3];\n\t// Try to prevent SOME infinite redirect loops (wouldn't catch a lot of things)\n\tif (window.location.host !== destinationHost) {\n\t\twindow.location.href = geoFencedLocation;\n\t}\n\treturn true;\n};\n\nlet getGeo = (function() {\n\tlet cache;\n\treturn () => cache || (cache = getGeoFromIPAsync());\n})();\n\nexport default function geoFencing() {\n\tlet redirectionActive = typeof location !== 'undefined' && !location.search.match(/[?&]redirect=(off|false|0|no)/);\n\tif (!redirectionActive || !window.__INITIAL_STATE__) {\n\t\treturn Promise.resolve();\n\t}\n\tlet appData = window.__INITIAL_STATE__.appData || {};\n\tlet campaign = window.location.search;\n\tlet geoFence = appData.geofencing || {};\n\tlet redirectObj = appData.redirection || {};\n\tlet appRegion = accessNested(appData, 'meta.region.slug');\n\n\treturn Promise.resolve(getGeo()).then(result => {\n\t\tlet countryCode = result.countryCode;\n\t\t// NOTE: dynamicData is unlikely to already be available add some code if that needs to be the case\n\t\tconst store = Store.get();\n\t\tconst dynamicData = store.dynamicData;\n\t\tlet regionData = accessNested(dynamicData, ['regions', countryCode, 'url']);\n\n\t\t//allow for regions to be ignored per request\n\t\tconst regionAllow = geoFence.allowRegions || '';\n\t\tconst ignoreFor = regionAllow.split(',').map(region => region.trim().toLowerCase()).filter(e => e);\n\t\tconst ignoreGeoFence = ignoreFor.indexOf(countryCode) !== -1;\n\n\t\t// check if site is in correct country (and ignore if it is)\n\t\tif (appRegion !== countryCode && geoFence.geofencing && !ignoreGeoFence) {\n\t\t\tlet geoFencedLocation = accessNested(geoFence, ['overrides', countryCode]) || regionData || geoFence.defaultLink;\n\t\t\tif (geoFencedLocation) {\n\t\t\t\tlet url;\n\t\t\t\tlet noActivePage;\n\t\t\t\tif (isObject(geoFencedLocation)) {\n\t\t\t\t\turl = geoFencedLocation.url;\n\t\t\t\t\tnoActivePage = geoFencedLocation.noActivePage;\n\t\t\t\t} else {\n\t\t\t\t\turl = geoFencedLocation;\n\t\t\t\t\tnoActivePage = geoFence.noActivePage;\n\t\t\t\t}\n\t\t\t\tif (!noActivePage) url = joinPaths(url, store.activePage.path);\n\t\t\t\treturn redirectState(url + campaign);\n\t\t\t}\n\t\t} else {\n\t\t\t// standard redirect behaviour\n\t\t\tlet optionsList = Object.keys(redirectObj).map(k => redirectObj[k]).concat(redirectObj).filter(e => e && e.url);\n\t\t\tlet getActiveRedirect = Promise.resolve();\n\t\t\toptionsList.forEach(option => {\n\t\t\t\tgetActiveRedirect = getActiveRedirect.then(activeRedirect => {\n\t\t\t\t\tif (activeRedirect) return activeRedirect;\n\t\t\t\t\tlet checklist = [];\n\n\t\t\t\t\tif (option.country) {\n\t\t\t\t\t\tlet list = option.country.split(',').map(e => e.trim());\n\t\t\t\t\t\t// .then(e => console.log('?', e) || e)\n\t\t\t\t\t\tchecklist.push(list.indexOf(result.countryCode) !== -1);\n\t\t\t\t\t}\n\t\t\t\t\tif (option.countryNot) {\n\t\t\t\t\t\tlet list = option.countryNot.split(',').map(e => e.trim());\n\t\t\t\t\t\tchecklist.push(list.indexOf(result.countryCode) === -1);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Promise.all(checklist).then(listResults => listResults.every(e => e) ? option : activeRedirect).catch(e => activeRedirect);\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn getActiveRedirect.then(redirect => {\n\t\t\t\tif (!redirect) return;\n\t\t\t\treturn redirectState(redirect.url + campaign);\n\t\t\t}).catch(e => console.log('Failed redirecting', e));\n\t\t}\n\t});\n}\n","import { h } from 'preact';\nimport Store from 'store/store';\nimport * as actions from 'store/actions';\nimport { oneTrust } from 'utils/gdpr';\nimport {\n\tcalculateShowtimesStatus,\n\tgetSize,\n\tgetPageTitle,\n\tgetPath\n} from 'utils/clientUtils';\nimport {\n\ttrack,\n\tinitTracker,\n\tgaCustom,\n\tupdateDataLayer,\n\tupdateDataLayerPageView\n} from 'utils/tracking';\nimport { dbounce, accessNested, parseDate, getStylingImagePath } from 'utils/utils';\nimport { smoothScrollTo } from 'utils/smoothScroll';\nimport queryString from 'qs';\nimport route from 'components/core/link/route';\nimport 'store/updateExtra';\nimport geoFencing from 'utils/geoFencing';\nimport CookiesModal from 'components/shared/cookiesModal/cookiesModal';\n\n// NOTE: SHOWTIMES EVENTS NOT INCLUDED IN THIS\n\n/** Listen to event triggers and update the store in reaction */\n\n\n// =~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=\n// Base events\n\n/**\n * Will be triggered every time an event is fired.\n * NOTE: This should be in store.js\n * @param {string} reactionName - the name of the event\n * @param {*} data - the first argument when the event was called\n */\n// Store.on('afterAll', (reactionName, data) => {\n// \tif (reactionName !== 'update') {\n// \t\t// console.debug('TRIGGERED:', reactionName);\n// \t}\n// });\n\n/**\n * Update something in the store.\n * Should be used with care! to update anything irregular in the store.\n * NOTE: This is only used by the Warner Bros DE pixels to set movie genres.\n *       I think It should be a more explicit event like \"UPDATE_GENRES\"\n * @param {Object} storeData - the changes to apply on the store\n */\nStore.on(actions.UPDATE_STORE, (storeData) => {\n\tconst store = Store.get();\n\tstore.set(storeData);\n});\n\n\n// =~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=\n// Loader events\n\n/**\n * Update loader data.\n * This is only used in Doctor Strange AFAIK.\n * @param {Object} loader - the loader data\n */\nStore.on(actions.UPDATE_LOADER, (loader) => {\n\tconst store = Store.get();\n\n\tif (store.hasOwnProperty('loader')) {\n\t\tstore.loader.set(loader);\n\t} else {\n\t\tstore.set({ loader: loader });\n\t}\n});\n\n\n// =~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=\n// Page interactions\n\n/**\n * Update the active page.\n * This event is fired by the \"PAGE_STATE_LOADED\", which will automatically detect the active\n * page based on the page url.\n * @param {Object} activePage - the active page object\n */\nStore.on(actions.SET_ACTIVE_PAGE, (activePage) => {\n\tif (!activePage) return;\n\t// console.log('Navigating to', activePage.path);\n\tgaCustom('set', 'page', activePage.path);\n\tgaCustom('send', 'pageview');\n\ttrackPageView(activePage.id, null, false);\n\n\tconst state = Store.get();\n\tconst { copy } = state.appData;\n\n\tif (activePage.data && state.background && state.background.videoEnabled !== activePage.data.allowBgVideo) {\n\t\t// Update the allowBgVideo\n\t\tconst { data } = activePage;\n\t\tStore.emit(actions.SET_BACKGROUND_VIDEO_ENABLED, data && data.allowBgVideo);\n\t}\n\n\t// Close the sidenav\n\tStore.emit(actions.SET_SIDE_NAV_OPEN, false);\n\n\tconst sideNavBelow = accessNested(activePage, 'data.header.breakpoint') ||\n\t\taccessNested(state, 'appData.header.breakpoint');\n\tif (typeof window !== 'undefined' && state.activePage.id !== activePage.id && !activePage.order) {\n\t\t// Scroll to top ?\n\t\t// (will change the scroll if the new page is smaller anyway)\n\t\t// If we keep that, add delay so that some pages can save their leaving state scroll position\n\t\tconst { noSmoothScrollTopTransitionDuration } = state.activePage.data || {};\n\t\tif (noSmoothScrollTopTransitionDuration) {\n\t\t\tsetTimeout(() => smoothScrollTo('root', 0, 0), noSmoothScrollTopTransitionDuration);\n\t\t} else {\n\t\t\tsetTimeout(() => smoothScrollTo('root', 0, 200), 0);\n\t\t}\n\t}\n\n\t// Set the document title to the active page one\n\tdocument.title = getPageTitle(activePage, state.appData);\n\n\t///  META DESCRIPTION\n\tconst desc = document.querySelector('meta[name=\"description\"]');\n\tif (desc && typeof desc === 'object') {\n\t\tdesc.content = copy['$' + activePage.id.toUpperCase() + '_META_DESCRIPTION'] || copy.$META_DESCRIPTION;\n\t}\n\n\tconst ogDesc = document.querySelector('meta[property=\"og:description\"]');\n\tif (ogDesc && typeof ogDesc === 'object') {\n\t\togDesc.content = copy.$META_OGDESCRIPTION || copy['$' + activePage.id.toUpperCase() + '_META_DESCRIPTION'] || copy.$META_DESCRIPTION;\n\t}\n\n\tconst twitterDesc = document.querySelector('meta[name=\"twitter:description\"]');\n\tif (twitterDesc && typeof twitterDesc === 'object') {\n\t\ttwitterDesc.content = copy.$META_OGDESCRIPTION || copy['$' + activePage.id.toUpperCase() + '_META_DESCRIPTION'] || copy.$META_DESCRIPTION;\n\t}\n\n\n\t///  META TITLE\n\tconst ogMetaTitle = document.querySelector('meta[property=\"og:title\"]');\n\tif (ogMetaTitle && typeof ogMetaTitle === 'object') {\n\t\togMetaTitle.content = copy.$META_OGTITLE || copy['$' + activePage.id.toUpperCase() + '_META_TITLE'] || copy.$META_TITLE;\n\t}\n\n\n\tconst twitterMetaTitle = document.querySelector('meta[name=\"twitter:title\"]');\n\tif (twitterMetaTitle && typeof twitterMetaTitle === 'object') {\n\t\ttwitterMetaTitle.content = copy['$' + activePage.id.toUpperCase() + '_META_TITLE'] || copy.$META_TITLE;\n\t}\n\n\t/// META IMAGE\n\tconst imageRegion     = state.appData.urls.roots.imageRegion;\n\tconst defaultShareImage = copy['$' + activePage.id.toUpperCase() + '_META_IMAGE'] || copy.$META_IMAGE || state.appData.urls.shareImage || (imageRegion + '/200x200.png');\n\tconst twitterShareImage = copy['$' + activePage.id.toUpperCase() + '_META_TWITTER_IMAGE'] || accessNested(state, 'appData.meta.social.twitter.customShareImage');\n\n\tlet pageShareImage = accessNested(activePage, 'data.shareImage');\n\tlet shareImage = pageShareImage || getStylingImagePath(state.appData, '200x200', defaultShareImage);\n\n\tif (shareImage.startsWith('//')) {\n\t\tshareImage = 'https:' + shareImage;\n\t}\n\n\tconst ogMetaImage = document.querySelector('meta[property=\"og:image\"]');\n\tif (ogMetaImage && typeof ogMetaImage === 'object') {\n\t\togMetaImage.content = shareImage;\n\t}\n\n\tconst twitterMetaImage = document.querySelector('meta[name=\"twitter:image\"]');\n\tif (twitterMetaImage && typeof twitterMetaImage === 'object') {\n\t\ttwitterMetaImage.content = twitterShareImage || shareImage;\n\t}\n\n\t/// URL\n\tconst ogMetaImageSecureUrl = document.querySelector('meta[property=\"og:image:secure_url\"]');\n\tif (ogMetaImageSecureUrl && typeof ogMetaImageSecureUrl=== 'object') {\n\t\togMetaImageSecureUrl.content = shareImage;\n\t}\n\n\t/// SITE NAME\n\tconst ogMetaSiteName = document.querySelector('meta[property=\"og:site_name\"]');\n\tif (ogMetaSiteName && typeof ogMetaSiteName === 'object') {\n\t\togMetaSiteName.content = copy.$META_OGSITENAME || getPageTitle(activePage, state.appData);\n\t}\n\n\t// ///////////\n\n\n\n\tconst header = state.header;\n\tStore.get().set({ activePage });\n\n\t// Have to re-get() since the reference is changed after the first set\n\tif (state.header && state.header.sideNavBelow !== sideNavBelow) {\n\t\tStore.get().header.set({ sideNavBelow });\n\t\tStore.emit(actions.SET_SIDE_NAV_ACTIVE, state.client.deviceSize);\n\t}\n\n\tStore.emit(actions.CLOSE_TICKETING);\n});\n\n\n// =~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=\n// Background interactions\n\n/**\n * Update any of the background settings.\n * @param {Object} values - object with new background settings\n */\nfunction updateBackground(values) {\n\tconst bg = Store.get().background;\n\tif (bg) {\n\t\tbg.set(values);\n\t}\n}\nStore.on(actions.UPDATE_BACKGROUND_SETTINGS, updateBackground);\n\n/**\n * Set whether the background video should play.\n * @param {boolean} videoPlaying - whether the background video is playing\n */\nStore.on(actions.SET_BACKGROUND_VIDEO_PLAYING, (videoPlaying) => {\n\tupdateBackground({ videoPlaying });\n});\n\n/**\n * Set whether the video background is enabled.\n * @param {boolean} videoEnabled - true to enable the video background\n */\nStore.on(actions.SET_BACKGROUND_VIDEO_ENABLED, (videoEnabled) => {\n\tupdateBackground({ videoEnabled });\n});\n\n/**\n * Mute or unmute the background video.\n * @param {boolean} muted - true to mute the video, false to unmute\n */\nStore.on(actions.SET_BACKGROUND_VIDEO_MUTED, (muted) => {\n\tupdateBackground({ muted });\n});\n\n/**\n * Set the currently displayed background DOM element\n * @param {HTMLElement} element - current DOM element being the background\n */\nStore.on(actions.SET_BACKGROUND_ELEMENT, (element) => {\n\tupdateBackground({ element });\n});\n\n\n// =~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=\n// Header interactions\n\n/**\n * Set whether the header menu is opened.\n * @param {boolean} sideNavOpen - true to open the menu, false to close it\n */\nStore.on(actions.SET_SIDE_NAV_OPEN, (sideNavOpen) => {\n\tconst header = Store.get().header;\n\tif(!header) return;\n\tif (!!sideNavOpen === !!header.sideNavOpen) return;\n\ttrack({ a: sideNavOpen ? 'nav-open' : 'nav-closed' });\n\theader.set({ sideNavOpen });\n});\n\n/**\n * Set whether the header is hidden.\n * @param {boolean} hidden - true to hide the menu, false to show it\n */\nStore.on(actions.HEADER_HIDDEN, (hidden) => {\n\tStore.get().header.set({ hidden });\n});\n\n/**\n * Set whether the side nav is active\n * @param {string} deviceSize - the current device size\n */\nStore.on(actions.SET_SIDE_NAV_ACTIVE, (deviceSize) => {\n\tconst store = Store.get();\n\tconst headerStore = store.header;\n\n\tif (!headerStore) {\n\t\treturn;\n\t}\n\n\tconst { sideNavBelow } = headerStore;\n\tlet sideNavActive = false;\n\n\tif (sideNavBelow === 'desktop' ||\n\t\t(sideNavBelow === 'tablet' && (deviceSize === 'tablet' || deviceSize === 'mobile')) ||\n\t\tsideNavBelow === deviceSize) {\n\t\tsideNavActive = true;\n\t}\n\n\tconst device = store.client.device;\n\tconst isTablet = device === 'ipad' || (device === 'android' && deviceSize === 'tablet');\n\tif (accessNested(store, 'appData.header.sideNavOnTablet') && isTablet) {\n\t\tsideNavActive = true;\n\t}\n\n\tif (headerStore.hideHeader) {\n\t\tsideNavActive = true;\n\t}\n\n\theaderStore.set({ sideNavActive });\n});\n\n\n// =~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=\n// Footer interactions\n\n/**\n * Store the current size of the footer.\n * FIXME: Commented 3 months ago, can we remove the handler + event?\n * @param {number} size - the current size of the footer in pixels\n */\n// Store.on(actions.FOOTER_SIZE, (size) => {\n// \tStore.get().footer.set({ size });\n// });\n\n\n// =~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=\n// Quizz interactions\n\n/**\n * Set wheter a quiz is started.\n * @param {boolean} started - true to start the quizz\n * @param {string=} quizId - the page id of the quizz started, by default it's the active page\n */\nStore.on(actions.QUIZ_STARTED, (started, quizId) => {\n\tconst quiz = quizId ? Store.get().appData.pages[quizId] : Store.get().activePage;\n\tif (quiz) {\n\t\tquiz.set({ started });\n\t}\n});\n\nStore.on(actions.RIGHT_OR_WRONG_QUIZ_FINISHED, () => {\n\tStore.get().set({ quizFinished: true });\n});\n\n// =~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=\n// Client interactions\n\n/**\n * Update the stored client dimensions.\n * @param {Object} dimensions - the new client dimensions\n */\nStore.on(actions.SET_CLIENT_SIZE, (dimensions) => {\n\tconst store = Store.get();\n\tconst clientStore = store.client;\n\n\tconst deviceSize = getSize(dimensions);\n\tconst orientation = dimensions.width > dimensions.height ? 'landscape' : 'portrait';\n\n\tif (deviceSize !== clientStore.deviceSize) {\n\t\tStore.emit(actions.SET_SIDE_NAV_ACTIVE, deviceSize);\n\t}\n\n\tclientStore.set({\n\t\tdimensions,\n\t\tdeviceSize,\n\t\torientation\n\t});\n});\n\n(() => {\n\tconst validOrientations = ['portrait', 'landscape'];\n\tlet refCount = 0;\n\n\t// NOTE: This system is not perfect: it is too permissive.\n\t//       Basically, you can aquire a lock for landscape while a lock on portrait is still active.\n\t//       Perhaps we could add a priority like 'portrait' > 'landscape'?\n\n\t/**\n\t * Start forcing the orientation of the device.\n\t * @param {string} orientation - the device orientation, either 'portrait' or 'landscape'\n\t */\n\tStore.on(actions.START_FORCE_CLIENT_ORIENTATION, (orientation) => {\n\t\tif (validOrientations.indexOf(orientation) === -1) {\n\t\t\tconsole.error(`FORCE_ORIENTATION: unknown device orientation \"${orientation}\"`);\n\t\t\treturn;\n\t\t}\n\t\tconst uiState = Store.get().header.uiState;\n\t\tconst { overlayOrientation } = uiState;\n\t\tconst orientationChanged = orientation !== overlayOrientation;\n\n\t\tif (refCount > 0 && orientationChanged) {\n\t\t\tconsole.error(`FORCE_ORIENTATION: received a \"${orientation}\" orienation force request but ` +\n\t\t\t\t`there are still ${refCount} ongoing requests for \"${overlayOrientation}\". The behavior ` +\n\t\t\t\t'is now undefined.');\n\t\t\trefCount = 0; // accept the request anyway\n\t\t}\n\n\t\trefCount++;\n\t\tif (orientationChanged) {\n\t\t\tuiState.set({ overlayOrientation: orientation });\n\t\t}\n\t});\n\n\t/**\n\t * Stop forcing the orientation of the device.\n\t * Note that this function has effects only when it's called the same number of times\n\t * the function to start forcing the orientation has been called.\n\t * @param {boolean=} force - ignore the previous orientation requests and stop forcing it\n\t */\n\tStore.on(actions.STOP_FORCE_CLIENT_ORIENTATION, (force) => {\n\t\tconst uiState = Store.get().header.uiState;\n\t\tconst { overlayOrientation } = uiState;\n\n\t\tif (force) refCount = 0;\n\t\tif (refCount > 0) refCount--;\n\t\tif (refCount === 0 && overlayOrientation) {\n\t\t\tuiState.set({ overlayOrientation: false });\n\t\t}\n\t});\n\n})();\n\n// =~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=\n// Page load\n\nfunction detectCurrentPage(state, url) {\n\tstate = state || Store.get();\n\turl = (url || location.pathname);\n\n\tif (accessNested(state, 'appData.options.disableAutomaticPageDetection')) {\n\t\treturn null;\n\t}\n\n\tif (location.hostname === 'localhost') {\n\t\t// to prevent pages with /preview/ path to automatically be selected on local builds\n\t\turl = url.replace('/preview','');\n\t}\n\n\tlet bestMatch = null;\n\tlet bestMatchCount = 0;\n\tconst pages = state.appData.pages;\n\tObject.keys(pages).forEach(pageId => {\n\t\tconst page = pages[pageId];\n\t\tlet path = page.path.slice(0, -1);\n\t\tif (path === '') {\n\t\t\tpath = '/';\n\t\t}\n\t\tif (url.indexOf(path) >= 0 && !page.baseHtml) {\n\t\t\tif (bestMatchCount < path.length) {\n\t\t\t\tbestMatch = page;\n\t\t\t\tbestMatchCount = path.length;\n\t\t\t}\n\t\t}\n\t});\n\treturn bestMatch;\n}\n\nlet storageEnabled = true;\nlet originalSetItem;\nconst setItemQueue = [];\nlet originalCookieDescriptor;\nconst cookieQueue = [];\n\nconst disableStorage = () => {\n\tif (!storageEnabled) return;\n\tstorageEnabled = false;\n\t// Delay all potential localStorage.setItem && document.cookie = stuff to after the user has accepted\n\t// (not foolproof, only works for same-domain cookies not for things like youtube iframes etc.)\n\ttry {\n\t\tif (!originalSetItem) {\n\t\t\toriginalSetItem = localStorage.setItem;\n\t\t}\n\t\tlocalStorage.setItem = function() { setItemQueue.push([this, ...arguments]); };\n\t} catch (e) {\n\t\tconsole.error('Could not disable local storage:', e);\n\t}\n\ttry {\n\t\tif (!originalCookieDescriptor) {\n\t\t\toriginalCookieDescriptor = Object.getOwnPropertyDescriptor(Document.prototype, 'cookie') || Object.getOwnPropertyDescriptor(HTMLDocument.prototype, 'cookie');\n\t\t\tObject.defineProperty(document, 'cookie', {\n\t\t\t\tget: originalCookieDescriptor.get.bind(document),\n\t\t\t\tconfigurable: true\n\t\t\t});\n\t\t}\n\t\tObject.defineProperty(document, 'cookie', {\n\t\t\tset: value => cookieQueue.push(value)\n\t\t});\n\t} catch (e) {\n\t\tconsole.error('Could not disable cookie storage:', e);\n\t}\n};\n\nconst enableStorage = () => {\n\tif (storageEnabled) return;\n\tstorageEnabled = true;\n\ttry {\n\t\tlocalStorage.setItem = originalSetItem;\n\t\tsetItemQueue.forEach(elem => localStorage.setItem.call(...elem));\n\t\t// Empty the array without changing the ref\n\t\tsetItemQueue.length = 0;\n\t} catch (e) {\n\t\tconsole.error('Could not re-enable local storage:', e);\n\t}\n\ttry {\n\t\tObject.defineProperty(document, 'cookie', {\n\t\t\tset: originalCookieDescriptor.set.bind(document)\n\t\t});\n\t\tcookieQueue.forEach(elem => document.cookie = elem);\n\t\tcookieQueue.length = 0;\n\t} catch (e) {\n\t\tconsole.error('Could not re-enable cookie storage:', e);\n\t}\n};\n\nStore.on(actions.DISABLE_STORAGE, disableStorage);\nStore.on(actions.ENABLE_STORAGE, enableStorage);\n\nStore.on(actions.SHOW_COOKIES_MODAL, (callback) => {\n\tdisableStorage();\n\tStore.emit(actions.SHOW_MODAL, CookiesModal, (accept) => {\n\t\twindow.preventCookies = !accept;\n\t\tStore.get().client.set({ cookies: accept });\n\t\tif (accept) {\n\t\t\tenableStorage();\n\t\t}\n\t\tif (typeof callback === 'function') {\n\t\t\tcallback(accept);\n\t\t}\n\t}, {\n\t\ttype: 'cookieModal',\n\t\tblockClose: true,\n\t\tbackdropColor: 'rgba(0, 0, 0, .8)',\n\t\tfadeIn: 600,\n\t\tappData: Store.get().appData\n\t});\n});\n\n\n/**\n * Called when a new page is loaded.\n */\nStore.on(actions.BEFORE_LOAD, () => {\n\tconst state = Store.get().toJS();\n\tconst appData = state.appData;\n\n\tif (appData.options.requireUserConsent) {\n\t\tStore.emit(actions.DISABLE_STORAGE);\n\t\tStore.emit(actions.DISABLE_PIXELS);\n\n\t\tif (window.evidon) {\n\t\t\twindow.evidon.priorConsentCallback = () => {\n\t\t\t\tStore.emit(actions.ENABLE_STORAGE);\n\t\t\t\tStore.emit(actions.ENABLE_PIXELS);\n\t\t\t};\n\n\t\t\twindow.evidon.consentWithdrawnCallback = () => {\n\t\t\t\tStore.emit(actions.DISABLE_STORAGE);\n\t\t\t\tStore.emit(actions.DISABLE_PIXELS);\n\t\t\t};\n\n\t\t\tif (typeof window.evidon.loadScripts === 'function') {\n\t\t\t\twindow.evidon.loadScripts();\n\t\t\t}\n\t\t}\n\t}\n\n\tStore.emit(actions.SET_SIDE_NAV_ACTIVE, state.client.deviceSize);\n\n\tconst detectedPage = detectCurrentPage(state);\n\tif (detectedPage && detectedPage.id !== state.activePage.id) {\n\t\tStore.emit(actions.SET_ACTIVE_PAGE, detectedPage);\n\t\t// Temp update it in our object to be able to work with it\n\t\tstate.activePage = detectedPage;\n\t}\n\n\tconst parsedQS = queryString.parse(location.search.slice(1));\n\tif (parsedQS.referrer) {\n\t\twindow.customReferrer = parsedQS.referrer;\n\t}\n\n\tlet showbarebones = parsedQS.showbarebones;\n\tconst embedmode = parsedQS.embedmode;\n\t// if (embedmode) {\n\t// \t// enable showbarebones\n\t// \tshowbarebones = true;\n\t// }\n\tif (appData.options.showbarebones) {\n\t\twindow.showbarebones = true;\n\t}\n\tif (window.showbarebones !== undefined) showbarebones = window.showbarebones;\n\tif (showbarebones) {\n\t\tStore.get().header.set({\n\t\t\thideHeader: true,\n\t\t\tsideNavActive: true\n\t\t});\n\n\t\tdocument.body.classList.add('bodyBarebones');\n\t\tif (accessNested(state, 'appData.pages.showtimes.data')) {\n\t\t\tStore.get().appData.pages.showtimes.data.set({\n\t\t\t\tforceFullHeader: true\n\t\t\t});\n\t\t}\n\t}\n\n\tif (parsedQS.iframe) {\n\t\t// Apply fixes specific to iframe bugs\n\t\tStore.get().client.set({\n\t\t\tiframe: true\n\t\t});\n\n\t\t// if (state.client.isIOS) {\n\t\t// \t// Due to iframe bugs on ios, let's enable the embedMode\n\t\t// \tembedmode = true;\n\t\t// }\n\t}\n\n\tif (embedmode) {\n\t\t// Add in global class to body\n\t\tdocument.body.classList.add('embedMode');\n\t\t// Update the store\n\t\tStore.get().client.set({\n\t\t\tembedMode: true\n\t\t});\n\t}\n\n\tconst onUrlChange = (e) => {\n\t\tconst state = Store.get();\n\n\t\tlet activePage = null;\n\t\tif (e && e.state && e.state.hasOwnProperty('pageId')) {\n\t\t\tactivePage = state.appData.pages[e.state.pageId];\n\t\t} else {\n\t\t\tactivePage = detectCurrentPage(state);\n\t\t}\n\n\t\tif (activePage && activePage.id !== accessNested(state, 'activePage.id')) {\n\t\t\tStore.emit(actions.SET_ACTIVE_PAGE, activePage);\n\t\t}\n\n\t\tStore.emit(actions.URL_CHANGED, e);\n\t};\n\twindow.addEventListener('popstate', onUrlChange);\n\thistory.onpushstate = onUrlChange;\n\thistory.onreplacestate = onUrlChange;\n\n\tlet showtimesStatus = false;\n\tif (state.appData.pages && state.appData.pages.showtimes) {\n\t\tconst dates = accessNested(state, 'appData.meta.dates', {});\n\t\tconst activeDate = parseDate(dates.live || dates.release || 0);\n\t\tshowtimesStatus = calculateShowtimesStatus(activeDate, state.appData.options.forceLive, state.appData.pages);\n\t\tStore.get().showtimes.set({ status: showtimesStatus }).now();\n\t}\n\n\tlet updateSize = () => Store.emit(actions.SET_CLIENT_SIZE, {\n\t\twidth: window.innerWidth,\n\t\theight: window.innerHeight\n\t});\n\twindow.addEventListener('resize', updateSize, false);\n\twindow.addEventListener('orientationchange', dbounce(updateSize, 350), false);\n\n\tlet isFirstVisit = true;\n\ttry {\n\t\t// See notes below regarding weird format\n\t\t// isFirstVisit = localStorage.getItem('isFirstVisit') !== 'false';\n\t\tisFirstVisit = !localStorage.getItem('isFirstVisit');\n\t} catch(e) {}\n\n\tPromise.resolve(geoFencing()).then(redirected => {\n\t\tif (redirected) {\n\t\t\treturn;\n\t\t}\n\t\tlet checkCookies = isFirstVisit && accessNested(appData, 'options.cookiesModal');\n\t\tif (!checkCookies) {\n\t\t\twindow.preventCookies = typeof window.preventCookies == \"undefined\" ? false : window.preventCookies;\n\t\t\tStore.emit(actions.PAGE_STATE_LOADED);\n\t\t} else {\n\t\t\tStore.emit(actions.SHOW_COOKIES_MODAL, () => Store.emit(actions.PAGE_STATE_LOADED));\n\t\t}\n\t});\n});\n\n// TODO: utils\n// Using innerHTML with script doesn't execute them. This \"fixes\" it\n// Inspired by https://stackoverflow.com/a/20584396/1336843\nfunction execScripts(node) {\n\tif (!node || !node.children) return;\n\tlet children = [].slice.call(node.children);\n\tchildren.forEach(child => {\n\t\tif (child.tagName !== 'SCRIPT') {\n\t\t\t// Not a script? Recurse\n\t\t\treturn execScripts(child);\n\t\t}\n\t\t// Make it executable\n\t\ttry {\n\t\t\tlet copy = document.createElement('script');\n\t\t\tcopy.text = child.innerHTML;\n\t\t\t[].forEach.call(child.attributes, attr => {\n\t\t\t\tcopy.setAttribute(attr.name, attr.value);\n\t\t\t});\n\t\t\t// child.parentElement.replaceChild(copy, child);\n\t\t\t// GTM doesn't like being included in a div (the tag helper extension complains)\n\t\t\t// Move all scripts out, directly in the body\n\t\t\tchild.parentElement.removeChild(child);\n\t\t\tdocument.body.appendChild(copy);\n\t\t} catch(e) {\n\t\t\tconsole.log('error while loading custom script', e);\n\t\t}\n\t});\n}\n\nlet pixelsLoaded = false;\n\nconst loadStaticPixels = () => {\n\tif (pixelsLoaded) return;\n\tpixelsLoaded = true;\n\tif (window.STATIC_PIXELS) {\n\t\tconst pixelsElem = document.createElement('div');\n\t\tpixelsElem.innerHTML = window.STATIC_PIXELS;\n\t\tdocument.body.appendChild(pixelsElem);\n\t\texecScripts(pixelsElem);\n\t}\n};\n\nStore.on(actions.LOAD_STATIC_PIXELS, loadStaticPixels);\n\n/**\n * Called when a new page is loaded and preliminary checks are done (e.g. cookie or not).\n */\nStore.on(actions.PAGE_STATE_LOADED, () => {\n\tconst state = Store.get().toJS();\n\tconst appData = state.appData;\n\n\t// Load the pixels straight away if Evidon is not here to ask for user consent (GDPR)\n\t// Otherwise, pixels will be loaded once window.evidon.priorConsentCallback is called\n\tif (state.client.pixelConsent !== false && !(window.evidon && window.evidon.priorConsentCallback) && !window.preventCookies) {\n\t\tloadStaticPixels();\n\t}\n\n\tconst parsedQS = queryString.parse(location.search.slice(1));\n\tlet preventCookies = window.preventCookies;\n\n\tif (!appData.options.preventTrackingOnLoad) {\n\t\tlet oneTrust = accessNested(appData, 'apis.tracking.oneTrust') || {};\n\t\tlet useOneTrust = oneTrust.scriptId;\n\t\tinitTracker(state.appData, {\n\t\t\tnoCookies: preventCookies,\n\t\t\toneTrustCategory: useOneTrust && (oneTrust.insightsCategory || 'TARGETING')\n\t\t});\n\t}\n\tif (!preventCookies) {\n\t\t// check if user visits for the first time\n\t\tlet isFirstVisit = true;\n\t\tlet regionModalDismissed = false;\n\t\ttry {\n\t\t\t// A bit counter-intuitive to store firstVisit = false in the local storage\n\t\t\t// Would make more sense IMO to store visited = true, this also avoids issue with falsy values conversion (false / undefined differentiation)\n\t\t\tisFirstVisit = localStorage.getItem('isFirstVisit') !== 'false';\n\t\t\tif (isFirstVisit) {\n\t\t\t\tlocalStorage.setItem('isFirstVisit', 'false');\n\t\t\t}\n\n\t\t\tregionModalDismissed = !!localStorage.getItem('regionModalDismissed');\n\t\t} catch (err) {\n\t\t\t// No local storage available\n\t\t}\n\t\tconst user = Store.get().user;\n\n\t\tif (user) {\n\t\t\tuser.set({\n\t\t\t\tisFirstVisit: !!isFirstVisit,\n\t\t\t\tregionModalDismissed: regionModalDismissed\n\t\t\t});\n\t\t}\n\t}\n\n\ttrackPageView(state.activePage.id, null, true);\n\n\t// fix landing url error usually caused by missing trailing slash\n\tif (parsedQS.err && parsedQS.err === '404' && parsedQS.path) {\n\t\tconst appBasePath = `/${appData.meta.studio.slug}/${appData.meta.title.slug}/${appData.meta.region.slug}`;\n\t\tconst missedPath = parsedQS.path.replace(appBasePath, '');\n\t\tlet missedPageId;\n\t\tfor (const pageId in appData.pages) {\n\t\t\tconst page = appData.pages[pageId];\n\t\t\tif (missedPath === page.path) {\n\t\t\t\tmissedPageId = pageId;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (missedPageId) {\n\t\t\tlet page = state.appData.pages[missedPageId];\n\t\t\t// TODO: current base instead of hardcoded showtimes\n\t\t\tif (page.base && page.base !== 'showtimes') {\n\t\t\t\tif (!parsedQS.from404) {\n\t\t\t\t\tlocation.href = missedPath.substring(1) + '?from404=1';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\troute(missedPath.substring(1), missedPageId);\n\t\t\t\ttrack({ a: 'found_page_from_404', missedPageId });\n\t\t\t\tstate.activePage = state.appData.pages[missedPageId];\n\t\t\t}\n\t\t}\n\t}\n\n\tconst showtimesStatus = state.showtimes && state.showtimes.status;\n\tconst redirectTo = (showtimesStatus && state.activePage.redirectOnLoadAfterShowtimes) || state.activePage.redirectOnLoad;\n\tif (redirectTo) {\n\t\tif (redirectTo.match(/^(https?:)?\\/\\//)) {\n\t\t\tlocation.href = redirectTo;\n\t\t}\n\t\tlet path = getPath(redirectTo);\n\t\tif (path && path[0] === '/') {\n\t\t\tpath = path.substring(1);\n\t\t\tpath = (getPath(state.activePage).substring(1).match(/\\//g) || []).map(() => ('../')).join('') + path;\n\t\t}\n\t\thistory.pushState({ pageId: redirectTo }, '', path);\n\t}\n\n\t// CHECK PAGE VISIBILITY - ONLY LOAD APIS ONCE VISIBLE\n\tlet loaded = false;\n\tconst beforeLoad = Date.now();\n\tconst loadAPI = () => {\n\t\tif (loaded) return;\n\t\tloaded = true;\n\t\tStore.emit(actions.START_API);\n\t\tconst time = ~~((Date.now() - beforeLoad) / 1000);\n\t\ttrack({ a: 'page_visible', l: time, ni: true });\n\t};\n\tlet hidden;\n\tlet visibilityChange;\n\tif (typeof document.hidden !== 'undefined') {\n\t\thidden = 'hidden';\n\t\tvisibilityChange = 'visibilitychange';\n\t} else if (typeof document.msHidden !== 'undefined') {\n\t\thidden = 'msHidden';\n\t\tvisibilityChange = 'msvisibilitychange';\n\t} else if (typeof document.webkitHidden !== 'undefined') {\n\t\thidden = 'webkitHidden';\n\t\tvisibilityChange = 'webkitvisibilitychange';\n\t}\n\tif (!hidden || !document[hidden]) {\n\t\tloadAPI();\n\t} else {\n\t\t// TODO: COPY !\n\t\tconst inactiveModal = (\n\t\t\t<div>\n\t\t\t\t<div style={{ fontSize: '.8rem', maxWidth: '25rem', margin: '0 auto', padding: '0 1rem', textAlign: 'center', textTransform: 'none' }}>\n\t\t\t\t\tThe content of this page has not been loaded yet because you seem to be inactive\n\t\t\t\t</div>\n\t\t\t\t<div style={{ textAlign: 'center', margin: '.5rem 0 1rem' }}>\n\t\t\t\t\t<button type=\"button\" onClick={() => Store.emit(actions.HIDE_MODAL)}\n\t\t\t\t\t\tstyle={{ background: 'none', border: '1px solid #ccc', borderRadius: '3px', fontSize: '1rem', lineHeight: '2rem', padding: '0 .5rem', cursor: 'pointer' }}>\n\t\t\t\t\t\tI am here\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\n\t\tStore.emit(actions.SHOW_MODAL, inactiveModal, loadAPI, {\n\t\t\ttitle: 'Are you here?',\n\t\t\ttype: 'inactiveModal'\n\t\t});\n\n\t\tdocument.addEventListener(visibilityChange, () => {\n\t\t\tif (loaded || document[hidden]) return;\n\t\t\tconst modal = Store.get().modal;\n\t\t\tif (modal && modal.type === 'inactiveModal') Store.emit(actions.HIDE_MODAL);\n\t\t\tloadAPI();\n\t\t}, false);\n\t}\n});\n\n// Simple helper function to make sure we\n// don't fire a pageview track event multiple times on the same page\nlet lastTrackedPage = '';\nfunction trackPageView(pageId, extraOptions, firstLoad) {\n\tif (pageId === lastTrackedPage) {\n\t\treturn;\n\t}\n\textraOptions = Object.assign({ ni: true }, extraOptions);\n\ttrack({\n\t\t...extraOptions,\n\t\ta: pageId + '-view'\n\t});\n\n\tupdateDataLayerPageView(pageId, firstLoad);\n\n\tif (pageId === 'showtimes') {\n\t\ttrack({ once: true, a: 'start_dimensions', l: document.documentElement.offsetWidth + 'x' + document.documentElement.offsetHeight, ni: 1 });\n\t} else if (pageId === 'videos') {\n\t\tupdateDataLayer({ event: 'trailer-view' });\n\t}\n\n\tlastTrackedPage = pageId;\n\n}\n\n// =~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=\n// Modal events\n\n/**\n * Show the modal dialog with a custom content.\n * @param {string|JSX} content - the content of the modal\n * @param {Function=} callback - function called when the modal is closed\n * @param {Object=} extra - extra modal property\n */\nStore.on(actions.SHOW_MODAL, (content, callback, extra) => {\n\tconst state = Store.get();\n\t// if (!state.modal) state = state.set({ modal: {} });\n\t// TODO: Find a way to clear previous content maybe?\n\tstate.set({\n\t\tmodal: {\n\t\t\tactive: true,\n\t\t\tcontent: content,\n\t\t\tcallback: callback,\n\t\t\t...extra\n\t\t}\n\t});\n});\n\n/**\n * Close the modal and notify the caller.\n * @param {Object} result -\n * @param {Object} data -\n */\nStore.on(actions.HIDE_MODAL, (result, data) => {\n\tconst state = Store.get();\n\t// if (!state.modal) state = state.set({modal: {}});\n\tconst cb = state.modal && state.modal.callback;\n\tstate.set({\n\t\tmodal: {\n\t\t\tactive: false,\n\t\t\tresult: result,\n\t\t\tdata: data\n\t\t}\n\t});\n\tif (typeof cb === 'function') {\n\t\tcb(result, data);\n\t}\n});\n\n/**\n * Update the content of the modal.\n * @param {string|JSX} content - the new content\n */\nStore.on(actions.UPDATE_MODAL, (content) => {\n\tconst state = Store.get();\n\tstate.modal.set('content', content);\n});\n\n\n// =~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=\n// Dynamic data\n\nStore.on(actions.UPDATE_DYNAMIC_DATA, (dynamicData) => {\n\t// Update the dynamic data\n\tStore.get().dynamicData.set(dynamicData);\n});\n\n/**\n * Register that the region modal was dismissed by the user.\n */\nStore.on(actions.SET_USER_REGION_MODAL_DISMISSED, () => {\n\tconst user = Store.get().user;\n\t// Update localstorage\n\tlocalStorage.setItem('regionModalDismissed', true);\n\tif (user) {\n\t\t// Update the store\n\t\tuser.set({ regionModalDismissed: true });\n\t}\n});\n\n\n// =~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=\n// Misc events\n\n/**\n * Set the current state of an iOS fix?\n * Bound to the \"blur\" and \"focus events.\n * @param {number} state - a height? in pixels\n */\nStore.on(actions.SET_IOSFIXEDFIX, (state) => {\n\tStore.get().set({ iosFixedFix: state });\n});\n\n\n// =~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=~=~~=~=~=\n// Tracking events\n\n/**\n * Set the current state of an iOS fix?\n * Bound to the \"blur\" and \"focus events.\n * @param {number} state - a height? in pixels\n */\nStore.on(actions.ONETRUST_SHOW, () => oneTrust.displayModal());\n\n\nStore.on(actions.DISABLE_PIXELS, () => {\n\tStore.get().client.set({ pixelConsent: false });\n});\n\nStore.on(actions.ENABLE_PIXELS, () => {\n\tStore.get().client.set({ pixelConsent: true });\n\tloadStaticPixels();\n});\n","import { h, Component } from 'preact';\nimport Store from 'store/store';\nimport * as actions from 'store/actions';\nimport pure from 'utils/pure';\nimport s from 'components/shared/cookiesModal/cookiesModal.sss';\n\nexport default @pure class Modal extends Component {\n\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.acceptCookies = this.sendResult.bind(this, true);\n\t\tthis.rejectCookies = this.sendResult.bind(this, false);\n\t}\n\n\tsendResult(value) {\n\t\tStore.emit(actions.HIDE_MODAL, value === true);\n\t}\n\n\trender(props) {\n\t\tlet appData = props.appData || Store.get().appData || {};\n\t\tlet copy = appData.copy || {};\n\t\treturn (\n\t\t\t<div class={s.container}>\n\t\t\t\t<h3 class={s.title}>{copy.$COOKIES_MODAL_TITLE}</h3>\n\t\t\t\t<div class={s.text}>{copy.$COOKIES_MODAL_TEXT}</div>\n\t\t\t\t<div class={s.buttons}>\n\t\t\t\t\t<button class={s.yes} type=\"button\" onClick={this.acceptCookies}>\n\t\t\t\t\t\t{copy.$COOKIES_MODAL_ACCEPT}\n\t\t\t\t\t</button>\n\t\t\t\t\t<button class={s.no} type=\"button\" onClick={this.rejectCookies}>\n\t\t\t\t\t\t{copy.$COOKIES_MODAL_DENY}\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n}\n","import { h } from 'preact';\nimport { getPageTitle } from 'utils/clientUtils';\n\nexport default function Error404(props) {\n\n\tconst {\n\t\tchildren     = [],\n\t\tinitialState = {},\n\t\trelativeRoot = '/',\n\t\treload,\n\t\ttype\n\t} = props;\n\n\tconst {\n\t\tappData,\n\t\tactivePage\n\t} = initialState;\n\n\tconst {\n\t\tstyleLinks    = {},\n\t\theaderScripts = {}\n\t} = appData.doc;\n\n\tconst buildDate           = Date.now();\n\tconst initialStateGlobals = renderGlobalsScript(initialState, type, buildDate);\n\tconst pageTitle           = getPageTitle(activePage, appData);\n\tconst scripts             = renderHeaderScrips(headerScripts);\n\n\treturn (\n\t\t<html lang=\"en\">\n\t\t\t<head>\n\t\t\t\t<title>{pageTitle}</title>\n\t\t\t\t<script\n\t\t\t\t\tdangerouslySetInnerHTML={{ __html: `\n\t\t\t\t\t\tif (location.pathname.indexOf('404.html') === -1) {\n\t\t\t\t\t\t\tlocation.href = location.origin + '/404.html' + location.search;\n\t\t\t\t\t\t}\n\t\t\t\t\t`}}>\n\t\t\t\t</script>\n\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n\t\t\t\t<meta charset=\"UTF-8\" />\n\t\t\t\t<meta name=\"author\" content=\"POWSTER showtimes@powster.com\" />\n\t\t\t\t<meta name=\"copyright\" content={new Date().getFullYear()} />\n\t\t\t\t<meta name=\"viewport\" content=\"minimal-ui, initial-scale=1\" />\n\t\t\t\t<link rel=\"shortcut icon\" type=\"image/png\" href={`${appData.urls.roots.image}/favico.png`} />\n\t\t\t\t<link rel=\"stylesheet\" type=\"text/css\" href={`${relativeRoot}css/error404.css?v=${buildDate}`} />\n\t\t\t\t<link rel=\"stylesheet\" href={styleLinks.font} />\n\t\t\t</head>\n\t\t\t<body style={{ display: 'none' }}>\n\t\t\t\t<div id=\"app\">\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t\t{reload}\n\t\t\t\t{initialStateGlobals}\n\t\t\t\t<script src={`${relativeRoot}js/error404.js?v=${buildDate}`} charset=\"utf-8\" />\n\t\t\t\t{scripts}\n\t\t\t</body>\n\t\t</html>\n\t);\n\n}\n\nfunction renderGlobalsScript(initialState, type, buildDate) {\n\tconst cleanInitialState = JSON.stringify(initialState).replace(/[\\u2028\\u2029]/g, '');\n\tconst buildLocation     = type.toUpperCase();\n\tconst initialData       = [\n\t\t`window.__INITIAL_STATE__ = ${cleanInitialState};`,\n\t\t`window.__BUILD_DATE__ = ${buildDate};`,\n\t\t`window.__IS_${buildLocation}__ = true`\n\t].join('\\n');\n\n\treturn(\n\t\t<script dangerouslySetInnerHTML={{ __html: initialData }} />\n\t);\n}\n\nfunction renderHeaderScrips(scripts) {\n\treturn Object.keys(scripts).map(key => <script src={scripts[key]} />);\n}\n","import { h, Component } from 'preact';\nimport Store from 'store/store';\nimport * as actions from 'store/actions';\nimport pure from 'utils/pure';\nimport s from 'components/shared/modal/modal.sss';\nimport { joinClasses } from 'utils/utils';\n\nexport default @pure class Modal extends Component {\n\n\tcloseModal = () => {\n\t\tif (!this.props.blockClose) {\n\t\t\tStore.emit(actions.HIDE_MODAL);\n\t\t}\n\t}\n\n\trender(props) {\n\t\tlet {\n\t\t\tactive, // boolean - whether the modal is currently shown\n\t\t\ttitle, // string - the modal title\n\t\t\tblockClose, // boolean - whether the modal can be closed or not\n\t\t\ttype, // the type of modal (used for custom styling)\n\t\t\tcontent: Content, // JSX | function | string - the modal content\n\t\t\tbackdropColor, // ?string (CSS color) - the color of the backdrop. Using an alpha value (i.e. rgba, hsla) is recommended\n\t\t\tfadeIn, // ?number - duration of the modal fade in if boolean true, will use the default 500ms duration\n\t\t\t...extraProps\n\t\t} = props;\n\n\t\tif (!active) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (typeof Content === 'string') {\n\t\t\t// If the content is a string instead of a component,\n\t\t\t// just go for a simplistic render\n\t\t\tContent = <div class={s.simpleContent}>{Content}</div>;\n\t\t}\n\n\t\tif (typeof Content !== 'function') {\n\t\t\tlet _content = Content;\n\t\t\tContent = () => _content;\n\t\t}\n\n\t\tlet backgroundStyle = {};\n\t\tif (backdropColor) {\n\t\t\tbackgroundStyle.background = backdropColor;\n\t\t}\n\n\t\tlet containerStyle = {};\n\t\tlet useFadeIn = fadeIn === true;\n\t\tif (typeof fadeIn === 'number' && fadeIn > 0) {\n\t\t\tuseFadeIn = true;\n\t\t\tcontainerStyle.animationDuration = fadeIn + 'ms';\n\t\t}\n\n\t\treturn (\n\t\t\t<div class={joinClasses(s.container, useFadeIn && s.fadeIn)} style={containerStyle}>\n\t\t\t\t<div onClick={this.closeModal} class={s.background} style={backgroundStyle} />\n\t\t\t\t<div class={joinClasses(s.modal, type && s.hasOwnProperty(type) && s[type])}>\n\t\t\t\t\t{title && <h3 class={s.title}>{title}</h3>}\n\t\t\t\t\t<div class={s.content}>\n\t\t\t\t\t\t<Content {...extraProps} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n}\n","import { h, Component } from \"preact\";\nimport Store from 'store/store';\nimport * as actions from \"store/actions.js\";\nimport { joinClasses } from 'utils/utils';\nimport Modal from 'components/shared/modal/modal.js';\nimport s from 'base/error404/error404App.sss';\n\n\nexport default class Error404App extends Component {\n\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\t// scope binding\n\t\tthis.syncStoreState = this.syncStoreState.bind(this);\n\t\tthis.lookupBrowser  = this.lookupBrowser.bind(this);\n\t\tthis.lookupPlatform = this.lookupPlatform.bind(this);\n\t\tthis.startTimer     = this.startTimer.bind(this);\n\t\tthis.stopTimer\t    = this.stopTimer.bind(this);\n\t\tthis.redirect\t    = this.redirect.bind(this);\n\t\tthis.updateTime\t    = this.updateTime.bind(this);\n\n\t\t// state selection\n\t\tthis.state = {\n\t\t\tappState: props.initialStore,\n\t\t\tcount: 3\n\t\t};\n\n\t\t// Push the initial store to the store\n\t\tStore.set(props.initialStore);\n\n\t\t// keep the app state and store state in sync going forward\n\t\tStore.on('update', this.syncStoreState);\n\t\tif (typeof window !== \"undefined\") {\n\t\t\tStore.emit(actions.PAGE_STATE_LOADED);\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tStore.on(actions.SCROLL_LOCK, () => {\n\t\t\tthis.setState({\n\t\t\t\tscrollLocked: true\n\t\t\t});\n\t\t});\n\t\tStore.on(actions.SCROLL_UNLOCK, () => {\n\t\t\tthis.setState({\n\t\t\t\tscrollLocked: false\n\t\t\t});\n\t\t});\n\t\tthis.startTimer();\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.stopTimer();\n\t}\n\n\tcomponentDidUpdate(prevProps, prevState) {\n\t\tif (prevState.count !== this.state.count && this.state.count === 0) {\n\t\t\tthis.redirect();\n\t\t}\n\t}\n\n\t// UTILS\n\tsyncStoreState() {\n\t\tconst storeState = Store.get();\n\t\tthis.setState({\n\t\t\tappState: storeState\n\t\t});\n\t}\n\n\tlookupBrowser(client) {\n\t\treturn ['isChrome', 'isFirefox', 'isIE'].find(is => client[is]);\n\t}\n\n\tlookupPlatform(client) {\n\t\tif (client.isIOS) {\n\t\t\treturn 'isIOS';\n\t\t}\n\t}\n\n\tstartTimer() {\n\t\tthis.timer = setInterval(this.updateTime, 1000);\n\t}\n\n\tupdateTime() {\n\t\tthis.setState({\n\t\t\tcount: Math.max(this.state.count - 1, 0)\n\t\t});\n\t}\n\n\tstopTimer() {\n\t\tclearInterval(this.timer);\n\t\tthis.timer = null;\n\t}\n\n\tredirect() {\n\t\tthis.stopTimer();\n\t\tconst { url } = this.props.initialStore.appData.meta;\n\t\tlocation.href = url + '/' + location.search;\n\t}\n\n\t// RENDER METHODS\n\trender(props, state) {\n\t\tconst {\n\t\t\tappState = {},\n\t\t\tscrollLocked = false\n\t\t} = state;\n\n\t\tconst {\n\t\t\tappData    = {},\n\t\t\tactivePage = {},\n\t\t\tclient     = {}\n\t\t} = appState;\n\n\t\tconst {\n\t\t\tcopy   = {}\n\t\t} = appData;\n\n\t\tconst browser  = this.lookupBrowser(client);\n\t\tconst platform = this.lookupPlatform(client);\n\n\t\treturn(\n\t\t\t<div class={joinClasses(s.wrapper, activePage.id, client.deviceSize, browser, platform, scrollLocked && s.scrollLocked)}>\n\t\t\t\t<div class={s.container404}>\n\t\t\t\t\t<div class={s.errorContainer}>\n\t\t\t\t\t\t<div class={s.errorText}>{copy.$404_COPY}</div>\n\t\t\t\t\t\t<div class={s.errorTextUnderline}></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class={s.errorMainText}>\n\t\t\t\t\t\t{this.state.count}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<Modal {...(appState.modal || {})} />\n\t\t\t</div>\n\t\t);\n\t}\n\n}\n","import { h, render } from 'preact';\nimport { buildClientStoreData } from 'utils/clientUtils';\n\nimport 'utils/historyPushEvent'; // Add events for when you do history.push\nimport 'store/update';\nimport 'base-styles/reset.sss';\nimport 'base-styles/global.sss';\n\nimport Error404Doc from './error404Doc.js';\nimport Error404App from './error404App.js';\n\n\n// Client render\nif (typeof document !== 'undefined') {\n\n\t/* Setting up the store\n\t-----------------------------*/\n\tconst {\n\t\t__INITIAL_STATE__,\n\t\t__START_PAGE_ID__\n\t} = window;\n\n\tif (__START_PAGE_ID__ && __START_PAGE_ID__ !== '{{__START_PAGE_ID__}}'){\n\t\t__INITIAL_STATE__.activePage = __INITIAL_STATE__.appData.pages[__START_PAGE_ID__];\n\t}\n\n\tconst initialStore = buildClientStoreData(__INITIAL_STATE__);\n\n\t/* Initial render of the app\n\t----------------------------------*/\n\trender(\n\t\t<Error404App initialStore={initialStore} />,\n\t\tdocument.body, document.getElementById('app')\n\t);\n\n}\n\nexport {\n\tError404App as App,\n\tError404Doc as Doc\n};\n"],"sourceRoot":""}