framework/js/dist/admin.js.map
2020-05-03 14:48:21 -04:00

1 line
1.0 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"sources":["webpack://@flarum/core/webpack/bootstrap","webpack://@flarum/core/./admin.ts","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/core/./node_modules/zepto/dist/zepto.js","webpack://@flarum/core/./node_modules/classnames/index.js","webpack://@flarum/core/./node_modules/dayjs/dayjs.min.js","webpack://@flarum/core/./node_modules/m.attrs.bidi/bidi.js","webpack://@flarum/core/./node_modules/mithril/index.js","webpack://@flarum/core/./node_modules/mousetrap/mousetrap.js","webpack://@flarum/core/./node_modules/bootstrap/js/dropdown.js","webpack://@flarum/core/./node_modules/bootstrap/js/transition.js","webpack://@flarum/core/./node_modules/dayjs/plugin/localizedFormat.js","webpack://@flarum/core/./node_modules/dayjs/plugin/relativeTime.js","webpack://@flarum/core/./node_modules/mousetrap/mousetrap.js-exposed","webpack://@flarum/core/./node_modules/classnames/index.js-exposed","webpack://@flarum/core/./node_modules/dayjs/dayjs.min.js-exposed","webpack://@flarum/core/./node_modules/zepto/dist/zepto.js-exposed","webpack://@flarum/core/./node_modules/mithril/index.js-exposed","webpack://@flarum/core/./node_modules/m.attrs.bidi/bidi.js-exposed","webpack://@flarum/core/./node_modules/dayjs/dayjs.min.js-exposed?da0f","webpack://@flarum/core/./node_modules/hc-sticky/dist/hc-sticky.js","webpack://@flarum/core/./node_modules/jump.js/dist/jump.module.js","webpack://@flarum/core/./node_modules/lodash/_Symbol.js","webpack://@flarum/core/./node_modules/lodash/_arrayPush.js","webpack://@flarum/core/./node_modules/lodash/_baseFlatten.js","webpack://@flarum/core/./node_modules/lodash/_baseGetTag.js","webpack://@flarum/core/./node_modules/lodash/_baseIsArguments.js","webpack://@flarum/core/./node_modules/lodash/_freeGlobal.js","webpack://@flarum/core/./node_modules/lodash/_getRawTag.js","webpack://@flarum/core/./node_modules/lodash/_isFlattenable.js","webpack://@flarum/core/./node_modules/lodash/_objectToString.js","webpack://@flarum/core/./node_modules/lodash/_root.js","webpack://@flarum/core/./node_modules/lodash/flattenDeep.js","webpack://@flarum/core/./node_modules/lodash/isArguments.js","webpack://@flarum/core/./node_modules/lodash/isArray.js","webpack://@flarum/core/./node_modules/lodash/isObjectLike.js","webpack://@flarum/core/./node_modules/micromodal/dist/micromodal.es.js","webpack://@flarum/core/./node_modules/mithril/api/mount-redraw.js","webpack://@flarum/core/./node_modules/mithril/api/router.js","webpack://@flarum/core/./node_modules/mithril/hyperscript.js","webpack://@flarum/core/./node_modules/mithril/mount-redraw.js","webpack://@flarum/core/./node_modules/mithril/pathname/assign.js","webpack://@flarum/core/./node_modules/mithril/pathname/build.js","webpack://@flarum/core/./node_modules/mithril/pathname/compileTemplate.js","webpack://@flarum/core/./node_modules/mithril/pathname/parse.js","webpack://@flarum/core/./node_modules/mithril/promise/polyfill.js","webpack://@flarum/core/./node_modules/mithril/promise/promise.js","webpack://@flarum/core/./node_modules/mithril/querystring/build.js","webpack://@flarum/core/./node_modules/mithril/querystring/parse.js","webpack://@flarum/core/./node_modules/mithril/render.js","webpack://@flarum/core/./node_modules/mithril/render/fragment.js","webpack://@flarum/core/./node_modules/mithril/render/hyperscript.js","webpack://@flarum/core/./node_modules/mithril/render/hyperscriptVnode.js","webpack://@flarum/core/./node_modules/mithril/render/render.js","webpack://@flarum/core/./node_modules/mithril/render/trust.js","webpack://@flarum/core/./node_modules/mithril/render/vnode.js","webpack://@flarum/core/./node_modules/mithril/request.js","webpack://@flarum/core/./node_modules/mithril/request/request.js","webpack://@flarum/core/./node_modules/mithril/route.js","webpack://@flarum/core/./node_modules/mithril/stream.js","webpack://@flarum/core/./node_modules/mithril/stream/stream.js","webpack://@flarum/core/../../src/utils/isBrowser.js","webpack://@flarum/core/../../src/utils/debounce.js","webpack://@flarum/core/../../src/utils/isFunction.js","webpack://@flarum/core/../../src/utils/getStyleComputedProperty.js","webpack://@flarum/core/../../src/utils/getParentNode.js","webpack://@flarum/core/../../src/utils/getScrollParent.js","webpack://@flarum/core/../../src/utils/getReferenceNode.js","webpack://@flarum/core/../../src/utils/isIE.js","webpack://@flarum/core/../../src/utils/getOffsetParent.js","webpack://@flarum/core/../../src/utils/isOffsetContainer.js","webpack://@flarum/core/../../src/utils/getRoot.js","webpack://@flarum/core/../../src/utils/findCommonOffsetParent.js","webpack://@flarum/core/../../src/utils/getScroll.js","webpack://@flarum/core/../../src/utils/includeScroll.js","webpack://@flarum/core/../../src/utils/getBordersSize.js","webpack://@flarum/core/../../src/utils/getWindowSizes.js","webpack://@flarum/core/../../src/utils/getClientRect.js","webpack://@flarum/core/../../src/utils/getBoundingClientRect.js","webpack://@flarum/core/../../src/utils/getOffsetRectRelativeToArbitraryNode.js","webpack://@flarum/core/../../src/utils/getViewportOffsetRectRelativeToArtbitraryNode.js","webpack://@flarum/core/../../src/utils/isFixed.js","webpack://@flarum/core/../../src/utils/getFixedPositionOffsetParent.js","webpack://@flarum/core/../../src/utils/getBoundaries.js","webpack://@flarum/core/../../src/utils/computeAutoPlacement.js","webpack://@flarum/core/../../src/utils/getReferenceOffsets.js","webpack://@flarum/core/../../src/utils/getOuterSizes.js","webpack://@flarum/core/../../src/utils/getOppositePlacement.js","webpack://@flarum/core/../../src/utils/getPopperOffsets.js","webpack://@flarum/core/../../src/utils/find.js","webpack://@flarum/core/../../src/utils/findIndex.js","webpack://@flarum/core/../../src/utils/runModifiers.js","webpack://@flarum/core/../../src/methods/update.js","webpack://@flarum/core/../../src/utils/isModifierEnabled.js","webpack://@flarum/core/../../src/utils/getSupportedPropertyName.js","webpack://@flarum/core/../../src/methods/destroy.js","webpack://@flarum/core/../../src/utils/getWindow.js","webpack://@flarum/core/../../src/utils/setupEventListeners.js","webpack://@flarum/core/../../src/methods/enableEventListeners.js","webpack://@flarum/core/../../src/utils/removeEventListeners.js","webpack://@flarum/core/../../src/methods/disableEventListeners.js","webpack://@flarum/core/../../src/utils/isNumeric.js","webpack://@flarum/core/../../src/utils/setStyles.js","webpack://@flarum/core/../../src/utils/setAttributes.js","webpack://@flarum/core/../../src/modifiers/applyStyle.js","webpack://@flarum/core/../../src/utils/getRoundedOffsets.js","webpack://@flarum/core/../../src/modifiers/computeStyle.js","webpack://@flarum/core/../../src/utils/isModifierRequired.js","webpack://@flarum/core/../../src/modifiers/arrow.js","webpack://@flarum/core/../../src/utils/getOppositeVariation.js","webpack://@flarum/core/../../src/methods/placements.js","webpack://@flarum/core/../../src/utils/clockwise.js","webpack://@flarum/core/../../src/modifiers/flip.js","webpack://@flarum/core/../../src/modifiers/keepTogether.js","webpack://@flarum/core/../../src/modifiers/offset.js","webpack://@flarum/core/../../src/modifiers/preventOverflow.js","webpack://@flarum/core/../../src/modifiers/shift.js","webpack://@flarum/core/../../src/modifiers/hide.js","webpack://@flarum/core/../../src/modifiers/inner.js","webpack://@flarum/core/../../src/modifiers/index.js","webpack://@flarum/core/../../src/methods/defaults.js","webpack://@flarum/core/../../src/index.js","webpack://@flarum/core/./node_modules/process/browser.js","webpack://@flarum/core/./node_modules/setimmediate/setImmediate.js","webpack://@flarum/core/./node_modules/spin.js/spin.js","webpack://@flarum/core/./node_modules/timers-browserify/main.js","webpack://@flarum/core/../../../popper/src/utils/isFunction.js","webpack://@flarum/core/(webpack)/buildin/amd-options.js","webpack://@flarum/core/(webpack)/buildin/global.js","webpack://@flarum/core/(webpack)/buildin/harmony-module.js","webpack://@flarum/core/./node_modules/zepto/src/data.js","webpack://@flarum/core/./node_modules/zepto/src/fx.js","webpack://@flarum/core/./node_modules/zepto/src/fx_methods.js","webpack://@flarum/core/./node_modules/zepto/src/selector.js","webpack://@flarum/core/./src/admin/Admin.ts","webpack://@flarum/core/./src/admin/app.ts","webpack://@flarum/core/./src/admin/compat.ts","webpack://@flarum/core/./src/admin/components/AddExtensionModal.tsx","webpack://@flarum/core/./src/admin/components/AdminLinkButton.tsx","webpack://@flarum/core/./src/admin/components/AdminNav.tsx","webpack://@flarum/core/./src/admin/components/AppearancePage.tsx","webpack://@flarum/core/./src/admin/components/BasicsPage.tsx","webpack://@flarum/core/./src/admin/components/DashboardPage.tsx","webpack://@flarum/core/./src/admin/components/DashboardWidget.tsx","webpack://@flarum/core/./src/admin/components/EditCustomCssModal.tsx","webpack://@flarum/core/./src/admin/components/EditCustomFooterModal.tsx","webpack://@flarum/core/./src/admin/components/EditCustomHeaderModal.tsx","webpack://@flarum/core/./src/admin/components/EditGroupModal.tsx","webpack://@flarum/core/./src/admin/components/ExtensionsPage.tsx","webpack://@flarum/core/./src/admin/components/HeaderPrimary.tsx","webpack://@flarum/core/./src/admin/components/HeaderSecondary.tsx","webpack://@flarum/core/./src/admin/components/LoadingModal.tsx","webpack://@flarum/core/./src/admin/components/MailPage.tsx","webpack://@flarum/core/./src/admin/components/Page.tsx","webpack://@flarum/core/./src/admin/components/PermissionDropdown.tsx","webpack://@flarum/core/./src/admin/components/PermissionGrid.tsx","webpack://@flarum/core/./src/admin/components/PermissionsPage.tsx","webpack://@flarum/core/./src/admin/components/SessionDropdown.tsx","webpack://@flarum/core/./src/admin/components/SettingDropdown.tsx","webpack://@flarum/core/./src/admin/components/SettingsModal.tsx","webpack://@flarum/core/./src/admin/components/StatusWidget.tsx","webpack://@flarum/core/./src/admin/components/UploadImageButton.tsx","webpack://@flarum/core/./src/admin/index.ts","webpack://@flarum/core/./src/admin/routes.ts","webpack://@flarum/core/./src/admin/utils/saveSettings.ts","webpack://@flarum/core/./src/common/Application.ts","webpack://@flarum/core/./src/common/Component.ts","webpack://@flarum/core/./src/common/Model.ts","webpack://@flarum/core/./src/common/Session.ts","webpack://@flarum/core/./src/common/Store.ts","webpack://@flarum/core/./src/common/Translator.ts","webpack://@flarum/core/./src/common/compat.ts","webpack://@flarum/core/./src/common/components/Alert.tsx","webpack://@flarum/core/./src/common/components/AlertManager.tsx","webpack://@flarum/core/./src/common/components/Badge.tsx","webpack://@flarum/core/./src/common/components/Button.tsx","webpack://@flarum/core/./src/common/components/Checkbox.tsx","webpack://@flarum/core/./src/common/components/Dropdown.tsx","webpack://@flarum/core/./src/common/components/FieldSet.tsx","webpack://@flarum/core/./src/common/components/GroupBadge.ts","webpack://@flarum/core/./src/common/components/LinkButton.tsx","webpack://@flarum/core/./src/common/components/LoadingIndicator.tsx","webpack://@flarum/core/./src/common/components/Modal.tsx","webpack://@flarum/core/./src/common/components/ModalManager.tsx","webpack://@flarum/core/./src/common/components/Navigation.tsx","webpack://@flarum/core/./src/common/components/Placeholder.tsx","webpack://@flarum/core/./src/common/components/RequestErrorModal.tsx","webpack://@flarum/core/./src/common/components/Select.tsx","webpack://@flarum/core/./src/common/components/SelectDropdown.tsx","webpack://@flarum/core/./src/common/components/Separator.tsx","webpack://@flarum/core/./src/common/components/SplitDropdown.tsx","webpack://@flarum/core/./src/common/components/Switch.tsx","webpack://@flarum/core/./src/common/extend.ts","webpack://@flarum/core/./src/common/helpers/avatar.tsx","webpack://@flarum/core/./src/common/helpers/fullTime.tsx","webpack://@flarum/core/./src/common/helpers/highlight.ts","webpack://@flarum/core/./src/common/helpers/humanTime.tsx","webpack://@flarum/core/./src/common/helpers/icon.tsx","webpack://@flarum/core/./src/common/helpers/listItems.tsx","webpack://@flarum/core/./src/common/helpers/userOnline.tsx","webpack://@flarum/core/./src/common/helpers/username.tsx","webpack://@flarum/core/./src/common/index.ts","webpack://@flarum/core/./src/common/models/Discussion.tsx","webpack://@flarum/core/./src/common/models/Forum.ts","webpack://@flarum/core/./src/common/models/Group.ts","webpack://@flarum/core/./src/common/models/Notification.ts","webpack://@flarum/core/./src/common/models/Post.ts","webpack://@flarum/core/./src/common/models/User.ts","webpack://@flarum/core/./src/common/utils/Drawer.ts","webpack://@flarum/core/./src/common/utils/Evented.ts","webpack://@flarum/core/./src/common/utils/ItemList.ts","webpack://@flarum/core/./src/common/utils/RequestError.ts","webpack://@flarum/core/./src/common/utils/ScrollListener.ts","webpack://@flarum/core/./src/common/utils/SubtreeRetainer.ts","webpack://@flarum/core/./src/common/utils/abbreviateNumber.tsx","webpack://@flarum/core/./src/common/utils/anchorScroll.ts","webpack://@flarum/core/./src/common/utils/computed.ts","webpack://@flarum/core/./src/common/utils/extract.ts","webpack://@flarum/core/./src/common/utils/extractText.ts","webpack://@flarum/core/./src/common/utils/formatNumber.ts","webpack://@flarum/core/./src/common/utils/humanTime.ts","webpack://@flarum/core/./src/common/utils/mapRoutes.ts","webpack://@flarum/core/./src/common/utils/patchMithril.ts","webpack://@flarum/core/./src/common/utils/patchZepto.ts","webpack://@flarum/core/./src/common/utils/string.ts","webpack://@flarum/core/./src/common/utils/stringToColor.ts","webpack://@flarum/core/external \"m\""],"names":["_assertThisInitialized","self","ReferenceError","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","_inheritsLoose","subClass","superClass","create","constructor","__proto__","_objectWithoutPropertiesLoose","excluded","sourceKeys","keys","indexOf","global","factory","define","window","Zepto","undefined","$","classList","emptyArray","concat","filter","slice","document","elementDisplay","classCache","cssNumber","fragmentRE","singleTagRE","tagExpanderRE","rootNodeRE","capitalRE","methodAttributes","adjacencyOperators","table","createElement","tableRow","containers","readyRE","simpleSelectorRE","class2type","toString","zepto","camelize","uniq","tempParent","propMap","isArray","Array","object","matches","element","selector","nodeType","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","match","parent","parentNode","temp","appendChild","qsa","removeChild","type","obj","String","isFunction","value","isWindow","isDocument","DOCUMENT_NODE","isObject","isPlainObject","getPrototypeOf","likeArray","compact","array","item","flatten","fn","str","replace","chr","toUpperCase","dasherize","toLowerCase","idx","classRE","name","RegExp","maybeAddPx","defaultDisplay","nodeName","display","body","getComputedStyle","getPropertyValue","children","map","childNodes","node","Z","dom","len","fragment","html","properties","nodes","container","test","$1","innerHTML","each","attr","isZ","init","context","trim","find","ready","extend","deep","args","shift","forEach","arg","found","maybeID","maybeClass","nameOnly","isSimple","getElementById","getElementsByClassName","getElementsByTagName","querySelectorAll","filtered","contains","documentElement","funcArg","payload","setAttribute","removeAttribute","className","klass","svg","baseVal","deserializeValue","parseJSON","e","isEmptyObject","isNumeric","val","num","Number","isNaN","isFinite","inArray","elem","camelCase","uuid","support","expr","noop","elements","callback","values","push","grep","JSON","parse","split","reduce","sort","splice","toArray","el","readyState","addEventListener","get","size","remove","every","not","add","is","excludes","has","eq","first","last","result","$this","some","closest","collection","_","parents","ancestors","pluck","contents","contentDocument","siblings","child","empty","property","show","style","replaceWith","newContent","before","wrap","structure","func","clone","index","wrapAll","cloneNode","append","wrapInner","unwrap","hide","css","toggle","setting","prev","next","originHtml","text","newText","textContent","join","getAttribute","removeAttr","attribute","prop","removeProp","data","attrName","multiple","selected","offset","coordinates","coords","parentOffset","offsetParent","props","top","left","getBoundingClientRect","pageXOffset","pageYOffset","width","Math","round","height","computedStyle","removeProperty","cssText","hasClass","addClass","cls","newName","removeClass","toggleClass","when","names","scrollTop","hasScrollTop","scrollTo","scrollX","scrollLeft","hasScrollLeft","scrollY","position","parseFloat","detach","dimension","dimensionProperty","m","traverseNode","fun","operator","operatorIndex","inside","argType","arr","copyByClone","nextSibling","firstChild","parentInDocument","insertBefore","src","ownerDocument","defaultView","_zid","isString","handlers","specialEvents","focusinSupported","focus","blur","hover","mouseenter","mouseleave","click","mousedown","mouseup","mousemove","zid","findHandlers","event","ns","matcher","matcherFor","handler","sel","parts","eventCapture","captureSetting","del","realEvent","events","delegator","capture","id","set","related","relatedTarget","proxy","compatible","isImmediatePropagationStopped","_args","preventDefault","stopPropagation","removeEventListener","proxyFn","unshift","TypeError","bind","on","unbind","off","one","returnTrue","returnFalse","ignoreProperties","eventMethods","stopImmediatePropagation","isDefaultPrevented","predicate","sourceMethod","timeStamp","Date","now","defaultPrevented","returnValue","getPreventDefault","createProxy","originalEvent","delegate","undelegate","live","die","autoRemove","evt","currentTarget","liveFired","trigger","Event","dispatchEvent","triggerHandler","createEvent","bubbles","initEvent","jsonpID","rscript","scriptTypeRE","xmlTypeRE","jsonType","htmlType","blankRE","originAnchor","href","location","triggerAndReturn","eventName","triggerGlobal","settings","active","ajaxStart","ajaxStop","ajaxBeforeSend","xhr","beforeSend","ajaxSuccess","deferred","status","success","resolveWith","ajaxComplete","ajaxError","error","rejectWith","complete","ajaxDataFilter","dataFilter","ajaxJSONP","options","ajax","_callbackName","jsonpCallback","callbackName","script","originalCallback","responseData","abort","errorType","abortTimeout","promise","clearTimeout","url","head","timeout","setTimeout","ajaxSettings","XMLHttpRequest","accepts","json","xml","crossDomain","processData","cache","mimeToDataType","mime","appendQuery","query","serializeData","param","traditional","dataType","Deferred","urlAnchor","hashIndex","protocol","host","hasPlaceholder","jsonp","headers","setHeader","nativeSetHeader","setRequestHeader","mimeType","overrideMimeType","contentType","onreadystatechange","getResponseHeader","responseType","response","responseText","eval","responseXML","statusText","async","open","username","password","xhrFields","send","parseArguments","post","getJSON","load","escape","encodeURIComponent","serialize","params","scope","hash","serializeArray","field","disabled","checked","elm","submit","nativeGetComputedStyle","pseudoElement","hasOwn","classNames","classes","inner","module","exports","default","t","n","r","s","u","o","a","h","f","c","d","z","utcOffset","abs","floor","year","month","ceil","p","M","y","w","D","ms","Q","weekdays","months","l","v","g","date","locale","$L","utc","$u","$offset","$d","NaN","UTC","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","isSame","startOf","endOf","isAfter","isBefore","$g","day","hour","minute","second","millisecond","unix","valueOf","getTime","toDate","$locale","weekStart","$set","min","daysInMonth","subtract","format","substr","meridiem","YY","YYYY","MM","MMM","monthsShort","MMMM","DD","dd","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","hh","A","mm","ss","SSS","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","isDayjs","en","Ls","_package","bidi","tag","attrs","multi","onchange","selectedOptions","x","oninput","option","view","ctrl","hyperscript","require","request","mountRedraw","trust","mount","route","render","redraw","parseQueryString","buildQueryString","parsePathname","buildPathname","vnode","PromisePolyfill","_MAP","_KEYCODE_MAP","_SHIFT_MAP","_SPECIAL_ALIASES","navigator","platform","_REVERSE_MAP","_addEvent","attachEvent","_characterFromEvent","character","fromCharCode","which","shiftKey","_modifiersMatch","modifiers1","modifiers2","_eventModifiers","modifiers","altKey","ctrlKey","metaKey","_preventDefault","_stopPropagation","cancelBubble","_isModifier","_getReverseMap","_pickBestAction","action","_keysFromString","combination","_getKeyInfo","_belongsTo","ancestor","Mousetrap","targetElement","_callbacks","_directMap","_sequenceLevels","_resetTimer","_ignoreNextKeyup","_ignoreNextKeypress","_nextExpectedAction","_resetSequences","doNotReset","activeSequences","_getMatches","sequenceName","level","seq","deleteCombo","combo","deleteSequence","_fireCallback","sequence","stopCallback","srcElement","_handleKey","callbacks","maxLevel","processedSequenceCallback","max","ignoreThisKeypress","_handleKeyEvent","keyCode","handleKey","_resetSequenceTimer","_bindSequence","_increaseSequence","nextAction","_callbackAndReset","isFinal","wrappedCallback","_bindSingle","info","_bindMultiple","combinations","reset","composedPath","initialEventTarget","tagName","isContentEditable","addKeycodes","documentMousetrap","method","charAt","backdrop","Dropdown","VERSION","getParent","$parent","clearMenus","isActive","insertAfter","keydown","desc","$items","Plugin","old","dropdown","Constructor","noConflict","jQuery","transitionEnd","transEndEventNames","WebkitTransition","MozTransition","OTransition","transition","end","emulateTransitionEnd","duration","called","$el","special","bsTransitionEnd","bindType","delegateType","handle","handleObj","LTS","LT","L","LL","LLL","LLLL","formats","future","past","yy","relativeTime","thresholds","rounding","to","from","toNow","fromNow","Error","U","Y","bottom","bottomEnd","innerTop","innerSticker","stickyClass","stickTo","followScroll","responsive","mobileFirst","onStart","onStop","onBeforeResize","onResize","resizeDebounce","disable","queries","queryFlow","console","log","X","querySelector","Helpers","getStyle","innerWidth","stick","isAttached","attach","offsetLeft","release","stop","parseInt","positionLeft","marginLeft","b","S","k","E","T","j","O","C","getCascadedStyle","offsetHeight","right","verticalAlign","boxSizing","marginRight","marginTop","marginBottom","paddingLeft","paddingRight","float","cssFloat","MozBoxSizing","offsetWidth","HTMLDocument","Document","clientHeight","scrollHeight","innerHeight","offsetTop","N","R","B","I","q","F","P","debounce","W","V","refresh","update","destroy","triggerMethod","reinit","hcSticky","defineProperty","writable","configurable","handleEvent","detachEvent","currentStyle","borderTopWidth","borderLeftWidth","margin","easeInOutQuad","_typeof","Symbol","iterator","jumper","start","easing","a11y","distance","timeStart","timeElapsed","loop","timeCurrent","requestAnimationFrame","done","jump","singleton","root","arrayPush","isFlattenable","baseFlatten","depth","isStrict","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","toStringTag","baseGetTag","isObjectLike","argsTag","baseIsArguments","freeGlobal","objectProto","nativeObjectToString","isOwn","unmasked","isArguments","spreadableSymbol","isConcatSpreadable","freeSelf","Function","INFINITY","flattenDeep","propertyIsEnumerable","_classCallCheck","instance","_defineProperties","descriptor","enumerable","_createClass","protoProps","staticProps","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","_arrayLikeToArray","iter","minLen","arr2","MicroModal","FOCUSABLE_ELEMENTS","Modal","_ref","targetModal","_ref$triggers","triggers","_ref$onShow","onShow","_ref$onClose","onClose","_ref$openTrigger","openTrigger","_ref$closeTrigger","closeTrigger","_ref$openClass","openClass","_ref$disableScroll","disableScroll","_ref$disableFocus","disableFocus","_ref$awaitCloseAnimat","awaitCloseAnimation","_ref$awaitOpenAnimati","awaitOpenAnimation","_ref$debugMode","debugMode","modal","config","registerTriggers","onClick","onKeydown","_this","_len","_key","Boolean","showModal","_this2","activeElement","scrollBehaviour","addEventListeners","setFocusToFirstNode","closeModal","removeEventListeners","closeModalById","overflow","hasAttribute","retainFocus","getFocusableNodes","_this3","focusableNodes","nodesWhichAreNotCloseTargets","focusedItemIndex","activeModal","generateTriggerMap","triggerAttr","triggerMap","attributes","validateModalPresence","warn","validateTriggerPresence","validateArgs","close","Vnode","schedule","subscriptions","rendering","pending","sync","component","Promise","compileTemplate","sentinel","$window","fireAsync","setPath","path","state","title","history","replaceState","prefix","pushState","currentResolver","currentPath","lastUpdate","SKIP","defaultRoute","routes","compiled","SyntaxError","check","callAsync","setImmediate","resolve","scheduled","onremove","defaultData","resolveRoute","search","pathname","decodeURIComponent","fail","matchedRoute","localComp","comp","onmatch","then","onbeforeupdate","oncreate","Link","onclick","oninit","onupdate","onbeforeremove","button","template","queryIndex","queryEnd","pathEnd","resolved","variadic","newQueryIndex","newHashIndex","newQueryEnd","newPathEnd","querystring","templateData","templateKeys","regexp","extra","exec","executor","resolvers","rejectors","resolveCurrent","rejectCurrent","_instance","list","shouldAbsorb","execute","executeOnce","retry","runs","run","onerror","onFulfilled","onRejection","resolveNext","rejectNext","reject","catch","finally","reason","all","total","count","consume","race","destructure","string","entries","counters","entry","levels","cursor","pop","nextLevel","isNumber","getOwnPropertyDescriptor","hyperscriptVnode","normalizeChildren","selectorParser","selectorCache","isEmpty","compileSelector","attrValue","execSelector","class","newAttrs","$doc","currentRedraw","nameSpace","math","getNameSpace","xmlns","checkState","original","callHook","createNodes","vnodes","hooks","createNode","initLifecycle","createText","createHTML","createFragment","createComponent","createTextNode","insertNode","possibleParents","caption","thead","tbody","tfoot","tr","th","td","colgroup","col","domSize","createDocumentFragment","createElementNS","setAttrs","maybeSetContentEditable","setLateSelectAttrs","initComponent","$$reentrantLock$$","normalize","updateNodes","removeNodes","isOldKeyed","isKeyed","oldStart","commonLength","getNextSibling","removeNode","updateNode","oldEnd","oe","ve","topSibling","moveNodes","originalNextSibling","vnodesLength","oldIndices","li","pos","matched","lisIndices","getKeyMap","oldIndex","makeLisIndices","oldTag","shouldNotUpdate","updateLifecycle","updateText","updateHTML","updateFragment","updateElement","updateComponent","nodeValue","removeHTML","updateAttrs","lisTemp","il","frag","moveChildToFrag","contenteditable","contentEditable","content","mask","stateResult","attrsResult","reallyRemove","setAttr","isLifecycleMethod","isFormAttribute","updateEvent","setAttributeNS","updateStyle","hasPropertyKey","selectedIndex","nsLastIndex","normalized","uppercaseRegex","capital","normalizeKey","setProperty","EventDict","ev","force","namespace","namespaceURI","prevRedraw","input","oncompletion","callbackCount","PromiseProxy","makeRequest","background","hasHeader","assumeJSON","FormData","extract","aborted","replacedAbort","user","deserialize","withCredentials","message","code","stringify","random","callbackKey","Stream","lift","scan","merge","combine","scanMerge","warnedHalt","dependentStreams","dependentFns","stream","_changing","_state","_parents","_map","ignoreInitial","createEnd","_unregisterChild","s1","s2","childIndex","streams","changed","mappers","endStream","mapper","acc","origin","tuples","seed","tuple","timeoutDuration","longerTimeoutBrowsers","isBrowser","supportsMicroTasks","getType","functionToCheck","getStyleComputedProperty","overflowX","overflowY","getScrollParent","getParentNode","reference","isIE11","isIE10","version","noOffsetParent","isIE","getOffsetParent","getRoot","element1","element2","order","Node","range","commonAncestorContainer","isOffsetContainer","element1root","findCommonOffsetParent","side","upperSide","scrollingElement","getScroll","modifier","sideA","axis","sideB","styles","getSize","offsets","rect","sizes","getWindowSizes","horizScrollbar","vertScrollbar","getBordersSize","getClientRect","fixedPosition","runIsIE","isHTML","childrenRect","parentRect","scrollParent","includeScroll","excludeScroll","relativeOffset","getOffsetRectRelativeToArbitraryNode","isFixed","boundaries","getFixedPositionOffsetParent","getReferenceNode","boundariesElement","getViewportOffsetRectRelativeToArtbitraryNode","boundariesNode","popper","padding","isPaddingNumber","placement","getBoundaries","rects","refRect","sortedAreas","getArea","filteredAreas","computedPlacement","variation","commonOffsetParent","popperRect","getOuterSizes","popperOffsets","isHoriz","mainSide","secondarySide","measurement","secondaryMeasurement","referenceOffsets","getOppositePlacement","cur","modifiersToRun","ends","findIndex","getReferenceOffsets","computeAutoPlacement","getPopperOffsets","runModifiers","enabled","prefixes","upperProp","toCheck","isModifierEnabled","getSupportedPropertyName","isBody","passive","scrollElement","setupEventListeners","unit","noRound","referenceWidth","popperWidth","isVertical","isVariation","sameWidthParity","bothOddWidth","horizontalToInteger","verticalToInteger","isFirefox","legacyGpuAccelerationOption","gpuAcceleration","offsetParentRect","getRoundedOffsets","prefixedProperty","invertTop","invertLeft","requesting","isRequired","requested","isModifierRequired","arrowElement","sideCapitalized","altSide","opSide","arrowElementSize","center","popperMarginSide","popperBorderSide","sideValue","validPlacements","placements","counter","BEHAVIORS","placementOpposite","flipOrder","clockwise","refOffsets","overlapsRef","overflowsLeft","overflowsRight","overflowsTop","overflowsBottom","overflowsBoundaries","flippedVariationByRef","flippedVariationByContent","flippedVariation","getOppositeVariation","useHeight","fragments","divider","splitRegex","ops","mergeWithPrevious","toValue","op","index2","basePlacement","parseOffset","transformProp","popperStyles","transform","shiftvariation","shiftOffsets","bound","subtractLength","keepTogether","Popper","modifierOptions","eventsEnabled","enableEventListeners","disableEventListeners","Utils","PopperUtils","Defaults","process","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","runClearTimeout","marker","queue","draining","currentQueue","queueIndex","cleanUpNextTick","drainQueue","nextTick","Item","browser","env","argv","versions","addListener","once","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","nextHandle","tasksByHandle","currentlyRunningATask","doc","registerImmediate","task","clearImmediate","runIfPresent","installNextTickImplementation","canUsePostMessage","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","installPostMessageImplementation","messagePrefix","onGlobalMessage","installMessageChannelImplementation","channel","MessageChannel","port1","port2","installReadyStateChangeImplementation","installSetTimeoutImplementation","attachTo","__assign","defaults","lines","radius","scale","corners","color","fadeColor","animation","rotate","direction","speed","zIndex","shadow","Spinner","opts","spin","drawLines","cancelAnimationFrame","animateId","getColor","borderRadius","shadows","parseBoxShadow","degrees","backgroundLine","transformOrigin","delay","line","boxShadow","normalizeShadow","regex","_i","_a","xUnits","yUnits","shadows_1","xy","convertOffset","radians","PI","sin","cos","Timeout","setInterval","clearInterval","clearFn","_id","_clearFn","unref","ref","enroll","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","onTimeout","_onTimeout","DEFAULT_OPTIONS","Tooltip","allowHtml","tooltipGenerator","tooltipNode","titleNode","arrowSelector","directEvents","oppositeEvents","computedDelay","isSet","lastTitle","dispose","updateTitleContent","_events","_setTooltipNodeEvent","relatedreference","relatedreference2","evt2","originalModule","webpackPolyfill","dataAttr","exp","expando","getData","store","setData","camelName","attributeData","hasData","removeData","methodName","origFn","eventPrefix","vendors","Webkit","Moz","testEl","supportedTransforms","transitionProperty","transitionDuration","transitionTiming","transitionDelay","animationName","animationDuration","animationTiming","animationDelay","cssReset","normalizeEvent","vendor","fx","speeds","_default","fast","slow","cssPrefix","animationEnd","animate","ease","anim","cssValues","cssProperties","transforms","that","endEvent","fired","clientLeft","docElem","origShow","origHide","origToggle","opacity","fadeTo","fadeIn","fadeOut","fadeToggle","oldQsa","oldMatches","visible","filters","hidden","filterRe","childRe","classTag","taggedParent","Admin","extensionSettings","canGoBack","getPrevious","backUrl","forum","back","Navigation","drawer","HeaderPrimary","HeaderSecondary","AdminNav","localStorage","getItem","removeItem","getRequiredPermissions","permission","required","Application","app","compat","saveSettings","SettingDropdown","EditCustomFooterModal","SessionDropdown","AppearancePage","Page","StatusWidget","SettingsModal","DashboardWidget","AddExtensionModal","ExtensionsPage","AdminLinkButton","PermissionGrid","MailPage","UploadImageButton","LoadingModal","DashboardPage","BasicsPage","EditCustomHeaderModal","PermissionsPage","PermissionDropdown","EditCustomCssModal","EditGroupModal","translator","trans","getButtonContent","icon","loading","description","LinkButton","items","ItemList","Component","primaryColor","theme_primary_color","secondaryColor","theme_secondary_color","darkMode","theme_dark_mode","coloredHeader","theme_colored_header","onsubmit","withAttr","Switch","Button","hex","alert","reload","fields","localeOptions","successAlert","locales","show_language_selector","FieldSet","label","forum_title","forum_description","Select","default_locale","homePageItems","default_route","welcome_title","welcome_message","alerts","dismiss","Alert","availableWidgets","form","onsaved","group","nameSingular","namePlural","createRecord","Badge","backgroundColor","transText","exists","Group","ADMINISTRATOR_ID","deleteGroup","submitData","save","errorHandler","confirm","delete","extensions","extension","controls","controlItems","isEnabled","extensions_enabled","setItem","listItems","isDismissible","saving","driverFields","sending","errors","driver","mail_driver","fieldKeys","mail_from","memo","dismissible","renderField","bodyClass","previous","current","badgeForId","getById","GroupBadge","filterByRequiredPermissions","groupIds","restrictToGroupIds","permissions","GUEST_ID","MEMBER_ID","initProps","buttonClassName","everyone","members","adminGroup","showing","allowGuest","isGroupDisabled","Separator","groupId","scopes","scopeItems","permissionCells","scopeControlItems","permissionItems","section","viewItems","startItems","replyItems","moderateItems","minutes","allow_renaming","defaultLabel","transChoice","allow_post_editing","menuClassName","session","avatar","logout","caretIcon","SelectDropdown","submitButton","fallback","dirty","loaded","handleClearCache","phpVersion","mysqlVersion","upload","$input","appendTo","files","resourceUrl","raw","failure","dashboard","basics","mail","appearance","oldSettings","initializers","Translator","Store","forums","Forum","users","User","discussions","Discussion","posts","Post","groups","notifications","Notification","booted","requestError","titleCount","Drawer","boot","initializer","pushPayload","resources","Session","userId","csrfToken","bootExtensions","extenders","extender","basePath","$modal","$alerts","$content","ModalManager","AlertManager","mapRoutes","ScrollListener","$app","preloadedApiDocument","apiDocument","results","setTitle","updateTitle","setTitleCount","queryString","originalOptions","RequestError","res","detail","isDebug","showDebug","RequestErrorModal","setProps","$element","componentProps","Model","freshness","pushData","innerKey","getIdentifier","pushAttributes","relationships","model","oldData","copyData","meta","apiEndpoint","hasOne","relationship","hasMany","transformDate","login","models","included","pushObject","getBy","records","translations","addTranslations","parameters","translation","extractText","number","pluralize","hydrated","part","sPluralRegex","cPluralRegex","iPluralRegex","standardRules","explicitRules","rule","leftNumber","convertNumber","rightNumber","pluralPosition","NEGATIVE_INFINITY","POSITIVE_INFINITY","Evented","humanTime","computed","anchorScroll","abbreviateNumber","SubtreeRetainer","stringToColor","patchMithril","formatNumber","LoadingIndicator","Placeholder","SplitDropdown","Checkbox","fullTime","humanTimeHelper","highlight","userOnline","ondismiss","dismissControl","components","clear","iconName","tooltip","getDisplay","getButton","getMenu","onshow","$menu","isRight","onhide","vdom","sizeOptions","onready","select","pointer","hideTimeout","modalProps","pane","onmouseleave","getBackButton","getPaneButton","getDrawerButton","pinned","togglePinned","newNotificationCount","activeChild","isListItem","getFirstChild","buttonProps","override","newMethod","hasTitle","displayName","avatarUrl","time","mo","dayjs","datetime","full","phrase","highlighted","truncate","ago","humanTimeUtil","fontClass","isSeparator","withoutUnnecessarySeparators","newItems","prevItem","itemClassName","itemName","lastSeenAt","isOnline","localizedFormat","slug","createdAt","firstPost","lastPostedAt","lastPostedUser","lastPost","lastPostNumber","commentCount","replyCount","mostRelevantPost","lastReadAt","lastReadPostNumber","isUnread","unreadCount","isRead","hiddenAt","hiddenUser","isHidden","canReply","canRename","canHide","canDelete","removePost","markedAllAsReadAt","badges","postIds","link","fromUser","subject","discussion","contentHtml","contentPlain","getPlainContent","editedAt","editedUser","isEdited","canEdit","email","isEmailConfirmed","preferences","joinTime","unreadNotificationCount","discussionCount","avatarColor","calculateAvatarColor","image","Image","onload","colorThief","ColorThief","crossOrigin","savePreferences","newPreferences","$backdrop","isOpen","getHandlers","wrapper","priority","later","webkitRequestAnimationFrame","mozRequestAnimationFrame","msRequestAnimationFrame","oRequestAnimationFrame","ticking","relativeScroll","dependentKeys","compute","dependentValues","computedValue","recompute","maximumSignificantDigits","toLocaleString","routeName","_m","cb","includes","Dimension","sides","leave","animateScrollTop","slideUp","bindBeforeSpecialEvents","specialEvent","_init","originalHandler","$target","setup","substring","removeSelectors","ucfirst","hsvToRgb","charCodeAt","hue","rgb"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA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,CAAe,EAAf,CAA1B,GAA+CggE,GAAG,CAACtwC,CAAJ,CAAM1vB,QAAN,CAAe,EAAf,CAAtD;AACH,C;;;;;;;;;;;ACrED,mB","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./admin.ts\");\n","export * from './src/common';\nexport * from './src/admin';\n","export default 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}","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}","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\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}","/*** IMPORTS FROM imports-loader ***/\n(function() {\n\n/* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */\n(function(global, factory) {\n if (typeof define === 'function' && define.amd)\n define(function() { return factory(global) })\n else\n factory(global)\n}(this, function(window) {\n var Zepto = (function() {\n var undefined, key, $, classList, emptyArray = [], concat = emptyArray.concat, filter = emptyArray.filter, slice = emptyArray.slice,\n document = window.document,\n elementDisplay = {}, classCache = {},\n cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 },\n fragmentRE = /^\\s*<(\\w+|!)[^>]*>/,\n singleTagRE = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\n tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/ig,\n rootNodeRE = /^(?:body|html)$/i,\n capitalRE = /([A-Z])/g,\n\n // special attributes that should be get/set via method calls\n methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'],\n\n adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ],\n table = document.createElement('table'),\n tableRow = document.createElement('tr'),\n containers = {\n 'tr': document.createElement('tbody'),\n 'tbody': table, 'thead': table, 'tfoot': table,\n 'td': tableRow, 'th': tableRow,\n '*': document.createElement('div')\n },\n readyRE = /complete|loaded|interactive/,\n simpleSelectorRE = /^[\\w-]*$/,\n class2type = {},\n toString = class2type.toString,\n zepto = {},\n camelize, uniq,\n tempParent = document.createElement('div'),\n propMap = {\n 'tabindex': 'tabIndex',\n 'readonly': 'readOnly',\n 'for': 'htmlFor',\n 'class': 'className',\n 'maxlength': 'maxLength',\n 'cellspacing': 'cellSpacing',\n 'cellpadding': 'cellPadding',\n 'rowspan': 'rowSpan',\n 'colspan': 'colSpan',\n 'usemap': 'useMap',\n 'frameborder': 'frameBorder',\n 'contenteditable': 'contentEditable'\n },\n isArray = Array.isArray ||\n function(object){ return object instanceof Array }\n\n zepto.matches = function(element, selector) {\n if (!selector || !element || element.nodeType !== 1) return false\n var matchesSelector = element.matches || element.webkitMatchesSelector ||\n element.mozMatchesSelector || element.oMatchesSelector ||\n element.matchesSelector\n if (matchesSelector) return matchesSelector.call(element, selector)\n // fall back to performing a selector:\n var match, parent = element.parentNode, temp = !parent\n if (temp) (parent = tempParent).appendChild(element)\n match = ~zepto.qsa(parent, selector).indexOf(element)\n temp && tempParent.removeChild(element)\n return match\n }\n\n function type(obj) {\n return obj == null ? String(obj) :\n class2type[toString.call(obj)] || \"object\"\n }\n\n function isFunction(value) { return type(value) == \"function\" }\n function isWindow(obj) { return obj != null && obj == obj.window }\n function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE }\n function isObject(obj) { return type(obj) == \"object\" }\n function isPlainObject(obj) {\n return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype\n }\n\n function likeArray(obj) {\n var length = !!obj && 'length' in obj && obj.length,\n type = $.type(obj)\n\n return 'function' != type && !isWindow(obj) && (\n 'array' == type || length === 0 ||\n (typeof length == 'number' && length > 0 && (length - 1) in obj)\n )\n }\n\n function compact(array) { return filter.call(array, function(item){ return item != null }) }\n function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array }\n camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) }\n function dasherize(str) {\n return str.replace(/::/g, '/')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')\n .replace(/([a-z\\d])([A-Z])/g, '$1_$2')\n .replace(/_/g, '-')\n .toLowerCase()\n }\n uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) }\n\n function classRE(name) {\n return name in classCache ?\n classCache[name] : (classCache[name] = new RegExp('(^|\\\\s)' + name + '(\\\\s|$)'))\n }\n\n function maybeAddPx(name, value) {\n return (typeof value == \"number\" && !cssNumber[dasherize(name)]) ? value + \"px\" : value\n }\n\n function defaultDisplay(nodeName) {\n var element, display\n if (!elementDisplay[nodeName]) {\n element = document.createElement(nodeName)\n document.body.appendChild(element)\n display = getComputedStyle(element, '').getPropertyValue(\"display\")\n element.parentNode.removeChild(element)\n display == \"none\" && (display = \"block\")\n elementDisplay[nodeName] = display\n }\n return elementDisplay[nodeName]\n }\n\n function children(element) {\n return 'children' in element ?\n slice.call(element.children) :\n $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node })\n }\n\n function Z(dom, selector) {\n var i, len = dom ? dom.length : 0\n for (i = 0; i < len; i++) this[i] = dom[i]\n this.length = len\n this.selector = selector || ''\n }\n\n // `$.zepto.fragment` takes a html string and an optional tag name\n // to generate DOM nodes from the given html string.\n // The generated DOM nodes are returned as an array.\n // This function can be overridden in plugins for example to make\n // it compatible with browsers that don't support the DOM fully.\n zepto.fragment = function(html, name, properties) {\n var dom, nodes, container\n\n // A special case optimization for a single tag\n if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1))\n\n if (!dom) {\n if (html.replace) html = html.replace(tagExpanderRE, \"<$1></$2>\")\n if (name === undefined) name = fragmentRE.test(html) && RegExp.$1\n if (!(name in containers)) name = '*'\n\n container = containers[name]\n container.innerHTML = '' + html\n dom = $.each(slice.call(container.childNodes), function(){\n container.removeChild(this)\n })\n }\n\n if (isPlainObject(properties)) {\n nodes = $(dom)\n $.each(properties, function(key, value) {\n if (methodAttributes.indexOf(key) > -1) nodes[key](value)\n else nodes.attr(key, value)\n })\n }\n\n return dom\n }\n\n // `$.zepto.Z` swaps out the prototype of the given `dom` array\n // of nodes with `$.fn` and thus supplying all the Zepto functions\n // to the array. This method can be overridden in plugins.\n zepto.Z = function(dom, selector) {\n return new Z(dom, selector)\n }\n\n // `$.zepto.isZ` should return `true` if the given object is a Zepto\n // collection. This method can be overridden in plugins.\n zepto.isZ = function(object) {\n return object instanceof zepto.Z\n }\n\n // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and\n // takes a CSS selector and an optional context (and handles various\n // special cases).\n // This method can be overridden in plugins.\n zepto.init = function(selector, context) {\n var dom\n // If nothing given, return an empty Zepto collection\n if (!selector) return zepto.Z()\n // Optimize for string selectors\n else if (typeof selector == 'string') {\n selector = selector.trim()\n // If it's a html fragment, create nodes from it\n // Note: In both Chrome 21 and Firefox 15, DOM error 12\n // is thrown if the fragment doesn't begin with <\n if (selector[0] == '<' && fragmentRE.test(selector))\n dom = zepto.fragment(selector, RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // If it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // If a function is given, call it when the DOM is ready\n else if (isFunction(selector)) return $(document).ready(selector)\n // If a Zepto collection is given, just return it\n else if (zepto.isZ(selector)) return selector\n else {\n // normalize array if an array of nodes is given\n if (isArray(selector)) dom = compact(selector)\n // Wrap DOM nodes.\n else if (isObject(selector))\n dom = [selector], selector = null\n // If it's a html fragment, create nodes from it\n else if (fragmentRE.test(selector))\n dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // And last but no least, if it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // create a new Zepto collection from the nodes found\n return zepto.Z(dom, selector)\n }\n\n // `$` will be the base `Zepto` object. When calling this\n // function just call `$.zepto.init, which makes the implementation\n // details of selecting nodes and creating Zepto collections\n // patchable in plugins.\n $ = function(selector, context){\n return zepto.init(selector, context)\n }\n\n function extend(target, source, deep) {\n for (key in source)\n if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {\n if (isPlainObject(source[key]) && !isPlainObject(target[key]))\n target[key] = {}\n if (isArray(source[key]) && !isArray(target[key]))\n target[key] = []\n extend(target[key], source[key], deep)\n }\n else if (source[key] !== undefined) target[key] = source[key]\n }\n\n // Copy all but undefined properties from one or more\n // objects to the `target` object.\n $.extend = function(target){\n var deep, args = slice.call(arguments, 1)\n if (typeof target == 'boolean') {\n deep = target\n target = args.shift()\n }\n args.forEach(function(arg){ extend(target, arg, deep) })\n return target\n }\n\n // `$.zepto.qsa` is Zepto's CSS selector implementation which\n // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.\n // This method can be overridden in plugins.\n zepto.qsa = function(element, selector){\n var found,\n maybeID = selector[0] == '#',\n maybeClass = !maybeID && selector[0] == '.',\n nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked\n isSimple = simpleSelectorRE.test(nameOnly)\n return (element.getElementById && isSimple && maybeID) ? // Safari DocumentFragment doesn't have getElementById\n ( (found = element.getElementById(nameOnly)) ? [found] : [] ) :\n (element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11) ? [] :\n slice.call(\n isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn't have getElementsByClassName/TagName\n maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class\n element.getElementsByTagName(selector) : // Or a tag\n element.querySelectorAll(selector) // Or it's not simple, and we need to query all\n )\n }\n\n function filtered(nodes, selector) {\n return selector == null ? $(nodes) : $(nodes).filter(selector)\n }\n\n $.contains = document.documentElement.contains ?\n function(parent, node) {\n return parent !== node && parent.contains(node)\n } :\n function(parent, node) {\n while (node && (node = node.parentNode))\n if (node === parent) return true\n return false\n }\n\n function funcArg(context, arg, idx, payload) {\n return isFunction(arg) ? arg.call(context, idx, payload) : arg\n }\n\n function setAttribute(node, name, value) {\n value == null ? node.removeAttribute(name) : node.setAttribute(name, value)\n }\n\n // access className property while respecting SVGAnimatedString\n function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }\n\n // \"true\" => true\n // \"false\" => false\n // \"null\" => null\n // \"42\" => 42\n // \"42.5\" => 42.5\n // \"08\" => \"08\"\n // JSON => parse if valid\n // String => self\n function deserializeValue(value) {\n try {\n return value ?\n value == \"true\" ||\n ( value == \"false\" ? false :\n value == \"null\" ? null :\n +value + \"\" == value ? +value :\n /^[\\[\\{]/.test(value) ? $.parseJSON(value) :\n value )\n : value\n } catch(e) {\n return value\n }\n }\n\n $.type = type\n $.isFunction = isFunction\n $.isWindow = isWindow\n $.isArray = isArray\n $.isPlainObject = isPlainObject\n\n $.isEmptyObject = function(obj) {\n var name\n for (name in obj) return false\n return true\n }\n\n $.isNumeric = function(val) {\n var num = Number(val), type = typeof val\n return val != null && type != 'boolean' &&\n (type != 'string' || val.length) &&\n !isNaN(num) && isFinite(num) || false\n }\n\n $.inArray = function(elem, array, i){\n return emptyArray.indexOf.call(array, elem, i)\n }\n\n $.camelCase = camelize\n $.trim = function(str) {\n return str == null ? \"\" : String.prototype.trim.call(str)\n }\n\n // plugin compatibility\n $.uuid = 0\n $.support = { }\n $.expr = { }\n $.noop = function() {}\n\n $.map = function(elements, callback){\n var value, values = [], i, key\n if (likeArray(elements))\n for (i = 0; i < elements.length; i++) {\n value = callback(elements[i], i)\n if (value != null) values.push(value)\n }\n else\n for (key in elements) {\n value = callback(elements[key], key)\n if (value != null) values.push(value)\n }\n return flatten(values)\n }\n\n $.each = function(elements, callback){\n var i, key\n if (likeArray(elements)) {\n for (i = 0; i < elements.length; i++)\n if (callback.call(elements[i], i, elements[i]) === false) return elements\n } else {\n for (key in elements)\n if (callback.call(elements[key], key, elements[key]) === false) return elements\n }\n\n return elements\n }\n\n $.grep = function(elements, callback){\n return filter.call(elements, callback)\n }\n\n if (window.JSON) $.parseJSON = JSON.parse\n\n // Populate the class2type map\n $.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\n class2type[ \"[object \" + name + \"]\" ] = name.toLowerCase()\n })\n\n // Define methods that will be available on all\n // Zepto collections\n $.fn = {\n constructor: zepto.Z,\n length: 0,\n\n // Because a collection acts like an array\n // copy over these useful array functions.\n forEach: emptyArray.forEach,\n reduce: emptyArray.reduce,\n push: emptyArray.push,\n sort: emptyArray.sort,\n splice: emptyArray.splice,\n indexOf: emptyArray.indexOf,\n concat: function(){\n var i, value, args = []\n for (i = 0; i < arguments.length; i++) {\n value = arguments[i]\n args[i] = zepto.isZ(value) ? value.toArray() : value\n }\n return concat.apply(zepto.isZ(this) ? this.toArray() : this, args)\n },\n\n // `map` and `slice` in the jQuery API work differently\n // from their array counterparts\n map: function(fn){\n return $($.map(this, function(el, i){ return fn.call(el, i, el) }))\n },\n slice: function(){\n return $(slice.apply(this, arguments))\n },\n\n ready: function(callback){\n // need to check if document.body exists for IE as that browser reports\n // document ready when it hasn't yet created the body element\n if (readyRE.test(document.readyState) && document.body) callback($)\n else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false)\n return this\n },\n get: function(idx){\n return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length]\n },\n toArray: function(){ return this.get() },\n size: function(){\n return this.length\n },\n remove: function(){\n return this.each(function(){\n if (this.parentNode != null)\n this.parentNode.removeChild(this)\n })\n },\n each: function(callback){\n emptyArray.every.call(this, function(el, idx){\n return callback.call(el, idx, el) !== false\n })\n return this\n },\n filter: function(selector){\n if (isFunction(selector)) return this.not(this.not(selector))\n return $(filter.call(this, function(element){\n return zepto.matches(element, selector)\n }))\n },\n add: function(selector,context){\n return $(uniq(this.concat($(selector,context))))\n },\n is: function(selector){\n return this.length > 0 && zepto.matches(this[0], selector)\n },\n not: function(selector){\n var nodes=[]\n if (isFunction(selector) && selector.call !== undefined)\n this.each(function(idx){\n if (!selector.call(this,idx)) nodes.push(this)\n })\n else {\n var excludes = typeof selector == 'string' ? this.filter(selector) :\n (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector)\n this.forEach(function(el){\n if (excludes.indexOf(el) < 0) nodes.push(el)\n })\n }\n return $(nodes)\n },\n has: function(selector){\n return this.filter(function(){\n return isObject(selector) ?\n $.contains(this, selector) :\n $(this).find(selector).size()\n })\n },\n eq: function(idx){\n return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1)\n },\n first: function(){\n var el = this[0]\n return el && !isObject(el) ? el : $(el)\n },\n last: function(){\n var el = this[this.length - 1]\n return el && !isObject(el) ? el : $(el)\n },\n find: function(selector){\n var result, $this = this\n if (!selector) result = $()\n else if (typeof selector == 'object')\n result = $(selector).filter(function(){\n var node = this\n return emptyArray.some.call($this, function(parent){\n return $.contains(parent, node)\n })\n })\n else if (this.length == 1) result = $(zepto.qsa(this[0], selector))\n else result = this.map(function(){ return zepto.qsa(this, selector) })\n return result\n },\n closest: function(selector, context){\n var nodes = [], collection = typeof selector == 'object' && $(selector)\n this.each(function(_, node){\n while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector)))\n node = node !== context && !isDocument(node) && node.parentNode\n if (node && nodes.indexOf(node) < 0) nodes.push(node)\n })\n return $(nodes)\n },\n parents: function(selector){\n var ancestors = [], nodes = this\n while (nodes.length > 0)\n nodes = $.map(nodes, function(node){\n if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {\n ancestors.push(node)\n return node\n }\n })\n return filtered(ancestors, selector)\n },\n parent: function(selector){\n return filtered(uniq(this.pluck('parentNode')), selector)\n },\n children: function(selector){\n return filtered(this.map(function(){ return children(this) }), selector)\n },\n contents: function() {\n return this.map(function() { return this.contentDocument || slice.call(this.childNodes) })\n },\n siblings: function(selector){\n return filtered(this.map(function(i, el){\n return filter.call(children(el.parentNode), function(child){ return child!==el })\n }), selector)\n },\n empty: function(){\n return this.each(function(){ this.innerHTML = '' })\n },\n // `pluck` is borrowed from Prototype.js\n pluck: function(property){\n return $.map(this, function(el){ return el[property] })\n },\n show: function(){\n return this.each(function(){\n this.style.display == \"none\" && (this.style.display = '')\n if (getComputedStyle(this, '').getPropertyValue(\"display\") == \"none\")\n this.style.display = defaultDisplay(this.nodeName)\n })\n },\n replaceWith: function(newContent){\n return this.before(newContent).remove()\n },\n wrap: function(structure){\n var func = isFunction(structure)\n if (this[0] && !func)\n var dom = $(structure).get(0),\n clone = dom.parentNode || this.length > 1\n\n return this.each(function(index){\n $(this).wrapAll(\n func ? structure.call(this, index) :\n clone ? dom.cloneNode(true) : dom\n )\n })\n },\n wrapAll: function(structure){\n if (this[0]) {\n $(this[0]).before(structure = $(structure))\n var children\n // drill down to the inmost element\n while ((children = structure.children()).length) structure = children.first()\n $(structure).append(this)\n }\n return this\n },\n wrapInner: function(structure){\n var func = isFunction(structure)\n return this.each(function(index){\n var self = $(this), contents = self.contents(),\n dom = func ? structure.call(this, index) : structure\n contents.length ? contents.wrapAll(dom) : self.append(dom)\n })\n },\n unwrap: function(){\n this.parent().each(function(){\n $(this).replaceWith($(this).children())\n })\n return this\n },\n clone: function(){\n return this.map(function(){ return this.cloneNode(true) })\n },\n hide: function(){\n return this.css(\"display\", \"none\")\n },\n toggle: function(setting){\n return this.each(function(){\n var el = $(this)\n ;(setting === undefined ? el.css(\"display\") == \"none\" : setting) ? el.show() : el.hide()\n })\n },\n prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') },\n next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') },\n html: function(html){\n return 0 in arguments ?\n this.each(function(idx){\n var originHtml = this.innerHTML\n $(this).empty().append( funcArg(this, html, idx, originHtml) )\n }) :\n (0 in this ? this[0].innerHTML : null)\n },\n text: function(text){\n return 0 in arguments ?\n this.each(function(idx){\n var newText = funcArg(this, text, idx, this.textContent)\n this.textContent = newText == null ? '' : ''+newText\n }) :\n (0 in this ? this.pluck('textContent').join(\"\") : null)\n },\n attr: function(name, value){\n var result\n return (typeof name == 'string' && !(1 in arguments)) ?\n (0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined) :\n this.each(function(idx){\n if (this.nodeType !== 1) return\n if (isObject(name)) for (key in name) setAttribute(this, key, name[key])\n else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)))\n })\n },\n removeAttr: function(name){\n return this.each(function(){ this.nodeType === 1 && name.split(' ').forEach(function(attribute){\n setAttribute(this, attribute)\n }, this)})\n },\n prop: function(name, value){\n name = propMap[name] || name\n return (1 in arguments) ?\n this.each(function(idx){\n this[name] = funcArg(this, value, idx, this[name])\n }) :\n (this[0] && this[0][name])\n },\n removeProp: function(name){\n name = propMap[name] || name\n return this.each(function(){ delete this[name] })\n },\n data: function(name, value){\n var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase()\n\n var data = (1 in arguments) ?\n this.attr(attrName, value) :\n this.attr(attrName)\n\n return data !== null ? deserializeValue(data) : undefined\n },\n val: function(value){\n if (0 in arguments) {\n if (value == null) value = \"\"\n return this.each(function(idx){\n this.value = funcArg(this, value, idx, this.value)\n })\n } else {\n return this[0] && (this[0].multiple ?\n $(this[0]).find('option').filter(function(){ return this.selected }).pluck('value') :\n this[0].value)\n }\n },\n offset: function(coordinates){\n if (coordinates) return this.each(function(index){\n var $this = $(this),\n coords = funcArg(this, coordinates, index, $this.offset()),\n parentOffset = $this.offsetParent().offset(),\n props = {\n top: coords.top - parentOffset.top,\n left: coords.left - parentOffset.left\n }\n\n if ($this.css('position') == 'static') props['position'] = 'relative'\n $this.css(props)\n })\n if (!this.length) return null\n if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0]))\n return {top: 0, left: 0}\n var obj = this[0].getBoundingClientRect()\n return {\n left: obj.left + window.pageXOffset,\n top: obj.top + window.pageYOffset,\n width: Math.round(obj.width),\n height: Math.round(obj.height)\n }\n },\n css: function(property, value){\n if (arguments.length < 2) {\n var element = this[0]\n if (typeof property == 'string') {\n if (!element) return\n return element.style[camelize(property)] || getComputedStyle(element, '').getPropertyValue(property)\n } else if (isArray(property)) {\n if (!element) return\n var props = {}\n var computedStyle = getComputedStyle(element, '')\n $.each(property, function(_, prop){\n props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop))\n })\n return props\n }\n }\n\n var css = ''\n if (type(property) == 'string') {\n if (!value && value !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(property)) })\n else\n css = dasherize(property) + \":\" + maybeAddPx(property, value)\n } else {\n for (key in property)\n if (!property[key] && property[key] !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(key)) })\n else\n css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';'\n }\n\n return this.each(function(){ this.style.cssText += ';' + css })\n },\n index: function(element){\n return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0])\n },\n hasClass: function(name){\n if (!name) return false\n return emptyArray.some.call(this, function(el){\n return this.test(className(el))\n }, classRE(name))\n },\n addClass: function(name){\n if (!name) return this\n return this.each(function(idx){\n if (!('className' in this)) return\n classList = []\n var cls = className(this), newName = funcArg(this, name, idx, cls)\n newName.split(/\\s+/g).forEach(function(klass){\n if (!$(this).hasClass(klass)) classList.push(klass)\n }, this)\n classList.length && className(this, cls + (cls ? \" \" : \"\") + classList.join(\" \"))\n })\n },\n removeClass: function(name){\n return this.each(function(idx){\n if (!('className' in this)) return\n if (name === undefined) return className(this, '')\n classList = className(this)\n funcArg(this, name, idx, classList).split(/\\s+/g).forEach(function(klass){\n classList = classList.replace(classRE(klass), \" \")\n })\n className(this, classList.trim())\n })\n },\n toggleClass: function(name, when){\n if (!name) return this\n return this.each(function(idx){\n var $this = $(this), names = funcArg(this, name, idx, className(this))\n names.split(/\\s+/g).forEach(function(klass){\n (when === undefined ? !$this.hasClass(klass) : when) ?\n $this.addClass(klass) : $this.removeClass(klass)\n })\n })\n },\n scrollTop: function(value){\n if (!this.length) return\n var hasScrollTop = 'scrollTop' in this[0]\n if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset\n return this.each(hasScrollTop ?\n function(){ this.scrollTop = value } :\n function(){ this.scrollTo(this.scrollX, value) })\n },\n scrollLeft: function(value){\n if (!this.length) return\n var hasScrollLeft = 'scrollLeft' in this[0]\n if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset\n return this.each(hasScrollLeft ?\n function(){ this.scrollLeft = value } :\n function(){ this.scrollTo(value, this.scrollY) })\n },\n position: function() {\n if (!this.length) return\n\n var elem = this[0],\n // Get *real* offsetParent\n offsetParent = this.offsetParent(),\n // Get correct offsets\n offset = this.offset(),\n parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset()\n\n // Subtract element margins\n // note: when an element has margin: auto the offsetLeft and marginLeft\n // are the same in Safari causing offset.left to incorrectly be 0\n offset.top -= parseFloat( $(elem).css('margin-top') ) || 0\n offset.left -= parseFloat( $(elem).css('margin-left') ) || 0\n\n // Add offsetParent borders\n parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0\n parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0\n\n // Subtract the two offsets\n return {\n top: offset.top - parentOffset.top,\n left: offset.left - parentOffset.left\n }\n },\n offsetParent: function() {\n return this.map(function(){\n var parent = this.offsetParent || document.body\n while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css(\"position\") == \"static\")\n parent = parent.offsetParent\n return parent\n })\n }\n }\n\n // for now\n $.fn.detach = $.fn.remove\n\n // Generate the `width` and `height` functions\n ;['width', 'height'].forEach(function(dimension){\n var dimensionProperty =\n dimension.replace(/./, function(m){ return m[0].toUpperCase() })\n\n $.fn[dimension] = function(value){\n var offset, el = this[0]\n if (value === undefined) return isWindow(el) ? el['inner' + dimensionProperty] :\n isDocument(el) ? el.documentElement['scroll' + dimensionProperty] :\n (offset = this.offset()) && offset[dimension]\n else return this.each(function(idx){\n el = $(this)\n el.css(dimension, funcArg(this, value, idx, el[dimension]()))\n })\n }\n })\n\n function traverseNode(node, fun) {\n fun(node)\n for (var i = 0, len = node.childNodes.length; i < len; i++)\n traverseNode(node.childNodes[i], fun)\n }\n\n // Generate the `after`, `prepend`, `before`, `append`,\n // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.\n adjacencyOperators.forEach(function(operator, operatorIndex) {\n var inside = operatorIndex % 2 //=> prepend, append\n\n $.fn[operator] = function(){\n // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings\n var argType, nodes = $.map(arguments, function(arg) {\n var arr = []\n argType = type(arg)\n if (argType == \"array\") {\n arg.forEach(function(el) {\n if (el.nodeType !== undefined) return arr.push(el)\n else if ($.zepto.isZ(el)) return arr = arr.concat(el.get())\n arr = arr.concat(zepto.fragment(el))\n })\n return arr\n }\n return argType == \"object\" || arg == null ?\n arg : zepto.fragment(arg)\n }),\n parent, copyByClone = this.length > 1\n if (nodes.length < 1) return this\n\n return this.each(function(_, target){\n parent = inside ? target : target.parentNode\n\n // convert all methods to a \"before\" operation\n target = operatorIndex == 0 ? target.nextSibling :\n operatorIndex == 1 ? target.firstChild :\n operatorIndex == 2 ? target :\n null\n\n var parentInDocument = $.contains(document.documentElement, parent)\n\n nodes.forEach(function(node){\n if (copyByClone) node = node.cloneNode(true)\n else if (!parent) return $(node).remove()\n\n parent.insertBefore(node, target)\n if (parentInDocument) traverseNode(node, function(el){\n if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' &&\n (!el.type || el.type === 'text/javascript') && !el.src){\n var target = el.ownerDocument ? el.ownerDocument.defaultView : window\n target['eval'].call(target, el.innerHTML)\n }\n })\n })\n })\n }\n\n // after => insertAfter\n // prepend => prependTo\n // before => insertBefore\n // append => appendTo\n $.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){\n $(html)[operator](this)\n return this\n }\n })\n\n zepto.Z.prototype = Z.prototype = $.fn\n\n // Export internal API functions in the `$.zepto` namespace\n zepto.uniq = uniq\n zepto.deserializeValue = deserializeValue\n $.zepto = zepto\n\n return $\n})()\n\nwindow.Zepto = Zepto\nwindow.$ === undefined && (window.$ = Zepto)\n\n;(function($){\n var _zid = 1, undefined,\n slice = Array.prototype.slice,\n isFunction = $.isFunction,\n isString = function(obj){ return typeof obj == 'string' },\n handlers = {},\n specialEvents={},\n focusinSupported = 'onfocusin' in window,\n focus = { focus: 'focusin', blur: 'focusout' },\n hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' }\n\n specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents'\n\n function zid(element) {\n return element._zid || (element._zid = _zid++)\n }\n function findHandlers(element, event, fn, selector) {\n event = parse(event)\n if (event.ns) var matcher = matcherFor(event.ns)\n return (handlers[zid(element)] || []).filter(function(handler) {\n return handler\n && (!event.e || handler.e == event.e)\n && (!event.ns || matcher.test(handler.ns))\n && (!fn || zid(handler.fn) === zid(fn))\n && (!selector || handler.sel == selector)\n })\n }\n function parse(event) {\n var parts = ('' + event).split('.')\n return {e: parts[0], ns: parts.slice(1).sort().join(' ')}\n }\n function matcherFor(ns) {\n return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)')\n }\n\n function eventCapture(handler, captureSetting) {\n return handler.del &&\n (!focusinSupported && (handler.e in focus)) ||\n !!captureSetting\n }\n\n function realEvent(type) {\n return hover[type] || (focusinSupported && focus[type]) || type\n }\n\n function add(element, events, fn, data, selector, delegator, capture){\n var id = zid(element), set = (handlers[id] || (handlers[id] = []))\n events.split(/\\s/).forEach(function(event){\n if (event == 'ready') return $(document).ready(fn)\n var handler = parse(event)\n handler.fn = fn\n handler.sel = selector\n // emulate mouseenter, mouseleave\n if (handler.e in hover) fn = function(e){\n var related = e.relatedTarget\n if (!related || (related !== this && !$.contains(this, related)))\n return handler.fn.apply(this, arguments)\n }\n handler.del = delegator\n var callback = delegator || fn\n handler.proxy = function(e){\n e = compatible(e)\n if (e.isImmediatePropagationStopped()) return\n e.data = data\n var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args))\n if (result === false) e.preventDefault(), e.stopPropagation()\n return result\n }\n handler.i = set.length\n set.push(handler)\n if ('addEventListener' in element)\n element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n }\n function remove(element, events, fn, selector, capture){\n var id = zid(element)\n ;(events || '').split(/\\s/).forEach(function(event){\n findHandlers(element, event, fn, selector).forEach(function(handler){\n delete handlers[id][handler.i]\n if ('removeEventListener' in element)\n element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n })\n }\n\n $.event = { add: add, remove: remove }\n\n $.proxy = function(fn, context) {\n var args = (2 in arguments) && slice.call(arguments, 2)\n if (isFunction(fn)) {\n var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) }\n proxyFn._zid = zid(fn)\n return proxyFn\n } else if (isString(context)) {\n if (args) {\n args.unshift(fn[context], fn)\n return $.proxy.apply(null, args)\n } else {\n return $.proxy(fn[context], fn)\n }\n } else {\n throw new TypeError(\"expected function\")\n }\n }\n\n $.fn.bind = function(event, data, callback){\n return this.on(event, data, callback)\n }\n $.fn.unbind = function(event, callback){\n return this.off(event, callback)\n }\n $.fn.one = function(event, selector, data, callback){\n return this.on(event, selector, data, callback, 1)\n }\n\n var returnTrue = function(){return true},\n returnFalse = function(){return false},\n ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,\n eventMethods = {\n preventDefault: 'isDefaultPrevented',\n stopImmediatePropagation: 'isImmediatePropagationStopped',\n stopPropagation: 'isPropagationStopped'\n }\n\n function compatible(event, source) {\n if (source || !event.isDefaultPrevented) {\n source || (source = event)\n\n $.each(eventMethods, function(name, predicate) {\n var sourceMethod = source[name]\n event[name] = function(){\n this[predicate] = returnTrue\n return sourceMethod && sourceMethod.apply(source, arguments)\n }\n event[predicate] = returnFalse\n })\n\n event.timeStamp || (event.timeStamp = Date.now())\n\n if (source.defaultPrevented !== undefined ? source.defaultPrevented :\n 'returnValue' in source ? source.returnValue === false :\n source.getPreventDefault && source.getPreventDefault())\n event.isDefaultPrevented = returnTrue\n }\n return event\n }\n\n function createProxy(event) {\n var key, proxy = { originalEvent: event }\n for (key in event)\n if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key]\n\n return compatible(proxy, event)\n }\n\n $.fn.delegate = function(selector, event, callback){\n return this.on(event, selector, callback)\n }\n $.fn.undelegate = function(selector, event, callback){\n return this.off(event, selector, callback)\n }\n\n $.fn.live = function(event, callback){\n $(document.body).delegate(this.selector, event, callback)\n return this\n }\n $.fn.die = function(event, callback){\n $(document.body).undelegate(this.selector, event, callback)\n return this\n }\n\n $.fn.on = function(event, selector, data, callback, one){\n var autoRemove, delegator, $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.on(type, selector, data, fn, one)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = data, data = selector, selector = undefined\n if (callback === undefined || data === false)\n callback = data, data = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(_, element){\n if (one) autoRemove = function(e){\n remove(element, e.type, callback)\n return callback.apply(this, arguments)\n }\n\n if (selector) delegator = function(e){\n var evt, match = $(e.target).closest(selector, element).get(0)\n if (match && match !== element) {\n evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element})\n return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)))\n }\n }\n\n add(element, event, callback, data, selector, delegator || autoRemove)\n })\n }\n $.fn.off = function(event, selector, callback){\n var $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.off(type, selector, fn)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = selector, selector = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(){\n remove(this, event, callback, selector)\n })\n }\n\n $.fn.trigger = function(event, args){\n event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event)\n event._args = args\n return this.each(function(){\n // handle focus(), blur() by calling them directly\n if (event.type in focus && typeof this[event.type] == \"function\") this[event.type]()\n // items in the collection might not be DOM elements\n else if ('dispatchEvent' in this) this.dispatchEvent(event)\n else $(this).triggerHandler(event, args)\n })\n }\n\n // triggers event handlers on current element just as if an event occurred,\n // doesn't trigger an actual event, doesn't bubble\n $.fn.triggerHandler = function(event, args){\n var e, result\n this.each(function(i, element){\n e = createProxy(isString(event) ? $.Event(event) : event)\n e._args = args\n e.target = element\n $.each(findHandlers(element, event.type || event), function(i, handler){\n result = handler.proxy(e)\n if (e.isImmediatePropagationStopped()) return false\n })\n })\n return result\n }\n\n // shortcut methods for `.bind(event, fn)` for each event type\n ;('focusin focusout focus blur load resize scroll unload click dblclick '+\n 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+\n 'change select keydown keypress keyup error').split(' ').forEach(function(event) {\n $.fn[event] = function(callback) {\n return (0 in arguments) ?\n this.bind(event, callback) :\n this.trigger(event)\n }\n })\n\n $.Event = function(type, props) {\n if (!isString(type)) props = type, type = props.type\n var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true\n if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name])\n event.initEvent(type, bubbles, true)\n return compatible(event)\n }\n\n})(Zepto)\n\n;(function($){\n var jsonpID = +new Date(),\n document = window.document,\n key,\n name,\n rscript = /<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,\n scriptTypeRE = /^(?:text|application)\\/javascript/i,\n xmlTypeRE = /^(?:text|application)\\/xml/i,\n jsonType = 'application/json',\n htmlType = 'text/html',\n blankRE = /^\\s*$/,\n originAnchor = document.createElement('a')\n\n originAnchor.href = window.location.href\n\n // trigger a custom event and return false if it was cancelled\n function triggerAndReturn(context, eventName, data) {\n var event = $.Event(eventName)\n $(context).trigger(event, data)\n return !event.isDefaultPrevented()\n }\n\n // trigger an Ajax \"global\" event\n function triggerGlobal(settings, context, eventName, data) {\n if (settings.global) return triggerAndReturn(context || document, eventName, data)\n }\n\n // Number of active Ajax requests\n $.active = 0\n\n function ajaxStart(settings) {\n if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart')\n }\n function ajaxStop(settings) {\n if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop')\n }\n\n // triggers an extra global event \"ajaxBeforeSend\" that's like \"ajaxSend\" but cancelable\n function ajaxBeforeSend(xhr, settings) {\n var context = settings.context\n if (settings.beforeSend.call(context, xhr, settings) === false ||\n triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false)\n return false\n\n triggerGlobal(settings, context, 'ajaxSend', [xhr, settings])\n }\n function ajaxSuccess(data, xhr, settings, deferred) {\n var context = settings.context, status = 'success'\n settings.success.call(context, data, status, xhr)\n if (deferred) deferred.resolveWith(context, [data, status, xhr])\n triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data])\n ajaxComplete(status, xhr, settings)\n }\n // type: \"timeout\", \"error\", \"abort\", \"parsererror\"\n function ajaxError(error, type, xhr, settings, deferred) {\n var context = settings.context\n settings.error.call(context, xhr, type, error)\n if (deferred) deferred.rejectWith(context, [xhr, type, error])\n triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type])\n ajaxComplete(type, xhr, settings)\n }\n // status: \"success\", \"notmodified\", \"error\", \"timeout\", \"abort\", \"parsererror\"\n function ajaxComplete(status, xhr, settings) {\n var context = settings.context\n settings.complete.call(context, xhr, status)\n triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings])\n ajaxStop(settings)\n }\n\n function ajaxDataFilter(data, type, settings) {\n if (settings.dataFilter == empty) return data\n var context = settings.context\n return settings.dataFilter.call(context, data, type)\n }\n\n // Empty function, used as default callback\n function empty() {}\n\n $.ajaxJSONP = function(options, deferred){\n if (!('type' in options)) return $.ajax(options)\n\n var _callbackName = options.jsonpCallback,\n callbackName = ($.isFunction(_callbackName) ?\n _callbackName() : _callbackName) || ('Zepto' + (jsonpID++)),\n script = document.createElement('script'),\n originalCallback = window[callbackName],\n responseData,\n abort = function(errorType) {\n $(script).triggerHandler('error', errorType || 'abort')\n },\n xhr = { abort: abort }, abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n $(script).on('load error', function(e, errorType){\n clearTimeout(abortTimeout)\n $(script).off().remove()\n\n if (e.type == 'error' || !responseData) {\n ajaxError(null, errorType || 'error', xhr, options, deferred)\n } else {\n ajaxSuccess(responseData[0], xhr, options, deferred)\n }\n\n window[callbackName] = originalCallback\n if (responseData && $.isFunction(originalCallback))\n originalCallback(responseData[0])\n\n originalCallback = responseData = undefined\n })\n\n if (ajaxBeforeSend(xhr, options) === false) {\n abort('abort')\n return xhr\n }\n\n window[callbackName] = function(){\n responseData = arguments\n }\n\n script.src = options.url.replace(/\\?(.+)=\\?/, '?$1=' + callbackName)\n document.head.appendChild(script)\n\n if (options.timeout > 0) abortTimeout = setTimeout(function(){\n abort('timeout')\n }, options.timeout)\n\n return xhr\n }\n\n $.ajaxSettings = {\n // Default type of request\n type: 'GET',\n // Callback that is executed before request\n beforeSend: empty,\n // Callback that is executed if the request succeeds\n success: empty,\n // Callback that is executed the the server drops error\n error: empty,\n // Callback that is executed on request complete (both: error and success)\n complete: empty,\n // The context for the callbacks\n context: null,\n // Whether to trigger \"global\" Ajax events\n global: true,\n // Transport\n xhr: function () {\n return new window.XMLHttpRequest()\n },\n // MIME types mapping\n // IIS returns Javascript as \"application/x-javascript\"\n accepts: {\n script: 'text/javascript, application/javascript, application/x-javascript',\n json: jsonType,\n xml: 'application/xml, text/xml',\n html: htmlType,\n text: 'text/plain'\n },\n // Whether the request is to another domain\n crossDomain: false,\n // Default timeout\n timeout: 0,\n // Whether data should be serialized to string\n processData: true,\n // Whether the browser should be allowed to cache GET responses\n cache: true,\n //Used to handle the raw response data of XMLHttpRequest.\n //This is a pre-filtering function to sanitize the response.\n //The sanitized response should be returned\n dataFilter: empty\n }\n\n function mimeToDataType(mime) {\n if (mime) mime = mime.split(';', 2)[0]\n return mime && ( mime == htmlType ? 'html' :\n mime == jsonType ? 'json' :\n scriptTypeRE.test(mime) ? 'script' :\n xmlTypeRE.test(mime) && 'xml' ) || 'text'\n }\n\n function appendQuery(url, query) {\n if (query == '') return url\n return (url + '&' + query).replace(/[&?]{1,2}/, '?')\n }\n\n // serialize payload and append it to the URL for GET requests\n function serializeData(options) {\n if (options.processData && options.data && $.type(options.data) != \"string\")\n options.data = $.param(options.data, options.traditional)\n if (options.data && (!options.type || options.type.toUpperCase() == 'GET' || 'jsonp' == options.dataType))\n options.url = appendQuery(options.url, options.data), options.data = undefined\n }\n\n $.ajax = function(options){\n var settings = $.extend({}, options || {}),\n deferred = $.Deferred && $.Deferred(),\n urlAnchor, hashIndex\n for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key]\n\n ajaxStart(settings)\n\n if (!settings.crossDomain) {\n urlAnchor = document.createElement('a')\n urlAnchor.href = settings.url\n // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049\n urlAnchor.href = urlAnchor.href\n settings.crossDomain = (originAnchor.protocol + '//' + originAnchor.host) !== (urlAnchor.protocol + '//' + urlAnchor.host)\n }\n\n if (!settings.url) settings.url = window.location.toString()\n if ((hashIndex = settings.url.indexOf('#')) > -1) settings.url = settings.url.slice(0, hashIndex)\n serializeData(settings)\n\n var dataType = settings.dataType, hasPlaceholder = /\\?.+=\\?/.test(settings.url)\n if (hasPlaceholder) dataType = 'jsonp'\n\n if (settings.cache === false || (\n (!options || options.cache !== true) &&\n ('script' == dataType || 'jsonp' == dataType)\n ))\n settings.url = appendQuery(settings.url, '_=' + Date.now())\n\n if ('jsonp' == dataType) {\n if (!hasPlaceholder)\n settings.url = appendQuery(settings.url,\n settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?')\n return $.ajaxJSONP(settings, deferred)\n }\n\n var mime = settings.accepts[dataType],\n headers = { },\n setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] },\n protocol = /^([\\w-]+:)\\/\\//.test(settings.url) ? RegExp.$1 : window.location.protocol,\n xhr = settings.xhr(),\n nativeSetHeader = xhr.setRequestHeader,\n abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest')\n setHeader('Accept', mime || '*/*')\n if (mime = settings.mimeType || mime) {\n if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0]\n xhr.overrideMimeType && xhr.overrideMimeType(mime)\n }\n if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET'))\n setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded')\n\n if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name])\n xhr.setRequestHeader = setHeader\n\n xhr.onreadystatechange = function(){\n if (xhr.readyState == 4) {\n xhr.onreadystatechange = empty\n clearTimeout(abortTimeout)\n var result, error = false\n if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) {\n dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type'))\n\n if (xhr.responseType == 'arraybuffer' || xhr.responseType == 'blob')\n result = xhr.response\n else {\n result = xhr.responseText\n\n try {\n // http://perfectionkills.com/global-eval-what-are-the-options/\n // sanitize response accordingly if data filter callback provided\n result = ajaxDataFilter(result, dataType, settings)\n if (dataType == 'script') (1,eval)(result)\n else if (dataType == 'xml') result = xhr.responseXML\n else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result)\n } catch (e) { error = e }\n\n if (error) return ajaxError(error, 'parsererror', xhr, settings, deferred)\n }\n\n ajaxSuccess(result, xhr, settings, deferred)\n } else {\n ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred)\n }\n }\n }\n\n if (ajaxBeforeSend(xhr, settings) === false) {\n xhr.abort()\n ajaxError(null, 'abort', xhr, settings, deferred)\n return xhr\n }\n\n var async = 'async' in settings ? settings.async : true\n xhr.open(settings.type, settings.url, async, settings.username, settings.password)\n\n if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name]\n\n for (name in headers) nativeSetHeader.apply(xhr, headers[name])\n\n if (settings.timeout > 0) abortTimeout = setTimeout(function(){\n xhr.onreadystatechange = empty\n xhr.abort()\n ajaxError(null, 'timeout', xhr, settings, deferred)\n }, settings.timeout)\n\n // avoid sending empty string (#319)\n xhr.send(settings.data ? settings.data : null)\n return xhr\n }\n\n // handle optional data/success arguments\n function parseArguments(url, data, success, dataType) {\n if ($.isFunction(data)) dataType = success, success = data, data = undefined\n if (!$.isFunction(success)) dataType = success, success = undefined\n return {\n url: url\n , data: data\n , success: success\n , dataType: dataType\n }\n }\n\n $.get = function(/* url, data, success, dataType */){\n return $.ajax(parseArguments.apply(null, arguments))\n }\n\n $.post = function(/* url, data, success, dataType */){\n var options = parseArguments.apply(null, arguments)\n options.type = 'POST'\n return $.ajax(options)\n }\n\n $.getJSON = function(/* url, data, success */){\n var options = parseArguments.apply(null, arguments)\n options.dataType = 'json'\n return $.ajax(options)\n }\n\n $.fn.load = function(url, data, success){\n if (!this.length) return this\n var self = this, parts = url.split(/\\s/), selector,\n options = parseArguments(url, data, success),\n callback = options.success\n if (parts.length > 1) options.url = parts[0], selector = parts[1]\n options.success = function(response){\n self.html(selector ?\n $('<div>').html(response.replace(rscript, \"\")).find(selector)\n : response)\n callback && callback.apply(self, arguments)\n }\n $.ajax(options)\n return this\n }\n\n var escape = encodeURIComponent\n\n function serialize(params, obj, traditional, scope){\n var type, array = $.isArray(obj), hash = $.isPlainObject(obj)\n $.each(obj, function(key, value) {\n type = $.type(value)\n if (scope) key = traditional ? scope :\n scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']'\n // handle data in serializeArray() format\n if (!scope && array) params.add(value.name, value.value)\n // recurse into nested objects\n else if (type == \"array\" || (!traditional && type == \"object\"))\n serialize(params, value, traditional, key)\n else params.add(key, value)\n })\n }\n\n $.param = function(obj, traditional){\n var params = []\n params.add = function(key, value) {\n if ($.isFunction(value)) value = value()\n if (value == null) value = \"\"\n this.push(escape(key) + '=' + escape(value))\n }\n serialize(params, obj, traditional)\n return params.join('&').replace(/%20/g, '+')\n }\n})(Zepto)\n\n;(function($){\n $.fn.serializeArray = function() {\n var name, type, result = [],\n add = function(value) {\n if (value.forEach) return value.forEach(add)\n result.push({ name: name, value: value })\n }\n if (this[0]) $.each(this[0].elements, function(_, field){\n type = field.type, name = field.name\n if (name && field.nodeName.toLowerCase() != 'fieldset' &&\n !field.disabled && type != 'submit' && type != 'reset' && type != 'button' && type != 'file' &&\n ((type != 'radio' && type != 'checkbox') || field.checked))\n add($(field).val())\n })\n return result\n }\n\n $.fn.serialize = function(){\n var result = []\n this.serializeArray().forEach(function(elm){\n result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value))\n })\n return result.join('&')\n }\n\n $.fn.submit = function(callback) {\n if (0 in arguments) this.bind('submit', callback)\n else if (this.length) {\n var event = $.Event('submit')\n this.eq(0).trigger(event)\n if (!event.isDefaultPrevented()) this.get(0).submit()\n }\n return this\n }\n\n})(Zepto)\n\n;(function(){\n // getComputedStyle shouldn't freak out when called\n // without a valid element as argument\n try {\n getComputedStyle(undefined)\n } catch(e) {\n var nativeGetComputedStyle = getComputedStyle\n window.getComputedStyle = function(element, pseudoElement){\n try {\n return nativeGetComputedStyle(element, pseudoElement)\n } catch(e) {\n return null\n }\n }\n }\n})()\n return Zepto\n}))\n\n}.call(window));","/*!\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","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):t.dayjs=e()}(this,function(){\"use strict\";var t=\"millisecond\",e=\"second\",n=\"minute\",r=\"hour\",i=\"day\",s=\"week\",u=\"month\",o=\"quarter\",a=\"year\",h=/^(\\d{4})-?(\\d{1,2})-?(\\d{0,2})[^0-9]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?.?(\\d{1,3})?$/,f=/\\[([^\\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},d={s:c,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+c(r,2,\"0\")+\":\"+c(i,2,\"0\")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,u),i=e-r<0,s=t.clone().add(n+(i?-1:1),u);return Number(-(n+(e-r)/(i?r-s:s-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(h){return{M:u,y:a,w:s,d:i,D:\"date\",h:r,m:n,s:e,ms:t,Q:o}[h]||String(h||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},$={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\")},l=\"en\",m={};m[l]=$;var y=function(t){return t instanceof v},M=function(t,e,n){var r;if(!t)return l;if(\"string\"==typeof t)m[t]&&(r=t),e&&(m[t]=e,r=t);else{var i=t.name;m[i]=t,r=i}return!n&&r&&(l=r),r||!n&&l},g=function(t,e){if(y(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new v(n)},D=d;D.l=M,D.i=y,D.w=function(t,e){return g(t,{locale:e.$L,utc:e.$u,$offset:e.$offset})};var v=function(){function c(t){this.$L=this.$L||M(t.locale,null,!0),this.parse(t)}var d=c.prototype;return d.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(D.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match(h);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(e)}(t),this.init()},d.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},d.$utils=function(){return D},d.isValid=function(){return!(\"Invalid Date\"===this.$d.toString())},d.isSame=function(t,e){var n=g(t);return this.startOf(e)<=n&&n<=this.endOf(e)},d.isAfter=function(t,e){return g(t)<this.startOf(e)},d.isBefore=function(t,e){return this.endOf(e)<g(t)},d.$g=function(t,e,n){return D.u(t)?this[e]:this.set(n,t)},d.year=function(t){return this.$g(t,\"$y\",a)},d.month=function(t){return this.$g(t,\"$M\",u)},d.day=function(t){return this.$g(t,\"$W\",i)},d.date=function(t){return this.$g(t,\"$D\",\"date\")},d.hour=function(t){return this.$g(t,\"$H\",r)},d.minute=function(t){return this.$g(t,\"$m\",n)},d.second=function(t){return this.$g(t,\"$s\",e)},d.millisecond=function(e){return this.$g(e,\"$ms\",t)},d.unix=function(){return Math.floor(this.valueOf()/1e3)},d.valueOf=function(){return this.$d.getTime()},d.startOf=function(t,o){var h=this,f=!!D.u(o)||o,c=D.p(t),d=function(t,e){var n=D.w(h.$u?Date.UTC(h.$y,e,t):new Date(h.$y,e,t),h);return f?n:n.endOf(i)},$=function(t,e){return D.w(h.toDate()[t].apply(h.toDate(\"s\"),(f?[0,0,0,0]:[23,59,59,999]).slice(e)),h)},l=this.$W,m=this.$M,y=this.$D,M=\"set\"+(this.$u?\"UTC\":\"\");switch(c){case a:return f?d(1,0):d(31,11);case u:return f?d(1,m):d(0,m+1);case s:var g=this.$locale().weekStart||0,v=(l<g?l+7:l)-g;return d(f?y-v:y+(6-v),m);case i:case\"date\":return $(M+\"Hours\",0);case r:return $(M+\"Minutes\",1);case n:return $(M+\"Seconds\",2);case e:return $(M+\"Milliseconds\",3);default:return this.clone()}},d.endOf=function(t){return this.startOf(t,!1)},d.$set=function(s,o){var h,f=D.p(s),c=\"set\"+(this.$u?\"UTC\":\"\"),d=(h={},h[i]=c+\"Date\",h.date=c+\"Date\",h[u]=c+\"Month\",h[a]=c+\"FullYear\",h[r]=c+\"Hours\",h[n]=c+\"Minutes\",h[e]=c+\"Seconds\",h[t]=c+\"Milliseconds\",h)[f],$=f===i?this.$D+(o-this.$W):o;if(f===u||f===a){var l=this.clone().set(\"date\",1);l.$d[d]($),l.init(),this.$d=l.set(\"date\",Math.min(this.$D,l.daysInMonth())).toDate()}else d&&this.$d[d]($);return this.init(),this},d.set=function(t,e){return this.clone().$set(t,e)},d.get=function(t){return this[D.p(t)]()},d.add=function(t,o){var h,f=this;t=Number(t);var c=D.p(o),d=function(e){var n=g(f);return D.w(n.date(n.date()+Math.round(e*t)),f)};if(c===u)return this.set(u,this.$M+t);if(c===a)return this.set(a,this.$y+t);if(c===i)return d(1);if(c===s)return d(7);var $=(h={},h[n]=6e4,h[r]=36e5,h[e]=1e3,h)[c]||1,l=this.$d.getTime()+t*$;return D.w(l,this)},d.subtract=function(t,e){return this.add(-1*t,e)},d.format=function(t){var e=this;if(!this.isValid())return\"Invalid Date\";var n=t||\"YYYY-MM-DDTHH:mm:ssZ\",r=D.z(this),i=this.$locale(),s=this.$H,u=this.$m,o=this.$M,a=i.weekdays,h=i.months,c=function(t,r,i,s){return t&&(t[r]||t(e,n))||i[r].substr(0,s)},d=function(t){return D.s(s%12||12,t,\"0\")},$=i.meridiem||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:o+1,MM:D.s(o+1,2,\"0\"),MMM:c(i.monthsShort,o,h,3),MMMM:h[o]||h(this,n),D:this.$D,DD:D.s(this.$D,2,\"0\"),d:String(this.$W),dd:c(i.weekdaysMin,this.$W,a,2),ddd:c(i.weekdaysShort,this.$W,a,3),dddd:a[this.$W],H:String(s),HH:D.s(s,2,\"0\"),h:d(1),hh:d(2),a:$(s,u,!0),A:$(s,u,!1),m:String(u),mm:D.s(u,2,\"0\"),s:String(this.$s),ss:D.s(this.$s,2,\"0\"),SSS:D.s(this.$ms,3,\"0\"),Z:r};return n.replace(f,function(t,e){return e||l[t]||r.replace(\":\",\"\")})},d.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},d.diff=function(t,h,f){var c,d=D.p(h),$=g(t),l=6e4*($.utcOffset()-this.utcOffset()),m=this-$,y=D.m(this,$);return y=(c={},c[a]=y/12,c[u]=y,c[o]=y/3,c[s]=(m-l)/6048e5,c[i]=(m-l)/864e5,c[r]=m/36e5,c[n]=m/6e4,c[e]=m/1e3,c)[d]||m,f?y:D.a(y)},d.daysInMonth=function(){return this.endOf(u).$D},d.$locale=function(){return m[this.$L]},d.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=M(t,e,!0);return r&&(n.$L=r),n},d.clone=function(){return D.w(this.$d,this)},d.toDate=function(){return new Date(this.valueOf())},d.toJSON=function(){return this.isValid()?this.toISOString():null},d.toISOString=function(){return this.$d.toISOString()},d.toString=function(){return this.$d.toUTCString()},c}();return g.prototype=v.prototype,g.extend=function(t,e){return t(e,v,g),g},g.locale=M,g.isDayjs=y,g.unix=function(t){return g(1e3*t)},g.en=m[l],g.Ls=m,g});\n","( function _package( factory ){\r\n\tif( typeof define === 'function' && define.amd ){\r\n\t\tdefine( [ 'mithril' ], factory )\r\n\t}\r\n\telse if( typeof exports === 'object' ){\r\n\t\tmodule.exports = factory( require( 'mithril' ) )\r\n\t}\r\n\telse{\r\n\t\tfactory( m )\r\n\t}\r\n}( function define( m ){\r\n\tfunction bidi( node, prop ){\r\n\t\tvar type = node.tag === 'select'\r\n\t\t\t? node.attrs.multi\r\n\t\t\t\t? 'multi'\r\n\t\t\t\t: 'select'\r\n\t\t\t: node.attrs.type\r\n\r\n\t\t// Setup: bind listeners\r\n\t\tif( type === 'multi' ){\r\n\t\t\tnode.attrs.onchange = function(){\r\n\t\t\t\tprop( [].slice.call( this.selectedOptions, function( x ){\r\n\t\t\t\t\treturn x.value\r\n\t\t\t\t} ) )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if( type === 'select' ){\r\n\t\t\tnode.attrs.onchange = function( e ){\r\n\t\t\t\tprop( this.selectedOptions[ 0 ].value )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if( type === 'checkbox' ){\r\n\t\t\tnode.attrs.onchange = function( e ){\r\n\t\t\t\tprop( this.checked )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.attrs.onchange = node.attrs.oninput = function( e ){\r\n\t\t\t\tprop( this.value )\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif( node.tag === 'select' ){\r\n\t\t\tnode.children.forEach( function( option ){\r\n\t\t\t\tif( option.attrs.value === prop() || option.children[ 0 ] === prop() ){\r\n\t\t\t\t\toption.attrs.selected = true\r\n\t\t\t\t}\r\n\t\t\t} )\r\n\t\t}\r\n\t\telse if( type === 'checkbox' ){\r\n\t\t\tnode.attrs.checked = prop()\r\n\t\t}\r\n\t\telse if( type === 'radio' ){\r\n\t\t\tnode.attrs.checked = prop() === node.attrs.value\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.attrs.value = prop()\r\n\t\t}\r\n\r\n\t\treturn node\r\n\t}\r\n\r\n\tbidi.view = function( ctrl, node, prop ){\r\n\t return bidi( node, node.attrs.bidi )\r\n\t}\r\n\r\n\tif( m.attrs ) m.attrs.bidi = bidi\r\n\t\r\n\tm.bidi = bidi\r\n\r\n\treturn bidi\r\n} ) )\r\n","\"use strict\"\n\nvar hyperscript = require(\"./hyperscript\")\nvar request = require(\"./request\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nvar m = function m() { return hyperscript.apply(this, arguments) }\nm.m = hyperscript\nm.trust = hyperscript.trust\nm.fragment = hyperscript.fragment\nm.mount = mountRedraw.mount\nm.route = require(\"./route\")\nm.render = require(\"./render\")\nm.redraw = mountRedraw.redraw\nm.request = request.request\nm.jsonp = request.jsonp\nm.parseQueryString = require(\"./querystring/parse\")\nm.buildQueryString = require(\"./querystring/build\")\nm.parsePathname = require(\"./pathname/parse\")\nm.buildPathname = require(\"./pathname/build\")\nm.vnode = require(\"./render/vnode\")\nm.PromisePolyfill = require(\"./promise/polyfill\")\n\nmodule.exports = m\n","/*global define:false */\n/**\n * Copyright 2012-2017 Craig Campbell\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Mousetrap is a simple keyboard shortcut library for Javascript with\n * no external dependencies\n *\n * @version 1.6.5\n * @url craig.is/killing/mice\n */\n(function(window, document, undefined) {\n\n // Check if mousetrap is used inside browser, if not, return\n if (!window) {\n return;\n }\n\n /**\n * mapping of special keycodes to their corresponding keys\n *\n * everything in this dictionary cannot use keypress events\n * so it has to be here to map to the correct keycodes for\n * keyup/keydown events\n *\n * @type {Object}\n */\n var _MAP = {\n 8: 'backspace',\n 9: 'tab',\n 13: 'enter',\n 16: 'shift',\n 17: 'ctrl',\n 18: 'alt',\n 20: 'capslock',\n 27: 'esc',\n 32: 'space',\n 33: 'pageup',\n 34: 'pagedown',\n 35: 'end',\n 36: 'home',\n 37: 'left',\n 38: 'up',\n 39: 'right',\n 40: 'down',\n 45: 'ins',\n 46: 'del',\n 91: 'meta',\n 93: 'meta',\n 224: 'meta'\n };\n\n /**\n * mapping for special characters so they can support\n *\n * this dictionary is only used incase you want to bind a\n * keyup or keydown event to one of these keys\n *\n * @type {Object}\n */\n var _KEYCODE_MAP = {\n 106: '*',\n 107: '+',\n 109: '-',\n 110: '.',\n 111 : '/',\n 186: ';',\n 187: '=',\n 188: ',',\n 189: '-',\n 190: '.',\n 191: '/',\n 192: '`',\n 219: '[',\n 220: '\\\\',\n 221: ']',\n 222: '\\''\n };\n\n /**\n * this is a mapping of keys that require shift on a US keypad\n * back to the non shift equivelents\n *\n * this is so you can use keyup events with these keys\n *\n * note that this will only work reliably on US keyboards\n *\n * @type {Object}\n */\n var _SHIFT_MAP = {\n '~': '`',\n '!': '1',\n '@': '2',\n '#': '3',\n '$': '4',\n '%': '5',\n '^': '6',\n '&': '7',\n '*': '8',\n '(': '9',\n ')': '0',\n '_': '-',\n '+': '=',\n ':': ';',\n '\\\"': '\\'',\n '<': ',',\n '>': '.',\n '?': '/',\n '|': '\\\\'\n };\n\n /**\n * this is a list of special strings you can use to map\n * to modifier keys when you specify your keyboard shortcuts\n *\n * @type {Object}\n */\n var _SPECIAL_ALIASES = {\n 'option': 'alt',\n 'command': 'meta',\n 'return': 'enter',\n 'escape': 'esc',\n 'plus': '+',\n 'mod': /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl'\n };\n\n /**\n * variable to store the flipped version of _MAP from above\n * needed to check if we should use keypress or not when no action\n * is specified\n *\n * @type {Object|undefined}\n */\n var _REVERSE_MAP;\n\n /**\n * loop through the f keys, f1 to f19 and add them to the map\n * programatically\n */\n for (var i = 1; i < 20; ++i) {\n _MAP[111 + i] = 'f' + i;\n }\n\n /**\n * loop through to map numbers on the numeric keypad\n */\n for (i = 0; i <= 9; ++i) {\n\n // This needs to use a string cause otherwise since 0 is falsey\n // mousetrap will never fire for numpad 0 pressed as part of a keydown\n // event.\n //\n // @see https://github.com/ccampbell/mousetrap/pull/258\n _MAP[i + 96] = i.toString();\n }\n\n /**\n * cross browser add event method\n *\n * @param {Element|HTMLDocument} object\n * @param {string} type\n * @param {Function} callback\n * @returns void\n */\n function _addEvent(object, type, callback) {\n if (object.addEventListener) {\n object.addEventListener(type, callback, false);\n return;\n }\n\n object.attachEvent('on' + type, callback);\n }\n\n /**\n * takes the event and returns the key character\n *\n * @param {Event} e\n * @return {string}\n */\n function _characterFromEvent(e) {\n\n // for keypress events we should return the character as is\n if (e.type == 'keypress') {\n var character = String.fromCharCode(e.which);\n\n // if the shift key is not pressed then it is safe to assume\n // that we want the character to be lowercase. this means if\n // you accidentally have caps lock on then your key bindings\n // will continue to work\n //\n // the only side effect that might not be desired is if you\n // bind something like 'A' cause you want to trigger an\n // event when capital A is pressed caps lock will no longer\n // trigger the event. shift+a will though.\n if (!e.shiftKey) {\n character = character.toLowerCase();\n }\n\n return character;\n }\n\n // for non keypress events the special maps are needed\n if (_MAP[e.which]) {\n return _MAP[e.which];\n }\n\n if (_KEYCODE_MAP[e.which]) {\n return _KEYCODE_MAP[e.which];\n }\n\n // if it is not in the special map\n\n // with keydown and keyup events the character seems to always\n // come in as an uppercase character whether you are pressing shift\n // or not. we should make sure it is always lowercase for comparisons\n return String.fromCharCode(e.which).toLowerCase();\n }\n\n /**\n * checks if two arrays are equal\n *\n * @param {Array} modifiers1\n * @param {Array} modifiers2\n * @returns {boolean}\n */\n function _modifiersMatch(modifiers1, modifiers2) {\n return modifiers1.sort().join(',') === modifiers2.sort().join(',');\n }\n\n /**\n * takes a key event and figures out what the modifiers are\n *\n * @param {Event} e\n * @returns {Array}\n */\n function _eventModifiers(e) {\n var modifiers = [];\n\n if (e.shiftKey) {\n modifiers.push('shift');\n }\n\n if (e.altKey) {\n modifiers.push('alt');\n }\n\n if (e.ctrlKey) {\n modifiers.push('ctrl');\n }\n\n if (e.metaKey) {\n modifiers.push('meta');\n }\n\n return modifiers;\n }\n\n /**\n * prevents default for this event\n *\n * @param {Event} e\n * @returns void\n */\n function _preventDefault(e) {\n if (e.preventDefault) {\n e.preventDefault();\n return;\n }\n\n e.returnValue = false;\n }\n\n /**\n * stops propogation for this event\n *\n * @param {Event} e\n * @returns void\n */\n function _stopPropagation(e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n return;\n }\n\n e.cancelBubble = true;\n }\n\n /**\n * determines if the keycode specified is a modifier key or not\n *\n * @param {string} key\n * @returns {boolean}\n */\n function _isModifier(key) {\n return key == 'shift' || key == 'ctrl' || key == 'alt' || key == 'meta';\n }\n\n /**\n * reverses the map lookup so that we can look for specific keys\n * to see what can and can't use keypress\n *\n * @return {Object}\n */\n function _getReverseMap() {\n if (!_REVERSE_MAP) {\n _REVERSE_MAP = {};\n for (var key in _MAP) {\n\n // pull out the numeric keypad from here cause keypress should\n // be able to detect the keys from the character\n if (key > 95 && key < 112) {\n continue;\n }\n\n if (_MAP.hasOwnProperty(key)) {\n _REVERSE_MAP[_MAP[key]] = key;\n }\n }\n }\n return _REVERSE_MAP;\n }\n\n /**\n * picks the best action based on the key combination\n *\n * @param {string} key - character for key\n * @param {Array} modifiers\n * @param {string=} action passed in\n */\n function _pickBestAction(key, modifiers, action) {\n\n // if no action was picked in we should try to pick the one\n // that we think would work best for this key\n if (!action) {\n action = _getReverseMap()[key] ? 'keydown' : 'keypress';\n }\n\n // modifier keys don't work as expected with keypress,\n // switch to keydown\n if (action == 'keypress' && modifiers.length) {\n action = 'keydown';\n }\n\n return action;\n }\n\n /**\n * Converts from a string key combination to an array\n *\n * @param {string} combination like \"command+shift+l\"\n * @return {Array}\n */\n function _keysFromString(combination) {\n if (combination === '+') {\n return ['+'];\n }\n\n combination = combination.replace(/\\+{2}/g, '+plus');\n return combination.split('+');\n }\n\n /**\n * Gets info for a specific key combination\n *\n * @param {string} combination key combination (\"command+s\" or \"a\" or \"*\")\n * @param {string=} action\n * @returns {Object}\n */\n function _getKeyInfo(combination, action) {\n var keys;\n var key;\n var i;\n var modifiers = [];\n\n // take the keys from this pattern and figure out what the actual\n // pattern is all about\n keys = _keysFromString(combination);\n\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n\n // normalize key names\n if (_SPECIAL_ALIASES[key]) {\n key = _SPECIAL_ALIASES[key];\n }\n\n // if this is not a keypress event then we should\n // be smart about using shift keys\n // this will only work for US keyboards however\n if (action && action != 'keypress' && _SHIFT_MAP[key]) {\n key = _SHIFT_MAP[key];\n modifiers.push('shift');\n }\n\n // if this key is a modifier then add it to the list of modifiers\n if (_isModifier(key)) {\n modifiers.push(key);\n }\n }\n\n // depending on what the key combination is\n // we will try to pick the best event for it\n action = _pickBestAction(key, modifiers, action);\n\n return {\n key: key,\n modifiers: modifiers,\n action: action\n };\n }\n\n function _belongsTo(element, ancestor) {\n if (element === null || element === document) {\n return false;\n }\n\n if (element === ancestor) {\n return true;\n }\n\n return _belongsTo(element.parentNode, ancestor);\n }\n\n function Mousetrap(targetElement) {\n var self = this;\n\n targetElement = targetElement || document;\n\n if (!(self instanceof Mousetrap)) {\n return new Mousetrap(targetElement);\n }\n\n /**\n * element to attach key events to\n *\n * @type {Element}\n */\n self.target = targetElement;\n\n /**\n * a list of all the callbacks setup via Mousetrap.bind()\n *\n * @type {Object}\n */\n self._callbacks = {};\n\n /**\n * direct map of string combinations to callbacks used for trigger()\n *\n * @type {Object}\n */\n self._directMap = {};\n\n /**\n * keeps track of what level each sequence is at since multiple\n * sequences can start out with the same sequence\n *\n * @type {Object}\n */\n var _sequenceLevels = {};\n\n /**\n * variable to store the setTimeout call\n *\n * @type {null|number}\n */\n var _resetTimer;\n\n /**\n * temporary state where we will ignore the next keyup\n *\n * @type {boolean|string}\n */\n var _ignoreNextKeyup = false;\n\n /**\n * temporary state where we will ignore the next keypress\n *\n * @type {boolean}\n */\n var _ignoreNextKeypress = false;\n\n /**\n * are we currently inside of a sequence?\n * type of action (\"keyup\" or \"keydown\" or \"keypress\") or false\n *\n * @type {boolean|string}\n */\n var _nextExpectedAction = false;\n\n /**\n * resets all sequence counters except for the ones passed in\n *\n * @param {Object} doNotReset\n * @returns void\n */\n function _resetSequences(doNotReset) {\n doNotReset = doNotReset || {};\n\n var activeSequences = false,\n key;\n\n for (key in _sequenceLevels) {\n if (doNotReset[key]) {\n activeSequences = true;\n continue;\n }\n _sequenceLevels[key] = 0;\n }\n\n if (!activeSequences) {\n _nextExpectedAction = false;\n }\n }\n\n /**\n * finds all callbacks that match based on the keycode, modifiers,\n * and action\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event|Object} e\n * @param {string=} sequenceName - name of the sequence we are looking for\n * @param {string=} combination\n * @param {number=} level\n * @returns {Array}\n */\n function _getMatches(character, modifiers, e, sequenceName, combination, level) {\n var i;\n var callback;\n var matches = [];\n var action = e.type;\n\n // if there are no events related to this keycode\n if (!self._callbacks[character]) {\n return [];\n }\n\n // if a modifier key is coming up on its own we should allow it\n if (action == 'keyup' && _isModifier(character)) {\n modifiers = [character];\n }\n\n // loop through all callbacks for the key that was pressed\n // and see if any of them match\n for (i = 0; i < self._callbacks[character].length; ++i) {\n callback = self._callbacks[character][i];\n\n // if a sequence name is not specified, but this is a sequence at\n // the wrong level then move onto the next match\n if (!sequenceName && callback.seq && _sequenceLevels[callback.seq] != callback.level) {\n continue;\n }\n\n // if the action we are looking for doesn't match the action we got\n // then we should keep going\n if (action != callback.action) {\n continue;\n }\n\n // if this is a keypress event and the meta key and control key\n // are not pressed that means that we need to only look at the\n // character, otherwise check the modifiers as well\n //\n // chrome will not fire a keypress if meta or control is down\n // safari will fire a keypress if meta or meta+shift is down\n // firefox will fire a keypress if meta or control is down\n if ((action == 'keypress' && !e.metaKey && !e.ctrlKey) || _modifiersMatch(modifiers, callback.modifiers)) {\n\n // when you bind a combination or sequence a second time it\n // should overwrite the first one. if a sequenceName or\n // combination is specified in this call it does just that\n //\n // @todo make deleting its own method?\n var deleteCombo = !sequenceName && callback.combo == combination;\n var deleteSequence = sequenceName && callback.seq == sequenceName && callback.level == level;\n if (deleteCombo || deleteSequence) {\n self._callbacks[character].splice(i, 1);\n }\n\n matches.push(callback);\n }\n }\n\n return matches;\n }\n\n /**\n * actually calls the callback function\n *\n * if your callback function returns false this will use the jquery\n * convention - prevent default and stop propogation on the event\n *\n * @param {Function} callback\n * @param {Event} e\n * @returns void\n */\n function _fireCallback(callback, e, combo, sequence) {\n\n // if this event should not happen stop here\n if (self.stopCallback(e, e.target || e.srcElement, combo, sequence)) {\n return;\n }\n\n if (callback(e, combo) === false) {\n _preventDefault(e);\n _stopPropagation(e);\n }\n }\n\n /**\n * handles a character key event\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event} e\n * @returns void\n */\n self._handleKey = function(character, modifiers, e) {\n var callbacks = _getMatches(character, modifiers, e);\n var i;\n var doNotReset = {};\n var maxLevel = 0;\n var processedSequenceCallback = false;\n\n // Calculate the maxLevel for sequences so we can only execute the longest callback sequence\n for (i = 0; i < callbacks.length; ++i) {\n if (callbacks[i].seq) {\n maxLevel = Math.max(maxLevel, callbacks[i].level);\n }\n }\n\n // loop through matching callbacks for this key event\n for (i = 0; i < callbacks.length; ++i) {\n\n // fire for all sequence callbacks\n // this is because if for example you have multiple sequences\n // bound such as \"g i\" and \"g t\" they both need to fire the\n // callback for matching g cause otherwise you can only ever\n // match the first one\n if (callbacks[i].seq) {\n\n // only fire callbacks for the maxLevel to prevent\n // subsequences from also firing\n //\n // for example 'a option b' should not cause 'option b' to fire\n // even though 'option b' is part of the other sequence\n //\n // any sequences that do not match here will be discarded\n // below by the _resetSequences call\n if (callbacks[i].level != maxLevel) {\n continue;\n }\n\n processedSequenceCallback = true;\n\n // keep a list of which sequences were matches for later\n doNotReset[callbacks[i].seq] = 1;\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo, callbacks[i].seq);\n continue;\n }\n\n // if there were no sequence matches but we are still here\n // that means this is a regular match so we should fire that\n if (!processedSequenceCallback) {\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo);\n }\n }\n\n // if the key you pressed matches the type of sequence without\n // being a modifier (ie \"keyup\" or \"keypress\") then we should\n // reset all sequences that were not matched by this event\n //\n // this is so, for example, if you have the sequence \"h a t\" and you\n // type \"h e a r t\" it does not match. in this case the \"e\" will\n // cause the sequence to reset\n //\n // modifier keys are ignored because you can have a sequence\n // that contains modifiers such as \"enter ctrl+space\" and in most\n // cases the modifier key will be pressed before the next key\n //\n // also if you have a sequence such as \"ctrl+b a\" then pressing the\n // \"b\" key will trigger a \"keypress\" and a \"keydown\"\n //\n // the \"keydown\" is expected when there is a modifier, but the\n // \"keypress\" ends up matching the _nextExpectedAction since it occurs\n // after and that causes the sequence to reset\n //\n // we ignore keypresses in a sequence that directly follow a keydown\n // for the same character\n var ignoreThisKeypress = e.type == 'keypress' && _ignoreNextKeypress;\n if (e.type == _nextExpectedAction && !_isModifier(character) && !ignoreThisKeypress) {\n _resetSequences(doNotReset);\n }\n\n _ignoreNextKeypress = processedSequenceCallback && e.type == 'keydown';\n };\n\n /**\n * handles a keydown event\n *\n * @param {Event} e\n * @returns void\n */\n function _handleKeyEvent(e) {\n\n // normalize e.which for key events\n // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion\n if (typeof e.which !== 'number') {\n e.which = e.keyCode;\n }\n\n var character = _characterFromEvent(e);\n\n // no character found then stop\n if (!character) {\n return;\n }\n\n // need to use === for the character check because the character can be 0\n if (e.type == 'keyup' && _ignoreNextKeyup === character) {\n _ignoreNextKeyup = false;\n return;\n }\n\n self.handleKey(character, _eventModifiers(e), e);\n }\n\n /**\n * called to set a 1 second timeout on the specified sequence\n *\n * this is so after each key press in the sequence you have 1 second\n * to press the next key before you have to start over\n *\n * @returns void\n */\n function _resetSequenceTimer() {\n clearTimeout(_resetTimer);\n _resetTimer = setTimeout(_resetSequences, 1000);\n }\n\n /**\n * binds a key sequence to an event\n *\n * @param {string} combo - combo specified in bind call\n * @param {Array} keys\n * @param {Function} callback\n * @param {string=} action\n * @returns void\n */\n function _bindSequence(combo, keys, callback, action) {\n\n // start off by adding a sequence level record for this combination\n // and setting the level to 0\n _sequenceLevels[combo] = 0;\n\n /**\n * callback to increase the sequence level for this sequence and reset\n * all other sequences that were active\n *\n * @param {string} nextAction\n * @returns {Function}\n */\n function _increaseSequence(nextAction) {\n return function() {\n _nextExpectedAction = nextAction;\n ++_sequenceLevels[combo];\n _resetSequenceTimer();\n };\n }\n\n /**\n * wraps the specified callback inside of another function in order\n * to reset all sequence counters as soon as this sequence is done\n *\n * @param {Event} e\n * @returns void\n */\n function _callbackAndReset(e) {\n _fireCallback(callback, e, combo);\n\n // we should ignore the next key up if the action is key down\n // or keypress. this is so if you finish a sequence and\n // release the key the final key will not trigger a keyup\n if (action !== 'keyup') {\n _ignoreNextKeyup = _characterFromEvent(e);\n }\n\n // weird race condition if a sequence ends with the key\n // another sequence begins with\n setTimeout(_resetSequences, 10);\n }\n\n // loop through keys one at a time and bind the appropriate callback\n // function. for any key leading up to the final one it should\n // increase the sequence. after the final, it should reset all sequences\n //\n // if an action is specified in the original bind call then that will\n // be used throughout. otherwise we will pass the action that the\n // next key in the sequence should match. this allows a sequence\n // to mix and match keypress and keydown events depending on which\n // ones are better suited to the key provided\n for (var i = 0; i < keys.length; ++i) {\n var isFinal = i + 1 === keys.length;\n var wrappedCallback = isFinal ? _callbackAndReset : _increaseSequence(action || _getKeyInfo(keys[i + 1]).action);\n _bindSingle(keys[i], wrappedCallback, action, combo, i);\n }\n }\n\n /**\n * binds a single keyboard combination\n *\n * @param {string} combination\n * @param {Function} callback\n * @param {string=} action\n * @param {string=} sequenceName - name of sequence if part of sequence\n * @param {number=} level - what part of the sequence the command is\n * @returns void\n */\n function _bindSingle(combination, callback, action, sequenceName, level) {\n\n // store a direct mapped reference for use with Mousetrap.trigger\n self._directMap[combination + ':' + action] = callback;\n\n // make sure multiple spaces in a row become a single space\n combination = combination.replace(/\\s+/g, ' ');\n\n var sequence = combination.split(' ');\n var info;\n\n // if this pattern is a sequence of keys then run through this method\n // to reprocess each pattern one key at a time\n if (sequence.length > 1) {\n _bindSequence(combination, sequence, callback, action);\n return;\n }\n\n info = _getKeyInfo(combination, action);\n\n // make sure to initialize array if this is the first time\n // a callback is added for this key\n self._callbacks[info.key] = self._callbacks[info.key] || [];\n\n // remove an existing match if there is one\n _getMatches(info.key, info.modifiers, {type: info.action}, sequenceName, combination, level);\n\n // add this call back to the array\n // if it is a sequence put it at the beginning\n // if not put it at the end\n //\n // this is important because the way these are processed expects\n // the sequence ones to come first\n self._callbacks[info.key][sequenceName ? 'unshift' : 'push']({\n callback: callback,\n modifiers: info.modifiers,\n action: info.action,\n seq: sequenceName,\n level: level,\n combo: combination\n });\n }\n\n /**\n * binds multiple combinations to the same callback\n *\n * @param {Array} combinations\n * @param {Function} callback\n * @param {string|undefined} action\n * @returns void\n */\n self._bindMultiple = function(combinations, callback, action) {\n for (var i = 0; i < combinations.length; ++i) {\n _bindSingle(combinations[i], callback, action);\n }\n };\n\n // start!\n _addEvent(targetElement, 'keypress', _handleKeyEvent);\n _addEvent(targetElement, 'keydown', _handleKeyEvent);\n _addEvent(targetElement, 'keyup', _handleKeyEvent);\n }\n\n /**\n * binds an event to mousetrap\n *\n * can be a single key, a combination of keys separated with +,\n * an array of keys, or a sequence of keys separated by spaces\n *\n * be sure to list the modifier keys first to make sure that the\n * correct key ends up getting bound (the last key in the pattern)\n *\n * @param {string|Array} keys\n * @param {Function} callback\n * @param {string=} action - 'keypress', 'keydown', or 'keyup'\n * @returns void\n */\n Mousetrap.prototype.bind = function(keys, callback, action) {\n var self = this;\n keys = keys instanceof Array ? keys : [keys];\n self._bindMultiple.call(self, keys, callback, action);\n return self;\n };\n\n /**\n * unbinds an event to mousetrap\n *\n * the unbinding sets the callback function of the specified key combo\n * to an empty function and deletes the corresponding key in the\n * _directMap dict.\n *\n * TODO: actually remove this from the _callbacks dictionary instead\n * of binding an empty function\n *\n * the keycombo+action has to be exactly the same as\n * it was defined in the bind method\n *\n * @param {string|Array} keys\n * @param {string} action\n * @returns void\n */\n Mousetrap.prototype.unbind = function(keys, action) {\n var self = this;\n return self.bind.call(self, keys, function() {}, action);\n };\n\n /**\n * triggers an event that has already been bound\n *\n * @param {string} keys\n * @param {string=} action\n * @returns void\n */\n Mousetrap.prototype.trigger = function(keys, action) {\n var self = this;\n if (self._directMap[keys + ':' + action]) {\n self._directMap[keys + ':' + action]({}, keys);\n }\n return self;\n };\n\n /**\n * resets the library back to its initial state. this is useful\n * if you want to clear out the current keyboard shortcuts and bind\n * new ones - for example if you switch to another page\n *\n * @returns void\n */\n Mousetrap.prototype.reset = function() {\n var self = this;\n self._callbacks = {};\n self._directMap = {};\n return self;\n };\n\n /**\n * should we stop this event before firing off callbacks\n *\n * @param {Event} e\n * @param {Element} element\n * @return {boolean}\n */\n Mousetrap.prototype.stopCallback = function(e, element) {\n var self = this;\n\n // if the element has the class \"mousetrap\" then no need to stop\n if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {\n return false;\n }\n\n if (_belongsTo(element, self.target)) {\n return false;\n }\n\n // Events originating from a shadow DOM are re-targetted and `e.target` is the shadow host,\n // not the initial event target in the shadow tree. Note that not all events cross the\n // shadow boundary.\n // For shadow trees with `mode: 'open'`, the initial event target is the first element in\n // the events composed path. For shadow trees with `mode: 'closed'`, the initial event\n // target cannot be obtained.\n if ('composedPath' in e && typeof e.composedPath === 'function') {\n // For open shadow trees, update `element` so that the following check works.\n var initialEventTarget = e.composedPath()[0];\n if (initialEventTarget !== e.target) {\n element = initialEventTarget;\n }\n }\n\n // stop for input, select, and textarea\n return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;\n };\n\n /**\n * exposes _handleKey publicly so it can be overwritten by extensions\n */\n Mousetrap.prototype.handleKey = function() {\n var self = this;\n return self._handleKey.apply(self, arguments);\n };\n\n /**\n * allow custom key mappings\n */\n Mousetrap.addKeycodes = function(object) {\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n _MAP[key] = object[key];\n }\n }\n _REVERSE_MAP = null;\n };\n\n /**\n * Init the global mousetrap functions\n *\n * This method is needed to allow the global mousetrap functions to work\n * now that mousetrap is a constructor function.\n */\n Mousetrap.init = function() {\n var documentMousetrap = Mousetrap(document);\n for (var method in documentMousetrap) {\n if (method.charAt(0) !== '_') {\n Mousetrap[method] = (function(method) {\n return function() {\n return documentMousetrap[method].apply(documentMousetrap, arguments);\n };\n } (method));\n }\n }\n };\n\n Mousetrap.init();\n\n // expose mousetrap to the global object\n window.Mousetrap = Mousetrap;\n\n // expose as a common js module\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Mousetrap;\n }\n\n // expose mousetrap as an AMD module\n if (typeof define === 'function' && define.amd) {\n define(function() {\n return Mousetrap;\n });\n }\n}) (typeof window !== 'undefined' ? window : null, typeof window !== 'undefined' ? document : null);\n","/* ========================================================================\n * Bootstrap: dropdown.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#dropdowns\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // DROPDOWN CLASS DEFINITION\n // =========================\n\n var backdrop = '.dropdown-backdrop'\n var toggle = '[data-toggle=\"dropdown\"]'\n var Dropdown = function (element) {\n $(element).on('click.bs.dropdown', this.toggle)\n }\n\n Dropdown.VERSION = '3.4.1'\n\n function getParent($this) {\n var selector = $this.attr('data-target')\n\n if (!selector) {\n selector = $this.attr('href')\n selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n }\n\n var $parent = selector !== '#' ? $(document).find(selector) : null\n\n return $parent && $parent.length ? $parent : $this.parent()\n }\n\n function clearMenus(e) {\n if (e && e.which === 3) return\n $(backdrop).remove()\n $(toggle).each(function () {\n var $this = $(this)\n var $parent = getParent($this)\n var relatedTarget = { relatedTarget: this }\n\n if (!$parent.hasClass('open')) return\n\n if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return\n\n $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))\n\n if (e.isDefaultPrevented()) return\n\n $this.attr('aria-expanded', 'false')\n $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))\n })\n }\n\n Dropdown.prototype.toggle = function (e) {\n var $this = $(this)\n\n if ($this.is('.disabled, :disabled')) return\n\n var $parent = getParent($this)\n var isActive = $parent.hasClass('open')\n\n clearMenus()\n\n if (!isActive) {\n if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {\n // if mobile we use a backdrop because click events don't delegate\n $(document.createElement('div'))\n .addClass('dropdown-backdrop')\n .insertAfter($(this))\n .on('click', clearMenus)\n }\n\n var relatedTarget = { relatedTarget: this }\n $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))\n\n if (e.isDefaultPrevented()) return\n\n $this\n .trigger('focus')\n .attr('aria-expanded', 'true')\n\n $parent\n .toggleClass('open')\n .trigger($.Event('shown.bs.dropdown', relatedTarget))\n }\n\n return false\n }\n\n Dropdown.prototype.keydown = function (e) {\n if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return\n\n var $this = $(this)\n\n e.preventDefault()\n e.stopPropagation()\n\n if ($this.is('.disabled, :disabled')) return\n\n var $parent = getParent($this)\n var isActive = $parent.hasClass('open')\n\n if (!isActive && e.which != 27 || isActive && e.which == 27) {\n if (e.which == 27) $parent.find(toggle).trigger('focus')\n return $this.trigger('click')\n }\n\n var desc = ' li:not(.disabled):visible a'\n var $items = $parent.find('.dropdown-menu' + desc)\n\n if (!$items.length) return\n\n var index = $items.index(e.target)\n\n if (e.which == 38 && index > 0) index-- // up\n if (e.which == 40 && index < $items.length - 1) index++ // down\n if (!~index) index = 0\n\n $items.eq(index).trigger('focus')\n }\n\n\n // DROPDOWN PLUGIN DEFINITION\n // ==========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.dropdown')\n\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }\n\n var old = $.fn.dropdown\n\n $.fn.dropdown = Plugin\n $.fn.dropdown.Constructor = Dropdown\n\n\n // DROPDOWN NO CONFLICT\n // ====================\n\n $.fn.dropdown.noConflict = function () {\n $.fn.dropdown = old\n return this\n }\n\n\n // APPLY TO STANDARD DROPDOWN ELEMENTS\n // ===================================\n\n $(document)\n .on('click.bs.dropdown.data-api', clearMenus)\n .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: transition.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)\n // ============================================================\n\n function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n WebkitTransition : 'webkitTransitionEnd',\n MozTransition : 'transitionend',\n OTransition : 'oTransitionEnd otransitionend',\n transition : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }\n\n // https://blog.alexmaccaw.com/css-transitions\n $.fn.emulateTransitionEnd = function (duration) {\n var called = false\n var $el = this\n $(this).one('bsTransitionEnd', function () { called = true })\n var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n setTimeout(callback, duration)\n return this\n }\n\n $(function () {\n $.support.transition = transitionEnd()\n\n if (!$.support.transition) return\n\n $.event.special.bsTransitionEnd = {\n bindType: $.support.transition.end,\n delegateType: $.support.transition.end,\n handle: function (e) {\n if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n }\n }\n })\n\n}(jQuery);\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):e.dayjs_plugin_localizedFormat=t()}(this,function(){\"use strict\";return function(e,t,o){var n=t.prototype,r=n.format,M={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};o.en.formats=M;n.format=function(e){void 0===e&&(e=\"YYYY-MM-DDTHH:mm:ssZ\");var t=this.$locale().formats,o=void 0===t?{}:t,n=e.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,t,n){var r=n&&n.toUpperCase();return t||o[n]||M[n]||o[r].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,o){return t||o.slice(1)})});return r.call(this,n)}}});\n","!function(r,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):r.dayjs_plugin_relativeTime=t()}(this,function(){\"use strict\";return function(r,t,e){r=r||{};var n=t.prototype,o={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};e.en.relativeTime=o;var d=function(t,n,d,i){for(var u,a,s,f=d.$locale().relativeTime||o,l=r.thresholds||[{l:\"s\",r:44,d:\"second\"},{l:\"m\",r:89},{l:\"mm\",r:44,d:\"minute\"},{l:\"h\",r:89},{l:\"hh\",r:21,d:\"hour\"},{l:\"d\",r:35},{l:\"dd\",r:25,d:\"day\"},{l:\"M\",r:45},{l:\"MM\",r:10,d:\"month\"},{l:\"y\",r:17},{l:\"yy\",d:\"year\"}],h=l.length,m=0;m<h;m+=1){var c=l[m];c.d&&(u=i?e(t).diff(d,c.d,!0):d.diff(t,c.d,!0));var y=(r.rounding||Math.round)(Math.abs(u));if(s=u>0,y<=c.r||!c.r){y<=1&&m>0&&(c=l[m-1]);var p=f[c.l];a=\"string\"==typeof p?p.replace(\"%d\",y):p(y,n,c.l,s);break}}return n?a:(s?f.future:f.past).replace(\"%s\",a)};n.to=function(r,t){return d(r,t,this,!0)},n.from=function(r,t){return d(r,t,this)};var i=function(r){return r.$u?e.utc():e()};n.toNow=function(r){return this.to(i(this),r)},n.fromNow=function(r){return this.from(i(this),r)}}});\n","module.exports = global[\"Mousetrap\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\mousetrap.js\");","module.exports = global[\"classNames\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\index.js\");","module.exports = global[\"dayjs\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\dayjs.min.js\");","module.exports = global[\"jQuery\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\imports-loader\\\\index.js?this=>window!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\zepto.js\");","module.exports = global[\"m\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\index.js\");","if(!global[\"m\"]) global[\"m\"] = {};\nmodule.exports = global[\"m\"][\"bidi\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\bidi.js\");","module.exports = global[\"moment\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\expose-loader\\\\index.js?dayjs!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\dayjs.min.js\");","/*!\n * HC-Sticky\n * =========\n * Version: 2.2.3\n * Author: Some Web Media\n * Author URL: http://somewebmedia.com\n * Plugin URL: https://github.com/somewebmedia/hc-sticky\n * Description: Cross-browser plugin that makes any element on your page visible while you scroll\n * License: MIT\n */\n!function(t,e){\"use strict\";if(\"object\"==typeof module&&\"object\"==typeof module.exports){if(!t.document)throw new Error(\"HC-Sticky requires a browser to run.\");module.exports=e(t)}else\"function\"==typeof define&&define.amd?define(\"hcSticky\",[],e(t)):e(t)}(\"undefined\"!=typeof window?window:this,function(U){\"use strict\";var Y={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:\"sticky\",stickTo:null,followScroll:!0,responsive:null,mobileFirst:!1,onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1,queries:null,queryFlow:\"down\"},$=function(t,e,o){console.log(\"%c! HC Sticky:%c \"+t+\"%c \"+o+\" is now deprecated and will be removed. Use%c \"+e+\"%c instead.\",\"color: red\",\"color: darkviolet\",\"color: black\",\"color: darkviolet\",\"color: black\")},Q=U.document,X=function(n,f){var o=this;if(\"string\"==typeof n&&(n=Q.querySelector(n)),!n)return!1;f.queries&&$(\"queries\",\"responsive\",\"option\"),f.queryFlow&&$(\"queryFlow\",\"mobileFirst\",\"option\");var p={},d=X.Helpers,s=n.parentNode;\"static\"===d.getStyle(s,\"position\")&&(s.style.position=\"relative\");var u=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d.isEmptyObject(t)&&!d.isEmptyObject(p)||(p=Object.assign({},Y,p,t))},t=function(){return p.disable},e=function(){var t,e=p.responsive||p.queries;if(e){var o=U.innerWidth;if(t=f,(p=Object.assign({},Y,t||{})).mobileFirst)for(var i in e)i<=o&&!d.isEmptyObject(e[i])&&u(e[i]);else{var n=[];for(var s in e){var r={};r[s]=e[s],n.push(r)}for(var l=n.length-1;0<=l;l--){var a=n[l],c=Object.keys(a)[0];o<=c&&!d.isEmptyObject(a[c])&&u(a[c])}}}},r={css:{},position:null,stick:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d.hasClass(n,p.stickyClass)||(!1===l.isAttached&&l.attach(),r.position=\"fixed\",n.style.position=\"fixed\",n.style.left=l.offsetLeft+\"px\",n.style.width=l.width,void 0===t.bottom?n.style.bottom=\"auto\":n.style.bottom=t.bottom+\"px\",void 0===t.top?n.style.top=\"auto\":n.style.top=t.top+\"px\",n.classList?n.classList.add(p.stickyClass):n.className+=\" \"+p.stickyClass,p.onStart&&p.onStart.call(n,Object.assign({},p)))},release:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(t.stop=t.stop||!1,!0===t.stop||\"fixed\"===r.position||null===r.position||!(void 0===t.top&&void 0===t.bottom||void 0!==t.top&&(parseInt(d.getStyle(n,\"top\"))||0)===t.top||void 0!==t.bottom&&(parseInt(d.getStyle(n,\"bottom\"))||0)===t.bottom)){!0===t.stop?!0===l.isAttached&&l.detach():!1===l.isAttached&&l.attach();var e=t.position||r.css.position;r.position=e,n.style.position=e,n.style.left=!0===t.stop?r.css.left:l.positionLeft+\"px\",n.style.width=\"absolute\"!==e?r.css.width:l.width,void 0===t.bottom?n.style.bottom=!0===t.stop?\"\":\"auto\":n.style.bottom=t.bottom+\"px\",void 0===t.top?n.style.top=!0===t.stop?\"\":\"auto\":n.style.top=t.top+\"px\",n.classList?n.classList.remove(p.stickyClass):n.className=n.className.replace(new RegExp(\"(^|\\\\b)\"+p.stickyClass.split(\" \").join(\"|\")+\"(\\\\b|$)\",\"gi\"),\" \"),p.onStop&&p.onStop.call(n,Object.assign({},p))}}},l={el:Q.createElement(\"div\"),offsetLeft:null,positionLeft:null,width:null,isAttached:!1,init:function(){for(var t in l.el.className=\"sticky-spacer\",r.css)l.el.style[t]=r.css[t];l.el.style[\"z-index\"]=\"-1\";var e=d.getStyle(n);l.offsetLeft=d.offset(n).left-(parseInt(e.marginLeft)||0),l.positionLeft=d.position(n).left,l.width=d.getStyle(n,\"width\")},attach:function(){s.insertBefore(l.el,n),l.isAttached=!0},detach:function(){l.el=s.removeChild(l.el),l.isAttached=!1}},a=void 0,c=void 0,g=void 0,m=void 0,h=void 0,v=void 0,y=void 0,b=void 0,S=void 0,w=void 0,k=void 0,E=void 0,x=void 0,L=void 0,T=void 0,j=void 0,O=void 0,C=void 0,i=function(){var t,e,o,i;r.css=(t=n,e=d.getCascadedStyle(t),o=d.getStyle(t),i={height:t.offsetHeight+\"px\",left:e.left,right:e.right,top:e.top,bottom:e.bottom,position:o.position,display:o.display,verticalAlign:o.verticalAlign,boxSizing:o.boxSizing,marginLeft:e.marginLeft,marginRight:e.marginRight,marginTop:e.marginTop,marginBottom:e.marginBottom,paddingLeft:e.paddingLeft,paddingRight:e.paddingRight},e.float&&(i.float=e.float||\"none\"),e.cssFloat&&(i.cssFloat=e.cssFloat||\"none\"),o.MozBoxSizing&&(i.MozBoxSizing=o.MozBoxSizing),i.width=\"auto\"!==e.width?e.width:\"border-box\"===i.boxSizing||\"border-box\"===i.MozBoxSizing?t.offsetWidth+\"px\":o.width,i),l.init(),a=!(!p.stickTo||!(\"document\"===p.stickTo||p.stickTo.nodeType&&9===p.stickTo.nodeType||\"object\"==typeof p.stickTo&&p.stickTo instanceof(\"undefined\"!=typeof HTMLDocument?HTMLDocument:Document))),c=p.stickTo?a?Q:\"string\"==typeof p.stickTo?Q.querySelector(p.stickTo):p.stickTo:s,T=(C=function(){var t=n.offsetHeight+(parseInt(r.css.marginTop)||0)+(parseInt(r.css.marginBottom)||0),e=(T||0)-t;return-1<=e&&e<=1?T:t})(),m=(O=function(){return a?Math.max(Q.documentElement.clientHeight,Q.body.scrollHeight,Q.documentElement.scrollHeight,Q.body.offsetHeight,Q.documentElement.offsetHeight):c.offsetHeight})(),h=a?0:d.offset(c).top,v=p.stickTo?a?0:d.offset(s).top:h,y=U.innerHeight,j=n.offsetTop-(parseInt(r.css.marginTop)||0),g=p.innerSticker?\"string\"==typeof p.innerSticker?Q.querySelector(p.innerSticker):p.innerSticker:null,b=isNaN(p.top)&&-1<p.top.indexOf(\"%\")?parseFloat(p.top)/100*y:p.top,S=isNaN(p.bottom)&&-1<p.bottom.indexOf(\"%\")?parseFloat(p.bottom)/100*y:p.bottom,w=g?g.offsetTop:p.innerTop?p.innerTop:0,k=isNaN(p.bottomEnd)&&-1<p.bottomEnd.indexOf(\"%\")?parseFloat(p.bottomEnd)/100*y:p.bottomEnd,E=h-b+w+j},z=U.pageYOffset||Q.documentElement.scrollTop,N=0,H=void 0,R=function(){T=C(),m=O(),x=h+m-b-k,L=y<T;var t=U.pageYOffset||Q.documentElement.scrollTop,e=d.offset(n).top,o=e-t,i=void 0;H=t<z?\"up\":\"down\",N=t-z,E<(z=t)?x+b+(L?S:0)-(p.followScroll&&L?0:b)<=t+T-w-(y-(E-w)<T-w&&p.followScroll&&0<(i=T-y-w)?i:0)?r.release({position:\"absolute\",bottom:v+s.offsetHeight-x-b}):L&&p.followScroll?\"down\"===H?o+T+S<=y+.9?r.stick({bottom:S}):\"fixed\"===r.position&&r.release({position:\"absolute\",top:e-b-E-N+w}):Math.ceil(o+w)<0&&\"fixed\"===r.position?r.release({position:\"absolute\",top:e-b-E+w-N}):t+b-w<=e&&r.stick({top:b-w}):r.stick({top:b-w}):r.release({stop:!0})},A=!1,B=!1,I=function(){A&&(d.event.unbind(U,\"scroll\",R),A=!1)},q=function(){null!==n.offsetParent&&\"none\"!==d.getStyle(n,\"display\")?(i(),m<=T?I():(R(),A||(d.event.bind(U,\"scroll\",R),A=!0))):I()},F=function(){n.style.position=\"\",n.style.left=\"\",n.style.top=\"\",n.style.bottom=\"\",n.style.width=\"\",n.classList?n.classList.remove(p.stickyClass):n.className=n.className.replace(new RegExp(\"(^|\\\\b)\"+p.stickyClass.split(\" \").join(\"|\")+\"(\\\\b|$)\",\"gi\"),\" \"),r.css={},!(r.position=null)===l.isAttached&&l.detach()},M=function(){F(),e(),t()?I():q()},D=function(){p.onBeforeResize&&p.onBeforeResize.call(n,Object.assign({},p)),M(),p.onResize&&p.onResize.call(n,Object.assign({},p))},P=p.resizeDebounce?d.debounce(D,p.resizeDebounce):D,W=function(){B&&(d.event.unbind(U,\"resize\",P),B=!1),I()},V=function(){B||(d.event.bind(U,\"resize\",P),B=!0),e(),t()?I():q()};this.options=function(t){return t?p[t]:Object.assign({},p)},this.refresh=M,this.update=function(t){u(t),f=Object.assign({},f,t||{}),M()},this.attach=V,this.detach=W,this.destroy=function(){W(),F()},this.triggerMethod=function(t,e){\"function\"==typeof o[t]&&o[t](e)},this.reinit=function(){$(\"reinit\",\"refresh\",\"method\"),M()},u(f),V(),d.event.bind(U,\"load\",M)};if(void 0!==U.jQuery){var i=U.jQuery,n=\"hcSticky\";i.fn.extend({hcSticky:function(e,o){return this.length?\"options\"===e?i.data(this.get(0),n).options():this.each(function(){var t=i.data(this,n);t?t.triggerMethod(e,o):(t=new X(this,e),i.data(this,n,t))}):this}})}return U.hcSticky=U.hcSticky||X,X}),function(c){\"use strict\";var t=c.hcSticky,f=c.document;\"function\"!=typeof Object.assign&&Object.defineProperty(Object,\"assign\",{value:function(t,e){if(null==t)throw new TypeError(\"Cannot convert undefined or null to object\");for(var o=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[s]=n[s])}return o},writable:!0,configurable:!0}),Array.prototype.forEach||(Array.prototype.forEach=function(t){var e,o;if(null==this)throw new TypeError(\"this is null or not defined\");var i=Object(this),n=i.length>>>0;if(\"function\"!=typeof t)throw new TypeError(t+\" is not a function\");for(1<arguments.length&&(e=arguments[1]),o=0;o<n;){var s;o in i&&(s=i[o],t.call(e,s,o,i)),o++}});var e=function(){var t=f.documentElement,e=function(){};function i(t){var e=c.event;return e.target=e.target||e.srcElement||t,e}t.addEventListener?e=function(t,e,o){t.addEventListener(e,o,!1)}:t.attachEvent&&(e=function(e,t,o){e[t+o]=o.handleEvent?function(){var t=i(e);o.handleEvent.call(o,t)}:function(){var t=i(e);o.call(e,t)},e.attachEvent(\"on\"+t,e[t+o])});var o=function(){};return t.removeEventListener?o=function(t,e,o){t.removeEventListener(e,o,!1)}:t.detachEvent&&(o=function(e,o,i){e.detachEvent(\"on\"+o,e[o+i]);try{delete e[o+i]}catch(t){e[o+i]=void 0}}),{bind:e,unbind:o}}(),r=function(t,e){return c.getComputedStyle?e?f.defaultView.getComputedStyle(t,null).getPropertyValue(e):f.defaultView.getComputedStyle(t,null):t.currentStyle?e?t.currentStyle[e.replace(/-\\w/g,function(t){return t.toUpperCase().replace(\"-\",\"\")})]:t.currentStyle:void 0},l=function(t){var e=t.getBoundingClientRect(),o=c.pageYOffset||f.documentElement.scrollTop,i=c.pageXOffset||f.documentElement.scrollLeft;return{top:e.top+o,left:e.left+i}};t.Helpers={isEmptyObject:function(t){for(var e in t)return!1;return!0},debounce:function(i,n,s){var r=void 0;return function(){var t=this,e=arguments,o=s&&!r;clearTimeout(r),r=setTimeout(function(){r=null,s||i.apply(t,e)},n),o&&i.apply(t,e)}},hasClass:function(t,e){return t.classList?t.classList.contains(e):new RegExp(\"(^| )\"+e+\"( |$)\",\"gi\").test(t.className)},offset:l,position:function(t){var e=t.offsetParent,o=l(e),i=l(t),n=r(e),s=r(t);return o.top+=parseInt(n.borderTopWidth)||0,o.left+=parseInt(n.borderLeftWidth)||0,{top:i.top-o.top-(parseInt(s.marginTop)||0),left:i.left-o.left-(parseInt(s.marginLeft)||0)}},getStyle:r,getCascadedStyle:function(t){var e=t.cloneNode(!0);e.style.display=\"none\",Array.prototype.slice.call(e.querySelectorAll('input[type=\"radio\"]')).forEach(function(t){t.removeAttribute(\"name\")}),t.parentNode.insertBefore(e,t.nextSibling);var o=void 0;e.currentStyle?o=e.currentStyle:c.getComputedStyle&&(o=f.defaultView.getComputedStyle(e,null));var i={};for(var n in o)!isNaN(n)||\"string\"!=typeof o[n]&&\"number\"!=typeof o[n]||(i[n]=o[n]);if(Object.keys(i).length<3)for(var s in i={},o)isNaN(s)||(i[o[s].replace(/-\\w/g,function(t){return t.toUpperCase().replace(\"-\",\"\")})]=o.getPropertyValue(o[s]));if(i.margin||\"auto\"!==i.marginLeft?i.margin||i.marginLeft!==i.marginRight||i.marginLeft!==i.marginTop||i.marginLeft!==i.marginBottom||(i.margin=i.marginLeft):i.margin=\"auto\",!i.margin&&\"0px\"===i.marginLeft&&\"0px\"===i.marginRight){var r=t.offsetLeft-t.parentNode.offsetLeft,l=r-(parseInt(i.left)||0)-(parseInt(i.right)||0),a=t.parentNode.offsetWidth-t.offsetWidth-r-(parseInt(i.right)||0)+(parseInt(i.left)||0)-l;0!==a&&1!==a||(i.margin=\"auto\")}return e.parentNode.removeChild(e),e=null,i},event:e}}(window);","// Robert Penner's easeInOutQuad\n\n// find the rest of his easing functions here: http://robertpenner.com/easing/\n// find them exported for ES6 consumption here: https://github.com/jaxgeller/ez.js\n\nvar easeInOutQuad = function easeInOutQuad(t, b, c, d) {\n t /= d / 2;\n if (t < 1) return c / 2 * t * t + b;\n t--;\n return -c / 2 * (t * (t - 2) - 1) + b;\n};\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar jumper = function jumper() {\n // private variable cache\n // no variables are created during a jump, preventing memory leaks\n\n var element = void 0; // element to scroll to (node)\n\n var start = void 0; // where scroll starts (px)\n var stop = void 0; // where scroll stops (px)\n\n var offset = void 0; // adjustment from the stop position (px)\n var easing = void 0; // easing function (function)\n var a11y = void 0; // accessibility support flag (boolean)\n\n var distance = void 0; // distance of scroll (px)\n var duration = void 0; // scroll duration (ms)\n\n var timeStart = void 0; // time scroll started (ms)\n var timeElapsed = void 0; // time spent scrolling thus far (ms)\n\n var next = void 0; // next scroll position (px)\n\n var callback = void 0; // to call when done scrolling (function)\n\n // scroll position helper\n\n function location() {\n return window.scrollY || window.pageYOffset;\n }\n\n // element offset helper\n\n function top(element) {\n return element.getBoundingClientRect().top + start;\n }\n\n // rAF loop helper\n\n function loop(timeCurrent) {\n // store time scroll started, if not started already\n if (!timeStart) {\n timeStart = timeCurrent;\n }\n\n // determine time spent scrolling so far\n timeElapsed = timeCurrent - timeStart;\n\n // calculate next scroll position\n next = easing(timeElapsed, start, distance, duration);\n\n // scroll to it\n window.scrollTo(0, next);\n\n // check progress\n timeElapsed < duration ? window.requestAnimationFrame(loop) // continue scroll loop\n : done(); // scrolling is done\n }\n\n // scroll finished helper\n\n function done() {\n // account for rAF time rounding inaccuracies\n window.scrollTo(0, start + distance);\n\n // if scrolling to an element, and accessibility is enabled\n if (element && a11y) {\n // add tabindex indicating programmatic focus\n element.setAttribute('tabindex', '-1');\n\n // focus the element\n element.focus();\n }\n\n // if it exists, fire the callback\n if (typeof callback === 'function') {\n callback();\n }\n\n // reset time for next jump\n timeStart = false;\n }\n\n // API\n\n function jump(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // resolve options, or use defaults\n duration = options.duration || 1000;\n offset = options.offset || 0;\n callback = options.callback; // \"undefined\" is a suitable default, and won't be called\n easing = options.easing || easeInOutQuad;\n a11y = options.a11y || false;\n\n // cache starting position\n start = location();\n\n // resolve target\n switch (typeof target === 'undefined' ? 'undefined' : _typeof(target)) {\n // scroll from current position\n case 'number':\n element = undefined; // no element to scroll to\n a11y = false; // make sure accessibility is off\n stop = start + target;\n break;\n\n // scroll to element (node)\n // bounding rect is relative to the viewport\n case 'object':\n element = target;\n stop = top(element);\n break;\n\n // scroll to element (selector)\n // bounding rect is relative to the viewport\n case 'string':\n element = document.querySelector(target);\n stop = top(element);\n break;\n }\n\n // resolve scroll distance, accounting for offset\n distance = stop - start + offset;\n\n // resolve duration\n switch (_typeof(options.duration)) {\n // number in ms\n case 'number':\n duration = options.duration;\n break;\n\n // function passed the distance of the scroll\n case 'function':\n duration = options.duration(distance);\n break;\n }\n\n // start the loop\n window.requestAnimationFrame(loop);\n }\n\n // expose only the jump method\n return jump;\n};\n\n// export singleton\n\nvar singleton = jumper();\n\nexport default singleton;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\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","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\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","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\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","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","var baseFlatten = require('./_baseFlatten');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\nfunction flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n}\n\nmodule.exports = flattenDeep;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\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/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\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 `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\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 array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\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","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _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\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar MicroModal = function () {\n\n var FOCUSABLE_ELEMENTS = ['a[href]', 'area[href]', 'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])', 'select:not([disabled]):not([aria-hidden])', 'textarea:not([disabled]):not([aria-hidden])', 'button:not([disabled]):not([aria-hidden])', 'iframe', 'object', 'embed', '[contenteditable]', '[tabindex]:not([tabindex^=\"-\"])'];\n\n var Modal = /*#__PURE__*/function () {\n function Modal(_ref) {\n var targetModal = _ref.targetModal,\n _ref$triggers = _ref.triggers,\n triggers = _ref$triggers === void 0 ? [] : _ref$triggers,\n _ref$onShow = _ref.onShow,\n onShow = _ref$onShow === void 0 ? function () {} : _ref$onShow,\n _ref$onClose = _ref.onClose,\n onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,\n _ref$openTrigger = _ref.openTrigger,\n openTrigger = _ref$openTrigger === void 0 ? 'data-micromodal-trigger' : _ref$openTrigger,\n _ref$closeTrigger = _ref.closeTrigger,\n closeTrigger = _ref$closeTrigger === void 0 ? 'data-micromodal-close' : _ref$closeTrigger,\n _ref$openClass = _ref.openClass,\n openClass = _ref$openClass === void 0 ? 'is-open' : _ref$openClass,\n _ref$disableScroll = _ref.disableScroll,\n disableScroll = _ref$disableScroll === void 0 ? false : _ref$disableScroll,\n _ref$disableFocus = _ref.disableFocus,\n disableFocus = _ref$disableFocus === void 0 ? false : _ref$disableFocus,\n _ref$awaitCloseAnimat = _ref.awaitCloseAnimation,\n awaitCloseAnimation = _ref$awaitCloseAnimat === void 0 ? false : _ref$awaitCloseAnimat,\n _ref$awaitOpenAnimati = _ref.awaitOpenAnimation,\n awaitOpenAnimation = _ref$awaitOpenAnimati === void 0 ? false : _ref$awaitOpenAnimati,\n _ref$debugMode = _ref.debugMode,\n debugMode = _ref$debugMode === void 0 ? false : _ref$debugMode;\n\n _classCallCheck(this, Modal);\n\n // Save a reference of the modal\n this.modal = document.getElementById(targetModal); // Save a reference to the passed config\n\n this.config = {\n debugMode: debugMode,\n disableScroll: disableScroll,\n openTrigger: openTrigger,\n closeTrigger: closeTrigger,\n openClass: openClass,\n onShow: onShow,\n onClose: onClose,\n awaitCloseAnimation: awaitCloseAnimation,\n awaitOpenAnimation: awaitOpenAnimation,\n disableFocus: disableFocus\n }; // Register click events only if pre binding eventListeners\n\n if (triggers.length > 0) this.registerTriggers.apply(this, _toConsumableArray(triggers)); // pre bind functions for event listeners\n\n this.onClick = this.onClick.bind(this);\n this.onKeydown = this.onKeydown.bind(this);\n }\n /**\n * Loops through all openTriggers and binds click event\n * @param {array} triggers [Array of node elements]\n * @return {void}\n */\n\n\n _createClass(Modal, [{\n key: \"registerTriggers\",\n value: function registerTriggers() {\n var _this = this;\n\n for (var _len = arguments.length, triggers = new Array(_len), _key = 0; _key < _len; _key++) {\n triggers[_key] = arguments[_key];\n }\n\n triggers.filter(Boolean).forEach(function (trigger) {\n trigger.addEventListener('click', function (event) {\n return _this.showModal(event);\n });\n });\n }\n }, {\n key: \"showModal\",\n value: function showModal() {\n var _this2 = this;\n\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n this.activeElement = document.activeElement;\n this.modal.setAttribute('aria-hidden', 'false');\n this.modal.classList.add(this.config.openClass);\n this.scrollBehaviour('disable');\n this.addEventListeners();\n\n if (this.config.awaitOpenAnimation) {\n var handler = function handler() {\n _this2.modal.removeEventListener('animationend', handler, false);\n\n _this2.setFocusToFirstNode();\n };\n\n this.modal.addEventListener('animationend', handler, false);\n } else {\n this.setFocusToFirstNode();\n }\n\n this.config.onShow(this.modal, this.activeElement, event);\n }\n }, {\n key: \"closeModal\",\n value: function closeModal() {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var modal = this.modal;\n this.modal.setAttribute('aria-hidden', 'true');\n this.removeEventListeners();\n this.scrollBehaviour('enable');\n\n if (this.activeElement && this.activeElement.focus) {\n this.activeElement.focus();\n }\n\n this.config.onClose(this.modal, this.activeElement, event);\n\n if (this.config.awaitCloseAnimation) {\n var openClass = this.config.openClass; // <- old school ftw\n\n this.modal.addEventListener('animationend', function handler() {\n modal.classList.remove(openClass);\n modal.removeEventListener('animationend', handler, false);\n }, false);\n } else {\n modal.classList.remove(this.config.openClass);\n }\n }\n }, {\n key: \"closeModalById\",\n value: function closeModalById(targetModal) {\n this.modal = document.getElementById(targetModal);\n if (this.modal) this.closeModal();\n }\n }, {\n key: \"scrollBehaviour\",\n value: function scrollBehaviour(toggle) {\n if (!this.config.disableScroll) return;\n var body = document.querySelector('body');\n\n switch (toggle) {\n case 'enable':\n Object.assign(body.style, {\n overflow: ''\n });\n break;\n\n case 'disable':\n Object.assign(body.style, {\n overflow: 'hidden'\n });\n break;\n }\n }\n }, {\n key: \"addEventListeners\",\n value: function addEventListeners() {\n this.modal.addEventListener('touchstart', this.onClick);\n this.modal.addEventListener('click', this.onClick);\n document.addEventListener('keydown', this.onKeydown);\n }\n }, {\n key: \"removeEventListeners\",\n value: function removeEventListeners() {\n this.modal.removeEventListener('touchstart', this.onClick);\n this.modal.removeEventListener('click', this.onClick);\n document.removeEventListener('keydown', this.onKeydown);\n }\n }, {\n key: \"onClick\",\n value: function onClick(event) {\n if (event.target.hasAttribute(this.config.closeTrigger)) {\n this.closeModal(event);\n }\n }\n }, {\n key: \"onKeydown\",\n value: function onKeydown(event) {\n if (event.keyCode === 27) this.closeModal(event); // esc\n\n if (event.keyCode === 9) this.retainFocus(event); // tab\n }\n }, {\n key: \"getFocusableNodes\",\n value: function getFocusableNodes() {\n var nodes = this.modal.querySelectorAll(FOCUSABLE_ELEMENTS);\n return Array.apply(void 0, _toConsumableArray(nodes));\n }\n /**\n * Tries to set focus on a node which is not a close trigger\n * if no other nodes exist then focuses on first close trigger\n */\n\n }, {\n key: \"setFocusToFirstNode\",\n value: function setFocusToFirstNode() {\n var _this3 = this;\n\n if (this.config.disableFocus) return;\n var focusableNodes = this.getFocusableNodes(); // no focusable nodes\n\n if (focusableNodes.length === 0) return; // remove nodes on whose click, the modal closes\n // could not think of a better name :(\n\n var nodesWhichAreNotCloseTargets = focusableNodes.filter(function (node) {\n return !node.hasAttribute(_this3.config.closeTrigger);\n });\n if (nodesWhichAreNotCloseTargets.length > 0) nodesWhichAreNotCloseTargets[0].focus();\n if (nodesWhichAreNotCloseTargets.length === 0) focusableNodes[0].focus();\n }\n }, {\n key: \"retainFocus\",\n value: function retainFocus(event) {\n var focusableNodes = this.getFocusableNodes(); // no focusable nodes\n\n if (focusableNodes.length === 0) return;\n /**\n * Filters nodes which are hidden to prevent\n * focus leak outside modal\n */\n\n focusableNodes = focusableNodes.filter(function (node) {\n return node.offsetParent !== null;\n }); // if disableFocus is true\n\n if (!this.modal.contains(document.activeElement)) {\n focusableNodes[0].focus();\n } else {\n var focusedItemIndex = focusableNodes.indexOf(document.activeElement);\n\n if (event.shiftKey && focusedItemIndex === 0) {\n focusableNodes[focusableNodes.length - 1].focus();\n event.preventDefault();\n }\n\n if (!event.shiftKey && focusableNodes.length > 0 && focusedItemIndex === focusableNodes.length - 1) {\n focusableNodes[0].focus();\n event.preventDefault();\n }\n }\n }\n }]);\n\n return Modal;\n }();\n /**\n * Modal prototype ends.\n * Here on code is responsible for detecting and\n * auto binding event handlers on modal triggers\n */\n // Keep a reference to the opened modal\n\n\n var activeModal = null;\n /**\n * Generates an associative array of modals and it's\n * respective triggers\n * @param {array} triggers An array of all triggers\n * @param {string} triggerAttr The data-attribute which triggers the module\n * @return {array}\n */\n\n var generateTriggerMap = function generateTriggerMap(triggers, triggerAttr) {\n var triggerMap = [];\n triggers.forEach(function (trigger) {\n var targetModal = trigger.attributes[triggerAttr].value;\n if (triggerMap[targetModal] === undefined) triggerMap[targetModal] = [];\n triggerMap[targetModal].push(trigger);\n });\n return triggerMap;\n };\n /**\n * Validates whether a modal of the given id exists\n * in the DOM\n * @param {number} id The id of the modal\n * @return {boolean}\n */\n\n\n var validateModalPresence = function validateModalPresence(id) {\n if (!document.getElementById(id)) {\n console.warn(\"MicroModal: \\u2757Seems like you have missed %c'\".concat(id, \"'\"), 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', 'ID somewhere in your code. Refer example below to resolve it.');\n console.warn(\"%cExample:\", 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', \"<div class=\\\"modal\\\" id=\\\"\".concat(id, \"\\\"></div>\"));\n return false;\n }\n };\n /**\n * Validates if there are modal triggers present\n * in the DOM\n * @param {array} triggers An array of data-triggers\n * @return {boolean}\n */\n\n\n var validateTriggerPresence = function validateTriggerPresence(triggers) {\n if (triggers.length <= 0) {\n console.warn(\"MicroModal: \\u2757Please specify at least one %c'micromodal-trigger'\", 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', 'data attribute.');\n console.warn(\"%cExample:\", 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', \"<a href=\\\"#\\\" data-micromodal-trigger=\\\"my-modal\\\"></a>\");\n return false;\n }\n };\n /**\n * Checks if triggers and their corresponding modals\n * are present in the DOM\n * @param {array} triggers Array of DOM nodes which have data-triggers\n * @param {array} triggerMap Associative array of modals and their triggers\n * @return {boolean}\n */\n\n\n var validateArgs = function validateArgs(triggers, triggerMap) {\n validateTriggerPresence(triggers);\n if (!triggerMap) return true;\n\n for (var id in triggerMap) {\n validateModalPresence(id);\n }\n\n return true;\n };\n /**\n * Binds click handlers to all modal triggers\n * @param {object} config [description]\n * @return void\n */\n\n\n var init = function init(config) {\n // Create an config object with default openTrigger\n var options = Object.assign({}, {\n openTrigger: 'data-micromodal-trigger'\n }, config); // Collects all the nodes with the trigger\n\n var triggers = _toConsumableArray(document.querySelectorAll(\"[\".concat(options.openTrigger, \"]\"))); // Makes a mappings of modals with their trigger nodes\n\n\n var triggerMap = generateTriggerMap(triggers, options.openTrigger); // Checks if modals and triggers exist in dom\n\n if (options.debugMode === true && validateArgs(triggers, triggerMap) === false) return; // For every target modal creates a new instance\n\n for (var key in triggerMap) {\n var value = triggerMap[key];\n options.targetModal = key;\n options.triggers = _toConsumableArray(value);\n activeModal = new Modal(options); // eslint-disable-line no-new\n }\n };\n /**\n * Shows a particular modal\n * @param {string} targetModal [The id of the modal to display]\n * @param {object} config [The configuration object to pass]\n * @return {void}\n */\n\n\n var show = function show(targetModal, config) {\n var options = config || {};\n options.targetModal = targetModal; // Checks if modals and triggers exist in dom\n\n if (options.debugMode === true && validateModalPresence(targetModal) === false) return; // clear events in case previous modal wasn't close\n\n if (activeModal) activeModal.removeEventListeners(); // stores reference to active modal\n\n activeModal = new Modal(options); // eslint-disable-line no-new\n\n activeModal.showModal();\n };\n /**\n * Closes the active modal\n * @param {string} targetModal [The id of the modal to close]\n * @return {void}\n */\n\n\n var close = function close(targetModal) {\n targetModal ? activeModal.closeModalById(targetModal) : activeModal.closeModal();\n };\n\n return {\n init: init,\n show: show,\n close: close\n };\n}();\nwindow.MicroModal = MicroModal;\n\nexport default MicroModal;\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(render, schedule, console) {\n\tvar subscriptions = []\n\tvar rendering = false\n\tvar pending = false\n\n\tfunction sync() {\n\t\tif (rendering) throw new Error(\"Nested m.redraw.sync() call\")\n\t\trendering = true\n\t\tfor (var i = 0; i < subscriptions.length; i += 2) {\n\t\t\ttry { render(subscriptions[i], Vnode(subscriptions[i + 1]), redraw) }\n\t\t\tcatch (e) { console.error(e) }\n\t\t}\n\t\trendering = false\n\t}\n\n\tfunction redraw() {\n\t\tif (!pending) {\n\t\t\tpending = true\n\t\t\tschedule(function() {\n\t\t\t\tpending = false\n\t\t\t\tsync()\n\t\t\t})\n\t\t}\n\t}\n\n\tredraw.sync = sync\n\n\tfunction mount(root, component) {\n\t\tif (component != null && component.view == null && typeof component !== \"function\") {\n\t\t\tthrow new TypeError(\"m.mount(element, component) expects a component, not a vnode\")\n\t\t}\n\n\t\tvar index = subscriptions.indexOf(root)\n\t\tif (index >= 0) {\n\t\t\tsubscriptions.splice(index, 2)\n\t\t\trender(root, [], redraw)\n\t\t}\n\n\t\tif (component != null) {\n\t\t\tsubscriptions.push(root, component)\n\t\t\trender(root, Vnode(component), redraw)\n\t\t}\n\t}\n\n\treturn {mount: mount, redraw: redraw}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar m = require(\"../render/hyperscript\")\nvar Promise = require(\"../promise/promise\")\n\nvar buildPathname = require(\"../pathname/build\")\nvar parsePathname = require(\"../pathname/parse\")\nvar compileTemplate = require(\"../pathname/compileTemplate\")\nvar assign = require(\"../pathname/assign\")\n\nvar sentinel = {}\n\nmodule.exports = function($window, mountRedraw) {\n\tvar fireAsync\n\n\tfunction setPath(path, data, options) {\n\t\tpath = buildPathname(path, data)\n\t\tif (fireAsync != null) {\n\t\t\tfireAsync()\n\t\t\tvar state = options ? options.state : null\n\t\t\tvar title = options ? options.title : null\n\t\t\tif (options && options.replace) $window.history.replaceState(state, title, route.prefix + path)\n\t\t\telse $window.history.pushState(state, title, route.prefix + path)\n\t\t}\n\t\telse {\n\t\t\t$window.location.href = route.prefix + path\n\t\t}\n\t}\n\n\tvar currentResolver = sentinel, component, attrs, currentPath, lastUpdate\n\n\tvar SKIP = route.SKIP = {}\n\n\tfunction route(root, defaultRoute, routes) {\n\t\tif (root == null) throw new Error(\"Ensure the DOM element that was passed to `m.route` is not undefined\")\n\t\t// 0 = start\n\t\t// 1 = init\n\t\t// 2 = ready\n\t\tvar state = 0\n\n\t\tvar compiled = Object.keys(routes).map(function(route) {\n\t\t\tif (route[0] !== \"/\") throw new SyntaxError(\"Routes must start with a `/`\")\n\t\t\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(route)) {\n\t\t\t\tthrow new SyntaxError(\"Route parameter names must be separated with either `/`, `.`, or `-`\")\n\t\t\t}\n\t\t\treturn {\n\t\t\t\troute: route,\n\t\t\t\tcomponent: routes[route],\n\t\t\t\tcheck: compileTemplate(route),\n\t\t\t}\n\t\t})\n\t\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\t\tvar p = Promise.resolve()\n\t\tvar scheduled = false\n\t\tvar onremove\n\n\t\tfireAsync = null\n\n\t\tif (defaultRoute != null) {\n\t\t\tvar defaultData = parsePathname(defaultRoute)\n\n\t\t\tif (!compiled.some(function (i) { return i.check(defaultData) })) {\n\t\t\t\tthrow new ReferenceError(\"Default route doesn't match any known routes\")\n\t\t\t}\n\t\t}\n\n\t\tfunction resolveRoute() {\n\t\t\tscheduled = false\n\t\t\t// Consider the pathname holistically. The prefix might even be invalid,\n\t\t\t// but that's not our problem.\n\t\t\tvar prefix = $window.location.hash\n\t\t\tif (route.prefix[0] !== \"#\") {\n\t\t\t\tprefix = $window.location.search + prefix\n\t\t\t\tif (route.prefix[0] !== \"?\") {\n\t\t\t\t\tprefix = $window.location.pathname + prefix\n\t\t\t\t\tif (prefix[0] !== \"/\") prefix = \"/\" + prefix\n\t\t\t\t}\n\t\t\t}\n\t\t\t// This seemingly useless `.concat()` speeds up the tests quite a bit,\n\t\t\t// since the representation is consistently a relatively poorly\n\t\t\t// optimized cons string.\n\t\t\tvar path = prefix.concat()\n\t\t\t\t.replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent)\n\t\t\t\t.slice(route.prefix.length)\n\t\t\tvar data = parsePathname(path)\n\n\t\t\tassign(data.params, $window.history.state)\n\n\t\t\tfunction fail() {\n\t\t\t\tif (path === defaultRoute) throw new Error(\"Could not resolve default route \" + defaultRoute)\n\t\t\t\tsetPath(defaultRoute, null, {replace: true})\n\t\t\t}\n\n\t\t\tloop(0)\n\t\t\tfunction loop(i) {\n\t\t\t\t// 0 = init\n\t\t\t\t// 1 = scheduled\n\t\t\t\t// 2 = done\n\t\t\t\tfor (; i < compiled.length; i++) {\n\t\t\t\t\tif (compiled[i].check(data)) {\n\t\t\t\t\t\tvar payload = compiled[i].component\n\t\t\t\t\t\tvar matchedRoute = compiled[i].route\n\t\t\t\t\t\tvar localComp = payload\n\t\t\t\t\t\tvar update = lastUpdate = function(comp) {\n\t\t\t\t\t\t\tif (update !== lastUpdate) return\n\t\t\t\t\t\t\tif (comp === SKIP) return loop(i + 1)\n\t\t\t\t\t\t\tcomponent = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\")? comp : \"div\"\n\t\t\t\t\t\t\tattrs = data.params, currentPath = path, lastUpdate = null\n\t\t\t\t\t\t\tcurrentResolver = payload.render ? payload : null\n\t\t\t\t\t\t\tif (state === 2) mountRedraw.redraw()\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tstate = 2\n\t\t\t\t\t\t\t\tmountRedraw.redraw.sync()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// There's no understating how much I *wish* I could\n\t\t\t\t\t\t// use `async`/`await` here...\n\t\t\t\t\t\tif (payload.view || typeof payload === \"function\") {\n\t\t\t\t\t\t\tpayload = {}\n\t\t\t\t\t\t\tupdate(localComp)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (payload.onmatch) {\n\t\t\t\t\t\t\tp.then(function () {\n\t\t\t\t\t\t\t\treturn payload.onmatch(data.params, path, matchedRoute)\n\t\t\t\t\t\t\t}).then(update, fail)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse update(\"div\")\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfail()\n\t\t\t}\n\t\t}\n\n\t\t// Set it unconditionally so `m.route.set` and `m.route.Link` both work,\n\t\t// even if neither `pushState` nor `hashchange` are supported. It's\n\t\t// cleared if `hashchange` is used, since that makes it automatically\n\t\t// async.\n\t\tfireAsync = function() {\n\t\t\tif (!scheduled) {\n\t\t\t\tscheduled = true\n\t\t\t\tcallAsync(resolveRoute)\n\t\t\t}\n\t\t}\n\n\t\tif (typeof $window.history.pushState === \"function\") {\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"popstate\", fireAsync, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"popstate\", fireAsync, false)\n\t\t} else if (route.prefix[0] === \"#\") {\n\t\t\tfireAsync = null\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"hashchange\", resolveRoute, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"hashchange\", resolveRoute, false)\n\t\t}\n\n\t\treturn mountRedraw.mount(root, {\n\t\t\tonbeforeupdate: function() {\n\t\t\t\tstate = state ? 2 : 1\n\t\t\t\treturn !(!state || sentinel === currentResolver)\n\t\t\t},\n\t\t\toncreate: resolveRoute,\n\t\t\tonremove: onremove,\n\t\t\tview: function() {\n\t\t\t\tif (!state || sentinel === currentResolver) return\n\t\t\t\t// Wrap in a fragment to preserve existing key semantics\n\t\t\t\tvar vnode = [Vnode(component, attrs.key, attrs)]\n\t\t\t\tif (currentResolver) vnode = currentResolver.render(vnode[0])\n\t\t\t\treturn vnode\n\t\t\t},\n\t\t})\n\t}\n\troute.set = function(path, data, options) {\n\t\tif (lastUpdate != null) {\n\t\t\toptions = options || {}\n\t\t\toptions.replace = true\n\t\t}\n\t\tlastUpdate = null\n\t\tsetPath(path, data, options)\n\t}\n\troute.get = function() {return currentPath}\n\troute.prefix = \"#!\"\n\troute.Link = {\n\t\tview: function(vnode) {\n\t\t\tvar options = vnode.attrs.options\n\t\t\t// Remove these so they don't get overwritten\n\t\t\tvar attrs = {}, onclick, href\n\t\t\tassign(attrs, vnode.attrs)\n\t\t\t// The first two are internal, but the rest are magic attributes\n\t\t\t// that need censored to not screw up rendering.\n\t\t\tattrs.selector = attrs.options = attrs.key = attrs.oninit =\n\t\t\tattrs.oncreate = attrs.onbeforeupdate = attrs.onupdate =\n\t\t\tattrs.onbeforeremove = attrs.onremove = null\n\n\t\t\t// Do this now so we can get the most current `href` and `disabled`.\n\t\t\t// Those attributes may also be specified in the selector, and we\n\t\t\t// should honor that.\n\t\t\tvar child = m(vnode.attrs.selector || \"a\", attrs, vnode.children)\n\n\t\t\t// Let's provide a *right* way to disable a route link, rather than\n\t\t\t// letting people screw up accessibility on accident.\n\t\t\t//\n\t\t\t// The attribute is coerced so users don't get surprised over\n\t\t\t// `disabled: 0` resulting in a button that's somehow routable\n\t\t\t// despite being visibly disabled.\n\t\t\tif (child.attrs.disabled = Boolean(child.attrs.disabled)) {\n\t\t\t\tchild.attrs.href = null\n\t\t\t\tchild.attrs[\"aria-disabled\"] = \"true\"\n\t\t\t\t// If you *really* do want to do this on a disabled link, use\n\t\t\t\t// an `oncreate` hook to add it.\n\t\t\t\tchild.attrs.onclick = null\n\t\t\t} else {\n\t\t\t\tonclick = child.attrs.onclick\n\t\t\t\thref = child.attrs.href\n\t\t\t\tchild.attrs.href = route.prefix + href\n\t\t\t\tchild.attrs.onclick = function(e) {\n\t\t\t\t\tvar result\n\t\t\t\t\tif (typeof onclick === \"function\") {\n\t\t\t\t\t\tresult = onclick.call(e.currentTarget, e)\n\t\t\t\t\t} else if (onclick == null || typeof onclick !== \"object\") {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t} else if (typeof onclick.handleEvent === \"function\") {\n\t\t\t\t\t\tonclick.handleEvent(e)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Adapted from React Router's implementation:\n\t\t\t\t\t// https://github.com/ReactTraining/react-router/blob/520a0acd48ae1b066eb0b07d6d4d1790a1d02482/packages/react-router-dom/modules/Link.js\n\t\t\t\t\t//\n\t\t\t\t\t// Try to be flexible and intuitive in how we handle links.\n\t\t\t\t\t// Fun fact: links aren't as obvious to get right as you\n\t\t\t\t\t// would expect. There's a lot more valid ways to click a\n\t\t\t\t\t// link than this, and one might want to not simply click a\n\t\t\t\t\t// link, but right click or command-click it to copy the\n\t\t\t\t\t// link target, etc. Nope, this isn't just for blind people.\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip if `onclick` prevented default\n\t\t\t\t\t\tresult !== false && !e.defaultPrevented &&\n\t\t\t\t\t\t// Ignore everything but left clicks\n\t\t\t\t\t\t(e.button === 0 || e.which === 0 || e.which === 1) &&\n\t\t\t\t\t\t// Let the browser handle `target=_blank`, etc.\n\t\t\t\t\t\t(!e.currentTarget.target || e.currentTarget.target === \"_self\") &&\n\t\t\t\t\t\t// No modifier keys\n\t\t\t\t\t\t!e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey\n\t\t\t\t\t) {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\te.redraw = false\n\t\t\t\t\t\troute.set(href, null, options)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn child\n\t\t},\n\t}\n\troute.param = function(key) {\n\t\treturn attrs && key != null ? attrs[key] : attrs\n\t}\n\n\treturn route\n}\n","\"use strict\"\n\nvar hyperscript = require(\"./render/hyperscript\")\n\nhyperscript.trust = require(\"./render/trust\")\nhyperscript.fragment = require(\"./render/fragment\")\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar render = require(\"./render\")\n\nmodule.exports = require(\"./api/mount-redraw\")(render, requestAnimationFrame, console)\n","\"use strict\"\n\nmodule.exports = Object.assign || function(target, source) {\n\tif(source) Object.keys(source).forEach(function(key) { target[key] = source[key] })\n}\n","\"use strict\"\n\nvar buildQueryString = require(\"../querystring/build\")\nvar assign = require(\"./assign\")\n\n// Returns `path` from `template` + `params`\nmodule.exports = function(template, params) {\n\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(template)) {\n\t\tthrow new SyntaxError(\"Template parameter names *must* be separated\")\n\t}\n\tif (params == null) return template\n\tvar queryIndex = template.indexOf(\"?\")\n\tvar hashIndex = template.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? template.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = template.slice(0, pathEnd)\n\tvar query = {}\n\n\tassign(query, params)\n\n\tvar resolved = path.replace(/:([^\\/\\.-]+)(\\.{3})?/g, function(m, key, variadic) {\n\t\tdelete query[key]\n\t\t// If no such parameter exists, don't interpolate it.\n\t\tif (params[key] == null) return m\n\t\t// Escape normal parameters, but not variadic ones.\n\t\treturn variadic ? params[key] : encodeURIComponent(String(params[key]))\n\t})\n\n\t// In case the template substitution adds new query/hash parameters.\n\tvar newQueryIndex = resolved.indexOf(\"?\")\n\tvar newHashIndex = resolved.indexOf(\"#\")\n\tvar newQueryEnd = newHashIndex < 0 ? resolved.length : newHashIndex\n\tvar newPathEnd = newQueryIndex < 0 ? newQueryEnd : newQueryIndex\n\tvar result = resolved.slice(0, newPathEnd)\n\n\tif (queryIndex >= 0) result += template.slice(queryIndex, queryEnd)\n\tif (newQueryIndex >= 0) result += (queryIndex < 0 ? \"?\" : \"&\") + resolved.slice(newQueryIndex, newQueryEnd)\n\tvar querystring = buildQueryString(query)\n\tif (querystring) result += (queryIndex < 0 && newQueryIndex < 0 ? \"?\" : \"&\") + querystring\n\tif (hashIndex >= 0) result += template.slice(hashIndex)\n\tif (newHashIndex >= 0) result += (hashIndex < 0 ? \"\" : \"&\") + resolved.slice(newHashIndex)\n\treturn result\n}\n","\"use strict\"\n\nvar parsePathname = require(\"./parse\")\n\n// Compiles a template into a function that takes a resolved path (without query\n// strings) and returns an object containing the template parameters with their\n// parsed values. This expects the input of the compiled template to be the\n// output of `parsePathname`. Note that it does *not* remove query parameters\n// specified in the template.\nmodule.exports = function(template) {\n\tvar templateData = parsePathname(template)\n\tvar templateKeys = Object.keys(templateData.params)\n\tvar keys = []\n\tvar regexp = new RegExp(\"^\" + templateData.path.replace(\n\t\t// I escape literal text so people can use things like `:file.:ext` or\n\t\t// `:lang-:locale` in routes. This is all merged into one pass so I\n\t\t// don't also accidentally escape `-` and make it harder to detect it to\n\t\t// ban it from template parameters.\n\t\t/:([^\\/.-]+)(\\.{3}|\\.(?!\\.)|-)?|[\\\\^$*+.()|\\[\\]{}]/g,\n\t\tfunction(m, key, extra) {\n\t\t\tif (key == null) return \"\\\\\" + m\n\t\t\tkeys.push({k: key, r: extra === \"...\"})\n\t\t\tif (extra === \"...\") return \"(.*)\"\n\t\t\tif (extra === \".\") return \"([^/]+)\\\\.\"\n\t\t\treturn \"([^/]+)\" + (extra || \"\")\n\t\t}\n\t) + \"$\")\n\treturn function(data) {\n\t\t// First, check the params. Usually, there isn't any, and it's just\n\t\t// checking a static set.\n\t\tfor (var i = 0; i < templateKeys.length; i++) {\n\t\t\tif (templateData.params[templateKeys[i]] !== data.params[templateKeys[i]]) return false\n\t\t}\n\t\t// If no interpolations exist, let's skip all the ceremony\n\t\tif (!keys.length) return regexp.test(data.path)\n\t\tvar values = regexp.exec(data.path)\n\t\tif (values == null) return false\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tdata.params[keys[i].k] = keys[i].r ? values[i + 1] : decodeURIComponent(values[i + 1])\n\t\t}\n\t\treturn true\n\t}\n}\n","\"use strict\"\n\nvar parseQueryString = require(\"../querystring/parse\")\n\n// Returns `{path, params}` from `url`\nmodule.exports = function(url) {\n\tvar queryIndex = url.indexOf(\"?\")\n\tvar hashIndex = url.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? url.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = url.slice(0, pathEnd).replace(/\\/{2,}/g, \"/\")\n\n\tif (!path) path = \"/\"\n\telse {\n\t\tif (path[0] !== \"/\") path = \"/\" + path\n\t\tif (path.length > 1 && path[path.length - 1] === \"/\") path = path.slice(0, -1)\n\t}\n\treturn {\n\t\tpath: path,\n\t\tparams: queryIndex < 0\n\t\t\t? {}\n\t\t\t: parseQueryString(url.slice(queryIndex + 1, queryEnd)),\n\t}\n}\n","\"use strict\"\n/** @constructor */\nvar PromisePolyfill = function(executor) {\n\tif (!(this instanceof PromisePolyfill)) throw new Error(\"Promise must be called with `new`\")\n\tif (typeof executor !== \"function\") throw new TypeError(\"executor must be a function\")\n\n\tvar self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)\n\tvar instance = self._instance = {resolvers: resolvers, rejectors: rejectors}\n\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction handler(list, shouldAbsorb) {\n\t\treturn function execute(value) {\n\t\t\tvar then\n\t\t\ttry {\n\t\t\t\tif (shouldAbsorb && value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof (then = value.then) === \"function\") {\n\t\t\t\t\tif (value === self) throw new TypeError(\"Promise can't be resolved w/ itself\")\n\t\t\t\t\texecuteOnce(then.bind(value))\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcallAsync(function() {\n\t\t\t\t\t\tif (!shouldAbsorb && list.length === 0) console.error(\"Possible unhandled promise rejection:\", value)\n\t\t\t\t\t\tfor (var i = 0; i < list.length; i++) list[i](value)\n\t\t\t\t\t\tresolvers.length = 0, rejectors.length = 0\n\t\t\t\t\t\tinstance.state = shouldAbsorb\n\t\t\t\t\t\tinstance.retry = function() {execute(value)}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\trejectCurrent(e)\n\t\t\t}\n\t\t}\n\t}\n\tfunction executeOnce(then) {\n\t\tvar runs = 0\n\t\tfunction run(fn) {\n\t\t\treturn function(value) {\n\t\t\t\tif (runs++ > 0) return\n\t\t\t\tfn(value)\n\t\t\t}\n\t\t}\n\t\tvar onerror = run(rejectCurrent)\n\t\ttry {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}\n\t}\n\n\texecuteOnce(executor)\n}\nPromisePolyfill.prototype.then = function(onFulfilled, onRejection) {\n\tvar self = this, instance = self._instance\n\tfunction handle(callback, list, next, state) {\n\t\tlist.push(function(value) {\n\t\t\tif (typeof callback !== \"function\") next(value)\n\t\t\telse try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}\n\t\t})\n\t\tif (typeof instance.retry === \"function\" && state === instance.state) instance.retry()\n\t}\n\tvar resolveNext, rejectNext\n\tvar promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})\n\thandle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)\n\treturn promise\n}\nPromisePolyfill.prototype.catch = function(onRejection) {\n\treturn this.then(null, onRejection)\n}\nPromisePolyfill.prototype.finally = function(callback) {\n\treturn this.then(\n\t\tfunction(value) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn value\n\t\t\t})\n\t\t},\n\t\tfunction(reason) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn PromisePolyfill.reject(reason);\n\t\t\t})\n\t\t}\n\t)\n}\nPromisePolyfill.resolve = function(value) {\n\tif (value instanceof PromisePolyfill) return value\n\treturn new PromisePolyfill(function(resolve) {resolve(value)})\n}\nPromisePolyfill.reject = function(value) {\n\treturn new PromisePolyfill(function(resolve, reject) {reject(value)})\n}\nPromisePolyfill.all = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tvar total = list.length, count = 0, values = []\n\t\tif (list.length === 0) resolve([])\n\t\telse for (var i = 0; i < list.length; i++) {\n\t\t\t(function(i) {\n\t\t\t\tfunction consume(value) {\n\t\t\t\t\tcount++\n\t\t\t\t\tvalues[i] = value\n\t\t\t\t\tif (count === total) resolve(values)\n\t\t\t\t}\n\t\t\t\tif (list[i] != null && (typeof list[i] === \"object\" || typeof list[i] === \"function\") && typeof list[i].then === \"function\") {\n\t\t\t\t\tlist[i].then(consume, reject)\n\t\t\t\t}\n\t\t\t\telse consume(list[i])\n\t\t\t})(i)\n\t\t}\n\t})\n}\nPromisePolyfill.race = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tlist[i].then(resolve, reject)\n\t\t}\n\t})\n}\n\nmodule.exports = PromisePolyfill\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./polyfill\")\n\nif (typeof window !== \"undefined\") {\n\tif (typeof window.Promise === \"undefined\") {\n\t\twindow.Promise = PromisePolyfill\n\t} else if (!window.Promise.prototype.finally) {\n\t\twindow.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = window.Promise\n} else if (typeof global !== \"undefined\") {\n\tif (typeof global.Promise === \"undefined\") {\n\t\tglobal.Promise = PromisePolyfill\n\t} else if (!global.Promise.prototype.finally) {\n\t\tglobal.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = global.Promise\n} else {\n\tmodule.exports = PromisePolyfill\n}\n","\"use strict\"\n\nmodule.exports = function(object) {\n\tif (Object.prototype.toString.call(object) !== \"[object Object]\") return \"\"\n\n\tvar args = []\n\tfor (var key in object) {\n\t\tdestructure(key, object[key])\n\t}\n\n\treturn args.join(\"&\")\n\n\tfunction destructure(key, value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (var i = 0; i < value.length; i++) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse if (Object.prototype.toString.call(value) === \"[object Object]\") {\n\t\t\tfor (var i in value) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse args.push(encodeURIComponent(key) + (value != null && value !== \"\" ? \"=\" + encodeURIComponent(value) : \"\"))\n\t}\n}\n","\"use strict\"\n\nmodule.exports = function(string) {\n\tif (string === \"\" || string == null) return {}\n\tif (string.charAt(0) === \"?\") string = string.slice(1)\n\n\tvar entries = string.split(\"&\"), counters = {}, data = {}\n\tfor (var i = 0; i < entries.length; i++) {\n\t\tvar entry = entries[i].split(\"=\")\n\t\tvar key = decodeURIComponent(entry[0])\n\t\tvar value = entry.length === 2 ? decodeURIComponent(entry[1]) : \"\"\n\n\t\tif (value === \"true\") value = true\n\t\telse if (value === \"false\") value = false\n\n\t\tvar levels = key.split(/\\]\\[?|\\[/)\n\t\tvar cursor = data\n\t\tif (key.indexOf(\"[\") > -1) levels.pop()\n\t\tfor (var j = 0; j < levels.length; j++) {\n\t\t\tvar level = levels[j], nextLevel = levels[j + 1]\n\t\t\tvar isNumber = nextLevel == \"\" || !isNaN(parseInt(nextLevel, 10))\n\t\t\tif (level === \"\") {\n\t\t\t\tvar key = levels.slice(0, j).join()\n\t\t\t\tif (counters[key] == null) {\n\t\t\t\t\tcounters[key] = Array.isArray(cursor) ? cursor.length : 0\n\t\t\t\t}\n\t\t\t\tlevel = counters[key]++\n\t\t\t}\n\t\t\t// Disallow direct prototype pollution\n\t\t\telse if (level === \"__proto__\") break\n\t\t\tif (j === levels.length - 1) cursor[level] = value\n\t\t\telse {\n\t\t\t\t// Read own properties exclusively to disallow indirect\n\t\t\t\t// prototype pollution\n\t\t\t\tvar desc = Object.getOwnPropertyDescriptor(cursor, level)\n\t\t\t\tif (desc != null) desc = desc.value\n\t\t\t\tif (desc == null) cursor[level] = desc = isNumber ? [] : {}\n\t\t\t\tcursor = desc\n\t\t\t}\n\t\t}\n\t}\n\treturn data\n}\n","\"use strict\"\n\nmodule.exports = require(\"./render/render\")(window)\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nmodule.exports = function() {\n\tvar vnode = hyperscriptVnode.apply(0, arguments)\n\n\tvnode.tag = \"[\"\n\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\treturn vnode\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nvar selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g\nvar selectorCache = {}\nvar hasOwn = {}.hasOwnProperty\n\nfunction isEmpty(object) {\n\tfor (var key in object) if (hasOwn.call(object, key)) return false\n\treturn true\n}\n\nfunction compileSelector(selector) {\n\tvar match, tag = \"div\", classes = [], attrs = {}\n\twhile (match = selectorParser.exec(selector)) {\n\t\tvar type = match[1], value = match[2]\n\t\tif (type === \"\" && value !== \"\") tag = value\n\t\telse if (type === \"#\") attrs.id = value\n\t\telse if (type === \".\") classes.push(value)\n\t\telse if (match[3][0] === \"[\") {\n\t\t\tvar attrValue = match[6]\n\t\t\tif (attrValue) attrValue = attrValue.replace(/\\\\([\"'])/g, \"$1\").replace(/\\\\\\\\/g, \"\\\\\")\n\t\t\tif (match[4] === \"class\") classes.push(attrValue)\n\t\t\telse attrs[match[4]] = attrValue === \"\" ? attrValue : attrValue || true\n\t\t}\n\t}\n\tif (classes.length > 0) attrs.className = classes.join(\" \")\n\treturn selectorCache[selector] = {tag: tag, attrs: attrs}\n}\n\nfunction execSelector(state, vnode) {\n\tvar attrs = vnode.attrs\n\tvar children = Vnode.normalizeChildren(vnode.children)\n\tvar hasClass = hasOwn.call(attrs, \"class\")\n\tvar className = hasClass ? attrs.class : attrs.className\n\n\tvnode.tag = state.tag\n\tvnode.attrs = null\n\tvnode.children = undefined\n\n\tif (!isEmpty(state.attrs) && !isEmpty(attrs)) {\n\t\tvar newAttrs = {}\n\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key)) newAttrs[key] = attrs[key]\n\t\t}\n\n\t\tattrs = newAttrs\n\t}\n\n\tfor (var key in state.attrs) {\n\t\tif (hasOwn.call(state.attrs, key) && key !== \"className\" && !hasOwn.call(attrs, key)){\n\t\t\tattrs[key] = state.attrs[key]\n\t\t}\n\t}\n\tif (className != null || state.attrs.className != null) attrs.className =\n\t\tclassName != null\n\t\t\t? state.attrs.className != null\n\t\t\t\t? String(state.attrs.className) + \" \" + String(className)\n\t\t\t\t: className\n\t\t\t: state.attrs.className != null\n\t\t\t\t? state.attrs.className\n\t\t\t\t: null\n\n\tif (hasClass) attrs.class = null\n\n\tfor (var key in attrs) {\n\t\tif (hasOwn.call(attrs, key) && key !== \"key\") {\n\t\t\tvnode.attrs = attrs\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif (Array.isArray(children) && children.length === 1 && children[0] != null && children[0].tag === \"#\") {\n\t\tvnode.text = children[0].children\n\t} else {\n\t\tvnode.children = children\n\t}\n\n\treturn vnode\n}\n\nfunction hyperscript(selector) {\n\tif (selector == null || typeof selector !== \"string\" && typeof selector !== \"function\" && typeof selector.view !== \"function\") {\n\t\tthrow Error(\"The selector must be either a string or a component.\");\n\t}\n\n\tvar vnode = hyperscriptVnode.apply(1, arguments)\n\n\tif (typeof selector === \"string\") {\n\t\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\t\tif (selector !== \"[\") return execSelector(selectorCache[selector] || compileSelector(selector), vnode)\n\t}\n\n\tvnode.tag = selector\n\treturn vnode\n}\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\n// Call via `hyperscriptVnode.apply(startOffset, arguments)`\n//\n// The reason I do it this way, forwarding the arguments and passing the start\n// offset in `this`, is so I don't have to create a temporary array in a\n// performance-critical path.\n//\n// In native ES6, I'd instead add a final `...args` parameter to the\n// `hyperscript` and `fragment` factories and define this as\n// `hyperscriptVnode(...args)`, since modern engines do optimize that away. But\n// ES5 (what Mithril requires thanks to IE support) doesn't give me that luxury,\n// and engines aren't nearly intelligent enough to do either of these:\n//\n// 1. Elide the allocation for `[].slice.call(arguments, 1)` when it's passed to\n// another function only to be indexed.\n// 2. Elide an `arguments` allocation when it's passed to any function other\n// than `Function.prototype.apply` or `Reflect.apply`.\n//\n// In ES6, it'd probably look closer to this (I'd need to profile it, though):\n// module.exports = function(attrs, ...children) {\n// if (attrs == null || typeof attrs === \"object\" && attrs.tag == null && !Array.isArray(attrs)) {\n// if (children.length === 1 && Array.isArray(children[0])) children = children[0]\n// } else {\n// children = children.length === 0 && Array.isArray(attrs) ? attrs : [attrs, ...children]\n// attrs = undefined\n// }\n//\n// if (attrs == null) attrs = {}\n// return Vnode(\"\", attrs.key, attrs, children)\n// }\nmodule.exports = function() {\n\tvar attrs = arguments[this], start = this + 1, children\n\n\tif (attrs == null) {\n\t\tattrs = {}\n\t} else if (typeof attrs !== \"object\" || attrs.tag != null || Array.isArray(attrs)) {\n\t\tattrs = {}\n\t\tstart = this\n\t}\n\n\tif (arguments.length === start + 1) {\n\t\tchildren = arguments[start]\n\t\tif (!Array.isArray(children)) children = [children]\n\t} else {\n\t\tchildren = []\n\t\twhile (start < arguments.length) children.push(arguments[start++])\n\t}\n\n\treturn Vnode(\"\", attrs.key, attrs, children)\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function($window) {\n\tvar $doc = $window && $window.document\n\tvar currentRedraw\n\n\tvar nameSpace = {\n\t\tsvg: \"http://www.w3.org/2000/svg\",\n\t\tmath: \"http://www.w3.org/1998/Math/MathML\"\n\t}\n\n\tfunction getNameSpace(vnode) {\n\t\treturn vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag]\n\t}\n\n\t//sanity check to discourage people from doing `vnode.state = ...`\n\tfunction checkState(vnode, original) {\n\t\tif (vnode.state !== original) throw new Error(\"`vnode.state` must not be modified\")\n\t}\n\n\t//Note: the hook is passed as the `this` argument to allow proxying the\n\t//arguments without requiring a full array allocation to do so. It also\n\t//takes advantage of the fact the current `vnode` is the first argument in\n\t//all lifecycle methods.\n\tfunction callHook(vnode) {\n\t\tvar original = vnode.state\n\t\ttry {\n\t\t\treturn this.apply(original, arguments)\n\t\t} finally {\n\t\t\tcheckState(vnode, original)\n\t\t}\n\t}\n\n\t// IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when\n\t// inside an iframe. Catch and swallow this error, and heavy-handidly return null.\n\tfunction activeElement() {\n\t\ttry {\n\t\t\treturn $doc.activeElement\n\t\t} catch (e) {\n\t\t\treturn null\n\t\t}\n\t}\n\t//create\n\tfunction createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t}\n\tfunction createNode(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tif (typeof tag === \"string\") {\n\t\t\tvnode.state = {}\n\t\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tswitch (tag) {\n\t\t\t\tcase \"#\": createText(parent, vnode, nextSibling); break\n\t\t\t\tcase \"<\": createHTML(parent, vnode, ns, nextSibling); break\n\t\t\t\tcase \"[\": createFragment(parent, vnode, hooks, ns, nextSibling); break\n\t\t\t\tdefault: createElement(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t\telse createComponent(parent, vnode, hooks, ns, nextSibling)\n\t}\n\tfunction createText(parent, vnode, nextSibling) {\n\t\tvnode.dom = $doc.createTextNode(vnode.children)\n\t\tinsertNode(parent, vnode.dom, nextSibling)\n\t}\n\tvar possibleParents = {caption: \"table\", thead: \"table\", tbody: \"table\", tfoot: \"table\", tr: \"tbody\", th: \"tr\", td: \"tr\", colgroup: \"table\", col: \"colgroup\"}\n\tfunction createHTML(parent, vnode, ns, nextSibling) {\n\t\tvar match = vnode.children.match(/^\\s*?<(\\w+)/im) || []\n\t\t// not using the proper parent makes the child element(s) vanish.\n\t\t// var div = document.createElement(\"div\")\n\t\t// div.innerHTML = \"<td>i</td><td>j</td>\"\n\t\t// console.log(div.innerHTML)\n\t\t// --> \"ij\", no <td> in sight.\n\t\tvar temp = $doc.createElement(possibleParents[match[1]] || \"div\")\n\t\tif (ns === \"http://www.w3.org/2000/svg\") {\n\t\t\ttemp.innerHTML = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\" + vnode.children + \"</svg>\"\n\t\t\ttemp = temp.firstChild\n\t\t} else {\n\t\t\ttemp.innerHTML = vnode.children\n\t\t}\n\t\tvnode.dom = temp.firstChild\n\t\tvnode.domSize = temp.childNodes.length\n\t\t// Capture nodes to remove, so we don't confuse them.\n\t\tvnode.instance = []\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tvar child\n\t\twhile (child = temp.firstChild) {\n\t\t\tvnode.instance.push(child)\n\t\t\tfragment.appendChild(child)\n\t\t}\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createFragment(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tif (vnode.children != null) {\n\t\t\tvar children = vnode.children\n\t\t\tcreateNodes(fragment, children, 0, children.length, hooks, null, ns)\n\t\t}\n\t\tvnode.dom = fragment.firstChild\n\t\tvnode.domSize = fragment.childNodes.length\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createElement(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tvar attrs = vnode.attrs\n\t\tvar is = attrs && attrs.is\n\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tvar element = ns ?\n\t\t\tis ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :\n\t\t\tis ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)\n\t\tvnode.dom = element\n\n\t\tif (attrs != null) {\n\t\t\tsetAttrs(vnode, attrs, ns)\n\t\t}\n\n\t\tinsertNode(parent, element, nextSibling)\n\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (vnode.text != null) {\n\t\t\t\tif (vnode.text !== \"\") element.textContent = vnode.text\n\t\t\t\telse vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t}\n\t\t\tif (vnode.children != null) {\n\t\t\t\tvar children = vnode.children\n\t\t\t\tcreateNodes(element, children, 0, children.length, hooks, null, ns)\n\t\t\t\tif (vnode.tag === \"select\" && attrs != null) setLateSelectAttrs(vnode, attrs)\n\t\t\t}\n\t\t}\n\t}\n\tfunction initComponent(vnode, hooks) {\n\t\tvar sentinel\n\t\tif (typeof vnode.tag.view === \"function\") {\n\t\t\tvnode.state = Object.create(vnode.tag)\n\t\t\tsentinel = vnode.state.view\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t} else {\n\t\t\tvnode.state = void 0\n\t\t\tsentinel = vnode.tag\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t\tvnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === \"function\") ? new vnode.tag(vnode) : vnode.tag(vnode)\n\t\t}\n\t\tinitLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tsentinel.$$reentrantLock$$ = null\n\t}\n\tfunction createComponent(parent, vnode, hooks, ns, nextSibling) {\n\t\tinitComponent(vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tcreateNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0\n\t\t}\n\t\telse {\n\t\t\tvnode.domSize = 0\n\t\t}\n\t}\n\n\t//update\n\t/**\n\t * @param {Element|Fragment} parent - the parent element\n\t * @param {Vnode[] | null} old - the list of vnodes of the last `render()` call for\n\t * this part of the tree\n\t * @param {Vnode[] | null} vnodes - as above, but for the current `render()` call.\n\t * @param {Function[]} hooks - an accumulator of post-render hooks (oncreate/onupdate)\n\t * @param {Element | null} nextSibling - the next DOM node if we're dealing with a\n\t * fragment that is not the last item in its\n\t * parent\n\t * @param {'svg' | 'math' | String | null} ns) - the current XML namespace, if any\n\t * @returns void\n\t */\n\t// This function diffs and patches lists of vnodes, both keyed and unkeyed.\n\t//\n\t// We will:\n\t//\n\t// 1. describe its general structure\n\t// 2. focus on the diff algorithm optimizations\n\t// 3. discuss DOM node operations.\n\n\t// ## Overview:\n\t//\n\t// The updateNodes() function:\n\t// - deals with trivial cases\n\t// - determines whether the lists are keyed or unkeyed based on the first non-null node\n\t// of each list.\n\t// - diffs them and patches the DOM if needed (that's the brunt of the code)\n\t// - manages the leftovers: after diffing, are there:\n\t// - old nodes left to remove?\n\t// \t - new nodes to insert?\n\t// \t deal with them!\n\t//\n\t// The lists are only iterated over once, with an exception for the nodes in `old` that\n\t// are visited in the fourth part of the diff and in the `removeNodes` loop.\n\n\t// ## Diffing\n\t//\n\t// Reading https://github.com/localvoid/ivi/blob/ddc09d06abaef45248e6133f7040d00d3c6be853/packages/ivi/src/vdom/implementation.ts#L617-L837\n\t// may be good for context on longest increasing subsequence-based logic for moving nodes.\n\t//\n\t// In order to diff keyed lists, one has to\n\t//\n\t// 1) match nodes in both lists, per key, and update them accordingly\n\t// 2) create the nodes present in the new list, but absent in the old one\n\t// 3) remove the nodes present in the old list, but absent in the new one\n\t// 4) figure out what nodes in 1) to move in order to minimize the DOM operations.\n\t//\n\t// To achieve 1) one can create a dictionary of keys => index (for the old list), then iterate\n\t// over the new list and for each new vnode, find the corresponding vnode in the old list using\n\t// the map.\n\t// 2) is achieved in the same step: if a new node has no corresponding entry in the map, it is new\n\t// and must be created.\n\t// For the removals, we actually remove the nodes that have been updated from the old list.\n\t// The nodes that remain in that list after 1) and 2) have been performed can be safely removed.\n\t// The fourth step is a bit more complex and relies on the longest increasing subsequence (LIS)\n\t// algorithm.\n\t//\n\t// the longest increasing subsequence is the list of nodes that can remain in place. Imagine going\n\t// from `1,2,3,4,5` to `4,5,1,2,3` where the numbers are not necessarily the keys, but the indices\n\t// corresponding to the keyed nodes in the old list (keyed nodes `e,d,c,b,a` => `b,a,e,d,c` would\n\t// match the above lists, for example).\n\t//\n\t// In there are two increasing subsequences: `4,5` and `1,2,3`, the latter being the longest. We\n\t// can update those nodes without moving them, and only call `insertNode` on `4` and `5`.\n\t//\n\t// @localvoid adapted the algo to also support node deletions and insertions (the `lis` is actually\n\t// the longest increasing subsequence *of old nodes still present in the new list*).\n\t//\n\t// It is a general algorithm that is fireproof in all circumstances, but it requires the allocation\n\t// and the construction of a `key => oldIndex` map, and three arrays (one with `newIndex => oldIndex`,\n\t// the `LIS` and a temporary one to create the LIS).\n\t//\n\t// So we cheat where we can: if the tails of the lists are identical, they are guaranteed to be part of\n\t// the LIS and can be updated without moving them.\n\t//\n\t// If two nodes are swapped, they are guaranteed not to be part of the LIS, and must be moved (with\n\t// the exception of the last node if the list is fully reversed).\n\t//\n\t// ## Finding the next sibling.\n\t//\n\t// `updateNode()` and `createNode()` expect a nextSibling parameter to perform DOM operations.\n\t// When the list is being traversed top-down, at any index, the DOM nodes up to the previous\n\t// vnode reflect the content of the new list, whereas the rest of the DOM nodes reflect the old\n\t// list. The next sibling must be looked for in the old list using `getNextSibling(... oldStart + 1 ...)`.\n\t//\n\t// In the other scenarios (swaps, upwards traversal, map-based diff),\n\t// the new vnodes list is traversed upwards. The DOM nodes at the bottom of the list reflect the\n\t// bottom part of the new vnodes list, and we can use the `v.dom` value of the previous node\n\t// as the next sibling (cached in the `nextSibling` variable).\n\n\n\t// ## DOM node moves\n\t//\n\t// In most scenarios `updateNode()` and `createNode()` perform the DOM operations. However,\n\t// this is not the case if the node moved (second and fourth part of the diff algo). We move\n\t// the old DOM nodes before updateNode runs because it enables us to use the cached `nextSibling`\n\t// variable rather than fetching it using `getNextSibling()`.\n\t//\n\t// The fourth part of the diff currently inserts nodes unconditionally, leading to issues\n\t// like #1791 and #1999. We need to be smarter about those situations where adjascent old\n\t// nodes remain together in the new list in a way that isn't covered by parts one and\n\t// three of the diff algo.\n\n\tfunction updateNodes(parent, old, vnodes, hooks, nextSibling, ns) {\n\t\tif (old === vnodes || old == null && vnodes == null) return\n\t\telse if (old == null || old.length === 0) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns)\n\t\telse if (vnodes == null || vnodes.length === 0) removeNodes(parent, old, 0, old.length)\n\t\telse {\n\t\t\tvar isOldKeyed = old[0] != null && old[0].key != null\n\t\t\tvar isKeyed = vnodes[0] != null && vnodes[0].key != null\n\t\t\tvar start = 0, oldStart = 0\n\t\t\tif (!isOldKeyed) while (oldStart < old.length && old[oldStart] == null) oldStart++\n\t\t\tif (!isKeyed) while (start < vnodes.length && vnodes[start] == null) start++\n\t\t\tif (isKeyed === null && isOldKeyed == null) return // both lists are full of nulls\n\t\t\tif (isOldKeyed !== isKeyed) {\n\t\t\t\tremoveNodes(parent, old, oldStart, old.length)\n\t\t\t\tcreateNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else if (!isKeyed) {\n\t\t\t\t// Don't index past the end of either list (causes deopts).\n\t\t\t\tvar commonLength = old.length < vnodes.length ? old.length : vnodes.length\n\t\t\t\t// Rewind if necessary to the first non-null index on either side.\n\t\t\t\t// We could alternatively either explicitly create or remove nodes when `start !== oldStart`\n\t\t\t\t// but that would be optimizing for sparse lists which are more rare than dense ones.\n\t\t\t\tstart = start < oldStart ? start : oldStart\n\t\t\t\tfor (; start < commonLength; start++) {\n\t\t\t\t\to = old[start]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o === v || o == null && v == null) continue\n\t\t\t\t\telse if (o == null) createNode(parent, v, hooks, ns, getNextSibling(old, start + 1, nextSibling))\n\t\t\t\t\telse if (v == null) removeNode(parent, o)\n\t\t\t\t\telse updateNode(parent, o, v, hooks, getNextSibling(old, start + 1, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\tif (old.length > commonLength) removeNodes(parent, old, start, old.length)\n\t\t\t\tif (vnodes.length > commonLength) createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else {\n\t\t\t\t// keyed diff\n\t\t\t\tvar oldEnd = old.length - 1, end = vnodes.length - 1, map, o, v, oe, ve, topSibling\n\n\t\t\t\t// bottom-up\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t}\n\t\t\t\t// top-down\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o.key !== v.key) break\n\t\t\t\t\toldStart++, start++\n\t\t\t\t\tif (o !== v) updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\t// swaps and list reversals\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (start === end) break\n\t\t\t\t\tif (o.key !== ve.key || oe.key !== v.key) break\n\t\t\t\t\ttopSibling = getNextSibling(old, oldStart, nextSibling)\n\t\t\t\t\tmoveNodes(parent, oe, topSibling)\n\t\t\t\t\tif (oe !== v) updateNode(parent, oe, v, hooks, topSibling, ns)\n\t\t\t\t\tif (++start <= --end) moveNodes(parent, o, nextSibling)\n\t\t\t\t\tif (o !== ve) updateNode(parent, o, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldStart++; oldEnd--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t}\n\t\t\t\t// bottom up once again\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t}\n\t\t\t\tif (start > end) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\telse if (oldStart > oldEnd) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\telse {\n\t\t\t\t\t// inspired by ivi https://github.com/ivijs/ivi/ by Boris Kaul\n\t\t\t\t\tvar originalNextSibling = nextSibling, vnodesLength = end - start + 1, oldIndices = new Array(vnodesLength), li=0, i=0, pos = 2147483647, matched = 0, map, lisIndices\n\t\t\t\t\tfor (i = 0; i < vnodesLength; i++) oldIndices[i] = -1\n\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\tif (map == null) map = getKeyMap(old, oldStart, oldEnd + 1)\n\t\t\t\t\t\tve = vnodes[i]\n\t\t\t\t\t\tvar oldIndex = map[ve.key]\n\t\t\t\t\t\tif (oldIndex != null) {\n\t\t\t\t\t\t\tpos = (oldIndex < pos) ? oldIndex : -1 // becomes -1 if nodes were re-ordered\n\t\t\t\t\t\t\toldIndices[i-start] = oldIndex\n\t\t\t\t\t\t\toe = old[oldIndex]\n\t\t\t\t\t\t\told[oldIndex] = null\n\t\t\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\t\t\tmatched++\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnextSibling = originalNextSibling\n\t\t\t\t\tif (matched !== oldEnd - oldStart + 1) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\t\tif (matched === 0) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (pos === -1) {\n\t\t\t\t\t\t\t// the indices of the indices of the items that are part of the\n\t\t\t\t\t\t\t// longest increasing subsequence in the oldIndices list\n\t\t\t\t\t\t\tlisIndices = makeLisIndices(oldIndices)\n\t\t\t\t\t\t\tli = lisIndices.length - 1\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif (lisIndices[li] === i - start) li--\n\t\t\t\t\t\t\t\t\telse moveNodes(parent, v, nextSibling)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateNode(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvar oldTag = old.tag, tag = vnode.tag\n\t\tif (oldTag === tag) {\n\t\t\tvnode.state = old.state\n\t\t\tvnode.events = old.events\n\t\t\tif (shouldNotUpdate(vnode, old)) return\n\t\t\tif (typeof oldTag === \"string\") {\n\t\t\t\tif (vnode.attrs != null) {\n\t\t\t\t\tupdateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t}\n\t\t\t\tswitch (oldTag) {\n\t\t\t\t\tcase \"#\": updateText(old, vnode); break\n\t\t\t\t\tcase \"<\": updateHTML(parent, old, vnode, ns, nextSibling); break\n\t\t\t\t\tcase \"[\": updateFragment(parent, old, vnode, hooks, nextSibling, ns); break\n\t\t\t\t\tdefault: updateElement(old, vnode, hooks, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse updateComponent(parent, old, vnode, hooks, nextSibling, ns)\n\t\t}\n\t\telse {\n\t\t\tremoveNode(parent, old)\n\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t}\n\t}\n\tfunction updateText(old, vnode) {\n\t\tif (old.children.toString() !== vnode.children.toString()) {\n\t\t\told.dom.nodeValue = vnode.children\n\t\t}\n\t\tvnode.dom = old.dom\n\t}\n\tfunction updateHTML(parent, old, vnode, ns, nextSibling) {\n\t\tif (old.children !== vnode.children) {\n\t\t\tremoveHTML(parent, old)\n\t\t\tcreateHTML(parent, vnode, ns, nextSibling)\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t\tvnode.instance = old.instance\n\t\t}\n\t}\n\tfunction updateFragment(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tupdateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns)\n\t\tvar domSize = 0, children = vnode.children\n\t\tvnode.dom = null\n\t\tif (children != null) {\n\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\tvar child = children[i]\n\t\t\t\tif (child != null && child.dom != null) {\n\t\t\t\t\tif (vnode.dom == null) vnode.dom = child.dom\n\t\t\t\t\tdomSize += child.domSize || 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (domSize !== 1) vnode.domSize = domSize\n\t\t}\n\t}\n\tfunction updateElement(old, vnode, hooks, ns) {\n\t\tvar element = vnode.dom = old.dom\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tif (vnode.tag === \"textarea\") {\n\t\t\tif (vnode.attrs == null) vnode.attrs = {}\n\t\t\tif (vnode.text != null) {\n\t\t\t\tvnode.attrs.value = vnode.text //FIXME handle multiple children\n\t\t\t\tvnode.text = undefined\n\t\t\t}\n\t\t}\n\t\tupdateAttrs(vnode, old.attrs, vnode.attrs, ns)\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (old.text != null && vnode.text != null && vnode.text !== \"\") {\n\t\t\t\tif (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (old.text != null) old.children = [Vnode(\"#\", undefined, undefined, old.text, undefined, old.dom.firstChild)]\n\t\t\t\tif (vnode.text != null) vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t\tupdateNodes(element, old.children, vnode.children, hooks, null, ns)\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateComponent(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tupdateLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tif (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\telse updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, ns)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.instance.domSize\n\t\t}\n\t\telse if (old.instance != null) {\n\t\t\tremoveNode(parent, old.instance)\n\t\t\tvnode.dom = undefined\n\t\t\tvnode.domSize = 0\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t}\n\t}\n\tfunction getKeyMap(vnodes, start, end) {\n\t\tvar map = Object.create(null)\n\t\tfor (; start < end; start++) {\n\t\t\tvar vnode = vnodes[start]\n\t\t\tif (vnode != null) {\n\t\t\t\tvar key = vnode.key\n\t\t\t\tif (key != null) map[key] = start\n\t\t\t}\n\t\t}\n\t\treturn map\n\t}\n\t// Lifted from ivi https://github.com/ivijs/ivi/\n\t// takes a list of unique numbers (-1 is special and can\n\t// occur multiple times) and returns an array with the indices\n\t// of the items that are part of the longest increasing\n\t// subsequece\n\tvar lisTemp = []\n\tfunction makeLisIndices(a) {\n\t\tvar result = [0]\n\t\tvar u = 0, v = 0, i = 0\n\t\tvar il = lisTemp.length = a.length\n\t\tfor (var i = 0; i < il; i++) lisTemp[i] = a[i]\n\t\tfor (var i = 0; i < il; ++i) {\n\t\t\tif (a[i] === -1) continue\n\t\t\tvar j = result[result.length - 1]\n\t\t\tif (a[j] < a[i]) {\n\t\t\t\tlisTemp[i] = j\n\t\t\t\tresult.push(i)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tu = 0\n\t\t\tv = result.length - 1\n\t\t\twhile (u < v) {\n\t\t\t\t// Fast integer average without overflow.\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tvar c = (u >>> 1) + (v >>> 1) + (u & v & 1)\n\t\t\t\tif (a[result[c]] < a[i]) {\n\t\t\t\t\tu = c + 1\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tv = c\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a[i] < a[result[u]]) {\n\t\t\t\tif (u > 0) lisTemp[i] = result[u - 1]\n\t\t\t\tresult[u] = i\n\t\t\t}\n\t\t}\n\t\tu = result.length\n\t\tv = result[u - 1]\n\t\twhile (u-- > 0) {\n\t\t\tresult[u] = v\n\t\t\tv = lisTemp[v]\n\t\t}\n\t\tlisTemp.length = 0\n\t\treturn result\n\t}\n\n\tfunction getNextSibling(vnodes, i, nextSibling) {\n\t\tfor (; i < vnodes.length; i++) {\n\t\t\tif (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom\n\t\t}\n\t\treturn nextSibling\n\t}\n\n\t// This covers a really specific edge case:\n\t// - Parent node is keyed and contains child\n\t// - Child is removed, returns unresolved promise in `onbeforeremove`\n\t// - Parent node is moved in keyed diff\n\t// - Remaining children still need moved appropriately\n\t//\n\t// Ideally, I'd track removed nodes as well, but that introduces a lot more\n\t// complexity and I'm not exactly interested in doing that.\n\tfunction moveNodes(parent, vnode, nextSibling) {\n\t\tvar frag = $doc.createDocumentFragment()\n\t\tmoveChildToFrag(parent, frag, vnode)\n\t\tinsertNode(parent, frag, nextSibling)\n\t}\n\tfunction moveChildToFrag(parent, frag, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\t\t\tfrag.appendChild(vnode.instance[i])\n\t\t\t\t}\n\t\t\t} else if (vnode.tag !== \"[\") {\n\t\t\t\t// Don't recurse for text nodes *or* elements, just fragments\n\t\t\t\tfrag.appendChild(vnode.dom)\n\t\t\t} else if (vnode.children.length === 1) {\n\t\t\t\tvnode = vnode.children[0]\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else {\n\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\tif (child != null) moveChildToFrag(parent, frag, child)\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tfunction insertNode(parent, dom, nextSibling) {\n\t\tif (nextSibling != null) parent.insertBefore(dom, nextSibling)\n\t\telse parent.appendChild(dom)\n\t}\n\n\tfunction maybeSetContentEditable(vnode) {\n\t\tif (vnode.attrs == null || (\n\t\t\tvnode.attrs.contenteditable == null && // attribute\n\t\t\tvnode.attrs.contentEditable == null // property\n\t\t)) return false\n\t\tvar children = vnode.children\n\t\tif (children != null && children.length === 1 && children[0].tag === \"<\") {\n\t\t\tvar content = children[0].children\n\t\t\tif (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content\n\t\t}\n\t\telse if (vnode.text != null || children != null && children.length !== 0) throw new Error(\"Child node of a contenteditable must be trusted\")\n\t\treturn true\n\t}\n\n\t//remove\n\tfunction removeNodes(parent, vnodes, start, end) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) removeNode(parent, vnode)\n\t\t}\n\t}\n\tfunction removeNode(parent, vnode) {\n\t\tvar mask = 0\n\t\tvar original = vnode.state\n\t\tvar stateResult, attrsResult\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.state.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\tmask = 1\n\t\t\t\tstateResult = result\n\t\t\t}\n\t\t}\n\t\tif (vnode.attrs && typeof vnode.attrs.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.attrs.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tmask |= 2\n\t\t\t\tattrsResult = result\n\t\t\t}\n\t\t}\n\t\tcheckState(vnode, original)\n\n\t\t// If we can, try to fast-path it and avoid all the overhead of awaiting\n\t\tif (!mask) {\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t} else {\n\t\t\tif (stateResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 1) { mask &= 2; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tstateResult.then(next, next)\n\t\t\t}\n\t\t\tif (attrsResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 2) { mask &= 1; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tattrsResult.then(next, next)\n\t\t\t}\n\t\t}\n\n\t\tfunction reallyRemove() {\n\t\t\tcheckState(vnode, original)\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t}\n\t}\n\tfunction removeHTML(parent, vnode) {\n\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\tparent.removeChild(vnode.instance[i])\n\t\t}\n\t}\n\tfunction removeChild(parent, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tremoveHTML(parent, vnode)\n\t\t\t} else {\n\t\t\t\tif (vnode.tag !== \"[\") {\n\t\t\t\t\tparent.removeChild(vnode.dom)\n\t\t\t\t\tif (!Array.isArray(vnode.children)) break\n\t\t\t\t}\n\t\t\t\tif (vnode.children.length === 1) {\n\t\t\t\t\tvnode = vnode.children[0]\n\t\t\t\t\tif (vnode != null) continue\n\t\t\t\t} else {\n\t\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\t\tif (child != null) removeChild(parent, child)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\tfunction onremove(vnode) {\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onremove === \"function\") callHook.call(vnode.state.onremove, vnode)\n\t\tif (vnode.attrs && typeof vnode.attrs.onremove === \"function\") callHook.call(vnode.attrs.onremove, vnode)\n\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\tif (vnode.instance != null) onremove(vnode.instance)\n\t\t} else {\n\t\t\tvar children = vnode.children\n\t\t\tif (Array.isArray(children)) {\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tvar child = children[i]\n\t\t\t\t\tif (child != null) onremove(child)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//attrs\n\tfunction setAttrs(vnode, attrs, ns) {\n\t\tfor (var key in attrs) {\n\t\t\tsetAttr(vnode, key, null, attrs[key], ns)\n\t\t}\n\t}\n\tfunction setAttr(vnode, key, old, value, ns) {\n\t\tif (key === \"key\" || key === \"is\" || value == null || isLifecycleMethod(key) || (old === value && !isFormAttribute(vnode, key)) && typeof value !== \"object\") return\n\t\tif (key[0] === \"o\" && key[1] === \"n\") return updateEvent(vnode, key, value)\n\t\tif (key.slice(0, 6) === \"xlink:\") vnode.dom.setAttributeNS(\"http://www.w3.org/1999/xlink\", key.slice(6), value)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, value)\n\t\telse if (hasPropertyKey(vnode, key, ns)) {\n\t\t\tif (key === \"value\") {\n\t\t\t\t// Only do the coercion if we're actually going to check the value.\n\t\t\t\t/* eslint-disable no-implicit-coercion */\n\t\t\t\t//setting input[value] to same value by typing on focused element moves cursor to end in Chrome\n\t\t\t\tif ((vnode.tag === \"input\" || vnode.tag === \"textarea\") && vnode.dom.value === \"\" + value && vnode.dom === activeElement()) return\n\t\t\t\t//setting select[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"select\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t//setting option[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"option\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t/* eslint-enable no-implicit-coercion */\n\t\t\t}\n\t\t\t// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.\n\t\t\tif (vnode.tag === \"input\" && key === \"type\") vnode.dom.setAttribute(key, value)\n\t\t\telse vnode.dom[key] = value\n\t\t} else {\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\tif (value) vnode.dom.setAttribute(key, \"\")\n\t\t\t\telse vnode.dom.removeAttribute(key)\n\t\t\t}\n\t\t\telse vnode.dom.setAttribute(key === \"className\" ? \"class\" : key, value)\n\t\t}\n\t}\n\tfunction removeAttr(vnode, key, old, ns) {\n\t\tif (key === \"key\" || key === \"is\" || old == null || isLifecycleMethod(key)) return\n\t\tif (key[0] === \"o\" && key[1] === \"n\" && !isLifecycleMethod(key)) updateEvent(vnode, key, undefined)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, null)\n\t\telse if (\n\t\t\thasPropertyKey(vnode, key, ns)\n\t\t\t&& key !== \"className\"\n\t\t\t&& !(key === \"value\" && (\n\t\t\t\tvnode.tag === \"option\"\n\t\t\t\t|| vnode.tag === \"select\" && vnode.dom.selectedIndex === -1 && vnode.dom === activeElement()\n\t\t\t))\n\t\t\t&& !(vnode.tag === \"input\" && key === \"type\")\n\t\t) {\n\t\t\tvnode.dom[key] = null\n\t\t} else {\n\t\t\tvar nsLastIndex = key.indexOf(\":\")\n\t\t\tif (nsLastIndex !== -1) key = key.slice(nsLastIndex + 1)\n\t\t\tif (old !== false) vnode.dom.removeAttribute(key === \"className\" ? \"class\" : key)\n\t\t}\n\t}\n\tfunction setLateSelectAttrs(vnode, attrs) {\n\t\tif (\"value\" in attrs) {\n\t\t\tif(attrs.value === null) {\n\t\t\t\tif (vnode.dom.selectedIndex !== -1) vnode.dom.value = null\n\t\t\t} else {\n\t\t\t\tvar normalized = \"\" + attrs.value // eslint-disable-line no-implicit-coercion\n\t\t\t\tif (vnode.dom.value !== normalized || vnode.dom.selectedIndex === -1) {\n\t\t\t\t\tvnode.dom.value = normalized\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (\"selectedIndex\" in attrs) setAttr(vnode, \"selectedIndex\", null, attrs.selectedIndex, undefined)\n\t}\n\tfunction updateAttrs(vnode, old, attrs, ns) {\n\t\tif (attrs != null) {\n\t\t\tfor (var key in attrs) {\n\t\t\t\tsetAttr(vnode, key, old && old[key], attrs[key], ns)\n\t\t\t}\n\t\t}\n\t\tvar val\n\t\tif (old != null) {\n\t\t\tfor (var key in old) {\n\t\t\t\tif (((val = old[key]) != null) && (attrs == null || attrs[key] == null)) {\n\t\t\t\t\tremoveAttr(vnode, key, val, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction isFormAttribute(vnode, attr) {\n\t\treturn attr === \"value\" || attr === \"checked\" || attr === \"selectedIndex\" || attr === \"selected\" && vnode.dom === activeElement() || vnode.tag === \"option\" && vnode.dom.parentNode === $doc.activeElement\n\t}\n\tfunction isLifecycleMethod(attr) {\n\t\treturn attr === \"oninit\" || attr === \"oncreate\" || attr === \"onupdate\" || attr === \"onremove\" || attr === \"onbeforeremove\" || attr === \"onbeforeupdate\"\n\t}\n\tfunction hasPropertyKey(vnode, key, ns) {\n\t\t// Filter out namespaced keys\n\t\treturn ns === undefined && (\n\t\t\t// If it's a custom element, just keep it.\n\t\t\tvnode.tag.indexOf(\"-\") > -1 || vnode.attrs != null && vnode.attrs.is ||\n\t\t\t// If it's a normal element, let's try to avoid a few browser bugs.\n\t\t\tkey !== \"href\" && key !== \"list\" && key !== \"form\" && key !== \"width\" && key !== \"height\"// && key !== \"type\"\n\t\t\t// Defer the property check until *after* we check everything.\n\t\t) && key in vnode.dom\n\t}\n\n\t//style\n\tvar uppercaseRegex = /[A-Z]/g\n\tfunction toLowerCase(capital) { return \"-\" + capital.toLowerCase() }\n\tfunction normalizeKey(key) {\n\t\treturn key[0] === \"-\" && key[1] === \"-\" ? key :\n\t\t\tkey === \"cssFloat\" ? \"float\" :\n\t\t\t\tkey.replace(uppercaseRegex, toLowerCase)\n\t}\n\tfunction updateStyle(element, old, style) {\n\t\tif (old === style) {\n\t\t\t// Styles are equivalent, do nothing.\n\t\t} else if (style == null) {\n\t\t\t// New style is missing, just clear it.\n\t\t\telement.style.cssText = \"\"\n\t\t} else if (typeof style !== \"object\") {\n\t\t\t// New style is a string, let engine deal with patching.\n\t\t\telement.style.cssText = style\n\t\t} else if (old == null || typeof old !== \"object\") {\n\t\t\t// `old` is missing or a string, `style` is an object.\n\t\t\telement.style.cssText = \"\"\n\t\t\t// Add new style properties\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null) element.style.setProperty(normalizeKey(key), String(value))\n\t\t\t}\n\t\t} else {\n\t\t\t// Both old & new are (different) objects.\n\t\t\t// Update style properties that have changed\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null && (value = String(value)) !== String(old[key])) {\n\t\t\t\t\telement.style.setProperty(normalizeKey(key), value)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove style properties that no longer exist\n\t\t\tfor (var key in old) {\n\t\t\t\tif (old[key] != null && style[key] == null) {\n\t\t\t\t\telement.style.removeProperty(normalizeKey(key))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Here's an explanation of how this works:\n\t// 1. The event names are always (by design) prefixed by `on`.\n\t// 2. The EventListener interface accepts either a function or an object\n\t// with a `handleEvent` method.\n\t// 3. The object does not inherit from `Object.prototype`, to avoid\n\t// any potential interference with that (e.g. setters).\n\t// 4. The event name is remapped to the handler before calling it.\n\t// 5. In function-based event handlers, `ev.target === this`. We replicate\n\t// that below.\n\t// 6. In function-based event handlers, `return false` prevents the default\n\t// action and stops event propagation. We replicate that below.\n\tfunction EventDict() {\n\t\t// Save this, so the current redraw is correctly tracked.\n\t\tthis._ = currentRedraw\n\t}\n\tEventDict.prototype = Object.create(null)\n\tEventDict.prototype.handleEvent = function (ev) {\n\t\tvar handler = this[\"on\" + ev.type]\n\t\tvar result\n\t\tif (typeof handler === \"function\") result = handler.call(ev.currentTarget, ev)\n\t\telse if (typeof handler.handleEvent === \"function\") handler.handleEvent(ev)\n\t\tif (this._ && ev.redraw !== false) (0, this._)()\n\t\tif (result === false) {\n\t\t\tev.preventDefault()\n\t\t\tev.stopPropagation()\n\t\t}\n\t}\n\n\t//event\n\tfunction updateEvent(vnode, key, value) {\n\t\tif (vnode.events != null) {\n\t\t\tif (vnode.events[key] === value) return\n\t\t\tif (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\t\tif (vnode.events[key] == null) vnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = value\n\t\t\t} else {\n\t\t\t\tif (vnode.events[key] != null) vnode.dom.removeEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = undefined\n\t\t\t}\n\t\t} else if (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\tvnode.events = new EventDict()\n\t\t\tvnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\tvnode.events[key] = value\n\t\t}\n\t}\n\n\t//lifecycle\n\tfunction initLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.oninit === \"function\") callHook.call(source.oninit, vnode)\n\t\tif (typeof source.oncreate === \"function\") hooks.push(callHook.bind(source.oncreate, vnode))\n\t}\n\tfunction updateLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.onupdate === \"function\") hooks.push(callHook.bind(source.onupdate, vnode))\n\t}\n\tfunction shouldNotUpdate(vnode, old) {\n\t\tdo {\n\t\t\tif (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.attrs.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.state.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\treturn false\n\t\t} while (false); // eslint-disable-line no-constant-condition\n\t\tvnode.dom = old.dom\n\t\tvnode.domSize = old.domSize\n\t\tvnode.instance = old.instance\n\t\t// One would think having the actual latest attributes would be ideal,\n\t\t// but it doesn't let us properly diff based on our current internal\n\t\t// representation. We have to save not only the old DOM info, but also\n\t\t// the attributes used to create it, as we diff *that*, not against the\n\t\t// DOM directly (with a few exceptions in `setAttr`). And, of course, we\n\t\t// need to save the children and text as they are conceptually not\n\t\t// unlike special \"attributes\" internally.\n\t\tvnode.attrs = old.attrs\n\t\tvnode.children = old.children\n\t\tvnode.text = old.text\n\t\treturn true\n\t}\n\n\treturn function(dom, vnodes, redraw) {\n\t\tif (!dom) throw new TypeError(\"Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.\")\n\t\tvar hooks = []\n\t\tvar active = activeElement()\n\t\tvar namespace = dom.namespaceURI\n\n\t\t// First time rendering into a node clears it out\n\t\tif (dom.vnodes == null) dom.textContent = \"\"\n\n\t\tvnodes = Vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes])\n\t\tvar prevRedraw = currentRedraw\n\t\ttry {\n\t\t\tcurrentRedraw = typeof redraw === \"function\" ? redraw : undefined\n\t\t\tupdateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === \"http://www.w3.org/1999/xhtml\" ? undefined : namespace)\n\t\t} finally {\n\t\t\tcurrentRedraw = prevRedraw\n\t\t}\n\t\tdom.vnodes = vnodes\n\t\t// `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement\n\t\tif (active != null && activeElement() !== active && typeof active.focus === \"function\") active.focus()\n\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\n\t}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(html) {\n\tif (html == null) html = \"\"\n\treturn Vnode(\"<\", undefined, undefined, html, undefined, undefined)\n}\n","\"use strict\"\n\nfunction Vnode(tag, key, attrs, children, text, dom) {\n\treturn {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: undefined, events: undefined, instance: undefined}\n}\nVnode.normalize = function(node) {\n\tif (Array.isArray(node)) return Vnode(\"[\", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)\n\tif (node == null || typeof node === \"boolean\") return null\n\tif (typeof node === \"object\") return node\n\treturn Vnode(\"#\", undefined, undefined, String(node), undefined, undefined)\n}\nVnode.normalizeChildren = function(input) {\n\tvar children = []\n\tif (input.length) {\n\t\tvar isKeyed = input[0] != null && input[0].key != null\n\t\t// Note: this is a *very* perf-sensitive check.\n\t\t// Fun fact: merging the loop like this is somehow faster than splitting\n\t\t// it, noticeably so.\n\t\tfor (var i = 1; i < input.length; i++) {\n\t\t\tif ((input[i] != null && input[i].key != null) !== isKeyed) {\n\t\t\t\tthrow new TypeError(\"Vnodes must either always have keys or never have keys!\")\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < input.length; i++) {\n\t\t\tchildren[i] = Vnode.normalize(input[i])\n\t\t}\n\t}\n\treturn children\n}\n\nmodule.exports = Vnode\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./promise/promise\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./request/request\")(window, PromisePolyfill, mountRedraw.redraw)\n","\"use strict\"\n\nvar buildPathname = require(\"../pathname/build\")\n\nmodule.exports = function($window, Promise, oncompletion) {\n\tvar callbackCount = 0\n\n\tfunction PromiseProxy(executor) {\n\t\treturn new Promise(executor)\n\t}\n\n\t// In case the global Promise is some userland library's where they rely on\n\t// `foo instanceof this.constructor`, `this.constructor.resolve(value)`, or\n\t// similar. Let's *not* break them.\n\tPromiseProxy.prototype = Promise.prototype\n\tPromiseProxy.__proto__ = Promise // eslint-disable-line no-proto\n\n\tfunction makeRequest(factory) {\n\t\treturn function(url, args) {\n\t\t\tif (typeof url !== \"string\") { args = url; url = url.url }\n\t\t\telse if (args == null) args = {}\n\t\t\tvar promise = new Promise(function(resolve, reject) {\n\t\t\t\tfactory(buildPathname(url, args.params), args, function (data) {\n\t\t\t\t\tif (typeof args.type === \"function\") {\n\t\t\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tdata[i] = new args.type(data[i])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse data = new args.type(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(data)\n\t\t\t\t}, reject)\n\t\t\t})\n\t\t\tif (args.background === true) return promise\n\t\t\tvar count = 0\n\t\t\tfunction complete() {\n\t\t\t\tif (--count === 0 && typeof oncompletion === \"function\") oncompletion()\n\t\t\t}\n\n\t\t\treturn wrap(promise)\n\n\t\t\tfunction wrap(promise) {\n\t\t\t\tvar then = promise.then\n\t\t\t\t// Set the constructor, so engines know to not await or resolve\n\t\t\t\t// this as a native promise. At the time of writing, this is\n\t\t\t\t// only necessary for V8, but their behavior is the correct\n\t\t\t\t// behavior per spec. See this spec issue for more details:\n\t\t\t\t// https://github.com/tc39/ecma262/issues/1577. Also, see the\n\t\t\t\t// corresponding comment in `request/tests/test-request.js` for\n\t\t\t\t// a bit more background on the issue at hand.\n\t\t\t\tpromise.constructor = PromiseProxy\n\t\t\t\tpromise.then = function() {\n\t\t\t\t\tcount++\n\t\t\t\t\tvar next = then.apply(promise, arguments)\n\t\t\t\t\tnext.then(complete, function(e) {\n\t\t\t\t\t\tcomplete()\n\t\t\t\t\t\tif (count === 0) throw e\n\t\t\t\t\t})\n\t\t\t\t\treturn wrap(next)\n\t\t\t\t}\n\t\t\t\treturn promise\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction hasHeader(args, name) {\n\t\tfor (var key in args.headers) {\n\t\t\tif ({}.hasOwnProperty.call(args.headers, key) && name.test(key)) return true\n\t\t}\n\t\treturn false\n\t}\n\n\treturn {\n\t\trequest: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar method = args.method != null ? args.method.toUpperCase() : \"GET\"\n\t\t\tvar body = args.body\n\t\t\tvar assumeJSON = (args.serialize == null || args.serialize === JSON.serialize) && !(body instanceof $window.FormData)\n\t\t\tvar responseType = args.responseType || (typeof args.extract === \"function\" ? \"\" : \"json\")\n\n\t\t\tvar xhr = new $window.XMLHttpRequest(), aborted = false\n\t\t\tvar original = xhr, replacedAbort\n\t\t\tvar abort = xhr.abort\n\n\t\t\txhr.abort = function() {\n\t\t\t\taborted = true\n\t\t\t\tabort.call(this)\n\t\t\t}\n\n\t\t\txhr.open(method, url, args.async !== false, typeof args.user === \"string\" ? args.user : undefined, typeof args.password === \"string\" ? args.password : undefined)\n\n\t\t\tif (assumeJSON && body != null && !hasHeader(args, /^content-type$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (typeof args.deserialize !== \"function\" && !hasHeader(args, /^accept$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\n\t\t\t}\n\t\t\tif (args.withCredentials) xhr.withCredentials = args.withCredentials\n\t\t\tif (args.timeout) xhr.timeout = args.timeout\n\t\t\txhr.responseType = responseType\n\n\t\t\tfor (var key in args.headers) {\n\t\t\t\tif ({}.hasOwnProperty.call(args.headers, key)) {\n\t\t\t\t\txhr.setRequestHeader(key, args.headers[key])\n\t\t\t\t}\n\t\t\t}\n\n\t\t\txhr.onreadystatechange = function(ev) {\n\t\t\t\t// Don't throw errors on xhr.abort().\n\t\t\t\tif (aborted) return\n\n\t\t\t\tif (ev.target.readyState === 4) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar success = (ev.target.status >= 200 && ev.target.status < 300) || ev.target.status === 304 || (/^file:\\/\\//i).test(url)\n\t\t\t\t\t\t// When the response type isn't \"\" or \"text\",\n\t\t\t\t\t\t// `xhr.responseText` is the wrong thing to use.\n\t\t\t\t\t\t// Browsers do the right thing and throw here, and we\n\t\t\t\t\t\t// should honor that and do the right thing by\n\t\t\t\t\t\t// preferring `xhr.response` where possible/practical.\n\t\t\t\t\t\tvar response = ev.target.response, message\n\n\t\t\t\t\t\tif (responseType === \"json\") {\n\t\t\t\t\t\t\t// For IE and Edge, which don't implement\n\t\t\t\t\t\t\t// `responseType: \"json\"`.\n\t\t\t\t\t\t\tif (!ev.target.responseType && typeof args.extract !== \"function\") response = JSON.parse(ev.target.responseText)\n\t\t\t\t\t\t} else if (!responseType || responseType === \"text\") {\n\t\t\t\t\t\t\t// Only use this default if it's text. If a parsed\n\t\t\t\t\t\t\t// document is needed on old IE and friends (all\n\t\t\t\t\t\t\t// unsupported), the user should use a custom\n\t\t\t\t\t\t\t// `config` instead. They're already using this at\n\t\t\t\t\t\t\t// their own risk.\n\t\t\t\t\t\t\tif (response == null) response = ev.target.responseText\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof args.extract === \"function\") {\n\t\t\t\t\t\t\tresponse = args.extract(ev.target, args)\n\t\t\t\t\t\t\tsuccess = true\n\t\t\t\t\t\t} else if (typeof args.deserialize === \"function\") {\n\t\t\t\t\t\t\tresponse = args.deserialize(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (success) resolve(response)\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry { message = ev.target.responseText }\n\t\t\t\t\t\t\tcatch (e) { message = response }\n\t\t\t\t\t\t\tvar error = new Error(message)\n\t\t\t\t\t\t\terror.code = ev.target.status\n\t\t\t\t\t\t\terror.response = response\n\t\t\t\t\t\t\treject(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\treject(e)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof args.config === \"function\") {\n\t\t\t\txhr = args.config(xhr, args, url) || xhr\n\n\t\t\t\t// Propagate the `abort` to any replacement XHR as well.\n\t\t\t\tif (xhr !== original) {\n\t\t\t\t\treplacedAbort = xhr.abort\n\t\t\t\t\txhr.abort = function() {\n\t\t\t\t\t\taborted = true\n\t\t\t\t\t\treplacedAbort.call(this)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (body == null) xhr.send()\n\t\t\telse if (typeof args.serialize === \"function\") xhr.send(args.serialize(body))\n\t\t\telse if (body instanceof $window.FormData) xhr.send(body)\n\t\t\telse xhr.send(JSON.stringify(body))\n\t\t}),\n\t\tjsonp: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar callbackName = args.callbackName || \"_mithril_\" + Math.round(Math.random() * 1e16) + \"_\" + callbackCount++\n\t\t\tvar script = $window.document.createElement(\"script\")\n\t\t\t$window[callbackName] = function(data) {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\tresolve(data)\n\t\t\t}\n\t\t\tscript.onerror = function() {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\treject(new Error(\"JSONP request failed\"))\n\t\t\t}\n\t\t\tscript.src = url + (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") +\n\t\t\t\tencodeURIComponent(args.callbackKey || \"callback\") + \"=\" +\n\t\t\t\tencodeURIComponent(callbackName)\n\t\t\t$window.document.documentElement.appendChild(script)\n\t\t}),\n\t}\n}\n","\"use strict\"\n\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./api/router\")(window, mountRedraw)\n","\"use strict\"\n\nmodule.exports = require(\"./stream/stream\")\n","/* eslint-disable */\n;(function() {\n\"use strict\"\n/* eslint-enable */\nStream.SKIP = {}\nStream.lift = lift\nStream.scan = scan\nStream.merge = merge\nStream.combine = combine\nStream.scanMerge = scanMerge\nStream[\"fantasy-land/of\"] = Stream\n\nvar warnedHalt = false\nObject.defineProperty(Stream, \"HALT\", {\n\tget: function() {\n\t\twarnedHalt || console.log(\"HALT is deprecated and has been renamed to SKIP\");\n\t\twarnedHalt = true\n\t\treturn Stream.SKIP\n\t}\n})\n\nfunction Stream(value) {\n\tvar dependentStreams = []\n\tvar dependentFns = []\n\n\tfunction stream(v) {\n\t\tif (arguments.length && v !== Stream.SKIP) {\n\t\t\tvalue = v\n\t\t\tif (open(stream)) {\n\t\t\t\tstream._changing()\n\t\t\t\tstream._state = \"active\"\n\t\t\t\tdependentStreams.forEach(function(s, i) { s(dependentFns[i](value)) })\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\tstream.constructor = Stream\n\tstream._state = arguments.length && value !== Stream.SKIP ? \"active\" : \"pending\"\n\tstream._parents = []\n\n\tstream._changing = function() {\n\t\tif (open(stream)) stream._state = \"changing\"\n\t\tdependentStreams.forEach(function(s) {\n\t\t\ts._changing()\n\t\t})\n\t}\n\n\tstream._map = function(fn, ignoreInitial) {\n\t\tvar target = ignoreInitial ? Stream() : Stream(fn(value))\n\t\ttarget._parents.push(stream)\n\t\tdependentStreams.push(target)\n\t\tdependentFns.push(fn)\n\t\treturn target\n\t}\n\n\tstream.map = function(fn) {\n\t\treturn stream._map(fn, stream._state !== \"active\")\n\t}\n\n\tvar end\n\tfunction createEnd() {\n\t\tend = Stream()\n\t\tend.map(function(value) {\n\t\t\tif (value === true) {\n\t\t\t\tstream._parents.forEach(function (p) {p._unregisterChild(stream)})\n\t\t\t\tstream._state = \"ended\"\n\t\t\t\tstream._parents.length = dependentStreams.length = dependentFns.length = 0\n\t\t\t}\n\t\t\treturn value\n\t\t})\n\t\treturn end\n\t}\n\n\tstream.toJSON = function() { return value != null && typeof value.toJSON === \"function\" ? value.toJSON() : value }\n\n\tstream[\"fantasy-land/map\"] = stream.map\n\tstream[\"fantasy-land/ap\"] = function(x) { return combine(function(s1, s2) { return s1()(s2()) }, [x, stream]) }\n\n\tstream._unregisterChild = function(child) {\n\t\tvar childIndex = dependentStreams.indexOf(child)\n\t\tif (childIndex !== -1) {\n\t\t\tdependentStreams.splice(childIndex, 1)\n\t\t\tdependentFns.splice(childIndex, 1)\n\t\t}\n\t}\n\n\tObject.defineProperty(stream, \"end\", {\n\t\tget: function() { return end || createEnd() }\n\t})\n\n\treturn stream\n}\n\nfunction combine(fn, streams) {\n\tvar ready = streams.every(function(s) {\n\t\tif (s.constructor !== Stream)\n\t\t\tthrow new Error(\"Ensure that each item passed to stream.combine/stream.merge/lift is a stream\")\n\t\treturn s._state === \"active\"\n\t})\n\tvar stream = ready\n\t\t? Stream(fn.apply(null, streams.concat([streams])))\n\t\t: Stream()\n\n\tvar changed = []\n\n\tvar mappers = streams.map(function(s) {\n\t\treturn s._map(function(value) {\n\t\t\tchanged.push(s)\n\t\t\tif (ready || streams.every(function(s) { return s._state !== \"pending\" })) {\n\t\t\t\tready = true\n\t\t\t\tstream(fn.apply(null, streams.concat([changed])))\n\t\t\t\tchanged = []\n\t\t\t}\n\t\t\treturn value\n\t\t}, true)\n\t})\n\n\tvar endStream = stream.end.map(function(value) {\n\t\tif (value === true) {\n\t\t\tmappers.forEach(function(mapper) { mapper.end(true) })\n\t\t\tendStream.end(true)\n\t\t}\n\t\treturn undefined\n\t})\n\n\treturn stream\n}\n\nfunction merge(streams) {\n\treturn combine(function() { return streams.map(function(s) { return s() }) }, streams)\n}\n\nfunction scan(fn, acc, origin) {\n\tvar stream = origin.map(function(v) {\n\t\tvar next = fn(acc, v)\n\t\tif (next !== Stream.SKIP) acc = next\n\t\treturn next\n\t})\n\tstream(acc)\n\treturn stream\n}\n\nfunction scanMerge(tuples, seed) {\n\tvar streams = tuples.map(function(tuple) { return tuple[0] })\n\n\tvar stream = combine(function() {\n\t\tvar changed = arguments[arguments.length - 1]\n\t\tstreams.forEach(function(stream, i) {\n\t\t\tif (changed.indexOf(stream) > -1)\n\t\t\t\tseed = tuples[i][1](seed, stream())\n\t\t})\n\n\t\treturn seed\n\t}, streams)\n\n\tstream(seed)\n\n\treturn stream\n}\n\nfunction lift() {\n\tvar fn = arguments[0]\n\tvar streams = Array.prototype.slice.call(arguments, 1)\n\treturn merge(streams).map(function(streams) {\n\t\treturn fn.apply(undefined, streams)\n\t})\n}\n\nfunction open(s) {\n\treturn s._state === \"pending\" || s._state === \"active\" || s._state === \"changing\"\n}\n\nif (typeof module !== \"undefined\") module[\"exports\"] = Stream\nelse if (typeof window.m === \"function\" && !(\"stream\" in window.m)) window.m.stream = Stream\nelse window.m = {stream : Stream}\n\n}());\n","export default typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n","import isBrowser from './isBrowser';\n\nconst timeoutDuration = (function(){\n const longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n for (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n return 1;\n }\n }\n return 0;\n}());\n\nexport function microtaskDebounce(fn) {\n let called = false\n return () => {\n if (called) {\n return\n }\n called = true\n window.Promise.resolve().then(() => {\n called = false\n fn()\n })\n }\n}\n\nexport function taskDebounce(fn) {\n let scheduled = false;\n return () => {\n if (!scheduled) {\n scheduled = true;\n setTimeout(() => {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nconst supportsMicroTasks = isBrowser && window.Promise\n\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nexport default (supportsMicroTasks\n ? microtaskDebounce\n : taskDebounce);\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nexport default function getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n const window = element.ownerDocument.defaultView;\n const css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n","/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nexport default function getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nexport default function getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body\n case '#document':\n return element.body\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n","/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\nexport default function getReferenceNode(reference) {\n return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n","import isBrowser from './isBrowser';\n\nconst isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nconst isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nexport default function isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nexport default function getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n const noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n let offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n const nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (\n ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&\n getStyleComputedProperty(offsetParent, 'position') === 'static'\n ) {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n","import getOffsetParent from './getOffsetParent';\n\nexport default function isOffsetContainer(element) {\n const { nodeName } = element;\n if (nodeName === 'BODY') {\n return false;\n }\n return (\n nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element\n );\n}\n","/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nexport default function getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n","import isOffsetContainer from './isOffsetContainer';\nimport getRoot from './getRoot';\nimport getOffsetParent from './getOffsetParent';\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nexport default function findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n const order =\n element1.compareDocumentPosition(element2) &\n Node.DOCUMENT_POSITION_FOLLOWING;\n const start = order ? element1 : element2;\n const end = order ? element2 : element1;\n\n // Get common ancestor container\n const range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n const { commonAncestorContainer } = range;\n\n // Both nodes are inside #document\n if (\n (element1 !== commonAncestorContainer &&\n element2 !== commonAncestorContainer) ||\n start.contains(end)\n ) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n const element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n","/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nexport default function getScroll(element, side = 'top') {\n const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n const nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n const html = element.ownerDocument.documentElement;\n const scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n","import getScroll from './getScroll';\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nexport default function includeScroll(rect, element, subtract = false) {\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n const modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n","/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nexport default function getBordersSize(styles, axis) {\n const sideA = axis === 'x' ? 'Left' : 'Top';\n const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return (\n parseFloat(styles[`border${sideA}Width`]) +\n parseFloat(styles[`border${sideB}Width`])\n );\n}\n","import isIE from './isIE';\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(\n body[`offset${axis}`],\n body[`scroll${axis}`],\n html[`client${axis}`],\n html[`offset${axis}`],\n html[`scroll${axis}`],\n isIE(10)\n ? (parseInt(html[`offset${axis}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`]))\n : 0 \n );\n}\n\nexport default function getWindowSizes(document) {\n const body = document.body;\n const html = document.documentElement;\n const computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle),\n };\n}\n","/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nexport default function getClientRect(offsets) {\n return {\n ...offsets,\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height,\n };\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getBordersSize from './getBordersSize';\nimport getWindowSizes from './getWindowSizes';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\nimport isIE from './isIE';\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nexport default function getBoundingClientRect(element) {\n let rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n }\n else {\n rect = element.getBoundingClientRect();\n }\n }\n catch(e){}\n\n const result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n };\n\n // subtract scrollbar size from sizes\n const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n const width =\n sizes.width || element.clientWidth || result.width;\n const height =\n sizes.height || element.clientHeight || result.height;\n\n let horizScrollbar = element.offsetWidth - width;\n let vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n const styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport includeScroll from './includeScroll';\nimport getScrollParent from './getScrollParent';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport runIsIE from './isIE';\nimport getClientRect from './getClientRect';\n\nexport default function getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition = false) {\n const isIE10 = runIsIE(10);\n const isHTML = parent.nodeName === 'HTML';\n const childrenRect = getBoundingClientRect(children);\n const parentRect = getBoundingClientRect(parent);\n const scrollParent = getScrollParent(children);\n\n const styles = getStyleComputedProperty(parent);\n const borderTopWidth = parseFloat(styles.borderTopWidth);\n const borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if(fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n let offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height,\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n const marginTop = parseFloat(styles.marginTop);\n const marginLeft = parseFloat(styles.marginLeft);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (\n isIE10 && !fixedPosition\n ? parent.contains(scrollParent)\n : parent === scrollParent && scrollParent.nodeName !== 'BODY'\n ) {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n","import getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\n\nexport default function getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll = false) {\n const html = element.ownerDocument.documentElement;\n const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n const width = Math.max(html.clientWidth, window.innerWidth || 0);\n const height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n const scrollTop = !excludeScroll ? getScroll(html) : 0;\n const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n const offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width,\n height,\n };\n\n return getClientRect(offset);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nexport default function isFixed(element) {\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n const parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nexport default function getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n let el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n\n}\n","import getScrollParent from './getScrollParent';\nimport getParentNode from './getParentNode';\nimport getReferenceNode from './getReferenceNode';\nimport findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getViewportOffsetRectRelativeToArtbitraryNode from './getViewportOffsetRectRelativeToArtbitraryNode';\nimport getWindowSizes from './getWindowSizes';\nimport isFixed from './isFixed';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nexport default function getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement,\n fixedPosition = false\n) {\n // NOTE: 1 DOM access here\n\n let boundaries = { top: 0, left: 0 };\n const offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n // Handle viewport case\n if (boundariesElement === 'viewport' ) {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n }\n\n else {\n // Handle other cases based on DOM element used as boundaries\n let boundariesNode;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n const offsets = getOffsetRectRelativeToArbitraryNode(\n boundariesNode,\n offsetParent,\n fixedPosition\n );\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n const { height, width } = getWindowSizes(popper.ownerDocument);\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n const isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0; \n boundaries.top += isPaddingNumber ? padding : padding.top || 0; \n boundaries.right -= isPaddingNumber ? padding : padding.right || 0; \n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; \n\n return boundaries;\n}\n","import getBoundaries from '../utils/getBoundaries';\n\nfunction getArea({ width, height }) {\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeAutoPlacement(\n placement,\n refRect,\n popper,\n reference,\n boundariesElement,\n padding = 0\n) {\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n const boundaries = getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement\n );\n\n const rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top,\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height,\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom,\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height,\n },\n };\n\n const sortedAreas = Object.keys(rects)\n .map(key => ({\n key,\n ...rects[key],\n area: getArea(rects[key]),\n }))\n .sort((a, b) => b.area - a.area);\n\n const filteredAreas = sortedAreas.filter(\n ({ width, height }) =>\n width >= popper.clientWidth && height >= popper.clientHeight\n );\n\n const computedPlacement = filteredAreas.length > 0\n ? filteredAreas[0].key\n : sortedAreas[0].key;\n\n const variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? `-${variation}` : '');\n}\n","import findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\nimport getReferenceNode from './getReferenceNode';\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nexport default function getReferenceOffsets(state, popper, reference, fixedPosition = null) {\n const commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n","/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nexport default function getOuterSizes(element) {\n const window = element.ownerDocument.defaultView;\n const styles = window.getComputedStyle(element);\n const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n const result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x,\n };\n return result;\n}\n","/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nexport default function getOppositePlacement(placement) {\n const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);\n}\n","import getOuterSizes from './getOuterSizes';\nimport getOppositePlacement from './getOppositePlacement';\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nexport default function getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n const popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n const popperOffsets = {\n width: popperRect.width,\n height: popperRect.height,\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n const mainSide = isHoriz ? 'top' : 'left';\n const secondarySide = isHoriz ? 'left' : 'top';\n const measurement = isHoriz ? 'height' : 'width';\n const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] =\n referenceOffsets[mainSide] +\n referenceOffsets[measurement] / 2 -\n popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] =\n referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] =\n referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n","/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n","import find from './find';\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(cur => cur[prop] === value);\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n const match = find(arr, obj => obj[prop] === value);\n return arr.indexOf(match);\n}\n","import isFunction from './isFunction';\nimport findIndex from './findIndex';\nimport getClientRect from '../utils/getClientRect';\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nexport default function runModifiers(modifiers, data, ends) {\n const modifiersToRun = ends === undefined\n ? modifiers\n : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(modifier => {\n if (modifier['function']) { // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n const fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n","import computeAutoPlacement from '../utils/computeAutoPlacement';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.<br />\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nexport default function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n let data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {},\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(\n this.state,\n this.popper,\n this.reference,\n this.options.positionFixed\n );\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(\n this.options.placement,\n data.offsets.reference,\n this.popper,\n this.reference,\n this.options.modifiers.flip.boundariesElement,\n this.options.modifiers.flip.padding\n );\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(\n this.popper,\n data.offsets.reference,\n data.placement\n );\n\n data.offsets.popper.position = this.options.positionFixed\n ? 'fixed'\n : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n","/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nexport default function isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(\n ({ name, enabled }) => enabled && name === modifierName\n );\n}\n","/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nexport default function getSupportedPropertyName(property) {\n const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n const upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (let i = 0; i < prefixes.length; i++) {\n const prefix = prefixes[i];\n const toCheck = prefix ? `${prefix}${upperProp}` : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n","import isModifierEnabled from '../utils/isModifierEnabled';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nexport default function destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicitly asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n","/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nexport default function getWindow(element) {\n const ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n","import getScrollParent from './getScrollParent';\nimport getWindow from './getWindow';\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n const isBody = scrollParent.nodeName === 'BODY';\n const target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(\n getScrollParent(target.parentNode),\n event,\n callback,\n scrollParents\n );\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function setupEventListeners(\n reference,\n options,\n state,\n updateBound\n) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n const scrollElement = getScrollParent(reference);\n attachToScrollParents(\n scrollElement,\n 'scroll',\n state.updateBound,\n state.scrollParents\n );\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n","import setupEventListeners from '../utils/setupEventListeners';\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nexport default function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(\n this.reference,\n this.options,\n this.state,\n this.scheduleUpdate\n );\n }\n}\n","import getWindow from './getWindow';\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(target => {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n","import removeEventListeners from '../utils/removeEventListeners';\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nexport default function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n","/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nexport default function isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n","import isNumeric from './isNumeric';\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setStyles(element, styles) {\n Object.keys(styles).forEach(prop => {\n let unit = '';\n // add unit if the value is numeric and is one of the following\n if (\n ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !==\n -1 &&\n isNumeric(styles[prop])\n ) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n","/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function(prop) {\n const value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n","import setStyles from '../utils/setStyles';\nimport setAttributes from '../utils/setAttributes';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport computeAutoPlacement from '../utils/computeAutoPlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nexport default function applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nexport function applyStyleOnLoad(\n reference,\n popper,\n options,\n modifierOptions,\n state\n) {\n // compute reference element offsets\n const referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n const placement = computeAutoPlacement(\n options.placement,\n referenceOffsets,\n popper,\n reference,\n options.modifiers.flip.boundariesElement,\n options.modifiers.flip.padding\n );\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n","/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nexport default function getRoundedOffsets(data, shouldRound) {\n const { popper, reference } = data.offsets;\n const { round, floor } = Math;\n const noRound = v => v;\n \n const referenceWidth = round(reference.width);\n const popperWidth = round(popper.width);\n \n const isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n const isVariation = data.placement.indexOf('-') !== -1;\n const sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n const bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n const horizontalToInteger = !shouldRound\n ? noRound\n : isVertical || isVariation || sameWidthParity\n ? round\n : floor;\n const verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(\n bothOddWidth && !isVariation && shouldRound\n ? popper.left - 1\n : popper.left\n ),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right),\n };\n}\n","import getSupportedPropertyName from '../utils/getSupportedPropertyName';\nimport find from '../utils/find';\nimport getOffsetParent from '../utils/getOffsetParent';\nimport getBoundingClientRect from '../utils/getBoundingClientRect';\nimport getRoundedOffsets from '../utils/getRoundedOffsets';\nimport isBrowser from '../utils/isBrowser';\n\nconst isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeStyle(data, options) {\n const { x, y } = options;\n const { popper } = data.offsets;\n\n // Remove this legacy support in Popper.js v2\n const legacyGpuAccelerationOption = find(\n data.instance.modifiers,\n modifier => modifier.name === 'applyStyle'\n ).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn(\n 'WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'\n );\n }\n const gpuAcceleration =\n legacyGpuAccelerationOption !== undefined\n ? legacyGpuAccelerationOption\n : options.gpuAcceleration;\n\n const offsetParent = getOffsetParent(data.instance.popper);\n const offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n const styles = {\n position: popper.position,\n };\n\n const offsets = getRoundedOffsets(\n data,\n window.devicePixelRatio < 2 || !isFirefox\n );\n\n const sideA = x === 'bottom' ? 'top' : 'bottom';\n const sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n const prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n let left, top;\n if (sideA === 'bottom') {\n // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = `translate3d(${left}px, ${top}px, 0)`;\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n const invertTop = sideA === 'bottom' ? -1 : 1;\n const invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = `${sideA}, ${sideB}`;\n }\n\n // Attributes\n const attributes = {\n 'x-placement': data.placement,\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = { ...attributes, ...data.attributes };\n data.styles = { ...styles, ...data.styles };\n data.arrowStyles = { ...data.offsets.arrow, ...data.arrowStyles };\n\n return data;\n}\n","import find from './find';\n\n/**\n * Helper used to know if the given modifier depends from another one.<br />\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nexport default function isModifierRequired(\n modifiers,\n requestingName,\n requestedName\n) {\n const requesting = find(modifiers, ({ name }) => name === requestingName);\n\n const isRequired =\n !!requesting &&\n modifiers.some(modifier => {\n return (\n modifier.name === requestedName &&\n modifier.enabled &&\n modifier.order < requesting.order\n );\n });\n\n if (!isRequired) {\n const requesting = `\\`${requestingName}\\``;\n const requested = `\\`${requestedName}\\``;\n console.warn(\n `${requested} modifier is required by ${requesting} modifier in order to work, be sure to include it before ${requesting}!`\n );\n }\n return isRequired;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOuterSizes from '../utils/getOuterSizes';\nimport isModifierRequired from '../utils/isModifierRequired';\nimport getStyleComputedProperty from '../utils/getStyleComputedProperty';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function arrow(data, options) {\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n let arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn(\n 'WARNING: `arrow.element` must be child of its popper element!'\n );\n return data;\n }\n }\n\n const placement = data.placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n const len = isVertical ? 'height' : 'width';\n const sideCapitalized = isVertical ? 'Top' : 'Left';\n const side = sideCapitalized.toLowerCase();\n const altSide = isVertical ? 'left' : 'top';\n const opSide = isVertical ? 'bottom' : 'right';\n const arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -=\n popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] +=\n reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n const center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n const css = getStyleComputedProperty(data.instance.popper);\n const popperMarginSide = parseFloat(css[`margin${sideCapitalized}`]);\n const popperBorderSide = parseFloat(css[`border${sideCapitalized}Width`]);\n let sideValue =\n center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = {\n [side]: Math.round(sideValue),\n [altSide]: '', // make sure to unset any eventual altSide value from the DOM node\n };\n\n return data;\n}\n","/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nexport default function getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n","/**\n * List of accepted placements to use as values of the `placement` option.<br />\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.<br />\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nexport default [\n 'auto-start',\n 'auto',\n 'auto-end',\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\n","import placements from '../methods/placements';\n\n// Get rid of `auto` `auto-start` and `auto-end`\nconst validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nexport default function clockwise(placement, counter = false) {\n const index = validPlacements.indexOf(placement);\n const arr = validPlacements\n .slice(index + 1)\n .concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n","import getOppositePlacement from '../utils/getOppositePlacement';\nimport getOppositeVariation from '../utils/getOppositeVariation';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\nimport getBoundaries from '../utils/getBoundaries';\nimport isModifierEnabled from '../utils/isModifierEnabled';\nimport clockwise from '../utils/clockwise';\n\nconst BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise',\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n options.boundariesElement,\n data.positionFixed\n );\n\n let placement = data.placement.split('-')[0];\n let placementOpposite = getOppositePlacement(placement);\n let variation = data.placement.split('-')[1] || '';\n\n let flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach((step, index) => {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n const popperOffsets = data.offsets.popper;\n const refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n const floor = Math.floor;\n const overlapsRef =\n (placement === 'left' &&\n floor(popperOffsets.right) > floor(refOffsets.left)) ||\n (placement === 'right' &&\n floor(popperOffsets.left) < floor(refOffsets.right)) ||\n (placement === 'top' &&\n floor(popperOffsets.bottom) > floor(refOffsets.top)) ||\n (placement === 'bottom' &&\n floor(popperOffsets.top) < floor(refOffsets.bottom));\n\n const overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n const overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n const overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n const overflowsBottom =\n floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n const overflowsBoundaries =\n (placement === 'left' && overflowsLeft) ||\n (placement === 'right' && overflowsRight) ||\n (placement === 'top' && overflowsTop) ||\n (placement === 'bottom' && overflowsBottom);\n\n // flip the variation if required\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n const flippedVariationByRef =\n !!options.flipVariations &&\n ((isVertical && variation === 'start' && overflowsLeft) ||\n (isVertical && variation === 'end' && overflowsRight) ||\n (!isVertical && variation === 'start' && overflowsTop) ||\n (!isVertical && variation === 'end' && overflowsBottom));\n\n // flips variation if popper content overflows boundaries\n const flippedVariationByContent =\n !!options.flipVariationsByContent &&\n ((isVertical && variation === 'start' && overflowsRight) ||\n (isVertical && variation === 'end' && overflowsLeft) ||\n (!isVertical && variation === 'start' && overflowsBottom) ||\n (!isVertical && variation === 'end' && overflowsTop));\n\n const flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = {\n ...data.offsets.popper,\n ...getPopperOffsets(\n data.instance.popper,\n data.offsets.reference,\n data.placement\n ),\n };\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function keepTogether(data) {\n const { popper, reference } = data.offsets;\n const placement = data.placement.split('-')[0];\n const floor = Math.floor;\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n const side = isVertical ? 'right' : 'bottom';\n const opSide = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] =\n floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n","import isNumeric from '../utils/isNumeric';\nimport getClientRect from '../utils/getClientRect';\nimport find from '../utils/find';\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nexport function toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n const split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n const value = +split[1];\n const unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n let element;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n const rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n let size;\n if (unit === 'vh') {\n size = Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n );\n } else {\n size = Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n );\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nexport function parseOffset(\n offset,\n popperOffsets,\n referenceOffsets,\n basePlacement\n) {\n const offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n const useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n const fragments = offset.split(/(\\+|\\-)/).map(frag => frag.trim());\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n const divider = fragments.indexOf(\n find(fragments, frag => frag.search(/,|\\s/) !== -1)\n );\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn(\n 'Offsets separated by white space(s) are deprecated, use a comma (,) instead.'\n );\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n const splitRegex = /\\s*,\\s*|\\s+/;\n let ops = divider !== -1\n ? [\n fragments\n .slice(0, divider)\n .concat([fragments[divider].split(splitRegex)[0]]),\n [fragments[divider].split(splitRegex)[1]].concat(\n fragments.slice(divider + 1)\n ),\n ]\n : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map((op, index) => {\n // Most of the units rely on the orientation of the popper\n const measurement = (index === 1 ? !useHeight : useHeight)\n ? 'height'\n : 'width';\n let mergeWithPrevious = false;\n return (\n op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce((a, b) => {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(str => toValue(str, measurement, popperOffsets, referenceOffsets))\n );\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach((op, index) => {\n op.forEach((frag, index2) => {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nexport default function offset(data, { offset }) {\n const { placement, offsets: { popper, reference } } = data;\n const basePlacement = placement.split('-')[0];\n\n let offsets;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n","import getOffsetParent from '../utils/getOffsetParent';\nimport getBoundaries from '../utils/getBoundaries';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function preventOverflow(data, options) {\n let boundariesElement =\n options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n const transformProp = getSupportedPropertyName('transform');\n const popperStyles = data.instance.popper.style; // assignment to help minification\n const { top, left, [transformProp]: transform } = popperStyles;\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n boundariesElement,\n data.positionFixed\n );\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n const order = options.priority;\n let popper = data.offsets.popper;\n\n const check = {\n primary(placement) {\n let value = popper[placement];\n if (\n popper[placement] < boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return { [placement]: value };\n },\n secondary(placement) {\n const mainSide = placement === 'right' ? 'left' : 'top';\n let value = popper[mainSide];\n if (\n popper[placement] > boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.min(\n popper[mainSide],\n boundaries[placement] -\n (placement === 'right' ? popper.width : popper.height)\n );\n }\n return { [mainSide]: value };\n },\n };\n\n order.forEach(placement => {\n const side =\n ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = { ...popper, ...check[side](placement) };\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function shift(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n const { reference, popper } = data.offsets;\n const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n const side = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n const shiftOffsets = {\n start: { [side]: reference[side] },\n end: {\n [side]: reference[side] + reference[measurement] - popper[measurement],\n },\n };\n\n data.offsets.popper = { ...popper, ...shiftOffsets[shiftvariation] };\n }\n\n return data;\n}\n","import isModifierRequired from '../utils/isModifierRequired';\nimport find from '../utils/find';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n const refRect = data.offsets.reference;\n const bound = find(\n data.instance.modifiers,\n modifier => modifier.name === 'preventOverflow'\n ).boundaries;\n\n if (\n refRect.bottom < bound.top ||\n refRect.left > bound.right ||\n refRect.top > bound.bottom ||\n refRect.right < bound.left\n ) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOppositePlacement from '../utils/getOppositePlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function inner(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n const subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] =\n reference[basePlacement] -\n (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n","import applyStyle, { applyStyleOnLoad } from './applyStyle';\nimport computeStyle from './computeStyle';\nimport arrow from './arrow';\nimport flip from './flip';\nimport keepTogether from './keepTogether';\nimport offset from './offset';\nimport preventOverflow from './preventOverflow';\nimport shift from './shift';\nimport hide from './hide';\nimport inner from './inner';\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.<br />\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.<br />\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nexport default {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.<br />\n * It will read the variation of the `placement` property.<br />\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift,\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.<br />\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.<br />\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.<br />\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0,\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.<br />\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".<br />\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent',\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether,\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]',\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false,\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner,\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide,\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right',\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined,\n },\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n","import modifiers from '../modifiers/index';\n\n/**\n * Default options provided to Popper.js constructor.<br />\n * These can be overridden using the `options` argument of Popper.js.<br />\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nexport default {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.<br />\n * By default, it is set to no-op.<br />\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: () => {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.<br />\n * By default, it is set to no-op.<br />\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: () => {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers,\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n","import Popper from 'popper.js';\nimport isFunction from '../../popper/src/utils/isFunction';\n\nconst DEFAULT_OPTIONS = {\n container: false,\n delay: 0,\n html: false,\n placement: 'top',\n title: '',\n template:\n '<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',\n trigger: 'hover focus',\n offset: 0,\n arrowSelector: '.tooltip-arrow, .tooltip__arrow',\n innerSelector: '.tooltip-inner, .tooltip__inner',\n};\n\nexport default class Tooltip {\n /**\n * Create a new Tooltip.js instance\n * @class Tooltip\n * @param {HTMLElement} reference - The DOM node used as reference of the tooltip (it can be a jQuery element).\n * @param {Object} options\n * @param {String} options.placement='top'\n * Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -end),\n * left(-start, -end)`\n * @param {String} [options.arrowSelector='.tooltip-arrow, .tooltip__arrow'] - className used to locate the DOM arrow element in the tooltip.\n * @param {String} [options.innerSelector='.tooltip-inner, .tooltip__inner'] - className used to locate the DOM inner element in the tooltip.\n * @param {HTMLElement|String|false} options.container=false - Append the tooltip to a specific element.\n * @param {Number|Object} options.delay=0\n * Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type.\n * If a number is supplied, delay is applied to both hide/show.\n * Object structure is: `{ show: 500, hide: 100 }`\n * @param {Boolean} options.html=false - Insert HTML into the tooltip. If false, the content will inserted with `textContent`.\n * @param {String} [options.template='<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>']\n * Base HTML to used when creating the tooltip.\n * The tooltip's `title` will be injected into the `.tooltip-inner` or `.tooltip__inner`.\n * `.tooltip-arrow` or `.tooltip__arrow` will become the tooltip's arrow.\n * The outermost wrapper element should have the `.tooltip` class.\n * @param {String|HTMLElement|TitleFunction} options.title='' - Default title value if `title` attribute isn't present.\n * @param {String} [options.trigger='hover focus']\n * How tooltip is triggered - click, hover, focus, manual.\n * You may pass multiple triggers; separate them with a space. `manual` cannot be combined with any other trigger.\n * @param {Boolean} options.closeOnClickOutside=false - Close a popper on click outside of the popper and reference element. This has effect only when options.trigger is 'click'.\n * @param {String|HTMLElement} options.boundariesElement\n * The element used as boundaries for the tooltip. For more information refer to Popper.js'\n * [boundariesElement docs](https://popper.js.org/popper-documentation.html)\n * @param {Number|String} options.offset=0 - Offset of the tooltip relative to its reference. For more information refer to Popper.js'\n * [offset docs](https://popper.js.org/popper-documentation.html)\n * @param {Object} options.popperOptions={} - Popper options, will be passed directly to popper instance. For more information refer to Popper.js'\n * [options docs](https://popper.js.org/popper-documentation.html)\n * @return {Object} instance - The generated tooltip instance\n */\n constructor(reference, options) {\n // apply user options over default ones\n options = { ...DEFAULT_OPTIONS, ...options };\n\n reference.jquery && (reference = reference[0]);\n\n // cache reference and options\n this.reference = reference;\n this.options = options;\n\n // get events list\n const events =\n typeof options.trigger === 'string'\n ? options.trigger\n .split(' ')\n .filter(\n trigger => ['click', 'hover', 'focus'].indexOf(trigger) !== -1\n )\n : [];\n\n // set initial state\n this._isOpen = false;\n this._popperOptions = {};\n\n // set event listeners\n this._setEventListeners(reference, events, options);\n }\n\n //\n // Public methods\n //\n\n /**\n * Reveals an element's tooltip. This is considered a \"manual\" triggering of the tooltip.\n * Tooltips with zero-length titles are never displayed.\n * @method Tooltip#show\n * @memberof Tooltip\n */\n show = () => this._show(this.reference, this.options);\n\n /**\n * Hides an elements tooltip. This is considered a “manual” triggering of the tooltip.\n * @method Tooltip#hide\n * @memberof Tooltip\n */\n hide = () => this._hide();\n\n /**\n * Hides and destroys an elements tooltip.\n * @method Tooltip#dispose\n * @memberof Tooltip\n */\n dispose = () => this._dispose();\n\n /**\n * Toggles an elements tooltip. This is considered a “manual” triggering of the tooltip.\n * @method Tooltip#toggle\n * @memberof Tooltip\n */\n toggle = () => {\n if (this._isOpen) {\n return this.hide();\n } else {\n return this.show();\n }\n };\n\n /**\n * Updates the tooltip's title content\n * @method Tooltip#updateTitleContent\n * @memberof Tooltip\n * @param {String|HTMLElement} title - The new content to use for the title\n */\n updateTitleContent = (title) => this._updateTitleContent(title);\n\n //\n // Private methods\n //\n\n _events = [];\n\n /**\n * Creates a new tooltip node\n * @memberof Tooltip\n * @private\n * @param {HTMLElement} reference\n * @param {String} template\n * @param {String|HTMLElement|TitleFunction} title\n * @param {Boolean} allowHtml\n * @return {HTMLElement} tooltipNode\n */\n _create(reference, template, title, allowHtml) {\n // create tooltip element\n const tooltipGenerator = window.document.createElement('div');\n tooltipGenerator.innerHTML = template.trim();\n const tooltipNode = tooltipGenerator.childNodes[0];\n\n // add unique ID to our tooltip (needed for accessibility reasons)\n tooltipNode.id = `tooltip_${Math.random()\n .toString(36)\n .substr(2, 10)}`;\n\n // set initial `aria-hidden` state to `false` (it's visible!)\n tooltipNode.setAttribute('aria-hidden', 'false');\n\n // add title to tooltip\n const titleNode = tooltipGenerator.querySelector(this.options.innerSelector);\n this._addTitleContent(reference, title, allowHtml, titleNode);\n\n // return the generated tooltip node\n return tooltipNode;\n }\n\n _addTitleContent(reference, title, allowHtml, titleNode) {\n if (title.nodeType === 1 || title.nodeType === 11) {\n // if title is a element node or document fragment, append it only if allowHtml is true\n allowHtml && titleNode.appendChild(title);\n } else if (isFunction(title)) {\n // Recursively call ourself so that the return value of the function gets handled appropriately - either\n // as a dom node, a string, or even as another function.\n this._addTitleContent(reference, title.call(reference), allowHtml, titleNode);\n } else {\n // if it's just a simple text, set textContent or innerHtml depending by `allowHtml` value\n allowHtml ? (titleNode.innerHTML = title) : (titleNode.textContent = title);\n }\n }\n\n _show(reference, options) {\n // don't show if it's already visible\n // or if it's not being showed\n if (this._isOpen && !this._isOpening) {\n return this;\n }\n this._isOpen = true;\n\n // if the tooltipNode already exists, just show it\n if (this._tooltipNode) {\n this._tooltipNode.style.visibility = 'visible';\n this._tooltipNode.setAttribute('aria-hidden', 'false');\n this.popperInstance.update();\n return this;\n }\n\n // get title\n const title = reference.getAttribute('title') || options.title;\n\n // don't show tooltip if no title is defined\n if (!title) {\n return this;\n }\n\n // create tooltip node\n const tooltipNode = this._create(\n reference,\n options.template,\n title,\n options.html\n );\n\n // Add `aria-describedby` to our reference element for accessibility reasons\n reference.setAttribute('aria-describedby', tooltipNode.id);\n\n // append tooltip to container\n const container = this._findContainer(options.container, reference);\n\n this._append(tooltipNode, container);\n\n this._popperOptions = {\n ...options.popperOptions,\n placement: options.placement,\n };\n\n this._popperOptions.modifiers = {\n ...this._popperOptions.modifiers,\n arrow: {\n ...(this._popperOptions.modifiers && this._popperOptions.modifiers.arrow),\n element: options.arrowSelector,\n },\n offset: {\n ...(this._popperOptions.modifiers && this._popperOptions.modifiers.offset),\n offset: options.offset ||\n this._popperOptions.modifiers && this._popperOptions.modifiers.offset && this._popperOptions.modifiers.offset.offset ||\n options.offset,\n },\n };\n\n if (options.boundariesElement) {\n this._popperOptions.modifiers.preventOverflow = {\n boundariesElement: options.boundariesElement,\n };\n }\n\n this.popperInstance = new Popper(\n reference,\n tooltipNode,\n this._popperOptions\n );\n\n this._tooltipNode = tooltipNode;\n\n return this;\n }\n\n _hide(/*reference, options*/) {\n // don't hide if it's already hidden\n if (!this._isOpen) {\n return this;\n }\n\n this._isOpen = false;\n\n // hide tooltipNode\n this._tooltipNode.style.visibility = 'hidden';\n this._tooltipNode.setAttribute('aria-hidden', 'true');\n\n return this;\n }\n\n _dispose() {\n // remove event listeners first to prevent any unexpected behaviour\n this._events.forEach(({ func, event }) => {\n this.reference.removeEventListener(event, func);\n });\n this._events = [];\n\n if (this._tooltipNode) {\n this._hide();\n\n // destroy instance\n this.popperInstance.destroy();\n\n // destroy tooltipNode if removeOnDestroy is not set, as popperInstance.destroy() already removes the element\n if (!this.popperInstance.options.removeOnDestroy) {\n this._tooltipNode.parentNode.removeChild(this._tooltipNode);\n this._tooltipNode = null;\n }\n }\n return this;\n }\n\n _findContainer(container, reference) {\n // if container is a query, get the relative element\n if (typeof container === 'string') {\n container = window.document.querySelector(container);\n } else if (container === false) {\n // if container is `false`, set it to reference parent\n container = reference.parentNode;\n }\n return container;\n }\n\n /**\n * Append tooltip to container\n * @memberof Tooltip\n * @private\n * @param {HTMLElement} tooltipNode\n * @param {HTMLElement|String|false} container\n */\n _append(tooltipNode, container) {\n container.appendChild(tooltipNode);\n }\n\n _setEventListeners(reference, events, options) {\n const directEvents = [];\n const oppositeEvents = [];\n\n events.forEach(event => {\n switch (event) {\n case 'hover':\n directEvents.push('mouseenter');\n oppositeEvents.push('mouseleave');\n break;\n case 'focus':\n directEvents.push('focus');\n oppositeEvents.push('blur');\n break;\n case 'click':\n directEvents.push('click');\n oppositeEvents.push('click');\n break;\n }\n });\n\n // schedule show tooltip\n directEvents.forEach(event => {\n const func = evt => {\n if (this._isOpening === true) {\n return;\n }\n evt.usedByTooltip = true;\n this._scheduleShow(reference, options.delay, options, evt);\n };\n this._events.push({ event, func });\n reference.addEventListener(event, func);\n });\n\n // schedule hide tooltip\n oppositeEvents.forEach(event => {\n const func = evt => {\n if (evt.usedByTooltip === true) {\n return;\n }\n this._scheduleHide(reference, options.delay, options, evt);\n };\n this._events.push({ event, func });\n reference.addEventListener(event, func);\n if (event === 'click' && options.closeOnClickOutside) {\n document.addEventListener('mousedown', e => {\n if (!this._isOpening) {\n return;\n }\n const popper = this.popperInstance.popper;\n if (reference.contains(e.target) ||\n popper.contains(e.target)) {\n return;\n }\n func(e);\n }, true);\n }\n });\n }\n\n _scheduleShow(reference, delay, options /*, evt */) {\n this._isOpening = true;\n // defaults to 0\n const computedDelay = (delay && delay.show) || delay || 0;\n this._showTimeout = window.setTimeout(\n () => this._show(reference, options),\n computedDelay\n );\n }\n\n _scheduleHide(reference, delay, options, evt) {\n this._isOpening = false;\n // defaults to 0\n const computedDelay = (delay && delay.hide) || delay || 0;\n window.clearTimeout(this._showTimeout);\n window.setTimeout(() => {\n if (this._isOpen === false) {\n return;\n }\n if (!document.body.contains(this._tooltipNode)) {\n return;\n }\n\n // if we are hiding because of a mouseleave, we must check that the new\n // reference isn't the tooltip, because in this case we don't want to hide it\n if (evt.type === 'mouseleave') {\n const isSet = this._setTooltipNodeEvent(evt, reference, delay, options);\n\n // if we set the new event, don't hide the tooltip yet\n // the new event will take care to hide it if necessary\n if (isSet) {\n return;\n }\n }\n\n this._hide(reference, options);\n }, computedDelay);\n }\n\n _setTooltipNodeEvent = (evt, reference, delay, options) => {\n const relatedreference =\n evt.relatedreference || evt.toElement || evt.relatedTarget;\n\n const callback = evt2 => {\n const relatedreference2 =\n evt2.relatedreference || evt2.toElement || evt2.relatedTarget;\n\n // Remove event listener after call\n this._tooltipNode.removeEventListener(evt.type, callback);\n\n // If the new reference is not the reference element\n if (!reference.contains(relatedreference2)) {\n // Schedule to hide tooltip\n this._scheduleHide(reference, options.delay, options, evt2);\n }\n };\n\n if (this._tooltipNode.contains(relatedreference)) {\n // listen to mouseleave on the tooltip element to be able to hide the tooltip\n this._tooltipNode.addEventListener(evt.type, callback);\n return true;\n }\n\n return false;\n };\n\n _updateTitleContent(title) {\n if(typeof this._tooltipNode === 'undefined') {\n if(typeof this.options.title !== 'undefined') {\n this.options.title = title;\n }\n return;\n }\n const titleNode = this._tooltipNode.querySelector(this.options.innerSelector);\n this._clearTitleContent(titleNode, this.options.html, this.reference.getAttribute('title') || this.options.title)\n this._addTitleContent(this.reference, title, this.options.html, titleNode);\n this.options.title = title;\n this.popperInstance.update();\n }\n\n _clearTitleContent(titleNode, allowHtml, lastTitle) {\n if(lastTitle.nodeType === 1 || lastTitle.nodeType === 11) {\n allowHtml && titleNode.removeChild(lastTitle);\n } else {\n allowHtml ? titleNode.innerHTML = '' : titleNode.textContent = '';\n }\n }\n\n}\n\n/**\n * Title function, its context is the Tooltip instance.\n * @memberof Tooltip\n * @callback TitleFunction\n * @return {String} placement - The desired title.\n */\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 68\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n","var __assign = (this && this.__assign) || function () {\r\n __assign = Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nvar defaults = {\r\n lines: 12,\r\n length: 7,\r\n width: 5,\r\n radius: 10,\r\n scale: 1.0,\r\n corners: 1,\r\n color: '#000',\r\n fadeColor: 'transparent',\r\n animation: 'spinner-line-fade-default',\r\n rotate: 0,\r\n direction: 1,\r\n speed: 1,\r\n zIndex: 2e9,\r\n className: 'spinner',\r\n top: '50%',\r\n left: '50%',\r\n shadow: '0 0 1px transparent',\r\n position: 'absolute',\r\n};\r\nvar Spinner = /** @class */ (function () {\r\n function Spinner(opts) {\r\n if (opts === void 0) { opts = {}; }\r\n this.opts = __assign(__assign({}, defaults), opts);\r\n }\r\n /**\r\n * Adds the spinner to the given target element. If this instance is already\r\n * spinning, it is automatically removed from its previous target by calling\r\n * stop() internally.\r\n */\r\n Spinner.prototype.spin = function (target) {\r\n this.stop();\r\n this.el = document.createElement('div');\r\n this.el.className = this.opts.className;\r\n this.el.setAttribute('role', 'progressbar');\r\n css(this.el, {\r\n position: this.opts.position,\r\n width: 0,\r\n zIndex: this.opts.zIndex,\r\n left: this.opts.left,\r\n top: this.opts.top,\r\n transform: \"scale(\" + this.opts.scale + \")\",\r\n });\r\n if (target) {\r\n target.insertBefore(this.el, target.firstChild || null);\r\n }\r\n drawLines(this.el, this.opts);\r\n return this;\r\n };\r\n /**\r\n * Stops and removes the Spinner.\r\n * Stopped spinners may be reused by calling spin() again.\r\n */\r\n Spinner.prototype.stop = function () {\r\n if (this.el) {\r\n if (typeof requestAnimationFrame !== 'undefined') {\r\n cancelAnimationFrame(this.animateId);\r\n }\r\n else {\r\n clearTimeout(this.animateId);\r\n }\r\n if (this.el.parentNode) {\r\n this.el.parentNode.removeChild(this.el);\r\n }\r\n this.el = undefined;\r\n }\r\n return this;\r\n };\r\n return Spinner;\r\n}());\r\nexport { Spinner };\r\n/**\r\n * Sets multiple style properties at once.\r\n */\r\nfunction css(el, props) {\r\n for (var prop in props) {\r\n el.style[prop] = props[prop];\r\n }\r\n return el;\r\n}\r\n/**\r\n * Returns the line color from the given string or array.\r\n */\r\nfunction getColor(color, idx) {\r\n return typeof color == 'string' ? color : color[idx % color.length];\r\n}\r\n/**\r\n * Internal method that draws the individual lines.\r\n */\r\nfunction drawLines(el, opts) {\r\n var borderRadius = (Math.round(opts.corners * opts.width * 500) / 1000) + 'px';\r\n var shadow = 'none';\r\n if (opts.shadow === true) {\r\n shadow = '0 2px 4px #000'; // default shadow\r\n }\r\n else if (typeof opts.shadow === 'string') {\r\n shadow = opts.shadow;\r\n }\r\n var shadows = parseBoxShadow(shadow);\r\n for (var i = 0; i < opts.lines; i++) {\r\n var degrees = ~~(360 / opts.lines * i + opts.rotate);\r\n var backgroundLine = css(document.createElement('div'), {\r\n position: 'absolute',\r\n top: -opts.width / 2 + \"px\",\r\n width: (opts.length + opts.width) + 'px',\r\n height: opts.width + 'px',\r\n background: getColor(opts.fadeColor, i),\r\n borderRadius: borderRadius,\r\n transformOrigin: 'left',\r\n transform: \"rotate(\" + degrees + \"deg) translateX(\" + opts.radius + \"px)\",\r\n });\r\n var delay = i * opts.direction / opts.lines / opts.speed;\r\n delay -= 1 / opts.speed; // so initial animation state will include trail\r\n var line = css(document.createElement('div'), {\r\n width: '100%',\r\n height: '100%',\r\n background: getColor(opts.color, i),\r\n borderRadius: borderRadius,\r\n boxShadow: normalizeShadow(shadows, degrees),\r\n animation: 1 / opts.speed + \"s linear \" + delay + \"s infinite \" + opts.animation,\r\n });\r\n backgroundLine.appendChild(line);\r\n el.appendChild(backgroundLine);\r\n }\r\n}\r\nfunction parseBoxShadow(boxShadow) {\r\n var regex = /^\\s*([a-zA-Z]+\\s+)?(-?\\d+(\\.\\d+)?)([a-zA-Z]*)\\s+(-?\\d+(\\.\\d+)?)([a-zA-Z]*)(.*)$/;\r\n var shadows = [];\r\n for (var _i = 0, _a = boxShadow.split(','); _i < _a.length; _i++) {\r\n var shadow = _a[_i];\r\n var matches = shadow.match(regex);\r\n if (matches === null) {\r\n continue; // invalid syntax\r\n }\r\n var x = +matches[2];\r\n var y = +matches[5];\r\n var xUnits = matches[4];\r\n var yUnits = matches[7];\r\n if (x === 0 && !xUnits) {\r\n xUnits = yUnits;\r\n }\r\n if (y === 0 && !yUnits) {\r\n yUnits = xUnits;\r\n }\r\n if (xUnits !== yUnits) {\r\n continue; // units must match to use as coordinates\r\n }\r\n shadows.push({\r\n prefix: matches[1] || '',\r\n x: x,\r\n y: y,\r\n xUnits: xUnits,\r\n yUnits: yUnits,\r\n end: matches[8],\r\n });\r\n }\r\n return shadows;\r\n}\r\n/**\r\n * Modify box-shadow x/y offsets to counteract rotation\r\n */\r\nfunction normalizeShadow(shadows, degrees) {\r\n var normalized = [];\r\n for (var _i = 0, shadows_1 = shadows; _i < shadows_1.length; _i++) {\r\n var shadow = shadows_1[_i];\r\n var xy = convertOffset(shadow.x, shadow.y, degrees);\r\n normalized.push(shadow.prefix + xy[0] + shadow.xUnits + ' ' + xy[1] + shadow.yUnits + shadow.end);\r\n }\r\n return normalized.join(', ');\r\n}\r\nfunction convertOffset(x, y, degrees) {\r\n var radians = degrees * Math.PI / 180;\r\n var sin = Math.sin(radians);\r\n var cos = Math.cos(radians);\r\n return [\r\n Math.round((x * cos + y * sin) * 1000) / 1000,\r\n Math.round((-x * sin + y * cos) * 1000) / 1000,\r\n ];\r\n}\r\n","var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","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","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n// The following code is heavily inspired by jQuery's $.fn.data()\n\n;(function($){\n var data = {}, dataAttr = $.fn.data, camelize = $.camelCase,\n exp = $.expando = 'Zepto' + (+new Date()), emptyArray = []\n\n // Get value from node:\n // 1. first try key as given,\n // 2. then try camelized key,\n // 3. fall back to reading \"data-*\" attribute.\n function getData(node, name) {\n var id = node[exp], store = id && data[id]\n if (name === undefined) return store || setData(node)\n else {\n if (store) {\n if (name in store) return store[name]\n var camelName = camelize(name)\n if (camelName in store) return store[camelName]\n }\n return dataAttr.call($(node), name)\n }\n }\n\n // Store value under camelized key on node\n function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }\n\n // Read all \"data-*\" attributes from a node\n function attributeData(node) {\n var store = {}\n $.each(node.attributes || emptyArray, function(i, attr){\n if (attr.name.indexOf('data-') == 0)\n store[camelize(attr.name.replace('data-', ''))] =\n $.zepto.deserializeValue(attr.value)\n })\n return store\n }\n\n $.fn.data = function(name, value) {\n return value === undefined ?\n // set multiple values via object\n $.isPlainObject(name) ?\n this.each(function(i, node){\n $.each(name, function(key, value){ setData(node, key, value) })\n }) :\n // get value from first element\n (0 in this ? getData(this[0], name) : undefined) :\n // set value on all elements\n this.each(function(){ setData(this, name, value) })\n }\n\n $.data = function(elem, name, value) {\n return $(elem).data(name, value)\n }\n\n $.hasData = function(elem) {\n var id = elem[exp], store = id && data[id]\n return store ? !$.isEmptyObject(store) : false\n }\n\n $.fn.removeData = function(names) {\n if (typeof names == 'string') names = names.split(/\\s+/)\n return this.each(function(){\n var id = this[exp], store = id && data[id]\n if (store) $.each(names || store, function(key){\n delete store[names ? camelize(this) : key]\n })\n })\n }\n\n // Generate extended `remove` and `empty` functions\n ;['remove', 'empty'].forEach(function(methodName){\n var origFn = $.fn[methodName]\n $.fn[methodName] = function() {\n var elements = this.find('*')\n if (methodName === 'remove') elements = elements.add(this)\n elements.removeData()\n return origFn.call(this)\n }\n })\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($, undefined){\n var prefix = '', eventPrefix,\n vendors = { Webkit: 'webkit', Moz: '', O: 'o' },\n testEl = document.createElement('div'),\n supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,\n transform,\n transitionProperty, transitionDuration, transitionTiming, transitionDelay,\n animationName, animationDuration, animationTiming, animationDelay,\n cssReset = {}\n\n function dasherize(str) { return str.replace(/([A-Z])/g, '-$1').toLowerCase() }\n function normalizeEvent(name) { return eventPrefix ? eventPrefix + name : name.toLowerCase() }\n\n if (testEl.style.transform === undefined) $.each(vendors, function(vendor, event){\n if (testEl.style[vendor + 'TransitionProperty'] !== undefined) {\n prefix = '-' + vendor.toLowerCase() + '-'\n eventPrefix = event\n return false\n }\n })\n\n transform = prefix + 'transform'\n cssReset[transitionProperty = prefix + 'transition-property'] =\n cssReset[transitionDuration = prefix + 'transition-duration'] =\n cssReset[transitionDelay = prefix + 'transition-delay'] =\n cssReset[transitionTiming = prefix + 'transition-timing-function'] =\n cssReset[animationName = prefix + 'animation-name'] =\n cssReset[animationDuration = prefix + 'animation-duration'] =\n cssReset[animationDelay = prefix + 'animation-delay'] =\n cssReset[animationTiming = prefix + 'animation-timing-function'] = ''\n\n $.fx = {\n off: (eventPrefix === undefined && testEl.style.transitionProperty === undefined),\n speeds: { _default: 400, fast: 200, slow: 600 },\n cssPrefix: prefix,\n transitionEnd: normalizeEvent('TransitionEnd'),\n animationEnd: normalizeEvent('AnimationEnd')\n }\n\n $.fn.animate = function(properties, duration, ease, callback, delay){\n if ($.isFunction(duration))\n callback = duration, ease = undefined, duration = undefined\n if ($.isFunction(ease))\n callback = ease, ease = undefined\n if ($.isPlainObject(duration))\n ease = duration.easing, callback = duration.complete, delay = duration.delay, duration = duration.duration\n if (duration) duration = (typeof duration == 'number' ? duration :\n ($.fx.speeds[duration] || $.fx.speeds._default)) / 1000\n if (delay) delay = parseFloat(delay) / 1000\n return this.anim(properties, duration, ease, callback, delay)\n }\n\n $.fn.anim = function(properties, duration, ease, callback, delay){\n var key, cssValues = {}, cssProperties, transforms = '',\n that = this, wrappedCallback, endEvent = $.fx.transitionEnd,\n fired = false\n\n if (duration === undefined) duration = $.fx.speeds._default / 1000\n if (delay === undefined) delay = 0\n if ($.fx.off) duration = 0\n\n if (typeof properties == 'string') {\n // keyframe animation\n cssValues[animationName] = properties\n cssValues[animationDuration] = duration + 's'\n cssValues[animationDelay] = delay + 's'\n cssValues[animationTiming] = (ease || 'linear')\n endEvent = $.fx.animationEnd\n } else {\n cssProperties = []\n // CSS transitions\n for (key in properties)\n if (supportedTransforms.test(key)) transforms += key + '(' + properties[key] + ') '\n else cssValues[key] = properties[key], cssProperties.push(dasherize(key))\n\n if (transforms) cssValues[transform] = transforms, cssProperties.push(transform)\n if (duration > 0 && typeof properties === 'object') {\n cssValues[transitionProperty] = cssProperties.join(', ')\n cssValues[transitionDuration] = duration + 's'\n cssValues[transitionDelay] = delay + 's'\n cssValues[transitionTiming] = (ease || 'linear')\n }\n }\n\n wrappedCallback = function(event){\n if (typeof event !== 'undefined') {\n if (event.target !== event.currentTarget) return // makes sure the event didn't bubble from \"below\"\n $(event.target).unbind(endEvent, wrappedCallback)\n } else\n $(this).unbind(endEvent, wrappedCallback) // triggered by setTimeout\n\n fired = true\n $(this).css(cssReset)\n callback && callback.call(this)\n }\n if (duration > 0){\n this.bind(endEvent, wrappedCallback)\n // transitionEnd is not always firing on older Android phones\n // so make sure it gets fired\n setTimeout(function(){\n if (fired) return\n wrappedCallback.call(that)\n }, ((duration + delay) * 1000) + 25)\n }\n\n // trigger page reflow so new elements can animate\n this.size() && this.get(0).clientLeft\n\n this.css(cssValues)\n\n if (duration <= 0) setTimeout(function() {\n that.each(function(){ wrappedCallback.call(this) })\n }, 0)\n\n return this\n }\n\n testEl = null\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($, undefined){\n var document = window.document, docElem = document.documentElement,\n origShow = $.fn.show, origHide = $.fn.hide, origToggle = $.fn.toggle\n\n function anim(el, speed, opacity, scale, callback) {\n if (typeof speed == 'function' && !callback) callback = speed, speed = undefined\n var props = { opacity: opacity }\n if (scale) {\n props.scale = scale\n el.css($.fx.cssPrefix + 'transform-origin', '0 0')\n }\n return el.animate(props, speed, null, callback)\n }\n\n function hide(el, speed, scale, callback) {\n return anim(el, speed, 0, scale, function(){\n origHide.call($(this))\n callback && callback.call(this)\n })\n }\n\n $.fn.show = function(speed, callback) {\n origShow.call(this)\n if (speed === undefined) speed = 0\n else this.css('opacity', 0)\n return anim(this, speed, 1, '1,1', callback)\n }\n\n $.fn.hide = function(speed, callback) {\n if (speed === undefined) return origHide.call(this)\n else return hide(this, speed, '0,0', callback)\n }\n\n $.fn.toggle = function(speed, callback) {\n if (speed === undefined || typeof speed == 'boolean')\n return origToggle.call(this, speed)\n else return this.each(function(){\n var el = $(this)\n el[el.css('display') == 'none' ? 'show' : 'hide'](speed, callback)\n })\n }\n\n $.fn.fadeTo = function(speed, opacity, callback) {\n return anim(this, speed, opacity, null, callback)\n }\n\n $.fn.fadeIn = function(speed, callback) {\n var target = this.css('opacity')\n if (target > 0) this.css('opacity', 0)\n else target = 1\n return origShow.call(this).fadeTo(speed, target, callback)\n }\n\n $.fn.fadeOut = function(speed, callback) {\n return hide(this, speed, null, callback)\n }\n\n $.fn.fadeToggle = function(speed, callback) {\n return this.each(function(){\n var el = $(this)\n el[\n (el.css('opacity') == 0 || el.css('display') == 'none') ? 'fadeIn' : 'fadeOut'\n ](speed, callback)\n })\n }\n\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($){\n var zepto = $.zepto, oldQsa = zepto.qsa, oldMatches = zepto.matches\n\n function visible(elem){\n elem = $(elem)\n return !!(elem.width() || elem.height()) && elem.css(\"display\") !== \"none\"\n }\n\n // Implements a subset from:\n // http://api.jquery.com/category/selectors/jquery-selector-extensions/\n //\n // Each filter function receives the current index, all nodes in the\n // considered set, and a value if there were parentheses. The value\n // of `this` is the node currently being considered. The function returns the\n // resulting node(s), null, or undefined.\n //\n // Complex selectors are not supported:\n // li:has(label:contains(\"foo\")) + li:has(label:contains(\"bar\"))\n // ul.inner:first > li\n var filters = $.expr[':'] = {\n visible: function(){ if (visible(this)) return this },\n hidden: function(){ if (!visible(this)) return this },\n selected: function(){ if (this.selected) return this },\n checked: function(){ if (this.checked) return this },\n parent: function(){ return this.parentNode },\n first: function(idx){ if (idx === 0) return this },\n last: function(idx, nodes){ if (idx === nodes.length - 1) return this },\n eq: function(idx, _, value){ if (idx === value) return this },\n contains: function(idx, _, text){ if ($(this).text().indexOf(text) > -1) return this },\n has: function(idx, _, sel){ if (zepto.qsa(this, sel).length) return this }\n }\n\n var filterRe = new RegExp('(.*):(\\\\w+)(?:\\\\(([^)]+)\\\\))?$\\\\s*'),\n childRe = /^\\s*>/,\n classTag = 'Zepto' + (+new Date())\n\n function process(sel, fn) {\n // quote the hash in `a[href^=#]` expression\n sel = sel.replace(/=#\\]/g, '=\"#\"]')\n var filter, arg, match = filterRe.exec(sel)\n if (match && match[2] in filters) {\n filter = filters[match[2]], arg = match[3]\n sel = match[1]\n if (arg) {\n var num = Number(arg)\n if (isNaN(num)) arg = arg.replace(/^[\"']|[\"']$/g, '')\n else arg = num\n }\n }\n return fn(sel, filter, arg)\n }\n\n zepto.qsa = function(node, selector) {\n return process(selector, function(sel, filter, arg){\n try {\n var taggedParent\n if (!sel && filter) sel = '*'\n else if (childRe.test(sel))\n // support \"> *\" child queries by tagging the parent node with a\n // unique class and prepending that classname onto the selector\n taggedParent = $(node).addClass(classTag), sel = '.'+classTag+' '+sel\n\n var nodes = oldQsa(node, sel)\n } catch(e) {\n console.error('error performing selector: %o', selector)\n throw e\n } finally {\n if (taggedParent) taggedParent.removeClass(classTag)\n }\n return !filter ? nodes :\n zepto.uniq($.map(nodes, function(n, i){ return filter.call(n, i, nodes, arg) }))\n })\n }\n\n zepto.matches = function(node, selector){\n return process(selector, function(sel, filter, arg){\n return (!sel || oldMatches(node, sel)) &&\n (!filter || filter.call(node, null, arg) === node)\n })\n }\n})(Zepto)\n","import HeaderPrimary from './components/HeaderPrimary';\nimport HeaderSecondary from './components/HeaderSecondary';\nimport routes from './routes';\nimport Application, { ApplicationData } from '../common/Application';\nimport Navigation from '../common/components/Navigation';\nimport AdminNav from './components/AdminNav';\n\ntype Extension = {\n description: string;\n extra: object;\n icon: {\n name: string;\n };\n id: number;\n version: string;\n};\n\nexport type AdminData = ApplicationData & {\n mysqlVersion: string;\n phpVersion: string;\n extensions: {\n [key: string]: Extension;\n };\n permissions: {\n [key: string]: string[];\n };\n settings: {\n [key: string]: string;\n };\n};\n\nexport default class Admin extends Application {\n extensionSettings = {};\n\n history = {\n canGoBack: () => true,\n getPrevious: () => {},\n backUrl: () => this.forum.attribute('baseUrl'),\n back: function () {\n window.location = this.backUrl();\n },\n };\n\n data!: AdminData;\n\n constructor() {\n super();\n\n routes(this);\n }\n\n /**\n * @inheritdoc\n */\n mount() {\n m.mount(document.getElementById('app-navigation'), new Navigation({ className: 'App-backControl', drawer: true }));\n m.mount(document.getElementById('header-navigation'), new Navigation());\n m.mount(document.getElementById('header-primary'), new HeaderPrimary());\n m.mount(document.getElementById('header-secondary'), new HeaderSecondary());\n m.mount(document.getElementById('admin-navigation'), new AdminNav());\n\n if (!document.location.hash) document.location.hash = '#/';\n\n m.route.prefix = '#';\n super.mount();\n\n // If an extension has just been enabled, then we will run its settings\n // callback.\n const enabled = localStorage.getItem('enabledExtension');\n if (enabled && this.extensionSettings[enabled]) {\n this.extensionSettings[enabled]();\n localStorage.removeItem('enabledExtension');\n }\n }\n\n getRequiredPermissions(permission) {\n const required: string[] = [];\n\n if (permission === 'startDiscussion' || permission.indexOf('discussion.') === 0) {\n required.push('viewDiscussions');\n }\n if (permission === 'discussion.delete') {\n required.push('discussion.hide');\n }\n if (permission === 'discussion.deletePosts') {\n required.push('discussion.hidePosts');\n }\n\n return required;\n }\n}\n","import Admin from './Admin';\n\nconst app = new Admin();\n\n// @ts-ignore\nwindow.app = app;\n\nexport default app;\n","import compat from '../common/compat';\n\nimport saveSettings from './utils/saveSettings';\nimport SettingDropdown from './components/SettingDropdown';\nimport EditCustomFooterModal from './components/EditCustomFooterModal';\nimport SessionDropdown from './components/SessionDropdown';\nimport HeaderPrimary from './components/HeaderPrimary';\nimport AppearancePage from './components/AppearancePage';\nimport Page from './components/Page';\nimport StatusWidget from './components/StatusWidget';\nimport HeaderSecondary from './components/HeaderSecondary';\nimport SettingsModal from './components/SettingsModal';\nimport DashboardWidget from './components/DashboardWidget';\nimport AddExtensionModal from './components/AddExtensionModal';\nimport ExtensionsPage from './components/ExtensionsPage';\nimport AdminLinkButton from './components/AdminLinkButton';\nimport PermissionGrid from './components/PermissionGrid';\nimport MailPage from './components/MailPage';\nimport UploadImageButton from './components/UploadImageButton';\nimport LoadingModal from './components/LoadingModal';\nimport DashboardPage from './components/DashboardPage';\nimport BasicsPage from './components/BasicsPage';\nimport EditCustomHeaderModal from './components/EditCustomHeaderModal';\nimport PermissionsPage from './components/PermissionsPage';\nimport PermissionDropdown from './components/PermissionDropdown';\nimport AdminNav from './components/AdminNav';\nimport EditCustomCssModal from './components/EditCustomCssModal';\nimport EditGroupModal from './components/EditGroupModal';\nimport routes from './routes';\nimport Admin from './Admin';\n\nexport default Object.assign(compat, {\n 'utils/saveSettings': saveSettings,\n 'components/SettingDropdown': SettingDropdown,\n 'components/EditCustomFooterModal': EditCustomFooterModal,\n 'components/SessionDropdown': SessionDropdown,\n 'components/HeaderPrimary': HeaderPrimary,\n 'components/AppearancePage': AppearancePage,\n 'components/Page': Page,\n 'components/StatusWidget': StatusWidget,\n 'components/HeaderSecondary': HeaderSecondary,\n 'components/SettingsModal': SettingsModal,\n 'components/DashboardWidget': DashboardWidget,\n 'components/AddExtensionModal': AddExtensionModal,\n 'components/ExtensionsPage': ExtensionsPage,\n 'components/AdminLinkButton': AdminLinkButton,\n 'components/PermissionGrid': PermissionGrid,\n 'components/MailPage': MailPage,\n 'components/UploadImageButton': UploadImageButton,\n 'components/LoadingModal': LoadingModal,\n 'components/DashboardPage': DashboardPage,\n 'components/BasicsPage': BasicsPage,\n 'components/EditCustomHeaderModal': EditCustomHeaderModal,\n 'components/PermissionsPage': PermissionsPage,\n 'components/PermissionDropdown': PermissionDropdown,\n 'components/AdminNav': AdminNav,\n 'components/EditCustomCssModal': EditCustomCssModal,\n 'components/EditGroupModal': EditGroupModal,\n routes: routes,\n Admin: Admin,\n}) as any;\n","import app from '../app';\nimport Modal from '../../common/components/Modal';\n\nexport default class AddExtensionModal extends Modal {\n className() {\n return 'AddExtensionModal Modal--small';\n }\n\n title() {\n return app.translator.trans('core.admin.add_extension.title');\n }\n\n content() {\n return (\n <div className=\"Modal-body\">\n <p>{app.translator.trans('core.admin.add_extension.temporary_text')}</p>\n <p>\n {app.translator.trans('core.admin.add_extension.install_text', {\n a: <a href=\"https://discuss.flarum.org/t/extensions\" target=\"_blank\" />,\n })}\n </p>\n <p>\n {app.translator.trans('core.admin.add_extension.developer_text', {\n a: <a href=\"http://flarum.org/docs/extend\" target=\"_blank\" />,\n })}\n </p>\n </div>\n );\n }\n}\n","import LinkButton, { LinkButtonProps } from '../../common/components/LinkButton';\n\nexport interface AdminLinkButtonProps extends LinkButtonProps {\n description?: string;\n}\n\nexport default class AdminLinkButton<T extends AdminLinkButtonProps = AdminLinkButtonProps> extends LinkButton<T> {\n getButtonContent() {\n const content = super.getButtonContent(this.props.icon, this.props.loading, this.props.children);\n\n content.push(<div className=\"AdminLinkButton-description\">{this.props.description}</div>);\n\n return content;\n }\n}\n","import Component from '../../common/Component';\nimport AdminLinkButton from './AdminLinkButton';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport ItemList from '../../common/utils/ItemList';\n\nexport default class AdminNav<T> extends Component<T> {\n view() {\n return (\n <SelectDropdown className=\"AdminNav App-titleControl\" buttonClassName=\"Button\">\n {this.items().toArray()}\n </SelectDropdown>\n );\n }\n\n /**\n * Build an item list of links to show in the admin navigation.\n *\n * @return {ItemList}\n */\n items() {\n const items = new ItemList();\n\n items.add(\n 'dashboard',\n AdminLinkButton.component({\n href: app.route('dashboard'),\n icon: 'far fa-chart-bar',\n children: app.translator.trans('core.admin.nav.dashboard_button'),\n description: app.translator.trans('core.admin.nav.dashboard_text'),\n })\n );\n\n items.add(\n 'basics',\n AdminLinkButton.component({\n href: app.route('basics'),\n icon: 'fas fa-pencil-alt',\n children: app.translator.trans('core.admin.nav.basics_button'),\n description: app.translator.trans('core.admin.nav.basics_text'),\n })\n );\n\n items.add(\n 'mail',\n AdminLinkButton.component({\n href: app.route('mail'),\n icon: 'fas fa-envelope',\n children: app.translator.trans('core.admin.nav.email_button'),\n description: app.translator.trans('core.admin.nav.email_text'),\n })\n );\n\n items.add(\n 'permissions',\n AdminLinkButton.component({\n href: app.route('permissions'),\n icon: 'fas fa-key',\n children: app.translator.trans('core.admin.nav.permissions_button'),\n description: app.translator.trans('core.admin.nav.permissions_text'),\n })\n );\n\n items.add(\n 'appearance',\n AdminLinkButton.component({\n href: app.route('appearance'),\n icon: 'fas fa-paint-brush',\n children: app.translator.trans('core.admin.nav.appearance_button'),\n description: app.translator.trans('core.admin.nav.appearance_text'),\n })\n );\n\n items.add(\n 'extensions',\n AdminLinkButton.component({\n href: app.route('extensions'),\n icon: 'fas fa-puzzle-piece',\n children: app.translator.trans('core.admin.nav.extensions_button'),\n description: app.translator.trans('core.admin.nav.extensions_text'),\n })\n );\n\n return items;\n }\n}\n","import app from '../app';\n\nimport Page from './Page';\nimport Button from '../../common/components/Button';\nimport Switch from '../../common/components/Switch';\nimport EditCustomCssModal from './EditCustomCssModal';\nimport EditCustomHeaderModal from './EditCustomHeaderModal';\nimport EditCustomFooterModal from './EditCustomFooterModal';\nimport UploadImageButton from './UploadImageButton';\nimport saveSettings from '../utils/saveSettings';\n\nexport default class AppearancePage extends Page {\n loading = false;\n primaryColor = m.prop(app.data.settings.theme_primary_color);\n secondaryColor = m.prop(app.data.settings.theme_secondary_color);\n darkMode = m.prop(app.data.settings.theme_dark_mode === '1');\n coloredHeader = m.prop(app.data.settings.theme_colored_header === '1');\n\n view() {\n return (\n <div className=\"AppearancePage\">\n <div className=\"container\">\n <form onsubmit={this.onsubmit.bind(this)}>\n <fieldset className=\"AppearancePage-colors\">\n <legend>{app.translator.trans('core.admin.appearance.colors_heading')}</legend>\n <div className=\"helpText\">{app.translator.trans('core.admin.appearance.colors_text')}</div>\n\n <div className=\"AppearancePage-colors-input\">\n <input\n className=\"FormControl\"\n type=\"text\"\n placeholder=\"#aaaaaa\"\n value={this.primaryColor()}\n onchange={m.withAttr('value', this.primaryColor)}\n />\n <input\n className=\"FormControl\"\n type=\"text\"\n placeholder=\"#aaaaaa\"\n value={this.secondaryColor()}\n onchange={m.withAttr('value', this.secondaryColor)}\n />\n </div>\n\n {Switch.component({\n state: this.darkMode(),\n children: app.translator.trans('core.admin.appearance.dark_mode_label'),\n onchange: this.darkMode,\n })}\n\n {Switch.component({\n state: this.coloredHeader(),\n children: app.translator.trans('core.admin.appearance.colored_header_label'),\n onchange: this.coloredHeader,\n })}\n\n {Button.component({\n className: 'Button Button--primary',\n type: 'submit',\n children: app.translator.trans('core.admin.appearance.submit_button'),\n loading: this.loading,\n })}\n </fieldset>\n </form>\n\n <fieldset>\n <legend>{app.translator.trans('core.admin.appearance.logo_heading')}</legend>\n <div className=\"helpText\">{app.translator.trans('core.admin.appearance.logo_text')}</div>\n <UploadImageButton name=\"logo\" />\n </fieldset>\n\n <fieldset>\n <legend>{app.translator.trans('core.admin.appearance.favicon_heading')}</legend>\n <div className=\"helpText\">{app.translator.trans('core.admin.appearance.favicon_text')}</div>\n <UploadImageButton name=\"favicon\" />\n </fieldset>\n\n <fieldset>\n <legend>{app.translator.trans('core.admin.appearance.custom_header_heading')}</legend>\n <div className=\"helpText\">{app.translator.trans('core.admin.appearance.custom_header_text')}</div>\n {Button.component({\n className: 'Button',\n children: app.translator.trans('core.admin.appearance.edit_header_button'),\n onclick: () => app.modal.show(EditCustomHeaderModal),\n })}\n </fieldset>\n\n <fieldset>\n <legend>{app.translator.trans('core.admin.appearance.custom_footer_heading')}</legend>\n <div className=\"helpText\">{app.translator.trans('core.admin.appearance.custom_footer_text')}</div>\n {Button.component({\n className: 'Button',\n children: app.translator.trans('core.admin.appearance.edit_footer_button'),\n onclick: () => app.modal.show(EditCustomFooterModal),\n })}\n </fieldset>\n\n <fieldset>\n <legend>{app.translator.trans('core.admin.appearance.custom_styles_heading')}</legend>\n <div className=\"helpText\">{app.translator.trans('core.admin.appearance.custom_styles_text')}</div>\n {Button.component({\n className: 'Button',\n children: app.translator.trans('core.admin.appearance.edit_css_button'),\n onclick: () => app.modal.show(EditCustomCssModal),\n })}\n </fieldset>\n </div>\n </div>\n );\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n const hex = /^#[0-9a-f]{3}([0-9a-f]{3})?$/i;\n\n if (!hex.test(this.primaryColor()) || !hex.test(this.secondaryColor())) {\n alert(app.translator.trans('core.admin.appearance.enter_hex_message'));\n return;\n }\n\n this.loading = true;\n\n saveSettings({\n theme_primary_color: this.primaryColor(),\n theme_secondary_color: this.secondaryColor(),\n theme_dark_mode: this.darkMode(),\n theme_colored_header: this.coloredHeader(),\n }).then(() => window.location.reload());\n }\n}\n","import app from '../app';\n\nimport Page from './Page';\nimport FieldSet from '../../common/components/FieldSet';\nimport Select from '../../common/components/Select';\nimport Button from '../../common/components/Button';\nimport Alert from '../../common/components/Alert';\nimport saveSettings from '../utils/saveSettings';\nimport ItemList from '../../common/utils/ItemList';\nimport Switch from '../../common/components/Switch';\n\nimport Stream from 'mithril/stream';\n\nexport default class BasicsPage extends Page {\n loading: boolean = false;\n fields: string[] = [\n 'forum_title',\n 'forum_description',\n 'default_locale',\n 'show_language_selector',\n 'default_route',\n 'welcome_title',\n 'welcome_message',\n ];\n\n values: { [key: string]: Stream<any> } = {};\n\n localeOptions: object = {};\n\n successAlert: Alert;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n const settings = app.data.settings;\n this.fields.forEach((key) => (this.values[key] = m.prop(settings[key])));\n\n const locales = app.data.locales;\n for (const i in locales) {\n this.localeOptions[i] = `${locales[i]} (${i})`;\n }\n\n if (typeof this.values.show_language_selector() !== 'number') this.values.show_language_selector(1);\n }\n\n view() {\n return (\n <div className=\"BasicsPage\">\n <div className=\"container\">\n <form onsubmit={this.onsubmit.bind(this)}>\n {FieldSet.component({\n label: app.translator.trans('core.admin.basics.forum_title_heading'),\n children: [\n <input\n className=\"FormControl\"\n value={this.values.forum_title()}\n oninput={m.withAttr('value', this.values.forum_title)}\n />,\n ],\n })}\n\n {FieldSet.component({\n label: app.translator.trans('core.admin.basics.forum_description_heading'),\n children: [\n <div className=\"helpText\">{app.translator.trans('core.admin.basics.forum_description_text')}</div>,\n <textarea\n className=\"FormControl\"\n value={this.values.forum_description()}\n oninput={m.withAttr('value', this.values.forum_description)}\n />,\n ],\n })}\n\n {Object.keys(this.localeOptions).length > 1\n ? FieldSet.component({\n label: app.translator.trans('core.admin.basics.default_language_heading'),\n children: [\n Select.component({\n options: this.localeOptions,\n value: this.values.default_locale(),\n onchange: this.values.default_locale,\n }),\n Switch.component({\n state: this.values.show_language_selector(),\n onchange: this.values.show_language_selector,\n children: app.translator.trans('core.admin.basics.show_language_selector_label'),\n }),\n ],\n })\n : ''}\n\n {FieldSet.component({\n label: app.translator.trans('core.admin.basics.home_page_heading'),\n className: 'BasicsPage-homePage',\n children: [\n <div className=\"helpText\">{app.translator.trans('core.admin.basics.home_page_text')}</div>,\n this.homePageItems()\n .toArray()\n .map(({ path, label }) => (\n <label className=\"checkbox\">\n <input\n type=\"radio\"\n name=\"homePage\"\n value={path}\n checked={this.values.default_route() === path}\n onclick={m.withAttr('value', this.values.default_route)}\n />\n {label}\n </label>\n )),\n ],\n })}\n\n {FieldSet.component({\n label: app.translator.trans('core.admin.basics.welcome_banner_heading'),\n className: 'BasicsPage-welcomeBanner',\n children: [\n <div className=\"helpText\">{app.translator.trans('core.admin.basics.welcome_banner_text')}</div>,\n <div className=\"BasicsPage-welcomeBanner-input\">\n <input\n className=\"FormControl\"\n value={this.values.welcome_title()}\n oninput={m.withAttr('value', this.values.welcome_title)}\n />\n <textarea\n className=\"FormControl\"\n value={this.values.welcome_message()}\n oninput={m.withAttr('value', this.values.welcome_message)}\n />\n </div>,\n ],\n })}\n\n {Button.component({\n type: 'submit',\n className: 'Button Button--primary',\n children: app.translator.trans('core.admin.basics.submit_button'),\n loading: this.loading,\n disabled: !this.changed(),\n })}\n </form>\n </div>\n </div>\n );\n }\n\n changed() {\n return this.fields.some((key) => this.values[key]() !== app.data.settings[key]);\n }\n\n /**\n * Build a list of options for the default homepage. Each option must be an\n * object with `path` and `label` properties.\n *\n * @return {ItemList}\n * @public\n */\n homePageItems() {\n const items = new ItemList();\n\n items.add('allDiscussions', {\n path: '/all',\n label: app.translator.trans('core.admin.basics.all_discussions_label'),\n });\n\n return items;\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n if (this.loading) return;\n\n this.loading = true;\n app.alerts.dismiss(this.successAlert);\n\n const settings = {};\n\n this.fields.forEach((key) => (settings[key] = this.values[key]()));\n\n saveSettings(settings)\n .then(() => {\n app.alerts.show(\n (this.successAlert = Alert.component({ type: 'success', children: app.translator.trans('core.admin.basics.saved_message') }))\n );\n })\n .catch(() => {})\n .then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n}\n","import Page from './Page';\nimport StatusWidget from './StatusWidget';\n\nexport default class DashboardPage extends Page {\n view() {\n return (\n <div className=\"DashboardPage\">\n <div className=\"container\">{this.availableWidgets()}</div>\n </div>\n );\n }\n\n availableWidgets() {\n return [<StatusWidget />];\n }\n}\n","import Component from '../../common/Component';\n\nexport default abstract class DashboardWidget extends Component {\n view() {\n return <div className={'DashboardWidget ' + this.className()}>{this.content()}</div>;\n }\n\n /**\n * Get the class name to apply to the widget.\n *\n * @return {String}\n */\n className() {\n return '';\n }\n\n /**\n * Get the content of the widget.\n *\n * @return {VirtualElement}\n */\n abstract content(): JSX.Element;\n}\n","import SettingsModal from './SettingsModal';\n\nexport default class EditCustomCssModal extends SettingsModal {\n className() {\n return 'EditCustomCssModal Modal--large';\n }\n\n title() {\n return app.translator.trans('core.admin.edit_css.title');\n }\n\n form() {\n return [\n <p>\n {app.translator.trans('core.admin.edit_css.customize_text', {\n a: <a href=\"https://github.com/flarum/core/tree/master/less\" target=\"_blank\" />,\n })}\n </p>,\n <div className=\"Form-group\">\n <textarea className=\"FormControl\" rows=\"30\" bidi={this.setting('custom_less')} />\n </div>,\n ];\n }\n\n onsaved() {\n window.location.reload();\n }\n}\n","import SettingsModal from './SettingsModal';\n\nexport default class EditCustomFooterModal extends SettingsModal {\n className() {\n return 'EditCustomFooterModal Modal--large';\n }\n\n title() {\n return app.translator.trans('core.admin.edit_footer.title');\n }\n\n form() {\n return [\n <p>{app.translator.trans('core.admin.edit_footer.customize_text')}</p>,\n <div className=\"Form-group\">\n <textarea className=\"FormControl\" rows=\"30\" bidi={this.setting('custom_footer')} />\n </div>,\n ];\n }\n\n onsaved() {\n window.location.reload();\n }\n}\n","import SettingsModal from './SettingsModal';\n\nexport default class EditCustomHeaderModal extends SettingsModal {\n className() {\n return 'EditCustomHeaderModal Modal--large';\n }\n\n title() {\n return app.translator.trans('core.admin.edit_header.title');\n }\n\n form() {\n return [\n <p>{app.translator.trans('core.admin.edit_header.customize_text')}</p>,\n <div className=\"Form-group\">\n <textarea className=\"FormControl\" rows=\"30\" bidi={this.setting('custom_header')} />\n </div>,\n ];\n }\n\n onsaved() {\n window.location.reload();\n }\n}\n","import app from '../app';\nimport { ComponentProps } from '../../common/Component';\nimport Modal from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Badge from '../../common/components/Badge';\nimport Group from '../../common/models/Group';\nimport ItemList from '../../common/utils/ItemList';\n\nimport Stream from 'mithril/stream';\n\n/**\n * The `EditGroupModal` component shows a modal dialog which allows the user\n * to create or edit a group.\n */\nexport default class EditGroupModal extends Modal<ComponentProps> {\n group: Group;\n\n nameSingular: Stream<string>;\n namePlural: Stream<string>;\n icon: Stream<string>;\n color: Stream<string>;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n this.group = this.props.group || app.store.createRecord('groups');\n\n this.nameSingular = m.prop(this.group.nameSingular() || '');\n this.namePlural = m.prop(this.group.namePlural() || '');\n this.icon = m.prop(this.group.icon() || '');\n this.color = m.prop(this.group.color() || '');\n }\n\n className() {\n return 'EditGroupModal Modal--small';\n }\n\n title() {\n return [\n this.color() || this.icon()\n ? Badge.component({\n icon: this.icon(),\n style: { backgroundColor: this.color() },\n })\n : '',\n ' ',\n this.namePlural() || app.translator.trans('core.admin.edit_group.title'),\n ];\n }\n\n content() {\n return (\n <div className=\"Modal-body\">\n <div className=\"Form\">{this.fields().toArray()}</div>\n </div>\n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add(\n 'name',\n <div className=\"Form-group\">\n <label>{app.translator.trans('core.admin.edit_group.name_label')}</label>\n <div className=\"EditGroupModal-name-input\">\n <input\n className=\"FormControl\"\n placeholder={app.translator.transText('core.admin.edit_group.singular_placeholder')}\n value={this.nameSingular()}\n oninput={m.withAttr('value', this.nameSingular)}\n />\n <input\n className=\"FormControl\"\n placeholder={app.translator.transText('core.admin.edit_group.plural_placeholder')}\n value={this.namePlural()}\n oninput={m.withAttr('value', this.namePlural)}\n />\n </div>\n </div>,\n 30\n );\n\n items.add(\n 'color',\n <div className=\"Form-group\">\n <label>{app.translator.trans('core.admin.edit_group.color_label')}</label>\n <input className=\"FormControl\" placeholder=\"#aaaaaa\" value={this.color()} oninput={m.withAttr('value', this.color)} />\n </div>,\n 20\n );\n\n items.add(\n 'icon',\n <div className=\"Form-group\">\n <label>{app.translator.trans('core.admin.edit_group.icon_label')}</label>\n <div className=\"helpText\">\n {app.translator.trans('core.admin.edit_group.icon_text', { a: <a href=\"https://fontawesome.com/icons?m=free\" tabindex=\"-1\" /> })}\n </div>\n <input className=\"FormControl\" placeholder=\"fas fa-bolt\" value={this.icon()} oninput={m.withAttr('value', this.icon)} />\n </div>,\n 10\n );\n\n items.add(\n 'submit',\n <div className=\"Form-group\">\n {Button.component({\n type: 'submit',\n className: 'Button Button--primary EditGroupModal-save',\n loading: this.loading,\n children: app.translator.trans('core.admin.edit_group.submit_button'),\n })}\n {this.group.exists && this.group.id() !== Group.ADMINISTRATOR_ID ? (\n <button type=\"button\" className=\"Button EditGroupModal-delete\" onclick={this.deleteGroup.bind(this)}>\n {app.translator.trans('core.admin.edit_group.delete_button')}\n </button>\n ) : (\n ''\n )}\n </div>,\n -10\n );\n\n return items;\n }\n\n submitData() {\n return {\n nameSingular: this.nameSingular(),\n namePlural: this.namePlural(),\n color: this.color(),\n icon: this.icon(),\n };\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n this.group\n .save(this.submitData(), { errorHandler: this.onerror.bind(this) })\n .then(this.hide.bind(this))\n .catch(() => {\n this.loading = false;\n m.redraw();\n });\n }\n\n deleteGroup() {\n if (confirm(app.translator.transText('core.admin.edit_group.delete_confirmation'))) {\n this.group.delete().then(() => m.redraw());\n this.hide();\n }\n }\n}\n","import app from '../app';\n\nimport Page from './Page';\nimport Button from '../../common/components/Button';\nimport Dropdown from '../../common/components/Dropdown';\nimport AddExtensionModal from './AddExtensionModal';\nimport LoadingModal from './LoadingModal';\nimport ItemList from '../../common/utils/ItemList';\nimport icon from '../../common/helpers/icon';\n\nexport default class ExtensionsPage extends Page {\n view() {\n return (\n <div className=\"ExtensionsPage\">\n <div className=\"ExtensionsPage-header\">\n <div className=\"container\">\n {Button.component({\n children: app.translator.trans('core.admin.extensions.add_button'),\n icon: 'fas fa-plus',\n className: 'Button Button--primary',\n onclick: () => app.modal.show(AddExtensionModal),\n })}\n </div>\n </div>\n\n <div className=\"ExtensionsPage-list\">\n <div className=\"container\">\n <ul className=\"ExtensionList\">\n {Object.keys(app.data.extensions).map((id) => {\n const extension = app.data.extensions[id];\n const controls = this.controlItems(extension.id).toArray();\n\n return (\n <li className={'ExtensionListItem ' + (!this.isEnabled(extension.id) ? 'disabled' : '')}>\n <div className=\"ExtensionListItem-content\">\n <span className=\"ExtensionListItem-icon ExtensionIcon\" style={extension.icon}>\n {extension.icon ? icon(extension.icon.name) : ''}\n </span>\n {controls.length ? (\n <Dropdown\n className=\"ExtensionListItem-controls\"\n buttonClassName=\"Button Button--icon Button--flat\"\n menuClassName=\"Dropdown-menu--right\"\n icon=\"fas fa-ellipsis-h\"\n >\n {controls}\n </Dropdown>\n ) : (\n ''\n )}\n <div className=\"ExtensionListItem-main\">\n <label className=\"ExtensionListItem-title\">\n <input\n type=\"checkbox\"\n checked={this.isEnabled(extension.id)}\n onclick={this.toggle.bind(this, extension.id)}\n />{' '}\n {extension.extra['flarum-extension'].title}\n </label>\n <div className=\"ExtensionListItem-version\">{extension.version}</div>\n <div className=\"ExtensionListItem-description\">{extension.description}</div>\n </div>\n </div>\n </li>\n );\n })}\n </ul>\n </div>\n </div>\n </div>\n );\n }\n\n controlItems(name) {\n const items = new ItemList();\n const enabled = this.isEnabled(name);\n\n if (app.extensionSettings[name]) {\n items.add(\n 'settings',\n Button.component({\n icon: 'fas fa-cog',\n children: app.translator.trans('core.admin.extensions.settings_button'),\n onclick: app.extensionSettings[name],\n })\n );\n }\n\n if (!enabled) {\n items.add(\n 'uninstall',\n Button.component({\n icon: 'far fa-trash-alt',\n children: app.translator.trans('core.admin.extensions.uninstall_button'),\n onclick: () => {\n app.request({\n url: app.forum.attribute('apiUrl') + '/extensions/' + name,\n method: 'DELETE',\n }).then(() => window.location.reload());\n\n app.modal.show(LoadingModal);\n },\n })\n );\n }\n\n return items;\n }\n\n isEnabled(name) {\n const enabled = JSON.parse(app.data.settings.extensions_enabled);\n\n return enabled.indexOf(name) !== -1;\n }\n\n toggle(id) {\n const enabled = this.isEnabled(id);\n\n app.request({\n url: app.forum.attribute('apiUrl') + '/extensions/' + id,\n method: 'PATCH',\n body: { enabled: !enabled },\n }).then(() => {\n if (!enabled) localStorage.setItem('enabledExtension', id);\n window.location.reload();\n });\n\n app.modal.show(LoadingModal);\n }\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `HeaderPrimary` component displays primary header controls. On the\n * default skin, these are shown just to the right of the forum title.\n */\nexport default class HeaderPrimary extends Component {\n view() {\n return <ul className=\"Header-controls\">{listItems(this.items().toArray())}</ul>;\n }\n\n /**\n * Build an item list for the controls.\n *\n * @return {ItemList}\n */\n items() {\n return new ItemList();\n }\n}\n","import Component from '../../common/Component';\nimport SessionDropdown from './SessionDropdown';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `HeaderSecondary` component displays secondary header controls.\n */\nexport default class HeaderSecondary extends Component {\n view() {\n return <ul className=\"Header-controls\">{listItems(this.items().toArray())}</ul>;\n }\n\n /**\n * Build an item list for the controls.\n *\n * @return {ItemList}\n */\n items() {\n const items = new ItemList();\n\n items.add('session', SessionDropdown.component());\n\n return items;\n }\n}\n","import { ComponentProps } from '../../common/Component';\nimport Modal from '../../common/components/Modal';\n\nexport default class LoadingModal extends Modal<ComponentProps> {\n isDismissible() {\n return false;\n }\n\n className() {\n return 'LoadingModal Modal--small';\n }\n\n title() {\n return app.translator.transText('core.admin.loading.title');\n }\n\n content() {\n return '';\n }\n}\n","import app from '../app';\n\nimport Page from './Page';\nimport FieldSet from '../../common/components/FieldSet';\nimport Button from '../../common/components/Button';\nimport Alert from '../../common/components/Alert';\nimport Select from '../../common/components/Select';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport saveSettings from '../utils/saveSettings';\n\nimport Stream from 'mithril/stream';\n\nexport default class MailPage extends Page {\n loading = true;\n saving = false;\n\n driverFields = {};\n fields = [];\n\n values: { [key: string]: Stream<any> } = {};\n\n status = { sending: false, errors: {} };\n\n successAlert: Alert;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n this.refresh();\n }\n\n refresh() {\n this.loading = true;\n this.fields = ['mail_driver', 'mail_from'];\n this.values = {};\n\n app.request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + '/mail-settings',\n }).then((response) => {\n this.driverFields = response['data']['attributes']['fields'];\n this.status.sending = response['data']['attributes']['sending'];\n this.status.errors = response['data']['attributes']['errors'];\n\n for (const driver in this.driverFields) {\n for (const field in this.driverFields[driver]) {\n this.fields.push(field);\n }\n }\n\n const settings = app.data.settings;\n this.fields.forEach((key) => (this.values[key] = m.prop(settings[key])));\n\n this.loading = false;\n m.redraw();\n });\n }\n\n view() {\n if (this.loading || this.saving) {\n return (\n <div className=\"MailPage\">\n <div className=\"container\">\n <LoadingIndicator />\n </div>\n </div>\n );\n }\n\n const fields = this.driverFields[this.values.mail_driver()];\n const fieldKeys = Object.keys(fields);\n\n return (\n <div className=\"MailPage\">\n <div className=\"container\">\n <form onsubmit={this.onsubmit.bind(this)}>\n <h2>{app.translator.trans('core.admin.email.heading')}</h2>\n <div className=\"helpText\">{app.translator.trans('core.admin.email.text')}</div>\n\n {FieldSet.component({\n label: app.translator.trans('core.admin.email.addresses_heading'),\n className: 'MailPage-MailSettings',\n children: [\n <div className=\"MailPage-MailSettings-input\">\n <label>\n {app.translator.trans('core.admin.email.from_label')}\n <input\n className=\"FormControl\"\n value={this.values.mail_from() || ''}\n oninput={m.withAttr('value', this.values.mail_from)}\n />\n </label>\n </div>,\n ],\n })}\n\n {FieldSet.component({\n label: app.translator.trans('core.admin.email.driver_heading'),\n className: 'MailPage-MailSettings',\n children: [\n <div className=\"MailPage-MailSettings-input\">\n <label>\n {app.translator.trans('core.admin.email.driver_label')}\n <Select\n value={this.values.mail_driver()}\n options={Object.keys(this.driverFields).reduce((memo, val) => ({ ...memo, [val]: val }), {})}\n onchange={this.values.mail_driver}\n />\n </label>\n </div>,\n ],\n })}\n\n {this.status.sending ||\n Alert.component({\n children: app.translator.trans('core.admin.email.not_sending_message'),\n dismissible: false,\n })}\n\n {fieldKeys.length > 0 &&\n FieldSet.component({\n label: app.translator.trans(`core.admin.email.${this.values.mail_driver()}_heading`),\n className: 'MailPage-MailSettings',\n children: [\n <div className=\"MailPage-MailSettings-input\">\n {fieldKeys.map((field) => [\n <label>\n {app.translator.trans(`core.admin.email.${field}_label`)}\n {this.renderField(field)}\n </label>,\n this.status.errors[field] && <p className=\"ValidationError\">{this.status.errors[field]}</p>,\n ])}\n </div>,\n ],\n })}\n\n {Button.component({\n type: 'submit',\n className: 'Button Button--primary',\n children: app.translator.trans('core.admin.email.submit_button'),\n disabled: !this.changed(),\n })}\n </form>\n </div>\n </div>\n );\n }\n\n renderField(name) {\n const driver = this.values.mail_driver();\n const field = this.driverFields[driver][name];\n const prop = this.values[name];\n\n if (prop == undefined) {\n }\n\n if (typeof field === 'string') {\n return <input className=\"FormControl\" value={prop() || ''} oninput={m.withAttr('value', prop)} />;\n } else {\n return <Select value={prop()} options={field} onchange={prop} />;\n }\n }\n\n changed() {\n return this.fields.some((key) => this.values[key]() !== app.data.settings[key]);\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n if (this.saving) return;\n\n this.saving = true;\n app.alerts.dismiss(this.successAlert);\n\n const settings = {};\n\n this.fields.forEach((key) => (settings[key] = this.values[key]()));\n\n saveSettings(settings)\n .then(() => {\n app.alerts.show(\n (this.successAlert = Alert.component({ type: 'success', children: app.translator.trans('core.admin.basics.saved_message') }))\n );\n })\n .catch(() => {})\n .then(() => {\n this.saving = false;\n this.refresh();\n });\n }\n}\n","import Component from '../../common/Component';\n\n/**\n * The `Page` component\n */\nexport default abstract class Page extends Component {\n /**\n * A class name to apply to the body while the route is active.\n */\n bodyClass: string = '';\n\n oninit(vnode) {\n super.oninit(vnode);\n\n if (this.bodyClass) {\n $('#app').addClass(this.bodyClass);\n }\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n app.previous = app.current;\n app.current = this;\n\n app.modal.close();\n }\n\n onremove(vnode) {\n super.onremove(vnode);\n\n $('#app').removeClass(this.bodyClass);\n }\n}\n","import app from '../app';\n\nimport Dropdown, { DropdownProps } from '../../common/components/Dropdown';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport Group from '../../common/models/Group';\nimport Badge from '../../common/components/Badge';\nimport GroupBadge from '../../common/components/GroupBadge';\n\nfunction badgeForId(id) {\n const group = app.store.getById('groups', id);\n\n return group ? GroupBadge.component({ group, label: null }) : '';\n}\n\nfunction filterByRequiredPermissions(groupIds, permission) {\n app.getRequiredPermissions(permission).forEach((required) => {\n const restrictToGroupIds = app.data.permissions[required] || [];\n\n if (restrictToGroupIds.indexOf(Group.GUEST_ID) !== -1) {\n // do nothing\n } else if (restrictToGroupIds.indexOf(Group.MEMBER_ID) !== -1) {\n groupIds = groupIds.filter((id) => id !== Group.GUEST_ID);\n } else if (groupIds.indexOf(Group.MEMBER_ID) !== -1) {\n groupIds = restrictToGroupIds;\n } else {\n groupIds = restrictToGroupIds.filter((id) => groupIds.indexOf(id) !== -1);\n }\n\n groupIds = filterByRequiredPermissions(groupIds, required);\n });\n\n return groupIds;\n}\n\nexport interface PermissionDropdownProps extends DropdownProps {\n label?: Badge[];\n}\n\nexport default class PermissionDropdown<T extends PermissionDropdownProps = PermissionDropdownProps> extends Dropdown<T> {\n static initProps(props) {\n super.initProps(props);\n\n props.className = 'PermissionDropdown';\n props.buttonClassName = 'Button Button--text';\n }\n\n view() {\n this.props.children = [];\n\n let groupIds = app.data.permissions[this.props.permission] || [];\n\n groupIds = filterByRequiredPermissions(groupIds, this.props.permission);\n\n const everyone = groupIds.indexOf(Group.GUEST_ID) !== -1;\n const members = groupIds.indexOf(Group.MEMBER_ID) !== -1;\n const adminGroup: Group = app.store.getById('groups', Group.ADMINISTRATOR_ID);\n\n if (everyone) {\n this.props.label = Badge.component({ icon: 'fas fa-globe' });\n } else if (members) {\n this.props.label = Badge.component({ icon: 'fas fa-user' });\n } else {\n this.props.label = [badgeForId(Group.ADMINISTRATOR_ID), groupIds.map(badgeForId)];\n }\n\n if (this.showing) {\n if (this.props.allowGuest) {\n this.props.children.push(\n Button.component({\n children: [\n Badge.component({ icon: 'fas fa-globe' }),\n ' ',\n app.translator.trans('core.admin.permissions_controls.everyone_button'),\n ],\n icon: everyone ? 'fas fa-check' : true,\n onclick: () => this.save([Group.GUEST_ID]),\n disabled: this.isGroupDisabled(Group.GUEST_ID),\n })\n );\n }\n\n this.props.children.push(\n Button.component({\n children: [Badge.component({ icon: 'fas fa-user' }), ' ', app.translator.trans('core.admin.permissions_controls.members_button')],\n icon: members ? 'fas fa-check' : true,\n onclick: () => this.save([Group.MEMBER_ID]),\n disabled: this.isGroupDisabled(Group.MEMBER_ID),\n }),\n\n Separator.component(),\n\n Button.component({\n children: [badgeForId(adminGroup.id()), ' ', adminGroup.namePlural()],\n icon: !everyone && !members ? 'fas fa-check' : true,\n disabled: !everyone && !members,\n onclick: (e) => {\n if (e.shiftKey) e.stopPropagation();\n this.save([]);\n },\n })\n );\n\n [].push.apply(\n this.props.children,\n app.store\n .all('groups')\n .filter((group) => [Group.ADMINISTRATOR_ID, Group.GUEST_ID, Group.MEMBER_ID].indexOf(group.id()) === -1)\n .map((group: Group) =>\n Button.component({\n children: [badgeForId(group.id()), ' ', group.namePlural()],\n icon: groupIds.indexOf(group.id()) !== -1 ? 'fas fa-check' : true,\n onclick: (e) => {\n if (e.shiftKey) e.stopPropagation();\n this.toggle(group.id());\n },\n disabled:\n this.isGroupDisabled(group.id()) && this.isGroupDisabled(Group.MEMBER_ID) && this.isGroupDisabled(Group.GUEST_ID),\n })\n )\n );\n }\n\n return super.view();\n }\n\n save(groupIds) {\n const permission = this.props.permission;\n\n app.data.permissions[permission] = groupIds;\n\n app.request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/permission',\n body: { permission, groupIds },\n });\n }\n\n toggle(groupId) {\n const permission = this.props.permission;\n\n let groupIds = app.data.permissions[permission] || [];\n\n const index = groupIds.indexOf(groupId);\n\n if (index !== -1) {\n groupIds.splice(index, 1);\n } else {\n groupIds.push(groupId);\n groupIds = groupIds.filter((id) => [Group.GUEST_ID, Group.MEMBER_ID].indexOf(id) === -1);\n }\n\n this.save(groupIds);\n }\n\n isGroupDisabled(id) {\n return filterByRequiredPermissions([id], this.props.permission).indexOf(id) === -1;\n }\n}\n","import app from '../app';\n\nimport Component from '../../common/Component';\nimport PermissionDropdown from './PermissionDropdown';\nimport SettingDropdown from './SettingDropdown';\nimport Button from '../../common/components/Button';\nimport ItemList from '../../common/utils/ItemList';\nimport icon from '../../common/helpers/icon';\n\nexport default class PermissionGrid extends Component {\n view() {\n const scopes = this.scopeItems().toArray();\n\n const permissionCells = (permission) => {\n return scopes.map((scope) => <td>{scope.render(permission)}</td>);\n };\n\n return (\n <table className=\"PermissionGrid\">\n <thead>\n <tr>\n <td></td>\n {scopes.map((scope) => (\n <th>\n {scope.label}{' '}\n {scope.onremove\n ? Button.component({\n icon: 'fas fa-times',\n className: 'Button Button--text PermissionGrid-removeScope',\n onclick: scope.onremove,\n })\n : ''}\n </th>\n ))}\n <th>{this.scopeControlItems().toArray()}</th>\n </tr>\n </thead>\n {this.permissionItems()\n .toArray()\n .map((section) => (\n <tbody>\n <tr className=\"PermissionGrid-section\">\n <th>{section.label}</th>\n {permissionCells(section)}\n <td />\n </tr>\n {section.children.map((child) => (\n <tr className=\"PermissionGrid-child\">\n <th>\n {icon(child.icon)}\n {child.label}\n </th>\n {permissionCells(child)}\n <td />\n </tr>\n ))}\n </tbody>\n ))}\n </table>\n );\n }\n\n permissionItems() {\n const items = new ItemList();\n\n items.add(\n 'view',\n {\n label: app.translator.trans('core.admin.permissions.read_heading'),\n children: this.viewItems().toArray(),\n },\n 100\n );\n\n items.add(\n 'start',\n {\n label: app.translator.trans('core.admin.permissions.create_heading'),\n children: this.startItems().toArray(),\n },\n 90\n );\n\n items.add(\n 'reply',\n {\n label: app.translator.trans('core.admin.permissions.participate_heading'),\n children: this.replyItems().toArray(),\n },\n 80\n );\n\n items.add(\n 'moderate',\n {\n label: app.translator.trans('core.admin.permissions.moderate_heading'),\n children: this.moderateItems().toArray(),\n },\n 70\n );\n\n return items;\n }\n\n viewItems() {\n const items = new ItemList();\n\n items.add(\n 'viewDiscussions',\n {\n icon: 'fas fa-eye',\n label: app.translator.trans('core.admin.permissions.view_discussions_label'),\n permission: 'viewDiscussions',\n allowGuest: true,\n },\n 100\n );\n\n items.add(\n 'viewUserList',\n {\n icon: 'fas fa-users',\n label: app.translator.trans('core.admin.permissions.view_user_list_label'),\n permission: 'viewUserList',\n allowGuest: true,\n },\n 100\n );\n\n items.add(\n 'signUp',\n {\n icon: 'fas fa-user-plus',\n label: app.translator.trans('core.admin.permissions.sign_up_label'),\n setting: () =>\n SettingDropdown.component({\n key: 'allow_sign_up',\n options: [\n { value: '1', label: app.translator.transText('core.admin.permissions_controls.signup_open_button') },\n { value: '0', label: app.translator.transText('core.admin.permissions_controls.signup_closed_button') },\n ],\n }),\n },\n 90\n );\n\n items.add('viewLastSeenAt', {\n icon: 'far fa-clock',\n label: app.translator.trans('core.admin.permissions.view_last_seen_at_label'),\n permission: 'user.viewLastSeenAt',\n });\n\n return items;\n }\n\n startItems() {\n const items = new ItemList();\n\n items.add(\n 'start',\n {\n icon: 'fas fa-edit',\n label: app.translator.trans('core.admin.permissions.start_discussions_label'),\n permission: 'startDiscussion',\n },\n 100\n );\n\n items.add(\n 'allowRenaming',\n {\n icon: 'fas fa-i-cursor',\n label: app.translator.trans('core.admin.permissions.allow_renaming_label'),\n setting: () => {\n const minutes = parseInt(app.data.settings.allow_renaming, 10);\n\n return SettingDropdown.component({\n defaultLabel: minutes\n ? app.translator.transChoice('core.admin.permissions_controls.allow_some_minutes_button', minutes, { count: minutes })\n : app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button'),\n key: 'allow_renaming',\n options: [\n { value: '-1', label: app.translator.transText('core.admin.permissions_controls.allow_indefinitely_button') },\n { value: '10', label: app.translator.transText('core.admin.permissions_controls.allow_ten_minutes_button') },\n { value: 'reply', label: app.translator.transText('core.admin.permissions_controls.allow_until_reply_button') },\n ],\n });\n },\n },\n 90\n );\n\n return items;\n }\n\n replyItems() {\n const items = new ItemList();\n\n items.add(\n 'reply',\n {\n icon: 'fas fa-reply',\n label: app.translator.trans('core.admin.permissions.reply_to_discussions_label'),\n permission: 'discussion.reply',\n },\n 100\n );\n\n items.add(\n 'allowPostEditing',\n {\n icon: 'fas fa-pencil-alt',\n label: app.translator.trans('core.admin.permissions.allow_post_editing_label'),\n setting: () => {\n const minutes = parseInt(app.data.settings.allow_post_editing, 10);\n\n return SettingDropdown.component({\n defaultLabel: minutes\n ? app.translator.transChoice('core.admin.permissions_controls.allow_some_minutes_button', minutes, { count: minutes })\n : app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button'),\n key: 'allow_post_editing',\n options: [\n { value: '-1', label: app.translator.transText('core.admin.permissions_controls.allow_indefinitely_button') },\n { value: '10', label: app.translator.transText('core.admin.permissions_controls.allow_ten_minutes_button') },\n { value: 'reply', label: app.translator.transText('core.admin.permissions_controls.allow_until_reply_button') },\n ],\n });\n },\n },\n 90\n );\n\n return items;\n }\n\n moderateItems() {\n const items = new ItemList();\n\n items.add(\n 'viewIpsPosts',\n {\n icon: 'fas fa-bullseye',\n label: app.translator.trans('core.admin.permissions.view_post_ips_label'),\n permission: 'discussion.viewIpsPosts',\n },\n 110\n );\n\n items.add(\n 'renameDiscussions',\n {\n icon: 'fas fa-i-cursor',\n label: app.translator.trans('core.admin.permissions.rename_discussions_label'),\n permission: 'discussion.rename',\n },\n 100\n );\n\n items.add(\n 'hideDiscussions',\n {\n icon: 'far fa-trash-alt',\n label: app.translator.trans('core.admin.permissions.delete_discussions_label'),\n permission: 'discussion.hide',\n },\n 90\n );\n\n items.add(\n 'deleteDiscussions',\n {\n icon: 'fas fa-times',\n label: app.translator.trans('core.admin.permissions.delete_discussions_forever_label'),\n permission: 'discussion.delete',\n },\n 80\n );\n\n items.add(\n 'postWithoutThrottle',\n {\n icon: 'fas fa-swimmer',\n label: app.translator.trans('core.admin.permissions.post_without_throttle_label'),\n permission: 'postWithoutThrottle',\n },\n 70\n );\n\n items.add(\n 'editPosts',\n {\n icon: 'fas fa-pencil-alt',\n label: app.translator.trans('core.admin.permissions.edit_posts_label'),\n permission: 'discussion.editPosts',\n },\n 70\n );\n\n items.add(\n 'hidePosts',\n {\n icon: 'far fa-trash-alt',\n label: app.translator.trans('core.admin.permissions.delete_posts_label'),\n permission: 'discussion.hidePosts',\n },\n 60\n );\n\n items.add(\n 'deletePosts',\n {\n icon: 'fas fa-times',\n label: app.translator.trans('core.admin.permissions.delete_posts_forever_label'),\n permission: 'discussion.deletePosts',\n },\n 60\n );\n\n items.add(\n 'userEdit',\n {\n icon: 'fas fa-user-cog',\n label: app.translator.trans('core.admin.permissions.edit_users_label'),\n permission: 'user.edit',\n },\n 60\n );\n\n return items;\n }\n\n scopeItems() {\n const items = new ItemList();\n\n items.add(\n 'global',\n {\n label: app.translator.trans('core.admin.permissions.global_heading'),\n render: (item) => {\n if (item.setting) {\n return item.setting();\n } else if (item.permission) {\n return PermissionDropdown.component({\n permission: item.permission,\n allowGuest: item.allowGuest,\n });\n }\n\n return '';\n },\n },\n 100\n );\n\n return items;\n }\n\n scopeControlItems() {\n return new ItemList();\n }\n}\n","import app from '../app';\n\nimport Page from './Page';\nimport GroupBadge from '../../common/components/GroupBadge';\nimport EditGroupModal from './EditGroupModal';\nimport Group from '../../common/models/Group';\nimport icon from '../../common/helpers/icon';\nimport PermissionGrid from './PermissionGrid';\n\nexport default class PermissionsPage extends Page {\n view() {\n return (\n <div className=\"PermissionsPage\">\n <div className=\"PermissionsPage-groups\">\n <div className=\"container\">\n {app.store\n .all('groups')\n .filter((group) => [Group.GUEST_ID, Group.MEMBER_ID].indexOf(group.id()) === -1)\n .map((group: Group) => (\n <button className=\"Button Group\" onclick={() => app.modal.show(EditGroupModal, { group })}>\n {GroupBadge.component({\n group,\n className: 'Group-icon',\n label: null,\n })}\n <span className=\"Group-name\">{group.namePlural()}</span>\n </button>\n ))}\n <button className=\"Button Group Group--add\" onclick={() => app.modal.show(EditGroupModal)}>\n {icon('fas fa-plus', { className: 'Group-icon' })}\n <span className=\"Group-name\">{app.translator.trans('core.admin.permissions.new_group_button')}</span>\n </button>\n </div>\n </div>\n\n <div className=\"PermissionsPage-permissions\">\n <div className=\"container\">{PermissionGrid.component()}</div>\n </div>\n </div>\n );\n }\n}\n","import avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport Dropdown from '../../common/components/Dropdown';\nimport Button from '../../common/components/Button';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `SessionDropdown` component shows a button with the current user's\n * avatar/name, with a dropdown of session controls.\n */\nexport default class SessionDropdown extends Dropdown {\n static initProps(props) {\n super.initProps(props);\n\n props.className = 'SessionDropdown';\n props.buttonClassName = 'Button Button--user Button--flat';\n props.menuClassName = 'Dropdown-menu--right';\n }\n\n view() {\n this.props.children = this.items().toArray();\n\n return super.view();\n }\n\n getButtonContent() {\n const user = app.session.user;\n\n return [avatar(user), ' ', <span className=\"Button-label\">{username(user)}</span>];\n }\n\n /**\n * Build an item list for the contents of the dropdown menu.\n *\n * @return {ItemList}\n */\n items() {\n const items = new ItemList();\n\n items.add(\n 'logOut',\n Button.component({\n icon: 'fas fa-sign-out-alt',\n children: app.translator.trans('core.admin.header.log_out_button'),\n onclick: app.session.logout.bind(app.session),\n }),\n -100\n );\n\n return items;\n }\n}\n","import app from '../app';\n\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport Button from '../../common/components/Button';\nimport saveSettings from '../utils/saveSettings';\n\nexport default class SettingDropdown extends SelectDropdown {\n static initProps(props) {\n super.initProps(props);\n\n props.className = 'SettingDropdown';\n props.buttonClassName = 'Button Button--text';\n props.caretIcon = 'fas fa-caret-down';\n props.defaultLabel = 'Custom';\n\n props.children = props.options.map(({ value, label }) => {\n const active = app.data.settings[props.key] === value;\n\n return Button.component({\n children: label,\n icon: active ? 'fas fa-check' : true,\n onclick: saveSettings.bind(this, { [props.key]: value }),\n active,\n });\n });\n }\n}\n","import app from '../app';\n\nimport Modal from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport saveSettings from '../utils/saveSettings';\n\nexport default abstract class SettingsModal extends Modal {\n settings: object = {};\n loading: boolean = false;\n\n form(): string | JSX.Element[] {\n return '';\n }\n\n content() {\n return (\n <div className=\"Modal-body\">\n <div className=\"Form\">\n {this.form()}\n\n <div className=\"Form-group\">{this.submitButton()}</div>\n </div>\n </div>\n );\n }\n\n submitButton() {\n return (\n <Button type=\"submit\" className=\"Button Button--primary\" loading={this.loading} disabled={!this.changed()}>\n {app.translator.trans('core.admin.settings.submit_button')}\n </Button>\n );\n }\n\n setting(key, fallback = '') {\n this.settings[key] = this.settings[key] || m.prop(app.data.settings[key] || fallback);\n\n return this.settings[key];\n }\n\n dirty() {\n const dirty = {};\n\n Object.keys(this.settings).forEach((key) => {\n const value = this.settings[key]();\n\n if (value !== app.data.settings[key]) {\n dirty[key] = value;\n }\n });\n\n return dirty;\n }\n\n changed() {\n return Object.keys(this.dirty()).length;\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n saveSettings(this.dirty()).then(this.onsaved.bind(this), this.loaded.bind(this));\n }\n\n onsaved() {\n this.hide();\n }\n}\n","import app from '../app';\n\nimport DashboardWidget from './DashboardWidget';\nimport listItems from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport Dropdown from '../../common/components/Dropdown';\nimport Button from '../../common/components/Button';\nimport LoadingModal from './LoadingModal';\n\nexport default class StatusWidget extends DashboardWidget {\n className() {\n return 'StatusWidget';\n }\n\n content() {\n return <ul>{listItems(this.items().toArray())}</ul>;\n }\n\n items() {\n const items = new ItemList();\n\n items.add(\n 'tools',\n <Dropdown\n label={app.translator.transText('core.admin.dashboard.tools_button')}\n icon=\"fas fa-cog\"\n buttonClassName=\"Button\"\n menuClassName=\"Dropdown-menu--right\"\n >\n <Button onclick={this.handleClearCache.bind(this)}>{app.translator.trans('core.admin.dashboard.clear_cache_button')}</Button>\n </Dropdown>\n );\n\n items.add('version-flarum', [<strong>Flarum</strong>, <br />, app.forum.attribute('version')]);\n items.add('version-php', [<strong>PHP</strong>, <br />, app.data.phpVersion]);\n items.add('version-mysql', [<strong>MySQL</strong>, <br />, app.data.mysqlVersion]);\n\n return items;\n }\n\n handleClearCache(e) {\n app.modal.show(LoadingModal);\n\n app.request({\n method: 'DELETE',\n url: app.forum.attribute('apiUrl') + '/cache',\n }).then(() => window.location.reload());\n }\n}\n","import app from '../app';\n\nimport Button, { ButtonProps } from '../../common/components/Button';\n\nexport default class UploadImageButton<T extends ButtonProps = ButtonProps> extends Button<T> {\n loading: boolean = false;\n\n view() {\n this.props.loading = this.loading;\n this.props.className = (this.props.className || '') + ' Button';\n\n if (app.data.settings[this.props.name + '_path']) {\n this.props.onclick = this.remove.bind(this);\n this.props.children = app.translator.trans('core.admin.upload_image.remove_button');\n\n return (\n <div>\n <p>\n <img src={app.forum.attribute(this.props.name + 'Url')} alt=\"\" />\n </p>\n <p>{super.view()}</p>\n </div>\n );\n } else {\n this.props.onclick = this.upload.bind(this);\n this.props.children = app.translator.trans('core.admin.upload_image.upload_button');\n }\n\n return super.view();\n }\n\n /**\n * Prompt the user to upload an image.\n */\n upload() {\n if (this.loading) return;\n\n const $input = $('<input type=\"file\">');\n\n $input\n .appendTo('body')\n .hide()\n .click()\n .on('change', (e) => {\n const data = new FormData();\n data.append(this.props.name, $(e.target)[0].files[0]);\n\n this.loading = true;\n m.redraw();\n\n app.request({\n method: 'POST',\n url: this.resourceUrl(),\n serialize: (raw) => raw,\n body: data,\n }).then(this.success.bind(this), this.failure.bind(this));\n });\n }\n\n /**\n * Remove the logo.\n */\n remove() {\n this.loading = true;\n m.redraw();\n\n app.request({\n method: 'DELETE',\n url: this.resourceUrl(),\n }).then(this.success.bind(this), this.failure.bind(this));\n }\n\n resourceUrl() {\n return app.forum.attribute('apiUrl') + '/' + this.props.name;\n }\n\n /**\n * After a successful upload/removal, reload the page.\n *\n * @param {Object} response\n * @protected\n */\n success(response) {\n window.location.reload();\n }\n\n /**\n * If upload/removal fails, stop loading.\n *\n * @param {Object} response\n * @protected\n */\n failure(response) {\n this.loading = false;\n m.redraw();\n }\n}\n","import app from './app';\n\nexport { app };\n\n// Export compat API\nimport compat from './compat';\n\ncompat.app = app;\n\nexport { compat };\n","import BasicsPage from './components/BasicsPage';\nimport DashboardPage from './components/DashboardPage';\nimport MailPage from './components/MailPage';\nimport PermissionsPage from './components/PermissionsPage';\nimport AppearancePage from './components/AppearancePage';\nimport ExtensionsPage from './components/ExtensionsPage';\n\nexport default (app) => {\n app.routes = {\n dashboard: { path: '/', component: DashboardPage },\n basics: { path: '/basics', component: BasicsPage },\n mail: { path: '/mail', component: MailPage },\n permissions: { path: '/permissions', component: PermissionsPage },\n appearance: { path: '/appearance', component: AppearancePage },\n extensions: { path: '/extensions', component: ExtensionsPage },\n };\n};\n","import app from '../app';\n\nexport default function saveSettings(settings) {\n const oldSettings = JSON.parse(JSON.stringify(app.data.settings));\n\n Object.assign(app.data.settings, settings);\n\n return app\n .request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/settings',\n body: settings,\n })\n .catch((error) => {\n app.data.settings = oldSettings;\n throw error;\n });\n}\n","import Mithril from 'mithril';\n\nimport Translator from './Translator';\nimport Session from './Session';\nimport Store from './Store';\nimport { extend } from './extend';\n\nimport extract from './utils/extract';\nimport mapRoutes from './utils/mapRoutes';\nimport Drawer from './utils/Drawer';\nimport RequestError from './utils/RequestError';\nimport ItemList from './utils/ItemList';\nimport ScrollListener from './utils/ScrollListener';\n\nimport Forum from './models/Forum';\nimport Discussion from './models/Discussion';\nimport User from './models/User';\nimport Post from './models/Post';\nimport Group from './models/Group';\nimport Notification from './models/Notification';\n\nimport Alert from './components/Alert';\nimport Button from './components/Button';\nimport ModalManager from './components/ModalManager';\nimport RequestErrorModal from './components/RequestErrorModal';\n\nimport flattenDeep from 'lodash/flattenDeep';\nimport AlertManager from './components/AlertManager';\n\nexport type ApplicationData = {\n apiDocument: any;\n locale: string;\n locales: any;\n resources: any[];\n session: any;\n};\n\nexport default abstract class Application {\n /**\n * The forum model for this application.\n */\n public forum!: Forum;\n\n /**\n * A map of routes, keyed by a unique route name. Each route is an object\n * containing the following properties:\n *\n * - `path` The path that the route is accessed at.\n * - `component` The Mithril component to render when this route is active.\n *\n * @example\n * app.routes.discussion = {path: '/d/:id', component: DiscussionPage.component()};\n */\n public routes: { [key: string]: { path: string; component: any; [key: string]: any } } = {};\n\n /**\n * An ordered list of initializers to bootstrap the application.\n */\n public initializers = new ItemList();\n\n /**\n * The app's session.\n */\n public session!: Session;\n\n /**\n * The app's translator.\n */\n public translator = new Translator();\n\n /**\n * The app's data store.\n */\n public store = new Store({\n forums: Forum,\n users: User,\n discussions: Discussion,\n posts: Post,\n groups: Group,\n notifications: Notification,\n });\n\n /**\n * A local cache that can be used to store data at the application level, so\n * that is persists between different routes.\n */\n public cache: { [key: string]: any } = {};\n\n /**\n * Whether or not the app has been booted.\n */\n public booted: boolean = false;\n\n /**\n * An Alert that was shown as a result of an AJAX request error. If present,\n * it will be dismissed on the next successful request.\n */\n private requestError: RequestError | null = null;\n\n data!: ApplicationData;\n\n title = '';\n titleCount = 0;\n\n drawer = new Drawer();\n\n modal!: ModalManager;\n alerts!: AlertManager;\n\n load(payload) {\n this.data = payload;\n this.translator.locale = payload.locale;\n }\n\n boot() {\n this.initializers.toArray().forEach((initializer) => initializer(this));\n\n this.store.pushPayload({ data: this.data.resources });\n\n this.forum = this.store.getById('forums', 1);\n\n this.session = new Session(this.store.getById('users', this.data.session.userId), this.data.session.csrfToken);\n\n this.mount();\n\n this.booted = true;\n }\n\n bootExtensions(extensions) {\n Object.keys(extensions).forEach((name) => {\n const extension = extensions[name];\n\n const extenders = flattenDeep(extension.extend);\n\n for (const extender of extenders) {\n extender.extend(this, { name, exports: extension });\n }\n });\n }\n\n mount(basePath = '') {\n const $modal = document.getElementById('modal');\n const $alerts = document.getElementById('alerts');\n const $content = document.getElementById('content');\n\n if ($modal) m.mount($modal, (this.modal = new ModalManager()));\n\n if ($alerts) m.mount($alerts, (this.alerts = new AlertManager({ oninit: (vnode) => (this.alerts = vnode.state) })));\n\n if ($content) m.route($content, basePath + '/', mapRoutes(this.routes, basePath));\n\n // Add a class to the body which indicates that the page has been scrolled\n // down.\n new ScrollListener((top) => {\n const $app = $('#app');\n const offset = $app.offset().top;\n\n $app.toggleClass('affix', top >= offset).toggleClass('scrolled', top > offset);\n }).start();\n\n $(() => {\n $('body').addClass('ontouchstart' in window ? 'touch' : 'no-touch');\n });\n }\n\n /**\n * Get the API response document that has been preloaded into the application.\n */\n preloadedApiDocument() {\n if (this.data.apiDocument) {\n const results = this.store.pushPayload(this.data.apiDocument);\n\n this.data.apiDocument = null;\n\n return results;\n }\n\n return null;\n }\n\n /**\n * Set the <title> of the page.\n */\n setTitle(title: string) {\n this.title = title;\n this.updateTitle();\n }\n\n /**\n * Set a number to display in the <title> of the page.\n */\n setTitleCount(count: number) {\n this.titleCount = count;\n this.updateTitle();\n }\n\n updateTitle() {\n document.title = (this.titleCount ? `(${this.titleCount}) ` : '') + (this.title ? this.title + ' - ' : '') + this.forum.attribute('title');\n }\n\n /**\n * Construct a URL to the route with the given name.\n */\n route(name: string, params: object = {}): string {\n const route = this.routes[name];\n\n if (!route) throw new Error(`Route '${name}' does not exist`);\n\n const url = route.path.replace(/:([^\\/]+)/g, (m, key) => extract(params, key));\n\n // Remove falsy values in params to avoid\n // having urls like '/?sort&q'\n for (const key in params) {\n if (params.hasOwnProperty(key) && !params[key]) delete params[key];\n }\n\n const queryString = m.buildQueryString(params as Mithril.Params);\n const prefix = m.route.prefix === '' ? this.forum.attribute('basePath') : '';\n\n return prefix + url + (queryString ? '?' + queryString : '');\n }\n\n /**\n * Make an AJAX request, handling any low-level errors that may occur.\n *\n * @see https://mithril.js.org/request.html\n */\n request(originalOptions: Mithril.RequestOptions<JSON> | any): Promise<any> {\n const options: Mithril.RequestOptions<JSON> | any = Object.assign({}, originalOptions);\n\n // Set some default options if they haven't been overridden. We want to\n // authenticate all requests with the session token. We also want all\n // requests to run asynchronously in the background, so that they don't\n // prevent redraws from occurring.\n options.background = options.background || true;\n\n extend(options, 'config', (result, xhr: XMLHttpRequest) => xhr.setRequestHeader('X-CSRF-Token', this.session.csrfToken!));\n\n // If the method is something like PATCH or DELETE, which not all servers\n // and clients support, then we'll send it as a POST request with the\n // intended method specified in the X-HTTP-Method-Override header.\n if (options.method !== 'GET' && options.method !== 'POST') {\n const method = options.method;\n extend(options, 'config', (result, xhr: XMLHttpRequest) => xhr.setRequestHeader('X-HTTP-Method-Override', method));\n options.method = 'POST';\n }\n\n // When we deserialize JSON data, if for some reason the server has provided\n // a dud response, we don't want the application to crash. We'll show an\n // error message to the user instead.\n options.deserialize = options.deserialize || ((responseText) => responseText);\n\n options.errorHandler =\n options.errorHandler ||\n ((error) => {\n throw error;\n });\n\n // When extracting the data from the response, we can check the server\n // response code and show an error message to the user if something's gone\n // awry.\n const original = options.extract;\n options.extract = (xhr) => {\n let responseText;\n\n if (original) {\n responseText = original(xhr.responseText);\n } else {\n responseText = xhr.responseText || null;\n }\n\n const status = xhr.status;\n\n if (status < 200 || status > 299) {\n throw new RequestError(status, responseText, options, xhr);\n }\n\n if (xhr.getResponseHeader) {\n const csrfToken = xhr.getResponseHeader('X-CSRF-Token');\n if (csrfToken) app.session.csrfToken = csrfToken;\n }\n\n try {\n return JSON.parse(responseText);\n } catch (e) {\n throw new RequestError(500, responseText, options, xhr);\n }\n };\n\n if (this.requestError) this.alerts.dismiss(this.requestError.alert);\n\n // Now make the request. If it's a failure, inspect the error that was\n // returned and show an alert containing its contents.\n return m.request(options).then(\n (res) => res,\n (error) => {\n this.requestError = error;\n\n let children;\n\n switch (error.status) {\n case 422:\n children = error.response.errors\n .map((error) => [error.detail, m('br')])\n .reduce((a, b) => a.concat(b), [])\n .slice(0, -1);\n break;\n\n case 401:\n case 403:\n children = this.translator.trans('core.lib.error.permission_denied_message');\n break;\n\n case 404:\n case 410:\n children = this.translator.trans('core.lib.error.not_found_message');\n break;\n\n case 429:\n children = this.translator.trans('core.lib.error.rate_limit_exceeded_message');\n break;\n\n default:\n children = this.translator.trans('core.lib.error.generic_message');\n }\n\n const isDebug = app.forum.attribute('debug');\n\n error.alert = Alert.component({\n type: 'error',\n children,\n controls: isDebug && [\n Button.component({\n className: 'Button Button--link',\n onclick: this.showDebug.bind(this, error),\n children: 'DEBUG', // TODO make translatable\n }),\n ],\n });\n\n try {\n options.errorHandler(error);\n } catch (error) {\n console.error(error);\n this.alerts.show(error.alert);\n }\n\n return Promise.reject(error);\n }\n );\n }\n\n private showDebug(error: RequestError) {\n this.alerts.dismiss(this.requestError!.alert);\n\n this.modal.show(RequestErrorModal, { error });\n }\n}\n","import Mithril, { ClassComponent, Vnode } from 'mithril';\n\nexport type ComponentProps = {\n children?: Mithril.Children;\n\n className?: string;\n\n [key: string]: any;\n};\n\nexport default class Component<T extends ComponentProps = any> implements ClassComponent {\n element!: HTMLElement;\n\n props: T;\n\n constructor(props: T = <T>{}) {\n this.props = props.tag ? <T>{} : props;\n }\n\n view(vnode) {\n throw new Error('Component#view must be implemented by subclass');\n }\n\n oninit(vnode) {\n this.setProps(vnode);\n }\n\n oncreate(vnode) {\n this.setProps(vnode);\n this.element = vnode.dom;\n }\n\n onbeforeupdate(vnode) {\n this.setProps(vnode);\n }\n\n onupdate(vnode) {\n this.setProps(vnode);\n }\n\n onbeforeremove(vnode) {\n this.setProps(vnode);\n }\n\n onremove(vnode) {\n this.setProps(vnode);\n }\n\n /**\n * Returns a jQuery object for this component's element. If you pass in a\n * selector string, this method will return a jQuery object, using the current\n * element as its buffer.\n *\n * For example, calling `component.$('li')` will return a jQuery object\n * containing all of the `li` elements inside the DOM element of this\n * component.\n *\n * @param selector a jQuery-compatible selector string\n * @final\n */\n $(selector?: string): ZeptoCollection {\n const $element = $(this.element);\n\n return selector ? $element.find(selector) : $element;\n }\n\n render() {\n return m(this.constructor as typeof Component, this.props);\n }\n\n static component(props: ComponentProps | any = {}, children?: Mithril.Children) {\n const componentProps: ComponentProps = Object.assign({}, props);\n\n if (children) componentProps.children = children;\n\n return m(this, componentProps);\n }\n\n static initProps(props: ComponentProps = {}) {}\n\n private setProps(vnode: Vnode<T, this>) {\n const props = vnode.attrs || {};\n\n (this.constructor as typeof Component).initProps(props);\n\n if (!props.children) props.children = vnode.children;\n\n this.props = props;\n }\n}\n","import Store from './Store';\n\nexport interface Identifier {\n type: string;\n id: string;\n}\n\nexport interface Data extends Identifier {\n attributes?: { [key: string]: any };\n relationships?: { [key: string]: { data: Identifier | Identifier[] } };\n}\n\n/**\n * The `Model` class represents a local data resource. It provides methods to\n * persist changes via the API.\n */\nexport default abstract class Model {\n /**\n * The resource object from the API.\n */\n data: Data;\n\n payload: any;\n\n /**\n * The time at which the model's data was last updated. Watching the value\n * of this property is a fast way to retain/cache a subtree if data hasn't\n * changed.\n */\n freshness: Date;\n\n /**\n * Whether or not the resource exists on the server.\n */\n exists: boolean;\n\n /**\n * The data store that this resource should be persisted to.\n */\n protected store?: Store;\n\n /**\n * @param data A resource object from the API.\n * @param store The data store that this model should be persisted to.\n */\n constructor(data = <Data>{}, store?: Store) {\n this.data = data;\n this.store = store;\n\n this.freshness = new Date();\n this.exists = false;\n }\n\n /**\n * Get the model's ID.\n * @final\n */\n id(): string {\n return this.data.id;\n }\n\n /**\n * Get one of the model's attributes.\n * @final\n */\n attribute(attribute: string): any {\n return this.data.attributes && this.data.attributes[attribute];\n }\n\n /**\n * Merge new data into this model locally.\n *\n * @param data A resource object to merge into this model\n */\n public pushData(data: {}) {\n // Since most of the top-level items in a resource object are objects\n // (e.g. relationships, attributes), we'll need to check and perform the\n // merge at the second level if that's the case.\n for (const key in data) {\n if (typeof data[key] === 'object') {\n this.data[key] = this.data[key] || {};\n\n // For every item in a second-level object, we want to check if we've\n // been handed a Model instance. If so, we will convert it to a\n // relationship data object.\n for (const innerKey in data[key]) {\n if (data[key][innerKey] instanceof Model) {\n data[key][innerKey] = { data: Model.getIdentifier(data[key][innerKey]) };\n }\n this.data[key][innerKey] = data[key][innerKey];\n }\n } else {\n this.data[key] = data[key];\n }\n }\n\n // Now that we've updated the data, we can say that the model is fresh.\n // This is an easy way to invalidate retained subtrees etc.\n this.freshness = new Date();\n }\n\n /**\n * Merge new attributes into this model locally.\n *\n * @param attributes The attributes to merge.\n */\n pushAttributes(attributes: any) {\n this.pushData({ attributes });\n }\n\n /**\n * Merge new attributes into this model, both locally and with persistence.\n *\n * @param attributes The attributes to save. If a 'relationships' key\n * exists, it will be extracted and relationships will also be saved.\n * @param [options]\n */\n save(attributes: any, options: any = {}): Promise<Model | Model[]> {\n const data: Data = {\n type: this.data.type,\n id: this.data.id,\n attributes,\n };\n\n // If a 'relationships' key exists, extract it from the attributes hash and\n // set it on the top-level data object instead. We will be sending this data\n // object to the API for persistence.\n if (attributes.relationships) {\n data.relationships = {};\n\n for (const key in attributes.relationships) {\n const model = attributes.relationships[key];\n\n data.relationships[key] = {\n data: model instanceof Array ? model.map(Model.getIdentifier) : Model.getIdentifier(model),\n };\n }\n\n delete attributes.relationships;\n }\n\n // Before we update the model's data, we should make a copy of the model's\n // old data so that we can revert back to it if something goes awry during\n // persistence.\n const oldData = this.copyData();\n\n this.pushData(data);\n\n const request = { data };\n if (options.meta) request.meta = options.meta;\n\n return app\n .request(\n Object.assign(\n {\n method: this.exists ? 'PATCH' : 'POST',\n url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n body: request,\n },\n options\n )\n )\n .then(\n // If everything went well, we'll make sure the store knows that this\n // model exists now (if it didn't already), and we'll push the data that\n // the API returned into the store.\n (payload) => {\n this.store.data[payload.data.type] = this.store.data[payload.data.type] || {};\n this.store.data[payload.data.type][payload.data.id] = this;\n return this.store.pushPayload(payload);\n },\n\n // If something went wrong, though... good thing we backed up our model's\n // old data! We'll revert to that and let others handle the error.\n (response) => {\n this.pushData(oldData);\n m.redraw();\n throw response;\n }\n );\n }\n\n /**\n * Send a request to delete the resource.\n *\n * @param {Object} body Data to send along with the DELETE request.\n * @param {Object} [options]\n * @return {Promise}\n * @public\n */\n delete(body = {}, options = {}) {\n if (!this.exists) return Promise.resolve();\n\n return app\n .request(\n Object.assign(\n {\n method: 'DELETE',\n url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n body,\n },\n options\n )\n )\n .then(() => {\n this.exists = false;\n this.store!.remove(this);\n });\n }\n\n /**\n * Construct a path to the API endpoint for this resource.\n *\n * @return {String}\n * @protected\n */\n apiEndpoint() {\n return '/' + this.data.type + (this.exists ? '/' + this.data.id : '');\n }\n\n copyData() {\n return JSON.parse(JSON.stringify(this.data));\n }\n\n /**\n * Generate a function which returns the value of the given attribute.\n *\n * @param name\n * @param [transform] A function to transform the attribute value\n */\n static attribute(name: string, transform?: Function): () => any {\n return function (this: Model) {\n const value = this.data.attributes && this.data.attributes[name];\n\n return transform ? transform(value) : value;\n };\n }\n\n /**\n * Generate a function which returns the value of the given has-one\n * relationship.\n *\n * @return false if no information about the\n * relationship exists; undefined if the relationship exists but the model\n * has not been loaded; or the model if it has been loaded.\n */\n static hasOne(name: string): () => Model | boolean {\n return function (this: Model) {\n if (this.data.relationships) {\n const relationship = this.data.relationships[name];\n\n if (relationship && !Array.isArray(relationship.data)) {\n return app.store.getById(relationship.data.type, relationship.data.id);\n }\n }\n\n return false;\n };\n }\n\n /**\n * Generate a function which returns the value of the given has-many\n * relationship.\n *\n * @return false if no information about the relationship\n * exists; an array if it does, containing models if they have been\n * loaded, and undefined for those that have not.\n */\n static hasMany(name: string): () => any[] | false {\n return function (this: Model) {\n if (this.data.relationships) {\n const relationship = this.data.relationships[name];\n\n if (relationship && Array.isArray(relationship.data)) {\n return relationship.data.map((data) => app.store.getById(data.type, data.id));\n }\n }\n\n return false;\n };\n }\n\n /**\n * Transform the given value into a Date object.\n */\n static transformDate(value: string): Date | null {\n return value ? new Date(value) : null;\n }\n\n /**\n * Get a resource identifier object for the given model.\n */\n protected static getIdentifier(model: Model): Identifier {\n return {\n type: model.data.type,\n id: model.data.id,\n };\n }\n}\n","import User from './models/User';\n\n/**\n * The `Session` class defines the current user session. It stores a reference\n * to the current authenticated user, and provides methods to log in/out.\n */\nexport default class Session {\n /**\n * The current authenticated user.\n */\n user: User;\n\n /**\n * The CSRF token.\n */\n csrfToken?: string;\n\n constructor(user, csrfToken) {\n this.user = user;\n\n this.csrfToken = csrfToken;\n }\n\n /**\n * Attempt to log in a user.\n */\n login(body: { identification: string; password: string; remember?: boolean }, options = {}) {\n return app.request(\n Object.assign(\n {\n method: 'POST',\n url: `${app.forum.attribute('baseUrl')}/login`,\n body,\n },\n options\n )\n );\n }\n\n /**\n * Log the user out.\n *\n * @public\n */\n logout() {\n window.location.href = `${app.forum.attribute('baseUrl')}/logout?token=${this.csrfToken}`;\n }\n}\n","import Model from './Model';\n\n/**\n * The `Store` class defines a local data store, and provides methods to\n * retrieve data from the API.\n */\nexport default class Store {\n /**\n * The local data store. A tree of resource types to IDs, such that\n * accessing data[type][id] will return the model for that type/ID.\n */\n data: { [key: string]: Model[] } = {};\n\n /**\n * The model registry. A map of resource types to the model class that\n * should be used to represent resources of that type.\n */\n models: {};\n\n constructor(models) {\n this.models = models;\n }\n\n /**\n * Push resources contained within an API payload into the store.\n *\n * @param payload\n * @return The model(s) representing the resource(s) contained\n * within the 'data' key of the payload.\n */\n pushPayload(payload: { included?: {}[]; data?: {} | {}[] }): Model | Model[] {\n if (payload.included) payload.included.map(this.pushObject.bind(this));\n\n const result: any = payload.data instanceof Array ? payload.data.map(this.pushObject.bind(this)) : this.pushObject(payload.data);\n\n // Attach the original payload to the model that we give back. This is\n // useful to consumers as it allows them to access meta information\n // associated with their request.\n result.payload = payload;\n\n return result;\n }\n\n /**\n * Create a model to represent a resource object (or update an existing one),\n * and push it into the store.\n *\n * @param {Object} data The resource object\n * @return The model, or null if no model class has been\n * registered for this resource type.\n */\n pushObject(data): Model | null {\n if (!this.models[data.type]) return null;\n\n const type = (this.data[data.type] = this.data[data.type] || {});\n\n if (type[data.id]) {\n type[data.id].pushData(data);\n } else {\n type[data.id] = this.createRecord(data.type, data);\n }\n\n type[data.id].exists = true;\n\n return type[data.id];\n }\n\n /**\n * Make a request to the API to find record(s) of a specific type.\n *\n * @param type The resource type.\n * @param [id] The ID(s) of the model(s) to retrieve.\n * Alternatively, if an object is passed, it will be handled as the\n * `query` parameter.\n * @param query\n * @param options\n */\n find<T extends Model = Model>(type: string, id?: number | number[] | any, query = {}, options = {}): Promise<T | T[]> {\n let params = query;\n let url = `${app.forum.attribute('apiUrl')}/${type}`;\n\n if (id instanceof Array) {\n url += `?filter[id]=${id.join(',')}`;\n } else if (typeof id === 'object') {\n params = id;\n } else if (id) {\n url += `/${id}`;\n }\n\n return <Promise<T | T[]>>app\n .request(\n Object.assign(\n {\n method: 'GET',\n url,\n params,\n },\n options\n )\n )\n .then(this.pushPayload.bind(this));\n }\n\n /**\n * Get a record from the store by ID.\n *\n * @param type The resource type.\n * @param id The resource ID.\n */\n getById<T extends Model = Model>(type: string, id: number | string): T {\n return this.data[type] && (this.data[type][id] as T);\n }\n\n /**\n * Get a record from the store by the value of a model attribute.\n *\n * @param type The resource type.\n * @param key The name of the method on the model.\n * @param value The value of the model attribute.\n */\n getBy<T extends Model = Model>(type: string, key: string, value: any): T {\n return this.all<T>(type).filter((model) => model[key]() === value)[0];\n }\n\n /**\n * Get all loaded records of a specific type.\n */\n all<T extends Model = Model>(type: string): T[] {\n const records = this.data[type];\n\n return records ? Object.keys(records).map((id) => records[id]) : [];\n }\n\n /**\n * Remove the given model from the store.\n */\n remove(model: Model) {\n delete this.data[model.data.type][model.id()];\n }\n\n /**\n * Create a new record of the given type.\n *\n * @param {String} type The resource type\n * @param {Object} [data] Any data to initialize the model with\n */\n createRecord<T extends Model = Model>(type: string, data: any = {}): T {\n data.type = data.type || type;\n\n return new this.models[type](data, this);\n }\n}\n","import extract from './utils/extract';\nimport extractText from './utils/extractText';\nimport username from './helpers/username';\n\ntype Translations = { [key: string]: string };\n\nexport default class Translator {\n /**\n * A map of translation keys to their translated values.\n */\n translations: Translations = {};\n locale?: string;\n\n addTranslations(translations) {\n Object.assign(this.translations, translations);\n }\n\n trans(id: string, parameters?: any): string | any[] {\n const translation = this.translations[id];\n\n if (translation) {\n return this.apply(translation, parameters || {});\n }\n\n return id;\n }\n\n transText(id: string, parameters?: any): string {\n return extractText(this.trans(id, parameters));\n }\n\n transChoice(id: string, number: number, parameters: any): string | any[] {\n let translation: string = this.translations[id];\n\n if (translation) {\n translation = this.pluralize(translation, number);\n\n return this.apply(translation, parameters || {});\n }\n\n return id;\n }\n\n apply(translation: string, input: any) {\n if ('user' in input) {\n const user = extract(input, 'user');\n if (!input.username) input.username = username(user);\n }\n\n const parts = translation.split(new RegExp('({[a-z0-9_]+}|</?[a-z0-9_]+>)', 'gi'));\n\n const hydrated: any[] = [];\n const open: any[][] = [hydrated];\n\n parts.forEach((part) => {\n const match = part.match(new RegExp('{([a-z0-9_]+)}|<(/?)([a-z0-9_]+)>', 'i'));\n\n if (match) {\n if (match[1]) {\n open[0].push(input[match[1]]);\n } else if (match[3]) {\n if (match[2]) {\n open.shift();\n } else {\n let tag = input[match[3]] || { tag: match[3], children: [] };\n open[0].push(tag);\n open.unshift(tag.children || tag);\n }\n }\n } else {\n open[0].push({ tag: 'span', text: part });\n }\n });\n\n return hydrated.filter((part) => part);\n }\n\n pluralize(translation: string, number: number): string | undefined {\n const sPluralRegex = new RegExp(/^\\w+\\: +(.+)$/),\n cPluralRegex = new RegExp(\n /^\\s*((\\{\\s*(\\-?\\d+[\\s*,\\s*\\-?\\d+]*)\\s*\\})|([\\[\\]])\\s*(-Inf|\\-?\\d+)\\s*,\\s*(\\+?Inf|\\-?\\d+)\\s*([\\[\\]]))\\s?(.+?)$/\n ),\n iPluralRegex = new RegExp(/^\\s*(\\{\\s*(\\-?\\d+[\\s*,\\s*\\-?\\d+]*)\\s*\\})|([\\[\\]])\\s*(-Inf|\\-?\\d+)\\s*,\\s*(\\+?Inf|\\-?\\d+)\\s*([\\[\\]])/),\n standardRules = [],\n explicitRules = [];\n\n translation.split('|').forEach((part) => {\n if (cPluralRegex.test(part)) {\n const matches = part.match(cPluralRegex);\n explicitRules[matches[0]] = matches[matches.length - 1];\n } else if (sPluralRegex.test(part)) {\n const matches = part.match(sPluralRegex);\n standardRules.push(matches[1]);\n } else {\n standardRules.push(part);\n }\n });\n\n explicitRules.forEach((rule, e) => {\n if (iPluralRegex.test(e)) {\n const matches = e.match(iPluralRegex);\n\n if (matches[1]) {\n const ns = matches[2].split(',');\n\n for (let n in ns) {\n if (number == ns[n]) {\n return explicitRules[e];\n }\n }\n } else {\n const leftNumber = this.convertNumber(matches[4]);\n const rightNumber = this.convertNumber(matches[5]);\n\n if (\n ('[' === matches[3] ? number >= leftNumber : number > leftNumber) &&\n (']' === matches[6] ? number <= rightNumber : number < rightNumber)\n ) {\n return explicitRules[e];\n }\n }\n }\n });\n\n return standardRules[this.pluralPosition(number, this.locale)] || standardRules[0] || undefined;\n }\n\n convertNumber(number: string): number {\n if ('-Inf' === number) {\n return Number.NEGATIVE_INFINITY;\n } else if ('+Inf' === number || 'Inf' === number) {\n return Number.POSITIVE_INFINITY;\n }\n\n return parseInt(number, 10);\n }\n\n pluralPosition(number: number, locale: string): number {\n if ('pt_BR' === locale) {\n locale = 'xbr';\n }\n\n if (locale.length > 3) {\n locale = locale.split('_')[0];\n }\n\n switch (locale) {\n case 'bo':\n case 'dz':\n case 'id':\n case 'ja':\n case 'jv':\n case 'ka':\n case 'km':\n case 'kn':\n case 'ko':\n case 'ms':\n case 'th':\n case 'vi':\n case 'zh':\n return 0;\n\n case 'af':\n case 'az':\n case 'bn':\n case 'bg':\n case 'ca':\n case 'da':\n case 'de':\n case 'el':\n case 'en':\n case 'eo':\n case 'es':\n case 'et':\n case 'eu':\n case 'fa':\n case 'fi':\n case 'fo':\n case 'fur':\n case 'fy':\n case 'gl':\n case 'gu':\n case 'ha':\n case 'he':\n case 'hu':\n case 'is':\n case 'it':\n case 'ku':\n case 'lb':\n case 'ml':\n case 'mn':\n case 'mr':\n case 'nah':\n case 'nb':\n case 'ne':\n case 'nl':\n case 'nn':\n case 'no':\n case 'om':\n case 'or':\n case 'pa':\n case 'pap':\n case 'ps':\n case 'pt':\n case 'so':\n case 'sq':\n case 'sv':\n case 'sw':\n case 'ta':\n case 'te':\n case 'tk':\n case 'tr':\n case 'ur':\n case 'zu':\n return number == 1 ? 0 : 1;\n\n case 'am':\n case 'bh':\n case 'fil':\n case 'fr':\n case 'gun':\n case 'hi':\n case 'ln':\n case 'mg':\n case 'nso':\n case 'xbr':\n case 'ti':\n case 'wa':\n return number === 0 || number == 1 ? 0 : 1;\n\n case 'be':\n case 'bs':\n case 'hr':\n case 'ru':\n case 'sr':\n case 'uk':\n return number % 10 == 1 && number % 100 != 11\n ? 0\n : number % 10 >= 2 && number % 10 <= 4 && (number % 100 < 10 || number % 100 >= 20)\n ? 1\n : 2;\n\n case 'cs':\n case 'sk':\n return number == 1 ? 0 : number >= 2 && number <= 4 ? 1 : 2;\n\n case 'ga':\n return number == 1 ? 0 : number == 2 ? 1 : 2;\n\n case 'lt':\n return number % 10 == 1 && number % 100 != 11 ? 0 : number % 10 >= 2 && (number % 100 < 10 || number % 100 >= 20) ? 1 : 2;\n\n case 'sl':\n return number % 100 == 1 ? 0 : number % 100 == 2 ? 1 : number % 100 == 3 || number % 100 == 4 ? 2 : 3;\n\n case 'mk':\n return number % 10 == 1 ? 0 : 1;\n\n case 'mt':\n return number == 1 ? 0 : number === 0 || (number % 100 > 1 && number % 100 < 11) ? 1 : number % 100 > 10 && number % 100 < 20 ? 2 : 3;\n\n case 'lv':\n return number === 0 ? 0 : number % 10 == 1 && number % 100 != 11 ? 1 : 2;\n\n case 'pl':\n return number == 1 ? 0 : number % 10 >= 2 && number % 10 <= 4 && (number % 100 < 12 || number % 100 > 14) ? 1 : 2;\n\n case 'cy':\n return number == 1 ? 0 : number == 2 ? 1 : number == 8 || number == 11 ? 2 : 3;\n\n case 'ro':\n return number == 1 ? 0 : number === 0 || (number % 100 > 0 && number % 100 < 20) ? 1 : 2;\n\n case 'ar':\n return number === 0 ? 0 : number == 1 ? 1 : number == 2 ? 2 : number >= 3 && number <= 10 ? 3 : number >= 11 && number <= 99 ? 4 : 5;\n\n default:\n return 0;\n }\n }\n}\n","import Application from './Application';\nimport Component from './Component';\nimport * as extend from './extend';\nimport Model from './Model';\nimport Session from './Session';\nimport Store from './Store';\nimport Translator from './Translator';\n\nimport Evented from './utils/Evented';\n// import liveHumanTimes from './utils/liveHumanTimes';\nimport ItemList from './utils/ItemList';\nimport humanTime from './utils/humanTime';\nimport computed from './utils/computed';\nimport Drawer from './utils/Drawer';\nimport anchorScroll from './utils/anchorScroll';\nimport RequestError from './utils/RequestError';\nimport abbreviateNumber from './utils/abbreviateNumber';\nimport * as string from './utils/string';\nimport SubtreeRetainer from './utils/SubtreeRetainer';\nimport extract from './utils/extract';\nimport ScrollListener from './utils/ScrollListener';\nimport stringToColor from './utils/stringToColor';\nimport patchMithril from './utils/patchMithril';\nimport extractText from './utils/extractText';\nimport formatNumber from './utils/formatNumber';\nimport mapRoutes from './utils/mapRoutes';\n\nimport Notification from './models/Notification';\nimport User from './models/User';\nimport Post from './models/Post';\nimport Discussion from './models/Discussion';\nimport Group from './models/Group';\nimport Forum from './models/Forum';\n\nimport AlertManager from './components/AlertManager';\nimport Switch from './components/Switch';\nimport Badge from './components/Badge';\nimport LoadingIndicator from './components/LoadingIndicator';\nimport Placeholder from './components/Placeholder';\nimport Separator from './components/Separator';\nimport Dropdown from './components/Dropdown';\nimport SplitDropdown from './components/SplitDropdown';\nimport RequestErrorModal from './components/RequestErrorModal';\nimport FieldSet from './components/FieldSet';\nimport Select from './components/Select';\nimport Navigation from './components/Navigation';\nimport Alert from './components/Alert';\nimport LinkButton from './components/LinkButton';\nimport Checkbox from './components/Checkbox';\nimport SelectDropdown from './components/SelectDropdown';\nimport ModalManager from './components/ModalManager';\nimport Button from './components/Button';\nimport Modal from './components/Modal';\nimport GroupBadge from './components/GroupBadge';\n\nimport fullTime from './helpers/fullTime';\nimport avatar from './helpers/avatar';\nimport icon from './helpers/icon';\nimport humanTimeHelper from './helpers/humanTime';\n// import punctuateSeries from './helpers/punctuateSeries';\nimport highlight from './helpers/highlight';\nimport username from './helpers/username';\nimport userOnline from './helpers/userOnline';\nimport listItems from './helpers/listItems';\n\nexport default {\n Application: Application,\n Component: Component,\n extend: extend,\n Model: Model,\n Session: Session,\n Store: Store,\n Translator: Translator,\n\n 'utils/Evented': Evented,\n // 'utils/liveHumanTimes': liveHumanTimes,\n 'utils/ItemList': ItemList,\n 'utils/humanTime': humanTime,\n 'utils/computed': computed,\n 'utils/Drawer': Drawer,\n 'utils/anchorScroll': anchorScroll,\n 'utils/RequestError': RequestError,\n 'utils/abbreviateNumber': abbreviateNumber,\n 'utils/string': string,\n 'utils/SubtreeRetainer': SubtreeRetainer,\n 'utils/extract': extract,\n 'utils/ScrollListener': ScrollListener,\n 'utils/stringToColor': stringToColor,\n 'utils/patchMithril': patchMithril,\n 'utils/extractText': extractText,\n 'utils/formatNumber': formatNumber,\n 'utils/mapRoutes': mapRoutes,\n 'models/Notification': Notification,\n 'models/User': User,\n 'models/Post': Post,\n 'models/Discussion': Discussion,\n 'models/Group': Group,\n 'models/Forum': Forum,\n 'components/AlertManager': AlertManager,\n 'components/Switch': Switch,\n 'components/Badge': Badge,\n 'components/LoadingIndicator': LoadingIndicator,\n 'components/Placeholder': Placeholder,\n 'components/Separator': Separator,\n 'components/Dropdown': Dropdown,\n 'components/SplitDropdown': SplitDropdown,\n 'components/RequestErrorModal': RequestErrorModal,\n 'components/FieldSet': FieldSet,\n 'components/Select': Select,\n 'components/Navigation': Navigation,\n 'components/Alert': Alert,\n 'components/LinkButton': LinkButton,\n 'components/Checkbox': Checkbox,\n 'components/SelectDropdown': SelectDropdown,\n 'components/ModalManager': ModalManager,\n 'components/Button': Button,\n 'components/Modal': Modal,\n 'components/GroupBadge': GroupBadge,\n\n 'helpers/fullTime': fullTime,\n 'helpers/avatar': avatar,\n 'helpers/icon': icon,\n 'helpers/humanTime': humanTimeHelper,\n // 'helpers/punctuateSeries': punctuateSeries,\n 'helpers/highlight': highlight,\n 'helpers/username': username,\n 'helpers/userOnline': userOnline,\n 'helpers/listItems': listItems,\n};\n","import Component, { ComponentProps } from '../Component';\nimport Button from './Button';\nimport listItems from '../helpers/listItems';\nimport extract from '../utils/extract';\nimport * as Mithril from 'mithril';\n\nexport interface AlertProps extends ComponentProps {\n controls?: Mithril.ChildArray;\n type?: string;\n dismissible?: boolean;\n\n ondismiss?: () => any;\n}\n\n/**\n * The `Alert` component represents an alert box, which contains a message,\n * some controls, and may be dismissible.\n *\n * The alert may have the following special props:\n *\n * - `type` The type of alert this is. Will be used to give the alert a class\n * name of `Alert--{type}`.\n * - `controls` An array of controls to show in the alert.\n * - `dismissible` Whether or not the alert can be dismissed.\n * - `ondismiss` A callback to run when the alert is dismissed.\n *\n * All other props will be assigned as attributes on the alert element.\n */\nexport default class Alert extends Component<AlertProps> {\n view() {\n const attrs: AlertProps = Object.assign({}, this.props);\n\n const type: string = extract(attrs, 'type');\n attrs.className = `Alert Alert--${type} ${attrs.className || ''}`;\n\n const children: Mithril.Children = extract(attrs, 'children');\n const controls: Mithril.ChildArray = extract(attrs, 'controls') || [];\n\n // If the alert is meant to be dismissible (which is the case by default),\n // then we will create a dismiss button to append as the final control in\n // the alert.\n const dismissible: boolean | undefined = extract(attrs, 'dismissible');\n const ondismiss: () => any = extract(attrs, 'ondismiss');\n const dismissControl = [];\n\n if (dismissible || dismissible === undefined) {\n dismissControl.push(<Button icon=\"fas fa-times\" className=\"Button Button--link Button--icon Alert-dismiss\" onclick={ondismiss} />);\n }\n\n return (\n <div {...attrs}>\n <span className=\"Alert-body\">{children}</span>\n <ul className=\"Alert-controls\">{listItems(controls.concat(dismissControl))}</ul>\n </div>\n );\n }\n}\n","import Component, { ComponentProps } from '../Component';\nimport Alert from './Alert';\nimport { Vnode } from 'mithril';\n\n/**\n * The `AlertManager` component provides an area in which `Alert` components can\n * be shown and dismissed.\n */\nexport default class AlertManager extends Component {\n /**\n * An array of Alert components which are currently showing.\n */\n protected components: Vnode<ComponentProps, Alert>[] = [];\n\n view() {\n return (\n <div className=\"AlertManager\">\n {this.components.map((vnode) => (\n <div className=\"AlertManager-alert\">{vnode}</div>\n ))}\n </div>\n );\n }\n\n /**\n * Show an Alert in the alerts area.\n */\n public show(vnode: Vnode<ComponentProps, Alert>) {\n vnode.attrs.ondismiss = this.dismiss.bind(this, vnode);\n\n this.components.push(vnode);\n m.redraw();\n }\n\n /**\n * Dismiss an alert.\n */\n public dismiss(vnode) {\n const index = this.components.indexOf(vnode);\n\n if (index !== -1) {\n this.components.splice(index, 1);\n m.redraw();\n }\n }\n\n /**\n * Clear all alerts.\n */\n public clear() {\n this.components = [];\n m.redraw();\n }\n}\n","import Component from '../Component';\nimport icon from '../helpers/icon';\nimport extract from '../utils/extract';\n\n/**\n * The `Badge` component represents a user/discussion badge, indicating some\n * status (e.g. a discussion is stickied, a user is an admin).\n *\n * A badge may have the following special props:\n *\n * - `type` The type of badge this is. This will be used to give the badge a\n * class name of `Badge--{type}`.\n * - `icon` The name of an icon to show inside the badge.\n * - `label`\n *\n * All other props will be assigned as attributes on the badge element.\n */\nexport default class Badge extends Component {\n view(vnode) {\n const attrs = vnode.attrs;\n const type = extract(attrs, 'type');\n const iconName = extract(attrs, 'icon');\n\n attrs.className = `Badge ${type ? `Badge--${type}` : ''} ${attrs.className || ''}`;\n attrs.title = extract(attrs, 'label') || '';\n\n return <span {...attrs}>{iconName ? icon(iconName, { className: 'Badge-icon' }) : m.trust('&nbsp;')}</span>;\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n if (this.props.label) this.$().tooltip({ container: 'body' });\n }\n}\n","import Component, { ComponentProps } from '../Component';\nimport icon from '../helpers/icon';\nimport extract from '../utils/extract';\nimport extractText from '../utils/extractText';\nimport LoadingIndicator from './LoadingIndicator';\n\nexport interface ButtonProps extends ComponentProps {\n /**\n * A tooltip for the button.\n */\n title?: string;\n\n /**\n * An html type attribute for the button.\n */\n type?: string;\n\n /**\n * The name of the icon class. If specified, the button will be given a\n * 'has-icon' class name.\n */\n icon?: string;\n\n /**\n * Whether or not the button should be in a disabled loading state.\n */\n loading?: boolean;\n\n /**\n * Whether or not the button is disabled. If truthy, the button\n * will be given a 'disabled' class name, and any `onclick` handler will be\n * removed.\n */\n disabled?: boolean;\n\n /**\n * A callback to run when the button is clicked.\n */\n onclick?: Function;\n}\n\n/**\n * The `Button` component defines an element which, when clicked, performs an\n * action.\n *\n * Note that a Button has no default class names. This is because a Button can\n * be used to represent any generic clickable control, like a menu item.\n */\nexport default class Button<T extends ButtonProps = ButtonProps> extends Component<T> {\n view() {\n const attrs = (({ children, ...o }) => o)(this.props) as T;\n const children = this.props.children;\n\n attrs.className = attrs.className || '';\n attrs.type = attrs.type || 'button';\n\n // If a tooltip was provided for buttons without additional content, we also\n // use this tooltip as text for screen readers\n if (attrs.title && !children) {\n attrs['aria-label'] = attrs.title;\n }\n\n // If nothing else is provided, we use the textual button content as tooltip\n if (!attrs.title && children) {\n attrs.title = extractText(children);\n }\n\n const iconName = extract(attrs, 'icon');\n if (iconName) attrs.className += ' hasIcon';\n\n const loading = extract(attrs, 'loading');\n if (attrs.disabled || loading) {\n attrs.className = classNames(attrs.className, 'disabled', loading && 'loading');\n delete attrs.onclick;\n }\n\n return <button {...attrs}>{this.getButtonContent(iconName, loading, children)}</button>;\n }\n\n /**\n * Get the template for the button's content.\n */\n protected getButtonContent(iconName?: string | boolean, loading?: boolean, children?: any): any[] {\n return [\n iconName && iconName !== true ? icon(iconName, { className: 'Button-icon' }) : '',\n children ? <span className=\"Button-label\">{children}</span> : '',\n loading ? LoadingIndicator.component({ size: 'tiny', className: 'LoadingIndicator--inline' }) : '',\n ];\n }\n}\n","import Component, { ComponentProps } from '../Component';\nimport LoadingIndicator from './LoadingIndicator';\nimport icon from '../helpers/icon';\n\nexport interface CheckboxProps extends ComponentProps {\n /**\n * Whether or not the checkbox is checked\n */\n state: boolean;\n\n /**\n * Whether or not the checkbox is disabled.\n */\n disabled: boolean;\n\n /**\n * A callback to run when the checkbox is checked/unchecked.\n */\n onchange?: Function;\n}\n\n/**\n * The `Checkbox` component defines a checkbox input.\n */\nexport default class Checkbox<T extends CheckboxProps = CheckboxProps> extends Component<CheckboxProps> {\n /**\n * Whether or not the checkbox's value is in the process of being saved.\n */\n loading = false;\n\n view() {\n const className = classNames(\n 'Checkbox',\n this.props.className,\n this.props.state ? 'on' : 'off',\n this.loading && 'loading',\n this.props.disabled && 'disabled'\n );\n\n return (\n <label className={className}>\n <input\n type=\"checkbox\"\n checked={this.props.state}\n disabled={this.props.disabled}\n onchange={m.withAttr('checked', this.onchange.bind(this))}\n />\n <div className=\"Checkbox-display\">{this.getDisplay()}</div>\n {this.props.children}\n </label>\n );\n }\n\n /**\n * Get the template for the checkbox's display (tick/cross icon).\n */\n protected getDisplay() {\n return this.loading ? LoadingIndicator.component({ size: 'tiny' }) : icon(this.props.state ? 'fas fa-check' : 'fas fa-times');\n }\n\n /**\n * Run a callback when the state of the checkbox is changed.\n */\n protected onchange(checked: boolean) {\n if (this.props.onchange) this.props.onchange(checked, this);\n }\n}\n","import Component, { ComponentProps } from '../Component';\nimport icon from '../helpers/icon';\nimport listItems from '../helpers/listItems';\n\nexport interface DropdownProps extends ComponentProps {\n buttonClassName?: string;\n menuClassName?: string;\n label?: string | any[];\n icon?: string;\n caretIcon?: undefined | string;\n\n onhide?: Function;\n onshow?: Function;\n onclick?: Function;\n}\n\n/**\n * The `Dropdown` component displays a button which, when clicked, shows a\n * dropdown menu beneath it.\n *\n * ### Props\n *\n * - `buttonClassName` A class name to apply to the dropdown toggle button.\n * - `menuClassName` A class name to apply to the dropdown menu.\n * - `icon` The name of an icon to show in the dropdown toggle button.\n * - `caretIcon` The name of an icon to show on the right of the button.\n * - `label` The label of the dropdown toggle button. Defaults to 'Controls'.\n * - `onhide`\n * - `onshow`\n *\n * The children will be displayed as a list inside of the dropdown menu.\n */\nexport default class Dropdown<T extends DropdownProps = DropdownProps> extends Component<T> {\n showing: boolean = false;\n\n static initProps(props: DropdownProps) {\n props.className = props.className || '';\n props.buttonClassName = props.buttonClassName || '';\n props.menuClassName = props.menuClassName || '';\n props.label = props.label || '';\n props.caretIcon = typeof props.caretIcon !== 'undefined' ? props.caretIcon : 'fas fa-caret-down';\n }\n\n view() {\n const items = this.props.children ? listItems(this.props.children) : [];\n\n return (\n <div className={`ButtonGroup Dropdown dropdown ${this.props.className} itemCount${items.length}${this.showing ? ' open' : ''}`}>\n {this.getButton()}\n {this.getMenu(items)}\n </div>\n );\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n this.$('> .Dropdown-toggle').dropdown();\n\n // When opening the dropdown menu, work out if the menu goes beyond the\n // bottom of the viewport. If it does, we will apply class to make it show\n // above the toggle button instead of below it.\n this.element.addEventListener('shown.bs.dropdown', () => {\n this.showing = true;\n\n if (this.props.onshow) {\n this.props.onshow();\n }\n\n m.redraw();\n\n const $menu = this.$('.Dropdown-menu');\n const isRight = $menu.hasClass('Dropdown-menu--right');\n\n $menu.removeClass('Dropdown-menu--top Dropdown-menu--right');\n\n $menu.toggleClass('Dropdown-menu--top', $menu.offset().top + $menu.height() > $(window).scrollTop() + $(window).height());\n\n if ($menu.offset().top < 0) {\n $menu.removeClass('Dropdown-menu--top');\n }\n\n $menu.toggleClass('Dropdown-menu--right', isRight || $menu.offset().left + $menu.width() > $(window).scrollLeft() + $(window).width());\n });\n\n this.element.addEventListener('hidden.bs.dropdown', () => {\n this.showing = false;\n\n if (this.props.onhide) {\n this.props.onhide();\n }\n\n m.redraw();\n });\n }\n\n /**\n * Get the template for the button.\n */\n protected getButton(): any {\n return (\n <button className={'Dropdown-toggle ' + this.props.buttonClassName} data-toggle=\"dropdown\" onclick={this.props.onclick}>\n {this.getButtonContent()}\n </button>\n );\n }\n\n /**\n * Get the template for the button's content.\n *\n * @return {*}\n */\n protected getButtonContent() {\n const attrs = this.props;\n\n return [\n attrs.icon ? icon(attrs.icon, { className: 'Button-icon' }) : '',\n <span className=\"Button-label\">{attrs.label}</span>,\n attrs.caretIcon ? icon(attrs.caretIcon, { className: 'Button-caret' }) : '',\n ];\n }\n\n protected getMenu(items) {\n return <ul className={'Dropdown-menu dropdown-menu ' + this.props.menuClassName}>{items}</ul>;\n }\n}\n","import Component, { ComponentProps } from '../Component';\nimport listItems from '../helpers/listItems';\n\nexport interface FieldSetProps extends ComponentProps {\n /**\n * The title of this group of fields\n */\n label: string;\n}\n\n/**\n * The `FieldSet` component defines a collection of fields, displayed in a list\n * underneath a title.\n *\n * The children should be an array of items to show in the fieldset.\n */\nexport default class FieldSet extends Component<FieldSetProps> {\n view() {\n return (\n <fieldset className={this.props.className}>\n <legend>{this.props.label}</legend>\n <ul>{listItems(this.props.children)}</ul>\n </fieldset>\n );\n }\n}\n","import Badge from './Badge';\nimport extract from '../utils/extract';\n\nexport default class GroupBadge extends Badge {\n static initProps(props) {\n super.initProps(props);\n\n const group = extract(props, 'group');\n\n if (group) {\n props.icon = group.icon();\n props.style = { backgroundColor: group.color() };\n props.label = typeof props.label === 'undefined' ? group.nameSingular() : props.label;\n props.type = `group--${group.id()}`;\n }\n }\n}\n","import Button, { ButtonProps } from './Button';\n\nexport interface LinkButtonProps extends ButtonProps {\n /**\n * Whether or not the page that this button links to is currently active.\n */\n active?: boolean;\n\n /**\n * The URL to link to. If the current URL `m.route()` matches this,\n * the `active` prop will automatically be set to true.\n */\n href?: string;\n\n oncreate?: Function;\n}\n\n/**\n * The `LinkButton` component defines a `Button` which links to a route.\n */\nexport default class LinkButton<T extends LinkButtonProps = LinkButtonProps> extends Button<T> {\n static initProps(props: LinkButtonProps) {\n props.active = this.isActive(props);\n }\n\n view() {\n const vdom = super.view();\n\n vdom.tag = m.route.Link;\n vdom.attrs.active = String(vdom.attrs.active);\n\n return vdom;\n }\n\n /**\n * Determine whether a component with the given props is 'active'.\n */\n static isActive(props: LinkButtonProps): boolean {\n return typeof props.active !== 'undefined' ? props.active : m.route.get() === props.href;\n }\n}\n","import Component from '../Component';\nimport { Spinner, SpinnerOptions } from 'spin.js';\n\n/**\n * The `LoadingIndicator` component displays a loading spinner with spin.js. It\n * may have the following special props:\n *\n * - `size` The spin.js size preset to use. Defaults to 'small'.\n *\n * All other props will be assigned as attributes on the element.\n */\nexport default class LoadingIndicator extends Component {\n view(vnode) {\n const attrs = vnode.attrs;\n\n attrs.className = 'LoadingIndicator ' + (attrs.className || '');\n delete attrs.size;\n\n return <div {...attrs}>{m.trust('&nbsp;')}</div>;\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n const options: SpinnerOptions = { zIndex: 'auto', color: this.$().css('color') };\n let sizeOptions: SpinnerOptions = {};\n\n switch (vnode.attrs.size) {\n case 'large':\n sizeOptions = { lines: 10, length: 8, width: 4, radius: 8 };\n break;\n\n case 'tiny':\n sizeOptions = { lines: 8, length: 2, width: 2, radius: 3 };\n break;\n\n default:\n sizeOptions = { lines: 8, length: 4, width: 3, radius: 5 };\n }\n\n new Spinner({ ...options, ...sizeOptions }).spin(this.element);\n }\n}\n","import Mithril from 'mithril';\n\nimport Component, { ComponentProps } from '../Component';\nimport Button from './Button';\nimport RequestError from '../utils/RequestError';\n\n/**\n * The `Modal` component displays a modal dialog, wrapped in a form. Subclasses\n * should implement the `className`, `title`, and `content` methods.\n */\nexport default abstract class Modal<T extends ComponentProps = ComponentProps> extends Component<T> {\n /**\n * An alert component to show below the header.\n */\n alert: Mithril.Vnode;\n\n loading: boolean;\n\n view() {\n if (this.alert) {\n this.alert.attrs.dismissible = false;\n }\n\n return (\n <div className={`Modal modal-dialog ${this.className()}`}>\n <div className=\"Modal-content\">\n {this.isDismissible() ? (\n <div className=\"Modal-close App-backControl\">\n {Button.component({\n icon: 'fas fa-times',\n onclick: this.hide.bind(this),\n className: 'Button Button--icon Button--link',\n })}\n </div>\n ) : (\n ''\n )}\n\n <form onsubmit={this.onsubmit.bind(this)}>\n <div className=\"Modal-header\">\n <h3 className=\"App-titleControl App-titleControl--text\">{this.title()}</h3>\n </div>\n\n {this.alert && <div className=\"Modal-alert\">{this.alert}</div>}\n\n {this.content()}\n </form>\n </div>\n </div>\n );\n }\n\n /**\n * Determine whether or not the modal should be dismissible via an 'x' button.\n */\n isDismissible(): boolean {\n return true;\n }\n\n /**\n * Get the class name to apply to the modal.\n */\n abstract className(): string;\n\n /**\n * Get the title of the modal dialog.\n */\n abstract title();\n\n /**\n * Get the content of the modal.\n */\n abstract content();\n\n /**\n * Handle the modal form's submit event.\n */\n onsubmit(e: Event) {}\n\n /**\n * Focus on the first input when the modal is ready to be used.\n */\n onready() {\n this.$('form').find('input, select, textarea').first().focus().select();\n }\n\n onhide() {}\n\n /**\n * Hide the modal.\n */\n hide() {\n app.modal.close();\n }\n\n /**\n * Stop loading.\n */\n loaded() {\n this.loading = false;\n m.redraw();\n }\n\n /**\n * Show an alert describing an error returned from the API, and give focus to\n * the first relevant field.\n */\n onerror(error: RequestError) {\n this.alert = error.alert;\n\n m.redraw();\n\n if (error.status === 422 && error.response.errors) {\n this.$(`form [name=\"${error.response.errors[0].source.pointer.replace('/data/attributes/', '')}\"]`).select();\n } else {\n this.onready();\n }\n }\n}\n","import MicroModal from 'micromodal';\n\nimport Component, { ComponentProps } from '../Component';\nimport { extend } from '../extend';\nimport Modal from './Modal';\n\n/**\n * The `ModalManager` component manages a modal dialog. Only one modal dialog\n * can be shown at once; loading a new component into the ModalManager will\n * overwrite the previous one.\n */\nexport default class ModalManager extends Component {\n showing!: boolean;\n hideTimeout!: number;\n\n modal: (new () => Modal) | null = null;\n modalProps: ComponentProps = {};\n\n component: Modal | null = null;\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n app.modal = this;\n }\n\n view() {\n return (\n <div className=\"ModalManager modal\" id=\"Modal\" onclick={this.onclick.bind(this)} key=\"modal\">\n {this.modal && m(this.modal, this.modalProps)}\n </div>\n );\n }\n\n /**\n * Show a modal dialog.\n */\n show(component: new () => Modal, props: ComponentProps = {}) {\n clearTimeout(this.hideTimeout);\n\n this.showing = true;\n this.modal = component;\n this.modalProps = props;\n this.component = null;\n\n // Store the vnode state in app.modal.component\n extend(this.modalProps, 'oninit', (v, vnode) => (this.component = vnode.state));\n\n // if (app.current) app.current.retain = true;\n\n m.redraw();\n\n if (!$('.modal-backdrop').length) {\n $('<div />').addClass('modal-backdrop').appendTo('body');\n }\n\n MicroModal.show('Modal', {\n awaitCloseAnimation: true,\n awaitOpenAnimation: true,\n disableFocus: true,\n onShow: () => $('body').addClass('modal-open'),\n onClose: () => {\n $('body').removeClass('modal-open');\n\n const backdrop = $('.modal-backdrop');\n\n backdrop.fadeOut(200, () => {\n backdrop.remove();\n\n this.clear();\n });\n\n this.showing = false;\n },\n });\n\n this.$().one('animationend', () => this.onready());\n }\n\n onclick(e) {\n if (e.target === this.element) {\n this.close();\n }\n }\n\n /**\n * Close the modal dialog.\n */\n close() {\n if (!this.showing) return;\n\n // Don't hide the modal immediately, because if the consumer happens to call\n // the `show` method straight after to show another modal dialog, it will\n // cause the new modal dialog to disappear. Instead we will wait for a tiny\n // bit to give the `show` method the opportunity to prevent this from going\n // ahead.\n this.hideTimeout = setTimeout(() => MicroModal.close('Modal'));\n }\n\n /**\n * Clear content from the modal area.\n */\n protected clear() {\n if (this.component) {\n this.component.onhide();\n }\n\n this.modal = null;\n this.component = null;\n this.modalProps = {};\n\n // app.current.retain = false;\n\n m.redraw();\n }\n\n /**\n * When the modal dialog is ready to be used, tell it!\n */\n protected onready() {\n if (this.component) {\n this.component.onready();\n }\n }\n}\n","import Component, { ComponentProps } from '../Component';\nimport Button from './Button';\nimport LinkButton from './LinkButton';\n\nimport History from '../../forum/utils/History';\n\nexport interface NavigationProps extends ComponentProps {\n /**\n * The name of a class to set on the root element.\n */\n className?: string;\n\n /**\n * Whether or not to show a button to toggle the app's drawer if\n * there is no more history to pop.\n */\n drawer?: boolean;\n}\n\n/**\n * The `Navigation` component displays a set of navigation buttons. Typically\n * this is just a back button which pops the app's History. If the user is on\n * the root page and there is no history to pop, then in some instances it may\n * show a button that toggles the app's drawer.\n *\n * If the app has a pane, it will also include a 'pin' button which toggles the\n * pinned state of the pane.\n */\nexport default class Navigation extends Component<NavigationProps> {\n className?: string;\n drawer: boolean;\n\n constructor(options: { className?: string; drawer?: boolean } = {}) {\n super();\n\n this.className = options.className;\n this.drawer = !!options.drawer;\n }\n\n view() {\n const { history, pane }: { history: History; pane: any } = app;\n\n return (\n <div\n className={'Navigation ButtonGroup ' + (this.className || '')}\n onmouseenter={pane && pane.show.bind(pane)}\n onmouseleave={pane && pane.onmouseleave.bind(pane)}\n >\n {history.canGoBack() ? [this.getBackButton(), this.getPaneButton()] : this.getDrawerButton()}\n </div>\n );\n }\n\n /**\n * Get the back button.\n */\n protected getBackButton() {\n const { history } = app;\n const previous = history.getPrevious() || {};\n\n return (\n <LinkButton\n className=\"Button Navigation-back Button--icon\"\n href={history.backUrl()}\n icon=\"fas fa-chevron-left\"\n title={previous.title}\n onclick={(e) => {\n if (e.shiftKey || e.ctrlKey || e.metaKey || e.which === 2) return;\n e.preventDefault();\n history.back();\n }}\n />\n );\n }\n\n /**\n * Get the pane pinned toggle button.\n */\n protected getPaneButton() {\n const { pane } = app;\n\n if (!pane || !pane.active) return '';\n\n return (\n <Button\n className={'Button Button--icon Navigation-pin' + (pane.pinned ? ' active' : '')}\n onclick={pane.togglePinned.bind(pane)}\n icon=\"fas fa-thumbtack\"\n />\n );\n }\n\n /**\n * Get the drawer toggle button.\n */\n protected getDrawerButton() {\n if (!this.drawer) return '';\n\n const { drawer } = app;\n const user = app.session.user;\n\n return (\n <Button\n className={'Button Button--icon Navigation-drawer' + (user && user.newNotificationCount() ? ' new' : '')}\n onclick={(e) => {\n e.stopPropagation();\n drawer.show();\n }}\n icon=\"fas fa-bars\"\n />\n );\n }\n}\n","import Component, { ComponentProps } from '../Component';\n\nexport interface PlaceholderProps extends ComponentProps {\n text: string;\n}\n\n/**\n * The `Placeholder` component displays a muted text with some call to action,\n * usually used as an empty state.\n */\nexport default class Placeholder extends Component<PlaceholderProps> {\n view() {\n return (\n <div className=\"Placeholder\">\n <p>{this.props.text}</p>\n </div>\n );\n }\n}\n","import Modal from './Modal';\nimport { ComponentProps } from '../Component';\nimport RequestError from '../utils/RequestError';\n\nexport interface RequestErrorModalProps extends ComponentProps {\n error: RequestError;\n}\n\nexport default class RequestErrorModal<T extends RequestErrorModalProps = RequestErrorModalProps> extends Modal<T> {\n className(): string {\n return 'RequestErrorModal Modal--large';\n }\n\n title(): string {\n return this.props.error.xhr ? `${this.props.error.xhr.status} ${this.props.error.xhr.statusText}` : '';\n }\n\n content() {\n let responseText;\n\n try {\n responseText = JSON.stringify(JSON.parse(this.props.error.responseText), null, 2);\n } catch (e) {\n responseText = this.props.error.responseText;\n }\n\n return (\n <div className=\"Modal-body\">\n <pre>\n {this.props.error.options.method} {this.props.error.options.url}\n <br />\n <br />\n {responseText}\n </pre>\n </div>\n );\n }\n}\n","import Component, { ComponentProps } from '../Component';\nimport icon from '../helpers/icon';\n\nexport interface SelectProps extends ComponentProps {\n /**\n * Disabled state for the input.\n */\n disabled?: boolean;\n\n /**\n * A callback to run when the selected value is changed.\n */\n onchange?: Function;\n\n /**\n * A map of option values to labels.\n */\n options: {\n [key: string]: string;\n };\n\n /**\n * The value of the selected option.\n */\n value: boolean;\n}\n\n/**\n * The `Select` component displays a <select> input, surrounded with some extra\n * elements for styling.\n */\nexport default class Select<T extends SelectProps = SelectProps> extends Component<T> {\n view() {\n return (\n <span className=\"Select\">\n <select\n className=\"Select-input FormControl\"\n disabled={this.props.disabled}\n onchange={m.withAttr('value', this.onchange.bind(this))}\n value={this.props.value}\n >\n {Object.keys(this.props.options).map((key: string) => (\n <option value={key}>{this.props.options[key]}</option>\n ))}\n </select>\n {icon('fas fa-sort', { className: 'Select-caret' })}\n </span>\n );\n }\n\n /**\n * Run a callback when the state of the checkbox is changed.\n */\n protected onchange(value) {\n if (this.props.onchange) this.props.onchange(value);\n }\n}\n","import Dropdown, { DropdownProps } from './Dropdown';\nimport icon from '../helpers/icon';\n\nexport interface SelectDropdownProps extends DropdownProps {\n defaultLabel?: string;\n}\n\n/**\n * The `SelectDropdown` component is the same as a `Dropdown`, except the toggle\n * button's label is set as the label of the first child which has a truthy\n * `active` prop.\n *\n * ### Props\n *\n * - `caretIcon`\n * - `defaultLabel`\n */\nexport default class SelectDropdown extends Dropdown<SelectDropdownProps> {\n static initProps(props: SelectDropdownProps) {\n props.caretIcon = typeof props.caretIcon !== 'undefined' ? props.caretIcon : 'fas fa-sort';\n\n super.initProps(props);\n\n props.className += ' Dropdown--select';\n }\n\n getButtonContent() {\n const activeChild = this.props.children.filter((child) => child.attrs.active)[0];\n let label = (activeChild && activeChild.attrs.children) || this.props.defaultLabel;\n\n if (label instanceof Array) label = label[0];\n\n return [<span className=\"Button-label\">{label}</span>, icon(this.props.caretIcon, { className: 'Button-caret' })];\n }\n}\n","import Component from '../Component';\n\n/**\n * The `Separator` component defines a menu separator item.\n */\nexport default class Separator extends Component {\n static isListItem = true;\n\n view() {\n return <li className=\"Dropdown-separator\" />;\n }\n}\n","import Dropdown from './Dropdown';\nimport Button from './Button';\nimport icon from '../helpers/icon';\n\n/**\n * The `SplitDropdown` component is similar to `Dropdown`, but the first child\n * is displayed as its own button prior to the toggle button.\n */\nexport default class SplitDropdown extends Dropdown {\n static initProps(props) {\n super.initProps(props);\n\n props.className += ' Dropdown--split';\n props.menuClassName += ' Dropdown-menu--right';\n }\n\n getButton() {\n // Make a copy of the props of the first child component. We will assign\n // these props to a new button, so that it has exactly the same behaviour as\n // the first child.\n const firstChild = this.getFirstChild();\n const buttonProps = Object.assign({}, firstChild.attrs);\n buttonProps.className = classNames(buttonProps.className, 'SplitDropdown-button', 'Button', this.props.buttonClassName);\n\n return [\n Button.component(buttonProps),\n <button className={'Dropdown-toggle Button Button--icon ' + this.props.buttonClassName} data-toggle=\"dropdown\">\n {icon(this.props.icon, { className: 'Button-icon' })}\n {icon('fas fa-caret-down', { className: 'Button-caret' })}\n </button>,\n ];\n }\n\n /**\n * Get the first child. If the first child is an array, the first item in that\n * array will be returned.\n */\n protected getFirstChild() {\n let firstChild = this.props.children;\n\n while (firstChild instanceof Array) firstChild = firstChild[0];\n\n return firstChild;\n }\n}\n","import Checkbox from './Checkbox';\n\n/**\n * The `Switch` component is a `Checkbox`, but with a switch display instead of\n * a tick/cross one.\n */\nexport default class Switch extends Checkbox {\n static initProps(props) {\n super.initProps(props);\n\n props.className = `${props.className || ''} Checkbox--switch`;\n }\n\n getDisplay() {\n return this.loading ? super.getDisplay() : '';\n }\n}\n","/**\n * Extend an object's method by running its output through a mutating callback\n * every time it is called.\n *\n * The callback accepts the method's return value and should perform any\n * mutations directly on this value. For this reason, this function will not be\n * effective on methods which return scalar values (numbers, strings, booleans).\n *\n * Care should be taken to extend the correct object in most cases, a class'\n * prototype will be the desired target of extension, not the class itself.\n *\n * @example\n * extend(Discussion.prototype, 'badges', function(badges) {\n * // do something with `badges`\n * });\n *\n * @param {Object} object The object that owns the method\n * @param {String} method The name of the method to extend\n * @param {function} callback A callback which mutates the method's output\n */\nexport function extend(object, method, callback) {\n const original = object[method];\n\n object[method] = (...args) => {\n // @ts-ignore\n const value = original ? original.apply(object, args) : undefined;\n\n // @ts-ignore\n callback.apply(object, [value].concat(args));\n\n return value;\n };\n\n Object.assign(object[method], original);\n}\n\n/**\n * Override an object's method by replacing it with a new function, so that the\n * new function will be run every time the object's method is called.\n *\n * The replacement function accepts the original method as its first argument,\n * which is like a call to 'super'. Any arguments passed to the original method\n * are also passed to the replacement.\n *\n * Care should be taken to extend the correct object in most cases, a class'\n * prototype will be the desired target of extension, not the class itself.\n *\n * @example\n * override(Discussion.prototype, 'badges', function(original) {\n * const badges = original();\n * // do something with badges\n * return badges;\n * });\n *\n * @param {Object} object The object that owns the method\n * @param {String} method The name of the method to override\n * @param {function} newMethod The method to replace it with\n */\nexport function override(object, method, newMethod) {\n const original = object[method];\n\n object[method] = function (...args) {\n // @ts-ignore\n return newMethod.apply(this, [original.bind(this)].concat(args));\n };\n\n Object.assign(object[method], original);\n}\n","/**\n * The `avatar` helper displays a user's avatar.\n *\n * @param {User} user\n * @param {Object} attrs Attributes to apply to the avatar element\n * @return {Object}\n */\nexport default function avatar(user, attrs: any = {}) {\n attrs.className = 'Avatar ' + (attrs.className || '');\n let content = '';\n\n // If the `title` attribute is set to null or false, we don't want to give the\n // avatar a title. On the other hand, if it hasn't been given at all, we can\n // safely default it to the user's username.\n const hasTitle = attrs.title === 'undefined' || attrs.title;\n if (!hasTitle) delete attrs.title;\n\n // If a user has been passed, then we will set up an avatar using their\n // uploaded image, or the first letter of their username if they haven't\n // uploaded one.\n if (user) {\n const username = user.displayName() || '?';\n const avatarUrl = user.avatarUrl();\n\n if (hasTitle) attrs.title = attrs.title || username;\n\n if (avatarUrl) {\n return <img {...attrs} src={avatarUrl} />;\n }\n\n content = username.charAt(0).toUpperCase();\n attrs.style = { background: user.color() };\n }\n\n return <span {...attrs}>{content}</span>;\n}\n","/**\n * The `fullTime` helper displays a formatted time string wrapped in a <time>\n * tag.\n */\nexport default function fullTime(time: Date) {\n const mo = dayjs(time);\n\n const datetime = mo.format();\n const full = mo.format('LLLL');\n\n return (\n <time pubdate datetime={datetime}>\n {full}\n </time>\n );\n}\n","import { truncate } from '../utils/string';\n\n/**\n * The `highlight` helper searches for a word phrase in a string, and wraps\n * matches with the <mark> tag.\n *\n * @param {String} string The string to highlight.\n * @param {String|RegExp} phrase The word or words to highlight.\n * @param {Integer} [length] The number of characters to truncate the string to.\n * The string will be truncated surrounding the first match.\n */\nexport default function highlight(string: string, phrase: string | RegExp, length?: number): any {\n if (!phrase && !length) return string;\n\n // Convert the word phrase into a global regular expression (if it isn't\n // already) so we can search the string for matched.\n const regexp = phrase instanceof RegExp ? phrase : new RegExp(phrase, 'gi');\n\n let highlighted = string;\n let start = 0;\n\n // If a length was given, the truncate the string surrounding the first match.\n if (length) {\n if (phrase) start = Math.max(0, string.search(regexp) - length / 2);\n\n highlighted = truncate(highlighted, length, start);\n }\n\n // Convert the string into HTML entities, then highlight all matches with\n // <mark> tags. Then we will return the result as a trusted HTML string.\n highlighted = $('<div/>').text(highlighted).html();\n\n if (phrase) highlighted = highlighted.replace(regexp, '<mark>$&</mark>');\n\n return m.trust(highlighted);\n}\n","import humanTimeUtil from '../utils/humanTime';\n\n/**\n * The `humanTime` helper displays a time in a human-friendly time-ago format\n * (e.g. '12 days ago'), wrapped in a <time> tag with other information about\n * the time.\n */\nexport default function humanTime(time: Date) {\n const mo = dayjs(time);\n\n const datetime = mo.format();\n const full = mo.format('LLLL');\n const ago = humanTimeUtil(time);\n\n return (\n <time pubdate datetime={datetime} title={full} data-humantime>\n {ago}\n </time>\n );\n}\n","/**\n * The `icon` helper displays an icon.\n *\n * @param {String} fontClass The full icon class, prefix and the icons name.\n * @param {Object} attrs Any other attributes to apply.\n */\nexport default function icon(fontClass: string, attrs: any = {}) {\n attrs.className = 'icon ' + fontClass + ' ' + (attrs.className || '');\n\n return <i {...attrs} />;\n}\n","import Separator from '../components/Separator';\n\nexport function isSeparator(item) {\n return item?.tag === Separator;\n}\n\nexport function withoutUnnecessarySeparators(items) {\n const newItems = [];\n let prevItem;\n\n items.forEach((item, i) => {\n if (!isSeparator(item) || (prevItem && !isSeparator(prevItem) && i !== items.length - 1)) {\n prevItem = item;\n newItems.push(item);\n }\n });\n\n return newItems;\n}\n\n/**\n * The `listItems` helper wraps a collection of components in <li> tags,\n * stripping out any unnecessary `Separator` components.\n *\n * @param {*} items\n * @return {Array}\n */\nexport default function listItems(items) {\n if (!(items instanceof Array)) items = [items];\n\n return withoutUnnecessarySeparators(items).map((item) => {\n const isListItem = item.tag?.isListItem;\n const active = item.tag?.isActive && item.tag.isActive(item.attrs);\n const className = item.attrs?.itemClassName || item.itemClassName;\n\n if (isListItem) {\n item.attrs = item.attrs || {};\n item.attrs.key = item.attrs.key || item.itemName;\n item.key = item.attrs.key;\n }\n\n const node = isListItem ? (\n item\n ) : (\n <li\n className={classNames(className, item.itemName && `item-${item.itemName}`, active && 'active')}\n key={item.attrs?.key || item.itemName}\n >\n {item}\n </li>\n );\n\n node.state = node.state || {};\n\n return node;\n });\n}\n","import icon from './icon';\nimport User from '../models/User';\n\n/**\n * The `useronline` helper displays a green circle if the user is online\n *\n * @param {User} user\n * @return {Object}\n */\nexport default function userOnline(user: User) {\n if (user.lastSeenAt() && user.isOnline()) {\n return <span className=\"UserOnline\">{icon('fas fa-circle')}</span>;\n }\n}\n","/**\n * The `username` helper displays a user's username in a <span class=\"username\">\n * tag. If the user doesn't exist, the username will be displayed as [deleted].\n *\n * @param {User} user\n */\nexport default function username(user): any {\n const name = (user && user.displayName()) || app.translator.trans('core.lib.username.deleted_text');\n\n return <span className=\"username\">{name}</span>;\n}\n","import 'expose-loader?jQuery!zepto';\nimport 'expose-loader?moment!expose-loader?dayjs!dayjs';\nimport 'expose-loader?m!mithril';\nimport 'expose-loader?m.bidi!m.attrs.bidi';\nimport 'expose-loader?Mousetrap!mousetrap';\nimport 'expose-loader?classNames!classnames';\n\nimport 'zepto/src/selector';\nimport 'zepto/src/data';\nimport 'zepto/src/fx';\nimport 'zepto/src/fx_methods';\n\nimport './utils/patchZepto';\n\nimport 'hc-sticky';\nimport 'bootstrap/js/dropdown';\nimport 'bootstrap/js/transition';\n\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\n\ndayjs.extend(relativeTime);\ndayjs.extend(localizedFormat);\n\nimport patchMithril from './utils/patchMithril';\n\npatchMithril();\n\n// import * as Extend from './extend/index';\n\n// export { Extend };\n","import Model from '../Model';\nimport computed from '../utils/computed';\nimport ItemList from '../utils/ItemList';\nimport Badge from '../components/Badge';\n\nimport User from './User';\nimport Post from './Post';\n\nexport default class Discussion extends Model {\n title = Model.attribute('title') as () => string;\n slug = Model.attribute('slug') as () => string;\n\n createdAt = Model.attribute('createdAt', Model.transformDate) as () => Date;\n user = Model.hasOne('user') as () => User;\n firstPost = Model.hasOne('firstPost') as () => Post;\n\n lastPostedAt = Model.attribute('lastPostedAt', Model.transformDate) as () => Date;\n lastPostedUser = Model.hasOne('lastPostedUser') as () => User;\n lastPost = Model.hasOne('lastPost') as () => Post;\n lastPostNumber = Model.attribute('lastPostNumber') as () => number;\n\n commentCount = Model.attribute('commentCount') as () => number;\n replyCount = computed('commentCount', (commentCount) => Math.max(0, commentCount - 1)) as () => number;\n posts = Model.hasMany('posts') as () => Post[];\n mostRelevantPost = Model.hasOne('mostRelevantPost') as () => Post;\n\n lastReadAt = Model.attribute('lastReadAt', Model.transformDate) as () => Date;\n lastReadPostNumber = Model.attribute('lastReadPostNumber') as () => number;\n isUnread = computed('unreadCount', (unreadCount) => !!unreadCount) as () => boolean;\n isRead = computed('unreadCount', (unreadCount) => app.session.user && !unreadCount) as () => boolean;\n\n hiddenAt = Model.attribute('hiddenAt', Model.transformDate) as () => Date;\n hiddenUser = Model.hasOne('hiddenUser') as () => User;\n isHidden = computed('hiddenAt', (hiddenAt) => !!hiddenAt) as () => boolean;\n\n canReply = Model.attribute('canReply') as () => boolean;\n canRename = Model.attribute('canRename') as () => boolean;\n canHide = Model.attribute('canHide') as () => boolean;\n canDelete = Model.attribute('canDelete') as () => boolean;\n\n /**\n * Remove a post from the discussion's posts relationship.\n *\n * @param id The ID of the post to remove.\n */\n removePost(id: string) {\n const relationships = this.data.relationships;\n const posts = relationships && relationships.posts;\n\n if (posts) {\n posts.data.some((data, i) => {\n if (id === data.id) {\n posts.data.splice(i, 1);\n return true;\n }\n });\n }\n }\n\n /**\n * Get the estimated number of unread posts in this discussion for the current\n * user.\n */\n unreadCount(): number {\n const user = app.session.user;\n\n if (user && user.markedAllAsReadAt() < this.lastPostedAt()) {\n return Math.max(0, this.lastPostNumber() - (this.lastReadPostNumber() || 0));\n }\n\n return 0;\n }\n\n /**\n * Get the Badge components that apply to this discussion.\n */\n badges(): ItemList {\n const items = new ItemList();\n\n if (this.isHidden()) {\n items.add('hidden', <Badge type=\"hidden\" icon=\"fas fa-trash\" label={app.translator.transText('core.lib.badge.hidden_tooltip')} />);\n }\n\n return items;\n }\n\n /**\n * Get a list of all of the post IDs in this discussion.\n */\n postIds(): string[] {\n const posts = this.data.relationships?.posts;\n\n return posts ? posts.data.map((link) => link.id) : [];\n }\n}\n","import Model from '../Model';\n\nexport default class Forum extends Model {\n apiEndpoint() {\n return '/';\n }\n}\n","import Model from '../Model';\n\nexport default class Group extends Model {\n static ADMINISTRATOR_ID = '1';\n static GUEST_ID = '2';\n static MEMBER_ID = '3';\n\n nameSingular = Model.attribute('nameSingular') as () => string;\n namePlural = Model.attribute('namePlural') as () => string;\n color = Model.attribute('color') as () => string;\n icon = Model.attribute('icon') as () => string;\n}\n","import Model from '../Model';\nimport User from './User';\n\nexport default class Notification extends Model {\n static ADMINISTRATOR_ID = '1';\n static GUEST_ID = '2';\n static MEMBER_ID = '3';\n\n contentType = Model.attribute('contentType') as () => string;\n content = Model.attribute('content') as () => string;\n createdAt = Model.attribute('createdAt', Model.transformDate) as () => Date;\n\n isRead = Model.attribute('isRead') as () => boolean;\n\n user = Model.hasOne('user') as () => User;\n fromUser = Model.hasOne('fromUser') as () => User;\n subject = Model.hasOne('subhect') as () => any;\n}\n","import Model from '../Model';\nimport computed from '../utils/computed';\nimport { getPlainContent } from '../utils/string';\n\nimport Discussion from './Discussion';\nimport User from './User';\n\nexport default class Post extends Model {\n number = Model.attribute('number') as () => number;\n discussion = Model.hasOne('discussion') as () => Discussion;\n\n createdAt = Model.attribute('createdAt', Model.transformDate) as () => Date;\n user = Model.hasOne('user') as () => User;\n contentType = Model.attribute('contentType') as () => string;\n content = Model.attribute('content') as () => string;\n contentHtml = Model.attribute('contentHtml') as () => string;\n contentPlain = computed('contentHtml', getPlainContent) as () => string;\n\n editedAt = Model.attribute('editedAt', Model.transformDate) as () => Date;\n editedUser = Model.hasOne('editedUser') as () => User;\n isEdited = computed('editedAt', (editedAt) => !!editedAt) as () => boolean;\n\n hiddenAt = Model.attribute('hiddenAt', Model.transformDate) as () => Date;\n hiddenUser = Model.hasOne('hiddenUser') as () => User;\n isHidden = computed('hiddenAt', (hiddenAt) => !!hiddenAt) as () => boolean;\n\n canEdit = Model.attribute('canEdit') as () => boolean;\n canHide = Model.attribute('canHide') as () => boolean;\n canDelete = Model.attribute('canDelete') as () => boolean;\n}\n","import Model from '../Model';\nimport stringToColor from '../utils/stringToColor';\nimport ItemList from '../utils/ItemList';\nimport computed from '../utils/computed';\nimport GroupBadge from '../components/GroupBadge';\nimport Group from './Group';\n\nexport interface UserPreferences {\n discloseOnline?: boolean;\n indexProfile?: boolean;\n locale?: string;\n\n [key: string]: any;\n}\n\nexport default class User extends Model {\n username = Model.attribute('username') as () => string;\n\n displayName = Model.attribute('displayName') as () => string;\n email = Model.attribute('email') as () => string;\n isEmailConfirmed = Model.attribute('isEmailConfirmed') as () => boolean;\n password = Model.attribute('password') as () => string;\n\n avatarUrl = Model.attribute('avatarUrl') as () => string;\n preferences = Model.attribute('preferences') as () => UserPreferences;\n groups = Model.hasMany('groups') as () => Group[];\n\n joinTime = Model.attribute('joinTime', Model.transformDate) as () => Date;\n lastSeenAt = Model.attribute('lastSeenAt', Model.transformDate) as () => Date;\n markedAllAsReadAt = Model.attribute('markedAllAsReadAt', Model.transformDate) as () => Date;\n unreadNotificationCount = Model.attribute('unreadNotificationCount') as () => number;\n newNotificationCount = Model.attribute('newNotificationCount') as () => number;\n\n discussionCount = Model.attribute('discussionCount') as () => number;\n commentCount = Model.attribute('commentCount') as () => number;\n\n canEdit = Model.attribute('canEdit') as () => boolean;\n canDelete = Model.attribute('canDelete') as () => boolean;\n\n avatarColor = null;\n color = computed(['username', 'avatarUrl', 'avatarColor'], function (username, avatarUrl, avatarColor) {\n // If we've already calculated and cached the dominant color of the user's\n // avatar, then we can return that in RGB format. If we haven't, we'll want\n // to calculate it. Unless the user doesn't have an avatar, in which case\n // we generate a color from their username.\n if (avatarColor) {\n return 'rgb(' + avatarColor.join(', ') + ')';\n } else if (avatarUrl) {\n this.calculateAvatarColor();\n return '';\n }\n\n return '#' + stringToColor(username);\n }) as () => string;\n\n isOnline(): boolean {\n return this.lastSeenAt() > dayjs().subtract(5, 'minutes').toDate();\n }\n\n /**\n * Get the Badge components that apply to this user.\n */\n badges(): ItemList {\n const items = new ItemList();\n const groups = this.groups();\n\n if (groups) {\n groups.forEach((group) => {\n items.add('group' + group.id(), GroupBadge.component({ group }));\n });\n }\n\n return items;\n }\n\n /**\n * Calculate the dominant color of the user's avatar. The dominant color will\n * be set to the `avatarColor` property once it has been calculated.\n *\n * @protected\n */\n calculateAvatarColor() {\n const image = new Image();\n const user = this;\n\n image.onload = function () {\n const colorThief = new ColorThief();\n user.avatarColor = colorThief.getColor(this);\n user.freshness = new Date();\n m.redraw();\n };\n image.crossOrigin = 'anonymous';\n image.src = this.avatarUrl();\n }\n\n /**\n * Update the user's preferences.\n */\n savePreferences(newPreferences: UserPreferences): Promise<User> {\n const preferences = this.preferences();\n\n Object.assign(preferences, newPreferences);\n\n return <Promise<User>>this.save({ preferences });\n }\n}\n","/**\n * The `Drawer` class controls the page's drawer. The drawer is the area the\n * slides out from the left on mobile devices; it contains the header and the\n * footer.\n */\nexport default class Drawer {\n private $backdrop?: ZeptoCollection;\n\n constructor() {\n // Set up an event handler so that whenever the content area is tapped,\n // the drawer will close.\n $('#content').click((e) => {\n if (this.isOpen()) {\n e.preventDefault();\n this.hide();\n }\n });\n }\n\n /**\n * Check whether or not the drawer is currently open.\n */\n isOpen(): boolean {\n return $('#app').hasClass('drawerOpen');\n }\n\n /**\n * Hide the drawer.\n */\n hide() {\n $('#app').removeClass('drawerOpen');\n\n if (this.$backdrop) this.$backdrop.remove();\n }\n\n /**\n * Show the drawer.\n */\n public show() {\n $('#app').addClass('drawerOpen');\n\n this.$backdrop = $('<div/>')\n .addClass('drawer-backdrop fade')\n .appendTo('body')\n .click(() => this.hide());\n\n requestAnimationFrame(() => this.$backdrop!.addClass('in'));\n }\n}\n","export type EventHandler = (...args: any) => any;\n\nexport default class Evented {\n /**\n * Arrays of registered event handlers, grouped by the event name.\n */\n protected handlers: { [key: string]: EventHandler[] } = {};\n\n /**\n * Get all of the registered handlers for an event.\n *\n * @param event The name of the event.\n */\n protected getHandlers(event: string): EventHandler[] {\n this.handlers = this.handlers || {};\n\n this.handlers[event] = this.handlers[event] || [];\n\n return this.handlers[event];\n }\n\n /**\n * Trigger an event.\n *\n * @param event The name of the event.\n * @param args Arguments to pass to event handlers.\n */\n public trigger(event: string, ...args: any): this {\n this.getHandlers(event).forEach((handler) => handler.apply(this, args));\n\n return this;\n }\n\n /**\n * Register an event handler.\n *\n * @param event The name of the event.\n * @param handler The function to handle the event.\n */\n on(event: string, handler: EventHandler): this {\n this.getHandlers(event).push(handler);\n\n return this;\n }\n\n /**\n * Register an event handler so that it will run only once, and then\n * unregister itself.\n *\n * @param event The name of the event.\n * @param handler The function to handle the event.\n */\n one(event: string, handler: EventHandler): this {\n const wrapper = function (this: Evented) {\n handler.apply(this, Array.from(arguments));\n\n this.off(event, wrapper);\n };\n\n this.getHandlers(event).push(wrapper);\n\n return this;\n }\n\n /**\n * Unregister an event handler.\n *\n * @param event The name of the event.\n * @param handler The function that handles the event.\n */\n off(event: string, handler: EventHandler): this {\n const handlers = this.getHandlers(event);\n const index = handlers.indexOf(handler);\n\n if (index !== -1) {\n handlers.splice(index, 1);\n }\n\n return this;\n }\n}\n","class Item<T> {\n content: T;\n priority: number;\n key: number = 0;\n\n constructor(content: any, priority: number) {\n this.content = content;\n this.priority = priority;\n }\n}\n\nexport default class ItemList<T = any> {\n private items: { [key: string]: Item<T> } = {};\n\n /**\n * Check whether the list is empty.\n *\n * @returns {boolean}\n * @public\n */\n isEmpty(): boolean {\n for (const i in this.items) {\n if (this.items.hasOwnProperty(i)) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Check whether an item is present in the list.\n */\n has(key: any): boolean {\n return !!this.items[key];\n }\n\n /**\n * Get the content of an item.\n */\n get(key: any): T {\n return this.items[key]?.content;\n }\n\n /**\n * Add an item to the list.\n *\n * @param {String} key A unique key for the item.\n * @param {*} content The item's content.\n * @param {Integer} [priority] The priority of the item. Items with a higher\n * priority will be positioned before items with a lower priority.\n * @return {ItemList}\n * @public\n */\n add(key: any, content: T, priority = 0) {\n this.items[key] = new Item(content, priority);\n\n return this;\n }\n\n toArray(): T[] {\n const items: Item<T>[] = [];\n\n for (const i in this.items) {\n if (this.items.hasOwnProperty(i)) {\n if (this.items[i] !== null && this.items[i] instanceof Item) {\n this.items[i].content = Object(this.items[i].content);\n\n // @ts-ignore\n this.items[i].content.itemName = i;\n items.push(this.items[i]);\n this.items[i].key = items.length;\n }\n }\n }\n\n return items\n .sort((a, b) => {\n if (a.priority === b.priority) {\n return a.key - b.key;\n } else if (a.priority > b.priority) {\n return -1;\n }\n return 1;\n })\n .map((item) => item.content);\n }\n}\n","import Mithril from 'mithril';\n\nexport interface RequestErrorResponse extends JSON {\n errors?: {\n code: string;\n source?: {\n pointer: string;\n };\n }[];\n}\n\nexport default class RequestError {\n status: number;\n responseText: string;\n options: Mithril.RequestOptions;\n xhr: XMLHttpRequest;\n response?: RequestErrorResponse;\n alert?: Mithril.Vnode;\n\n constructor(status, responseText, options, xhr) {\n this.status = status;\n this.responseText = responseText;\n this.options = options;\n this.xhr = xhr;\n\n try {\n this.response = JSON.parse(responseText);\n } catch (e) {\n this.response = null;\n }\n\n this.alert = null;\n }\n}\n","const later =\n window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.msRequestAnimationFrame ||\n window.oRequestAnimationFrame ||\n ((callback) => window.setTimeout(callback, 1000 / 60));\n\n/**\n * The `ScrollListener` class sets up a listener that handles window scroll\n * events.\n */\nexport default class ScrollListener {\n ticking: boolean = false;\n\n callback: Function;\n active: EventListener;\n\n /**\n * @param callback The callback to run when the scroll position\n * changes.\n */\n public constructor(callback: Function) {\n this.callback = callback;\n }\n\n /**\n * On each animation frame, as long as the listener is active, run the\n * `update` method.\n */\n protected loop() {\n // THROTTLE: If the callback is still running (or hasn't yet run), we ignore\n // further scroll events.\n if (this.ticking) return;\n\n // Schedule the callback to be executed soon (TM), and stop throttling once\n // the callback is done.\n later(() => {\n this.update();\n this.ticking = false;\n });\n\n this.ticking = true;\n }\n\n /**\n * Run the callback, whether there was a scroll event or not.\n */\n public update() {\n this.callback(window.pageYOffset);\n }\n\n /**\n * Start listening to and handling the window's scroll position.\n */\n public start() {\n if (!this.active) {\n window.addEventListener('scroll', (this.active = this.loop.bind(this)));\n }\n }\n\n /**\n * Stop listening to and handling the window's scroll position.\n */\n public stop() {\n window.removeEventListener('scroll', this.active);\n\n this.active = null;\n }\n}\n","export default class SubtreeRetainer {\n callbacks: Function[];\n data = {};\n\n constructor(...callbacks: Function[]) {\n this.callbacks = callbacks;\n }\n\n check(...callbacks: Function[]) {\n this.callbacks.push(...callbacks);\n }\n\n /**\n * Return whether the component should redraw.\n */\n update(): boolean {\n let update = false;\n\n this.callbacks.forEach((callback, i) => {\n const result = callback();\n\n if (result !== this.data[i]) {\n this.data[i] = result;\n update = true;\n }\n });\n\n return update;\n }\n}\n","/**\n * The `abbreviateNumber` utility converts a number to a shorter localized form.\n *\n * @example\n * abbreviateNumber(1234);\n * // \"1.2K\"\n */\nexport default (number: number): string => {\n // TODO: translation\n if (number >= 1000000) {\n return Math.floor(number / 1000000) + app.translator.transText('core.lib.number_suffix.mega_text');\n } else if (number >= 1000) {\n return Math.floor(number / 1000) + app.translator.transText('core.lib.number_suffix.kilo_text');\n } else {\n return number.toString();\n }\n};\n","/**\n * The `anchorScroll` utility saves the scroll position relative to an element,\n * and then restores it after a callback has been run.\n *\n * This is useful if a redraw will change the page's content above the viewport.\n * Normally doing this will result in the content in the viewport being pushed\n * down or pulled up. By wrapping the redraw with this utility, the scroll\n * position can be anchor to an element that is in or below the viewport, so\n * the content in the viewport will stay the same.\n *\n * @param element The element to anchor the scroll position to.\n * @param callback The callback to run that will change page content.\n */\nexport default function anchorScroll(element: ZeptoCollection | HTMLElement, callback: Function) {\n const $window = $(window);\n const $el = $(element);\n\n if (!element || !$el.length) {\n return callback();\n }\n\n const relativeScroll = $el.offset().top - $window.scrollTop();\n\n callback();\n\n $window.scrollTop($el.offset().top - relativeScroll);\n}\n","/**\n * The `computed` utility creates a function that will cache its output until\n * any of the dependent values are dirty.\n *\n * @param dependentKeys The keys of the dependent values.\n * @param compute The function which computes the value using the\n * dependent values.\n */\nexport default function computed(dependentKeys: string | string[], compute: Function): () => any {\n const keys = [].concat(dependentKeys);\n\n const dependentValues = {};\n let computedValue;\n\n return function () {\n let recompute = false;\n\n // Read all of the dependent values. If any of them have changed since last\n // time, then we'll want to recompute our output.\n keys.forEach((key) => {\n const value = typeof this[key] === 'function' ? this[key]() : this[key];\n\n if (dependentValues[key] !== value) {\n recompute = true;\n dependentValues[key] = value;\n }\n });\n\n if (recompute) {\n computedValue = compute.apply(\n this,\n keys.map((key) => dependentValues[key])\n );\n }\n\n return computedValue;\n };\n}\n","/**\n * The `extract` utility deletes a property from an object and returns its\n * value.\n */\nexport default function extract(object: object, property: string): any {\n const value = object[property];\n\n delete object[property];\n\n return value;\n}\n","/**\n * Extract the text nodes from a virtual element.\n *\n * @param {VirtualElement} vdom\n * @return {String}\n */\nexport default function extractText(vdom: any): string {\n if (vdom instanceof Array) {\n return vdom.map((element) => extractText(element)).join('');\n } else if (typeof vdom === 'object' && vdom !== null) {\n return vdom.text || extractText(vdom.children);\n } else {\n return vdom;\n }\n}\n","/**\n * The `formatNumber` utility localizes a number into a string with the\n * appropriate punctuation.\n *\n * @param number Number to format\n * @param options Maximum significant digits or formatting options object\n *\n * @example\n * formatNumber(1234);\n * // 1,234\n */\nexport default function formatNumber(number: number, options: number | Intl.NumberFormatOptions = {}): string {\n const config = typeof options === 'number' ? { maximumSignificantDigits: options } : options;\n\n return number.toLocaleString(app.translator.locale, config);\n}\n","/**\n * The `humanTime` utility converts a date to a localized, human-readable time-\n * ago string.\n */\nexport default function humanTime(time: Date): string {\n let m = dayjs(time);\n const now = dayjs();\n\n // To prevent showing things like \"in a few seconds\" due to small offsets\n // between client and server time, we always reset future dates to the\n // current time. This will result in \"just now\" being shown instead.\n if (m.isAfter(now)) {\n m = now;\n }\n\n const day = 864e5;\n const diff = m.diff(dayjs());\n let ago = null;\n\n // If this date was more than a month ago, we'll show the name of the month\n // in the string. If it wasn't this year, we'll show the year as well.\n if (diff < -30 * day) {\n if (m.year() === dayjs().year()) {\n ago = m.format('D MMM');\n } else {\n ago = m.format(\"MMM 'YY\");\n }\n } else {\n ago = m.fromNow();\n }\n\n return ago;\n}\n","import { RouteDefs } from 'mithril';\n\n/**\n * The `mapRoutes` utility converts a map of named application routes into a\n * format that can be understood by Mithril.\n *\n * @see https://lhorie.github.io/mithril/mithril.route.html#defining-routes\n */\nexport default function mapRoutes(routes: object, basePath: string = ''): RouteDefs {\n const map = {};\n\n for (const key in routes) {\n if (!routes.hasOwnProperty(key)) continue;\n\n const route = routes[key];\n\n map[basePath + route.path] = {\n render() {\n return m(route.component, { routeName: key });\n },\n };\n }\n\n return map;\n}\n","import m from 'mithril';\nimport prop from 'mithril/stream';\n\nimport Component from '../Component';\n\nexport default () => {\n const mo = window['m'];\n\n const _m = function (comp, ...args) {\n if (!arguments[1]) arguments[1] = {};\n\n if (comp.prototype && comp.prototype instanceof Component) {\n // allow writing to children attribute\n Object.defineProperty(arguments[1], 'children', {\n writable: true,\n });\n }\n\n const node = mo.apply(this, arguments);\n\n if (!node.attrs) node.attrs = {};\n\n if (node.attrs.bidi) {\n m.bidi(node, node.attrs.bidi);\n }\n\n if (node.attrs.route) {\n node.attrs.href = node.attrs.route;\n node.attrs.tag = m.route.Link;\n\n delete node.attrs.route;\n }\n\n return node;\n };\n\n Object.keys(mo).forEach((key) => (_m[key] = mo[key]));\n\n _m.withAttr = (key: string, cb: Function) =>\n function () {\n cb(this.getAttribute(key) || this[key]);\n };\n\n _m.prop = prop;\n\n window['m'] = _m;\n};\n","import jump from 'jump.js';\nimport Tooltip from 'tooltip.js';\n\n// add $.fn.tooltip\n$.fn.tooltip = function (option) {\n return this.each(function (this: HTMLElement) {\n const $this = $(this);\n let data = $this.data('bs.tooltip');\n const options = (typeof option === 'object' && option) || {};\n\n if ($this.attr('title')) {\n options.title = $this.attr('title');\n $this.removeAttr('title');\n $this.attr('data-original-title', options.title);\n }\n\n if (option === 'destroy') option = 'dispose';\n\n if (!data && ['dispose', 'hide'].includes(option)) return;\n\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)));\n if (typeof option === 'string' && data[option]) data[option]();\n });\n};\n\n// add $.fn.outerWidth and $.fn.outerHeight\n['width', 'height'].forEach(function (dimension) {\n const Dimension = dimension.replace(/./, function (m) {\n return m[0].toUpperCase();\n });\n\n $.fn[`outer${Dimension}`] = function (margin) {\n const elem = this;\n\n if (elem) {\n const sides = { width: ['left', 'right'], height: ['top', 'bottom'] };\n let size = elem[dimension]();\n\n sides[dimension].forEach(function (side) {\n if (margin) size += parseInt(elem.css('margin-' + side), 10);\n });\n\n return size;\n } else {\n return null;\n }\n };\n});\n\n// allow use of $(':input')\n// @ts-ignore\n$.expr[':']['input'] = function () {\n if ('disabled' in this || ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(this.tagName)) return this;\n};\n\n// add $().hover() method\n$.fn.hover = function (hover, leave) {\n return this.on('mouseenter', hover).on('mouseleave', leave || hover);\n};\n\n// add animated scroll\n$.fn.animateScrollTop = function (to, duration = $.fx.speeds._default, callback) {\n if (typeof to === 'number') to -= window.scrollY || window.pageYOffset;\n\n jump(to, {\n duration: $.fx.speeds[duration] || duration,\n callback,\n });\n\n return this;\n};\n\n// add basic $().slideUp() function\n$.fn.slideUp = function (duration = $.fx.speeds._default, easing?, callback?) {\n this.css({ overflow: 'hidden', height: this.height() });\n\n this.animate(\n {\n height: 0,\n },\n duration,\n easing,\n callback\n );\n\n return this;\n};\n\n// required for compatibility with jquery plugins\n// ex: bootstrap plugins\n$.fn.extend = $.extend.bind($);\n\n/**\n * Enable special events on Zepto\n * @license Original Copyright 2013 Enideo. Released under dual MIT and GPL licenses.\n */\n$.event.special = $.event.special || {};\n\nconst bindBeforeSpecialEvents = $.fn.bind;\n\n$.fn.bind = function (eventName, data, callback) {\n const el = this;\n\n if (!callback) {\n callback = data;\n data = null;\n }\n\n $.each(eventName.split(/\\s/), (key: string, value: any): boolean => {\n value = value.split(/\\./)[0];\n\n if (value in $.event.special) {\n let specialEvent = $.event.special[value];\n\n /// init enable special events on Zepto\n if (!specialEvent._init) {\n specialEvent._init = true;\n\n /// intercept and replace the special event handler to add functionality\n specialEvent.originalHandler = specialEvent.handler;\n specialEvent.handler = function () {\n /// make event argument writable, like on jQuery\n const args = Array.prototype.slice.call(arguments);\n\n args[0] = $.extend({}, args[0]);\n\n /// define the event handle, $.event.dispatch is only for newer versions of jQuery\n $.event.handle = function () {\n /// make context of trigger the event element\n const args = Array.prototype.slice.call(arguments);\n const event = args[0];\n const $target = $(event.target);\n\n $target.trigger.apply($target, arguments);\n };\n\n specialEvent.originalHandler.apply(this, args);\n };\n }\n\n /// setup special events on Zepto\n specialEvent.setup.apply(el, [data]);\n }\n\n return true;\n });\n\n return bindBeforeSpecialEvents.apply(this, [eventName, callback]);\n};\n","/**\n * Truncate a string to the given length, appending ellipses if necessary.\n */\nexport function truncate(string: string, length: number, start = 0): string {\n return (start > 0 ? '...' : '') + string.substring(start, start + length) + (string.length > start + length ? '...' : '');\n}\n\n/**\n * Create a slug out of the given string. Non-alphanumeric characters are\n * converted to hyphens.\n */\nexport function slug(string: string): string {\n return string\n .toLowerCase()\n .replace(/[^a-z0-9]/gi, '-')\n .replace(/-+/g, '-')\n .replace(/-$|^-/g, '');\n}\n\n/**\n * Strip HTML tags and quotes out of the given string, replacing them with\n * meaningful punctuation.\n */\nexport function getPlainContent(string: string): string {\n const html = string.replace(/(<\\/p>|<br>)/g, '$1 &nbsp;').replace(/<img\\b[^>]*>/gi, ' ');\n\n const dom = $('<div/>').html(html);\n\n dom.find(getPlainContent.removeSelectors.join(',')).remove();\n\n return dom.text().replace(/\\s+/g, ' ').trim();\n}\n\n/**\n * An array of DOM selectors to remove when getting plain content.\n *\n * @type {String[]}\n */\ngetPlainContent.removeSelectors = ['blockquote', 'script'];\n\n/**\n * Make a string's first character uppercase.\n */\nexport function ucfirst(string: string): string {\n return string.substr(0, 1).toUpperCase() + string.substr(1);\n}\n","export function hsvToRgb(h: number, s: number, v: number) {\n let r;\n let g;\n let b;\n\n const i = Math.floor(h * 6);\n const f = h * 6 - i;\n const p = v * (1 - s);\n const q = v * (1 - f * s);\n const t = v * (1 - (1 - f) * s);\n\n switch (i % 6) {\n case 0:\n r = v;\n g = t;\n b = p;\n break;\n case 1:\n r = q;\n g = v;\n b = p;\n break;\n case 2:\n r = p;\n g = v;\n b = t;\n break;\n case 3:\n r = p;\n g = q;\n b = v;\n break;\n case 4:\n r = t;\n g = p;\n b = v;\n break;\n case 5:\n r = v;\n g = p;\n b = q;\n break;\n }\n\n return {\n r: Math.floor(r * 255),\n g: Math.floor(g * 255),\n b: Math.floor(b * 255),\n };\n}\n\n/**\n * Convert the given string to a unique color.\n */\nexport default function stringToColor(string: string): string {\n let num = 0;\n\n // Convert the username into a number based on the ASCII value of each\n // character.\n for (let i = 0; i < string.length; i++) {\n num += string.charCodeAt(i);\n }\n\n // Construct a color using the remainder of that number divided by 360, and\n // some predefined saturation and value values.\n const hue = num % 360;\n const rgb = hsvToRgb(hue / 360, 0.3, 0.9);\n\n return '' + rgb.r.toString(16) + rgb.g.toString(16) + rgb.b.toString(16);\n}\n","module.exports = m;"],"sourceRoot":""}