{"version":3,"sources":["webpack:///./node_modules/rellax/rellax.js","webpack:///./node_modules/resolve-pathname/esm/resolve-pathname.js","webpack:///./node_modules/value-equal/esm/value-equal.js","webpack:///./node_modules/tiny-invariant/dist/tiny-invariant.esm.js","webpack:///./node_modules/history/esm/history.js","webpack:///./app/javascript/packs/public.js","webpack:///./app/javascript/mastodon/load_keyboard_extensions.js"],"names":["window","Rellax","el","options","self","Object","create","prototype","posY","screenY","posX","screenX","blocks","pause","loop","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","msRequestAnimationFrame","oRequestAnimationFrame","callback","setTimeout","loopId","supportsPassive","opts","defineProperty","get","addEventListener","removeEventListener","e","clearLoop","cancelAnimationFrame","mozCancelAnimationFrame","clearTimeout","transformProp","testEl","document","createElement","style","transform","vendors","vendor","undefined","validateCustomBreakpoints","breakpoints","length","Array","isArray","lastVal","isAscending","isNumerical","forEach","i","console","warn","speed","verticalSpeed","horizontalSpeed","center","wrapper","relativeToWrapper","round","vertical","horizontal","verticalScrollAxis","horizontalScrollAxis","keys","key","elements","querySelectorAll","elems","nodeType","querySelector","currentBreakpoint","getCurrentBreakpoint","w","bp","cacheBlocks","block","createBlock","push","init","cssText","innerHeight","innerWidth","setPosition","animate","update","mapBreakpoints","dataPercentage","getAttribute","dataSpeed","dataXsSpeed","dataMobileSpeed","dataTabletSpeed","dataDesktopSpeed","dataVerticalSpeed","dataHorizontalSpeed","dataVericalScrollAxis","dataHorizontalScrollAxis","dataZindex","dataMin","dataMax","dataMinX","dataMaxX","dataMinY","dataMaxY","wrapperPosY","scrollTop","pageYOffset","documentElement","body","offsetTop","scrollLeft","pageXOffset","blockTop","getBoundingClientRect","top","blockHeight","clientHeight","offsetHeight","scrollHeight","blockLeft","left","blockWidth","clientWidth","offsetWidth","scrollWidth","percentageY","percentageX","Number","bases","updatePosition","searchResult","exec","index","trimmedStyle","slice","delimiter","indexOf","replace","baseX","x","baseY","y","height","width","zindex","min","max","minX","maxX","minY","maxY","oldY","oldX","parentNode","scrollPosY","result","valueX","valueY","Math","deferredUpdate","passive","positions","toLowerCase","verticalScrollX","verticalScrollY","horizontalScrollX","positionY","positionX","translate","destroy","refresh","isAbsolute","pathname","charAt","spliceOne","list","k","n","pop","to","from","hasTrailingSlash","toParts","split","fromParts","isToAbs","isFromAbs","mustEndAbs","concat","last","up","part","unshift","join","substr","obj","valueOf","call","valueEqual","a","b","every","item","aValue","bValue","assign","prefix","condition","message","Error","addLeadingSlash","path","stripLeadingSlash","stripBasename","hasBasename","stripTrailingSlash","parsePath","search","hash","hashIndex","searchIndex","createPath","location","createLocation","state","currentLocation","decodeURI","URIError","locationsAreEqual","createTransitionManager","prompt","listeners","setPrompt","nextPrompt","confirmTransitionTo","action","getUserConfirmation","appendListener","fn","isActive","listener","apply","arguments","filter","notifyListeners","_len","args","_key","canUseDOM","getConfirmation","confirm","PopStateEvent","HashChangeEvent","getHistoryState","history","createBrowserHistory","props","ua","globalHistory","canUseHistory","navigator","userAgent","needsHashChangeListener","_props","_props$forceRefresh","forceRefresh","_props$getUserConfirm","_props$keyLength","keyLength","basename","getDOMLocation","historyState","_ref","_window$location","createKey","random","toString","transitionManager","setState","nextState","handlePopState","event","isExtraneousPopstateEvent","handlePop","handleHashChange","forceNextPop","ok","fromLocation","toLocation","toIndex","allKeys","fromIndex","delta","go","revertPop","initialLocation","createHref","listenerCount","checkDOMListeners","isBlocked","href","pushState","prevIndex","nextKeys","replaceState","goBack","goForward","unblock","listen","unlisten","HashChangeEvent$1","HashPathCoders","hashbang","encodePath","decodePath","noslash","slash","stripHash","url","getHashPath","substring","replaceHashPath","createHashHistory","_props$hashType","hashType","_HashPathCoders$hashT","ignorePath","encodedPath","prevLocation","allPaths","lastIndexOf","baseTag","pushHashPath","nextPaths","clamp","lowerBound","upperBound","createMemoryHistory","_props$initialEntries","initialEntries","_props$initialIndex","initialIndex","entries","map","entry","nextIndex","nextEntries","splice","canGo","start","data","parent","type","ready","postMessage","id","getElementsByTagName","loadPolyfills","then","IntlMessageFormat","require","default","timeAgoString","delegate","emojify","messages","getLocale","ReactDOM","scrollToDetailedStatus","detailedStatuses","scrolledToDetailedStatus","scrollIntoView","getEmojiAnimationHandler","swapTo","target","src","locale","lang","dateTimeFormat","Intl","DateTimeFormat","year","month","day","hour","minute","content","innerHTML","datetime","Date","formattedDate","format","title","textContent","now","formatMessage","values","defaultMessage","formatDate","date","getFullYear","includes","reactComponents","MediaContainer","component","children","child","removeChild","render","components","appendChild","catch","error","password","getElementById","confirmation","value","setCustomValidity","statusEl","this","dataset","spoiler","spoilerLink","button","preventDefault","nodeName","open","name","escapeTextContentForBrowser","avatar","file","files","URL","createObjectURL","originalSrc","getProfileAvatarAnimationHandler","swapSrc","header","lock","checked","hidden","focus","select","setSelectionRange","input","oldReadOnly","readonly","execCommand","blur","classList","add","remove","err","display","field","test","arrowKeyNav","register","Promise","resolve"],"mappings":"gFAAA,sBAsBqB,oBAAXA,QAAyBA,OAV/B,EAAO,QAAW,0BAAP,EAUqC,WAsclD,OArca,SAASC,EAAOC,EAAIC,GAC/B,aAEA,IAAIC,EAAOC,OAAOC,OAAOL,EAAOM,WAC5BC,EAAO,EACPC,EAAU,EACVC,EAAO,EACPC,EAAU,EACVC,EAAS,GACTC,GAAQ,EAGRC,EAAOd,OAAOe,uBAAyBf,OAAOgB,6BAA+BhB,OAAOiB,0BAA4BjB,OAAOkB,yBAA2BlB,OAAOmB,wBAA0B,SAAUC,GAC/L,OAAOC,WAAWD,EAAU,IAAO,KAIjCE,EAAS,KAETC,GAAkB,EAEtB,IACE,IAAIC,EAAOnB,OAAOoB,eAAe,GAAI,UAAW,CAC9CC,IAAK,WACHH,GAAkB,KAGtBvB,OAAO2B,iBAAiB,cAAe,KAAMH,GAC7CxB,OAAO4B,oBAAoB,cAAe,KAAMJ,GAChD,MAAOK,IAGT,IAAIC,EAAY9B,OAAO+B,sBAAwB/B,OAAOgC,yBAA2BC,aAE7EC,EAAgBlC,OAAOkC,eAAiB,WAC1C,I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AAbA,OAC7CsE,EAAQtE,EAAO7N,WAAWpF,cAAc,8BAExCwX,EAAcD,EAAME,SAE1BF,EAAME,UAAW,EACjBF,EAAMH,QACNG,EAAMF,SACNE,EAAMD,kBAAkB,EAAGC,EAAM5B,MAAMtX,QAEvC,IACMT,SAAS8Z,YAAY,UACvBH,EAAMI,OACN1E,EAAO7N,WAAWwS,UAAUC,IAAI,UAEhChb,YAAW,WACToW,EAAO7N,WAAWwS,UAAUE,OAAO,YAClC,MAEL,MAAOC,GACPlZ,QAAQ0W,MAAMwC,GAGhBR,EAAME,SAAWD,KAGnBlF,EAAS1U,SAAU,yBAA0B,SAAS,WACpD,IAAMqV,EAASrV,SAASoC,cAAc,eAET,UAAzBiT,EAAOnV,MAAMka,QACf/E,EAAOnV,MAAMka,QAAU,OAEvB/E,EAAOnV,MAAMka,QAAU,WAM3B1F,EAAS1U,SAAU,mCAAoC,UAAU,WAC/D,CAAC,eAAgB,wBAAyB,4BAA6B,sCAAsCe,SAAQ,SAAAmT,GACnH,IAAMmG,EAAQra,SAAS6X,eAAe3D,GAClCmG,IACFA,EAAMtC,MAAQ,aAQnB1D,MCjSY,WACb,MAAI,QAAQiG,KAAKnM,UAAUC,WAJpB,8BAK6BiG,MAAK,SAAAkG,GACrCA,EAAYC,cAGTC,QAAQC,aD4RdhD,OAAM,SAAAC,GACL1W,QAAQ0W,MAAMA,Q","file":"js/public-4e1ee07bdb3019af92a4.chunk.js","sourcesContent":["// ------------------------------------------\n// Rellax.js\n// Buttery smooth parallax library\n// Copyright (c) 2016 Moe Amaya (@moeamaya)\n// MIT license\n//\n// Thanks to Paraxify.js and Jaime Cabllero\n// for parallax concepts\n// ------------------------------------------\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory();\n } else {\n // Browser globals (root is window)\n root.Rellax = factory();\n }\n})(typeof window !== \"undefined\" ? window : global, function () {\n var Rellax = function Rellax(el, options) {\n \"use strict\";\n\n var self = Object.create(Rellax.prototype);\n var posY = 0;\n var screenY = 0;\n var posX = 0;\n var screenX = 0;\n var blocks = [];\n var pause = true; // check what requestAnimationFrame to use, and if\n // it's not supported, use the onscroll event\n\n var loop = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame || function (callback) {\n return setTimeout(callback, 1000 / 60);\n }; // store the id for later use\n\n\n var loopId = null; // Test via a getter in the options object to see if the passive property is accessed\n\n var supportsPassive = false;\n\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function get() {\n supportsPassive = true;\n }\n });\n window.addEventListener(\"testPassive\", null, opts);\n window.removeEventListener(\"testPassive\", null, opts);\n } catch (e) {} // check what cancelAnimation method to use\n\n\n var clearLoop = window.cancelAnimationFrame || window.mozCancelAnimationFrame || clearTimeout; // check which transform property to use\n\n var transformProp = window.transformProp || function () {\n var testEl = document.createElement('div');\n\n if (testEl.style.transform === null) {\n var vendors = ['Webkit', 'Moz', 'ms'];\n\n for (var vendor in vendors) {\n if (testEl.style[vendors[vendor] + 'Transform'] !== undefined) {\n return vendors[vendor] + 'Transform';\n }\n }\n }\n\n return 'transform';\n }(); // Default Settings\n\n\n self.options = {\n speed: -2,\n verticalSpeed: null,\n horizontalSpeed: null,\n breakpoints: [576, 768, 1201],\n center: false,\n wrapper: null,\n relativeToWrapper: false,\n round: true,\n vertical: true,\n horizontal: false,\n verticalScrollAxis: \"y\",\n horizontalScrollAxis: \"x\",\n callback: function callback() {}\n }; // User defined options (might have more in the future)\n\n if (options) {\n Object.keys(options).forEach(function (key) {\n self.options[key] = options[key];\n });\n }\n\n function validateCustomBreakpoints() {\n if (self.options.breakpoints.length === 3 && Array.isArray(self.options.breakpoints)) {\n var isAscending = true;\n var isNumerical = true;\n var lastVal;\n self.options.breakpoints.forEach(function (i) {\n if (typeof i !== 'number') isNumerical = false;\n\n if (lastVal !== null) {\n if (i < lastVal) isAscending = false;\n }\n\n lastVal = i;\n });\n if (isAscending && isNumerical) return;\n } // revert defaults if set incorrectly\n\n\n self.options.breakpoints = [576, 768, 1201];\n console.warn(\"Rellax: You must pass an array of 3 numbers in ascending order to the breakpoints option. Defaults reverted\");\n }\n\n if (options && options.breakpoints) {\n validateCustomBreakpoints();\n } // By default, rellax class\n\n\n if (!el) {\n el = '.rellax';\n } // check if el is a className or a node\n\n\n var elements = typeof el === 'string' ? document.querySelectorAll(el) : [el]; // Now query selector\n\n if (elements.length > 0) {\n self.elems = elements;\n } // The elements don't exist\n else {\n console.warn(\"Rellax: The elements you're trying to select don't exist.\");\n return;\n } // Has a wrapper and it exists\n\n\n if (self.options.wrapper) {\n if (!self.options.wrapper.nodeType) {\n var wrapper = document.querySelector(self.options.wrapper);\n\n if (wrapper) {\n self.options.wrapper = wrapper;\n } else {\n console.warn(\"Rellax: The wrapper you're trying to use doesn't exist.\");\n return;\n }\n }\n } // set a placeholder for the current breakpoint\n\n\n var currentBreakpoint; // helper to determine current breakpoint\n\n var getCurrentBreakpoint = function getCurrentBreakpoint(w) {\n var bp = self.options.breakpoints;\n if (w < bp[0]) return 'xs';\n if (w >= bp[0] && w < bp[1]) return 'sm';\n if (w >= bp[1] && w < bp[2]) return 'md';\n return 'lg';\n }; // Get and cache initial position of all elements\n\n\n var cacheBlocks = function cacheBlocks() {\n for (var i = 0; i < self.elems.length; i++) {\n var block = createBlock(self.elems[i]);\n blocks.push(block);\n }\n }; // Let's kick this script off\n // Build array for cached element values\n\n\n var init = function init() {\n for (var i = 0; i < blocks.length; i++) {\n self.elems[i].style.cssText = blocks[i].style;\n }\n\n blocks = [];\n screenY = window.innerHeight;\n screenX = window.innerWidth;\n currentBreakpoint = getCurrentBreakpoint(screenX);\n setPosition();\n cacheBlocks();\n animate(); // If paused, unpause and set listener for window resizing events\n\n if (pause) {\n window.addEventListener('resize', init);\n pause = false; // Start the loop\n\n update();\n }\n }; // We want to cache the parallax blocks'\n // values: base, top, height, speed\n // el: is dom object, return: el cache values\n\n\n var createBlock = function createBlock(el) {\n var dataPercentage = el.getAttribute('data-rellax-percentage');\n var dataSpeed = el.getAttribute('data-rellax-speed');\n var dataXsSpeed = el.getAttribute('data-rellax-xs-speed');\n var dataMobileSpeed = el.getAttribute('data-rellax-mobile-speed');\n var dataTabletSpeed = el.getAttribute('data-rellax-tablet-speed');\n var dataDesktopSpeed = el.getAttribute('data-rellax-desktop-speed');\n var dataVerticalSpeed = el.getAttribute('data-rellax-vertical-speed');\n var dataHorizontalSpeed = el.getAttribute('data-rellax-horizontal-speed');\n var dataVericalScrollAxis = el.getAttribute('data-rellax-vertical-scroll-axis');\n var dataHorizontalScrollAxis = el.getAttribute('data-rellax-horizontal-scroll-axis');\n var dataZindex = el.getAttribute('data-rellax-zindex') || 0;\n var dataMin = el.getAttribute('data-rellax-min');\n var dataMax = el.getAttribute('data-rellax-max');\n var dataMinX = el.getAttribute('data-rellax-min-x');\n var dataMaxX = el.getAttribute('data-rellax-max-x');\n var dataMinY = el.getAttribute('data-rellax-min-y');\n var dataMaxY = el.getAttribute('data-rellax-max-y');\n var mapBreakpoints;\n var breakpoints = true;\n\n if (!dataXsSpeed && !dataMobileSpeed && !dataTabletSpeed && !dataDesktopSpeed) {\n breakpoints = false;\n } else {\n mapBreakpoints = {\n 'xs': dataXsSpeed,\n 'sm': dataMobileSpeed,\n 'md': dataTabletSpeed,\n 'lg': dataDesktopSpeed\n };\n } // initializing at scrollY = 0 (top of browser), scrollX = 0 (left of browser)\n // ensures elements are positioned based on HTML layout.\n //\n // If the element has the percentage attribute, the posY and posX needs to be\n // the current scroll position's value, so that the elements are still positioned based on HTML layout\n\n\n var wrapperPosY = self.options.wrapper ? self.options.wrapper.scrollTop : window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; // If the option relativeToWrapper is true, use the wrappers offset to top, subtracted from the current page scroll.\n\n if (self.options.relativeToWrapper) {\n var scrollPosY = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;\n wrapperPosY = scrollPosY - self.options.wrapper.offsetTop;\n }\n\n var posY = self.options.vertical ? dataPercentage || self.options.center ? wrapperPosY : 0 : 0;\n var posX = self.options.horizontal ? dataPercentage || self.options.center ? self.options.wrapper ? self.options.wrapper.scrollLeft : window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft : 0 : 0;\n var blockTop = posY + el.getBoundingClientRect().top;\n var blockHeight = el.clientHeight || el.offsetHeight || el.scrollHeight;\n var blockLeft = posX + el.getBoundingClientRect().left;\n var blockWidth = el.clientWidth || el.offsetWidth || el.scrollWidth; // apparently parallax equation everyone uses\n\n var percentageY = dataPercentage ? dataPercentage : (posY - blockTop + screenY) / (blockHeight + screenY);\n var percentageX = dataPercentage ? dataPercentage : (posX - blockLeft + screenX) / (blockWidth + screenX);\n\n if (self.options.center) {\n percentageX = 0.5;\n percentageY = 0.5;\n } // Optional individual block speed as data attr, otherwise global speed\n\n\n var speed = breakpoints && mapBreakpoints[currentBreakpoint] !== null ? Number(mapBreakpoints[currentBreakpoint]) : dataSpeed ? dataSpeed : self.options.speed;\n var verticalSpeed = dataVerticalSpeed ? dataVerticalSpeed : self.options.verticalSpeed;\n var horizontalSpeed = dataHorizontalSpeed ? dataHorizontalSpeed : self.options.horizontalSpeed; // Optional individual block movement axis direction as data attr, otherwise gobal movement direction\n\n var verticalScrollAxis = dataVericalScrollAxis ? dataVericalScrollAxis : self.options.verticalScrollAxis;\n var horizontalScrollAxis = dataHorizontalScrollAxis ? dataHorizontalScrollAxis : self.options.horizontalScrollAxis;\n var bases = updatePosition(percentageX, percentageY, speed, verticalSpeed, horizontalSpeed); // ~~Store non-translate3d transforms~~\n // Store inline styles and extract transforms\n\n var style = el.style.cssText;\n var transform = ''; // Check if there's an inline styled transform\n\n var searchResult = /transform\\s*:/i.exec(style);\n\n if (searchResult) {\n // Get the index of the transform\n var index = searchResult.index; // Trim the style to the transform point and get the following semi-colon index\n\n var trimmedStyle = style.slice(index);\n var delimiter = trimmedStyle.indexOf(';'); // Remove \"transform\" string and save the attribute\n\n if (delimiter) {\n transform = \" \" + trimmedStyle.slice(11, delimiter).replace(/\\s/g, '');\n } else {\n transform = \" \" + trimmedStyle.slice(11).replace(/\\s/g, '');\n }\n }\n\n return {\n baseX: bases.x,\n baseY: bases.y,\n top: blockTop,\n left: blockLeft,\n height: blockHeight,\n width: blockWidth,\n speed: speed,\n verticalSpeed: verticalSpeed,\n horizontalSpeed: horizontalSpeed,\n verticalScrollAxis: verticalScrollAxis,\n horizontalScrollAxis: horizontalScrollAxis,\n style: style,\n transform: transform,\n zindex: dataZindex,\n min: dataMin,\n max: dataMax,\n minX: dataMinX,\n maxX: dataMaxX,\n minY: dataMinY,\n maxY: dataMaxY\n };\n }; // set scroll position (posY, posX)\n // side effect method is not ideal, but okay for now\n // returns true if the scroll changed, false if nothing happened\n\n\n var setPosition = function setPosition() {\n var oldY = posY;\n var oldX = posX;\n posY = self.options.wrapper ? self.options.wrapper.scrollTop : (document.documentElement || document.body.parentNode || document.body).scrollTop || window.pageYOffset;\n posX = self.options.wrapper ? self.options.wrapper.scrollLeft : (document.documentElement || document.body.parentNode || document.body).scrollLeft || window.pageXOffset; // If option relativeToWrapper is true, use relative wrapper value instead.\n\n if (self.options.relativeToWrapper) {\n var scrollPosY = (document.documentElement || document.body.parentNode || document.body).scrollTop || window.pageYOffset;\n posY = scrollPosY - self.options.wrapper.offsetTop;\n }\n\n if (oldY != posY && self.options.vertical) {\n // scroll changed, return true\n return true;\n }\n\n if (oldX != posX && self.options.horizontal) {\n // scroll changed, return true\n return true;\n } // scroll did not change\n\n\n return false;\n }; // Ahh a pure function, gets new transform value\n // based on scrollPosition and speed\n // Allow for decimal pixel values\n\n\n var updatePosition = function updatePosition(percentageX, percentageY, speed, verticalSpeed, horizontalSpeed) {\n var result = {};\n var valueX = (horizontalSpeed ? horizontalSpeed : speed) * (100 * (1 - percentageX));\n var valueY = (verticalSpeed ? verticalSpeed : speed) * (100 * (1 - percentageY));\n result.x = self.options.round ? Math.round(valueX) : Math.round(valueX * 100) / 100;\n result.y = self.options.round ? Math.round(valueY) : Math.round(valueY * 100) / 100;\n return result;\n }; // Remove event listeners and loop again\n\n\n var deferredUpdate = function deferredUpdate() {\n window.removeEventListener('resize', deferredUpdate);\n window.removeEventListener('orientationchange', deferredUpdate);\n (self.options.wrapper ? self.options.wrapper : window).removeEventListener('scroll', deferredUpdate);\n (self.options.wrapper ? self.options.wrapper : document).removeEventListener('touchmove', deferredUpdate); // loop again\n\n loopId = loop(update);\n }; // Loop\n\n\n var update = function update() {\n if (setPosition() && pause === false) {\n animate(); // loop again\n\n loopId = loop(update);\n } else {\n loopId = null; // Don't animate until we get a position updating event\n\n window.addEventListener('resize', deferredUpdate);\n window.addEventListener('orientationchange', deferredUpdate);\n (self.options.wrapper ? self.options.wrapper : window).addEventListener('scroll', deferredUpdate, supportsPassive ? {\n passive: true\n } : false);\n (self.options.wrapper ? self.options.wrapper : document).addEventListener('touchmove', deferredUpdate, supportsPassive ? {\n passive: true\n } : false);\n }\n }; // Transform3d on parallax element\n\n\n var animate = function animate() {\n var positions;\n\n for (var i = 0; i < self.elems.length; i++) {\n // Determine relevant movement directions\n var verticalScrollAxis = blocks[i].verticalScrollAxis.toLowerCase();\n var horizontalScrollAxis = blocks[i].horizontalScrollAxis.toLowerCase();\n var verticalScrollX = verticalScrollAxis.indexOf(\"x\") != -1 ? posY : 0;\n var verticalScrollY = verticalScrollAxis.indexOf(\"y\") != -1 ? posY : 0;\n var horizontalScrollX = horizontalScrollAxis.indexOf(\"x\") != -1 ? posX : 0;\n var horizontalScrollY = horizontalScrollAxis.indexOf(\"y\") != -1 ? posX : 0;\n var percentageY = (verticalScrollY + horizontalScrollY - blocks[i].top + screenY) / (blocks[i].height + screenY);\n var percentageX = (verticalScrollX + horizontalScrollX - blocks[i].left + screenX) / (blocks[i].width + screenX); // Subtracting initialize value, so element stays in same spot as HTML\n\n positions = updatePosition(percentageX, percentageY, blocks[i].speed, blocks[i].verticalSpeed, blocks[i].horizontalSpeed);\n var positionY = positions.y - blocks[i].baseY;\n var positionX = positions.x - blocks[i].baseX; // The next two \"if\" blocks go like this:\n // Check if a limit is defined (first \"min\", then \"max\");\n // Check if we need to change the Y or the X\n // (Currently working only if just one of the axes is enabled)\n // Then, check if the new position is inside the allowed limit\n // If so, use new position. If not, set position to limit.\n // Check if a min limit is defined\n\n if (blocks[i].min !== null) {\n if (self.options.vertical && !self.options.horizontal) {\n positionY = positionY <= blocks[i].min ? blocks[i].min : positionY;\n }\n\n if (self.options.horizontal && !self.options.vertical) {\n positionX = positionX <= blocks[i].min ? blocks[i].min : positionX;\n }\n } // Check if directional min limits are defined\n\n\n if (blocks[i].minY != null) {\n positionY = positionY <= blocks[i].minY ? blocks[i].minY : positionY;\n }\n\n if (blocks[i].minX != null) {\n positionX = positionX <= blocks[i].minX ? blocks[i].minX : positionX;\n } // Check if a max limit is defined\n\n\n if (blocks[i].max !== null) {\n if (self.options.vertical && !self.options.horizontal) {\n positionY = positionY >= blocks[i].max ? blocks[i].max : positionY;\n }\n\n if (self.options.horizontal && !self.options.vertical) {\n positionX = positionX >= blocks[i].max ? blocks[i].max : positionX;\n }\n } // Check if directional max limits are defined\n\n\n if (blocks[i].maxY != null) {\n positionY = positionY >= blocks[i].maxY ? blocks[i].maxY : positionY;\n }\n\n if (blocks[i].maxX != null) {\n positionX = positionX >= blocks[i].maxX ? blocks[i].maxX : positionX;\n }\n\n var zindex = blocks[i].zindex; // Move that element\n // (Set the new translation and append initial inline transforms.)\n\n var translate = 'translate3d(' + (self.options.horizontal ? positionX : '0') + 'px,' + (self.options.vertical ? positionY : '0') + 'px,' + zindex + 'px) ' + blocks[i].transform;\n self.elems[i].style[transformProp] = translate;\n }\n\n self.options.callback(positions);\n };\n\n self.destroy = function () {\n for (var i = 0; i < self.elems.length; i++) {\n self.elems[i].style.cssText = blocks[i].style;\n } // Remove resize event listener if not pause, and pause\n\n\n if (!pause) {\n window.removeEventListener('resize', init);\n pause = true;\n } // Clear the animation loop to prevent possible memory leak\n\n\n clearLoop(loopId);\n loopId = null;\n }; // Init\n\n\n init(); // Allow to recalculate the initial values whenever we want\n\n self.refresh = init;\n return self;\n };\n\n return Rellax;\n});","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n} // About 1.5x faster than the two-arg version of Array#splice()\n\n\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n} // This implementation is based heavily on node's url.parse\n\n\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n var toParts = to && to.split('/') || [];\n var fromParts = from && from.split('/') || [];\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n var hasTrailingSlash;\n\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) {\n fromParts.unshift('..');\n }\n if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n var result = fromParts.join('/');\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n return result;\n}\n\nexport default resolvePathname;","function valueOf(obj) {\n return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);\n}\n\nfunction valueEqual(a, b) {\n // Test for strict equality first.\n if (a === b) return true; // Otherwise, if either of them == null they are not equal.\n\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return valueEqual(item, b[index]);\n });\n }\n\n if (typeof a === 'object' || typeof b === 'object') {\n var aValue = valueOf(a);\n var bValue = valueOf(b);\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n return Object.keys(Object.assign({}, a, b)).every(function (key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\nexport default valueEqual;","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\n\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n\n if (isProduction) {\n throw new Error(prefix);\n }\n\n throw new Error(prefix + \": \" + (message || ''));\n}\n\nexport default invariant;","import _extends from '@babel/runtime/helpers/esm/extends';\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport warning from 'tiny-warning';\nimport invariant from 'tiny-invariant';\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n}\n\nfunction stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n}\n\nfunction hasBasename(path, prefix) {\n return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;\n}\n\nfunction stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n}\n\nfunction stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n}\n\nfunction parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n var hashIndex = pathname.indexOf('#');\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n}\n\nfunction createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n var path = pathname || '/';\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : \"?\" + search;\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : \"#\" + hash;\n return path;\n}\n\nfunction createLocation(path, state, key, currentLocation) {\n var location;\n\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n}\n\nfunction locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n}\n\nfunction createTransitionManager() {\n var prompt = null;\n\n function setPrompt(nextPrompt) {\n process.env.NODE_ENV !== \"production\" ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0;\n prompt = nextPrompt;\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n }\n\n function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n }\n\n var listeners = [];\n\n function appendListener(fn) {\n var isActive = true;\n\n function listener() {\n if (isActive) fn.apply(void 0, arguments);\n }\n\n listeners.push(listener);\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n }\n\n function notifyListeners() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n }\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nfunction getConfirmation(message, callback) {\n callback(window.confirm(message)); // eslint-disable-line no-alert\n}\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\n\n\nfunction supportsHistory() {\n var ua = window.navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n return window.history && 'pushState' in window.history;\n}\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\n\n\nfunction supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\n\n\nfunction supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\n\n\nfunction isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nfunction getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n}\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\n\n\nfunction createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nvar HashChangeEvent$1 = 'hashchange';\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nfunction stripHash(url) {\n var hashIndex = url.indexOf('#');\n return hashIndex === -1 ? url : url.slice(0, hashIndex);\n}\n\nfunction getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n}\n\nfunction pushHashPath(path) {\n window.location.hash = path;\n}\n\nfunction replaceHashPath(path) {\n window.location.replace(stripHash(window.location.href) + '#' + path);\n}\n\nfunction createHashHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Hash history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n var _props = props,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$hashType = _props.hashType,\n hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n function getDOMLocation() {\n var path = decodePath(getHashPath());\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n var forceNextPop = false;\n var ignorePath = null;\n\n function locationsAreEqual$$1(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;\n }\n\n function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n handlePop(location);\n }\n }\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n } // Ensure the hash is encoded properly before doing anything else.\n\n\n var path = getHashPath();\n var encodedPath = encodePath(path);\n if (path !== encodedPath) replaceHashPath(encodedPath);\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)]; // Public interface\n\n function createHref(location) {\n var baseTag = document.querySelector('base');\n var href = '';\n\n if (baseTag && baseTag.getAttribute('href')) {\n href = stripHash(window.location.href);\n }\n\n return href + '#' + encodePath(basename + createPath(location));\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex + 1);\n nextPaths.push(path);\n allPaths = nextPaths;\n setState({\n action: action,\n location: location\n });\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;\n setState();\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n process.env.NODE_ENV !== \"production\" ? warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(HashChangeEvent$1, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(HashChangeEvent$1, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nfunction clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n}\n/**\n * Creates a history object that stores locations in memory.\n */\n\n\nfunction createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}\n\nexport { createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath };","import './public-path';\nimport escapeTextContentForBrowser from 'escape-html';\nimport loadPolyfills from '../mastodon/load_polyfills';\nimport ready from '../mastodon/ready';\nimport { start } from '../mastodon/common';\nimport loadKeyboardExtensions from '../mastodon/load_keyboard_extensions';\n\nstart();\n\nwindow.addEventListener('message', e => {\n const data = e.data || {};\n\n if (!window.parent || data.type !== 'setHeight') {\n return;\n }\n\n ready(() => {\n window.parent.postMessage({\n type: 'setHeight',\n id: data.id,\n height: document.getElementsByTagName('html')[0].scrollHeight,\n }, '*');\n });\n});\n\nfunction main() {\n const IntlMessageFormat = require('intl-messageformat').default;\n const { timeAgoString } = require('../mastodon/components/relative_timestamp');\n const { delegate } = require('@rails/ujs');\n const emojify = require('../mastodon/features/emoji/emoji').default;\n const { getLocale } = require('../mastodon/locales');\n const { messages } = getLocale();\n const React = require('react');\n const ReactDOM = require('react-dom');\n const Rellax = require('rellax');\n const { createBrowserHistory } = require('history');\n\n const scrollToDetailedStatus = () => {\n const history = createBrowserHistory();\n const detailedStatuses = document.querySelectorAll('.public-layout .detailed-status');\n const location = history.location;\n\n if (detailedStatuses.length === 1 && (!location.state || !location.state.scrolledToDetailedStatus)) {\n detailedStatuses[0].scrollIntoView();\n history.replace(location.pathname, { ...location.state, scrolledToDetailedStatus: true });\n }\n };\n\n const getEmojiAnimationHandler = (swapTo) => {\n return ({ target }) => {\n target.src = target.getAttribute(swapTo);\n };\n };\n\n ready(() => {\n const locale = document.documentElement.lang;\n\n const dateTimeFormat = new Intl.DateTimeFormat(locale, {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n });\n\n [].forEach.call(document.querySelectorAll('.emojify'), (content) => {\n content.innerHTML = emojify(content.innerHTML);\n });\n\n [].forEach.call(document.querySelectorAll('time.formatted'), (content) => {\n const datetime = new Date(content.getAttribute('datetime'));\n const formattedDate = dateTimeFormat.format(datetime);\n\n content.title = formattedDate;\n content.textContent = formattedDate;\n });\n\n [].forEach.call(document.querySelectorAll('time.time-ago'), (content) => {\n const datetime = new Date(content.getAttribute('datetime'));\n const now = new Date();\n\n content.title = dateTimeFormat.format(datetime);\n content.textContent = timeAgoString({\n formatMessage: ({ id, defaultMessage }, values) => (new IntlMessageFormat(messages[id] || defaultMessage, locale)).format(values),\n formatDate: (date, options) => (new Intl.DateTimeFormat(locale, options)).format(date),\n }, datetime, now, now.getFullYear(), content.getAttribute('datetime').includes('T'));\n });\n\n const reactComponents = document.querySelectorAll('[data-component]');\n\n if (reactComponents.length > 0) {\n import(/* webpackChunkName: \"containers/media_container\" */ '../mastodon/containers/media_container')\n .then(({ default: MediaContainer }) => {\n [].forEach.call(reactComponents, (component) => {\n [].forEach.call(component.children, (child) => {\n component.removeChild(child);\n });\n });\n\n const content = document.createElement('div');\n\n ReactDOM.render(, content);\n document.body.appendChild(content);\n scrollToDetailedStatus();\n })\n .catch(error => {\n console.error(error);\n scrollToDetailedStatus();\n });\n } else {\n scrollToDetailedStatus();\n }\n\n const parallaxComponents = document.querySelectorAll('.parallax');\n\n if (parallaxComponents.length > 0 ) {\n new Rellax('.parallax', { speed: -1 });\n }\n\n delegate(document, '#registration_user_password_confirmation,#registration_user_password', 'input', () => {\n const password = document.getElementById('registration_user_password');\n const confirmation = document.getElementById('registration_user_password_confirmation');\n if (password.value && password.value !== confirmation.value) {\n confirmation.setCustomValidity((new IntlMessageFormat(messages['password_confirmation.mismatching'] || 'Password confirmation does not match', locale)).format());\n } else {\n confirmation.setCustomValidity('');\n }\n });\n\n delegate(document, '#user_password,#user_password_confirmation', 'input', () => {\n const password = document.getElementById('user_password');\n const confirmation = document.getElementById('user_password_confirmation');\n if (!confirmation) return;\n\n if (password.value && password.value !== confirmation.value) {\n confirmation.setCustomValidity((new IntlMessageFormat(messages['password_confirmation.mismatching'] || 'Password confirmation does not match', locale)).format());\n } else {\n confirmation.setCustomValidity('');\n }\n });\n\n delegate(document, '.custom-emoji', 'mouseover', getEmojiAnimationHandler('data-original'));\n delegate(document, '.custom-emoji', 'mouseout', getEmojiAnimationHandler('data-static'));\n\n delegate(document, '.status__content__spoiler-link', 'click', function() {\n const statusEl = this.parentNode.parentNode;\n\n if (statusEl.dataset.spoiler === 'expanded') {\n statusEl.dataset.spoiler = 'folded';\n this.textContent = (new IntlMessageFormat(messages['status.show_more'] || 'Show more', locale)).format();\n } else {\n statusEl.dataset.spoiler = 'expanded';\n this.textContent = (new IntlMessageFormat(messages['status.show_less'] || 'Show less', locale)).format();\n }\n\n return false;\n });\n\n [].forEach.call(document.querySelectorAll('.status__content__spoiler-link'), (spoilerLink) => {\n const statusEl = spoilerLink.parentNode.parentNode;\n const message = (statusEl.dataset.spoiler === 'expanded') ? (messages['status.show_less'] || 'Show less') : (messages['status.show_more'] || 'Show more');\n spoilerLink.textContent = (new IntlMessageFormat(message, locale)).format();\n });\n });\n\n delegate(document, '.webapp-btn', 'click', ({ target, button }) => {\n if (button !== 0) {\n return true;\n }\n window.location.href = target.href;\n return false;\n });\n\n delegate(document, '.modal-button', 'click', e => {\n e.preventDefault();\n\n let href;\n\n if (e.target.nodeName !== 'A') {\n href = e.target.parentNode.href;\n } else {\n href = e.target.href;\n }\n\n window.open(href, 'mastodon-intent', 'width=445,height=600,resizable=no,menubar=no,status=no,scrollbars=yes');\n });\n\n delegate(document, '#account_display_name', 'input', ({ target }) => {\n const name = document.querySelector('.card .display-name strong');\n if (name) {\n if (target.value) {\n name.innerHTML = emojify(escapeTextContentForBrowser(target.value));\n } else {\n name.textContent = target.dataset.default;\n }\n }\n });\n\n delegate(document, '#account_avatar', 'change', ({ target }) => {\n const avatar = document.querySelector('.card .avatar img');\n const [file] = target.files || [];\n const url = file ? URL.createObjectURL(file) : avatar.dataset.originalSrc;\n\n avatar.src = url;\n });\n\n const getProfileAvatarAnimationHandler = (swapTo) => {\n //animate avatar gifs on the profile page when moused over\n return ({ target }) => {\n const swapSrc = target.getAttribute(swapTo);\n //only change the img source if autoplay is off and the image src is actually different\n if(target.getAttribute('data-autoplay') !== 'true' && target.src !== swapSrc) {\n target.src = swapSrc;\n }\n };\n };\n\n delegate(document, 'img#profile_page_avatar', 'mouseover', getProfileAvatarAnimationHandler('data-original'));\n\n delegate(document, 'img#profile_page_avatar', 'mouseout', getProfileAvatarAnimationHandler('data-static'));\n\n delegate(document, '#account_header', 'change', ({ target }) => {\n const header = document.querySelector('.card .card__img img');\n const [file] = target.files || [];\n const url = file ? URL.createObjectURL(file) : header.dataset.originalSrc;\n\n header.src = url;\n });\n\n delegate(document, '#account_locked', 'change', ({ target }) => {\n const lock = document.querySelector('.card .display-name i');\n\n if (lock) {\n if (target.checked) {\n delete lock.dataset.hidden;\n } else {\n lock.dataset.hidden = 'true';\n }\n }\n });\n\n delegate(document, '.input-copy input', 'click', ({ target }) => {\n target.focus();\n target.select();\n target.setSelectionRange(0, target.value.length);\n });\n\n delegate(document, '.input-copy button', 'click', ({ target }) => {\n const input = target.parentNode.querySelector('.input-copy__wrapper input');\n\n const oldReadOnly = input.readonly;\n\n input.readonly = false;\n input.focus();\n input.select();\n input.setSelectionRange(0, input.value.length);\n\n try {\n if (document.execCommand('copy')) {\n input.blur();\n target.parentNode.classList.add('copied');\n\n setTimeout(() => {\n target.parentNode.classList.remove('copied');\n }, 700);\n }\n } catch (err) {\n console.error(err);\n }\n\n input.readonly = oldReadOnly;\n });\n\n delegate(document, '.sidebar__toggle__icon', 'click', () => {\n const target = document.querySelector('.sidebar ul');\n\n if (target.style.display === 'block') {\n target.style.display = 'none';\n } else {\n target.style.display = 'block';\n }\n });\n\n // Empty the honeypot fields in JS in case something like an extension\n // automatically filled them.\n delegate(document, '#registration_new_user,#new_user', 'submit', () => {\n ['user_website', 'user_confirm_password', 'registration_user_website', 'registration_user_confirm_password'].forEach(id => {\n const field = document.getElementById(id);\n if (field) {\n field.value = '';\n }\n });\n });\n}\n\nloadPolyfills()\n .then(main)\n .then(loadKeyboardExtensions)\n .catch(error => {\n console.error(error);\n });\n","// On KaiOS, we may not be able to use a mouse cursor or navigate using Tab-based focus, so we install\n// special left/right focus navigation keyboard listeners, at least on public pages (i.e. so folks\n// can at least log in using KaiOS devices).\n\nfunction importArrowKeyNavigation() {\n return import(/* webpackChunkName: \"arrow-key-navigation\" */ 'arrow-key-navigation');\n}\n\nexport default function loadKeyboardExtensions() {\n if (/KAIOS/.test(navigator.userAgent)) {\n return importArrowKeyNavigation().then(arrowKeyNav => {\n arrowKeyNav.register();\n });\n }\n return Promise.resolve();\n}\n"],"sourceRoot":""}