`,
* [
* {
* selector: '[expr0]',
* redundantAttribute: 'expr0',
* expressions: [
* {
* type: expressionTypes.TEXT,
* childNodeIndex: 0,
* evaluate(scope) {
* return scope.time;
* },
* },
* ],
* },
* {
* selector: '[expr1]',
* redundantAttribute: 'expr1',
* expressions: [
* {
* type: expressionTypes.TEXT,
* childNodeIndex: 0,
* evaluate(scope) {
* return scope.name;
* },
* },
* {
* type: 'attribute',
* name: 'style',
* evaluate(scope) {
* return scope.style;
* },
* },
* ],
* },
* {
* selector: '[expr2]',
* redundantAttribute: 'expr2',
* type: bindingTypes.IF,
* evaluate(scope) {
* return scope.isVisible;
* },
* template: riotDOMBindings.template('hello there'),
* },
* ]
* )
*/
var DOMBindings = /*#__PURE__*/Object.freeze({
__proto__: null,
template: create,
createBinding: create$1,
createExpression: create$4,
bindingTypes: bindingTypes,
expressionTypes: expressionTypes
});
function noop() {
return this;
}
/**
* Autobind the methods of a source object to itself
* @param {Object} source - probably a riot tag instance
* @param {Array
} methods - list of the methods to autobind
* @returns {Object} the original object received
*/
function autobindMethods(source, methods) {
methods.forEach(method => {
source[method] = source[method].bind(source);
});
return source;
}
/**
* Call the first argument received only if it's a function otherwise return it as it is
* @param {*} source - anything
* @returns {*} anything
*/
function callOrAssign(source) {
return isFunction(source) ? source.prototype && source.prototype.constructor ? new source() : source() : source;
}
/**
* Converts any DOM node/s to a loopable array
* @param { HTMLElement|NodeList } els - single html element or a node list
* @returns { Array } always a loopable object
*/
function domToArray(els) {
// can this object be already looped?
if (!Array.isArray(els)) {
// is it a node list?
if (/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(els)) && typeof els.length === 'number') return Array.from(els);else // if it's a single node
// it will be returned as "array" with one single entry
return [els];
} // this object could be looped out of the box
return els;
}
/**
* Simple helper to find DOM nodes returning them as array like loopable object
* @param { string|DOMNodeList } selector - either the query or the DOM nodes to arraify
* @param { HTMLElement } ctx - context defining where the query will search for the DOM nodes
* @returns { Array } DOM nodes found as array
*/
function $(selector, ctx) {
return domToArray(typeof selector === 'string' ? (ctx || document).querySelectorAll(selector) : selector);
}
/**
* Normalize the return values, in case of a single value we avoid to return an array
* @param { Array } values - list of values we want to return
* @returns { Array|string|boolean } either the whole list of values or the single one found
* @private
*/
const normalize = values => values.length === 1 ? values[0] : values;
/**
* Parse all the nodes received to get/remove/check their attributes
* @param { HTMLElement|NodeList|Array } els - DOM node/s to parse
* @param { string|Array } name - name or list of attributes
* @param { string } method - method that will be used to parse the attributes
* @returns { Array|string } result of the parsing in a list or a single value
* @private
*/
function parseNodes(els, name, method) {
const names = typeof name === 'string' ? [name] : name;
return normalize(domToArray(els).map(el => {
return normalize(names.map(n => el[method](n)));
}));
}
/**
* Set any attribute on a single or a list of DOM nodes
* @param { HTMLElement|NodeList|Array } els - DOM node/s to parse
* @param { string|Object } name - either the name of the attribute to set
* or a list of properties as object key - value
* @param { string } value - the new value of the attribute (optional)
* @returns { HTMLElement|NodeList|Array } the original array of elements passed to this function
*
* @example
*
* import { set } from 'bianco.attr'
*
* const img = document.createElement('img')
*
* set(img, 'width', 100)
*
* // or also
* set(img, {
* width: 300,
* height: 300
* })
*
*/
function set(els, name, value) {
const attrs = typeof name === 'object' ? name : {
[name]: value
};
const props = Object.keys(attrs);
domToArray(els).forEach(el => {
props.forEach(prop => el.setAttribute(prop, attrs[prop]));
});
return els;
}
/**
* Get any attribute from a single or a list of DOM nodes
* @param { HTMLElement|NodeList|Array } els - DOM node/s to parse
* @param { string|Array } name - name or list of attributes to get
* @returns { Array|string } list of the attributes found
*
* @example
*
* import { get } from 'bianco.attr'
*
* const img = document.createElement('img')
*
* get(img, 'width') // => '200'
*
* // or also
* get(img, ['width', 'height']) // => ['200', '300']
*
* // or also
* get([img1, img2], ['width', 'height']) // => [['200', '300'], ['500', '200']]
*/
function get(els, name) {
return parseNodes(els, name, 'getAttribute');
}
const CSS_BY_NAME = new Map();
const STYLE_NODE_SELECTOR = 'style[riot]'; // memoized curried function
const getStyleNode = (style => {
return () => {
// lazy evaluation:
// if this function was already called before
// we return its cached result
if (style) return style; // create a new style element or use an existing one
// and cache it internally
style = $(STYLE_NODE_SELECTOR)[0] || document.createElement('style');
set(style, 'type', 'text/css');
/* istanbul ignore next */
if (!style.parentNode) document.head.appendChild(style);
return style;
};
})();
/**
* Object that will be used to inject and manage the css of every tag instance
*/
var cssManager = {
CSS_BY_NAME,
/**
* Save a tag style to be later injected into DOM
* @param { string } name - if it's passed we will map the css to a tagname
* @param { string } css - css string
* @returns {Object} self
*/
add(name, css) {
if (!CSS_BY_NAME.has(name)) {
CSS_BY_NAME.set(name, css);
this.inject();
}
return this;
},
/**
* Inject all previously saved tag styles into DOM
* innerHTML seems slow: http://jsperf.com/riot-insert-style
* @returns {Object} self
*/
inject() {
getStyleNode().innerHTML = [...CSS_BY_NAME.values()].join('\n');
return this;
},
/**
* Remove a tag style from the DOM
* @param {string} name a registered tagname
* @returns {Object} self
*/
remove(name) {
if (CSS_BY_NAME.has(name)) {
CSS_BY_NAME.delete(name);
this.inject();
}
return this;
}
};
/**
* Function to curry any javascript method
* @param {Function} fn - the target function we want to curry
* @param {...[args]} acc - initial arguments
* @returns {Function|*} it will return a function until the target function
* will receive all of its arguments
*/
function curry(fn) {
for (var _len = arguments.length, acc = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
acc[_key - 1] = arguments[_key];
}
return function () {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
args = [...acc, ...args];
return args.length < fn.length ? curry(fn, ...args) : fn(...args);
};
}
/**
* Get the tag name of any DOM node
* @param {HTMLElement} element - DOM node we want to inspect
* @returns {string} name to identify this dom node in riot
*/
function getName(element) {
return get(element, IS_DIRECTIVE) || element.tagName.toLowerCase();
}
const COMPONENT_CORE_HELPERS = Object.freeze({
// component helpers
$(selector) {
return $(selector, this.root)[0];
},
$$(selector) {
return $(selector, this.root);
}
});
const PURE_COMPONENT_API = Object.freeze({
[MOUNT_METHOD_KEY]: noop,
[UPDATE_METHOD_KEY]: noop,
[UNMOUNT_METHOD_KEY]: noop
});
const COMPONENT_LIFECYCLE_METHODS = Object.freeze({
[SHOULD_UPDATE_KEY]: noop,
[ON_BEFORE_MOUNT_KEY]: noop,
[ON_MOUNTED_KEY]: noop,
[ON_BEFORE_UPDATE_KEY]: noop,
[ON_UPDATED_KEY]: noop,
[ON_BEFORE_UNMOUNT_KEY]: noop,
[ON_UNMOUNTED_KEY]: noop
});
const MOCKED_TEMPLATE_INTERFACE = Object.assign({}, PURE_COMPONENT_API, {
clone: noop,
createDOM: noop
});
/**
* Performance optimization for the recursive components
* @param {RiotComponentWrapper} componentWrapper - riot compiler generated object
* @returns {Object} component like interface
*/
const memoizedCreateComponent = memoize(createComponent);
/**
* Evaluate the component properties either from its real attributes or from its initial user properties
* @param {HTMLElement} element - component root
* @param {Object} initialProps - initial props
* @returns {Object} component props key value pairs
*/
function evaluateInitialProps(element, initialProps) {
if (initialProps === void 0) {
initialProps = {};
}
return Object.assign({}, DOMattributesToObject(element), callOrAssign(initialProps));
}
/**
* Bind a DOM node to its component object
* @param {HTMLElement} node - html node mounted
* @param {Object} component - Riot.js component object
* @returns {Object} the component object received as second argument
*/
const bindDOMNodeToComponentObject = (node, component) => node[DOM_COMPONENT_INSTANCE_PROPERTY$1] = component;
/**
* Wrap the Riot.js core API methods using a mapping function
* @param {Function} mapFunction - lifting function
* @returns {Object} an object having the { mount, update, unmount } functions
*/
function createCoreAPIMethods(mapFunction) {
return [MOUNT_METHOD_KEY, UPDATE_METHOD_KEY, UNMOUNT_METHOD_KEY].reduce((acc, method) => {
acc[method] = mapFunction(method);
return acc;
}, {});
}
/**
* Factory function to create the component templates only once
* @param {Function} template - component template creation function
* @param {RiotComponentWrapper} componentWrapper - riot compiler generated object
* @returns {TemplateChunk} template chunk object
*/
function componentTemplateFactory(template, componentWrapper) {
const components = createSubcomponents(componentWrapper.exports ? componentWrapper.exports.components : {});
return template(create, expressionTypes, bindingTypes, name => {
// improve support for recursive components
if (name === componentWrapper.name) return memoizedCreateComponent(componentWrapper); // return the registered components
return components[name] || COMPONENTS_IMPLEMENTATION_MAP$1.get(name);
});
}
/**
* Create a pure component
* @param {Function} pureFactoryFunction - pure component factory function
* @param {Array} options.slots - component slots
* @param {Array} options.attributes - component attributes
* @param {Array} options.template - template factory function
* @param {Array} options.template - template factory function
* @param {any} options.props - initial component properties
* @returns {Object} pure component object
*/
function createPureComponent(pureFactoryFunction, _ref) {
let {
slots,
attributes,
props,
css,
template
} = _ref;
if (template) panic('Pure components can not have html');
if (css) panic('Pure components do not have css');
const component = defineDefaults(pureFactoryFunction({
slots,
attributes,
props
}), PURE_COMPONENT_API);
return createCoreAPIMethods(method => function () {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
// intercept the mount calls to bind the DOM node to the pure object created
// see also https://github.com/riot/riot/issues/2806
if (method === MOUNT_METHOD_KEY) {
const [el] = args; // mark this node as pure element
el[IS_PURE_SYMBOL] = true;
bindDOMNodeToComponentObject(el, component);
}
component[method](...args);
return component;
});
}
/**
* Create the component interface needed for the @riotjs/dom-bindings tag bindings
* @param {RiotComponentWrapper} componentWrapper - riot compiler generated object
* @param {string} componentWrapper.css - component css
* @param {Function} componentWrapper.template - function that will return the dom-bindings template function
* @param {Object} componentWrapper.exports - component interface
* @param {string} componentWrapper.name - component name
* @returns {Object} component like interface
*/
function createComponent(componentWrapper) {
const {
css,
template,
exports,
name
} = componentWrapper;
const templateFn = template ? componentTemplateFactory(template, componentWrapper) : MOCKED_TEMPLATE_INTERFACE;
return _ref2 => {
let {
slots,
attributes,
props
} = _ref2;
// pure components rendering will be managed by the end user
if (exports && exports[IS_PURE_SYMBOL]) return createPureComponent(exports, {
slots,
attributes,
props,
css,
template
});
const componentAPI = callOrAssign(exports) || {};
const component = defineComponent({
css,
template: templateFn,
componentAPI,
name
})({
slots,
attributes,
props
}); // notice that for the components create via tag binding
// we need to invert the mount (state/parentScope) arguments
// the template bindings will only forward the parentScope updates
// and never deal with the component state
return {
mount(element, parentScope, state) {
return component.mount(element, state, parentScope);
},
update(parentScope, state) {
return component.update(state, parentScope);
},
unmount(preserveRoot) {
return component.unmount(preserveRoot);
}
};
};
}
/**
* Component definition function
* @param {Object} implementation - the componen implementation will be generated via compiler
* @param {Object} component - the component initial properties
* @returns {Object} a new component implementation object
*/
function defineComponent(_ref3) {
let {
css,
template,
componentAPI,
name
} = _ref3;
// add the component css into the DOM
if (css && name) cssManager.add(name, css);
return curry(enhanceComponentAPI)(defineProperties( // set the component defaults without overriding the original component API
defineDefaults(componentAPI, Object.assign({}, COMPONENT_LIFECYCLE_METHODS, {
[PROPS_KEY]: {},
[STATE_KEY]: {}
})), Object.assign({
// defined during the component creation
[SLOTS_KEY]: null,
[ROOT_KEY]: null
}, COMPONENT_CORE_HELPERS, {
name,
css,
template
})));
}
/**
* Create the bindings to update the component attributes
* @param {HTMLElement} node - node where we will bind the expressions
* @param {Array} attributes - list of attribute bindings
* @returns {TemplateChunk} - template bindings object
*/
function createAttributeBindings(node, attributes) {
if (attributes === void 0) {
attributes = [];
}
const expressions = attributes.map(a => create$4(node, a));
const binding = {};
return Object.assign(binding, Object.assign({
expressions
}, createCoreAPIMethods(method => scope => {
expressions.forEach(e => e[method](scope));
return binding;
})));
}
/**
* Create the subcomponents that can be included inside a tag in runtime
* @param {Object} components - components imported in runtime
* @returns {Object} all the components transformed into Riot.Component factory functions
*/
function createSubcomponents(components) {
if (components === void 0) {
components = {};
}
return Object.entries(callOrAssign(components)).reduce((acc, _ref4) => {
let [key, value] = _ref4;
acc[camelToDashCase(key)] = createComponent(value);
return acc;
}, {});
}
/**
* Run the component instance through all the plugins set by the user
* @param {Object} component - component instance
* @returns {Object} the component enhanced by the plugins
*/
function runPlugins(component) {
return [...PLUGINS_SET$1].reduce((c, fn) => fn(c) || c, component);
}
/**
* Compute the component current state merging it with its previous state
* @param {Object} oldState - previous state object
* @param {Object} newState - new state givent to the `update` call
* @returns {Object} new object state
*/
function computeState(oldState, newState) {
return Object.assign({}, oldState, callOrAssign(newState));
}
/**
* Add eventually the "is" attribute to link this DOM node to its css
* @param {HTMLElement} element - target root node
* @param {string} name - name of the component mounted
* @returns {undefined} it's a void function
*/
function addCssHook(element, name) {
if (getName(element) !== name) {
set(element, IS_DIRECTIVE, name);
}
}
/**
* Component creation factory function that will enhance the user provided API
* @param {Object} component - a component implementation previously defined
* @param {Array} options.slots - component slots generated via riot compiler
* @param {Array} options.attributes - attribute expressions generated via riot compiler
* @returns {Riot.Component} a riot component instance
*/
function enhanceComponentAPI(component, _ref5) {
let {
slots,
attributes,
props
} = _ref5;
return autobindMethods(runPlugins(defineProperties(isObject(component) ? Object.create(component) : component, {
mount(element, state, parentScope) {
if (state === void 0) {
state = {};
}
this[PARENT_KEY_SYMBOL] = parentScope;
this[ATTRIBUTES_KEY_SYMBOL] = createAttributeBindings(element, attributes).mount(parentScope);
defineProperty(this, PROPS_KEY, Object.freeze(Object.assign({}, evaluateInitialProps(element, props), evaluateAttributeExpressions(this[ATTRIBUTES_KEY_SYMBOL].expressions))));
this[STATE_KEY] = computeState(this[STATE_KEY], state);
this[TEMPLATE_KEY_SYMBOL] = this.template.createDOM(element).clone(); // link this object to the DOM node
bindDOMNodeToComponentObject(element, this); // add eventually the 'is' attribute
component.name && addCssHook(element, component.name); // define the root element
defineProperty(this, ROOT_KEY, element); // define the slots array
defineProperty(this, SLOTS_KEY, slots); // before mount lifecycle event
this[ON_BEFORE_MOUNT_KEY](this[PROPS_KEY], this[STATE_KEY]); // mount the template
this[TEMPLATE_KEY_SYMBOL].mount(element, this, parentScope);
this[ON_MOUNTED_KEY](this[PROPS_KEY], this[STATE_KEY]);
return this;
},
update(state, parentScope) {
if (state === void 0) {
state = {};
}
if (parentScope) {
this[PARENT_KEY_SYMBOL] = parentScope;
this[ATTRIBUTES_KEY_SYMBOL].update(parentScope);
}
const newProps = evaluateAttributeExpressions(this[ATTRIBUTES_KEY_SYMBOL].expressions);
if (this[SHOULD_UPDATE_KEY](newProps, this[PROPS_KEY]) === false) return;
defineProperty(this, PROPS_KEY, Object.freeze(Object.assign({}, this[PROPS_KEY], newProps)));
this[STATE_KEY] = computeState(this[STATE_KEY], state);
this[ON_BEFORE_UPDATE_KEY](this[PROPS_KEY], this[STATE_KEY]); // avoiding recursive updates
// see also https://github.com/riot/riot/issues/2895
if (!this[IS_COMPONENT_UPDATING]) {
this[IS_COMPONENT_UPDATING] = true;
this[TEMPLATE_KEY_SYMBOL].update(this, this[PARENT_KEY_SYMBOL]);
}
this[ON_UPDATED_KEY](this[PROPS_KEY], this[STATE_KEY]);
this[IS_COMPONENT_UPDATING] = false;
return this;
},
unmount(preserveRoot) {
this[ON_BEFORE_UNMOUNT_KEY](this[PROPS_KEY], this[STATE_KEY]);
this[ATTRIBUTES_KEY_SYMBOL].unmount(); // if the preserveRoot is null the template html will be left untouched
// in that case the DOM cleanup will happen differently from a parent node
this[TEMPLATE_KEY_SYMBOL].unmount(this, this[PARENT_KEY_SYMBOL], preserveRoot === null ? null : !preserveRoot);
this[ON_UNMOUNTED_KEY](this[PROPS_KEY], this[STATE_KEY]);
return this;
}
})), Object.keys(component).filter(prop => isFunction(component[prop])));
}
/**
* Component initialization function starting from a DOM node
* @param {HTMLElement} element - element to upgrade
* @param {Object} initialProps - initial component properties
* @param {string} componentName - component id
* @returns {Object} a new component instance bound to a DOM node
*/
function mountComponent(element, initialProps, componentName) {
const name = componentName || getName(element);
if (!COMPONENTS_IMPLEMENTATION_MAP$1.has(name)) panic(`The component named "${name}" was never registered`);
const component = COMPONENTS_IMPLEMENTATION_MAP$1.get(name)({
props: initialProps
});
return component.mount(element);
}
/**
* Similar to compose but performs from left-to-right function composition.
* {@link https://30secondsofcode.org/function#composeright see also}
* @param {...[function]} fns) - list of unary function
* @returns {*} result of the computation
*/
/**
* Performs right-to-left function composition.
* Use Array.prototype.reduce() to perform right-to-left function composition.
* The last (rightmost) function can accept one or more arguments; the remaining functions must be unary.
* {@link https://30secondsofcode.org/function#compose original source code}
* @param {...[function]} fns) - list of unary function
* @returns {*} result of the computation
*/
function compose() {
for (var _len2 = arguments.length, fns = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
fns[_key2] = arguments[_key2];
}
return fns.reduce((f, g) => function () {
return f(g(...arguments));
});
}
const {
DOM_COMPONENT_INSTANCE_PROPERTY,
COMPONENTS_IMPLEMENTATION_MAP,
PLUGINS_SET
} = globals;
/**
* Riot public api
*/
/**
* Register a custom tag by name
* @param {string} name - component name
* @param {Object} implementation - tag implementation
* @returns {Map} map containing all the components implementations
*/
function register(name, _ref) {
let {
css,
template,
exports
} = _ref;
if (COMPONENTS_IMPLEMENTATION_MAP.has(name)) panic(`The component "${name}" was already registered`);
COMPONENTS_IMPLEMENTATION_MAP.set(name, createComponent({
name,
css,
template,
exports
}));
return COMPONENTS_IMPLEMENTATION_MAP;
}
/**
* Unregister a riot web component
* @param {string} name - component name
* @returns {Map} map containing all the components implementations
*/
function unregister(name) {
if (!COMPONENTS_IMPLEMENTATION_MAP.has(name)) panic(`The component "${name}" was never registered`);
COMPONENTS_IMPLEMENTATION_MAP.delete(name);
cssManager.remove(name);
return COMPONENTS_IMPLEMENTATION_MAP;
}
/**
* Mounting function that will work only for the components that were globally registered
* @param {string|HTMLElement} selector - query for the selection or a DOM element
* @param {Object} initialProps - the initial component properties
* @param {string} name - optional component name
* @returns {Array} list of riot components
*/
function mount(selector, initialProps, name) {
return $(selector).map(element => mountComponent(element, initialProps, name));
}
/**
* Sweet unmounting helper function for the DOM node mounted manually by the user
* @param {string|HTMLElement} selector - query for the selection or a DOM element
* @param {boolean|null} keepRootElement - if true keep the root element
* @returns {Array} list of nodes unmounted
*/
function unmount(selector, keepRootElement) {
return $(selector).map(element => {
if (element[DOM_COMPONENT_INSTANCE_PROPERTY]) {
element[DOM_COMPONENT_INSTANCE_PROPERTY].unmount(keepRootElement);
}
return element;
});
}
/**
* Define a riot plugin
* @param {Function} plugin - function that will receive all the components created
* @returns {Set} the set containing all the plugins installed
*/
function install(plugin) {
if (!isFunction(plugin)) panic('Plugins must be of type function');
if (PLUGINS_SET.has(plugin)) panic('This plugin was already installed');
PLUGINS_SET.add(plugin);
return PLUGINS_SET;
}
/**
* Uninstall a riot plugin
* @param {Function} plugin - plugin previously installed
* @returns {Set} the set containing all the plugins installed
*/
function uninstall(plugin) {
if (!PLUGINS_SET.has(plugin)) panic('This plugin was never installed');
PLUGINS_SET.delete(plugin);
return PLUGINS_SET;
}
/**
* Helper method to create component without relying on the registered ones
* @param {Object} implementation - component implementation
* @returns {Function} function that will allow you to mount a riot component on a DOM node
*/
function component(implementation) {
return function (el, props, _temp) {
let {
slots,
attributes,
parentScope
} = _temp === void 0 ? {} : _temp;
return compose(c => c.mount(el, parentScope), c => c({
props,
slots,
attributes
}), createComponent)(implementation);
};
}
/**
* Lift a riot component Interface into a pure riot object
* @param {Function} func - RiotPureComponent factory function
* @returns {Function} the lifted original function received as argument
*/
function pure(func) {
if (!isFunction(func)) panic('riot.pure accepts only arguments of type "function"');
func[IS_PURE_SYMBOL] = true;
return func;
}
/**
* no-op function needed to add the proper types to your component via typescript
* @param {Function|Object} component - component default export
* @returns {Function|Object} returns exactly what it has received
*/
const withTypes = component => component;
/** @type {string} current riot version */
const version = 'v6.0.1'; // expose some internal stuff that might be used from external tools
const __ = {
cssManager,
DOMBindings,
createComponent,
defineComponent,
globals
};
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ id: moduleId,
/******/ loaded: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/global */
/******/ (() => {
/******/ __webpack_require__.g = (function() {
/******/ if (typeof globalThis === 'object') return globalThis;
/******/ try {
/******/ return this || new Function('return this')();
/******/ } catch (e) {
/******/ if (typeof window === 'object') return window;
/******/ }
/******/ })();
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/node module decorator */
/******/ (() => {
/******/ __webpack_require__.nmd = (module) => {
/******/ module.paths = [];
/******/ if (!module.children) module.children = [];
/******/ return module;
/******/ };
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";
/*!***********************************!*\
!*** ./resources/js/dashboard.js ***!
\***********************************/
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var riot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! riot */ "./node_modules/riot/riot.esm.js");
/* harmony import */ var _components_buckets_riot__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/buckets.riot */ "./resources/js/components/buckets.riot");
// register components for buckets
riot__WEBPACK_IMPORTED_MODULE_1__.register('app-buckets', _components_buckets_riot__WEBPACK_IMPORTED_MODULE_0__.default);
riot__WEBPACK_IMPORTED_MODULE_1__.mount('app-buckets');
})();
/******/ })()
;