New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@evs-chris/raui

Package Overview
Dependencies
Maintainers
1
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evs-chris/raui - npm Package Compare versions

Comparing version 0.4.5 to 0.4.6

41

es/date.js

@@ -9,3 +9,7 @@ // TODO: support for non-numeric formats?

var defaultTime = options.time || '00:00:00.000';
var defaultDate = options.date || new Date('0000-01-01T' + defaultTime);
var defaultDate = options.date || (function () { return new Date('0000-01-01T' + defaultTime); });
if (typeof defaultDate !== 'function') {
var dt = defaultDate;
defaultDate = function () { return dt; };
}

@@ -15,6 +19,7 @@ return function(ref) {

instance.decorators[options.name || 'date'] = function(/** @type { HTMLInputElement } */ node, opts) {
instance.decorators[options.name || 'date'] = function(/** @type { HTMLInputElement } */ node, opts, other) {
if ( opts === void 0 ) opts = {};
if (typeof opts === 'string') { opts = { value: opts }; }
if (typeof other === 'string') { opts.mask = other; }
var ctx = this.getContext(node);

@@ -49,3 +54,3 @@ var mask = opts.mask || defaultMask;

handles.observers.push(ctx.observe(opts.value, function (v) {
if (!v) { v = defaultDate; }
if (!v) { v = defaultDate(); }
groups.value = v;

@@ -55,3 +60,3 @@ updateDate(v, groups);

}));
} else { groups.value = getDateValue(opts.date || defaultDate); }
} else { groups.value = getDateValue(opts.date || defaultDate()); }

@@ -105,2 +110,10 @@ function sendValue() {

handles.listeners.push(ctx.listen('blur', function () {
if (pending) {
var group = groupForPos(groups, node.selectionStart);
checkPending(node, group);
revalue(groups);
updateDisplay(group);
redraw(node, groups);
pending = false;
}
sendValue();

@@ -206,9 +219,3 @@ }));

reval = true;
group.value = +(currentInput(node, group)[1] || 1);
if (group.type === 'M') { group.value--; }
else if (group.type === 'y' && group.value < 100) {
var yr = (new Date()).getFullYear() + '';
if (group.value - +(yr.substr(2)) < 20) { group.value = +(yr.substr(0, 2) + '00') + group.value; }
else { group.value = +(yr.substr(0, 2) + '00') - 100 + group.value; }
}
checkPending(node, group);
}

@@ -433,3 +440,3 @@

if (typeof v === 'function') { v = thing(); }
if (typeof v === 'string') { try { v = Date.parse(v); } catch (e) {} }
if (typeof v === 'string') { try { v = Date.parse(v); } catch (e) { return defaultDate(); } }
if (Object.toString.call(Object, v) === '[object Date]') { return v; }

@@ -550,1 +557,11 @@ else { return origin; }

}
function checkPending(node, group) {
group.value = +(currentInput(node, group)[1] || 1);
if (group.type === 'M') { group.value--; }
else if (group.type === 'y' && group.value < 100) {
var yr = (new Date()).getFullYear() + '';
if (group.value - +(yr.substr(2)) < 20) { group.value = +(yr.substr(0, 2) + '00') + group.value; }
else { group.value = +(yr.substr(0, 2) + '00') - 100 + group.value; }
}
}

@@ -76,8 +76,8 @@ import Ractive from 'ractive';

