mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-28 19:20:20 +00:00
1 line
652 KiB
Plaintext
1 line
652 KiB
Plaintext
{"version":3,"sources":["webpack:///./node_modules/react-redux-loading-bar/build/loading_bar_ducks.js","webpack:///./node_modules/react-motion/lib/Motion.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/util/reduced_motion.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/util/optional_motion.js","webpack:///./node_modules/classnames/index.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/video/index.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/video/index.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/ui/util/reduced_motion.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/ui/util/optional_motion.js","webpack:///./node_modules/lodash/_baseGetTag.js","webpack:///./node_modules/lodash/isObjectLike.js","webpack:///./node_modules/lodash/_Symbol.js","webpack:///./node_modules/react-swipeable-views-core/node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./node_modules/react-is/index.js","webpack:///./node_modules/react-swipeable-views/lib/index.js","webpack:///./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack:///./node_modules/react-redux/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack:///./node_modules/symbol-observable/es/index.js","webpack:///./node_modules/dom-helpers/events/on.js","webpack:///./node_modules/dom-helpers/events/off.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/util/fullscreen.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/ui/util/fullscreen.js","webpack:///./node_modules/lodash/isSymbol.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/util/is_mobile.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/is_mobile.js","webpack:///./node_modules/react-redux-loading-bar/build/loading_bar.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./node_modules/react-swipeable-views-core/lib/constant.js","webpack:///./node_modules/dom-helpers/transition/properties.js","webpack:///./node_modules/react-redux/es/components/Context.js","webpack:///./node_modules/react-redux/es/components/Provider.js","webpack:///./node_modules/react-redux/es/components/connectAdvanced.js","webpack:///./node_modules/react-redux/es/utils/shallowEqual.js","webpack:///./node_modules/react-redux/es/connect/wrapMapToProps.js","webpack:///./node_modules/react-redux/es/connect/mapDispatchToProps.js","webpack:///./node_modules/react-redux/es/connect/mapStateToProps.js","webpack:///./node_modules/react-redux/es/connect/mergeProps.js","webpack:///./node_modules/react-redux/es/connect/selectorFactory.js","webpack:///./node_modules/react-redux/es/connect/connect.js","webpack:///./node_modules/react-redux/es/index.js","webpack:///./node_modules/symbol-observable/es/ponyfill.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/initial_state.js","webpack:///./node_modules/react-immutable-pure-component/lib/react-immutable-pure-component.es.js","webpack:///./node_modules/react-immutable-proptypes/dist/ImmutablePropTypes.js","webpack:///./node_modules/lodash/_freeGlobal.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/ui/components/zoomable_image.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/ui/components/image_loader.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/ui/components/zoomable_image.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/ui/components/image_loader.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/util/initial_state.js","webpack:///./node_modules/raf/index.js","webpack:///./node_modules/react-is/cjs/react-is.production.min.js","webpack:///(webpack)/buildin/harmony-module.js","webpack:///./node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///./node_modules/lodash/now.js","webpack:///./node_modules/lodash/toNumber.js","webpack:///./node_modules/lodash/_getRawTag.js","webpack:///./node_modules/lodash/_objectToString.js","webpack:///./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js","webpack:///./node_modules/react-redux-loading-bar/build/loading_bar_middleware.js","webpack:///./node_modules/react-redux-loading-bar/build/immutable.js","webpack:///./node_modules/react-motion/lib/mapToZero.js","webpack:///./node_modules/react-motion/lib/stripStyle.js","webpack:///./node_modules/react-motion/lib/stepper.js","webpack:///./node_modules/react-motion/node_modules/performance-now/lib/performance-now.js","webpack:///../src/performance-now.coffee","webpack:///./node_modules/react-motion/lib/shouldStopAnimation.js","webpack:///./node_modules/react-motion/lib/presets.js","webpack:///./node_modules/react-swipeable-views/lib/SwipeableViews.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/objectWithoutProperties.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/classCallCheck.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/components/icon.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/createClass.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/typeof.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/inherits.js","webpack:///./node_modules/react-swipeable-views/node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:///./node_modules/react-swipeable-views-core/lib/index.js","webpack:///./node_modules/react-swipeable-views-core/lib/checkIndexBounds.js","webpack:///./node_modules/react-swipeable-views-core/lib/computeIndex.js","webpack:///./node_modules/react-swipeable-views-core/lib/getDisplaySameSlide.js","webpack:///./node_modules/react-swipeable-views-core/lib/mod.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/components/extended_video_player.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/ui/components/media_modal.js","webpack:///./node_modules/immutable/dist/immutable.js","webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/components/modal_root.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/components/modal_root.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/components/extended_video_player.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/ui/components/media_modal.js","webpack:///./node_modules/react-motion/lib/spring.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/components/icon_button.js","webpack:///./node_modules/warning/warning.js","webpack:///./node_modules/lodash/debounce.js","webpack:///./node_modules/react-redux-loading-bar/build/index.js","webpack:///./node_modules/detect-passive-events/lib/index.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/containers/media_container.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/components/icon_button.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/containers/media_container.js","webpack:///./node_modules/lodash/throttle.js","webpack:///./node_modules/lodash/_root.js","webpack:///./node_modules/redux/es/redux.js","webpack:///./node_modules/dom-helpers/util/inDOM.js","webpack:///./node_modules/lodash/isObject.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/locales/index.js"],"names":["Object","defineProperty","exports","value","_extends","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","_defineProperty","obj","enumerable","configurable","writable","showLoading","scope","undefined","DEFAULT_SCOPE","type","SHOW","payload","hideLoading","HIDE","resetLoading","RESET","loadingBarReducer","state","action","_ref$scope","Math","max","__esModule","_createClass","defineProperties","props","descriptor","Constructor","protoProps","staticProps","_interopRequireDefault","default","_mapToZero2","require","_stripStyle2","_stepper4","_performanceNow2","_raf2","_shouldStopAnimation2","_react2","_propTypes2","msPerFrame","Motion","_React$Component","_this","this","instance","TypeError","_classCallCheck","wasAnimating","animationID","prevTime","accumulatedTime","unreadPropStyle","clearUnreadPropStyle","destStyle","dirty","_state","currentStyle","currentVelocity","lastIdealStyle","lastIdealVelocity","styleValue","setState","startAnimationIfNecessary","timestamp","propsStyle","style","onRest","currentTime","timeDelta","currentFrameCompletion","floor","framesToCatchUp","newLastIdealStyle","newLastIdealVelocity","newCurrentStyle","newCurrentVelocity","newLastIdealStyleValue","newLastIdealVelocityValue","_stepper","val","stiffness","damping","precision","_stepper2","nextIdealX","nextIdealV","defaultState","subClass","superClass","create","constructor","setPrototypeOf","__proto__","_inherits","defaultStyle","objectOf","number","oneOfType","object","isRequired","children","func","_props","componentDidMount","componentWillReceiveProps","componentWillUnmount","cancel","render","renderedChildren","Children","only","Component","module","stylesToKeep","ReducedMotion","_this$props","keys","forEach","includes","jsx","Motion_default","a","React","reduceMotion","__WEBPACK_AMD_DEFINE_RESULT__","hasOwn","classNames","classes","arg","argType","push","Array","isArray","inner","apply","join","messages","defineMessages","play","id","defaultMessage","pause","mute","unmute","hide","expand","close","fullscreen","exit_fullscreen","formatTime","secondsNum","hours","minutes","seconds","findElementPosition","el","box","getBoundingClientRect","parentNode","left","top","docEl","document","documentElement","body","clientLeft","scrollLeft","window","pageXOffset","clientTop","scrollTop","pageYOffset","round","getPointerPosition","event","position","boxW","offsetWidth","boxH","offsetHeight","boxY","boxX","pageY","pageX","changedTouches","y","min","x","Video","injectIntl","duration","volume","paused","dragging","containerWidth","width","hovered","muted","revealed","displayMedia","sensitive","v","offset","volWidth","volOffset","c","player","cacheWidth","video","seek","e","preventDefault","stopPropagation","addEventListener","handleMouseVolSlide","handleVolumeMouseUp","removeEventListener","lodash_throttle__WEBPACK_IMPORTED_MODULE_4___default","rect","clientX","isNaN","slideamt","handleMouseMove","handleMouseUp","isFullscreen","exitFullscreen","requestFullscreen","startTime","buffered","buffer","end","src","preview","height","alt","media","fromJS","url","preview_url","description","onOpenVideo","onCloseVideo","handleFullscreenChange","componentDidUpdate","prevProps","preventPlayback","warning","preload","_this$props2","inline","intl","letterbox","fullwidth","detailed","_this$state","progress","playerStyle","volumeWidth","volumeHandleLoc","volHandleOffset","computedClass","inactive","full-width","_this$props3","react__WEBPACK_IMPORTED_MODULE_5___default","createElement","className","ref","setPlayerRef","tabindex","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","react_intl__WEBPACK_IMPORTED_MODULE_6__","onMouseEnter","handleMouseEnter","onMouseLeave","handleMouseLeave","onMouseDown","handleMouseDownRoot","tabIndex","setVideoRef","poster","loop","role","aria-label","title","onClick","togglePlay","onPlay","handlePlay","onPause","handlePause","onTimeUpdate","handleTimeUpdate","onLoadedData","handleLoadedData","onProgress","handleProgress","onVolumeChange","handleVolumeChange","active","toggleReveal","handleMouseDown","setSeekRef","formatMessage","fa-play","fa-pause","toggleMute","fa-volume-off","fa-volume-up","handleVolumeMouseDown","setVolumeRef","handleOpenVideo","handleCloseVideo","toggleFullscreen","fa-arrows-alt","fa-compress","PureComponent","handleClickRoot","mastodon_components_icon__WEBPACK_IMPORTED_MODULE_11__","fixedWidth","Symbol","getRawTag","objectToString","symToStringTag","toStringTag","_default","_defineProperties","__webpack_require__","d","__webpack_exports__","ReactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","defaultProps","displayName","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","propTypes","KNOWN_STATICS","name","caller","callee","arity","TYPE_STATICS","ForwardRef","$$typeof","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","concat","targetStatics","sourceStatics","global","root","_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__","self","result","ponyfill","on","node","eventName","handler","capture","attachEvent","srcElement","currentTarget","off","detachEvent","attachFullscreenListener","detachFullscreenListener","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","webkitExitFullscreen","mozCancelFullScreen","webkitRequestFullscreen","mozRequestFullScreen","listener","baseGetTag","isObjectLike","isMobile","isUserTouching","isIOS","detect_passive_events__WEBPACK_IMPORTED_MODULE_0__","detect_passive_events__WEBPACK_IMPORTED_MODULE_0___default","n","LAYOUT_BREAKPOINT","columns","iOS","test","navigator","userAgent","MSStream","userTouching","listenerOptions","detectPassiveEvents","hasSupport","passive","touchListener","LoadingBar","TERMINATING_ANIMATION_DURATION","ANIMATION_DURATION","PROGRESS_INCREASE","MAX_PROGRESS","UPDATE_TIME","_react","_reactLifecyclesCompat","_propTypes","_reactRedux","_loading_bar_ducks","_possibleConstructorReturn","ReferenceError","initialState","percent","status","_Component","_ref","_temp","_len","args","_key","reset","terminatingAnimationTimeoutId","newPercent","progressIncrease","cos","PI","simulateProgress","prevState","_ref2","maxProgress","start","stop","clearInterval","progressIntervalId","clearTimeout","setInterval","updateTime","terminatingAnimationDuration","isShown","showFastActions","setTimeout","animationDuration","opacity","transform","msTransform","WebkitTransform","MozTransform","OTransform","transformOrigin","msTransformOrigin","WebkitTransformOrigin","MozTransformOrigin","OTransformOrigin","transition","msTransition","WebkitTransition","MozTransition","OTransition","willChange","backgroundColor","buildStyle","display","clear","loading","indexOf","nextProps","shouldStart","shouldStop","string","bool","polyfill","ConnectedLoadingBar","connect","ownProps","loadingBar","RESISTANCE_COEF","UNCERTAINTY_THRESHOLD","animationEnd","animationDelay","animationTiming","animationName","transitionEnd","transitionDuration","transitionDelay","transitionTiming","transitionProperty","prefix","_inDOM","_getTransitionPropert","vendorMap","O","toLowerCase","Moz","Webkit","ms","vendors","vendor","getTransitionProperties","property","timing","delay","ReactReduxContext","createContext","Provider","store","storeState","getState","_inheritsLoose","_proto","_isMounted","subscribe","unsubscribe","_this2","newStoreState","providerState","postMountStoreState","Context","context","connectAdvanced","selectorFactory","_ref2$getDisplayName","getDisplayName","_ref2$methodName","methodName","_ref2$renderCountProp","renderCountProp","_ref2$shouldHandleSta","shouldHandleStateChanges","_ref2$storeKey","storeKey","_ref2$withRef","withRef","_ref2$forwardRef","forwardRef","_ref2$context","connectOptions","_objectWithoutPropertiesLoose","invariant","customStoreWarningMessage","WrappedComponent","wrappedComponentName","selectorFactoryOptions","pure","OuterBaseComponent","FinalWrappedComponent","Connect","_OuterBaseComponent","lastProps","lastState","lastDerivedProps","lastStore","sourceSelector","lastChildProps","lastForwardRef","lastChildElement","wrapperProps","selectDerivedProps","dispatch","selectChildElement","childProps","renderWrappedComponent","bind","_assertThisInitialized","forwardedRef","derivedProps","ContextToUse","Consumer","forwarded","hoistStatics","is","shallowEqual","objA","objB","keysA","keysB","wrapMapToPropsConstant","getConstant","options","constant","constantSelector","dependsOnOwnProps","getDependsOnOwnProps","mapToProps","Boolean","wrapMapToPropsFunc","proxy","stateOrDispatch","connect_mapDispatchToProps","mapDispatchToProps","bindActionCreators","connect_mapStateToProps","mapStateToProps","defaultMergeProps","stateProps","dispatchProps","connect_mergeProps","mergeProps","mergedProps","areMergedPropsEqual","hasRunOnce","nextMergedProps","impureFinalPropsSelectorFactory","pureFinalPropsSelectorFactory","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","hasRunAtLeastOnce","handleSubsequentCalls","nextState","nextOwnProps","nextStateProps","statePropsChanged","propsChanged","stateChanged","finalPropsSelectorFactory","initMapStateToProps","initMapDispatchToProps","initMergeProps","match","factories","Error","strictEqual","b","createConnect","_ref$connectHOC","connectHOC","_ref$mapStateToPropsF","mapStateToPropsFactories","_ref$mapDispatchToPro","mapDispatchToPropsFactories","_ref$mergePropsFactor","mergePropsFactories","_ref$selectorFactory","defaultMapStateToPropsFactories","defaultMapDispatchToPropsFactories","defaultMergePropsFactories","defaultSelectorFactory","_ref3","_ref3$pure","_ref3$areStatesEqual","_ref3$areOwnPropsEqua","_ref3$areStatePropsEq","_ref3$areMergedPropsE","extraOptions","components_Provider","connect_connect","symbolObservablePonyfill","observable","autoPlayGif","expandSpoilers","unfollowModal","boostModal","deleteModal","me","searchEnabled","maxChars","invitesEnabled","profile_directory","isStaff","deleteOthersNotice","prop","element","getElementById","JSON","parse","textContent","getMeta","meta","rights","react__WEBPACK_IMPORTED_MODULE_0__","react__WEBPACK_IMPORTED_MODULE_0___default","immutable__WEBPACK_IMPORTED_MODULE_1__","ImmutablePureComponent","updateOnProps","every","p","updateOnStates","s","Immutable","ANONYMOUS","ImmutablePropTypes","listOf","typeChecker","createIterableTypeChecker","List","isList","mapOf","valuesTypeChecker","keysTypeChecker","createMapOfTypeCheckerFactory","Map","isMap","orderedMapOf","OrderedMap","isOrderedMap","setOf","Set","isSet","orderedSetOf","OrderedSet","isOrderedSet","stackOf","Stack","isStack","iterableOf","Iterable","isIterable","recordOf","recordKeys","createChainableTypeChecker","propName","componentName","location","propFullName","rest","propValue","Record","propType","getPropType","locationName","checker","mutablePropValue","toObject","error","shape","createShapeChecker","contains","mapContains","shapeTypes","createShapeTypeChecker","list","createImmutableTypeChecker","map","orderedMap","set","orderedSet","stack","seq","Seq","isSeq","record","isRecord","iterable","RegExp","toSource","split","validate","checkType","chainedCheckType","immutableClassName","immutableClassTypeValidator","propValues","toArray","len","keySeq","freeGlobal","getDistance","p1","p2","sqrt","pow","clientY","ZoomableImage","scale","touches","lastDistance","_this$container","container","scrollHeight","clientHeight","distance","midpoint","zoom","lastMidpoint","image","handleTouchStart","removers","handleTouchMove","removeEventListeners","listeners","nextScale","_this3","_this$container2","nextScrollLeft","nextScrollTop","overflow","react_default","setContainerRef","setImageRef","handleClick","ImageLoader","previewSrc","Promise","resolve","reject","Image","handleError","handleLoad","canvasContext","drawImage","canvas","loadImage","all","loadPreviewCanvas","hasSize","loadOriginalImage","filter","then","clearPreviewCanvas","catch","_this$canvas","clearRect","image-loader--loading","image-loader--amorphous","build","setCanvasRef","zoomable_image_ZoomableImage","_canvasContext","getContext","favouriteModal","mascot","local_settings","localStorage","getItem","now","suffix","raf","caf","last","queue","callback","_now","next","cp","slice","cancelled","handle","fn","requestAnimationFrame","cancelAnimationFrame","for","f","g","h","k","l","m","q","r","t","u","typeOf","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","Fragment","Lazy","Memo","Portal","Profiler","StrictMode","Suspense","isValidElementType","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","originalModule","webpackPolyfill","get","Date","isObject","isSymbol","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","other","valueOf","replace","isBinary","objectProto","nativeObjectToString","toString","isOwn","tag","unmasked","componentWillMount","componentWillUpdate","__reactInternalSnapshotFlag","__reactInternalSnapshot","getSnapshotBeforeUpdate","isReactComponent","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate","newApiName","maybeSnapshot","snapshot","__suppressDeprecationWarning","_slicedToArray","arr","iterator","_arr","_n","_d","_e","_s","_i","done","err","sliceIterator","config","promiseTypeSuffixes","defaultTypeSuffixes","_promiseTypeSuffixes","PENDING","FULFILLED","REJECTED","isPending","isFulfilled","isRejected","actionScope","_loading_bar","ret","secondPerFrame","destX","newV","newX","abs","reusedTuple","process","getNanoSeconds","hrtime","loadTime","performance","hr","getTime","moduleLoadTime","nodeLoadTime","upTime","uptime","noWobble","gentle","wobbly","stiff","getDomTreeShapes","findNativeHandler","_extends2","_objectWithoutProperties2","_classCallCheck2","_createClass2","_possibleConstructorReturn2","_getPrototypeOf2","_inherits2","_properties","_on","_off","_reactSwipeableViewsCore","addEventListenerEnhanced","remove","styles","direction","WebkitFlexShrink","flexShrink","axisProperties","overflowX","x-reverse","overflowY","y-reverse","flexDirection","translate","rotationMatrix","scrollPosition","scrollLength","clientLength","createTransition","easeFunction","applyRotationMatrix","touch","axis","adaptMouse","rootNode","domTreeShapes","hasAttribute","getComputedStyle","getPropertyValue","clientWidth","scrollWidth","nodeWhoClaimedTheScroll","params","startX","some","goingForward","areNotAtStart","areNotAtEnd","SwipeableViews","containerNode","ignoreNextScrollEvents","viewLength","lastX","vx","startY","isSwiping","started","startIndex","transitionListener","touchMoveListener","activeSlide","indexCurrent","firstRenderTimeout","setRootNode","setContainerNode","setActiveSlide","updateHeight","handleSwipeStart","computedStyle","transformValues","rootStyle","tranformNormalized","paddingLeft","paddingRight","handleSwipeMove","ignoreNativeScroll","onSwitching","resistance","dx","dy","count","_computeIndex","computeIndex","index","setIndexCurrent","displaySameSlide","isDragging","handleSwipeEnd","indexNew","indexLatest","delta","threshold","ceil","hysteresis","indexMax","onChangeIndex","reason","handleTransitionEnd","onTouchStart","handleTouchEnd","onTouchEnd","persist","onMouseUp","onMouseMove","handleScroll","onScroll","child","heightLatest","renderOnlyActive","disableLazyLoading","swipeableViews","slideUpdateHeight","disabled","getDisplaySameSlide","animateTransitions","onTransitionEnd","_this4","animateHeight","containerStyleProp","containerStyle","enableMouseEvents","slideStyleProp","slideStyle","slideClassName","springConfig","touchEvents","mouseEvents","additionalTranstion","WebkitFlexDirection","indexChild","hidden","aria-hidden","data-swipeable","objectWithoutPropertiesLoose","excluded","sourceSymbolKeys","propertyIsEnumerable","sourceKeys","Icon","_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__","react__WEBPACK_IMPORTED_MODULE_3___default","_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__","fa-fw","_typeof","assertThisInitialized","_typeof2","_getPrototypeOf","o","_setPrototypeOf","_checkIndexBounds","_constant","_getDisplaySameSlide","_mod","newStartX","exp","oldChildren","oldKey","newChildren","ExtendedVideoPlayer","time","controls","setRef","autoPlay","previous","previewState","MediaModal","navigationHidden","size","getIndex","Number","getAttribute","handlePrevClick","handleNextClick","handleKeyDown","router","history","pathname","unlistenHistory","listen","onClose","goBack","pagination","leftNav","icon","rightNav","item","handleChangeIndex","data-index","content","getIn","image_loader","toggleNavigation","extended_video_player_ExtendedVideoPlayer","navigationClassName","media-modal__navigation--hidden","lib_default","alignItems","handleSwipe","handleSwitching","icon_button","PropTypes","SLICE$0","createClass","ctor","KeyedIterable","isKeyed","KeyedSeq","IndexedIterable","isIndexed","IndexedSeq","SetIterable","isAssociative","SetSeq","maybeIterable","IS_ITERABLE_SENTINEL","maybeKeyed","IS_KEYED_SENTINEL","maybeIndexed","IS_INDEXED_SENTINEL","maybeAssociative","isOrdered","maybeOrdered","IS_ORDERED_SENTINEL","Keyed","Indexed","DELETE","SHIFT","SIZE","MASK","NOT_SET","CHANGE_LENGTH","DID_ALTER","MakeRef","SetRef","OwnerID","arrCopy","newArr","ii","ensureSize","iter","__iterate","returnTrue","wrapIndex","uint32Index","NaN","wholeSlice","begin","resolveBegin","resolveIndex","resolveEnd","defaultIndex","ITERATE_KEYS","ITERATE_VALUES","ITERATE_ENTRIES","REAL_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","ITERATOR_SYMBOL","Iterator","iteratorValue","iteratorResult","iteratorDone","hasIterator","getIteratorFn","isIterator","maybeIterator","getIterator","iteratorFn","isArrayLike","emptySequence","toSeq","maybeIndexedSeqFromValue","ObjectSeq","seqFromValue","toKeyedSeq","fromEntrySeq","keyedSeqFromValue","entrySeq","toIndexedSeq","indexedSeqFromValue","toSetSeq","KEYS","VALUES","ENTRIES","inspect","of","__toString","cacheResult","_cache","__iterateUncached","reverse","seqIterate","__iterator","seqIterator","EMPTY_SEQ","EMPTY_REPEAT","EMPTY_RANGE","IS_SEQ_SENTINEL","ArraySeq","array","_array","_object","_keys","IterableSeq","_iterable","IteratorSeq","_iterator","_iteratorCache","maybeSeq","useKeys","cache","maxIndex","entry","__iteratorUncached","json","converter","fromJSWith","parentJSON","isPlainObj","","fromJSDefault","toList","toMap","valueA","valueB","equals","deepEqual","__hash","notAssociative","entries","flipped","_","allEqual","bSize","has","Repeat","times","_value","Infinity","condition","Range","step","_start","_end","_step","Collection","KeyedCollection","IndexedCollection","SetCollection","notSetValue","iterations","searchValue","lastIndexOf","this$0","possibleIndex","offsetValue","imul","smi","i32","hash","STRING_HASH_CACHE_MIN_STRLEN","stringHashCache","hashString","STRING_HASH_CACHE_SIZE","STRING_HASH_CACHE_MAX_SIZE","hashCode","usingWeakMap","weakMap","UID_HASH_KEY","canDefineProperty","nodeType","uniqueID","getIENodeHash","objHashUID","isExtensible","hashJSObj","charCodeAt","WeakMap","assertNotInfinite","emptyMap","withMutations","maybeMap","IS_MAP_SENTINEL","keyValues","_root","updateMap","setIn","keyPath","updateIn","deleteIn","update","updater","updatedValue","updateInDeepMap","existing","keyPathIter","isNotSet","existingValue","newValue","nextExisting","nextUpdated","forceIterator","__ownerID","__altered","merge","mergeIntoMapWith","mergeWith","merger","iters","mergeIn","mergeDeep","deepMerger","mergeDeepWith","deepMergerWith","mergeDeepIn","sort","comparator","sortFactory","sortBy","mapper","mutable","asMutable","wasAltered","__ensureOwner","asImmutable","MapIterator","iterate","ownerID","makeMap","EMPTY_MAP","MapPrototype","ArrayMapNode","BitmapIndexedNode","bitmap","nodes","HashArrayMapNode","HashCollisionNode","keyHash","ValueNode","_type","_reverse","_stack","mapIteratorFrame","mapIteratorValue","prev","__prev","newRoot","newSize","didChangeSize","didAlter","updateNode","shift","isLeafNode","mergeIntoNode","newNode","idx1","idx2","iterables","mergeIntoCollectionWith","nextValue","collection","mergeIntoMap","popCount","idx","canEdit","newArray","removeIn","removed","exists","MAX_ARRAY_MAP_SIZE","createNodes","isEditable","newEntries","pop","bit","keyHashFrag","MAX_BITMAP_INDEXED_SIZE","including","expandedNodes","expandNodes","newBitmap","newNodes","newLen","after","spliceOut","spliceIn","newCount","MIN_HASH_ARRAY_MAP_SIZE","excluding","packedII","packedNodes","packNodes","keyMatch","subNode","empty","emptyList","makeList","VNode","setSize","maybeList","IS_LIST_SENTINEL","listNodeFor","_origin","setListBounds","newTail","_tail","getTailOffset","_capacity","updateVNode","_level","updateList","splice","insert","values","oldSize","unshift","mergeIntoListWith","iterateList","DONE","ListPrototype","removeBefore","level","originIndex","newChild","removingFirst","oldChild","editable","editableVNode","removeAfter","sizeIndex","EMPTY_LIST","EMPTY_ORDERED_MAP","right","tailPos","tail","iterateNodeOrLeaf","from","to","origin","capacity","nodeHas","lowerNode","newLowerNode","rawIndex","owner","oldOrigin","oldCapacity","newOrigin","newCapacity","newLevel","offsetShift","oldTailOffset","newTailOffset","oldTail","beginIndex","maxSize","emptyOrderedMap","maybeOrderedMap","makeOrderedMap","omap","_map","_list","updateOrderedMap","newMap","newList","flip","ToKeyedSequence","indexed","_iter","_useKeys","ToIndexedSequence","ToSetSequence","FromEntriesSequence","flipFactory","flipSequence","makeSequence","reversedSequence","cacheResultThrough","mapFactory","mappedSequence","reverseFactory","filterFactory","predicate","filterSequence","sliceFactory","originalSize","resolvedBegin","resolvedEnd","sliceSize","resolvedSize","sliceSeq","skipped","isSkipping","skipWhileFactory","skipSequence","skipping","flattenFactory","depth","flatSequence","stopped","flatDeep","currentDepth","defaultComparator","isKeyedIterable","maxFactory","reduce","maxCompare","comp","zipWithFactory","keyIter","zipper","zipSequence","iterators","isDone","steps","reify","validateEntry","resolveSize","iterableClass","defaultValues","hasInitialized","RecordType","names","setProps","RecordTypePrototype","_name","_defaultValues","RecordPrototype","valueSeq","indexedIterable","recordName","defaultVal","_empty","makeRecord","likeRecord","emptySet","add","maybeSet","IS_SET_SENTINEL","fromKeys","updateSet","union","intersect","originalSet","subtract","__make","EMPTY_SET","SetPrototype","__empty","makeSet","emptyOrderedSet","maybeOrderedSet","EMPTY_ORDERED_SET","OrderedSetPrototype","makeOrderedSet","emptyStack","unshiftAll","maybeStack","IS_STACK_SENTINEL","head","_head","peek","makeStack","pushAll","EMPTY_STACK","StackPrototype","mixin","methods","keyCopier","toJS","__toJS","toJSON","toOrderedMap","toOrderedSet","toSet","toStack","__toStringMapper","singleton","concatSeq","flatten","sum","concatFactory","returnValue","find","findEntry","sideEffect","separator","joined","isFirst","reducer","initialReduction","reduction","useFirst","reduceRight","reversed","not","butLast","isEmpty","countBy","grouper","groups","entriesSequence","entryMapper","filterNot","found","findKey","findLast","findLastEntry","findLastKey","first","flatMap","coerce","searchKey","searchKeyPath","nested","groupBy","isKeyedIter","groupByFactory","hasIn","isSubset","isSuperset","keyOf","keyMapper","lastKeyOf","maxBy","neg","defaultNegComparator","minBy","skip","amount","skipLast","skipWhile","skipUntil","take","takeLast","takeWhile","takeSequence","iterating","takeUntil","ordered","keyed","hashMerge","hashIterable","IterablePrototype","quoteString","chain","mapEntries","mapKeys","KeyedIterablePrototype","stringify","String","defaultZipper","findIndex","removeNum","numArgs","spliced","findLastIndex","interpose","interposedSequence","interleave","zipped","interleaved","zip","zipWith","factory","ModalRoot","activeElement","keyCode","noEsc","parentElement","childNodes","handleKeyUp","createHistory","getSiblings","sibling","setAttribute","focus","removeAttribute","handleModalClose","handleModalOpen","mastodonModalOpen","_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__","visible","pointerEvents","react__WEBPACK_IMPORTED_MODULE_4___default","defaultConfig","_presets","_presets2","IconButton","fontSize","lineHeight","activeStyle","label","textAlign","animate","expanded","inverted","overlay","pressed","overlayed","rotateDeg","motionDefaultStyle","rotate","springOpts","motionStyle","spring","flavours_glitch_util_optional_motion__WEBPACK_IMPORTED_MODULE_6__","aria-pressed","aria-expanded","toNumber","nativeMax","nativeMin","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","thisArg","shouldInvoke","timeSinceLastCall","timerExpired","timeWaiting","trailingEdge","debounced","isInvoking","flush","loadingBarMiddleware","ImmutableLoadingBar","_loading_bar2","_loading_bar_middleware2","_immutable2","noop","getLocale","localeData","addLocaleData","MEDIA_COMPONENTS","MediaGallery","Card","MediaContainer","classList","ImmutableList","locale","components","react_intl__WEBPACK_IMPORTED_MODULE_9__","react__WEBPACK_IMPORTED_MODULE_7__","component","_JSON$parse","card","_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_3__","_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_2__","onOpenMedia","handleOpenMedia","ReactDOM","createPortal","react__WEBPACK_IMPORTED_MODULE_7___default","_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__","_components_modal_root__WEBPACK_IMPORTED_MODULE_14__","handleCloseMedia","_features_ui_components_media_modal__WEBPACK_IMPORTED_MODULE_15__","_features_ui_util_optional_motion__WEBPACK_IMPORTED_MODULE_6__","mastodon_components_icon__WEBPACK_IMPORTED_MODULE_9__","flavours_glitch_components_modal_root__WEBPACK_IMPORTED_MODULE_14__","flavours_glitch_features_ui_components_media_modal__WEBPACK_IMPORTED_MODULE_15__","debounce","freeSelf","Function","createStore","applyMiddleware","compose","symbol_observable__WEBPACK_IMPORTED_MODULE_0__","randomString","random","substring","ActionTypes","INIT","REPLACE","PROBE_UNKNOWN_ACTION","isPlainObject","proto","preloadedState","enhancer","currentReducer","currentState","currentListeners","nextListeners","isDispatching","ensureCanMutateNextListeners","isSubscribed","replaceReducer","nextReducer","$$observable","outerSubscribe","observer","observeState","bindActionCreator","actionCreator","actionCreators","boundActionCreators","funcs","middlewares","_dispatch","middlewareAPI","middleware","ownKeys","sym","_objectSpread","locales__WEBPACK_IMPORTED_MODULE_0__"],"mappings":"0FAEAA,OAAOC,eAAeC,EAAS,aAAc,CAC3CC,OAAO,IAGT,IAAIC,EAAWJ,OAAOK,QAAU,SAAUC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAASF,UAAUD,GAAI,IAAK,IAAII,KAAOD,EAAcV,OAAOY,UAAUC,eAAeC,KAAKJ,EAAQC,KAAQL,EAAOK,GAAOD,EAAOC,IAAY,OAAOL,GAOv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K,CAC9BR,MAAOA,EACPc,YAAY,EACZC,cAAc,EACdC,UAAU,IAGZH,EAAIL,GAAOR,IAsBb,OAAOG,EA2EIy2D,CAAc,GAAI11C,EAAO,CAC9BqD,SAFFgyC,EAAYhC,EAAQnrD,WAAM,EAAQkjD,EAAtBiI,CAA6BrzC,EAAMqD,gDCtmBrDxkB,EAAQmC,YAAa,EACrBnC,EAAQ4C,aAAU,EAElB,IAAIwS,IAAgC,oBAAX9J,SAA0BA,OAAOL,WAAYK,OAAOL,SAASuG,eAEtFxR,EAAQ4C,QAAUwS,EAClBrN,EAAO/H,QAAUA,EAAO,0BCsBxB+H,EAAO/H,QALP,SAAkBC,GAChB,IAAIqB,SAAcrB,EAClB,OAAgB,MAATA,IAA0B,UAARqB,GAA4B,YAARA,qCC3B/CgU,EAAAqhB,EAAAnhB,GAAA,IAAAshD,EAAAxhD,EAAA,IAAAA,EAAAC,EAAAC,EAAA,8BAAAshD,EAAA,YAAAxhD,EAAAC,EAAAC,EAAA,8BAAAshD,EAAA","file":"containers/media_container.js","sourcesContent":["'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.showLoading = showLoading;\nexports.hideLoading = hideLoading;\nexports.resetLoading = resetLoading;\nexports.loadingBarReducer = loadingBarReducer;\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar SHOW = exports.SHOW = 'loading-bar/SHOW';\nvar HIDE = exports.HIDE = 'loading-bar/HIDE';\nvar RESET = exports.RESET = 'loading-bar/RESET';\n\nvar DEFAULT_SCOPE = exports.DEFAULT_SCOPE = 'default';\n\nfunction showLoading() {\n var scope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_SCOPE;\n\n return {\n type: SHOW,\n payload: {\n scope: scope\n }\n };\n}\n\nfunction hideLoading() {\n var scope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_SCOPE;\n\n return {\n type: HIDE,\n payload: {\n scope: scope\n }\n };\n}\n\nfunction resetLoading() {\n var scope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_SCOPE;\n\n return {\n type: RESET,\n payload: {\n scope: scope\n }\n };\n}\n\nfunction loadingBarReducer() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var _ref = action.payload || {},\n _ref$scope = _ref.scope,\n scope = _ref$scope === undefined ? DEFAULT_SCOPE : _ref$scope;\n\n switch (action.type) {\n case SHOW:\n return _extends({}, state, _defineProperty({}, scope, (state[scope] || 0) + 1));\n case HIDE:\n return _extends({}, state, _defineProperty({}, scope, Math.max(0, (state[scope] || 1) - 1)));\n case RESET:\n return _extends({}, state, _defineProperty({}, scope, 0));\n default:\n return state;\n }\n}","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _mapToZero = require('./mapToZero');\n\nvar _mapToZero2 = _interopRequireDefault(_mapToZero);\n\nvar _stripStyle = require('./stripStyle');\n\nvar _stripStyle2 = _interopRequireDefault(_stripStyle);\n\nvar _stepper3 = require('./stepper');\n\nvar _stepper4 = _interopRequireDefault(_stepper3);\n\nvar _performanceNow = require('performance-now');\n\nvar _performanceNow2 = _interopRequireDefault(_performanceNow);\n\nvar _raf = require('raf');\n\nvar _raf2 = _interopRequireDefault(_raf);\n\nvar _shouldStopAnimation = require('./shouldStopAnimation');\n\nvar _shouldStopAnimation2 = _interopRequireDefault(_shouldStopAnimation);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar msPerFrame = 1000 / 60;\n\nvar Motion = (function (_React$Component) {\n _inherits(Motion, _React$Component);\n\n _createClass(Motion, null, [{\n key: 'propTypes',\n value: {\n // TOOD: warn against putting a config in here\n defaultStyle: _propTypes2['default'].objectOf(_propTypes2['default'].number),\n style: _propTypes2['default'].objectOf(_propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].object])).isRequired,\n children: _propTypes2['default'].func.isRequired,\n onRest: _propTypes2['default'].func\n },\n enumerable: true\n }]);\n\n function Motion(props) {\n var _this = this;\n\n _classCallCheck(this, Motion);\n\n _React$Component.call(this, props);\n this.wasAnimating = false;\n this.animationID = null;\n this.prevTime = 0;\n this.accumulatedTime = 0;\n this.unreadPropStyle = null;\n\n this.clearUnreadPropStyle = function (destStyle) {\n var dirty = false;\n var _state = _this.state;\n var currentStyle = _state.currentStyle;\n var currentVelocity = _state.currentVelocity;\n var lastIdealStyle = _state.lastIdealStyle;\n var lastIdealVelocity = _state.lastIdealVelocity;\n\n for (var key in destStyle) {\n if (!Object.prototype.hasOwnProperty.call(destStyle, key)) {\n continue;\n }\n\n var styleValue = destStyle[key];\n if (typeof styleValue === 'number') {\n if (!dirty) {\n dirty = true;\n currentStyle = _extends({}, currentStyle);\n currentVelocity = _extends({}, currentVelocity);\n lastIdealStyle = _extends({}, lastIdealStyle);\n lastIdealVelocity = _extends({}, lastIdealVelocity);\n }\n\n currentStyle[key] = styleValue;\n currentVelocity[key] = 0;\n lastIdealStyle[key] = styleValue;\n lastIdealVelocity[key] = 0;\n }\n }\n\n if (dirty) {\n _this.setState({ currentStyle: currentStyle, currentVelocity: currentVelocity, lastIdealStyle: lastIdealStyle, lastIdealVelocity: lastIdealVelocity });\n }\n };\n\n this.startAnimationIfNecessary = function () {\n // TODO: when config is {a: 10} and dest is {a: 10} do we raf once and\n // call cb? No, otherwise accidental parent rerender causes cb trigger\n _this.animationID = _raf2['default'](function (timestamp) {\n // check if we need to animate in the first place\n var propsStyle = _this.props.style;\n if (_shouldStopAnimation2['default'](_this.state.currentStyle, propsStyle, _this.state.currentVelocity)) {\n if (_this.wasAnimating && _this.props.onRest) {\n _this.props.onRest();\n }\n\n // no need to cancel animationID here; shouldn't have any in flight\n _this.animationID = null;\n _this.wasAnimating = false;\n _this.accumulatedTime = 0;\n return;\n }\n\n _this.wasAnimating = true;\n\n var currentTime = timestamp || _performanceNow2['default']();\n var timeDelta = currentTime - _this.prevTime;\n _this.prevTime = currentTime;\n _this.accumulatedTime = _this.accumulatedTime + timeDelta;\n // more than 10 frames? prolly switched browser tab. Restart\n if (_this.accumulatedTime > msPerFrame * 10) {\n _this.accumulatedTime = 0;\n }\n\n if (_this.accumulatedTime === 0) {\n // no need to cancel animationID here; shouldn't have any in flight\n _this.animationID = null;\n _this.startAnimationIfNecessary();\n return;\n }\n\n var currentFrameCompletion = (_this.accumulatedTime - Math.floor(_this.accumulatedTime / msPerFrame) * msPerFrame) / msPerFrame;\n var framesToCatchUp = Math.floor(_this.accumulatedTime / msPerFrame);\n\n var newLastIdealStyle = {};\n var newLastIdealVelocity = {};\n var newCurrentStyle = {};\n var newCurrentVelocity = {};\n\n for (var key in propsStyle) {\n if (!Object.prototype.hasOwnProperty.call(propsStyle, key)) {\n continue;\n }\n\n var styleValue = propsStyle[key];\n if (typeof styleValue === 'number') {\n newCurrentStyle[key] = styleValue;\n newCurrentVelocity[key] = 0;\n newLastIdealStyle[key] = styleValue;\n newLastIdealVelocity[key] = 0;\n } else {\n var newLastIdealStyleValue = _this.state.lastIdealStyle[key];\n var newLastIdealVelocityValue = _this.state.lastIdealVelocity[key];\n for (var i = 0; i < framesToCatchUp; i++) {\n var _stepper = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n newLastIdealStyleValue = _stepper[0];\n newLastIdealVelocityValue = _stepper[1];\n }\n\n var _stepper2 = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n var nextIdealX = _stepper2[0];\n var nextIdealV = _stepper2[1];\n\n newCurrentStyle[key] = newLastIdealStyleValue + (nextIdealX - newLastIdealStyleValue) * currentFrameCompletion;\n newCurrentVelocity[key] = newLastIdealVelocityValue + (nextIdealV - newLastIdealVelocityValue) * currentFrameCompletion;\n newLastIdealStyle[key] = newLastIdealStyleValue;\n newLastIdealVelocity[key] = newLastIdealVelocityValue;\n }\n }\n\n _this.animationID = null;\n // the amount we're looped over above\n _this.accumulatedTime -= framesToCatchUp * msPerFrame;\n\n _this.setState({\n currentStyle: newCurrentStyle,\n currentVelocity: newCurrentVelocity,\n lastIdealStyle: newLastIdealStyle,\n lastIdealVelocity: newLastIdealVelocity\n });\n\n _this.unreadPropStyle = null;\n\n _this.startAnimationIfNecessary();\n });\n };\n\n this.state = this.defaultState();\n }\n\n Motion.prototype.defaultState = function defaultState() {\n var _props = this.props;\n var defaultStyle = _props.defaultStyle;\n var style = _props.style;\n\n var currentStyle = defaultStyle || _stripStyle2['default'](style);\n var currentVelocity = _mapToZero2['default'](currentStyle);\n return {\n currentStyle: currentStyle,\n currentVelocity: currentVelocity,\n lastIdealStyle: currentStyle,\n lastIdealVelocity: currentVelocity\n };\n };\n\n // it's possible that currentStyle's value is stale: if props is immediately\n // changed from 0 to 400 to spring(0) again, the async currentStyle is still\n // at 0 (didn't have time to tick and interpolate even once). If we naively\n // compare currentStyle with destVal it'll be 0 === 0 (no animation, stop).\n // In reality currentStyle should be 400\n\n Motion.prototype.componentDidMount = function componentDidMount() {\n this.prevTime = _performanceNow2['default']();\n this.startAnimationIfNecessary();\n };\n\n Motion.prototype.componentWillReceiveProps = function componentWillReceiveProps(props) {\n if (this.unreadPropStyle != null) {\n // previous props haven't had the chance to be set yet; set them here\n this.clearUnreadPropStyle(this.unreadPropStyle);\n }\n\n this.unreadPropStyle = props.style;\n if (this.animationID == null) {\n this.prevTime = _performanceNow2['default']();\n this.startAnimationIfNecessary();\n }\n };\n\n Motion.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.animationID != null) {\n _raf2['default'].cancel(this.animationID);\n this.animationID = null;\n }\n };\n\n Motion.prototype.render = function render() {\n var renderedChildren = this.props.children(this.state.currentStyle);\n return renderedChildren && _react2['default'].Children.only(renderedChildren);\n };\n\n return Motion;\n})(_react2['default'].Component);\n\nexports['default'] = Motion;\nmodule.exports = exports['default'];\n\n// after checking for unreadPropStyle != null, we manually go set the\n// non-interpolating values (those that are a number, without a spring\n// config)","// Like react-motion's Motion, but reduces all animations to cross-fades\n// for the benefit of users with motion sickness.\nimport React from 'react';\nimport Motion from 'react-motion/lib/Motion';\nimport PropTypes from 'prop-types';\n\nconst stylesToKeep = ['opacity', 'backgroundOpacity'];\n\nconst extractValue = (value) => {\n // This is either an object with a \"val\" property or it's a number\n return (typeof value === 'object' && value && 'val' in value) ? value.val : value;\n};\n\nclass ReducedMotion extends React.Component {\n\n static propTypes = {\n defaultStyle: PropTypes.object,\n style: PropTypes.object,\n children: PropTypes.func,\n }\n\n render() {\n\n const { style, defaultStyle, children } = this.props;\n\n Object.keys(style).forEach(key => {\n if (stylesToKeep.includes(key)) {\n return;\n }\n // If it's setting an x or height or scale or some other value, we need\n // to preserve the end-state value without actually animating it\n style[key] = defaultStyle[key] = extractValue(style[key]);\n });\n\n return (\n <Motion style={style} defaultStyle={defaultStyle}>\n {children}\n </Motion>\n );\n }\n\n}\n\nexport default ReducedMotion;\n","import { reduceMotion } from 'flavours/glitch/util/initial_state';\nimport ReducedMotion from './reduced_motion';\nimport Motion from 'react-motion/lib/Motion';\n\nexport default reduceMotion ? ReducedMotion : Motion;\n","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport { fromJS } from 'immutable';\nimport { throttle } from 'lodash';\nimport classNames from 'classnames';\nimport { isFullscreen, requestFullscreen, exitFullscreen } from 'flavours/glitch/util/fullscreen';\nimport { displayMedia } from 'flavours/glitch/util/initial_state';\n\nconst messages = defineMessages({\n play: { id: 'video.play', defaultMessage: 'Play' },\n pause: { id: 'video.pause', defaultMessage: 'Pause' },\n mute: { id: 'video.mute', defaultMessage: 'Mute sound' },\n unmute: { id: 'video.unmute', defaultMessage: 'Unmute sound' },\n hide: { id: 'video.hide', defaultMessage: 'Hide video' },\n expand: { id: 'video.expand', defaultMessage: 'Expand video' },\n close: { id: 'video.close', defaultMessage: 'Close video' },\n fullscreen: { id: 'video.fullscreen', defaultMessage: 'Full screen' },\n exit_fullscreen: { id: 'video.exit_fullscreen', defaultMessage: 'Exit full screen' },\n});\n\nconst formatTime = secondsNum => {\n let hours = Math.floor(secondsNum / 3600);\n let minutes = Math.floor((secondsNum - (hours * 3600)) / 60);\n let seconds = secondsNum - (hours * 3600) - (minutes * 60);\n\n if (hours < 10) hours = '0' + hours;\n if (minutes < 10) minutes = '0' + minutes;\n if (seconds < 10) seconds = '0' + seconds;\n return (hours === '00' ? '' : `${hours}:`) + `${minutes}:${seconds}`;\n};\n\nexport const findElementPosition = el => {\n let box;\n\n if (el.getBoundingClientRect && el.parentNode) {\n box = el.getBoundingClientRect();\n }\n\n if (!box) {\n return {\n left: 0,\n top: 0,\n };\n }\n\n const docEl = document.documentElement;\n const body = document.body;\n\n const clientLeft = docEl.clientLeft || body.clientLeft || 0;\n const scrollLeft = window.pageXOffset || body.scrollLeft;\n const left = (box.left + scrollLeft) - clientLeft;\n\n const clientTop = docEl.clientTop || body.clientTop || 0;\n const scrollTop = window.pageYOffset || body.scrollTop;\n const top = (box.top + scrollTop) - clientTop;\n\n return {\n left: Math.round(left),\n top: Math.round(top),\n };\n};\n\nexport const getPointerPosition = (el, event) => {\n const position = {};\n const box = findElementPosition(el);\n const boxW = el.offsetWidth;\n const boxH = el.offsetHeight;\n const boxY = box.top;\n const boxX = box.left;\n\n let pageY = event.pageY;\n let pageX = event.pageX;\n\n if (event.changedTouches) {\n pageX = event.changedTouches[0].pageX;\n pageY = event.changedTouches[0].pageY;\n }\n\n position.y = Math.max(0, Math.min(1, (pageY - boxY) / boxH));\n position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));\n\n return position;\n};\n\n@injectIntl\nexport default class Video extends React.PureComponent {\n\n static propTypes = {\n preview: PropTypes.string,\n src: PropTypes.string.isRequired,\n alt: PropTypes.string,\n width: PropTypes.number,\n height: PropTypes.number,\n sensitive: PropTypes.bool,\n revealed: PropTypes.bool,\n startTime: PropTypes.number,\n onOpenVideo: PropTypes.func,\n onCloseVideo: PropTypes.func,\n letterbox: PropTypes.bool,\n fullwidth: PropTypes.bool,\n detailed: PropTypes.bool,\n inline: PropTypes.bool,\n preventPlayback: PropTypes.bool,\n intl: PropTypes.object.isRequired,\n cacheWidth: PropTypes.func,\n };\n\n state = {\n currentTime: 0,\n duration: 0,\n volume: 0.5,\n paused: true,\n dragging: false,\n containerWidth: this.props.width,\n fullscreen: false,\n hovered: false,\n muted: false,\n revealed: this.props.revealed === undefined ? (displayMedia !== 'hide_all' && !this.props.sensitive || displayMedia === 'show_all') : this.props.revealed,\n };\n\n // hard coded in components.scss\n // any way to get ::before values programatically?\n volWidth = 50;\n volOffset = 70;\n volHandleOffset = v => {\n const offset = v * this.volWidth + this.volOffset;\n return (offset > 110) ? 110 : offset;\n }\n\n setPlayerRef = c => {\n this.player = c;\n\n if (c && c.offsetWidth && c.offsetWidth != this.state.containerWidth) {\n if (this.props.cacheWidth) this.props.cacheWidth(this.player.offsetWidth);\n this.setState({\n containerWidth: c.offsetWidth,\n });\n }\n }\n\n setVideoRef = c => {\n this.video = c;\n if (this.video) {\n this.setState({ volume: this.video.volume, muted: this.video.muted });\n }\n }\n\n setSeekRef = c => {\n this.seek = c;\n }\n\n setVolumeRef = c => {\n this.volume = c;\n }\n\n handleMouseDownRoot = e => {\n e.preventDefault();\n e.stopPropagation();\n }\n\n handlePlay = () => {\n this.setState({ paused: false });\n }\n\n handlePause = () => {\n this.setState({ paused: true });\n }\n\n handleTimeUpdate = () => {\n this.setState({\n currentTime: Math.floor(this.video.currentTime),\n duration: Math.floor(this.video.duration),\n });\n }\n\n handleVolumeMouseDown = e => {\n\n document.addEventListener('mousemove', this.handleMouseVolSlide, true);\n document.addEventListener('mouseup', this.handleVolumeMouseUp, true);\n document.addEventListener('touchmove', this.handleMouseVolSlide, true);\n document.addEventListener('touchend', this.handleVolumeMouseUp, true);\n\n this.handleMouseVolSlide(e);\n\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleVolumeMouseUp = () => {\n document.removeEventListener('mousemove', this.handleMouseVolSlide, true);\n document.removeEventListener('mouseup', this.handleVolumeMouseUp, true);\n document.removeEventListener('touchmove', this.handleMouseVolSlide, true);\n document.removeEventListener('touchend', this.handleVolumeMouseUp, true);\n }\n\n handleMouseVolSlide = throttle(e => {\n\n const rect = this.volume.getBoundingClientRect();\n const x = (e.clientX - rect.left) / this.volWidth; //x position within the element.\n\n if(!isNaN(x)) {\n var slideamt = x;\n if(x > 1) {\n slideamt = 1;\n } else if(x < 0) {\n slideamt = 0;\n }\n this.video.volume = slideamt;\n this.setState({ volume: slideamt });\n }\n }, 60);\n\n handleMouseDown = e => {\n document.addEventListener('mousemove', this.handleMouseMove, true);\n document.addEventListener('mouseup', this.handleMouseUp, true);\n document.addEventListener('touchmove', this.handleMouseMove, true);\n document.addEventListener('touchend', this.handleMouseUp, true);\n\n this.setState({ dragging: true });\n this.video.pause();\n this.handleMouseMove(e);\n\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleMouseUp = () => {\n document.removeEventListener('mousemove', this.handleMouseMove, true);\n document.removeEventListener('mouseup', this.handleMouseUp, true);\n document.removeEventListener('touchmove', this.handleMouseMove, true);\n document.removeEventListener('touchend', this.handleMouseUp, true);\n\n this.setState({ dragging: false });\n this.video.play();\n }\n\n handleMouseMove = throttle(e => {\n const { x } = getPointerPosition(this.seek, e);\n const currentTime = Math.floor(this.video.duration * x);\n\n if (!isNaN(currentTime)) {\n this.video.currentTime = currentTime;\n this.setState({ currentTime });\n }\n }, 60);\n\n togglePlay = () => {\n if (this.state.paused) {\n this.video.play();\n } else {\n this.video.pause();\n }\n }\n\n toggleFullscreen = () => {\n if (isFullscreen()) {\n exitFullscreen();\n } else {\n requestFullscreen(this.player);\n }\n }\n\n componentDidMount () {\n document.addEventListener('fullscreenchange', this.handleFullscreenChange, true);\n document.addEventListener('webkitfullscreenchange', this.handleFullscreenChange, true);\n document.addEventListener('mozfullscreenchange', this.handleFullscreenChange, true);\n document.addEventListener('MSFullscreenChange', this.handleFullscreenChange, true);\n }\n\n componentWillUnmount () {\n document.removeEventListener('fullscreenchange', this.handleFullscreenChange, true);\n document.removeEventListener('webkitfullscreenchange', this.handleFullscreenChange, true);\n document.removeEventListener('mozfullscreenchange', this.handleFullscreenChange, true);\n document.removeEventListener('MSFullscreenChange', this.handleFullscreenChange, true);\n }\n\n componentDidUpdate (prevProps) {\n if (this.player && this.player.offsetWidth && this.player.offsetWidth != this.state.containerWidth && !this.state.fullscreen) {\n if (this.props.cacheWidth) this.props.cacheWidth(this.player.offsetWidth);\n this.setState({\n containerWidth: this.player.offsetWidth,\n });\n }\n if (this.video && this.state.revealed && this.props.preventPlayback && !prevProps.preventPlayback) {\n this.video.pause();\n }\n }\n\n handleFullscreenChange = () => {\n this.setState({ fullscreen: isFullscreen() });\n }\n\n handleMouseEnter = () => {\n this.setState({ hovered: true });\n }\n\n handleMouseLeave = () => {\n this.setState({ hovered: false });\n }\n\n toggleMute = () => {\n this.video.muted = !this.video.muted;\n this.setState({ muted: this.video.muted });\n }\n\n toggleReveal = () => {\n if (this.state.revealed) {\n this.video.pause();\n }\n\n this.setState({ revealed: !this.state.revealed });\n }\n\n handleLoadedData = () => {\n if (this.props.startTime) {\n this.video.currentTime = this.props.startTime;\n this.video.play();\n }\n }\n\n handleProgress = () => {\n if (this.video.buffered.length > 0) {\n this.setState({ buffer: this.video.buffered.end(0) / this.video.duration * 100 });\n }\n }\n\n handleVolumeChange = () => {\n this.setState({ volume: this.video.volume, muted: this.video.muted });\n }\n\n handleOpenVideo = () => {\n const { src, preview, width, height, alt } = this.props;\n const media = fromJS({\n type: 'video',\n url: src,\n preview_url: preview,\n description: alt,\n width,\n height,\n });\n\n this.video.pause();\n this.props.onOpenVideo(media, this.video.currentTime);\n }\n\n handleCloseVideo = () => {\n this.video.pause();\n this.props.onCloseVideo();\n }\n\n render () {\n const { preview, src, inline, startTime, onOpenVideo, onCloseVideo, intl, alt, letterbox, fullwidth, detailed, sensitive } = this.props;\n const { containerWidth, currentTime, duration, volume, buffer, dragging, paused, fullscreen, hovered, muted, revealed } = this.state;\n const progress = (currentTime / duration) * 100;\n const playerStyle = {};\n\n const volumeWidth = (muted) ? 0 : volume * this.volWidth;\n const volumeHandleLoc = (muted) ? this.volHandleOffset(0) : this.volHandleOffset(volume);\n\n const computedClass = classNames('video-player', { inactive: !revealed, detailed, inline: inline && !fullscreen, fullscreen, letterbox, 'full-width': fullwidth });\n\n let { width, height } = this.props;\n\n if (inline && containerWidth) {\n width = containerWidth;\n height = containerWidth / (16/9);\n\n playerStyle.height = height;\n } else if (inline) {\n return (<div className={computedClass} ref={this.setPlayerRef} tabindex={0}></div>);\n }\n\n let warning;\n if (sensitive) {\n warning = <FormattedMessage id='status.sensitive_warning' defaultMessage='Sensitive content' />;\n } else {\n warning = <FormattedMessage id='status.media_hidden' defaultMessage='Media hidden' />;\n }\n\n let preload;\n if (startTime || fullscreen || dragging) {\n preload = 'auto';\n } else if (detailed) {\n preload = 'metadata';\n } else {\n preload = 'none';\n }\n\n return (\n <div\n className={computedClass}\n style={playerStyle}\n ref={this.setPlayerRef}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n onMouseDown={this.handleMouseDownRoot}\n tabIndex={0}\n >\n <video\n ref={this.setVideoRef}\n src={src}\n poster={preview}\n preload={preload}\n loop\n role='button'\n tabIndex='0'\n aria-label={alt}\n title={alt}\n width={width}\n height={height}\n volume={volume}\n onClick={this.togglePlay}\n onPlay={this.handlePlay}\n onPause={this.handlePause}\n onTimeUpdate={this.handleTimeUpdate}\n onLoadedData={this.handleLoadedData}\n onProgress={this.handleProgress}\n onVolumeChange={this.handleVolumeChange}\n />\n\n <button type='button' className={classNames('video-player__spoiler', { active: !revealed })} onClick={this.toggleReveal}>\n <span className='video-player__spoiler__title'>{warning}</span>\n <span className='video-player__spoiler__subtitle'><FormattedMessage id='status.sensitive_toggle' defaultMessage='Click to view' /></span>\n </button>\n\n <div className={classNames('video-player__controls', { active: paused || hovered })}>\n <div className='video-player__seek' onMouseDown={this.handleMouseDown} ref={this.setSeekRef}>\n <div className='video-player__seek__buffer' style={{ width: `${buffer}%` }} />\n <div className='video-player__seek__progress' style={{ width: `${progress}%` }} />\n\n <span\n className={classNames('video-player__seek__handle', { active: dragging })}\n tabIndex='0'\n style={{ left: `${progress}%` }}\n />\n </div>\n\n <div className='video-player__buttons-bar'>\n <div className='video-player__buttons left'>\n <button type='button' aria-label={intl.formatMessage(paused ? messages.play : messages.pause)} onClick={this.togglePlay}><i className={classNames('fa fa-fw', { 'fa-play': paused, 'fa-pause': !paused })} /></button>\n <button type='button' aria-label={intl.formatMessage(muted ? messages.unmute : messages.mute)} onClick={this.toggleMute}><i className={classNames('fa fa-fw', { 'fa-volume-off': muted, 'fa-volume-up': !muted })} /></button>\n <div className='video-player__volume' onMouseDown={this.handleVolumeMouseDown} ref={this.setVolumeRef}>\n <div className='video-player__volume__current' style={{ width: `${volumeWidth}px` }} />\n <span\n className={classNames('video-player__volume__handle')}\n tabIndex='0'\n style={{ left: `${volumeHandleLoc}px` }}\n />\n </div>\n\n {(detailed || fullscreen) &&\n <span>\n <span className='video-player__time-current'>{formatTime(currentTime)}</span>\n <span className='video-player__time-sep'>/</span>\n <span className='video-player__time-total'>{formatTime(duration)}</span>\n </span>\n }\n </div>\n\n <div className='video-player__buttons right'>\n {!onCloseVideo && <button type='button' aria-label={intl.formatMessage(messages.hide)} onClick={this.toggleReveal}><i className='fa fa-fw fa-eye' /></button>}\n {(!fullscreen && onOpenVideo) && <button type='button' aria-label={intl.formatMessage(messages.expand)} onClick={this.handleOpenVideo}><i className='fa fa-fw fa-expand' /></button>}\n {onCloseVideo && <button type='button' aria-label={intl.formatMessage(messages.close)} onClick={this.handleCloseVideo}><i className='fa fa-fw fa-compress' /></button>}\n <button type='button' aria-label={intl.formatMessage(fullscreen ? messages.exit_fullscreen : messages.fullscreen)} onClick={this.toggleFullscreen}><i className={classNames('fa fa-fw', { 'fa-arrows-alt': !fullscreen, 'fa-compress': fullscreen })} /></button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport { fromJS } from 'immutable';\nimport { throttle } from 'lodash';\nimport classNames from 'classnames';\nimport { isFullscreen, requestFullscreen, exitFullscreen } from '../ui/util/fullscreen';\nimport { displayMedia } from '../../initial_state';\nimport Icon from 'mastodon/components/icon';\n\nconst messages = defineMessages({\n play: { id: 'video.play', defaultMessage: 'Play' },\n pause: { id: 'video.pause', defaultMessage: 'Pause' },\n mute: { id: 'video.mute', defaultMessage: 'Mute sound' },\n unmute: { id: 'video.unmute', defaultMessage: 'Unmute sound' },\n hide: { id: 'video.hide', defaultMessage: 'Hide video' },\n expand: { id: 'video.expand', defaultMessage: 'Expand video' },\n close: { id: 'video.close', defaultMessage: 'Close video' },\n fullscreen: { id: 'video.fullscreen', defaultMessage: 'Full screen' },\n exit_fullscreen: { id: 'video.exit_fullscreen', defaultMessage: 'Exit full screen' },\n});\n\nconst formatTime = secondsNum => {\n let hours = Math.floor(secondsNum / 3600);\n let minutes = Math.floor((secondsNum - (hours * 3600)) / 60);\n let seconds = secondsNum - (hours * 3600) - (minutes * 60);\n\n if (hours < 10) hours = '0' + hours;\n if (minutes < 10) minutes = '0' + minutes;\n if (seconds < 10) seconds = '0' + seconds;\n\n return (hours === '00' ? '' : `${hours}:`) + `${minutes}:${seconds}`;\n};\n\nexport const findElementPosition = el => {\n let box;\n\n if (el.getBoundingClientRect && el.parentNode) {\n box = el.getBoundingClientRect();\n }\n\n if (!box) {\n return {\n left: 0,\n top: 0,\n };\n }\n\n const docEl = document.documentElement;\n const body = document.body;\n\n const clientLeft = docEl.clientLeft || body.clientLeft || 0;\n const scrollLeft = window.pageXOffset || body.scrollLeft;\n const left = (box.left + scrollLeft) - clientLeft;\n\n const clientTop = docEl.clientTop || body.clientTop || 0;\n const scrollTop = window.pageYOffset || body.scrollTop;\n const top = (box.top + scrollTop) - clientTop;\n\n return {\n left: Math.round(left),\n top: Math.round(top),\n };\n};\n\nexport const getPointerPosition = (el, event) => {\n const position = {};\n const box = findElementPosition(el);\n const boxW = el.offsetWidth;\n const boxH = el.offsetHeight;\n const boxY = box.top;\n const boxX = box.left;\n\n let pageY = event.pageY;\n let pageX = event.pageX;\n\n if (event.changedTouches) {\n pageX = event.changedTouches[0].pageX;\n pageY = event.changedTouches[0].pageY;\n }\n\n position.y = Math.max(0, Math.min(1, (pageY - boxY) / boxH));\n position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));\n\n return position;\n};\n\nexport default @injectIntl\nclass Video extends React.PureComponent {\n\n static propTypes = {\n preview: PropTypes.string,\n src: PropTypes.string.isRequired,\n alt: PropTypes.string,\n width: PropTypes.number,\n height: PropTypes.number,\n sensitive: PropTypes.bool,\n startTime: PropTypes.number,\n onOpenVideo: PropTypes.func,\n onCloseVideo: PropTypes.func,\n detailed: PropTypes.bool,\n inline: PropTypes.bool,\n cacheWidth: PropTypes.func,\n intl: PropTypes.object.isRequired,\n };\n\n state = {\n currentTime: 0,\n duration: 0,\n volume: 0.5,\n paused: true,\n dragging: false,\n containerWidth: this.props.width,\n fullscreen: false,\n hovered: false,\n muted: false,\n revealed: displayMedia !== 'hide_all' && !this.props.sensitive || displayMedia === 'show_all',\n };\n\n // hard coded in components.scss\n // any way to get ::before values programatically?\n volWidth = 50;\n volOffset = 70;\n volHandleOffset = v => {\n const offset = v * this.volWidth + this.volOffset;\n return (offset > 110) ? 110 : offset;\n }\n\n setPlayerRef = c => {\n this.player = c;\n\n if (c) {\n if (this.props.cacheWidth) this.props.cacheWidth(this.player.offsetWidth);\n this.setState({\n containerWidth: c.offsetWidth,\n });\n }\n }\n\n setVideoRef = c => {\n this.video = c;\n if (this.video) {\n this.setState({ volume: this.video.volume, muted: this.video.muted });\n }\n }\n\n setSeekRef = c => {\n this.seek = c;\n }\n\n setVolumeRef = c => {\n this.volume = c;\n }\n\n handleClickRoot = e => e.stopPropagation();\n\n handlePlay = () => {\n this.setState({ paused: false });\n }\n\n handlePause = () => {\n this.setState({ paused: true });\n }\n\n handleTimeUpdate = () => {\n this.setState({\n currentTime: Math.floor(this.video.currentTime),\n duration: Math.floor(this.video.duration),\n });\n }\n\n handleVolumeMouseDown = e => {\n\n document.addEventListener('mousemove', this.handleMouseVolSlide, true);\n document.addEventListener('mouseup', this.handleVolumeMouseUp, true);\n document.addEventListener('touchmove', this.handleMouseVolSlide, true);\n document.addEventListener('touchend', this.handleVolumeMouseUp, true);\n\n this.handleMouseVolSlide(e);\n\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleVolumeMouseUp = () => {\n document.removeEventListener('mousemove', this.handleMouseVolSlide, true);\n document.removeEventListener('mouseup', this.handleVolumeMouseUp, true);\n document.removeEventListener('touchmove', this.handleMouseVolSlide, true);\n document.removeEventListener('touchend', this.handleVolumeMouseUp, true);\n }\n\n handleMouseVolSlide = throttle(e => {\n\n const rect = this.volume.getBoundingClientRect();\n const x = (e.clientX - rect.left) / this.volWidth; //x position within the element.\n\n if(!isNaN(x)) {\n var slideamt = x;\n if(x > 1) {\n slideamt = 1;\n } else if(x < 0) {\n slideamt = 0;\n }\n this.video.volume = slideamt;\n this.setState({ volume: slideamt });\n }\n }, 60);\n\n handleMouseDown = e => {\n document.addEventListener('mousemove', this.handleMouseMove, true);\n document.addEventListener('mouseup', this.handleMouseUp, true);\n document.addEventListener('touchmove', this.handleMouseMove, true);\n document.addEventListener('touchend', this.handleMouseUp, true);\n\n this.setState({ dragging: true });\n this.video.pause();\n this.handleMouseMove(e);\n\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleMouseUp = () => {\n document.removeEventListener('mousemove', this.handleMouseMove, true);\n document.removeEventListener('mouseup', this.handleMouseUp, true);\n document.removeEventListener('touchmove', this.handleMouseMove, true);\n document.removeEventListener('touchend', this.handleMouseUp, true);\n\n this.setState({ dragging: false });\n this.video.play();\n }\n\n handleMouseMove = throttle(e => {\n const { x } = getPointerPosition(this.seek, e);\n const currentTime = Math.floor(this.video.duration * x);\n\n if (!isNaN(currentTime)) {\n this.video.currentTime = currentTime;\n this.setState({ currentTime });\n }\n }, 60);\n\n togglePlay = () => {\n if (this.state.paused) {\n this.video.play();\n } else {\n this.video.pause();\n }\n }\n\n toggleFullscreen = () => {\n if (isFullscreen()) {\n exitFullscreen();\n } else {\n requestFullscreen(this.player);\n }\n }\n\n componentDidMount () {\n document.addEventListener('fullscreenchange', this.handleFullscreenChange, true);\n document.addEventListener('webkitfullscreenchange', this.handleFullscreenChange, true);\n document.addEventListener('mozfullscreenchange', this.handleFullscreenChange, true);\n document.addEventListener('MSFullscreenChange', this.handleFullscreenChange, true);\n }\n\n componentWillUnmount () {\n document.removeEventListener('fullscreenchange', this.handleFullscreenChange, true);\n document.removeEventListener('webkitfullscreenchange', this.handleFullscreenChange, true);\n document.removeEventListener('mozfullscreenchange', this.handleFullscreenChange, true);\n document.removeEventListener('MSFullscreenChange', this.handleFullscreenChange, true);\n }\n\n handleFullscreenChange = () => {\n this.setState({ fullscreen: isFullscreen() });\n }\n\n handleMouseEnter = () => {\n this.setState({ hovered: true });\n }\n\n handleMouseLeave = () => {\n this.setState({ hovered: false });\n }\n\n toggleMute = () => {\n this.video.muted = !this.video.muted;\n this.setState({ muted: this.video.muted });\n }\n\n toggleReveal = () => {\n if (this.state.revealed) {\n this.video.pause();\n }\n\n this.setState({ revealed: !this.state.revealed });\n }\n\n handleLoadedData = () => {\n if (this.props.startTime) {\n this.video.currentTime = this.props.startTime;\n this.video.play();\n }\n }\n\n handleProgress = () => {\n if (this.video.buffered.length > 0) {\n this.setState({ buffer: this.video.buffered.end(0) / this.video.duration * 100 });\n }\n }\n\n handleVolumeChange = () => {\n this.setState({ volume: this.video.volume, muted: this.video.muted });\n }\n\n handleOpenVideo = () => {\n const { src, preview, width, height, alt } = this.props;\n const media = fromJS({\n type: 'video',\n url: src,\n preview_url: preview,\n description: alt,\n width,\n height,\n });\n\n this.video.pause();\n this.props.onOpenVideo(media, this.video.currentTime);\n }\n\n handleCloseVideo = () => {\n this.video.pause();\n this.props.onCloseVideo();\n }\n\n render () {\n const { preview, src, inline, startTime, onOpenVideo, onCloseVideo, intl, alt, detailed, sensitive } = this.props;\n const { containerWidth, currentTime, duration, volume, buffer, dragging, paused, fullscreen, hovered, muted, revealed } = this.state;\n const progress = (currentTime / duration) * 100;\n\n const volumeWidth = (muted) ? 0 : volume * this.volWidth;\n const volumeHandleLoc = (muted) ? this.volHandleOffset(0) : this.volHandleOffset(volume);\n const playerStyle = {};\n\n let { width, height } = this.props;\n\n if (inline && containerWidth) {\n width = containerWidth;\n height = containerWidth / (16/9);\n\n playerStyle.height = height;\n }\n\n let preload;\n if (startTime || fullscreen || dragging) {\n preload = 'auto';\n } else if (detailed) {\n preload = 'metadata';\n } else {\n preload = 'none';\n }\n\n let warning;\n if (sensitive) {\n warning = <FormattedMessage id='status.sensitive_warning' defaultMessage='Sensitive content' />;\n } else {\n warning = <FormattedMessage id='status.media_hidden' defaultMessage='Media hidden' />;\n }\n\n return (\n <div\n role='menuitem'\n className={classNames('video-player', { inactive: !revealed, detailed, inline: inline && !fullscreen, fullscreen })}\n style={playerStyle}\n ref={this.setPlayerRef}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n onClick={this.handleClickRoot}\n tabIndex={0}\n >\n <video\n ref={this.setVideoRef}\n src={src}\n poster={preview}\n preload={preload}\n loop\n role='button'\n tabIndex='0'\n aria-label={alt}\n title={alt}\n width={width}\n height={height}\n volume={volume}\n onClick={this.togglePlay}\n onPlay={this.handlePlay}\n onPause={this.handlePause}\n onTimeUpdate={this.handleTimeUpdate}\n onLoadedData={this.handleLoadedData}\n onProgress={this.handleProgress}\n onVolumeChange={this.handleVolumeChange}\n />\n\n <button type='button' className={classNames('video-player__spoiler', { active: !revealed })} onClick={this.toggleReveal}>\n <span className='video-player__spoiler__title'>{warning}</span>\n <span className='video-player__spoiler__subtitle'><FormattedMessage id='status.sensitive_toggle' defaultMessage='Click to view' /></span>\n </button>\n\n <div className={classNames('video-player__controls', { active: paused || hovered })}>\n <div className='video-player__seek' onMouseDown={this.handleMouseDown} ref={this.setSeekRef}>\n <div className='video-player__seek__buffer' style={{ width: `${buffer}%` }} />\n <div className='video-player__seek__progress' style={{ width: `${progress}%` }} />\n\n <span\n className={classNames('video-player__seek__handle', { active: dragging })}\n tabIndex='0'\n style={{ left: `${progress}%` }}\n />\n </div>\n\n <div className='video-player__buttons-bar'>\n <div className='video-player__buttons left'>\n <button type='button' aria-label={intl.formatMessage(paused ? messages.play : messages.pause)} onClick={this.togglePlay}><Icon id={paused ? 'play' : 'pause'} fixedWidth /></button>\n <button type='button' aria-label={intl.formatMessage(muted ? messages.unmute : messages.mute)} onClick={this.toggleMute}><Icon id={muted ? 'volume-off' : 'volume-up'} fixedWidth /></button>\n <div className='video-player__volume' onMouseDown={this.handleVolumeMouseDown} ref={this.setVolumeRef}>\n <div className='video-player__volume__current' style={{ width: `${volumeWidth}px` }} />\n <span\n className={classNames('video-player__volume__handle')}\n tabIndex='0'\n style={{ left: `${volumeHandleLoc}px` }}\n />\n </div>\n\n {(detailed || fullscreen) &&\n <span>\n <span className='video-player__time-current'>{formatTime(currentTime)}</span>\n <span className='video-player__time-sep'>/</span>\n <span className='video-player__time-total'>{formatTime(duration)}</span>\n </span>\n }\n </div>\n\n <div className='video-player__buttons right'>\n {!onCloseVideo && <button type='button' aria-label={intl.formatMessage(messages.hide)} onClick={this.toggleReveal}><Icon id='eye' fixedWidth /></button>}\n {(!fullscreen && onOpenVideo) && <button type='button' aria-label={intl.formatMessage(messages.expand)} onClick={this.handleOpenVideo}><Icon id='expand' fixedWidth /></button>}\n {onCloseVideo && <button type='button' aria-label={intl.formatMessage(messages.close)} onClick={this.handleCloseVideo}><Icon id='compress' fixedWidth /></button>}\n <button type='button' aria-label={intl.formatMessage(fullscreen ? messages.exit_fullscreen : messages.fullscreen)} onClick={this.toggleFullscreen}><Icon id={fullscreen ? 'compress' : 'arrows-alt'} fixedWidth /></button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n}\n","// Like react-motion's Motion, but reduces all animations to cross-fades\n// for the benefit of users with motion sickness.\nimport React from 'react';\nimport Motion from 'react-motion/lib/Motion';\nimport PropTypes from 'prop-types';\n\nconst stylesToKeep = ['opacity', 'backgroundOpacity'];\n\nconst extractValue = (value) => {\n // This is either an object with a \"val\" property or it's a number\n return (typeof value === 'object' && value && 'val' in value) ? value.val : value;\n};\n\nclass ReducedMotion extends React.Component {\n\n static propTypes = {\n defaultStyle: PropTypes.object,\n style: PropTypes.object,\n children: PropTypes.func,\n }\n\n render() {\n\n const { style, defaultStyle, children } = this.props;\n\n Object.keys(style).forEach(key => {\n if (stylesToKeep.includes(key)) {\n return;\n }\n // If it's setting an x or height or scale or some other value, we need\n // to preserve the end-state value without actually animating it\n style[key] = defaultStyle[key] = extractValue(style[key]);\n });\n\n return (\n <Motion style={style} defaultStyle={defaultStyle}>\n {children}\n </Motion>\n );\n }\n\n}\n\nexport default ReducedMotion;\n","import { reduceMotion } from '../../../initial_state';\nimport ReducedMotion from './reduced_motion';\nimport Motion from 'react-motion/lib/Motion';\n\nexport default reduceMotion ? ReducedMotion : Motion;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _SwipeableViews = _interopRequireDefault(require(\"./SwipeableViews\"));\n\nvar _default = _SwipeableViews.default;\nexports.default = _default;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","'use strict';\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar ReactIs = require('react-is');\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\n\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\n\nvar TYPE_STATICS = {};\nTYPE_STATICS[ReactIs.ForwardRef] = FORWARD_REF_STATICS;\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = TYPE_STATICS[targetComponent['$$typeof']] || REACT_STATICS;\n var sourceStatics = TYPE_STATICS[sourceComponent['$$typeof']] || REACT_STATICS;\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/* global window */\nimport ponyfill from './ponyfill.js';\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _inDOM = _interopRequireDefault(require(\"../util/inDOM\"));\n\nvar on = function on() {};\n\nif (_inDOM.default) {\n on = function () {\n if (document.addEventListener) return function (node, eventName, handler, capture) {\n return node.addEventListener(eventName, handler, capture || false);\n };else if (document.attachEvent) return function (node, eventName, handler) {\n return node.attachEvent('on' + eventName, function (e) {\n e = e || window.event;\n e.target = e.target || e.srcElement;\n e.currentTarget = node;\n handler.call(node, e);\n });\n };\n }();\n}\n\nvar _default = on;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _inDOM = _interopRequireDefault(require(\"../util/inDOM\"));\n\nvar off = function off() {};\n\nif (_inDOM.default) {\n off = function () {\n if (document.addEventListener) return function (node, eventName, handler, capture) {\n return node.removeEventListener(eventName, handler, capture || false);\n };else if (document.attachEvent) return function (node, eventName, handler) {\n return node.detachEvent('on' + eventName, handler);\n };\n }();\n}\n\nvar _default = off;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","// APIs for normalizing fullscreen operations. Note that Edge uses\n// the WebKit-prefixed APIs currently (as of Edge 16).\n\nexport const isFullscreen = () => document.fullscreenElement ||\n document.webkitFullscreenElement ||\n document.mozFullScreenElement;\n\nexport const exitFullscreen = () => {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n }\n};\n\nexport const requestFullscreen = el => {\n if (el.requestFullscreen) {\n el.requestFullscreen();\n } else if (el.webkitRequestFullscreen) {\n el.webkitRequestFullscreen();\n } else if (el.mozRequestFullScreen) {\n el.mozRequestFullScreen();\n }\n};\n\nexport const attachFullscreenListener = (listener) => {\n if ('onfullscreenchange' in document) {\n document.addEventListener('fullscreenchange', listener);\n } else if ('onwebkitfullscreenchange' in document) {\n document.addEventListener('webkitfullscreenchange', listener);\n } else if ('onmozfullscreenchange' in document) {\n document.addEventListener('mozfullscreenchange', listener);\n }\n};\n\nexport const detachFullscreenListener = (listener) => {\n if ('onfullscreenchange' in document) {\n document.removeEventListener('fullscreenchange', listener);\n } else if ('onwebkitfullscreenchange' in document) {\n document.removeEventListener('webkitfullscreenchange', listener);\n } else if ('onmozfullscreenchange' in document) {\n document.removeEventListener('mozfullscreenchange', listener);\n }\n};\n","// APIs for normalizing fullscreen operations. Note that Edge uses\n// the WebKit-prefixed APIs currently (as of Edge 16).\n\nexport const isFullscreen = () => document.fullscreenElement ||\n document.webkitFullscreenElement ||\n document.mozFullScreenElement;\n\nexport const exitFullscreen = () => {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n }\n};\n\nexport const requestFullscreen = el => {\n if (el.requestFullscreen) {\n el.requestFullscreen();\n } else if (el.webkitRequestFullscreen) {\n el.webkitRequestFullscreen();\n } else if (el.mozRequestFullScreen) {\n el.mozRequestFullScreen();\n }\n};\n\nexport const attachFullscreenListener = (listener) => {\n if ('onfullscreenchange' in document) {\n document.addEventListener('fullscreenchange', listener);\n } else if ('onwebkitfullscreenchange' in document) {\n document.addEventListener('webkitfullscreenchange', listener);\n } else if ('onmozfullscreenchange' in document) {\n document.addEventListener('mozfullscreenchange', listener);\n }\n};\n\nexport const detachFullscreenListener = (listener) => {\n if ('onfullscreenchange' in document) {\n document.removeEventListener('fullscreenchange', listener);\n } else if ('onwebkitfullscreenchange' in document) {\n document.removeEventListener('webkitfullscreenchange', listener);\n } else if ('onmozfullscreenchange' in document) {\n document.removeEventListener('mozfullscreenchange', listener);\n }\n};\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","import detectPassiveEvents from 'detect-passive-events';\n\nconst LAYOUT_BREAKPOINT = 630;\n\nexport function isMobile(width, columns) {\n switch (columns) {\n case 'multiple':\n return false;\n case 'single':\n return true;\n default:\n return width <= LAYOUT_BREAKPOINT;\n }\n};\n\nconst iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n\nlet userTouching = false;\nlet listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false;\n\nfunction touchListener() {\n userTouching = true;\n window.removeEventListener('touchstart', touchListener, listenerOptions);\n}\n\nwindow.addEventListener('touchstart', touchListener, listenerOptions);\n\nexport function isUserTouching() {\n return userTouching;\n}\n\nexport function isIOS() {\n return iOS;\n};\n","import detectPassiveEvents from 'detect-passive-events';\n\nconst LAYOUT_BREAKPOINT = 630;\n\nexport function isMobile(width) {\n return width <= LAYOUT_BREAKPOINT;\n};\n\nconst iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n\nlet userTouching = false;\nlet listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false;\n\nfunction touchListener() {\n userTouching = true;\n window.removeEventListener('touchstart', touchListener, listenerOptions);\n}\n\nwindow.addEventListener('touchstart', touchListener, listenerOptions);\n\nexport function isUserTouching() {\n return userTouching;\n}\n\nexport function isIOS() {\n return iOS;\n};\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.LoadingBar = exports.TERMINATING_ANIMATION_DURATION = exports.ANIMATION_DURATION = exports.PROGRESS_INCREASE = exports.MAX_PROGRESS = exports.UPDATE_TIME = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactLifecyclesCompat = require('react-lifecycles-compat');\n\nvar _propTypes = require('prop-types');\n\nvar _reactRedux = require('react-redux');\n\nvar _loading_bar_ducks = require('./loading_bar_ducks');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar UPDATE_TIME = exports.UPDATE_TIME = 200;\nvar MAX_PROGRESS = exports.MAX_PROGRESS = 99;\nvar PROGRESS_INCREASE = exports.PROGRESS_INCREASE = 10;\nvar ANIMATION_DURATION = exports.ANIMATION_DURATION = UPDATE_TIME * 4;\nvar TERMINATING_ANIMATION_DURATION = exports.TERMINATING_ANIMATION_DURATION = UPDATE_TIME / 2;\n\nvar initialState = {\n percent: 0,\n status: 'hidden'\n};\n\nvar LoadingBar = function (_Component) {\n _inherits(LoadingBar, _Component);\n\n function LoadingBar() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, LoadingBar);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = LoadingBar.__proto__ || Object.getPrototypeOf(LoadingBar)).call.apply(_ref, [this].concat(args))), _this), _this.state = _extends({}, initialState), _this.reset = function () {\n _this.terminatingAnimationTimeoutId = null;\n _this.setState(initialState);\n }, _this.newPercent = function (percent, progressIncrease) {\n // Use cosine as a smoothing function\n // It could be any function to slow down progress near the ending 100%\n var smoothedProgressIncrease = progressIncrease * Math.cos(percent * (Math.PI / 2 / 100));\n\n return percent + smoothedProgressIncrease;\n }, _this.simulateProgress = function () {\n _this.setState(function (prevState, _ref2) {\n var maxProgress = _ref2.maxProgress,\n progressIncrease = _ref2.progressIncrease;\n var percent = prevState.percent;\n\n var newPercent = _this.newPercent(percent, progressIncrease);\n\n if (newPercent <= maxProgress) {\n percent = newPercent;\n }\n\n return { percent: percent };\n });\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(LoadingBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.state.status === 'starting') {\n this.start();\n }\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps, prevState) {\n if (prevState.status !== this.state.status) {\n if (this.state.status === 'starting') {\n this.start();\n }\n\n if (this.state.status === 'stopping') {\n this.stop();\n }\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n clearInterval(this.progressIntervalId);\n clearTimeout(this.terminatingAnimationTimeoutId);\n }\n }, {\n key: 'start',\n value: function start() {\n this.progressIntervalId = setInterval(this.simulateProgress, this.props.updateTime);\n this.setState({ status: 'running' });\n }\n }, {\n key: 'stop',\n value: function stop() {\n clearInterval(this.progressIntervalId);\n this.progressIntervalId = null;\n\n var terminatingAnimationDuration = this.isShown() || this.props.showFastActions ? TERMINATING_ANIMATION_DURATION : 0;\n\n this.terminatingAnimationTimeoutId = setTimeout(this.reset, terminatingAnimationDuration);\n\n this.setState({ percent: 100 });\n }\n }, {\n key: 'isShown',\n value: function isShown() {\n return this.state.percent > 0 && this.state.percent <= 100;\n }\n }, {\n key: 'buildStyle',\n value: function buildStyle() {\n var animationDuration = this.state.status === 'stopping' ? TERMINATING_ANIMATION_DURATION : ANIMATION_DURATION;\n\n //\n // browser css3 animation compatibility\n // Style keys are camelCased in order to be\n // consistent with accessing the properties on DOM nodes from JS\n // (e.g. node.style.backgroundImage).\n // Vendor prefixes other than ms should begin with a capital letter.\n // This is why WebkitTransition has an uppercase “W”.\n // https://reactjs.org/docs/dom-elements.html#style\n var style = {\n opacity: '1',\n transform: 'scaleX(' + this.state.percent / 100 + ')',\n msTransform: 'scaleX(' + this.state.percent / 100 + ')',\n WebkitTransform: 'scaleX(' + this.state.percent / 100 + ')',\n MozTransform: 'scaleX(' + this.state.percent / 100 + ')',\n OTransform: 'scaleX(' + this.state.percent / 100 + ')',\n transformOrigin: 'left',\n msTransformOrigin: 'left',\n WebkitTransformOrigin: 'left',\n MozTransformOrigin: 'left',\n OTransformOrigin: 'left',\n transition: 'transform ' + animationDuration + 'ms linear',\n msTransition: '-ms-transform ' + animationDuration + 'ms linear',\n WebkitTransition: '-webkit-transform ' + animationDuration + 'ms linear',\n MozTransition: '-moz-transform ' + animationDuration + 'ms linear',\n OTransition: '-o-transform ' + animationDuration + 'ms linear',\n width: '100%',\n willChange: 'transform, opacity'\n // Use default styling if there's no CSS class applied\n };if (!this.props.className) {\n style.height = '3px';\n style.backgroundColor = 'red';\n style.position = 'absolute';\n }\n\n if (this.isShown()) {\n style.opacity = '1';\n } else {\n style.opacity = '0';\n }\n\n return _extends({}, style, this.props.style);\n }\n }, {\n key: 'render',\n value: function render() {\n if (this.state.status === 'hidden') {\n return _react2.default.createElement('div', null);\n }\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement('div', { style: this.buildStyle(), className: this.props.className }),\n _react2.default.createElement('div', { style: { display: 'table', clear: 'both' } })\n );\n }\n }], [{\n key: 'shouldStart',\n value: function shouldStart(props, state) {\n return props.loading > 0 && ['hidden', 'stopping'].indexOf(state.status) >= 0;\n }\n }, {\n key: 'shouldStop',\n value: function shouldStop(props, state) {\n return props.loading === 0 && ['starting', 'running'].indexOf(state.status) >= 0;\n }\n }, {\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (LoadingBar.shouldStart(nextProps, prevState)) {\n return { status: 'starting' };\n }\n\n if (LoadingBar.shouldStop(nextProps, prevState)) {\n return { status: 'stopping' };\n }\n\n return null;\n }\n }]);\n\n return LoadingBar;\n}(_react.Component);\n\nLoadingBar.propTypes = {\n className: _propTypes.string,\n loading: _propTypes.number,\n maxProgress: _propTypes.number,\n progressIncrease: _propTypes.number,\n showFastActions: _propTypes.bool,\n updateTime: _propTypes.number,\n scope: _propTypes.string,\n style: _propTypes.object\n};\nLoadingBar.defaultProps = {\n className: '',\n loading: 0,\n maxProgress: MAX_PROGRESS,\n progressIncrease: PROGRESS_INCREASE,\n showFastActions: false,\n style: {},\n updateTime: UPDATE_TIME,\n scope: _loading_bar_ducks.DEFAULT_SCOPE\n};\n\n\nvar mapStateToProps = function mapStateToProps(state, ownProps) {\n return {\n loading: state.loadingBar[ownProps.scope || _loading_bar_ducks.DEFAULT_SCOPE]\n };\n};\n\n(0, _reactLifecyclesCompat.polyfill)(LoadingBar);\nvar ConnectedLoadingBar = (0, _reactRedux.connect)(mapStateToProps)(LoadingBar);\n\nexports.LoadingBar = LoadingBar;\nexports.default = ConnectedLoadingBar;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = {\n RESISTANCE_COEF: 0.6,\n // This value is closed to what browsers are using internally to\n // trigger a native scroll.\n UNCERTAINTY_THRESHOLD: 3 // px\n\n};\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = exports.animationEnd = exports.animationDelay = exports.animationTiming = exports.animationDuration = exports.animationName = exports.transitionEnd = exports.transitionDuration = exports.transitionDelay = exports.transitionTiming = exports.transitionProperty = exports.transform = void 0;\n\nvar _inDOM = _interopRequireDefault(require(\"../util/inDOM\"));\n\nvar transform = 'transform';\nexports.transform = transform;\nvar prefix, transitionEnd, animationEnd;\nexports.animationEnd = animationEnd;\nexports.transitionEnd = transitionEnd;\nvar transitionProperty, transitionDuration, transitionTiming, transitionDelay;\nexports.transitionDelay = transitionDelay;\nexports.transitionTiming = transitionTiming;\nexports.transitionDuration = transitionDuration;\nexports.transitionProperty = transitionProperty;\nvar animationName, animationDuration, animationTiming, animationDelay;\nexports.animationDelay = animationDelay;\nexports.animationTiming = animationTiming;\nexports.animationDuration = animationDuration;\nexports.animationName = animationName;\n\nif (_inDOM.default) {\n var _getTransitionPropert = getTransitionProperties();\n\n prefix = _getTransitionPropert.prefix;\n exports.transitionEnd = transitionEnd = _getTransitionPropert.transitionEnd;\n exports.animationEnd = animationEnd = _getTransitionPropert.animationEnd;\n exports.transform = transform = prefix + \"-\" + transform;\n exports.transitionProperty = transitionProperty = prefix + \"-transition-property\";\n exports.transitionDuration = transitionDuration = prefix + \"-transition-duration\";\n exports.transitionDelay = transitionDelay = prefix + \"-transition-delay\";\n exports.transitionTiming = transitionTiming = prefix + \"-transition-timing-function\";\n exports.animationName = animationName = prefix + \"-animation-name\";\n exports.animationDuration = animationDuration = prefix + \"-animation-duration\";\n exports.animationTiming = animationTiming = prefix + \"-animation-delay\";\n exports.animationDelay = animationDelay = prefix + \"-animation-timing-function\";\n}\n\nvar _default = {\n transform: transform,\n end: transitionEnd,\n property: transitionProperty,\n timing: transitionTiming,\n delay: transitionDelay,\n duration: transitionDuration\n};\nexports.default = _default;\n\nfunction getTransitionProperties() {\n var style = document.createElement('div').style;\n var vendorMap = {\n O: function O(e) {\n return \"o\" + e.toLowerCase();\n },\n Moz: function Moz(e) {\n return e.toLowerCase();\n },\n Webkit: function Webkit(e) {\n return \"webkit\" + e;\n },\n ms: function ms(e) {\n return \"MS\" + e;\n }\n };\n var vendors = Object.keys(vendorMap);\n var transitionEnd, animationEnd;\n var prefix = '';\n\n for (var i = 0; i < vendors.length; i++) {\n var vendor = vendors[i];\n\n if (vendor + \"TransitionProperty\" in style) {\n prefix = \"-\" + vendor.toLowerCase();\n transitionEnd = vendorMap[vendor]('TransitionEnd');\n animationEnd = vendorMap[vendor]('AnimationEnd');\n break;\n }\n }\n\n if (!transitionEnd && 'transitionProperty' in style) transitionEnd = 'transitionend';\n if (!animationEnd && 'animationName' in style) animationEnd = 'animationend';\n style = null;\n return {\n animationEnd: animationEnd,\n transitionEnd: transitionEnd,\n prefix: prefix\n };\n}","import React from 'react';\nexport var ReactReduxContext = React.createContext(null);\nexport default ReactReduxContext;","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { ReactReduxContext } from './Context';\n\nvar Provider =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(Provider, _Component);\n\n function Provider(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n var store = props.store;\n _this.state = {\n storeState: store.getState(),\n store: store\n };\n return _this;\n }\n\n var _proto = Provider.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this._isMounted = true;\n this.subscribe();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.unsubscribe) this.unsubscribe();\n this._isMounted = false;\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n if (this.props.store !== prevProps.store) {\n if (this.unsubscribe) this.unsubscribe();\n this.subscribe();\n }\n };\n\n _proto.subscribe = function subscribe() {\n var _this2 = this;\n\n var store = this.props.store;\n this.unsubscribe = store.subscribe(function () {\n var newStoreState = store.getState();\n\n if (!_this2._isMounted) {\n return;\n }\n\n _this2.setState(function (providerState) {\n // If the value is the same, skip the unnecessary state update.\n if (providerState.storeState === newStoreState) {\n return null;\n }\n\n return {\n storeState: newStoreState\n };\n });\n }); // Actions might have been dispatched between render and mount - handle those\n\n var postMountStoreState = store.getState();\n\n if (postMountStoreState !== this.state.storeState) {\n this.setState({\n storeState: postMountStoreState\n });\n }\n };\n\n _proto.render = function render() {\n var Context = this.props.context || ReactReduxContext;\n return React.createElement(Context.Provider, {\n value: this.state\n }, this.props.children);\n };\n\n return Provider;\n}(Component);\n\nProvider.propTypes = {\n store: PropTypes.shape({\n subscribe: PropTypes.func.isRequired,\n dispatch: PropTypes.func.isRequired,\n getState: PropTypes.func.isRequired\n }),\n context: PropTypes.object,\n children: PropTypes.any\n};\nexport default Provider;","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport hoistStatics from 'hoist-non-react-statics';\nimport invariant from 'invariant';\nimport React, { Component, PureComponent } from 'react';\nimport { isValidElementType } from 'react-is';\nimport { ReactReduxContext } from './Context';\nexport default function connectAdvanced(\n/*\n selectorFactory is a func that is responsible for returning the selector function used to\n compute new props from state, props, and dispatch. For example:\n export default connectAdvanced((dispatch, options) => (state, props) => ({\n thing: state.things[props.thingId],\n saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),\n }))(YourComponent)\n Access to dispatch is provided to the factory so selectorFactories can bind actionCreators\n outside of their selector as an optimization. Options passed to connectAdvanced are passed to\n the selectorFactory, along with displayName and WrappedComponent, as the second argument.\n Note that selectorFactory is responsible for all caching/memoization of inbound and outbound\n props. Do not use connectAdvanced directly without memoizing results between calls to your\n selector, otherwise the Connect component will re-render on every state or props change.\n*/\nselectorFactory, // options object:\n_ref) {\n if (_ref === void 0) {\n _ref = {};\n }\n\n var _ref2 = _ref,\n _ref2$getDisplayName = _ref2.getDisplayName,\n getDisplayName = _ref2$getDisplayName === void 0 ? function (name) {\n return \"ConnectAdvanced(\" + name + \")\";\n } : _ref2$getDisplayName,\n _ref2$methodName = _ref2.methodName,\n methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName,\n _ref2$renderCountProp = _ref2.renderCountProp,\n renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp,\n _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges,\n shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta,\n _ref2$storeKey = _ref2.storeKey,\n storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey,\n _ref2$withRef = _ref2.withRef,\n withRef = _ref2$withRef === void 0 ? false : _ref2$withRef,\n _ref2$forwardRef = _ref2.forwardRef,\n forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef,\n _ref2$context = _ref2.context,\n context = _ref2$context === void 0 ? ReactReduxContext : _ref2$context,\n connectOptions = _objectWithoutPropertiesLoose(_ref2, [\"getDisplayName\", \"methodName\", \"renderCountProp\", \"shouldHandleStateChanges\", \"storeKey\", \"withRef\", \"forwardRef\", \"context\"]);\n\n invariant(renderCountProp === undefined, \"renderCountProp is removed. render counting is built into the latest React dev tools profiling extension\");\n invariant(!withRef, 'withRef is removed. To access the wrapped instance, use a ref on the connected component');\n var customStoreWarningMessage = 'To use a custom Redux store for specific components, create a custom React context with ' + \"React.createContext(), and pass the context object to React-Redux's Provider and specific components\" + ' like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. ' + 'You may also pass a {context : MyContext} option to connect';\n invariant(storeKey === 'store', 'storeKey has been removed and does not do anything. ' + customStoreWarningMessage);\n var Context = context;\n return function wrapWithConnect(WrappedComponent) {\n if (process.env.NODE_ENV !== 'production') {\n invariant(isValidElementType(WrappedComponent), \"You must pass a component to the function returned by \" + (methodName + \". Instead received \" + JSON.stringify(WrappedComponent)));\n }\n\n var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n var displayName = getDisplayName(wrappedComponentName);\n\n var selectorFactoryOptions = _extends({}, connectOptions, {\n getDisplayName: getDisplayName,\n methodName: methodName,\n renderCountProp: renderCountProp,\n shouldHandleStateChanges: shouldHandleStateChanges,\n storeKey: storeKey,\n displayName: displayName,\n wrappedComponentName: wrappedComponentName,\n WrappedComponent: WrappedComponent\n });\n\n var pure = connectOptions.pure;\n var OuterBaseComponent = Component;\n var FinalWrappedComponent = WrappedComponent;\n\n if (pure) {\n OuterBaseComponent = PureComponent;\n }\n\n function makeDerivedPropsSelector() {\n var lastProps;\n var lastState;\n var lastDerivedProps;\n var lastStore;\n var sourceSelector;\n return function selectDerivedProps(state, props, store) {\n if (pure && lastProps === props && lastState === state) {\n return lastDerivedProps;\n }\n\n if (store !== lastStore) {\n lastStore = store;\n sourceSelector = selectorFactory(store.dispatch, selectorFactoryOptions);\n }\n\n lastProps = props;\n lastState = state;\n var nextProps = sourceSelector(state, props);\n\n if (lastDerivedProps === nextProps) {\n return lastDerivedProps;\n }\n\n lastDerivedProps = nextProps;\n return lastDerivedProps;\n };\n }\n\n function makeChildElementSelector() {\n var lastChildProps, lastForwardRef, lastChildElement;\n return function selectChildElement(childProps, forwardRef) {\n if (childProps !== lastChildProps || forwardRef !== lastForwardRef) {\n lastChildProps = childProps;\n lastForwardRef = forwardRef;\n lastChildElement = React.createElement(FinalWrappedComponent, _extends({}, childProps, {\n ref: forwardRef\n }));\n }\n\n return lastChildElement;\n };\n }\n\n var Connect =\n /*#__PURE__*/\n function (_OuterBaseComponent) {\n _inheritsLoose(Connect, _OuterBaseComponent);\n\n function Connect(props) {\n var _this;\n\n _this = _OuterBaseComponent.call(this, props) || this;\n invariant(forwardRef ? !props.wrapperProps[storeKey] : !props[storeKey], 'Passing redux store in props has been removed and does not do anything. ' + customStoreWarningMessage);\n _this.selectDerivedProps = makeDerivedPropsSelector();\n _this.selectChildElement = makeChildElementSelector();\n _this.renderWrappedComponent = _this.renderWrappedComponent.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n return _this;\n }\n\n var _proto = Connect.prototype;\n\n _proto.renderWrappedComponent = function renderWrappedComponent(value) {\n invariant(value, \"Could not find \\\"store\\\" in the context of \" + (\"\\\"\" + displayName + \"\\\". Either wrap the root component in a <Provider>, \") + \"or pass a custom React context provider to <Provider> and the corresponding \" + (\"React context consumer to \" + displayName + \" in connect options.\"));\n var storeState = value.storeState,\n store = value.store;\n var wrapperProps = this.props;\n var forwardedRef;\n\n if (forwardRef) {\n wrapperProps = this.props.wrapperProps;\n forwardedRef = this.props.forwardedRef;\n }\n\n var derivedProps = this.selectDerivedProps(storeState, wrapperProps, store);\n return this.selectChildElement(derivedProps, forwardedRef);\n };\n\n _proto.render = function render() {\n var ContextToUse = this.props.context || Context;\n return React.createElement(ContextToUse.Consumer, null, this.renderWrappedComponent);\n };\n\n return Connect;\n }(OuterBaseComponent);\n\n Connect.WrappedComponent = WrappedComponent;\n Connect.displayName = displayName;\n\n if (forwardRef) {\n var forwarded = React.forwardRef(function forwardConnectRef(props, ref) {\n return React.createElement(Connect, {\n wrapperProps: props,\n forwardedRef: ref\n });\n });\n forwarded.displayName = displayName;\n forwarded.WrappedComponent = WrappedComponent;\n return hoistStatics(forwarded, WrappedComponent);\n }\n\n return hoistStatics(Connect, WrappedComponent);\n };\n}","var hasOwn = Object.prototype.hasOwnProperty;\n\nfunction is(x, y) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\nexport default function shallowEqual(objA, objB) {\n if (is(objA, objB)) return true;\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}","import verifyPlainObject from '../utils/verifyPlainObject';\nexport function wrapMapToPropsConstant(getConstant) {\n return function initConstantSelector(dispatch, options) {\n var constant = getConstant(dispatch, options);\n\n function constantSelector() {\n return constant;\n }\n\n constantSelector.dependsOnOwnProps = false;\n return constantSelector;\n };\n} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args\n// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine\n// whether mapToProps needs to be invoked when props have changed.\n//\n// A length of one signals that mapToProps does not depend on props from the parent component.\n// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and\n// therefore not reporting its length accurately..\n\nexport function getDependsOnOwnProps(mapToProps) {\n return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,\n// this function wraps mapToProps in a proxy function which does several things:\n//\n// * Detects whether the mapToProps function being called depends on props, which\n// is used by selectorFactory to decide if it should reinvoke on props changes.\n//\n// * On first call, handles mapToProps if returns another function, and treats that\n// new function as the true mapToProps for subsequent calls.\n//\n// * On first call, verifies the first result is a plain object, in order to warn\n// the developer that their mapToProps function is not returning a valid result.\n//\n\nexport function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}","import { bindActionCreators } from 'redux';\nimport { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\nexport function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {\n return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined;\n}\nexport function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {\n return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) {\n return {\n dispatch: dispatch\n };\n }) : undefined;\n}\nexport function whenMapDispatchToPropsIsObject(mapDispatchToProps) {\n return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) {\n return bindActionCreators(mapDispatchToProps, dispatch);\n }) : undefined;\n}\nexport default [whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject];","import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\nexport function whenMapStateToPropsIsFunction(mapStateToProps) {\n return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined;\n}\nexport function whenMapStateToPropsIsMissing(mapStateToProps) {\n return !mapStateToProps ? wrapMapToPropsConstant(function () {\n return {};\n }) : undefined;\n}\nexport default [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport verifyPlainObject from '../utils/verifyPlainObject';\nexport function defaultMergeProps(stateProps, dispatchProps, ownProps) {\n return _extends({}, ownProps, stateProps, dispatchProps);\n}\nexport function wrapMergePropsFunc(mergeProps) {\n return function initMergePropsProxy(dispatch, _ref) {\n var displayName = _ref.displayName,\n pure = _ref.pure,\n areMergedPropsEqual = _ref.areMergedPropsEqual;\n var hasRunOnce = false;\n var mergedProps;\n return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n if (hasRunOnce) {\n if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;\n } else {\n hasRunOnce = true;\n mergedProps = nextMergedProps;\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(mergedProps, displayName, 'mergeProps');\n }\n\n return mergedProps;\n };\n };\n}\nexport function whenMergePropsIsFunction(mergeProps) {\n return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;\n}\nexport function whenMergePropsIsOmitted(mergeProps) {\n return !mergeProps ? function () {\n return defaultMergeProps;\n } : undefined;\n}\nexport default [whenMergePropsIsFunction, whenMergePropsIsOmitted];","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport verifySubselectors from './verifySubselectors';\nexport function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {\n return function impureFinalPropsSelector(state, ownProps) {\n return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);\n };\n}\nexport function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {\n var areStatesEqual = _ref.areStatesEqual,\n areOwnPropsEqual = _ref.areOwnPropsEqual,\n areStatePropsEqual = _ref.areStatePropsEqual;\n var hasRunAtLeastOnce = false;\n var state;\n var ownProps;\n var stateProps;\n var dispatchProps;\n var mergedProps;\n\n function handleFirstCall(firstState, firstOwnProps) {\n state = firstState;\n ownProps = firstOwnProps;\n stateProps = mapStateToProps(state, ownProps);\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n hasRunAtLeastOnce = true;\n return mergedProps;\n }\n\n function handleNewPropsAndNewState() {\n stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewProps() {\n if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewState() {\n var nextStateProps = mapStateToProps(state, ownProps);\n var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n stateProps = nextStateProps;\n if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleSubsequentCalls(nextState, nextOwnProps) {\n var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n var stateChanged = !areStatesEqual(nextState, state);\n state = nextState;\n ownProps = nextOwnProps;\n if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n if (propsChanged) return handleNewProps();\n if (stateChanged) return handleNewState();\n return mergedProps;\n }\n\n return function pureFinalPropsSelector(nextState, nextOwnProps) {\n return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n };\n} // TODO: Add more comments\n// If pure is true, the selector returned by selectorFactory will memoize its results,\n// allowing connectAdvanced's shouldComponentUpdate to return false if final\n// props have not changed. If false, the selector will always return a new\n// object and shouldComponentUpdate will always return true.\n\nexport default function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutPropertiesLoose(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport connectAdvanced from '../components/connectAdvanced';\nimport shallowEqual from '../utils/shallowEqual';\nimport defaultMapDispatchToPropsFactories from './mapDispatchToProps';\nimport defaultMapStateToPropsFactories from './mapStateToProps';\nimport defaultMergePropsFactories from './mergeProps';\nimport defaultSelectorFactory from './selectorFactory';\n/*\n connect is a facade over connectAdvanced. It turns its args into a compatible\n selectorFactory, which has the signature:\n\n (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps\n \n connect passes its args to connectAdvanced as options, which will in turn pass them to\n selectorFactory each time a Connect component instance is instantiated or hot reloaded.\n\n selectorFactory returns a final props selector from its mapStateToProps,\n mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,\n mergePropsFactories, and pure args.\n\n The resulting final props selector is called by the Connect component instance whenever\n it receives new props or store state.\n */\n\nfunction match(arg, factories, name) {\n for (var i = factories.length - 1; i >= 0; i--) {\n var result = factories[i](arg);\n if (result) return result;\n }\n\n return function (dispatch, options) {\n throw new Error(\"Invalid value of type \" + typeof arg + \" for \" + name + \" argument when connecting component \" + options.wrappedComponentName + \".\");\n };\n}\n\nfunction strictEqual(a, b) {\n return a === b;\n} // createConnect with default args builds the 'official' connect behavior. Calling it with\n// different options opens up some testing and extensibility scenarios\n\n\nexport function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? defaultSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n extraOptions = _objectWithoutPropertiesLoose(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}\nexport default createConnect();","import Provider from './components/Provider';\nimport connectAdvanced from './components/connectAdvanced';\nimport { ReactReduxContext } from './components/Context';\nimport connect from './connect/connect';\nexport { Provider, connectAdvanced, ReactReduxContext, connect };","export default function symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\t\t\tresult = Symbol('observable');\n\t\t\tSymbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n","const element = document.getElementById('initial-state');\nconst initialState = element && JSON.parse(element.textContent);\n\nconst getMeta = (prop) => initialState && initialState.meta && initialState.meta[prop];\nconst getRight = (prop) => initialState && initialState.rights && initialState.rights[prop];\n\nexport const reduceMotion = getMeta('reduce_motion');\nexport const autoPlayGif = getMeta('auto_play_gif');\nexport const displayMedia = getMeta('display_media');\nexport const expandSpoilers = getMeta('expand_spoilers');\nexport const unfollowModal = getMeta('unfollow_modal');\nexport const boostModal = getMeta('boost_modal');\nexport const deleteModal = getMeta('delete_modal');\nexport const me = getMeta('me');\nexport const searchEnabled = getMeta('search_enabled');\nexport const maxChars = getMeta('max_toot_chars') || getMeta('char_limit') || 5000;\nexport const invitesEnabled = getMeta('invites_enabled');\nexport const version = getMeta('version');\nexport const mascot = getMeta('mascot');\nexport const profile_directory = getMeta('profile_directory');\nexport const isStaff = getMeta('is_staff');\n\nexport const deleteOthersNotice = getRight('delete_others_notice');\n\nexport default initialState;\n","import React from 'react';\nimport { is } from 'immutable';\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ImmutablePureComponent = function (_React$Component) {\n _inherits(ImmutablePureComponent, _React$Component);\n\n function ImmutablePureComponent() {\n _classCallCheck(this, ImmutablePureComponent);\n\n return _possibleConstructorReturn(this, (ImmutablePureComponent.__proto__ || Object.getPrototypeOf(ImmutablePureComponent)).apply(this, arguments));\n }\n\n _createClass(ImmutablePureComponent, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate(nextProps) {\n var _this2 = this;\n\n var nextState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var state = this.state || {};\n\n return !(this.updateOnProps || Object.keys(_extends({}, nextProps, this.props))).every(function (p) {\n return is(nextProps[p], _this2.props[p]);\n }) || !(this.updateOnStates || Object.keys(_extends({}, nextState, state))).every(function (s) {\n return is(nextState[s], state[s]);\n });\n }\n }]);\n\n return ImmutablePureComponent;\n}(React.Component);\n\nexport { ImmutablePureComponent };export default ImmutablePureComponent;\n","/**\n * This is a straight rip-off of the React.js ReactPropTypes.js proptype validators,\n * modified to make it possible to validate Immutable.js data.\n * ImmutableTypes.listOf is patterned after React.PropTypes.arrayOf, but for Immutable.List\n * ImmutableTypes.shape is based on React.PropTypes.shape, but for any Immutable.Iterable\n */\n\"use strict\";\n\nvar Immutable = require(\"immutable\");\n\nvar ANONYMOUS = \"<<anonymous>>\";\n\nvar ImmutablePropTypes = {\n listOf: createListOfTypeChecker,\n mapOf: createMapOfTypeChecker,\n orderedMapOf: createOrderedMapOfTypeChecker,\n setOf: createSetOfTypeChecker,\n orderedSetOf: createOrderedSetOfTypeChecker,\n stackOf: createStackOfTypeChecker,\n iterableOf: createIterableOfTypeChecker,\n recordOf: createRecordOfTypeChecker,\n shape: createShapeChecker,\n contains: createShapeChecker,\n mapContains: createMapContainsChecker,\n // Primitive Types\n list: createImmutableTypeChecker(\"List\", Immutable.List.isList),\n map: createImmutableTypeChecker(\"Map\", Immutable.Map.isMap),\n orderedMap: createImmutableTypeChecker(\"OrderedMap\", Immutable.OrderedMap.isOrderedMap),\n set: createImmutableTypeChecker(\"Set\", Immutable.Set.isSet),\n orderedSet: createImmutableTypeChecker(\"OrderedSet\", Immutable.OrderedSet.isOrderedSet),\n stack: createImmutableTypeChecker(\"Stack\", Immutable.Stack.isStack),\n seq: createImmutableTypeChecker(\"Seq\", Immutable.Seq.isSeq),\n record: createImmutableTypeChecker(\"Record\", function (isRecord) {\n return isRecord instanceof Immutable.Record;\n }),\n iterable: createImmutableTypeChecker(\"Iterable\", Immutable.Iterable.isIterable)\n};\n\nfunction getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return \"array\";\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return \"object\";\n }\n if (propValue instanceof Immutable.Iterable) {\n return \"Immutable.\" + propValue.toSource().split(\" \")[0];\n }\n return propType;\n}\n\nfunction createChainableTypeChecker(validate) {\n function checkType(isRequired, props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {\n rest[_key - 6] = arguments[_key];\n }\n\n propFullName = propFullName || propName;\n componentName = componentName || ANONYMOUS;\n if (props[propName] == null) {\n var locationName = location;\n if (isRequired) {\n return new Error(\"Required \" + locationName + \" `\" + propFullName + \"` was not specified in \" + (\"`\" + componentName + \"`.\"));\n }\n } else {\n return validate.apply(undefined, [props, propName, componentName, location, propFullName].concat(rest));\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n}\n\nfunction createImmutableTypeChecker(immutableClassName, immutableClassTypeValidator) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!immutableClassTypeValidator(propValue)) {\n var propType = getPropType(propValue);\n return new Error(\"Invalid \" + location + \" `\" + propFullName + \"` of type `\" + propType + \"` \" + (\"supplied to `\" + componentName + \"`, expected `\" + immutableClassName + \"`.\"));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createIterableTypeChecker(typeChecker, immutableClassName, immutableClassTypeValidator) {\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = arguments[_key];\n }\n\n var propValue = props[propName];\n if (!immutableClassTypeValidator(propValue)) {\n var locationName = location;\n var propType = getPropType(propValue);\n return new Error(\"Invalid \" + locationName + \" `\" + propFullName + \"` of type \" + (\"`\" + propType + \"` supplied to `\" + componentName + \"`, expected an Immutable.js \" + immutableClassName + \".\"));\n }\n\n if (typeof typeChecker !== \"function\") {\n return new Error(\"Invalid typeChecker supplied to `\" + componentName + \"` \" + (\"for propType `\" + propFullName + \"`, expected a function.\"));\n }\n\n var propValues = propValue.toArray();\n for (var i = 0, len = propValues.length; i < len; i++) {\n var error = typeChecker.apply(undefined, [propValues, i, componentName, location, \"\" + propFullName + \"[\" + i + \"]\"].concat(rest));\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createKeysTypeChecker(typeChecker) {\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = arguments[_key];\n }\n\n var propValue = props[propName];\n if (typeof typeChecker !== \"function\") {\n return new Error(\"Invalid keysTypeChecker (optional second argument) supplied to `\" + componentName + \"` \" + (\"for propType `\" + propFullName + \"`, expected a function.\"));\n }\n\n var keys = propValue.keySeq().toArray();\n for (var i = 0, len = keys.length; i < len; i++) {\n var error = typeChecker.apply(undefined, [keys, i, componentName, location, \"\" + propFullName + \" -> key(\" + keys[i] + \")\"].concat(rest));\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createListOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"List\", Immutable.List.isList);\n}\n\nfunction createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, immutableClassName, immutableClassTypeValidator) {\n function validate() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return createIterableTypeChecker(valuesTypeChecker, immutableClassName, immutableClassTypeValidator).apply(undefined, args) || keysTypeChecker && createKeysTypeChecker(keysTypeChecker).apply(undefined, args);\n }\n\n return createChainableTypeChecker(validate);\n}\n\nfunction createMapOfTypeChecker(valuesTypeChecker, keysTypeChecker) {\n return createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, \"Map\", Immutable.Map.isMap);\n}\n\nfunction createOrderedMapOfTypeChecker(valuesTypeChecker, keysTypeChecker) {\n return createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, \"OrderedMap\", Immutable.OrderedMap.isOrderedMap);\n}\n\nfunction createSetOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"Set\", Immutable.Set.isSet);\n}\n\nfunction createOrderedSetOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"OrderedSet\", Immutable.OrderedSet.isOrderedSet);\n}\n\nfunction createStackOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"Stack\", Immutable.Stack.isStack);\n}\n\nfunction createIterableOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"Iterable\", Immutable.Iterable.isIterable);\n}\n\nfunction createRecordOfTypeChecker(recordKeys) {\n function validate(props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = arguments[_key];\n }\n\n var propValue = props[propName];\n if (!(propValue instanceof Immutable.Record)) {\n var propType = getPropType(propValue);\n var locationName = location;\n return new Error(\"Invalid \" + locationName + \" `\" + propFullName + \"` of type `\" + propType + \"` \" + (\"supplied to `\" + componentName + \"`, expected an Immutable.js Record.\"));\n }\n for (var key in recordKeys) {\n var checker = recordKeys[key];\n if (!checker) {\n continue;\n }\n var mutablePropValue = propValue.toObject();\n var error = checker.apply(undefined, [mutablePropValue, key, componentName, location, \"\" + propFullName + \".\" + key].concat(rest));\n if (error) {\n return error;\n }\n }\n }\n return createChainableTypeChecker(validate);\n}\n\n// there is some irony in the fact that shapeTypes is a standard hash and not an immutable collection\nfunction createShapeTypeChecker(shapeTypes) {\n var immutableClassName = arguments[1] === undefined ? \"Iterable\" : arguments[1];\n var immutableClassTypeValidator = arguments[2] === undefined ? Immutable.Iterable.isIterable : arguments[2];\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = arguments[_key];\n }\n\n var propValue = props[propName];\n if (!immutableClassTypeValidator(propValue)) {\n var propType = getPropType(propValue);\n var locationName = location;\n return new Error(\"Invalid \" + locationName + \" `\" + propFullName + \"` of type `\" + propType + \"` \" + (\"supplied to `\" + componentName + \"`, expected an Immutable.js \" + immutableClassName + \".\"));\n }\n var mutablePropValue = propValue.toObject();\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker.apply(undefined, [mutablePropValue, key, componentName, location, \"\" + propFullName + \".\" + key].concat(rest));\n if (error) {\n return error;\n }\n }\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createShapeChecker(shapeTypes) {\n return createShapeTypeChecker(shapeTypes);\n}\n\nfunction createMapContainsChecker(shapeTypes) {\n return createShapeTypeChecker(shapeTypes, \"Map\", Immutable.Map.isMap);\n}\n\nmodule.exports = ImmutablePropTypes;","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst MIN_SCALE = 1;\nconst MAX_SCALE = 4;\n\nconst getMidpoint = (p1, p2) => ({\n x: (p1.clientX + p2.clientX) / 2,\n y: (p1.clientY + p2.clientY) / 2,\n});\n\nconst getDistance = (p1, p2) =>\n Math.sqrt(Math.pow(p1.clientX - p2.clientX, 2) + Math.pow(p1.clientY - p2.clientY, 2));\n\nconst clamp = (min, max, value) => Math.min(max, Math.max(min, value));\n\nexport default class ZoomableImage extends React.PureComponent {\n\n static propTypes = {\n alt: PropTypes.string,\n src: PropTypes.string.isRequired,\n width: PropTypes.number,\n height: PropTypes.number,\n onClick: PropTypes.func,\n }\n\n static defaultProps = {\n alt: '',\n width: null,\n height: null,\n };\n\n state = {\n scale: MIN_SCALE,\n }\n\n removers = [];\n container = null;\n image = null;\n lastTouchEndTime = 0;\n lastDistance = 0;\n\n componentDidMount () {\n let handler = this.handleTouchStart;\n this.container.addEventListener('touchstart', handler);\n this.removers.push(() => this.container.removeEventListener('touchstart', handler));\n handler = this.handleTouchMove;\n // on Chrome 56+, touch event listeners will default to passive\n // https://www.chromestatus.com/features/5093566007214080\n this.container.addEventListener('touchmove', handler, { passive: false });\n this.removers.push(() => this.container.removeEventListener('touchend', handler));\n }\n\n componentWillUnmount () {\n this.removeEventListeners();\n }\n\n removeEventListeners () {\n this.removers.forEach(listeners => listeners());\n this.removers = [];\n }\n\n handleTouchStart = e => {\n if (e.touches.length !== 2) return;\n\n this.lastDistance = getDistance(...e.touches);\n }\n\n handleTouchMove = e => {\n const { scrollTop, scrollHeight, clientHeight } = this.container;\n if (e.touches.length === 1 && scrollTop !== scrollHeight - clientHeight) {\n // prevent propagating event to MediaModal\n e.stopPropagation();\n return;\n }\n if (e.touches.length !== 2) return;\n\n e.preventDefault();\n e.stopPropagation();\n\n const distance = getDistance(...e.touches);\n const midpoint = getMidpoint(...e.touches);\n const scale = clamp(MIN_SCALE, MAX_SCALE, this.state.scale * distance / this.lastDistance);\n\n this.zoom(scale, midpoint);\n\n this.lastMidpoint = midpoint;\n this.lastDistance = distance;\n }\n\n zoom(nextScale, midpoint) {\n const { scale } = this.state;\n const { scrollLeft, scrollTop } = this.container;\n\n // math memo:\n // x = (scrollLeft + midpoint.x) / scrollWidth\n // x' = (nextScrollLeft + midpoint.x) / nextScrollWidth\n // scrollWidth = clientWidth * scale\n // scrollWidth' = clientWidth * nextScale\n // Solve x = x' for nextScrollLeft\n const nextScrollLeft = (scrollLeft + midpoint.x) * nextScale / scale - midpoint.x;\n const nextScrollTop = (scrollTop + midpoint.y) * nextScale / scale - midpoint.y;\n\n this.setState({ scale: nextScale }, () => {\n this.container.scrollLeft = nextScrollLeft;\n this.container.scrollTop = nextScrollTop;\n });\n }\n\n handleClick = e => {\n // don't propagate event to MediaModal\n e.stopPropagation();\n const handler = this.props.onClick;\n if (handler) handler();\n }\n\n setContainerRef = c => {\n this.container = c;\n }\n\n setImageRef = c => {\n this.image = c;\n }\n\n render () {\n const { alt, src } = this.props;\n const { scale } = this.state;\n const overflow = scale === 1 ? 'hidden' : 'scroll';\n\n return (\n <div\n className='zoomable-image'\n ref={this.setContainerRef}\n style={{ overflow }}\n >\n <img\n role='presentation'\n ref={this.setImageRef}\n alt={alt}\n title={alt}\n src={src}\n style={{\n transform: `scale(${scale})`,\n transformOrigin: '0 0',\n }}\n onClick={this.handleClick}\n />\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { LoadingBar } from 'react-redux-loading-bar';\nimport ZoomableImage from './zoomable_image';\n\nexport default class ImageLoader extends React.PureComponent {\n\n static propTypes = {\n alt: PropTypes.string,\n src: PropTypes.string.isRequired,\n previewSrc: PropTypes.string,\n width: PropTypes.number,\n height: PropTypes.number,\n onClick: PropTypes.func,\n }\n\n static defaultProps = {\n alt: '',\n width: null,\n height: null,\n };\n\n state = {\n loading: true,\n error: false,\n width: null,\n }\n\n removers = [];\n canvas = null;\n\n get canvasContext() {\n if (!this.canvas) {\n return null;\n }\n this._canvasContext = this._canvasContext || this.canvas.getContext('2d');\n return this._canvasContext;\n }\n\n componentDidMount () {\n this.loadImage(this.props);\n }\n\n componentWillReceiveProps (nextProps) {\n if (this.props.src !== nextProps.src) {\n this.loadImage(nextProps);\n }\n }\n\n componentWillUnmount () {\n this.removeEventListeners();\n }\n\n loadImage (props) {\n this.removeEventListeners();\n this.setState({ loading: true, error: false });\n Promise.all([\n props.previewSrc && this.loadPreviewCanvas(props),\n this.hasSize() && this.loadOriginalImage(props),\n ].filter(Boolean))\n .then(() => {\n this.setState({ loading: false, error: false });\n this.clearPreviewCanvas();\n })\n .catch(() => this.setState({ loading: false, error: true }));\n }\n\n loadPreviewCanvas = ({ previewSrc, width, height }) => new Promise((resolve, reject) => {\n const image = new Image();\n const removeEventListeners = () => {\n image.removeEventListener('error', handleError);\n image.removeEventListener('load', handleLoad);\n };\n const handleError = () => {\n removeEventListeners();\n reject();\n };\n const handleLoad = () => {\n removeEventListeners();\n this.canvasContext.drawImage(image, 0, 0, width, height);\n resolve();\n };\n image.addEventListener('error', handleError);\n image.addEventListener('load', handleLoad);\n image.src = previewSrc;\n this.removers.push(removeEventListeners);\n })\n\n clearPreviewCanvas () {\n const { width, height } = this.canvas;\n this.canvasContext.clearRect(0, 0, width, height);\n }\n\n loadOriginalImage = ({ src }) => new Promise((resolve, reject) => {\n const image = new Image();\n const removeEventListeners = () => {\n image.removeEventListener('error', handleError);\n image.removeEventListener('load', handleLoad);\n };\n const handleError = () => {\n removeEventListeners();\n reject();\n };\n const handleLoad = () => {\n removeEventListeners();\n resolve();\n };\n image.addEventListener('error', handleError);\n image.addEventListener('load', handleLoad);\n image.src = src;\n this.removers.push(removeEventListeners);\n });\n\n removeEventListeners () {\n this.removers.forEach(listeners => listeners());\n this.removers = [];\n }\n\n hasSize () {\n const { width, height } = this.props;\n return typeof width === 'number' && typeof height === 'number';\n }\n\n setCanvasRef = c => {\n this.canvas = c;\n if (c) this.setState({ width: c.offsetWidth });\n }\n\n render () {\n const { alt, src, width, height, onClick } = this.props;\n const { loading } = this.state;\n\n const className = classNames('image-loader', {\n 'image-loader--loading': loading,\n 'image-loader--amorphous': !this.hasSize(),\n });\n\n return (\n <div className={className}>\n <LoadingBar loading={loading ? 1 : 0} className='loading-bar' style={{ width: this.state.width || width }} />\n {loading ? (\n <canvas\n className='image-loader__preview-canvas'\n ref={this.setCanvasRef}\n width={width}\n height={height}\n />\n ) : (\n <ZoomableImage\n alt={alt}\n src={src}\n onClick={onClick}\n />\n )}\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst MIN_SCALE = 1;\nconst MAX_SCALE = 4;\n\nconst getMidpoint = (p1, p2) => ({\n x: (p1.clientX + p2.clientX) / 2,\n y: (p1.clientY + p2.clientY) / 2,\n});\n\nconst getDistance = (p1, p2) =>\n Math.sqrt(Math.pow(p1.clientX - p2.clientX, 2) + Math.pow(p1.clientY - p2.clientY, 2));\n\nconst clamp = (min, max, value) => Math.min(max, Math.max(min, value));\n\nexport default class ZoomableImage extends React.PureComponent {\n\n static propTypes = {\n alt: PropTypes.string,\n src: PropTypes.string.isRequired,\n width: PropTypes.number,\n height: PropTypes.number,\n onClick: PropTypes.func,\n }\n\n static defaultProps = {\n alt: '',\n width: null,\n height: null,\n };\n\n state = {\n scale: MIN_SCALE,\n }\n\n removers = [];\n container = null;\n image = null;\n lastTouchEndTime = 0;\n lastDistance = 0;\n\n componentDidMount () {\n let handler = this.handleTouchStart;\n this.container.addEventListener('touchstart', handler);\n this.removers.push(() => this.container.removeEventListener('touchstart', handler));\n handler = this.handleTouchMove;\n // on Chrome 56+, touch event listeners will default to passive\n // https://www.chromestatus.com/features/5093566007214080\n this.container.addEventListener('touchmove', handler, { passive: false });\n this.removers.push(() => this.container.removeEventListener('touchend', handler));\n }\n\n componentWillUnmount () {\n this.removeEventListeners();\n }\n\n removeEventListeners () {\n this.removers.forEach(listeners => listeners());\n this.removers = [];\n }\n\n handleTouchStart = e => {\n if (e.touches.length !== 2) return;\n\n this.lastDistance = getDistance(...e.touches);\n }\n\n handleTouchMove = e => {\n const { scrollTop, scrollHeight, clientHeight } = this.container;\n if (e.touches.length === 1 && scrollTop !== scrollHeight - clientHeight) {\n // prevent propagating event to MediaModal\n e.stopPropagation();\n return;\n }\n if (e.touches.length !== 2) return;\n\n e.preventDefault();\n e.stopPropagation();\n\n const distance = getDistance(...e.touches);\n const midpoint = getMidpoint(...e.touches);\n const scale = clamp(MIN_SCALE, MAX_SCALE, this.state.scale * distance / this.lastDistance);\n\n this.zoom(scale, midpoint);\n\n this.lastMidpoint = midpoint;\n this.lastDistance = distance;\n }\n\n zoom(nextScale, midpoint) {\n const { scale } = this.state;\n const { scrollLeft, scrollTop } = this.container;\n\n // math memo:\n // x = (scrollLeft + midpoint.x) / scrollWidth\n // x' = (nextScrollLeft + midpoint.x) / nextScrollWidth\n // scrollWidth = clientWidth * scale\n // scrollWidth' = clientWidth * nextScale\n // Solve x = x' for nextScrollLeft\n const nextScrollLeft = (scrollLeft + midpoint.x) * nextScale / scale - midpoint.x;\n const nextScrollTop = (scrollTop + midpoint.y) * nextScale / scale - midpoint.y;\n\n this.setState({ scale: nextScale }, () => {\n this.container.scrollLeft = nextScrollLeft;\n this.container.scrollTop = nextScrollTop;\n });\n }\n\n handleClick = e => {\n // don't propagate event to MediaModal\n e.stopPropagation();\n const handler = this.props.onClick;\n if (handler) handler();\n }\n\n setContainerRef = c => {\n this.container = c;\n }\n\n setImageRef = c => {\n this.image = c;\n }\n\n render () {\n const { alt, src } = this.props;\n const { scale } = this.state;\n const overflow = scale === 1 ? 'hidden' : 'scroll';\n\n return (\n <div\n className='zoomable-image'\n ref={this.setContainerRef}\n style={{ overflow }}\n >\n <img\n role='presentation'\n ref={this.setImageRef}\n alt={alt}\n title={alt}\n src={src}\n style={{\n transform: `scale(${scale})`,\n transformOrigin: '0 0',\n }}\n onClick={this.handleClick}\n />\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { LoadingBar } from 'react-redux-loading-bar';\nimport ZoomableImage from './zoomable_image';\n\nexport default class ImageLoader extends React.PureComponent {\n\n static propTypes = {\n alt: PropTypes.string,\n src: PropTypes.string.isRequired,\n previewSrc: PropTypes.string,\n width: PropTypes.number,\n height: PropTypes.number,\n onClick: PropTypes.func,\n }\n\n static defaultProps = {\n alt: '',\n width: null,\n height: null,\n };\n\n state = {\n loading: true,\n error: false,\n width: null,\n }\n\n removers = [];\n canvas = null;\n\n get canvasContext() {\n if (!this.canvas) {\n return null;\n }\n this._canvasContext = this._canvasContext || this.canvas.getContext('2d');\n return this._canvasContext;\n }\n\n componentDidMount () {\n this.loadImage(this.props);\n }\n\n componentWillReceiveProps (nextProps) {\n if (this.props.src !== nextProps.src) {\n this.loadImage(nextProps);\n }\n }\n\n componentWillUnmount () {\n this.removeEventListeners();\n }\n\n loadImage (props) {\n this.removeEventListeners();\n this.setState({ loading: true, error: false });\n Promise.all([\n props.previewSrc && this.loadPreviewCanvas(props),\n this.hasSize() && this.loadOriginalImage(props),\n ].filter(Boolean))\n .then(() => {\n this.setState({ loading: false, error: false });\n this.clearPreviewCanvas();\n })\n .catch(() => this.setState({ loading: false, error: true }));\n }\n\n loadPreviewCanvas = ({ previewSrc, width, height }) => new Promise((resolve, reject) => {\n const image = new Image();\n const removeEventListeners = () => {\n image.removeEventListener('error', handleError);\n image.removeEventListener('load', handleLoad);\n };\n const handleError = () => {\n removeEventListeners();\n reject();\n };\n const handleLoad = () => {\n removeEventListeners();\n this.canvasContext.drawImage(image, 0, 0, width, height);\n resolve();\n };\n image.addEventListener('error', handleError);\n image.addEventListener('load', handleLoad);\n image.src = previewSrc;\n this.removers.push(removeEventListeners);\n })\n\n clearPreviewCanvas () {\n const { width, height } = this.canvas;\n this.canvasContext.clearRect(0, 0, width, height);\n }\n\n loadOriginalImage = ({ src }) => new Promise((resolve, reject) => {\n const image = new Image();\n const removeEventListeners = () => {\n image.removeEventListener('error', handleError);\n image.removeEventListener('load', handleLoad);\n };\n const handleError = () => {\n removeEventListeners();\n reject();\n };\n const handleLoad = () => {\n removeEventListeners();\n resolve();\n };\n image.addEventListener('error', handleError);\n image.addEventListener('load', handleLoad);\n image.src = src;\n this.removers.push(removeEventListeners);\n });\n\n removeEventListeners () {\n this.removers.forEach(listeners => listeners());\n this.removers = [];\n }\n\n hasSize () {\n const { width, height } = this.props;\n return typeof width === 'number' && typeof height === 'number';\n }\n\n setCanvasRef = c => {\n this.canvas = c;\n if (c) this.setState({ width: c.offsetWidth });\n }\n\n render () {\n const { alt, src, width, height, onClick } = this.props;\n const { loading } = this.state;\n\n const className = classNames('image-loader', {\n 'image-loader--loading': loading,\n 'image-loader--amorphous': !this.hasSize(),\n });\n\n return (\n <div className={className}>\n <LoadingBar loading={loading ? 1 : 0} className='loading-bar' style={{ width: this.state.width || width }} />\n {loading ? (\n <canvas\n className='image-loader__preview-canvas'\n ref={this.setCanvasRef}\n width={width}\n height={height}\n />\n ) : (\n <ZoomableImage\n alt={alt}\n src={src}\n onClick={onClick}\n />\n )}\n </div>\n );\n }\n\n}\n","const element = document.getElementById('initial-state');\nconst initialState = element && function () {\n const result = JSON.parse(element.textContent);\n try {\n result.local_settings = JSON.parse(localStorage.getItem('mastodon-settings'));\n } catch (e) {\n result.local_settings = {};\n }\n return result;\n}();\n\nconst getMeta = (prop) => initialState && initialState.meta && initialState.meta[prop];\nconst getRight = (prop) => initialState && initialState.rights && initialState.rights[prop];\n\nexport const reduceMotion = getMeta('reduce_motion');\nexport const autoPlayGif = getMeta('auto_play_gif');\nexport const displaySensitiveMedia = getMeta('display_sensitive_media');\nexport const displayMedia = getMeta('display_media') || (getMeta('display_sensitive_media') ? 'show_all' : 'default');\nexport const unfollowModal = getMeta('unfollow_modal');\nexport const boostModal = getMeta('boost_modal');\nexport const favouriteModal = getMeta('favourite_modal');\nexport const deleteModal = getMeta('delete_modal');\nexport const me = getMeta('me');\nexport const searchEnabled = getMeta('search_enabled');\nexport const maxChars = getMeta('max_toot_chars') || 500;\n//@TODO: Look if possible to reuse for AdminAPI\nexport const invitesEnabled = getMeta('invites_enabled');\n//Should it be set to something?\nexport const version = getMeta('version');\nexport const mascot = getMeta('mascot');\n//@TODO: Look if possible to reuse for AdminAPI\nexport const isStaff = getMeta('is_staff');\n\nexport const deleteOthersNotice = getRight('delete_others_notice');\n\nexport default initialState;\n","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function(object) {\n if (!object) {\n object = root;\n }\n object.requestAnimationFrame = raf\n object.cancelAnimationFrame = caf\n}\n","/** @license React v16.7.0\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';Object.defineProperty(exports,\"__esModule\",{value:!0});\nvar b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?Symbol.for(\"react.memo\"):\n60115,r=b?Symbol.for(\"react.lazy\"):60116;function t(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;\nexports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||\"object\"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k};\nexports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f};\nexports.isSuspense=function(a){return t(a)===p};\n","module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}\n\nfunction componentWillReceiveProps(nextProps) {\n // Call this.constructor.gDSFP to support sub-classes.\n // Use the setState() updater to ensure state isn't stale in certain edge cases.\n function updater(prevState) {\n var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);\n return state !== null && state !== undefined ? state : null;\n }\n // Binding \"this\" is important for shallow renderer support.\n this.setState(updater.bind(this));\n}\n\nfunction componentWillUpdate(nextProps, nextState) {\n try {\n var prevProps = this.props;\n var prevState = this.state;\n this.props = nextProps;\n this.state = nextState;\n this.__reactInternalSnapshotFlag = true;\n this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(\n prevProps,\n prevState\n );\n } finally {\n this.props = prevProps;\n this.state = prevState;\n }\n}\n\n// React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\n\nfunction polyfill(Component) {\n var prototype = Component.prototype;\n\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n }\n\n if (\n typeof Component.getDerivedStateFromProps !== 'function' &&\n typeof prototype.getSnapshotBeforeUpdate !== 'function'\n ) {\n return Component;\n }\n\n // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Error if any of these lifecycles are present,\n // Because they would work differently between older and newer (16.3+) versions of React.\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n if (typeof prototype.componentWillMount === 'function') {\n foundWillMountName = 'componentWillMount';\n } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n if (typeof prototype.componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n if (typeof prototype.componentWillUpdate === 'function') {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n if (\n foundWillMountName !== null ||\n foundWillReceivePropsName !== null ||\n foundWillUpdateName !== null\n ) {\n var componentName = Component.displayName || Component.name;\n var newApiName =\n typeof Component.getDerivedStateFromProps === 'function'\n ? 'getDerivedStateFromProps()'\n : 'getSnapshotBeforeUpdate()';\n\n throw Error(\n 'Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' +\n componentName +\n ' uses ' +\n newApiName +\n ' but also contains the following legacy lifecycles:' +\n (foundWillMountName !== null ? '\\n ' + foundWillMountName : '') +\n (foundWillReceivePropsName !== null\n ? '\\n ' + foundWillReceivePropsName\n : '') +\n (foundWillUpdateName !== null ? '\\n ' + foundWillUpdateName : '') +\n '\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\n' +\n 'https://fb.me/react-async-component-lifecycle-hooks'\n );\n }\n\n // React <= 16.2 does not support static getDerivedStateFromProps.\n // As a workaround, use cWM and cWRP to invoke the new static lifecycle.\n // Newer versions of React will ignore these lifecycles if gDSFP exists.\n if (typeof Component.getDerivedStateFromProps === 'function') {\n prototype.componentWillMount = componentWillMount;\n prototype.componentWillReceiveProps = componentWillReceiveProps;\n }\n\n // React <= 16.2 does not support getSnapshotBeforeUpdate.\n // As a workaround, use cWU to invoke the new lifecycle.\n // Newer versions of React will ignore that lifecycle if gSBU exists.\n if (typeof prototype.getSnapshotBeforeUpdate === 'function') {\n if (typeof prototype.componentDidUpdate !== 'function') {\n throw new Error(\n 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'\n );\n }\n\n prototype.componentWillUpdate = componentWillUpdate;\n\n var componentDidUpdate = prototype.componentDidUpdate;\n\n prototype.componentDidUpdate = function componentDidUpdatePolyfill(\n prevProps,\n prevState,\n maybeSnapshot\n ) {\n // 16.3+ will not execute our will-update method;\n // It will pass a snapshot value to did-update though.\n // Older versions will require our polyfilled will-update value.\n // We need to handle both cases, but can't just check for the presence of \"maybeSnapshot\",\n // Because for <= 15.x versions this might be a \"prevContext\" object.\n // We also can't just check \"__reactInternalSnapshot\",\n // Because get-snapshot might return a falsy value.\n // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.\n var snapshot = this.__reactInternalSnapshotFlag\n ? this.__reactInternalSnapshot\n : maybeSnapshot;\n\n componentDidUpdate.call(this, prevProps, prevState, snapshot);\n };\n }\n\n return Component;\n}\n\nexport { polyfill };\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nexports.default = loadingBarMiddleware;\n\nvar _loading_bar_ducks = require('./loading_bar_ducks');\n\nvar defaultTypeSuffixes = ['PENDING', 'FULFILLED', 'REJECTED'];\n\nfunction loadingBarMiddleware() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypeSuffixes;\n var scope = config.scope || _loading_bar_ducks.DEFAULT_SCOPE;\n\n return function (_ref) {\n var dispatch = _ref.dispatch;\n return function (next) {\n return function (action) {\n if (action.type) {\n var _promiseTypeSuffixes = _slicedToArray(promiseTypeSuffixes, 3),\n PENDING = _promiseTypeSuffixes[0],\n FULFILLED = _promiseTypeSuffixes[1],\n REJECTED = _promiseTypeSuffixes[2];\n\n var isPending = new RegExp(PENDING + '$', 'g');\n var isFulfilled = new RegExp(FULFILLED + '$', 'g');\n var isRejected = new RegExp(REJECTED + '$', 'g');\n\n var actionScope = action.meta && action.meta.scope || action.scope || scope;\n\n if (action.type.match(isPending)) {\n dispatch((0, _loading_bar_ducks.showLoading)(actionScope));\n } else if (action.type.match(isFulfilled) || action.type.match(isRejected)) {\n dispatch((0, _loading_bar_ducks.hideLoading)(actionScope));\n }\n }\n\n return next(action);\n };\n };\n };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = require('react-redux');\n\nvar _loading_bar = require('./loading_bar');\n\nvar _loading_bar_ducks = require('./loading_bar_ducks');\n\nvar mapImmutableStateToProps = function mapImmutableStateToProps(state, ownProps) {\n return {\n loading: state.get('loadingBar')[ownProps.scope || _loading_bar_ducks.DEFAULT_SCOPE]\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapImmutableStateToProps)(_loading_bar.LoadingBar);","\n\n// currently used to initiate the velocity style object to 0\n'use strict';\n\nexports.__esModule = true;\nexports['default'] = mapToZero;\n\nfunction mapToZero(obj) {\n var ret = {};\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n ret[key] = 0;\n }\n }\n return ret;\n}\n\nmodule.exports = exports['default'];","\n// turn {x: {val: 1, stiffness: 1, damping: 2}, y: 2} generated by\n// `{x: spring(1, {stiffness: 1, damping: 2}), y: 2}` into {x: 1, y: 2}\n\n'use strict';\n\nexports.__esModule = true;\nexports['default'] = stripStyle;\n\nfunction stripStyle(style) {\n var ret = {};\n for (var key in style) {\n if (!Object.prototype.hasOwnProperty.call(style, key)) {\n continue;\n }\n ret[key] = typeof style[key] === 'number' ? style[key] : style[key].val;\n }\n return ret;\n}\n\nmodule.exports = exports['default'];","\n\n// stepper is used a lot. Saves allocation to return the same array wrapper.\n// This is fine and danger-free against mutations because the callsite\n// immediately destructures it and gets the numbers inside without passing the\n\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = stepper;\n\nvar reusedTuple = [0, 0];\n\nfunction stepper(secondPerFrame, x, v, destX, k, b, precision) {\n // Spring stiffness, in kg / s^2\n\n // for animations, destX is really spring length (spring at rest). initial\n // position is considered as the stretched/compressed position of a spring\n var Fspring = -k * (x - destX);\n\n // Damping, in kg / s\n var Fdamper = -b * v;\n\n // usually we put mass here, but for animation purposes, specifying mass is a\n // bit redundant. you could simply adjust k and b accordingly\n // let a = (Fspring + Fdamper) / mass;\n var a = Fspring + Fdamper;\n\n var newV = v + a * secondPerFrame;\n var newX = x + newV * secondPerFrame;\n\n if (Math.abs(newV) < precision && Math.abs(newX - destX) < precision) {\n reusedTuple[0] = destX;\n reusedTuple[1] = 0;\n return reusedTuple;\n }\n\n reusedTuple[0] = newX;\n reusedTuple[1] = newV;\n return reusedTuple;\n}\n\nmodule.exports = exports[\"default\"];\n// array reference around.","// Generated by CoffeeScript 1.7.1\n(function() {\n var getNanoSeconds, hrtime, loadTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - loadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n loadTime = getNanoSeconds();\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.2\n(function() {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n","\n\n// usage assumption: currentStyle values have already been rendered but it says\n// nothing of whether currentStyle is stale (see unreadPropStyle)\n'use strict';\n\nexports.__esModule = true;\nexports['default'] = shouldStopAnimation;\n\nfunction shouldStopAnimation(currentStyle, style, currentVelocity) {\n for (var key in style) {\n if (!Object.prototype.hasOwnProperty.call(style, key)) {\n continue;\n }\n\n if (currentVelocity[key] !== 0) {\n return false;\n }\n\n var styleValue = typeof style[key] === 'number' ? style[key] : style[key].val;\n // stepper will have already taken care of rounding precision errors, so\n // won't have such thing as 0.9999 !=== 1\n if (currentStyle[key] !== styleValue) {\n return false;\n }\n }\n\n return true;\n}\n\nmodule.exports = exports['default'];","\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = {\n noWobble: { stiffness: 170, damping: 26 }, // the default, if nothing provided\n gentle: { stiffness: 120, damping: 14 },\n wobbly: { stiffness: 180, damping: 12 },\n stiff: { stiffness: 210, damping: 20 }\n};\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getDomTreeShapes = getDomTreeShapes;\nexports.findNativeHandler = findNativeHandler;\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _warning = _interopRequireDefault(require(\"warning\"));\n\nvar _properties = _interopRequireDefault(require(\"dom-helpers/transition/properties\"));\n\nvar _on = _interopRequireDefault(require(\"dom-helpers/events/on\"));\n\nvar _off = _interopRequireDefault(require(\"dom-helpers/events/off\"));\n\nvar _reactSwipeableViewsCore = require(\"react-swipeable-views-core\");\n\nfunction addEventListenerEnhanced(node, event, handler, options) {\n (0, _on.default)(node, event, handler, options);\n return {\n remove: function remove() {\n (0, _off.default)(node, event, handler, options);\n }\n };\n}\n\nvar styles = {\n container: {\n direction: 'ltr',\n display: 'flex',\n willChange: 'transform'\n },\n slide: {\n width: '100%',\n WebkitFlexShrink: 0,\n flexShrink: 0,\n overflow: 'auto'\n }\n};\nvar axisProperties = {\n root: {\n x: {\n overflowX: 'hidden'\n },\n 'x-reverse': {\n overflowX: 'hidden'\n },\n y: {\n overflowY: 'hidden'\n },\n 'y-reverse': {\n overflowY: 'hidden'\n }\n },\n flexDirection: {\n x: 'row',\n 'x-reverse': 'row-reverse',\n y: 'column',\n 'y-reverse': 'column-reverse'\n },\n transform: {\n x: function x(translate) {\n return \"translate(\".concat(-translate, \"%, 0)\");\n },\n 'x-reverse': function xReverse(translate) {\n return \"translate(\".concat(translate, \"%, 0)\");\n },\n y: function y(translate) {\n return \"translate(0, \".concat(-translate, \"%)\");\n },\n 'y-reverse': function yReverse(translate) {\n return \"translate(0, \".concat(translate, \"%)\");\n }\n },\n length: {\n x: 'width',\n 'x-reverse': 'width',\n y: 'height',\n 'y-reverse': 'height'\n },\n rotationMatrix: {\n x: {\n x: [1, 0],\n y: [0, 1]\n },\n 'x-reverse': {\n x: [-1, 0],\n y: [0, 1]\n },\n y: {\n x: [0, 1],\n y: [1, 0]\n },\n 'y-reverse': {\n x: [0, -1],\n y: [1, 0]\n }\n },\n scrollPosition: {\n x: 'scrollLeft',\n 'x-reverse': 'scrollLeft',\n y: 'scrollTop',\n 'y-reverse': 'scrollTop'\n },\n scrollLength: {\n x: 'scrollWidth',\n 'x-reverse': 'scrollWidth',\n y: 'scrollHeight',\n 'y-reverse': 'scrollHeight'\n },\n clientLength: {\n x: 'clientWidth',\n 'x-reverse': 'clientWidth',\n y: 'clientHeight',\n 'y-reverse': 'clientHeight'\n }\n};\n\nfunction createTransition(property, options) {\n var duration = options.duration,\n easeFunction = options.easeFunction,\n delay = options.delay;\n return \"\".concat(property, \" \").concat(duration, \" \").concat(easeFunction, \" \").concat(delay);\n} // We are using a 2x2 rotation matrix.\n\n\nfunction applyRotationMatrix(touch, axis) {\n var rotationMatrix = axisProperties.rotationMatrix[axis];\n return {\n pageX: rotationMatrix.x[0] * touch.pageX + rotationMatrix.x[1] * touch.pageY,\n pageY: rotationMatrix.y[0] * touch.pageX + rotationMatrix.y[1] * touch.pageY\n };\n}\n\nfunction adaptMouse(event) {\n event.touches = [{\n pageX: event.pageX,\n pageY: event.pageY\n }];\n return event;\n}\n\nfunction getDomTreeShapes(element, rootNode) {\n var domTreeShapes = [];\n\n while (element && element !== rootNode) {\n // We reach a Swipeable View, no need to look higher in the dom tree.\n if (element.hasAttribute('data-swipeable')) {\n break;\n }\n\n var style = window.getComputedStyle(element);\n\n if ( // Ignore the scroll children if the element is absolute positioned.\n style.getPropertyValue('position') === 'absolute' || // Ignore the scroll children if the element has an overflowX hidden\n style.getPropertyValue('overflow-x') === 'hidden') {\n domTreeShapes = [];\n } else if (element.clientWidth > 0 && element.scrollWidth > element.clientWidth || element.clientHeight > 0 && element.scrollHeight > element.clientHeight) {\n // Ignore the nodes that have no width.\n // Keep elements with a scroll\n domTreeShapes.push({\n element: element,\n scrollWidth: element.scrollWidth,\n scrollHeight: element.scrollHeight,\n clientWidth: element.clientWidth,\n clientHeight: element.clientHeight,\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n });\n }\n\n element = element.parentNode;\n }\n\n return domTreeShapes;\n} // We can only have one node at the time claiming ownership for handling the swipe.\n// Otherwise, the UX would be confusing.\n// That's why we use a singleton here.\n\n\nvar nodeWhoClaimedTheScroll = null;\n\nfunction findNativeHandler(params) {\n var domTreeShapes = params.domTreeShapes,\n pageX = params.pageX,\n startX = params.startX,\n axis = params.axis;\n return domTreeShapes.some(function (shape) {\n // Determine if we are going backward or forward.\n var goingForward = pageX >= startX;\n\n if (axis === 'x' || axis === 'y') {\n goingForward = !goingForward;\n }\n\n var scrollPosition = shape[axisProperties.scrollPosition[axis]];\n var areNotAtStart = scrollPosition > 0;\n var areNotAtEnd = scrollPosition + shape[axisProperties.clientLength[axis]] < shape[axisProperties.scrollLength[axis]];\n\n if (goingForward && areNotAtEnd || !goingForward && areNotAtStart) {\n nodeWhoClaimedTheScroll = shape.element;\n return true;\n }\n\n return false;\n });\n}\n\nvar SwipeableViews =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inherits2.default)(SwipeableViews, _React$Component);\n\n function SwipeableViews(props) {\n var _this;\n\n (0, _classCallCheck2.default)(this, SwipeableViews);\n _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(SwipeableViews).call(this, props));\n _this.rootNode = null;\n _this.containerNode = null;\n _this.ignoreNextScrollEvents = false;\n _this.viewLength = 0;\n _this.startX = 0;\n _this.lastX = 0;\n _this.vx = 0;\n _this.startY = 0;\n _this.isSwiping = undefined;\n _this.started = false;\n _this.startIndex = 0;\n _this.transitionListener = null;\n _this.touchMoveListener = null;\n _this.activeSlide = null;\n _this.indexCurrent = null;\n _this.firstRenderTimeout = null;\n\n _this.setRootNode = function (node) {\n _this.rootNode = node;\n };\n\n _this.setContainerNode = function (node) {\n _this.containerNode = node;\n };\n\n _this.setActiveSlide = function (node) {\n _this.activeSlide = node;\n\n _this.updateHeight();\n };\n\n _this.handleSwipeStart = function (event) {\n var axis = _this.props.axis;\n var touch = applyRotationMatrix(event.touches[0], axis);\n _this.viewLength = _this.rootNode.getBoundingClientRect()[axisProperties.length[axis]];\n _this.startX = touch.pageX;\n _this.lastX = touch.pageX;\n _this.vx = 0;\n _this.startY = touch.pageY;\n _this.isSwiping = undefined;\n _this.started = true;\n var computedStyle = window.getComputedStyle(_this.containerNode);\n var transform = computedStyle.getPropertyValue('-webkit-transform') || computedStyle.getPropertyValue('transform');\n\n if (transform && transform !== 'none') {\n var transformValues = transform.split('(')[1].split(')')[0].split(',');\n var rootStyle = window.getComputedStyle(_this.rootNode);\n var tranformNormalized = applyRotationMatrix({\n pageX: parseInt(transformValues[4], 10),\n pageY: parseInt(transformValues[5], 10)\n }, axis);\n _this.startIndex = -tranformNormalized.pageX / (_this.viewLength - parseInt(rootStyle.paddingLeft, 10) - parseInt(rootStyle.paddingRight, 10)) || 0;\n }\n };\n\n _this.handleSwipeMove = function (event) {\n // The touch start event can be cancel.\n // Makes sure we set a starting point.\n if (!_this.started) {\n _this.handleTouchStart(event);\n\n return;\n } // We are not supposed to hanlde this touch move.\n\n\n if (nodeWhoClaimedTheScroll !== null && nodeWhoClaimedTheScroll !== _this.rootNode) {\n return;\n }\n\n var _this$props = _this.props,\n axis = _this$props.axis,\n children = _this$props.children,\n ignoreNativeScroll = _this$props.ignoreNativeScroll,\n onSwitching = _this$props.onSwitching,\n resistance = _this$props.resistance;\n var touch = applyRotationMatrix(event.touches[0], axis); // We don't know yet.\n\n if (_this.isSwiping === undefined) {\n var dx = Math.abs(touch.pageX - _this.startX);\n var dy = Math.abs(touch.pageY - _this.startY);\n var isSwiping = dx > dy && dx > _reactSwipeableViewsCore.constant.UNCERTAINTY_THRESHOLD; // We let the parent handle the scroll.\n\n if (!resistance && (axis === 'y' || axis === 'y-reverse') && (_this.indexCurrent === 0 && _this.startX < touch.pageX || _this.indexCurrent === _react.default.Children.count(_this.props.children) - 1 && _this.startX > touch.pageX)) {\n _this.isSwiping = false;\n return;\n } // We are likely to be swiping, let's prevent the scroll event.\n\n\n if (dx > dy) {\n event.preventDefault();\n }\n\n if (isSwiping === true || dy > _reactSwipeableViewsCore.constant.UNCERTAINTY_THRESHOLD) {\n _this.isSwiping = isSwiping;\n _this.startX = touch.pageX; // Shift the starting point.\n\n return; // Let's wait the next touch event to move something.\n }\n }\n\n if (_this.isSwiping !== true) {\n return;\n } // We are swiping, let's prevent the scroll event.\n\n\n event.preventDefault(); // Low Pass filter.\n\n _this.vx = _this.vx * 0.5 + (touch.pageX - _this.lastX) * 0.5;\n _this.lastX = touch.pageX;\n\n var _computeIndex = (0, _reactSwipeableViewsCore.computeIndex)({\n children: children,\n resistance: resistance,\n pageX: touch.pageX,\n startIndex: _this.startIndex,\n startX: _this.startX,\n viewLength: _this.viewLength\n }),\n index = _computeIndex.index,\n startX = _computeIndex.startX; // Add support for native scroll elements.\n\n\n if (nodeWhoClaimedTheScroll === null && !ignoreNativeScroll) {\n var domTreeShapes = getDomTreeShapes(event.target, _this.rootNode);\n var hasFoundNativeHandler = findNativeHandler({\n domTreeShapes: domTreeShapes,\n startX: _this.startX,\n pageX: touch.pageX,\n axis: axis\n }); // We abort the touch move handler.\n\n if (hasFoundNativeHandler) {\n return;\n }\n } // We are moving toward the edges.\n\n\n if (startX) {\n _this.startX = startX;\n } else if (nodeWhoClaimedTheScroll === null) {\n nodeWhoClaimedTheScroll = _this.rootNode;\n }\n\n _this.setIndexCurrent(index);\n\n var callback = function callback() {\n if (onSwitching) {\n onSwitching(index, 'move');\n }\n };\n\n if (_this.state.displaySameSlide || !_this.state.isDragging) {\n _this.setState({\n displaySameSlide: false,\n isDragging: true\n }, callback);\n }\n\n callback();\n };\n\n _this.handleSwipeEnd = function () {\n nodeWhoClaimedTheScroll = null; // The touch start event can be cancel.\n // Makes sure that a starting point is set.\n\n if (!_this.started) {\n return;\n }\n\n _this.started = false;\n\n if (_this.isSwiping !== true) {\n return;\n }\n\n var indexLatest = _this.state.indexLatest;\n var indexCurrent = _this.indexCurrent;\n var delta = indexLatest - indexCurrent;\n var indexNew; // Quick movement\n\n if (Math.abs(_this.vx) > _this.props.threshold) {\n if (_this.vx > 0) {\n indexNew = Math.floor(indexCurrent);\n } else {\n indexNew = Math.ceil(indexCurrent);\n }\n } else if (Math.abs(delta) > _this.props.hysteresis) {\n // Some hysteresis with indexLatest.\n indexNew = delta > 0 ? Math.floor(indexCurrent) : Math.ceil(indexCurrent);\n } else {\n indexNew = indexLatest;\n }\n\n var indexMax = _react.default.Children.count(_this.props.children) - 1;\n\n if (indexNew < 0) {\n indexNew = 0;\n } else if (indexNew > indexMax) {\n indexNew = indexMax;\n }\n\n _this.setIndexCurrent(indexNew);\n\n _this.setState({\n indexLatest: indexNew,\n isDragging: false\n }, function () {\n if (_this.props.onSwitching) {\n _this.props.onSwitching(indexNew, 'end');\n }\n\n if (_this.props.onChangeIndex && indexNew !== indexLatest) {\n _this.props.onChangeIndex(indexNew, indexLatest, {\n reason: 'swipe'\n });\n } // Manually calling handleTransitionEnd in that case as isn't otherwise.\n\n\n if (indexCurrent === indexLatest) {\n _this.handleTransitionEnd();\n }\n });\n };\n\n _this.handleTouchStart = function (event) {\n if (_this.props.onTouchStart) {\n _this.props.onTouchStart(event);\n }\n\n _this.handleSwipeStart(event);\n };\n\n _this.handleTouchEnd = function (event) {\n if (_this.props.onTouchEnd) {\n _this.props.onTouchEnd(event);\n }\n\n _this.handleSwipeEnd(event);\n };\n\n _this.handleMouseDown = function (event) {\n if (_this.props.onMouseDown) {\n _this.props.onMouseDown(event);\n }\n\n event.persist();\n\n _this.handleSwipeStart(adaptMouse(event));\n };\n\n _this.handleMouseUp = function (event) {\n if (_this.props.onMouseUp) {\n _this.props.onMouseUp(event);\n }\n\n _this.handleSwipeEnd(adaptMouse(event));\n };\n\n _this.handleMouseLeave = function (event) {\n if (_this.props.onMouseLeave) {\n _this.props.onMouseLeave(event);\n } // Filter out events\n\n\n if (_this.started) {\n _this.handleSwipeEnd(adaptMouse(event));\n }\n };\n\n _this.handleMouseMove = function (event) {\n if (_this.props.onMouseMove) {\n _this.props.onMouseMove(event);\n } // Filter out events\n\n\n if (_this.started) {\n _this.handleSwipeMove(adaptMouse(event));\n }\n };\n\n _this.handleScroll = function (event) {\n if (_this.props.onScroll) {\n _this.props.onScroll(event);\n } // Ignore events bubbling up.\n\n\n if (event.target !== _this.rootNode) {\n return;\n }\n\n if (_this.ignoreNextScrollEvents) {\n _this.ignoreNextScrollEvents = false;\n return;\n }\n\n var indexLatest = _this.state.indexLatest;\n var indexNew = Math.ceil(event.target.scrollLeft / event.target.clientWidth) + indexLatest;\n _this.ignoreNextScrollEvents = true; // Reset the scroll position.\n\n event.target.scrollLeft = 0;\n\n if (_this.props.onChangeIndex && indexNew !== indexLatest) {\n _this.props.onChangeIndex(indexNew, indexLatest, {\n reason: 'focus'\n });\n }\n };\n\n _this.updateHeight = function () {\n if (_this.activeSlide !== null) {\n var child = _this.activeSlide.children[0];\n\n if (child !== undefined && child.offsetHeight !== undefined && _this.state.heightLatest !== child.offsetHeight) {\n _this.setState({\n heightLatest: child.offsetHeight\n });\n }\n }\n };\n\n if (process.env.NODE_ENV !== 'production') {\n (0, _reactSwipeableViewsCore.checkIndexBounds)(props);\n }\n\n _this.state = {\n indexLatest: props.index,\n // Set to true as soon as the component is swiping.\n // It's the state counter part of this.isSwiping.\n isDragging: false,\n // Help with SSR logic and lazy loading logic.\n renderOnlyActive: !props.disableLazyLoading,\n heightLatest: 0,\n // Let the render method that we are going to display the same slide than previously.\n displaySameSlide: true\n };\n\n _this.setIndexCurrent(props.index);\n\n return _this;\n }\n\n (0, _createClass2.default)(SwipeableViews, [{\n key: \"getChildContext\",\n value: function getChildContext() {\n var _this2 = this;\n\n return {\n swipeableViews: {\n slideUpdateHeight: function slideUpdateHeight() {\n _this2.updateHeight();\n }\n }\n };\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this3 = this;\n\n // Subscribe to transition end events.\n this.transitionListener = addEventListenerEnhanced(this.containerNode, _properties.default.end, function (event) {\n if (event.target !== _this3.containerNode) {\n return;\n }\n\n _this3.handleTransitionEnd();\n }); // Block the thread to handle that event.\n\n this.touchMoveListener = addEventListenerEnhanced(this.rootNode, 'touchmove', function (event) {\n // Handling touch events is disabled.\n if (_this3.props.disabled) {\n return;\n }\n\n _this3.handleSwipeMove(event);\n }, {\n passive: false\n });\n\n if (!this.props.disableLazyLoading) {\n this.firstRenderTimeout = setTimeout(function () {\n _this3.setState({\n renderOnlyActive: false\n });\n }, 0);\n } // Send all functions in an object if action param is set.\n\n\n if (this.props.action) {\n this.props.action({\n updateHeight: this.updateHeight\n });\n }\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n var index = nextProps.index;\n\n if (typeof index === 'number' && index !== this.props.index) {\n if (process.env.NODE_ENV !== 'production') {\n (0, _reactSwipeableViewsCore.checkIndexBounds)(nextProps);\n }\n\n this.setIndexCurrent(index);\n this.setState({\n // If true, we are going to change the children. We shoudn't animate it.\n displaySameSlide: (0, _reactSwipeableViewsCore.getDisplaySameSlide)(this.props, nextProps),\n indexLatest: index\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.transitionListener.remove();\n this.touchMoveListener.remove();\n clearTimeout(this.firstRenderTimeout);\n }\n }, {\n key: \"setIndexCurrent\",\n value: function setIndexCurrent(indexCurrent) {\n if (!this.props.animateTransitions && this.indexCurrent !== indexCurrent) {\n this.handleTransitionEnd();\n }\n\n this.indexCurrent = indexCurrent;\n\n if (this.containerNode) {\n var axis = this.props.axis;\n var transform = axisProperties.transform[axis](indexCurrent * 100);\n this.containerNode.style.WebkitTransform = transform;\n this.containerNode.style.transform = transform;\n }\n }\n }, {\n key: \"handleTransitionEnd\",\n value: function handleTransitionEnd() {\n if (!this.props.onTransitionEnd) {\n return;\n } // Filters out when changing the children\n\n\n if (this.state.displaySameSlide) {\n return;\n } // The rest callback is triggered when swiping. It's just noise.\n // We filter it out.\n\n\n if (!this.state.isDragging) {\n this.props.onTransitionEnd();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n var _this$props2 = this.props,\n action = _this$props2.action,\n animateHeight = _this$props2.animateHeight,\n animateTransitions = _this$props2.animateTransitions,\n axis = _this$props2.axis,\n children = _this$props2.children,\n containerStyleProp = _this$props2.containerStyle,\n disabled = _this$props2.disabled,\n disableLazyLoading = _this$props2.disableLazyLoading,\n enableMouseEvents = _this$props2.enableMouseEvents,\n hysteresis = _this$props2.hysteresis,\n ignoreNativeScroll = _this$props2.ignoreNativeScroll,\n index = _this$props2.index,\n onChangeIndex = _this$props2.onChangeIndex,\n onSwitching = _this$props2.onSwitching,\n onTransitionEnd = _this$props2.onTransitionEnd,\n resistance = _this$props2.resistance,\n slideStyleProp = _this$props2.slideStyle,\n slideClassName = _this$props2.slideClassName,\n springConfig = _this$props2.springConfig,\n style = _this$props2.style,\n threshold = _this$props2.threshold,\n other = (0, _objectWithoutProperties2.default)(_this$props2, [\"action\", \"animateHeight\", \"animateTransitions\", \"axis\", \"children\", \"containerStyle\", \"disabled\", \"disableLazyLoading\", \"enableMouseEvents\", \"hysteresis\", \"ignoreNativeScroll\", \"index\", \"onChangeIndex\", \"onSwitching\", \"onTransitionEnd\", \"resistance\", \"slideStyle\", \"slideClassName\", \"springConfig\", \"style\", \"threshold\"]);\n var _this$state = this.state,\n displaySameSlide = _this$state.displaySameSlide,\n heightLatest = _this$state.heightLatest,\n indexLatest = _this$state.indexLatest,\n isDragging = _this$state.isDragging,\n renderOnlyActive = _this$state.renderOnlyActive;\n var touchEvents = !disabled ? {\n onTouchStart: this.handleTouchStart,\n onTouchEnd: this.handleTouchEnd\n } : {};\n var mouseEvents = !disabled && enableMouseEvents ? {\n onMouseDown: this.handleMouseDown,\n onMouseUp: this.handleMouseUp,\n onMouseLeave: this.handleMouseLeave,\n onMouseMove: this.handleMouseMove\n } : {}; // There is no point to animate if we are already providing a height.\n\n process.env.NODE_ENV !== \"production\" ? (0, _warning.default)(!animateHeight || !containerStyleProp || !containerStyleProp.height, \"react-swipeable-view: You are setting animateHeight to true but you are\\nalso providing a custom height.\\nThe custom height has a higher priority than the animateHeight property.\\nSo animateHeight is most likely having no effect at all.\") : void 0;\n var slideStyle = (0, _extends2.default)({}, styles.slide, slideStyleProp);\n var transition;\n var WebkitTransition;\n\n if (isDragging || !animateTransitions || displaySameSlide) {\n transition = 'all 0s ease 0s';\n WebkitTransition = 'all 0s ease 0s';\n } else {\n transition = createTransition('transform', springConfig);\n WebkitTransition = createTransition('-webkit-transform', springConfig);\n\n if (heightLatest !== 0) {\n var additionalTranstion = \", \".concat(createTransition('height', springConfig));\n transition += additionalTranstion;\n WebkitTransition += additionalTranstion;\n }\n }\n\n var containerStyle = {\n height: null,\n WebkitFlexDirection: axisProperties.flexDirection[axis],\n flexDirection: axisProperties.flexDirection[axis],\n WebkitTransition: WebkitTransition,\n transition: transition\n }; // Apply the styles for SSR considerations\n\n if (!renderOnlyActive) {\n var transform = axisProperties.transform[axis](this.indexCurrent * 100);\n containerStyle.WebkitTransform = transform;\n containerStyle.transform = transform;\n }\n\n if (animateHeight) {\n containerStyle.height = heightLatest;\n }\n\n return _react.default.createElement(\"div\", (0, _extends2.default)({\n ref: this.setRootNode,\n style: (0, _extends2.default)({}, axisProperties.root[axis], style)\n }, other, touchEvents, mouseEvents, {\n onScroll: this.handleScroll\n }), _react.default.createElement(\"div\", {\n ref: this.setContainerNode,\n style: (0, _extends2.default)({}, containerStyle, styles.container, containerStyleProp),\n className: \"react-swipeable-view-container\"\n }, _react.default.Children.map(children, function (child, indexChild) {\n if (renderOnlyActive && indexChild !== indexLatest) {\n return null;\n }\n\n process.env.NODE_ENV !== \"production\" ? (0, _warning.default)(_react.default.isValidElement(child), \"react-swipeable-view: one of the children provided is invalid: \".concat(child, \".\\nWe are expecting a valid React Element\")) : void 0;\n var ref;\n var hidden = true;\n\n if (indexChild === indexLatest) {\n hidden = false;\n\n if (animateHeight) {\n ref = _this4.setActiveSlide;\n slideStyle.overflowY = 'hidden';\n }\n }\n\n return _react.default.createElement(\"div\", {\n ref: ref,\n style: slideStyle,\n className: slideClassName,\n \"aria-hidden\": hidden,\n \"data-swipeable\": \"true\"\n }, child);\n })));\n }\n }]);\n return SwipeableViews;\n}(_react.default.Component); // Added as an ads for people using the React dev tools in production.\n// So they know, the tool used to build the awesome UI they\n// are looking at/retro engineering.\n\n\nSwipeableViews.displayName = 'ReactSwipableView';\nSwipeableViews.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * This is callback property. It's called by the component on mount.\n * This is useful when you want to trigger an action programmatically.\n * It currently only supports updateHeight() action.\n *\n * @param {object} actions This object contains all posible actions\n * that can be triggered programmatically.\n */\n action: _propTypes.default.func,\n\n /**\n * If `true`, the height of the container will be animated to match the current slide height.\n * Animating another style property has a negative impact regarding performance.\n */\n animateHeight: _propTypes.default.bool,\n\n /**\n * If `false`, changes to the index prop will not cause an animated transition.\n */\n animateTransitions: _propTypes.default.bool,\n\n /**\n * The axis on which the slides will slide.\n */\n axis: _propTypes.default.oneOf(['x', 'x-reverse', 'y', 'y-reverse']),\n\n /**\n * Use this property to provide your slides.\n */\n children: _propTypes.default.node.isRequired,\n\n /**\n * This is the inlined style that will be applied\n * to each slide container.\n */\n containerStyle: _propTypes.default.object,\n\n /**\n * If `true`, it will disable touch events.\n * This is useful when you want to prohibit the user from changing slides.\n */\n disabled: _propTypes.default.bool,\n\n /**\n * This is the config used to disable lazyloding,\n * if `true` will render all the views in first rendering.\n */\n disableLazyLoading: _propTypes.default.bool,\n\n /**\n * If `true`, it will enable mouse events.\n * This will allow the user to perform the relevant swipe actions with a mouse.\n */\n enableMouseEvents: _propTypes.default.bool,\n\n /**\n * Configure hysteresis between slides. This value determines how far\n * should user swipe to switch slide.\n */\n hysteresis: _propTypes.default.number,\n\n /**\n * If `true`, it will ignore native scroll container.\n * It can be used to filter out false positive that blocks the swipe.\n */\n ignoreNativeScroll: _propTypes.default.bool,\n\n /**\n * This is the index of the slide to show.\n * This is useful when you want to change the default slide shown.\n * Or when you have tabs linked to each slide.\n */\n index: _propTypes.default.number,\n\n /**\n * This is callback prop. It's call by the\n * component when the shown slide change after a swipe made by the user.\n * This is useful when you have tabs linked to each slide.\n *\n * @param {integer} index This is the current index of the slide.\n * @param {integer} indexLatest This is the oldest index of the slide.\n * @param {object} meta Meta data containing more information about the event.\n */\n onChangeIndex: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onMouseDown: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onMouseLeave: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onMouseMove: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onMouseUp: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onScroll: _propTypes.default.func,\n\n /**\n * This is callback prop. It's called by the\n * component when the slide switching.\n * This is useful when you want to implement something corresponding\n * to the current slide position.\n *\n * @param {integer} index This is the current index of the slide.\n * @param {string} type Can be either `move` or `end`.\n */\n onSwitching: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onTouchEnd: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onTouchMove: _propTypes.default.func,\n\n /**\n * @ignore\n */\n onTouchStart: _propTypes.default.func,\n\n /**\n * The callback that fires when the animation comes to a rest.\n * This is useful to defer CPU intensive task.\n */\n onTransitionEnd: _propTypes.default.func,\n\n /**\n * If `true`, it will add bounds effect on the edges.\n */\n resistance: _propTypes.default.bool,\n\n /**\n * This is the className that will be applied\n * on the slide component.\n */\n slideClassName: _propTypes.default.string,\n\n /**\n * This is the inlined style that will be applied\n * on the slide component.\n */\n slideStyle: _propTypes.default.object,\n\n /**\n * This is the config used to create CSS transitions.\n * This is useful to change the dynamic of the transition.\n */\n springConfig: _propTypes.default.shape({\n delay: _propTypes.default.string,\n duration: _propTypes.default.string,\n easeFunction: _propTypes.default.string\n }),\n\n /**\n * This is the inlined style that will be applied\n * on the root component.\n */\n style: _propTypes.default.object,\n\n /**\n * This is the threshold used for detecting a quick swipe.\n * If the computed speed is above this value, the index change.\n */\n threshold: _propTypes.default.number\n} : {};\nSwipeableViews.defaultProps = {\n animateHeight: false,\n animateTransitions: true,\n axis: 'x',\n disabled: false,\n disableLazyLoading: false,\n enableMouseEvents: false,\n hysteresis: 0.6,\n ignoreNativeScroll: false,\n index: 0,\n threshold: 5,\n springConfig: {\n duration: '0.35s',\n easeFunction: 'cubic-bezier(0.15, 0.3, 0.25, 1)',\n delay: '0s'\n },\n resistance: false\n};\nSwipeableViews.childContextTypes = {\n swipeableViews: _propTypes.default.shape({\n slideUpdateHeight: _propTypes.default.func\n })\n};\nvar _default = SwipeableViews;\nexports.default = _default;","function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nexport default class Icon extends React.PureComponent {\n\n static propTypes = {\n id: PropTypes.string.isRequired,\n className: PropTypes.string,\n fixedWidth: PropTypes.bool,\n };\n\n render () {\n const { id, className, fixedWidth, ...other } = this.props;\n\n return (\n <i role='img' className={classNames('fa', `fa-${id}`, className, { 'fa-fw': fixedWidth })} {...other} />\n );\n }\n\n}\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"checkIndexBounds\", {\n enumerable: true,\n get: function get() {\n return _checkIndexBounds.default;\n }\n});\nObject.defineProperty(exports, \"computeIndex\", {\n enumerable: true,\n get: function get() {\n return _computeIndex.default;\n }\n});\nObject.defineProperty(exports, \"constant\", {\n enumerable: true,\n get: function get() {\n return _constant.default;\n }\n});\nObject.defineProperty(exports, \"getDisplaySameSlide\", {\n enumerable: true,\n get: function get() {\n return _getDisplaySameSlide.default;\n }\n});\nObject.defineProperty(exports, \"mod\", {\n enumerable: true,\n get: function get() {\n return _mod.default;\n }\n});\n\nvar _checkIndexBounds = _interopRequireDefault(require(\"./checkIndexBounds\"));\n\nvar _computeIndex = _interopRequireDefault(require(\"./computeIndex\"));\n\nvar _constant = _interopRequireDefault(require(\"./constant\"));\n\nvar _getDisplaySameSlide = _interopRequireDefault(require(\"./getDisplaySameSlide\"));\n\nvar _mod = _interopRequireDefault(require(\"./mod\"));","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _warning = _interopRequireDefault(require(\"warning\"));\n\nvar checkIndexBounds = function checkIndexBounds(props) {\n var index = props.index,\n children = props.children;\n\n var childrenCount = _react.default.Children.count(children);\n\n process.env.NODE_ENV !== \"production\" ? (0, _warning.default)(index >= 0 && index <= childrenCount, \"react-swipeable-view: the new index: \".concat(index, \" is out of bounds: [0-\").concat(childrenCount, \"].\")) : void 0;\n};\n\nvar _default = checkIndexBounds;\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = computeIndex;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _constant = _interopRequireDefault(require(\"./constant\"));\n\nfunction computeIndex(params) {\n var children = params.children,\n startIndex = params.startIndex,\n startX = params.startX,\n pageX = params.pageX,\n viewLength = params.viewLength,\n resistance = params.resistance;\n var indexMax = _react.default.Children.count(children) - 1;\n var index = startIndex + (startX - pageX) / viewLength;\n var newStartX;\n\n if (!resistance) {\n // Reset the starting point\n if (index < 0) {\n index = 0;\n newStartX = (index - startIndex) * viewLength + pageX;\n } else if (index > indexMax) {\n index = indexMax;\n newStartX = (index - startIndex) * viewLength + pageX;\n }\n } else if (index < 0) {\n index = Math.exp(index * _constant.default.RESISTANCE_COEF) - 1;\n } else if (index > indexMax) {\n index = indexMax + 1 - Math.exp((indexMax - index) * _constant.default.RESISTANCE_COEF);\n }\n\n return {\n index: index,\n startX: newStartX\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar getDisplaySameSlide = function getDisplaySameSlide(props, nextProps) {\n var displaySameSlide = false;\n\n if (props.children.length && nextProps.children.length) {\n var oldChildren = props.children[props.index];\n var oldKey = oldChildren ? oldChildren.key : 'empty';\n\n if (oldKey !== null) {\n var newChildren = nextProps.children[nextProps.index];\n var newKey = newChildren ? newChildren.key : 'empty';\n\n if (oldKey === newKey) {\n displaySameSlide = true;\n }\n }\n }\n\n return displaySameSlide;\n};\n\nvar _default = getDisplaySameSlide;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n// Extended version of % with negative integer support.\nfunction mod(n, m) {\n var q = n % m;\n return q < 0 ? q + m : q;\n}\n\nvar _default = mod;\nexports.default = _default;","import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class ExtendedVideoPlayer extends React.PureComponent {\n\n static propTypes = {\n src: PropTypes.string.isRequired,\n alt: PropTypes.string,\n width: PropTypes.number,\n height: PropTypes.number,\n time: PropTypes.number,\n controls: PropTypes.bool.isRequired,\n muted: PropTypes.bool.isRequired,\n onClick: PropTypes.func,\n };\n\n handleLoadedData = () => {\n if (this.props.time) {\n this.video.currentTime = this.props.time;\n }\n }\n\n componentDidMount () {\n this.video.addEventListener('loadeddata', this.handleLoadedData);\n }\n\n componentWillUnmount () {\n this.video.removeEventListener('loadeddata', this.handleLoadedData);\n }\n\n setRef = (c) => {\n this.video = c;\n }\n\n handleClick = e => {\n e.stopPropagation();\n const handler = this.props.onClick;\n if (handler) handler();\n }\n\n render () {\n const { src, muted, controls, alt } = this.props;\n\n return (\n <div className='extended-video-player'>\n <video\n ref={this.setRef}\n src={src}\n autoPlay\n role='button'\n tabIndex='0'\n aria-label={alt}\n title={alt}\n muted={muted}\n controls={controls}\n loop={!controls}\n onClick={this.handleClick}\n />\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport ReactSwipeableViews from 'react-swipeable-views';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport Video from '../../video';\nimport ExtendedVideoPlayer from '../../../components/extended_video_player';\nimport classNames from 'classnames';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport IconButton from '../../../components/icon_button';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ImageLoader from './image_loader';\nimport Icon from 'mastodon/components/icon';\n\nconst messages = defineMessages({\n close: { id: 'lightbox.close', defaultMessage: 'Close' },\n previous: { id: 'lightbox.previous', defaultMessage: 'Previous' },\n next: { id: 'lightbox.next', defaultMessage: 'Next' },\n});\n\nexport const previewState = 'previewMediaModal';\n\nexport default @injectIntl\nclass MediaModal extends ImmutablePureComponent {\n\n static propTypes = {\n media: ImmutablePropTypes.list.isRequired,\n index: PropTypes.number.isRequired,\n onClose: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n state = {\n index: null,\n navigationHidden: false,\n };\n\n handleSwipe = (index) => {\n this.setState({ index: index % this.props.media.size });\n }\n\n handleNextClick = () => {\n this.setState({ index: (this.getIndex() + 1) % this.props.media.size });\n }\n\n handlePrevClick = () => {\n this.setState({ index: (this.props.media.size + this.getIndex() - 1) % this.props.media.size });\n }\n\n handleChangeIndex = (e) => {\n const index = Number(e.currentTarget.getAttribute('data-index'));\n this.setState({ index: index % this.props.media.size });\n }\n\n handleKeyDown = (e) => {\n switch(e.key) {\n case 'ArrowLeft':\n this.handlePrevClick();\n e.preventDefault();\n e.stopPropagation();\n break;\n case 'ArrowRight':\n this.handleNextClick();\n e.preventDefault();\n e.stopPropagation();\n break;\n }\n }\n\n componentDidMount () {\n window.addEventListener('keydown', this.handleKeyDown, false);\n if (this.context.router) {\n const history = this.context.router.history;\n history.push(history.location.pathname, previewState);\n this.unlistenHistory = history.listen(() => {\n this.props.onClose();\n });\n }\n }\n\n componentWillUnmount () {\n window.removeEventListener('keydown', this.handleKeyDown);\n if (this.context.router) {\n this.unlistenHistory();\n\n if (this.context.router.history.location.state === previewState) {\n this.context.router.history.goBack();\n }\n }\n }\n\n getIndex () {\n return this.state.index !== null ? this.state.index : this.props.index;\n }\n\n toggleNavigation = () => {\n this.setState(prevState => ({\n navigationHidden: !prevState.navigationHidden,\n }));\n };\n\n render () {\n const { media, intl, onClose } = this.props;\n const { navigationHidden } = this.state;\n\n const index = this.getIndex();\n let pagination = [];\n\n const leftNav = media.size > 1 && <button tabIndex='0' className='media-modal__nav media-modal__nav--left' onClick={this.handlePrevClick} aria-label={intl.formatMessage(messages.previous)}><Icon id='chevron-left' fixedWidth /></button>;\n const rightNav = media.size > 1 && <button tabIndex='0' className='media-modal__nav media-modal__nav--right' onClick={this.handleNextClick} aria-label={intl.formatMessage(messages.next)}><Icon id='chevron-right' fixedWidth /></button>;\n\n if (media.size > 1) {\n pagination = media.map((item, i) => {\n const classes = ['media-modal__button'];\n if (i === index) {\n classes.push('media-modal__button--active');\n }\n return (<li className='media-modal__page-dot' key={i}><button tabIndex='0' className={classes.join(' ')} onClick={this.handleChangeIndex} data-index={i}>{i + 1}</button></li>);\n });\n }\n\n const content = media.map((image) => {\n const width = image.getIn(['meta', 'original', 'width']) || null;\n const height = image.getIn(['meta', 'original', 'height']) || null;\n\n if (image.get('type') === 'image') {\n return (\n <ImageLoader\n previewSrc={image.get('preview_url')}\n src={image.get('url')}\n width={width}\n height={height}\n alt={image.get('description')}\n key={image.get('url')}\n onClick={this.toggleNavigation}\n />\n );\n } else if (image.get('type') === 'video') {\n const { time } = this.props;\n\n return (\n <Video\n preview={image.get('preview_url')}\n src={image.get('url')}\n width={image.get('width')}\n height={image.get('height')}\n startTime={time || 0}\n onCloseVideo={onClose}\n detailed\n alt={image.get('description')}\n key={image.get('url')}\n />\n );\n } else if (image.get('type') === 'gifv') {\n return (\n <ExtendedVideoPlayer\n src={image.get('url')}\n muted\n controls={false}\n width={width}\n height={height}\n key={image.get('preview_url')}\n alt={image.get('description')}\n onClick={this.toggleNavigation}\n />\n );\n }\n\n return null;\n }).toArray();\n\n // you can't use 100vh, because the viewport height is taller\n // than the visible part of the document in some mobile\n // browsers when it's address bar is visible.\n // https://developers.google.com/web/updates/2016/12/url-bar-resizing\n const swipeableViewsStyle = {\n width: '100%',\n height: '100%',\n };\n\n const containerStyle = {\n alignItems: 'center', // center vertically\n };\n\n const navigationClassName = classNames('media-modal__navigation', {\n 'media-modal__navigation--hidden': navigationHidden,\n });\n\n return (\n <div className='modal-root__modal media-modal'>\n <div\n className='media-modal__closer'\n role='presentation'\n onClick={onClose}\n >\n <ReactSwipeableViews\n style={swipeableViewsStyle}\n containerStyle={containerStyle}\n onChangeIndex={this.handleSwipe}\n onSwitching={this.handleSwitching}\n index={index}\n >\n {content}\n </ReactSwipeableViews>\n </div>\n <div className={navigationClassName}>\n <IconButton className='media-modal__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={40} />\n {leftNav}\n {rightNav}\n <ul className='media-modal__pagination'>\n {pagination}\n </ul>\n </div>\n </div>\n );\n }\n\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.Immutable = factory());\n}(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice;\n\n function createClass(ctor, superClass) {\n if (superClass) {\n ctor.prototype = Object.create(superClass.prototype);\n }\n ctor.prototype.constructor = ctor;\n }\n\n function Iterable(value) {\n return isIterable(value) ? value : Seq(value);\n }\n\n\n createClass(KeyedIterable, Iterable);\n function KeyedIterable(value) {\n return isKeyed(value) ? value : KeyedSeq(value);\n }\n\n\n createClass(IndexedIterable, Iterable);\n function IndexedIterable(value) {\n return isIndexed(value) ? value : IndexedSeq(value);\n }\n\n\n createClass(SetIterable, Iterable);\n function SetIterable(value) {\n return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);\n }\n\n\n\n function isIterable(maybeIterable) {\n return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);\n }\n\n function isKeyed(maybeKeyed) {\n return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);\n }\n\n function isIndexed(maybeIndexed) {\n return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);\n }\n\n function isAssociative(maybeAssociative) {\n return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n }\n\n function isOrdered(maybeOrdered) {\n return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);\n }\n\n Iterable.isIterable = isIterable;\n Iterable.isKeyed = isKeyed;\n Iterable.isIndexed = isIndexed;\n Iterable.isAssociative = isAssociative;\n Iterable.isOrdered = isOrdered;\n\n Iterable.Keyed = KeyedIterable;\n Iterable.Indexed = IndexedIterable;\n Iterable.Set = SetIterable;\n\n\n var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n // Used for setting prototype methods that IE8 chokes on.\n var DELETE = 'delete';\n\n // Constants describing the size of trie nodes.\n var SHIFT = 5; // Resulted in best performance after ______?\n var SIZE = 1 << SHIFT;\n var MASK = SIZE - 1;\n\n // A consistent shared value representing \"not set\" which equals nothing other\n // than itself, and nothing that could be provided externally.\n var NOT_SET = {};\n\n // Boolean references, Rough equivalent of `bool &`.\n var CHANGE_LENGTH = { value: false };\n var DID_ALTER = { value: false };\n\n function MakeRef(ref) {\n ref.value = false;\n return ref;\n }\n\n function SetRef(ref) {\n ref && (ref.value = true);\n }\n\n // A function which returns a value representing an \"owner\" for transient writes\n // to tries. The return value will only ever equal itself, and will not equal\n // the return of any subsequent call of this function.\n function OwnerID() {}\n\n // http://jsperf.com/copy-array-inline\n function arrCopy(arr, offset) {\n offset = offset || 0;\n var len = Math.max(0, arr.length - offset);\n var newArr = new Array(len);\n for (var ii = 0; ii < len; ii++) {\n newArr[ii] = arr[ii + offset];\n }\n return newArr;\n }\n\n function ensureSize(iter) {\n if (iter.size === undefined) {\n iter.size = iter.__iterate(returnTrue);\n }\n return iter.size;\n }\n\n function wrapIndex(iter, index) {\n // This implements \"is array index\" which the ECMAString spec defines as:\n //\n // A String property name P is an array index if and only if\n // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal\n // to 2^32−1.\n //\n // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects\n if (typeof index !== 'number') {\n var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32\n if ('' + uint32Index !== index || uint32Index === 4294967295) {\n return NaN;\n }\n index = uint32Index;\n }\n return index < 0 ? ensureSize(iter) + index : index;\n }\n\n function returnTrue() {\n return true;\n }\n\n function wholeSlice(begin, end, size) {\n return (begin === 0 || (size !== undefined && begin <= -size)) &&\n (end === undefined || (size !== undefined && end >= size));\n }\n\n function resolveBegin(begin, size) {\n return resolveIndex(begin, size, 0);\n }\n\n function resolveEnd(end, size) {\n return resolveIndex(end, size, size);\n }\n\n function resolveIndex(index, size, defaultIndex) {\n return index === undefined ?\n defaultIndex :\n index < 0 ?\n Math.max(0, size + index) :\n size === undefined ?\n index :\n Math.min(size, index);\n }\n\n /* global Symbol */\n\n var ITERATE_KEYS = 0;\n var ITERATE_VALUES = 1;\n var ITERATE_ENTRIES = 2;\n\n var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator';\n\n var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\n\n function Iterator(next) {\n this.next = next;\n }\n\n Iterator.prototype.toString = function() {\n return '[Iterator]';\n };\n\n\n Iterator.KEYS = ITERATE_KEYS;\n Iterator.VALUES = ITERATE_VALUES;\n Iterator.ENTRIES = ITERATE_ENTRIES;\n\n Iterator.prototype.inspect =\n Iterator.prototype.toSource = function () { return this.toString(); }\n Iterator.prototype[ITERATOR_SYMBOL] = function () {\n return this;\n };\n\n\n function iteratorValue(type, k, v, iteratorResult) {\n var value = type === 0 ? k : type === 1 ? v : [k, v];\n iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {\n value: value, done: false\n });\n return iteratorResult;\n }\n\n function iteratorDone() {\n return { value: undefined, done: true };\n }\n\n function hasIterator(maybeIterable) {\n return !!getIteratorFn(maybeIterable);\n }\n\n function isIterator(maybeIterator) {\n return maybeIterator && typeof maybeIterator.next === 'function';\n }\n\n function getIterator(iterable) {\n var iteratorFn = getIteratorFn(iterable);\n return iteratorFn && iteratorFn.call(iterable);\n }\n\n function getIteratorFn(iterable) {\n var iteratorFn = iterable && (\n (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||\n iterable[FAUX_ITERATOR_SYMBOL]\n );\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n function isArrayLike(value) {\n return value && typeof value.length === 'number';\n }\n\n createClass(Seq, Iterable);\n function Seq(value) {\n return value === null || value === undefined ? emptySequence() :\n isIterable(value) ? value.toSeq() : seqFromValue(value);\n }\n\n Seq.of = function(/*...values*/) {\n return Seq(arguments);\n };\n\n Seq.prototype.toSeq = function() {\n return this;\n };\n\n Seq.prototype.toString = function() {\n return this.__toString('Seq {', '}');\n };\n\n Seq.prototype.cacheResult = function() {\n if (!this._cache && this.__iterateUncached) {\n this._cache = this.entrySeq().toArray();\n this.size = this._cache.length;\n }\n return this;\n };\n\n // abstract __iterateUncached(fn, reverse)\n\n Seq.prototype.__iterate = function(fn, reverse) {\n return seqIterate(this, fn, reverse, true);\n };\n\n // abstract __iteratorUncached(type, reverse)\n\n Seq.prototype.__iterator = function(type, reverse) {\n return seqIterator(this, type, reverse, true);\n };\n\n\n\n createClass(KeyedSeq, Seq);\n function KeyedSeq(value) {\n return value === null || value === undefined ?\n emptySequence().toKeyedSeq() :\n isIterable(value) ?\n (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) :\n keyedSeqFromValue(value);\n }\n\n KeyedSeq.prototype.toKeyedSeq = function() {\n return this;\n };\n\n\n\n createClass(IndexedSeq, Seq);\n function IndexedSeq(value) {\n return value === null || value === undefined ? emptySequence() :\n !isIterable(value) ? indexedSeqFromValue(value) :\n isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n }\n\n IndexedSeq.of = function(/*...values*/) {\n return IndexedSeq(arguments);\n };\n\n IndexedSeq.prototype.toIndexedSeq = function() {\n return this;\n };\n\n IndexedSeq.prototype.toString = function() {\n return this.__toString('Seq [', ']');\n };\n\n IndexedSeq.prototype.__iterate = function(fn, reverse) {\n return seqIterate(this, fn, reverse, false);\n };\n\n IndexedSeq.prototype.__iterator = function(type, reverse) {\n return seqIterator(this, type, reverse, false);\n };\n\n\n\n createClass(SetSeq, Seq);\n function SetSeq(value) {\n return (\n value === null || value === undefined ? emptySequence() :\n !isIterable(value) ? indexedSeqFromValue(value) :\n isKeyed(value) ? value.entrySeq() : value\n ).toSetSeq();\n }\n\n SetSeq.of = function(/*...values*/) {\n return SetSeq(arguments);\n };\n\n SetSeq.prototype.toSetSeq = function() {\n return this;\n };\n\n\n\n Seq.isSeq = isSeq;\n Seq.Keyed = KeyedSeq;\n Seq.Set = SetSeq;\n Seq.Indexed = IndexedSeq;\n\n var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n\n Seq.prototype[IS_SEQ_SENTINEL] = true;\n\n\n\n createClass(ArraySeq, IndexedSeq);\n function ArraySeq(array) {\n this._array = array;\n this.size = array.length;\n }\n\n ArraySeq.prototype.get = function(index, notSetValue) {\n return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n };\n\n ArraySeq.prototype.__iterate = function(fn, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n ArraySeq.prototype.__iterator = function(type, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n var ii = 0;\n return new Iterator(function() \n {return ii > maxIndex ?\n iteratorDone() :\n iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])}\n );\n };\n\n\n\n createClass(ObjectSeq, KeyedSeq);\n function ObjectSeq(object) {\n var keys = Object.keys(object);\n this._object = object;\n this._keys = keys;\n this.size = keys.length;\n }\n\n ObjectSeq.prototype.get = function(key, notSetValue) {\n if (notSetValue !== undefined && !this.has(key)) {\n return notSetValue;\n }\n return this._object[key];\n };\n\n ObjectSeq.prototype.has = function(key) {\n return this._object.hasOwnProperty(key);\n };\n\n ObjectSeq.prototype.__iterate = function(fn, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var key = keys[reverse ? maxIndex - ii : ii];\n if (fn(object[key], key, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n ObjectSeq.prototype.__iterator = function(type, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n var ii = 0;\n return new Iterator(function() {\n var key = keys[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ?\n iteratorDone() :\n iteratorValue(type, key, object[key]);\n });\n };\n\n ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n createClass(IterableSeq, IndexedSeq);\n function IterableSeq(iterable) {\n this._iterable = iterable;\n this.size = iterable.length || iterable.size;\n }\n\n IterableSeq.prototype.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n var iterations = 0;\n if (isIterator(iterator)) {\n var step;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n }\n return iterations;\n };\n\n IterableSeq.prototype.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n if (!isIterator(iterator)) {\n return new Iterator(iteratorDone);\n }\n var iterations = 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value);\n });\n };\n\n\n\n createClass(IteratorSeq, IndexedSeq);\n function IteratorSeq(iterator) {\n this._iterator = iterator;\n this._iteratorCache = [];\n }\n\n IteratorSeq.prototype.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n while (iterations < cache.length) {\n if (fn(cache[iterations], iterations++, this) === false) {\n return iterations;\n }\n }\n var step;\n while (!(step = iterator.next()).done) {\n var val = step.value;\n cache[iterations] = val;\n if (fn(val, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n\n IteratorSeq.prototype.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n return new Iterator(function() {\n if (iterations >= cache.length) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n cache[iterations] = step.value;\n }\n return iteratorValue(type, iterations, cache[iterations++]);\n });\n };\n\n\n\n\n // # pragma Helper functions\n\n function isSeq(maybeSeq) {\n return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n }\n\n var EMPTY_SEQ;\n\n function emptySequence() {\n return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n }\n\n function keyedSeqFromValue(value) {\n var seq =\n Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() :\n isIterator(value) ? new IteratorSeq(value).fromEntrySeq() :\n hasIterator(value) ? new IterableSeq(value).fromEntrySeq() :\n typeof value === 'object' ? new ObjectSeq(value) :\n undefined;\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of [k, v] entries, '+\n 'or keyed object: ' + value\n );\n }\n return seq;\n }\n\n function indexedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of values: ' + value\n );\n }\n return seq;\n }\n\n function seqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value) ||\n (typeof value === 'object' && new ObjectSeq(value));\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of values, or keyed object: ' + value\n );\n }\n return seq;\n }\n\n function maybeIndexedSeqFromValue(value) {\n return (\n isArrayLike(value) ? new ArraySeq(value) :\n isIterator(value) ? new IteratorSeq(value) :\n hasIterator(value) ? new IterableSeq(value) :\n undefined\n );\n }\n\n function seqIterate(seq, fn, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var entry = cache[reverse ? maxIndex - ii : ii];\n if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n return ii + 1;\n }\n }\n return ii;\n }\n return seq.__iterateUncached(fn, reverse);\n }\n\n function seqIterator(seq, type, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n var ii = 0;\n return new Iterator(function() {\n var entry = cache[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ?\n iteratorDone() :\n iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n });\n }\n return seq.__iteratorUncached(type, reverse);\n }\n\n function fromJS(json, converter) {\n return converter ?\n fromJSWith(converter, json, '', {'': json}) :\n fromJSDefault(json);\n }\n\n function fromJSWith(converter, json, key, parentJSON) {\n if (Array.isArray(json)) {\n return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));\n }\n if (isPlainObj(json)) {\n return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));\n }\n return json;\n }\n\n function fromJSDefault(json) {\n if (Array.isArray(json)) {\n return IndexedSeq(json).map(fromJSDefault).toList();\n }\n if (isPlainObj(json)) {\n return KeyedSeq(json).map(fromJSDefault).toMap();\n }\n return json;\n }\n\n function isPlainObj(value) {\n return value && (value.constructor === Object || value.constructor === undefined);\n }\n\n /**\n * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n *\n * NaN is considered the same as NaN, however -0 and 0 are considered the same\n * value, which is different from the algorithm described by\n * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n *\n * This is extended further to allow Objects to describe the values they\n * represent, by way of `valueOf` or `equals` (and `hashCode`).\n *\n * Note: because of this extension, the key equality of Immutable.Map and the\n * value equality of Immutable.Set will differ from ES6 Map and Set.\n *\n * ### Defining custom values\n *\n * The easiest way to describe the value an object represents is by implementing\n * `valueOf`. For example, `Date` represents a value by returning a unix\n * timestamp for `valueOf`:\n *\n * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n * var date2 = new Date(1234567890000);\n * date1.valueOf(); // 1234567890000\n * assert( date1 !== date2 );\n * assert( Immutable.is( date1, date2 ) );\n *\n * Note: overriding `valueOf` may have other implications if you use this object\n * where JavaScript expects a primitive, such as implicit string coercion.\n *\n * For more complex types, especially collections, implementing `valueOf` may\n * not be performant. An alternative is to implement `equals` and `hashCode`.\n *\n * `equals` takes another object, presumably of similar type, and returns true\n * if the it is equal. Equality is symmetrical, so the same result should be\n * returned if this and the argument are flipped.\n *\n * assert( a.equals(b) === b.equals(a) );\n *\n * `hashCode` returns a 32bit integer number representing the object which will\n * be used to determine how to store the value object in a Map or Set. You must\n * provide both or neither methods, one must not exist without the other.\n *\n * Also, an important relationship between these methods must be upheld: if two\n * values are equal, they *must* return the same hashCode. If the values are not\n * equal, they might have the same hashCode; this is called a hash collision,\n * and while undesirable for performance reasons, it is acceptable.\n *\n * if (a.equals(b)) {\n * assert( a.hashCode() === b.hashCode() );\n * }\n *\n * All Immutable collections implement `equals` and `hashCode`.\n *\n */\n function is(valueA, valueB) {\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n if (typeof valueA.valueOf === 'function' &&\n typeof valueB.valueOf === 'function') {\n valueA = valueA.valueOf();\n valueB = valueB.valueOf();\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n }\n if (typeof valueA.equals === 'function' &&\n typeof valueB.equals === 'function' &&\n valueA.equals(valueB)) {\n return true;\n }\n return false;\n }\n\n function deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (\n !isIterable(b) ||\n a.size !== undefined && b.size !== undefined && a.size !== b.size ||\n a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash ||\n isKeyed(a) !== isKeyed(b) ||\n isIndexed(a) !== isIndexed(b) ||\n isOrdered(a) !== isOrdered(b)\n ) {\n return false;\n }\n\n if (a.size === 0 && b.size === 0) {\n return true;\n }\n\n var notAssociative = !isAssociative(a);\n\n if (isOrdered(a)) {\n var entries = a.entries();\n return b.every(function(v, k) {\n var entry = entries.next().value;\n return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n }) && entries.next().done;\n }\n\n var flipped = false;\n\n if (a.size === undefined) {\n if (b.size === undefined) {\n if (typeof a.cacheResult === 'function') {\n a.cacheResult();\n }\n } else {\n flipped = true;\n var _ = a;\n a = b;\n b = _;\n }\n }\n\n var allEqual = true;\n var bSize = b.__iterate(function(v, k) {\n if (notAssociative ? !a.has(v) :\n flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {\n allEqual = false;\n return false;\n }\n });\n\n return allEqual && a.size === bSize;\n }\n\n createClass(Repeat, IndexedSeq);\n\n function Repeat(value, times) {\n if (!(this instanceof Repeat)) {\n return new Repeat(value, times);\n }\n this._value = value;\n this.size = times === undefined ? Infinity : Math.max(0, times);\n if (this.size === 0) {\n if (EMPTY_REPEAT) {\n return EMPTY_REPEAT;\n }\n EMPTY_REPEAT = this;\n }\n }\n\n Repeat.prototype.toString = function() {\n if (this.size === 0) {\n return 'Repeat []';\n }\n return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n };\n\n Repeat.prototype.get = function(index, notSetValue) {\n return this.has(index) ? this._value : notSetValue;\n };\n\n Repeat.prototype.includes = function(searchValue) {\n return is(this._value, searchValue);\n };\n\n Repeat.prototype.slice = function(begin, end) {\n var size = this.size;\n return wholeSlice(begin, end, size) ? this :\n new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n };\n\n Repeat.prototype.reverse = function() {\n return this;\n };\n\n Repeat.prototype.indexOf = function(searchValue) {\n if (is(this._value, searchValue)) {\n return 0;\n }\n return -1;\n };\n\n Repeat.prototype.lastIndexOf = function(searchValue) {\n if (is(this._value, searchValue)) {\n return this.size;\n }\n return -1;\n };\n\n Repeat.prototype.__iterate = function(fn, reverse) {\n for (var ii = 0; ii < this.size; ii++) {\n if (fn(this._value, ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this;\n var ii = 0;\n return new Iterator(function() \n {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()}\n );\n };\n\n Repeat.prototype.equals = function(other) {\n return other instanceof Repeat ?\n is(this._value, other._value) :\n deepEqual(other);\n };\n\n\n var EMPTY_REPEAT;\n\n function invariant(condition, error) {\n if (!condition) throw new Error(error);\n }\n\n createClass(Range, IndexedSeq);\n\n function Range(start, end, step) {\n if (!(this instanceof Range)) {\n return new Range(start, end, step);\n }\n invariant(step !== 0, 'Cannot step a Range by 0');\n start = start || 0;\n if (end === undefined) {\n end = Infinity;\n }\n step = step === undefined ? 1 : Math.abs(step);\n if (end < start) {\n step = -step;\n }\n this._start = start;\n this._end = end;\n this._step = step;\n this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n if (this.size === 0) {\n if (EMPTY_RANGE) {\n return EMPTY_RANGE;\n }\n EMPTY_RANGE = this;\n }\n }\n\n Range.prototype.toString = function() {\n if (this.size === 0) {\n return 'Range []';\n }\n return 'Range [ ' +\n this._start + '...' + this._end +\n (this._step !== 1 ? ' by ' + this._step : '') +\n ' ]';\n };\n\n Range.prototype.get = function(index, notSetValue) {\n return this.has(index) ?\n this._start + wrapIndex(this, index) * this._step :\n notSetValue;\n };\n\n Range.prototype.includes = function(searchValue) {\n var possibleIndex = (searchValue - this._start) / this._step;\n return possibleIndex >= 0 &&\n possibleIndex < this.size &&\n possibleIndex === Math.floor(possibleIndex);\n };\n\n Range.prototype.slice = function(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n begin = resolveBegin(begin, this.size);\n end = resolveEnd(end, this.size);\n if (end <= begin) {\n return new Range(0, 0);\n }\n return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n };\n\n Range.prototype.indexOf = function(searchValue) {\n var offsetValue = searchValue - this._start;\n if (offsetValue % this._step === 0) {\n var index = offsetValue / this._step;\n if (index >= 0 && index < this.size) {\n return index\n }\n }\n return -1;\n };\n\n Range.prototype.lastIndexOf = function(searchValue) {\n return this.indexOf(searchValue);\n };\n\n Range.prototype.__iterate = function(fn, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(value, ii, this) === false) {\n return ii + 1;\n }\n value += reverse ? -step : step;\n }\n return ii;\n };\n\n Range.prototype.__iterator = function(type, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n var ii = 0;\n return new Iterator(function() {\n var v = value;\n value += reverse ? -step : step;\n return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n });\n };\n\n Range.prototype.equals = function(other) {\n return other instanceof Range ?\n this._start === other._start &&\n this._end === other._end &&\n this._step === other._step :\n deepEqual(this, other);\n };\n\n\n var EMPTY_RANGE;\n\n createClass(Collection, Iterable);\n function Collection() {\n throw TypeError('Abstract');\n }\n\n\n createClass(KeyedCollection, Collection);function KeyedCollection() {}\n\n createClass(IndexedCollection, Collection);function IndexedCollection() {}\n\n createClass(SetCollection, Collection);function SetCollection() {}\n\n\n Collection.Keyed = KeyedCollection;\n Collection.Indexed = IndexedCollection;\n Collection.Set = SetCollection;\n\n var imul =\n typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ?\n Math.imul :\n function imul(a, b) {\n a = a | 0; // int\n b = b | 0; // int\n var c = a & 0xffff;\n var d = b & 0xffff;\n // Shift by 0 fixes the sign on the high part.\n return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int\n };\n\n // v8 has an optimization for storing 31-bit signed numbers.\n // Values which have either 00 or 11 as the high order bits qualify.\n // This function drops the highest order bit in a signed number, maintaining\n // the sign bit.\n function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }\n\n function hash(o) {\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n if (typeof o.valueOf === 'function') {\n o = o.valueOf();\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n }\n if (o === true) {\n return 1;\n }\n var type = typeof o;\n if (type === 'number') {\n if (o !== o || o === Infinity) {\n return 0;\n }\n var h = o | 0;\n if (h !== o) {\n h ^= o * 0xFFFFFFFF;\n }\n while (o > 0xFFFFFFFF) {\n o /= 0xFFFFFFFF;\n h ^= o;\n }\n return smi(h);\n }\n if (type === 'string') {\n return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n }\n if (typeof o.hashCode === 'function') {\n return o.hashCode();\n }\n if (type === 'object') {\n return hashJSObj(o);\n }\n if (typeof o.toString === 'function') {\n return hashString(o.toString());\n }\n throw new Error('Value type ' + type + ' cannot be hashed.');\n }\n\n function cachedHashString(string) {\n var hash = stringHashCache[string];\n if (hash === undefined) {\n hash = hashString(string);\n if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n STRING_HASH_CACHE_SIZE = 0;\n stringHashCache = {};\n }\n STRING_HASH_CACHE_SIZE++;\n stringHashCache[string] = hash;\n }\n return hash;\n }\n\n // http://jsperf.com/hashing-strings\n function hashString(string) {\n // This is the hash from JVM\n // The hash code for a string is computed as\n // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n // where s[i] is the ith character of the string and n is the length of\n // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n // (exclusive) by dropping high bits.\n var hash = 0;\n for (var ii = 0; ii < string.length; ii++) {\n hash = 31 * hash + string.charCodeAt(ii) | 0;\n }\n return smi(hash);\n }\n\n function hashJSObj(obj) {\n var hash;\n if (usingWeakMap) {\n hash = weakMap.get(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = obj[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n\n if (!canDefineProperty) {\n hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n\n hash = getIENodeHash(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = ++objHashUID;\n if (objHashUID & 0x40000000) {\n objHashUID = 0;\n }\n\n if (usingWeakMap) {\n weakMap.set(obj, hash);\n } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n throw new Error('Non-extensible objects are not allowed as keys.');\n } else if (canDefineProperty) {\n Object.defineProperty(obj, UID_HASH_KEY, {\n 'enumerable': false,\n 'configurable': false,\n 'writable': false,\n 'value': hash\n });\n } else if (obj.propertyIsEnumerable !== undefined &&\n obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n // Since we can't define a non-enumerable property on the object\n // we'll hijack one of the less-used non-enumerable properties to\n // save our hash on it. Since this is a function it will not show up in\n // `JSON.stringify` which is what we want.\n obj.propertyIsEnumerable = function() {\n return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n };\n obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n } else if (obj.nodeType !== undefined) {\n // At this point we couldn't get the IE `uniqueID` to use as a hash\n // and we couldn't use a non-enumerable property to exploit the\n // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n // itself.\n obj[UID_HASH_KEY] = hash;\n } else {\n throw new Error('Unable to set a non-enumerable property on object.');\n }\n\n return hash;\n }\n\n // Get references to ES5 object methods.\n var isExtensible = Object.isExtensible;\n\n // True if Object.defineProperty works as expected. IE8 fails this test.\n var canDefineProperty = (function() {\n try {\n Object.defineProperty({}, '@', {});\n return true;\n } catch (e) {\n return false;\n }\n }());\n\n // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n // and avoid memory leaks from the IE cloneNode bug.\n function getIENodeHash(node) {\n if (node && node.nodeType > 0) {\n switch (node.nodeType) {\n case 1: // Element\n return node.uniqueID;\n case 9: // Document\n return node.documentElement && node.documentElement.uniqueID;\n }\n }\n }\n\n // If possible, use a WeakMap.\n var usingWeakMap = typeof WeakMap === 'function';\n var weakMap;\n if (usingWeakMap) {\n weakMap = new WeakMap();\n }\n\n var objHashUID = 0;\n\n var UID_HASH_KEY = '__immutablehash__';\n if (typeof Symbol === 'function') {\n UID_HASH_KEY = Symbol(UID_HASH_KEY);\n }\n\n var STRING_HASH_CACHE_MIN_STRLEN = 16;\n var STRING_HASH_CACHE_MAX_SIZE = 255;\n var STRING_HASH_CACHE_SIZE = 0;\n var stringHashCache = {};\n\n function assertNotInfinite(size) {\n invariant(\n size !== Infinity,\n 'Cannot perform this action with an infinite size.'\n );\n }\n\n createClass(Map, KeyedCollection);\n\n // @pragma Construction\n\n function Map(value) {\n return value === null || value === undefined ? emptyMap() :\n isMap(value) && !isOrdered(value) ? value :\n emptyMap().withMutations(function(map ) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v, k) {return map.set(k, v)});\n });\n }\n\n Map.of = function() {var keyValues = SLICE$0.call(arguments, 0);\n return emptyMap().withMutations(function(map ) {\n for (var i = 0; i < keyValues.length; i += 2) {\n if (i + 1 >= keyValues.length) {\n throw new Error('Missing value for key: ' + keyValues[i]);\n }\n map.set(keyValues[i], keyValues[i + 1]);\n }\n });\n };\n\n Map.prototype.toString = function() {\n return this.__toString('Map {', '}');\n };\n\n // @pragma Access\n\n Map.prototype.get = function(k, notSetValue) {\n return this._root ?\n this._root.get(0, undefined, k, notSetValue) :\n notSetValue;\n };\n\n // @pragma Modification\n\n Map.prototype.set = function(k, v) {\n return updateMap(this, k, v);\n };\n\n Map.prototype.setIn = function(keyPath, v) {\n return this.updateIn(keyPath, NOT_SET, function() {return v});\n };\n\n Map.prototype.remove = function(k) {\n return updateMap(this, k, NOT_SET);\n };\n\n Map.prototype.deleteIn = function(keyPath) {\n return this.updateIn(keyPath, function() {return NOT_SET});\n };\n\n Map.prototype.update = function(k, notSetValue, updater) {\n return arguments.length === 1 ?\n k(this) :\n this.updateIn([k], notSetValue, updater);\n };\n\n Map.prototype.updateIn = function(keyPath, notSetValue, updater) {\n if (!updater) {\n updater = notSetValue;\n notSetValue = undefined;\n }\n var updatedValue = updateInDeepMap(\n this,\n forceIterator(keyPath),\n notSetValue,\n updater\n );\n return updatedValue === NOT_SET ? undefined : updatedValue;\n };\n\n Map.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._root = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyMap();\n };\n\n // @pragma Composition\n\n Map.prototype.merge = function(/*...iters*/) {\n return mergeIntoMapWith(this, undefined, arguments);\n };\n\n Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, merger, iters);\n };\n\n Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(\n keyPath,\n emptyMap(),\n function(m ) {return typeof m.merge === 'function' ?\n m.merge.apply(m, iters) :\n iters[iters.length - 1]}\n );\n };\n\n Map.prototype.mergeDeep = function(/*...iters*/) {\n return mergeIntoMapWith(this, deepMerger, arguments);\n };\n\n Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, deepMergerWith(merger), iters);\n };\n\n Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(\n keyPath,\n emptyMap(),\n function(m ) {return typeof m.mergeDeep === 'function' ?\n m.mergeDeep.apply(m, iters) :\n iters[iters.length - 1]}\n );\n };\n\n Map.prototype.sort = function(comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator));\n };\n\n Map.prototype.sortBy = function(mapper, comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator, mapper));\n };\n\n // @pragma Mutability\n\n Map.prototype.withMutations = function(fn) {\n var mutable = this.asMutable();\n fn(mutable);\n return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n };\n\n Map.prototype.asMutable = function() {\n return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n };\n\n Map.prototype.asImmutable = function() {\n return this.__ensureOwner();\n };\n\n Map.prototype.wasAltered = function() {\n return this.__altered;\n };\n\n Map.prototype.__iterator = function(type, reverse) {\n return new MapIterator(this, type, reverse);\n };\n\n Map.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n this._root && this._root.iterate(function(entry ) {\n iterations++;\n return fn(entry[1], entry[0], this$0);\n }, reverse);\n return iterations;\n };\n\n Map.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeMap(this.size, this._root, ownerID, this.__hash);\n };\n\n\n function isMap(maybeMap) {\n return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n }\n\n Map.isMap = isMap;\n\n var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n\n var MapPrototype = Map.prototype;\n MapPrototype[IS_MAP_SENTINEL] = true;\n MapPrototype[DELETE] = MapPrototype.remove;\n MapPrototype.removeIn = MapPrototype.deleteIn;\n\n\n // #pragma Trie Nodes\n\n\n\n function ArrayMapNode(ownerID, entries) {\n this.ownerID = ownerID;\n this.entries = entries;\n }\n\n ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n\n ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && entries.length === 1) {\n return; // undefined\n }\n\n if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n return createNodes(ownerID, entries, key, value);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new ArrayMapNode(ownerID, newEntries);\n };\n\n\n\n\n function BitmapIndexedNode(ownerID, bitmap, nodes) {\n this.ownerID = ownerID;\n this.bitmap = bitmap;\n this.nodes = nodes;\n }\n\n BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));\n var bitmap = this.bitmap;\n return (bitmap & bit) === 0 ? notSetValue :\n this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);\n };\n\n BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var bit = 1 << keyHashFrag;\n var bitmap = this.bitmap;\n var exists = (bitmap & bit) !== 0;\n\n if (!exists && value === NOT_SET) {\n return this;\n }\n\n var idx = popCount(bitmap & (bit - 1));\n var nodes = this.nodes;\n var node = exists ? nodes[idx] : undefined;\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\n if (newNode === node) {\n return this;\n }\n\n if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n }\n\n if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n return nodes[idx ^ 1];\n }\n\n if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n return newNode;\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n var newNodes = exists ? newNode ?\n setIn(nodes, idx, newNode, isEditable) :\n spliceOut(nodes, idx, isEditable) :\n spliceIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.bitmap = newBitmap;\n this.nodes = newNodes;\n return this;\n }\n\n return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n };\n\n\n\n\n function HashArrayMapNode(ownerID, count, nodes) {\n this.ownerID = ownerID;\n this.count = count;\n this.nodes = nodes;\n }\n\n HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var node = this.nodes[idx];\n return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;\n };\n\n HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var removed = value === NOT_SET;\n var nodes = this.nodes;\n var node = nodes[idx];\n\n if (removed && !node) {\n return this;\n }\n\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n if (newNode === node) {\n return this;\n }\n\n var newCount = this.count;\n if (!node) {\n newCount++;\n } else if (!newNode) {\n newCount--;\n if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n return packNodes(ownerID, nodes, newCount, idx);\n }\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newNodes = setIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.count = newCount;\n this.nodes = newNodes;\n return this;\n }\n\n return new HashArrayMapNode(ownerID, newCount, newNodes);\n };\n\n\n\n\n function HashCollisionNode(ownerID, keyHash, entries) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entries = entries;\n }\n\n HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n\n HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var removed = value === NOT_SET;\n\n if (keyHash !== this.keyHash) {\n if (removed) {\n return this;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n }\n\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && len === 2) {\n return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n };\n\n\n\n\n function ValueNode(ownerID, keyHash, entry) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entry = entry;\n }\n\n ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n };\n\n ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var keyMatch = is(key, this.entry[0]);\n if (keyMatch ? value === this.entry[1] : removed) {\n return this;\n }\n\n SetRef(didAlter);\n\n if (removed) {\n SetRef(didChangeSize);\n return; // undefined\n }\n\n if (keyMatch) {\n if (ownerID && ownerID === this.ownerID) {\n this.entry[1] = value;\n return this;\n }\n return new ValueNode(ownerID, this.keyHash, [key, value]);\n }\n\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n };\n\n\n\n // #pragma Iterators\n\n ArrayMapNode.prototype.iterate =\n HashCollisionNode.prototype.iterate = function (fn, reverse) {\n var entries = this.entries;\n for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n return false;\n }\n }\n }\n\n BitmapIndexedNode.prototype.iterate =\n HashArrayMapNode.prototype.iterate = function (fn, reverse) {\n var nodes = this.nodes;\n for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n var node = nodes[reverse ? maxIndex - ii : ii];\n if (node && node.iterate(fn, reverse) === false) {\n return false;\n }\n }\n }\n\n ValueNode.prototype.iterate = function (fn, reverse) {\n return fn(this.entry);\n }\n\n createClass(MapIterator, Iterator);\n\n function MapIterator(map, type, reverse) {\n this._type = type;\n this._reverse = reverse;\n this._stack = map._root && mapIteratorFrame(map._root);\n }\n\n MapIterator.prototype.next = function() {\n var type = this._type;\n var stack = this._stack;\n while (stack) {\n var node = stack.node;\n var index = stack.index++;\n var maxIndex;\n if (node.entry) {\n if (index === 0) {\n return mapIteratorValue(type, node.entry);\n }\n } else if (node.entries) {\n maxIndex = node.entries.length - 1;\n if (index <= maxIndex) {\n return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n }\n } else {\n maxIndex = node.nodes.length - 1;\n if (index <= maxIndex) {\n var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n if (subNode) {\n if (subNode.entry) {\n return mapIteratorValue(type, subNode.entry);\n }\n stack = this._stack = mapIteratorFrame(subNode, stack);\n }\n continue;\n }\n }\n stack = this._stack = this._stack.__prev;\n }\n return iteratorDone();\n };\n\n\n function mapIteratorValue(type, entry) {\n return iteratorValue(type, entry[0], entry[1]);\n }\n\n function mapIteratorFrame(node, prev) {\n return {\n node: node,\n index: 0,\n __prev: prev\n };\n }\n\n function makeMap(size, root, ownerID, hash) {\n var map = Object.create(MapPrototype);\n map.size = size;\n map._root = root;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_MAP;\n function emptyMap() {\n return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n }\n\n function updateMap(map, k, v) {\n var newRoot;\n var newSize;\n if (!map._root) {\n if (v === NOT_SET) {\n return map;\n }\n newSize = 1;\n newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n } else {\n var didChangeSize = MakeRef(CHANGE_LENGTH);\n var didAlter = MakeRef(DID_ALTER);\n newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);\n if (!didAlter.value) {\n return map;\n }\n newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n }\n if (map.__ownerID) {\n map.size = newSize;\n map._root = newRoot;\n map.__hash = undefined;\n map.__altered = true;\n return map;\n }\n return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n }\n\n function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (!node) {\n if (value === NOT_SET) {\n return node;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return new ValueNode(ownerID, keyHash, [key, value]);\n }\n return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);\n }\n\n function isLeafNode(node) {\n return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n }\n\n function mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n if (node.keyHash === keyHash) {\n return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n }\n\n var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\n var newNode;\n var nodes = idx1 === idx2 ?\n [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] :\n ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\n return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n }\n\n function createNodes(ownerID, entries, key, value) {\n if (!ownerID) {\n ownerID = new OwnerID();\n }\n var node = new ValueNode(ownerID, hash(key), [key, value]);\n for (var ii = 0; ii < entries.length; ii++) {\n var entry = entries[ii];\n node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n }\n return node;\n }\n\n function packNodes(ownerID, nodes, count, excluding) {\n var bitmap = 0;\n var packedII = 0;\n var packedNodes = new Array(count);\n for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n var node = nodes[ii];\n if (node !== undefined && ii !== excluding) {\n bitmap |= bit;\n packedNodes[packedII++] = node;\n }\n }\n return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n }\n\n function expandNodes(ownerID, nodes, bitmap, including, node) {\n var count = 0;\n var expandedNodes = new Array(SIZE);\n for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n }\n expandedNodes[including] = node;\n return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n }\n\n function mergeIntoMapWith(map, merger, iterables) {\n var iters = [];\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = KeyedIterable(value);\n if (!isIterable(value)) {\n iter = iter.map(function(v ) {return fromJS(v)});\n }\n iters.push(iter);\n }\n return mergeIntoCollectionWith(map, merger, iters);\n }\n\n function deepMerger(existing, value, key) {\n return existing && existing.mergeDeep && isIterable(value) ?\n existing.mergeDeep(value) :\n is(existing, value) ? existing : value;\n }\n\n function deepMergerWith(merger) {\n return function(existing, value, key) {\n if (existing && existing.mergeDeepWith && isIterable(value)) {\n return existing.mergeDeepWith(merger, value);\n }\n var nextValue = merger(existing, value, key);\n return is(existing, nextValue) ? existing : nextValue;\n };\n }\n\n function mergeIntoCollectionWith(collection, merger, iters) {\n iters = iters.filter(function(x ) {return x.size !== 0});\n if (iters.length === 0) {\n return collection;\n }\n if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {\n return collection.constructor(iters[0]);\n }\n return collection.withMutations(function(collection ) {\n var mergeIntoMap = merger ?\n function(value, key) {\n collection.update(key, NOT_SET, function(existing )\n {return existing === NOT_SET ? value : merger(existing, value, key)}\n );\n } :\n function(value, key) {\n collection.set(key, value);\n }\n for (var ii = 0; ii < iters.length; ii++) {\n iters[ii].forEach(mergeIntoMap);\n }\n });\n }\n\n function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {\n var isNotSet = existing === NOT_SET;\n var step = keyPathIter.next();\n if (step.done) {\n var existingValue = isNotSet ? notSetValue : existing;\n var newValue = updater(existingValue);\n return newValue === existingValue ? existing : newValue;\n }\n invariant(\n isNotSet || (existing && existing.set),\n 'invalid keyPath'\n );\n var key = step.value;\n var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);\n var nextUpdated = updateInDeepMap(\n nextExisting,\n keyPathIter,\n notSetValue,\n updater\n );\n return nextUpdated === nextExisting ? existing :\n nextUpdated === NOT_SET ? existing.remove(key) :\n (isNotSet ? emptyMap() : existing).set(key, nextUpdated);\n }\n\n function popCount(x) {\n x = x - ((x >> 1) & 0x55555555);\n x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n x = (x + (x >> 4)) & 0x0f0f0f0f;\n x = x + (x >> 8);\n x = x + (x >> 16);\n return x & 0x7f;\n }\n\n function setIn(array, idx, val, canEdit) {\n var newArray = canEdit ? array : arrCopy(array);\n newArray[idx] = val;\n return newArray;\n }\n\n function spliceIn(array, idx, val, canEdit) {\n var newLen = array.length + 1;\n if (canEdit && idx + 1 === newLen) {\n array[idx] = val;\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n newArray[ii] = val;\n after = -1;\n } else {\n newArray[ii] = array[ii + after];\n }\n }\n return newArray;\n }\n\n function spliceOut(array, idx, canEdit) {\n var newLen = array.length - 1;\n if (canEdit && idx === newLen) {\n array.pop();\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n after = 1;\n }\n newArray[ii] = array[ii + after];\n }\n return newArray;\n }\n\n var MAX_ARRAY_MAP_SIZE = SIZE / 4;\n var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\n var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n\n createClass(List, IndexedCollection);\n\n // @pragma Construction\n\n function List(value) {\n var empty = emptyList();\n if (value === null || value === undefined) {\n return empty;\n }\n if (isList(value)) {\n return value;\n }\n var iter = IndexedIterable(value);\n var size = iter.size;\n if (size === 0) {\n return empty;\n }\n assertNotInfinite(size);\n if (size > 0 && size < SIZE) {\n return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n }\n return empty.withMutations(function(list ) {\n list.setSize(size);\n iter.forEach(function(v, i) {return list.set(i, v)});\n });\n }\n\n List.of = function(/*...values*/) {\n return this(arguments);\n };\n\n List.prototype.toString = function() {\n return this.__toString('List [', ']');\n };\n\n // @pragma Access\n\n List.prototype.get = function(index, notSetValue) {\n index = wrapIndex(this, index);\n if (index >= 0 && index < this.size) {\n index += this._origin;\n var node = listNodeFor(this, index);\n return node && node.array[index & MASK];\n }\n return notSetValue;\n };\n\n // @pragma Modification\n\n List.prototype.set = function(index, value) {\n return updateList(this, index, value);\n };\n\n List.prototype.remove = function(index) {\n return !this.has(index) ? this :\n index === 0 ? this.shift() :\n index === this.size - 1 ? this.pop() :\n this.splice(index, 1);\n };\n\n List.prototype.insert = function(index, value) {\n return this.splice(index, 0, value);\n };\n\n List.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = this._origin = this._capacity = 0;\n this._level = SHIFT;\n this._root = this._tail = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyList();\n };\n\n List.prototype.push = function(/*...values*/) {\n var values = arguments;\n var oldSize = this.size;\n return this.withMutations(function(list ) {\n setListBounds(list, 0, oldSize + values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(oldSize + ii, values[ii]);\n }\n });\n };\n\n List.prototype.pop = function() {\n return setListBounds(this, 0, -1);\n };\n\n List.prototype.unshift = function(/*...values*/) {\n var values = arguments;\n return this.withMutations(function(list ) {\n setListBounds(list, -values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(ii, values[ii]);\n }\n });\n };\n\n List.prototype.shift = function() {\n return setListBounds(this, 1);\n };\n\n // @pragma Composition\n\n List.prototype.merge = function(/*...iters*/) {\n return mergeIntoListWith(this, undefined, arguments);\n };\n\n List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, merger, iters);\n };\n\n List.prototype.mergeDeep = function(/*...iters*/) {\n return mergeIntoListWith(this, deepMerger, arguments);\n };\n\n List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, deepMergerWith(merger), iters);\n };\n\n List.prototype.setSize = function(size) {\n return setListBounds(this, 0, size);\n };\n\n // @pragma Iteration\n\n List.prototype.slice = function(begin, end) {\n var size = this.size;\n if (wholeSlice(begin, end, size)) {\n return this;\n }\n return setListBounds(\n this,\n resolveBegin(begin, size),\n resolveEnd(end, size)\n );\n };\n\n List.prototype.__iterator = function(type, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n return new Iterator(function() {\n var value = values();\n return value === DONE ?\n iteratorDone() :\n iteratorValue(type, index++, value);\n });\n };\n\n List.prototype.__iterate = function(fn, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n var value;\n while ((value = values()) !== DONE) {\n if (fn(value, index++, this) === false) {\n break;\n }\n }\n return index;\n };\n\n List.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n return this;\n }\n return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n };\n\n\n function isList(maybeList) {\n return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n }\n\n List.isList = isList;\n\n var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n\n var ListPrototype = List.prototype;\n ListPrototype[IS_LIST_SENTINEL] = true;\n ListPrototype[DELETE] = ListPrototype.remove;\n ListPrototype.setIn = MapPrototype.setIn;\n ListPrototype.deleteIn =\n ListPrototype.removeIn = MapPrototype.removeIn;\n ListPrototype.update = MapPrototype.update;\n ListPrototype.updateIn = MapPrototype.updateIn;\n ListPrototype.mergeIn = MapPrototype.mergeIn;\n ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n ListPrototype.withMutations = MapPrototype.withMutations;\n ListPrototype.asMutable = MapPrototype.asMutable;\n ListPrototype.asImmutable = MapPrototype.asImmutable;\n ListPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n\n function VNode(array, ownerID) {\n this.array = array;\n this.ownerID = ownerID;\n }\n\n // TODO: seems like these methods are very similar\n\n VNode.prototype.removeBefore = function(ownerID, level, index) {\n if (index === level ? 1 << level : 0 || this.array.length === 0) {\n return this;\n }\n var originIndex = (index >>> level) & MASK;\n if (originIndex >= this.array.length) {\n return new VNode([], ownerID);\n }\n var removingFirst = originIndex === 0;\n var newChild;\n if (level > 0) {\n var oldChild = this.array[originIndex];\n newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n if (newChild === oldChild && removingFirst) {\n return this;\n }\n }\n if (removingFirst && !newChild) {\n return this;\n }\n var editable = editableVNode(this, ownerID);\n if (!removingFirst) {\n for (var ii = 0; ii < originIndex; ii++) {\n editable.array[ii] = undefined;\n }\n }\n if (newChild) {\n editable.array[originIndex] = newChild;\n }\n return editable;\n };\n\n VNode.prototype.removeAfter = function(ownerID, level, index) {\n if (index === (level ? 1 << level : 0) || this.array.length === 0) {\n return this;\n }\n var sizeIndex = ((index - 1) >>> level) & MASK;\n if (sizeIndex >= this.array.length) {\n return this;\n }\n\n var newChild;\n if (level > 0) {\n var oldChild = this.array[sizeIndex];\n newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n return this;\n }\n }\n\n var editable = editableVNode(this, ownerID);\n editable.array.splice(sizeIndex + 1);\n if (newChild) {\n editable.array[sizeIndex] = newChild;\n }\n return editable;\n };\n\n\n\n var DONE = {};\n\n function iterateList(list, reverse) {\n var left = list._origin;\n var right = list._capacity;\n var tailPos = getTailOffset(right);\n var tail = list._tail;\n\n return iterateNodeOrLeaf(list._root, list._level, 0);\n\n function iterateNodeOrLeaf(node, level, offset) {\n return level === 0 ?\n iterateLeaf(node, offset) :\n iterateNode(node, level, offset);\n }\n\n function iterateLeaf(node, offset) {\n var array = offset === tailPos ? tail && tail.array : node && node.array;\n var from = offset > left ? 0 : left - offset;\n var to = right - offset;\n if (to > SIZE) {\n to = SIZE;\n }\n return function() {\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n return array && array[idx];\n };\n }\n\n function iterateNode(node, level, offset) {\n var values;\n var array = node && node.array;\n var from = offset > left ? 0 : (left - offset) >> level;\n var to = ((right - offset) >> level) + 1;\n if (to > SIZE) {\n to = SIZE;\n }\n return function() {\n do {\n if (values) {\n var value = values();\n if (value !== DONE) {\n return value;\n }\n values = null;\n }\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n values = iterateNodeOrLeaf(\n array && array[idx], level - SHIFT, offset + (idx << level)\n );\n } while (true);\n };\n }\n }\n\n function makeList(origin, capacity, level, root, tail, ownerID, hash) {\n var list = Object.create(ListPrototype);\n list.size = capacity - origin;\n list._origin = origin;\n list._capacity = capacity;\n list._level = level;\n list._root = root;\n list._tail = tail;\n list.__ownerID = ownerID;\n list.__hash = hash;\n list.__altered = false;\n return list;\n }\n\n var EMPTY_LIST;\n function emptyList() {\n return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n }\n\n function updateList(list, index, value) {\n index = wrapIndex(list, index);\n\n if (index !== index) {\n return list;\n }\n\n if (index >= list.size || index < 0) {\n return list.withMutations(function(list ) {\n index < 0 ?\n setListBounds(list, index).set(0, value) :\n setListBounds(list, 0, index + 1).set(index, value)\n });\n }\n\n index += list._origin;\n\n var newTail = list._tail;\n var newRoot = list._root;\n var didAlter = MakeRef(DID_ALTER);\n if (index >= getTailOffset(list._capacity)) {\n newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n } else {\n newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n }\n\n if (!didAlter.value) {\n return list;\n }\n\n if (list.__ownerID) {\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n }\n\n function updateVNode(node, ownerID, level, index, value, didAlter) {\n var idx = (index >>> level) & MASK;\n var nodeHas = node && idx < node.array.length;\n if (!nodeHas && value === undefined) {\n return node;\n }\n\n var newNode;\n\n if (level > 0) {\n var lowerNode = node && node.array[idx];\n var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n if (newLowerNode === lowerNode) {\n return node;\n }\n newNode = editableVNode(node, ownerID);\n newNode.array[idx] = newLowerNode;\n return newNode;\n }\n\n if (nodeHas && node.array[idx] === value) {\n return node;\n }\n\n SetRef(didAlter);\n\n newNode = editableVNode(node, ownerID);\n if (value === undefined && idx === newNode.array.length - 1) {\n newNode.array.pop();\n } else {\n newNode.array[idx] = value;\n }\n return newNode;\n }\n\n function editableVNode(node, ownerID) {\n if (ownerID && node && ownerID === node.ownerID) {\n return node;\n }\n return new VNode(node ? node.array.slice() : [], ownerID);\n }\n\n function listNodeFor(list, rawIndex) {\n if (rawIndex >= getTailOffset(list._capacity)) {\n return list._tail;\n }\n if (rawIndex < 1 << (list._level + SHIFT)) {\n var node = list._root;\n var level = list._level;\n while (node && level > 0) {\n node = node.array[(rawIndex >>> level) & MASK];\n level -= SHIFT;\n }\n return node;\n }\n }\n\n function setListBounds(list, begin, end) {\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n end = end | 0;\n }\n var owner = list.__ownerID || new OwnerID();\n var oldOrigin = list._origin;\n var oldCapacity = list._capacity;\n var newOrigin = oldOrigin + begin;\n var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n return list;\n }\n\n // If it's going to end after it starts, it's empty.\n if (newOrigin >= newCapacity) {\n return list.clear();\n }\n\n var newLevel = list._level;\n var newRoot = list._root;\n\n // New origin might need creating a higher root.\n var offsetShift = 0;\n while (newOrigin + offsetShift < 0) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n newLevel += SHIFT;\n offsetShift += 1 << newLevel;\n }\n if (offsetShift) {\n newOrigin += offsetShift;\n oldOrigin += offsetShift;\n newCapacity += offsetShift;\n oldCapacity += offsetShift;\n }\n\n var oldTailOffset = getTailOffset(oldCapacity);\n var newTailOffset = getTailOffset(newCapacity);\n\n // New size might need creating a higher root.\n while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n newLevel += SHIFT;\n }\n\n // Locate or create the new tail.\n var oldTail = list._tail;\n var newTail = newTailOffset < oldTailOffset ?\n listNodeFor(list, newCapacity - 1) :\n newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\n // Merge Tail into tree.\n if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n newRoot = editableVNode(newRoot, owner);\n var node = newRoot;\n for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n var idx = (oldTailOffset >>> level) & MASK;\n node = node.array[idx] = editableVNode(node.array[idx], owner);\n }\n node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n }\n\n // If the size has been reduced, there's a chance the tail needs to be trimmed.\n if (newCapacity < oldCapacity) {\n newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n }\n\n // If the new origin is within the tail, then we do not need a root.\n if (newOrigin >= newTailOffset) {\n newOrigin -= newTailOffset;\n newCapacity -= newTailOffset;\n newLevel = SHIFT;\n newRoot = null;\n newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\n // Otherwise, if the root has been trimmed, garbage collect.\n } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n offsetShift = 0;\n\n // Identify the new top root node of the subtree of the old root.\n while (newRoot) {\n var beginIndex = (newOrigin >>> newLevel) & MASK;\n if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {\n break;\n }\n if (beginIndex) {\n offsetShift += (1 << newLevel) * beginIndex;\n }\n newLevel -= SHIFT;\n newRoot = newRoot.array[beginIndex];\n }\n\n // Trim the new sides of the new root.\n if (newRoot && newOrigin > oldOrigin) {\n newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n }\n if (newRoot && newTailOffset < oldTailOffset) {\n newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n }\n if (offsetShift) {\n newOrigin -= offsetShift;\n newCapacity -= offsetShift;\n }\n }\n\n if (list.__ownerID) {\n list.size = newCapacity - newOrigin;\n list._origin = newOrigin;\n list._capacity = newCapacity;\n list._level = newLevel;\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n }\n\n function mergeIntoListWith(list, merger, iterables) {\n var iters = [];\n var maxSize = 0;\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = IndexedIterable(value);\n if (iter.size > maxSize) {\n maxSize = iter.size;\n }\n if (!isIterable(value)) {\n iter = iter.map(function(v ) {return fromJS(v)});\n }\n iters.push(iter);\n }\n if (maxSize > list.size) {\n list = list.setSize(maxSize);\n }\n return mergeIntoCollectionWith(list, merger, iters);\n }\n\n function getTailOffset(size) {\n return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);\n }\n\n createClass(OrderedMap, Map);\n\n // @pragma Construction\n\n function OrderedMap(value) {\n return value === null || value === undefined ? emptyOrderedMap() :\n isOrderedMap(value) ? value :\n emptyOrderedMap().withMutations(function(map ) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v, k) {return map.set(k, v)});\n });\n }\n\n OrderedMap.of = function(/*...values*/) {\n return this(arguments);\n };\n\n OrderedMap.prototype.toString = function() {\n return this.__toString('OrderedMap {', '}');\n };\n\n // @pragma Access\n\n OrderedMap.prototype.get = function(k, notSetValue) {\n var index = this._map.get(k);\n return index !== undefined ? this._list.get(index)[1] : notSetValue;\n };\n\n // @pragma Modification\n\n OrderedMap.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._map.clear();\n this._list.clear();\n return this;\n }\n return emptyOrderedMap();\n };\n\n OrderedMap.prototype.set = function(k, v) {\n return updateOrderedMap(this, k, v);\n };\n\n OrderedMap.prototype.remove = function(k) {\n return updateOrderedMap(this, k, NOT_SET);\n };\n\n OrderedMap.prototype.wasAltered = function() {\n return this._map.wasAltered() || this._list.wasAltered();\n };\n\n OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._list.__iterate(\n function(entry ) {return entry && fn(entry[1], entry[0], this$0)},\n reverse\n );\n };\n\n OrderedMap.prototype.__iterator = function(type, reverse) {\n return this._list.fromEntrySeq().__iterator(type, reverse);\n };\n\n OrderedMap.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n var newList = this._list.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n this._list = newList;\n return this;\n }\n return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n };\n\n\n function isOrderedMap(maybeOrderedMap) {\n return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n }\n\n OrderedMap.isOrderedMap = isOrderedMap;\n\n OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;\n OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\n\n\n function makeOrderedMap(map, list, ownerID, hash) {\n var omap = Object.create(OrderedMap.prototype);\n omap.size = map ? map.size : 0;\n omap._map = map;\n omap._list = list;\n omap.__ownerID = ownerID;\n omap.__hash = hash;\n return omap;\n }\n\n var EMPTY_ORDERED_MAP;\n function emptyOrderedMap() {\n return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n }\n\n function updateOrderedMap(omap, k, v) {\n var map = omap._map;\n var list = omap._list;\n var i = map.get(k);\n var has = i !== undefined;\n var newMap;\n var newList;\n if (v === NOT_SET) { // removed\n if (!has) {\n return omap;\n }\n if (list.size >= SIZE && list.size >= map.size * 2) {\n newList = list.filter(function(entry, idx) {return entry !== undefined && i !== idx});\n newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap();\n if (omap.__ownerID) {\n newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n }\n } else {\n newMap = map.remove(k);\n newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n }\n } else {\n if (has) {\n if (v === list.get(i)[1]) {\n return omap;\n }\n newMap = map;\n newList = list.set(i, [k, v]);\n } else {\n newMap = map.set(k, list.size);\n newList = list.set(list.size, [k, v]);\n }\n }\n if (omap.__ownerID) {\n omap.size = newMap.size;\n omap._map = newMap;\n omap._list = newList;\n omap.__hash = undefined;\n return omap;\n }\n return makeOrderedMap(newMap, newList);\n }\n\n createClass(ToKeyedSequence, KeyedSeq);\n function ToKeyedSequence(indexed, useKeys) {\n this._iter = indexed;\n this._useKeys = useKeys;\n this.size = indexed.size;\n }\n\n ToKeyedSequence.prototype.get = function(key, notSetValue) {\n return this._iter.get(key, notSetValue);\n };\n\n ToKeyedSequence.prototype.has = function(key) {\n return this._iter.has(key);\n };\n\n ToKeyedSequence.prototype.valueSeq = function() {\n return this._iter.valueSeq();\n };\n\n ToKeyedSequence.prototype.reverse = function() {var this$0 = this;\n var reversedSequence = reverseFactory(this, true);\n if (!this._useKeys) {\n reversedSequence.valueSeq = function() {return this$0._iter.toSeq().reverse()};\n }\n return reversedSequence;\n };\n\n ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this;\n var mappedSequence = mapFactory(this, mapper, context);\n if (!this._useKeys) {\n mappedSequence.valueSeq = function() {return this$0._iter.toSeq().map(mapper, context)};\n }\n return mappedSequence;\n };\n\n ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var ii;\n return this._iter.__iterate(\n this._useKeys ?\n function(v, k) {return fn(v, k, this$0)} :\n ((ii = reverse ? resolveSize(this) : 0),\n function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}),\n reverse\n );\n };\n\n ToKeyedSequence.prototype.__iterator = function(type, reverse) {\n if (this._useKeys) {\n return this._iter.__iterator(type, reverse);\n }\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var ii = reverse ? resolveSize(this) : 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n });\n };\n\n ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n createClass(ToIndexedSequence, IndexedSeq);\n function ToIndexedSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToIndexedSequence.prototype.includes = function(value) {\n return this._iter.includes(value);\n };\n\n ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse);\n };\n\n ToIndexedSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, iterations++, step.value, step)\n });\n };\n\n\n\n createClass(ToSetSequence, SetSeq);\n function ToSetSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToSetSequence.prototype.has = function(key) {\n return this._iter.includes(key);\n };\n\n ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse);\n };\n\n ToSetSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, step.value, step.value, step);\n });\n };\n\n\n\n createClass(FromEntriesSequence, KeyedSeq);\n function FromEntriesSequence(entries) {\n this._iter = entries;\n this.size = entries.size;\n }\n\n FromEntriesSequence.prototype.entrySeq = function() {\n return this._iter.toSeq();\n };\n\n FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._iter.__iterate(function(entry ) {\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return fn(\n indexedIterable ? entry.get(1) : entry[1],\n indexedIterable ? entry.get(0) : entry[0],\n this$0\n );\n }\n }, reverse);\n };\n\n FromEntriesSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function() {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return iteratorValue(\n type,\n indexedIterable ? entry.get(0) : entry[0],\n indexedIterable ? entry.get(1) : entry[1],\n step\n );\n }\n }\n });\n };\n\n\n ToIndexedSequence.prototype.cacheResult =\n ToKeyedSequence.prototype.cacheResult =\n ToSetSequence.prototype.cacheResult =\n FromEntriesSequence.prototype.cacheResult =\n cacheResultThrough;\n\n\n function flipFactory(iterable) {\n var flipSequence = makeSequence(iterable);\n flipSequence._iter = iterable;\n flipSequence.size = iterable.size;\n flipSequence.flip = function() {return iterable};\n flipSequence.reverse = function () {\n var reversedSequence = iterable.reverse.apply(this); // super.reverse()\n reversedSequence.flip = function() {return iterable.reverse()};\n return reversedSequence;\n };\n flipSequence.has = function(key ) {return iterable.includes(key)};\n flipSequence.includes = function(key ) {return iterable.has(key)};\n flipSequence.cacheResult = cacheResultThrough;\n flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(function(v, k) {return fn(k, v, this$0) !== false}, reverse);\n }\n flipSequence.__iteratorUncached = function(type, reverse) {\n if (type === ITERATE_ENTRIES) {\n var iterator = iterable.__iterator(type, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n if (!step.done) {\n var k = step.value[0];\n step.value[0] = step.value[1];\n step.value[1] = k;\n }\n return step;\n });\n }\n return iterable.__iterator(\n type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,\n reverse\n );\n }\n return flipSequence;\n }\n\n\n function mapFactory(iterable, mapper, context) {\n var mappedSequence = makeSequence(iterable);\n mappedSequence.size = iterable.size;\n mappedSequence.has = function(key ) {return iterable.has(key)};\n mappedSequence.get = function(key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v === NOT_SET ?\n notSetValue :\n mapper.call(context, v, key, iterable);\n };\n mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(\n function(v, k, c) {return fn(mapper.call(context, v, k, c), k, this$0) !== false},\n reverse\n );\n }\n mappedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n return iteratorValue(\n type,\n key,\n mapper.call(context, entry[1], key, iterable),\n step\n );\n });\n }\n return mappedSequence;\n }\n\n\n function reverseFactory(iterable, useKeys) {\n var reversedSequence = makeSequence(iterable);\n reversedSequence._iter = iterable;\n reversedSequence.size = iterable.size;\n reversedSequence.reverse = function() {return iterable};\n if (iterable.flip) {\n reversedSequence.flip = function () {\n var flipSequence = flipFactory(iterable);\n flipSequence.reverse = function() {return iterable.flip()};\n return flipSequence;\n };\n }\n reversedSequence.get = function(key, notSetValue) \n {return iterable.get(useKeys ? key : -1 - key, notSetValue)};\n reversedSequence.has = function(key )\n {return iterable.has(useKeys ? key : -1 - key)};\n reversedSequence.includes = function(value ) {return iterable.includes(value)};\n reversedSequence.cacheResult = cacheResultThrough;\n reversedSequence.__iterate = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(function(v, k) {return fn(v, k, this$0)}, !reverse);\n };\n reversedSequence.__iterator =\n function(type, reverse) {return iterable.__iterator(type, !reverse)};\n return reversedSequence;\n }\n\n\n function filterFactory(iterable, predicate, context, useKeys) {\n var filterSequence = makeSequence(iterable);\n if (useKeys) {\n filterSequence.has = function(key ) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n };\n filterSequence.get = function(key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && predicate.call(context, v, key, iterable) ?\n v : notSetValue;\n };\n }\n filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function(v, k, c) {\n if (predicate.call(context, v, k, c)) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n }, reverse);\n return iterations;\n };\n filterSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterations = 0;\n return new Iterator(function() {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n var value = entry[1];\n if (predicate.call(context, value, key, iterable)) {\n return iteratorValue(type, useKeys ? key : iterations++, value, step);\n }\n }\n });\n }\n return filterSequence;\n }\n\n\n function countByFactory(iterable, grouper, context) {\n var groups = Map().asMutable();\n iterable.__iterate(function(v, k) {\n groups.update(\n grouper.call(context, v, k, iterable),\n 0,\n function(a ) {return a + 1}\n );\n });\n return groups.asImmutable();\n }\n\n\n function groupByFactory(iterable, grouper, context) {\n var isKeyedIter = isKeyed(iterable);\n var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();\n iterable.__iterate(function(v, k) {\n groups.update(\n grouper.call(context, v, k, iterable),\n function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)}\n );\n });\n var coerce = iterableClass(iterable);\n return groups.map(function(arr ) {return reify(iterable, coerce(arr))});\n }\n\n\n function sliceFactory(iterable, begin, end, useKeys) {\n var originalSize = iterable.size;\n\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n if (end === Infinity) {\n end = originalSize;\n } else {\n end = end | 0;\n }\n }\n\n if (wholeSlice(begin, end, originalSize)) {\n return iterable;\n }\n\n var resolvedBegin = resolveBegin(begin, originalSize);\n var resolvedEnd = resolveEnd(end, originalSize);\n\n // begin or end will be NaN if they were provided as negative numbers and\n // this iterable's size is unknown. In that case, cache first so there is\n // a known size and these do not resolve to NaN.\n if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);\n }\n\n // Note: resolvedEnd is undefined when the original sequence's length is\n // unknown and this slice did not supply an end and should contain all\n // elements after resolvedBegin.\n // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n var resolvedSize = resolvedEnd - resolvedBegin;\n var sliceSize;\n if (resolvedSize === resolvedSize) {\n sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n }\n\n var sliceSeq = makeSequence(iterable);\n\n // If iterable.size is undefined, the size of the realized sliceSeq is\n // unknown at this point unless the number of items to slice is 0\n sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;\n\n if (!useKeys && isSeq(iterable) && sliceSize >= 0) {\n sliceSeq.get = function (index, notSetValue) {\n index = wrapIndex(this, index);\n return index >= 0 && index < sliceSize ?\n iterable.get(index + resolvedBegin, notSetValue) :\n notSetValue;\n }\n }\n\n sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this;\n if (sliceSize === 0) {\n return 0;\n }\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var skipped = 0;\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function(v, k) {\n if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0) !== false &&\n iterations !== sliceSize;\n }\n });\n return iterations;\n };\n\n sliceSeq.__iteratorUncached = function(type, reverse) {\n if (sliceSize !== 0 && reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n // Don't bother instantiating parent iterator if taking 0.\n var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);\n var skipped = 0;\n var iterations = 0;\n return new Iterator(function() {\n while (skipped++ < resolvedBegin) {\n iterator.next();\n }\n if (++iterations > sliceSize) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations - 1, undefined, step);\n } else {\n return iteratorValue(type, iterations - 1, step.value[1], step);\n }\n });\n }\n\n return sliceSeq;\n }\n\n\n function takeWhileFactory(iterable, predicate, context) {\n var takeSequence = makeSequence(iterable);\n takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n iterable.__iterate(function(v, k, c) \n {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)}\n );\n return iterations;\n };\n takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterating = true;\n return new Iterator(function() {\n if (!iterating) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var k = entry[0];\n var v = entry[1];\n if (!predicate.call(context, v, k, this$0)) {\n iterating = false;\n return iteratorDone();\n }\n return type === ITERATE_ENTRIES ? step :\n iteratorValue(type, k, v, step);\n });\n };\n return takeSequence;\n }\n\n\n function skipWhileFactory(iterable, predicate, context, useKeys) {\n var skipSequence = makeSequence(iterable);\n skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function(v, k, c) {\n if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n });\n return iterations;\n };\n skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var skipping = true;\n var iterations = 0;\n return new Iterator(function() {\n var step, k, v;\n do {\n step = iterator.next();\n if (step.done) {\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations++, undefined, step);\n } else {\n return iteratorValue(type, iterations++, step.value[1], step);\n }\n }\n var entry = step.value;\n k = entry[0];\n v = entry[1];\n skipping && (skipping = predicate.call(context, v, k, this$0));\n } while (skipping);\n return type === ITERATE_ENTRIES ? step :\n iteratorValue(type, k, v, step);\n });\n };\n return skipSequence;\n }\n\n\n function concatFactory(iterable, values) {\n var isKeyedIterable = isKeyed(iterable);\n var iters = [iterable].concat(values).map(function(v ) {\n if (!isIterable(v)) {\n v = isKeyedIterable ?\n keyedSeqFromValue(v) :\n indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n } else if (isKeyedIterable) {\n v = KeyedIterable(v);\n }\n return v;\n }).filter(function(v ) {return v.size !== 0});\n\n if (iters.length === 0) {\n return iterable;\n }\n\n if (iters.length === 1) {\n var singleton = iters[0];\n if (singleton === iterable ||\n isKeyedIterable && isKeyed(singleton) ||\n isIndexed(iterable) && isIndexed(singleton)) {\n return singleton;\n }\n }\n\n var concatSeq = new ArraySeq(iters);\n if (isKeyedIterable) {\n concatSeq = concatSeq.toKeyedSeq();\n } else if (!isIndexed(iterable)) {\n concatSeq = concatSeq.toSetSeq();\n }\n concatSeq = concatSeq.flatten(true);\n concatSeq.size = iters.reduce(\n function(sum, seq) {\n if (sum !== undefined) {\n var size = seq.size;\n if (size !== undefined) {\n return sum + size;\n }\n }\n },\n 0\n );\n return concatSeq;\n }\n\n\n function flattenFactory(iterable, depth, useKeys) {\n var flatSequence = makeSequence(iterable);\n flatSequence.__iterateUncached = function(fn, reverse) {\n var iterations = 0;\n var stopped = false;\n function flatDeep(iter, currentDepth) {var this$0 = this;\n iter.__iterate(function(v, k) {\n if ((!depth || currentDepth < depth) && isIterable(v)) {\n flatDeep(v, currentDepth + 1);\n } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {\n stopped = true;\n }\n return !stopped;\n }, reverse);\n }\n flatDeep(iterable, 0);\n return iterations;\n }\n flatSequence.__iteratorUncached = function(type, reverse) {\n var iterator = iterable.__iterator(type, reverse);\n var stack = [];\n var iterations = 0;\n return new Iterator(function() {\n while (iterator) {\n var step = iterator.next();\n if (step.done !== false) {\n iterator = stack.pop();\n continue;\n }\n var v = step.value;\n if (type === ITERATE_ENTRIES) {\n v = v[1];\n }\n if ((!depth || stack.length < depth) && isIterable(v)) {\n stack.push(iterator);\n iterator = v.__iterator(type, reverse);\n } else {\n return useKeys ? step : iteratorValue(type, iterations++, v, step);\n }\n }\n return iteratorDone();\n });\n }\n return flatSequence;\n }\n\n\n function flatMapFactory(iterable, mapper, context) {\n var coerce = iterableClass(iterable);\n return iterable.toSeq().map(\n function(v, k) {return coerce(mapper.call(context, v, k, iterable))}\n ).flatten(true);\n }\n\n\n function interposeFactory(iterable, separator) {\n var interposedSequence = makeSequence(iterable);\n interposedSequence.size = iterable.size && iterable.size * 2 -1;\n interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function(v, k) \n {return (!iterations || fn(separator, iterations++, this$0) !== false) &&\n fn(v, iterations++, this$0) !== false},\n reverse\n );\n return iterations;\n };\n interposedSequence.__iteratorUncached = function(type, reverse) {\n var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n var step;\n return new Iterator(function() {\n if (!step || iterations % 2) {\n step = iterator.next();\n if (step.done) {\n return step;\n }\n }\n return iterations % 2 ?\n iteratorValue(type, iterations++, separator) :\n iteratorValue(type, iterations++, step.value, step);\n });\n };\n return interposedSequence;\n }\n\n\n function sortFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n var isKeyedIterable = isKeyed(iterable);\n var index = 0;\n var entries = iterable.toSeq().map(\n function(v, k) {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]}\n ).toArray();\n entries.sort(function(a, b) {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach(\n isKeyedIterable ?\n function(v, i) { entries[i].length = 2; } :\n function(v, i) { entries[i] = v[1]; }\n );\n return isKeyedIterable ? KeyedSeq(entries) :\n isIndexed(iterable) ? IndexedSeq(entries) :\n SetSeq(entries);\n }\n\n\n function maxFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n if (mapper) {\n var entry = iterable.toSeq()\n .map(function(v, k) {return [v, mapper(v, k, iterable)]})\n .reduce(function(a, b) {return maxCompare(comparator, a[1], b[1]) ? b : a});\n return entry && entry[0];\n } else {\n return iterable.reduce(function(a, b) {return maxCompare(comparator, a, b) ? b : a});\n }\n }\n\n function maxCompare(comparator, a, b) {\n var comp = comparator(b, a);\n // b is considered the new max if the comparator declares them equal, but\n // they are not equal and b is in fact a nullish value.\n return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;\n }\n\n\n function zipWithFactory(keyIter, zipper, iters) {\n var zipSequence = makeSequence(keyIter);\n zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min();\n // Note: this a generic base implementation of __iterate in terms of\n // __iterator which may be more generically useful in the future.\n zipSequence.__iterate = function(fn, reverse) {\n /* generic:\n var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n iterations++;\n if (fn(step.value[1], step.value[0], this) === false) {\n break;\n }\n }\n return iterations;\n */\n // indexed:\n var iterator = this.__iterator(ITERATE_VALUES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n zipSequence.__iteratorUncached = function(type, reverse) {\n var iterators = iters.map(function(i )\n {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))}\n );\n var iterations = 0;\n var isDone = false;\n return new Iterator(function() {\n var steps;\n if (!isDone) {\n steps = iterators.map(function(i ) {return i.next()});\n isDone = steps.some(function(s ) {return s.done});\n }\n if (isDone) {\n return iteratorDone();\n }\n return iteratorValue(\n type,\n iterations++,\n zipper.apply(null, steps.map(function(s ) {return s.value}))\n );\n });\n };\n return zipSequence\n }\n\n\n // #pragma Helper Functions\n\n function reify(iter, seq) {\n return isSeq(iter) ? seq : iter.constructor(seq);\n }\n\n function validateEntry(entry) {\n if (entry !== Object(entry)) {\n throw new TypeError('Expected [K, V] tuple: ' + entry);\n }\n }\n\n function resolveSize(iter) {\n assertNotInfinite(iter.size);\n return ensureSize(iter);\n }\n\n function iterableClass(iterable) {\n return isKeyed(iterable) ? KeyedIterable :\n isIndexed(iterable) ? IndexedIterable :\n SetIterable;\n }\n\n function makeSequence(iterable) {\n return Object.create(\n (\n isKeyed(iterable) ? KeyedSeq :\n isIndexed(iterable) ? IndexedSeq :\n SetSeq\n ).prototype\n );\n }\n\n function cacheResultThrough() {\n if (this._iter.cacheResult) {\n this._iter.cacheResult();\n this.size = this._iter.size;\n return this;\n } else {\n return Seq.prototype.cacheResult.call(this);\n }\n }\n\n function defaultComparator(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n }\n\n function forceIterator(keyPath) {\n var iter = getIterator(keyPath);\n if (!iter) {\n // Array might not be iterable in this environment, so we need a fallback\n // to our wrapped type.\n if (!isArrayLike(keyPath)) {\n throw new TypeError('Expected iterable or array-like: ' + keyPath);\n }\n iter = getIterator(Iterable(keyPath));\n }\n return iter;\n }\n\n createClass(Record, KeyedCollection);\n\n function Record(defaultValues, name) {\n var hasInitialized;\n\n var RecordType = function Record(values) {\n if (values instanceof RecordType) {\n return values;\n }\n if (!(this instanceof RecordType)) {\n return new RecordType(values);\n }\n if (!hasInitialized) {\n hasInitialized = true;\n var keys = Object.keys(defaultValues);\n setProps(RecordTypePrototype, keys);\n RecordTypePrototype.size = keys.length;\n RecordTypePrototype._name = name;\n RecordTypePrototype._keys = keys;\n RecordTypePrototype._defaultValues = defaultValues;\n }\n this._map = Map(values);\n };\n\n var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n RecordTypePrototype.constructor = RecordType;\n\n return RecordType;\n }\n\n Record.prototype.toString = function() {\n return this.__toString(recordName(this) + ' {', '}');\n };\n\n // @pragma Access\n\n Record.prototype.has = function(k) {\n return this._defaultValues.hasOwnProperty(k);\n };\n\n Record.prototype.get = function(k, notSetValue) {\n if (!this.has(k)) {\n return notSetValue;\n }\n var defaultVal = this._defaultValues[k];\n return this._map ? this._map.get(k, defaultVal) : defaultVal;\n };\n\n // @pragma Modification\n\n Record.prototype.clear = function() {\n if (this.__ownerID) {\n this._map && this._map.clear();\n return this;\n }\n var RecordType = this.constructor;\n return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));\n };\n\n Record.prototype.set = function(k, v) {\n if (!this.has(k)) {\n throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n }\n if (this._map && !this._map.has(k)) {\n var defaultVal = this._defaultValues[k];\n if (v === defaultVal) {\n return this;\n }\n }\n var newMap = this._map && this._map.set(k, v);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n\n Record.prototype.remove = function(k) {\n if (!this.has(k)) {\n return this;\n }\n var newMap = this._map && this._map.remove(k);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n\n Record.prototype.wasAltered = function() {\n return this._map.wasAltered();\n };\n\n Record.prototype.__iterator = function(type, reverse) {var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterator(type, reverse);\n };\n\n Record.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterate(fn, reverse);\n };\n\n Record.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map && this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return makeRecord(this, newMap, ownerID);\n };\n\n\n var RecordPrototype = Record.prototype;\n RecordPrototype[DELETE] = RecordPrototype.remove;\n RecordPrototype.deleteIn =\n RecordPrototype.removeIn = MapPrototype.removeIn;\n RecordPrototype.merge = MapPrototype.merge;\n RecordPrototype.mergeWith = MapPrototype.mergeWith;\n RecordPrototype.mergeIn = MapPrototype.mergeIn;\n RecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n RecordPrototype.setIn = MapPrototype.setIn;\n RecordPrototype.update = MapPrototype.update;\n RecordPrototype.updateIn = MapPrototype.updateIn;\n RecordPrototype.withMutations = MapPrototype.withMutations;\n RecordPrototype.asMutable = MapPrototype.asMutable;\n RecordPrototype.asImmutable = MapPrototype.asImmutable;\n\n\n function makeRecord(likeRecord, map, ownerID) {\n var record = Object.create(Object.getPrototypeOf(likeRecord));\n record._map = map;\n record.__ownerID = ownerID;\n return record;\n }\n\n function recordName(record) {\n return record._name || record.constructor.name || 'Record';\n }\n\n function setProps(prototype, names) {\n try {\n names.forEach(setProp.bind(undefined, prototype));\n } catch (error) {\n // Object.defineProperty failed. Probably IE8.\n }\n }\n\n function setProp(prototype, name) {\n Object.defineProperty(prototype, name, {\n get: function() {\n return this.get(name);\n },\n set: function(value) {\n invariant(this.__ownerID, 'Cannot set on an immutable record.');\n this.set(name, value);\n }\n });\n }\n\n createClass(Set, SetCollection);\n\n // @pragma Construction\n\n function Set(value) {\n return value === null || value === undefined ? emptySet() :\n isSet(value) && !isOrdered(value) ? value :\n emptySet().withMutations(function(set ) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v ) {return set.add(v)});\n });\n }\n\n Set.of = function(/*...values*/) {\n return this(arguments);\n };\n\n Set.fromKeys = function(value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n Set.prototype.toString = function() {\n return this.__toString('Set {', '}');\n };\n\n // @pragma Access\n\n Set.prototype.has = function(value) {\n return this._map.has(value);\n };\n\n // @pragma Modification\n\n Set.prototype.add = function(value) {\n return updateSet(this, this._map.set(value, true));\n };\n\n Set.prototype.remove = function(value) {\n return updateSet(this, this._map.remove(value));\n };\n\n Set.prototype.clear = function() {\n return updateSet(this, this._map.clear());\n };\n\n // @pragma Composition\n\n Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0);\n iters = iters.filter(function(x ) {return x.size !== 0});\n if (iters.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n return this.constructor(iters[0]);\n }\n return this.withMutations(function(set ) {\n for (var ii = 0; ii < iters.length; ii++) {\n SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)});\n }\n });\n };\n\n Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function(iter ) {return SetIterable(iter)});\n var originalSet = this;\n return this.withMutations(function(set ) {\n originalSet.forEach(function(value ) {\n if (!iters.every(function(iter ) {return iter.includes(value)})) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function(iter ) {return SetIterable(iter)});\n var originalSet = this;\n return this.withMutations(function(set ) {\n originalSet.forEach(function(value ) {\n if (iters.some(function(iter ) {return iter.includes(value)})) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.merge = function() {\n return this.union.apply(this, arguments);\n };\n\n Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return this.union.apply(this, iters);\n };\n\n Set.prototype.sort = function(comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator));\n };\n\n Set.prototype.sortBy = function(mapper, comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator, mapper));\n };\n\n Set.prototype.wasAltered = function() {\n return this._map.wasAltered();\n };\n\n Set.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._map.__iterate(function(_, k) {return fn(k, k, this$0)}, reverse);\n };\n\n Set.prototype.__iterator = function(type, reverse) {\n return this._map.map(function(_, k) {return k}).__iterator(type, reverse);\n };\n\n Set.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return this.__make(newMap, ownerID);\n };\n\n\n function isSet(maybeSet) {\n return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n }\n\n Set.isSet = isSet;\n\n var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n\n var SetPrototype = Set.prototype;\n SetPrototype[IS_SET_SENTINEL] = true;\n SetPrototype[DELETE] = SetPrototype.remove;\n SetPrototype.mergeDeep = SetPrototype.merge;\n SetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n SetPrototype.withMutations = MapPrototype.withMutations;\n SetPrototype.asMutable = MapPrototype.asMutable;\n SetPrototype.asImmutable = MapPrototype.asImmutable;\n\n SetPrototype.__empty = emptySet;\n SetPrototype.__make = makeSet;\n\n function updateSet(set, newMap) {\n if (set.__ownerID) {\n set.size = newMap.size;\n set._map = newMap;\n return set;\n }\n return newMap === set._map ? set :\n newMap.size === 0 ? set.__empty() :\n set.__make(newMap);\n }\n\n function makeSet(map, ownerID) {\n var set = Object.create(SetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_SET;\n function emptySet() {\n return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n }\n\n createClass(OrderedSet, Set);\n\n // @pragma Construction\n\n function OrderedSet(value) {\n return value === null || value === undefined ? emptyOrderedSet() :\n isOrderedSet(value) ? value :\n emptyOrderedSet().withMutations(function(set ) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v ) {return set.add(v)});\n });\n }\n\n OrderedSet.of = function(/*...values*/) {\n return this(arguments);\n };\n\n OrderedSet.fromKeys = function(value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n OrderedSet.prototype.toString = function() {\n return this.__toString('OrderedSet {', '}');\n };\n\n\n function isOrderedSet(maybeOrderedSet) {\n return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n }\n\n OrderedSet.isOrderedSet = isOrderedSet;\n\n var OrderedSetPrototype = OrderedSet.prototype;\n OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;\n\n OrderedSetPrototype.__empty = emptyOrderedSet;\n OrderedSetPrototype.__make = makeOrderedSet;\n\n function makeOrderedSet(map, ownerID) {\n var set = Object.create(OrderedSetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_ORDERED_SET;\n function emptyOrderedSet() {\n return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));\n }\n\n createClass(Stack, IndexedCollection);\n\n // @pragma Construction\n\n function Stack(value) {\n return value === null || value === undefined ? emptyStack() :\n isStack(value) ? value :\n emptyStack().unshiftAll(value);\n }\n\n Stack.of = function(/*...values*/) {\n return this(arguments);\n };\n\n Stack.prototype.toString = function() {\n return this.__toString('Stack [', ']');\n };\n\n // @pragma Access\n\n Stack.prototype.get = function(index, notSetValue) {\n var head = this._head;\n index = wrapIndex(this, index);\n while (head && index--) {\n head = head.next;\n }\n return head ? head.value : notSetValue;\n };\n\n Stack.prototype.peek = function() {\n return this._head && this._head.value;\n };\n\n // @pragma Modification\n\n Stack.prototype.push = function(/*...values*/) {\n if (arguments.length === 0) {\n return this;\n }\n var newSize = this.size + arguments.length;\n var head = this._head;\n for (var ii = arguments.length - 1; ii >= 0; ii--) {\n head = {\n value: arguments[ii],\n next: head\n };\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pushAll = function(iter) {\n iter = IndexedIterable(iter);\n if (iter.size === 0) {\n return this;\n }\n assertNotInfinite(iter.size);\n var newSize = this.size;\n var head = this._head;\n iter.reverse().forEach(function(value ) {\n newSize++;\n head = {\n value: value,\n next: head\n };\n });\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pop = function() {\n return this.slice(1);\n };\n\n Stack.prototype.unshift = function(/*...values*/) {\n return this.push.apply(this, arguments);\n };\n\n Stack.prototype.unshiftAll = function(iter) {\n return this.pushAll(iter);\n };\n\n Stack.prototype.shift = function() {\n return this.pop.apply(this, arguments);\n };\n\n Stack.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._head = undefined;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyStack();\n };\n\n Stack.prototype.slice = function(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n var resolvedBegin = resolveBegin(begin, this.size);\n var resolvedEnd = resolveEnd(end, this.size);\n if (resolvedEnd !== this.size) {\n // super.slice(begin, end);\n return IndexedCollection.prototype.slice.call(this, begin, end);\n }\n var newSize = this.size - resolvedBegin;\n var head = this._head;\n while (resolvedBegin--) {\n head = head.next;\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n // @pragma Mutability\n\n Stack.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeStack(this.size, this._head, ownerID, this.__hash);\n };\n\n // @pragma Iteration\n\n Stack.prototype.__iterate = function(fn, reverse) {\n if (reverse) {\n return this.reverse().__iterate(fn);\n }\n var iterations = 0;\n var node = this._head;\n while (node) {\n if (fn(node.value, iterations++, this) === false) {\n break;\n }\n node = node.next;\n }\n return iterations;\n };\n\n Stack.prototype.__iterator = function(type, reverse) {\n if (reverse) {\n return this.reverse().__iterator(type);\n }\n var iterations = 0;\n var node = this._head;\n return new Iterator(function() {\n if (node) {\n var value = node.value;\n node = node.next;\n return iteratorValue(type, iterations++, value);\n }\n return iteratorDone();\n });\n };\n\n\n function isStack(maybeStack) {\n return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n }\n\n Stack.isStack = isStack;\n\n var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\n var StackPrototype = Stack.prototype;\n StackPrototype[IS_STACK_SENTINEL] = true;\n StackPrototype.withMutations = MapPrototype.withMutations;\n StackPrototype.asMutable = MapPrototype.asMutable;\n StackPrototype.asImmutable = MapPrototype.asImmutable;\n StackPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n function makeStack(size, head, ownerID, hash) {\n var map = Object.create(StackPrototype);\n map.size = size;\n map._head = head;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_STACK;\n function emptyStack() {\n return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n }\n\n /**\n * Contributes additional methods to a constructor\n */\n function mixin(ctor, methods) {\n var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; };\n Object.keys(methods).forEach(keyCopier);\n Object.getOwnPropertySymbols &&\n Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n return ctor;\n }\n\n Iterable.Iterator = Iterator;\n\n mixin(Iterable, {\n\n // ### Conversion to other types\n\n toArray: function() {\n assertNotInfinite(this.size);\n var array = new Array(this.size || 0);\n this.valueSeq().__iterate(function(v, i) { array[i] = v; });\n return array;\n },\n\n toIndexedSeq: function() {\n return new ToIndexedSequence(this);\n },\n\n toJS: function() {\n return this.toSeq().map(\n function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value}\n ).__toJS();\n },\n\n toJSON: function() {\n return this.toSeq().map(\n function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value}\n ).__toJS();\n },\n\n toKeyedSeq: function() {\n return new ToKeyedSequence(this, true);\n },\n\n toMap: function() {\n // Use Late Binding here to solve the circular dependency.\n return Map(this.toKeyedSeq());\n },\n\n toObject: function() {\n assertNotInfinite(this.size);\n var object = {};\n this.__iterate(function(v, k) { object[k] = v; });\n return object;\n },\n\n toOrderedMap: function() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedMap(this.toKeyedSeq());\n },\n\n toOrderedSet: function() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSet: function() {\n // Use Late Binding here to solve the circular dependency.\n return Set(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSetSeq: function() {\n return new ToSetSequence(this);\n },\n\n toSeq: function() {\n return isIndexed(this) ? this.toIndexedSeq() :\n isKeyed(this) ? this.toKeyedSeq() :\n this.toSetSeq();\n },\n\n toStack: function() {\n // Use Late Binding here to solve the circular dependency.\n return Stack(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toList: function() {\n // Use Late Binding here to solve the circular dependency.\n return List(isKeyed(this) ? this.valueSeq() : this);\n },\n\n\n // ### Common JavaScript methods and properties\n\n toString: function() {\n return '[Iterable]';\n },\n\n __toString: function(head, tail) {\n if (this.size === 0) {\n return head + tail;\n }\n return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n },\n\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n concat: function() {var values = SLICE$0.call(arguments, 0);\n return reify(this, concatFactory(this, values));\n },\n\n includes: function(searchValue) {\n return this.some(function(value ) {return is(value, searchValue)});\n },\n\n entries: function() {\n return this.__iterator(ITERATE_ENTRIES);\n },\n\n every: function(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = true;\n this.__iterate(function(v, k, c) {\n if (!predicate.call(context, v, k, c)) {\n returnValue = false;\n return false;\n }\n });\n return returnValue;\n },\n\n filter: function(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, true));\n },\n\n find: function(predicate, context, notSetValue) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[1] : notSetValue;\n },\n\n forEach: function(sideEffect, context) {\n assertNotInfinite(this.size);\n return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n },\n\n join: function(separator) {\n assertNotInfinite(this.size);\n separator = separator !== undefined ? '' + separator : ',';\n var joined = '';\n var isFirst = true;\n this.__iterate(function(v ) {\n isFirst ? (isFirst = false) : (joined += separator);\n joined += v !== null && v !== undefined ? v.toString() : '';\n });\n return joined;\n },\n\n keys: function() {\n return this.__iterator(ITERATE_KEYS);\n },\n\n map: function(mapper, context) {\n return reify(this, mapFactory(this, mapper, context));\n },\n\n reduce: function(reducer, initialReduction, context) {\n assertNotInfinite(this.size);\n var reduction;\n var useFirst;\n if (arguments.length < 2) {\n useFirst = true;\n } else {\n reduction = initialReduction;\n }\n this.__iterate(function(v, k, c) {\n if (useFirst) {\n useFirst = false;\n reduction = v;\n } else {\n reduction = reducer.call(context, reduction, v, k, c);\n }\n });\n return reduction;\n },\n\n reduceRight: function(reducer, initialReduction, context) {\n var reversed = this.toKeyedSeq().reverse();\n return reversed.reduce.apply(reversed, arguments);\n },\n\n reverse: function() {\n return reify(this, reverseFactory(this, true));\n },\n\n slice: function(begin, end) {\n return reify(this, sliceFactory(this, begin, end, true));\n },\n\n some: function(predicate, context) {\n return !this.every(not(predicate), context);\n },\n\n sort: function(comparator) {\n return reify(this, sortFactory(this, comparator));\n },\n\n values: function() {\n return this.__iterator(ITERATE_VALUES);\n },\n\n\n // ### More sequential methods\n\n butLast: function() {\n return this.slice(0, -1);\n },\n\n isEmpty: function() {\n return this.size !== undefined ? this.size === 0 : !this.some(function() {return true});\n },\n\n count: function(predicate, context) {\n return ensureSize(\n predicate ? this.toSeq().filter(predicate, context) : this\n );\n },\n\n countBy: function(grouper, context) {\n return countByFactory(this, grouper, context);\n },\n\n equals: function(other) {\n return deepEqual(this, other);\n },\n\n entrySeq: function() {\n var iterable = this;\n if (iterable._cache) {\n // We cache as an entries array, so we can just return the cache!\n return new ArraySeq(iterable._cache);\n }\n var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n entriesSequence.fromEntrySeq = function() {return iterable.toSeq()};\n return entriesSequence;\n },\n\n filterNot: function(predicate, context) {\n return this.filter(not(predicate), context);\n },\n\n findEntry: function(predicate, context, notSetValue) {\n var found = notSetValue;\n this.__iterate(function(v, k, c) {\n if (predicate.call(context, v, k, c)) {\n found = [k, v];\n return false;\n }\n });\n return found;\n },\n\n findKey: function(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry && entry[0];\n },\n\n findLast: function(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n },\n\n findLastEntry: function(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue);\n },\n\n findLastKey: function(predicate, context) {\n return this.toKeyedSeq().reverse().findKey(predicate, context);\n },\n\n first: function() {\n return this.find(returnTrue);\n },\n\n flatMap: function(mapper, context) {\n return reify(this, flatMapFactory(this, mapper, context));\n },\n\n flatten: function(depth) {\n return reify(this, flattenFactory(this, depth, true));\n },\n\n fromEntrySeq: function() {\n return new FromEntriesSequence(this);\n },\n\n get: function(searchKey, notSetValue) {\n return this.find(function(_, key) {return is(key, searchKey)}, undefined, notSetValue);\n },\n\n getIn: function(searchKeyPath, notSetValue) {\n var nested = this;\n // Note: in an ES6 environment, we would prefer:\n // for (var key of searchKeyPath) {\n var iter = forceIterator(searchKeyPath);\n var step;\n while (!(step = iter.next()).done) {\n var key = step.value;\n nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;\n if (nested === NOT_SET) {\n return notSetValue;\n }\n }\n return nested;\n },\n\n groupBy: function(grouper, context) {\n return groupByFactory(this, grouper, context);\n },\n\n has: function(searchKey) {\n return this.get(searchKey, NOT_SET) !== NOT_SET;\n },\n\n hasIn: function(searchKeyPath) {\n return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;\n },\n\n isSubset: function(iter) {\n iter = typeof iter.includes === 'function' ? iter : Iterable(iter);\n return this.every(function(value ) {return iter.includes(value)});\n },\n\n isSuperset: function(iter) {\n iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);\n return iter.isSubset(this);\n },\n\n keyOf: function(searchValue) {\n return this.findKey(function(value ) {return is(value, searchValue)});\n },\n\n keySeq: function() {\n return this.toSeq().map(keyMapper).toIndexedSeq();\n },\n\n last: function() {\n return this.toSeq().reverse().first();\n },\n\n lastKeyOf: function(searchValue) {\n return this.toKeyedSeq().reverse().keyOf(searchValue);\n },\n\n max: function(comparator) {\n return maxFactory(this, comparator);\n },\n\n maxBy: function(mapper, comparator) {\n return maxFactory(this, comparator, mapper);\n },\n\n min: function(comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);\n },\n\n minBy: function(mapper, comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);\n },\n\n rest: function() {\n return this.slice(1);\n },\n\n skip: function(amount) {\n return this.slice(Math.max(0, amount));\n },\n\n skipLast: function(amount) {\n return reify(this, this.toSeq().reverse().skip(amount).reverse());\n },\n\n skipWhile: function(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, true));\n },\n\n skipUntil: function(predicate, context) {\n return this.skipWhile(not(predicate), context);\n },\n\n sortBy: function(mapper, comparator) {\n return reify(this, sortFactory(this, comparator, mapper));\n },\n\n take: function(amount) {\n return this.slice(0, Math.max(0, amount));\n },\n\n takeLast: function(amount) {\n return reify(this, this.toSeq().reverse().take(amount).reverse());\n },\n\n takeWhile: function(predicate, context) {\n return reify(this, takeWhileFactory(this, predicate, context));\n },\n\n takeUntil: function(predicate, context) {\n return this.takeWhile(not(predicate), context);\n },\n\n valueSeq: function() {\n return this.toIndexedSeq();\n },\n\n\n // ### Hashable Object\n\n hashCode: function() {\n return this.__hash || (this.__hash = hashIterable(this));\n }\n\n\n // ### Internal\n\n // abstract __iterate(fn, reverse)\n\n // abstract __iterator(type, reverse)\n });\n\n // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n var IterablePrototype = Iterable.prototype;\n IterablePrototype[IS_ITERABLE_SENTINEL] = true;\n IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n IterablePrototype.__toJS = IterablePrototype.toArray;\n IterablePrototype.__toStringMapper = quoteString;\n IterablePrototype.inspect =\n IterablePrototype.toSource = function() { return this.toString(); };\n IterablePrototype.chain = IterablePrototype.flatMap;\n IterablePrototype.contains = IterablePrototype.includes;\n\n mixin(KeyedIterable, {\n\n // ### More sequential methods\n\n flip: function() {\n return reify(this, flipFactory(this));\n },\n\n mapEntries: function(mapper, context) {var this$0 = this;\n var iterations = 0;\n return reify(this,\n this.toSeq().map(\n function(v, k) {return mapper.call(context, [k, v], iterations++, this$0)}\n ).fromEntrySeq()\n );\n },\n\n mapKeys: function(mapper, context) {var this$0 = this;\n return reify(this,\n this.toSeq().flip().map(\n function(k, v) {return mapper.call(context, k, v, this$0)}\n ).flip()\n );\n }\n\n });\n\n var KeyedIterablePrototype = KeyedIterable.prototype;\n KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n KeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n KeyedIterablePrototype.__toStringMapper = function(v, k) {return JSON.stringify(k) + ': ' + quoteString(v)};\n\n\n\n mixin(IndexedIterable, {\n\n // ### Conversion to other types\n\n toKeyedSeq: function() {\n return new ToKeyedSequence(this, false);\n },\n\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n filter: function(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, false));\n },\n\n findIndex: function(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n indexOf: function(searchValue) {\n var key = this.keyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n lastIndexOf: function(searchValue) {\n var key = this.lastKeyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n reverse: function() {\n return reify(this, reverseFactory(this, false));\n },\n\n slice: function(begin, end) {\n return reify(this, sliceFactory(this, begin, end, false));\n },\n\n splice: function(index, removeNum /*, ...values*/) {\n var numArgs = arguments.length;\n removeNum = Math.max(removeNum | 0, 0);\n if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n return this;\n }\n // If index is negative, it should resolve relative to the size of the\n // collection. However size may be expensive to compute if not cached, so\n // only call count() if the number is in fact negative.\n index = resolveBegin(index, index < 0 ? this.count() : this.size);\n var spliced = this.slice(0, index);\n return reify(\n this,\n numArgs === 1 ?\n spliced :\n spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))\n );\n },\n\n\n // ### More collection methods\n\n findLastIndex: function(predicate, context) {\n var entry = this.findLastEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n first: function() {\n return this.get(0);\n },\n\n flatten: function(depth) {\n return reify(this, flattenFactory(this, depth, false));\n },\n\n get: function(index, notSetValue) {\n index = wrapIndex(this, index);\n return (index < 0 || (this.size === Infinity ||\n (this.size !== undefined && index > this.size))) ?\n notSetValue :\n this.find(function(_, key) {return key === index}, undefined, notSetValue);\n },\n\n has: function(index) {\n index = wrapIndex(this, index);\n return index >= 0 && (this.size !== undefined ?\n this.size === Infinity || index < this.size :\n this.indexOf(index) !== -1\n );\n },\n\n interpose: function(separator) {\n return reify(this, interposeFactory(this, separator));\n },\n\n interleave: function(/*...iterables*/) {\n var iterables = [this].concat(arrCopy(arguments));\n var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);\n var interleaved = zipped.flatten(true);\n if (zipped.size) {\n interleaved.size = zipped.size * iterables.length;\n }\n return reify(this, interleaved);\n },\n\n keySeq: function() {\n return Range(0, this.size);\n },\n\n last: function() {\n return this.get(-1);\n },\n\n skipWhile: function(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, false));\n },\n\n zip: function(/*, ...iterables */) {\n var iterables = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, iterables));\n },\n\n zipWith: function(zipper/*, ...iterables */) {\n var iterables = arrCopy(arguments);\n iterables[0] = this;\n return reify(this, zipWithFactory(this, zipper, iterables));\n }\n\n });\n\n IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n\n mixin(SetIterable, {\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n get: function(value, notSetValue) {\n return this.has(value) ? value : notSetValue;\n },\n\n includes: function(value) {\n return this.has(value);\n },\n\n\n // ### More sequential methods\n\n keySeq: function() {\n return this.valueSeq();\n }\n\n });\n\n SetIterable.prototype.has = IterablePrototype.includes;\n SetIterable.prototype.contains = SetIterable.prototype.includes;\n\n\n // Mixin subclasses\n\n mixin(KeyedSeq, KeyedIterable.prototype);\n mixin(IndexedSeq, IndexedIterable.prototype);\n mixin(SetSeq, SetIterable.prototype);\n\n mixin(KeyedCollection, KeyedIterable.prototype);\n mixin(IndexedCollection, IndexedIterable.prototype);\n mixin(SetCollection, SetIterable.prototype);\n\n\n // #pragma Helper functions\n\n function keyMapper(v, k) {\n return k;\n }\n\n function entryMapper(v, k) {\n return [k, v];\n }\n\n function not(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n }\n }\n\n function neg(predicate) {\n return function() {\n return -predicate.apply(this, arguments);\n }\n }\n\n function quoteString(value) {\n return typeof value === 'string' ? JSON.stringify(value) : String(value);\n }\n\n function defaultZipper() {\n return arrCopy(arguments);\n }\n\n function defaultNegComparator(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n }\n\n function hashIterable(iterable) {\n if (iterable.size === Infinity) {\n return 0;\n }\n var ordered = isOrdered(iterable);\n var keyed = isKeyed(iterable);\n var h = ordered ? 1 : 0;\n var size = iterable.__iterate(\n keyed ?\n ordered ?\n function(v, k) { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } :\n function(v, k) { h = h + hashMerge(hash(v), hash(k)) | 0; } :\n ordered ?\n function(v ) { h = 31 * h + hash(v) | 0; } :\n function(v ) { h = h + hash(v) | 0; }\n );\n return murmurHashOfSize(size, h);\n }\n\n function murmurHashOfSize(size, h) {\n h = imul(h, 0xCC9E2D51);\n h = imul(h << 15 | h >>> -15, 0x1B873593);\n h = imul(h << 13 | h >>> -13, 5);\n h = (h + 0xE6546B64 | 0) ^ size;\n h = imul(h ^ h >>> 16, 0x85EBCA6B);\n h = imul(h ^ h >>> 13, 0xC2B2AE35);\n h = smi(h ^ h >>> 16);\n return h;\n }\n\n function hashMerge(a, b) {\n return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int\n }\n\n var Immutable = {\n\n Iterable: Iterable,\n\n Seq: Seq,\n Collection: Collection,\n Map: Map,\n OrderedMap: OrderedMap,\n List: List,\n Stack: Stack,\n Set: Set,\n OrderedSet: OrderedSet,\n\n Record: Record,\n Range: Range,\n Repeat: Repeat,\n\n is: is,\n fromJS: fromJS\n\n };\n\n return Immutable;\n\n}));","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport createHistory from 'history/createBrowserHistory';\n\nexport default class ModalRoot extends React.PureComponent {\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n children: PropTypes.node,\n onClose: PropTypes.func.isRequired,\n noEsc: PropTypes.bool,\n };\n\n state = {\n revealed: !!this.props.children,\n };\n\n activeElement = this.state.revealed ? document.activeElement : null;\n\n handleKeyUp = (e) => {\n if ((e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27)\n && !!this.props.children && !this.props.noEsc) {\n this.props.onClose();\n }\n }\n\n componentDidMount () {\n window.addEventListener('keyup', this.handleKeyUp, false);\n this.history = this.context.router ? this.context.router.history : createHistory();\n }\n\n componentWillReceiveProps (nextProps) {\n if (!!nextProps.children && !this.props.children) {\n this.activeElement = document.activeElement;\n\n this.getSiblings().forEach(sibling => sibling.setAttribute('inert', true));\n } else if (!nextProps.children) {\n this.setState({ revealed: false });\n }\n if (!nextProps.children && !!this.props.children) {\n this.activeElement.focus();\n this.activeElement = null;\n }\n }\n\n componentDidUpdate (prevProps) {\n if (!this.props.children && !!prevProps.children) {\n this.getSiblings().forEach(sibling => sibling.removeAttribute('inert'));\n this.handleModalClose();\n }\n if (this.props.children) {\n requestAnimationFrame(() => {\n this.setState({ revealed: true });\n });\n if (!prevProps.children) this.handleModalOpen();\n }\n }\n\n componentWillUnmount () {\n window.removeEventListener('keyup', this.handleKeyUp);\n }\n\n handleModalClose () {\n this.unlistenHistory();\n\n const state = this.history.location.state;\n if (state && state.mastodonModalOpen) {\n this.history.goBack();\n }\n }\n\n handleModalOpen () {\n const history = this.history;\n const state = {...history.location.state, mastodonModalOpen: true};\n history.push(history.location.pathname, state);\n this.unlistenHistory = history.listen(() => {\n this.props.onClose();\n });\n }\n\n getSiblings = () => {\n return Array(...this.node.parentElement.childNodes).filter(node => node !== this.node);\n }\n\n setRef = ref => {\n this.node = ref;\n }\n\n render () {\n const { children, onClose } = this.props;\n const { revealed } = this.state;\n const visible = !!children;\n\n if (!visible) {\n return (\n <div className='modal-root' ref={this.setRef} style={{ opacity: 0 }} />\n );\n }\n\n return (\n <div className='modal-root' ref={this.setRef} style={{ opacity: revealed ? 1 : 0 }}>\n <div style={{ pointerEvents: visible ? 'auto' : 'none' }}>\n <div role='presentation' className='modal-root__overlay' onClick={onClose} />\n <div role='dialog' className='modal-root__container'>{children}</div>\n </div>\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class ModalRoot extends React.PureComponent {\n\n static propTypes = {\n children: PropTypes.node,\n onClose: PropTypes.func.isRequired,\n };\n\n state = {\n revealed: !!this.props.children,\n };\n\n activeElement = this.state.revealed ? document.activeElement : null;\n\n handleKeyUp = (e) => {\n if ((e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27)\n && !!this.props.children) {\n this.props.onClose();\n }\n }\n\n componentDidMount () {\n window.addEventListener('keyup', this.handleKeyUp, false);\n }\n\n componentWillReceiveProps (nextProps) {\n if (!!nextProps.children && !this.props.children) {\n this.activeElement = document.activeElement;\n\n this.getSiblings().forEach(sibling => sibling.setAttribute('inert', true));\n } else if (!nextProps.children) {\n this.setState({ revealed: false });\n }\n if (!nextProps.children && !!this.props.children) {\n this.activeElement.focus();\n this.activeElement = null;\n }\n }\n\n componentDidUpdate (prevProps) {\n if (!this.props.children && !!prevProps.children) {\n this.getSiblings().forEach(sibling => sibling.removeAttribute('inert'));\n }\n if (this.props.children) {\n requestAnimationFrame(() => {\n this.setState({ revealed: true });\n });\n }\n }\n\n componentWillUnmount () {\n window.removeEventListener('keyup', this.handleKeyUp);\n }\n\n getSiblings = () => {\n return Array(...this.node.parentElement.childNodes).filter(node => node !== this.node);\n }\n\n setRef = ref => {\n this.node = ref;\n }\n\n render () {\n const { children, onClose } = this.props;\n const { revealed } = this.state;\n const visible = !!children;\n\n if (!visible) {\n return (\n <div className='modal-root' ref={this.setRef} style={{ opacity: 0 }} />\n );\n }\n\n return (\n <div className='modal-root' ref={this.setRef} style={{ opacity: revealed ? 1 : 0 }}>\n <div style={{ pointerEvents: visible ? 'auto' : 'none' }}>\n <div role='presentation' className='modal-root__overlay' onClick={onClose} />\n <div role='dialog' className='modal-root__container'>{children}</div>\n </div>\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class ExtendedVideoPlayer extends React.PureComponent {\n\n static propTypes = {\n src: PropTypes.string.isRequired,\n alt: PropTypes.string,\n width: PropTypes.number,\n height: PropTypes.number,\n time: PropTypes.number,\n controls: PropTypes.bool.isRequired,\n muted: PropTypes.bool.isRequired,\n onClick: PropTypes.func,\n };\n\n handleLoadedData = () => {\n if (this.props.time) {\n this.video.currentTime = this.props.time;\n }\n }\n\n componentDidMount () {\n this.video.addEventListener('loadeddata', this.handleLoadedData);\n }\n\n componentWillUnmount () {\n this.video.removeEventListener('loadeddata', this.handleLoadedData);\n }\n\n setRef = (c) => {\n this.video = c;\n }\n\n handleClick = e => {\n e.stopPropagation();\n const handler = this.props.onClick;\n if (handler) handler();\n }\n\n render () {\n const { src, muted, controls, alt } = this.props;\n\n return (\n <div className='extended-video-player'>\n <video\n ref={this.setRef}\n src={src}\n autoPlay\n role='button'\n tabIndex='0'\n aria-label={alt}\n title={alt}\n muted={muted}\n controls={controls}\n loop={!controls}\n onClick={this.handleClick}\n />\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport ReactSwipeableViews from 'react-swipeable-views';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport Video from 'flavours/glitch/features/video';\nimport ExtendedVideoPlayer from 'flavours/glitch/components/extended_video_player';\nimport classNames from 'classnames';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport IconButton from 'flavours/glitch/components/icon_button';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ImageLoader from './image_loader';\n\nconst messages = defineMessages({\n close: { id: 'lightbox.close', defaultMessage: 'Close' },\n previous: { id: 'lightbox.previous', defaultMessage: 'Previous' },\n next: { id: 'lightbox.next', defaultMessage: 'Next' },\n});\n\n@injectIntl\nexport default class MediaModal extends ImmutablePureComponent {\n\n static propTypes = {\n media: ImmutablePropTypes.list.isRequired,\n index: PropTypes.number.isRequired,\n onClose: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n state = {\n index: null,\n navigationHidden: false,\n };\n\n handleSwipe = (index) => {\n this.setState({ index: index % this.props.media.size });\n }\n\n handleNextClick = () => {\n this.setState({ index: (this.getIndex() + 1) % this.props.media.size });\n }\n\n handlePrevClick = () => {\n this.setState({ index: (this.props.media.size + this.getIndex() - 1) % this.props.media.size });\n }\n\n handleChangeIndex = (e) => {\n const index = Number(e.currentTarget.getAttribute('data-index'));\n this.setState({ index: index % this.props.media.size });\n }\n\n handleKeyDown = (e) => {\n switch(e.key) {\n case 'ArrowLeft':\n this.handlePrevClick();\n e.preventDefault();\n e.stopPropagation();\n break;\n case 'ArrowRight':\n this.handleNextClick();\n e.preventDefault();\n e.stopPropagation();\n break;\n }\n }\n\n componentDidMount () {\n window.addEventListener('keydown', this.handleKeyDown, false);\n }\n\n componentWillUnmount () {\n window.removeEventListener('keydown', this.handleKeyDown);\n }\n\n getIndex () {\n return this.state.index !== null ? this.state.index : this.props.index;\n }\n\n toggleNavigation = () => {\n this.setState(prevState => ({\n navigationHidden: !prevState.navigationHidden,\n }));\n };\n\n render () {\n const { media, intl, onClose } = this.props;\n const { navigationHidden } = this.state;\n\n const index = this.getIndex();\n let pagination = [];\n\n const leftNav = media.size > 1 && <button tabIndex='0' className='media-modal__nav media-modal__nav--left' onClick={this.handlePrevClick} aria-label={intl.formatMessage(messages.previous)}><i className='fa fa-fw fa-chevron-left' /></button>;\n const rightNav = media.size > 1 && <button tabIndex='0' className='media-modal__nav media-modal__nav--right' onClick={this.handleNextClick} aria-label={intl.formatMessage(messages.next)}><i className='fa fa-fw fa-chevron-right' /></button>;\n\n if (media.size > 1) {\n pagination = media.map((item, i) => {\n const classes = ['media-modal__button'];\n if (i === index) {\n classes.push('media-modal__button--active');\n }\n return (<li className='media-modal__page-dot' key={i}><button tabIndex='0' className={classes.join(' ')} onClick={this.handleChangeIndex} data-index={i}>{i + 1}</button></li>);\n });\n }\n\n const content = media.map((image) => {\n const width = image.getIn(['meta', 'original', 'width']) || null;\n const height = image.getIn(['meta', 'original', 'height']) || null;\n\n if (image.get('type') === 'image') {\n return (\n <ImageLoader\n previewSrc={image.get('preview_url')}\n src={image.get('url')}\n width={width}\n height={height}\n alt={image.get('description')}\n key={image.get('url')}\n onClick={this.toggleNavigation}\n />\n );\n } else if (image.get('type') === 'video') {\n const { time } = this.props;\n\n return (\n <Video\n preview={image.get('preview_url')}\n src={image.get('url')}\n width={image.get('width')}\n height={image.get('height')}\n startTime={time || 0}\n onCloseVideo={onClose}\n detailed\n alt={image.get('description')}\n key={image.get('url')}\n />\n );\n } else if (image.get('type') === 'gifv') {\n return (\n <ExtendedVideoPlayer\n src={image.get('url')}\n muted\n controls={false}\n width={width}\n height={height}\n key={image.get('preview_url')}\n alt={image.get('description')}\n onClick={this.toggleNavigation}\n />\n );\n }\n\n return null;\n }).toArray();\n\n // you can't use 100vh, because the viewport height is taller\n // than the visible part of the document in some mobile\n // browsers when it's address bar is visible.\n // https://developers.google.com/web/updates/2016/12/url-bar-resizing\n const swipeableViewsStyle = {\n width: '100%',\n height: '100%',\n };\n\n const containerStyle = {\n alignItems: 'center', // center vertically\n };\n\n const navigationClassName = classNames('media-modal__navigation', {\n 'media-modal__navigation--hidden': navigationHidden,\n });\n\n return (\n <div className='modal-root__modal media-modal'>\n <div\n className='media-modal__closer'\n role='presentation'\n onClick={onClose}\n >\n <ReactSwipeableViews\n style={swipeableViewsStyle}\n containerStyle={containerStyle}\n onChangeIndex={this.handleSwipe}\n onSwitching={this.handleSwitching}\n index={index}\n >\n {content}\n </ReactSwipeableViews>\n </div>\n <div className={navigationClassName}>\n <IconButton className='media-modal__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={40} />\n {leftNav}\n {rightNav}\n <ul className='media-modal__pagination'>\n {pagination}\n </ul>\n </div>\n </div>\n );\n }\n\n}\n","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports['default'] = spring;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _presets = require('./presets');\n\nvar _presets2 = _interopRequireDefault(_presets);\n\nvar defaultConfig = _extends({}, _presets2['default'].noWobble, {\n precision: 0.01\n});\n\nfunction spring(val, config) {\n return _extends({}, defaultConfig, config, { val: val });\n}\n\nmodule.exports = exports['default'];","import React from 'react';\nimport Motion from 'flavours/glitch/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nexport default class IconButton extends React.PureComponent {\n\n static propTypes = {\n className: PropTypes.string,\n title: PropTypes.string.isRequired,\n icon: PropTypes.string.isRequired,\n onClick: PropTypes.func,\n size: PropTypes.number,\n active: PropTypes.bool,\n pressed: PropTypes.bool,\n expanded: PropTypes.bool,\n style: PropTypes.object,\n activeStyle: PropTypes.object,\n disabled: PropTypes.bool,\n inverted: PropTypes.bool,\n animate: PropTypes.bool,\n flip: PropTypes.bool,\n overlay: PropTypes.bool,\n tabIndex: PropTypes.string,\n label: PropTypes.string,\n };\n\n static defaultProps = {\n size: 18,\n active: false,\n disabled: false,\n animate: false,\n overlay: false,\n tabIndex: '0',\n };\n\n handleClick = (e) => {\n e.preventDefault();\n\n if (!this.props.disabled) {\n this.props.onClick(e);\n }\n }\n\n render () {\n let style = {\n fontSize: `${this.props.size}px`,\n height: `${this.props.size * 1.28571429}px`,\n lineHeight: `${this.props.size}px`,\n ...this.props.style,\n ...(this.props.active ? this.props.activeStyle : {}),\n };\n if (!this.props.label) {\n style.width = `${this.props.size * 1.28571429}px`;\n } else {\n style.textAlign = 'left';\n }\n\n const {\n active,\n animate,\n className,\n disabled,\n expanded,\n icon,\n inverted,\n flip,\n overlay,\n pressed,\n tabIndex,\n title,\n } = this.props;\n\n const classes = classNames(className, 'icon-button', {\n active,\n disabled,\n inverted,\n overlayed: overlay,\n });\n\n const flipDeg = flip ? -180 : -360;\n const rotateDeg = active ? flipDeg : 0;\n\n const motionDefaultStyle = {\n rotate: rotateDeg,\n };\n\n const springOpts = {\n stiffness: this.props.flip ? 60 : 120,\n damping: 7,\n };\n const motionStyle = {\n rotate: animate ? spring(rotateDeg, springOpts) : 0,\n };\n\n if (!animate) {\n // Perf optimization: avoid unnecessary <Motion> components unless\n // we actually need to animate.\n return (\n <button\n aria-label={title}\n aria-pressed={pressed}\n aria-expanded={expanded}\n title={title}\n className={classes}\n onClick={this.handleClick}\n style={style}\n tabIndex={tabIndex}\n >\n <i className={`fa fa-fw fa-${icon}`} aria-hidden='true' />\n </button>\n );\n }\n\n return (\n <Motion defaultStyle={motionDefaultStyle} style={motionStyle}>\n {({ rotate }) =>\n (<button\n aria-label={title}\n aria-pressed={pressed}\n aria-expanded={expanded}\n title={title}\n className={classes}\n onClick={this.handleClick}\n style={style}\n tabIndex={tabIndex}\n >\n <i style={{ transform: `rotate(${rotate}deg)` }} className={`fa fa-fw fa-${icon}`} aria-hidden='true' />\n {this.props.label}\n </button>)\n }\n </Motion>\n );\n }\n\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.showLoading = exports.resetLoading = exports.loadingBarReducer = exports.loadingBarMiddleware = exports.LoadingBar = exports.ImmutableLoadingBar = exports.hideLoading = undefined;\n\nvar _loading_bar = require('./loading_bar');\n\nvar _loading_bar2 = _interopRequireDefault(_loading_bar);\n\nvar _loading_bar_middleware = require('./loading_bar_middleware');\n\nvar _loading_bar_middleware2 = _interopRequireDefault(_loading_bar_middleware);\n\nvar _loading_bar_ducks = require('./loading_bar_ducks');\n\nvar _immutable = require('./immutable');\n\nvar _immutable2 = _interopRequireDefault(_immutable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.hideLoading = _loading_bar_ducks.hideLoading;\nexports.ImmutableLoadingBar = _immutable2.default;\nexports.LoadingBar = _loading_bar.LoadingBar;\nexports.loadingBarMiddleware = _loading_bar_middleware2.default;\nexports.loadingBarReducer = _loading_bar_ducks.loadingBarReducer;\nexports.resetLoading = _loading_bar_ducks.resetLoading;\nexports.showLoading = _loading_bar_ducks.showLoading;\nexports.default = _loading_bar2.default;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n// adapted from https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\nvar detectPassiveEvents = {\n update: function update() {\n if (typeof window !== 'undefined' && typeof window.addEventListener === 'function') {\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passive = true;\n }\n });\n // note: have to set and remove a no-op listener instead of null\n // (which was used previously), becasue Edge v15 throws an error\n // when providing a null callback.\n // https://github.com/rafrex/detect-passive-events/pull/3\n var noop = function noop() {};\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n detectPassiveEvents.hasSupport = passive;\n }\n }\n};\n\ndetectPassiveEvents.update();\nexports.default = detectPassiveEvents;","import React, { PureComponent, Fragment } from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { IntlProvider, addLocaleData } from 'react-intl';\nimport { getLocale } from '../locales';\nimport MediaGallery from '../components/media_gallery';\nimport Video from '../features/video';\nimport Card from '../features/status/components/card';\nimport ModalRoot from '../components/modal_root';\nimport MediaModal from '../features/ui/components/media_modal';\nimport { List as ImmutableList, fromJS } from 'immutable';\n\nconst { localeData, messages } = getLocale();\naddLocaleData(localeData);\n\nconst MEDIA_COMPONENTS = { MediaGallery, Video, Card };\n\nexport default class MediaContainer extends PureComponent {\n\n static propTypes = {\n locale: PropTypes.string.isRequired,\n components: PropTypes.object.isRequired,\n };\n\n state = {\n media: null,\n index: null,\n time: null,\n };\n\n handleOpenMedia = (media, index) => {\n document.body.classList.add('with-modals--active');\n this.setState({ media, index });\n }\n\n handleOpenVideo = (video, time) => {\n const media = ImmutableList([video]);\n\n document.body.classList.add('with-modals--active');\n this.setState({ media, time });\n }\n\n handleCloseMedia = () => {\n document.body.classList.remove('with-modals--active');\n this.setState({ media: null, index: null, time: null });\n }\n\n render () {\n const { locale, components } = this.props;\n\n return (\n <IntlProvider locale={locale} messages={messages}>\n <Fragment>\n {[].map.call(components, (component, i) => {\n const componentName = component.getAttribute('data-component');\n const Component = MEDIA_COMPONENTS[componentName];\n const { media, card, ...props } = JSON.parse(component.getAttribute('data-props'));\n\n Object.assign(props, {\n ...(media ? { media: fromJS(media) } : {}),\n ...(card ? { card: fromJS(card) } : {}),\n\n ...(componentName === 'Video' ? {\n onOpenVideo: this.handleOpenVideo,\n } : {\n onOpenMedia: this.handleOpenMedia,\n }),\n });\n\n return ReactDOM.createPortal(\n <Component {...props} key={`media-${i}`} />,\n component,\n );\n })}\n <ModalRoot onClose={this.handleCloseMedia}>\n {this.state.media && (\n <MediaModal\n media={this.state.media}\n index={this.state.index || 0}\n time={this.state.time}\n onClose={this.handleCloseMedia}\n />\n )}\n </ModalRoot>\n </Fragment>\n </IntlProvider>\n );\n }\n\n}\n","import React from 'react';\nimport Motion from '../features/ui/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Icon from 'mastodon/components/icon';\n\nexport default class IconButton extends React.PureComponent {\n\n static propTypes = {\n className: PropTypes.string,\n title: PropTypes.string.isRequired,\n icon: PropTypes.string.isRequired,\n onClick: PropTypes.func,\n size: PropTypes.number,\n active: PropTypes.bool,\n pressed: PropTypes.bool,\n expanded: PropTypes.bool,\n style: PropTypes.object,\n activeStyle: PropTypes.object,\n disabled: PropTypes.bool,\n inverted: PropTypes.bool,\n animate: PropTypes.bool,\n overlay: PropTypes.bool,\n tabIndex: PropTypes.string,\n };\n\n static defaultProps = {\n size: 18,\n active: false,\n disabled: false,\n animate: false,\n overlay: false,\n tabIndex: '0',\n };\n\n handleClick = (e) => {\n e.preventDefault();\n\n if (!this.props.disabled) {\n this.props.onClick(e);\n }\n }\n\n render () {\n const style = {\n fontSize: `${this.props.size}px`,\n width: `${this.props.size * 1.28571429}px`,\n height: `${this.props.size * 1.28571429}px`,\n lineHeight: `${this.props.size}px`,\n ...this.props.style,\n ...(this.props.active ? this.props.activeStyle : {}),\n };\n\n const {\n active,\n animate,\n className,\n disabled,\n expanded,\n icon,\n inverted,\n overlay,\n pressed,\n tabIndex,\n title,\n } = this.props;\n\n const classes = classNames(className, 'icon-button', {\n active,\n disabled,\n inverted,\n overlayed: overlay,\n });\n\n if (!animate) {\n // Perf optimization: avoid unnecessary <Motion> components unless\n // we actually need to animate.\n return (\n <button\n aria-label={title}\n aria-pressed={pressed}\n aria-expanded={expanded}\n title={title}\n className={classes}\n onClick={this.handleClick}\n style={style}\n tabIndex={tabIndex}\n >\n <Icon id={icon} fixedWidth aria-hidden='true' />\n </button>\n );\n }\n\n return (\n <Motion defaultStyle={{ rotate: active ? -360 : 0 }} style={{ rotate: animate ? spring(active ? -360 : 0, { stiffness: 120, damping: 7 }) : 0 }}>\n {({ rotate }) => (\n <button\n aria-label={title}\n aria-pressed={pressed}\n aria-expanded={expanded}\n title={title}\n className={classes}\n onClick={this.handleClick}\n style={style}\n tabIndex={tabIndex}\n >\n <Icon id={icon} style={{ transform: `rotate(${rotate}deg)` }} fixedWidth aria-hidden='true' />\n </button>\n )}\n </Motion>\n );\n }\n\n}\n","import React, { PureComponent, Fragment } from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { IntlProvider, addLocaleData } from 'react-intl';\nimport { getLocale } from 'mastodon/locales';\nimport MediaGallery from 'flavours/glitch/components/media_gallery';\nimport Video from 'flavours/glitch/features/video';\nimport Card from 'flavours/glitch/features/status/components/card';\nimport ModalRoot from 'flavours/glitch/components/modal_root';\nimport MediaModal from 'flavours/glitch/features/ui/components/media_modal';\nimport { List as ImmutableList, fromJS } from 'immutable';\n\nconst { localeData, messages } = getLocale();\naddLocaleData(localeData);\n\nconst MEDIA_COMPONENTS = { MediaGallery, Video, Card };\n\nexport default class MediaContainer extends PureComponent {\n\n static propTypes = {\n locale: PropTypes.string.isRequired,\n components: PropTypes.object.isRequired,\n };\n\n state = {\n media: null,\n index: null,\n time: null,\n };\n\n handleOpenMedia = (media, index) => {\n document.body.classList.add('with-modals--active');\n this.setState({ media, index });\n }\n\n handleOpenVideo = (video, time) => {\n const media = ImmutableList([video]);\n\n document.body.classList.add('with-modals--active');\n this.setState({ media, time });\n }\n\n handleCloseMedia = () => {\n document.body.classList.remove('with-modals--active');\n this.setState({ media: null, index: null, time: null });\n }\n\n render () {\n const { locale, components } = this.props;\n\n return (\n <IntlProvider locale={locale} messages={messages}>\n <Fragment>\n {[].map.call(components, (component, i) => {\n const componentName = component.getAttribute('data-component');\n const Component = MEDIA_COMPONENTS[componentName];\n const { media, card, ...props } = JSON.parse(component.getAttribute('data-props'));\n\n Object.assign(props, {\n ...(media ? { media: fromJS(media) } : {}),\n ...(card ? { card: fromJS(card) } : {}),\n\n ...(componentName === 'Video' ? {\n onOpenVideo: this.handleOpenVideo,\n } : {\n onOpenMedia: this.handleOpenMedia,\n }),\n });\n\n return ReactDOM.createPortal(\n <Component {...props} key={`media-${i}`} />,\n component,\n );\n })}\n <ModalRoot onClose={this.handleCloseMedia}>\n {this.state.media && (\n <MediaModal\n media={this.state.media}\n index={this.state.index || 0}\n time={this.state.time}\n onClose={this.handleCloseMedia}\n />\n )}\n </ModalRoot>\n </Fragment>\n </IntlProvider>\n );\n }\n\n}\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","import $$observable from 'symbol-observable';\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar randomString = function randomString() {\n return Math.random().toString(36).substring(7).split('').join('.');\n};\n\nvar ActionTypes = {\n INIT: \"@@redux/INIT\" + randomString(),\n REPLACE: \"@@redux/REPLACE\" + randomString(),\n PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {\n return \"@@redux/PROBE_UNKNOWN_ACTION\" + randomString();\n }\n};\n\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nfunction isPlainObject(obj) {\n if (typeof obj !== 'object' || obj === null) return false;\n var proto = obj;\n\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(obj) === proto;\n}\n\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n\nfunction createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {\n throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function');\n }\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n\n\n function getState() {\n if (isDispatching) {\n throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');\n }\n\n return currentState;\n }\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n\n\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected the listener to be a function.');\n }\n\n if (isDispatching) {\n throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');\n }\n\n var isSubscribed = true;\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n if (isDispatching) {\n throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');\n }\n\n isSubscribed = false;\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n\n\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n\n\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({\n type: ActionTypes.REPLACE\n });\n }\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n\n\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object' || observer === null) {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return {\n unsubscribe: unsubscribe\n };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n } // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n\n\n dispatch({\n type: ActionTypes.INIT\n });\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n\n\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n } catch (e) {} // eslint-disable-line no-empty\n\n}\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionDescription = actionType && \"action \\\"\" + String(actionType) + \"\\\"\" || 'an action';\n return \"Given \" + actionDescription + \", reducer \\\"\" + key + \"\\\" returned undefined. \" + \"To ignore an action, you must explicitly return the previous state. \" + \"If you want this reducer to hold no value, you can return null instead of undefined.\";\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return \"The \" + argumentName + \" has unexpected type of \\\"\" + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + \"\\\". Expected argument to be an object with the following \" + (\"keys: \\\"\" + reducerKeys.join('\", \"') + \"\\\"\");\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n if (action && action.type === ActionTypes.REPLACE) return;\n\n if (unexpectedKeys.length > 0) {\n return \"Unexpected \" + (unexpectedKeys.length > 1 ? 'keys' : 'key') + \" \" + (\"\\\"\" + unexpectedKeys.join('\", \"') + \"\\\" found in \" + argumentName + \". \") + \"Expected to find one of the known reducer keys instead: \" + (\"\\\"\" + reducerKeys.join('\", \"') + \"\\\". Unexpected keys will be ignored.\");\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, {\n type: ActionTypes.INIT\n });\n\n if (typeof initialState === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined during initialization. \" + \"If the state passed to the reducer is undefined, you must \" + \"explicitly return the initial state. The initial state may \" + \"not be undefined. If you don't want to set a value for this reducer, \" + \"you can use null instead of undefined.\");\n }\n\n if (typeof reducer(undefined, {\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\n }) === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined when probed with a random type. \" + (\"Don't try to handle \" + ActionTypes.INIT + \" or other actions in \\\"redux/*\\\" \") + \"namespace. They are considered private. Instead, you must return the \" + \"current state for any unknown actions, unless it is undefined, \" + \"in which case you must return the initial state, regardless of the \" + \"action type. The initial state may not be undefined, but can be null.\");\n }\n });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof reducers[key] === 'undefined') {\n warning(\"No reducer provided for key \\\"\" + key + \"\\\"\");\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n\n var finalReducerKeys = Object.keys(finalReducers);\n var unexpectedKeyCache;\n\n if (process.env.NODE_ENV !== 'production') {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError;\n\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination(state, action) {\n if (state === void 0) {\n state = {};\n }\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error(\"bindActionCreators expected an object or a function, instead received \" + (actionCreators === null ? 'null' : typeof actionCreators) + \". \" + \"Did you write \\\"import ActionCreators from\\\" instead of \\\"import * as ActionCreators from\\\"?\");\n }\n\n var keys = Object.keys(actionCreators);\n var boundActionCreators = {};\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var actionCreator = actionCreators[key];\n\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n\n return boundActionCreators;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n var store = createStore.apply(void 0, arguments);\n\n var _dispatch = function dispatch() {\n throw new Error(\"Dispatching while constructing your middleware is not allowed. \" + \"Other middleware would not be applied to this dispatch.\");\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(void 0, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\n return _objectSpread({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\n\nfunction isCrushed() {}\n\nif (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {\n warning('You are currently using minified code outside of NODE_ENV === \"production\". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');\n}\n\nexport { createStore, combineReducers, bindActionCreators, applyMiddleware, compose, ActionTypes as __DO_NOT_USE__ActionTypes };\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _default = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nexports.default = _default;\nmodule.exports = exports[\"default\"];","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","export * from 'locales';\n"],"sourceRoot":""} |