Menu.prototype.popSiblingsIn = function popSiblingsIn (ctx) {
var me = ctx.resolve();
var items = ctx.get('../');
var me = ctx.resolve();
if (items) {
for (var i = 0; i < items.length; i++) {
if (me === ctx.resolve(("../" + i))) { continue; }
if (items[i].open) {
if (items[i].open && items[i].popout) {
ctx.toggle(("../" + i + ".open"));

@@ -118,3 +118,3 @@ }

Ractive.extendWith(Menu, {
template: {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-wrapper",g:1},{t:16,r:"extra-attributes"},{n:"class-rmenu-vertical",t:13,f:[{t:2,x:{r:["~/horizontal"],s:"!_0"}}]},{n:"class-rmenu-horizontal",t:13,f:[{t:2,r:"~/horizontal"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-inner",g:1}],f:[{t:8,r:"items"}]}]}]}],e:{"!_0":function (_0){return(!_0);},"_0&&(_1||_2===\"section\")":function (_0,_1,_2){return(_0&&(_1||_2==="section"));},"_0?_3.active(_1.getHandle((_2))):_3.active()":function (_0,_1,_2,_3){return(_0?_3.active(_1.getHandle((_2))):_3.active());},"typeof _0===\"function\"":function (_0){return(typeof _0==="function");},"typeof _0===\"boolean\"":function (_0){return(typeof _0==="boolean");},"_0.childActive(_1)":function (_0,_1){return(_0.childActive(_1));},"_0!=null":function (_0){return(_0!=null);},"[_0.action()]":function (_0){return([_0.action()]);},"[_0._actioned()]":function (_0){return([_0._actioned()]);},"[_0.popSiblingsIn((_1)),(_1).toggle(\".open\"),false]":function (_0,_1){return([_0.popSiblingsIn((_1)),(_1).toggle(".open"),false]);},"_0||(_1&&_2[_1])":function (_0,_1,_2){return(_0||(_1&&_2[_1]));},"[{axis:\"x\"}]":function (){return([{axis:"x"}]);},"_2&&_0&&_1.visibleItems(_2)":function (_0,_1,_2){return(_2&&_0&&_1.visibleItems(_2));},"[(_0).toggle(\".open\"),false]":function (_0){return([(_0).toggle(".open"),false]);},"!_0||_0===\"item\"":function (_0){return(!_0||_0==="item");},"_0===\"section\"":function (_0){return(_0==="section");},"_0===\"container\"":function (_0){return(_0==="container");},"(!_0||_0===\"item\")&&_1":function (_0,_1){return((!_0||_0==="item")&&_1);},"[_0.popAllIn((_1))]":function (_0,_1){return([_0.popAllIn((_1))]);},"[_0]":function (_0){return([_0]);},"typeof _0===\"string\"":function (_0){return(typeof _0==="string");},"_0||\"item\"":function (_0){return(_0||"item");},"_0._itemRendered((_1))":function (_0,_1){return(_0._itemRendered((_1)));},"_1===undefined||(typeof _1===\"boolean\"&&_1)||(typeof _1===\"string\"&&_0[_1])||(typeof _1===\"function\"&&_2.condition())":function (_0,_1,_2){return(_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.condition()));}},p:{container:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:3,r:".content"}]}],n:50,r:".pad"},{t:4,f:[{t:3,r:".content"}],n:51,l:1}],n:50,r:".content"},{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:16,r:".contentPartial"}]}],n:50,r:".pad"},{t:4,f:[{t:16,r:".contentPartial"}],n:51,l:1}],n:50,r:".contentPartial",l:1}],section:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1}],f:[{t:4,f:[{t:2,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}]}," ",{t:8,r:"children"}],children:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-items",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,x:{r:[".popout"],s:"!_0"}},{t:4,f:[{n:"pop",t:72,v:"t0"}],n:51,l:1}],f:[{t:8,r:"items"}]}],n:50,x:{r:[".items.length",".open",".type"],s:"_0&&(_1||_2===\"section\")"}}],item:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".activeRef"}]}}]}],n:50,r:".activeRef"},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:[".active.length","@this","@context","."],s:"_0?_3.active(_1.getHandle((_2))):_3.active()"}}]}],n:50,x:{r:[".active"],s:"typeof _0===\"function\""},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,r:".active"}]}],n:50,x:{r:[".active"],s:"typeof _0===\"boolean\""},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:["@this","@keypath"],s:"_0.childActive(_1)"}}]}],n:50,r:".popout",l:1},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,r:".disabled"}]}],n:50,x:{r:[".disabled"],s:"_0!=null"}},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".disabledRef"}]}}]}],n:50,r:".disabledRef",l:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-left",g:1}],f:[{t:3,r:".left"}]}],n:50,r:".left"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-left",g:1}],f:[{t:16,r:".leftPartial"}]}],n:50,r:".leftPartial",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1},{t:4,f:[{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{n:["click"],t:70,f:{r:["@this"],s:"[_0._actioned()]"}}],n:50,x:{r:[".action"],s:"typeof _0===\"function\""}},{t:4,f:[{t:16,r:".actionPartial"},{n:["click"],t:70,f:{r:["@this"],s:"[_0._actioned()]"}}],n:50,r:".actionPartial",l:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this","@context"],s:"[_0.popSiblingsIn((_1)),(_1).toggle(\".open\"),false]"}}],n:50,r:".items.length",l:1}],n:51,x:{r:[".disabled",".disabledRef","~/"],s:"_0||(_1&&_2[_1])"}}],f:[{t:4,f:[{t:3,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-right",g:1}],f:[{t:3,r:".right"}]}],n:50,r:".right"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-right",g:1}],f:[{t:16,r:".rightPartial"}]}],n:50,r:".rightPartial",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-expand",g:1},{n:["click"],t:70,f:{r:["@this","@context"],s:"[_0.popSiblingsIn((_1)),(_1).toggle(\".open\"),false]"}},{n:"expand",t:72,f:{r:[],s:"[{axis:\"x\"}]"},v:"t0"}]}],n:50,x:{r:[".items.length","@this",".items"],s:"_2&&_0&&_1.visibleItems(_2)"}}]}," ",{t:8,r:"children"}],items:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-popout-close",g:1},{n:["click"],t:70,f:{r:["@context"],s:"[(_0).toggle(\".open\"),false]"}}]}],n:50,r:".shrink"}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-entry",g:1},{t:4,f:[{n:"class-rmenu-item",t:13}],n:50,x:{r:[".type"],s:"!_0||_0===\"item\""}},{t:4,f:[{n:"class-rmenu-section",t:13}],n:50,x:{r:[".type"],s:"_0===\"section\""},l:1},{t:4,f:[{n:"class-rmenu-container",t:13}],n:50,x:{r:[".type"],s:"_0===\"container\""},l:1},{n:"class-rmenu-expanded",t:13,f:[{t:2,r:".open"}]},{n:"class-rmenu-popout",t:13,f:[{t:2,x:{r:[".type",".popout"],s:"(!_0||_0===\"item\")&&_1"}}]},{t:4,f:[{n:"pop",t:72,v:"t0"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this","@context"],s:"[_0.popAllIn((_1))]"}}],n:50,r:".open"}],n:50,r:".popout"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:51,l:1},{t:4,f:[{t:8,r:".refPartial"}],n:50,r:".refPartial"},{t:4,f:[{n:"ref",t:71,f:{r:[".ref"],s:"[_0]"}}],n:50,x:{r:[".ref"],s:"typeof _0===\"string\""},l:1},{t:4,f:[{t:16,r:".attrsPartial"}],n:50,r:".attrsPartial"}],f:[{t:8,x:{r:[".type"],s:"_0||\"item\""}}," ",{t:4,f:[{t:2,x:{r:["@this","@context"],s:"_0._itemRendered((_1))"}}],n:50,x:{r:[".type"],s:"!_0||_0===\"item\""}}]}],n:50,x:{r:["~/",".condition","."],s:"_1===undefined||(typeof _1===\"boolean\"&&_1)||(typeof _1===\"string\"&&_0[_1])||(typeof _1===\"function\"&&_2.condition())"}}],n:52,r:".items"}]}},
template: {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-wrapper",g:1},{t:16,r:"extra-attributes"},{n:"class-rmenu-vertical",t:13,f:[{t:2,x:{r:["~/horizontal"],s:"!_0"}}]},{n:"class-rmenu-horizontal",t:13,f:[{t:2,r:"~/horizontal"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-inner",g:1}],f:[{t:8,r:"items"}]}]}]}],e:{"!_0":function (_0){return(!_0);},"_0&&(_1||_2===\"section\")":function (_0,_1,_2){return(_0&&(_1||_2==="section"));},"_0?_3.active(_1.getHandle((_2))):_3.active()":function (_0,_1,_2,_3){return(_0?_3.active(_1.getHandle((_2))):_3.active());},"typeof _0===\"function\"":function (_0){return(typeof _0==="function");},"typeof _0===\"boolean\"":function (_0){return(typeof _0==="boolean");},"_0.childActive(_1)":function (_0,_1){return(_0.childActive(_1));},"_0!=null":function (_0){return(_0!=null);},"[_0.action()]":function (_0){return([_0.action()]);},"[_0._actioned()]":function (_0){return([_0._actioned()]);},"[_0&&_1.popSiblingsIn((_2)),(_2).toggle(\".open\"),false]":function (_0,_1,_2){return([_0&&_1.popSiblingsIn((_2)),(_2).toggle(".open"),false]);},"_0||(_1&&_2[_1])":function (_0,_1,_2){return(_0||(_1&&_2[_1]));},"[{axis:\"x\"}]":function (){return([{axis:"x"}]);},"_2&&_0&&_1.visibleItems(_2)":function (_0,_1,_2){return(_2&&_0&&_1.visibleItems(_2));},"[(_0).toggle(\".open\"),false]":function (_0){return([(_0).toggle(".open"),false]);},"!_0||_0===\"item\"":function (_0){return(!_0||_0==="item");},"_0===\"section\"":function (_0){return(_0==="section");},"_0===\"container\"":function (_0){return(_0==="container");},"(!_0||_0===\"item\")&&_1":function (_0,_1){return((!_0||_0==="item")&&_1);},"[_0.popAllIn((_1))]":function (_0,_1){return([_0.popAllIn((_1))]);},"[_0]":function (_0){return([_0]);},"typeof _0===\"string\"":function (_0){return(typeof _0==="string");},"_0||\"item\"":function (_0){return(_0||"item");},"_0._itemRendered((_1))":function (_0,_1){return(_0._itemRendered((_1)));},"_1===undefined||(typeof _1===\"boolean\"&&_1)||(typeof _1===\"string\"&&_0[_1])||(typeof _1===\"function\"&&_2.condition())":function (_0,_1,_2){return(_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.condition()));}},p:{container:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:3,r:".content"}]}],n:50,r:".pad"},{t:4,f:[{t:3,r:".content"}],n:51,l:1}],n:50,r:".content"},{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:16,r:".contentPartial"}]}],n:50,r:".pad"},{t:4,f:[{t:16,r:".contentPartial"}],n:51,l:1}],n:50,r:".contentPartial",l:1}],section:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1}],f:[{t:4,f:[{t:2,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}]}," ",{t:8,r:"children"}],children:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-items",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,x:{r:[".popout"],s:"!_0"}},{t:4,f:[{n:"pop",t:72,v:"t0"}],n:51,l:1}],f:[{t:8,r:"items"}]}],n:50,x:{r:[".items.length",".open",".type"],s:"_0&&(_1||_2===\"section\")"}}],item:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".activeRef"}]}}]}],n:50,r:".activeRef"},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:[".active.length","@this","@context","."],s:"_0?_3.active(_1.getHandle((_2))):_3.active()"}}]}],n:50,x:{r:[".active"],s:"typeof _0===\"function\""},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,r:".active"}]}],n:50,x:{r:[".active"],s:"typeof _0===\"boolean\""},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:["@this","@keypath"],s:"_0.childActive(_1)"}}]}],n:50,r:".popout",l:1},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,r:".disabled"}]}],n:50,x:{r:[".disabled"],s:"_0!=null"}},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".disabledRef"}]}}]}],n:50,r:".disabledRef",l:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-left",g:1}],f:[{t:3,r:".left"}]}],n:50,r:".left"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-left",g:1}],f:[{t:16,r:".leftPartial"}]}],n:50,r:".leftPartial",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1},{t:4,f:[{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{n:["click"],t:70,f:{r:["@this"],s:"[_0._actioned()]"}}],n:50,x:{r:[".action"],s:"typeof _0===\"function\""}},{t:4,f:[{t:16,r:".actionPartial"},{n:["click"],t:70,f:{r:["@this"],s:"[_0._actioned()]"}}],n:50,r:".actionPartial",l:1},{t:4,f:[{n:["click"],t:70,f:{r:[".popout","@this","@context"],s:"[_0&&_1.popSiblingsIn((_2)),(_2).toggle(\".open\"),false]"}}],n:50,r:".items.length",l:1}],n:51,x:{r:[".disabled",".disabledRef","~/"],s:"_0||(_1&&_2[_1])"}}],f:[{t:4,f:[{t:3,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-right",g:1}],f:[{t:3,r:".right"}]}],n:50,r:".right"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-right",g:1}],f:[{t:16,r:".rightPartial"}]}],n:50,r:".rightPartial",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-expand",g:1},{n:["click"],t:70,f:{r:[".popout","@this","@context"],s:"[_0&&_1.popSiblingsIn((_2)),(_2).toggle(\".open\"),false]"}},{n:"expand",t:72,f:{r:[],s:"[{axis:\"x\"}]"},v:"t0"}]}],n:50,x:{r:[".items.length","@this",".items"],s:"_2&&_0&&_1.visibleItems(_2)"}}]}," ",{t:8,r:"children"}],items:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-popout-close",g:1},{n:["click"],t:70,f:{r:["@context"],s:"[(_0).toggle(\".open\"),false]"}}]}],n:50,r:".shrink"}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-entry",g:1},{t:4,f:[{n:"class-rmenu-item",t:13}],n:50,x:{r:[".type"],s:"!_0||_0===\"item\""}},{t:4,f:[{n:"class-rmenu-section",t:13}],n:50,x:{r:[".type"],s:"_0===\"section\""},l:1},{t:4,f:[{n:"class-rmenu-container",t:13}],n:50,x:{r:[".type"],s:"_0===\"container\""},l:1},{n:"class-rmenu-expanded",t:13,f:[{t:2,r:".open"}]},{n:"class-rmenu-popout",t:13,f:[{t:2,x:{r:[".type",".popout"],s:"(!_0||_0===\"item\")&&_1"}}]},{t:4,f:[{n:"pop",t:72,v:"t0"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this","@context"],s:"[_0.popAllIn((_1))]"}}],n:50,r:".open"}],n:50,r:".popout"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:51,l:1},{t:4,f:[{t:8,r:".refPartial"}],n:50,r:".refPartial"},{t:4,f:[{n:"ref",t:71,f:{r:[".ref"],s:"[_0]"}}],n:50,x:{r:[".ref"],s:"typeof _0===\"string\""},l:1},{t:4,f:[{t:16,r:".attrsPartial"}],n:50,r:".attrsPartial"}],f:[{t:8,x:{r:[".type"],s:"_0||\"item\""}}," ",{t:4,f:[{t:2,x:{r:["@this","@context"],s:"_0._itemRendered((_1))"}}],n:50,x:{r:[".type"],s:"!_0||_0===\"item\""}}]}],n:50,x:{r:["~/",".condition","."],s:"_1===undefined||(typeof _1===\"boolean\"&&_1)||(typeof _1===\"string\"&&_0[_1])||(typeof _1===\"function\"&&_2.condition())"}}],n:52,r:".items"}]}},
css: function(data) { return [(function(data) {

@@ -121,0 +121,0 @@ var primary = Object.assign({}, data('raui.primary'), data('raui.menu.primary'));

{
"name": "@evs-chris/raui",
"version": "0.4.5",
"version": "0.4.6",
"description": "Components, decorators, and helpers for Ractive apps that are generally Material-ish",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/evs-chris/raui",

@@ -15,3 +15,7 @@ (function (global, factory) {

var defaultTime = options.time || '00:00:00.000';
var defaultDate = options.date || new Date('0000-01-01T' + defaultTime);
var defaultDate = options.date || (function () { return new Date('0000-01-01T' + defaultTime); });
if (typeof defaultDate !== 'function') {
var dt = defaultDate;
defaultDate = function () { return dt; };
}

@@ -21,6 +25,7 @@ return function(ref) {

instance.decorators[options.name || 'date'] = function(/** @type { HTMLInputElement } */ node, opts) {
instance.decorators[options.name || 'date'] = function(/** @type { HTMLInputElement } */ node, opts, other) {
if ( opts === void 0 ) opts = {};
if (typeof opts === 'string') { opts = { value: opts }; }
if (typeof other === 'string') { opts.mask = other; }
var ctx = this.getContext(node);

@@ -55,3 +60,3 @@ var mask = opts.mask || defaultMask;

handles.observers.push(ctx.observe(opts.value, function (v) {
if (!v) { v = defaultDate; }
if (!v) { v = defaultDate(); }
groups.value = v;

@@ -61,3 +66,3 @@ updateDate(v, groups);

}));
} else { groups.value = getDateValue(opts.date || defaultDate); }
} else { groups.value = getDateValue(opts.date || defaultDate()); }

@@ -111,2 +116,10 @@ function sendValue() {

handles.listeners.push(ctx.listen('blur', function () {
if (pending) {
var group = groupForPos(groups, node.selectionStart);
checkPending(node, group);
revalue(groups);
updateDisplay(group);
redraw(node, groups);
pending = false;
}
sendValue();

@@ -212,9 +225,3 @@ }));

reval = true;
group.value = +(currentInput(node, group)[1] || 1);
if (group.type === 'M') { group.value--; }
else if (group.type === 'y' && group.value < 100) {
var yr = (new Date()).getFullYear() + '';
if (group.value - +(yr.substr(2)) < 20) { group.value = +(yr.substr(0, 2) + '00') + group.value; }
else { group.value = +(yr.substr(0, 2) + '00') - 100 + group.value; }
}
checkPending(node, group);
}

@@ -438,3 +445,3 @@

if (typeof v === 'function') { v = thing(); }
if (typeof v === 'string') { try { v = Date.parse(v); } catch (e) {} }
if (typeof v === 'string') { try { v = Date.parse(v); } catch (e) { return defaultDate(); } }
if (Object.toString.call(Object, v) === '[object Date]') { return v; }

@@ -556,2 +563,12 @@ else { return origin; }

function checkPending(node, group) {
group.value = +(currentInput(node, group)[1] || 1);
if (group.type === 'M') { group.value--; }
else if (group.type === 'y' && group.value < 100) {
var yr = (new Date()).getFullYear() + '';
if (group.value - +(yr.substr(2)) < 20) { group.value = +(yr.substr(0, 2) + '00') + group.value; }
else { group.value = +(yr.substr(0, 2) + '00') - 100 + group.value; }
}
}
exports.default = plugin;

@@ -558,0 +575,0 @@

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.RMDate={})}(this,function(e){"use strict";var t=/y+|M+|d+|E+|H+|m+|s+|S+|k+|a+/g,a=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var u={teardown:function(){}};function l(e){switch(e.type){case"y":e.display=e.length<=2?(""+e.value).substr(2,2):""+p(e.value,"0",4);break;case"M":1===e.length?e.display=""+(e.value+1):2===e.length?e.display=(e.value<9?"0":"")+(e.value+1):3===e.length?e.display=a[e.value].substr(0,3):e.display=a[e.value];break;case"d":1===e.length?e.display=""+e.value:2===e.length?e.display=(e.value<=9?"0":"")+e.value:3===e.length?e.display=n[e.groups.value.getDay()].substr(0,3):e.display=n[e.groups.value.getDay()];break;case"H":case"m":case"s":1===e.length?e.display=""+e.value:e.display=p(e.value,"0",2);break;case"S":1===e.length?e.display=""+e.value:e.display=p(e.value,"0",3)}}function r(e,t){switch(e.type){case"y":e.value=e.value+(t?-1:1);break;case"M":e.value=t?e.value<1?11:e.value-1:e.value>10?0:e.value+1;break;case"d":e.value=t?e.value<2?o(e.groups.value):e.value-1:e.value+1>o(e.groups.value)?1:e.value+1;break;case"H":e.value=t?e.value<1?23:e.value-1:e.value>22?0:e.value+1;break;case"m":case"s":e.value=t?e.value<1?59:e.value-1:e.value>58?0:e.value+1;break;case"S":e.value.down?e.value<1||e.value:!(e.value>998)&&e.value}}function s(e){return e.reduce(function(e,t){return e+t.prefix+t.display},"")+e.suffix}function i(e,t){for(var a,n=0,u=0;u<e.length;u++)if(t<=(n+=(a=e[u]).prefix.length+a.display.length))return a;return e[0]}function o(e){return new Date(new Date(e.getFullYear(),e.getMonth()+1,1)-864e5).getDate()}function c(e,t){for(var a,n=0,u=t.groups,l=0;l<=t.chunk;l++)n+=(a=u[l]).prefix.length,l===t.chunk?e.setSelectionRange(n,n+a.display.length):n+=a.display.length}function v(e,t){var a,n=e.value,u=t.groups,l=0,r=0,s=[];for(r=0;r<t.chunk;r++)l+=u[r].prefix.length,l+=u[r].display.length;return l+=u[r].prefix.length,s[0]=n.substr(0,l),u[r+1]&&(a=n.indexOf(u[r+1].prefix,l)),s[1]=n.substring(l,a),s[2]="number"==typeof a?n.substr(a):"",s}var f=new Date("0000-01-01T00:00:00");function g(e,t){var a=e.selectionStart;e.value=s(t),e.setSelectionRange(a,a)}function p(e,t,a){for(var n=""+e,u=n.length;u<a;u++)n=t+n;return n}function d(e){var t,a=e.value||new Date,n=[a.getFullYear(),a.getMonth()+1,a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()];e.forEach(function(e){switch(e.type){case"y":n[0]=e.value;break;case"M":n[1]=e.value,n[1]<0?(n[1]=e.value=0,l(e)):n[1]>11&&(n[1]=e.value=11,l(e)),n[1]++;break;case"d":n[2]=e.value,n[2]<1?(n[2]=e.value=1,l(e)):n[2]>31&&(n[2]=e.value=31,l(e));break;case"H":n[3]=e.value,n[3]<0?(n[3]=e.value=0,l(e)):n[3]>23&&(n[3]=e.value=23,l(e));break;case"m":n[4]=e.value,n[4]<0?(n[4]=e.value=0,l(e)):n[4]>59&&(n[4]=e.value=59,l(e));break;case"s":n[5]=e.value,n[5]<0?(n[5]=e.value=0,l(e)):n[5]>59&&(n[5]=e.value=59,l(e));break;case"S":n[6]=e.value,n[6]<0?(n[6]=e.value=0,l(e)):n[6]>999&&(n[6]=e.value=999,l(e))}});for(var u=0;u<4;u++){if(t=new Date(p(n[0],"0",4)+"-"+p(n[1],"0",2)+"-"+p(n[2],"0",2)+"T"+p(n[3],"0",2)+":"+p(n[4],"0",2)+":"+p(n[5],"0",2)+"."+p(n[6],"0",3)),!isNaN(t.getDate())&&t.getDate()===n[2])return e.value=t,void(u>0&&e.filter(function(e){return"d"===e.type}).forEach(function(e){e.value=n[2],l(e)}));n[2]--}}e.default=function(e){void 0===e&&(e={});var a=e.mask||"yyyy-MM-dd",n=e.time||"00:00:00.000",o=e.date||new Date("0000-01-01T"+n);return function(n){n.instance.decorators[e.name||"date"]=function(e,n){void 0===n&&(n={}),"string"==typeof n&&(n={value:n});var p,h,y=this.getContext(e),b=n.mask||a,k={observers:[],listeners:[]};if("INPUT"!==e.tagName)return console.warn("Attempted to add a date decorator a "+e.tagName),u;if(!b)return u;for(var m,S=[],w=0;m=t.exec(b);){var D={mask:m[0],type:m[0][0],length:m[0].length,start:m.index,end:m.index+m[0].length,chunk:S.length,prefix:b.substring(w,m.index),groups:S};w=D.end,S.push(D)}if(S.suffix=b.substring(S[S.length-1].end),S.slice(1).find(function(e){return!e.prefix}))return console.warn("Attempted to add a date decorator missing interstitial between fields '"+b+"'"),u;function M(t){if(p){var a=p;p=!1;var n=e.value,u=v(e,a),r=u[0],s=u[1];if(a.value=+(s||1),"M"===a.type)a.value--;else if("y"===a.type&&a.value<100){var o=(new Date).getFullYear()+"";a.value-+o.substr(2)<20?a.value=+(o.substr(0,2)+"00")+a.value:a.value=+(o.substr(0,2)+"00")-100+a.value}if(d(S),l(a),g(e,S),r.length+s.length<e.selectionStart){var f=e.selectionStart+(e.value.length-n.length);e.setSelectionRange(f,f)}}"mouseup"===t.type&&document.removeEventListener("mouseup",M),(e.selectionStart>e.selectionEnd?e.selectionStart-e.selectionEnd:e.selectionEnd-e.selectionStart)===e.value.length&&"focus"!==t.type||(h&&clearTimeout(h),"focus"===t.type?h=setTimeout(function(){return c(e,i(S,e.selectionStart))}):c(e,i(S,e.selectionStart)))}return"string"==typeof n.value?k.observers.push(y.observe(n.value,function(t){t||(t=o),S.value=t,function(e,t){if(!e)return"";if("string"==typeof e)e=new Date(e),e=new Date(+e+60*e.getTimezoneOffset()*1e3),t.value=e;else if("[object Date]"!==Object.prototype.toString.call(e))return"";t.forEach(function(t){!function(e,t){switch(t.type){case"y":t.value=e.getFullYear();break;case"M":t.value=e.getMonth();break;case"d":t.value=e.getDate();break;case"H":t.value=e.getHours();break;case"m":t.value=e.getMinutes();break;case"s":t.value=e.getSeconds();break;case"S":t.value=e.getMilliseconds()}}(e,t),l(t)})}(t,S),e.value=s(S)})):S.value=function(e){var t=e;if("function"==typeof t&&(t=e()),"string"==typeof t)try{t=Date.parse(t)}catch(e){}return"[object Date]"===Object.toString.call(Object,t)?t:f}(n.date||o),k.listeners.push(y.listen("focus",function(e){M(e)})),k.listeners.push(y.listen("blur",function(){"string"==typeof n.value&&(k.observers.forEach(function(e){return e.silence()}),y.set(n.value,S.value),k.observers.forEach(function(e){return e.resume()}))})),k.listeners.push(y.listen("dragstart",function(e){e.preventDefault(),e.stopPropagation()})),k.listeners.push(y.listen("keydown",function(t){var a=i(S,e.selectionStart),n=!0,u=!1,s=0;switch(t.key){case"ArrowDown":r(a,!0),u=a;break;case"ArrowRight":var o=v(e,a),f=o[0],h=o[1];e.selectionStart>=(f+h).length?s=1:n=!1;break;case"ArrowLeft":var y=v(e,a)[0];e.selectionStart<=y.length&&e.selectionStart-e.selectionEnd==0?s=-1:n=!1;break;case"ArrowUp":r(a,!1),u=a;break;case"Enter":s=t.shiftKey?-1:1;break;case"Backspace":case"Delete":n=!1;break;case"Tab":t.shiftKey?0===a.chunk?n=!1:s=-1:a.chunk===S.length-1?n=!1:s=1}if(t.key>="0"&&t.key<="9"){p=a;var b=e.selectionStart,k=e.selectionEnd;b!==k&&(e.value=e.value.slice(0,b>k?k:b)+e.value.slice(b>k?b:k));var m=v(e,a),w=m[0],D=m[1],M=m[2];D+=t.key,e.value=w+D+M,e.setSelectionRange(w.length+D.length,w.length+D.length),("y"===a.type&&(a.length<=2&&D.length>1||D.length>=4)||"M"===a.type&&(+D>1||D.length>1)||"d"===a.type&&(+D>3||D.length>1)||"H"===a.type&&(+D>2||D.length>1)||("m"===a.type||"s"===a.type)&&(+D>6||D.length>1)||"S"===a.type&&3===D.length)&&(a.value="M"===a.type?+D-1:+D,u=a,a.chunk<S.length-1&&(s=1),p=!1)}else t.ctrlKey||t.metaKey||t.altKey?n=!1:1===t.key.length&&p&&(s=1);if(n&&(t.preventDefault(),t.stopPropagation()),s&&!u&&p)if(u=!0,a.value=+(v(e,a)[1]||1),"M"===a.type)a.value--;else if("y"===a.type&&a.value<100){var x=(new Date).getFullYear()+"";a.value-+x.substr(2)<20?a.value=+(x.substr(0,2)+"00")+a.value:a.value=+(x.substr(0,2)+"00")-100+a.value}u&&(d(S),l(a),g(e,S),!s&&u.groups&&c(e,u)),s&&(s>0?function(e,t){c(e,t.groups[t.chunk+1]?t.groups[t.chunk+1]:t.groups[0])}(e,a):s<0&&function(e,t){c(e,t.groups[t.chunk-1]?t.groups[t.chunk-1]:t.groups[t.groups.length-1])}(e,a))})),k.listeners.push(y.listen("mousedown",function(){document.addEventListener("mouseup",M)})),{teardown:function(){k.observers.forEach(function(e){return e.cancel()}),k.listeners.forEach(function(e){return e.cancel()})}}}}},Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.RMDate={})}(this,function(e){"use strict";var t=/y+|M+|d+|E+|H+|m+|s+|S+|k+|a+/g,a=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var u={teardown:function(){}};function r(e){switch(e.type){case"y":e.display=e.length<=2?(""+e.value).substr(2,2):""+d(e.value,"0",4);break;case"M":1===e.length?e.display=""+(e.value+1):2===e.length?e.display=(e.value<9?"0":"")+(e.value+1):3===e.length?e.display=a[e.value].substr(0,3):e.display=a[e.value];break;case"d":1===e.length?e.display=""+e.value:2===e.length?e.display=(e.value<=9?"0":"")+e.value:3===e.length?e.display=n[e.groups.value.getDay()].substr(0,3):e.display=n[e.groups.value.getDay()];break;case"H":case"m":case"s":1===e.length?e.display=""+e.value:e.display=d(e.value,"0",2);break;case"S":1===e.length?e.display=""+e.value:e.display=d(e.value,"0",3)}}function l(e,t){switch(e.type){case"y":e.value=e.value+(t?-1:1);break;case"M":e.value=t?e.value<1?11:e.value-1:e.value>10?0:e.value+1;break;case"d":e.value=t?e.value<2?o(e.groups.value):e.value-1:e.value+1>o(e.groups.value)?1:e.value+1;break;case"H":e.value=t?e.value<1?23:e.value-1:e.value>22?0:e.value+1;break;case"m":case"s":e.value=t?e.value<1?59:e.value-1:e.value>58?0:e.value+1;break;case"S":e.value.down?e.value<1||e.value:!(e.value>998)&&e.value}}function s(e){return e.reduce(function(e,t){return e+t.prefix+t.display},"")+e.suffix}function i(e,t){for(var a,n=0,u=0;u<e.length;u++)if(t<=(n+=(a=e[u]).prefix.length+a.display.length))return a;return e[0]}function o(e){return new Date(new Date(e.getFullYear(),e.getMonth()+1,1)-864e5).getDate()}function c(e,t){for(var a,n=0,u=t.groups,r=0;r<=t.chunk;r++)n+=(a=u[r]).prefix.length,r===t.chunk?e.setSelectionRange(n,n+a.display.length):n+=a.display.length}function v(e,t){var a,n=e.value,u=t.groups,r=0,l=0,s=[];for(l=0;l<t.chunk;l++)r+=u[l].prefix.length,r+=u[l].display.length;return r+=u[l].prefix.length,s[0]=n.substr(0,r),u[l+1]&&(a=n.indexOf(u[l+1].prefix,r)),s[1]=n.substring(r,a),s[2]="number"==typeof a?n.substr(a):"",s}var f=new Date("0000-01-01T00:00:00");function g(e){var t=e;if("function"==typeof t&&(t=e()),"string"==typeof t)try{t=Date.parse(t)}catch(e){return defaultDate()}return"[object Date]"===Object.toString.call(Object,t)?t:f}function p(e,t){var a=e.selectionStart;e.value=s(t),e.setSelectionRange(a,a)}function d(e,t,a){for(var n=""+e,u=n.length;u<a;u++)n=t+n;return n}function y(e){var t,a=e.value||new Date,n=[a.getFullYear(),a.getMonth()+1,a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()];e.forEach(function(e){switch(e.type){case"y":n[0]=e.value;break;case"M":n[1]=e.value,n[1]<0?(n[1]=e.value=0,r(e)):n[1]>11&&(n[1]=e.value=11,r(e)),n[1]++;break;case"d":n[2]=e.value,n[2]<1?(n[2]=e.value=1,r(e)):n[2]>31&&(n[2]=e.value=31,r(e));break;case"H":n[3]=e.value,n[3]<0?(n[3]=e.value=0,r(e)):n[3]>23&&(n[3]=e.value=23,r(e));break;case"m":n[4]=e.value,n[4]<0?(n[4]=e.value=0,r(e)):n[4]>59&&(n[4]=e.value=59,r(e));break;case"s":n[5]=e.value,n[5]<0?(n[5]=e.value=0,r(e)):n[5]>59&&(n[5]=e.value=59,r(e));break;case"S":n[6]=e.value,n[6]<0?(n[6]=e.value=0,r(e)):n[6]>999&&(n[6]=e.value=999,r(e))}});for(var u=0;u<4;u++){if(t=new Date(d(n[0],"0",4)+"-"+d(n[1],"0",2)+"-"+d(n[2],"0",2)+"T"+d(n[3],"0",2)+":"+d(n[4],"0",2)+":"+d(n[5],"0",2)+"."+d(n[6],"0",3)),!isNaN(t.getDate())&&t.getDate()===n[2])return e.value=t,void(u>0&&e.filter(function(e){return"d"===e.type}).forEach(function(e){e.value=n[2],r(e)}));n[2]--}}function h(e,t){if(t.value=+(v(e,t)[1]||1),"M"===t.type)t.value--;else if("y"===t.type&&t.value<100){var a=(new Date).getFullYear()+"";t.value-+a.substr(2)<20?t.value=+(a.substr(0,2)+"00")+t.value:t.value=+(a.substr(0,2)+"00")-100+t.value}}e.default=function(e){void 0===e&&(e={});var a=e.mask||"yyyy-MM-dd",n=e.time||"00:00:00.000",o=e.date||function(){return new Date("0000-01-01T"+n)};if("function"!=typeof o){var f=o;o=function(){return f}}return function(n){n.instance.decorators[e.name||"date"]=function(e,n,f){void 0===n&&(n={}),"string"==typeof n&&(n={value:n}),"string"==typeof f&&(n.mask=f);var d,b,k=this.getContext(e),m=n.mask||a,S={observers:[],listeners:[]};if("INPUT"!==e.tagName)return console.warn("Attempted to add a date decorator a "+e.tagName),u;if(!m)return u;for(var w,D=[],M=0;w=t.exec(m);){var x={mask:w[0],type:w[0][0],length:w[0].length,start:w.index,end:w.index+w[0].length,chunk:D.length,prefix:m.substring(M,w.index),groups:D};M=x.end,D.push(x)}if(D.suffix=m.substring(D[D.length-1].end),D.slice(1).find(function(e){return!e.prefix}))return console.warn("Attempted to add a date decorator missing interstitial between fields '"+m+"'"),u;function E(t){if(d){var a=d;d=!1;var n=e.value,u=v(e,a),l=u[0],s=u[1];if(a.value=+(s||1),"M"===a.type)a.value--;else if("y"===a.type&&a.value<100){var o=(new Date).getFullYear()+"";a.value-+o.substr(2)<20?a.value=+(o.substr(0,2)+"00")+a.value:a.value=+(o.substr(0,2)+"00")-100+a.value}if(y(D),r(a),p(e,D),l.length+s.length<e.selectionStart){var f=e.selectionStart+(e.value.length-n.length);e.setSelectionRange(f,f)}}"mouseup"===t.type&&document.removeEventListener("mouseup",E),(e.selectionStart>e.selectionEnd?e.selectionStart-e.selectionEnd:e.selectionEnd-e.selectionStart)===e.value.length&&"focus"!==t.type||(b&&clearTimeout(b),"focus"===t.type?b=setTimeout(function(){return c(e,i(D,e.selectionStart))}):c(e,i(D,e.selectionStart)))}return"string"==typeof n.value?S.observers.push(k.observe(n.value,function(t){t||(t=o()),D.value=t,function(e,t){if(!e)return"";if("string"==typeof e)e=new Date(e),e=new Date(+e+60*e.getTimezoneOffset()*1e3),t.value=e;else if("[object Date]"!==Object.prototype.toString.call(e))return"";t.forEach(function(t){!function(e,t){switch(t.type){case"y":t.value=e.getFullYear();break;case"M":t.value=e.getMonth();break;case"d":t.value=e.getDate();break;case"H":t.value=e.getHours();break;case"m":t.value=e.getMinutes();break;case"s":t.value=e.getSeconds();break;case"S":t.value=e.getMilliseconds()}}(e,t),r(t)})}(t,D),e.value=s(D)})):D.value=g(n.date||o()),S.listeners.push(k.listen("focus",function(e){E(e)})),S.listeners.push(k.listen("blur",function(){if(d){var t=i(D,e.selectionStart);h(e,t),y(D),r(t),p(e,D),d=!1}"string"==typeof n.value&&(S.observers.forEach(function(e){return e.silence()}),k.set(n.value,D.value),S.observers.forEach(function(e){return e.resume()}))})),S.listeners.push(k.listen("dragstart",function(e){e.preventDefault(),e.stopPropagation()})),S.listeners.push(k.listen("keydown",function(t){var a=i(D,e.selectionStart),n=!0,u=!1,s=0;switch(t.key){case"ArrowDown":l(a,!0),u=a;break;case"ArrowRight":var o=v(e,a),f=o[0],g=o[1];e.selectionStart>=(f+g).length?s=1:n=!1;break;case"ArrowLeft":var b=v(e,a)[0];e.selectionStart<=b.length&&e.selectionStart-e.selectionEnd==0?s=-1:n=!1;break;case"ArrowUp":l(a,!1),u=a;break;case"Enter":s=t.shiftKey?-1:1;break;case"Backspace":case"Delete":n=!1;break;case"Tab":t.shiftKey?0===a.chunk?n=!1:s=-1:a.chunk===D.length-1?n=!1:s=1}if(t.key>="0"&&t.key<="9"){d=a;var k=e.selectionStart,m=e.selectionEnd;k!==m&&(e.value=e.value.slice(0,k>m?m:k)+e.value.slice(k>m?k:m));var S=v(e,a),w=S[0],M=S[1],x=S[2];M+=t.key,e.value=w+M+x,e.setSelectionRange(w.length+M.length,w.length+M.length),("y"===a.type&&(a.length<=2&&M.length>1||M.length>=4)||"M"===a.type&&(+M>1||M.length>1)||"d"===a.type&&(+M>3||M.length>1)||"H"===a.type&&(+M>2||M.length>1)||("m"===a.type||"s"===a.type)&&(+M>6||M.length>1)||"S"===a.type&&3===M.length)&&(a.value="M"===a.type?+M-1:+M,u=a,a.chunk<D.length-1&&(s=1),d=!1)}else t.ctrlKey||t.metaKey||t.altKey?n=!1:1===t.key.length&&d&&(s=1);n&&(t.preventDefault(),t.stopPropagation()),s&&!u&&d&&(u=!0,h(e,a)),u&&(y(D),r(a),p(e,D),!s&&u.groups&&c(e,u)),s&&(s>0?function(e,t){c(e,t.groups[t.chunk+1]?t.groups[t.chunk+1]:t.groups[0])}(e,a):s<0&&function(e,t){c(e,t.groups[t.chunk-1]?t.groups[t.chunk-1]:t.groups[t.groups.length-1])}(e,a))})),S.listeners.push(k.listen("mousedown",function(){document.addEventListener("mouseup",E)})),{teardown:function(){S.observers.forEach(function(e){return e.cancel()}),S.listeners.forEach(function(e){return e.cancel()})}}}}},Object.defineProperty(e,"__esModule",{value:!0})});

@@ -166,8 +166,8 @@ (function (global, factory) {

Menu.prototype.popSiblingsIn = function popSiblingsIn (ctx) {
var me = ctx.resolve();
var items = ctx.get('../');
var me = ctx.resolve();
if (items) {
for (var i = 0; i < items.length; i++) {
if (me === ctx.resolve(("../" + i))) { continue; }
if (items[i].open) {
if (items[i].open && items[i].popout) {
ctx.toggle(("../" + i + ".open"));

@@ -208,3 +208,3 @@ }

Ractive$1.extendWith(Menu, {
template: {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-wrapper",g:1},{t:16,r:"extra-attributes"},{n:"class-rmenu-vertical",t:13,f:[{t:2,x:{r:["~/horizontal"],s:"!_0"}}]},{n:"class-rmenu-horizontal",t:13,f:[{t:2,r:"~/horizontal"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-inner",g:1}],f:[{t:8,r:"items"}]}]}]}],e:{"!_0":function (_0){return(!_0);},"_0&&(_1||_2===\"section\")":function (_0,_1,_2){return(_0&&(_1||_2==="section"));},"_0?_3.active(_1.getHandle((_2))):_3.active()":function (_0,_1,_2,_3){return(_0?_3.active(_1.getHandle((_2))):_3.active());},"typeof _0===\"function\"":function (_0){return(typeof _0==="function");},"typeof _0===\"boolean\"":function (_0){return(typeof _0==="boolean");},"_0.childActive(_1)":function (_0,_1){return(_0.childActive(_1));},"_0!=null":function (_0){return(_0!=null);},"[_0.action()]":function (_0){return([_0.action()]);},"[_0._actioned()]":function (_0){return([_0._actioned()]);},"[_0.popSiblingsIn((_1)),(_1).toggle(\".open\"),false]":function (_0,_1){return([_0.popSiblingsIn((_1)),(_1).toggle(".open"),false]);},"_0||(_1&&_2[_1])":function (_0,_1,_2){return(_0||(_1&&_2[_1]));},"[{axis:\"x\"}]":function (){return([{axis:"x"}]);},"_2&&_0&&_1.visibleItems(_2)":function (_0,_1,_2){return(_2&&_0&&_1.visibleItems(_2));},"[(_0).toggle(\".open\"),false]":function (_0){return([(_0).toggle(".open"),false]);},"!_0||_0===\"item\"":function (_0){return(!_0||_0==="item");},"_0===\"section\"":function (_0){return(_0==="section");},"_0===\"container\"":function (_0){return(_0==="container");},"(!_0||_0===\"item\")&&_1":function (_0,_1){return((!_0||_0==="item")&&_1);},"[_0.popAllIn((_1))]":function (_0,_1){return([_0.popAllIn((_1))]);},"[_0]":function (_0){return([_0]);},"typeof _0===\"string\"":function (_0){return(typeof _0==="string");},"_0||\"item\"":function (_0){return(_0||"item");},"_0._itemRendered((_1))":function (_0,_1){return(_0._itemRendered((_1)));},"_1===undefined||(typeof _1===\"boolean\"&&_1)||(typeof _1===\"string\"&&_0[_1])||(typeof _1===\"function\"&&_2.condition())":function (_0,_1,_2){return(_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.condition()));}},p:{container:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:3,r:".content"}]}],n:50,r:".pad"},{t:4,f:[{t:3,r:".content"}],n:51,l:1}],n:50,r:".content"},{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:16,r:".contentPartial"}]}],n:50,r:".pad"},{t:4,f:[{t:16,r:".contentPartial"}],n:51,l:1}],n:50,r:".contentPartial",l:1}],section:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1}],f:[{t:4,f:[{t:2,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}]}," ",{t:8,r:"children"}],children:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-items",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,x:{r:[".popout"],s:"!_0"}},{t:4,f:[{n:"pop",t:72,v:"t0"}],n:51,l:1}],f:[{t:8,r:"items"}]}],n:50,x:{r:[".items.length",".open",".type"],s:"_0&&(_1||_2===\"section\")"}}],item:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".activeRef"}]}}]}],n:50,r:".activeRef"},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:[".active.length","@this","@context","."],s:"_0?_3.active(_1.getHandle((_2))):_3.active()"}}]}],n:50,x:{r:[".active"],s:"typeof _0===\"function\""},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,r:".active"}]}],n:50,x:{r:[".active"],s:"typeof _0===\"boolean\""},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:["@this","@keypath"],s:"_0.childActive(_1)"}}]}],n:50,r:".popout",l:1},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,r:".disabled"}]}],n:50,x:{r:[".disabled"],s:"_0!=null"}},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".disabledRef"}]}}]}],n:50,r:".disabledRef",l:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-left",g:1}],f:[{t:3,r:".left"}]}],n:50,r:".left"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-left",g:1}],f:[{t:16,r:".leftPartial"}]}],n:50,r:".leftPartial",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1},{t:4,f:[{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{n:["click"],t:70,f:{r:["@this"],s:"[_0._actioned()]"}}],n:50,x:{r:[".action"],s:"typeof _0===\"function\""}},{t:4,f:[{t:16,r:".actionPartial"},{n:["click"],t:70,f:{r:["@this"],s:"[_0._actioned()]"}}],n:50,r:".actionPartial",l:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this","@context"],s:"[_0.popSiblingsIn((_1)),(_1).toggle(\".open\"),false]"}}],n:50,r:".items.length",l:1}],n:51,x:{r:[".disabled",".disabledRef","~/"],s:"_0||(_1&&_2[_1])"}}],f:[{t:4,f:[{t:3,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-right",g:1}],f:[{t:3,r:".right"}]}],n:50,r:".right"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-right",g:1}],f:[{t:16,r:".rightPartial"}]}],n:50,r:".rightPartial",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-expand",g:1},{n:["click"],t:70,f:{r:["@this","@context"],s:"[_0.popSiblingsIn((_1)),(_1).toggle(\".open\"),false]"}},{n:"expand",t:72,f:{r:[],s:"[{axis:\"x\"}]"},v:"t0"}]}],n:50,x:{r:[".items.length","@this",".items"],s:"_2&&_0&&_1.visibleItems(_2)"}}]}," ",{t:8,r:"children"}],items:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-popout-close",g:1},{n:["click"],t:70,f:{r:["@context"],s:"[(_0).toggle(\".open\"),false]"}}]}],n:50,r:".shrink"}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-entry",g:1},{t:4,f:[{n:"class-rmenu-item",t:13}],n:50,x:{r:[".type"],s:"!_0||_0===\"item\""}},{t:4,f:[{n:"class-rmenu-section",t:13}],n:50,x:{r:[".type"],s:"_0===\"section\""},l:1},{t:4,f:[{n:"class-rmenu-container",t:13}],n:50,x:{r:[".type"],s:"_0===\"container\""},l:1},{n:"class-rmenu-expanded",t:13,f:[{t:2,r:".open"}]},{n:"class-rmenu-popout",t:13,f:[{t:2,x:{r:[".type",".popout"],s:"(!_0||_0===\"item\")&&_1"}}]},{t:4,f:[{n:"pop",t:72,v:"t0"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this","@context"],s:"[_0.popAllIn((_1))]"}}],n:50,r:".open"}],n:50,r:".popout"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:51,l:1},{t:4,f:[{t:8,r:".refPartial"}],n:50,r:".refPartial"},{t:4,f:[{n:"ref",t:71,f:{r:[".ref"],s:"[_0]"}}],n:50,x:{r:[".ref"],s:"typeof _0===\"string\""},l:1},{t:4,f:[{t:16,r:".attrsPartial"}],n:50,r:".attrsPartial"}],f:[{t:8,x:{r:[".type"],s:"_0||\"item\""}}," ",{t:4,f:[{t:2,x:{r:["@this","@context"],s:"_0._itemRendered((_1))"}}],n:50,x:{r:[".type"],s:"!_0||_0===\"item\""}}]}],n:50,x:{r:["~/",".condition","."],s:"_1===undefined||(typeof _1===\"boolean\"&&_1)||(typeof _1===\"string\"&&_0[_1])||(typeof _1===\"function\"&&_2.condition())"}}],n:52,r:".items"}]}},
template: {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-wrapper",g:1},{t:16,r:"extra-attributes"},{n:"class-rmenu-vertical",t:13,f:[{t:2,x:{r:["~/horizontal"],s:"!_0"}}]},{n:"class-rmenu-horizontal",t:13,f:[{t:2,r:"~/horizontal"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-inner",g:1}],f:[{t:8,r:"items"}]}]}]}],e:{"!_0":function (_0){return(!_0);},"_0&&(_1||_2===\"section\")":function (_0,_1,_2){return(_0&&(_1||_2==="section"));},"_0?_3.active(_1.getHandle((_2))):_3.active()":function (_0,_1,_2,_3){return(_0?_3.active(_1.getHandle((_2))):_3.active());},"typeof _0===\"function\"":function (_0){return(typeof _0==="function");},"typeof _0===\"boolean\"":function (_0){return(typeof _0==="boolean");},"_0.childActive(_1)":function (_0,_1){return(_0.childActive(_1));},"_0!=null":function (_0){return(_0!=null);},"[_0.action()]":function (_0){return([_0.action()]);},"[_0._actioned()]":function (_0){return([_0._actioned()]);},"[_0&&_1.popSiblingsIn((_2)),(_2).toggle(\".open\"),false]":function (_0,_1,_2){return([_0&&_1.popSiblingsIn((_2)),(_2).toggle(".open"),false]);},"_0||(_1&&_2[_1])":function (_0,_1,_2){return(_0||(_1&&_2[_1]));},"[{axis:\"x\"}]":function (){return([{axis:"x"}]);},"_2&&_0&&_1.visibleItems(_2)":function (_0,_1,_2){return(_2&&_0&&_1.visibleItems(_2));},"[(_0).toggle(\".open\"),false]":function (_0){return([(_0).toggle(".open"),false]);},"!_0||_0===\"item\"":function (_0){return(!_0||_0==="item");},"_0===\"section\"":function (_0){return(_0==="section");},"_0===\"container\"":function (_0){return(_0==="container");},"(!_0||_0===\"item\")&&_1":function (_0,_1){return((!_0||_0==="item")&&_1);},"[_0.popAllIn((_1))]":function (_0,_1){return([_0.popAllIn((_1))]);},"[_0]":function (_0){return([_0]);},"typeof _0===\"string\"":function (_0){return(typeof _0==="string");},"_0||\"item\"":function (_0){return(_0||"item");},"_0._itemRendered((_1))":function (_0,_1){return(_0._itemRendered((_1)));},"_1===undefined||(typeof _1===\"boolean\"&&_1)||(typeof _1===\"string\"&&_0[_1])||(typeof _1===\"function\"&&_2.condition())":function (_0,_1,_2){return(_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.condition()));}},p:{container:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:3,r:".content"}]}],n:50,r:".pad"},{t:4,f:[{t:3,r:".content"}],n:51,l:1}],n:50,r:".content"},{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:16,r:".contentPartial"}]}],n:50,r:".pad"},{t:4,f:[{t:16,r:".contentPartial"}],n:51,l:1}],n:50,r:".contentPartial",l:1}],section:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1}],f:[{t:4,f:[{t:2,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}]}," ",{t:8,r:"children"}],children:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-items",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,x:{r:[".popout"],s:"!_0"}},{t:4,f:[{n:"pop",t:72,v:"t0"}],n:51,l:1}],f:[{t:8,r:"items"}]}],n:50,x:{r:[".items.length",".open",".type"],s:"_0&&(_1||_2===\"section\")"}}],item:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".activeRef"}]}}]}],n:50,r:".activeRef"},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:[".active.length","@this","@context","."],s:"_0?_3.active(_1.getHandle((_2))):_3.active()"}}]}],n:50,x:{r:[".active"],s:"typeof _0===\"function\""},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,r:".active"}]}],n:50,x:{r:[".active"],s:"typeof _0===\"boolean\""},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:["@this","@keypath"],s:"_0.childActive(_1)"}}]}],n:50,r:".popout",l:1},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,r:".disabled"}]}],n:50,x:{r:[".disabled"],s:"_0!=null"}},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".disabledRef"}]}}]}],n:50,r:".disabledRef",l:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-left",g:1}],f:[{t:3,r:".left"}]}],n:50,r:".left"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-left",g:1}],f:[{t:16,r:".leftPartial"}]}],n:50,r:".leftPartial",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1},{t:4,f:[{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{n:["click"],t:70,f:{r:["@this"],s:"[_0._actioned()]"}}],n:50,x:{r:[".action"],s:"typeof _0===\"function\""}},{t:4,f:[{t:16,r:".actionPartial"},{n:["click"],t:70,f:{r:["@this"],s:"[_0._actioned()]"}}],n:50,r:".actionPartial",l:1},{t:4,f:[{n:["click"],t:70,f:{r:[".popout","@this","@context"],s:"[_0&&_1.popSiblingsIn((_2)),(_2).toggle(\".open\"),false]"}}],n:50,r:".items.length",l:1}],n:51,x:{r:[".disabled",".disabledRef","~/"],s:"_0||(_1&&_2[_1])"}}],f:[{t:4,f:[{t:3,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-right",g:1}],f:[{t:3,r:".right"}]}],n:50,r:".right"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-right",g:1}],f:[{t:16,r:".rightPartial"}]}],n:50,r:".rightPartial",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-expand",g:1},{n:["click"],t:70,f:{r:[".popout","@this","@context"],s:"[_0&&_1.popSiblingsIn((_2)),(_2).toggle(\".open\"),false]"}},{n:"expand",t:72,f:{r:[],s:"[{axis:\"x\"}]"},v:"t0"}]}],n:50,x:{r:[".items.length","@this",".items"],s:"_2&&_0&&_1.visibleItems(_2)"}}]}," ",{t:8,r:"children"}],items:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-popout-close",g:1},{n:["click"],t:70,f:{r:["@context"],s:"[(_0).toggle(\".open\"),false]"}}]}],n:50,r:".shrink"}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-entry",g:1},{t:4,f:[{n:"class-rmenu-item",t:13}],n:50,x:{r:[".type"],s:"!_0||_0===\"item\""}},{t:4,f:[{n:"class-rmenu-section",t:13}],n:50,x:{r:[".type"],s:"_0===\"section\""},l:1},{t:4,f:[{n:"class-rmenu-container",t:13}],n:50,x:{r:[".type"],s:"_0===\"container\""},l:1},{n:"class-rmenu-expanded",t:13,f:[{t:2,r:".open"}]},{n:"class-rmenu-popout",t:13,f:[{t:2,x:{r:[".type",".popout"],s:"(!_0||_0===\"item\")&&_1"}}]},{t:4,f:[{n:"pop",t:72,v:"t0"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this","@context"],s:"[_0.popAllIn((_1))]"}}],n:50,r:".open"}],n:50,r:".popout"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:51,l:1},{t:4,f:[{t:8,r:".refPartial"}],n:50,r:".refPartial"},{t:4,f:[{n:"ref",t:71,f:{r:[".ref"],s:"[_0]"}}],n:50,x:{r:[".ref"],s:"typeof _0===\"string\""},l:1},{t:4,f:[{t:16,r:".attrsPartial"}],n:50,r:".attrsPartial"}],f:[{t:8,x:{r:[".type"],s:"_0||\"item\""}}," ",{t:4,f:[{t:2,x:{r:["@this","@context"],s:"_0._itemRendered((_1))"}}],n:50,x:{r:[".type"],s:"!_0||_0===\"item\""}}]}],n:50,x:{r:["~/",".condition","."],s:"_1===undefined||(typeof _1===\"boolean\"&&_1)||(typeof _1===\"string\"&&_0[_1])||(typeof _1===\"function\"&&_2.condition())"}}],n:52,r:".items"}]}},
css: function(data) { return [(function(data) {

@@ -211,0 +211,0 @@ var primary = Object.assign({}, data('raui.primary'), data('raui.menu.primary'));

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],e):e(t.RMMenu={},t.Ractive)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n="undefined"!=typeof window?window:null;function i(t,e,i){if(n&&n.Ractive&&"object"==typeof n.Ractive[e]){var r=document.currentScript;if(r||(r=(r=document.querySelectorAll("script"))[r.length-1]),r){var o=r.getAttribute("data-alias");o&&(o=(o=o.split("&")).reduce(function(t,e){var n=e.split("="),i=n[0],r=n[1];return t[i]=r,t},{})),Ractive[e][o&&o[t]||t]=i}}}function r(t,e){var n=t.processParams(e,{duration:200,easing:"easeInOut"});t.setStyle("overflow","hidden");var i="x"===n.axis?"width":"height";if(t.isIntro){var r=t.getStyle(i);return t.setStyle(i,0),t.setStyle("opacity",0),t.animateStyle(i,r,n).then(function(){return t.animateStyle("opacity",1,n)})}return t.setStyle(i,t.getStyle(i)),t.setStyle("opacity",1),t.animateStyle("opacity",0,n).then(function(){return t.animateStyle(i,0,n)})}function o(t,e){function n(n){for(var i=n.target;i;){if(i===t)return!1;i=i.parentNode}e(n)}return document.body.addEventListener("click",n),document.body.addEventListener("touchstop",n),{teardown:function(){document.body.removeEventListener("click",n),document.body.removeEventListener("touchstop",n)}}}i("expand","transitions",r);var s=function(t){function e(e){t.call(this,opts),this.refs={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addItem=function(t,e){return"number"==typeof e?this.splice("items",e,0,t):this.push("items",t),new a(this,null,t)},e.prototype.visibleItems=function(t){var e=this;return t.filter(function(t){return!1!==t.condition&&("string"!=typeof t.condition||!1!==e.get(t.condition))}).length},e.prototype.getHandle=function(t){var e,n=this;if("string"==typeof t)if(this.refs[t])e=this.refs[t].ctx;else{var i=this.find(t);i&&(e=this.getContext(i))}else t&&t.parentNode?e=this.getContext(t):t&&t.decorators&&(e=t);if(e){for(var r=[e.get()],o="../../";""!==e.resolve(o);)r.unshift(e.get(o)),o+="../../";return r.reduce(function(t,e){return new a(n,t,e)},null)}},e.prototype.popAllIn=function(t){var e=(t=t||this.getContext()).get("items");t.get("open")&&t.set("open",!1);for(var n=t.resolve("items"),i=0;i<e.length;i++)u(this,n+"."+i)},e.prototype.popSiblingsIn=function(t){var e=t.get("../"),n=t.resolve();if(e)for(var i=0;i<e.length;i++)n!==t.resolve("../"+i)&&e[i].open&&t.toggle("../"+i+".open")},e.prototype._actioned=function(){this.fire("action"),this.popAllIn()},e.prototype._itemRendered=function(t){var e=this;return setTimeout(function(){return e.fire("item",t,e.getHandle(t))}),""},e.prototype.childActive=function(t){var e=this.get(t);if(e&&e.items)for(var n=0;n<e.items.length;n++)if(!0===this.get(t+".items."+n+".active")||"function"==typeof e.items[n].active&&e.items[n].active()||this.get(t+".items."+n+".activeRef")&&this.get(e.items[n].activeRef)||this.childActive(t+".items."+n))return!0},e}(e);e.extendWith(s,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-wrapper",g:1},{t:16,r:"extra-attributes"},{n:"class-rmenu-vertical",t:13,f:[{t:2,x:{r:["~/horizontal"],s:"!_0"}}]},{n:"class-rmenu-horizontal",t:13,f:[{t:2,r:"~/horizontal"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-inner",g:1}],f:[{t:8,r:"items"}]}]}]}],e:{"!_0":function(t){return!t},'_0&&(_1||_2==="section")':function(t,e,n){return t&&(e||"section"===n)},"_0?_3.active(_1.getHandle((_2))):_3.active()":function(t,e,n,i){return t?i.active(e.getHandle(n)):i.active()},'typeof _0==="function"':function(t){return"function"==typeof t},'typeof _0==="boolean"':function(t){return"boolean"==typeof t},"_0.childActive(_1)":function(t,e){return t.childActive(e)},"_0!=null":function(t){return null!=t},"[_0.action()]":function(t){return[t.action()]},"[_0._actioned()]":function(t){return[t._actioned()]},'[_0.popSiblingsIn((_1)),(_1).toggle(".open"),false]':function(t,e){return[t.popSiblingsIn(e),e.toggle(".open"),!1]},"_0||(_1&&_2[_1])":function(t,e,n){return t||e&&n[e]},'[{axis:"x"}]':function(){return[{axis:"x"}]},"_2&&_0&&_1.visibleItems(_2)":function(t,e,n){return n&&t&&e.visibleItems(n)},'[(_0).toggle(".open"),false]':function(t){return[t.toggle(".open"),!1]},'!_0||_0==="item"':function(t){return!t||"item"===t},'_0==="section"':function(t){return"section"===t},'_0==="container"':function(t){return"container"===t},'(!_0||_0==="item")&&_1':function(t,e){return(!t||"item"===t)&&e},"[_0.popAllIn((_1))]":function(t,e){return[t.popAllIn(e)]},"[_0]":function(t){return[t]},'typeof _0==="string"':function(t){return"string"==typeof t},'_0||"item"':function(t){return t||"item"},"_0._itemRendered((_1))":function(t,e){return t._itemRendered(e)},'_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.condition())':function(t,e,n){return void 0===e||"boolean"==typeof e&&e||"string"==typeof e&&t[e]||"function"==typeof e&&n.condition()}},p:{container:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:3,r:".content"}]}],n:50,r:".pad"},{t:4,f:[{t:3,r:".content"}],n:51,l:1}],n:50,r:".content"},{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:16,r:".contentPartial"}]}],n:50,r:".pad"},{t:4,f:[{t:16,r:".contentPartial"}],n:51,l:1}],n:50,r:".contentPartial",l:1}],section:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1}],f:[{t:4,f:[{t:2,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}]}," ",{t:8,r:"children"}],children:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-items",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,x:{r:[".popout"],s:"!_0"}},{t:4,f:[{n:"pop",t:72,v:"t0"}],n:51,l:1}],f:[{t:8,r:"items"}]}],n:50,x:{r:[".items.length",".open",".type"],s:'_0&&(_1||_2==="section")'}}],item:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".activeRef"}]}}]}],n:50,r:".activeRef"},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:[".active.length","@this","@context","."],s:"_0?_3.active(_1.getHandle((_2))):_3.active()"}}]}],n:50,x:{r:[".active"],s:'typeof _0==="function"'},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,r:".active"}]}],n:50,x:{r:[".active"],s:'typeof _0==="boolean"'},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:["@this","@keypath"],s:"_0.childActive(_1)"}}]}],n:50,r:".popout",l:1},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,r:".disabled"}]}],n:50,x:{r:[".disabled"],s:"_0!=null"}},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".disabledRef"}]}}]}],n:50,r:".disabledRef",l:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-left",g:1}],f:[{t:3,r:".left"}]}],n:50,r:".left"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-left",g:1}],f:[{t:16,r:".leftPartial"}]}],n:50,r:".leftPartial",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1},{t:4,f:[{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{n:["click"],t:70,f:{r:["@this"],s:"[_0._actioned()]"}}],n:50,x:{r:[".action"],s:'typeof _0==="function"'}},{t:4,f:[{t:16,r:".actionPartial"},{n:["click"],t:70,f:{r:["@this"],s:"[_0._actioned()]"}}],n:50,r:".actionPartial",l:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this","@context"],s:'[_0.popSiblingsIn((_1)),(_1).toggle(".open"),false]'}}],n:50,r:".items.length",l:1}],n:51,x:{r:[".disabled",".disabledRef","~/"],s:"_0||(_1&&_2[_1])"}}],f:[{t:4,f:[{t:3,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-right",g:1}],f:[{t:3,r:".right"}]}],n:50,r:".right"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-right",g:1}],f:[{t:16,r:".rightPartial"}]}],n:50,r:".rightPartial",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-expand",g:1},{n:["click"],t:70,f:{r:["@this","@context"],s:'[_0.popSiblingsIn((_1)),(_1).toggle(".open"),false]'}},{n:"expand",t:72,f:{r:[],s:'[{axis:"x"}]'},v:"t0"}]}],n:50,x:{r:[".items.length","@this",".items"],s:"_2&&_0&&_1.visibleItems(_2)"}}]}," ",{t:8,r:"children"}],items:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-popout-close",g:1},{n:["click"],t:70,f:{r:["@context"],s:'[(_0).toggle(".open"),false]'}}]}],n:50,r:".shrink"}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-entry",g:1},{t:4,f:[{n:"class-rmenu-item",t:13}],n:50,x:{r:[".type"],s:'!_0||_0==="item"'}},{t:4,f:[{n:"class-rmenu-section",t:13}],n:50,x:{r:[".type"],s:'_0==="section"'},l:1},{t:4,f:[{n:"class-rmenu-container",t:13}],n:50,x:{r:[".type"],s:'_0==="container"'},l:1},{n:"class-rmenu-expanded",t:13,f:[{t:2,r:".open"}]},{n:"class-rmenu-popout",t:13,f:[{t:2,x:{r:[".type",".popout"],s:'(!_0||_0==="item")&&_1'}}]},{t:4,f:[{n:"pop",t:72,v:"t0"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this","@context"],s:"[_0.popAllIn((_1))]"}}],n:50,r:".open"}],n:50,r:".popout"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:51,l:1},{t:4,f:[{t:8,r:".refPartial"}],n:50,r:".refPartial"},{t:4,f:[{n:"ref",t:71,f:{r:[".ref"],s:"[_0]"}}],n:50,x:{r:[".ref"],s:'typeof _0==="string"'},l:1},{t:4,f:[{t:16,r:".attrsPartial"}],n:50,r:".attrsPartial"}],f:[{t:8,x:{r:[".type"],s:'_0||"item"'}}," ",{t:4,f:[{t:2,x:{r:["@this","@context"],s:"_0._itemRendered((_1))"}}],n:50,x:{r:[".type"],s:'!_0||_0==="item"'}}]}],n:50,x:{r:["~/",".condition","."],s:'_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.condition())'}}],n:52,r:".items"}]}},css:function(t){return[function(t){var e=Object.assign({},t("raui.primary"),t("raui.menu.primary"));return"\n .rmenu-wrapper {\n position: relative;\n z-index: 1;\n }\n .rmenu-wrapper.rmenu-vertical {\n min-height: 100%;\n }\n .rmenu {\n "+(t("raui.menu.font")?"font-family: "+t("raui.menu.font")+";":"")+"\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fga||"#222")+";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n .rmenu-wrapper.alt > .rmenu {\n color: "+(e.fga||"#222")+";\n background-color: "+(e.bg||"#fff")+";\n }\n .rmenu-inner {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n }\n .rmenu-item {\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n transition: border 0.2s ease-in-out;\n }\n .rmenu-disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .rmenu-expanded {\n border-top: 0.0625em solid "+(e.bc||"#ccc")+";\n border-bottom: 0.0625em solid "+(e.bc||"#ccc")+";\n }\n .rmenu-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n user-select: none;\n transition: 0.3s ease-in-out;\n transition-property: color, background-color;\n display: flex;\n align-items: center;\n padding: 0.2em 0;\n min-height: 2em;\n }\n .rmenu-main.rmenu-active {\n color: "+(e.fga||"#07e")+";\n background-color: "+(e.bg||"#fff")+";\n }\n .rmenu-popout .rmenu-entry .rmenu-main.rmenu-active {\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fg||"#222")+";\n }\n .rmenu-wrapper.alt .rmenu-main.rmenu.active {\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fga||"#07e")+";\n }\n \n .rmenu-items {\n display: block;\n }\n .rmenu-right {\n padding-right: 0.4em; \n }\n .rmenu-left {\n padding-left: 0.4em;\n }\n .rmenu-expand {\n width: 1.5em;\n height: 1.5em;\n padding-left: 0.5em;\n cursor: pointer;\n position: relative;\n }\n .rmenu-expand:before {\n position: absolute;\n display: inline-block;\n top: 0.25em;\n content: ' ';\n transform: rotate(45deg);\n transition: transform 0.2s ease-in-out, top 0.2s ease-in-out, left 0.2s ease-in-out;\n box-sizing: border-box;\n border-width: 0.25em;\n border-style: solid;\n border-left-color: transparent;\n border-top-color: transparent;\n }\n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n top: -0.25em;\n }\n \n .rmenu-popout > .rmenu-items {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: "+(e.bg||"#fff")+";\n color: "+(e.fg||"#222")+";\n box-sizing: border-box;\n border: 1px solid;\n z-index: -1;\n transition: box-shadow 0.2s ease-in-out;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items {\n left: 100%;\n z-index: initial;\n box-shadow: 0.2em 0 0.2em rgba(0, 0, 0, 0.2);\n }\n \n .rmenu-popout > .rmenu-items.rmenu-shrink {\n left: 100%;\n z-index: 1;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items.rmenu-shrink {\n left: 0;\n }\n \n .rmenu-popout > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-45deg);\n top: 0.4em;\n }\n \n .rmenu-popout.rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(135deg);\n left: 0.75em;\n }\n \n .rmenu-popout > .rmenu-items .rmenu-popout > .rmenu-items {\n height: calc(100% + 2px);\n width: calc(100% + 1px);\n top: -1px;\n }\n \n .rmenu-popout-close:after {\n color: "+(e.bc||"#ccc")+";\n content: '\\274c Close';\n display: block;\n padding: 0.5em 0.5em 0.1em 0.5em;\n }\n \n .rmenu-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0 0.5em;\n flex-grow: 1;\n }\n .rmenu-disabled > .rmenu-title {\n cursor: not-allowed;\n }\n .rmenu-item h1, .rmenu-item h2, .rmenu-item h3, .rmenu-item h4 {\n margin: 0;\n }\n \n .rmenu-section {\n padding: 0.75em 0;\n }\n .rmenu-section > .rmenu-main {\n cursor: default;\n font-size: 0.75em;\n opacity: 0.7;\n margin-bottom: 0.25em;\n }\n \n .rmenu-container {\n box-sizing: border-box;\n }\n \n .rmenu-container-pad {\n padding: 0.3em 0.3em 0.8em 0.3em;\n }\n \n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-135deg);\n top: 0.5em;\n }\n "}.call(this,t)].join(" ")},cssId:"menu",noCssTransform:!0,noIntro:!0,nestedTransitions:!1,on:{construct:function(){var t=this.component;if(!t)return;var e=t.template.f||[],n=t.template.m?t.template.m.slice():[],i=t.template;t.template={e:i.e,f:i.f,t:i.t,m:n};var r=[];e.forEach(function(t){var e=function t(e){if("item"!==e.e&&"section"!==e.e&&"container"!==e.e)return;var i={};var r=[];var o;"item"!==e.e&&(i.type=e.e);e.m&&e.m.forEach(function(t){if("title"===t.n)"string"==typeof t.f?i.title=t.f:i.titlePartial={t:t.f};else if(70===t.t&&"action"===t.n[0])i.actionPartial={t:[{n:["click"],f:t.f,t:t.t}]};else if("guard"===t.n&&t.f&&1===t.f.length&&2===t.f[0].t){var o="_cnd"+n.length;i.condition=o,n.push({t:13,n:o,f:t.f})}else if("ref"===t.n){if("string"==typeof t.f)i.ref=t.f;else if(t.f&&1===t.f.length&&2===t.f[0].t){var s="_cnd"+n.length;n.push({t:13,n:s,f:t.f}),i.refPartials={t:[{t:71,n:"ref",f:{r:s,s:"[_0]"}}]}}}else if("active"===t.n){if(t.f&&1===t.f.length&&2===t.f[0].t){var a="_cnd"+n.length;i.activeRef=a,n.push({t:13,n:a,f:t.f})}}else if("open"===t.n)i.open=!0;else if("popout"===t.n)i.popout=!0;else if("container"===e.e&&"pad"===t.n)i.pad=!0;else if("disabled"===t.n)if(t.f&&1===t.f.length&&2===t.f[0].t){var f="_cnd"+n.length;i.disabledRef=f,n.push({t:13,n:f,f:t.f})}else 0===t.f&&(i.disabled=!0);else r.push(t)});r.length&&(i.attrsPartial={t:r});if("container"===e.e)return i.contentPartial={t:e.f},i.attrsPartial=r,i;e.f&&e.f.forEach(function(e){if("title"===e.e)1===e.f.length&&"string"==typeof e.f[0]?i.title=e.f[0]:i.titlePartial={t:e.f};else if("item"===e.e||"section"===e.e||"container"===e.e){var n=t(e);n&&(i.items||(i.items=[])).push(n)}else"left"===e.e?i.leftPartial={t:e.f}:"right"===e.e?i.rightPartial={t:e.f}:(o||(o=[]),o.push(e))});!i.titlePartial&&o&&(i.titlePartial={t:o});o=null;return i}(t);e&&r.push(e)}),this._items=r},config:function(){this._items&&this.set("items",(this.get("items")||[]).concat(this._items),{shuffle:!0})}},attributes:[],use:[function(t){return void 0===t&&(t={}),function(e){e.instance.transitions[t.name||"expand"]=r}}(),function(t){return void 0===t&&(t={}),function(e){e.instance.events[t.name||"clickout"]=o}}()],decorators:{ref:function(t,e){var n=this,i=e;n.refs||(n.refs={});var r={update:function(t){n.refs[i]===r&&delete n.refs[i],i=t,n.refs[i]=r},teardown:function(){n.refs[i]===r&&delete n.refs[i]}};return r.ctx=n.getContext(t),n.refs[i]=r,r}},transitions:{pop:function(t,e){var n,i=this,r=t.processParams(e,{duration:200,easing:"easeInOut"});if(t.isIntro){var o=t.node.getBoundingClientRect();function s(){for(var e=t.node.parentNode;e&&e.classList;){if(e.classList.contains("rmenu"))return e;if(e.parentNode.classList.contains("rmenu-popout"))return e;e=e.parentNode}}o.left+o.width>window.innerWidth?(t.node.classList.add("rmenu-shrink"),n=!0,setTimeout(function(){return i.getContext(t.node).set(".shrink",!0)}),s().style.overflowX="hidden"):t.node.classList.contains("rmenu-shrink")?(setTimeout(function(){return i.getContext(t.node).set(".shrink",!1)}),s().style.overflowX=""):s().style.overflowX=""}else n=t.node.classList.contains("rmenu-shrink");return t.isIntro?n?(t.setStyle("left","100%"),t.animateStyle("left",0,r)):(t.setStyle("left",0),t.setStyle("z-index",-1),t.animateStyle("left","100%",r)):n?(t.setStyle("left",0),t.animateStyle("left","100%",r)):(t.setStyle("left","100%"),t.setStyle("z-index",-1),t.animateStyle("left",0,r))}}});var a=function(t,e,n){this.menu=t,this.parent=e,this.item=n},f={keypath:{configurable:!0},action:{configurable:!0},active:{configurable:!0},disabled:{configurable:!0},ref:{configurable:!0}};function u(t,e){var n,i=t.get(e);if(i.open&&i.popout&&t.toggle(e+".open"),n=t.get(e+".items"))for(var r=0;r<n.length;r++)u(t,e+".items."+r)}function c(t){return void 0===t&&(t={}),function(e){e.instance.components[t.name||"menu"]=s}}f.keypath.get=function(){if(!this.removed){if(!this.parent)return"items."+this.menu.get("items").indexOf(this.item);var t=this.parent.keypath+".items";return t+"."+this.menu.get(t).indexOf(this.item)}},f.action.get=function(){if(!this.removed)return this.item.action},f.action.set=function(t){return this.set(".action",t)},f.active.get=function(){if(!this.removed){var t=this.item;return t.activeRef?this.menu.get(t.activeRef):"function"==typeof t.active?t.active():t.active}},f.active.set=function(t){if(!this.removed){var e=this.item;return e.activeRef?this.menu.set(e.activeRef,t):this.set(".active",t)}},f.disabled.get=function(){if(!this.removed)return this.get(".disabled")},f.disabled.set=function(t){if(!this.removed)return this.set(".disabled",t)},f.ref.get=function(){if(!this.removed)return this.item.ref},f.ref.set=function(t){return this.set(".ref",t)},a.prototype.addItem=function(t,e){if(this.removed)return!1;var n=this.keypath+".items";return"number"==typeof e?this.menu.splice(n,0,e,t):this.menu.push(n,t),new a(this.menu,this,t)},a.prototype.open=function(){if(this.removed)return!1;this.menu.set(this.keypath+".open",!0)},a.prototype.close=function(){if(this.removed)return!1;this.menu.set(this.keypath+".open",!1)},a.prototype.remove=function(){if(this.removed)return!1;var t=(this.parent?this.parent.keypath+".":"")+"items",e=this.menu.get(t);return this.menu.splice(t,e.indexOf(this.item),1),this.removed=!0,!0},a.prototype.get=function(t){if(this.removed)return!1;var e=t.replace(/^[\.\/]*/,"");return this.menu.get(this.keypath+"."+e)},a.prototype.set=function(t,e){if(this.removed)return!1;var n=t.replace(/^[\.\/]*/,"");return this.menu.set(this.keypath+"."+n,e)},Object.defineProperties(a.prototype,f),i("RMMenu","components",s),t.Menu=s,t.plugin=c,t.default=c,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],e):e(t.RMMenu={},t.Ractive)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n="undefined"!=typeof window?window:null;function i(t,e,i){if(n&&n.Ractive&&"object"==typeof n.Ractive[e]){var r=document.currentScript;if(r||(r=(r=document.querySelectorAll("script"))[r.length-1]),r){var o=r.getAttribute("data-alias");o&&(o=(o=o.split("&")).reduce(function(t,e){var n=e.split("="),i=n[0],r=n[1];return t[i]=r,t},{})),Ractive[e][o&&o[t]||t]=i}}}function r(t,e){var n=t.processParams(e,{duration:200,easing:"easeInOut"});t.setStyle("overflow","hidden");var i="x"===n.axis?"width":"height";if(t.isIntro){var r=t.getStyle(i);return t.setStyle(i,0),t.setStyle("opacity",0),t.animateStyle(i,r,n).then(function(){return t.animateStyle("opacity",1,n)})}return t.setStyle(i,t.getStyle(i)),t.setStyle("opacity",1),t.animateStyle("opacity",0,n).then(function(){return t.animateStyle(i,0,n)})}function o(t,e){function n(n){for(var i=n.target;i;){if(i===t)return!1;i=i.parentNode}e(n)}return document.body.addEventListener("click",n),document.body.addEventListener("touchstop",n),{teardown:function(){document.body.removeEventListener("click",n),document.body.removeEventListener("touchstop",n)}}}i("expand","transitions",r);var s=function(t){function e(e){t.call(this,opts),this.refs={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addItem=function(t,e){return"number"==typeof e?this.splice("items",e,0,t):this.push("items",t),new a(this,null,t)},e.prototype.visibleItems=function(t){var e=this;return t.filter(function(t){return!1!==t.condition&&("string"!=typeof t.condition||!1!==e.get(t.condition))}).length},e.prototype.getHandle=function(t){var e,n=this;if("string"==typeof t)if(this.refs[t])e=this.refs[t].ctx;else{var i=this.find(t);i&&(e=this.getContext(i))}else t&&t.parentNode?e=this.getContext(t):t&&t.decorators&&(e=t);if(e){for(var r=[e.get()],o="../../";""!==e.resolve(o);)r.unshift(e.get(o)),o+="../../";return r.reduce(function(t,e){return new a(n,t,e)},null)}},e.prototype.popAllIn=function(t){var e=(t=t||this.getContext()).get("items");t.get("open")&&t.set("open",!1);for(var n=t.resolve("items"),i=0;i<e.length;i++)u(this,n+"."+i)},e.prototype.popSiblingsIn=function(t){var e=t.resolve(),n=t.get("../");if(n)for(var i=0;i<n.length;i++)e!==t.resolve("../"+i)&&n[i].open&&n[i].popout&&t.toggle("../"+i+".open")},e.prototype._actioned=function(){this.fire("action"),this.popAllIn()},e.prototype._itemRendered=function(t){var e=this;return setTimeout(function(){return e.fire("item",t,e.getHandle(t))}),""},e.prototype.childActive=function(t){var e=this.get(t);if(e&&e.items)for(var n=0;n<e.items.length;n++)if(!0===this.get(t+".items."+n+".active")||"function"==typeof e.items[n].active&&e.items[n].active()||this.get(t+".items."+n+".activeRef")&&this.get(e.items[n].activeRef)||this.childActive(t+".items."+n))return!0},e}(e);e.extendWith(s,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-wrapper",g:1},{t:16,r:"extra-attributes"},{n:"class-rmenu-vertical",t:13,f:[{t:2,x:{r:["~/horizontal"],s:"!_0"}}]},{n:"class-rmenu-horizontal",t:13,f:[{t:2,r:"~/horizontal"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-inner",g:1}],f:[{t:8,r:"items"}]}]}]}],e:{"!_0":function(t){return!t},'_0&&(_1||_2==="section")':function(t,e,n){return t&&(e||"section"===n)},"_0?_3.active(_1.getHandle((_2))):_3.active()":function(t,e,n,i){return t?i.active(e.getHandle(n)):i.active()},'typeof _0==="function"':function(t){return"function"==typeof t},'typeof _0==="boolean"':function(t){return"boolean"==typeof t},"_0.childActive(_1)":function(t,e){return t.childActive(e)},"_0!=null":function(t){return null!=t},"[_0.action()]":function(t){return[t.action()]},"[_0._actioned()]":function(t){return[t._actioned()]},'[_0&&_1.popSiblingsIn((_2)),(_2).toggle(".open"),false]':function(t,e,n){return[t&&e.popSiblingsIn(n),n.toggle(".open"),!1]},"_0||(_1&&_2[_1])":function(t,e,n){return t||e&&n[e]},'[{axis:"x"}]':function(){return[{axis:"x"}]},"_2&&_0&&_1.visibleItems(_2)":function(t,e,n){return n&&t&&e.visibleItems(n)},'[(_0).toggle(".open"),false]':function(t){return[t.toggle(".open"),!1]},'!_0||_0==="item"':function(t){return!t||"item"===t},'_0==="section"':function(t){return"section"===t},'_0==="container"':function(t){return"container"===t},'(!_0||_0==="item")&&_1':function(t,e){return(!t||"item"===t)&&e},"[_0.popAllIn((_1))]":function(t,e){return[t.popAllIn(e)]},"[_0]":function(t){return[t]},'typeof _0==="string"':function(t){return"string"==typeof t},'_0||"item"':function(t){return t||"item"},"_0._itemRendered((_1))":function(t,e){return t._itemRendered(e)},'_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.condition())':function(t,e,n){return void 0===e||"boolean"==typeof e&&e||"string"==typeof e&&t[e]||"function"==typeof e&&n.condition()}},p:{container:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:3,r:".content"}]}],n:50,r:".pad"},{t:4,f:[{t:3,r:".content"}],n:51,l:1}],n:50,r:".content"},{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:16,r:".contentPartial"}]}],n:50,r:".pad"},{t:4,f:[{t:16,r:".contentPartial"}],n:51,l:1}],n:50,r:".contentPartial",l:1}],section:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1}],f:[{t:4,f:[{t:2,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}]}," ",{t:8,r:"children"}],children:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-items",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,x:{r:[".popout"],s:"!_0"}},{t:4,f:[{n:"pop",t:72,v:"t0"}],n:51,l:1}],f:[{t:8,r:"items"}]}],n:50,x:{r:[".items.length",".open",".type"],s:'_0&&(_1||_2==="section")'}}],item:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".activeRef"}]}}]}],n:50,r:".activeRef"},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:[".active.length","@this","@context","."],s:"_0?_3.active(_1.getHandle((_2))):_3.active()"}}]}],n:50,x:{r:[".active"],s:'typeof _0==="function"'},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,r:".active"}]}],n:50,x:{r:[".active"],s:'typeof _0==="boolean"'},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:["@this","@keypath"],s:"_0.childActive(_1)"}}]}],n:50,r:".popout",l:1},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,r:".disabled"}]}],n:50,x:{r:[".disabled"],s:"_0!=null"}},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".disabledRef"}]}}]}],n:50,r:".disabledRef",l:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-left",g:1}],f:[{t:3,r:".left"}]}],n:50,r:".left"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-left",g:1}],f:[{t:16,r:".leftPartial"}]}],n:50,r:".leftPartial",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1},{t:4,f:[{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{n:["click"],t:70,f:{r:["@this"],s:"[_0._actioned()]"}}],n:50,x:{r:[".action"],s:'typeof _0==="function"'}},{t:4,f:[{t:16,r:".actionPartial"},{n:["click"],t:70,f:{r:["@this"],s:"[_0._actioned()]"}}],n:50,r:".actionPartial",l:1},{t:4,f:[{n:["click"],t:70,f:{r:[".popout","@this","@context"],s:'[_0&&_1.popSiblingsIn((_2)),(_2).toggle(".open"),false]'}}],n:50,r:".items.length",l:1}],n:51,x:{r:[".disabled",".disabledRef","~/"],s:"_0||(_1&&_2[_1])"}}],f:[{t:4,f:[{t:3,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-right",g:1}],f:[{t:3,r:".right"}]}],n:50,r:".right"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-right",g:1}],f:[{t:16,r:".rightPartial"}]}],n:50,r:".rightPartial",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-expand",g:1},{n:["click"],t:70,f:{r:[".popout","@this","@context"],s:'[_0&&_1.popSiblingsIn((_2)),(_2).toggle(".open"),false]'}},{n:"expand",t:72,f:{r:[],s:'[{axis:"x"}]'},v:"t0"}]}],n:50,x:{r:[".items.length","@this",".items"],s:"_2&&_0&&_1.visibleItems(_2)"}}]}," ",{t:8,r:"children"}],items:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-popout-close",g:1},{n:["click"],t:70,f:{r:["@context"],s:'[(_0).toggle(".open"),false]'}}]}],n:50,r:".shrink"}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-entry",g:1},{t:4,f:[{n:"class-rmenu-item",t:13}],n:50,x:{r:[".type"],s:'!_0||_0==="item"'}},{t:4,f:[{n:"class-rmenu-section",t:13}],n:50,x:{r:[".type"],s:'_0==="section"'},l:1},{t:4,f:[{n:"class-rmenu-container",t:13}],n:50,x:{r:[".type"],s:'_0==="container"'},l:1},{n:"class-rmenu-expanded",t:13,f:[{t:2,r:".open"}]},{n:"class-rmenu-popout",t:13,f:[{t:2,x:{r:[".type",".popout"],s:'(!_0||_0==="item")&&_1'}}]},{t:4,f:[{n:"pop",t:72,v:"t0"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this","@context"],s:"[_0.popAllIn((_1))]"}}],n:50,r:".open"}],n:50,r:".popout"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:51,l:1},{t:4,f:[{t:8,r:".refPartial"}],n:50,r:".refPartial"},{t:4,f:[{n:"ref",t:71,f:{r:[".ref"],s:"[_0]"}}],n:50,x:{r:[".ref"],s:'typeof _0==="string"'},l:1},{t:4,f:[{t:16,r:".attrsPartial"}],n:50,r:".attrsPartial"}],f:[{t:8,x:{r:[".type"],s:'_0||"item"'}}," ",{t:4,f:[{t:2,x:{r:["@this","@context"],s:"_0._itemRendered((_1))"}}],n:50,x:{r:[".type"],s:'!_0||_0==="item"'}}]}],n:50,x:{r:["~/",".condition","."],s:'_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.condition())'}}],n:52,r:".items"}]}},css:function(t){return[function(t){var e=Object.assign({},t("raui.primary"),t("raui.menu.primary"));return"\n .rmenu-wrapper {\n position: relative;\n z-index: 1;\n }\n .rmenu-wrapper.rmenu-vertical {\n min-height: 100%;\n }\n .rmenu {\n "+(t("raui.menu.font")?"font-family: "+t("raui.menu.font")+";":"")+"\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fga||"#222")+";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n .rmenu-wrapper.alt > .rmenu {\n color: "+(e.fga||"#222")+";\n background-color: "+(e.bg||"#fff")+";\n }\n .rmenu-inner {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n }\n .rmenu-item {\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n transition: border 0.2s ease-in-out;\n }\n .rmenu-disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .rmenu-expanded {\n border-top: 0.0625em solid "+(e.bc||"#ccc")+";\n border-bottom: 0.0625em solid "+(e.bc||"#ccc")+";\n }\n .rmenu-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n user-select: none;\n transition: 0.3s ease-in-out;\n transition-property: color, background-color;\n display: flex;\n align-items: center;\n padding: 0.2em 0;\n min-height: 2em;\n }\n .rmenu-main.rmenu-active {\n color: "+(e.fga||"#07e")+";\n background-color: "+(e.bg||"#fff")+";\n }\n .rmenu-popout .rmenu-entry .rmenu-main.rmenu-active {\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fg||"#222")+";\n }\n .rmenu-wrapper.alt .rmenu-main.rmenu.active {\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fga||"#07e")+";\n }\n \n .rmenu-items {\n display: block;\n }\n .rmenu-right {\n padding-right: 0.4em; \n }\n .rmenu-left {\n padding-left: 0.4em;\n }\n .rmenu-expand {\n width: 1.5em;\n height: 1.5em;\n padding-left: 0.5em;\n cursor: pointer;\n position: relative;\n }\n .rmenu-expand:before {\n position: absolute;\n display: inline-block;\n top: 0.25em;\n content: ' ';\n transform: rotate(45deg);\n transition: transform 0.2s ease-in-out, top 0.2s ease-in-out, left 0.2s ease-in-out;\n box-sizing: border-box;\n border-width: 0.25em;\n border-style: solid;\n border-left-color: transparent;\n border-top-color: transparent;\n }\n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n top: -0.25em;\n }\n \n .rmenu-popout > .rmenu-items {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: "+(e.bg||"#fff")+";\n color: "+(e.fg||"#222")+";\n box-sizing: border-box;\n border: 1px solid;\n z-index: -1;\n transition: box-shadow 0.2s ease-in-out;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items {\n left: 100%;\n z-index: initial;\n box-shadow: 0.2em 0 0.2em rgba(0, 0, 0, 0.2);\n }\n \n .rmenu-popout > .rmenu-items.rmenu-shrink {\n left: 100%;\n z-index: 1;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items.rmenu-shrink {\n left: 0;\n }\n \n .rmenu-popout > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-45deg);\n top: 0.4em;\n }\n \n .rmenu-popout.rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(135deg);\n left: 0.75em;\n }\n \n .rmenu-popout > .rmenu-items .rmenu-popout > .rmenu-items {\n height: calc(100% + 2px);\n width: calc(100% + 1px);\n top: -1px;\n }\n \n .rmenu-popout-close:after {\n color: "+(e.bc||"#ccc")+";\n content: '\\274c Close';\n display: block;\n padding: 0.5em 0.5em 0.1em 0.5em;\n }\n \n .rmenu-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0 0.5em;\n flex-grow: 1;\n }\n .rmenu-disabled > .rmenu-title {\n cursor: not-allowed;\n }\n .rmenu-item h1, .rmenu-item h2, .rmenu-item h3, .rmenu-item h4 {\n margin: 0;\n }\n \n .rmenu-section {\n padding: 0.75em 0;\n }\n .rmenu-section > .rmenu-main {\n cursor: default;\n font-size: 0.75em;\n opacity: 0.7;\n margin-bottom: 0.25em;\n }\n \n .rmenu-container {\n box-sizing: border-box;\n }\n \n .rmenu-container-pad {\n padding: 0.3em 0.3em 0.8em 0.3em;\n }\n \n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-135deg);\n top: 0.5em;\n }\n "}.call(this,t)].join(" ")},cssId:"menu",noCssTransform:!0,noIntro:!0,nestedTransitions:!1,on:{construct:function(){var t=this.component;if(!t)return;var e=t.template.f||[],n=t.template.m?t.template.m.slice():[],i=t.template;t.template={e:i.e,f:i.f,t:i.t,m:n};var r=[];e.forEach(function(t){var e=function t(e){if("item"!==e.e&&"section"!==e.e&&"container"!==e.e)return;var i={};var r=[];var o;"item"!==e.e&&(i.type=e.e);e.m&&e.m.forEach(function(t){if("title"===t.n)"string"==typeof t.f?i.title=t.f:i.titlePartial={t:t.f};else if(70===t.t&&"action"===t.n[0])i.actionPartial={t:[{n:["click"],f:t.f,t:t.t}]};else if("guard"===t.n&&t.f&&1===t.f.length&&2===t.f[0].t){var o="_cnd"+n.length;i.condition=o,n.push({t:13,n:o,f:t.f})}else if("ref"===t.n){if("string"==typeof t.f)i.ref=t.f;else if(t.f&&1===t.f.length&&2===t.f[0].t){var s="_cnd"+n.length;n.push({t:13,n:s,f:t.f}),i.refPartials={t:[{t:71,n:"ref",f:{r:s,s:"[_0]"}}]}}}else if("active"===t.n){if(t.f&&1===t.f.length&&2===t.f[0].t){var a="_cnd"+n.length;i.activeRef=a,n.push({t:13,n:a,f:t.f})}}else if("open"===t.n)i.open=!0;else if("popout"===t.n)i.popout=!0;else if("container"===e.e&&"pad"===t.n)i.pad=!0;else if("disabled"===t.n)if(t.f&&1===t.f.length&&2===t.f[0].t){var f="_cnd"+n.length;i.disabledRef=f,n.push({t:13,n:f,f:t.f})}else 0===t.f&&(i.disabled=!0);else r.push(t)});r.length&&(i.attrsPartial={t:r});if("container"===e.e)return i.contentPartial={t:e.f},i.attrsPartial=r,i;e.f&&e.f.forEach(function(e){if("title"===e.e)1===e.f.length&&"string"==typeof e.f[0]?i.title=e.f[0]:i.titlePartial={t:e.f};else if("item"===e.e||"section"===e.e||"container"===e.e){var n=t(e);n&&(i.items||(i.items=[])).push(n)}else"left"===e.e?i.leftPartial={t:e.f}:"right"===e.e?i.rightPartial={t:e.f}:(o||(o=[]),o.push(e))});!i.titlePartial&&o&&(i.titlePartial={t:o});o=null;return i}(t);e&&r.push(e)}),this._items=r},config:function(){this._items&&this.set("items",(this.get("items")||[]).concat(this._items),{shuffle:!0})}},attributes:[],use:[function(t){return void 0===t&&(t={}),function(e){e.instance.transitions[t.name||"expand"]=r}}(),function(t){return void 0===t&&(t={}),function(e){e.instance.events[t.name||"clickout"]=o}}()],decorators:{ref:function(t,e){var n=this,i=e;n.refs||(n.refs={});var r={update:function(t){n.refs[i]===r&&delete n.refs[i],i=t,n.refs[i]=r},teardown:function(){n.refs[i]===r&&delete n.refs[i]}};return r.ctx=n.getContext(t),n.refs[i]=r,r}},transitions:{pop:function(t,e){var n,i=this,r=t.processParams(e,{duration:200,easing:"easeInOut"});if(t.isIntro){var o=t.node.getBoundingClientRect();function s(){for(var e=t.node.parentNode;e&&e.classList;){if(e.classList.contains("rmenu"))return e;if(e.parentNode.classList.contains("rmenu-popout"))return e;e=e.parentNode}}o.left+o.width>window.innerWidth?(t.node.classList.add("rmenu-shrink"),n=!0,setTimeout(function(){return i.getContext(t.node).set(".shrink",!0)}),s().style.overflowX="hidden"):t.node.classList.contains("rmenu-shrink")?(setTimeout(function(){return i.getContext(t.node).set(".shrink",!1)}),s().style.overflowX=""):s().style.overflowX=""}else n=t.node.classList.contains("rmenu-shrink");return t.isIntro?n?(t.setStyle("left","100%"),t.animateStyle("left",0,r)):(t.setStyle("left",0),t.setStyle("z-index",-1),t.animateStyle("left","100%",r)):n?(t.setStyle("left",0),t.animateStyle("left","100%",r)):(t.setStyle("left","100%"),t.setStyle("z-index",-1),t.animateStyle("left",0,r))}}});var a=function(t,e,n){this.menu=t,this.parent=e,this.item=n},f={keypath:{configurable:!0},action:{configurable:!0},active:{configurable:!0},disabled:{configurable:!0},ref:{configurable:!0}};function u(t,e){var n,i=t.get(e);if(i.open&&i.popout&&t.toggle(e+".open"),n=t.get(e+".items"))for(var r=0;r<n.length;r++)u(t,e+".items."+r)}function c(t){return void 0===t&&(t={}),function(e){e.instance.components[t.name||"menu"]=s}}f.keypath.get=function(){if(!this.removed){if(!this.parent)return"items."+this.menu.get("items").indexOf(this.item);var t=this.parent.keypath+".items";return t+"."+this.menu.get(t).indexOf(this.item)}},f.action.get=function(){if(!this.removed)return this.item.action},f.action.set=function(t){return this.set(".action",t)},f.active.get=function(){if(!this.removed){var t=this.item;return t.activeRef?this.menu.get(t.activeRef):"function"==typeof t.active?t.active():t.active}},f.active.set=function(t){if(!this.removed){var e=this.item;return e.activeRef?this.menu.set(e.activeRef,t):this.set(".active",t)}},f.disabled.get=function(){if(!this.removed)return this.get(".disabled")},f.disabled.set=function(t){if(!this.removed)return this.set(".disabled",t)},f.ref.get=function(){if(!this.removed)return this.item.ref},f.ref.set=function(t){return this.set(".ref",t)},a.prototype.addItem=function(t,e){if(this.removed)return!1;var n=this.keypath+".items";return"number"==typeof e?this.menu.splice(n,0,e,t):this.menu.push(n,t),new a(this.menu,this,t)},a.prototype.open=function(){if(this.removed)return!1;this.menu.set(this.keypath+".open",!0)},a.prototype.close=function(){if(this.removed)return!1;this.menu.set(this.keypath+".open",!1)},a.prototype.remove=function(){if(this.removed)return!1;var t=(this.parent?this.parent.keypath+".":"")+"items",e=this.menu.get(t);return this.menu.splice(t,e.indexOf(this.item),1),this.removed=!0,!0},a.prototype.get=function(t){if(this.removed)return!1;var e=t.replace(/^[\.\/]*/,"");return this.menu.get(this.keypath+"."+e)},a.prototype.set=function(t,e){if(this.removed)return!1;var n=t.replace(/^[\.\/]*/,"");return this.menu.set(this.keypath+"."+n,e)},Object.defineProperties(a.prototype,f),i("RMMenu","components",s),t.Menu=s,t.plugin=c,t.default=c,Object.defineProperty(t,"__esModule",{value:!0})});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc