Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@evs-chris/raui

Package Overview
Dependencies
Maintainers
1
Versions
173
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.15.4 to 0.15.5

es/Autocomplete.min.sync-conflict-20240228-141909-2YGRTMT.js

4

es/Popover.js

@@ -189,3 +189,3 @@ import Ractive from 'ractive';

if (mobilePopped) { return mobilePop.find(pattern); }
else { return this.find(pattenr); }
else { return this.find(pattern); }
};

@@ -195,3 +195,3 @@

if (mobilePopped) { return mobilePop.findAll(pattern); }
else { return this.findAll(pattenr); }
else { return this.findAll(pattern); }
};

@@ -198,0 +198,0 @@

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

import Ractive from"ractive";import pop from"./transition-pop";import clickout from"./event-clickout";import fade from"./transition-fade";var template={v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-wrapper",g:1},{n:"class-rpop-with-tail",t:13,f:[{t:2,r:"position.tail"}]},{n:"class",f:["rpop-",{t:2,x:{r:["where"],s:'_0||"below"'}}," rpop-align-",{t:2,x:{r:["align"],s:'_0||"middle"'}}],t:13},{t:4,f:[{n:"style-top",f:[{t:2,r:"position.popTop"},"px"],t:13},{n:"style-left",f:[{t:2,r:"position.popLeft"},"px"],t:13}],n:50,r:"position"},{t:4,f:[{t:4,f:[{n:"style-top",f:[{t:2,r:"top"}],t:13}],n:50,r:"top"},{t:4,f:[{n:"style-left",f:[{t:2,r:"left"}],t:13}],n:50,r:"left"}],n:51,l:1},{n:"pop",t:72,f:{r:["where"],s:'[{dir:_0||"below"}]'},v:"t2"},{n:"cleanup",t:71},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:50,r:"clickClose"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:51,r:"noClickout"},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail-outer",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}],n:50,r:"~/tail"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1}],f:[{t:16,r:"content",z:[{n:"trigger",x:{r:"triggerContext"}}]}]}]}],n:50,r:"__popped"}],e:{'_0||"below"':function(_0){return _0||"below"},'_0||"middle"':function(_0){return _0||"middle"},'[{dir:_0||"below"}]':function(_0){return[{dir:_0||"below"}]},'[_0.set("popped",false)]':function(_0){return[_0.set("popped",false)]},"_0+(_1?3:0)":function(_0,_1){return _0+(_1?3:0)},"_0!=null":function(_0){return _0!=null},"_0+(_1?0:3)":function(_0,_1){return _0+(_1?0:3)},"_0-2":function(_0){return _0-2},"[{delay:200}]":function(){return[{delay:200}]},"[_0===_1&&_2.done(),true]":function(_0,_1,_2){return[_0===_1&&_2.done(),true]},"[_0.done()]":function(_0){return[_0.done()]},true:function(){return true}},p:{modal:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-modal",g:1},{n:"fade",t:72,v:"t1"},{n:"fade",t:72,f:{r:[],s:"[{delay:200}]"},v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["@node","@event.target","."],s:"[_0===_1&&_2.done(),true]"}}],n:51,r:".noClickout"}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1},{n:"pop",t:72,f:{r:[],s:"[{delay:200}]"},v:"t1"},{n:"pop",t:72,v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.done()]"}}],n:50,r:".clickClose"},{t:8,r:".attrs",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}],f:[{t:8,r:".content",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}]}]}],n:54,r:"contents.0"}],n:50,r:"contents.length"}]}};function noop(){}var source,tailSource,mobilePopped,mobilePop;export var Popover=function(Ractive){function Popover(opts){Ractive.call(this,opts)}if(Ractive)Popover.__proto__=Ractive;Popover.prototype=Object.create(Ractive&&Ractive.prototype);Popover.prototype.constructor=Popover;Popover.prototype.position=function position(node){var source=node||this.source;var popped=this.get("popped");if(!source||!popped){return}var wrapper=this.find("div");if(source&&wrapper&&wrapper.offsetParent){if(source){this.set("triggerContext",Ractive.getContext(source))}else{this.set("triggerContext",null)}var parent=wrapper.offsetParent;var offset=parent.getBoundingClientRect();var local=wrapper.getBoundingClientRect();var target=source.getBoundingClientRect();var where=this.get("where")||"below";var align=this.get("align")||"middle";var tail=this.get("tail");var vert=where==="above"||where==="below";var fit=this.get("fit");var gap=this.get("gap");var offx=where==="above"||where==="below"?0:where==="left"?-local.width-gap:target.width+gap;var offy=where==="left"||where==="right"?-target.height:where==="above"?-target.height-local.height-gap:gap;if(align==="middle"){if(where==="below"||where==="above"){offx-=(local.width-target.width)/2}else if(where==="left"||where==="right"){offy-=(local.height-target.height)/2}}else if(align==="end"){if(where==="below"||where==="above"){offx+=target.width-local.width}else if(where==="left"||where==="right"){offy+=target.height-local.height}}var pos={popTop:target.bottom-offset.top+offy,popLeft:target.left-offset.left+offx,tail:tail,vert:where==="above"||where==="below"};if(parent.scrollTop){pos.popTop+=parent.scrollTop}if(parent.scrollLeft){pos.popLeft+=parent.scrollLeft}if(tail){if(where==="above"){pos.tailBottom=-10}else if(where==="below"){pos.tailTop=-10}else if(where==="left"){pos.tailRight=-10}else if(where==="right"){pos.tailLeft=-10}var tailTarget=this.tailSource?this.tailSource.getBoundingClientRect():target;if(align==="start"){if(vert){pos.tailLeft=Math.floor(tailTarget.width/2)-10}else{pos.tailTop=Math.floor(tailTarget.height/2)-10}}else if(align==="end"){if(vert){pos.tailRight=Math.floor(tailTarget.width/2)-10}else{pos.tailBottom=Math.floor(tailTarget.height/2)-10}}else if(align==="middle"){if(vert){pos.tailLeft=Math.floor(tailTarget.width/2)-10}else{pos.tailTop=Math.floor(tailTarget.height/2)-10}}if(tailTarget!==target){if(vert){if(pos.tailLeft!=null){pos.tailLeft+=tailTarget.left-target.left}if(pos.tailRight!=null){pos.tailRight+=target.right-tailTarget.right}}else{if(pos.tailTop!=null){pos.tailTop+=tailTarget.top-target.top}if(pos.tailBottom!=null){pos.tailBottom+=target.bottom-tailTarget.bottom}}}else if(align==="middle"){if(vert){if(pos.tailLeft!=null){pos.tailLeft+=tailTarget.left-(pos.popLeft+offset.left)}if(pos.tailRight!=null){pos.tailRight+=pos.popLeft+offset.left+local.width-tailTarget.right}}else{if(pos.tailTop!=null){pos.tailTop+=tailTarget.top-(pos.popTop+offset.top)}if(pos.tailBottom!=null){pos.tailBottom+=pos.popTop+offset.top+local.height-tailTarget.bottom}}}}if(fit){var el=parent;if(this.get("offsets")){var i=this.get("offsets");while(i--){el=el.offsetParent}}var owidth=parent.scrollWidth;var oheight=parent.scrollHeight;if(pos.popLeft+local.width>owidth){var diff=pos.popLeft-(owidth-local.width);pos.popLeft-=diff;if(vert&&pos.tailLeft){pos.tailLeft+=diff}if(vert&&pos.tailRight){pos.tailRight-=diff}if(tail&&!vert){pos.tail=false}}if(pos.popLeft<0){var diff$1=-1*pos.popLeft;pos.popLeft+=diff$1;if(vert&&pos.tailLeft){pos.tailLeft-=diff$1}if(vert&&pos.tailRight){pos.tailRight+=diff$1}if(tail&&!vert){pos.tail=false}}if(pos.popTop+local.height>oheight){var diff$2=pos.popTop-(oheight-local.height);pos.popTop-=diff$2;if(!vert&&pos.tailTop){pos.tailTop+=diff$2}if(!vert&&pos.tailBottom){pos.tailBottom-=diff$2}if(tail&&vert){pos.tail=false}}if(pos.popTop<0){var diff$3=-1*pos.popTop;pos.popTop+=diff$3;if(!vert&&pos.tailTop){pos.tailTop-=diff$3}if(!vert&&pos.tailBottom){pos.tailBottom+=diff$3}if(tail&&vert){pos.tail=false}}}if(offset.left+pos.popLeft<0){var diff$4=0-(offset.left+pos.popLeft);pos.popLeft+=diff$4;if(vert&&pos.tailLeft){pos.tailLeft-=diff$4}if(vert&&pos.tailRight){pos.tailRight+=diff$4}if(tail&&!vert){pos.tail=false}}if(offset.top+pos.popTop<0){var diff$5=0-(offset.top+pos.popTop);pos.popTop+=diff$5;if(!vert&&pos.tailTop){pos.tailTop-=diff$5}if(!vert&&pos.tailBottom){pos.tailBottom+=diff$5}if(tail&&vert){pos.tail=false}}if(pos.tailLeft){pos.tailLeft=Math.floor(pos.tailLeft)}if(pos.tailRight){pos.tailRight=Math.floor(pos.tailRight)}if(pos.tailTop){pos.tailTop=Math.floor(pos.tailTop)}if(pos.tailBottom){pos.tailBottom=Math.floor(pos.tailBottom)}this.set("position",pos)}else{this.set("position",null)}};Popover.prototype.show=function show(node){this.source=node;this.set("popped",true);return this._transdone};Popover.prototype.hide=function hide(){this.set("popped",false);return this._transdone};Popover.prototype.popFind=function popFind(pattern){if(mobilePopped){return mobilePop.find(pattern)}else{return this.find(pattenr)}};Popover.prototype.popFindAll=function popFindAll(pattern){if(mobilePopped){return mobilePop.findAll(pattern)}else{return this.findAll(pattenr)}};return Popover}(Ractive);Ractive.extendWith(Popover,{attributes:["popped","tail","where","align","top","left","fit","clickClose","noClickout","gap","offsets"],use:[pop(),clickout(),fade()],template:template,css:function(data){return[function(data){var primary=Object.assign({},data("raui.primary"),data("raui.pop.primary"));var themes=(data("raui.themes")||[]).slice();(data("raui.pop.themes")||[]).forEach(function(t){if(!~themes.indexOf(t)){themes.push(t)}});return"\n .rpop-wrapper {\n position: absolute;\n display: inline-block;\n z-index: 21;\n transition-property: top, left, padding;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-with-tail.rpop-above {\n padding-bottom: 10px;\n }\n .rpop-with-tail.rpop-below {\n padding-top: 10px;\n }\n .rpop-with-tail.rpop-left {\n padding-right: 10px;\n }\n .rpop-with-tail.rpop-right {\n padding-left: 10px;\n }\n \n .rpop {\n position: relative;\n box-shadow: 0 1px 4px 0 rgba(0,0,0,0.24);\n border: 1px solid #ccc;\n border-radius: 0.2em;\n background-color: "+(primary.bg||"#fff")+";\n color: "+(primary.fg||"#222")+";\n padding: 0.5em;\n z-index: 2;\n }\n \n .rpop-modal {\n position: fixed;\n display: flex;\n z-index: 20;\n background-color: rgba(0, 0, 0, 0.2);\n align-items: center;\n justify-content: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 1em;\n overflow: auto;\n }\n \n .rpop-tail, .rpop-tail-outer {\n z-index: 3;\n width: 0;\n height: 0;\n position: absolute;\n border-style: solid;\n border-width: 10px;\n border-color: transparent;\n transition-property: top, left, bottom, right, border-color;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-tail-outer {\n z-index: 1;\n border-width: 12px;\n border-color: transparent;\n }\n \n .rpop-below .rpop-tail {\n border-bottom-color: "+(primary.bg||"#fff")+";\n }\n .rpop-below .rpop-tail-outer {\n border-bottom-color: "+(primary.bc||"#ccc")+";\n }\n \n .rpop-above .rpop-tail {\n border-top-color: "+(primary.bg||"#fff")+";\n }\n .rpop-above .rpop-tail-outer {\n border-top-color: "+(primary.bc||"#ccc")+";\n }\n \n .rpop-left .rpop-tail {\n border-left-color: "+(primary.bg||"#fff")+";\n }\n .rpop-left .rpop-tail-outer {\n border-left-color: "+(primary.bc||"#ccc")+";\n }\n \n .rpop-right .rpop-tail {\n border-right-color: "+(primary.bg||"#fff")+";\n }\n .rpop-right .rpop-tail-outer {\n border-right-color: "+(primary.bc||"#ccc")+";\n }\n "+themes.map(function(t){var theme=Object.assign({},data("raui.primary"),data("raui.pop.primary"),data("raui."+t),data("raui.pop."+t));return"\n ."+t+" .rpop {\n background-color: "+(theme.bg||"#fff")+";\n color: "+(theme.fg||"#222")+";\n }\n \n ."+t+".rpop-below .rpop-tail {\n border-bottom-color: "+(theme.bg||"#fff")+";\n }\n ."+t+".rpop-below .rpop-tail-outer {\n border-bottom-color: "+(theme.bc||"#ccc")+";\n }\n \n ."+t+".rpop-above .rpop-tail {\n border-top-color: "+(theme.bg||"#fff")+";\n }\n ."+t+".rpop-above .rpop-tail-outer {\n border-top-color: "+(theme.bc||"#ccc")+";\n }\n \n ."+t+".rpop-left .rpop-tail {\n border-left-color: "+(theme.bg||"#fff")+";\n }\n ."+t+".rpop-left .rpop-tail-outer {\n border-left-color: "+(theme.bc||"#ccc")+";\n }\n \n ."+t+".rpop-right .rpop-tail {\n border-right-color: "+(theme.bg||"#fff")+";\n }\n ."+t+".rpop-right .rpop-tail-outer {\n border-right-color: "+(theme.bc||"#ccc")+";\n }\n "})}.call(this,data)].join(" ")},cssId:"rpop",noCssTransform:true,observe:{popped:function popped(v){var this$1=this;if(v){if(source){this.source=source}if(tailSource){this.tailSource=tailSource}}var ok;var done=this._transdone=new Promise(function(o){return ok=o});done.resolve=ok;setTimeout(function(){this$1._transdone=done;if(this$1.get("popped")===v){this$1.set("_popped",v)}},1)},_popped:{handler:function handler(v){var this$1=this;var done=this._transdone.resolve;if(v){var mobile=this.get("@style.raui.pop.mobile");if(mobile&&window.matchMedia("(max-width: "+mobile+")").matches){if(!mobilePop){mobilePop=new MobilePop({target:document.body,append:true})}var context=this.getContext().getParent(true);context.isContext=1;this.set("__popped",false).then(done);mobilePop.unshift("contents",{content:this.partials.content,context:context,attrs:this.partials["extra-attributes"]||[],clickClose:this.get("clickClose"),noClickout:this.get("noClickout"),done:function(){this$1.set("popped",false)}})}else{this.set("__popped",true)}}else{if(mobilePopped){mobilePop.shift("contents");done()}else{this.set("__popped",false).then(done)}}},defer:true,init:false},__popped:{handler:function handler(v){var done=this._transdone.resolve;if(v){var el=this.find("div");var node=el;var h=node.offsetHeight+node.offsetTop;var w=node.offsetWidth+node.offsetLeft;var offset=node.offsetParent;if(!this.overflows){var o=this.overflows={e:[],v:[]};while(el&&el.style){if(el===offset){if(el.offsetWidth>=w&&el.offsetHeight>=h){break}else{w+=el.offsetLeft;h+=el.offsetTop;offset=el.offsetParent}}var css=getComputedStyle(el);if(css.overflow==="auto"){break}if(css.overflow==="hidden"){o.e.push(el);o.v.push(el.style.overflow);el.style.overflow="visible"}el=el.parentNode}}this.position();this.transition("pop",node,{intro:true,dir:this.get("where")||"below"}).then(done)}else{this.source=null;this.tailSource=null}},defer:true,init:false},"align where tail fit":{handler:function handler(){this.position()},defer:true}},decorators:{cleanup:function cleanup(node){var pop=this;return{teardown:function teardown(){var o=pop.overflows;if(o){pop.overflows=null;for(var i=0;i<o.e.length;i++){o.e[i].style.overflow=o.v[i]}}}}}},data:function data(){return{gap:4}}});export function trigger(options){if(options===void 0)options={};return function(ref){var instance=ref.instance;instance.decorators[options.name||"pop"]=function(node,path,opts){if(opts===void 0)opts={};if(!path){return{teardown:noop}}if(typeof path==="string"){opts.path=path}else if(typeof path==="object"){opts=path}var ctx=this.getContext(node);var clicked,hover;function listener(ev){if(ev.type==="mouseover"&&ctx.get(path)){return}if(ev.type!=="click"||!hover||clicked){var init=source;var initTail=tailSource;source=opts.node||node;if(typeof source==="function"){source=source()}source=source||node;tailSource=opts.tail;if(typeof tailSource==="function"){tailSource=tailSource()}ctx.toggle(opts.path);source=init;tailSource=initTail}if(hover&&ev.type==="click"){clicked=ctx.observeOnce(opts.path,function(){clicked=null})}}function out(ev){if(!clicked){ctx.set(opts.path,false)}}if("click"in opts?opts.click:options.click!==false){ctx.listen("click",listener)}if("hover"in opts?opts.hover:options.hover){hover=1;ctx.listen("mouseover",listener);ctx.listen("mouseout",out)}return{teardown:function teardown(){ctx.unlisten("click",listener);if(hover){ctx.unlisten("mouseover",listener);ctx.unlisten("mouseout",out);if(clicked){clicked.cancel()}}}}}}}var MobilePop=function(Ractive){function MobilePop(opts){Ractive.call(this,opts)}if(Ractive)MobilePop.__proto__=Ractive;MobilePop.prototype=Object.create(Ractive&&Ractive.prototype);MobilePop.prototype.constructor=MobilePop;return MobilePop}(Ractive);Ractive.extendWith(MobilePop,{template:{v:template.v,t:template.p.modal},data:function data(){return{contents:[]}},use:[pop(),fade()],observe:{contents:function contents(v){mobilePopped=(v||[]).length>0}},on:{init:function init(){if(mobilePop){console.warn("More than one PopOver mobile host created.")}else{mobilePop=this}}}});export default function plugin(options){if(options===void 0)options={};return function(ref){var instance=ref.instance;instance.components[options.name||"pop"]=Popover;instance.components[options.mobileName||"mobile-pop"]=MobilePop;var opts=Object.assign({},options);opts.name=opts.trigger||opts.name;trigger(opts)({instance:instance})}}
import Ractive from"ractive";import pop from"./transition-pop";import clickout from"./event-clickout";import fade from"./transition-fade";var template={v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-wrapper",g:1},{n:"class-rpop-with-tail",t:13,f:[{t:2,r:"position.tail"}]},{n:"class",f:["rpop-",{t:2,x:{r:["where"],s:'_0||"below"'}}," rpop-align-",{t:2,x:{r:["align"],s:'_0||"middle"'}}],t:13},{t:4,f:[{n:"style-top",f:[{t:2,r:"position.popTop"},"px"],t:13},{n:"style-left",f:[{t:2,r:"position.popLeft"},"px"],t:13}],n:50,r:"position"},{t:4,f:[{t:4,f:[{n:"style-top",f:[{t:2,r:"top"}],t:13}],n:50,r:"top"},{t:4,f:[{n:"style-left",f:[{t:2,r:"left"}],t:13}],n:50,r:"left"}],n:51,l:1},{n:"pop",t:72,f:{r:["where"],s:'[{dir:_0||"below"}]'},v:"t2"},{n:"cleanup",t:71},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:50,r:"clickClose"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:51,r:"noClickout"},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail-outer",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}],n:50,r:"~/tail"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1}],f:[{t:16,r:"content",z:[{n:"trigger",x:{r:"triggerContext"}}]}]}]}],n:50,r:"__popped"}],e:{'_0||"below"':function(_0){return _0||"below"},'_0||"middle"':function(_0){return _0||"middle"},'[{dir:_0||"below"}]':function(_0){return[{dir:_0||"below"}]},'[_0.set("popped",false)]':function(_0){return[_0.set("popped",false)]},"_0+(_1?3:0)":function(_0,_1){return _0+(_1?3:0)},"_0!=null":function(_0){return _0!=null},"_0+(_1?0:3)":function(_0,_1){return _0+(_1?0:3)},"_0-2":function(_0){return _0-2},"[{delay:200}]":function(){return[{delay:200}]},"[_0===_1&&_2.done(),true]":function(_0,_1,_2){return[_0===_1&&_2.done(),true]},"[_0.done()]":function(_0){return[_0.done()]},true:function(){return true}},p:{modal:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-modal",g:1},{n:"fade",t:72,v:"t1"},{n:"fade",t:72,f:{r:[],s:"[{delay:200}]"},v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["@node","@event.target","."],s:"[_0===_1&&_2.done(),true]"}}],n:51,r:".noClickout"}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1},{n:"pop",t:72,f:{r:[],s:"[{delay:200}]"},v:"t1"},{n:"pop",t:72,v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.done()]"}}],n:50,r:".clickClose"},{t:8,r:".attrs",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}],f:[{t:8,r:".content",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}]}]}],n:54,r:"contents.0"}],n:50,r:"contents.length"}]}};function noop(){}var source,tailSource,mobilePopped,mobilePop;export var Popover=function(Ractive){function Popover(opts){Ractive.call(this,opts)}if(Ractive)Popover.__proto__=Ractive;Popover.prototype=Object.create(Ractive&&Ractive.prototype);Popover.prototype.constructor=Popover;Popover.prototype.position=function position(node){var source=node||this.source;var popped=this.get("popped");if(!source||!popped){return}var wrapper=this.find("div");if(source&&wrapper&&wrapper.offsetParent){if(source){this.set("triggerContext",Ractive.getContext(source))}else{this.set("triggerContext",null)}var parent=wrapper.offsetParent;var offset=parent.getBoundingClientRect();var local=wrapper.getBoundingClientRect();var target=source.getBoundingClientRect();var where=this.get("where")||"below";var align=this.get("align")||"middle";var tail=this.get("tail");var vert=where==="above"||where==="below";var fit=this.get("fit");var gap=this.get("gap");var offx=where==="above"||where==="below"?0:where==="left"?-local.width-gap:target.width+gap;var offy=where==="left"||where==="right"?-target.height:where==="above"?-target.height-local.height-gap:gap;if(align==="middle"){if(where==="below"||where==="above"){offx-=(local.width-target.width)/2}else if(where==="left"||where==="right"){offy-=(local.height-target.height)/2}}else if(align==="end"){if(where==="below"||where==="above"){offx+=target.width-local.width}else if(where==="left"||where==="right"){offy+=target.height-local.height}}var pos={popTop:target.bottom-offset.top+offy,popLeft:target.left-offset.left+offx,tail:tail,vert:where==="above"||where==="below"};if(parent.scrollTop){pos.popTop+=parent.scrollTop}if(parent.scrollLeft){pos.popLeft+=parent.scrollLeft}if(tail){if(where==="above"){pos.tailBottom=-10}else if(where==="below"){pos.tailTop=-10}else if(where==="left"){pos.tailRight=-10}else if(where==="right"){pos.tailLeft=-10}var tailTarget=this.tailSource?this.tailSource.getBoundingClientRect():target;if(align==="start"){if(vert){pos.tailLeft=Math.floor(tailTarget.width/2)-10}else{pos.tailTop=Math.floor(tailTarget.height/2)-10}}else if(align==="end"){if(vert){pos.tailRight=Math.floor(tailTarget.width/2)-10}else{pos.tailBottom=Math.floor(tailTarget.height/2)-10}}else if(align==="middle"){if(vert){pos.tailLeft=Math.floor(tailTarget.width/2)-10}else{pos.tailTop=Math.floor(tailTarget.height/2)-10}}if(tailTarget!==target){if(vert){if(pos.tailLeft!=null){pos.tailLeft+=tailTarget.left-target.left}if(pos.tailRight!=null){pos.tailRight+=target.right-tailTarget.right}}else{if(pos.tailTop!=null){pos.tailTop+=tailTarget.top-target.top}if(pos.tailBottom!=null){pos.tailBottom+=target.bottom-tailTarget.bottom}}}else if(align==="middle"){if(vert){if(pos.tailLeft!=null){pos.tailLeft+=tailTarget.left-(pos.popLeft+offset.left)}if(pos.tailRight!=null){pos.tailRight+=pos.popLeft+offset.left+local.width-tailTarget.right}}else{if(pos.tailTop!=null){pos.tailTop+=tailTarget.top-(pos.popTop+offset.top)}if(pos.tailBottom!=null){pos.tailBottom+=pos.popTop+offset.top+local.height-tailTarget.bottom}}}}if(fit){var el=parent;if(this.get("offsets")){var i=this.get("offsets");while(i--){el=el.offsetParent}}var owidth=parent.scrollWidth;var oheight=parent.scrollHeight;if(pos.popLeft+local.width>owidth){var diff=pos.popLeft-(owidth-local.width);pos.popLeft-=diff;if(vert&&pos.tailLeft){pos.tailLeft+=diff}if(vert&&pos.tailRight){pos.tailRight-=diff}if(tail&&!vert){pos.tail=false}}if(pos.popLeft<0){var diff$1=-1*pos.popLeft;pos.popLeft+=diff$1;if(vert&&pos.tailLeft){pos.tailLeft-=diff$1}if(vert&&pos.tailRight){pos.tailRight+=diff$1}if(tail&&!vert){pos.tail=false}}if(pos.popTop+local.height>oheight){var diff$2=pos.popTop-(oheight-local.height);pos.popTop-=diff$2;if(!vert&&pos.tailTop){pos.tailTop+=diff$2}if(!vert&&pos.tailBottom){pos.tailBottom-=diff$2}if(tail&&vert){pos.tail=false}}if(pos.popTop<0){var diff$3=-1*pos.popTop;pos.popTop+=diff$3;if(!vert&&pos.tailTop){pos.tailTop-=diff$3}if(!vert&&pos.tailBottom){pos.tailBottom+=diff$3}if(tail&&vert){pos.tail=false}}}if(offset.left+pos.popLeft<0){var diff$4=0-(offset.left+pos.popLeft);pos.popLeft+=diff$4;if(vert&&pos.tailLeft){pos.tailLeft-=diff$4}if(vert&&pos.tailRight){pos.tailRight+=diff$4}if(tail&&!vert){pos.tail=false}}if(offset.top+pos.popTop<0){var diff$5=0-(offset.top+pos.popTop);pos.popTop+=diff$5;if(!vert&&pos.tailTop){pos.tailTop-=diff$5}if(!vert&&pos.tailBottom){pos.tailBottom+=diff$5}if(tail&&vert){pos.tail=false}}if(pos.tailLeft){pos.tailLeft=Math.floor(pos.tailLeft)}if(pos.tailRight){pos.tailRight=Math.floor(pos.tailRight)}if(pos.tailTop){pos.tailTop=Math.floor(pos.tailTop)}if(pos.tailBottom){pos.tailBottom=Math.floor(pos.tailBottom)}this.set("position",pos)}else{this.set("position",null)}};Popover.prototype.show=function show(node){this.source=node;this.set("popped",true);return this._transdone};Popover.prototype.hide=function hide(){this.set("popped",false);return this._transdone};Popover.prototype.popFind=function popFind(pattern){if(mobilePopped){return mobilePop.find(pattern)}else{return this.find(pattern)}};Popover.prototype.popFindAll=function popFindAll(pattern){if(mobilePopped){return mobilePop.findAll(pattern)}else{return this.findAll(pattern)}};return Popover}(Ractive);Ractive.extendWith(Popover,{attributes:["popped","tail","where","align","top","left","fit","clickClose","noClickout","gap","offsets"],use:[pop(),clickout(),fade()],template:template,css:function(data){return[function(data){var primary=Object.assign({},data("raui.primary"),data("raui.pop.primary"));var themes=(data("raui.themes")||[]).slice();(data("raui.pop.themes")||[]).forEach(function(t){if(!~themes.indexOf(t)){themes.push(t)}});return"\n .rpop-wrapper {\n position: absolute;\n display: inline-block;\n z-index: 21;\n transition-property: top, left, padding;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-with-tail.rpop-above {\n padding-bottom: 10px;\n }\n .rpop-with-tail.rpop-below {\n padding-top: 10px;\n }\n .rpop-with-tail.rpop-left {\n padding-right: 10px;\n }\n .rpop-with-tail.rpop-right {\n padding-left: 10px;\n }\n \n .rpop {\n position: relative;\n box-shadow: 0 1px 4px 0 rgba(0,0,0,0.24);\n border: 1px solid #ccc;\n border-radius: 0.2em;\n background-color: "+(primary.bg||"#fff")+";\n color: "+(primary.fg||"#222")+";\n padding: 0.5em;\n z-index: 2;\n }\n \n .rpop-modal {\n position: fixed;\n display: flex;\n z-index: 20;\n background-color: rgba(0, 0, 0, 0.2);\n align-items: center;\n justify-content: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 1em;\n overflow: auto;\n }\n \n .rpop-tail, .rpop-tail-outer {\n z-index: 3;\n width: 0;\n height: 0;\n position: absolute;\n border-style: solid;\n border-width: 10px;\n border-color: transparent;\n transition-property: top, left, bottom, right, border-color;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-tail-outer {\n z-index: 1;\n border-width: 12px;\n border-color: transparent;\n }\n \n .rpop-below .rpop-tail {\n border-bottom-color: "+(primary.bg||"#fff")+";\n }\n .rpop-below .rpop-tail-outer {\n border-bottom-color: "+(primary.bc||"#ccc")+";\n }\n \n .rpop-above .rpop-tail {\n border-top-color: "+(primary.bg||"#fff")+";\n }\n .rpop-above .rpop-tail-outer {\n border-top-color: "+(primary.bc||"#ccc")+";\n }\n \n .rpop-left .rpop-tail {\n border-left-color: "+(primary.bg||"#fff")+";\n }\n .rpop-left .rpop-tail-outer {\n border-left-color: "+(primary.bc||"#ccc")+";\n }\n \n .rpop-right .rpop-tail {\n border-right-color: "+(primary.bg||"#fff")+";\n }\n .rpop-right .rpop-tail-outer {\n border-right-color: "+(primary.bc||"#ccc")+";\n }\n "+themes.map(function(t){var theme=Object.assign({},data("raui.primary"),data("raui.pop.primary"),data("raui."+t),data("raui.pop."+t));return"\n ."+t+" .rpop {\n background-color: "+(theme.bg||"#fff")+";\n color: "+(theme.fg||"#222")+";\n }\n \n ."+t+".rpop-below .rpop-tail {\n border-bottom-color: "+(theme.bg||"#fff")+";\n }\n ."+t+".rpop-below .rpop-tail-outer {\n border-bottom-color: "+(theme.bc||"#ccc")+";\n }\n \n ."+t+".rpop-above .rpop-tail {\n border-top-color: "+(theme.bg||"#fff")+";\n }\n ."+t+".rpop-above .rpop-tail-outer {\n border-top-color: "+(theme.bc||"#ccc")+";\n }\n \n ."+t+".rpop-left .rpop-tail {\n border-left-color: "+(theme.bg||"#fff")+";\n }\n ."+t+".rpop-left .rpop-tail-outer {\n border-left-color: "+(theme.bc||"#ccc")+";\n }\n \n ."+t+".rpop-right .rpop-tail {\n border-right-color: "+(theme.bg||"#fff")+";\n }\n ."+t+".rpop-right .rpop-tail-outer {\n border-right-color: "+(theme.bc||"#ccc")+";\n }\n "})}.call(this,data)].join(" ")},cssId:"rpop",noCssTransform:true,observe:{popped:function popped(v){var this$1=this;if(v){if(source){this.source=source}if(tailSource){this.tailSource=tailSource}}var ok;var done=this._transdone=new Promise(function(o){return ok=o});done.resolve=ok;setTimeout(function(){this$1._transdone=done;if(this$1.get("popped")===v){this$1.set("_popped",v)}},1)},_popped:{handler:function handler(v){var this$1=this;var done=this._transdone.resolve;if(v){var mobile=this.get("@style.raui.pop.mobile");if(mobile&&window.matchMedia("(max-width: "+mobile+")").matches){if(!mobilePop){mobilePop=new MobilePop({target:document.body,append:true})}var context=this.getContext().getParent(true);context.isContext=1;this.set("__popped",false).then(done);mobilePop.unshift("contents",{content:this.partials.content,context:context,attrs:this.partials["extra-attributes"]||[],clickClose:this.get("clickClose"),noClickout:this.get("noClickout"),done:function(){this$1.set("popped",false)}})}else{this.set("__popped",true)}}else{if(mobilePopped){mobilePop.shift("contents");done()}else{this.set("__popped",false).then(done)}}},defer:true,init:false},__popped:{handler:function handler(v){var done=this._transdone.resolve;if(v){var el=this.find("div");var node=el;var h=node.offsetHeight+node.offsetTop;var w=node.offsetWidth+node.offsetLeft;var offset=node.offsetParent;if(!this.overflows){var o=this.overflows={e:[],v:[]};while(el&&el.style){if(el===offset){if(el.offsetWidth>=w&&el.offsetHeight>=h){break}else{w+=el.offsetLeft;h+=el.offsetTop;offset=el.offsetParent}}var css=getComputedStyle(el);if(css.overflow==="auto"){break}if(css.overflow==="hidden"){o.e.push(el);o.v.push(el.style.overflow);el.style.overflow="visible"}el=el.parentNode}}this.position();this.transition("pop",node,{intro:true,dir:this.get("where")||"below"}).then(done)}else{this.source=null;this.tailSource=null}},defer:true,init:false},"align where tail fit":{handler:function handler(){this.position()},defer:true}},decorators:{cleanup:function cleanup(node){var pop=this;return{teardown:function teardown(){var o=pop.overflows;if(o){pop.overflows=null;for(var i=0;i<o.e.length;i++){o.e[i].style.overflow=o.v[i]}}}}}},data:function data(){return{gap:4}}});export function trigger(options){if(options===void 0)options={};return function(ref){var instance=ref.instance;instance.decorators[options.name||"pop"]=function(node,path,opts){if(opts===void 0)opts={};if(!path){return{teardown:noop}}if(typeof path==="string"){opts.path=path}else if(typeof path==="object"){opts=path}var ctx=this.getContext(node);var clicked,hover;function listener(ev){if(ev.type==="mouseover"&&ctx.get(path)){return}if(ev.type!=="click"||!hover||clicked){var init=source;var initTail=tailSource;source=opts.node||node;if(typeof source==="function"){source=source()}source=source||node;tailSource=opts.tail;if(typeof tailSource==="function"){tailSource=tailSource()}ctx.toggle(opts.path);source=init;tailSource=initTail}if(hover&&ev.type==="click"){clicked=ctx.observeOnce(opts.path,function(){clicked=null})}}function out(ev){if(!clicked){ctx.set(opts.path,false)}}if("click"in opts?opts.click:options.click!==false){ctx.listen("click",listener)}if("hover"in opts?opts.hover:options.hover){hover=1;ctx.listen("mouseover",listener);ctx.listen("mouseout",out)}return{teardown:function teardown(){ctx.unlisten("click",listener);if(hover){ctx.unlisten("mouseover",listener);ctx.unlisten("mouseout",out);if(clicked){clicked.cancel()}}}}}}}var MobilePop=function(Ractive){function MobilePop(opts){Ractive.call(this,opts)}if(Ractive)MobilePop.__proto__=Ractive;MobilePop.prototype=Object.create(Ractive&&Ractive.prototype);MobilePop.prototype.constructor=MobilePop;return MobilePop}(Ractive);Ractive.extendWith(MobilePop,{template:{v:template.v,t:template.p.modal},data:function data(){return{contents:[]}},use:[pop(),fade()],observe:{contents:function contents(v){mobilePopped=(v||[]).length>0}},on:{init:function init(){if(mobilePop){console.warn("More than one PopOver mobile host created.")}else{mobilePop=this}}}});export default function plugin(options){if(options===void 0)options={};return function(ref){var instance=ref.instance;instance.components[options.name||"pop"]=Popover;instance.components[options.mobileName||"mobile-pop"]=MobilePop;var opts=Object.assign({},options);opts.name=opts.trigger||opts.name;trigger(opts)({instance:instance})}}

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

import Ractive from"ractive";import{grid,style as gridStyle}from"./grid";import click from"./event-click";import expand from"./transition-expand";import scrolled from"./scrolled";import{sized}from"./watch-size";import globalRegister from"./globalRegister";var sortRE=/^([-+])?([^\s]+)$/;function isString(v){return typeof v==="string"}function isNumber(v){return typeof v==="number"}function isObject(v){return typeof v==="object"}function isRegex(v){return typeof v==="object"&&Object.prototype.toString.call(v)==="RegExp"}export var Table=function(Ractive){function Table(opts){Ractive.call(this,opts)}if(Ractive)Table.__proto__=Ractive;Table.prototype=Object.create(Ractive&&Ractive.prototype);Table.prototype.constructor=Table;var prototypeAccessors={selections:{configurable:true},selected:{configurable:true},rows:{configurable:true},visibleRows:{configurable:true},allRows:{configurable:true}};Table.prototype._allSelected=function _allSelected(){var sel=this.get("selections");var visible=this.get("paginate")==="virtual"?this.get("rows"):this.get("visibleRows");for(var i=0;i<visible.length;i++){if(!~sel.indexOf(visible[i])){return false}}return visible.length&&true};Table.prototype._setSort=function _setSort(index,ev){var ref=[this.get("sort-handler"),this.get("@style.raui.table.sort-handler")];var localh=ref[0];var classh=ref[1];var fn=localh||classh;if(fn){fn(this,this.get("columns."+index),index,ev)}else{var sort=this.get("sort")||"";var col=this.get("columns."+index);var id=col.id;if(sort===id||sort.substr(1)===id){if(sort[0]==="-"){this.set("sort",id)}else{this.set("sort","-"+id)}}else{this.set("sort",id)}}};Table.prototype.nodeSet=function nodeSet(node,prop,value){node[prop]=value};Table.prototype._expand=function _expand(idx){var this$1=this;var which=this.get("visibleRows")[idx];var current=this.get("expanded");var expanded=this.find(".rtable-row-expand");if(expanded){this.transition("expand",expanded,{outro:true}).then(function(){if(current===which){this$1.set("expanded",null)}else{this$1.set("expanded",which);this$1.transition("expand",this$1.find(".rtable-row-expand"),{intro:true})}})}else{if(which===current){this.set("expanded",null)}else{this.set("expanded",which);this.transition("expand",this.find(".rtable-row-expand"),{intro:true})}}};Table.prototype._hover=function _hover(idx){this.set("hovered",this.get("~/visibleRows")[idx]);return false};Table.prototype._unhover=function _unhover(idx){if(this.find(".rtable-top .rtable-row-wrap:hover")){return}else{this.set("hovered",undefined)}return false};Table.prototype._select=function _select(src,ev){var sels=this.get("selections");if(!sels){sels=[];this.set("selections",sels)}var i=sels.indexOf(src);if(~i){this.splice("selections",i,1)}else{this.push("selections",src)}if(i>=sels.length||sels.length===1){this.set("selected",sels[sels.length-1])}this.fire("selection",{},{item:sels[sels.length-1],items:sels});setTimeout(function(){return ev.target.checked=!~i});return false};Table.prototype._open=function _open(row,idx,vidx){var this$1=this;if(this._opentm){return}this.fire("selected",{},row,idx,vidx);this._opentm=setTimeout(function(){this$1._opentm=null},500)};Table.prototype.select=function select(){var selected=this.get("selected");if(selected){this.fire("selected",{},selected,this.get("rows").indexOf(selected),this.get("visibleRows").indexOf(selected))}};Table.prototype.deselect=function deselect(){this.set({selections:[],selected:undefined})};prototypeAccessors.selections.get=function(){return this.get("selections")||[]};prototypeAccessors.selections.set=function(v){var rows=this.get("rows");var sels=Array.isArray(v)?v.filter(function(i){return~rows.indexOf(i)}):[];this.set("selections",sels)};prototypeAccessors.selected.get=function(){return this.get("selected")};prototypeAccessors.selected.set=function(v){this.set({selected:v,selections:[v]})};prototypeAccessors.rows.get=function(){return this.get("rows")};prototypeAccessors.visibleRows.get=function(){return this.get("visibleRows")};prototypeAccessors.allRows.get=function(){return this.get("items")};Table.prototype.selectionOffset=function selectionOffset(offset){var selected=this.get("selected");var visible=this.get("visibleRows");if(!selected||!~visible.indexOf(selected)){var next=offset>0?visible[0]:visible[visible.length-1];this.set({selected:next,selections:[next]})}else{var idx=visible.indexOf(selected);if(offset>0?idx+offset>=visible.length:idx+offset<0){var move=offset<1?-1:1;if(move<0&&this.get("page")+move>=0||move>0&&this.get("page")+move<this.get("pagination.total")){this.add("page",move)}visible=this.get("visibleRows");var next$1=offset>0?visible[0]:visible[visible.length-1];this.set({selected:next$1,selections:[next$1]})}else{this.set({selected:visible[idx+offset],selections:[visible[idx+offset]]})}}this.fire("selection",{},{item:this.get("selected"),items:this.get("selections")})};Table.prototype.selectionDown=function selectionDown(){this.selectionOffset(1)};Table.prototype.selectionUp=function selectionUp(){this.selectionOffset(-1)};Table.prototype._selectGroup=function _selectGroup(idx){var grp=idx;if(this.get("page")){grp+=this.get("page")*this.get("pagination.per")}var rows=this.get("rows");var groups=this.get("groups");var sels=this.get("selections");var x=rows[grp++];var xs=["selections"];var ss=[];var i;if(!~(i=sels.indexOf(x))){xs.push(x)}else{ss.push(i)}while(grp<rows.length&&!(grp in groups)){x=rows[grp++];if(!~(i=sels.indexOf(x))){xs.push(x)}else{ss.push(i)}}if(xs.length===1){i=ss.length;while(i--){this.splice("selections",ss[i],1)}}else{this.push.apply(this,xs)}return false};Table.prototype._groupSelected=function _groupSelected(idx){var grp=idx;if(this.get("page")){grp+=this.get("page")*this.get("pagination.per")}var rows=this.get("rows");var groups=this.get("groups");var sels=this.get("selections");if(!~sels.indexOf(rows[grp++])){return false}while(grp<rows.length&&!(grp in groups)){if(!~sels.indexOf(rows[grp++])){return false}}return true};Table.prototype._rows=function _rows(){var src=(this.get("items")||[]).slice();var filter=this.get("filter");var sort=this.get("sort");var ref=[this.get("data-handler"),this.get("@style.raui.table.data-handler")];var localh=ref[0];var classh=ref[1];var handler=localh||classh||defaultFilter;if(!filter&&!sort){this.set("isFiltered",false);return this.set("rows",src)}var res=handler(this,src,filter,sort,this.get("parameters",{virtual:true}));this.set("isFiltered",res.length!==src.length);this.set("rows",res);var sels=this.get("selections");this.set("selections",sels.filter(function(s){return~src.indexOf(s)}));if(!~src.indexOf(this.get("selection"))){this.set("selected",undefined)}};Table.prototype.replaceColumns=function replaceColumns(columns){var ref=makeRows(columns);var headerCols=ref[0];var rowCols=ref[1];this.set("columns",columns);this.resetPartial("grid-row-cols",rowCols);this.resetPartial("grid-head-cols",headerCols)};Object.defineProperties(Table.prototype,prototypeAccessors);return Table}(Ractive);function scrollother(node,find){var this$1=this;var scroll=function(ev){if(scrollother.lock&&scrollother.lock!==node){return}if(scrollother.tm){clearTimeout(scrollother.tm)}scrollother.lock=node;this$1.find(find).scrollLeft=ev.target.scrollLeft;scrollother.tm=setTimeout(function(){scrollother.tm=null;scrollother.lock=false},100)};node.addEventListener("scroll",scroll,{passive:true});return{teardown:function teardown(){node.removeEventListener("scroll",scroll)}}}Table.settings={valign:"center",border:false,"fixed-header":true,"allow-select":true,"allow-select-all":true,"auto-titles":false,paginate:"virtual"};Ractive.extendWith(Table,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable",g:1},{n:"class-rtable-virtual",t:13,f:[{t:2,x:{r:["~/paginate"],s:'_0==="virtual"'}}]},{n:"class-rtable-auto",t:13,f:[{t:2,x:{r:["~/paginate"],s:'_0==="auto"'}}]},{n:"class-rtable-fixed",t:13,f:[{t:2,r:"~/fixed"}]},{n:"class-rtable-border",t:13,f:[{t:2,r:"~/border"}]},{n:"class-rtable-fixed-header",t:13,f:[{t:2,r:"~/fixedHeader"}]},{n:"class-rtable-scrolled-down",t:13,f:[{t:2,x:{r:["~/scroll"],s:'!~(_0||"").indexOf("top")'}}]},{n:"class-rtable-scrolled-up",t:13,f:[{t:2,x:{r:["~/scroll"],s:'!~(_0||"").indexOf("bottom")'}}]},{n:"class-rtable-with-select",t:13,f:[{t:2,r:"~/allowSelect"}]},{n:"class-rtable-valign-top",t:13,f:[{t:2,x:{r:["~/valign"],s:'_0==="top"'}}]},{n:"class-rtable-valign-center",t:13,f:[{t:2,x:{r:["~/valign"],s:'_0==="center"'}}]},{n:"class-rtable-valign-bottom",t:13,f:[{t:2,x:{r:["~/valign"],s:'_0==="bottom"'}}]},{n:"class-rtable-nowrap",t:13,f:[{t:2,r:"~/noWrap"}]},{n:"class-rtable-wrap",t:13,f:[{t:2,x:{r:["~/noWrap"],s:"!_0"}}]},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-fixed",g:1},{n:"grid",t:71,f:{r:["~/scrollOffset"],s:"[{offset:_0}]"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-extra",g:1},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/tableWidth"},"px"],t:13}],n:50,r:"~/noWrap"},{n:"class-rtable-noheader",t:13,f:[{t:2,r:"~/noHeader"}]},{t:4,f:[{t:16,r:"meta.topAttrs"}],n:50,r:"meta.topAttrs"}],f:[{t:16,r:"meta.top",z:[{n:"selectedCount",x:{r:"selections.length"}},{n:"rowCount",x:{r:"rows.length"}},{n:"table",x:{r:"@this"}},{n:"selected",x:{r:"selected"}},{n:"selections",x:{r:"selections"}}]}]}],n:50,r:"meta.top"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-wrapper row-wrap",g:1},{t:4,f:[{n:"scrollother",t:71,f:{r:[],s:'[".rtable-top"]'}}],n:50,r:"~/noWrap"}],f:[{t:8,r:"grid-head"}]}],n:51,r:"~/noHeader"}]}],n:50,x:{r:["~/noHeader","meta.top","~/fixedHeader"],s:"(!_0||_1)&&_2"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-top",g:1},{t:4,f:[{n:["scrolled"],t:70,f:"scroll"},{n:"sized",t:71,f:{r:[],s:'[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]'}}],n:50,x:{r:["~/paginate"],s:'_0==="virtual"'}},{t:4,f:[{n:"scrolled",t:71,f:{r:[],s:'["~/scroll"]'}}],n:50,x:{r:["~/noHeader","~/fixedHeader","~/meta.bottom","~/paginate"],s:'(!_0&&_1)||_2||_3==="virtual"'}},{t:4,f:[{n:"scrollother",t:71,f:{r:[],s:'[".rtable-header-wrapper"]'}}],n:50,x:{r:["~/fixedHeader","~/noWrap"],s:"_0&&_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-extra",g:1},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/tableWidth"},"px"],t:13}],n:50,r:"~/noWrap"},{n:"class-rtable-noheader",t:13,f:[{t:2,r:"~/noHeader"}]},{t:4,f:[{t:16,r:"meta.topAttrs"}],n:50,r:"meta.topAttrs"}],f:[{t:16,r:"meta.top",z:[{n:"selectedCount",x:{r:"selections.length"}},{n:"rowCount",x:{r:"rows.length"}},{n:"table",x:{r:"@this"}},{n:"selected",x:{r:"selected"}},{n:"selections",x:{r:"selections"}}]}]}],n:50,x:{r:["~/fixedHeader","meta.top"],s:"!_0&&_1"}}," ",{t:7,e:"div",m:[{n:"grid",t:71,f:{r:[],s:'[{size:"~/tableWidth",value:"~/gridValue",name:"~/gridName",max:"~/gridMax"}]'}},{t:4,f:[{n:"style-margin-top",f:[{t:2,r:"~/virtual.above"},"px"],t:13},{n:"style-margin-bottom",f:[{t:2,r:"~/virtual.below"},"px"],t:13}],n:50,x:{r:["~/paginate"],s:'_0==="virtual"'}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-wrapper row-wrap",g:1}],f:[{t:8,r:"grid-head"}]}],n:50,x:{r:["~/noHeader","~/fixedHeader"],s:"!_0&&!_1"}}," ",{t:4,f:[{t:4,f:[{t:8,r:"grid-row"}],n:52,z:[{n:"source",x:{r:"~/items"}},{n:"shuffle",x:{x:{r:[],s:"true"}}}],r:"~/visibleRows"}],n:50,r:"~/shuffle"},{t:4,f:[{t:4,f:[{t:8,r:"grid-row"}],n:52,r:"~/visibleRows"}],n:51,l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-row row t1",g:1}],f:[{t:16,r:"empty",z:[{n:"message",x:{r:"~/empty"}}]}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-bottom",g:1},{t:4,f:[{t:16,r:"meta.bottomAttrs"}],n:50,r:"meta.bottomAttrs"}],f:[{t:4,f:[{t:16,r:"meta.bottom",z:[{n:"selectedCount",x:{r:"selections.length"}},{n:"rowCount",x:{r:"rows.length"}},{n:"table",x:{r:"@this"}},{n:"selected",x:{r:"selected"}},{n:"selections",x:{r:"selections"}}]}],n:50,r:"~/meta.bottom"}," ",{t:4,f:[{t:8,r:"pagination"}],n:50,x:{r:["~/paginate"],s:'_0!=="virtual"'}}]}],n:50,x:{r:["~/paginate","~/meta.bottom"],s:'_0!=="virtual"||_1'}}]}],e:{'_0==="virtual"':function(_0){return _0==="virtual"},'_0==="auto"':function(_0){return _0==="auto"},'!~(_0||"").indexOf("top")':function(_0){return!~(_0||"").indexOf("top")},'!~(_0||"").indexOf("bottom")':function(_0){return!~(_0||"").indexOf("bottom")},'_0==="top"':function(_0){return _0==="top"},'_0==="center"':function(_0){return _0==="center"},'_0==="bottom"':function(_0){return _0==="bottom"},"!_0":function(_0){return!_0},"[{offset:_0}]":function(_0){return[{offset:_0}]},'[".rtable-top"]':function(){return[".rtable-top"]},"(!_0||_1)&&_2":function(_0,_1,_2){return(!_0||_1)&&_2},'[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]':function(){return[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]},'["~/scroll"]':function(){return["~/scroll"]},'(!_0&&_1)||_2||_3==="virtual"':function(_0,_1,_2,_3){return!_0&&_1||_2||_3==="virtual"},'[".rtable-header-wrapper"]':function(){return[".rtable-header-wrapper"]},"_0&&_1":function(_0,_1){return _0&&_1},"!_0&&_1":function(_0,_1){return!_0&&_1},'[{size:"~/tableWidth",value:"~/gridValue",name:"~/gridName",max:"~/gridMax"}]':function(){return[{size:"~/tableWidth",value:"~/gridValue",name:"~/gridName",max:"~/gridMax"}]},"!_0&&!_1":function(_0,_1){return!_0&&!_1},true:function(){return true},'_0!=="virtual"':function(_0){return _0!=="virtual"},'_0!=="virtual"||_1':function(_0,_1){return _0!=="virtual"||_1},"(_0+_1)%2===1":function(_0,_1){return(_0+_1)%2===1},"[_0._setSort(_1,_2)]":function(_0,_1,_2){return[_0._setSort(_1,_2)]},"[_0._select(_1,_2),false]":function(_0,_1,_2){return[_0._select(_1,_2),false]},"[_0._open(_3,_1.indexOf(_3),_2.indexOf(_3))]":function(_0,_1,_2,_3){return[_0._open(_3,_1.indexOf(_3),_2.indexOf(_3))]},"[_0._expand(_1)]":function(_0,_1){return[_0._expand(_1)]},"[_0.stopPropagation()]":function(_0){return[_0.stopPropagation()]},"_0.indexOf(_1)":function(_0,_1){return _0.indexOf(_1)},"_0===_1":function(_0,_1){return _0===_1},"_0>0":function(_0){return _0>0},"!_0&&_1>0":function(_0,_1){return!_0&&_1>0},'_0==="boolean"':function(_0){return _0==="boolean"},"_0._allSelected()":function(_0){return _0._allSelected()},'_0||"No data."':function(_0){return _0||"No data."},"_0*_1+1":function(_0,_1){return _0*_1+1},"_2+1===_0?_1:(_2+1)*_3":function(_0,_1,_2,_3){return _2+1===_0?_1:(_2+1)*_3},"_0===1":function(_0){return _0===1},"_0._allSelected()&&_1<_2":function(_0,_1,_2){return _0._allSelected()&&_1<_2},'[_0.set("page",_1-1)]':function(_0,_1){return[_0.set("page",_1-1)]},'[(/^\\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1))||_2.nodeSet(_3,"value",_4+1)]':function(_0,_1,_2,_3,_4){return[/^\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1)||_2.nodeSet(_3,"value",_4+1)]},"_0==_1+1":function(_0,_1){return _0==_1+1},'[_0.set("page",_2[_1-1])]':function(_0,_1,_2){return[_0.set("page",_2[_1-1])]},'_0==="..."':function(_0){return _0==="..."},'[_0.set("page",_1+1)]':function(_0,_1){return[_0.set("page",_1+1)]},"_0<_1-1":function(_0,_1){return _0<_1-1}},p:{"csp-dummy":[{t:7,e:"div",m:[{n:"class-rtable-odd",t:13,f:[{t:2,x:{r:["@index","~/virtual.offset"],s:"(_0+_1)%2===1"}}]},{n:"class-top",t:13,f:[{t:2,x:{r:[".valign"],s:'_0==="top"'}}]},{n:"class-bottom",t:13,f:[{t:2,x:{r:[".valign"],s:'_0==="bottom"'}}]},{n:"class-center",t:13,f:[{t:2,x:{r:[".valign"],s:'_0==="center"'}}]},{n:["click"],t:70,f:{r:["@this",".index","@event"],s:"[_0._setSort(_1,_2)]"}},{n:["click"],t:70,f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}},{n:["click"],t:70,f:{r:["@this","~/rows","~/visibleRows","."],s:"[_0._open(_3,_1.indexOf(_3),_2.indexOf(_3))]"}},{n:["click"],t:70,f:{r:["@this","@index"],s:"[_0._expand(_1)]"}},{n:["click"],t:70,f:{r:["@event"],s:"[_0.stopPropagation()]"}}]}," ",{t:4,f:["..."],n:50,x:{r:["~/selections","."],s:"_0.indexOf(_1)"}}," ",{t:4,f:["..."],n:50,x:{r:[".","~/expanded"],s:"_0===_1"}}," ",{t:4,f:["..."],n:50,x:{r:["~/virtual.offset"],s:"_0>0"}}," ",{t:4,f:["..."],n:50,x:{r:["~/fixedHeader","~/virtual.offset"],s:"!_0&&_1>0"}}," ",{t:4,f:["..."],n:50,x:{r:["~/columns.0.type"],s:'_0==="boolean"'}}," ",{t:4,f:["..."],n:50,x:{r:["@this"],s:"_0._allSelected()"}}],empty:[{t:7,e:"div",f:[{t:7,e:"div",f:[{t:2,x:{r:["message"],s:'_0||"No data."'}}]}]}],pagination:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-pagination",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-info",g:1}],f:[{t:4,f:[{t:2,x:{r:["~/page","~/pagination.per"],s:"_0*_1+1"}}," - ",{t:2,x:{r:["~/pagination.total","~/rows.length","~/page","~/pagination.per"],s:"_2+1===_0?_1:(_2+1)*_3"}}," of ",{t:2,r:"~/rows.length"},{t:4,f:[" (",{t:2,r:"~/items.length"}," total)"],n:50,r:"~/isFiltered"}],n:50,x:{r:["pagination","rows.length"],s:"_0&&_1"}}," ",{t:4,f:["​"],n:50,x:{r:["_paginate"],s:"_0===1"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-select-all-all",g:1}],f:[{t:4,f:[{t:7,e:"strong",f:[{t:2,r:"selections.length"}]}," of ",{t:7,e:"strong",f:[{t:2,r:"rows.length"}]}," selected",{t:4,f:[" - ",{t:7,e:"a",m:[{n:"href",f:"#",t:13,g:1},{n:["click"],t:70,f:"selectAllAll"}],f:["Select All"]}],n:50,x:{r:["@this","selections.length","rows.length"],s:"_0._allSelected()&&_1<_2"}}],n:50,x:{r:["selections.length"],s:"_0>0"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-pages",g:1}],f:[{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","~/page"],s:'[_0.set("page",_1-1)]'}}],f:["Previous"]}],n:50,x:{r:["~/page"],s:"_0>0"}}," ",{t:4,f:[{t:4,f:[{t:7,e:"input",m:[{n:["change"],t:70,f:{r:["~/pagination.total","@node.value","@this","@node","~/page"],s:'[(/^\\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1))||_2.nodeSet(_3,"value",_4+1)]'}},{n:"value",f:[{t:2,r:"."}],t:13},{t:73,v:"t",f:"false"}]}],n:50,x:{r:[".","~/page"],s:"_0==_1+1"}},{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","@index","../"],s:'[_0.set("page",_2[_1-1])]'}}],f:["..."]}," "],n:50,x:{r:["."],s:'_0==="..."'},l:1},{t:4,f:[" ",{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","."],s:'[_0.set("page",_1-1)]'}}],f:[{t:2,r:"."}]}],n:51,l:1}],n:52,r:"~/pagination.array"}," ",{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","~/page"],s:'[_0.set("page",_1+1)]'}}],f:["Next"]}],n:50,x:{r:["~/page","~/pagination.total"],s:"_0<_1-1"}}]}]}]}},css:function(data){return[function(data){var primary=Object.assign({},data("raui.primary"),data("raui.table.primary"));var active=Object.assign({},primary,data("raui.primary.active"),data("raui.table.primary.active"));var table=Object.assign({selected:{},header:{},footer:{}},data("raui.table"));return"\n .rtable {\n display: flex;\n flex-direction: column;\n overflow: auto;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n flex-grow: 2;\n }\n \n .rtable.rtable-border {\n border: 1px solid "+(table.divider||primary.bc||"#ccc")+";\n }\n \n .rtable-header {\n min-height: 2em;\n }\n \n .rtable-group > div > div,\n .rtable-header > div > div,\n .rtable-row > div > div {\n padding: "+(table.padding||"0.5em")+";\n overflow: inherit;\n text-overflow: inherit;\n line-height: 1em;\n }\n .rtable-row > .rtable-no-pad > div {\n padding: 0;\n }\n \n .rtable-auto .row > *,\n .rtable-fixed .row > *\n {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n \n .rtable-header > div > div, .rtable-column {\n overflow: hidden;\n }\n \n .rtable-number-column {\n text-align: right;\n }\n .rtable-date-column {\n text-align: right;\n }\n \n .rtable-sortable {\n cursor: pointer;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n \n .grid .row.rtable-row, .grid .rtable-header > .row {\n width: auto;\n min-width: min-content;\n flex-grow: 1;\n }\n \n .rtable-nowrap .grid .rtable-row, .rtable-nowrap .grid .rtable-header > .row {\n flex-wrap: nowrap;\n }\n .rtable-nowrap .rtable-row-wrap, .rtable-inner-row-wrap {\n flex-grow: 1;\n } \n \n .rtable-row-wrap {\n display: flex;\n flex-grow: 1;\n align-items: center;\n z-index: 2;\n align-items: stretch;\n color: "+(primary.fg||"#222")+";\n background-color: "+(table.even||primary.bga||"#f4f4f4")+";\n }\n .rtable-row-wrap:focus-within {\n z-index: 3;\n }\n .rtable-row-wrap.rtable-odd {\n background-color: "+(table.odd||primary.bg||"#fff")+";\n }\n .rtable-row-wrap:hover .rtable-inner-row-wrap, .rtable-row-wrap:hover .rtable-select-row {\n background-color: "+(table.over||active.bg||"#e6f0fa")+";\n }\n .rtable-row-wrap:hover .rtable-inner-row-wrap,\n .rtable-wrap .rtable-row-wrap:hover .rtable-select-row {\n position: relative;\n }\n .rtable-row-wrap:hover .rtable-select-row {\n overflow: visible;\n }\n \n .rtable-row-wrap:hover {\n border-bottom: "+(table.dividerSize||"4px")+" solid "+(table.divider||primary.bc||"#ccc")+";\n }\n \n .rtable-row-wrap.rtable-selected {\n background-color: "+(table.selected.bg||"#cee5fd")+";\n color: "+(table.selected.fg||primary.fg||"#222")+";\n }\n .rtable-row-wrap.rtable-selected.rtable-odd {\n background-color: "+(table.selected.odd||"#c5dffb")+";\n }\n \n .rtable-nowrap .rtable-row-wrap {\n display: inline-flex;\n min-width: 100%;\n box-sizing: border-box;\n }\n \n .rtable-nowrap > .rtable-top > .grid {\n line-height: 1em;\n }\n \n .rtable-border .rtable-row .rtable-column,\n .rtable-border .rtable-group .rtable-column {\n border-color: "+(table.divider||primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 0 0 0 1px;\n margin: 0 0 0 -1px;\n }\n .rtable-wrap.rtable-border .rtable-row .rtable-column,\n .rtable-border .rtable-group .rtable-column {\n border-width: 0 0 1px 1px;\n margin: 0 0 -1px -1px;\n }\n \n .rtable-border .rtable-header .rtable-column {\n border-width: 0 0 0 0;\n margin: 0 0 0 0;\n }\n .rtable-wrap.rtable-border .rtable-header .rtable-column {\n border-width: 0 0 1px 0;\n margin: 0 0 -1px 0;\n }\n \n .rtable-border .rtable-row .rtable-column:nth-child(1),\n .rtable-border .rtable-group .rtable-column:nth-child(1) {\n border-left-width: 0;\n }\n .rtable-border.rtable-with-select .rtable-row .rtable-column:nth-child(1),\n .rtable-border.rtable-with-select .rtable-group .rtable-column:nth-child(1) {\n border-left-width: 1px;\n }\n \n .rtable-border .rtable-row-wrap {\n border-bottom-width: 1px;\n }\n \n .rtable-border .rtable-row-expand, .rtable-border .rtable-row-extra {\n border-color: "+(table.divider||primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 1px 0 0 0;\n margin-left: -1px;\n width: 100%;\n }\n .rtable-border.rtable-with-select .rtable-row-expand, .rtable-border.rtable-with-select .rtable-row-extra {\n border-left-width: 1px;\n }\n \n .rtable-row-expand, .rtable-row-extra {\n box-sizing: border-box;\n padding: "+(table.padding||"0.5em")+";\n }\n \n .rtable-row-hover {\n pointer-events: none;\n position: relative;\n z-index: 1;\n }\n .rtable-row-hover-content {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n }\n .rtable-row-hover-content > * {\n pointer-events: visible;\n }\n \n .rtable-group {\n border-bottom: 2px solid "+(table.divider||primary.bc||"#ccc")+";\n }\n \n .rtable-header.rtable-row-wrap, .rtable-header.rtable-row-wrap:hover {\n font-weight: bold;\n background-color: "+(table.header.bg||"#dedede")+";\n }\n .rtable-header-fixed {\n line-height: 1em;\n background-color: "+(table.header.bg||"#dedede")+";\n }\n \n .rtable-header.rtable-row-wrap, .rtable-header-extra.rtable-noheader {\n border-bottom: 2px solid "+(table.divider||primary.bc||"#ccc")+";\n }\n \n .rtable-header-extra {\n background-color: "+(table.header.bg||"#dedede")+";\n padding: "+(table.padding||"0.5em")+";\n line-height: 1em;\n z-index: 4;\n box-sizing: border-box;\n min-width: 100%;\n }\n .rtable-nowrap .rtable-header-extra {\n position: sticky;\n left: 0;\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n position: relative;\n }\n .rtable-fixed-header .rtable-header {\n position: relative;\n z-index: 3;\n }\n .rtable-fixed-header.rtable-scrolled-down .rtable-header-fixed {\n box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15), 0 0.25em 0.5em rgba(0,0,0,0.25);\n z-index: 3;\n }\n .rtable-fixed-header .rtable-top {\n margin-top: 0;\n }\n .rtable-nowrap.rtable-fixed-header .rtable-header-wrapper {\n flex-shrink: 0;\n width: 100%;\n overflow-x: auto;\n scrollbar-width: none;\n }\n .rtable-nowrap.rtable-fixed-header .rtable-header-wrapper::-webkit-scrollbar {\n height: 0;\n }\n .rtable-fixed-header .rtable-header-fixed::-webkit-scrollbar {\n width: 0;\n height: 0;\n }\n \n .rtable-nowrap .rtable-fixed-column, .rtable-nowrap .rtable-row-extra, .rtable-nowrap .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n position: -webkit-sticky;\n position: sticky;\n left: 0;\n }\n .rtable-border..rtable-nowrap .rtable-fixed-column, .rtable-border.rtable-nowrap .rtable-row-extra, .rtable-border.rtable-nowrap .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n left: 1px;\n }\n .rtable-nowrap.rtable-with-select .rtable-fixed-column, .rtable-nowrap.rtable-with-select .rtable-row-extra, .rtable-nowrap.rtable-with-select .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n left: "+(table.selectWidth||"2em")+";\n }\n .rtabe-border.rtable-nowrap.rtable-with-select .rtable-fixed-column, .rtabe-border.rtable-nowrap.rtable-with-select .rtable-row-extra, .rtabe-border.rtable-nowrap.rtable-with-select .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n left: "+(table.selectWidth||"2em")+";\n }\n \n .rtable-nowrap .rtable-inner-row-wrap {\n background-color: inherit;\n }\n \n .rtable-nowrap .row,\n .rtable-nowrap .rtable-fixed-column,\n .rtable-nowrap .rtable-select-row,\n .rtable-nowrap .rtable-select-header {\n background-color: inherit;\n z-index: 1;\n }\n \n .rtable-nowrap .rtable-select-row,\n .rtable-nowrap .rtable-select-header {\n position: sticky;\n position: -webkit-sticky;\n left: 0;\n z-index: 1;\n }\n .rtable-nowrap .rtable-select-header {\n z-index: 2;\n }\n \n .rtable-nowrap.rtable-border .rtable-fixed-column {\n border-right-width: 1px;\n }\n \n .rtable-scrolled-up .rtable-bottom {\n box-shadow: 0 -1px 2px 0 rgba(60, 64, 67, 0.3), 0 -1px 3px 1px rgba(60, 64, 67, 0.15), 0 -0.25em 0.5em rgba(0,0,0,0.25);\n z-index: 3;\n }\n .rtable-bottom {\n padding: "+(table.padding||"0.5em")+";\n background-color: "+(table.footer.bg||table.header.bg||"#dedede")+";\n border-top: 2px solid "+(table.divider||primary.bc||"#ccc")+";\n }\n \n .rtable-pagination {\n display: flex;\n flex-wrap: wrap;\n flex-shrink: 0;\n justify-content: space-between;\n user-select: none;\n }\n \n .rtable-pages span {\n margin: 0.3em;\n cursor: pointer;\n }\n .rtable-pages span:first-of-type {\n margin-left: 0;\n }\n .rtable-pages input {\n text-align: center;\n width: 2.5em;\n font-size: 1em;\n background-color: transparent;\n border: none;\n padding: 0;\n font-weight: bold;\n text-decoration: underline;\n }\n \n /* checkboxes */\n .rtable-select {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n position: absolute;\n display: block;\n margin: 0;\n width: 3em;\n height: 3em;\n box-shadow: none;\n outline: none;\n opacity: 0;\n top: -0.75em;\n left: -0.75em;\n border-radius: 2em;\n transition: transform 0.2s, opacity 0.2s;\n background-color: "+(primary.bc||"#ccc")+";\n cursor: pointer;\n }\n \n .rtable-select-header > div, .rtable-select-row > div, .rtable-header > div.rtable-select-header > div {\n padding: 0;\n overflow: visible;\n width: 1.5em;\n height: 1.5em;\n position: relative;\n line-height: 1.8em;\n cursor: pointer;\n display: flex;\n justify-content: space-around;\n align-items: center;\n flex-grow: 0;\n display: block;\n }\n \n .rtable-select:checked {\n background-color: "+(primary.fga||"#07e")+';\n }\n \n .rtable-select-header:hover .rtable-select, .rtable-select-row:hover .rtable-select {\n opacity: 0.04;\n }\n \n .rtable-select:focus {\n opacity: 0.12;\n transform: scale(1);\n }\n \n .rtable-select-header:hover .rtable-select:focus, .rtable-select-row:hover .rtable.select:focus {\n opacity: 0.16;\n }\n \n .rtable-select:active {\n opacity: 0.4;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n \n .rtable-select-row > div:before, .rtable-select-header > div:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n border: solid 0.125em; /* Safari */\n border-color: '+(primary.fg||"#222")+";\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n position: absolute;\n top: 0.3em;\n left: 0.15em;\n transition: border-color 0.2s, background-color 0.2s;\n }\n \n .rtable-select-row > div:after, .rtable-select-header > div:after {\n content: '';\n display: inline-block;\n opacity: 0;\n position: absolute;\n width: 1.2em;\n height: 1.2em;\n top: 0.3em;\n left: 0.15em;\n border-radius: 0.125em;\n }\n \n .rtable-selected .rtable-select-row > div:before, .rtable-all-selected > div:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n \n .rtable-selected .rtable-select-row > div:after, .rtable-all-selected > div:after {\n border-color: "+(primary.bg||"#fff")+';\n background: no-repeat center/80% url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="'+(primary.bg||"#fff").replace(/#/g,"%23")+'" d="m 15.378906,1.7050781 a 1.0583349,1.0583349 0 0 0 -1.478515,0.234375 L 6.6210937,11.960938 1.8652344,8.5058594 a 1.0583349,1.0583349 0 0 0 -1.47851565,0.234375 1.0583349,1.0583349 0 0 0 0.234375,1.4785156 L 6.234375,14.294922 A 1.0584408,1.0584408 0 0 0 7.7128906,14.060547 L 15.613281,3.1835938 A 1.0583349,1.0583349 0 0 0 15.378906,1.7050781 Z" /></svg>\') '+(primary.fga||"#07e")+";\n opacity: 1;\n }\n \n .rtable-row-wrap > .rtable-select-header,\n .rtable-row-wrap > .rtable-select-row {\n text-align: center;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: "+(table.selectWidth||"2em")+";\n }\n \n .rtable-row-wrap > .rtable-select-row {\n border-style: solid;\n border-color: "+(table.divider||primary.bc||"#ccc")+";\n border-width: 0 0 1px 0;\n }\n \n .rtable-inner-row-wrap {\n border-style: solid;\n border-color: "+(table.divider||primary.bc||"#ccc")+";\n border-width: 0 0 1px 0;\n }\n \n .rtable-column button, .rtable-column .btn {\n padding: 0 0.5em;\n margin: 0.2em 0.5em;\n min-height: 0;\n }\n \n .rtable-column.rtable-editing, .rtable-column.rtable-editing > .rtable-edit {\n padding: 0;\n }\n .rtable-column.rtable-editing input {\n width: 100%;\n box-sizing: border-box;\n height: 100%;\n margin: 0;\n border: none;\n background-color: transparent;\n padding: 0.25em 0.5em;\n }\n \n .rtable-valign-top .rtable-row:not(.rtable-header) .rtable-column > div,\n .rtable .rtable-row:not(.rtable-header) > .rtable-column.rtable-valign-col-top > div {\n display: flex;\n height: 100%;\n align-items: flex-start;\n box-sizing: border-box;\n }\n .rtable-valign-bottom .rtable-row:not(.rtable-header) .rtable-column > div,\n .rtable .rtable-row:not(.rtable-header) > .rtable-column.rtable-valign-col-bottom > div {\n display: flex;\n height: 100%;\n align-items: flex-end;\n box-sizing: border-box;\n }\n .rtable-valign-center .rtable-row:not(.rtable-header) .rtable-column > div,\n .rtable .rtable-row:not(.rtable-header) > .rtable-column.rtable-valign-col-center > div {\n display: flex;\n height: 100%;\n align-items: center;\n box-sizing: border-box;\n }\n "+(data("table.includeGrid")?gridStyle(data):"")}.call(this,data)].join(" ")},cssId:"rtable",noCssTransform:true,attributes:["auto-titles","paginate","items","filter","data-handler","sort-handler","sort","helpers","fixed","allow-select","allow-select-all","border","fixed-header","valign","no-header","empty","shuffle","no-wrap","parameters"],components:{table:false,Table:false},syncComputedChildren:true,decorators:{grid:grid,sized:sized,scrollother:scrollother},events:{},use:[click({name:"clickd",count:1}),click({name:"dblclickd",count:2}),expand(),scrolled()],on:{construct:construct,config:function config(){this.set(this._init.sets);Object.assign(this.partials,this._init.partials)},render:function render(){if(this._autoObserver){this._autoObserver.fire()}},selectAll:function selectAll(){var sel,item;if(this._allSelected()){item=null;sel=[];this.set({selections:sel,selected:item})}else{sel=(this.get("paginate")==="virtual"?this.get("rows"):this.get("visibleRows")).slice();item=sel[0];this.set({selections:sel,selected:item})}this.fire("selection",{},{item:item,items:sel});return false},selectAllAll:function selectAllAll(){var item=null;var sel=this.get("rows").slice();this.set({selections:sel,selected:item});this.fire("selection",{},{item:item,items:sel});return false}},observe:{_rows:function _rows(){var this$1=this;if(this._rowbounce){clearTimeout(this._rowbounce)}setTimeout(function(){return this$1._rows()},this.get("@style.raui.table.debounce")||160)},paginate:{handler:function handler(v){var this$1=this;if(v==="auto"||v==="virtual"||v instanceof Ractive){if(this._autoObserver){this._autoObserver.cancel()}if(this._scrollListener){this._scrollListener.cancel()}var root=v==="auto"||v==="virtual"?this.root:v;var sized=false;var fn=function(){if(!this$1.rendered){return}var top=this$1.find(".rtable-top");if(!top){return}if(!this$1.get("items.length")){if(!this$1._autoLenObserver){this$1._autoLenObserver=this$1.observeOnce("items",function(){this$1._autoLenObserver=0;setTimeout(fn)})}return}var size=top.clientHeight+","+top.clientWidth;if(fn.last===size&&sized){return}{var ctx=this$1.getContext(top);if(ctx.decorators&&ctx.decorators.scrolled){ctx.decorators.scrolled.refresh()}}var header=this$1.find(".rtable-header")||{};var rows=Array.apply(null,this$1.findAll(".rtable-live")).map(function(r){return r.offsetHeight});if(rows.length<5){var auto=Math.floor(top.clientHeight/(header.offsetHeight||1));if(auto<5){auto=5}this$1.set("_paginate",auto);rows=Array.apply(null,this$1.findAll(".rtable-live")).map(function(r){return r.offsetHeight})}if(rows.length>0){sized=true}else{rows=[25]}var avg=Math.ceil(rows.reduce(function(a,c){return a+c},0)/rows.length);this$1._avgSize=avg;var fit=Math.floor((top.clientHeight-(header.offsetHeight||1))/avg);if(v==="virtual"){fit=fit+10;if(fit<30){fit=30}}this$1.set("_paginate",fit);fn.last=size};var tm;var fnd=function(){if(tm){clearTimeout(tm)}tm=setTimeout(function(){fn();tm=null;if(sized&&this$1._scrollListener){this$1._scrollListener.fn()}},50)};this._autoObserver=this.observe("~/tableHeight",fnd);this._autoObserver.fire=fnd;if(v==="virtual"){var lock=false;var node;var fn$1=function(){if(!this$1.rendered){node=null;return}if(!node){node=this$1.find(".rtable-top")}if(!sized){return fnd()}var top=node.scrollTop;var virtual=this$1.get("virtual")||{};var offset=virtual.offset;var visible=this$1.get("_paginate");var page=visible-10;var count=this$1.get("rows.length");if(visible>count){visible=count}var avg=this$1._avgSize;var pageSize=page*avg;var wnd=Math.floor(top/avg);var first=wnd-5;if(first<0){first=0}var hardFirst=first;if(first+visible>count){first=count-visible}if(offset===first&&!isNaN(virtual.top)){return lock=false}if(!isNumber(offset)||isNaN(offset)||isNaN(virtual.top)||top<virtual.top+pageSize||top>virtual.bottom-pageSize||offset>0&&top<avg*page){var amtAbove=hardFirst;var amtBelow=count-hardFirst-visible;if(amtAbove<0){amtBelow+=amtAbove*-1;amtAbove=0}else if(amtAbove>count-visible){amtAbove=count-visible}if(amtBelow<0){amtBelow=0}var above=amtAbove*avg;var below=amtBelow*avg;var vis,next;if(first<offset+visible&&first>offset-visible){if(first>offset){vis=this$1.findAll(".rtable-live")[first-offset]}else{vis=this$1.findAll(".rtable-live")[offset-first]}}if(vis&&first>0&&vis.offsetTop>node.scrollTop-pageSize-5&&vis.offsetTop<node.scrollTop+pageSize){next=vis.offsetTop}this$1.set({"virtual.above":above,"virtual.below":below,"virtual.offset":first});if(typeof next==="number"){if(next!==vis.offsetTop){this$1.set("virtual.above",above+(next-vis.offsetTop))}}this$1.set({"virtual.top":this$1.get("virtual.above"),"virtual.bottom":node.scrollHeight-below})}lock=false};var scroll=this._scrollListener=this.on("scroll",function(ref){var node=ref.node;if(!lock){lock=true;requestAnimationFrame(fn$1)}});scroll.fn=fn$1;scroll.observer=this.observe("rows.length",function(){this$1.set("virtual.offset",null);fn$1()},{init:false,strict:true,defer:true});var cancel=scroll.cancel;scroll.cancel=function(){cancel();scroll.observer.cancel()}}fnd()}else{if(this._autoObserver){this._autoObserver.cancel()}if(this._scrollListener){this._scrollListener.cancel()}}if(isNumber(v)){this.set("_paginate",v)}},defer:true},"scrollOffset tableHeight":{handler:function handler(){var this$1=this;requestAnimationFrame(function(){var top=this$1.find(".rtable-top");var ctx=top&&this$1.getContext(top);if(ctx&&ctx.decorators&&ctx.decorators.scrolled){ctx.decorators.scrolled.refresh()}})},init:false},scroll:function scroll(v,o){if(~(v||"").indexOf("top")&&!~(o||"").indexOf("top")){this.fire("scrolltop",{})}if(~(v||"").indexOf("bottom")&&!~(o||"").indexOf("bottom")){this.fire("scrollbottom",{})}}},data:function data(){return Object.assign({page:0,selections:[],showGroups:true,allowGroupSelect:true,expanded:null,minPerPage:10,virtual:{offset:0},shuffle:false,rows:[]},Table.settings)},computed:{allowSelect:function allowSelect(){return this.get("allow-select")},allowSelectAll:function allowSelectAll(){return this.get("allow-select-all")},fixedHeader:function fixedHeader(){return this.get("fixed-header")},autoTitles:function autoTitles(){return this.get("auto-titles")},noHeader:function noHeader(){return this.get("no-header")},noWrap:function noWrap(){return this.get("no-wrap")},_rows:function _rows(){var src=(this.get("items")||[]).slice();var filter=this.get("filter");var sort=this.get("sort");var params=this.get("parameters");var ref=[this.get("data-handler"),this.get("@style.raui.table.data-handler")];var localh=ref[0];var classh=ref[1];var ref$1=[this.get("data-pre-handler"),this.get("@style.raui.table.data-pre-handler")];var localp=ref$1[0];var classp=ref$1[1];if(localp||classp){(localp||classp)(this,src,filter,sort,params)}return{}},visibleRows:function visibleRows(){var this$1=this;var rows=this.get("rows");var paginate=this.get("paginate");var per=paginate;var intPer=this.get("_paginate");var offset=this.get("page")||0;var virtual=this.get("virtual");if(!per){return rows}if(typeof per!=="number"&&isNaN(+per)){if(per==="auto"||per==="virtual"||per instanceof Ractive){per=intPer||1}else{per=30}}if(per<this.get("minPerPage")){per=this.get("minPerPage")}if(paginate==="virtual"){offset=virtual&&virtual.offset||0;return rows.slice(offset,offset+per)}else{if(offset*per>rows.length){setTimeout(function(){return this$1.set("page",0)},0)}return rows.slice(per*offset,per*offset+per)}},pagination:function pagination(){var items=this.get("items")||empty;var rows=this.get("rows");var paginate=this.get("paginate");var per=paginate;var offset=this.get("page")||0;if(typeof per!=="number"&&isNaN(per)){per=this.get("_paginate")}if(per<this.get("minPerPage")){per=this.get("minPerPage")}if(!per){return}var total=Math.ceil(rows.length/per);var info={max:Math.ceil(items.length/per),total:total,per:per};if(paginate==="virtual"){info.height=this._avg*rows.length}if(info.total>14){var arr=info.array=[];if(offset>5){arr.push(1,2,3,"...")}else{arr.push(1,2,3,4,5,6,7,8)}if(offset>5&&offset+6<total){arr.push(offset-1,offset,offset+1,offset+2,offset+3,"...",total-2,total-1,total)}else if(offset+6<total){arr.push("...",total-2,total-1,total)}else{arr.push(total-7,total-6,total-5,total-4,total-3,total-2,total-1,total)}}else{info.array=Array.apply(null,{length:info.total}).map(function(v,i){return i+1})}return info},groups:function groups(){var rows=this.get("rows");var last,cur;var res={};for(var i=0;i<rows.length;i++){cur=rows[i][this._init.by];if(cur!=last){res[i]=1}last=cur}return res}}});var notNumbers=/^[^\d]*/;export function numberify(v){if(isNumber(v)){return v}if(!v){return+Infinity}v=(""+v).replace(notNumbers,"");if(!v){return+Infinity}return parseFloat(v)}function columnGetter(table,col,sort){if(typeof col.get==="function"){return col.get}var path=(sort?col.sort:0)||col.path||col.filter||col.id;if(typeof path==="string"){var arr=Ractive.splitKeypath(path);return function(row){var v=row;for(var i=0;i<arr.length;i++){v=v&&v[arr[i]]}return v}}}function defaultFilter(table,rows,filter,sort){var all=[].concat(table.viewmodel.value.columns,table.viewmodel.value.fields);var map=all.reduce(function(a,c){return((a[c.id]=columnGetter(table,c))||true)&&a},{});var cols=Object.values(map);var list=rows||[];var src=list;if((filter instanceof RegExp||isString(filter))&&filter){var nocase=filter===""+filter.toLowerCase()||filter===""+filter.toUpperCase();try{var re=isString(filter)?new RegExp(filter,nocase?"i":""):filter;list=list.filter(function(l){var i=cols.length;while(i--){var v=l&&cols[i](l);if(v&&re.test(v)){return true}}})}catch(e){}}if(isString(sort)||isObject(sort)&&!Array.isArray(sort)){sort=[sort]}if(Array.isArray(sort)){sort=sort.map(function(f){if(isString(f)){var id$1=f[0]==="-"||f[0]==="+"?f.substr(1):f;var col=all.find(function(c){return c.id===id$1});if(!col){return}var res={get:columnGetter(table,col,true),dir:f[0]==="-"?-1:1};if(col&&col.type==="number"){var get=res.get;res.get=function(v){return numberify(get.call(table,v))}}return res}else if(f&&typeof f==="object"){var col$1=all.find(function(c){return c.id===id});if(!col$1){return}var res$1={dir:isNumber(f.dir)?f.dir:f.dir==="desc"?-1:1,get:columnGetter(table,col$1,true)};if(f.type==="number"||col$1&&col$1.type==="number"){var get$1=res$1.get;res$1.get=function(v){return numberify(get$1.call(table,v))}}return res$1}}).filter(function(s){return s&&s.get});list.sort(function(a,b){var aa,bb,p;for(var i=0;i<sort.length;i++){aa=sort[i].get.call(table,a);bb=sort[i].get.call(table,b);p=sort[i].dir*(aa<bb?-1:aa>bb?1:0);if(p!==0){return p}}return p})}return list}function makeRows(columns){var z=[{n:"gridValue",x:{r:"~/gridValue"}},{n:"gridName",x:{r:"~/gridName"}},{n:"gridSize",x:{r:"~/tableWidth"}},{n:"gridMax",x:{r:"~/gridMax"}},{n:"table",x:{r:"@this"}}];var sortKey="[_0._setSort(_1,_2)]";var headerCols=columns.filter(function(c){return c.hidden!==true}).map(function(c,cidx){if(c.index==null){c.index=cidx}c.attrsHP=c.attrs.filter(function(a){return a.n!=="title"});var div={t:7,e:"div",f:[{t:7,e:"div",f:[{t:16,r:"~/columns."+cidx+".label",c:{r:"."},z:z}]}],m:[{t:13,n:"title",f:c.title||c.label},{t:16,r:"~/columns."+cidx+".attrsHP",z:z}]};if(c.type){div.m.push({t:13,n:"class-rtable-"+c.type+"-column"})}if(c.filter||c.sort){div.m.push({t:13,n:"class-rtable-sortable"},{t:4,n:53,r:"~/columns."+cidx,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:sortKey}}]})}div.m.push({t:13,n:"class-rtable-column"});if(c.fixed){var path=c.fixed.path||"~/columns."+cidx+".fixed";div.m.push({t:13,n:"class-rtable-fixed-column",f:[{t:2,r:path}]});div.m.push({t:4,n:50,x:{r:["~/noWrap",path],s:"_0&&typeof _1==='string'"},f:[{t:13,n:"style-left",f:[{t:2,r:path}]}]})}var res=div;if(c.hidden&&c.hidden.r){res={t:4,n:51,r:c.hidden.r,f:[div]}}return res});var rowCols=columns.filter(function(c){return c.hidden!==true}).map(function(c,cidx){var content=[{t:7,e:"div",f:[{t:16,r:"~/columns."+cidx+".content",c:{r:"."},z:z}]}];if(c.attrs.length){c.attrsP=c.attrs;c.attrs=[{t:16,r:"~/columns."+cidx+".attrsP",c:{r:"."},z:z}]}else{c.attrs=[]}var attrs=c.attrs;if(c.fixed){var path=c.fixed.path||"~/columns."+cidx+".fixed";attrs.push({t:13,n:"class-rtable-fixed-column",f:[{t:2,r:path}]});attrs.push({t:4,n:50,x:{r:["~/noWrap",path],s:"_0&&typeof _1==='string'"},f:[{t:13,n:"style-left",f:[{t:2,r:path}]}]})}if(c.editable&&(c.filter||c.editP)){var noclicky={t:70,n:["click","mousedown","pointerdown","MSPointerDown","touchstart"],f:{r:["@event"],s:"[_0.stopPropagation()]"}};var editor=[{t:4,n:50,x:{r:["~/columns."+cidx+".editP"],s:"Array.isArray(_0)"},f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-edit"},noclicky],f:[{t:16,r:"~/columns."+cidx+".editP"}]}]},{t:4,n:50,l:1,x:{r:["~/columns."+cidx+".type"],s:"_0==='boolean'"},f:[{t:7,e:"input",m:[{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,r:c.filter}]},noclicky]}]},{t:4,n:51,l:1,f:[{t:7,e:"input",m:[{t:13,n:"value",f:[{t:2,r:c.filter}]},noclicky]}]}];if(typeof c.editable==="object"){attrs.push({t:13,n:"class-rtable-editing",f:c.editable});content=[Object.assign({},c.editable,{t:4,n:50,f:editor}),{t:4,n:51,l:1,f:content}]}else{attrs.push({t:13,n:"class-rtable-editing"});content=editor}}if(c.valign){attrs.push({t:13,n:"class-rtable-valign-col-top",f:[{t:2,x:{r:["~/columns."+cidx+".valign"],s:"_0==='top'"}}]},{t:13,n:"class-rtable-valign-col-bottom",f:[{t:2,x:{r:["~/columns."+cidx+".valign"],s:"_0==='bottom'"}}]},{t:13,n:"class-rtable-valign-col-center",f:[{t:2,x:{r:["~/columns."+cidx+".valign"],s:"_0==='center'"}}]})}var div={t:7,e:"div",f:content,m:attrs};if(c.type){attrs.unshift({t:13,n:"class-rtable-"+c.type+"-column"})}attrs.push({t:13,n:"class-rtable-column"});var title=c.attrsP&&c.attrsP.find(function(a){return a.n==="title"});if(!title){attrs.unshift({t:4,n:50,r:"~/autoTitles",f:[{t:13,n:"title",f:c.content.find(function(e){return e.e})?c.label:c.content}]})}else if(!title.f){attrs.unshift({t:13,n:"title",f:c.content.find(function(e){return e.e})?c.label:c.content});c.attrsP.splice(attrs.indexOf(title),1)}if(c.noPad===0){attrs.push({t:13,n:"class-rtable-no-pad"})}else if(c.noPad){attrs.push({t:13,n:"class-rtable-no-pad",f:c.noPad})}var res=div;if(c.hidden&&c.hidden.r){res={t:4,n:51,r:c.hidden.r,f:[div]}}return res});return[headerCols,rowCols,z]}var colAttrs=["label","type","filter","hidden","sort","no-pad","id","editable","fixed"];var cell=/^[a-z]{1,3}[0-9]+(?:-[0-9]+)?$/;var empty=[];function construct(){var cmp=this.component;if(!cmp){return}var expandEl,hoverEl,groupEl,wrapperEl,rowEl,topEl,bottomEl,mappings;var tpl=cmp.template.f||[];var attrs=cmp.template.m?cmp.template.m.slice():[];var t=cmp.template;cmp.template={e:t.e,f:t.f,t:t.t,m:attrs};var id=0;function map(attr,partial,plain){if(attr&&attr.f&&attr.f.length===1&&attr.f[0].t===2){var n="_a"+id++;attrs.push({t:13,n:n,f:attr.f});if(plain){return n}return partial?{t:[{t:2,r:"~/"+n}]}:{t:2,r:"~/"+n}}return attr&&attr.f}function grabColumns(tpl){var columns=[];var fields=[];tpl.forEach(function(e){if(e.e==="column"||e.e==="col"){var col={};var attrs=e.m||empty;var attr;col.index=columns.length;columns.push(col);col.content=(e.f||[]).filter(function(e){return e.e!=="edit"&&e.e!=="header"});col.editP=(e.f||[]).find(function(e){return e.e==="edit"});if(col.editP){col.editP=col.editP.f}attr=attrs.find(function(a){return a.n==="id"});if(attr&&isString(attr.f)){col.id=attr.f}col.label=(e.f||[]).find(function(e){return e.e==="header"});if(col.label){col.label=col.label.f;col.title=attrs.find(function(a){return a.n==="label"});if(!col.title){col.title=attrs.find(function(a){return a.n==="header"})}if(col.title&&col.title.f){col.title=map(col.title)}}else{col.label=attrs.find(function(a){return a.n==="label"});if(!col.label){col.label=attrs.find(function(a){return a.n==="header"})}if(col.label&&col.label.f){col.label=map(col.label)}}if(!col.label){col.label=""}if(!col.id){col.id=col.label}if(!Array.isArray(col.label)){col.label=[col.label]}col.type=attrs.find(function(a){return a.n==="type"});if(col.type&&col.type.f){col.type=col.type.f}if(!col.type){col.type="string"}col.filter=attrs.find(function(a){return a.n==="filter"});if(col.filter&&col.filter.f){col.filter=map(col.filter);if(col.filter.r){col.filter=col.filter.r}}col.sort=attrs.find(function(a){return a.n==="sort"});if(col.sort&&col.sort.f){col.sort=map(col.sort);if(col.sort.r){col.sort=col.sort.r}}col.dir=attrs.find(function(a){return a.n==="dir"});if(col.dir&&col.dir.f){col.dir=map(col.dir);if(col.dir.r){col.dir=col.dir.r}}col.hidden=attrs.find(function(a){return a.n==="hidden"});if(col.hidden&&col.hidden.f===0){col.hidden=true}else if(col.hidden&&isObject(col.hidden.f)){col.hidden=map(col.hidden)}else{col.hidden=false}if(isString(col.hidden)){col.hidden=false}col.noPad=attrs.find(function(a){return a.n==="no-pad"});if(col.noPad&&col.noPad.f===0){col.noPad=0}else if(col.noPad&&isObject(col.noPad.f)){col.noPad=map(col.noPad)}else{delete col.noPad}col.editable=attrs.find(function(a){return a.n==="editable"});if(col.editable&&col.editable.f===0){col.editable=true}else if(col.editable&&isObject(col.editable.f)){col.editable=map(col.editable)}else{col.editable=false}col.valign=attrs.find(function(a){return a.n==="valign"});if(col.valign&&isObject(col.valign.f)){col.valign=map(col.valign)}else if(col.valign&&typeof col.valign.f==="string"){col.valign=col.valign.f}col.fixed=attrs.find(function(a){return a.n==="fixed"});if(col.fixed&&isObject(col.fixed.f)){col.fixed={path:map(col.fixed,false,true)}}else if(col.fixed&&typeof col.fixed.f==="string"){col.fixed=col.fixed.f}attr=attrs.find(function(a){return a.n==="get"});if(attr&&attr.f){var name=map(attr,false,true);field.get=function(val){var fn=this.get(name);return typeof fn==="function"?fn.call(this,val):undefined}}col.attrs=attrs.filter(function(a){return!~colAttrs.indexOf(a.n)});col.attrs.forEach(function(a,i){if(cell.test(a.n)){col.attrs[i]={t:13,n:"class-"+a.n}}})}else if(e.e==="field"){var field$1={};var attrs$1=e.m||empty;var a;a=attrs$1.find(function(a){return a.n==="path"});if(isString(a)){field$1.path=a}else if(a&&a.f){field$1.path=map(a)}a=attrs$1.find(function(a){return a.n==="value"});if(a&&a.f){field$1.value=map(a)}a=attrs$1.find(function(a){return a.n==="type"});if(isString(a)){field$1.type=a}else if(a&&a.f){field$1.type=map(a)}a=attrs$1.find(function(a){return a.n==="id"});if(isString(a.f)){field$1.id=a.f}a=attrs$1.find(function(a){return a.n==="dir"});if(isString(a)){field$1.dir=a}else if(a&&isString(a.f)){field$1.dir=a.f}a=attrs$1.find(function(a){return a.n==="label"});if(isString(a)){field$1.label=a}else if(a&&a.f){field$1.label=map(a)}a=attrs$1.find(function(a){return a.n==="get"});if(a&&a.f){var name$1=map(a,false,true);field$1.get=function(val){var fn=this.get(name$1);return typeof fn==="function"?fn.call(this,val):undefined}}if(!field$1.id){field$1.id=field$1.label}if(!field$1.path){field$1.path=field$1.id}fields.push(field$1)}});return{fields:fields,columns:columns}}expandEl=tpl.find(function(e){return e.e==="expand"});hoverEl=tpl.find(function(e){return e.e==="hover"});groupEl=tpl.find(function(e){return e.e==="group"});wrapperEl=tpl.find(function(e){return e.e==="wrapper"});rowEl=tpl.find(function(e){return e.e==="row"});topEl=tpl.find(function(e){return e.e==="top"});bottomEl=tpl.find(function(e){return e.e==="bottom"});this._init={sets:grabColumns(tpl),partials:{}};var columns=this._init.sets.columns;this._init.sets["meta.expand"]=expandEl&&expandEl.f&&expandEl.f.length&&expandEl.f;this._init.sets["meta.hover"]=hoverEl&&hoverEl.f&&hoverEl.f.length&&hoverEl.f;this._init.sets["meta.extra"]=rowEl&&rowEl.f&&rowEl.f.length&&rowEl.f;this._init.sets["meta.top"]=topEl&&topEl.f&&topEl.f.length&&topEl.f;this._init.sets["meta.topAttrs"]=topEl&&topEl.m;this._init.sets["meta.bottom"]=bottomEl&&bottomEl.f&&bottomEl.f.length&&bottomEl.f;this._init.sets["meta.bottomAttrs"]=bottomEl&&bottomEl.m;var ref=makeRows(columns);var headerCols=ref[0];var rowCols=ref[1];var z=ref[2];var header=[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-wrap"},{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-header"},{t:4,f:[{n:"style-opacity",f:"0",t:13}],n:50,x:{r:["~/fixedHeader","~/virtual.offset"],s:"!_0&&_1>0"}},{t:4,n:50,r:"~/fixedHeader",f:[{t:13,n:"style-padding-right",f:[{t:2,r:"~/scrollOffset"},"px"]}]}],f:[{t:7,e:"div",f:[{t:8,r:"grid-head-cols"}],m:[{t:13,n:"class-row"}]}]}];header[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-header"},{t:13,n:"class-rtable-column"},{t:13,n:"title",f:[{t:2,r:"selections.length"}," items selected"]},{t:13,n:"class-rtable-all-selected",f:[{t:2,x:{r:["@this"],s:"_0._allSelected()"}}]}],f:[{t:7,e:"div",f:[{t:4,n:50,r:"~/allowSelectAll",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["@this"],s:"_0._allSelected()"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:"selectAll"}]}]}],m:[{t:70,n:["clickd"],f:"selectAll"}]}]}]});var row=[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-wrap"},{t:13,n:"class-rtable-odd",f:[{t:2,x:{r:["@index","~/virtual.offset"],s:"(_0+_1)%2===1"}}]},{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-live"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-inner-row-wrap"}],f:[{t:7,e:"div",f:[{t:8,r:"grid-row-cols"}],m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-row"},{t:70,n:expandEl&&expandEl.f?["dblclickd"]:["click","dblclick"],f:{r:["@this","~/rows","~/visibleRows","."],s:"[_0._open(_3,_1.indexOf(_3),_2.indexOf(_3))]"}}]}]}]}];if(rowEl&&rowEl.m&&rowEl.m.length){this._init.sets.rowAttrs=rowEl.m.slice();row[0].f[0].f[0].m.push({t:16,r:"~/rowAttrs",c:{r:"."},z:z})}if(wrapperEl&&wrapperEl.m&&wrapperEl.m.length){this._init.sets.wrapperAttrs=wrapperEl.m.slice();row[0].m.push({t:16,r:"~/wrapperAttrs",c:{r:"."},z:z})}if(rowEl&&rowEl.f&&rowEl.f.length){row[0].f[0].f.push({t:7,e:"div",m:[{t:13,n:"class-rtable-row-extra"},{t:4,n:50,r:"~/noWrap",f:[{t:13,n:"style-width",f:[{t:2,x:{r:["~/tableWidth","~/allowSelect","@style.raui.table.selectWidth"],s:"_1?'calc('+_0+'px - '+(_2||'2em')+')':_0+'px'"}}]}]}],f:[{t:16,r:"~/meta.extra",c:{r:"."},z:z}]})}if(expandEl&&expandEl.f&&expandEl.f.length){var listener={t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}};var ev=expandEl.m&&expandEl.m.find(function(a){return a.n==="skip"});if(ev&&ev.f&&ev.f[0]&&ev.f[0].t===2){ev=Object.assign({},ev.f[0],{t:4,n:51,f:[listener]})}else{ev=listener}row[0].f[0].f.push({t:4,n:50,x:{r:[".","~/expanded"],s:"_0===_1"},f:[{t:7,e:"div",f:[{t:7,e:"div",f:[{t:16,r:"~/meta.expand",c:{r:"."},z:z}]}],m:[{t:13,n:"class-rtable-row-expand"},{t:4,n:50,r:"~/noWrap",f:[{t:13,n:"style-width",f:[{t:2,x:{r:["~/tableWidth","~/allowSelect","@style.raui.table.selectWidth"],s:"_1?'calc('+_0+'px - '+(_2||'2em')+')':_0+'px'"}}]}]}]}]});row[0].f[0].f[0].m.push(ev);row[0].f[0].f[1].f[0].m.push({t:70,n:["click"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}})}if(hoverEl&&hoverEl.f&&hoverEl.f.length){row[0].f[0].f.unshift({t:4,n:50,x:{r:[".","~/hovered"],s:"_0===_1"},f:[{t:7,e:"div",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-hover-content"}].concat(hoverEl.m||[]),f:[{t:16,r:"~/meta.hover",c:{r:"."},z:z}]}],m:[{t:13,n:"class-rtable-row-hover"},{t:4,n:50,r:"~/noWrap",f:[{t:13,n:"style-width",f:[{t:2,x:{r:["~/tableWidth","~/allowSelect","@style.raui.table.selectWidth"],s:"_1?'calc('+_0+'px - '+(_2||'2em')+')':_0+'px'"}}]}]}]}]});row[0].m.push({t:70,n:["mouseenter"],f:{r:["@this","@index"],s:"[_0._hover(_1)]"}},{t:70,n:["mouseleave"],f:{r:["@this","@index"],s:"[_0._unhover(_1)]"}})}row[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-row"},{t:13,n:"class-rtable-column"},{t:70,n:["clickd"],f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}}],f:[{t:7,e:"div",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}}]}]}]}]});var by;if(groupEl&&groupEl.m&&(by=groupEl.m.find(function(a){return a.n==="by"}))&&(isString(by.f)||by.length===1&&by[0].t===2)){var group={t:4,n:50,f:[{t:7,e:"div",m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-group"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:70,n:expandEl&&expandEl.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(groupEl.m.filter(function(a){return a.n!=="by"&&a.n!=="select"}))}],x:{s:"_0&&_1[(_1&&(_2*_3+_4))||_4]",r:["~/showGroups","~/groups","~/page","~/pagination.per","@index"]}};row.unshift(group);this._init.by=by.f;var parts=grabColumns(groupEl.f).columns.filter(function(c){return c.hidden!==true}).map(function(c){var div={t:7,e:"div",f:[{t:7,e:"div",f:c.content}],m:c.attrs};if(c.type){div.m.unshift({t:13,n:"class-rtable-"+c.type+"-column"})}div.m.push({t:13,n:"class-rtable-column"});if(!div.m.find(function(a){return a.n==="title"})){div.m.unshift({t:13,n:"title",f:c.content})}var res=div;if(c.hidden&&c.hidden.r){res={t:4,n:51,r:c.hidden.r,f:[div]}}return res});parts.unshift({t:4,n:50,r:"~/allowGroupSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-row"},{t:13,n:"class-rtable-column"},{t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._selectGroup(_1),false]"}},{t:13,n:"class-rtable-all-selected",f:[{t:2,x:{r:["@this","@index"],s:"_0._groupSelected(_1)"}}]}],f:[{t:7,e:"div",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["@this","@index"],s:"_0._groupSelected(_1)"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:{r:["@this","@index"],s:"[_0._selectGroup(_1),false]"}}]}]}]}]});var attr;if(attr=groupEl.m.find(function(a){return a.n==="select"})){(mappings||(mappings=[])).push(Object.assign({},attr,{n:"allowGroupSelect"}))}if(attr=groupEl.m.find(function(a){return a.n==="show"})){(mappings||(mappings=[])).push(Object.assign({},attr,{n:"showGroups"}))}group.f[0].f=parts}this._init.partials["grid-row"]=row;this._init.partials["grid-row-cols"]=rowCols;this._init.partials["grid-head"]=header;this._init.partials["grid-head-cols"]=headerCols;if(mappings&&this.component){this.component.mappings=mappings}}export function plugin(opts){if(opts===void 0)opts={};return function(ref){var Ractive=ref.Ractive;var instance=ref.instance;if("includeGrid"in opts){Ractive.styleSet("table.includeGrid",opts.includeGrid)}instance.components[opts.name||"data-table"]=Table}}globalRegister("RauiTable","components",Table);export default plugin;
import Ractive from"ractive";import{grid,style as gridStyle}from"./grid";import click from"./event-click";import expand from"./transition-expand";import scrolled from"./scrolled";import{sized}from"./watch-size";import globalRegister from"./globalRegister";var sortRE=/^([-+])?([^\s]+)$/;function isString(v){return typeof v==="string"}function isNumber(v){return typeof v==="number"}function isObject(v){return typeof v==="object"}function isRegex(v){return typeof v==="object"&&Object.prototype.toString.call(v)==="RegExp"}export var Table=function(Ractive){function Table(opts){Ractive.call(this,opts)}if(Ractive)Table.__proto__=Ractive;Table.prototype=Object.create(Ractive&&Ractive.prototype);Table.prototype.constructor=Table;var prototypeAccessors={selections:{configurable:true},selected:{configurable:true},rows:{configurable:true},visibleRows:{configurable:true},allRows:{configurable:true}};Table.prototype._allSelected=function _allSelected(){var sel=this.get("selections");var visible=this.get("paginate")==="virtual"?this.get("rows"):this.get("visibleRows");for(var i=0;i<visible.length;i++){if(!~sel.indexOf(visible[i])){return false}}return visible.length&&true};Table.prototype._setSort=function _setSort(index,ev){var ref=[this.get("sort-handler"),this.get("@style.raui.table.sort-handler")];var localh=ref[0];var classh=ref[1];var fn=localh||classh;if(fn){fn(this,this.get("columns."+index),index,ev)}else{var sort=this.get("sort")||"";var col=this.get("columns."+index);var id=col.id;if(sort===id||sort.substr(1)===id){if(sort[0]==="-"){this.set("sort",id)}else{this.set("sort","-"+id)}}else{this.set("sort",id)}}};Table.prototype.nodeSet=function nodeSet(node,prop,value){node[prop]=value};Table.prototype._expand=function _expand(idx){var this$1=this;var which=this.get("visibleRows")[idx];var current=this.get("expanded");var expanded=this.find(".rtable-row-expand");if(expanded){this.transition("expand",expanded,{outro:true}).then(function(){if(current===which){this$1.set("expanded",null)}else{this$1.set("expanded",which);this$1.transition("expand",this$1.find(".rtable-row-expand"),{intro:true})}})}else{if(which===current){this.set("expanded",null)}else{this.set("expanded",which);this.transition("expand",this.find(".rtable-row-expand"),{intro:true})}}};Table.prototype._hover=function _hover(idx){this.set("hovered",this.get("~/visibleRows")[idx]);return false};Table.prototype._unhover=function _unhover(idx){if(this.find(".rtable-top .rtable-row-wrap:hover")){return}else{this.set("hovered",undefined)}return false};Table.prototype._select=function _select(src,ev){var sels=this.get("selections");if(!sels){sels=[];this.set("selections",sels)}var i=sels.indexOf(src);if(~i){this.splice("selections",i,1)}else{this.push("selections",src)}if(i>=sels.length||sels.length===1){this.set("selected",sels[sels.length-1])}this.fire("selection",{},{item:sels[sels.length-1],items:sels});setTimeout(function(){return ev.target.checked=!~i});return false};Table.prototype._open=function _open(row,idx,vidx){var this$1=this;if(this._opentm){return}this.fire("selected",{},row,idx,vidx);this._opentm=setTimeout(function(){this$1._opentm=null},500)};Table.prototype.select=function select(){var selected=this.get("selected");if(selected){this.fire("selected",{},selected,this.get("rows").indexOf(selected),this.get("visibleRows").indexOf(selected))}};Table.prototype.deselect=function deselect(){this.set({selections:[],selected:undefined})};prototypeAccessors.selections.get=function(){return this.get("selections")||[]};prototypeAccessors.selections.set=function(v){var rows=this.get("rows");var sels=Array.isArray(v)?v.filter(function(i){return~rows.indexOf(i)}):[];this.set("selections",sels)};prototypeAccessors.selected.get=function(){return this.get("selected")};prototypeAccessors.selected.set=function(v){this.set({selected:v,selections:[v]})};prototypeAccessors.rows.get=function(){return this.get("rows")};prototypeAccessors.visibleRows.get=function(){return this.get("visibleRows")};prototypeAccessors.allRows.get=function(){return this.get("items")};Table.prototype.selectionOffset=function selectionOffset(offset){var selected=this.get("selected");var visible=this.get("visibleRows");if(!selected||!~visible.indexOf(selected)){var next=offset>0?visible[0]:visible[visible.length-1];this.set({selected:next,selections:[next]})}else{var idx=visible.indexOf(selected);if(offset>0?idx+offset>=visible.length:idx+offset<0){var move=offset<1?-1:1;if(move<0&&this.get("page")+move>=0||move>0&&this.get("page")+move<this.get("pagination.total")){this.add("page",move)}visible=this.get("visibleRows");var next$1=offset>0?visible[0]:visible[visible.length-1];this.set({selected:next$1,selections:[next$1]})}else{this.set({selected:visible[idx+offset],selections:[visible[idx+offset]]})}}this.fire("selection",{},{item:this.get("selected"),items:this.get("selections")})};Table.prototype.selectionDown=function selectionDown(){this.selectionOffset(1)};Table.prototype.selectionUp=function selectionUp(){this.selectionOffset(-1)};Table.prototype._selectGroup=function _selectGroup(idx){var grp=idx;if(this.get("page")){grp+=this.get("page")*this.get("pagination.per")}var rows=this.get("rows");var groups=this.get("groups");var sels=this.get("selections");var x=rows[grp++];var xs=["selections"];var ss=[];var i;if(!~(i=sels.indexOf(x))){xs.push(x)}else{ss.push(i)}while(grp<rows.length&&!(grp in groups)){x=rows[grp++];if(!~(i=sels.indexOf(x))){xs.push(x)}else{ss.push(i)}}if(xs.length===1){i=ss.length;while(i--){this.splice("selections",ss[i],1)}}else{this.push.apply(this,xs)}return false};Table.prototype._groupSelected=function _groupSelected(idx){var grp=idx;if(this.get("page")){grp+=this.get("page")*this.get("pagination.per")}var rows=this.get("rows");var groups=this.get("groups");var sels=this.get("selections");if(!~sels.indexOf(rows[grp++])){return false}while(grp<rows.length&&!(grp in groups)){if(!~sels.indexOf(rows[grp++])){return false}}return true};Table.prototype._rows=function _rows(){var src=(this.get("items")||[]).slice();var filter=this.get("filter");var sort=this.get("sort");var ref=[this.get("data-handler"),this.get("@style.raui.table.data-handler")];var localh=ref[0];var classh=ref[1];var handler=localh||classh||defaultFilter;if(!filter&&!sort){this.set("isFiltered",false);return this.set("rows",src)}var res=handler(this,src,filter,sort,this.get("parameters",{virtual:true}));this.set("isFiltered",res.length!==src.length);this.set("rows",res);var sels=this.get("selections");this.set("selections",sels.filter(function(s){return~src.indexOf(s)}));if(!~src.indexOf(this.get("selection"))){this.set("selected",undefined)}};Table.prototype.replaceColumns=function replaceColumns(columns){var ref=makeRows(columns);var headerCols=ref[0];var rowCols=ref[1];this.set("columns",columns);this.resetPartial("grid-row-cols",rowCols);this.resetPartial("grid-head-cols",headerCols)};Object.defineProperties(Table.prototype,prototypeAccessors);return Table}(Ractive);function scrollother(node,find){var this$1=this;var scroll=function(ev){if(scrollother.lock&&scrollother.lock!==node){return}if(scrollother.tm){clearTimeout(scrollother.tm)}scrollother.lock=node;this$1.find(find).scrollLeft=ev.target.scrollLeft;scrollother.tm=setTimeout(function(){scrollother.tm=null;scrollother.lock=false},100)};node.addEventListener("scroll",scroll,{passive:true});return{teardown:function teardown(){node.removeEventListener("scroll",scroll)}}}Table.settings={valign:"center",border:false,"fixed-header":true,"allow-select":true,"allow-select-all":true,"auto-titles":false,paginate:"virtual"};Ractive.extendWith(Table,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable",g:1},{n:"class-rtable-virtual",t:13,f:[{t:2,x:{r:["~/paginate"],s:'_0==="virtual"'}}]},{n:"class-rtable-auto",t:13,f:[{t:2,x:{r:["~/paginate"],s:'_0==="auto"'}}]},{n:"class-rtable-fixed",t:13,f:[{t:2,r:"~/fixed"}]},{n:"class-rtable-border",t:13,f:[{t:2,r:"~/border"}]},{n:"class-rtable-fixed-header",t:13,f:[{t:2,r:"~/fixedHeader"}]},{n:"class-rtable-scrolled-down",t:13,f:[{t:2,x:{r:["~/scroll"],s:'!~(_0||"").indexOf("top")'}}]},{n:"class-rtable-scrolled-up",t:13,f:[{t:2,x:{r:["~/scroll"],s:'!~(_0||"").indexOf("bottom")'}}]},{n:"class-rtable-with-select",t:13,f:[{t:2,r:"~/allowSelect"}]},{n:"class-rtable-valign-top",t:13,f:[{t:2,x:{r:["~/valign"],s:'_0==="top"'}}]},{n:"class-rtable-valign-center",t:13,f:[{t:2,x:{r:["~/valign"],s:'_0==="center"'}}]},{n:"class-rtable-valign-bottom",t:13,f:[{t:2,x:{r:["~/valign"],s:'_0==="bottom"'}}]},{n:"class-rtable-nowrap",t:13,f:[{t:2,r:"~/noWrap"}]},{n:"class-rtable-wrap",t:13,f:[{t:2,x:{r:["~/noWrap"],s:"!_0"}}]},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-fixed",g:1},{n:"grid",t:71,f:{r:["~/scrollOffset"],s:"[{offset:_0}]"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-extra",g:1},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/tableWidth"},"px"],t:13}],n:50,r:"~/noWrap"},{n:"class-rtable-noheader",t:13,f:[{t:2,r:"~/noHeader"}]},{t:4,f:[{t:16,r:"meta.topAttrs"}],n:50,r:"meta.topAttrs"}],f:[{t:16,r:"meta.top",z:[{n:"selectedCount",x:{r:"selections.length"}},{n:"rowCount",x:{r:"rows.length"}},{n:"table",x:{r:"@this"}},{n:"selected",x:{r:"selected"}},{n:"selections",x:{r:"selections"}}]}]}],n:50,r:"meta.top"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-wrapper row-wrap",g:1},{t:4,f:[{n:"scrollother",t:71,f:{r:[],s:'[".rtable-top"]'}}],n:50,r:"~/noWrap"}],f:[{t:8,r:"grid-head"}]}],n:51,r:"~/noHeader"}]}],n:50,x:{r:["~/noHeader","meta.top","~/fixedHeader"],s:"(!_0||_1)&&_2"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-top",g:1},{t:4,f:[{n:["scrolled"],t:70,f:"scroll"},{n:"sized",t:71,f:{r:[],s:'[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]'}}],n:50,x:{r:["~/paginate"],s:'_0==="virtual"'}},{t:4,f:[{n:"scrolled",t:71,f:{r:[],s:'["~/scroll"]'}}],n:50,x:{r:["~/noHeader","~/fixedHeader","~/meta.bottom","~/paginate"],s:'(!_0&&_1)||_2||_3==="virtual"'}},{t:4,f:[{n:"scrollother",t:71,f:{r:[],s:'[".rtable-header-wrapper"]'}}],n:50,x:{r:["~/fixedHeader","~/noWrap"],s:"_0&&_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-extra",g:1},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/tableWidth"},"px"],t:13}],n:50,r:"~/noWrap"},{n:"class-rtable-noheader",t:13,f:[{t:2,r:"~/noHeader"}]},{t:4,f:[{t:16,r:"meta.topAttrs"}],n:50,r:"meta.topAttrs"}],f:[{t:16,r:"meta.top",z:[{n:"selectedCount",x:{r:"selections.length"}},{n:"rowCount",x:{r:"rows.length"}},{n:"table",x:{r:"@this"}},{n:"selected",x:{r:"selected"}},{n:"selections",x:{r:"selections"}}]}]}],n:50,x:{r:["~/fixedHeader","meta.top"],s:"!_0&&_1"}}," ",{t:7,e:"div",m:[{n:"grid",t:71,f:{r:[],s:'[{size:"~/tableWidth",value:"~/gridValue",name:"~/gridName",max:"~/gridMax"}]'}},{t:4,f:[{n:"style-margin-top",f:[{t:2,r:"~/virtual.above"},"px"],t:13},{n:"style-margin-bottom",f:[{t:2,r:"~/virtual.below"},"px"],t:13}],n:50,x:{r:["~/paginate"],s:'_0==="virtual"'}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-wrapper row-wrap",g:1}],f:[{t:8,r:"grid-head"}]}],n:50,x:{r:["~/noHeader","~/fixedHeader"],s:"!_0&&!_1"}}," ",{t:4,f:[{t:4,f:[{t:8,r:"grid-row"}],n:52,z:[{n:"source",x:{r:"~/items"}},{n:"shuffle",x:{x:{r:[],s:"true"}}}],r:"~/visibleRows"}],n:50,r:"~/shuffle"},{t:4,f:[{t:4,f:[{t:8,r:"grid-row"}],n:52,r:"~/visibleRows"}],n:51,l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-row row t1",g:1}],f:[{t:16,r:"empty",z:[{n:"message",x:{r:"~/empty"}}]}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-bottom",g:1},{t:4,f:[{t:16,r:"meta.bottomAttrs"}],n:50,r:"meta.bottomAttrs"}],f:[{t:4,f:[{t:16,r:"meta.bottom",z:[{n:"selectedCount",x:{r:"selections.length"}},{n:"rowCount",x:{r:"rows.length"}},{n:"table",x:{r:"@this"}},{n:"selected",x:{r:"selected"}},{n:"selections",x:{r:"selections"}}]}],n:50,r:"~/meta.bottom"}," ",{t:4,f:[{t:8,r:"pagination"}],n:50,x:{r:["~/paginate"],s:'_0!=="virtual"'}}]}],n:50,x:{r:["~/paginate","~/meta.bottom"],s:'_0!=="virtual"||_1'}}]}],e:{'_0==="virtual"':function(_0){return _0==="virtual"},'_0==="auto"':function(_0){return _0==="auto"},'!~(_0||"").indexOf("top")':function(_0){return!~(_0||"").indexOf("top")},'!~(_0||"").indexOf("bottom")':function(_0){return!~(_0||"").indexOf("bottom")},'_0==="top"':function(_0){return _0==="top"},'_0==="center"':function(_0){return _0==="center"},'_0==="bottom"':function(_0){return _0==="bottom"},"!_0":function(_0){return!_0},"[{offset:_0}]":function(_0){return[{offset:_0}]},'[".rtable-top"]':function(){return[".rtable-top"]},"(!_0||_1)&&_2":function(_0,_1,_2){return(!_0||_1)&&_2},'[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]':function(){return[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]},'["~/scroll"]':function(){return["~/scroll"]},'(!_0&&_1)||_2||_3==="virtual"':function(_0,_1,_2,_3){return!_0&&_1||_2||_3==="virtual"},'[".rtable-header-wrapper"]':function(){return[".rtable-header-wrapper"]},"_0&&_1":function(_0,_1){return _0&&_1},"!_0&&_1":function(_0,_1){return!_0&&_1},'[{size:"~/tableWidth",value:"~/gridValue",name:"~/gridName",max:"~/gridMax"}]':function(){return[{size:"~/tableWidth",value:"~/gridValue",name:"~/gridName",max:"~/gridMax"}]},"!_0&&!_1":function(_0,_1){return!_0&&!_1},true:function(){return true},'_0!=="virtual"':function(_0){return _0!=="virtual"},'_0!=="virtual"||_1':function(_0,_1){return _0!=="virtual"||_1},"(_0+_1)%2===1":function(_0,_1){return(_0+_1)%2===1},"[_0._setSort(_1,_2)]":function(_0,_1,_2){return[_0._setSort(_1,_2)]},"[_0._select(_1,_2),false]":function(_0,_1,_2){return[_0._select(_1,_2),false]},"[_0._open(_3,_1.indexOf(_3),_2.indexOf(_3))]":function(_0,_1,_2,_3){return[_0._open(_3,_1.indexOf(_3),_2.indexOf(_3))]},"[_0._expand(_1)]":function(_0,_1){return[_0._expand(_1)]},"[_0.stopPropagation()]":function(_0){return[_0.stopPropagation()]},"_0.indexOf(_1)":function(_0,_1){return _0.indexOf(_1)},"_0===_1":function(_0,_1){return _0===_1},"_0>0":function(_0){return _0>0},"!_0&&_1>0":function(_0,_1){return!_0&&_1>0},'_0==="boolean"':function(_0){return _0==="boolean"},"_0._allSelected()":function(_0){return _0._allSelected()},'_0||"No data."':function(_0){return _0||"No data."},"_0*_1+1":function(_0,_1){return _0*_1+1},"_2+1===_0?_1:(_2+1)*_3":function(_0,_1,_2,_3){return _2+1===_0?_1:(_2+1)*_3},"_0===1":function(_0){return _0===1},"_0._allSelected()&&_1<_2":function(_0,_1,_2){return _0._allSelected()&&_1<_2},'[_0.set("page",_1-1)]':function(_0,_1){return[_0.set("page",_1-1)]},'[(/^\\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1))||_2.nodeSet(_3,"value",_4+1)]':function(_0,_1,_2,_3,_4){return[/^\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1)||_2.nodeSet(_3,"value",_4+1)]},"_0==_1+1":function(_0,_1){return _0==_1+1},'[_0.set("page",_2[_1-1])]':function(_0,_1,_2){return[_0.set("page",_2[_1-1])]},'_0==="..."':function(_0){return _0==="..."},'[_0.set("page",_1+1)]':function(_0,_1){return[_0.set("page",_1+1)]},"_0<_1-1":function(_0,_1){return _0<_1-1}},p:{"csp-dummy":[{t:7,e:"div",m:[{n:"class-rtable-odd",t:13,f:[{t:2,x:{r:["@index","~/virtual.offset"],s:"(_0+_1)%2===1"}}]},{n:"class-top",t:13,f:[{t:2,x:{r:[".valign"],s:'_0==="top"'}}]},{n:"class-bottom",t:13,f:[{t:2,x:{r:[".valign"],s:'_0==="bottom"'}}]},{n:"class-center",t:13,f:[{t:2,x:{r:[".valign"],s:'_0==="center"'}}]},{n:["click"],t:70,f:{r:["@this",".index","@event"],s:"[_0._setSort(_1,_2)]"}},{n:["click"],t:70,f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}},{n:["click"],t:70,f:{r:["@this","~/rows","~/visibleRows","."],s:"[_0._open(_3,_1.indexOf(_3),_2.indexOf(_3))]"}},{n:["click"],t:70,f:{r:["@this","@index"],s:"[_0._expand(_1)]"}},{n:["click"],t:70,f:{r:["@event"],s:"[_0.stopPropagation()]"}}]}," ",{t:4,f:["..."],n:50,x:{r:["~/selections","."],s:"_0.indexOf(_1)"}}," ",{t:4,f:["..."],n:50,x:{r:[".","~/expanded"],s:"_0===_1"}}," ",{t:4,f:["..."],n:50,x:{r:["~/virtual.offset"],s:"_0>0"}}," ",{t:4,f:["..."],n:50,x:{r:["~/fixedHeader","~/virtual.offset"],s:"!_0&&_1>0"}}," ",{t:4,f:["..."],n:50,x:{r:["~/columns.0.type"],s:'_0==="boolean"'}}," ",{t:4,f:["..."],n:50,x:{r:["@this"],s:"_0._allSelected()"}}],empty:[{t:7,e:"div",f:[{t:7,e:"div",f:[{t:2,x:{r:["message"],s:'_0||"No data."'}}]}]}],pagination:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-pagination",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-info",g:1}],f:[{t:4,f:[{t:2,x:{r:["~/page","~/pagination.per"],s:"_0*_1+1"}}," - ",{t:2,x:{r:["~/pagination.total","~/rows.length","~/page","~/pagination.per"],s:"_2+1===_0?_1:(_2+1)*_3"}}," of ",{t:2,r:"~/rows.length"},{t:4,f:[" (",{t:2,r:"~/items.length"}," total)"],n:50,r:"~/isFiltered"}],n:50,x:{r:["pagination","rows.length"],s:"_0&&_1"}}," ",{t:4,f:["​"],n:50,x:{r:["_paginate"],s:"_0===1"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-select-all-all",g:1}],f:[{t:4,f:[{t:7,e:"strong",f:[{t:2,r:"selections.length"}]}," of ",{t:7,e:"strong",f:[{t:2,r:"rows.length"}]}," selected",{t:4,f:[" - ",{t:7,e:"a",m:[{n:"href",f:"#",t:13,g:1},{n:["click"],t:70,f:"selectAllAll"}],f:["Select All"]}],n:50,x:{r:["@this","selections.length","rows.length"],s:"_0._allSelected()&&_1<_2"}}],n:50,x:{r:["selections.length"],s:"_0>0"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-pages",g:1}],f:[{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","~/page"],s:'[_0.set("page",_1-1)]'}}],f:["Previous"]}],n:50,x:{r:["~/page"],s:"_0>0"}}," ",{t:4,f:[{t:4,f:[{t:7,e:"input",m:[{n:["change"],t:70,f:{r:["~/pagination.total","@node.value","@this","@node","~/page"],s:'[(/^\\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1))||_2.nodeSet(_3,"value",_4+1)]'}},{n:"value",f:[{t:2,r:"."}],t:13},{t:73,v:"t",f:"false"}]}],n:50,x:{r:[".","~/page"],s:"_0==_1+1"}},{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","@index","../"],s:'[_0.set("page",_2[_1-1])]'}}],f:["..."]}," "],n:50,x:{r:["."],s:'_0==="..."'},l:1},{t:4,f:[" ",{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","."],s:'[_0.set("page",_1-1)]'}}],f:[{t:2,r:"."}]}],n:51,l:1}],n:52,r:"~/pagination.array"}," ",{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","~/page"],s:'[_0.set("page",_1+1)]'}}],f:["Next"]}],n:50,x:{r:["~/page","~/pagination.total"],s:"_0<_1-1"}}]}]}]}},css:function(data){return[function(data){var primary=Object.assign({},data("raui.primary"),data("raui.table.primary"));var active=Object.assign({},primary,data("raui.primary.active"),data("raui.table.primary.active"));var table=Object.assign({selected:{},header:{},footer:{}},data("raui.table"));return"\n .rtable {\n display: flex;\n flex-direction: column;\n overflow: auto;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n flex-grow: 2;\n }\n \n .rtable.rtable-border {\n border: 1px solid "+(table.divider||primary.bc||"#ccc")+";\n }\n \n .rtable-header {\n min-height: 2em;\n }\n \n .rtable-group > div > div,\n .rtable-header > div > div,\n .rtable-row > div > div {\n padding: "+(table.padding||"0.5em")+";\n overflow: inherit;\n text-overflow: inherit;\n line-height: 1em;\n }\n .rtable-row > .rtable-no-pad > div {\n padding: 0;\n }\n \n .rtable-auto .row > *,\n .rtable-fixed .row > *\n {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n \n .rtable-header > div > div, .rtable-column {\n overflow: hidden;\n }\n \n .rtable-number-column {\n text-align: right;\n }\n .rtable-date-column {\n text-align: right;\n }\n \n .rtable-sortable {\n cursor: pointer;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n \n .grid .row.rtable-row, .grid .rtable-header > .row {\n width: auto;\n min-width: min-content;\n flex-grow: 1;\n }\n \n .rtable-nowrap .grid .rtable-row, .rtable-nowrap .grid .rtable-header > .row {\n flex-wrap: nowrap;\n }\n .rtable-nowrap .rtable-row-wrap, .rtable-inner-row-wrap {\n flex-grow: 1;\n } \n \n .rtable-row-wrap {\n display: flex;\n flex-grow: 1;\n align-items: center;\n z-index: 2;\n align-items: stretch;\n color: "+(primary.fg||"#222")+";\n background-color: "+(table.even||primary.bga||"#f4f4f4")+";\n }\n .rtable-row-wrap:focus-within {\n z-index: 3;\n }\n .rtable-row-wrap.rtable-odd {\n background-color: "+(table.odd||primary.bg||"#fff")+";\n }\n .rtable-row-wrap:hover .rtable-inner-row-wrap, .rtable-row-wrap:hover .rtable-select-row {\n background-color: "+(table.over||active.bg||"#e6f0fa")+";\n }\n .rtable-row-wrap:hover .rtable-inner-row-wrap,\n .rtable-wrap .rtable-row-wrap:hover .rtable-select-row {\n position: relative;\n }\n .rtable-row-wrap:hover .rtable-select-row {\n overflow: visible;\n }\n \n .rtable-row-wrap:hover {\n border-bottom: "+(table.dividerSize||"4px")+" solid "+(table.divider||primary.bc||"#ccc")+";\n }\n \n .rtable-row-wrap.rtable-selected {\n background-color: "+(table.selected.bg||"#cee5fd")+";\n color: "+(table.selected.fg||primary.fg||"#222")+";\n }\n .rtable-row-wrap.rtable-selected.rtable-odd {\n background-color: "+(table.selected.odd||"#c5dffb")+";\n }\n \n .rtable-nowrap .rtable-row-wrap {\n display: inline-flex;\n min-width: 100%;\n box-sizing: border-box;\n }\n \n .rtable-nowrap > .rtable-top > .grid {\n line-height: 1em;\n }\n \n .rtable-border .rtable-row .rtable-column,\n .rtable-border .rtable-group .rtable-column {\n border-color: "+(table.divider||primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 0 0 0 1px;\n margin: 0 0 0 -1px;\n }\n .rtable-wrap.rtable-border .rtable-row .rtable-column,\n .rtable-border .rtable-group .rtable-column {\n border-width: 0 0 1px 1px;\n margin: 0 0 -1px -1px;\n }\n \n .rtable-border .rtable-header .rtable-column {\n border-width: 0 0 0 0;\n margin: 0 0 0 0;\n }\n .rtable-wrap.rtable-border .rtable-header .rtable-column {\n border-width: 0 0 1px 0;\n margin: 0 0 -1px 0;\n }\n \n .rtable-border .rtable-row .rtable-column:nth-child(1),\n .rtable-border .rtable-group .rtable-column:nth-child(1) {\n border-left-width: 0;\n }\n .rtable-border.rtable-with-select .rtable-row .rtable-column:nth-child(1),\n .rtable-border.rtable-with-select .rtable-group .rtable-column:nth-child(1) {\n border-left-width: 1px;\n }\n \n .rtable-border .rtable-row-wrap {\n border-bottom-width: 1px;\n }\n \n .rtable-border .rtable-row-expand, .rtable-border .rtable-row-extra {\n border-color: "+(table.divider||primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 1px 0 0 0;\n margin-left: -1px;\n width: 100%;\n }\n .rtable-border.rtable-with-select .rtable-row-expand, .rtable-border.rtable-with-select .rtable-row-extra {\n border-left-width: 1px;\n }\n \n .rtable-row-expand, .rtable-row-extra {\n box-sizing: border-box;\n padding: "+(table.padding||"0.5em")+";\n }\n \n .rtable-row-hover {\n pointer-events: none;\n position: relative;\n z-index: 1;\n }\n .rtable-row-hover-content {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n }\n .rtable-row-hover-content > * {\n pointer-events: visible;\n }\n \n .rtable-group {\n border-bottom: 2px solid "+(table.divider||primary.bc||"#ccc")+";\n }\n \n .rtable-header.rtable-row-wrap, .rtable-header.rtable-row-wrap:hover {\n font-weight: bold;\n background-color: "+(table.header.bg||"#dedede")+";\n }\n .rtable-header-fixed {\n line-height: 1em;\n background-color: "+(table.header.bg||"#dedede")+";\n }\n \n .rtable-header.rtable-row-wrap, .rtable-header-extra.rtable-noheader {\n border-bottom: 2px solid "+(table.divider||primary.bc||"#ccc")+";\n }\n \n .rtable-header-extra {\n background-color: "+(table.header.bg||"#dedede")+";\n padding: "+(table.padding||"0.5em")+";\n line-height: 1em;\n z-index: 4;\n box-sizing: border-box;\n min-width: 100%;\n }\n .rtable-nowrap .rtable-header-extra {\n position: sticky;\n left: 0;\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n position: relative;\n }\n .rtable-fixed-header .rtable-header {\n position: relative;\n z-index: 3;\n }\n .rtable-fixed-header.rtable-scrolled-down .rtable-header-fixed {\n box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15), 0 0.25em 0.5em rgba(0,0,0,0.25);\n z-index: 3;\n }\n .rtable-fixed-header .rtable-top {\n margin-top: 0;\n }\n .rtable-nowrap.rtable-fixed-header .rtable-header-wrapper {\n flex-shrink: 0;\n width: 100%;\n overflow-x: auto;\n scrollbar-width: none;\n }\n .rtable-nowrap.rtable-fixed-header .rtable-header-wrapper::-webkit-scrollbar {\n height: 0;\n }\n .rtable-fixed-header .rtable-header-fixed::-webkit-scrollbar {\n width: 0;\n height: 0;\n }\n \n .rtable-nowrap .rtable-fixed-column, .rtable-nowrap .rtable-row-extra, .rtable-nowrap .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n position: -webkit-sticky;\n position: sticky;\n left: 0;\n }\n .rtable-border..rtable-nowrap .rtable-fixed-column, .rtable-border.rtable-nowrap .rtable-row-extra, .rtable-border.rtable-nowrap .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n left: 1px;\n }\n .rtable-nowrap.rtable-with-select .rtable-fixed-column, .rtable-nowrap.rtable-with-select .rtable-row-extra, .rtable-nowrap.rtable-with-select .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n left: "+(table.selectWidth||"2em")+";\n }\n .rtabe-border.rtable-nowrap.rtable-with-select .rtable-fixed-column, .rtabe-border.rtable-nowrap.rtable-with-select .rtable-row-extra, .rtabe-border.rtable-nowrap.rtable-with-select .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n left: "+(table.selectWidth||"2em")+";\n }\n \n .rtable-nowrap .rtable-inner-row-wrap {\n background-color: inherit;\n }\n \n .rtable-nowrap .row,\n .rtable-nowrap .rtable-fixed-column,\n .rtable-nowrap .rtable-select-row,\n .rtable-nowrap .rtable-select-header {\n background-color: inherit;\n z-index: 1;\n }\n \n .rtable-nowrap .rtable-select-row,\n .rtable-nowrap .rtable-select-header {\n position: sticky;\n position: -webkit-sticky;\n left: 0;\n z-index: 1;\n }\n .rtable-nowrap .rtable-select-header {\n z-index: 2;\n }\n \n .rtable-nowrap.rtable-border .rtable-fixed-column {\n border-right-width: 1px;\n }\n \n .rtable-scrolled-up .rtable-bottom {\n box-shadow: 0 -1px 2px 0 rgba(60, 64, 67, 0.3), 0 -1px 3px 1px rgba(60, 64, 67, 0.15), 0 -0.25em 0.5em rgba(0,0,0,0.25);\n z-index: 3;\n }\n .rtable-bottom {\n padding: "+(table.padding||"0.5em")+";\n background-color: "+(table.footer.bg||table.header.bg||"#dedede")+";\n border-top: 2px solid "+(table.divider||primary.bc||"#ccc")+";\n }\n \n .rtable-pagination {\n display: flex;\n flex-wrap: wrap;\n flex-shrink: 0;\n justify-content: space-between;\n user-select: none;\n }\n \n .rtable-pages span {\n margin: 0.3em;\n cursor: pointer;\n }\n .rtable-pages span:first-of-type {\n margin-left: 0;\n }\n .rtable-pages input {\n text-align: center;\n width: 2.5em;\n font-size: 1em;\n background-color: transparent;\n border: none;\n padding: 0;\n font-weight: bold;\n text-decoration: underline;\n }\n \n /* checkboxes */\n .rtable-select {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n position: absolute;\n display: block;\n margin: 0;\n width: 3em;\n height: 3em;\n box-shadow: none;\n outline: none;\n opacity: 0;\n top: -0.75em;\n left: -0.75em;\n border-radius: 2em;\n transition: transform 0.2s, opacity 0.2s;\n background-color: "+(primary.bc||"#ccc")+";\n cursor: pointer;\n }\n \n .rtable-select-header > div, .rtable-select-row > div, .rtable-header > div.rtable-select-header > div {\n padding: 0;\n overflow: visible;\n width: 1.5em;\n height: 1.5em;\n position: relative;\n line-height: 1.8em;\n cursor: pointer;\n display: flex;\n justify-content: space-around;\n align-items: center;\n flex-grow: 0;\n display: block;\n }\n \n .rtable-select:checked {\n background-color: "+(primary.fga||"#07e")+';\n }\n \n .rtable-select-header:hover .rtable-select, .rtable-select-row:hover .rtable-select {\n opacity: 0.04;\n }\n \n .rtable-select:focus {\n opacity: 0.12;\n transform: scale(1);\n }\n \n .rtable-select-header:hover .rtable-select:focus, .rtable-select-row:hover .rtable.select:focus {\n opacity: 0.16;\n }\n \n .rtable-select:active {\n opacity: 0.4;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n \n .rtable-select-row > div:before, .rtable-select-header > div:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n border: solid 0.125em; /* Safari */\n border-color: '+(primary.fg||"#222")+";\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n position: absolute;\n top: 0.3em;\n left: 0.15em;\n transition: border-color 0.2s, background-color 0.2s;\n }\n \n .rtable-select-row > div:after, .rtable-select-header > div:after {\n content: '';\n display: inline-block;\n opacity: 0;\n position: absolute;\n width: 1.2em;\n height: 1.2em;\n top: 0.3em;\n left: 0.15em;\n border-radius: 0.125em;\n }\n \n .rtable-selected .rtable-select-row > div:before, .rtable-all-selected > div:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n \n .rtable-selected .rtable-select-row > div:after, .rtable-all-selected > div:after {\n border-color: "+(primary.bg||"#fff")+';\n background: no-repeat center/80% url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="'+(primary.bg||"#fff").replace(/#/g,"%23")+'" d="m 15.378906,1.7050781 a 1.0583349,1.0583349 0 0 0 -1.478515,0.234375 L 6.6210937,11.960938 1.8652344,8.5058594 a 1.0583349,1.0583349 0 0 0 -1.47851565,0.234375 1.0583349,1.0583349 0 0 0 0.234375,1.4785156 L 6.234375,14.294922 A 1.0584408,1.0584408 0 0 0 7.7128906,14.060547 L 15.613281,3.1835938 A 1.0583349,1.0583349 0 0 0 15.378906,1.7050781 Z" /></svg>\') '+(primary.fga||"#07e")+";\n opacity: 1;\n }\n \n .rtable-row-wrap > .rtable-select-header,\n .rtable-row-wrap > .rtable-select-row {\n text-align: center;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: "+(table.selectWidth||"2em")+";\n }\n \n .rtable-row-wrap > .rtable-select-row {\n border-style: solid;\n border-color: "+(table.divider||primary.bc||"#ccc")+";\n border-width: 0 0 1px 0;\n }\n \n .rtable-inner-row-wrap {\n border-style: solid;\n border-color: "+(table.divider||primary.bc||"#ccc")+";\n border-width: 0 0 1px 0;\n }\n \n .rtable-column button, .rtable-column .btn {\n padding: 0 0.5em;\n margin: 0.2em 0.5em;\n min-height: 0;\n }\n \n .rtable-column.rtable-editing, .rtable-column.rtable-editing > .rtable-edit {\n padding: 0;\n }\n .rtable-column.rtable-editing input {\n width: 100%;\n box-sizing: border-box;\n height: 100%;\n margin: 0;\n border: none;\n background-color: transparent;\n padding: 0.25em 0.5em;\n }\n \n .rtable-valign-top .rtable-row:not(.rtable-header) .rtable-column > div,\n .rtable .rtable-row:not(.rtable-header) > .rtable-column.rtable-valign-col-top > div {\n display: flex;\n height: 100%;\n align-items: flex-start;\n box-sizing: border-box;\n }\n .rtable-valign-bottom .rtable-row:not(.rtable-header) .rtable-column > div,\n .rtable .rtable-row:not(.rtable-header) > .rtable-column.rtable-valign-col-bottom > div {\n display: flex;\n height: 100%;\n align-items: flex-end;\n box-sizing: border-box;\n }\n .rtable-valign-center .rtable-row:not(.rtable-header) .rtable-column > div,\n .rtable .rtable-row:not(.rtable-header) > .rtable-column.rtable-valign-col-center > div {\n display: flex;\n height: 100%;\n align-items: center;\n box-sizing: border-box;\n }\n "+(data("table.includeGrid")?gridStyle(data):"")}.call(this,data)].join(" ")},cssId:"rtable",noCssTransform:true,attributes:["auto-titles","paginate","items","filter","data-handler","sort-handler","sort","helpers","fixed","allow-select","allow-select-all","border","fixed-header","valign","no-header","empty","shuffle","no-wrap","parameters"],components:{table:false,Table:false},syncComputedChildren:true,decorators:{grid:grid,sized:sized,scrollother:scrollother},events:{},use:[click({name:"clickd",count:1}),click({name:"dblclickd",count:2}),expand(),scrolled()],on:{construct:construct,config:function config(){this.set(this._init.sets);Object.assign(this.partials,this._init.partials)},render:function render(){if(this._autoObserver){this._autoObserver.fire()}},selectAll:function selectAll(){var sel,item;if(this._allSelected()){item=null;sel=[];this.set({selections:sel,selected:item})}else{sel=(this.get("paginate")==="virtual"?this.get("rows"):this.get("visibleRows")).slice();item=sel[0];this.set({selections:sel,selected:item})}this.fire("selection",{},{item:item,items:sel});return false},selectAllAll:function selectAllAll(){var item=null;var sel=this.get("rows").slice();this.set({selections:sel,selected:item});this.fire("selection",{},{item:item,items:sel});return false}},observe:{_rows:function _rows(){var this$1=this;if(this._rowbounce){clearTimeout(this._rowbounce)}setTimeout(function(){return this$1._rows()},this.get("@style.raui.table.debounce")||160)},paginate:{handler:function handler(v){var this$1=this;if(v==="auto"||v==="virtual"||v instanceof Ractive){if(this._autoObserver){this._autoObserver.cancel()}if(this._scrollListener){this._scrollListener.cancel()}var root=v==="auto"||v==="virtual"?this.root:v;var sized=false;var fn=function(){if(!this$1.rendered){return}var top=this$1.find(".rtable-top");if(!top){return}if(!this$1.get("items.length")){if(!this$1._autoLenObserver){this$1._autoLenObserver=this$1.observeOnce("items",function(){this$1._autoLenObserver=0;setTimeout(fn)})}return}var size=top.clientHeight+","+top.clientWidth;if(fn.last===size&&sized){return}{var ctx=this$1.getContext(top);if(ctx.decorators&&ctx.decorators.scrolled){ctx.decorators.scrolled.refresh()}}var header=this$1.find(".rtable-header")||{};var rows=Array.apply(null,this$1.findAll(".rtable-live")).map(function(r){return r.offsetHeight});if(rows.length<5){var auto=Math.floor(top.clientHeight/(header.offsetHeight||1));if(auto<5){auto=5}this$1.set("_paginate",auto);rows=Array.apply(null,this$1.findAll(".rtable-live")).map(function(r){return r.offsetHeight})}if(rows.length>0){sized=true}else{rows=[25]}var avg=Math.ceil(rows.reduce(function(a,c){return a+c},0)/rows.length);this$1._avgSize=avg;var fit=Math.floor((top.clientHeight-(header.offsetHeight||1))/avg);if(v==="virtual"){fit=fit+10;if(fit<30){fit=30}}this$1.set("_paginate",fit);fn.last=size};var tm;var fnd=function(){if(tm){clearTimeout(tm)}tm=setTimeout(function(){fn();tm=null;if(sized&&this$1._scrollListener){this$1._scrollListener.fn()}},50)};this._autoObserver=this.observe("~/tableHeight",fnd);this._autoObserver.fire=fnd;if(v==="virtual"){var lock=false;var node;var fn$1=function(){if(!this$1.rendered){node=null;return}if(!node){node=this$1.find(".rtable-top")}if(!sized){return fnd()}var top=node.scrollTop;var virtual=this$1.get("virtual")||{};var offset=virtual.offset;var visible=this$1.get("_paginate");var page=visible-10;var count=this$1.get("rows.length");if(visible>count){visible=count}var avg=this$1._avgSize;var pageSize=page*avg;var wnd=Math.floor(top/avg);var first=wnd-5;if(first<0){first=0}var hardFirst=first;if(first+visible>count){first=count-visible}if(offset===first&&!isNaN(virtual.top)){return lock=false}if(!isNumber(offset)||isNaN(offset)||isNaN(virtual.top)||top<virtual.top+pageSize||top>virtual.bottom-pageSize||offset>0&&top<avg*page){var amtAbove=hardFirst;var amtBelow=count-hardFirst-visible;if(amtAbove<0){amtBelow+=amtAbove*-1;amtAbove=0}else if(amtAbove>count-visible){amtAbove=count-visible}if(amtBelow<0){amtBelow=0}var above=amtAbove*avg;var below=amtBelow*avg;var vis,next;if(first<offset+visible&&first>offset-visible){if(first>offset){vis=this$1.findAll(".rtable-live")[first-offset]}else{vis=this$1.findAll(".rtable-live")[offset-first]}}if(vis&&first>0&&vis.offsetTop>node.scrollTop-pageSize-5&&vis.offsetTop<node.scrollTop+pageSize){next=vis.offsetTop}this$1.set({"virtual.above":above,"virtual.below":below,"virtual.offset":first});if(typeof next==="number"){if(next!==vis.offsetTop){this$1.set("virtual.above",above+(next-vis.offsetTop))}}this$1.set({"virtual.top":this$1.get("virtual.above"),"virtual.bottom":node.scrollHeight-below})}lock=false};var scroll=this._scrollListener=this.on("scroll",function(ref){var node=ref.node;if(!lock){lock=true;requestAnimationFrame(fn$1)}});scroll.fn=fn$1;scroll.observer=this.observe("rows.length",function(){this$1.set("virtual.offset",null);fn$1()},{init:false,strict:true,defer:true});var cancel=scroll.cancel;scroll.cancel=function(){cancel();scroll.observer.cancel()}}fnd()}else{if(this._autoObserver){this._autoObserver.cancel()}if(this._scrollListener){this._scrollListener.cancel()}}if(isNumber(v)){this.set("_paginate",v)}},defer:true},"scrollOffset tableHeight":{handler:function handler(){var this$1=this;if(this.rendered){requestAnimationFrame(function(){var top=this$1.find(".rtable-top");var ctx=top&&this$1.getContext(top);if(ctx&&ctx.decorators&&ctx.decorators.scrolled){ctx.decorators.scrolled.refresh()}})}},init:false},scroll:function scroll(v,o){if(~(v||"").indexOf("top")&&!~(o||"").indexOf("top")){this.fire("scrolltop",{})}if(~(v||"").indexOf("bottom")&&!~(o||"").indexOf("bottom")){this.fire("scrollbottom",{})}}},data:function data(){return Object.assign({page:0,selections:[],showGroups:true,allowGroupSelect:true,expanded:null,minPerPage:10,virtual:{offset:0},shuffle:false,rows:[]},Table.settings)},computed:{allowSelect:function allowSelect(){return this.get("allow-select")},allowSelectAll:function allowSelectAll(){return this.get("allow-select-all")},fixedHeader:function fixedHeader(){return this.get("fixed-header")},autoTitles:function autoTitles(){return this.get("auto-titles")},noHeader:function noHeader(){return this.get("no-header")},noWrap:function noWrap(){return this.get("no-wrap")},_rows:function _rows(){var src=(this.get("items")||[]).slice();var filter=this.get("filter");var sort=this.get("sort");var params=this.get("parameters");var ref=[this.get("data-handler"),this.get("@style.raui.table.data-handler")];var localh=ref[0];var classh=ref[1];var ref$1=[this.get("data-pre-handler"),this.get("@style.raui.table.data-pre-handler")];var localp=ref$1[0];var classp=ref$1[1];if(localp||classp){(localp||classp)(this,src,filter,sort,params)}return{}},visibleRows:function visibleRows(){var this$1=this;var rows=this.get("rows");var paginate=this.get("paginate");var per=paginate;var intPer=this.get("_paginate");var offset=this.get("page")||0;var virtual=this.get("virtual");if(!per){return rows}if(typeof per!=="number"&&isNaN(+per)){if(per==="auto"||per==="virtual"||per instanceof Ractive){per=intPer||1}else{per=30}}if(per<this.get("minPerPage")){per=this.get("minPerPage")}if(paginate==="virtual"){offset=virtual&&virtual.offset||0;return rows.slice(offset,offset+per)}else{if(offset*per>rows.length){setTimeout(function(){return this$1.set("page",0)},0)}return rows.slice(per*offset,per*offset+per)}},pagination:function pagination(){var items=this.get("items")||empty;var rows=this.get("rows");var paginate=this.get("paginate");var per=paginate;var offset=this.get("page")||0;if(typeof per!=="number"&&isNaN(per)){per=this.get("_paginate")}if(per<this.get("minPerPage")){per=this.get("minPerPage")}if(!per){return}var total=Math.ceil(rows.length/per);var info={max:Math.ceil(items.length/per),total:total,per:per};if(paginate==="virtual"){info.height=this._avg*rows.length}if(info.total>14){var arr=info.array=[];if(offset>5){arr.push(1,2,3,"...")}else{arr.push(1,2,3,4,5,6,7,8)}if(offset>5&&offset+6<total){arr.push(offset-1,offset,offset+1,offset+2,offset+3,"...",total-2,total-1,total)}else if(offset+6<total){arr.push("...",total-2,total-1,total)}else{arr.push(total-7,total-6,total-5,total-4,total-3,total-2,total-1,total)}}else{info.array=Array.apply(null,{length:info.total}).map(function(v,i){return i+1})}return info},groups:function groups(){var rows=this.get("rows");var last,cur;var res={};for(var i=0;i<rows.length;i++){cur=rows[i][this._init.by];if(cur!=last){res[i]=1}last=cur}return res}}});var notNumbers=/^[^\d]*/;export function numberify(v){if(isNumber(v)){return v}if(!v){return+Infinity}v=(""+v).replace(notNumbers,"");if(!v){return+Infinity}return parseFloat(v)}function columnGetter(table,col,sort){if(typeof col.get==="function"){return col.get}var path=(sort?col.sort:0)||col.path||col.filter||col.id;if(typeof path==="string"){var arr=Ractive.splitKeypath(path);return function(row){var v=row;for(var i=0;i<arr.length;i++){v=v&&v[arr[i]]}return v}}}function defaultFilter(table,rows,filter,sort){var all=[].concat(table.viewmodel.value.columns,table.viewmodel.value.fields);var map=all.reduce(function(a,c){return((a[c.id]=columnGetter(table,c))||true)&&a},{});var cols=Object.values(map);var list=rows||[];var src=list;if((filter instanceof RegExp||isString(filter))&&filter){var nocase=filter===""+filter.toLowerCase()||filter===""+filter.toUpperCase();try{var re=isString(filter)?new RegExp(filter,nocase?"i":""):filter;list=list.filter(function(l){var i=cols.length;while(i--){var v=l&&cols[i](l);if(v&&re.test(v)){return true}}})}catch(e){}}if(isString(sort)||isObject(sort)&&!Array.isArray(sort)){sort=[sort]}if(Array.isArray(sort)){sort=sort.map(function(f){if(isString(f)){var id$1=f[0]==="-"||f[0]==="+"?f.substr(1):f;var col=all.find(function(c){return c.id===id$1});if(!col){return}var res={get:columnGetter(table,col,true),dir:f[0]==="-"?-1:1};if(col&&col.type==="number"){var get=res.get;res.get=function(v){return numberify(get.call(table,v))}}return res}else if(f&&typeof f==="object"){var col$1=all.find(function(c){return c.id===id});if(!col$1){return}var res$1={dir:isNumber(f.dir)?f.dir:f.dir==="desc"?-1:1,get:columnGetter(table,col$1,true)};if(f.type==="number"||col$1&&col$1.type==="number"){var get$1=res$1.get;res$1.get=function(v){return numberify(get$1.call(table,v))}}return res$1}}).filter(function(s){return s&&s.get});list.sort(function(a,b){var aa,bb,p;for(var i=0;i<sort.length;i++){aa=sort[i].get.call(table,a);bb=sort[i].get.call(table,b);p=sort[i].dir*(aa<bb?-1:aa>bb?1:0);if(p!==0){return p}}return p})}return list}function makeRows(columns){var z=[{n:"gridValue",x:{r:"~/gridValue"}},{n:"gridName",x:{r:"~/gridName"}},{n:"gridSize",x:{r:"~/tableWidth"}},{n:"gridMax",x:{r:"~/gridMax"}},{n:"table",x:{r:"@this"}}];var sortKey="[_0._setSort(_1,_2)]";var headerCols=columns.filter(function(c){return c.hidden!==true}).map(function(c,cidx){if(c.index==null){c.index=cidx}c.attrsHP=c.attrs.filter(function(a){return a.n!=="title"});var div={t:7,e:"div",f:[{t:7,e:"div",f:[{t:16,r:"~/columns."+cidx+".label",c:{r:"."},z:z}]}],m:[{t:13,n:"title",f:c.title||c.label},{t:16,r:"~/columns."+cidx+".attrsHP",z:z}]};if(c.type){div.m.push({t:13,n:"class-rtable-"+c.type+"-column"})}if(c.filter||c.sort){div.m.push({t:13,n:"class-rtable-sortable"},{t:4,n:53,r:"~/columns."+cidx,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:sortKey}}]})}div.m.push({t:13,n:"class-rtable-column"});if(c.fixed){var path=c.fixed.path||"~/columns."+cidx+".fixed";div.m.push({t:13,n:"class-rtable-fixed-column",f:[{t:2,r:path}]});div.m.push({t:4,n:50,x:{r:["~/noWrap",path],s:"_0&&typeof _1==='string'"},f:[{t:13,n:"style-left",f:[{t:2,r:path}]}]})}var res=div;if(c.hidden&&c.hidden.r){res={t:4,n:51,r:c.hidden.r,f:[div]}}return res});var rowCols=columns.filter(function(c){return c.hidden!==true}).map(function(c,cidx){var content=[{t:7,e:"div",f:[{t:16,r:"~/columns."+cidx+".content",c:{r:"."},z:z}]}];if(c.attrs.length){c.attrsP=c.attrs;c.attrs=[{t:16,r:"~/columns."+cidx+".attrsP",c:{r:"."},z:z}]}else{c.attrs=[]}var attrs=c.attrs;if(c.fixed){var path=c.fixed.path||"~/columns."+cidx+".fixed";attrs.push({t:13,n:"class-rtable-fixed-column",f:[{t:2,r:path}]});attrs.push({t:4,n:50,x:{r:["~/noWrap",path],s:"_0&&typeof _1==='string'"},f:[{t:13,n:"style-left",f:[{t:2,r:path}]}]})}if(c.editable&&(c.filter||c.editP)){var noclicky={t:70,n:["click","mousedown","pointerdown","MSPointerDown","touchstart"],f:{r:["@event"],s:"[_0.stopPropagation()]"}};var editor=[{t:4,n:50,x:{r:["~/columns."+cidx+".editP"],s:"Array.isArray(_0)"},f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-edit"},noclicky],f:[{t:16,r:"~/columns."+cidx+".editP"}]}]},{t:4,n:50,l:1,x:{r:["~/columns."+cidx+".type"],s:"_0==='boolean'"},f:[{t:7,e:"input",m:[{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,r:c.filter}]},noclicky]}]},{t:4,n:51,l:1,f:[{t:7,e:"input",m:[{t:13,n:"value",f:[{t:2,r:c.filter}]},noclicky]}]}];if(typeof c.editable==="object"){attrs.push({t:13,n:"class-rtable-editing",f:c.editable});content=[Object.assign({},c.editable,{t:4,n:50,f:editor}),{t:4,n:51,l:1,f:content}]}else{attrs.push({t:13,n:"class-rtable-editing"});content=editor}}if(c.valign){attrs.push({t:13,n:"class-rtable-valign-col-top",f:[{t:2,x:{r:["~/columns."+cidx+".valign"],s:"_0==='top'"}}]},{t:13,n:"class-rtable-valign-col-bottom",f:[{t:2,x:{r:["~/columns."+cidx+".valign"],s:"_0==='bottom'"}}]},{t:13,n:"class-rtable-valign-col-center",f:[{t:2,x:{r:["~/columns."+cidx+".valign"],s:"_0==='center'"}}]})}var div={t:7,e:"div",f:content,m:attrs};if(c.type){attrs.unshift({t:13,n:"class-rtable-"+c.type+"-column"})}attrs.push({t:13,n:"class-rtable-column"});var title=c.attrsP&&c.attrsP.find(function(a){return a.n==="title"});if(!title){attrs.unshift({t:4,n:50,r:"~/autoTitles",f:[{t:13,n:"title",f:c.content.find(function(e){return e.e})?c.label:c.content}]})}else if(!title.f){attrs.unshift({t:13,n:"title",f:c.content.find(function(e){return e.e})?c.label:c.content});c.attrsP.splice(attrs.indexOf(title),1)}if(c.noPad===0){attrs.push({t:13,n:"class-rtable-no-pad"})}else if(c.noPad){attrs.push({t:13,n:"class-rtable-no-pad",f:c.noPad})}var res=div;if(c.hidden&&c.hidden.r){res={t:4,n:51,r:c.hidden.r,f:[div]}}return res});return[headerCols,rowCols,z]}var colAttrs=["label","type","filter","hidden","sort","no-pad","id","editable","fixed"];var cell=/^[a-z]{1,3}[0-9]+(?:-[0-9]+)?$/;var empty=[];function construct(){var cmp=this.component;if(!cmp){return}var expandEl,hoverEl,groupEl,wrapperEl,rowEl,topEl,bottomEl,mappings;var tpl=cmp.template.f||[];var attrs=cmp.template.m?cmp.template.m.slice():[];var t=cmp.template;cmp.template={e:t.e,f:t.f,t:t.t,m:attrs};var id=0;function map(attr,partial,plain){if(attr&&attr.f&&attr.f.length===1&&attr.f[0].t===2){var n="_a"+id++;attrs.push({t:13,n:n,f:attr.f});if(plain){return n}return partial?{t:[{t:2,r:"~/"+n}]}:{t:2,r:"~/"+n}}return attr&&attr.f}function grabColumns(tpl){var columns=[];var fields=[];tpl.forEach(function(e){if(e.e==="column"||e.e==="col"){var col={};var attrs=e.m||empty;var attr;col.index=columns.length;columns.push(col);col.content=(e.f||[]).filter(function(e){return e.e!=="edit"&&e.e!=="header"});col.editP=(e.f||[]).find(function(e){return e.e==="edit"});if(col.editP){col.editP=col.editP.f}attr=attrs.find(function(a){return a.n==="id"});if(attr&&isString(attr.f)){col.id=attr.f}col.label=(e.f||[]).find(function(e){return e.e==="header"});if(col.label){col.label=col.label.f;col.title=attrs.find(function(a){return a.n==="label"});if(!col.title){col.title=attrs.find(function(a){return a.n==="header"})}if(col.title&&col.title.f){col.title=map(col.title)}}else{col.label=attrs.find(function(a){return a.n==="label"});if(!col.label){col.label=attrs.find(function(a){return a.n==="header"})}if(col.label&&col.label.f){col.label=map(col.label)}}if(!col.label){col.label=""}if(!col.id){col.id=col.label}if(!Array.isArray(col.label)){col.label=[col.label]}col.type=attrs.find(function(a){return a.n==="type"});if(col.type&&col.type.f){col.type=col.type.f}if(!col.type){col.type="string"}col.filter=attrs.find(function(a){return a.n==="filter"});if(col.filter&&col.filter.f){col.filter=map(col.filter);if(col.filter.r){col.filter=col.filter.r}}col.sort=attrs.find(function(a){return a.n==="sort"});if(col.sort&&col.sort.f){col.sort=map(col.sort);if(col.sort.r){col.sort=col.sort.r}}col.dir=attrs.find(function(a){return a.n==="dir"});if(col.dir&&col.dir.f){col.dir=map(col.dir);if(col.dir.r){col.dir=col.dir.r}}col.hidden=attrs.find(function(a){return a.n==="hidden"});if(col.hidden&&col.hidden.f===0){col.hidden=true}else if(col.hidden&&isObject(col.hidden.f)){col.hidden=map(col.hidden)}else{col.hidden=false}if(isString(col.hidden)){col.hidden=false}col.noPad=attrs.find(function(a){return a.n==="no-pad"});if(col.noPad&&col.noPad.f===0){col.noPad=0}else if(col.noPad&&isObject(col.noPad.f)){col.noPad=map(col.noPad)}else{delete col.noPad}col.editable=attrs.find(function(a){return a.n==="editable"});if(col.editable&&col.editable.f===0){col.editable=true}else if(col.editable&&isObject(col.editable.f)){col.editable=map(col.editable)}else{col.editable=false}col.valign=attrs.find(function(a){return a.n==="valign"});if(col.valign&&isObject(col.valign.f)){col.valign=map(col.valign)}else if(col.valign&&typeof col.valign.f==="string"){col.valign=col.valign.f}col.fixed=attrs.find(function(a){return a.n==="fixed"});if(col.fixed&&isObject(col.fixed.f)){col.fixed={path:map(col.fixed,false,true)}}else if(col.fixed&&typeof col.fixed.f==="string"){col.fixed=col.fixed.f}attr=attrs.find(function(a){return a.n==="get"});if(attr&&attr.f){var name=map(attr,false,true);field.get=function(val){var fn=this.get(name);return typeof fn==="function"?fn.call(this,val):undefined}}col.attrs=attrs.filter(function(a){return!~colAttrs.indexOf(a.n)});col.attrs.forEach(function(a,i){if(cell.test(a.n)){col.attrs[i]={t:13,n:"class-"+a.n}}})}else if(e.e==="field"){var field$1={};var attrs$1=e.m||empty;var a;a=attrs$1.find(function(a){return a.n==="path"});if(isString(a)){field$1.path=a}else if(a&&a.f){field$1.path=map(a)}a=attrs$1.find(function(a){return a.n==="value"});if(a&&a.f){field$1.value=map(a)}a=attrs$1.find(function(a){return a.n==="type"});if(isString(a)){field$1.type=a}else if(a&&a.f){field$1.type=map(a)}a=attrs$1.find(function(a){return a.n==="id"});if(isString(a.f)){field$1.id=a.f}a=attrs$1.find(function(a){return a.n==="dir"});if(isString(a)){field$1.dir=a}else if(a&&isString(a.f)){field$1.dir=a.f}a=attrs$1.find(function(a){return a.n==="label"});if(isString(a)){field$1.label=a}else if(a&&a.f){field$1.label=map(a)}a=attrs$1.find(function(a){return a.n==="get"});if(a&&a.f){var name$1=map(a,false,true);field$1.get=function(val){var fn=this.get(name$1);return typeof fn==="function"?fn.call(this,val):undefined}}if(!field$1.id){field$1.id=field$1.label}if(!field$1.path){field$1.path=field$1.id}fields.push(field$1)}});return{fields:fields,columns:columns}}expandEl=tpl.find(function(e){return e.e==="expand"});hoverEl=tpl.find(function(e){return e.e==="hover"});groupEl=tpl.find(function(e){return e.e==="group"});wrapperEl=tpl.find(function(e){return e.e==="wrapper"});rowEl=tpl.find(function(e){return e.e==="row"});topEl=tpl.find(function(e){return e.e==="top"});bottomEl=tpl.find(function(e){return e.e==="bottom"});this._init={sets:grabColumns(tpl),partials:{}};var columns=this._init.sets.columns;this._init.sets["meta.expand"]=expandEl&&expandEl.f&&expandEl.f.length&&expandEl.f;this._init.sets["meta.hover"]=hoverEl&&hoverEl.f&&hoverEl.f.length&&hoverEl.f;this._init.sets["meta.extra"]=rowEl&&rowEl.f&&rowEl.f.length&&rowEl.f;this._init.sets["meta.top"]=topEl&&topEl.f&&topEl.f.length&&topEl.f;this._init.sets["meta.topAttrs"]=topEl&&topEl.m;this._init.sets["meta.bottom"]=bottomEl&&bottomEl.f&&bottomEl.f.length&&bottomEl.f;this._init.sets["meta.bottomAttrs"]=bottomEl&&bottomEl.m;var ref=makeRows(columns);var headerCols=ref[0];var rowCols=ref[1];var z=ref[2];var header=[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-wrap"},{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-header"},{t:4,f:[{n:"style-opacity",f:"0",t:13}],n:50,x:{r:["~/fixedHeader","~/virtual.offset"],s:"!_0&&_1>0"}},{t:4,n:50,r:"~/fixedHeader",f:[{t:13,n:"style-padding-right",f:[{t:2,r:"~/scrollOffset"},"px"]}]}],f:[{t:7,e:"div",f:[{t:8,r:"grid-head-cols"}],m:[{t:13,n:"class-row"}]}]}];header[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-header"},{t:13,n:"class-rtable-column"},{t:13,n:"title",f:[{t:2,r:"selections.length"}," items selected"]},{t:13,n:"class-rtable-all-selected",f:[{t:2,x:{r:["@this"],s:"_0._allSelected()"}}]}],f:[{t:7,e:"div",f:[{t:4,n:50,r:"~/allowSelectAll",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["@this"],s:"_0._allSelected()"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:"selectAll"}]}]}],m:[{t:70,n:["clickd"],f:"selectAll"}]}]}]});var row=[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-wrap"},{t:13,n:"class-rtable-odd",f:[{t:2,x:{r:["@index","~/virtual.offset"],s:"(_0+_1)%2===1"}}]},{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-live"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-inner-row-wrap"}],f:[{t:7,e:"div",f:[{t:8,r:"grid-row-cols"}],m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-row"},{t:70,n:expandEl&&expandEl.f?["dblclickd"]:["click","dblclick"],f:{r:["@this","~/rows","~/visibleRows","."],s:"[_0._open(_3,_1.indexOf(_3),_2.indexOf(_3))]"}}]}]}]}];if(rowEl&&rowEl.m&&rowEl.m.length){this._init.sets.rowAttrs=rowEl.m.slice();row[0].f[0].f[0].m.push({t:16,r:"~/rowAttrs",c:{r:"."},z:z})}if(wrapperEl&&wrapperEl.m&&wrapperEl.m.length){this._init.sets.wrapperAttrs=wrapperEl.m.slice();row[0].m.push({t:16,r:"~/wrapperAttrs",c:{r:"."},z:z})}if(rowEl&&rowEl.f&&rowEl.f.length){row[0].f[0].f.push({t:7,e:"div",m:[{t:13,n:"class-rtable-row-extra"},{t:4,n:50,r:"~/noWrap",f:[{t:13,n:"style-width",f:[{t:2,x:{r:["~/tableWidth","~/allowSelect","@style.raui.table.selectWidth"],s:"_1?'calc('+_0+'px - '+(_2||'2em')+')':_0+'px'"}}]}]}],f:[{t:16,r:"~/meta.extra",c:{r:"."},z:z}]})}if(expandEl&&expandEl.f&&expandEl.f.length){var listener={t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}};var ev=expandEl.m&&expandEl.m.find(function(a){return a.n==="skip"});if(ev&&ev.f&&ev.f[0]&&ev.f[0].t===2){ev=Object.assign({},ev.f[0],{t:4,n:51,f:[listener]})}else{ev=listener}row[0].f[0].f.push({t:4,n:50,x:{r:[".","~/expanded"],s:"_0===_1"},f:[{t:7,e:"div",f:[{t:7,e:"div",f:[{t:16,r:"~/meta.expand",c:{r:"."},z:z}]}],m:[{t:13,n:"class-rtable-row-expand"},{t:4,n:50,r:"~/noWrap",f:[{t:13,n:"style-width",f:[{t:2,x:{r:["~/tableWidth","~/allowSelect","@style.raui.table.selectWidth"],s:"_1?'calc('+_0+'px - '+(_2||'2em')+')':_0+'px'"}}]}]}]}]});row[0].f[0].f[0].m.push(ev);row[0].f[0].f[1].f[0].m.push({t:70,n:["click"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}})}if(hoverEl&&hoverEl.f&&hoverEl.f.length){row[0].f[0].f.unshift({t:4,n:50,x:{r:[".","~/hovered"],s:"_0===_1"},f:[{t:7,e:"div",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-hover-content"}].concat(hoverEl.m||[]),f:[{t:16,r:"~/meta.hover",c:{r:"."},z:z}]}],m:[{t:13,n:"class-rtable-row-hover"},{t:4,n:50,r:"~/noWrap",f:[{t:13,n:"style-width",f:[{t:2,x:{r:["~/tableWidth","~/allowSelect","@style.raui.table.selectWidth"],s:"_1?'calc('+_0+'px - '+(_2||'2em')+')':_0+'px'"}}]}]}]}]});row[0].m.push({t:70,n:["mouseenter"],f:{r:["@this","@index"],s:"[_0._hover(_1)]"}},{t:70,n:["mouseleave"],f:{r:["@this","@index"],s:"[_0._unhover(_1)]"}})}row[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-row"},{t:13,n:"class-rtable-column"},{t:70,n:["clickd"],f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}}],f:[{t:7,e:"div",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}}]}]}]}]});var by;if(groupEl&&groupEl.m&&(by=groupEl.m.find(function(a){return a.n==="by"}))&&(isString(by.f)||by.length===1&&by[0].t===2)){var group={t:4,n:50,f:[{t:7,e:"div",m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-group"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:70,n:expandEl&&expandEl.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(groupEl.m.filter(function(a){return a.n!=="by"&&a.n!=="select"}))}],x:{s:"_0&&_1[(_1&&(_2*_3+_4))||_4]",r:["~/showGroups","~/groups","~/page","~/pagination.per","@index"]}};row.unshift(group);this._init.by=by.f;var parts=grabColumns(groupEl.f).columns.filter(function(c){return c.hidden!==true}).map(function(c){var div={t:7,e:"div",f:[{t:7,e:"div",f:c.content}],m:c.attrs};if(c.type){div.m.unshift({t:13,n:"class-rtable-"+c.type+"-column"})}div.m.push({t:13,n:"class-rtable-column"});if(!div.m.find(function(a){return a.n==="title"})){div.m.unshift({t:13,n:"title",f:c.content})}var res=div;if(c.hidden&&c.hidden.r){res={t:4,n:51,r:c.hidden.r,f:[div]}}return res});parts.unshift({t:4,n:50,r:"~/allowGroupSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-row"},{t:13,n:"class-rtable-column"},{t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._selectGroup(_1),false]"}},{t:13,n:"class-rtable-all-selected",f:[{t:2,x:{r:["@this","@index"],s:"_0._groupSelected(_1)"}}]}],f:[{t:7,e:"div",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["@this","@index"],s:"_0._groupSelected(_1)"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:{r:["@this","@index"],s:"[_0._selectGroup(_1),false]"}}]}]}]}]});var attr;if(attr=groupEl.m.find(function(a){return a.n==="select"})){(mappings||(mappings=[])).push(Object.assign({},attr,{n:"allowGroupSelect"}))}if(attr=groupEl.m.find(function(a){return a.n==="show"})){(mappings||(mappings=[])).push(Object.assign({},attr,{n:"showGroups"}))}group.f[0].f=parts}this._init.partials["grid-row"]=row;this._init.partials["grid-row-cols"]=rowCols;this._init.partials["grid-head"]=header;this._init.partials["grid-head-cols"]=headerCols;if(mappings&&this.component){this.component.mappings=mappings}}export function plugin(opts){if(opts===void 0)opts={};return function(ref){var Ractive=ref.Ractive;var instance=ref.instance;if("includeGrid"in opts){Ractive.styleSet("table.includeGrid",opts.includeGrid)}instance.components[opts.name||"data-table"]=Table}}globalRegister("RauiTable","components",Table);export default plugin;
{
"name": "@evs-chris/raui",
"version": "0.15.4",
"version": "0.15.5",
"description": "Components, decorators, and helpers for Ractive apps that are generally Material-ish",

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

@@ -324,3 +324,3 @@ (function (global, factory) {

if (mobilePopped) { return mobilePop.find(pattern); }
else { return this.find(pattenr); }
else { return this.find(pattern); }
};

@@ -330,3 +330,3 @@

if (mobilePopped) { return mobilePop.findAll(pattern); }
else { return this.findAll(pattenr); }
else { return this.findAll(pattern); }
};

@@ -333,0 +333,0 @@

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],t):t(e.RauiAutocomplete={},e.Ractive)}(this,function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n="undefined"!=typeof window?window:null;function i(e,t,i){if(n&&n.Ractive&&"object"==typeof n.Ractive[t]){var o=document.currentScript;if(o||(o=(o=document.querySelectorAll("script"))[o.length-1]),o){var r=o.getAttribute("data-alias");r&&(r=(r=r.split("&")).reduce(function(e,t){var n=t.split("="),i=n[0],o=n[1];return e[i]=o,e},{})),Ractive[t][r&&r[e]||e]=i}}}function o(e,t){void 0===t&&(t={});var n=e.processParams(t,{duration:400,easing:"easeInOut"});t.dir=t.dir||!1;var i=t.distance||"20px",o=t.scale||"0.9",r="above"===t.dir?"translateY("+i+")":"left"===t.dir?"translateX("+i+")":"right"===t.dir?"translateX(-"+i+")":"translateY(-"+i+")";return e.isIntro||n.intro?(e.setStyle("opacity",0),e.setStyle("transform","scale("+o+") "+r),e.animateStyle({opacity:1,transform:"none"},n)):(e.setStyle("opacity",1),e.setStyle("transform","none"),e.animateStyle({opacity:0,transform:"scale("+o+") "+r},n))}function r(e){return void 0===e&&(e={}),function(t){t.instance.transitions[e.name||"pop"]=o}}function a(e,t){var n=!1,i=!1;function o(n){for(var i=n.target;i;){if(i===e)return;if(!i.parentNode&&i!==document)return;i=i.parentNode}t(n)}return setTimeout(function(){n=!0,i||(document.body.addEventListener("click",o,{capture:!0}),document.body.addEventListener("touchstop",o,{capture:!0}))}),{teardown:function(){i=!0,n&&(document.body.removeEventListener("click",o,{capture:!0}),document.body.removeEventListener("touchstop",o,{capture:!0}))}}}function l(e,t){var n=e.processParams(t,{duration:200,easing:"easeInOut"});return e.isIntro||n.intro?(e.setStyle("opacity",0),e.animateStyle("opacity",1,n)):(e.setStyle("opacity",1),e.animateStyle("opacity",0,n))}function c(e){return void 0===e&&(e={}),function(t){t.instance.transitions[e.name||"fade"]=l}}i("pop","transitions",o),i("fade","transitions",l);var s,f,p,d={v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-wrapper",g:1},{n:"class-rpop-with-tail",t:13,f:[{t:2,r:"position.tail"}]},{n:"class",f:["rpop-",{t:2,x:{r:["where"],s:'_0||"below"'}}," rpop-align-",{t:2,x:{r:["align"],s:'_0||"middle"'}}],t:13},{t:4,f:[{n:"style-top",f:[{t:2,r:"position.popTop"},"px"],t:13},{n:"style-left",f:[{t:2,r:"position.popLeft"},"px"],t:13}],n:50,r:"position"},{t:4,f:[{t:4,f:[{n:"style-top",f:[{t:2,r:"top"}],t:13}],n:50,r:"top"},{t:4,f:[{n:"style-left",f:[{t:2,r:"left"}],t:13}],n:50,r:"left"}],n:51,l:1},{n:"pop",t:72,f:{r:["where"],s:'[{dir:_0||"below"}]'},v:"t2"},{n:"cleanup",t:71},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:50,r:"clickClose"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:51,r:"noClickout"},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail-outer",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}],n:50,r:"~/tail"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1}],f:[{t:16,r:"content",z:[{n:"trigger",x:{r:"triggerContext"}}]}]}]}],n:50,r:"__popped"}],e:{'_0||"below"':function(e){return e||"below"},'_0||"middle"':function(e){return e||"middle"},'[{dir:_0||"below"}]':function(e){return[{dir:e||"below"}]},'[_0.set("popped",false)]':function(e){return[e.set("popped",!1)]},"_0+(_1?3:0)":function(e,t){return e+(t?3:0)},"_0!=null":function(e){return null!=e},"_0+(_1?0:3)":function(e,t){return e+(t?0:3)},"_0-2":function(e){return e-2},"[{delay:200}]":function(){return[{delay:200}]},"[_0===_1&&_2.done(),true]":function(e,t,n){return[e===t&&n.done(),!0]},"[_0.done()]":function(e){return[e.done()]},true:function(){return!0}},p:{modal:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-modal",g:1},{n:"fade",t:72,v:"t1"},{n:"fade",t:72,f:{r:[],s:"[{delay:200}]"},v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["@node","@event.target","."],s:"[_0===_1&&_2.done(),true]"}}],n:51,r:".noClickout"}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1},{n:"pop",t:72,f:{r:[],s:"[{delay:200}]"},v:"t1"},{n:"pop",t:72,v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.done()]"}}],n:50,r:".clickClose"},{t:8,r:".attrs",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}],f:[{t:8,r:".content",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}]}]}],n:54,r:"contents.0"}],n:50,r:"contents.length"}]}},u=function(e){function t(t){e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.position=function(t){var n=t||this.source,i=this.get("popped");if(n&&i){var o=this.find("div");if(n&&o&&o.offsetParent){n?this.set("triggerContext",e.getContext(n)):this.set("triggerContext",null);var r=o.offsetParent,a=r.getBoundingClientRect(),l=o.getBoundingClientRect(),c=n.getBoundingClientRect(),s=this.get("where")||"below",f=this.get("align")||"middle",p=this.get("tail"),d="above"===s||"below"===s,u=this.get("fit"),b=this.get("gap"),m="above"===s||"below"===s?0:"left"===s?-l.width-b:c.width+b,h="left"===s||"right"===s?-c.height:"above"===s?-c.height-l.height-b:b;"middle"===f?"below"===s||"above"===s?m-=(l.width-c.width)/2:"left"!==s&&"right"!==s||(h-=(l.height-c.height)/2):"end"===f&&("below"===s||"above"===s?m+=c.width-l.width:"left"!==s&&"right"!==s||(h+=c.height-l.height));var g={popTop:c.bottom-a.top+h,popLeft:c.left-a.left+m,tail:p,vert:"above"===s||"below"===s};if(r.scrollTop&&(g.popTop+=r.scrollTop),r.scrollLeft&&(g.popLeft+=r.scrollLeft),p){"above"===s?g.tailBottom=-10:"below"===s?g.tailTop=-10:"left"===s?g.tailRight=-10:"right"===s&&(g.tailLeft=-10);var v=this.tailSource?this.tailSource.getBoundingClientRect():c;"start"===f?d?g.tailLeft=Math.floor(v.width/2)-10:g.tailTop=Math.floor(v.height/2)-10:"end"===f?d?g.tailRight=Math.floor(v.width/2)-10:g.tailBottom=Math.floor(v.height/2)-10:"middle"===f&&(d?g.tailLeft=Math.floor(v.width/2)-10:g.tailTop=Math.floor(v.height/2)-10),v!==c?d?(null!=g.tailLeft&&(g.tailLeft+=v.left-c.left),null!=g.tailRight&&(g.tailRight+=c.right-v.right)):(null!=g.tailTop&&(g.tailTop+=v.top-c.top),null!=g.tailBottom&&(g.tailBottom+=c.bottom-v.bottom)):"middle"===f&&(d?(null!=g.tailLeft&&(g.tailLeft+=v.left-(g.popLeft+a.left)),null!=g.tailRight&&(g.tailRight+=g.popLeft+a.left+l.width-v.right)):(null!=g.tailTop&&(g.tailTop+=v.top-(g.popTop+a.top)),null!=g.tailBottom&&(g.tailBottom+=g.popTop+a.top+l.height-v.bottom)))}if(u){var y=r;if(this.get("offsets"))for(var x=this.get("offsets");x--;)y=y.offsetParent;var _=r.scrollWidth,w=r.scrollHeight;if(g.popLeft+l.width>_){var k=g.popLeft-(_-l.width);g.popLeft-=k,d&&g.tailLeft&&(g.tailLeft+=k),d&&g.tailRight&&(g.tailRight-=k),p&&!d&&(g.tail=!1)}if(g.popLeft<0){var T=-1*g.popLeft;g.popLeft+=T,d&&g.tailLeft&&(g.tailLeft-=T),d&&g.tailRight&&(g.tailRight+=T),p&&!d&&(g.tail=!1)}if(g.popTop+l.height>w){var L=g.popTop-(w-l.height);g.popTop-=L,!d&&g.tailTop&&(g.tailTop+=L),!d&&g.tailBottom&&(g.tailBottom-=L),p&&d&&(g.tail=!1)}if(g.popTop<0){var O=-1*g.popTop;g.popTop+=O,!d&&g.tailTop&&(g.tailTop-=O),!d&&g.tailBottom&&(g.tailBottom+=O),p&&d&&(g.tail=!1)}}if(a.left+g.popLeft<0){var B=0-(a.left+g.popLeft);g.popLeft+=B,d&&g.tailLeft&&(g.tailLeft-=B),d&&g.tailRight&&(g.tailRight+=B),p&&!d&&(g.tail=!1)}if(a.top+g.popTop<0){var A=0-(a.top+g.popTop);g.popTop+=A,!d&&g.tailTop&&(g.tailTop-=A),!d&&g.tailBottom&&(g.tailBottom+=A),p&&d&&(g.tail=!1)}g.tailLeft&&(g.tailLeft=Math.floor(g.tailLeft)),g.tailRight&&(g.tailRight=Math.floor(g.tailRight)),g.tailTop&&(g.tailTop=Math.floor(g.tailTop)),g.tailBottom&&(g.tailBottom=Math.floor(g.tailBottom)),this.set("position",g)}else this.set("position",null)}},t.prototype.show=function(e){return this.source=e,this.set("popped",!0),this._transdone},t.prototype.hide=function(){return this.set("popped",!1),this._transdone},t.prototype.popFind=function(e){return s?f.find(e):this.find(pattenr)},t.prototype.popFindAll=function(e){return s?f.findAll(e):this.findAll(pattenr)},t}(t);t.extendWith(u,{attributes:["popped","tail","where","align","top","left","fit","clickClose","noClickout","gap","offsets"],use:[r(),(void 0===p&&(p={}),function(e){e.instance.events[p.name||"clickout"]=a}),c()],template:d,css:function(e){return[function(e){var t=Object.assign({},e("raui.primary"),e("raui.pop.primary")),n=(e("raui.themes")||[]).slice();return(e("raui.pop.themes")||[]).forEach(function(e){~n.indexOf(e)||n.push(e)}),"\n .rpop-wrapper {\n position: absolute;\n display: inline-block;\n z-index: 21;\n transition-property: top, left, padding;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-with-tail.rpop-above {\n padding-bottom: 10px;\n }\n .rpop-with-tail.rpop-below {\n padding-top: 10px;\n }\n .rpop-with-tail.rpop-left {\n padding-right: 10px;\n }\n .rpop-with-tail.rpop-right {\n padding-left: 10px;\n }\n \n .rpop {\n position: relative;\n box-shadow: 0 1px 4px 0 rgba(0,0,0,0.24);\n border: 1px solid #ccc;\n border-radius: 0.2em;\n background-color: "+(t.bg||"#fff")+";\n color: "+(t.fg||"#222")+";\n padding: 0.5em;\n z-index: 2;\n }\n \n .rpop-modal {\n position: fixed;\n display: flex;\n z-index: 20;\n background-color: rgba(0, 0, 0, 0.2);\n align-items: center;\n justify-content: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 1em;\n overflow: auto;\n }\n \n .rpop-tail, .rpop-tail-outer {\n z-index: 3;\n width: 0;\n height: 0;\n position: absolute;\n border-style: solid;\n border-width: 10px;\n border-color: transparent;\n transition-property: top, left, bottom, right, border-color;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-tail-outer {\n z-index: 1;\n border-width: 12px;\n border-color: transparent;\n }\n \n .rpop-below .rpop-tail {\n border-bottom-color: "+(t.bg||"#fff")+";\n }\n .rpop-below .rpop-tail-outer {\n border-bottom-color: "+(t.bc||"#ccc")+";\n }\n \n .rpop-above .rpop-tail {\n border-top-color: "+(t.bg||"#fff")+";\n }\n .rpop-above .rpop-tail-outer {\n border-top-color: "+(t.bc||"#ccc")+";\n }\n \n .rpop-left .rpop-tail {\n border-left-color: "+(t.bg||"#fff")+";\n }\n .rpop-left .rpop-tail-outer {\n border-left-color: "+(t.bc||"#ccc")+";\n }\n \n .rpop-right .rpop-tail {\n border-right-color: "+(t.bg||"#fff")+";\n }\n .rpop-right .rpop-tail-outer {\n border-right-color: "+(t.bc||"#ccc")+";\n }\n "+n.map(function(t){var n=Object.assign({},e("raui.primary"),e("raui.pop.primary"),e("raui."+t),e("raui.pop."+t));return"\n ."+t+" .rpop {\n background-color: "+(n.bg||"#fff")+";\n color: "+(n.fg||"#222")+";\n }\n \n ."+t+".rpop-below .rpop-tail {\n border-bottom-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-below .rpop-tail-outer {\n border-bottom-color: "+(n.bc||"#ccc")+";\n }\n \n ."+t+".rpop-above .rpop-tail {\n border-top-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-above .rpop-tail-outer {\n border-top-color: "+(n.bc||"#ccc")+";\n }\n \n ."+t+".rpop-left .rpop-tail {\n border-left-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-left .rpop-tail-outer {\n border-left-color: "+(n.bc||"#ccc")+";\n }\n \n ."+t+".rpop-right .rpop-tail {\n border-right-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-right .rpop-tail-outer {\n border-right-color: "+(n.bc||"#ccc")+";\n }\n "})}.call(this,e)].join(" ")},cssId:"rpop",noCssTransform:!0,observe:{popped:function(e){var t,n=this,i=this._transdone=new Promise(function(e){return t=e});i.resolve=t,setTimeout(function(){n._transdone=i,n.get("popped")===e&&n.set("_popped",e)},1)},_popped:{handler:function(e){var t=this,n=this._transdone.resolve;if(e){var i=this.get("@style.raui.pop.mobile");if(i&&window.matchMedia("(max-width: "+i+")").matches){f||(f=new b({target:document.body,append:!0}));var o=this.getContext().getParent(!0);o.isContext=1,this.set("__popped",!1).then(n),f.unshift("contents",{content:this.partials.content,context:o,attrs:this.partials["extra-attributes"]||[],clickClose:this.get("clickClose"),noClickout:this.get("noClickout"),done:function(){t.set("popped",!1)}})}else this.set("__popped",!0)}else s?(f.shift("contents"),n()):this.set("__popped",!1).then(n)},defer:!0,init:!1},__popped:{handler:function(e){var t=this._transdone.resolve;if(e){var n=this.find("div"),i=n,o=i.offsetHeight+i.offsetTop,r=i.offsetWidth+i.offsetLeft,a=i.offsetParent;if(!this.overflows)for(var l=this.overflows={e:[],v:[]};n&&n.style;){if(n===a){if(n.offsetWidth>=r&&n.offsetHeight>=o)break;r+=n.offsetLeft,o+=n.offsetTop,a=n.offsetParent}var c=getComputedStyle(n);if("auto"===c.overflow)break;"hidden"===c.overflow&&(l.e.push(n),l.v.push(n.style.overflow),n.style.overflow="visible"),n=n.parentNode}this.position(),this.transition("pop",i,{intro:!0,dir:this.get("where")||"below"}).then(t)}else this.source=null,this.tailSource=null},defer:!0,init:!1},"align where tail fit":{handler:function(){this.position()},defer:!0}},decorators:{cleanup:function(e){var t=this;return{teardown:function(){var e=t.overflows;if(e){t.overflows=null;for(var n=0;n<e.e.length;n++)e.e[n].style.overflow=e.v[n]}}}}},data:function(){return{gap:4}}});var b=function(e){function t(t){e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(t);function m(){}function h(e){~this.className.indexOf("focus")||(this.className+=" focus")}function g(e){this.className=this.className.replace(/\bfocus\b/g,"").trim()}function v(e){var t,n,i,o,r,a,l,c,s,f,p,d,u,b=this.getContext(e);function v(){var b=y().split(/\s+/).filter(function(e){return!!e});(t=!!~b.indexOf("field"))||(b.push("field"),t=!0),(n=e.querySelector("input[type=checkbox]"))&&!~b.indexOf("check")&&b.push("check"),(i=e.querySelector("input[type=radio]"))&&!~b.indexOf("radio")&&b.push("radio");var m=n||i;m&&m.checked&&!~b.indexOf("checked")&&b.push("checked"),m&&m.disabled&&!~b.indexOf("disabled")&&b.push("disabled"),!m&&f?(f.cancel(),f=0,p&&(p.disconnect(),p=0),delete m._form_callback,u&&(delete u.checked,d=u=void 0)):m&&(m._form_callback=function(t,n){if(void 0===n&&(n=!0),n&&"radio"===m.type&&m.name){var i=[];i.push.apply(i,document.querySelectorAll("input[type=radio][name="+m.name+"]")),(i=i.filter(function(e){return e!==m})).forEach(function(e){return e._form_callback&&e._form_callback(t,!1)})}var o=m.checked;o&&!~e.className.indexOf("checked")?e.className+=" checked":!o&&~e.className.indexOf("checked")&&(e.className=e.className.replace(/\bchecked\b/g,"").replace(/ +/g," ").trim())},MutationObserver&&(p=new MutationObserver(function(){var t;(t=m.disabled)&&!~e.className.indexOf("disabled")?e.className+=" disabled":!t&&~e.className.indexOf("disabled")&&(e.className=e.className.replace(/\bdisabled\b/g,"").replace(/ +/g," ").trim())})).observe(m,{attributes:!0}),f=this.getContext(m).listen("change",m._form_callback),(d=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(m),"checked"))&&d.configurable&&(u=m,Object.defineProperty(m,"checked",{get:d.get,set:function(e){d.set.call(u,e),m._form_callback()},enumerable:!0,configurable:!0}))),(o=!!e.querySelector("textarea"))&&!~b.indexOf("textarea")&&b.push("textarea"),(r=!!e.querySelector("select"))&&!~b.indexOf("select")&&b.push("select"),(a=!!e.querySelector("input[type=file]"))&&!~b.indexOf("file")&&b.push("file"),(l=!!(l=e.querySelector("button"))&&l.parentNode===e)&&!~b.indexOf("button")&&b.push("button"),(c=!!e.querySelector("div"))&&!~b.indexOf("plain")&&b.push("plain"),(s=!(n||i||a||!e.querySelector("input")))&&!~b.indexOf("input")&&b.push("input"),e.className=b.join(" ")}function y(){var f=e.className;return t||(f=f.replace(/\bfield\b/g,"").trim()),n||(f=f.replace(/\bcheck(ed)?\b/g,"").trim()),i||(f=f.replace(/\bradio\b/g,"").trim()),o||(f=f.replace(/\btextarea\b/g,"").trim()),r||(f=f.replace(/\bselect\b/g,"").trim()),a||(f=f.replace(/\bfile\b/g,"").trim()),l||(f=f.replace(/\bbutton\b/g,"").trim()),c||(f=f.replace(/\bplain\b/g,"").trim()),s||(f=f.replace(/\binput\b/g,"").trim()),f=f.replace(/ +/g," ")}var x=b.listen("focusin",h),_=b.listen("focusout",g);v.call(this);var w={update:m,invalidate:v.bind(this),teardown:function(){b.ractive.fire("fieldUnregistered",b,e,w);var t=y();t=t.replace(/\bfocus\b/g,"").trim(),x.cancel(),_.cancel(),f&&f.cancel(),p&&p.disconnect(),u&&(delete u.checked,d=u=void 0),e.className=t},setDisabled:function(t){e.querySelectorAll("input,button,select,textarea").forEach(function(e){return e.disabled=t}),this.invalidate()}};return b.ractive.fire("fieldRegistered",b,e,w),w}function y(e,t){if(!e)return!1;for(var n=0;n<e.length;n++){if(e[n].e===t)return!0;if(e[n].f&&y(e[n].f,t))return!0}return!1}t.extendWith(b,{template:{v:d.v,t:d.p.modal},data:function(){return{contents:[]}},use:[r(),c()],observe:{contents:function(e){s=(e||[]).length>0}},on:{init:function(){f?console.warn("More than one PopOver mobile host created."):f=this}}}),v.style=function(e){var t=Object.assign({},e("raui.primary"),e("raui.form.primary")),n=Object.assign({},e("raui.primary.active"),e("raui.form.primary.active")),i=Object.assign({},e("raui.primary.disabled"),e("raui.form.primary.disabled")),o=e("raui.form.boxy");return"\n label.field, .field-manual {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: "+(t.fg||"#222")+";\n transition: 0.2s ease-in-out;\n transition-property: color;\n vertical-align: top;\n box-sizing: border-box;\n padding: 0.25em 0.5em;\n line-height: 1.5em;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: inherit;\n }\n\n label.field.textarea {\n display: block;\n border: 0.0625em solid "+(t.bc||"#ccc")+";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: "+(t.radius||"0.2em")+";\n box-shadow: none;\n transition-property: color, border-color, box-shadow;\n margin: 0.8em 0.2em;\n min-height: auto;\n background-color: "+(o?t.bg||"#fff":"transparent")+";\n }\n\n label.field.focus {\n color: "+(n.fg||t.fga||"#07e")+";\n }\n\n label.field.textarea.focus {\n border-color: "+(n.fg||t.fga||"#07e")+";\n "+(o?"":"box-shadow: 0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n 0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+";")+"\n }\n\n label.field input,\n label.field select,\n label.field textarea,\n .field-manual .field-body\n {\n display: block;\n border-width: "+(o?"0.0625em":"0 0 0.0625em 0")+";\n border-color: "+(t.bc||"#ccc")+";\n border-style: solid;\n box-sizing: border-box;\n background-color: "+(o?t.bg||"#fff":"transparent")+";\n transition: 0.2s ease-in-out;\n transition-property: box-shadow, color;\n outline: none;\n box-shadow: none;\n width: 100%;\n margin-bottom: 0.8em;\n font-size: 1.1em;"+(o?"\n border-radius: "+(t.radius||"0.2em")+";":"")+"\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input"+(o?"":":disabled")+",\n label.field select"+(o?"":":disabled")+" {\n padding: 0 0.75em;\n }\n label.field select"+(o?"":":disabled")+" {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field input[readonly],\n label.field select:disabled,\n label.field textarea:disabled,\n label.field textarea[readonly] {\n background: "+(i.bg||"#f4f4f4")+";\n color: "+(i.fg||"#444")+";\n }\n\n label.field textarea {\n line-height: 1.2em;\n }\n label.field .field-wrapper {\n display: block;\n }\n label.field > select, label.field > input,\n label.field > .field-wrapper > input, label.field > .field-wrapper > select {\n height: 2.5em;\n }\n\n "+(o?"":"label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 "+(t.bc||"#ccc")+";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em "+(t.bc||"#ccc")+",\n -0.0625em 0.0625em "+(t.bc||"#ccc")+",\n 0.0625em -0.0625em "+(t.bc||"#ccc")+",\n -0.0625em -0.0625em "+(t.bc||"#ccc")+";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n 0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+";\n }")+"\n\n /**** CHECK BOXES ****/\n\n label.field.check, label.field.radio {\n position:relative;\n z-index: 0;\n overflow: visible;\n cursor: pointer;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.check.inline, label.field.radio.inline {\n padding-top: 0.7em;\n }\n\n label.field.check input, label.field.radio input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -0.5em;\n top: 1em;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 3.2em;\n height: 3.2em;\n background-color: "+(t.bc||"#ccc")+";\n box-shadow: none;\n outline: none;\n opacity: 0;\n transform: scale(1);\n pointer-events: none;\n transition: opacity 0.3s, transform 0.2s;\n }\n label.field.inline.check input, label.field.inline.radio input {\n top: -0.45em;\n left: -0.55em;\n }\n\n label.field.check input:checked, label.field.radio input:checked {\n background-color: "+(t.fga||"#07e")+";\n }\n\n label.field.check:hover > input, label.field.radio:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus, label.field.radio input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus, label.field.radio:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active, label.field.radio input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before, label.field.radio:before {\n content: '';\n display: inline-block;\n box-sizing: border-box;\n margin: 0 0.5em 0.2em 0.1em;\n border: solid 0.125em; /* Safari */\n border-color: "+(t.fg||"#222")+';\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after, label.field.radio:after {\n content: \'\';\n display: inline-block;\n opacity: 0;\n position: absolute;\n width: 1.2em;\n height: 1.2em;\n top: 2.3em;\n left: 0.6em;\n border-radius: 0.125em;\n }\n label.field.check.inline:after, label.field.radio.inline:after {\n top: 0.8em;\n }\n\n label.field.check.checked:after {\n opacity: 1;\n background: no-repeat center/80% url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="'+(t.bg||"#fff").replace(/#/g,"%23")+'" d="m 15.378906,1.7050781 a 1.0583349,1.0583349 0 0 0 -1.478515,0.234375 L 6.6210937,11.960938 1.8652344,8.5058594 a 1.0583349,1.0583349 0 0 0 -1.47851565,0.234375 1.0583349,1.0583349 0 0 0 0.234375,1.4785156 L 6.234375,14.294922 A 1.0584408,1.0584408 0 0 0 7.7128906,14.060547 L 15.613281,3.1835938 A 1.0583349,1.0583349 0 0 0 15.378906,1.7050781 Z" /></svg>\') '+(t.fga||"#07e")+';\n }\n\n label.field.radio.checked:after {\n opacity: 1;\n background: no-repeat center/80% url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><circle fill="'+(t.bg||"#fff").replace(/#/g,"%23")+'" cx="8" cy="8" r="5" /></svg>\') '+(t.fga||"#07e")+";\n }\n\n label.field.check.checked:before, label.field.radio.checked:before {\n border-color: "+(t.fga||"#07e")+";\n }\n label.field.check.focus:before, label.field.radio.focus:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.check input:disabled, label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled, label.field.radio.disabled {\n color: "+(i.fg||"#444")+";\n cursor: initial;\n }\n\n label.field.check.disabled:before, label.field.radio.disabled:before {\n border-color: "+(i.bc||"#ccc")+";\n background-color: "+(i.bg||"#f4f4f4")+";\n }\n\n label.field.check.checked.disabled:after, label.field.radio.checked.disabled:after {\n border-color: transparent;\n background-color: "+(i.bc||"#ccc")+";\n }\n\n label.field select {\n padding-right: 2em;\n }\n\n label.field.select {\n cursor: pointer;\n position: relative;\n }\n\n label.field.select:after {\n content: ' ';\n position: absolute;\n display: block;\n width: 0.6em;\n right: 1.125em;\n height: 0.6em;\n top: 2.6em;\n border-bottom: 0.125em solid;\n border-right: 0.125em solid;\n transform: rotate(45deg);\n pointer-events: none;\n color: "+(t.bc||"#ccc")+";\n }\n\n label.field textarea {\n border: none;"+(o?"\n padding: 0;":"")+"\n }\n\n label.field > select {\n -moz-appearance: none;\n -webkit-appearance: none;\n }\n\n label.field input:focus,\n label.field select:focus,\n label.field.file.focus:after\n {\n border-color: "+(n.fg||t.fga||"#07e")+";\n "+(o?"":"box-shadow: 0 0.0625em 0 0 "+(n.fg||t.fga||"#07e")+";")+"\n }\n\n label.field input[type=checkbox]:focus,\n label.field input[type=radio]:focus {\n box-shadow: none;\n }\n\n label.field.file.focus:after {\n color: "+(n.fg||t.fga||"#07e")+";\n }\n label.field.file [type=file] {\n position: absolute;\n width: 0;\n height: 0;\n opacity: 0;\n z-index: -1;\n }\n label.field.file {\n position: relative;\n min-width: 9em;\n height: 5em;\n }\n label.field.file:after {\n position: absolute;\n content: 'Choose a file';\n box-sizing: border-box;\n width: calc(100% - 0.3em);\n height: 2.5em;\n font-size: 1.1em;\n line-height: 1.5em;\n color: "+(t.fg||"#222")+";\n text-align: "+(o?"center":"left")+";\n padding: 0.5em "+(o?"0.5em":"0")+";\n cursor: pointer;\n font-style: oblique;\n left: 0.25em;\n top: 1.6em;\n transition: 0.2s ease-in-out;\n transition-property: color, border-bolor, box-shadow;"+(o?"\n border-radius: "+(t.radius||"0.2em")+";\n border-color: "+(t.bc||"#ccc")+";\n border-style: solid;\n border-width: 0.0625em;":"\n border-bottom-color: "+(t.bc||"#ccc")+";\n border-bottom-width: 0.0625em;\n border-bottom-style: solid;\n ")+"\n }\n label.field.file.inline:after {\n top: 0.2em;\n }\n\n label.field.button {\n vertical-align: top;\n padding-top: "+(o?"1.7":"1.958")+"em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: "+(o?"0.15em":"0")+";\n }\n\n label.field .field-wrapper.with-buttons {\n display: flex;\n }\n label.field .with-buttons button {\n flex-shrink: 0;\n padding-left: 0.5em;\n padding-right: 0.5em;\n margin-top: 0;\n margin-right: 0;\n "+(o?"height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid "+(t.bg||"#fff")+";\n margin-left: 0;":"height: 2.25em;")+"\n }"+(o?"\n label.field .with-buttons button:first-of-type {\n margin-left: -0.05em;\n border-left: none;\n }\n label.field .with-buttons button:last-of-type {\n border-radius: 0 "+(t.radius||"0.2em")+" "+(t.radius||"0.2em")+" 0;\n }\n label.field .with-buttons input {\n border-radius: "+(t.radius||"0.2em")+" 0 0 "+(t.radius||"0.2em")+";\n min-width: 0;\n }\n ":"")+"\n\n label.field.plain > div {\n position: absolute;\n font-size: 1.1em;\n top: 2.4em;\n font-weight: normal;\n }\n\n /* inline fields (no labels) */\n label.field.inline {\n min-height: 3.3em;\n }\n\n label.field.button.inline {\n margin-top: 0.2em;\n padding-top: 0.12em;\n }\n\n label.field.button.inline button {\n margin-top: 0;\n }\n\n label.field.inline.select:after {\n top: 1."+(o?"15":"1")+"em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: "+(t.fga||"#07e")+";\n color: "+(t.bg||"#fff;")+";\n cursor: default;\n user-select: none;\n border-radius: 1em;\n margin-left: 0.5em;\n line-height: 1.2em;\n text-align: center;\n margin-top: -0.2em;\n }\n\n label.field .field-solo-tip {\n margin-left: -0.1em;\n }\n "};var x=t.macro(function(e){var t=[],n=[],i=(e.template.m||[]).slice(),o=e.template.f||[],r=i.find(function(e){return"value"===e.n}),a=i.find(function(e){return"type"===e.n}),l=i.find(function(e){return"tip"===e.n}),c=i.find(function(e){return"disabled"===e.n});if(l&&i.splice(i.indexOf(l),1),a&&"function"==typeof x.types[a.f])t.push.apply(t,x.types[a.f](i,o,e));else if(r){var s={t:7,e:"input",m:[r]};if(c&&s.m.push(c),y(o,"option")&&(s.e="select",s.f=o),a&&(s.m.push(a),"checkbox"===a.f||"radio"===a.f)){var f=i.find(function(e){return"target"===e.n});f?s.m.push(Object.assign({},f,{n:"name"})):s.m.splice(s.m.indexOf(r),1,Object.assign({},r,{n:"checked"}))}s.m=s.m.concat(i.filter(function(e){return 73===e.t||73===e.t||"placeholder"===e.n})),t.push(s);var p=o.filter(function(e){return"button"===e.e||y(e.f,"button")});p.length&&(t.push.apply(t,p),t=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:t}])}else{o.forEach(function(e){"label"===e.e?e.f&&e.f.length&&n.push.apply(n,e.f):t.push(e)});var d=o.filter(function(e){return e.e});d.find(function(e){return"button"===e.e})&&d.length>1&&(t=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:t}])}var u=i.find(function(e){return"label"===e.n});u&&u.f&&u.f.length&&n.push.apply(n,Array.isArray(u.f)?u.f:[u.f]),l&&t.unshift({t:7,e:"span",m:[{t:13,n:"class",f:"field-tip"+(n.length?"":" field-solo-tip"),g:1},{t:13,n:"title",f:l.f},{t:70,n:["click"],f:{r:[],s:"[false]"}}],f:"?"});var b=i.find(function(e){return"inline"===e.n});n&&!b?t.unshift.apply(t,n):b||t.unshift(" ");var m={t:7,e:"label",m:[{t:71,n:"field"}].concat(i.filter(function(e){return 13!==e.t&&73!==e.t||"value"!==e.n&&"type"!==e.n&&"inline"!==e.n&&"label"!==e.n&&"placeholder"!==e.n&&"target"!==e.n&&"disabled"!==e.n})),f:t};b&&m.m.push({t:13,n:"class",f:"inline"}),e.setTemplate([m])});function _(e,t){return"function"!=typeof e.focus||e.disabled||(t&&t.immediate?e.focus():setTimeout(function(){return!e.disabled&&e.focus()},(t||{}).timeout||250)),{teardown:m}}x.types={},i("field","decorators",v),i("field","partials",x),i("autofocus","decorators",_);var w={v:4,t:[{t:7,e:"span",m:[{t:13,n:"class",f:"rautocomplete field-wrapper",g:1},{n:["pop"],t:70,f:{r:["@context","$1"],s:'[(_0).set("rac.pop",_1)]'}}],f:[{t:7,e:"input",m:[{t:8,r:"extra-attributes"},{n:["dblclick"],t:70,f:{r:["rac.pop","@node"],s:"[_0.show(_1)]"}},{n:["focus"],t:70,f:{r:["rac"],s:"[_0.stash()]"}},{n:["blur"],t:70,f:{r:["rac","@node"],s:"[_0.checkBlur(_1)]"}},{n:["input"],t:70,f:{r:["rac","@event"],s:"[_0.input(_1)]"}},{n:["keydown"],t:70,f:{r:["rac","@event"],s:"[_0.key(_1)]"}},{t:73,v:"t",f:"false"},{n:"value",f:[{t:2,r:"rac.display"}],t:13}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rac-drop",g:1},{n:["click"],t:70,f:{r:["rac.pop","@context"],s:'[_0.show((_1).find("input"))]'}}]}," ",{t:7,e:"rac-pop",m:[{t:13,n:"style",f:"padding: 0;",g:1},{t:13,n:"class",f:"rac-pop",g:1},{n:["init"],t:70,f:{r:["@context","$1"],s:'[(_0).raise("pop",{},_1)]'}},{n:"popped",t:13,f:[{t:2,r:"rac.popped"}]},{n:"where",f:"below",t:13,g:1},{n:"align",f:"end",t:13,g:1},{n:"gap",f:[{t:2,x:{r:[],s:"2"},s:1}],t:13},{n:"offsets",t:13,f:[{t:2,r:"rac.offsets"}]},{n:"fit",t:13,f:[{t:2,r:"rac.fit"}]}],f:[{t:4,f:[{t:7,e:"input",m:[{n:"class-rac-modal",t:13},{n:["input"],t:70,f:{r:["rac","@event"],s:"[_0.input(_1)]"}},{n:["keydown"],t:70,f:{r:["rac","@event"],s:"[_0.key(_1)]"}},{t:73,v:"t",f:"false"},{n:"value",f:[{t:2,r:"rac.display"}],t:13},{n:["blur"],t:70,f:{r:["rac"],s:"[_0.checkBlur()]"}},{n:"autocompletefocus",t:71}]}],n:50,r:"inModal"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rac-list",g:1},{n:"tabindex",f:"-1",t:13,g:1}],f:[{t:55,f:[{f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rac-item rac-invalid",g:1}],f:["Loading..."]}],t:4},{t:62,f:[" ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rac-item",g:1},{n:"tabindex",f:"-1",t:13,g:1},{t:4,f:[{n:"class-rac-selected",t:13,f:[{t:2,x:{r:["rac.value","."],s:"_0===_1"}}]}],n:50,r:"rac.valueBound"},{n:"class-rac-hover",t:13,f:[{t:2,x:{r:["rac.selected","@index"],s:"_0===_1"}}]},{t:4,f:[{n:["click"],t:70,f:{r:["@context",".","rac"],s:'[(_0).set("rac.value",_1),_2._drawDisplay()]'}},{n:["mouseover"],t:70,f:{r:["@context","@index"],s:'[(_0).set("rac.selected",_1)]'}}],n:50,r:"rac.popped"}],f:[{t:2,x:{r:["rac","."],s:"_0._display(_1)"}}]}],n:52,r:"items"}," "],n:"items"},{t:63,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rac-item rac-invalid",g:1}],f:["Load failed."]}]}],r:"rac.list"}]}]}]}],e:{2:function(){return 2},'[(_0).set("rac.pop",_1)]':function(e,t){return[e.set("rac.pop",t)]},"[_0.show(_1)]":function(e,t){return[e.show(t)]},"[_0.stash()]":function(e){return[e.stash()]},"[_0.checkBlur(_1)]":function(e,t){return[e.checkBlur(t)]},"[_0.input(_1)]":function(e,t){return[e.input(t)]},"[_0.key(_1)]":function(e,t){return[e.key(t)]},'[_0.show((_1).find("input"))]':function(e,t){return[e.show(t.find("input"))]},'[(_0).raise("pop",{},_1)]':function(e,t){return[e.raise("pop",{},t)]},"[_0.checkBlur()]":function(e){return[e.checkBlur()]},"_0===_1":function(e,t){return e===t},'[(_0).set("rac.value",_1),_2._drawDisplay()]':function(e,t,n){return[e.set("rac.value",t),n._drawDisplay()]},'[(_0).set("rac.selected",_1)]':function(e,t){return[e.set("rac.selected",t)]},"_0._display(_1)":function(e,t){return e._display(t)}}};function k(e,t){return t.reduce(function(e,t){return e?e[t]:e},e)}var T=["INPUT","SELECT","TEXTAREA","BUTTON","BODY"],L=t.macro(function(e){var n,i,o;function r(t){null==t&&(t=null==e.get("rac.value")?"":e.get("rac.display")),t===e.get("rac.tempDisplay")&&(t="");var n=e.get("rac._items");if("function"==typeof n){var i=n(t);"object"==typeof i&&"function"==typeof i.then?i.then(function(t){return e.set("rac.list",t)}):e.set("rac.list",i)}else if(Array.isArray(n)){var o,r=e.get("rac._display");try{o=new RegExp(t||"","i")}catch(e){o=new RegExp((t||"").replace(/([\{\(\[\]\)\}\?\*\^\$])/g,"\\$1"))}e.set("rac.list",n.filter(function(e){return o.test(r(e))}))}else e.set("rac.list",[])}function a(t,n){var i=e.get("rac.default");return null==(t=null!=t||n?t:e.get("rac.value"))&&i&&(t="function"==typeof i?i(e.get("rac.display")):i),t}function l(n,o,l){var s=e.get("rac.displayprop");if(e.get("rac.__display")!==s||void 0===e.get("rac._display")){var f=function(){return e.attributes["display-value"]?e.get("rac.display"):"(none)"};if("string"==typeof s){var p=t.splitKeypath(s);s=function(e){return null==e&&(e=a()),null==e?f():k(e,p)}}else if(Array.isArray(s)){var d=s;s=function(e){return null==e&&(e=a()),null==e?f():k(e,d)}}else s||(s=function(e){return null==e&&(e=a()),null==e?f():""+e});e.set("rac._display",s),e.set("rac.__display",e.get("rac.displayprop")),e.set("rac.display",s(e.get("rac.value")))}if(s=e.get("rac.member"),e.get("rac.__member")!==s||void 0===e.get("rac._member")){if("string"==typeof s){var u=t.splitKeypath(s);s=function(e){return k(a(e),u)}}else if(Array.isArray(s)){var b=s;s=function(e){return k(a(e),b)}}else s||(s=function(e){return a(e)});e.set("rac._member",s),e.set("rac.__member",e.get("rac.member"))}s=e.get("rac.items"),e.get("rac.__items")===s&&void 0!==e.get("rac._items")||(Array.isArray(s)?e.set("rac._items",s):"function"==typeof s?e.set("rac._items",s):"object"==typeof s&&"function"==typeof s.then?s.then(function(t){e.set("rac._items",t),r()}):e.set("rac._items",[]),e.set("rac.__items",e.get("rac.items"))),i&&"rac.display"===l&&e.get("rac.limit")&&!i.contains(document.activeElement)&&c(),r()}function c(){var t=e.get("rac._display");if("function"==typeof t){var n=t(e.get("rac.value"));e.set("rac.display",n),e.set("rac.tempDisplay",n)}}function s(t){(t.items&&e.link(t.items,"rac.items"),t.value&&e.link(t.value,"rac._value"),e.set("rac.valueBound",!!t.value),t.selected&&e.link(t.selected,"rac.selected"),t["display-value"]&&e.link(t["display-value"],"rac.display"),"display"in t&&e.set("rac.displayprop",t.display),"member"in t&&e.set("rac.member",t.member),"offsets"in t?(e.set("rac.offsets",t.offsets),e.set("rac.fit",!("fit"in t)||t.fit)):e.set("rac.fit","fit"in t&&t.fit),e.set("rac.limit",t["limit-set"]),e.set("rac.default",t.default),e.get("rac.limit")&&e.get("input"))&&(e.get("input")!==document.activeElement&&c());l()}e.aliasLocal("rac"),e.set("rac.list",[]),e.set("rac.popped",!1),e.set("rac.stash",function(){e.set("rac.tempDisplay",e.get("rac.display")),e.set("rac.tempValue",e.get("rac.value"))}),e.set("rac.key",function(t){var n=t.which;if(27===n)e.set("rac.popped",!1),e.set("rac.display",e.get("rac.tempDisplay")),e.set("rac.value",e.get("rac.tempValue"));else if(38===n||40===n){t.preventDefault(),e.get("rac.pop").show(e.find("input"));var i=e.get("rac.selected"),o=e.get("rac.list");38===n?i<=0||null==i?e.set("rac.selected",Array.isArray(o)?o.length-1:0):e.set("rac.selected",i-1):Array.isArray(o)?e.set("rac.selected",i<o.length-1?i+1:0):e.set("rac.selected",0)}else if(10===n||13===n){var r=e.get("rac.list");Array.isArray(r)&&(e.set("rac.value",r[e.get("rac.selected")]),c())}else if(9===n){if(e.get("rac.popped")){var l=e.get("rac.list");if(Array.isArray(l)){var s=l[e.get("rac.selected")];null==s&&(s=a(s,!0)),e.set("rac.value",s)}e.get("rac.limit")||setTimeout(function(){return c()},140)}else null!=e.get("rac.value")&&~e.get("rac.selected")&&e.get("rac.display")==e.get("rac.tempDisplay")||e.set("rac.value",a(null,!0));e.set("rac.popped",!1),e.get("rac.updateDisplay")()}}),e.set("rac.input",function(t){n&&clearTimeout(n),n=setTimeout(function(){n=null,r(t.target.value);var i=e.find("input");i&&document.activeElement===i&&e.get("rac.pop").show(i)},500),e.attributes.lazy||e.set("rac.display",t.target.value)}),e.setTemplate(w),e.set("rac._drawDisplay",c),e.set("rac.updateDisplay",function(t){setTimeout(function(){i&&e.get("rac.limit")&&!i.contains(document.activeElement)&&c()},140)}),s(e.attributes);var f=!1,p={init:!1,defer:!0},d=[e.observe("rac.displayprop",l,p),e.observe("rac.memberprop",l,p),e.observe("rac.items",l,p),e.observe("rac.list",function(t){Array.isArray(t)?e.set("rac.selected",t.indexOf(e.get("rac.value"))):e.set("rac.selected",-1)},p),e.observe("rac.value",function(t){c(),function(){if(!e.get("rac._value")||e.get("rac.value")){var t=e.get("rac._member");if("function"==typeof t){var n=t(e.get("rac.value"));e.set("rac._value",n)}e.ractive.getContext(e.find("input")).raise("selected",{},e.get("rac._value"),e.get("rac.display"))}}(),e.set("rac.popped",!1),e.set("rac.tempValue",t)}),e.observe("rac._value",function(t){var n=e.get("rac._member"),i=e.get("rac.list").find(function(e){return n(e)===t});i!==e.get("rac.value")&&e.set("rac.value",i),!i&&null!=t&&e.get("rac.valueBound")&&(e.set("rac.display",t),l())}),e.observe("rac.selected",function(){o&&clearTimeout(n),o=setTimeout(function(){o=null;var t=e.find(".rac-hover");t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},14)}),e.observe("rac.popped",function(e){e&&setTimeout(function(){return f=!1},300),f=!0})];return e.set("rac.checkBlur",function(t){if(f)return!1;var n=document.activeElement;if(~T.indexOf(n.nodeName)||n.getAttribute("tabindex")){var i=e.findAll("input").concat(e.get("rac.pop").popFindAll("input"));document.activeElement&&!~i.indexOf(document.activeElement)&&e.get("rac.key")({which:9})}}),{teardown:function(){e.unlink("rac.items"),e.unlink("rac._value"),e.unlink("rac.selected"),e.unlink("rac.display"),d.forEach(function(e){return e.cancel()})},update:s,render:function(){i=e.find("span")}}},{attributes:["items","selected","display","value","member","limit-set","fit","offsets","display-value","default"],css:function(e){return[function(e){var t=Object.assign({},e("raui.primary"),e("raui.autocomplete"),e("raui.autocomplete.primary")),n=Object.assign({},e("raui.autocomplete.drop"),e("raui.autocomplete.primary.drop")),i=e("raui.form.boxy");return".rautocomplete {\n position: relative;\n display: inline-block;\n }\n \n .rac-drop {\n width: 2em;\n height: 100%;\n position: absolute;\n top: 0;\n right: 2px;\n cursor: pointer;\n }\n .rac-drop:after {\n font-family: "+(n.font||"sans-serif")+";\n content: "+(n.string||"'▾'")+";\n position: absolute;\n top: calc(50% - 0.5em);\n height: 1em;\n line-height: 1em;\n width: 100%;\n text-align: center;\n font-weight: "+(n.weight||"normal")+";\n color: "+(n.color||t.bc||"#ccc")+";\n }\n \n .rac-pop {\n min-width: 100%;\n }\n \n .rac-pop > .rpop {\n padding: 0;\n }\n \n .rac-list {\n display: flex;\n flex-direction: column;\n max-height: 50vh;\n min-height: 2.125em;\n max-width: 100%;\n overflow: auto;\n }\n \n .rac-item {\n color: "+(t.fg||"#222")+";\n background-color: "+(t.bg||"#fff")+";\n padding: 0.25em;\n cursor: pointer;\n }\n \n .rac-selected {\n color: "+(t.bg||"#fff")+";\n background-color: "+(t.fga||"#07e")+";\n }\n \n .rac-hover {\n color: "+(t.fg||"#222")+";\n background-color: "+(t.bc||"#ccc")+";\n }\n \n .rac-selected.rac-hover {\n background-color: "+(t.bc||"#ccc")+";\n color: "+(t.fga||"#07e")+";\n }\n \n .rac-invalid {\n cursor: not-allowed;\n }\n \n input.rac-modal {\n width: 100%;\n box-sizing: border-box;\n display: block;\n border-width: "+(i?"0.0625em":"0 0 0.0625em 0")+";\n border-color: "+(t.bc||"#ccc")+";\n border-style: solid;\n box-sizing: border-box;\n background-color: "+(i?t.bg||"#fff":"transparent")+";\n transition: 0.2s ease-in-out;\n transition-property: box-shadow, color;\n outline: none;\n box-shadow: none;\n width: 100%;\n margin-bottom: 0.8em;\n font-size: 1.1em;"+(i?"\n border-radius: "+(t.radius||"0.2em")+";":"")+"\n font-weight: 400;\n font-family: inherit;\n }"}.call(this,e)].join(" ")},cssId:"rautocomplete",noCssTransform:!0});function O(e){return void 0===e&&(e={}),function(t){var n=t.instance;n.partials[e.name||"autocomplete"]=L,n.components["rac-pop"]=u,n.decorators.autocompletefocus=_}}e.Autocomplete=L,e.FieldType=function(e){return void 0===e&&(e={}),function(t,n,i){return[{t:7,e:e.name||"autocomplete",m:t,f:n}]}},e.plugin=O,e.default=O,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],t):t(e.RauiAutocomplete={},e.Ractive)}(this,function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n="undefined"!=typeof window?window:null;function i(e,t,i){if(n&&n.Ractive&&"object"==typeof n.Ractive[t]){var o=document.currentScript;if(o||(o=(o=document.querySelectorAll("script"))[o.length-1]),o){var r=o.getAttribute("data-alias");r&&(r=(r=r.split("&")).reduce(function(e,t){var n=t.split("="),i=n[0],o=n[1];return e[i]=o,e},{})),Ractive[t][r&&r[e]||e]=i}}}function o(e,t){void 0===t&&(t={});var n=e.processParams(t,{duration:400,easing:"easeInOut"});t.dir=t.dir||!1;var i=t.distance||"20px",o=t.scale||"0.9",r="above"===t.dir?"translateY("+i+")":"left"===t.dir?"translateX("+i+")":"right"===t.dir?"translateX(-"+i+")":"translateY(-"+i+")";return e.isIntro||n.intro?(e.setStyle("opacity",0),e.setStyle("transform","scale("+o+") "+r),e.animateStyle({opacity:1,transform:"none"},n)):(e.setStyle("opacity",1),e.setStyle("transform","none"),e.animateStyle({opacity:0,transform:"scale("+o+") "+r},n))}function r(e){return void 0===e&&(e={}),function(t){t.instance.transitions[e.name||"pop"]=o}}function a(e,t){var n=!1,i=!1;function o(n){for(var i=n.target;i;){if(i===e)return;if(!i.parentNode&&i!==document)return;i=i.parentNode}t(n)}return setTimeout(function(){n=!0,i||(document.body.addEventListener("click",o,{capture:!0}),document.body.addEventListener("touchstop",o,{capture:!0}))}),{teardown:function(){i=!0,n&&(document.body.removeEventListener("click",o,{capture:!0}),document.body.removeEventListener("touchstop",o,{capture:!0}))}}}function l(e,t){var n=e.processParams(t,{duration:200,easing:"easeInOut"});return e.isIntro||n.intro?(e.setStyle("opacity",0),e.animateStyle("opacity",1,n)):(e.setStyle("opacity",1),e.animateStyle("opacity",0,n))}function c(e){return void 0===e&&(e={}),function(t){t.instance.transitions[e.name||"fade"]=l}}i("pop","transitions",o),i("fade","transitions",l);var s,f,p,d={v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-wrapper",g:1},{n:"class-rpop-with-tail",t:13,f:[{t:2,r:"position.tail"}]},{n:"class",f:["rpop-",{t:2,x:{r:["where"],s:'_0||"below"'}}," rpop-align-",{t:2,x:{r:["align"],s:'_0||"middle"'}}],t:13},{t:4,f:[{n:"style-top",f:[{t:2,r:"position.popTop"},"px"],t:13},{n:"style-left",f:[{t:2,r:"position.popLeft"},"px"],t:13}],n:50,r:"position"},{t:4,f:[{t:4,f:[{n:"style-top",f:[{t:2,r:"top"}],t:13}],n:50,r:"top"},{t:4,f:[{n:"style-left",f:[{t:2,r:"left"}],t:13}],n:50,r:"left"}],n:51,l:1},{n:"pop",t:72,f:{r:["where"],s:'[{dir:_0||"below"}]'},v:"t2"},{n:"cleanup",t:71},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:50,r:"clickClose"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:51,r:"noClickout"},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail-outer",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}],n:50,r:"~/tail"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1}],f:[{t:16,r:"content",z:[{n:"trigger",x:{r:"triggerContext"}}]}]}]}],n:50,r:"__popped"}],e:{'_0||"below"':function(e){return e||"below"},'_0||"middle"':function(e){return e||"middle"},'[{dir:_0||"below"}]':function(e){return[{dir:e||"below"}]},'[_0.set("popped",false)]':function(e){return[e.set("popped",!1)]},"_0+(_1?3:0)":function(e,t){return e+(t?3:0)},"_0!=null":function(e){return null!=e},"_0+(_1?0:3)":function(e,t){return e+(t?0:3)},"_0-2":function(e){return e-2},"[{delay:200}]":function(){return[{delay:200}]},"[_0===_1&&_2.done(),true]":function(e,t,n){return[e===t&&n.done(),!0]},"[_0.done()]":function(e){return[e.done()]},true:function(){return!0}},p:{modal:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-modal",g:1},{n:"fade",t:72,v:"t1"},{n:"fade",t:72,f:{r:[],s:"[{delay:200}]"},v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["@node","@event.target","."],s:"[_0===_1&&_2.done(),true]"}}],n:51,r:".noClickout"}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1},{n:"pop",t:72,f:{r:[],s:"[{delay:200}]"},v:"t1"},{n:"pop",t:72,v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.done()]"}}],n:50,r:".clickClose"},{t:8,r:".attrs",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}],f:[{t:8,r:".content",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}]}]}],n:54,r:"contents.0"}],n:50,r:"contents.length"}]}},u=function(e){function t(t){e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.position=function(t){var n=t||this.source,i=this.get("popped");if(n&&i){var o=this.find("div");if(n&&o&&o.offsetParent){n?this.set("triggerContext",e.getContext(n)):this.set("triggerContext",null);var r=o.offsetParent,a=r.getBoundingClientRect(),l=o.getBoundingClientRect(),c=n.getBoundingClientRect(),s=this.get("where")||"below",f=this.get("align")||"middle",p=this.get("tail"),d="above"===s||"below"===s,u=this.get("fit"),b=this.get("gap"),m="above"===s||"below"===s?0:"left"===s?-l.width-b:c.width+b,h="left"===s||"right"===s?-c.height:"above"===s?-c.height-l.height-b:b;"middle"===f?"below"===s||"above"===s?m-=(l.width-c.width)/2:"left"!==s&&"right"!==s||(h-=(l.height-c.height)/2):"end"===f&&("below"===s||"above"===s?m+=c.width-l.width:"left"!==s&&"right"!==s||(h+=c.height-l.height));var g={popTop:c.bottom-a.top+h,popLeft:c.left-a.left+m,tail:p,vert:"above"===s||"below"===s};if(r.scrollTop&&(g.popTop+=r.scrollTop),r.scrollLeft&&(g.popLeft+=r.scrollLeft),p){"above"===s?g.tailBottom=-10:"below"===s?g.tailTop=-10:"left"===s?g.tailRight=-10:"right"===s&&(g.tailLeft=-10);var v=this.tailSource?this.tailSource.getBoundingClientRect():c;"start"===f?d?g.tailLeft=Math.floor(v.width/2)-10:g.tailTop=Math.floor(v.height/2)-10:"end"===f?d?g.tailRight=Math.floor(v.width/2)-10:g.tailBottom=Math.floor(v.height/2)-10:"middle"===f&&(d?g.tailLeft=Math.floor(v.width/2)-10:g.tailTop=Math.floor(v.height/2)-10),v!==c?d?(null!=g.tailLeft&&(g.tailLeft+=v.left-c.left),null!=g.tailRight&&(g.tailRight+=c.right-v.right)):(null!=g.tailTop&&(g.tailTop+=v.top-c.top),null!=g.tailBottom&&(g.tailBottom+=c.bottom-v.bottom)):"middle"===f&&(d?(null!=g.tailLeft&&(g.tailLeft+=v.left-(g.popLeft+a.left)),null!=g.tailRight&&(g.tailRight+=g.popLeft+a.left+l.width-v.right)):(null!=g.tailTop&&(g.tailTop+=v.top-(g.popTop+a.top)),null!=g.tailBottom&&(g.tailBottom+=g.popTop+a.top+l.height-v.bottom)))}if(u){var y=r;if(this.get("offsets"))for(var x=this.get("offsets");x--;)y=y.offsetParent;var _=r.scrollWidth,w=r.scrollHeight;if(g.popLeft+l.width>_){var k=g.popLeft-(_-l.width);g.popLeft-=k,d&&g.tailLeft&&(g.tailLeft+=k),d&&g.tailRight&&(g.tailRight-=k),p&&!d&&(g.tail=!1)}if(g.popLeft<0){var T=-1*g.popLeft;g.popLeft+=T,d&&g.tailLeft&&(g.tailLeft-=T),d&&g.tailRight&&(g.tailRight+=T),p&&!d&&(g.tail=!1)}if(g.popTop+l.height>w){var L=g.popTop-(w-l.height);g.popTop-=L,!d&&g.tailTop&&(g.tailTop+=L),!d&&g.tailBottom&&(g.tailBottom-=L),p&&d&&(g.tail=!1)}if(g.popTop<0){var O=-1*g.popTop;g.popTop+=O,!d&&g.tailTop&&(g.tailTop-=O),!d&&g.tailBottom&&(g.tailBottom+=O),p&&d&&(g.tail=!1)}}if(a.left+g.popLeft<0){var B=0-(a.left+g.popLeft);g.popLeft+=B,d&&g.tailLeft&&(g.tailLeft-=B),d&&g.tailRight&&(g.tailRight+=B),p&&!d&&(g.tail=!1)}if(a.top+g.popTop<0){var A=0-(a.top+g.popTop);g.popTop+=A,!d&&g.tailTop&&(g.tailTop-=A),!d&&g.tailBottom&&(g.tailBottom+=A),p&&d&&(g.tail=!1)}g.tailLeft&&(g.tailLeft=Math.floor(g.tailLeft)),g.tailRight&&(g.tailRight=Math.floor(g.tailRight)),g.tailTop&&(g.tailTop=Math.floor(g.tailTop)),g.tailBottom&&(g.tailBottom=Math.floor(g.tailBottom)),this.set("position",g)}else this.set("position",null)}},t.prototype.show=function(e){return this.source=e,this.set("popped",!0),this._transdone},t.prototype.hide=function(){return this.set("popped",!1),this._transdone},t.prototype.popFind=function(e){return s?f.find(e):this.find(e)},t.prototype.popFindAll=function(e){return s?f.findAll(e):this.findAll(e)},t}(t);t.extendWith(u,{attributes:["popped","tail","where","align","top","left","fit","clickClose","noClickout","gap","offsets"],use:[r(),(void 0===p&&(p={}),function(e){e.instance.events[p.name||"clickout"]=a}),c()],template:d,css:function(e){return[function(e){var t=Object.assign({},e("raui.primary"),e("raui.pop.primary")),n=(e("raui.themes")||[]).slice();return(e("raui.pop.themes")||[]).forEach(function(e){~n.indexOf(e)||n.push(e)}),"\n .rpop-wrapper {\n position: absolute;\n display: inline-block;\n z-index: 21;\n transition-property: top, left, padding;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-with-tail.rpop-above {\n padding-bottom: 10px;\n }\n .rpop-with-tail.rpop-below {\n padding-top: 10px;\n }\n .rpop-with-tail.rpop-left {\n padding-right: 10px;\n }\n .rpop-with-tail.rpop-right {\n padding-left: 10px;\n }\n \n .rpop {\n position: relative;\n box-shadow: 0 1px 4px 0 rgba(0,0,0,0.24);\n border: 1px solid #ccc;\n border-radius: 0.2em;\n background-color: "+(t.bg||"#fff")+";\n color: "+(t.fg||"#222")+";\n padding: 0.5em;\n z-index: 2;\n }\n \n .rpop-modal {\n position: fixed;\n display: flex;\n z-index: 20;\n background-color: rgba(0, 0, 0, 0.2);\n align-items: center;\n justify-content: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 1em;\n overflow: auto;\n }\n \n .rpop-tail, .rpop-tail-outer {\n z-index: 3;\n width: 0;\n height: 0;\n position: absolute;\n border-style: solid;\n border-width: 10px;\n border-color: transparent;\n transition-property: top, left, bottom, right, border-color;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-tail-outer {\n z-index: 1;\n border-width: 12px;\n border-color: transparent;\n }\n \n .rpop-below .rpop-tail {\n border-bottom-color: "+(t.bg||"#fff")+";\n }\n .rpop-below .rpop-tail-outer {\n border-bottom-color: "+(t.bc||"#ccc")+";\n }\n \n .rpop-above .rpop-tail {\n border-top-color: "+(t.bg||"#fff")+";\n }\n .rpop-above .rpop-tail-outer {\n border-top-color: "+(t.bc||"#ccc")+";\n }\n \n .rpop-left .rpop-tail {\n border-left-color: "+(t.bg||"#fff")+";\n }\n .rpop-left .rpop-tail-outer {\n border-left-color: "+(t.bc||"#ccc")+";\n }\n \n .rpop-right .rpop-tail {\n border-right-color: "+(t.bg||"#fff")+";\n }\n .rpop-right .rpop-tail-outer {\n border-right-color: "+(t.bc||"#ccc")+";\n }\n "+n.map(function(t){var n=Object.assign({},e("raui.primary"),e("raui.pop.primary"),e("raui."+t),e("raui.pop."+t));return"\n ."+t+" .rpop {\n background-color: "+(n.bg||"#fff")+";\n color: "+(n.fg||"#222")+";\n }\n \n ."+t+".rpop-below .rpop-tail {\n border-bottom-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-below .rpop-tail-outer {\n border-bottom-color: "+(n.bc||"#ccc")+";\n }\n \n ."+t+".rpop-above .rpop-tail {\n border-top-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-above .rpop-tail-outer {\n border-top-color: "+(n.bc||"#ccc")+";\n }\n \n ."+t+".rpop-left .rpop-tail {\n border-left-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-left .rpop-tail-outer {\n border-left-color: "+(n.bc||"#ccc")+";\n }\n \n ."+t+".rpop-right .rpop-tail {\n border-right-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-right .rpop-tail-outer {\n border-right-color: "+(n.bc||"#ccc")+";\n }\n "})}.call(this,e)].join(" ")},cssId:"rpop",noCssTransform:!0,observe:{popped:function(e){var t,n=this,i=this._transdone=new Promise(function(e){return t=e});i.resolve=t,setTimeout(function(){n._transdone=i,n.get("popped")===e&&n.set("_popped",e)},1)},_popped:{handler:function(e){var t=this,n=this._transdone.resolve;if(e){var i=this.get("@style.raui.pop.mobile");if(i&&window.matchMedia("(max-width: "+i+")").matches){f||(f=new b({target:document.body,append:!0}));var o=this.getContext().getParent(!0);o.isContext=1,this.set("__popped",!1).then(n),f.unshift("contents",{content:this.partials.content,context:o,attrs:this.partials["extra-attributes"]||[],clickClose:this.get("clickClose"),noClickout:this.get("noClickout"),done:function(){t.set("popped",!1)}})}else this.set("__popped",!0)}else s?(f.shift("contents"),n()):this.set("__popped",!1).then(n)},defer:!0,init:!1},__popped:{handler:function(e){var t=this._transdone.resolve;if(e){var n=this.find("div"),i=n,o=i.offsetHeight+i.offsetTop,r=i.offsetWidth+i.offsetLeft,a=i.offsetParent;if(!this.overflows)for(var l=this.overflows={e:[],v:[]};n&&n.style;){if(n===a){if(n.offsetWidth>=r&&n.offsetHeight>=o)break;r+=n.offsetLeft,o+=n.offsetTop,a=n.offsetParent}var c=getComputedStyle(n);if("auto"===c.overflow)break;"hidden"===c.overflow&&(l.e.push(n),l.v.push(n.style.overflow),n.style.overflow="visible"),n=n.parentNode}this.position(),this.transition("pop",i,{intro:!0,dir:this.get("where")||"below"}).then(t)}else this.source=null,this.tailSource=null},defer:!0,init:!1},"align where tail fit":{handler:function(){this.position()},defer:!0}},decorators:{cleanup:function(e){var t=this;return{teardown:function(){var e=t.overflows;if(e){t.overflows=null;for(var n=0;n<e.e.length;n++)e.e[n].style.overflow=e.v[n]}}}}},data:function(){return{gap:4}}});var b=function(e){function t(t){e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(t);function m(){}function h(e){~this.className.indexOf("focus")||(this.className+=" focus")}function g(e){this.className=this.className.replace(/\bfocus\b/g,"").trim()}function v(e){var t,n,i,o,r,a,l,c,s,f,p,d,u,b=this.getContext(e);function v(){var b=y().split(/\s+/).filter(function(e){return!!e});(t=!!~b.indexOf("field"))||(b.push("field"),t=!0),(n=e.querySelector("input[type=checkbox]"))&&!~b.indexOf("check")&&b.push("check"),(i=e.querySelector("input[type=radio]"))&&!~b.indexOf("radio")&&b.push("radio");var m=n||i;m&&m.checked&&!~b.indexOf("checked")&&b.push("checked"),m&&m.disabled&&!~b.indexOf("disabled")&&b.push("disabled"),!m&&f?(f.cancel(),f=0,p&&(p.disconnect(),p=0),delete m._form_callback,u&&(delete u.checked,d=u=void 0)):m&&(m._form_callback=function(t,n){if(void 0===n&&(n=!0),n&&"radio"===m.type&&m.name){var i=[];i.push.apply(i,document.querySelectorAll("input[type=radio][name="+m.name+"]")),(i=i.filter(function(e){return e!==m})).forEach(function(e){return e._form_callback&&e._form_callback(t,!1)})}var o=m.checked;o&&!~e.className.indexOf("checked")?e.className+=" checked":!o&&~e.className.indexOf("checked")&&(e.className=e.className.replace(/\bchecked\b/g,"").replace(/ +/g," ").trim())},MutationObserver&&(p=new MutationObserver(function(){var t;(t=m.disabled)&&!~e.className.indexOf("disabled")?e.className+=" disabled":!t&&~e.className.indexOf("disabled")&&(e.className=e.className.replace(/\bdisabled\b/g,"").replace(/ +/g," ").trim())})).observe(m,{attributes:!0}),f=this.getContext(m).listen("change",m._form_callback),(d=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(m),"checked"))&&d.configurable&&(u=m,Object.defineProperty(m,"checked",{get:d.get,set:function(e){d.set.call(u,e),m._form_callback()},enumerable:!0,configurable:!0}))),(o=!!e.querySelector("textarea"))&&!~b.indexOf("textarea")&&b.push("textarea"),(r=!!e.querySelector("select"))&&!~b.indexOf("select")&&b.push("select"),(a=!!e.querySelector("input[type=file]"))&&!~b.indexOf("file")&&b.push("file"),(l=!!(l=e.querySelector("button"))&&l.parentNode===e)&&!~b.indexOf("button")&&b.push("button"),(c=!!e.querySelector("div"))&&!~b.indexOf("plain")&&b.push("plain"),(s=!(n||i||a||!e.querySelector("input")))&&!~b.indexOf("input")&&b.push("input"),e.className=b.join(" ")}function y(){var f=e.className;return t||(f=f.replace(/\bfield\b/g,"").trim()),n||(f=f.replace(/\bcheck(ed)?\b/g,"").trim()),i||(f=f.replace(/\bradio\b/g,"").trim()),o||(f=f.replace(/\btextarea\b/g,"").trim()),r||(f=f.replace(/\bselect\b/g,"").trim()),a||(f=f.replace(/\bfile\b/g,"").trim()),l||(f=f.replace(/\bbutton\b/g,"").trim()),c||(f=f.replace(/\bplain\b/g,"").trim()),s||(f=f.replace(/\binput\b/g,"").trim()),f=f.replace(/ +/g," ")}var x=b.listen("focusin",h),_=b.listen("focusout",g);v.call(this);var w={update:m,invalidate:v.bind(this),teardown:function(){b.ractive.fire("fieldUnregistered",b,e,w);var t=y();t=t.replace(/\bfocus\b/g,"").trim(),x.cancel(),_.cancel(),f&&f.cancel(),p&&p.disconnect(),u&&(delete u.checked,d=u=void 0),e.className=t},setDisabled:function(t){e.querySelectorAll("input,button,select,textarea").forEach(function(e){return e.disabled=t}),this.invalidate()}};return b.ractive.fire("fieldRegistered",b,e,w),w}function y(e,t){if(!e)return!1;for(var n=0;n<e.length;n++){if(e[n].e===t)return!0;if(e[n].f&&y(e[n].f,t))return!0}return!1}t.extendWith(b,{template:{v:d.v,t:d.p.modal},data:function(){return{contents:[]}},use:[r(),c()],observe:{contents:function(e){s=(e||[]).length>0}},on:{init:function(){f?console.warn("More than one PopOver mobile host created."):f=this}}}),v.style=function(e){var t=Object.assign({},e("raui.primary"),e("raui.form.primary")),n=Object.assign({},e("raui.primary.active"),e("raui.form.primary.active")),i=Object.assign({},e("raui.primary.disabled"),e("raui.form.primary.disabled")),o=e("raui.form.boxy");return"\n label.field, .field-manual {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: "+(t.fg||"#222")+";\n transition: 0.2s ease-in-out;\n transition-property: color;\n vertical-align: top;\n box-sizing: border-box;\n padding: 0.25em 0.5em;\n line-height: 1.5em;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: inherit;\n }\n\n label.field.textarea {\n display: block;\n border: 0.0625em solid "+(t.bc||"#ccc")+";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: "+(t.radius||"0.2em")+";\n box-shadow: none;\n transition-property: color, border-color, box-shadow;\n margin: 0.8em 0.2em;\n min-height: auto;\n background-color: "+(o?t.bg||"#fff":"transparent")+";\n }\n\n label.field.focus {\n color: "+(n.fg||t.fga||"#07e")+";\n }\n\n label.field.textarea.focus {\n border-color: "+(n.fg||t.fga||"#07e")+";\n "+(o?"":"box-shadow: 0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n 0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+";")+"\n }\n\n label.field input,\n label.field select,\n label.field textarea,\n .field-manual .field-body\n {\n display: block;\n border-width: "+(o?"0.0625em":"0 0 0.0625em 0")+";\n border-color: "+(t.bc||"#ccc")+";\n border-style: solid;\n box-sizing: border-box;\n background-color: "+(o?t.bg||"#fff":"transparent")+";\n transition: 0.2s ease-in-out;\n transition-property: box-shadow, color;\n outline: none;\n box-shadow: none;\n width: 100%;\n margin-bottom: 0.8em;\n font-size: 1.1em;"+(o?"\n border-radius: "+(t.radius||"0.2em")+";":"")+"\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input"+(o?"":":disabled")+",\n label.field select"+(o?"":":disabled")+" {\n padding: 0 0.75em;\n }\n label.field select"+(o?"":":disabled")+" {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field input[readonly],\n label.field select:disabled,\n label.field textarea:disabled,\n label.field textarea[readonly] {\n background: "+(i.bg||"#f4f4f4")+";\n color: "+(i.fg||"#444")+";\n }\n\n label.field textarea {\n line-height: 1.2em;\n }\n label.field .field-wrapper {\n display: block;\n }\n label.field > select, label.field > input,\n label.field > .field-wrapper > input, label.field > .field-wrapper > select {\n height: 2.5em;\n }\n\n "+(o?"":"label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 "+(t.bc||"#ccc")+";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em "+(t.bc||"#ccc")+",\n -0.0625em 0.0625em "+(t.bc||"#ccc")+",\n 0.0625em -0.0625em "+(t.bc||"#ccc")+",\n -0.0625em -0.0625em "+(t.bc||"#ccc")+";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n 0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+";\n }")+"\n\n /**** CHECK BOXES ****/\n\n label.field.check, label.field.radio {\n position:relative;\n z-index: 0;\n overflow: visible;\n cursor: pointer;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.check.inline, label.field.radio.inline {\n padding-top: 0.7em;\n }\n\n label.field.check input, label.field.radio input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -0.5em;\n top: 1em;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 3.2em;\n height: 3.2em;\n background-color: "+(t.bc||"#ccc")+";\n box-shadow: none;\n outline: none;\n opacity: 0;\n transform: scale(1);\n pointer-events: none;\n transition: opacity 0.3s, transform 0.2s;\n }\n label.field.inline.check input, label.field.inline.radio input {\n top: -0.45em;\n left: -0.55em;\n }\n\n label.field.check input:checked, label.field.radio input:checked {\n background-color: "+(t.fga||"#07e")+";\n }\n\n label.field.check:hover > input, label.field.radio:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus, label.field.radio input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus, label.field.radio:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active, label.field.radio input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before, label.field.radio:before {\n content: '';\n display: inline-block;\n box-sizing: border-box;\n margin: 0 0.5em 0.2em 0.1em;\n border: solid 0.125em; /* Safari */\n border-color: "+(t.fg||"#222")+';\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after, label.field.radio:after {\n content: \'\';\n display: inline-block;\n opacity: 0;\n position: absolute;\n width: 1.2em;\n height: 1.2em;\n top: 2.3em;\n left: 0.6em;\n border-radius: 0.125em;\n }\n label.field.check.inline:after, label.field.radio.inline:after {\n top: 0.8em;\n }\n\n label.field.check.checked:after {\n opacity: 1;\n background: no-repeat center/80% url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="'+(t.bg||"#fff").replace(/#/g,"%23")+'" d="m 15.378906,1.7050781 a 1.0583349,1.0583349 0 0 0 -1.478515,0.234375 L 6.6210937,11.960938 1.8652344,8.5058594 a 1.0583349,1.0583349 0 0 0 -1.47851565,0.234375 1.0583349,1.0583349 0 0 0 0.234375,1.4785156 L 6.234375,14.294922 A 1.0584408,1.0584408 0 0 0 7.7128906,14.060547 L 15.613281,3.1835938 A 1.0583349,1.0583349 0 0 0 15.378906,1.7050781 Z" /></svg>\') '+(t.fga||"#07e")+';\n }\n\n label.field.radio.checked:after {\n opacity: 1;\n background: no-repeat center/80% url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><circle fill="'+(t.bg||"#fff").replace(/#/g,"%23")+'" cx="8" cy="8" r="5" /></svg>\') '+(t.fga||"#07e")+";\n }\n\n label.field.check.checked:before, label.field.radio.checked:before {\n border-color: "+(t.fga||"#07e")+";\n }\n label.field.check.focus:before, label.field.radio.focus:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.check input:disabled, label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled, label.field.radio.disabled {\n color: "+(i.fg||"#444")+";\n cursor: initial;\n }\n\n label.field.check.disabled:before, label.field.radio.disabled:before {\n border-color: "+(i.bc||"#ccc")+";\n background-color: "+(i.bg||"#f4f4f4")+";\n }\n\n label.field.check.checked.disabled:after, label.field.radio.checked.disabled:after {\n border-color: transparent;\n background-color: "+(i.bc||"#ccc")+";\n }\n\n label.field select {\n padding-right: 2em;\n }\n\n label.field.select {\n cursor: pointer;\n position: relative;\n }\n\n label.field.select:after {\n content: ' ';\n position: absolute;\n display: block;\n width: 0.6em;\n right: 1.125em;\n height: 0.6em;\n top: 2.6em;\n border-bottom: 0.125em solid;\n border-right: 0.125em solid;\n transform: rotate(45deg);\n pointer-events: none;\n color: "+(t.bc||"#ccc")+";\n }\n\n label.field textarea {\n border: none;"+(o?"\n padding: 0;":"")+"\n }\n\n label.field > select {\n -moz-appearance: none;\n -webkit-appearance: none;\n }\n\n label.field input:focus,\n label.field select:focus,\n label.field.file.focus:after\n {\n border-color: "+(n.fg||t.fga||"#07e")+";\n "+(o?"":"box-shadow: 0 0.0625em 0 0 "+(n.fg||t.fga||"#07e")+";")+"\n }\n\n label.field input[type=checkbox]:focus,\n label.field input[type=radio]:focus {\n box-shadow: none;\n }\n\n label.field.file.focus:after {\n color: "+(n.fg||t.fga||"#07e")+";\n }\n label.field.file [type=file] {\n position: absolute;\n width: 0;\n height: 0;\n opacity: 0;\n z-index: -1;\n }\n label.field.file {\n position: relative;\n min-width: 9em;\n height: 5em;\n }\n label.field.file:after {\n position: absolute;\n content: 'Choose a file';\n box-sizing: border-box;\n width: calc(100% - 0.3em);\n height: 2.5em;\n font-size: 1.1em;\n line-height: 1.5em;\n color: "+(t.fg||"#222")+";\n text-align: "+(o?"center":"left")+";\n padding: 0.5em "+(o?"0.5em":"0")+";\n cursor: pointer;\n font-style: oblique;\n left: 0.25em;\n top: 1.6em;\n transition: 0.2s ease-in-out;\n transition-property: color, border-bolor, box-shadow;"+(o?"\n border-radius: "+(t.radius||"0.2em")+";\n border-color: "+(t.bc||"#ccc")+";\n border-style: solid;\n border-width: 0.0625em;":"\n border-bottom-color: "+(t.bc||"#ccc")+";\n border-bottom-width: 0.0625em;\n border-bottom-style: solid;\n ")+"\n }\n label.field.file.inline:after {\n top: 0.2em;\n }\n\n label.field.button {\n vertical-align: top;\n padding-top: "+(o?"1.7":"1.958")+"em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: "+(o?"0.15em":"0")+";\n }\n\n label.field .field-wrapper.with-buttons {\n display: flex;\n }\n label.field .with-buttons button {\n flex-shrink: 0;\n padding-left: 0.5em;\n padding-right: 0.5em;\n margin-top: 0;\n margin-right: 0;\n "+(o?"height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid "+(t.bg||"#fff")+";\n margin-left: 0;":"height: 2.25em;")+"\n }"+(o?"\n label.field .with-buttons button:first-of-type {\n margin-left: -0.05em;\n border-left: none;\n }\n label.field .with-buttons button:last-of-type {\n border-radius: 0 "+(t.radius||"0.2em")+" "+(t.radius||"0.2em")+" 0;\n }\n label.field .with-buttons input {\n border-radius: "+(t.radius||"0.2em")+" 0 0 "+(t.radius||"0.2em")+";\n min-width: 0;\n }\n ":"")+"\n\n label.field.plain > div {\n position: absolute;\n font-size: 1.1em;\n top: 2.4em;\n font-weight: normal;\n }\n\n /* inline fields (no labels) */\n label.field.inline {\n min-height: 3.3em;\n }\n\n label.field.button.inline {\n margin-top: 0.2em;\n padding-top: 0.12em;\n }\n\n label.field.button.inline button {\n margin-top: 0;\n }\n\n label.field.inline.select:after {\n top: 1."+(o?"15":"1")+"em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: "+(t.fga||"#07e")+";\n color: "+(t.bg||"#fff;")+";\n cursor: default;\n user-select: none;\n border-radius: 1em;\n margin-left: 0.5em;\n line-height: 1.2em;\n text-align: center;\n margin-top: -0.2em;\n }\n\n label.field .field-solo-tip {\n margin-left: -0.1em;\n }\n "};var x=t.macro(function(e){var t=[],n=[],i=(e.template.m||[]).slice(),o=e.template.f||[],r=i.find(function(e){return"value"===e.n}),a=i.find(function(e){return"type"===e.n}),l=i.find(function(e){return"tip"===e.n}),c=i.find(function(e){return"disabled"===e.n});if(l&&i.splice(i.indexOf(l),1),a&&"function"==typeof x.types[a.f])t.push.apply(t,x.types[a.f](i,o,e));else if(r){var s={t:7,e:"input",m:[r]};if(c&&s.m.push(c),y(o,"option")&&(s.e="select",s.f=o),a&&(s.m.push(a),"checkbox"===a.f||"radio"===a.f)){var f=i.find(function(e){return"target"===e.n});f?s.m.push(Object.assign({},f,{n:"name"})):s.m.splice(s.m.indexOf(r),1,Object.assign({},r,{n:"checked"}))}s.m=s.m.concat(i.filter(function(e){return 73===e.t||73===e.t||"placeholder"===e.n})),t.push(s);var p=o.filter(function(e){return"button"===e.e||y(e.f,"button")});p.length&&(t.push.apply(t,p),t=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:t}])}else{o.forEach(function(e){"label"===e.e?e.f&&e.f.length&&n.push.apply(n,e.f):t.push(e)});var d=o.filter(function(e){return e.e});d.find(function(e){return"button"===e.e})&&d.length>1&&(t=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:t}])}var u=i.find(function(e){return"label"===e.n});u&&u.f&&u.f.length&&n.push.apply(n,Array.isArray(u.f)?u.f:[u.f]),l&&t.unshift({t:7,e:"span",m:[{t:13,n:"class",f:"field-tip"+(n.length?"":" field-solo-tip"),g:1},{t:13,n:"title",f:l.f},{t:70,n:["click"],f:{r:[],s:"[false]"}}],f:"?"});var b=i.find(function(e){return"inline"===e.n});n&&!b?t.unshift.apply(t,n):b||t.unshift(" ");var m={t:7,e:"label",m:[{t:71,n:"field"}].concat(i.filter(function(e){return 13!==e.t&&73!==e.t||"value"!==e.n&&"type"!==e.n&&"inline"!==e.n&&"label"!==e.n&&"placeholder"!==e.n&&"target"!==e.n&&"disabled"!==e.n})),f:t};b&&m.m.push({t:13,n:"class",f:"inline"}),e.setTemplate([m])});function _(e,t){return"function"!=typeof e.focus||e.disabled||(t&&t.immediate?e.focus():setTimeout(function(){return!e.disabled&&e.focus()},(t||{}).timeout||250)),{teardown:m}}x.types={},i("field","decorators",v),i("field","partials",x),i("autofocus","decorators",_);var w={v:4,t:[{t:7,e:"span",m:[{t:13,n:"class",f:"rautocomplete field-wrapper",g:1},{n:["pop"],t:70,f:{r:["@context","$1"],s:'[(_0).set("rac.pop",_1)]'}}],f:[{t:7,e:"input",m:[{t:8,r:"extra-attributes"},{n:["dblclick"],t:70,f:{r:["rac.pop","@node"],s:"[_0.show(_1)]"}},{n:["focus"],t:70,f:{r:["rac"],s:"[_0.stash()]"}},{n:["blur"],t:70,f:{r:["rac","@node"],s:"[_0.checkBlur(_1)]"}},{n:["input"],t:70,f:{r:["rac","@event"],s:"[_0.input(_1)]"}},{n:["keydown"],t:70,f:{r:["rac","@event"],s:"[_0.key(_1)]"}},{t:73,v:"t",f:"false"},{n:"value",f:[{t:2,r:"rac.display"}],t:13}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rac-drop",g:1},{n:["click"],t:70,f:{r:["rac.pop","@context"],s:'[_0.show((_1).find("input"))]'}}]}," ",{t:7,e:"rac-pop",m:[{t:13,n:"style",f:"padding: 0;",g:1},{t:13,n:"class",f:"rac-pop",g:1},{n:["init"],t:70,f:{r:["@context","$1"],s:'[(_0).raise("pop",{},_1)]'}},{n:"popped",t:13,f:[{t:2,r:"rac.popped"}]},{n:"where",f:"below",t:13,g:1},{n:"align",f:"end",t:13,g:1},{n:"gap",f:[{t:2,x:{r:[],s:"2"},s:1}],t:13},{n:"offsets",t:13,f:[{t:2,r:"rac.offsets"}]},{n:"fit",t:13,f:[{t:2,r:"rac.fit"}]}],f:[{t:4,f:[{t:7,e:"input",m:[{n:"class-rac-modal",t:13},{n:["input"],t:70,f:{r:["rac","@event"],s:"[_0.input(_1)]"}},{n:["keydown"],t:70,f:{r:["rac","@event"],s:"[_0.key(_1)]"}},{t:73,v:"t",f:"false"},{n:"value",f:[{t:2,r:"rac.display"}],t:13},{n:["blur"],t:70,f:{r:["rac"],s:"[_0.checkBlur()]"}},{n:"autocompletefocus",t:71}]}],n:50,r:"inModal"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rac-list",g:1},{n:"tabindex",f:"-1",t:13,g:1}],f:[{t:55,f:[{f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rac-item rac-invalid",g:1}],f:["Loading..."]}],t:4},{t:62,f:[" ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rac-item",g:1},{n:"tabindex",f:"-1",t:13,g:1},{t:4,f:[{n:"class-rac-selected",t:13,f:[{t:2,x:{r:["rac.value","."],s:"_0===_1"}}]}],n:50,r:"rac.valueBound"},{n:"class-rac-hover",t:13,f:[{t:2,x:{r:["rac.selected","@index"],s:"_0===_1"}}]},{t:4,f:[{n:["click"],t:70,f:{r:["@context",".","rac"],s:'[(_0).set("rac.value",_1),_2._drawDisplay()]'}},{n:["mouseover"],t:70,f:{r:["@context","@index"],s:'[(_0).set("rac.selected",_1)]'}}],n:50,r:"rac.popped"}],f:[{t:2,x:{r:["rac","."],s:"_0._display(_1)"}}]}],n:52,r:"items"}," "],n:"items"},{t:63,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rac-item rac-invalid",g:1}],f:["Load failed."]}]}],r:"rac.list"}]}]}]}],e:{2:function(){return 2},'[(_0).set("rac.pop",_1)]':function(e,t){return[e.set("rac.pop",t)]},"[_0.show(_1)]":function(e,t){return[e.show(t)]},"[_0.stash()]":function(e){return[e.stash()]},"[_0.checkBlur(_1)]":function(e,t){return[e.checkBlur(t)]},"[_0.input(_1)]":function(e,t){return[e.input(t)]},"[_0.key(_1)]":function(e,t){return[e.key(t)]},'[_0.show((_1).find("input"))]':function(e,t){return[e.show(t.find("input"))]},'[(_0).raise("pop",{},_1)]':function(e,t){return[e.raise("pop",{},t)]},"[_0.checkBlur()]":function(e){return[e.checkBlur()]},"_0===_1":function(e,t){return e===t},'[(_0).set("rac.value",_1),_2._drawDisplay()]':function(e,t,n){return[e.set("rac.value",t),n._drawDisplay()]},'[(_0).set("rac.selected",_1)]':function(e,t){return[e.set("rac.selected",t)]},"_0._display(_1)":function(e,t){return e._display(t)}}};function k(e,t){return t.reduce(function(e,t){return e?e[t]:e},e)}var T=["INPUT","SELECT","TEXTAREA","BUTTON","BODY"],L=t.macro(function(e){var n,i,o;function r(t){null==t&&(t=null==e.get("rac.value")?"":e.get("rac.display")),t===e.get("rac.tempDisplay")&&(t="");var n=e.get("rac._items");if("function"==typeof n){var i=n(t);"object"==typeof i&&"function"==typeof i.then?i.then(function(t){return e.set("rac.list",t)}):e.set("rac.list",i)}else if(Array.isArray(n)){var o,r=e.get("rac._display");try{o=new RegExp(t||"","i")}catch(e){o=new RegExp((t||"").replace(/([\{\(\[\]\)\}\?\*\^\$])/g,"\\$1"))}e.set("rac.list",n.filter(function(e){return o.test(r(e))}))}else e.set("rac.list",[])}function a(t,n){var i=e.get("rac.default");return null==(t=null!=t||n?t:e.get("rac.value"))&&i&&(t="function"==typeof i?i(e.get("rac.display")):i),t}function l(n,o,l){var s=e.get("rac.displayprop");if(e.get("rac.__display")!==s||void 0===e.get("rac._display")){var f=function(){return e.attributes["display-value"]?e.get("rac.display"):"(none)"};if("string"==typeof s){var p=t.splitKeypath(s);s=function(e){return null==e&&(e=a()),null==e?f():k(e,p)}}else if(Array.isArray(s)){var d=s;s=function(e){return null==e&&(e=a()),null==e?f():k(e,d)}}else s||(s=function(e){return null==e&&(e=a()),null==e?f():""+e});e.set("rac._display",s),e.set("rac.__display",e.get("rac.displayprop")),e.set("rac.display",s(e.get("rac.value")))}if(s=e.get("rac.member"),e.get("rac.__member")!==s||void 0===e.get("rac._member")){if("string"==typeof s){var u=t.splitKeypath(s);s=function(e){return k(a(e),u)}}else if(Array.isArray(s)){var b=s;s=function(e){return k(a(e),b)}}else s||(s=function(e){return a(e)});e.set("rac._member",s),e.set("rac.__member",e.get("rac.member"))}s=e.get("rac.items"),e.get("rac.__items")===s&&void 0!==e.get("rac._items")||(Array.isArray(s)?e.set("rac._items",s):"function"==typeof s?e.set("rac._items",s):"object"==typeof s&&"function"==typeof s.then?s.then(function(t){e.set("rac._items",t),r()}):e.set("rac._items",[]),e.set("rac.__items",e.get("rac.items"))),i&&"rac.display"===l&&e.get("rac.limit")&&!i.contains(document.activeElement)&&c(),r()}function c(){var t=e.get("rac._display");if("function"==typeof t){var n=t(e.get("rac.value"));e.set("rac.display",n),e.set("rac.tempDisplay",n)}}function s(t){(t.items&&e.link(t.items,"rac.items"),t.value&&e.link(t.value,"rac._value"),e.set("rac.valueBound",!!t.value),t.selected&&e.link(t.selected,"rac.selected"),t["display-value"]&&e.link(t["display-value"],"rac.display"),"display"in t&&e.set("rac.displayprop",t.display),"member"in t&&e.set("rac.member",t.member),"offsets"in t?(e.set("rac.offsets",t.offsets),e.set("rac.fit",!("fit"in t)||t.fit)):e.set("rac.fit","fit"in t&&t.fit),e.set("rac.limit",t["limit-set"]),e.set("rac.default",t.default),e.get("rac.limit")&&e.get("input"))&&(e.get("input")!==document.activeElement&&c());l()}e.aliasLocal("rac"),e.set("rac.list",[]),e.set("rac.popped",!1),e.set("rac.stash",function(){e.set("rac.tempDisplay",e.get("rac.display")),e.set("rac.tempValue",e.get("rac.value"))}),e.set("rac.key",function(t){var n=t.which;if(27===n)e.set("rac.popped",!1),e.set("rac.display",e.get("rac.tempDisplay")),e.set("rac.value",e.get("rac.tempValue"));else if(38===n||40===n){t.preventDefault(),e.get("rac.pop").show(e.find("input"));var i=e.get("rac.selected"),o=e.get("rac.list");38===n?i<=0||null==i?e.set("rac.selected",Array.isArray(o)?o.length-1:0):e.set("rac.selected",i-1):Array.isArray(o)?e.set("rac.selected",i<o.length-1?i+1:0):e.set("rac.selected",0)}else if(10===n||13===n){var r=e.get("rac.list");Array.isArray(r)&&(e.set("rac.value",r[e.get("rac.selected")]),c())}else if(9===n){if(e.get("rac.popped")){var l=e.get("rac.list");if(Array.isArray(l)){var s=l[e.get("rac.selected")];null==s&&(s=a(s,!0)),e.set("rac.value",s)}e.get("rac.limit")||setTimeout(function(){return c()},140)}else null!=e.get("rac.value")&&~e.get("rac.selected")&&e.get("rac.display")==e.get("rac.tempDisplay")||e.set("rac.value",a(null,!0));e.set("rac.popped",!1),e.get("rac.updateDisplay")()}}),e.set("rac.input",function(t){n&&clearTimeout(n),n=setTimeout(function(){n=null,r(t.target.value);var i=e.find("input");i&&document.activeElement===i&&e.get("rac.pop").show(i)},500),e.attributes.lazy||e.set("rac.display",t.target.value)}),e.setTemplate(w),e.set("rac._drawDisplay",c),e.set("rac.updateDisplay",function(t){setTimeout(function(){i&&e.get("rac.limit")&&!i.contains(document.activeElement)&&c()},140)}),s(e.attributes);var f=!1,p={init:!1,defer:!0},d=[e.observe("rac.displayprop",l,p),e.observe("rac.memberprop",l,p),e.observe("rac.items",l,p),e.observe("rac.list",function(t){Array.isArray(t)?e.set("rac.selected",t.indexOf(e.get("rac.value"))):e.set("rac.selected",-1)},p),e.observe("rac.value",function(t){c(),function(){if(!e.get("rac._value")||e.get("rac.value")){var t=e.get("rac._member");if("function"==typeof t){var n=t(e.get("rac.value"));e.set("rac._value",n)}e.ractive.getContext(e.find("input")).raise("selected",{},e.get("rac._value"),e.get("rac.display"))}}(),e.set("rac.popped",!1),e.set("rac.tempValue",t)}),e.observe("rac._value",function(t){var n=e.get("rac._member"),i=e.get("rac.list").find(function(e){return n(e)===t});i!==e.get("rac.value")&&e.set("rac.value",i),!i&&null!=t&&e.get("rac.valueBound")&&(e.set("rac.display",t),l())}),e.observe("rac.selected",function(){o&&clearTimeout(n),o=setTimeout(function(){o=null;var t=e.find(".rac-hover");t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},14)}),e.observe("rac.popped",function(e){e&&setTimeout(function(){return f=!1},300),f=!0})];return e.set("rac.checkBlur",function(t){if(f)return!1;var n=document.activeElement;if(~T.indexOf(n.nodeName)||n.getAttribute("tabindex")){var i=e.findAll("input").concat(e.get("rac.pop").popFindAll("input"));document.activeElement&&!~i.indexOf(document.activeElement)&&e.get("rac.key")({which:9})}}),{teardown:function(){e.unlink("rac.items"),e.unlink("rac._value"),e.unlink("rac.selected"),e.unlink("rac.display"),d.forEach(function(e){return e.cancel()})},update:s,render:function(){i=e.find("span")}}},{attributes:["items","selected","display","value","member","limit-set","fit","offsets","display-value","default"],css:function(e){return[function(e){var t=Object.assign({},e("raui.primary"),e("raui.autocomplete"),e("raui.autocomplete.primary")),n=Object.assign({},e("raui.autocomplete.drop"),e("raui.autocomplete.primary.drop")),i=e("raui.form.boxy");return".rautocomplete {\n position: relative;\n display: inline-block;\n }\n \n .rac-drop {\n width: 2em;\n height: 100%;\n position: absolute;\n top: 0;\n right: 2px;\n cursor: pointer;\n }\n .rac-drop:after {\n font-family: "+(n.font||"sans-serif")+";\n content: "+(n.string||"'▾'")+";\n position: absolute;\n top: calc(50% - 0.5em);\n height: 1em;\n line-height: 1em;\n width: 100%;\n text-align: center;\n font-weight: "+(n.weight||"normal")+";\n color: "+(n.color||t.bc||"#ccc")+";\n }\n \n .rac-pop {\n min-width: 100%;\n }\n \n .rac-pop > .rpop {\n padding: 0;\n }\n \n .rac-list {\n display: flex;\n flex-direction: column;\n max-height: 50vh;\n min-height: 2.125em;\n max-width: 100%;\n overflow: auto;\n }\n \n .rac-item {\n color: "+(t.fg||"#222")+";\n background-color: "+(t.bg||"#fff")+";\n padding: 0.25em;\n cursor: pointer;\n }\n \n .rac-selected {\n color: "+(t.bg||"#fff")+";\n background-color: "+(t.fga||"#07e")+";\n }\n \n .rac-hover {\n color: "+(t.fg||"#222")+";\n background-color: "+(t.bc||"#ccc")+";\n }\n \n .rac-selected.rac-hover {\n background-color: "+(t.bc||"#ccc")+";\n color: "+(t.fga||"#07e")+";\n }\n \n .rac-invalid {\n cursor: not-allowed;\n }\n \n input.rac-modal {\n width: 100%;\n box-sizing: border-box;\n display: block;\n border-width: "+(i?"0.0625em":"0 0 0.0625em 0")+";\n border-color: "+(t.bc||"#ccc")+";\n border-style: solid;\n box-sizing: border-box;\n background-color: "+(i?t.bg||"#fff":"transparent")+";\n transition: 0.2s ease-in-out;\n transition-property: box-shadow, color;\n outline: none;\n box-shadow: none;\n width: 100%;\n margin-bottom: 0.8em;\n font-size: 1.1em;"+(i?"\n border-radius: "+(t.radius||"0.2em")+";":"")+"\n font-weight: 400;\n font-family: inherit;\n }"}.call(this,e)].join(" ")},cssId:"rautocomplete",noCssTransform:!0});function O(e){return void 0===e&&(e={}),function(t){var n=t.instance;n.partials[e.name||"autocomplete"]=L,n.components["rac-pop"]=u,n.decorators.autocompletefocus=_}}e.Autocomplete=L,e.FieldType=function(e){return void 0===e&&(e={}),function(t,n,i){return[{t:7,e:e.name||"autocomplete",m:t,f:n}]}},e.plugin=O,e.default=O,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -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.RauiDateInput={},t.Ractive)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n=function(){try{var t=navigator.language||navigator.browserLanguage||navigator.languages[0]||"en";return[[0,1,2,3,4,5,6,7,8,9,10,11].map(function(e){return new Date(2006,e,1).toLocaleString(t,{month:"long"})}),[1,2,3,4,5,6,7].map(function(e){return new Date(2006,0,e).toLocaleString(t,{weekday:"long"})})]}catch(t){return[["January","February","March","April","May","June","July","August","September","October","November","December"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]]}}(),r=n[0],i=n[1],a=i.map(function(t){return t[0]}).concat(i.map(function(t){return t[0].toUpperCase()})),o=r.map(function(t){return t.substr(0,3)}),l=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.month=function(t,e){void 0===e&&(e=0);var n,r=t||new Date;if(!(r instanceof Date))return{};isNaN(r)&&(r=new Date),e&&(r=new Date(r.getFullYear(),r.getMonth()+e,r.getDate()));try{n=+this.get("firstDay")}catch(t){}("number"!=typeof n||isNaN(n))&&(n=0),n>6&&(n=0);for(var i=new Date(r.getFullYear(),r.getMonth(),0),o=new Date(r.getFullYear(),r.getMonth()+1,0).getDate(),l=new Date(r.getFullYear(),r.getMonth()+1,1),s=new Date(r.getFullYear(),r.getMonth(),1).getDay(),f=[],c=f[0]=[],u=0;u<7;u++)f[0].unshift({y:i.getFullYear(),m:i.getMonth(),d:i.getDate()-u}),f[0].push({y:r.getFullYear(),m:r.getMonth(),d:u+1});f[0]=n<=s?f[0].slice(7-(s-n),14-(s-n)):f[0].slice(n-s,7+n-s),1===f[0][0].d&&f.unshift(c.slice(0,7));for(var p=f[f.length-1][f[f.length-1].length-1].d,d=f.length;d<5;d++){f[d]=[];for(var g=0;g<7&&p+1<=o;g++)f[d].push({y:r.getFullYear(),m:r.getMonth(),d:++p});if(f[d].length<7){for(var h=7-f[d].length,v=1;v<=h;v++)f[d].push({y:l.getFullYear(),m:l.getMonth(),d:v});f[d+1]=[];for(var m=0,y=h+1;m<7;m++,y++)f[d+1].push({y:l.getFullYear(),m:l.getMonth(),d:y})}}if(!f[5]){for(f[5]=[];p<o;)f[5].push({y:r.getFullYear(),m:r.getMonth(),d:++p});for(var b=1;b<8;b++)f[5].push({y:l.getFullYear(),m:l.getMonth(),d:b});f[5]=f[5].slice(0,7)}return{days:a.slice(n,n+7),weeks:f,year:r.getFullYear(),month:r.getMonth(),currentYear:(new Date).getFullYear()}},e.prototype.year=function(t,e){void 0===e&&(e=0);var n=t||new Date;if(!(n instanceof Date))return{};e&&(n=new Date(n.getFullYear()+e,n.getMonth(),n.getDate()));for(var r=[],i=0;i<4;i++){r.push([]);for(var a=0;a<3;a++)r[i].push({m:3*i+a,y:n.getFullYear()})}return{year:n.getFullYear(),months:r}},e.prototype.decade=function(t,e){void 0===e&&(e=0);var n=t||new Date;if(!(n instanceof Date))return{};e&&(n=new Date(n.getFullYear()+10*e,n.getMonth(),n.getDate()));for(var r=10*Math.floor(n.getFullYear()/10),i=r-1,a=[],o=0;o<4;o++){a.push([]);for(var l=0;l<3;l++)a[o].push({y:i+3*o+l})}return{start:r,end:r+9,years:a}},e.prototype.monthName=function(t){return r[t]},e.prototype.shortMonthName=function(t){return o[t]},e.prototype.dayName=function(t){return i[t]},e.prototype.select=function(t){if(t&&t instanceof Date)this.set("date",t);else{var e=this.get("safeCurrent");t&&this.set("date",new Date(t.y||e.getFullYear(),"number"==typeof t.m?t.m:e.getMonth(),t.d||e.getDate()));var n=this.get("mode");"year"===n?this.set("mode","months"):"months"===n&&this.set("mode","month"),this.set("target",this.get("date"))}},e.prototype.isCurrent=function(t){var e=this.get("safeCurrent");return!!e&&(t&&t.y===e.getFullYear()&&(null==t.m||t.m===e.getMonth())&&(null==t.d||t.d===e.getDate()))},e.prototype.next=function(){var t=this.get("safeTarget"),e=this.get("mode");"month"===e&&this.set("target",new Date(t.getFullYear(),t.getMonth()+1,1)),"months"===e&&this.set("target",new Date(t.getFullYear()+1,t.getMonth(),1)),"year"===e&&this.set("target",new Date(t.getFullYear()+10,t.getMonth(),1))},e.prototype.prev=function(){var t=this.get("safeTarget"),e=this.get("mode");"month"===e&&this.set("target",new Date(t.getFullYear(),t.getMonth()-1,1)),"months"===e&&this.set("target",new Date(t.getFullYear()-1,t.getMonth(),1)),"year"===e&&this.set("target",new Date(t.getFullYear()-10,t.getMonth(),1))},e.prototype.today=function(){this.set("date",new Date),this.set("target",this.get("date"))},e}(e);e.extendWith(l,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal",g:1}],f:[{t:4,f:[{t:4,f:[{t:19,f:[{t:8,r:"~/mode"}],n:54,z:[{n:"left",x:{x:{r:["@index"],s:"_0===0"}}},{n:"right",x:{x:{r:["@last","@index"],s:"_0===_1"}}}]}],n:52,z:[{n:"offset",x:{r:"."}}],r:"~/padding"}],n:50,r:"~/padding"},{t:4,f:[{t:19,f:[{t:8,r:"~/mode"}],n:54,z:[{n:"offset",x:{x:{r:[],s:"0"}}},{n:"left",x:{x:{r:[],s:"true"}}},{n:"right",x:{x:{r:[],s:"true"}}}]}],n:51,l:1}]}],e:{0:function(){return 0},"_0===0":function(t){return 0===t},"_0===_1":function(t,e){return t===e},true:function(){return!0},"[_0.prev(),false]":function(t){return[t.prev(),!1]},'[_0.set("mode","month"),false]':function(t){return[t.set("mode","month"),!1]},"[_0.next(),false]":function(t){return[t.next(),!1]},"_1>_0||_1<_2":function(t,e,n){return e>t||e<n},"_0.isCurrent(_1)":function(t,e){return t.isCurrent(e)},"[_0.select(_1),false]":function(t,e){return[t.select(e),!1]},"_0.decade(_1,_2)":function(t,e,n){return t.decade(e,n)},'[_0.set("mode","year"),false]':function(t){return[t.set("mode","year"),!1]},"_0.shortMonthName(_1)":function(t,e){return t.shortMonthName(e)},"_0.year(_1,_2)":function(t,e,n){return t.year(e,n)},'[_0.set("mode","months"),false]':function(t){return[t.set("mode","months"),!1]},"_0.monthName(_1)":function(t,e){return t.monthName(e)},"_0!==_1":function(t,e){return t!==e},"[_0.select(_1)]":function(t,e){return[t.select(e)]},"_0.month(_1,_2)":function(t,e,n){return t.month(e,n)}},p:{year:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-wrapper",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-block-outer",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-block-header",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-arrow",g:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:"[_0.prev(),false]"}}],n:50,r:"left"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-left",g:1}]}],n:50,r:"left"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-title",g:1},{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("mode","month"),false]'}}],f:[{t:2,r:".start"}," - ",{t:2,r:".end"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-arrow",g:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:"[_0.next(),false]"}}],n:50,r:"right"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-right",g:1}]}],n:50,r:"right"}]}]}," ",{t:19,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-decade",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-inner-row",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-inner-pick",g:1},{n:"class-rcal-off-day",t:13,f:[{t:2,x:{r:["year.end",".y","year.start"],s:"_1>_0||_1<_2"}}]},{n:"class-rcal-current",t:13,f:[{t:2,x:{r:["@this","."],s:"_0.isCurrent(_1)"}}]},{n:["click"],t:70,f:{r:["@this","."],s:"[_0.select(_1),false]"}}],f:[{t:2,r:".y"}]}],n:52,r:"."}]}],n:52,r:".years"}]}],n:54,z:[{n:"year",x:{r:"."}}]}]}]}],n:54,x:{r:["@this","~/safeTarget","offset"],s:"_0.decade(_1,_2)"}}],months:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-wrapper",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-block-outer",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-block-header",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-arrow",g:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:"[_0.prev(),false]"}}],n:50,r:"left"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-left",g:1}]}],n:50,r:"left"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-title",g:1},{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("mode","year"),false]'}}],f:[{t:2,r:".year"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-arrow",g:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:"[_0.next(),false]"}}],n:50,r:"right"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-right",g:1}]}],n:50,r:"right"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-year",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-inner-row",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-inner-pick",g:1},{n:"class-rcal-current",t:13,f:[{t:2,x:{r:["@this","."],s:"_0.isCurrent(_1)"}}]},{n:["click"],t:70,f:{r:["@this","."],s:"[_0.select(_1),false]"}}],f:[{t:2,x:{r:["@this",".m"],s:"_0.shortMonthName(_1)"}}]}],n:52,r:"."}]}],n:52,r:".months"}]}]}]}],n:54,x:{r:["@this","~/safeTarget","offset"],s:"_0.year(_1,_2)"}}],month:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-wrapper",g:1},{n:"class-rcal-pad",t:13,f:[{t:2,r:"~/pad"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-block-outer",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-block-header",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-arrow",g:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:"[_0.prev(),false]"}}],n:50,r:"left"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-left",g:1}]}],n:50,r:"left"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-title",g:1},{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("mode","months"),false]'}}],f:[{t:2,x:{r:["@this",".month"],s:"_0.monthName(_1)"}},{t:4,f:[" ",{t:2,r:".year"}],n:50,x:{r:[".currentYear",".year"],s:"_0!==_1"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-arrow",g:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:"[_0.next(),false]"}}],n:50,r:"right"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-right",g:1}]}],n:50,r:"right"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-month",g:1}],f:[{t:19,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-week rcal-week-header",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-day rcal-day-header",g:1}],f:[{t:2,r:"."}]}],n:52,r:".days"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-week",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-day",g:1},{n:"class-rcal-off-day",t:13,f:[{t:2,x:{r:[".m","month.month"],s:"_0!==_1"}}]},{n:"class-rcal-current",t:13,f:[{t:2,x:{r:["@this","."],s:"_0.isCurrent(_1)"}}]},{n:["click"],t:70,f:{r:["@this","."],s:"[_0.select(_1)]"}}],f:[{t:2,r:".d"}]}],n:52,r:"."}]}],n:52,r:".weeks"}],n:54,z:[{n:"month",x:{r:"."}}]}]}]}]}],n:54,x:{r:["@this","~/safeTarget","offset"],s:"_0.month(_1,_2)"}}]}},css:function(t){return[function(t){return".rcal-wrapper {\n display: flex;\n flex-direction: column;\n width: 15em;\n height: 17em;\n }\n \n .rcal-pad {\n padding: 0.5em;\n }\n \n .rcal-block-outer {\n border: 1px solid "+(t("raui.datePicker.primary.bga")||t("raui.primary.bga")||"#f4f4f4")+";\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n \n .rcal-block-header {\n text-align: center;\n background-color: "+(t("raui.datePicker.primary.fga")||t("raui.primary.fga")||"#07e")+";\n color: "+(t("raui.datePicker.primary.bg")||t("raui.primary.bg")||"#fff")+";\n cursor: default;\n display: flex;\n justify-content: space-between;\n line-height: 2em;\n height: 2em;\n align-items: center;\n }\n \n .rcal-arrow {\n width: 2em;\n }\n .rcal-title {\n flex-grow: 1;\n }\n \n .rcal-click {\n cursor: pointer;\n }\n \n .rcal-left, .rcal-right {\n height: 0.8em;\n display: inline-block;\n box-sizing: border-box;\n border: 0.4em solid transparent;\n cursor: pointer;\n }\n .rcal-left {\n border-right-color: "+(t("raui.datePicker.primary.bg")||t("raui.primary.bg")||"#fff")+";\n }\n .rcal-right {\n border-left-color: "+(t("raui.datePicker.primary.bg")||t("raui.primary.bg")||"#fff")+";\n }\n \n .rcal-month, .rcal-year, .rcal-decade {\n display: flex;\n flex-direction: column;\n background-color: "+(t("raui.datePicker.primary.bga")||t("raui.primary.bga")||"#f4f4f4")+";\n justify-content: space-between;\n flex-grow: 1;\n }\n .rcal-year, .rcal-decade {\n justify-content: space-around;\n }\n \n .rcal-week {\n height: 2em;\n display: flex;\n justify-content: space-between;\n }\n \n .rcal-inner-row {\n height: 2em;\n display: flex;\n justify-content: space-around;\n }\n \n .rcal-inner-pick {\n background-color: "+(t("raui.datePicker.primary.bg")||t("raui.primary.bg")||"#fff")+";\n width: 3em;\n height: 2em;\n line-height: 2em;\n text-align: center;\n cursor: pointer;\n }\n \n .rcal-week-header {\n background-color: "+(t("raui.datePicker.primary.fga")||t("raui.primary.fga")||"#07e")+";\n }\n \n .rcal-day {\n background-color: "+(t("raui.datePicker.primary.bg")||t("raui.primary.bg")||"#fff")+";\n width: 2em;\n height: 2em;\n text-align: center;\n line-height: 2em;\n cursor: pointer;\n }\n \n .rcal-day-header {\n color: "+(t("raui.datePicker.primary.bg")||t("raui.primary.bg")||"#fff")+";\n background-color: "+(t("raui.datePicker.primary.fga")||t("raui.primary.fga")||"#07e")+";\n cursor: default;\n }\n \n .rcal-off-day {\n background-color: "+(t("raui.datePicker.primary.bc")||t("raui.primary.bc")||"#ccc")+";\n }\n \n .rcal-current {\n color: "+(t("raui.datePicker.primary.bg")||t("raui.primary.bg")||"#fff")+";\n background-color: "+(t("raui.datePicker.primary.fg")||t("raui.primary.fg")||"#222")+";\n }\n "}.call(this,t)].join(" ")},noCssTransform:!0,data:function(){return{mode:"month",target:new Date}},computed:{safeCurrent:function(){var t=this.get("date");if("string"==typeof t)try{t=new Date(t)}catch(t){}return t&&t instanceof Date&&!isNaN(t)?t:new Date},safeTarget:function(){var t=this.get("target");if(t||(t=this.get("date")),"string"==typeof t)try{t=new Date(t)}catch(t){}return t&&t instanceof Date&&!isNaN(t)?t:new Date}}});var s="undefined"!=typeof window?window:null;function f(t,e,n){if(s&&s.Ractive&&"object"==typeof s.Ractive[e]){var r=document.currentScript;if(r||(r=(r=document.querySelectorAll("script"))[r.length-1]),r){var i=r.getAttribute("data-alias");i&&(i=(i=i.split("&")).reduce(function(t,e){var n=e.split("="),r=n[0],i=n[1];return t[r]=i,t},{})),Ractive[e][i&&i[t]||t]=n}}}function c(t,e){void 0===e&&(e={});var n=t.processParams(e,{duration:400,easing:"easeInOut"});e.dir=e.dir||!1;var r=e.distance||"20px",i=e.scale||"0.9",a="above"===e.dir?"translateY("+r+")":"left"===e.dir?"translateX("+r+")":"right"===e.dir?"translateX(-"+r+")":"translateY(-"+r+")";return t.isIntro||n.intro?(t.setStyle("opacity",0),t.setStyle("transform","scale("+i+") "+a),t.animateStyle({opacity:1,transform:"none"},n)):(t.setStyle("opacity",1),t.setStyle("transform","none"),t.animateStyle({opacity:0,transform:"scale("+i+") "+a},n))}function u(t){return void 0===t&&(t={}),function(e){e.instance.transitions[t.name||"pop"]=c}}function p(t,e){var n=!1,r=!1;function i(n){for(var r=n.target;r;){if(r===t)return;if(!r.parentNode&&r!==document)return;r=r.parentNode}e(n)}return setTimeout(function(){n=!0,r||(document.body.addEventListener("click",i,{capture:!0}),document.body.addEventListener("touchstop",i,{capture:!0}))}),{teardown:function(){r=!0,n&&(document.body.removeEventListener("click",i,{capture:!0}),document.body.removeEventListener("touchstop",i,{capture:!0}))}}}function d(t,e){var n=t.processParams(e,{duration:200,easing:"easeInOut"});return t.isIntro||n.intro?(t.setStyle("opacity",0),t.animateStyle("opacity",1,n)):(t.setStyle("opacity",1),t.animateStyle("opacity",0,n))}function g(t){return void 0===t&&(t={}),function(e){e.instance.transitions[t.name||"fade"]=d}}f("pop","transitions",c),f("fade","transitions",d);var h,v,m,y,b={v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-wrapper",g:1},{n:"class-rpop-with-tail",t:13,f:[{t:2,r:"position.tail"}]},{n:"class",f:["rpop-",{t:2,x:{r:["where"],s:'_0||"below"'}}," rpop-align-",{t:2,x:{r:["align"],s:'_0||"middle"'}}],t:13},{t:4,f:[{n:"style-top",f:[{t:2,r:"position.popTop"},"px"],t:13},{n:"style-left",f:[{t:2,r:"position.popLeft"},"px"],t:13}],n:50,r:"position"},{t:4,f:[{t:4,f:[{n:"style-top",f:[{t:2,r:"top"}],t:13}],n:50,r:"top"},{t:4,f:[{n:"style-left",f:[{t:2,r:"left"}],t:13}],n:50,r:"left"}],n:51,l:1},{n:"pop",t:72,f:{r:["where"],s:'[{dir:_0||"below"}]'},v:"t2"},{n:"cleanup",t:71},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:50,r:"clickClose"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:51,r:"noClickout"},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail-outer",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}],n:50,r:"~/tail"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1}],f:[{t:16,r:"content",z:[{n:"trigger",x:{r:"triggerContext"}}]}]}]}],n:50,r:"__popped"}],e:{'_0||"below"':function(t){return t||"below"},'_0||"middle"':function(t){return t||"middle"},'[{dir:_0||"below"}]':function(t){return[{dir:t||"below"}]},'[_0.set("popped",false)]':function(t){return[t.set("popped",!1)]},"_0+(_1?3:0)":function(t,e){return t+(e?3:0)},"_0!=null":function(t){return null!=t},"_0+(_1?0:3)":function(t,e){return t+(e?0:3)},"_0-2":function(t){return t-2},"[{delay:200}]":function(){return[{delay:200}]},"[_0===_1&&_2.done(),true]":function(t,e,n){return[t===e&&n.done(),!0]},"[_0.done()]":function(t){return[t.done()]},true:function(){return!0}},p:{modal:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-modal",g:1},{n:"fade",t:72,v:"t1"},{n:"fade",t:72,f:{r:[],s:"[{delay:200}]"},v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["@node","@event.target","."],s:"[_0===_1&&_2.done(),true]"}}],n:51,r:".noClickout"}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1},{n:"pop",t:72,f:{r:[],s:"[{delay:200}]"},v:"t1"},{n:"pop",t:72,v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.done()]"}}],n:50,r:".clickClose"},{t:8,r:".attrs",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}],f:[{t:8,r:".content",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}]}]}],n:54,r:"contents.0"}],n:50,r:"contents.length"}]}};function w(){}var x,_=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.position=function(e){var n=e||this.source,r=this.get("popped");if(n&&r){var i=this.find("div");if(n&&i&&i.offsetParent){n?this.set("triggerContext",t.getContext(n)):this.set("triggerContext",null);var a=i.offsetParent,o=a.getBoundingClientRect(),l=i.getBoundingClientRect(),s=n.getBoundingClientRect(),f=this.get("where")||"below",c=this.get("align")||"middle",u=this.get("tail"),p="above"===f||"below"===f,d=this.get("fit"),g=this.get("gap"),h="above"===f||"below"===f?0:"left"===f?-l.width-g:s.width+g,v="left"===f||"right"===f?-s.height:"above"===f?-s.height-l.height-g:g;"middle"===c?"below"===f||"above"===f?h-=(l.width-s.width)/2:"left"!==f&&"right"!==f||(v-=(l.height-s.height)/2):"end"===c&&("below"===f||"above"===f?h+=s.width-l.width:"left"!==f&&"right"!==f||(v+=s.height-l.height));var m={popTop:s.bottom-o.top+v,popLeft:s.left-o.left+h,tail:u,vert:"above"===f||"below"===f};if(a.scrollTop&&(m.popTop+=a.scrollTop),a.scrollLeft&&(m.popLeft+=a.scrollLeft),u){"above"===f?m.tailBottom=-10:"below"===f?m.tailTop=-10:"left"===f?m.tailRight=-10:"right"===f&&(m.tailLeft=-10);var y=this.tailSource?this.tailSource.getBoundingClientRect():s;"start"===c?p?m.tailLeft=Math.floor(y.width/2)-10:m.tailTop=Math.floor(y.height/2)-10:"end"===c?p?m.tailRight=Math.floor(y.width/2)-10:m.tailBottom=Math.floor(y.height/2)-10:"middle"===c&&(p?m.tailLeft=Math.floor(y.width/2)-10:m.tailTop=Math.floor(y.height/2)-10),y!==s?p?(null!=m.tailLeft&&(m.tailLeft+=y.left-s.left),null!=m.tailRight&&(m.tailRight+=s.right-y.right)):(null!=m.tailTop&&(m.tailTop+=y.top-s.top),null!=m.tailBottom&&(m.tailBottom+=s.bottom-y.bottom)):"middle"===c&&(p?(null!=m.tailLeft&&(m.tailLeft+=y.left-(m.popLeft+o.left)),null!=m.tailRight&&(m.tailRight+=m.popLeft+o.left+l.width-y.right)):(null!=m.tailTop&&(m.tailTop+=y.top-(m.popTop+o.top)),null!=m.tailBottom&&(m.tailBottom+=m.popTop+o.top+l.height-y.bottom)))}if(d){var b=a;if(this.get("offsets"))for(var w=this.get("offsets");w--;)b=b.offsetParent;var x=a.scrollWidth,_=a.scrollHeight;if(m.popLeft+l.width>x){var k=m.popLeft-(x-l.width);m.popLeft-=k,p&&m.tailLeft&&(m.tailLeft+=k),p&&m.tailRight&&(m.tailRight-=k),u&&!p&&(m.tail=!1)}if(m.popLeft<0){var D=-1*m.popLeft;m.popLeft+=D,p&&m.tailLeft&&(m.tailLeft-=D),p&&m.tailRight&&(m.tailRight+=D),u&&!p&&(m.tail=!1)}if(m.popTop+l.height>_){var M=m.popTop-(_-l.height);m.popTop-=M,!p&&m.tailTop&&(m.tailTop+=M),!p&&m.tailBottom&&(m.tailBottom-=M),u&&p&&(m.tail=!1)}if(m.popTop<0){var T=-1*m.popTop;m.popTop+=T,!p&&m.tailTop&&(m.tailTop-=T),!p&&m.tailBottom&&(m.tailBottom+=T),u&&p&&(m.tail=!1)}}if(o.left+m.popLeft<0){var L=0-(o.left+m.popLeft);m.popLeft+=L,p&&m.tailLeft&&(m.tailLeft-=L),p&&m.tailRight&&(m.tailRight+=L),u&&!p&&(m.tail=!1)}if(o.top+m.popTop<0){var S=0-(o.top+m.popTop);m.popTop+=S,!p&&m.tailTop&&(m.tailTop-=S),!p&&m.tailBottom&&(m.tailBottom+=S),u&&p&&(m.tail=!1)}m.tailLeft&&(m.tailLeft=Math.floor(m.tailLeft)),m.tailRight&&(m.tailRight=Math.floor(m.tailRight)),m.tailTop&&(m.tailTop=Math.floor(m.tailTop)),m.tailBottom&&(m.tailBottom=Math.floor(m.tailBottom)),this.set("position",m)}else this.set("position",null)}},e.prototype.show=function(t){return this.source=t,this.set("popped",!0),this._transdone},e.prototype.hide=function(){return this.set("popped",!1),this._transdone},e.prototype.popFind=function(t){return m?y.find(t):this.find(pattenr)},e.prototype.popFindAll=function(t){return m?y.findAll(t):this.findAll(pattenr)},e}(e);e.extendWith(_,{attributes:["popped","tail","where","align","top","left","fit","clickClose","noClickout","gap","offsets"],use:[u(),(void 0===x&&(x={}),function(t){t.instance.events[x.name||"clickout"]=p}),g()],template:b,css:function(t){return[function(t){var e=Object.assign({},t("raui.primary"),t("raui.pop.primary")),n=(t("raui.themes")||[]).slice();return(t("raui.pop.themes")||[]).forEach(function(t){~n.indexOf(t)||n.push(t)}),"\n .rpop-wrapper {\n position: absolute;\n display: inline-block;\n z-index: 21;\n transition-property: top, left, padding;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-with-tail.rpop-above {\n padding-bottom: 10px;\n }\n .rpop-with-tail.rpop-below {\n padding-top: 10px;\n }\n .rpop-with-tail.rpop-left {\n padding-right: 10px;\n }\n .rpop-with-tail.rpop-right {\n padding-left: 10px;\n }\n \n .rpop {\n position: relative;\n box-shadow: 0 1px 4px 0 rgba(0,0,0,0.24);\n border: 1px solid #ccc;\n border-radius: 0.2em;\n background-color: "+(e.bg||"#fff")+";\n color: "+(e.fg||"#222")+";\n padding: 0.5em;\n z-index: 2;\n }\n \n .rpop-modal {\n position: fixed;\n display: flex;\n z-index: 20;\n background-color: rgba(0, 0, 0, 0.2);\n align-items: center;\n justify-content: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 1em;\n overflow: auto;\n }\n \n .rpop-tail, .rpop-tail-outer {\n z-index: 3;\n width: 0;\n height: 0;\n position: absolute;\n border-style: solid;\n border-width: 10px;\n border-color: transparent;\n transition-property: top, left, bottom, right, border-color;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-tail-outer {\n z-index: 1;\n border-width: 12px;\n border-color: transparent;\n }\n \n .rpop-below .rpop-tail {\n border-bottom-color: "+(e.bg||"#fff")+";\n }\n .rpop-below .rpop-tail-outer {\n border-bottom-color: "+(e.bc||"#ccc")+";\n }\n \n .rpop-above .rpop-tail {\n border-top-color: "+(e.bg||"#fff")+";\n }\n .rpop-above .rpop-tail-outer {\n border-top-color: "+(e.bc||"#ccc")+";\n }\n \n .rpop-left .rpop-tail {\n border-left-color: "+(e.bg||"#fff")+";\n }\n .rpop-left .rpop-tail-outer {\n border-left-color: "+(e.bc||"#ccc")+";\n }\n \n .rpop-right .rpop-tail {\n border-right-color: "+(e.bg||"#fff")+";\n }\n .rpop-right .rpop-tail-outer {\n border-right-color: "+(e.bc||"#ccc")+";\n }\n "+n.map(function(e){var n=Object.assign({},t("raui.primary"),t("raui.pop.primary"),t("raui."+e),t("raui.pop."+e));return"\n ."+e+" .rpop {\n background-color: "+(n.bg||"#fff")+";\n color: "+(n.fg||"#222")+";\n }\n \n ."+e+".rpop-below .rpop-tail {\n border-bottom-color: "+(n.bg||"#fff")+";\n }\n ."+e+".rpop-below .rpop-tail-outer {\n border-bottom-color: "+(n.bc||"#ccc")+";\n }\n \n ."+e+".rpop-above .rpop-tail {\n border-top-color: "+(n.bg||"#fff")+";\n }\n ."+e+".rpop-above .rpop-tail-outer {\n border-top-color: "+(n.bc||"#ccc")+";\n }\n \n ."+e+".rpop-left .rpop-tail {\n border-left-color: "+(n.bg||"#fff")+";\n }\n ."+e+".rpop-left .rpop-tail-outer {\n border-left-color: "+(n.bc||"#ccc")+";\n }\n \n ."+e+".rpop-right .rpop-tail {\n border-right-color: "+(n.bg||"#fff")+";\n }\n ."+e+".rpop-right .rpop-tail-outer {\n border-right-color: "+(n.bc||"#ccc")+";\n }\n "})}.call(this,t)].join(" ")},cssId:"rpop",noCssTransform:!0,observe:{popped:function(t){var e,n=this;t&&(h&&(this.source=h),v&&(this.tailSource=v));var r=this._transdone=new Promise(function(t){return e=t});r.resolve=e,setTimeout(function(){n._transdone=r,n.get("popped")===t&&n.set("_popped",t)},1)},_popped:{handler:function(t){var e=this,n=this._transdone.resolve;if(t){var r=this.get("@style.raui.pop.mobile");if(r&&window.matchMedia("(max-width: "+r+")").matches){y||(y=new k({target:document.body,append:!0}));var i=this.getContext().getParent(!0);i.isContext=1,this.set("__popped",!1).then(n),y.unshift("contents",{content:this.partials.content,context:i,attrs:this.partials["extra-attributes"]||[],clickClose:this.get("clickClose"),noClickout:this.get("noClickout"),done:function(){e.set("popped",!1)}})}else this.set("__popped",!0)}else m?(y.shift("contents"),n()):this.set("__popped",!1).then(n)},defer:!0,init:!1},__popped:{handler:function(t){var e=this._transdone.resolve;if(t){var n=this.find("div"),r=n,i=r.offsetHeight+r.offsetTop,a=r.offsetWidth+r.offsetLeft,o=r.offsetParent;if(!this.overflows)for(var l=this.overflows={e:[],v:[]};n&&n.style;){if(n===o){if(n.offsetWidth>=a&&n.offsetHeight>=i)break;a+=n.offsetLeft,i+=n.offsetTop,o=n.offsetParent}var s=getComputedStyle(n);if("auto"===s.overflow)break;"hidden"===s.overflow&&(l.e.push(n),l.v.push(n.style.overflow),n.style.overflow="visible"),n=n.parentNode}this.position(),this.transition("pop",r,{intro:!0,dir:this.get("where")||"below"}).then(e)}else this.source=null,this.tailSource=null},defer:!0,init:!1},"align where tail fit":{handler:function(){this.position()},defer:!0}},decorators:{cleanup:function(t){var e=this;return{teardown:function(){var t=e.overflows;if(t){e.overflows=null;for(var n=0;n<t.e.length;n++)t.e[n].style.overflow=t.v[n]}}}}},data:function(){return{gap:4}}});var k=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(e);e.extendWith(k,{template:{v:b.v,t:b.p.modal},data:function(){return{contents:[]}},use:[u(),g()],observe:{contents:function(t){m=(t||[]).length>0}},on:{init:function(){y?console.warn("More than one PopOver mobile host created."):y=this}}});var D=/[^\d]+/,M=/[^\d_]+/,T="_",L={y:0,M:1,d:2,H:3,m:4,s:5,S:6};function S(t,e,n){void 0===n&&(n="0");for(var r=null==t?"":""+t,i=r.length;i<e;i++)r=n+r;return r}function C(t,e,n){void 0===n&&(n="0");for(var r=null==t?"":""+t,i=r.length;i<e;i++)r+=n;return r}var F={mask:"yyyy-MM-dd",time:[0,0,0,0],date:function(){var t=new Date,e=F.time;return new Date(t.getFullYear(),t.getMonth(),t.getDate(),e[0],e[1],e[2],e[3])},parseDate:function(t){return new Date(t)}};function Y(t){if("start"===t)t=[0,0,0,0];else if("end"===t)t=[23,59,59,999];else if("mid"===t)t=[12,0,0,0];else if("now"===t)t=function(){var t=new Date;return[t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]};else if("string"==typeof t){var e=new Date("2000-05-13T"+t+"Z");+e&&(t=[e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()])}return Array.isArray(t)||"function"==typeof t||Array.isArray(t())||(t=[0,0,0,0]),t}function R(t){void 0===t&&(t={});var e=t.mask||F.mask,n=Y(t.time||F.time),r=t.date||F.date;if("function"!=typeof r){var i=r;r=function(){return i}}return function(i){i.instance.decorators[t.name||"date"]=function(i,a,o){void 0===a&&(a={});var l=Object.assign({},t,"string"==typeof a?{value:a}:a,"string"==typeof o?{mask:o}:o);l.parseDate||(l.parseDate=t.parseDate||F.parseDate);var s=l.date||r,f=Y(l.time||n);if("function"!=typeof s){var c=s;s=function(){return c}}var u=this.getContext(i),p=l.mask||e,d={observers:[],listeners:[]},g=!1;if("INPUT"!==i.tagName)return console.warn("Attempted to add a date decorator a "+i.tagName),W;if(!p)return W;for(var h,v=[],m=0;h=A.exec(p);){var y={mask:h[0],type:h[0][0],length:h[0].length,start:h.index,end:h.index+h[0].length,chunk:v.length,prefix:p.substring(m,h.index),groups:v,value:null,display:C("",h[0].length,T)};m=y.end,v.push(y)}if(v.suffix=p.substring(v[v.length-1].end),v.last=null,v.slice(1).find(function(t){return!t.prefix}))return console.warn("Attempted to add a date decorator missing interstitial between fields '"+p+"'"),W;function b(t){if(null===v.value&&null===v.last||+v.value==+v.last)return 1;if(!t||!1===l.lazy){if(!1===l.null&&null===v.value)return N(v,v.last,l.parseDate),1;l.min&&v.value<l.min?(N(v,l.min,l.parseDate),O(v,i)):l.max&&v.value>l.max&&(N(v,l.max,l.parseDate),O(v,i)),v.last=v.value,"string"==typeof l.value&&(d.observers.forEach(function(t){return t.silence()}),u.set(l.value,v.value),d.observers.forEach(function(t){return t.resume()})),"string"==typeof l.display&&(d.observers.forEach(function(t){return t.silence()}),u.set(l.display,i.value),d.observers.forEach(function(t){return t.resume()}))}}l.min>l.max&&delete l.min,"string"==typeof l.value&&d.observers.push(u.observe(l.value,function(t){t||!1!==l.null||(t=s()),v.value=t,N(v,t,l.parseDate),v.last=t,O(v,i),(l.min&&t<l.min||l.max&&t>l.max)&&(v.last=null,setTimeout(b))},{defer:!0})),"string"==typeof l.display&&d.observers.push(u.observe(l.display,function(t){i.value=t||"",P(v,i,p),B(v),E(v,b,!0,s,f),O(v,i)},{defer:!0})),l.display||l.value||((l.date||!1===l.null)&&(v.value=K(l.date||s(),l.parseDate)),O(v,i));var w=function(t,e){void 0===e&&(e=i.selectionStart),t&&t.target&&(t=void 0),t||(t=e===i.value.length&&i.selectionEnd===i.value.length?v[0]:j(v,e)),g&&(g=!1,e<t.start&&(t=v[v.indexOf(t)-1])),document.activeElement===i&&i.setSelectionRange(t.start,t.end)};return d.listeners.push(u.listen("input",function(){var t=i.selectionStart,e=i.value;P(v,i,p);var n=j(v,t),r=B(v,n,t);if(E(v,b,!0,s,f),O(v,i),n&&(e.length>=p.length&&t===n.end||r)&&n!==v[v.length-1]){var a=v[v.indexOf(n)+1];w(a,t)}else i.setSelectionRange(t,t)})),d.listeners.push(u.listen("blur",function(){g=!1,b(!1)&&N(v,v.value,l.parseDate),null===v.value&&v.forEach(function(t){return t.value=null}),v.forEach(function(t){return t.display=z(t)}),O(v,i)})),d.listeners.push(u.listen("click",w)),d.listeners.push(u.listen("focus",w)),d.listeners.push(u.listen("keydown",function(t){switch(g=!1,t.key){case"Enter":case"Tab":var e=j(v,i.selectionStart),n=v.indexOf(e);B(v,e,i.selectionStart,!0)&&(O(v,i),E(v,b,t.shiftKey&&n>0||!t.shiftKey&&n+1<v.length,s,f)),t.shiftKey&&n>0?(w(v[n-1]),t.preventDefault(),t.stopPropagation()):!t.shiftKey&&n+1<v.length&&(w(v[n+1]),t.preventDefault(),t.stopPropagation());break;case"Backspace":g=!0;break;case"ArrowUp":case"ArrowDown":var r=[i.selectionStart,i.selectionEnd],a=r[0],o=r[1],l=j(v,a);null===l.value&&(l.value=1),function(t,e){switch(t.type){case"y":t.value=t.value+(e?-1:1);break;case"M":t.value=e?t.value<1?11:t.value-1:t.value>10?0:t.value+1;break;case"d":var n=t.groups,r=U(new Date((n.find(function(t){return"y"===t.type})||{value:1}).value,(n.find(function(t){return"M"===t.type})||{value:1}).value));t.value=e?t.value<2?r:t.value-1:t.value+1>r?1:t.value+1;break;case"H":t.value=e?t.value<1?23:t.value-1:t.value>22?0:t.value+1;break;case"h":t.value=e?t.value<1?12:t.value-1:t.value>11?1:t.value+1;break;case"m":case"s":t.value=e?t.value<1?59:t.value-1:t.value>58?0:t.value+1;break;case"S":t.value=e?t.value<1?999:t.value-1:t.value>998?0:t.value+1}}(l,"ArrowDown"===t.key),l.input=l.display=z(l),E(v,b,!0,s,f),O(v,i),t.preventDefault(),t.stopPropagation(),i.setSelectionRange(a,o)}})),{teardown:function(){d.observers.forEach(function(t){return t.cancel()}),d.listeners.forEach(function(t){return t.cancel()})}}}}}function P(t,e,n){var r=e.value,i=j(t,e.selectionStart),a=0,o=t[a],l=t[a+1];t.forEach(function(t){return t.input=""});for(var s=0;s<r.length;s++)l&&r[s]===l.prefix[0]&&(i!==o||o.input.length>=o.length||r.length-s<n.length-o.end+(o.length-o.input.length))?(l.prefix.length>1&&(s+=l.prefix.length-1),r[s+1]===l.prefix[0]&&(s+=l.prefix.length),o=t[++a],l=t[a+1]):o.input+=r[s]}function B(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=!1);for(var i=!1,a=0;a<t.length;a++){var o=t[a],l=(o.input||"").replace(D,""),s=t[a+1]&&t[a+1].prefix&&M.test(o.input);if(l.length>o.length&&o===e){var f=l.length-e.length;l=l.substr(0,n-e.start)+l.substr(n-e.start+f)}else l=l.substr(0,o.length);if(o.input=l,"y"===o.type&&0===l.length&&(s||r))o.value=(new Date).getFullYear(),o.input=o.display=S(o.value,o.length),i=!0;else if("m"===o.type&&0===l.length&&(s||r))o.value=0,o.input=o.display=S(o.value,o.length),i=!0;else if("d"===o.type&&l.length!==o.length&&r)o.value=+l,o.display=z(o);else if(""===l)o.value=null,o.display=z(o);else if(o!==e)o.value=+l,"M"===o.type&&o.value--,o.display=z(o);else if("M"===o.type&&+l>1||"d"===o.type&&+l>3||"H"===o.type&&+l>2||("m"===o.type||"s"===o.type)&&+l>6)o.value=+l,"M"===o.type&&o.value--,o.display=S(l,o.length),i=!0;else if("y"===o.type&&2===l.length&&(s||r)){var c=(new Date).getFullYear(),u=100*Math.floor(c/100),p=Math.abs(c-(u+ +l))<20?u+ +l:u-100+ +l;o.value=p,o.input=o.display=S(p,o.length),i=!0}else o.display=C(l,o.length,T),o.value=+l}return i}function N(t,e,n){var r=(e=t.value=e&&K(e,n))?[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]:[null,null,null,null,null,null,null];t.forEach(function(t){t.value=r[L[t.type]],t.input=t.display=z(t)})}function E(t,e,n,r,i){var a=t.value||r(),o=[a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()];if(!t.find(function(t){return"m"===t.type||"s"===t.type||"h"===t.type||"S"===t.type})){"function"==typeof i&&(i=i());for(var l=0;l<4;l++)o[l+3]=i[l]}if(t.forEach(function(t){var e=t.value;null!==e&&"M"===t.type?e<0?e=0:e>11&&(e=11):null===e||"m"!==t.type&&"s"!==t.type?null!==e&&"H"===t.type?e<0?e=0:e>23&&(e=23):null!==e&&"h"===t.type&&(e<1?e=1:e>12&&(e=12)):e<0?e=0:e>59&&(e=59),e!==t.value&&(t.value=e,t.display=z(t)),o[L[t.type]]=t.value}),null!==o[0]&&null!==o[1]&&null!==o[2]){var s=t.find(function(t){return"d"===t.type});if(s)if(o[2]<1)s.value=o[2]=1,s.display=z(s);else{var f=U(new Date(o[0],o[1],1));o[2]>f&&(s.value=o[2]=f,s.display=s.input=z(s))}}t.find(function(t){return null===t.value})||0===o[0]||o[1]>11||o[1]<0||0===o[2]?t.value=null:(o.unshift(null),t.value=new(Date.bind.apply(Date,o))),e(n)}function O(t,e){e.value=t.reduce(function(t,e){return t+e.prefix+e.display},"")+t.suffix}function j(t,e){return t.find(function(t){return e>=t.start&&e<=t.end})}function z(t){if(null===t.value)return S("",t.length,T);switch(t.type){case"y":return t.value?t.length<=2?(""+t.value).substr(2,2):""+S(t.value,t.length):S("",t.length,T);case"M":return~t.value?1===t.length?""+(t.value+1):2===t.length?(t.value<9?"0":"")+(t.value+1):3===t.length?H[t.value].substr(0,3):H[t.value]:S("",t.length,T);case"d":return t.value?1===t.length?""+t.value:2===t.length?(t.value<=9?"0":"")+t.value:3===t.length?I[t.groups.value.getDay()].substr(0,3):I[t.groups.value.getDay()]:S("",t.length,T);case"H":case"h":case"m":case"s":return 1===t.length?""+t.value:S(t.value,t.length);case"S":return 1===t.length?""+t.value:S(t.value,3)}}var A=/y+|M+|d+|E+|H+|m+|s+|S+|k+|a+/g,H=["January","February","March","April","May","June","July","August","September","October","November","December"],I=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],W={teardown:function(){}};function U(t){return new Date(new Date(t.getFullYear(),t.getMonth()+1,1)-864e5).getDate()}var J=new Date("0000-01-01T00:00:00");function K(t,e){var n=t;if("function"==typeof n&&(n=t()),"string"==typeof n)if("function"==typeof e)try{n=e(n)}catch(t){return defaultDate()}else try{n=new Date(n)}catch(t){return defaultDate()}return n instanceof Date?n:J}function q(t){t.strObserver&&t.strObserver.cancel(),t.attributes.value?t.link(t.attributes.value,"rdi.val"):t.unlink("rdi.val"),t.attributes.display?t.link(t.attributes.display,"rdi.display"):t.unlink("rdi.display"),t.attributes.string&&(t.strObserver=t.observe("rdi.val",function(e){return t.set(t.attributes.string,e?e.toString():"")}));var e={};["null","lazy","eager","mask","min","max","mask","no-pick","time"].forEach(function(n){n in t.attributes&&(e[n.replace(/-/g,"")]=t.attributes[n]),"eager"===n&&n in t.attributes&&(e.lazy=!t.attributes.eager)}),t.attributes.value&&(e.value="rdi.val"),t.attributes.display&&(e.display="rdi.display"),t.set("rdi.opts",e)}var X=Ractive.macro(function(t){return t.aliasLocal("rdi"),q(t),t.setTemplate({v:4,t:[{t:7,e:"span",m:[{t:13,n:"class",f:"rdi-date field-wrapper",g:1}],f:[{t:7,e:"input",m:[{n:"rdi-reg",t:71,f:{r:[],s:'["node"]'}},{n:"rdi-date",t:71,f:{r:["rdi.opts"],s:"[_0]"}},{n:"class-rdi-date",t:13},{t:8,r:"extra-attributes"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rdi-x",g:1},{n:["click"],t:70,f:{r:["@context"],s:'[(_0).set("rdi.val",null)]'}},{n:"title",f:"Clear",t:13,g:1}],f:["×"]}],n:50,x:{r:["rdi.opts.null","rdi.val"],s:"_0&&_1!==null"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rdi-pop",g:1},{n:"rdi-pop",t:71,f:{r:["rdi.node","rdi.tail"],s:'[{path:"rdi.popped",node:_0,tail:_1}]'}},{n:["click"],t:70,f:{r:[],s:"[false,false]"}},{n:"title",f:"Select from calendar",t:13,g:1}],f:[{t:7,e:"svg",m:[{n:"rdi-reg",t:71,f:{r:[],s:'["tail"]'}},{n:"x",f:"0px",t:13,g:1},{n:"y",f:"0px",t:13,g:1},{n:"viewBox",f:"0 0 48 48",t:13,g:1},{n:"xml:space",f:"preserve",t:13}],f:[{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.5;fill:none;stroke-width:1;",g:1},{n:"y",f:"1",t:13,g:1},{n:"x",f:"1",t:13,g:1},{n:"height",f:"46",t:13,g:1},{n:"width",f:"46",t:13,g:1}]}," ",{t:7,e:"rect",m:[{n:"y",f:"1",t:13,g:1},{n:"x",f:"1",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"46",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"13",t:13,g:1},{n:"x",f:"3",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.8;stroke:none;",g:1},{t:13,n:"class",f:"rdi-today",g:1},{n:"y",f:"13",t:13,g:1},{n:"x",f:"14",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"13",t:13,g:1},{n:"x",f:"25",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.4;stroke:none;",g:1},{n:"y",f:"13",t:13,g:1},{n:"x",f:"37",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"24",t:13,g:1},{n:"x",f:"3",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"24",t:13,g:1},{n:"x",f:"14",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"24",t:13,g:1},{n:"x",f:"25",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.4;stroke:none;",g:1},{n:"y",f:"24",t:13,g:1},{n:"x",f:"37",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"35",t:13,g:1},{n:"x",f:"3",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"35",t:13,g:1},{n:"x",f:"14",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"35",t:13,g:1},{n:"x",f:"25",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.4;stroke:none;",g:1},{n:"y",f:"35",t:13,g:1},{n:"x",f:"37",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}]}]}],n:51,r:"rdi.opts.nopick"}]}," ",{t:7,e:"rdi-pop",m:[{n:"popped",t:13,f:[{t:2,r:"rdi.popped"}]},{n:"tail",f:0,t:13},{n:"align",f:"end",t:13,g:1}],f:[{t:7,e:"rdi-picker",m:[{n:["init"],t:70,f:{r:["@context","rdi.val"],s:'[(_0).component.set("target",_1)]'}},{n:"date",t:13,f:[{t:2,r:"rdi.val"}]}]}]}],e:{'["node"]':function(){return["node"]},"[_0]":function(t){return[t]},'[(_0).set("rdi.val",null)]':function(t){return[t.set("rdi.val",null)]},"_0&&_1!==null":function(t,e){return t&&null!==e},'[{path:"rdi.popped",node:_0,tail:_1}]':function(t,e){return[{path:"rdi.popped",node:t,tail:e}]},"[false,false]":function(){return[!1,!1]},'["tail"]':function(){return["tail"]},'[(_0).component.set("target",_1)]':function(t,e){return[t.component.set("target",e)]}}}),{update:function(){q(t)}}},{css:function(t){return[function(t){return".rdi-date {\n position: relative;\n display: inline-block;\n }\n \n .rdi-date input.rdi-date {\n width: 100%;\n box-sizing: border-box;\n }\n \n .rdi-x {\n position: absolute;\n right: 2em;\n top: 0.025em;\n cursor: pointer;\n }\n \n .rdi-pop {\n position: absolute;\n display: flex;\n justify-content: space-around;\n align-items: flex-end;\n flex-direction: column;\n right: 0.5em;\n height: 100%;\n top: 0;\n cursor: pointer;\n }\n \n .rdi-pop > svg {\n height: 48px;\n max-height: 60%;\n fill: "+(t("raui.dateInput.primary.fg")||t("raui.primary.fg")||"#222")+";\n }\n \n .rdi-today {\n fill: "+(t("raui.dateInput.primary.fga")||t("raui.primary.fga")||"#07e")+";\n }"}.call(this,t)].join(" ")},cssId:"rdi",noCssTransform:!0,attributes:["value","null","lazy","eager","mask","string","display","min","max","no-pick","time"]});t.DateInput=X,t.default=function(t){return void 0===t&&(t={}),function(e){var n,r=e.instance;r.components["rdi-picker"]=l,r.components["rdi-pop"]=_,(void 0===(n={name:"rdi-pop"})&&(n={}),function(t){t.instance.decorators[n.name||"pop"]=function(t,e,r){if(void 0===r&&(r={}),!e)return{teardown:w};"string"==typeof e?r.path=e:"object"==typeof e&&(r=e);var i,a,o=this.getContext(t);function l(n){if("mouseover"!==n.type||!o.get(e)){if("click"!==n.type||!a||i){var l=h,s=v;"function"==typeof(h=r.node||t)&&(h=h()),h=h||t,"function"==typeof(v=r.tail)&&(v=v()),o.toggle(r.path),h=l,v=s}a&&"click"===n.type&&(i=o.observeOnce(r.path,function(){i=null}))}}function s(t){i||o.set(r.path,!1)}return("click"in r?r.click:!1!==n.click)&&o.listen("click",l),("hover"in r?r.hover:n.hover)&&(a=1,o.listen("mouseover",l),o.listen("mouseout",s)),{teardown:function(){o.unlisten("click",l),a&&(o.unlisten("mouseover",l),o.unlisten("mouseout",s),i&&i.cancel())}}}})({instance:r}),R({name:"rdi-date",parseDate:t.parseDate})({instance:r}),r.partials[t.name||"date-input"]=X,r.decorators["rdi-reg"]=function(t,e){return this.getContext(t).set("rdi."+e,function(){return t}),{teardown:function(){}}}}},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.RauiDateInput={},t.Ractive)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n=function(){try{var t=navigator.language||navigator.browserLanguage||navigator.languages[0]||"en";return[[0,1,2,3,4,5,6,7,8,9,10,11].map(function(e){return new Date(2006,e,1).toLocaleString(t,{month:"long"})}),[1,2,3,4,5,6,7].map(function(e){return new Date(2006,0,e).toLocaleString(t,{weekday:"long"})})]}catch(t){return[["January","February","March","April","May","June","July","August","September","October","November","December"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]]}}(),r=n[0],i=n[1],a=i.map(function(t){return t[0]}).concat(i.map(function(t){return t[0].toUpperCase()})),o=r.map(function(t){return t.substr(0,3)}),l=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.month=function(t,e){void 0===e&&(e=0);var n,r=t||new Date;if(!(r instanceof Date))return{};isNaN(r)&&(r=new Date),e&&(r=new Date(r.getFullYear(),r.getMonth()+e,r.getDate()));try{n=+this.get("firstDay")}catch(t){}("number"!=typeof n||isNaN(n))&&(n=0),n>6&&(n=0);for(var i=new Date(r.getFullYear(),r.getMonth(),0),o=new Date(r.getFullYear(),r.getMonth()+1,0).getDate(),l=new Date(r.getFullYear(),r.getMonth()+1,1),s=new Date(r.getFullYear(),r.getMonth(),1).getDay(),f=[],c=f[0]=[],u=0;u<7;u++)f[0].unshift({y:i.getFullYear(),m:i.getMonth(),d:i.getDate()-u}),f[0].push({y:r.getFullYear(),m:r.getMonth(),d:u+1});f[0]=n<=s?f[0].slice(7-(s-n),14-(s-n)):f[0].slice(n-s,7+n-s),1===f[0][0].d&&f.unshift(c.slice(0,7));for(var p=f[f.length-1][f[f.length-1].length-1].d,d=f.length;d<5;d++){f[d]=[];for(var g=0;g<7&&p+1<=o;g++)f[d].push({y:r.getFullYear(),m:r.getMonth(),d:++p});if(f[d].length<7){for(var h=7-f[d].length,v=1;v<=h;v++)f[d].push({y:l.getFullYear(),m:l.getMonth(),d:v});f[d+1]=[];for(var m=0,y=h+1;m<7;m++,y++)f[d+1].push({y:l.getFullYear(),m:l.getMonth(),d:y})}}if(!f[5]){for(f[5]=[];p<o;)f[5].push({y:r.getFullYear(),m:r.getMonth(),d:++p});for(var b=1;b<8;b++)f[5].push({y:l.getFullYear(),m:l.getMonth(),d:b});f[5]=f[5].slice(0,7)}return{days:a.slice(n,n+7),weeks:f,year:r.getFullYear(),month:r.getMonth(),currentYear:(new Date).getFullYear()}},e.prototype.year=function(t,e){void 0===e&&(e=0);var n=t||new Date;if(!(n instanceof Date))return{};e&&(n=new Date(n.getFullYear()+e,n.getMonth(),n.getDate()));for(var r=[],i=0;i<4;i++){r.push([]);for(var a=0;a<3;a++)r[i].push({m:3*i+a,y:n.getFullYear()})}return{year:n.getFullYear(),months:r}},e.prototype.decade=function(t,e){void 0===e&&(e=0);var n=t||new Date;if(!(n instanceof Date))return{};e&&(n=new Date(n.getFullYear()+10*e,n.getMonth(),n.getDate()));for(var r=10*Math.floor(n.getFullYear()/10),i=r-1,a=[],o=0;o<4;o++){a.push([]);for(var l=0;l<3;l++)a[o].push({y:i+3*o+l})}return{start:r,end:r+9,years:a}},e.prototype.monthName=function(t){return r[t]},e.prototype.shortMonthName=function(t){return o[t]},e.prototype.dayName=function(t){return i[t]},e.prototype.select=function(t){if(t&&t instanceof Date)this.set("date",t);else{var e=this.get("safeCurrent");t&&this.set("date",new Date(t.y||e.getFullYear(),"number"==typeof t.m?t.m:e.getMonth(),t.d||e.getDate()));var n=this.get("mode");"year"===n?this.set("mode","months"):"months"===n&&this.set("mode","month"),this.set("target",this.get("date"))}},e.prototype.isCurrent=function(t){var e=this.get("safeCurrent");return!!e&&(t&&t.y===e.getFullYear()&&(null==t.m||t.m===e.getMonth())&&(null==t.d||t.d===e.getDate()))},e.prototype.next=function(){var t=this.get("safeTarget"),e=this.get("mode");"month"===e&&this.set("target",new Date(t.getFullYear(),t.getMonth()+1,1)),"months"===e&&this.set("target",new Date(t.getFullYear()+1,t.getMonth(),1)),"year"===e&&this.set("target",new Date(t.getFullYear()+10,t.getMonth(),1))},e.prototype.prev=function(){var t=this.get("safeTarget"),e=this.get("mode");"month"===e&&this.set("target",new Date(t.getFullYear(),t.getMonth()-1,1)),"months"===e&&this.set("target",new Date(t.getFullYear()-1,t.getMonth(),1)),"year"===e&&this.set("target",new Date(t.getFullYear()-10,t.getMonth(),1))},e.prototype.today=function(){this.set("date",new Date),this.set("target",this.get("date"))},e}(e);e.extendWith(l,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal",g:1}],f:[{t:4,f:[{t:4,f:[{t:19,f:[{t:8,r:"~/mode"}],n:54,z:[{n:"left",x:{x:{r:["@index"],s:"_0===0"}}},{n:"right",x:{x:{r:["@last","@index"],s:"_0===_1"}}}]}],n:52,z:[{n:"offset",x:{r:"."}}],r:"~/padding"}],n:50,r:"~/padding"},{t:4,f:[{t:19,f:[{t:8,r:"~/mode"}],n:54,z:[{n:"offset",x:{x:{r:[],s:"0"}}},{n:"left",x:{x:{r:[],s:"true"}}},{n:"right",x:{x:{r:[],s:"true"}}}]}],n:51,l:1}]}],e:{0:function(){return 0},"_0===0":function(t){return 0===t},"_0===_1":function(t,e){return t===e},true:function(){return!0},"[_0.prev(),false]":function(t){return[t.prev(),!1]},'[_0.set("mode","month"),false]':function(t){return[t.set("mode","month"),!1]},"[_0.next(),false]":function(t){return[t.next(),!1]},"_1>_0||_1<_2":function(t,e,n){return e>t||e<n},"_0.isCurrent(_1)":function(t,e){return t.isCurrent(e)},"[_0.select(_1),false]":function(t,e){return[t.select(e),!1]},"_0.decade(_1,_2)":function(t,e,n){return t.decade(e,n)},'[_0.set("mode","year"),false]':function(t){return[t.set("mode","year"),!1]},"_0.shortMonthName(_1)":function(t,e){return t.shortMonthName(e)},"_0.year(_1,_2)":function(t,e,n){return t.year(e,n)},'[_0.set("mode","months"),false]':function(t){return[t.set("mode","months"),!1]},"_0.monthName(_1)":function(t,e){return t.monthName(e)},"_0!==_1":function(t,e){return t!==e},"[_0.select(_1)]":function(t,e){return[t.select(e)]},"_0.month(_1,_2)":function(t,e,n){return t.month(e,n)}},p:{year:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-wrapper",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-block-outer",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-block-header",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-arrow",g:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:"[_0.prev(),false]"}}],n:50,r:"left"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-left",g:1}]}],n:50,r:"left"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-title",g:1},{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("mode","month"),false]'}}],f:[{t:2,r:".start"}," - ",{t:2,r:".end"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-arrow",g:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:"[_0.next(),false]"}}],n:50,r:"right"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-right",g:1}]}],n:50,r:"right"}]}]}," ",{t:19,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-decade",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-inner-row",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-inner-pick",g:1},{n:"class-rcal-off-day",t:13,f:[{t:2,x:{r:["year.end",".y","year.start"],s:"_1>_0||_1<_2"}}]},{n:"class-rcal-current",t:13,f:[{t:2,x:{r:["@this","."],s:"_0.isCurrent(_1)"}}]},{n:["click"],t:70,f:{r:["@this","."],s:"[_0.select(_1),false]"}}],f:[{t:2,r:".y"}]}],n:52,r:"."}]}],n:52,r:".years"}]}],n:54,z:[{n:"year",x:{r:"."}}]}]}]}],n:54,x:{r:["@this","~/safeTarget","offset"],s:"_0.decade(_1,_2)"}}],months:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-wrapper",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-block-outer",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-block-header",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-arrow",g:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:"[_0.prev(),false]"}}],n:50,r:"left"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-left",g:1}]}],n:50,r:"left"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-title",g:1},{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("mode","year"),false]'}}],f:[{t:2,r:".year"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-arrow",g:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:"[_0.next(),false]"}}],n:50,r:"right"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-right",g:1}]}],n:50,r:"right"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-year",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-inner-row",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-inner-pick",g:1},{n:"class-rcal-current",t:13,f:[{t:2,x:{r:["@this","."],s:"_0.isCurrent(_1)"}}]},{n:["click"],t:70,f:{r:["@this","."],s:"[_0.select(_1),false]"}}],f:[{t:2,x:{r:["@this",".m"],s:"_0.shortMonthName(_1)"}}]}],n:52,r:"."}]}],n:52,r:".months"}]}]}]}],n:54,x:{r:["@this","~/safeTarget","offset"],s:"_0.year(_1,_2)"}}],month:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-wrapper",g:1},{n:"class-rcal-pad",t:13,f:[{t:2,r:"~/pad"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-block-outer",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-block-header",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-arrow",g:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:"[_0.prev(),false]"}}],n:50,r:"left"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-left",g:1}]}],n:50,r:"left"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-title",g:1},{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("mode","months"),false]'}}],f:[{t:2,x:{r:["@this",".month"],s:"_0.monthName(_1)"}},{t:4,f:[" ",{t:2,r:".year"}],n:50,x:{r:[".currentYear",".year"],s:"_0!==_1"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-click rcal-arrow",g:1},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:"[_0.next(),false]"}}],n:50,r:"right"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-right",g:1}]}],n:50,r:"right"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-month",g:1}],f:[{t:19,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-week rcal-week-header",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-day rcal-day-header",g:1}],f:[{t:2,r:"."}]}],n:52,r:".days"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-week",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcal-day",g:1},{n:"class-rcal-off-day",t:13,f:[{t:2,x:{r:[".m","month.month"],s:"_0!==_1"}}]},{n:"class-rcal-current",t:13,f:[{t:2,x:{r:["@this","."],s:"_0.isCurrent(_1)"}}]},{n:["click"],t:70,f:{r:["@this","."],s:"[_0.select(_1)]"}}],f:[{t:2,r:".d"}]}],n:52,r:"."}]}],n:52,r:".weeks"}],n:54,z:[{n:"month",x:{r:"."}}]}]}]}]}],n:54,x:{r:["@this","~/safeTarget","offset"],s:"_0.month(_1,_2)"}}]}},css:function(t){return[function(t){return".rcal-wrapper {\n display: flex;\n flex-direction: column;\n width: 15em;\n height: 17em;\n }\n \n .rcal-pad {\n padding: 0.5em;\n }\n \n .rcal-block-outer {\n border: 1px solid "+(t("raui.datePicker.primary.bga")||t("raui.primary.bga")||"#f4f4f4")+";\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n \n .rcal-block-header {\n text-align: center;\n background-color: "+(t("raui.datePicker.primary.fga")||t("raui.primary.fga")||"#07e")+";\n color: "+(t("raui.datePicker.primary.bg")||t("raui.primary.bg")||"#fff")+";\n cursor: default;\n display: flex;\n justify-content: space-between;\n line-height: 2em;\n height: 2em;\n align-items: center;\n }\n \n .rcal-arrow {\n width: 2em;\n }\n .rcal-title {\n flex-grow: 1;\n }\n \n .rcal-click {\n cursor: pointer;\n }\n \n .rcal-left, .rcal-right {\n height: 0.8em;\n display: inline-block;\n box-sizing: border-box;\n border: 0.4em solid transparent;\n cursor: pointer;\n }\n .rcal-left {\n border-right-color: "+(t("raui.datePicker.primary.bg")||t("raui.primary.bg")||"#fff")+";\n }\n .rcal-right {\n border-left-color: "+(t("raui.datePicker.primary.bg")||t("raui.primary.bg")||"#fff")+";\n }\n \n .rcal-month, .rcal-year, .rcal-decade {\n display: flex;\n flex-direction: column;\n background-color: "+(t("raui.datePicker.primary.bga")||t("raui.primary.bga")||"#f4f4f4")+";\n justify-content: space-between;\n flex-grow: 1;\n }\n .rcal-year, .rcal-decade {\n justify-content: space-around;\n }\n \n .rcal-week {\n height: 2em;\n display: flex;\n justify-content: space-between;\n }\n \n .rcal-inner-row {\n height: 2em;\n display: flex;\n justify-content: space-around;\n }\n \n .rcal-inner-pick {\n background-color: "+(t("raui.datePicker.primary.bg")||t("raui.primary.bg")||"#fff")+";\n width: 3em;\n height: 2em;\n line-height: 2em;\n text-align: center;\n cursor: pointer;\n }\n \n .rcal-week-header {\n background-color: "+(t("raui.datePicker.primary.fga")||t("raui.primary.fga")||"#07e")+";\n }\n \n .rcal-day {\n background-color: "+(t("raui.datePicker.primary.bg")||t("raui.primary.bg")||"#fff")+";\n width: 2em;\n height: 2em;\n text-align: center;\n line-height: 2em;\n cursor: pointer;\n }\n \n .rcal-day-header {\n color: "+(t("raui.datePicker.primary.bg")||t("raui.primary.bg")||"#fff")+";\n background-color: "+(t("raui.datePicker.primary.fga")||t("raui.primary.fga")||"#07e")+";\n cursor: default;\n }\n \n .rcal-off-day {\n background-color: "+(t("raui.datePicker.primary.bc")||t("raui.primary.bc")||"#ccc")+";\n }\n \n .rcal-current {\n color: "+(t("raui.datePicker.primary.bg")||t("raui.primary.bg")||"#fff")+";\n background-color: "+(t("raui.datePicker.primary.fg")||t("raui.primary.fg")||"#222")+";\n }\n "}.call(this,t)].join(" ")},noCssTransform:!0,data:function(){return{mode:"month",target:new Date}},computed:{safeCurrent:function(){var t=this.get("date");if("string"==typeof t)try{t=new Date(t)}catch(t){}return t&&t instanceof Date&&!isNaN(t)?t:new Date},safeTarget:function(){var t=this.get("target");if(t||(t=this.get("date")),"string"==typeof t)try{t=new Date(t)}catch(t){}return t&&t instanceof Date&&!isNaN(t)?t:new Date}}});var s="undefined"!=typeof window?window:null;function f(t,e,n){if(s&&s.Ractive&&"object"==typeof s.Ractive[e]){var r=document.currentScript;if(r||(r=(r=document.querySelectorAll("script"))[r.length-1]),r){var i=r.getAttribute("data-alias");i&&(i=(i=i.split("&")).reduce(function(t,e){var n=e.split("="),r=n[0],i=n[1];return t[r]=i,t},{})),Ractive[e][i&&i[t]||t]=n}}}function c(t,e){void 0===e&&(e={});var n=t.processParams(e,{duration:400,easing:"easeInOut"});e.dir=e.dir||!1;var r=e.distance||"20px",i=e.scale||"0.9",a="above"===e.dir?"translateY("+r+")":"left"===e.dir?"translateX("+r+")":"right"===e.dir?"translateX(-"+r+")":"translateY(-"+r+")";return t.isIntro||n.intro?(t.setStyle("opacity",0),t.setStyle("transform","scale("+i+") "+a),t.animateStyle({opacity:1,transform:"none"},n)):(t.setStyle("opacity",1),t.setStyle("transform","none"),t.animateStyle({opacity:0,transform:"scale("+i+") "+a},n))}function u(t){return void 0===t&&(t={}),function(e){e.instance.transitions[t.name||"pop"]=c}}function p(t,e){var n=!1,r=!1;function i(n){for(var r=n.target;r;){if(r===t)return;if(!r.parentNode&&r!==document)return;r=r.parentNode}e(n)}return setTimeout(function(){n=!0,r||(document.body.addEventListener("click",i,{capture:!0}),document.body.addEventListener("touchstop",i,{capture:!0}))}),{teardown:function(){r=!0,n&&(document.body.removeEventListener("click",i,{capture:!0}),document.body.removeEventListener("touchstop",i,{capture:!0}))}}}function d(t,e){var n=t.processParams(e,{duration:200,easing:"easeInOut"});return t.isIntro||n.intro?(t.setStyle("opacity",0),t.animateStyle("opacity",1,n)):(t.setStyle("opacity",1),t.animateStyle("opacity",0,n))}function g(t){return void 0===t&&(t={}),function(e){e.instance.transitions[t.name||"fade"]=d}}f("pop","transitions",c),f("fade","transitions",d);var h,v,m,y,b={v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-wrapper",g:1},{n:"class-rpop-with-tail",t:13,f:[{t:2,r:"position.tail"}]},{n:"class",f:["rpop-",{t:2,x:{r:["where"],s:'_0||"below"'}}," rpop-align-",{t:2,x:{r:["align"],s:'_0||"middle"'}}],t:13},{t:4,f:[{n:"style-top",f:[{t:2,r:"position.popTop"},"px"],t:13},{n:"style-left",f:[{t:2,r:"position.popLeft"},"px"],t:13}],n:50,r:"position"},{t:4,f:[{t:4,f:[{n:"style-top",f:[{t:2,r:"top"}],t:13}],n:50,r:"top"},{t:4,f:[{n:"style-left",f:[{t:2,r:"left"}],t:13}],n:50,r:"left"}],n:51,l:1},{n:"pop",t:72,f:{r:["where"],s:'[{dir:_0||"below"}]'},v:"t2"},{n:"cleanup",t:71},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:50,r:"clickClose"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:51,r:"noClickout"},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail-outer",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}],n:50,r:"~/tail"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1}],f:[{t:16,r:"content",z:[{n:"trigger",x:{r:"triggerContext"}}]}]}]}],n:50,r:"__popped"}],e:{'_0||"below"':function(t){return t||"below"},'_0||"middle"':function(t){return t||"middle"},'[{dir:_0||"below"}]':function(t){return[{dir:t||"below"}]},'[_0.set("popped",false)]':function(t){return[t.set("popped",!1)]},"_0+(_1?3:0)":function(t,e){return t+(e?3:0)},"_0!=null":function(t){return null!=t},"_0+(_1?0:3)":function(t,e){return t+(e?0:3)},"_0-2":function(t){return t-2},"[{delay:200}]":function(){return[{delay:200}]},"[_0===_1&&_2.done(),true]":function(t,e,n){return[t===e&&n.done(),!0]},"[_0.done()]":function(t){return[t.done()]},true:function(){return!0}},p:{modal:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-modal",g:1},{n:"fade",t:72,v:"t1"},{n:"fade",t:72,f:{r:[],s:"[{delay:200}]"},v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["@node","@event.target","."],s:"[_0===_1&&_2.done(),true]"}}],n:51,r:".noClickout"}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1},{n:"pop",t:72,f:{r:[],s:"[{delay:200}]"},v:"t1"},{n:"pop",t:72,v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.done()]"}}],n:50,r:".clickClose"},{t:8,r:".attrs",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}],f:[{t:8,r:".content",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}]}]}],n:54,r:"contents.0"}],n:50,r:"contents.length"}]}};function w(){}var x,_=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.position=function(e){var n=e||this.source,r=this.get("popped");if(n&&r){var i=this.find("div");if(n&&i&&i.offsetParent){n?this.set("triggerContext",t.getContext(n)):this.set("triggerContext",null);var a=i.offsetParent,o=a.getBoundingClientRect(),l=i.getBoundingClientRect(),s=n.getBoundingClientRect(),f=this.get("where")||"below",c=this.get("align")||"middle",u=this.get("tail"),p="above"===f||"below"===f,d=this.get("fit"),g=this.get("gap"),h="above"===f||"below"===f?0:"left"===f?-l.width-g:s.width+g,v="left"===f||"right"===f?-s.height:"above"===f?-s.height-l.height-g:g;"middle"===c?"below"===f||"above"===f?h-=(l.width-s.width)/2:"left"!==f&&"right"!==f||(v-=(l.height-s.height)/2):"end"===c&&("below"===f||"above"===f?h+=s.width-l.width:"left"!==f&&"right"!==f||(v+=s.height-l.height));var m={popTop:s.bottom-o.top+v,popLeft:s.left-o.left+h,tail:u,vert:"above"===f||"below"===f};if(a.scrollTop&&(m.popTop+=a.scrollTop),a.scrollLeft&&(m.popLeft+=a.scrollLeft),u){"above"===f?m.tailBottom=-10:"below"===f?m.tailTop=-10:"left"===f?m.tailRight=-10:"right"===f&&(m.tailLeft=-10);var y=this.tailSource?this.tailSource.getBoundingClientRect():s;"start"===c?p?m.tailLeft=Math.floor(y.width/2)-10:m.tailTop=Math.floor(y.height/2)-10:"end"===c?p?m.tailRight=Math.floor(y.width/2)-10:m.tailBottom=Math.floor(y.height/2)-10:"middle"===c&&(p?m.tailLeft=Math.floor(y.width/2)-10:m.tailTop=Math.floor(y.height/2)-10),y!==s?p?(null!=m.tailLeft&&(m.tailLeft+=y.left-s.left),null!=m.tailRight&&(m.tailRight+=s.right-y.right)):(null!=m.tailTop&&(m.tailTop+=y.top-s.top),null!=m.tailBottom&&(m.tailBottom+=s.bottom-y.bottom)):"middle"===c&&(p?(null!=m.tailLeft&&(m.tailLeft+=y.left-(m.popLeft+o.left)),null!=m.tailRight&&(m.tailRight+=m.popLeft+o.left+l.width-y.right)):(null!=m.tailTop&&(m.tailTop+=y.top-(m.popTop+o.top)),null!=m.tailBottom&&(m.tailBottom+=m.popTop+o.top+l.height-y.bottom)))}if(d){var b=a;if(this.get("offsets"))for(var w=this.get("offsets");w--;)b=b.offsetParent;var x=a.scrollWidth,_=a.scrollHeight;if(m.popLeft+l.width>x){var k=m.popLeft-(x-l.width);m.popLeft-=k,p&&m.tailLeft&&(m.tailLeft+=k),p&&m.tailRight&&(m.tailRight-=k),u&&!p&&(m.tail=!1)}if(m.popLeft<0){var D=-1*m.popLeft;m.popLeft+=D,p&&m.tailLeft&&(m.tailLeft-=D),p&&m.tailRight&&(m.tailRight+=D),u&&!p&&(m.tail=!1)}if(m.popTop+l.height>_){var M=m.popTop-(_-l.height);m.popTop-=M,!p&&m.tailTop&&(m.tailTop+=M),!p&&m.tailBottom&&(m.tailBottom-=M),u&&p&&(m.tail=!1)}if(m.popTop<0){var T=-1*m.popTop;m.popTop+=T,!p&&m.tailTop&&(m.tailTop-=T),!p&&m.tailBottom&&(m.tailBottom+=T),u&&p&&(m.tail=!1)}}if(o.left+m.popLeft<0){var L=0-(o.left+m.popLeft);m.popLeft+=L,p&&m.tailLeft&&(m.tailLeft-=L),p&&m.tailRight&&(m.tailRight+=L),u&&!p&&(m.tail=!1)}if(o.top+m.popTop<0){var S=0-(o.top+m.popTop);m.popTop+=S,!p&&m.tailTop&&(m.tailTop-=S),!p&&m.tailBottom&&(m.tailBottom+=S),u&&p&&(m.tail=!1)}m.tailLeft&&(m.tailLeft=Math.floor(m.tailLeft)),m.tailRight&&(m.tailRight=Math.floor(m.tailRight)),m.tailTop&&(m.tailTop=Math.floor(m.tailTop)),m.tailBottom&&(m.tailBottom=Math.floor(m.tailBottom)),this.set("position",m)}else this.set("position",null)}},e.prototype.show=function(t){return this.source=t,this.set("popped",!0),this._transdone},e.prototype.hide=function(){return this.set("popped",!1),this._transdone},e.prototype.popFind=function(t){return m?y.find(t):this.find(t)},e.prototype.popFindAll=function(t){return m?y.findAll(t):this.findAll(t)},e}(e);e.extendWith(_,{attributes:["popped","tail","where","align","top","left","fit","clickClose","noClickout","gap","offsets"],use:[u(),(void 0===x&&(x={}),function(t){t.instance.events[x.name||"clickout"]=p}),g()],template:b,css:function(t){return[function(t){var e=Object.assign({},t("raui.primary"),t("raui.pop.primary")),n=(t("raui.themes")||[]).slice();return(t("raui.pop.themes")||[]).forEach(function(t){~n.indexOf(t)||n.push(t)}),"\n .rpop-wrapper {\n position: absolute;\n display: inline-block;\n z-index: 21;\n transition-property: top, left, padding;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-with-tail.rpop-above {\n padding-bottom: 10px;\n }\n .rpop-with-tail.rpop-below {\n padding-top: 10px;\n }\n .rpop-with-tail.rpop-left {\n padding-right: 10px;\n }\n .rpop-with-tail.rpop-right {\n padding-left: 10px;\n }\n \n .rpop {\n position: relative;\n box-shadow: 0 1px 4px 0 rgba(0,0,0,0.24);\n border: 1px solid #ccc;\n border-radius: 0.2em;\n background-color: "+(e.bg||"#fff")+";\n color: "+(e.fg||"#222")+";\n padding: 0.5em;\n z-index: 2;\n }\n \n .rpop-modal {\n position: fixed;\n display: flex;\n z-index: 20;\n background-color: rgba(0, 0, 0, 0.2);\n align-items: center;\n justify-content: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 1em;\n overflow: auto;\n }\n \n .rpop-tail, .rpop-tail-outer {\n z-index: 3;\n width: 0;\n height: 0;\n position: absolute;\n border-style: solid;\n border-width: 10px;\n border-color: transparent;\n transition-property: top, left, bottom, right, border-color;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-tail-outer {\n z-index: 1;\n border-width: 12px;\n border-color: transparent;\n }\n \n .rpop-below .rpop-tail {\n border-bottom-color: "+(e.bg||"#fff")+";\n }\n .rpop-below .rpop-tail-outer {\n border-bottom-color: "+(e.bc||"#ccc")+";\n }\n \n .rpop-above .rpop-tail {\n border-top-color: "+(e.bg||"#fff")+";\n }\n .rpop-above .rpop-tail-outer {\n border-top-color: "+(e.bc||"#ccc")+";\n }\n \n .rpop-left .rpop-tail {\n border-left-color: "+(e.bg||"#fff")+";\n }\n .rpop-left .rpop-tail-outer {\n border-left-color: "+(e.bc||"#ccc")+";\n }\n \n .rpop-right .rpop-tail {\n border-right-color: "+(e.bg||"#fff")+";\n }\n .rpop-right .rpop-tail-outer {\n border-right-color: "+(e.bc||"#ccc")+";\n }\n "+n.map(function(e){var n=Object.assign({},t("raui.primary"),t("raui.pop.primary"),t("raui."+e),t("raui.pop."+e));return"\n ."+e+" .rpop {\n background-color: "+(n.bg||"#fff")+";\n color: "+(n.fg||"#222")+";\n }\n \n ."+e+".rpop-below .rpop-tail {\n border-bottom-color: "+(n.bg||"#fff")+";\n }\n ."+e+".rpop-below .rpop-tail-outer {\n border-bottom-color: "+(n.bc||"#ccc")+";\n }\n \n ."+e+".rpop-above .rpop-tail {\n border-top-color: "+(n.bg||"#fff")+";\n }\n ."+e+".rpop-above .rpop-tail-outer {\n border-top-color: "+(n.bc||"#ccc")+";\n }\n \n ."+e+".rpop-left .rpop-tail {\n border-left-color: "+(n.bg||"#fff")+";\n }\n ."+e+".rpop-left .rpop-tail-outer {\n border-left-color: "+(n.bc||"#ccc")+";\n }\n \n ."+e+".rpop-right .rpop-tail {\n border-right-color: "+(n.bg||"#fff")+";\n }\n ."+e+".rpop-right .rpop-tail-outer {\n border-right-color: "+(n.bc||"#ccc")+";\n }\n "})}.call(this,t)].join(" ")},cssId:"rpop",noCssTransform:!0,observe:{popped:function(t){var e,n=this;t&&(h&&(this.source=h),v&&(this.tailSource=v));var r=this._transdone=new Promise(function(t){return e=t});r.resolve=e,setTimeout(function(){n._transdone=r,n.get("popped")===t&&n.set("_popped",t)},1)},_popped:{handler:function(t){var e=this,n=this._transdone.resolve;if(t){var r=this.get("@style.raui.pop.mobile");if(r&&window.matchMedia("(max-width: "+r+")").matches){y||(y=new k({target:document.body,append:!0}));var i=this.getContext().getParent(!0);i.isContext=1,this.set("__popped",!1).then(n),y.unshift("contents",{content:this.partials.content,context:i,attrs:this.partials["extra-attributes"]||[],clickClose:this.get("clickClose"),noClickout:this.get("noClickout"),done:function(){e.set("popped",!1)}})}else this.set("__popped",!0)}else m?(y.shift("contents"),n()):this.set("__popped",!1).then(n)},defer:!0,init:!1},__popped:{handler:function(t){var e=this._transdone.resolve;if(t){var n=this.find("div"),r=n,i=r.offsetHeight+r.offsetTop,a=r.offsetWidth+r.offsetLeft,o=r.offsetParent;if(!this.overflows)for(var l=this.overflows={e:[],v:[]};n&&n.style;){if(n===o){if(n.offsetWidth>=a&&n.offsetHeight>=i)break;a+=n.offsetLeft,i+=n.offsetTop,o=n.offsetParent}var s=getComputedStyle(n);if("auto"===s.overflow)break;"hidden"===s.overflow&&(l.e.push(n),l.v.push(n.style.overflow),n.style.overflow="visible"),n=n.parentNode}this.position(),this.transition("pop",r,{intro:!0,dir:this.get("where")||"below"}).then(e)}else this.source=null,this.tailSource=null},defer:!0,init:!1},"align where tail fit":{handler:function(){this.position()},defer:!0}},decorators:{cleanup:function(t){var e=this;return{teardown:function(){var t=e.overflows;if(t){e.overflows=null;for(var n=0;n<t.e.length;n++)t.e[n].style.overflow=t.v[n]}}}}},data:function(){return{gap:4}}});var k=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(e);e.extendWith(k,{template:{v:b.v,t:b.p.modal},data:function(){return{contents:[]}},use:[u(),g()],observe:{contents:function(t){m=(t||[]).length>0}},on:{init:function(){y?console.warn("More than one PopOver mobile host created."):y=this}}});var D=/[^\d]+/,M=/[^\d_]+/,T="_",L={y:0,M:1,d:2,H:3,m:4,s:5,S:6};function S(t,e,n){void 0===n&&(n="0");for(var r=null==t?"":""+t,i=r.length;i<e;i++)r=n+r;return r}function C(t,e,n){void 0===n&&(n="0");for(var r=null==t?"":""+t,i=r.length;i<e;i++)r+=n;return r}var F={mask:"yyyy-MM-dd",time:[0,0,0,0],date:function(){var t=new Date,e=F.time;return new Date(t.getFullYear(),t.getMonth(),t.getDate(),e[0],e[1],e[2],e[3])},parseDate:function(t){return new Date(t)}};function Y(t){if("start"===t)t=[0,0,0,0];else if("end"===t)t=[23,59,59,999];else if("mid"===t)t=[12,0,0,0];else if("now"===t)t=function(){var t=new Date;return[t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]};else if("string"==typeof t){var e=new Date("2000-05-13T"+t+"Z");+e&&(t=[e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()])}return Array.isArray(t)||"function"==typeof t||Array.isArray(t())||(t=[0,0,0,0]),t}function R(t){void 0===t&&(t={});var e=t.mask||F.mask,n=Y(t.time||F.time),r=t.date||F.date;if("function"!=typeof r){var i=r;r=function(){return i}}return function(i){i.instance.decorators[t.name||"date"]=function(i,a,o){void 0===a&&(a={});var l=Object.assign({},t,"string"==typeof a?{value:a}:a,"string"==typeof o?{mask:o}:o);l.parseDate||(l.parseDate=t.parseDate||F.parseDate);var s=l.date||r,f=Y(l.time||n);if("function"!=typeof s){var c=s;s=function(){return c}}var u=this.getContext(i),p=l.mask||e,d={observers:[],listeners:[]},g=!1;if("INPUT"!==i.tagName)return console.warn("Attempted to add a date decorator a "+i.tagName),W;if(!p)return W;for(var h,v=[],m=0;h=A.exec(p);){var y={mask:h[0],type:h[0][0],length:h[0].length,start:h.index,end:h.index+h[0].length,chunk:v.length,prefix:p.substring(m,h.index),groups:v,value:null,display:C("",h[0].length,T)};m=y.end,v.push(y)}if(v.suffix=p.substring(v[v.length-1].end),v.last=null,v.slice(1).find(function(t){return!t.prefix}))return console.warn("Attempted to add a date decorator missing interstitial between fields '"+p+"'"),W;function b(t){if(null===v.value&&null===v.last||+v.value==+v.last)return 1;if(!t||!1===l.lazy){if(!1===l.null&&null===v.value)return N(v,v.last,l.parseDate),1;l.min&&v.value<l.min?(N(v,l.min,l.parseDate),O(v,i)):l.max&&v.value>l.max&&(N(v,l.max,l.parseDate),O(v,i)),v.last=v.value,"string"==typeof l.value&&(d.observers.forEach(function(t){return t.silence()}),u.set(l.value,v.value),d.observers.forEach(function(t){return t.resume()})),"string"==typeof l.display&&(d.observers.forEach(function(t){return t.silence()}),u.set(l.display,i.value),d.observers.forEach(function(t){return t.resume()}))}}l.min>l.max&&delete l.min,"string"==typeof l.value&&d.observers.push(u.observe(l.value,function(t){t||!1!==l.null||(t=s()),v.value=t,N(v,t,l.parseDate),v.last=t,O(v,i),(l.min&&t<l.min||l.max&&t>l.max)&&(v.last=null,setTimeout(b))},{defer:!0})),"string"==typeof l.display&&d.observers.push(u.observe(l.display,function(t){i.value=t||"",P(v,i,p),B(v),E(v,b,!0,s,f),O(v,i)},{defer:!0})),l.display||l.value||((l.date||!1===l.null)&&(v.value=K(l.date||s(),l.parseDate)),O(v,i));var w=function(t,e){void 0===e&&(e=i.selectionStart),t&&t.target&&(t=void 0),t||(t=e===i.value.length&&i.selectionEnd===i.value.length?v[0]:j(v,e)),g&&(g=!1,e<t.start&&(t=v[v.indexOf(t)-1])),document.activeElement===i&&i.setSelectionRange(t.start,t.end)};return d.listeners.push(u.listen("input",function(){var t=i.selectionStart,e=i.value;P(v,i,p);var n=j(v,t),r=B(v,n,t);if(E(v,b,!0,s,f),O(v,i),n&&(e.length>=p.length&&t===n.end||r)&&n!==v[v.length-1]){var a=v[v.indexOf(n)+1];w(a,t)}else i.setSelectionRange(t,t)})),d.listeners.push(u.listen("blur",function(){g=!1,b(!1)&&N(v,v.value,l.parseDate),null===v.value&&v.forEach(function(t){return t.value=null}),v.forEach(function(t){return t.display=z(t)}),O(v,i)})),d.listeners.push(u.listen("click",w)),d.listeners.push(u.listen("focus",w)),d.listeners.push(u.listen("keydown",function(t){switch(g=!1,t.key){case"Enter":case"Tab":var e=j(v,i.selectionStart),n=v.indexOf(e);B(v,e,i.selectionStart,!0)&&(O(v,i),E(v,b,t.shiftKey&&n>0||!t.shiftKey&&n+1<v.length,s,f)),t.shiftKey&&n>0?(w(v[n-1]),t.preventDefault(),t.stopPropagation()):!t.shiftKey&&n+1<v.length&&(w(v[n+1]),t.preventDefault(),t.stopPropagation());break;case"Backspace":g=!0;break;case"ArrowUp":case"ArrowDown":var r=[i.selectionStart,i.selectionEnd],a=r[0],o=r[1],l=j(v,a);null===l.value&&(l.value=1),function(t,e){switch(t.type){case"y":t.value=t.value+(e?-1:1);break;case"M":t.value=e?t.value<1?11:t.value-1:t.value>10?0:t.value+1;break;case"d":var n=t.groups,r=U(new Date((n.find(function(t){return"y"===t.type})||{value:1}).value,(n.find(function(t){return"M"===t.type})||{value:1}).value));t.value=e?t.value<2?r:t.value-1:t.value+1>r?1:t.value+1;break;case"H":t.value=e?t.value<1?23:t.value-1:t.value>22?0:t.value+1;break;case"h":t.value=e?t.value<1?12:t.value-1:t.value>11?1:t.value+1;break;case"m":case"s":t.value=e?t.value<1?59:t.value-1:t.value>58?0:t.value+1;break;case"S":t.value=e?t.value<1?999:t.value-1:t.value>998?0:t.value+1}}(l,"ArrowDown"===t.key),l.input=l.display=z(l),E(v,b,!0,s,f),O(v,i),t.preventDefault(),t.stopPropagation(),i.setSelectionRange(a,o)}})),{teardown:function(){d.observers.forEach(function(t){return t.cancel()}),d.listeners.forEach(function(t){return t.cancel()})}}}}}function P(t,e,n){var r=e.value,i=j(t,e.selectionStart),a=0,o=t[a],l=t[a+1];t.forEach(function(t){return t.input=""});for(var s=0;s<r.length;s++)l&&r[s]===l.prefix[0]&&(i!==o||o.input.length>=o.length||r.length-s<n.length-o.end+(o.length-o.input.length))?(l.prefix.length>1&&(s+=l.prefix.length-1),r[s+1]===l.prefix[0]&&(s+=l.prefix.length),o=t[++a],l=t[a+1]):o.input+=r[s]}function B(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=!1);for(var i=!1,a=0;a<t.length;a++){var o=t[a],l=(o.input||"").replace(D,""),s=t[a+1]&&t[a+1].prefix&&M.test(o.input);if(l.length>o.length&&o===e){var f=l.length-e.length;l=l.substr(0,n-e.start)+l.substr(n-e.start+f)}else l=l.substr(0,o.length);if(o.input=l,"y"===o.type&&0===l.length&&(s||r))o.value=(new Date).getFullYear(),o.input=o.display=S(o.value,o.length),i=!0;else if("m"===o.type&&0===l.length&&(s||r))o.value=0,o.input=o.display=S(o.value,o.length),i=!0;else if("d"===o.type&&l.length!==o.length&&r)o.value=+l,o.display=z(o);else if(""===l)o.value=null,o.display=z(o);else if(o!==e)o.value=+l,"M"===o.type&&o.value--,o.display=z(o);else if("M"===o.type&&+l>1||"d"===o.type&&+l>3||"H"===o.type&&+l>2||("m"===o.type||"s"===o.type)&&+l>6)o.value=+l,"M"===o.type&&o.value--,o.display=S(l,o.length),i=!0;else if("y"===o.type&&2===l.length&&(s||r)){var c=(new Date).getFullYear(),u=100*Math.floor(c/100),p=Math.abs(c-(u+ +l))<20?u+ +l:u-100+ +l;o.value=p,o.input=o.display=S(p,o.length),i=!0}else o.display=C(l,o.length,T),o.value=+l}return i}function N(t,e,n){var r=(e=t.value=e&&K(e,n))?[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]:[null,null,null,null,null,null,null];t.forEach(function(t){t.value=r[L[t.type]],t.input=t.display=z(t)})}function E(t,e,n,r,i){var a=t.value||r(),o=[a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()];if(!t.find(function(t){return"m"===t.type||"s"===t.type||"h"===t.type||"S"===t.type})){"function"==typeof i&&(i=i());for(var l=0;l<4;l++)o[l+3]=i[l]}if(t.forEach(function(t){var e=t.value;null!==e&&"M"===t.type?e<0?e=0:e>11&&(e=11):null===e||"m"!==t.type&&"s"!==t.type?null!==e&&"H"===t.type?e<0?e=0:e>23&&(e=23):null!==e&&"h"===t.type&&(e<1?e=1:e>12&&(e=12)):e<0?e=0:e>59&&(e=59),e!==t.value&&(t.value=e,t.display=z(t)),o[L[t.type]]=t.value}),null!==o[0]&&null!==o[1]&&null!==o[2]){var s=t.find(function(t){return"d"===t.type});if(s)if(o[2]<1)s.value=o[2]=1,s.display=z(s);else{var f=U(new Date(o[0],o[1],1));o[2]>f&&(s.value=o[2]=f,s.display=s.input=z(s))}}t.find(function(t){return null===t.value})||0===o[0]||o[1]>11||o[1]<0||0===o[2]?t.value=null:(o.unshift(null),t.value=new(Date.bind.apply(Date,o))),e(n)}function O(t,e){e.value=t.reduce(function(t,e){return t+e.prefix+e.display},"")+t.suffix}function j(t,e){return t.find(function(t){return e>=t.start&&e<=t.end})}function z(t){if(null===t.value)return S("",t.length,T);switch(t.type){case"y":return t.value?t.length<=2?(""+t.value).substr(2,2):""+S(t.value,t.length):S("",t.length,T);case"M":return~t.value?1===t.length?""+(t.value+1):2===t.length?(t.value<9?"0":"")+(t.value+1):3===t.length?H[t.value].substr(0,3):H[t.value]:S("",t.length,T);case"d":return t.value?1===t.length?""+t.value:2===t.length?(t.value<=9?"0":"")+t.value:3===t.length?I[t.groups.value.getDay()].substr(0,3):I[t.groups.value.getDay()]:S("",t.length,T);case"H":case"h":case"m":case"s":return 1===t.length?""+t.value:S(t.value,t.length);case"S":return 1===t.length?""+t.value:S(t.value,3)}}var A=/y+|M+|d+|E+|H+|m+|s+|S+|k+|a+/g,H=["January","February","March","April","May","June","July","August","September","October","November","December"],I=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],W={teardown:function(){}};function U(t){return new Date(new Date(t.getFullYear(),t.getMonth()+1,1)-864e5).getDate()}var J=new Date("0000-01-01T00:00:00");function K(t,e){var n=t;if("function"==typeof n&&(n=t()),"string"==typeof n)if("function"==typeof e)try{n=e(n)}catch(t){return defaultDate()}else try{n=new Date(n)}catch(t){return defaultDate()}return n instanceof Date?n:J}function q(t){t.strObserver&&t.strObserver.cancel(),t.attributes.value?t.link(t.attributes.value,"rdi.val"):t.unlink("rdi.val"),t.attributes.display?t.link(t.attributes.display,"rdi.display"):t.unlink("rdi.display"),t.attributes.string&&(t.strObserver=t.observe("rdi.val",function(e){return t.set(t.attributes.string,e?e.toString():"")}));var e={};["null","lazy","eager","mask","min","max","mask","no-pick","time"].forEach(function(n){n in t.attributes&&(e[n.replace(/-/g,"")]=t.attributes[n]),"eager"===n&&n in t.attributes&&(e.lazy=!t.attributes.eager)}),t.attributes.value&&(e.value="rdi.val"),t.attributes.display&&(e.display="rdi.display"),t.set("rdi.opts",e)}var X=Ractive.macro(function(t){return t.aliasLocal("rdi"),q(t),t.setTemplate({v:4,t:[{t:7,e:"span",m:[{t:13,n:"class",f:"rdi-date field-wrapper",g:1}],f:[{t:7,e:"input",m:[{n:"rdi-reg",t:71,f:{r:[],s:'["node"]'}},{n:"rdi-date",t:71,f:{r:["rdi.opts"],s:"[_0]"}},{n:"class-rdi-date",t:13},{t:8,r:"extra-attributes"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rdi-x",g:1},{n:["click"],t:70,f:{r:["@context"],s:'[(_0).set("rdi.val",null)]'}},{n:"title",f:"Clear",t:13,g:1}],f:["×"]}],n:50,x:{r:["rdi.opts.null","rdi.val"],s:"_0&&_1!==null"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rdi-pop",g:1},{n:"rdi-pop",t:71,f:{r:["rdi.node","rdi.tail"],s:'[{path:"rdi.popped",node:_0,tail:_1}]'}},{n:["click"],t:70,f:{r:[],s:"[false,false]"}},{n:"title",f:"Select from calendar",t:13,g:1}],f:[{t:7,e:"svg",m:[{n:"rdi-reg",t:71,f:{r:[],s:'["tail"]'}},{n:"x",f:"0px",t:13,g:1},{n:"y",f:"0px",t:13,g:1},{n:"viewBox",f:"0 0 48 48",t:13,g:1},{n:"xml:space",f:"preserve",t:13}],f:[{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.5;fill:none;stroke-width:1;",g:1},{n:"y",f:"1",t:13,g:1},{n:"x",f:"1",t:13,g:1},{n:"height",f:"46",t:13,g:1},{n:"width",f:"46",t:13,g:1}]}," ",{t:7,e:"rect",m:[{n:"y",f:"1",t:13,g:1},{n:"x",f:"1",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"46",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"13",t:13,g:1},{n:"x",f:"3",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.8;stroke:none;",g:1},{t:13,n:"class",f:"rdi-today",g:1},{n:"y",f:"13",t:13,g:1},{n:"x",f:"14",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"13",t:13,g:1},{n:"x",f:"25",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.4;stroke:none;",g:1},{n:"y",f:"13",t:13,g:1},{n:"x",f:"37",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"24",t:13,g:1},{n:"x",f:"3",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"24",t:13,g:1},{n:"x",f:"14",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"24",t:13,g:1},{n:"x",f:"25",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.4;stroke:none;",g:1},{n:"y",f:"24",t:13,g:1},{n:"x",f:"37",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"35",t:13,g:1},{n:"x",f:"3",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"35",t:13,g:1},{n:"x",f:"14",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.2;stroke:none;",g:1},{n:"y",f:"35",t:13,g:1},{n:"x",f:"25",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}," ",{t:7,e:"rect",m:[{t:13,n:"style",f:"opacity:0.4;stroke:none;",g:1},{n:"y",f:"35",t:13,g:1},{n:"x",f:"37",t:13,g:1},{n:"height",f:"8",t:13,g:1},{n:"width",f:"8",t:13,g:1}]}]}]}],n:51,r:"rdi.opts.nopick"}]}," ",{t:7,e:"rdi-pop",m:[{n:"popped",t:13,f:[{t:2,r:"rdi.popped"}]},{n:"tail",f:0,t:13},{n:"align",f:"end",t:13,g:1}],f:[{t:7,e:"rdi-picker",m:[{n:["init"],t:70,f:{r:["@context","rdi.val"],s:'[(_0).component.set("target",_1)]'}},{n:"date",t:13,f:[{t:2,r:"rdi.val"}]}]}]}],e:{'["node"]':function(){return["node"]},"[_0]":function(t){return[t]},'[(_0).set("rdi.val",null)]':function(t){return[t.set("rdi.val",null)]},"_0&&_1!==null":function(t,e){return t&&null!==e},'[{path:"rdi.popped",node:_0,tail:_1}]':function(t,e){return[{path:"rdi.popped",node:t,tail:e}]},"[false,false]":function(){return[!1,!1]},'["tail"]':function(){return["tail"]},'[(_0).component.set("target",_1)]':function(t,e){return[t.component.set("target",e)]}}}),{update:function(){q(t)}}},{css:function(t){return[function(t){return".rdi-date {\n position: relative;\n display: inline-block;\n }\n \n .rdi-date input.rdi-date {\n width: 100%;\n box-sizing: border-box;\n }\n \n .rdi-x {\n position: absolute;\n right: 2em;\n top: 0.025em;\n cursor: pointer;\n }\n \n .rdi-pop {\n position: absolute;\n display: flex;\n justify-content: space-around;\n align-items: flex-end;\n flex-direction: column;\n right: 0.5em;\n height: 100%;\n top: 0;\n cursor: pointer;\n }\n \n .rdi-pop > svg {\n height: 48px;\n max-height: 60%;\n fill: "+(t("raui.dateInput.primary.fg")||t("raui.primary.fg")||"#222")+";\n }\n \n .rdi-today {\n fill: "+(t("raui.dateInput.primary.fga")||t("raui.primary.fga")||"#07e")+";\n }"}.call(this,t)].join(" ")},cssId:"rdi",noCssTransform:!0,attributes:["value","null","lazy","eager","mask","string","display","min","max","no-pick","time"]});t.DateInput=X,t.default=function(t){return void 0===t&&(t={}),function(e){var n,r=e.instance;r.components["rdi-picker"]=l,r.components["rdi-pop"]=_,(void 0===(n={name:"rdi-pop"})&&(n={}),function(t){t.instance.decorators[n.name||"pop"]=function(t,e,r){if(void 0===r&&(r={}),!e)return{teardown:w};"string"==typeof e?r.path=e:"object"==typeof e&&(r=e);var i,a,o=this.getContext(t);function l(n){if("mouseover"!==n.type||!o.get(e)){if("click"!==n.type||!a||i){var l=h,s=v;"function"==typeof(h=r.node||t)&&(h=h()),h=h||t,"function"==typeof(v=r.tail)&&(v=v()),o.toggle(r.path),h=l,v=s}a&&"click"===n.type&&(i=o.observeOnce(r.path,function(){i=null}))}}function s(t){i||o.set(r.path,!1)}return("click"in r?r.click:!1!==n.click)&&o.listen("click",l),("hover"in r?r.hover:n.hover)&&(a=1,o.listen("mouseover",l),o.listen("mouseout",s)),{teardown:function(){o.unlisten("click",l),a&&(o.unlisten("mouseover",l),o.unlisten("mouseout",s),i&&i.cancel())}}}})({instance:r}),R({name:"rdi-date",parseDate:t.parseDate})({instance:r}),r.partials[t.name||"date-input"]=X,r.decorators["rdi-reg"]=function(t,e){return this.getContext(t).set("rdi."+e,function(){return t}),{teardown:function(){}}}}},Object.defineProperty(t,"__esModule",{value:!0})});

@@ -326,3 +326,3 @@ (function (global, factory) {

if (mobilePopped) { return mobilePop.find(pattern); }
else { return this.find(pattenr); }
else { return this.find(pattern); }
};

@@ -332,3 +332,3 @@

if (mobilePopped) { return mobilePop.findAll(pattern); }
else { return this.findAll(pattenr); }
else { return this.findAll(pattern); }
};

@@ -335,0 +335,0 @@

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

!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],o):o(t.RauiPopover={},t.Ractive)}(this,function(t,o){"use strict";o=o&&o.hasOwnProperty("default")?o.default:o;var e="undefined"!=typeof window?window:null;function n(t,o,n){if(e&&e.Ractive&&"object"==typeof e.Ractive[o]){var i=document.currentScript;if(i||(i=(i=document.querySelectorAll("script"))[i.length-1]),i){var r=i.getAttribute("data-alias");r&&(r=(r=r.split("&")).reduce(function(t,o){var e=o.split("="),n=e[0],i=e[1];return t[n]=i,t},{})),Ractive[o][r&&r[t]||t]=n}}}function i(t,o){void 0===o&&(o={});var e=t.processParams(o,{duration:400,easing:"easeInOut"});o.dir=o.dir||!1;var n=o.distance||"20px",i=o.scale||"0.9",r="above"===o.dir?"translateY("+n+")":"left"===o.dir?"translateX("+n+")":"right"===o.dir?"translateX(-"+n+")":"translateY(-"+n+")";return t.isIntro||e.intro?(t.setStyle("opacity",0),t.setStyle("transform","scale("+i+") "+r),t.animateStyle({opacity:1,transform:"none"},e)):(t.setStyle("opacity",1),t.setStyle("transform","none"),t.animateStyle({opacity:0,transform:"scale("+i+") "+r},e))}function r(t){return void 0===t&&(t={}),function(o){o.instance.transitions[t.name||"pop"]=i}}function p(t,o){var e=!1,n=!1;function i(e){for(var n=e.target;n;){if(n===t)return;if(!n.parentNode&&n!==document)return;n=n.parentNode}o(e)}return setTimeout(function(){e=!0,n||(document.body.addEventListener("click",i,{capture:!0}),document.body.addEventListener("touchstop",i,{capture:!0}))}),{teardown:function(){n=!0,e&&(document.body.removeEventListener("click",i,{capture:!0}),document.body.removeEventListener("touchstop",i,{capture:!0}))}}}function l(t,o){var e=t.processParams(o,{duration:200,easing:"easeInOut"});return t.isIntro||e.intro?(t.setStyle("opacity",0),t.animateStyle("opacity",1,e)):(t.setStyle("opacity",1),t.animateStyle("opacity",0,e))}function a(t){return void 0===t&&(t={}),function(o){o.instance.transitions[t.name||"fade"]=l}}n("pop","transitions",i),n("fade","transitions",l);var s,f,c,u,d={v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-wrapper",g:1},{n:"class-rpop-with-tail",t:13,f:[{t:2,r:"position.tail"}]},{n:"class",f:["rpop-",{t:2,x:{r:["where"],s:'_0||"below"'}}," rpop-align-",{t:2,x:{r:["align"],s:'_0||"middle"'}}],t:13},{t:4,f:[{n:"style-top",f:[{t:2,r:"position.popTop"},"px"],t:13},{n:"style-left",f:[{t:2,r:"position.popLeft"},"px"],t:13}],n:50,r:"position"},{t:4,f:[{t:4,f:[{n:"style-top",f:[{t:2,r:"top"}],t:13}],n:50,r:"top"},{t:4,f:[{n:"style-left",f:[{t:2,r:"left"}],t:13}],n:50,r:"left"}],n:51,l:1},{n:"pop",t:72,f:{r:["where"],s:'[{dir:_0||"below"}]'},v:"t2"},{n:"cleanup",t:71},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:50,r:"clickClose"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:51,r:"noClickout"},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail-outer",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}],n:50,r:"~/tail"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1}],f:[{t:16,r:"content",z:[{n:"trigger",x:{r:"triggerContext"}}]}]}]}],n:50,r:"__popped"}],e:{'_0||"below"':function(t){return t||"below"},'_0||"middle"':function(t){return t||"middle"},'[{dir:_0||"below"}]':function(t){return[{dir:t||"below"}]},'[_0.set("popped",false)]':function(t){return[t.set("popped",!1)]},"_0+(_1?3:0)":function(t,o){return t+(o?3:0)},"_0!=null":function(t){return null!=t},"_0+(_1?0:3)":function(t,o){return t+(o?0:3)},"_0-2":function(t){return t-2},"[{delay:200}]":function(){return[{delay:200}]},"[_0===_1&&_2.done(),true]":function(t,o,e){return[t===o&&e.done(),!0]},"[_0.done()]":function(t){return[t.done()]},true:function(){return!0}},p:{modal:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-modal",g:1},{n:"fade",t:72,v:"t1"},{n:"fade",t:72,f:{r:[],s:"[{delay:200}]"},v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["@node","@event.target","."],s:"[_0===_1&&_2.done(),true]"}}],n:51,r:".noClickout"}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1},{n:"pop",t:72,f:{r:[],s:"[{delay:200}]"},v:"t1"},{n:"pop",t:72,v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.done()]"}}],n:50,r:".clickClose"},{t:8,r:".attrs",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}],f:[{t:8,r:".content",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}]}]}],n:54,r:"contents.0"}],n:50,r:"contents.length"}]}};function h(){}var g,v=function(t){function o(o){t.call(this,o)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.position=function(o){var e=o||this.source,n=this.get("popped");if(e&&n){var i=this.find("div");if(e&&i&&i.offsetParent){e?this.set("triggerContext",t.getContext(e)):this.set("triggerContext",null);var r=i.offsetParent,p=r.getBoundingClientRect(),l=i.getBoundingClientRect(),a=e.getBoundingClientRect(),s=this.get("where")||"below",f=this.get("align")||"middle",c=this.get("tail"),u="above"===s||"below"===s,d=this.get("fit"),h=this.get("gap"),g="above"===s||"below"===s?0:"left"===s?-l.width-h:a.width+h,v="left"===s||"right"===s?-a.height:"above"===s?-a.height-l.height-h:h;"middle"===f?"below"===s||"above"===s?g-=(l.width-a.width)/2:"left"!==s&&"right"!==s||(v-=(l.height-a.height)/2):"end"===f&&("below"===s||"above"===s?g+=a.width-l.width:"left"!==s&&"right"!==s||(v+=a.height-l.height));var b={popTop:a.bottom-p.top+v,popLeft:a.left-p.left+g,tail:c,vert:"above"===s||"below"===s};if(r.scrollTop&&(b.popTop+=r.scrollTop),r.scrollLeft&&(b.popLeft+=r.scrollLeft),c){"above"===s?b.tailBottom=-10:"below"===s?b.tailTop=-10:"left"===s?b.tailRight=-10:"right"===s&&(b.tailLeft=-10);var m=this.tailSource?this.tailSource.getBoundingClientRect():a;"start"===f?u?b.tailLeft=Math.floor(m.width/2)-10:b.tailTop=Math.floor(m.height/2)-10:"end"===f?u?b.tailRight=Math.floor(m.width/2)-10:b.tailBottom=Math.floor(m.height/2)-10:"middle"===f&&(u?b.tailLeft=Math.floor(m.width/2)-10:b.tailTop=Math.floor(m.height/2)-10),m!==a?u?(null!=b.tailLeft&&(b.tailLeft+=m.left-a.left),null!=b.tailRight&&(b.tailRight+=a.right-m.right)):(null!=b.tailTop&&(b.tailTop+=m.top-a.top),null!=b.tailBottom&&(b.tailBottom+=a.bottom-m.bottom)):"middle"===f&&(u?(null!=b.tailLeft&&(b.tailLeft+=m.left-(b.popLeft+p.left)),null!=b.tailRight&&(b.tailRight+=b.popLeft+p.left+l.width-m.right)):(null!=b.tailTop&&(b.tailTop+=m.top-(b.popTop+p.top)),null!=b.tailBottom&&(b.tailBottom+=b.popTop+p.top+l.height-m.bottom)))}if(d){var y=r;if(this.get("offsets"))for(var w=this.get("offsets");w--;)y=y.offsetParent;var _=r.scrollWidth,x=r.scrollHeight;if(b.popLeft+l.width>_){var L=b.popLeft-(_-l.width);b.popLeft-=L,u&&b.tailLeft&&(b.tailLeft+=L),u&&b.tailRight&&(b.tailRight-=L),c&&!u&&(b.tail=!1)}if(b.popLeft<0){var T=-1*b.popLeft;b.popLeft+=T,u&&b.tailLeft&&(b.tailLeft-=T),u&&b.tailRight&&(b.tailRight+=T),c&&!u&&(b.tail=!1)}if(b.popTop+l.height>x){var k=b.popTop-(x-l.height);b.popTop-=k,!u&&b.tailTop&&(b.tailTop+=k),!u&&b.tailBottom&&(b.tailBottom-=k),c&&u&&(b.tail=!1)}if(b.popTop<0){var R=-1*b.popTop;b.popTop+=R,!u&&b.tailTop&&(b.tailTop-=R),!u&&b.tailBottom&&(b.tailBottom+=R),c&&u&&(b.tail=!1)}}if(p.left+b.popLeft<0){var B=0-(p.left+b.popLeft);b.popLeft+=B,u&&b.tailLeft&&(b.tailLeft-=B),u&&b.tailRight&&(b.tailRight+=B),c&&!u&&(b.tail=!1)}if(p.top+b.popTop<0){var C=0-(p.top+b.popTop);b.popTop+=C,!u&&b.tailTop&&(b.tailTop-=C),!u&&b.tailBottom&&(b.tailBottom+=C),c&&u&&(b.tail=!1)}b.tailLeft&&(b.tailLeft=Math.floor(b.tailLeft)),b.tailRight&&(b.tailRight=Math.floor(b.tailRight)),b.tailTop&&(b.tailTop=Math.floor(b.tailTop)),b.tailBottom&&(b.tailBottom=Math.floor(b.tailBottom)),this.set("position",b)}else this.set("position",null)}},o.prototype.show=function(t){return this.source=t,this.set("popped",!0),this._transdone},o.prototype.hide=function(){return this.set("popped",!1),this._transdone},o.prototype.popFind=function(t){return c?u.find(t):this.find(pattenr)},o.prototype.popFindAll=function(t){return c?u.findAll(t):this.findAll(pattenr)},o}(o);function b(t){return void 0===t&&(t={}),function(o){o.instance.decorators[t.name||"pop"]=function(o,e,n){if(void 0===n&&(n={}),!e)return{teardown:h};"string"==typeof e?n.path=e:"object"==typeof e&&(n=e);var i,r,p=this.getContext(o);function l(t){if("mouseover"!==t.type||!p.get(e)){if("click"!==t.type||!r||i){var l=s,a=f;"function"==typeof(s=n.node||o)&&(s=s()),s=s||o,"function"==typeof(f=n.tail)&&(f=f()),p.toggle(n.path),s=l,f=a}r&&"click"===t.type&&(i=p.observeOnce(n.path,function(){i=null}))}}function a(t){i||p.set(n.path,!1)}return("click"in n?n.click:!1!==t.click)&&p.listen("click",l),("hover"in n?n.hover:t.hover)&&(r=1,p.listen("mouseover",l),p.listen("mouseout",a)),{teardown:function(){p.unlisten("click",l),r&&(p.unlisten("mouseover",l),p.unlisten("mouseout",a),i&&i.cancel())}}}}}o.extendWith(v,{attributes:["popped","tail","where","align","top","left","fit","clickClose","noClickout","gap","offsets"],use:[r(),(void 0===g&&(g={}),function(t){t.instance.events[g.name||"clickout"]=p}),a()],template:d,css:function(t){return[function(t){var o=Object.assign({},t("raui.primary"),t("raui.pop.primary")),e=(t("raui.themes")||[]).slice();return(t("raui.pop.themes")||[]).forEach(function(t){~e.indexOf(t)||e.push(t)}),"\n .rpop-wrapper {\n position: absolute;\n display: inline-block;\n z-index: 21;\n transition-property: top, left, padding;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-with-tail.rpop-above {\n padding-bottom: 10px;\n }\n .rpop-with-tail.rpop-below {\n padding-top: 10px;\n }\n .rpop-with-tail.rpop-left {\n padding-right: 10px;\n }\n .rpop-with-tail.rpop-right {\n padding-left: 10px;\n }\n \n .rpop {\n position: relative;\n box-shadow: 0 1px 4px 0 rgba(0,0,0,0.24);\n border: 1px solid #ccc;\n border-radius: 0.2em;\n background-color: "+(o.bg||"#fff")+";\n color: "+(o.fg||"#222")+";\n padding: 0.5em;\n z-index: 2;\n }\n \n .rpop-modal {\n position: fixed;\n display: flex;\n z-index: 20;\n background-color: rgba(0, 0, 0, 0.2);\n align-items: center;\n justify-content: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 1em;\n overflow: auto;\n }\n \n .rpop-tail, .rpop-tail-outer {\n z-index: 3;\n width: 0;\n height: 0;\n position: absolute;\n border-style: solid;\n border-width: 10px;\n border-color: transparent;\n transition-property: top, left, bottom, right, border-color;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-tail-outer {\n z-index: 1;\n border-width: 12px;\n border-color: transparent;\n }\n \n .rpop-below .rpop-tail {\n border-bottom-color: "+(o.bg||"#fff")+";\n }\n .rpop-below .rpop-tail-outer {\n border-bottom-color: "+(o.bc||"#ccc")+";\n }\n \n .rpop-above .rpop-tail {\n border-top-color: "+(o.bg||"#fff")+";\n }\n .rpop-above .rpop-tail-outer {\n border-top-color: "+(o.bc||"#ccc")+";\n }\n \n .rpop-left .rpop-tail {\n border-left-color: "+(o.bg||"#fff")+";\n }\n .rpop-left .rpop-tail-outer {\n border-left-color: "+(o.bc||"#ccc")+";\n }\n \n .rpop-right .rpop-tail {\n border-right-color: "+(o.bg||"#fff")+";\n }\n .rpop-right .rpop-tail-outer {\n border-right-color: "+(o.bc||"#ccc")+";\n }\n "+e.map(function(o){var e=Object.assign({},t("raui.primary"),t("raui.pop.primary"),t("raui."+o),t("raui.pop."+o));return"\n ."+o+" .rpop {\n background-color: "+(e.bg||"#fff")+";\n color: "+(e.fg||"#222")+";\n }\n \n ."+o+".rpop-below .rpop-tail {\n border-bottom-color: "+(e.bg||"#fff")+";\n }\n ."+o+".rpop-below .rpop-tail-outer {\n border-bottom-color: "+(e.bc||"#ccc")+";\n }\n \n ."+o+".rpop-above .rpop-tail {\n border-top-color: "+(e.bg||"#fff")+";\n }\n ."+o+".rpop-above .rpop-tail-outer {\n border-top-color: "+(e.bc||"#ccc")+";\n }\n \n ."+o+".rpop-left .rpop-tail {\n border-left-color: "+(e.bg||"#fff")+";\n }\n ."+o+".rpop-left .rpop-tail-outer {\n border-left-color: "+(e.bc||"#ccc")+";\n }\n \n ."+o+".rpop-right .rpop-tail {\n border-right-color: "+(e.bg||"#fff")+";\n }\n ."+o+".rpop-right .rpop-tail-outer {\n border-right-color: "+(e.bc||"#ccc")+";\n }\n "})}.call(this,t)].join(" ")},cssId:"rpop",noCssTransform:!0,observe:{popped:function(t){var o,e=this;t&&(s&&(this.source=s),f&&(this.tailSource=f));var n=this._transdone=new Promise(function(t){return o=t});n.resolve=o,setTimeout(function(){e._transdone=n,e.get("popped")===t&&e.set("_popped",t)},1)},_popped:{handler:function(t){var o=this,e=this._transdone.resolve;if(t){var n=this.get("@style.raui.pop.mobile");if(n&&window.matchMedia("(max-width: "+n+")").matches){u||(u=new m({target:document.body,append:!0}));var i=this.getContext().getParent(!0);i.isContext=1,this.set("__popped",!1).then(e),u.unshift("contents",{content:this.partials.content,context:i,attrs:this.partials["extra-attributes"]||[],clickClose:this.get("clickClose"),noClickout:this.get("noClickout"),done:function(){o.set("popped",!1)}})}else this.set("__popped",!0)}else c?(u.shift("contents"),e()):this.set("__popped",!1).then(e)},defer:!0,init:!1},__popped:{handler:function(t){var o=this._transdone.resolve;if(t){var e=this.find("div"),n=e,i=n.offsetHeight+n.offsetTop,r=n.offsetWidth+n.offsetLeft,p=n.offsetParent;if(!this.overflows)for(var l=this.overflows={e:[],v:[]};e&&e.style;){if(e===p){if(e.offsetWidth>=r&&e.offsetHeight>=i)break;r+=e.offsetLeft,i+=e.offsetTop,p=e.offsetParent}var a=getComputedStyle(e);if("auto"===a.overflow)break;"hidden"===a.overflow&&(l.e.push(e),l.v.push(e.style.overflow),e.style.overflow="visible"),e=e.parentNode}this.position(),this.transition("pop",n,{intro:!0,dir:this.get("where")||"below"}).then(o)}else this.source=null,this.tailSource=null},defer:!0,init:!1},"align where tail fit":{handler:function(){this.position()},defer:!0}},decorators:{cleanup:function(t){var o=this;return{teardown:function(){var t=o.overflows;if(t){o.overflows=null;for(var e=0;e<t.e.length;e++)t.e[e].style.overflow=t.v[e]}}}}},data:function(){return{gap:4}}});var m=function(t){function o(o){t.call(this,o)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o}(o);o.extendWith(m,{template:{v:d.v,t:d.p.modal},data:function(){return{contents:[]}},use:[r(),a()],observe:{contents:function(t){c=(t||[]).length>0}},on:{init:function(){u?console.warn("More than one PopOver mobile host created."):u=this}}}),t.Popover=v,t.trigger=b,t.default=function(t){return void 0===t&&(t={}),function(o){var e=o.instance;e.components[t.name||"pop"]=v,e.components[t.mobileName||"mobile-pop"]=m;var n=Object.assign({},t);n.name=n.trigger||n.name,b(n)({instance:e})}},Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],o):o(t.RauiPopover={},t.Ractive)}(this,function(t,o){"use strict";o=o&&o.hasOwnProperty("default")?o.default:o;var e="undefined"!=typeof window?window:null;function n(t,o,n){if(e&&e.Ractive&&"object"==typeof e.Ractive[o]){var i=document.currentScript;if(i||(i=(i=document.querySelectorAll("script"))[i.length-1]),i){var r=i.getAttribute("data-alias");r&&(r=(r=r.split("&")).reduce(function(t,o){var e=o.split("="),n=e[0],i=e[1];return t[n]=i,t},{})),Ractive[o][r&&r[t]||t]=n}}}function i(t,o){void 0===o&&(o={});var e=t.processParams(o,{duration:400,easing:"easeInOut"});o.dir=o.dir||!1;var n=o.distance||"20px",i=o.scale||"0.9",r="above"===o.dir?"translateY("+n+")":"left"===o.dir?"translateX("+n+")":"right"===o.dir?"translateX(-"+n+")":"translateY(-"+n+")";return t.isIntro||e.intro?(t.setStyle("opacity",0),t.setStyle("transform","scale("+i+") "+r),t.animateStyle({opacity:1,transform:"none"},e)):(t.setStyle("opacity",1),t.setStyle("transform","none"),t.animateStyle({opacity:0,transform:"scale("+i+") "+r},e))}function r(t){return void 0===t&&(t={}),function(o){o.instance.transitions[t.name||"pop"]=i}}function p(t,o){var e=!1,n=!1;function i(e){for(var n=e.target;n;){if(n===t)return;if(!n.parentNode&&n!==document)return;n=n.parentNode}o(e)}return setTimeout(function(){e=!0,n||(document.body.addEventListener("click",i,{capture:!0}),document.body.addEventListener("touchstop",i,{capture:!0}))}),{teardown:function(){n=!0,e&&(document.body.removeEventListener("click",i,{capture:!0}),document.body.removeEventListener("touchstop",i,{capture:!0}))}}}function l(t,o){var e=t.processParams(o,{duration:200,easing:"easeInOut"});return t.isIntro||e.intro?(t.setStyle("opacity",0),t.animateStyle("opacity",1,e)):(t.setStyle("opacity",1),t.animateStyle("opacity",0,e))}function a(t){return void 0===t&&(t={}),function(o){o.instance.transitions[t.name||"fade"]=l}}n("pop","transitions",i),n("fade","transitions",l);var s,f,c,u,d={v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-wrapper",g:1},{n:"class-rpop-with-tail",t:13,f:[{t:2,r:"position.tail"}]},{n:"class",f:["rpop-",{t:2,x:{r:["where"],s:'_0||"below"'}}," rpop-align-",{t:2,x:{r:["align"],s:'_0||"middle"'}}],t:13},{t:4,f:[{n:"style-top",f:[{t:2,r:"position.popTop"},"px"],t:13},{n:"style-left",f:[{t:2,r:"position.popLeft"},"px"],t:13}],n:50,r:"position"},{t:4,f:[{t:4,f:[{n:"style-top",f:[{t:2,r:"top"}],t:13}],n:50,r:"top"},{t:4,f:[{n:"style-left",f:[{t:2,r:"left"}],t:13}],n:50,r:"left"}],n:51,l:1},{n:"pop",t:72,f:{r:["where"],s:'[{dir:_0||"below"}]'},v:"t2"},{n:"cleanup",t:71},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:50,r:"clickClose"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:51,r:"noClickout"},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom","position.vert"],s:"_0+(_1?3:0)"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight","position.vert"],s:"_0+(_1?0:3)"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail-outer",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailTop"],s:"_0!=null"}},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailBottom"],s:"_0!=null"}},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailLeft"],s:"_0!=null"}},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight"],s:"_0-2"}},"px"],t:13}],n:50,x:{r:["position.tailRight"],s:"_0!=null"}}]}],n:50,r:"~/tail"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1}],f:[{t:16,r:"content",z:[{n:"trigger",x:{r:"triggerContext"}}]}]}]}],n:50,r:"__popped"}],e:{'_0||"below"':function(t){return t||"below"},'_0||"middle"':function(t){return t||"middle"},'[{dir:_0||"below"}]':function(t){return[{dir:t||"below"}]},'[_0.set("popped",false)]':function(t){return[t.set("popped",!1)]},"_0+(_1?3:0)":function(t,o){return t+(o?3:0)},"_0!=null":function(t){return null!=t},"_0+(_1?0:3)":function(t,o){return t+(o?0:3)},"_0-2":function(t){return t-2},"[{delay:200}]":function(){return[{delay:200}]},"[_0===_1&&_2.done(),true]":function(t,o,e){return[t===o&&e.done(),!0]},"[_0.done()]":function(t){return[t.done()]},true:function(){return!0}},p:{modal:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-modal",g:1},{n:"fade",t:72,v:"t1"},{n:"fade",t:72,f:{r:[],s:"[{delay:200}]"},v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["@node","@event.target","."],s:"[_0===_1&&_2.done(),true]"}}],n:51,r:".noClickout"}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1},{n:"pop",t:72,f:{r:[],s:"[{delay:200}]"},v:"t1"},{n:"pop",t:72,v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.done()]"}}],n:50,r:".clickClose"},{t:8,r:".attrs",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}],f:[{t:8,r:".content",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}]}]}],n:54,r:"contents.0"}],n:50,r:"contents.length"}]}};function h(){}var g,v=function(t){function o(o){t.call(this,o)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.position=function(o){var e=o||this.source,n=this.get("popped");if(e&&n){var i=this.find("div");if(e&&i&&i.offsetParent){e?this.set("triggerContext",t.getContext(e)):this.set("triggerContext",null);var r=i.offsetParent,p=r.getBoundingClientRect(),l=i.getBoundingClientRect(),a=e.getBoundingClientRect(),s=this.get("where")||"below",f=this.get("align")||"middle",c=this.get("tail"),u="above"===s||"below"===s,d=this.get("fit"),h=this.get("gap"),g="above"===s||"below"===s?0:"left"===s?-l.width-h:a.width+h,v="left"===s||"right"===s?-a.height:"above"===s?-a.height-l.height-h:h;"middle"===f?"below"===s||"above"===s?g-=(l.width-a.width)/2:"left"!==s&&"right"!==s||(v-=(l.height-a.height)/2):"end"===f&&("below"===s||"above"===s?g+=a.width-l.width:"left"!==s&&"right"!==s||(v+=a.height-l.height));var b={popTop:a.bottom-p.top+v,popLeft:a.left-p.left+g,tail:c,vert:"above"===s||"below"===s};if(r.scrollTop&&(b.popTop+=r.scrollTop),r.scrollLeft&&(b.popLeft+=r.scrollLeft),c){"above"===s?b.tailBottom=-10:"below"===s?b.tailTop=-10:"left"===s?b.tailRight=-10:"right"===s&&(b.tailLeft=-10);var m=this.tailSource?this.tailSource.getBoundingClientRect():a;"start"===f?u?b.tailLeft=Math.floor(m.width/2)-10:b.tailTop=Math.floor(m.height/2)-10:"end"===f?u?b.tailRight=Math.floor(m.width/2)-10:b.tailBottom=Math.floor(m.height/2)-10:"middle"===f&&(u?b.tailLeft=Math.floor(m.width/2)-10:b.tailTop=Math.floor(m.height/2)-10),m!==a?u?(null!=b.tailLeft&&(b.tailLeft+=m.left-a.left),null!=b.tailRight&&(b.tailRight+=a.right-m.right)):(null!=b.tailTop&&(b.tailTop+=m.top-a.top),null!=b.tailBottom&&(b.tailBottom+=a.bottom-m.bottom)):"middle"===f&&(u?(null!=b.tailLeft&&(b.tailLeft+=m.left-(b.popLeft+p.left)),null!=b.tailRight&&(b.tailRight+=b.popLeft+p.left+l.width-m.right)):(null!=b.tailTop&&(b.tailTop+=m.top-(b.popTop+p.top)),null!=b.tailBottom&&(b.tailBottom+=b.popTop+p.top+l.height-m.bottom)))}if(d){var y=r;if(this.get("offsets"))for(var w=this.get("offsets");w--;)y=y.offsetParent;var _=r.scrollWidth,x=r.scrollHeight;if(b.popLeft+l.width>_){var L=b.popLeft-(_-l.width);b.popLeft-=L,u&&b.tailLeft&&(b.tailLeft+=L),u&&b.tailRight&&(b.tailRight-=L),c&&!u&&(b.tail=!1)}if(b.popLeft<0){var T=-1*b.popLeft;b.popLeft+=T,u&&b.tailLeft&&(b.tailLeft-=T),u&&b.tailRight&&(b.tailRight+=T),c&&!u&&(b.tail=!1)}if(b.popTop+l.height>x){var k=b.popTop-(x-l.height);b.popTop-=k,!u&&b.tailTop&&(b.tailTop+=k),!u&&b.tailBottom&&(b.tailBottom-=k),c&&u&&(b.tail=!1)}if(b.popTop<0){var R=-1*b.popTop;b.popTop+=R,!u&&b.tailTop&&(b.tailTop-=R),!u&&b.tailBottom&&(b.tailBottom+=R),c&&u&&(b.tail=!1)}}if(p.left+b.popLeft<0){var B=0-(p.left+b.popLeft);b.popLeft+=B,u&&b.tailLeft&&(b.tailLeft-=B),u&&b.tailRight&&(b.tailRight+=B),c&&!u&&(b.tail=!1)}if(p.top+b.popTop<0){var C=0-(p.top+b.popTop);b.popTop+=C,!u&&b.tailTop&&(b.tailTop-=C),!u&&b.tailBottom&&(b.tailBottom+=C),c&&u&&(b.tail=!1)}b.tailLeft&&(b.tailLeft=Math.floor(b.tailLeft)),b.tailRight&&(b.tailRight=Math.floor(b.tailRight)),b.tailTop&&(b.tailTop=Math.floor(b.tailTop)),b.tailBottom&&(b.tailBottom=Math.floor(b.tailBottom)),this.set("position",b)}else this.set("position",null)}},o.prototype.show=function(t){return this.source=t,this.set("popped",!0),this._transdone},o.prototype.hide=function(){return this.set("popped",!1),this._transdone},o.prototype.popFind=function(t){return c?u.find(t):this.find(t)},o.prototype.popFindAll=function(t){return c?u.findAll(t):this.findAll(t)},o}(o);function b(t){return void 0===t&&(t={}),function(o){o.instance.decorators[t.name||"pop"]=function(o,e,n){if(void 0===n&&(n={}),!e)return{teardown:h};"string"==typeof e?n.path=e:"object"==typeof e&&(n=e);var i,r,p=this.getContext(o);function l(t){if("mouseover"!==t.type||!p.get(e)){if("click"!==t.type||!r||i){var l=s,a=f;"function"==typeof(s=n.node||o)&&(s=s()),s=s||o,"function"==typeof(f=n.tail)&&(f=f()),p.toggle(n.path),s=l,f=a}r&&"click"===t.type&&(i=p.observeOnce(n.path,function(){i=null}))}}function a(t){i||p.set(n.path,!1)}return("click"in n?n.click:!1!==t.click)&&p.listen("click",l),("hover"in n?n.hover:t.hover)&&(r=1,p.listen("mouseover",l),p.listen("mouseout",a)),{teardown:function(){p.unlisten("click",l),r&&(p.unlisten("mouseover",l),p.unlisten("mouseout",a),i&&i.cancel())}}}}}o.extendWith(v,{attributes:["popped","tail","where","align","top","left","fit","clickClose","noClickout","gap","offsets"],use:[r(),(void 0===g&&(g={}),function(t){t.instance.events[g.name||"clickout"]=p}),a()],template:d,css:function(t){return[function(t){var o=Object.assign({},t("raui.primary"),t("raui.pop.primary")),e=(t("raui.themes")||[]).slice();return(t("raui.pop.themes")||[]).forEach(function(t){~e.indexOf(t)||e.push(t)}),"\n .rpop-wrapper {\n position: absolute;\n display: inline-block;\n z-index: 21;\n transition-property: top, left, padding;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-with-tail.rpop-above {\n padding-bottom: 10px;\n }\n .rpop-with-tail.rpop-below {\n padding-top: 10px;\n }\n .rpop-with-tail.rpop-left {\n padding-right: 10px;\n }\n .rpop-with-tail.rpop-right {\n padding-left: 10px;\n }\n \n .rpop {\n position: relative;\n box-shadow: 0 1px 4px 0 rgba(0,0,0,0.24);\n border: 1px solid #ccc;\n border-radius: 0.2em;\n background-color: "+(o.bg||"#fff")+";\n color: "+(o.fg||"#222")+";\n padding: 0.5em;\n z-index: 2;\n }\n \n .rpop-modal {\n position: fixed;\n display: flex;\n z-index: 20;\n background-color: rgba(0, 0, 0, 0.2);\n align-items: center;\n justify-content: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 1em;\n overflow: auto;\n }\n \n .rpop-tail, .rpop-tail-outer {\n z-index: 3;\n width: 0;\n height: 0;\n position: absolute;\n border-style: solid;\n border-width: 10px;\n border-color: transparent;\n transition-property: top, left, bottom, right, border-color;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-tail-outer {\n z-index: 1;\n border-width: 12px;\n border-color: transparent;\n }\n \n .rpop-below .rpop-tail {\n border-bottom-color: "+(o.bg||"#fff")+";\n }\n .rpop-below .rpop-tail-outer {\n border-bottom-color: "+(o.bc||"#ccc")+";\n }\n \n .rpop-above .rpop-tail {\n border-top-color: "+(o.bg||"#fff")+";\n }\n .rpop-above .rpop-tail-outer {\n border-top-color: "+(o.bc||"#ccc")+";\n }\n \n .rpop-left .rpop-tail {\n border-left-color: "+(o.bg||"#fff")+";\n }\n .rpop-left .rpop-tail-outer {\n border-left-color: "+(o.bc||"#ccc")+";\n }\n \n .rpop-right .rpop-tail {\n border-right-color: "+(o.bg||"#fff")+";\n }\n .rpop-right .rpop-tail-outer {\n border-right-color: "+(o.bc||"#ccc")+";\n }\n "+e.map(function(o){var e=Object.assign({},t("raui.primary"),t("raui.pop.primary"),t("raui."+o),t("raui.pop."+o));return"\n ."+o+" .rpop {\n background-color: "+(e.bg||"#fff")+";\n color: "+(e.fg||"#222")+";\n }\n \n ."+o+".rpop-below .rpop-tail {\n border-bottom-color: "+(e.bg||"#fff")+";\n }\n ."+o+".rpop-below .rpop-tail-outer {\n border-bottom-color: "+(e.bc||"#ccc")+";\n }\n \n ."+o+".rpop-above .rpop-tail {\n border-top-color: "+(e.bg||"#fff")+";\n }\n ."+o+".rpop-above .rpop-tail-outer {\n border-top-color: "+(e.bc||"#ccc")+";\n }\n \n ."+o+".rpop-left .rpop-tail {\n border-left-color: "+(e.bg||"#fff")+";\n }\n ."+o+".rpop-left .rpop-tail-outer {\n border-left-color: "+(e.bc||"#ccc")+";\n }\n \n ."+o+".rpop-right .rpop-tail {\n border-right-color: "+(e.bg||"#fff")+";\n }\n ."+o+".rpop-right .rpop-tail-outer {\n border-right-color: "+(e.bc||"#ccc")+";\n }\n "})}.call(this,t)].join(" ")},cssId:"rpop",noCssTransform:!0,observe:{popped:function(t){var o,e=this;t&&(s&&(this.source=s),f&&(this.tailSource=f));var n=this._transdone=new Promise(function(t){return o=t});n.resolve=o,setTimeout(function(){e._transdone=n,e.get("popped")===t&&e.set("_popped",t)},1)},_popped:{handler:function(t){var o=this,e=this._transdone.resolve;if(t){var n=this.get("@style.raui.pop.mobile");if(n&&window.matchMedia("(max-width: "+n+")").matches){u||(u=new m({target:document.body,append:!0}));var i=this.getContext().getParent(!0);i.isContext=1,this.set("__popped",!1).then(e),u.unshift("contents",{content:this.partials.content,context:i,attrs:this.partials["extra-attributes"]||[],clickClose:this.get("clickClose"),noClickout:this.get("noClickout"),done:function(){o.set("popped",!1)}})}else this.set("__popped",!0)}else c?(u.shift("contents"),e()):this.set("__popped",!1).then(e)},defer:!0,init:!1},__popped:{handler:function(t){var o=this._transdone.resolve;if(t){var e=this.find("div"),n=e,i=n.offsetHeight+n.offsetTop,r=n.offsetWidth+n.offsetLeft,p=n.offsetParent;if(!this.overflows)for(var l=this.overflows={e:[],v:[]};e&&e.style;){if(e===p){if(e.offsetWidth>=r&&e.offsetHeight>=i)break;r+=e.offsetLeft,i+=e.offsetTop,p=e.offsetParent}var a=getComputedStyle(e);if("auto"===a.overflow)break;"hidden"===a.overflow&&(l.e.push(e),l.v.push(e.style.overflow),e.style.overflow="visible"),e=e.parentNode}this.position(),this.transition("pop",n,{intro:!0,dir:this.get("where")||"below"}).then(o)}else this.source=null,this.tailSource=null},defer:!0,init:!1},"align where tail fit":{handler:function(){this.position()},defer:!0}},decorators:{cleanup:function(t){var o=this;return{teardown:function(){var t=o.overflows;if(t){o.overflows=null;for(var e=0;e<t.e.length;e++)t.e[e].style.overflow=t.v[e]}}}}},data:function(){return{gap:4}}});var m=function(t){function o(o){t.call(this,o)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o}(o);o.extendWith(m,{template:{v:d.v,t:d.p.modal},data:function(){return{contents:[]}},use:[r(),a()],observe:{contents:function(t){c=(t||[]).length>0}},on:{init:function(){u?console.warn("More than one PopOver mobile host created."):u=this}}}),t.Popover=v,t.trigger=b,t.default=function(t){return void 0===t&&(t={}),function(o){var e=o.instance;e.components[t.name||"pop"]=v,e.components[t.mobileName||"mobile-pop"]=m;var n=Object.assign({},t);n.name=n.trigger||n.name,b(n)({instance:e})}},Object.defineProperty(t,"__esModule",{value:!0})});

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],t):t(e.RauiTable={},e.Ractive)}(this,function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n="undefined"!=typeof window?window:null;function r(e,t,r){if(n&&n.Ractive&&"object"==typeof n.Ractive[t]){var i=document.currentScript;if(i||(i=(i=document.querySelectorAll("script"))[i.length-1]),i){var o=i.getAttribute("data-alias");o&&(o=(o=o.split("&")).reduce(function(e,t){var n=t.split("="),r=n[0],i=n[1];return e[r]=i,e},{})),Ractive[t][o&&o[e]||e]=r}}}function i(e,t){var n=t.context||this.getContext(e),r={position:e.style.position,overflowY:e.style.overflowY};""!==e.style.position&&"static"!==e.style.position||(e.style.position="relative");var i=function(){t.offsetWidth&&n.set(t.offsetWidth,e.offsetWidth),t.offsetHeight&&n.set(t.offsetHeight,e.offsetHeight),t.clientWidth&&n.set(t.clientWidth,e.clientWidth),t.clientHeight&&n.set(t.clientHeight,e.clientHeight),t.diffWidth&&n.set(t.diffWidth,e.offsetWidth-e.clientWidth),t.diffHeight&&n.set(t.diffHeight,e.offsetHeight-e.clientHeight)},a=o(e,i);return{refresh:i,teardown:function(){e.removeChild(a),e.style.position=r.position,e.style.overflowY=r.overflowY}}}function o(e,t){var n=document.createElement("object");return n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;"),n.setAttribute("tabindex","-1"),n.type="text/html",n.onload=function(){n.contentDocument.defaultView.addEventListener("resize",t),t()},/Trident/.test(navigator.userAgent)?(e.appendChild(n),n.data="about:blank"):(n.data="about:blank",e.appendChild(n)),n}var a,l=16;function s(e){l=e}function d(e){return a||function e(){!a&&window&&"document"in window&&"function"==typeof document.createElement&&((a=document.createElement("div")).setAttribute("style","position: absolute; left: -2em; width: 1em; height: 1em;"),o(a,function(){return s(a.getBoundingClientRect().width)}),window.addEventListener("resize",function(){e(),s(a.getBoundingClientRect().width)})),a&&!a.parent&&document.body.appendChild(a)}(),"string"==typeof e&&(e=e.replace(/[^-.\d]/g,"")),+e*l}var c={tiny:{units:[2,3,4,5,6,8],max:"0",value:0},xsmall:{units:[2,3,4,5,6,8,10,12],max:"20em",prefix:"xs",value:10},small:{units:[2,3,4,5,6,8,10,12],max:"36em",value:20},medium:{units:[2,3,4,5,6,8,10,12],max:"48em",value:30},large:{units:[2,3,4,5,6,8,10,12,16,20],max:"64em",value:40},xlarge:{units:[2,3,4,5,6,8,10,12,16,20],max:"100em",value:50},ginormous:{units:[2,3,4,5,6,8,10,12,16,20],max:"150em",value:60}},f={"grid grid-root":/\bgrid grid-root\b/g},u=/\s+/g;function h(e,t){var n,r,o=this.getContext(e),a=this,l=t||{};function s(t){if("number"==typeof l.offset&&(t-=l.offset),!l.type||"class"===l.type){var i,a=e.className,s=-1,d=[];for(var c in n)f[c].lastIndex=-1,n[c]<=t?(f[c].test(a)||(a+=" "+c),n[c]>s&&(s=n[c],i=c,d.push(i))):a=a.replace(f[c],"").trim();if(e.className=a.replace(u," "),!i)return;l.value&&o.set(l.value,r[i].value),l.name&&o.set(l.name,i),l.size&&o.set(l.size,t),l.max&&o.set(l.max,s),l.classes&&o.set(l.classes,d.join(" ")),l.matches&&o.set(l.matches,d)}}function h(){for(var t in r=a.get("@style.break")||c,n={},r)n[t]=d(r[t].max),f[t]||(f[t]=new RegExp("\\b"+t+"\\b","g"));s(e.clientWidth)}var b=this.observe("@style.break",h,{init:!1}),p=o.observe("@local.width",s,{init:!1}),g=i.call(this,e,{clientWidth:"@local.width"});return e.className+=" grid grid-root",l.immediate?h():requestAnimationFrame(h),{update:function(t){l=t||{},requestAnimationFrame(function(){return s(e.clientWidth)})},teardown:function(){e.className=e.className.replace(f["grid grid-root"],"").trim(),p.cancel(),b.cancel(),g.teardown()}}}function b(e,t){var n=e("raui.grid.break")||t||c,r=(e("raui.grid.wrappers")||[".row-wrap > ",".row-wrap > .row-wrap > "]).slice();r.unshift("");var i=".row > * { position: relative; width: 100%; transition-duration: 0.2s; transition-timing-function: ease-in-out; transition-property: padding, margin; box-sizing: border-box; }\n.grid { display: block; }\n.grid .row { display: flex !important; flex-wrap: wrap; min-height: fit-content; width: 100%; align-content: flex-start; }\n.grid .row.row-pad > * { padding: "+(e("raui.grid.padding")||"0.5em")+"; }\n.grid .row > .pad { display: flex; flex-direction: column; padding: "+(e("raui.grid.padding")||"0.5em")+"; box-sizing: border-box; }",o=Object.keys(n).map(function(e){return(n[e].key=e)&&n[e]});return o.sort(function(e,t){return e.value>t.value?1:e.value<t.value?-1:0}),o.forEach(function(t){var n=t.prefix||t.key[0],o={};t.units.forEach(function(e){for(var t=1;t<e;t++){var n=""+t/e*100;n=n.substr(0,n.indexOf(".")+3),o[n]||(o[n]=[]),o[n].push(t+"-"+e)}});var a=t.key;i+="\n"+[r.map(function(e){return"."+a+" > "+e+"."+n+"1, ."+a+" > "+e+".row > ."+n+"1"}).join(", "),"."+a+" ."+n+"-n1, ."+a+" .row-"+n+"-n1 > *"].filter(function(e){return e}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: 100%; flex-grow: 0; flex-shrink: 0; }\n"+[r.map(function(e){return"."+a+" > "+e+"."+n+"0, ."+a+" > "+e+".row > ."+n+"0"}).join(", "),"."+a+" ."+n+"-n0, ."+a+" .row-"+n+"-n0 > *"].filter(function(e){return e}).join(", ")+" { display: none; flex-grow: 0; flex-shrink: 0: }\n"+Object.keys(o).map(function(t){return o[t].map(function(e){return""+[r.map(function(t){return"."+a+" > "+t+".row-"+n+e+" > *, ."+a+" > "+t+"."+n+e+", ."+a+" > "+t+".row > ."+n+e}).join(", "),"."+a+" .row-"+n+"-n"+e+" > * .row > ."+n+"-n"+e+", ."+a+" ."+n+"-n"+e+", ."+a+" .row-"+n+"-n"+e+" > *"].filter(function(e){return e}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: "+t+"%; flex-grow: 0; flex-shrink: 0; }"}).join("\n")+"\n"+[r.map(function(e){return"."+a+" > "+e+".row > "+n+"-fill, ."+a+" >"+e+".row > ."+n+"-auto"}).join(", "),"."+a+" ."+n+"-nfill, ."+a+" ."+n+"-nauto"].filter(function(e){return e}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: auto; flex-grow: 1; flex-shrink: 1; }"}),i}h.style=b,r("grid","decorators",h);var p=250;function g(e){return void 0===e&&(e={}),function(t){var n=t.Ractive;t.instance.events[e.name||(e.count||"")+"clicks"]=function(t,r,i){var o,a=Object.assign({},e,i);return(o=t.__r_clicks__)?o.subscribe(a.count||1,!!a.hold,r):(o=new v(n.getContext(t),a.delay||p,a.bubble||!1),t.__r_clicks__=o,o.subscribe(a.count||1,!!a.hold,r)),{teardown:function(){o.unsubscribe(a.count||1,!!a.hold,r)}}}}}g({name:"click",count:1}),g({name:"dblclick",count:2}),g({name:"trpclick",count:3});var v=function(e,t,n){this.context=e,this.node=e.node,this.delay=t,this.fires={},this.refs=0,this.bubble=n,this.bind()};function m(e){return this.__r_clicks__.mousedown(e)}function w(e){return this.__r_clicks__.touchdown(e)}function x(){this.addEventListener("keydown",y,!1),this.addEventListener("blur",_,!1)}function _(){this.removeEventListener("keydown",y,!1),this.removeEventListener("blur",_,!1)}function y(e){if(32===e.which||10===e.which||13===e.which)return this.__r_clicks__.fire()}function k(e,t){var n=e.processParams(t,{duration:200,easing:"easeInOut"});return new Promise(function(t){requestAnimationFrame(function(){e.setStyle("overflow","hidden");var r="x"===n.axis?"width":"height";if(e.isIntro||n.intro){var i=e.getStyle(r);e.setStyle(r,0),e.setStyle("opacity",0),t(e.animateStyle(r,i,n).then(function(){return e.animateStyle("opacity",1,n)}).then(function(){e.setStyle(r,""),e.setStyle("overflow","")}))}else e.setStyle(r,e.getStyle(r)),e.setStyle("opacity",1),t(e.animateStyle("opacity",0,n).then(function(){return e.animateStyle(r,0,n)}))})})}function O(e,t){void 0===t&&(t={});var n="string"==typeof t?t:t.bind;if("string"!=typeof n)return{teardown:function(){}};var r,i=t.allow||2,o=this.getContext(e),a=!1;function l(){a=!1;var t="";e.scrollHeight>e.clientHeight&&(t+="vscroll"),e.scrollWidth>e.clientWidth&&(t+=(t?" ":"")+"hscroll"),e.scrollTop<=i&&(t+=" top"),e.scrollTop>=e.scrollHeight-e.clientHeight-i&&(t+=" bottom"),~t.indexOf("top")||~t.indexOf("bottom")||(t+=" vmiddle"),e.scrollLeft<=i&&(t+=" left"),e.scrollLeft>=e.scrollWidth-e.clientWidth-i?t+=" right":~t.indexOf("left")||~t.indexOf("right")||(t+=" hmiddle"),o.set(n,t),o.hasListener("scrolled")&&o.raise("scrolled",{})}return e.addEventListener("scroll",l,{passive:!0}),requestAnimationFrame(l),{refresh:function(){a||(r&&clearTimeout(r),r=setTimeout(function(){r=null,a=!0,requestAnimationFrame(l)},250))},teardown:function(){e.removeEventListener("scroll",l),o.set(n,"")}}}function S(e){return"string"==typeof e}function P(e){return"number"==typeof e}function E(e){return"object"==typeof e}v.prototype.subscribe=function(e,t,n){(this.fires[e+","+t]||(this.fires[e+","+t]=[])).push(n),this.refs++},v.prototype.unsubscribe=function(e,t,n){var r=this.fires[e+","+t]||[];r.splice(r.indexOf(n),1),this.refs--,this.refs||this.teardown()},v.prototype.bind=function(){window.PointerEvent||window.navigator.pointerEnabled?this.node.addEventListener("pointerdown",m):window.navigator.msPointerEnabled?this.node.addEventListener("MSPointerDown",m):(this.node.addEventListener("mousedown",m),this.node.addEventListener("touchstart",w)),"A"!==this.node.tagName&&"BUTTON"!==this.node.tagName&&"button"!==this.node.type&&"submit"!==this.node.type&&"checkbox"!==this.node.type&&"radio"!==this.node.type||this.node.addEventListener("focus",x)},v.prototype.fire=function(e,t,n,r){var i=this;this.tm?(this.tmCount++,clearTimeout(this.tm)):this.tmCount=1;var o=function(){i.tm=null,(i.fires[i.tmCount+","+!!r]||[]).forEach(function(o){o({node:i.node,original:e,x:t,y:n,hold:!!r})})};return r?o():this.tm=setTimeout(o,this.delay),this.bubble},v.prototype.mousedown=function(e){var t=this;if(!this.preventMousedownEvents&&(void 0===e.which||1===e.which)){var n,r=e.clientX,i=e.clientY,o=e.pointerId,a=function(e){e.pointerId==o&&(t.fire(e,r,i),s())},l=function(e){e.pointerId==o&&(Math.abs(e.clientX-r)>=12||Math.abs(e.clientY-i)>=12)&&s()},s=function(){n&&clearTimeout(n),t.node.removeEventListener("MSPointerUp",a,!1),document.removeEventListener("MSPointerMove",l,!1),document.removeEventListener("MSPointerCancel",s,!1),t.node.removeEventListener("pointerup",a,!1),document.removeEventListener("pointermove",l,!1),document.removeEventListener("pointercancel",s,!1),t.node.removeEventListener("click",a,!1),document.removeEventListener("mousemove",l,!1)};return window.PointerEvent||window.navigator.pointerEnabled?(this.node.addEventListener("pointerup",a,!1),document.addEventListener("pointermove",l,!1),document.addEventListener("pointercancel",s,!1)):window.navigator.msPointerEnabled?(this.node.addEventListener("MSPointerUp",a,!1),document.addEventListener("MSPointerMove",l,!1),document.addEventListener("MSPointerCancel",s,!1)):(this.node.addEventListener("click",a,!1),document.addEventListener("mousemove",l,!1)),n=setTimeout(function(){s(),t.fire(e,r,i,!0)},400),this.bubble||e.stopPropagation(),this.bubble}},v.prototype.touchdown=function(e){var t,n=this,r=e.touches[0],i=r.clientX,o=r.clientY,a=r.identifier,l=function(e){e.changedTouches[0].identifier===a?(e.preventDefault(),n.preventMousedownEvents=!0,clearTimeout(n.preventMousedownTimeout),n.preventMousedownTimeout=setTimeout(function(){n.preventMousedownEvents=!1},400),n.fire(e,i,o),d()):d()},s=function(e){1===e.touches.length&&e.touches[0].identifier===a||d();var t=e.touches[0];(Math.abs(t.clientX-i)>=12||Math.abs(t.clientY-o)>=12)&&d()},d=function(){t&&clearTimeout(t),n.node.removeEventListener("touchend",l,!1),window.removeEventListener("touchmove",s,!1),window.removeEventListener("touchcancel",d,!1)};return this.node.addEventListener("touchend",l,!1),window.addEventListener("touchmove",s,!1),window.addEventListener("touchcancel",d,!1),t=setTimeout(function(){d(),n.fire(e,i,o,!0)},400),this.bubble||e.stopPropagation(),this.bubble},v.prototype.teardown=function(){this.node.removeEventListener("pointerdown",m),this.node.removeEventListener("MSPointerDown",m),this.node.removeEventListener("mousedown",m),this.node.removeEventListener("touchstart",w),this.node.removeEventListener("focus",x),delete this.node.__r_clicks__},r("expand","transitions",k);var L,A,z=function(e){function t(t){e.call(this,t)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={selections:{configurable:!0},selected:{configurable:!0},rows:{configurable:!0},visibleRows:{configurable:!0},allRows:{configurable:!0}};return t.prototype._allSelected=function(){for(var e=this.get("selections"),t="virtual"===this.get("paginate")?this.get("rows"):this.get("visibleRows"),n=0;n<t.length;n++)if(!~e.indexOf(t[n]))return!1;return t.length&&!0},t.prototype._setSort=function(e,t){var n=[this.get("sort-handler"),this.get("@style.raui.table.sort-handler")],r=n[0]||n[1];if(r)r(this,this.get("columns."+e),e,t);else{var i=this.get("sort")||"",o=this.get("columns."+e).id;i===o||i.substr(1)===o?"-"===i[0]?this.set("sort",o):this.set("sort","-"+o):this.set("sort",o)}},t.prototype.nodeSet=function(e,t,n){e[t]=n},t.prototype._expand=function(e){var t=this,n=this.get("visibleRows")[e],r=this.get("expanded"),i=this.find(".rtable-row-expand");i?this.transition("expand",i,{outro:!0}).then(function(){r===n?t.set("expanded",null):(t.set("expanded",n),t.transition("expand",t.find(".rtable-row-expand"),{intro:!0}))}):n===r?this.set("expanded",null):(this.set("expanded",n),this.transition("expand",this.find(".rtable-row-expand"),{intro:!0}))},t.prototype._hover=function(e){return this.set("hovered",this.get("~/visibleRows")[e]),!1},t.prototype._unhover=function(e){if(!this.find(".rtable-top .rtable-row-wrap:hover"))return this.set("hovered",void 0),!1},t.prototype._select=function(e,t){var n=this.get("selections");n||(n=[],this.set("selections",n));var r=n.indexOf(e);return~r?this.splice("selections",r,1):this.push("selections",e),(r>=n.length||1===n.length)&&this.set("selected",n[n.length-1]),this.fire("selection",{},{item:n[n.length-1],items:n}),setTimeout(function(){return t.target.checked=!~r}),!1},t.prototype._open=function(e,t,n){var r=this;this._opentm||(this.fire("selected",{},e,t,n),this._opentm=setTimeout(function(){r._opentm=null},500))},t.prototype.select=function(){var e=this.get("selected");e&&this.fire("selected",{},e,this.get("rows").indexOf(e),this.get("visibleRows").indexOf(e))},t.prototype.deselect=function(){this.set({selections:[],selected:void 0})},n.selections.get=function(){return this.get("selections")||[]},n.selections.set=function(e){var t=this.get("rows"),n=Array.isArray(e)?e.filter(function(e){return~t.indexOf(e)}):[];this.set("selections",n)},n.selected.get=function(){return this.get("selected")},n.selected.set=function(e){this.set({selected:e,selections:[e]})},n.rows.get=function(){return this.get("rows")},n.visibleRows.get=function(){return this.get("visibleRows")},n.allRows.get=function(){return this.get("items")},t.prototype.selectionOffset=function(e){var t=this.get("selected"),n=this.get("visibleRows");if(t&&~n.indexOf(t)){var r=n.indexOf(t);if(e>0?r+e>=n.length:r+e<0){var i=e<1?-1:1;(i<0&&this.get("page")+i>=0||i>0&&this.get("page")+i<this.get("pagination.total"))&&this.add("page",i),n=this.get("visibleRows");var o=e>0?n[0]:n[n.length-1];this.set({selected:o,selections:[o]})}else this.set({selected:n[r+e],selections:[n[r+e]]})}else{var a=e>0?n[0]:n[n.length-1];this.set({selected:a,selections:[a]})}this.fire("selection",{},{item:this.get("selected"),items:this.get("selections")})},t.prototype.selectionDown=function(){this.selectionOffset(1)},t.prototype.selectionUp=function(){this.selectionOffset(-1)},t.prototype._selectGroup=function(e){var t=e;this.get("page")&&(t+=this.get("page")*this.get("pagination.per"));var n,r=this.get("rows"),i=this.get("groups"),o=this.get("selections"),a=r[t++],l=["selections"],s=[];for(~(n=o.indexOf(a))?s.push(n):l.push(a);t<r.length&&!(t in i);)a=r[t++],~(n=o.indexOf(a))?s.push(n):l.push(a);if(1===l.length)for(n=s.length;n--;)this.splice("selections",s[n],1);else this.push.apply(this,l);return!1},t.prototype._groupSelected=function(e){var t=e;this.get("page")&&(t+=this.get("page")*this.get("pagination.per"));var n=this.get("rows"),r=this.get("groups"),i=this.get("selections");if(!~i.indexOf(n[t++]))return!1;for(;t<n.length&&!(t in r);)if(!~i.indexOf(n[t++]))return!1;return!0},t.prototype._rows=function(){var e=(this.get("items")||[]).slice(),t=this.get("filter"),n=this.get("sort"),r=[this.get("data-handler"),this.get("@style.raui.table.data-handler")],i=r[0]||r[1]||j;if(!t&&!n)return this.set("isFiltered",!1),this.set("rows",e);var o=i(this,e,t,n,this.get("parameters",{virtual:!0}));this.set("isFiltered",o.length!==e.length),this.set("rows",o);var a=this.get("selections");this.set("selections",a.filter(function(t){return~e.indexOf(t)})),~e.indexOf(this.get("selection"))||this.set("selected",void 0)},t.prototype.replaceColumns=function(e){var t=M(e),n=t[0],r=t[1];this.set("columns",e),this.resetPartial("grid-row-cols",r),this.resetPartial("grid-head-cols",n)},Object.defineProperties(t.prototype,n),t}(t);z.settings={valign:"center",border:!1,"fixed-header":!0,"allow-select":!0,"allow-select-all":!0,"auto-titles":!1,paginate:"virtual"},t.extendWith(z,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable",g:1},{n:"class-rtable-virtual",t:13,f:[{t:2,x:{r:["~/paginate"],s:'_0==="virtual"'}}]},{n:"class-rtable-auto",t:13,f:[{t:2,x:{r:["~/paginate"],s:'_0==="auto"'}}]},{n:"class-rtable-fixed",t:13,f:[{t:2,r:"~/fixed"}]},{n:"class-rtable-border",t:13,f:[{t:2,r:"~/border"}]},{n:"class-rtable-fixed-header",t:13,f:[{t:2,r:"~/fixedHeader"}]},{n:"class-rtable-scrolled-down",t:13,f:[{t:2,x:{r:["~/scroll"],s:'!~(_0||"").indexOf("top")'}}]},{n:"class-rtable-scrolled-up",t:13,f:[{t:2,x:{r:["~/scroll"],s:'!~(_0||"").indexOf("bottom")'}}]},{n:"class-rtable-with-select",t:13,f:[{t:2,r:"~/allowSelect"}]},{n:"class-rtable-valign-top",t:13,f:[{t:2,x:{r:["~/valign"],s:'_0==="top"'}}]},{n:"class-rtable-valign-center",t:13,f:[{t:2,x:{r:["~/valign"],s:'_0==="center"'}}]},{n:"class-rtable-valign-bottom",t:13,f:[{t:2,x:{r:["~/valign"],s:'_0==="bottom"'}}]},{n:"class-rtable-nowrap",t:13,f:[{t:2,r:"~/noWrap"}]},{n:"class-rtable-wrap",t:13,f:[{t:2,x:{r:["~/noWrap"],s:"!_0"}}]},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-fixed",g:1},{n:"grid",t:71,f:{r:["~/scrollOffset"],s:"[{offset:_0}]"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-extra",g:1},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/tableWidth"},"px"],t:13}],n:50,r:"~/noWrap"},{n:"class-rtable-noheader",t:13,f:[{t:2,r:"~/noHeader"}]},{t:4,f:[{t:16,r:"meta.topAttrs"}],n:50,r:"meta.topAttrs"}],f:[{t:16,r:"meta.top",z:[{n:"selectedCount",x:{r:"selections.length"}},{n:"rowCount",x:{r:"rows.length"}},{n:"table",x:{r:"@this"}},{n:"selected",x:{r:"selected"}},{n:"selections",x:{r:"selections"}}]}]}],n:50,r:"meta.top"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-wrapper row-wrap",g:1},{t:4,f:[{n:"scrollother",t:71,f:{r:[],s:'[".rtable-top"]'}}],n:50,r:"~/noWrap"}],f:[{t:8,r:"grid-head"}]}],n:51,r:"~/noHeader"}]}],n:50,x:{r:["~/noHeader","meta.top","~/fixedHeader"],s:"(!_0||_1)&&_2"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-top",g:1},{t:4,f:[{n:["scrolled"],t:70,f:"scroll"},{n:"sized",t:71,f:{r:[],s:'[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]'}}],n:50,x:{r:["~/paginate"],s:'_0==="virtual"'}},{t:4,f:[{n:"scrolled",t:71,f:{r:[],s:'["~/scroll"]'}}],n:50,x:{r:["~/noHeader","~/fixedHeader","~/meta.bottom","~/paginate"],s:'(!_0&&_1)||_2||_3==="virtual"'}},{t:4,f:[{n:"scrollother",t:71,f:{r:[],s:'[".rtable-header-wrapper"]'}}],n:50,x:{r:["~/fixedHeader","~/noWrap"],s:"_0&&_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-extra",g:1},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/tableWidth"},"px"],t:13}],n:50,r:"~/noWrap"},{n:"class-rtable-noheader",t:13,f:[{t:2,r:"~/noHeader"}]},{t:4,f:[{t:16,r:"meta.topAttrs"}],n:50,r:"meta.topAttrs"}],f:[{t:16,r:"meta.top",z:[{n:"selectedCount",x:{r:"selections.length"}},{n:"rowCount",x:{r:"rows.length"}},{n:"table",x:{r:"@this"}},{n:"selected",x:{r:"selected"}},{n:"selections",x:{r:"selections"}}]}]}],n:50,x:{r:["~/fixedHeader","meta.top"],s:"!_0&&_1"}}," ",{t:7,e:"div",m:[{n:"grid",t:71,f:{r:[],s:'[{size:"~/tableWidth",value:"~/gridValue",name:"~/gridName",max:"~/gridMax"}]'}},{t:4,f:[{n:"style-margin-top",f:[{t:2,r:"~/virtual.above"},"px"],t:13},{n:"style-margin-bottom",f:[{t:2,r:"~/virtual.below"},"px"],t:13}],n:50,x:{r:["~/paginate"],s:'_0==="virtual"'}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-wrapper row-wrap",g:1}],f:[{t:8,r:"grid-head"}]}],n:50,x:{r:["~/noHeader","~/fixedHeader"],s:"!_0&&!_1"}}," ",{t:4,f:[{t:4,f:[{t:8,r:"grid-row"}],n:52,z:[{n:"source",x:{r:"~/items"}},{n:"shuffle",x:{x:{r:[],s:"true"}}}],r:"~/visibleRows"}],n:50,r:"~/shuffle"},{t:4,f:[{t:4,f:[{t:8,r:"grid-row"}],n:52,r:"~/visibleRows"}],n:51,l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-row row t1",g:1}],f:[{t:16,r:"empty",z:[{n:"message",x:{r:"~/empty"}}]}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-bottom",g:1},{t:4,f:[{t:16,r:"meta.bottomAttrs"}],n:50,r:"meta.bottomAttrs"}],f:[{t:4,f:[{t:16,r:"meta.bottom",z:[{n:"selectedCount",x:{r:"selections.length"}},{n:"rowCount",x:{r:"rows.length"}},{n:"table",x:{r:"@this"}},{n:"selected",x:{r:"selected"}},{n:"selections",x:{r:"selections"}}]}],n:50,r:"~/meta.bottom"}," ",{t:4,f:[{t:8,r:"pagination"}],n:50,x:{r:["~/paginate"],s:'_0!=="virtual"'}}]}],n:50,x:{r:["~/paginate","~/meta.bottom"],s:'_0!=="virtual"||_1'}}]}],e:{'_0==="virtual"':function(e){return"virtual"===e},'_0==="auto"':function(e){return"auto"===e},'!~(_0||"").indexOf("top")':function(e){return!~(e||"").indexOf("top")},'!~(_0||"").indexOf("bottom")':function(e){return!~(e||"").indexOf("bottom")},'_0==="top"':function(e){return"top"===e},'_0==="center"':function(e){return"center"===e},'_0==="bottom"':function(e){return"bottom"===e},"!_0":function(e){return!e},"[{offset:_0}]":function(e){return[{offset:e}]},'[".rtable-top"]':function(){return[".rtable-top"]},"(!_0||_1)&&_2":function(e,t,n){return(!e||t)&&n},'[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]':function(){return[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]},'["~/scroll"]':function(){return["~/scroll"]},'(!_0&&_1)||_2||_3==="virtual"':function(e,t,n,r){return!e&&t||n||"virtual"===r},'[".rtable-header-wrapper"]':function(){return[".rtable-header-wrapper"]},"_0&&_1":function(e,t){return e&&t},"!_0&&_1":function(e,t){return!e&&t},'[{size:"~/tableWidth",value:"~/gridValue",name:"~/gridName",max:"~/gridMax"}]':function(){return[{size:"~/tableWidth",value:"~/gridValue",name:"~/gridName",max:"~/gridMax"}]},"!_0&&!_1":function(e,t){return!e&&!t},true:function(){return!0},'_0!=="virtual"':function(e){return"virtual"!==e},'_0!=="virtual"||_1':function(e,t){return"virtual"!==e||t},"(_0+_1)%2===1":function(e,t){return(e+t)%2==1},"[_0._setSort(_1,_2)]":function(e,t,n){return[e._setSort(t,n)]},"[_0._select(_1,_2),false]":function(e,t,n){return[e._select(t,n),!1]},"[_0._open(_3,_1.indexOf(_3),_2.indexOf(_3))]":function(e,t,n,r){return[e._open(r,t.indexOf(r),n.indexOf(r))]},"[_0._expand(_1)]":function(e,t){return[e._expand(t)]},"[_0.stopPropagation()]":function(e){return[e.stopPropagation()]},"_0.indexOf(_1)":function(e,t){return e.indexOf(t)},"_0===_1":function(e,t){return e===t},"_0>0":function(e){return e>0},"!_0&&_1>0":function(e,t){return!e&&t>0},'_0==="boolean"':function(e){return"boolean"===e},"_0._allSelected()":function(e){return e._allSelected()},'_0||"No data."':function(e){return e||"No data."},"_0*_1+1":function(e,t){return e*t+1},"_2+1===_0?_1:(_2+1)*_3":function(e,t,n,r){return n+1===e?t:(n+1)*r},"_0===1":function(e){return 1===e},"_0._allSelected()&&_1<_2":function(e,t,n){return e._allSelected()&&t<n},'[_0.set("page",_1-1)]':function(e,t){return[e.set("page",t-1)]},'[(/^\\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1))||_2.nodeSet(_3,"value",_4+1)]':function(e,t,n,r,i){return[/^\d+$/.test(t)&&+t>0&&+t<=e&&n.set("page",+t-1)||n.nodeSet(r,"value",i+1)]},"_0==_1+1":function(e,t){return e==t+1},'[_0.set("page",_2[_1-1])]':function(e,t,n){return[e.set("page",n[t-1])]},'_0==="..."':function(e){return"..."===e},'[_0.set("page",_1+1)]':function(e,t){return[e.set("page",t+1)]},"_0<_1-1":function(e,t){return e<t-1}},p:{"csp-dummy":[{t:7,e:"div",m:[{n:"class-rtable-odd",t:13,f:[{t:2,x:{r:["@index","~/virtual.offset"],s:"(_0+_1)%2===1"}}]},{n:"class-top",t:13,f:[{t:2,x:{r:[".valign"],s:'_0==="top"'}}]},{n:"class-bottom",t:13,f:[{t:2,x:{r:[".valign"],s:'_0==="bottom"'}}]},{n:"class-center",t:13,f:[{t:2,x:{r:[".valign"],s:'_0==="center"'}}]},{n:["click"],t:70,f:{r:["@this",".index","@event"],s:"[_0._setSort(_1,_2)]"}},{n:["click"],t:70,f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}},{n:["click"],t:70,f:{r:["@this","~/rows","~/visibleRows","."],s:"[_0._open(_3,_1.indexOf(_3),_2.indexOf(_3))]"}},{n:["click"],t:70,f:{r:["@this","@index"],s:"[_0._expand(_1)]"}},{n:["click"],t:70,f:{r:["@event"],s:"[_0.stopPropagation()]"}}]}," ",{t:4,f:["..."],n:50,x:{r:["~/selections","."],s:"_0.indexOf(_1)"}}," ",{t:4,f:["..."],n:50,x:{r:[".","~/expanded"],s:"_0===_1"}}," ",{t:4,f:["..."],n:50,x:{r:["~/virtual.offset"],s:"_0>0"}}," ",{t:4,f:["..."],n:50,x:{r:["~/fixedHeader","~/virtual.offset"],s:"!_0&&_1>0"}}," ",{t:4,f:["..."],n:50,x:{r:["~/columns.0.type"],s:'_0==="boolean"'}}," ",{t:4,f:["..."],n:50,x:{r:["@this"],s:"_0._allSelected()"}}],empty:[{t:7,e:"div",f:[{t:7,e:"div",f:[{t:2,x:{r:["message"],s:'_0||"No data."'}}]}]}],pagination:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-pagination",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-info",g:1}],f:[{t:4,f:[{t:2,x:{r:["~/page","~/pagination.per"],s:"_0*_1+1"}}," - ",{t:2,x:{r:["~/pagination.total","~/rows.length","~/page","~/pagination.per"],s:"_2+1===_0?_1:(_2+1)*_3"}}," of ",{t:2,r:"~/rows.length"},{t:4,f:[" (",{t:2,r:"~/items.length"}," total)"],n:50,r:"~/isFiltered"}],n:50,x:{r:["pagination","rows.length"],s:"_0&&_1"}}," ",{t:4,f:["​"],n:50,x:{r:["_paginate"],s:"_0===1"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-select-all-all",g:1}],f:[{t:4,f:[{t:7,e:"strong",f:[{t:2,r:"selections.length"}]}," of ",{t:7,e:"strong",f:[{t:2,r:"rows.length"}]}," selected",{t:4,f:[" - ",{t:7,e:"a",m:[{n:"href",f:"#",t:13,g:1},{n:["click"],t:70,f:"selectAllAll"}],f:["Select All"]}],n:50,x:{r:["@this","selections.length","rows.length"],s:"_0._allSelected()&&_1<_2"}}],n:50,x:{r:["selections.length"],s:"_0>0"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-pages",g:1}],f:[{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","~/page"],s:'[_0.set("page",_1-1)]'}}],f:["Previous"]}],n:50,x:{r:["~/page"],s:"_0>0"}}," ",{t:4,f:[{t:4,f:[{t:7,e:"input",m:[{n:["change"],t:70,f:{r:["~/pagination.total","@node.value","@this","@node","~/page"],s:'[(/^\\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1))||_2.nodeSet(_3,"value",_4+1)]'}},{n:"value",f:[{t:2,r:"."}],t:13},{t:73,v:"t",f:"false"}]}],n:50,x:{r:[".","~/page"],s:"_0==_1+1"}},{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","@index","../"],s:'[_0.set("page",_2[_1-1])]'}}],f:["..."]}," "],n:50,x:{r:["."],s:'_0==="..."'},l:1},{t:4,f:[" ",{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","."],s:'[_0.set("page",_1-1)]'}}],f:[{t:2,r:"."}]}],n:51,l:1}],n:52,r:"~/pagination.array"}," ",{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","~/page"],s:'[_0.set("page",_1+1)]'}}],f:["Next"]}],n:50,x:{r:["~/page","~/pagination.total"],s:"_0<_1-1"}}]}]}]}},css:function(e){return[function(e){var t=Object.assign({},e("raui.primary"),e("raui.table.primary")),n=Object.assign({},t,e("raui.primary.active"),e("raui.table.primary.active")),r=Object.assign({selected:{},header:{},footer:{}},e("raui.table"));return"\n .rtable {\n display: flex;\n flex-direction: column;\n overflow: auto;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n flex-grow: 2;\n }\n \n .rtable.rtable-border {\n border: 1px solid "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-header {\n min-height: 2em;\n }\n \n .rtable-group > div > div,\n .rtable-header > div > div,\n .rtable-row > div > div {\n padding: "+(r.padding||"0.5em")+";\n overflow: inherit;\n text-overflow: inherit;\n line-height: 1em;\n }\n .rtable-row > .rtable-no-pad > div {\n padding: 0;\n }\n \n .rtable-auto .row > *,\n .rtable-fixed .row > *\n {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n \n .rtable-header > div > div, .rtable-column {\n overflow: hidden;\n }\n \n .rtable-number-column {\n text-align: right;\n }\n .rtable-date-column {\n text-align: right;\n }\n \n .rtable-sortable {\n cursor: pointer;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n \n .grid .row.rtable-row, .grid .rtable-header > .row {\n width: auto;\n min-width: min-content;\n flex-grow: 1;\n }\n \n .rtable-nowrap .grid .rtable-row, .rtable-nowrap .grid .rtable-header > .row {\n flex-wrap: nowrap;\n }\n .rtable-nowrap .rtable-row-wrap, .rtable-inner-row-wrap {\n flex-grow: 1;\n } \n \n .rtable-row-wrap {\n display: flex;\n flex-grow: 1;\n align-items: center;\n z-index: 2;\n align-items: stretch;\n color: "+(t.fg||"#222")+";\n background-color: "+(r.even||t.bga||"#f4f4f4")+";\n }\n .rtable-row-wrap:focus-within {\n z-index: 3;\n }\n .rtable-row-wrap.rtable-odd {\n background-color: "+(r.odd||t.bg||"#fff")+";\n }\n .rtable-row-wrap:hover .rtable-inner-row-wrap, .rtable-row-wrap:hover .rtable-select-row {\n background-color: "+(r.over||n.bg||"#e6f0fa")+";\n }\n .rtable-row-wrap:hover .rtable-inner-row-wrap,\n .rtable-wrap .rtable-row-wrap:hover .rtable-select-row {\n position: relative;\n }\n .rtable-row-wrap:hover .rtable-select-row {\n overflow: visible;\n }\n \n .rtable-row-wrap:hover {\n border-bottom: "+(r.dividerSize||"4px")+" solid "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-row-wrap.rtable-selected {\n background-color: "+(r.selected.bg||"#cee5fd")+";\n color: "+(r.selected.fg||t.fg||"#222")+";\n }\n .rtable-row-wrap.rtable-selected.rtable-odd {\n background-color: "+(r.selected.odd||"#c5dffb")+";\n }\n \n .rtable-nowrap .rtable-row-wrap {\n display: inline-flex;\n min-width: 100%;\n box-sizing: border-box;\n }\n \n .rtable-nowrap > .rtable-top > .grid {\n line-height: 1em;\n }\n \n .rtable-border .rtable-row .rtable-column,\n .rtable-border .rtable-group .rtable-column {\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-style: solid;\n border-width: 0 0 0 1px;\n margin: 0 0 0 -1px;\n }\n .rtable-wrap.rtable-border .rtable-row .rtable-column,\n .rtable-border .rtable-group .rtable-column {\n border-width: 0 0 1px 1px;\n margin: 0 0 -1px -1px;\n }\n \n .rtable-border .rtable-header .rtable-column {\n border-width: 0 0 0 0;\n margin: 0 0 0 0;\n }\n .rtable-wrap.rtable-border .rtable-header .rtable-column {\n border-width: 0 0 1px 0;\n margin: 0 0 -1px 0;\n }\n \n .rtable-border .rtable-row .rtable-column:nth-child(1),\n .rtable-border .rtable-group .rtable-column:nth-child(1) {\n border-left-width: 0;\n }\n .rtable-border.rtable-with-select .rtable-row .rtable-column:nth-child(1),\n .rtable-border.rtable-with-select .rtable-group .rtable-column:nth-child(1) {\n border-left-width: 1px;\n }\n \n .rtable-border .rtable-row-wrap {\n border-bottom-width: 1px;\n }\n \n .rtable-border .rtable-row-expand, .rtable-border .rtable-row-extra {\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-style: solid;\n border-width: 1px 0 0 0;\n margin-left: -1px;\n width: 100%;\n }\n .rtable-border.rtable-with-select .rtable-row-expand, .rtable-border.rtable-with-select .rtable-row-extra {\n border-left-width: 1px;\n }\n \n .rtable-row-expand, .rtable-row-extra {\n box-sizing: border-box;\n padding: "+(r.padding||"0.5em")+";\n }\n \n .rtable-row-hover {\n pointer-events: none;\n position: relative;\n z-index: 1;\n }\n .rtable-row-hover-content {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n }\n .rtable-row-hover-content > * {\n pointer-events: visible;\n }\n \n .rtable-group {\n border-bottom: 2px solid "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-header.rtable-row-wrap, .rtable-header.rtable-row-wrap:hover {\n font-weight: bold;\n background-color: "+(r.header.bg||"#dedede")+";\n }\n .rtable-header-fixed {\n line-height: 1em;\n background-color: "+(r.header.bg||"#dedede")+";\n }\n \n .rtable-header.rtable-row-wrap, .rtable-header-extra.rtable-noheader {\n border-bottom: 2px solid "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-header-extra {\n background-color: "+(r.header.bg||"#dedede")+";\n padding: "+(r.padding||"0.5em")+";\n line-height: 1em;\n z-index: 4;\n box-sizing: border-box;\n min-width: 100%;\n }\n .rtable-nowrap .rtable-header-extra {\n position: sticky;\n left: 0;\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n position: relative;\n }\n .rtable-fixed-header .rtable-header {\n position: relative;\n z-index: 3;\n }\n .rtable-fixed-header.rtable-scrolled-down .rtable-header-fixed {\n box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15), 0 0.25em 0.5em rgba(0,0,0,0.25);\n z-index: 3;\n }\n .rtable-fixed-header .rtable-top {\n margin-top: 0;\n }\n .rtable-nowrap.rtable-fixed-header .rtable-header-wrapper {\n flex-shrink: 0;\n width: 100%;\n overflow-x: auto;\n scrollbar-width: none;\n }\n .rtable-nowrap.rtable-fixed-header .rtable-header-wrapper::-webkit-scrollbar {\n height: 0;\n }\n .rtable-fixed-header .rtable-header-fixed::-webkit-scrollbar {\n width: 0;\n height: 0;\n }\n \n .rtable-nowrap .rtable-fixed-column, .rtable-nowrap .rtable-row-extra, .rtable-nowrap .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n position: -webkit-sticky;\n position: sticky;\n left: 0;\n }\n .rtable-border..rtable-nowrap .rtable-fixed-column, .rtable-border.rtable-nowrap .rtable-row-extra, .rtable-border.rtable-nowrap .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n left: 1px;\n }\n .rtable-nowrap.rtable-with-select .rtable-fixed-column, .rtable-nowrap.rtable-with-select .rtable-row-extra, .rtable-nowrap.rtable-with-select .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n left: "+(r.selectWidth||"2em")+";\n }\n .rtabe-border.rtable-nowrap.rtable-with-select .rtable-fixed-column, .rtabe-border.rtable-nowrap.rtable-with-select .rtable-row-extra, .rtabe-border.rtable-nowrap.rtable-with-select .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n left: "+(r.selectWidth||"2em")+";\n }\n \n .rtable-nowrap .rtable-inner-row-wrap {\n background-color: inherit;\n }\n \n .rtable-nowrap .row,\n .rtable-nowrap .rtable-fixed-column,\n .rtable-nowrap .rtable-select-row,\n .rtable-nowrap .rtable-select-header {\n background-color: inherit;\n z-index: 1;\n }\n \n .rtable-nowrap .rtable-select-row,\n .rtable-nowrap .rtable-select-header {\n position: sticky;\n position: -webkit-sticky;\n left: 0;\n z-index: 1;\n }\n .rtable-nowrap .rtable-select-header {\n z-index: 2;\n }\n \n .rtable-nowrap.rtable-border .rtable-fixed-column {\n border-right-width: 1px;\n }\n \n .rtable-scrolled-up .rtable-bottom {\n box-shadow: 0 -1px 2px 0 rgba(60, 64, 67, 0.3), 0 -1px 3px 1px rgba(60, 64, 67, 0.15), 0 -0.25em 0.5em rgba(0,0,0,0.25);\n z-index: 3;\n }\n .rtable-bottom {\n padding: "+(r.padding||"0.5em")+";\n background-color: "+(r.footer.bg||r.header.bg||"#dedede")+";\n border-top: 2px solid "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-pagination {\n display: flex;\n flex-wrap: wrap;\n flex-shrink: 0;\n justify-content: space-between;\n user-select: none;\n }\n \n .rtable-pages span {\n margin: 0.3em;\n cursor: pointer;\n }\n .rtable-pages span:first-of-type {\n margin-left: 0;\n }\n .rtable-pages input {\n text-align: center;\n width: 2.5em;\n font-size: 1em;\n background-color: transparent;\n border: none;\n padding: 0;\n font-weight: bold;\n text-decoration: underline;\n }\n \n /* checkboxes */\n .rtable-select {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n position: absolute;\n display: block;\n margin: 0;\n width: 3em;\n height: 3em;\n box-shadow: none;\n outline: none;\n opacity: 0;\n top: -0.75em;\n left: -0.75em;\n border-radius: 2em;\n transition: transform 0.2s, opacity 0.2s;\n background-color: "+(t.bc||"#ccc")+";\n cursor: pointer;\n }\n \n .rtable-select-header > div, .rtable-select-row > div, .rtable-header > div.rtable-select-header > div {\n padding: 0;\n overflow: visible;\n width: 1.5em;\n height: 1.5em;\n position: relative;\n line-height: 1.8em;\n cursor: pointer;\n display: flex;\n justify-content: space-around;\n align-items: center;\n flex-grow: 0;\n display: block;\n }\n \n .rtable-select:checked {\n background-color: "+(t.fga||"#07e")+';\n }\n \n .rtable-select-header:hover .rtable-select, .rtable-select-row:hover .rtable-select {\n opacity: 0.04;\n }\n \n .rtable-select:focus {\n opacity: 0.12;\n transform: scale(1);\n }\n \n .rtable-select-header:hover .rtable-select:focus, .rtable-select-row:hover .rtable.select:focus {\n opacity: 0.16;\n }\n \n .rtable-select:active {\n opacity: 0.4;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n \n .rtable-select-row > div:before, .rtable-select-header > div:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n border: solid 0.125em; /* Safari */\n border-color: '+(t.fg||"#222")+";\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n position: absolute;\n top: 0.3em;\n left: 0.15em;\n transition: border-color 0.2s, background-color 0.2s;\n }\n \n .rtable-select-row > div:after, .rtable-select-header > div:after {\n content: '';\n display: inline-block;\n opacity: 0;\n position: absolute;\n width: 1.2em;\n height: 1.2em;\n top: 0.3em;\n left: 0.15em;\n border-radius: 0.125em;\n }\n \n .rtable-selected .rtable-select-row > div:before, .rtable-all-selected > div:before {\n border-color: "+(t.fga||"#07e")+";\n }\n \n .rtable-selected .rtable-select-row > div:after, .rtable-all-selected > div:after {\n border-color: "+(t.bg||"#fff")+';\n background: no-repeat center/80% url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="'+(t.bg||"#fff").replace(/#/g,"%23")+'" d="m 15.378906,1.7050781 a 1.0583349,1.0583349 0 0 0 -1.478515,0.234375 L 6.6210937,11.960938 1.8652344,8.5058594 a 1.0583349,1.0583349 0 0 0 -1.47851565,0.234375 1.0583349,1.0583349 0 0 0 0.234375,1.4785156 L 6.234375,14.294922 A 1.0584408,1.0584408 0 0 0 7.7128906,14.060547 L 15.613281,3.1835938 A 1.0583349,1.0583349 0 0 0 15.378906,1.7050781 Z" /></svg>\') '+(t.fga||"#07e")+";\n opacity: 1;\n }\n \n .rtable-row-wrap > .rtable-select-header,\n .rtable-row-wrap > .rtable-select-row {\n text-align: center;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: "+(r.selectWidth||"2em")+";\n }\n \n .rtable-row-wrap > .rtable-select-row {\n border-style: solid;\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-width: 0 0 1px 0;\n }\n \n .rtable-inner-row-wrap {\n border-style: solid;\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-width: 0 0 1px 0;\n }\n \n .rtable-column button, .rtable-column .btn {\n padding: 0 0.5em;\n margin: 0.2em 0.5em;\n min-height: 0;\n }\n \n .rtable-column.rtable-editing, .rtable-column.rtable-editing > .rtable-edit {\n padding: 0;\n }\n .rtable-column.rtable-editing input {\n width: 100%;\n box-sizing: border-box;\n height: 100%;\n margin: 0;\n border: none;\n background-color: transparent;\n padding: 0.25em 0.5em;\n }\n \n .rtable-valign-top .rtable-row:not(.rtable-header) .rtable-column > div,\n .rtable .rtable-row:not(.rtable-header) > .rtable-column.rtable-valign-col-top > div {\n display: flex;\n height: 100%;\n align-items: flex-start;\n box-sizing: border-box;\n }\n .rtable-valign-bottom .rtable-row:not(.rtable-header) .rtable-column > div,\n .rtable .rtable-row:not(.rtable-header) > .rtable-column.rtable-valign-col-bottom > div {\n display: flex;\n height: 100%;\n align-items: flex-end;\n box-sizing: border-box;\n }\n .rtable-valign-center .rtable-row:not(.rtable-header) .rtable-column > div,\n .rtable .rtable-row:not(.rtable-header) > .rtable-column.rtable-valign-col-center > div {\n display: flex;\n height: 100%;\n align-items: center;\n box-sizing: border-box;\n }\n "+(e("table.includeGrid")?b(e):"")}.call(this,e)].join(" ")},cssId:"rtable",noCssTransform:!0,attributes:["auto-titles","paginate","items","filter","data-handler","sort-handler","sort","helpers","fixed","allow-select","allow-select-all","border","fixed-header","valign","no-header","empty","shuffle","no-wrap","parameters"],components:{table:!1,Table:!1},syncComputedChildren:!0,decorators:{grid:h,sized:i,scrollother:function e(t,n){var r=this,i=function(i){e.lock&&e.lock!==t||(e.tm&&clearTimeout(e.tm),e.lock=t,r.find(n).scrollLeft=i.target.scrollLeft,e.tm=setTimeout(function(){e.tm=null,e.lock=!1},100))};return t.addEventListener("scroll",i,{passive:!0}),{teardown:function(){t.removeEventListener("scroll",i)}}}},events:{},use:[g({name:"clickd",count:1}),g({name:"dblclickd",count:2}),(void 0===A&&(A={}),function(e){e.instance.transitions[A.name||"expand"]=k}),(void 0===L&&(L={}),function(e){e.instance.decorators[L.name||"scrolled"]=O})],on:{construct:function(){var e,t,n,r,i,o,a,l,s=this.component;if(!s)return;var d=s.template.f||[],c=s.template.m?s.template.m.slice():[],f=s.template;s.template={e:f.e,f:f.f,t:f.t,m:c};var u=0;function h(e,t,n){if(e&&e.f&&1===e.f.length&&2===e.f[0].t){var r="_a"+u++;return c.push({t:13,n:r,f:e.f}),n?r:t?{t:[{t:2,r:"~/"+r}]}:{t:2,r:"~/"+r}}return e&&e.f}function b(e){var t=[],n=[];return e.forEach(function(e){if("column"===e.e||"col"===e.e){var r,i={},o=e.m||N;if(i.index=t.length,t.push(i),i.content=(e.f||[]).filter(function(e){return"edit"!==e.e&&"header"!==e.e}),i.editP=(e.f||[]).find(function(e){return"edit"===e.e}),i.editP&&(i.editP=i.editP.f),(r=o.find(function(e){return"id"===e.n}))&&S(r.f)&&(i.id=r.f),i.label=(e.f||[]).find(function(e){return"header"===e.e}),i.label?(i.label=i.label.f,i.title=o.find(function(e){return"label"===e.n}),i.title||(i.title=o.find(function(e){return"header"===e.n})),i.title&&i.title.f&&(i.title=h(i.title))):(i.label=o.find(function(e){return"label"===e.n}),i.label||(i.label=o.find(function(e){return"header"===e.n})),i.label&&i.label.f&&(i.label=h(i.label))),i.label||(i.label=""),i.id||(i.id=i.label),Array.isArray(i.label)||(i.label=[i.label]),i.type=o.find(function(e){return"type"===e.n}),i.type&&i.type.f&&(i.type=i.type.f),i.type||(i.type="string"),i.filter=o.find(function(e){return"filter"===e.n}),i.filter&&i.filter.f&&(i.filter=h(i.filter),i.filter.r&&(i.filter=i.filter.r)),i.sort=o.find(function(e){return"sort"===e.n}),i.sort&&i.sort.f&&(i.sort=h(i.sort),i.sort.r&&(i.sort=i.sort.r)),i.dir=o.find(function(e){return"dir"===e.n}),i.dir&&i.dir.f&&(i.dir=h(i.dir),i.dir.r&&(i.dir=i.dir.r)),i.hidden=o.find(function(e){return"hidden"===e.n}),i.hidden&&0===i.hidden.f?i.hidden=!0:i.hidden&&E(i.hidden.f)?i.hidden=h(i.hidden):i.hidden=!1,S(i.hidden)&&(i.hidden=!1),i.noPad=o.find(function(e){return"no-pad"===e.n}),i.noPad&&0===i.noPad.f?i.noPad=0:i.noPad&&E(i.noPad.f)?i.noPad=h(i.noPad):delete i.noPad,i.editable=o.find(function(e){return"editable"===e.n}),i.editable&&0===i.editable.f?i.editable=!0:i.editable&&E(i.editable.f)?i.editable=h(i.editable):i.editable=!1,i.valign=o.find(function(e){return"valign"===e.n}),i.valign&&E(i.valign.f)?i.valign=h(i.valign):i.valign&&"string"==typeof i.valign.f&&(i.valign=i.valign.f),i.fixed=o.find(function(e){return"fixed"===e.n}),i.fixed&&E(i.fixed.f)?i.fixed={path:h(i.fixed,!1,!0)}:i.fixed&&"string"==typeof i.fixed.f&&(i.fixed=i.fixed.f),(r=o.find(function(e){return"get"===e.n}))&&r.f){var a=h(r,!1,!0);field.get=function(e){var t=this.get(a);return"function"==typeof t?t.call(this,e):void 0}}i.attrs=o.filter(function(e){return!~R.indexOf(e.n)}),i.attrs.forEach(function(e,t){C.test(e.n)&&(i.attrs[t]={t:13,n:"class-"+e.n})})}else if("field"===e.e){var l,s={},d=e.m||N;if(S(l=d.find(function(e){return"path"===e.n}))?s.path=l:l&&l.f&&(s.path=h(l)),(l=d.find(function(e){return"value"===e.n}))&&l.f&&(s.value=h(l)),S(l=d.find(function(e){return"type"===e.n}))?s.type=l:l&&l.f&&(s.type=h(l)),S((l=d.find(function(e){return"id"===e.n})).f)&&(s.id=l.f),S(l=d.find(function(e){return"dir"===e.n}))?s.dir=l:l&&S(l.f)&&(s.dir=l.f),S(l=d.find(function(e){return"label"===e.n}))?s.label=l:l&&l.f&&(s.label=h(l)),(l=d.find(function(e){return"get"===e.n}))&&l.f){var c=h(l,!1,!0);s.get=function(e){var t=this.get(c);return"function"==typeof t?t.call(this,e):void 0}}s.id||(s.id=s.label),s.path||(s.path=s.id),n.push(s)}}),{fields:n,columns:t}}e=d.find(function(e){return"expand"===e.e}),t=d.find(function(e){return"hover"===e.e}),n=d.find(function(e){return"group"===e.e}),r=d.find(function(e){return"wrapper"===e.e}),i=d.find(function(e){return"row"===e.e}),o=d.find(function(e){return"top"===e.e}),a=d.find(function(e){return"bottom"===e.e}),this._init={sets:b(d),partials:{}};var p=this._init.sets.columns;this._init.sets["meta.expand"]=e&&e.f&&e.f.length&&e.f,this._init.sets["meta.hover"]=t&&t.f&&t.f.length&&t.f,this._init.sets["meta.extra"]=i&&i.f&&i.f.length&&i.f,this._init.sets["meta.top"]=o&&o.f&&o.f.length&&o.f,this._init.sets["meta.topAttrs"]=o&&o.m,this._init.sets["meta.bottom"]=a&&a.f&&a.f.length&&a.f,this._init.sets["meta.bottomAttrs"]=a&&a.m;var g=M(p),v=g[0],m=g[1],w=g[2],x=[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-wrap"},{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-header"},{t:4,f:[{n:"style-opacity",f:"0",t:13}],n:50,x:{r:["~/fixedHeader","~/virtual.offset"],s:"!_0&&_1>0"}},{t:4,n:50,r:"~/fixedHeader",f:[{t:13,n:"style-padding-right",f:[{t:2,r:"~/scrollOffset"},"px"]}]}],f:[{t:7,e:"div",f:[{t:8,r:"grid-head-cols"}],m:[{t:13,n:"class-row"}]}]}];x[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-header"},{t:13,n:"class-rtable-column"},{t:13,n:"title",f:[{t:2,r:"selections.length"}," items selected"]},{t:13,n:"class-rtable-all-selected",f:[{t:2,x:{r:["@this"],s:"_0._allSelected()"}}]}],f:[{t:7,e:"div",f:[{t:4,n:50,r:"~/allowSelectAll",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["@this"],s:"_0._allSelected()"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:"selectAll"}]}]}],m:[{t:70,n:["clickd"],f:"selectAll"}]}]}]});var _,y=[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-wrap"},{t:13,n:"class-rtable-odd",f:[{t:2,x:{r:["@index","~/virtual.offset"],s:"(_0+_1)%2===1"}}]},{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-live"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-inner-row-wrap"}],f:[{t:7,e:"div",f:[{t:8,r:"grid-row-cols"}],m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-row"},{t:70,n:e&&e.f?["dblclickd"]:["click","dblclick"],f:{r:["@this","~/rows","~/visibleRows","."],s:"[_0._open(_3,_1.indexOf(_3),_2.indexOf(_3))]"}}]}]}]}];i&&i.m&&i.m.length&&(this._init.sets.rowAttrs=i.m.slice(),y[0].f[0].f[0].m.push({t:16,r:"~/rowAttrs",c:{r:"."},z:w}));r&&r.m&&r.m.length&&(this._init.sets.wrapperAttrs=r.m.slice(),y[0].m.push({t:16,r:"~/wrapperAttrs",c:{r:"."},z:w}));i&&i.f&&i.f.length&&y[0].f[0].f.push({t:7,e:"div",m:[{t:13,n:"class-rtable-row-extra"},{t:4,n:50,r:"~/noWrap",f:[{t:13,n:"style-width",f:[{t:2,x:{r:["~/tableWidth","~/allowSelect","@style.raui.table.selectWidth"],s:"_1?'calc('+_0+'px - '+(_2||'2em')+')':_0+'px'"}}]}]}],f:[{t:16,r:"~/meta.extra",c:{r:"."},z:w}]});if(e&&e.f&&e.f.length){var k={t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}},O=e.m&&e.m.find(function(e){return"skip"===e.n});O=O&&O.f&&O.f[0]&&2===O.f[0].t?Object.assign({},O.f[0],{t:4,n:51,f:[k]}):k,y[0].f[0].f.push({t:4,n:50,x:{r:[".","~/expanded"],s:"_0===_1"},f:[{t:7,e:"div",f:[{t:7,e:"div",f:[{t:16,r:"~/meta.expand",c:{r:"."},z:w}]}],m:[{t:13,n:"class-rtable-row-expand"},{t:4,n:50,r:"~/noWrap",f:[{t:13,n:"style-width",f:[{t:2,x:{r:["~/tableWidth","~/allowSelect","@style.raui.table.selectWidth"],s:"_1?'calc('+_0+'px - '+(_2||'2em')+')':_0+'px'"}}]}]}]}]}),y[0].f[0].f[0].m.push(O),y[0].f[0].f[1].f[0].m.push({t:70,n:["click"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}})}t&&t.f&&t.f.length&&(y[0].f[0].f.unshift({t:4,n:50,x:{r:[".","~/hovered"],s:"_0===_1"},f:[{t:7,e:"div",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-hover-content"}].concat(t.m||[]),f:[{t:16,r:"~/meta.hover",c:{r:"."},z:w}]}],m:[{t:13,n:"class-rtable-row-hover"},{t:4,n:50,r:"~/noWrap",f:[{t:13,n:"style-width",f:[{t:2,x:{r:["~/tableWidth","~/allowSelect","@style.raui.table.selectWidth"],s:"_1?'calc('+_0+'px - '+(_2||'2em')+')':_0+'px'"}}]}]}]}]}),y[0].m.push({t:70,n:["mouseenter"],f:{r:["@this","@index"],s:"[_0._hover(_1)]"}},{t:70,n:["mouseleave"],f:{r:["@this","@index"],s:"[_0._unhover(_1)]"}}));if(y[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-row"},{t:13,n:"class-rtable-column"},{t:70,n:["clickd"],f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}}],f:[{t:7,e:"div",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}}]}]}]}]}),n&&n.m&&(_=n.m.find(function(e){return"by"===e.n}))&&(S(_.f)||1===_.length&&2===_[0].t)){var P={t:4,n:50,f:[{t:7,e:"div",m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-group"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:70,n:e&&e.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(n.m.filter(function(e){return"by"!==e.n&&"select"!==e.n}))}],x:{s:"_0&&_1[(_1&&(_2*_3+_4))||_4]",r:["~/showGroups","~/groups","~/page","~/pagination.per","@index"]}};y.unshift(P),this._init.by=_.f;var L,A=b(n.f).columns.filter(function(e){return!0!==e.hidden}).map(function(e){var t={t:7,e:"div",f:[{t:7,e:"div",f:e.content}],m:e.attrs};e.type&&t.m.unshift({t:13,n:"class-rtable-"+e.type+"-column"}),t.m.push({t:13,n:"class-rtable-column"}),t.m.find(function(e){return"title"===e.n})||t.m.unshift({t:13,n:"title",f:e.content});var n=t;return e.hidden&&e.hidden.r&&(n={t:4,n:51,r:e.hidden.r,f:[t]}),n});A.unshift({t:4,n:50,r:"~/allowGroupSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-row"},{t:13,n:"class-rtable-column"},{t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._selectGroup(_1),false]"}},{t:13,n:"class-rtable-all-selected",f:[{t:2,x:{r:["@this","@index"],s:"_0._groupSelected(_1)"}}]}],f:[{t:7,e:"div",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["@this","@index"],s:"_0._groupSelected(_1)"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:{r:["@this","@index"],s:"[_0._selectGroup(_1),false]"}}]}]}]}]}),(L=n.m.find(function(e){return"select"===e.n}))&&(l||(l=[])).push(Object.assign({},L,{n:"allowGroupSelect"})),(L=n.m.find(function(e){return"show"===e.n}))&&(l||(l=[])).push(Object.assign({},L,{n:"showGroups"})),P.f[0].f=A}this._init.partials["grid-row"]=y,this._init.partials["grid-row-cols"]=m,this._init.partials["grid-head"]=x,this._init.partials["grid-head-cols"]=v,l&&this.component&&(this.component.mappings=l)},config:function(){this.set(this._init.sets),Object.assign(this.partials,this._init.partials)},render:function(){this._autoObserver&&this._autoObserver.fire()},selectAll:function(){var e,t;return this._allSelected()?(t=null,e=[],this.set({selections:e,selected:t})):(t=(e=("virtual"===this.get("paginate")?this.get("rows"):this.get("visibleRows")).slice())[0],this.set({selections:e,selected:t})),this.fire("selection",{},{item:t,items:e}),!1},selectAllAll:function(){var e=this.get("rows").slice();return this.set({selections:e,selected:null}),this.fire("selection",{},{item:null,items:e}),!1}},observe:{_rows:function(){var e=this;this._rowbounce&&clearTimeout(this._rowbounce),setTimeout(function(){return e._rows()},this.get("@style.raui.table.debounce")||160)},paginate:{handler:function(e){var n=this;if("auto"===e||"virtual"===e||e instanceof t){this._autoObserver&&this._autoObserver.cancel(),this._scrollListener&&this._scrollListener.cancel();("auto"===e||"virtual"===e)&&this.root;var r,i=!1,o=function(){if(n.rendered){var t=n.find(".rtable-top");if(t)if(n.get("items.length")){var r=t.clientHeight+","+t.clientWidth;if(o.last!==r||!i){var a=n.getContext(t);a.decorators&&a.decorators.scrolled&&a.decorators.scrolled.refresh();var l=n.find(".rtable-header")||{},s=Array.apply(null,n.findAll(".rtable-live")).map(function(e){return e.offsetHeight});if(s.length<5){var d=Math.floor(t.clientHeight/(l.offsetHeight||1));d<5&&(d=5),n.set("_paginate",d),s=Array.apply(null,n.findAll(".rtable-live")).map(function(e){return e.offsetHeight})}s.length>0?i=!0:s=[25];var c=Math.ceil(s.reduce(function(e,t){return e+t},0)/s.length);n._avgSize=c;var f=Math.floor((t.clientHeight-(l.offsetHeight||1))/c);"virtual"===e&&(f+=10)<30&&(f=30),n.set("_paginate",f),o.last=r}}else n._autoLenObserver||(n._autoLenObserver=n.observeOnce("items",function(){n._autoLenObserver=0,setTimeout(o)}))}},a=function(){r&&clearTimeout(r),r=setTimeout(function(){o(),r=null,i&&n._scrollListener&&n._scrollListener.fn()},50)};if(this._autoObserver=this.observe("~/tableHeight",a),this._autoObserver.fire=a,"virtual"===e){var l,s=!1,d=function(){if(n.rendered){if(l||(l=n.find(".rtable-top")),!i)return a();var e=l.scrollTop,t=n.get("virtual")||{},r=t.offset,o=n.get("_paginate"),d=o-10,c=n.get("rows.length");o>c&&(o=c);var f=n._avgSize,u=d*f,h=Math.floor(e/f)-5;h<0&&(h=0);var b=h;if(h+o>c&&(h=c-o),r===h&&!isNaN(t.top))return s=!1;if(!P(r)||isNaN(r)||isNaN(t.top)||e<t.top+u||e>t.bottom-u||r>0&&e<f*d){var p=b,g=c-b-o;p<0?(g+=-1*p,p=0):p>c-o&&(p=c-o),g<0&&(g=0);var v,m,w=p*f,x=g*f;h<r+o&&h>r-o&&(v=h>r?n.findAll(".rtable-live")[h-r]:n.findAll(".rtable-live")[r-h]),v&&h>0&&v.offsetTop>l.scrollTop-u-5&&v.offsetTop<l.scrollTop+u&&(m=v.offsetTop),n.set({"virtual.above":w,"virtual.below":x,"virtual.offset":h}),"number"==typeof m&&m!==v.offsetTop&&n.set("virtual.above",w+(m-v.offsetTop)),n.set({"virtual.top":n.get("virtual.above"),"virtual.bottom":l.scrollHeight-x})}s=!1}else l=null},c=this._scrollListener=this.on("scroll",function(e){e.node;s||(s=!0,requestAnimationFrame(d))});c.fn=d,c.observer=this.observe("rows.length",function(){n.set("virtual.offset",null),d()},{init:!1,strict:!0,defer:!0});var f=c.cancel;c.cancel=function(){f(),c.observer.cancel()}}a()}else this._autoObserver&&this._autoObserver.cancel(),this._scrollListener&&this._scrollListener.cancel();P(e)&&this.set("_paginate",e)},defer:!0},"scrollOffset tableHeight":{handler:function(){var e=this;requestAnimationFrame(function(){var t=e.find(".rtable-top"),n=t&&e.getContext(t);n&&n.decorators&&n.decorators.scrolled&&n.decorators.scrolled.refresh()})},init:!1},scroll:function(e,t){~(e||"").indexOf("top")&&!~(t||"").indexOf("top")&&this.fire("scrolltop",{}),~(e||"").indexOf("bottom")&&!~(t||"").indexOf("bottom")&&this.fire("scrollbottom",{})}},data:function(){return Object.assign({page:0,selections:[],showGroups:!0,allowGroupSelect:!0,expanded:null,minPerPage:10,virtual:{offset:0},shuffle:!1,rows:[]},z.settings)},computed:{allowSelect:function(){return this.get("allow-select")},allowSelectAll:function(){return this.get("allow-select-all")},fixedHeader:function(){return this.get("fixed-header")},autoTitles:function(){return this.get("auto-titles")},noHeader:function(){return this.get("no-header")},noWrap:function(){return this.get("no-wrap")},_rows:function(){var e=(this.get("items")||[]).slice(),t=this.get("filter"),n=this.get("sort"),r=this.get("parameters"),i=(this.get("data-handler"),this.get("@style.raui.table.data-handler"),[this.get("data-pre-handler"),this.get("@style.raui.table.data-pre-handler")]),o=i[0],a=i[1];return(o||a)&&(o||a)(this,e,t,n,r),{}},visibleRows:function(){var e=this,n=this.get("rows"),r=this.get("paginate"),i=r,o=this.get("_paginate"),a=this.get("page")||0,l=this.get("virtual");return i?("number"!=typeof i&&isNaN(+i)&&(i="auto"===i||"virtual"===i||i instanceof t?o||1:30),i<this.get("minPerPage")&&(i=this.get("minPerPage")),"virtual"===r?(a=l&&l.offset||0,n.slice(a,a+i)):(a*i>n.length&&setTimeout(function(){return e.set("page",0)},0),n.slice(i*a,i*a+i))):n},pagination:function(){var e=this.get("items")||N,t=this.get("rows"),n=this.get("paginate"),r=n,i=this.get("page")||0;if("number"!=typeof r&&isNaN(r)&&(r=this.get("_paginate")),r<this.get("minPerPage")&&(r=this.get("minPerPage")),r){var o=Math.ceil(t.length/r),a={max:Math.ceil(e.length/r),total:o,per:r};if("virtual"===n&&(a.height=this._avg*t.length),a.total>14){var l=a.array=[];i>5?l.push(1,2,3,"..."):l.push(1,2,3,4,5,6,7,8),i>5&&i+6<o?l.push(i-1,i,i+1,i+2,i+3,"...",o-2,o-1,o):i+6<o?l.push("...",o-2,o-1,o):l.push(o-7,o-6,o-5,o-4,o-3,o-2,o-1,o)}else a.array=Array.apply(null,{length:a.total}).map(function(e,t){return t+1});return a}},groups:function(){for(var e,t,n=this.get("rows"),r={},i=0;i<n.length;i++)(t=n[i][this._init.by])!=e&&(r[i]=1),e=t;return r}}});var H=/^[^\d]*/;function W(e){return P(e)?e:e&&(e=(""+e).replace(H,""))?parseFloat(e):1/0}function T(e,n,r){if("function"==typeof n.get)return n.get;var i=(r?n.sort:0)||n.path||n.filter||n.id;if("string"==typeof i){var o=t.splitKeypath(i);return function(e){for(var t=e,n=0;n<o.length;n++)t=t&&t[o[n]];return t}}}function j(e,t,n,r){var i=[].concat(e.viewmodel.value.columns,e.viewmodel.value.fields),o=i.reduce(function(e,t){return e[t.id]=T(0,t),e},{}),a=Object.values(o),l=t||[];if((n instanceof RegExp||S(n))&&n){var s=n===""+n.toLowerCase()||n===""+n.toUpperCase();try{var d=S(n)?new RegExp(n,s?"i":""):n;l=l.filter(function(e){for(var t=a.length;t--;){var n=e&&a[t](e);if(n&&d.test(n))return!0}})}catch(e){}}return(S(r)||E(r)&&!Array.isArray(r))&&(r=[r]),Array.isArray(r)&&(r=r.map(function(t){if(S(t)){var n="-"===t[0]||"+"===t[0]?t.substr(1):t,r=i.find(function(e){return e.id===n});if(!r)return;var o={get:T(0,r,!0),dir:"-"===t[0]?-1:1};if(r&&"number"===r.type){var a=o.get;o.get=function(t){return W(a.call(e,t))}}return o}if(t&&"object"==typeof t){var l=i.find(function(e){return e.id===id});if(!l)return;var s={dir:P(t.dir)?t.dir:"desc"===t.dir?-1:1,get:T(0,l,!0)};if("number"===t.type||l&&"number"===l.type){var d=s.get;s.get=function(t){return W(d.call(e,t))}}return s}}).filter(function(e){return e&&e.get}),l.sort(function(t,n){for(var i,o,a,l=0;l<r.length;l++)if(i=r[l].get.call(e,t),o=r[l].get.call(e,n),0!==(a=r[l].dir*(i<o?-1:i>o?1:0)))return a;return a})),l}function M(e){var t=[{n:"gridValue",x:{r:"~/gridValue"}},{n:"gridName",x:{r:"~/gridName"}},{n:"gridSize",x:{r:"~/tableWidth"}},{n:"gridMax",x:{r:"~/gridMax"}},{n:"table",x:{r:"@this"}}];return[e.filter(function(e){return!0!==e.hidden}).map(function(e,n){null==e.index&&(e.index=n),e.attrsHP=e.attrs.filter(function(e){return"title"!==e.n});var r={t:7,e:"div",f:[{t:7,e:"div",f:[{t:16,r:"~/columns."+n+".label",c:{r:"."},z:t}]}],m:[{t:13,n:"title",f:e.title||e.label},{t:16,r:"~/columns."+n+".attrsHP",z:t}]};if(e.type&&r.m.push({t:13,n:"class-rtable-"+e.type+"-column"}),(e.filter||e.sort)&&r.m.push({t:13,n:"class-rtable-sortable"},{t:4,n:53,r:"~/columns."+n,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:"[_0._setSort(_1,_2)]"}}]}),r.m.push({t:13,n:"class-rtable-column"}),e.fixed){var i=e.fixed.path||"~/columns."+n+".fixed";r.m.push({t:13,n:"class-rtable-fixed-column",f:[{t:2,r:i}]}),r.m.push({t:4,n:50,x:{r:["~/noWrap",i],s:"_0&&typeof _1==='string'"},f:[{t:13,n:"style-left",f:[{t:2,r:i}]}]})}var o=r;return e.hidden&&e.hidden.r&&(o={t:4,n:51,r:e.hidden.r,f:[r]}),o}),e.filter(function(e){return!0!==e.hidden}).map(function(e,n){var r=[{t:7,e:"div",f:[{t:16,r:"~/columns."+n+".content",c:{r:"."},z:t}]}];e.attrs.length?(e.attrsP=e.attrs,e.attrs=[{t:16,r:"~/columns."+n+".attrsP",c:{r:"."},z:t}]):e.attrs=[];var i=e.attrs;if(e.fixed){var o=e.fixed.path||"~/columns."+n+".fixed";i.push({t:13,n:"class-rtable-fixed-column",f:[{t:2,r:o}]}),i.push({t:4,n:50,x:{r:["~/noWrap",o],s:"_0&&typeof _1==='string'"},f:[{t:13,n:"style-left",f:[{t:2,r:o}]}]})}if(e.editable&&(e.filter||e.editP)){var a={t:70,n:["click","mousedown","pointerdown","MSPointerDown","touchstart"],f:{r:["@event"],s:"[_0.stopPropagation()]"}},l=[{t:4,n:50,x:{r:["~/columns."+n+".editP"],s:"Array.isArray(_0)"},f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-edit"},a],f:[{t:16,r:"~/columns."+n+".editP"}]}]},{t:4,n:50,l:1,x:{r:["~/columns."+n+".type"],s:"_0==='boolean'"},f:[{t:7,e:"input",m:[{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,r:e.filter}]},a]}]},{t:4,n:51,l:1,f:[{t:7,e:"input",m:[{t:13,n:"value",f:[{t:2,r:e.filter}]},a]}]}];"object"==typeof e.editable?(i.push({t:13,n:"class-rtable-editing",f:e.editable}),r=[Object.assign({},e.editable,{t:4,n:50,f:l}),{t:4,n:51,l:1,f:r}]):(i.push({t:13,n:"class-rtable-editing"}),r=l)}e.valign&&i.push({t:13,n:"class-rtable-valign-col-top",f:[{t:2,x:{r:["~/columns."+n+".valign"],s:"_0==='top'"}}]},{t:13,n:"class-rtable-valign-col-bottom",f:[{t:2,x:{r:["~/columns."+n+".valign"],s:"_0==='bottom'"}}]},{t:13,n:"class-rtable-valign-col-center",f:[{t:2,x:{r:["~/columns."+n+".valign"],s:"_0==='center'"}}]});var s={t:7,e:"div",f:r,m:i};e.type&&i.unshift({t:13,n:"class-rtable-"+e.type+"-column"}),i.push({t:13,n:"class-rtable-column"});var d=e.attrsP&&e.attrsP.find(function(e){return"title"===e.n});d?d.f||(i.unshift({t:13,n:"title",f:e.content.find(function(e){return e.e})?e.label:e.content}),e.attrsP.splice(i.indexOf(d),1)):i.unshift({t:4,n:50,r:"~/autoTitles",f:[{t:13,n:"title",f:e.content.find(function(e){return e.e})?e.label:e.content}]}),0===e.noPad?i.push({t:13,n:"class-rtable-no-pad"}):e.noPad&&i.push({t:13,n:"class-rtable-no-pad",f:e.noPad});var c=s;return e.hidden&&e.hidden.r&&(c={t:4,n:51,r:e.hidden.r,f:[s]}),c}),t]}var R=["label","type","filter","hidden","sort","no-pad","id","editable","fixed"],C=/^[a-z]{1,3}[0-9]+(?:-[0-9]+)?$/,N=[];function G(e){return void 0===e&&(e={}),function(t){var n=t.Ractive,r=t.instance;"includeGrid"in e&&n.styleSet("table.includeGrid",e.includeGrid),r.components[e.name||"data-table"]=z}}r("RauiTable","components",z),e.Table=z,e.numberify=W,e.plugin=G,e.default=G,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],t):t(e.RauiTable={},e.Ractive)}(this,function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n="undefined"!=typeof window?window:null;function r(e,t,r){if(n&&n.Ractive&&"object"==typeof n.Ractive[t]){var i=document.currentScript;if(i||(i=(i=document.querySelectorAll("script"))[i.length-1]),i){var o=i.getAttribute("data-alias");o&&(o=(o=o.split("&")).reduce(function(e,t){var n=t.split("="),r=n[0],i=n[1];return e[r]=i,e},{})),Ractive[t][o&&o[e]||e]=r}}}function i(e,t){var n=t.context||this.getContext(e),r={position:e.style.position,overflowY:e.style.overflowY};""!==e.style.position&&"static"!==e.style.position||(e.style.position="relative");var i=function(){t.offsetWidth&&n.set(t.offsetWidth,e.offsetWidth),t.offsetHeight&&n.set(t.offsetHeight,e.offsetHeight),t.clientWidth&&n.set(t.clientWidth,e.clientWidth),t.clientHeight&&n.set(t.clientHeight,e.clientHeight),t.diffWidth&&n.set(t.diffWidth,e.offsetWidth-e.clientWidth),t.diffHeight&&n.set(t.diffHeight,e.offsetHeight-e.clientHeight)},a=o(e,i);return{refresh:i,teardown:function(){e.removeChild(a),e.style.position=r.position,e.style.overflowY=r.overflowY}}}function o(e,t){var n=document.createElement("object");return n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;"),n.setAttribute("tabindex","-1"),n.type="text/html",n.onload=function(){n.contentDocument.defaultView.addEventListener("resize",t),t()},/Trident/.test(navigator.userAgent)?(e.appendChild(n),n.data="about:blank"):(n.data="about:blank",e.appendChild(n)),n}var a,l=16;function s(e){l=e}function d(e){return a||function e(){!a&&window&&"document"in window&&"function"==typeof document.createElement&&((a=document.createElement("div")).setAttribute("style","position: absolute; left: -2em; width: 1em; height: 1em;"),o(a,function(){return s(a.getBoundingClientRect().width)}),window.addEventListener("resize",function(){e(),s(a.getBoundingClientRect().width)})),a&&!a.parent&&document.body.appendChild(a)}(),"string"==typeof e&&(e=e.replace(/[^-.\d]/g,"")),+e*l}var c={tiny:{units:[2,3,4,5,6,8],max:"0",value:0},xsmall:{units:[2,3,4,5,6,8,10,12],max:"20em",prefix:"xs",value:10},small:{units:[2,3,4,5,6,8,10,12],max:"36em",value:20},medium:{units:[2,3,4,5,6,8,10,12],max:"48em",value:30},large:{units:[2,3,4,5,6,8,10,12,16,20],max:"64em",value:40},xlarge:{units:[2,3,4,5,6,8,10,12,16,20],max:"100em",value:50},ginormous:{units:[2,3,4,5,6,8,10,12,16,20],max:"150em",value:60}},f={"grid grid-root":/\bgrid grid-root\b/g},u=/\s+/g;function h(e,t){var n,r,o=this.getContext(e),a=this,l=t||{};function s(t){if("number"==typeof l.offset&&(t-=l.offset),!l.type||"class"===l.type){var i,a=e.className,s=-1,d=[];for(var c in n)f[c].lastIndex=-1,n[c]<=t?(f[c].test(a)||(a+=" "+c),n[c]>s&&(s=n[c],i=c,d.push(i))):a=a.replace(f[c],"").trim();if(e.className=a.replace(u," "),!i)return;l.value&&o.set(l.value,r[i].value),l.name&&o.set(l.name,i),l.size&&o.set(l.size,t),l.max&&o.set(l.max,s),l.classes&&o.set(l.classes,d.join(" ")),l.matches&&o.set(l.matches,d)}}function h(){for(var t in r=a.get("@style.break")||c,n={},r)n[t]=d(r[t].max),f[t]||(f[t]=new RegExp("\\b"+t+"\\b","g"));s(e.clientWidth)}var b=this.observe("@style.break",h,{init:!1}),p=o.observe("@local.width",s,{init:!1}),g=i.call(this,e,{clientWidth:"@local.width"});return e.className+=" grid grid-root",l.immediate?h():requestAnimationFrame(h),{update:function(t){l=t||{},requestAnimationFrame(function(){return s(e.clientWidth)})},teardown:function(){e.className=e.className.replace(f["grid grid-root"],"").trim(),p.cancel(),b.cancel(),g.teardown()}}}function b(e,t){var n=e("raui.grid.break")||t||c,r=(e("raui.grid.wrappers")||[".row-wrap > ",".row-wrap > .row-wrap > "]).slice();r.unshift("");var i=".row > * { position: relative; width: 100%; transition-duration: 0.2s; transition-timing-function: ease-in-out; transition-property: padding, margin; box-sizing: border-box; }\n.grid { display: block; }\n.grid .row { display: flex !important; flex-wrap: wrap; min-height: fit-content; width: 100%; align-content: flex-start; }\n.grid .row.row-pad > * { padding: "+(e("raui.grid.padding")||"0.5em")+"; }\n.grid .row > .pad { display: flex; flex-direction: column; padding: "+(e("raui.grid.padding")||"0.5em")+"; box-sizing: border-box; }",o=Object.keys(n).map(function(e){return(n[e].key=e)&&n[e]});return o.sort(function(e,t){return e.value>t.value?1:e.value<t.value?-1:0}),o.forEach(function(t){var n=t.prefix||t.key[0],o={};t.units.forEach(function(e){for(var t=1;t<e;t++){var n=""+t/e*100;n=n.substr(0,n.indexOf(".")+3),o[n]||(o[n]=[]),o[n].push(t+"-"+e)}});var a=t.key;i+="\n"+[r.map(function(e){return"."+a+" > "+e+"."+n+"1, ."+a+" > "+e+".row > ."+n+"1"}).join(", "),"."+a+" ."+n+"-n1, ."+a+" .row-"+n+"-n1 > *"].filter(function(e){return e}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: 100%; flex-grow: 0; flex-shrink: 0; }\n"+[r.map(function(e){return"."+a+" > "+e+"."+n+"0, ."+a+" > "+e+".row > ."+n+"0"}).join(", "),"."+a+" ."+n+"-n0, ."+a+" .row-"+n+"-n0 > *"].filter(function(e){return e}).join(", ")+" { display: none; flex-grow: 0; flex-shrink: 0: }\n"+Object.keys(o).map(function(t){return o[t].map(function(e){return""+[r.map(function(t){return"."+a+" > "+t+".row-"+n+e+" > *, ."+a+" > "+t+"."+n+e+", ."+a+" > "+t+".row > ."+n+e}).join(", "),"."+a+" .row-"+n+"-n"+e+" > * .row > ."+n+"-n"+e+", ."+a+" ."+n+"-n"+e+", ."+a+" .row-"+n+"-n"+e+" > *"].filter(function(e){return e}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: "+t+"%; flex-grow: 0; flex-shrink: 0; }"}).join("\n")+"\n"+[r.map(function(e){return"."+a+" > "+e+".row > "+n+"-fill, ."+a+" >"+e+".row > ."+n+"-auto"}).join(", "),"."+a+" ."+n+"-nfill, ."+a+" ."+n+"-nauto"].filter(function(e){return e}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: auto; flex-grow: 1; flex-shrink: 1; }"}),i}h.style=b,r("grid","decorators",h);var p=250;function g(e){return void 0===e&&(e={}),function(t){var n=t.Ractive;t.instance.events[e.name||(e.count||"")+"clicks"]=function(t,r,i){var o,a=Object.assign({},e,i);return(o=t.__r_clicks__)?o.subscribe(a.count||1,!!a.hold,r):(o=new v(n.getContext(t),a.delay||p,a.bubble||!1),t.__r_clicks__=o,o.subscribe(a.count||1,!!a.hold,r)),{teardown:function(){o.unsubscribe(a.count||1,!!a.hold,r)}}}}}g({name:"click",count:1}),g({name:"dblclick",count:2}),g({name:"trpclick",count:3});var v=function(e,t,n){this.context=e,this.node=e.node,this.delay=t,this.fires={},this.refs=0,this.bubble=n,this.bind()};function m(e){return this.__r_clicks__.mousedown(e)}function w(e){return this.__r_clicks__.touchdown(e)}function x(){this.addEventListener("keydown",y,!1),this.addEventListener("blur",_,!1)}function _(){this.removeEventListener("keydown",y,!1),this.removeEventListener("blur",_,!1)}function y(e){if(32===e.which||10===e.which||13===e.which)return this.__r_clicks__.fire()}function k(e,t){var n=e.processParams(t,{duration:200,easing:"easeInOut"});return new Promise(function(t){requestAnimationFrame(function(){e.setStyle("overflow","hidden");var r="x"===n.axis?"width":"height";if(e.isIntro||n.intro){var i=e.getStyle(r);e.setStyle(r,0),e.setStyle("opacity",0),t(e.animateStyle(r,i,n).then(function(){return e.animateStyle("opacity",1,n)}).then(function(){e.setStyle(r,""),e.setStyle("overflow","")}))}else e.setStyle(r,e.getStyle(r)),e.setStyle("opacity",1),t(e.animateStyle("opacity",0,n).then(function(){return e.animateStyle(r,0,n)}))})})}function O(e,t){void 0===t&&(t={});var n="string"==typeof t?t:t.bind;if("string"!=typeof n)return{teardown:function(){}};var r,i=t.allow||2,o=this.getContext(e),a=!1;function l(){a=!1;var t="";e.scrollHeight>e.clientHeight&&(t+="vscroll"),e.scrollWidth>e.clientWidth&&(t+=(t?" ":"")+"hscroll"),e.scrollTop<=i&&(t+=" top"),e.scrollTop>=e.scrollHeight-e.clientHeight-i&&(t+=" bottom"),~t.indexOf("top")||~t.indexOf("bottom")||(t+=" vmiddle"),e.scrollLeft<=i&&(t+=" left"),e.scrollLeft>=e.scrollWidth-e.clientWidth-i?t+=" right":~t.indexOf("left")||~t.indexOf("right")||(t+=" hmiddle"),o.set(n,t),o.hasListener("scrolled")&&o.raise("scrolled",{})}return e.addEventListener("scroll",l,{passive:!0}),requestAnimationFrame(l),{refresh:function(){a||(r&&clearTimeout(r),r=setTimeout(function(){r=null,a=!0,requestAnimationFrame(l)},250))},teardown:function(){e.removeEventListener("scroll",l),o.set(n,"")}}}function S(e){return"string"==typeof e}function P(e){return"number"==typeof e}function E(e){return"object"==typeof e}v.prototype.subscribe=function(e,t,n){(this.fires[e+","+t]||(this.fires[e+","+t]=[])).push(n),this.refs++},v.prototype.unsubscribe=function(e,t,n){var r=this.fires[e+","+t]||[];r.splice(r.indexOf(n),1),this.refs--,this.refs||this.teardown()},v.prototype.bind=function(){window.PointerEvent||window.navigator.pointerEnabled?this.node.addEventListener("pointerdown",m):window.navigator.msPointerEnabled?this.node.addEventListener("MSPointerDown",m):(this.node.addEventListener("mousedown",m),this.node.addEventListener("touchstart",w)),"A"!==this.node.tagName&&"BUTTON"!==this.node.tagName&&"button"!==this.node.type&&"submit"!==this.node.type&&"checkbox"!==this.node.type&&"radio"!==this.node.type||this.node.addEventListener("focus",x)},v.prototype.fire=function(e,t,n,r){var i=this;this.tm?(this.tmCount++,clearTimeout(this.tm)):this.tmCount=1;var o=function(){i.tm=null,(i.fires[i.tmCount+","+!!r]||[]).forEach(function(o){o({node:i.node,original:e,x:t,y:n,hold:!!r})})};return r?o():this.tm=setTimeout(o,this.delay),this.bubble},v.prototype.mousedown=function(e){var t=this;if(!this.preventMousedownEvents&&(void 0===e.which||1===e.which)){var n,r=e.clientX,i=e.clientY,o=e.pointerId,a=function(e){e.pointerId==o&&(t.fire(e,r,i),s())},l=function(e){e.pointerId==o&&(Math.abs(e.clientX-r)>=12||Math.abs(e.clientY-i)>=12)&&s()},s=function(){n&&clearTimeout(n),t.node.removeEventListener("MSPointerUp",a,!1),document.removeEventListener("MSPointerMove",l,!1),document.removeEventListener("MSPointerCancel",s,!1),t.node.removeEventListener("pointerup",a,!1),document.removeEventListener("pointermove",l,!1),document.removeEventListener("pointercancel",s,!1),t.node.removeEventListener("click",a,!1),document.removeEventListener("mousemove",l,!1)};return window.PointerEvent||window.navigator.pointerEnabled?(this.node.addEventListener("pointerup",a,!1),document.addEventListener("pointermove",l,!1),document.addEventListener("pointercancel",s,!1)):window.navigator.msPointerEnabled?(this.node.addEventListener("MSPointerUp",a,!1),document.addEventListener("MSPointerMove",l,!1),document.addEventListener("MSPointerCancel",s,!1)):(this.node.addEventListener("click",a,!1),document.addEventListener("mousemove",l,!1)),n=setTimeout(function(){s(),t.fire(e,r,i,!0)},400),this.bubble||e.stopPropagation(),this.bubble}},v.prototype.touchdown=function(e){var t,n=this,r=e.touches[0],i=r.clientX,o=r.clientY,a=r.identifier,l=function(e){e.changedTouches[0].identifier===a?(e.preventDefault(),n.preventMousedownEvents=!0,clearTimeout(n.preventMousedownTimeout),n.preventMousedownTimeout=setTimeout(function(){n.preventMousedownEvents=!1},400),n.fire(e,i,o),d()):d()},s=function(e){1===e.touches.length&&e.touches[0].identifier===a||d();var t=e.touches[0];(Math.abs(t.clientX-i)>=12||Math.abs(t.clientY-o)>=12)&&d()},d=function(){t&&clearTimeout(t),n.node.removeEventListener("touchend",l,!1),window.removeEventListener("touchmove",s,!1),window.removeEventListener("touchcancel",d,!1)};return this.node.addEventListener("touchend",l,!1),window.addEventListener("touchmove",s,!1),window.addEventListener("touchcancel",d,!1),t=setTimeout(function(){d(),n.fire(e,i,o,!0)},400),this.bubble||e.stopPropagation(),this.bubble},v.prototype.teardown=function(){this.node.removeEventListener("pointerdown",m),this.node.removeEventListener("MSPointerDown",m),this.node.removeEventListener("mousedown",m),this.node.removeEventListener("touchstart",w),this.node.removeEventListener("focus",x),delete this.node.__r_clicks__},r("expand","transitions",k);var L,A,z=function(e){function t(t){e.call(this,t)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={selections:{configurable:!0},selected:{configurable:!0},rows:{configurable:!0},visibleRows:{configurable:!0},allRows:{configurable:!0}};return t.prototype._allSelected=function(){for(var e=this.get("selections"),t="virtual"===this.get("paginate")?this.get("rows"):this.get("visibleRows"),n=0;n<t.length;n++)if(!~e.indexOf(t[n]))return!1;return t.length&&!0},t.prototype._setSort=function(e,t){var n=[this.get("sort-handler"),this.get("@style.raui.table.sort-handler")],r=n[0]||n[1];if(r)r(this,this.get("columns."+e),e,t);else{var i=this.get("sort")||"",o=this.get("columns."+e).id;i===o||i.substr(1)===o?"-"===i[0]?this.set("sort",o):this.set("sort","-"+o):this.set("sort",o)}},t.prototype.nodeSet=function(e,t,n){e[t]=n},t.prototype._expand=function(e){var t=this,n=this.get("visibleRows")[e],r=this.get("expanded"),i=this.find(".rtable-row-expand");i?this.transition("expand",i,{outro:!0}).then(function(){r===n?t.set("expanded",null):(t.set("expanded",n),t.transition("expand",t.find(".rtable-row-expand"),{intro:!0}))}):n===r?this.set("expanded",null):(this.set("expanded",n),this.transition("expand",this.find(".rtable-row-expand"),{intro:!0}))},t.prototype._hover=function(e){return this.set("hovered",this.get("~/visibleRows")[e]),!1},t.prototype._unhover=function(e){if(!this.find(".rtable-top .rtable-row-wrap:hover"))return this.set("hovered",void 0),!1},t.prototype._select=function(e,t){var n=this.get("selections");n||(n=[],this.set("selections",n));var r=n.indexOf(e);return~r?this.splice("selections",r,1):this.push("selections",e),(r>=n.length||1===n.length)&&this.set("selected",n[n.length-1]),this.fire("selection",{},{item:n[n.length-1],items:n}),setTimeout(function(){return t.target.checked=!~r}),!1},t.prototype._open=function(e,t,n){var r=this;this._opentm||(this.fire("selected",{},e,t,n),this._opentm=setTimeout(function(){r._opentm=null},500))},t.prototype.select=function(){var e=this.get("selected");e&&this.fire("selected",{},e,this.get("rows").indexOf(e),this.get("visibleRows").indexOf(e))},t.prototype.deselect=function(){this.set({selections:[],selected:void 0})},n.selections.get=function(){return this.get("selections")||[]},n.selections.set=function(e){var t=this.get("rows"),n=Array.isArray(e)?e.filter(function(e){return~t.indexOf(e)}):[];this.set("selections",n)},n.selected.get=function(){return this.get("selected")},n.selected.set=function(e){this.set({selected:e,selections:[e]})},n.rows.get=function(){return this.get("rows")},n.visibleRows.get=function(){return this.get("visibleRows")},n.allRows.get=function(){return this.get("items")},t.prototype.selectionOffset=function(e){var t=this.get("selected"),n=this.get("visibleRows");if(t&&~n.indexOf(t)){var r=n.indexOf(t);if(e>0?r+e>=n.length:r+e<0){var i=e<1?-1:1;(i<0&&this.get("page")+i>=0||i>0&&this.get("page")+i<this.get("pagination.total"))&&this.add("page",i),n=this.get("visibleRows");var o=e>0?n[0]:n[n.length-1];this.set({selected:o,selections:[o]})}else this.set({selected:n[r+e],selections:[n[r+e]]})}else{var a=e>0?n[0]:n[n.length-1];this.set({selected:a,selections:[a]})}this.fire("selection",{},{item:this.get("selected"),items:this.get("selections")})},t.prototype.selectionDown=function(){this.selectionOffset(1)},t.prototype.selectionUp=function(){this.selectionOffset(-1)},t.prototype._selectGroup=function(e){var t=e;this.get("page")&&(t+=this.get("page")*this.get("pagination.per"));var n,r=this.get("rows"),i=this.get("groups"),o=this.get("selections"),a=r[t++],l=["selections"],s=[];for(~(n=o.indexOf(a))?s.push(n):l.push(a);t<r.length&&!(t in i);)a=r[t++],~(n=o.indexOf(a))?s.push(n):l.push(a);if(1===l.length)for(n=s.length;n--;)this.splice("selections",s[n],1);else this.push.apply(this,l);return!1},t.prototype._groupSelected=function(e){var t=e;this.get("page")&&(t+=this.get("page")*this.get("pagination.per"));var n=this.get("rows"),r=this.get("groups"),i=this.get("selections");if(!~i.indexOf(n[t++]))return!1;for(;t<n.length&&!(t in r);)if(!~i.indexOf(n[t++]))return!1;return!0},t.prototype._rows=function(){var e=(this.get("items")||[]).slice(),t=this.get("filter"),n=this.get("sort"),r=[this.get("data-handler"),this.get("@style.raui.table.data-handler")],i=r[0]||r[1]||j;if(!t&&!n)return this.set("isFiltered",!1),this.set("rows",e);var o=i(this,e,t,n,this.get("parameters",{virtual:!0}));this.set("isFiltered",o.length!==e.length),this.set("rows",o);var a=this.get("selections");this.set("selections",a.filter(function(t){return~e.indexOf(t)})),~e.indexOf(this.get("selection"))||this.set("selected",void 0)},t.prototype.replaceColumns=function(e){var t=M(e),n=t[0],r=t[1];this.set("columns",e),this.resetPartial("grid-row-cols",r),this.resetPartial("grid-head-cols",n)},Object.defineProperties(t.prototype,n),t}(t);z.settings={valign:"center",border:!1,"fixed-header":!0,"allow-select":!0,"allow-select-all":!0,"auto-titles":!1,paginate:"virtual"},t.extendWith(z,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable",g:1},{n:"class-rtable-virtual",t:13,f:[{t:2,x:{r:["~/paginate"],s:'_0==="virtual"'}}]},{n:"class-rtable-auto",t:13,f:[{t:2,x:{r:["~/paginate"],s:'_0==="auto"'}}]},{n:"class-rtable-fixed",t:13,f:[{t:2,r:"~/fixed"}]},{n:"class-rtable-border",t:13,f:[{t:2,r:"~/border"}]},{n:"class-rtable-fixed-header",t:13,f:[{t:2,r:"~/fixedHeader"}]},{n:"class-rtable-scrolled-down",t:13,f:[{t:2,x:{r:["~/scroll"],s:'!~(_0||"").indexOf("top")'}}]},{n:"class-rtable-scrolled-up",t:13,f:[{t:2,x:{r:["~/scroll"],s:'!~(_0||"").indexOf("bottom")'}}]},{n:"class-rtable-with-select",t:13,f:[{t:2,r:"~/allowSelect"}]},{n:"class-rtable-valign-top",t:13,f:[{t:2,x:{r:["~/valign"],s:'_0==="top"'}}]},{n:"class-rtable-valign-center",t:13,f:[{t:2,x:{r:["~/valign"],s:'_0==="center"'}}]},{n:"class-rtable-valign-bottom",t:13,f:[{t:2,x:{r:["~/valign"],s:'_0==="bottom"'}}]},{n:"class-rtable-nowrap",t:13,f:[{t:2,r:"~/noWrap"}]},{n:"class-rtable-wrap",t:13,f:[{t:2,x:{r:["~/noWrap"],s:"!_0"}}]},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-fixed",g:1},{n:"grid",t:71,f:{r:["~/scrollOffset"],s:"[{offset:_0}]"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-extra",g:1},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/tableWidth"},"px"],t:13}],n:50,r:"~/noWrap"},{n:"class-rtable-noheader",t:13,f:[{t:2,r:"~/noHeader"}]},{t:4,f:[{t:16,r:"meta.topAttrs"}],n:50,r:"meta.topAttrs"}],f:[{t:16,r:"meta.top",z:[{n:"selectedCount",x:{r:"selections.length"}},{n:"rowCount",x:{r:"rows.length"}},{n:"table",x:{r:"@this"}},{n:"selected",x:{r:"selected"}},{n:"selections",x:{r:"selections"}}]}]}],n:50,r:"meta.top"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-wrapper row-wrap",g:1},{t:4,f:[{n:"scrollother",t:71,f:{r:[],s:'[".rtable-top"]'}}],n:50,r:"~/noWrap"}],f:[{t:8,r:"grid-head"}]}],n:51,r:"~/noHeader"}]}],n:50,x:{r:["~/noHeader","meta.top","~/fixedHeader"],s:"(!_0||_1)&&_2"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-top",g:1},{t:4,f:[{n:["scrolled"],t:70,f:"scroll"},{n:"sized",t:71,f:{r:[],s:'[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]'}}],n:50,x:{r:["~/paginate"],s:'_0==="virtual"'}},{t:4,f:[{n:"scrolled",t:71,f:{r:[],s:'["~/scroll"]'}}],n:50,x:{r:["~/noHeader","~/fixedHeader","~/meta.bottom","~/paginate"],s:'(!_0&&_1)||_2||_3==="virtual"'}},{t:4,f:[{n:"scrollother",t:71,f:{r:[],s:'[".rtable-header-wrapper"]'}}],n:50,x:{r:["~/fixedHeader","~/noWrap"],s:"_0&&_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-extra",g:1},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/tableWidth"},"px"],t:13}],n:50,r:"~/noWrap"},{n:"class-rtable-noheader",t:13,f:[{t:2,r:"~/noHeader"}]},{t:4,f:[{t:16,r:"meta.topAttrs"}],n:50,r:"meta.topAttrs"}],f:[{t:16,r:"meta.top",z:[{n:"selectedCount",x:{r:"selections.length"}},{n:"rowCount",x:{r:"rows.length"}},{n:"table",x:{r:"@this"}},{n:"selected",x:{r:"selected"}},{n:"selections",x:{r:"selections"}}]}]}],n:50,x:{r:["~/fixedHeader","meta.top"],s:"!_0&&_1"}}," ",{t:7,e:"div",m:[{n:"grid",t:71,f:{r:[],s:'[{size:"~/tableWidth",value:"~/gridValue",name:"~/gridName",max:"~/gridMax"}]'}},{t:4,f:[{n:"style-margin-top",f:[{t:2,r:"~/virtual.above"},"px"],t:13},{n:"style-margin-bottom",f:[{t:2,r:"~/virtual.below"},"px"],t:13}],n:50,x:{r:["~/paginate"],s:'_0==="virtual"'}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-header-wrapper row-wrap",g:1}],f:[{t:8,r:"grid-head"}]}],n:50,x:{r:["~/noHeader","~/fixedHeader"],s:"!_0&&!_1"}}," ",{t:4,f:[{t:4,f:[{t:8,r:"grid-row"}],n:52,z:[{n:"source",x:{r:"~/items"}},{n:"shuffle",x:{x:{r:[],s:"true"}}}],r:"~/visibleRows"}],n:50,r:"~/shuffle"},{t:4,f:[{t:4,f:[{t:8,r:"grid-row"}],n:52,r:"~/visibleRows"}],n:51,l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-row row t1",g:1}],f:[{t:16,r:"empty",z:[{n:"message",x:{r:"~/empty"}}]}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-bottom",g:1},{t:4,f:[{t:16,r:"meta.bottomAttrs"}],n:50,r:"meta.bottomAttrs"}],f:[{t:4,f:[{t:16,r:"meta.bottom",z:[{n:"selectedCount",x:{r:"selections.length"}},{n:"rowCount",x:{r:"rows.length"}},{n:"table",x:{r:"@this"}},{n:"selected",x:{r:"selected"}},{n:"selections",x:{r:"selections"}}]}],n:50,r:"~/meta.bottom"}," ",{t:4,f:[{t:8,r:"pagination"}],n:50,x:{r:["~/paginate"],s:'_0!=="virtual"'}}]}],n:50,x:{r:["~/paginate","~/meta.bottom"],s:'_0!=="virtual"||_1'}}]}],e:{'_0==="virtual"':function(e){return"virtual"===e},'_0==="auto"':function(e){return"auto"===e},'!~(_0||"").indexOf("top")':function(e){return!~(e||"").indexOf("top")},'!~(_0||"").indexOf("bottom")':function(e){return!~(e||"").indexOf("bottom")},'_0==="top"':function(e){return"top"===e},'_0==="center"':function(e){return"center"===e},'_0==="bottom"':function(e){return"bottom"===e},"!_0":function(e){return!e},"[{offset:_0}]":function(e){return[{offset:e}]},'[".rtable-top"]':function(){return[".rtable-top"]},"(!_0||_1)&&_2":function(e,t,n){return(!e||t)&&n},'[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]':function(){return[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]},'["~/scroll"]':function(){return["~/scroll"]},'(!_0&&_1)||_2||_3==="virtual"':function(e,t,n,r){return!e&&t||n||"virtual"===r},'[".rtable-header-wrapper"]':function(){return[".rtable-header-wrapper"]},"_0&&_1":function(e,t){return e&&t},"!_0&&_1":function(e,t){return!e&&t},'[{size:"~/tableWidth",value:"~/gridValue",name:"~/gridName",max:"~/gridMax"}]':function(){return[{size:"~/tableWidth",value:"~/gridValue",name:"~/gridName",max:"~/gridMax"}]},"!_0&&!_1":function(e,t){return!e&&!t},true:function(){return!0},'_0!=="virtual"':function(e){return"virtual"!==e},'_0!=="virtual"||_1':function(e,t){return"virtual"!==e||t},"(_0+_1)%2===1":function(e,t){return(e+t)%2==1},"[_0._setSort(_1,_2)]":function(e,t,n){return[e._setSort(t,n)]},"[_0._select(_1,_2),false]":function(e,t,n){return[e._select(t,n),!1]},"[_0._open(_3,_1.indexOf(_3),_2.indexOf(_3))]":function(e,t,n,r){return[e._open(r,t.indexOf(r),n.indexOf(r))]},"[_0._expand(_1)]":function(e,t){return[e._expand(t)]},"[_0.stopPropagation()]":function(e){return[e.stopPropagation()]},"_0.indexOf(_1)":function(e,t){return e.indexOf(t)},"_0===_1":function(e,t){return e===t},"_0>0":function(e){return e>0},"!_0&&_1>0":function(e,t){return!e&&t>0},'_0==="boolean"':function(e){return"boolean"===e},"_0._allSelected()":function(e){return e._allSelected()},'_0||"No data."':function(e){return e||"No data."},"_0*_1+1":function(e,t){return e*t+1},"_2+1===_0?_1:(_2+1)*_3":function(e,t,n,r){return n+1===e?t:(n+1)*r},"_0===1":function(e){return 1===e},"_0._allSelected()&&_1<_2":function(e,t,n){return e._allSelected()&&t<n},'[_0.set("page",_1-1)]':function(e,t){return[e.set("page",t-1)]},'[(/^\\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1))||_2.nodeSet(_3,"value",_4+1)]':function(e,t,n,r,i){return[/^\d+$/.test(t)&&+t>0&&+t<=e&&n.set("page",+t-1)||n.nodeSet(r,"value",i+1)]},"_0==_1+1":function(e,t){return e==t+1},'[_0.set("page",_2[_1-1])]':function(e,t,n){return[e.set("page",n[t-1])]},'_0==="..."':function(e){return"..."===e},'[_0.set("page",_1+1)]':function(e,t){return[e.set("page",t+1)]},"_0<_1-1":function(e,t){return e<t-1}},p:{"csp-dummy":[{t:7,e:"div",m:[{n:"class-rtable-odd",t:13,f:[{t:2,x:{r:["@index","~/virtual.offset"],s:"(_0+_1)%2===1"}}]},{n:"class-top",t:13,f:[{t:2,x:{r:[".valign"],s:'_0==="top"'}}]},{n:"class-bottom",t:13,f:[{t:2,x:{r:[".valign"],s:'_0==="bottom"'}}]},{n:"class-center",t:13,f:[{t:2,x:{r:[".valign"],s:'_0==="center"'}}]},{n:["click"],t:70,f:{r:["@this",".index","@event"],s:"[_0._setSort(_1,_2)]"}},{n:["click"],t:70,f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}},{n:["click"],t:70,f:{r:["@this","~/rows","~/visibleRows","."],s:"[_0._open(_3,_1.indexOf(_3),_2.indexOf(_3))]"}},{n:["click"],t:70,f:{r:["@this","@index"],s:"[_0._expand(_1)]"}},{n:["click"],t:70,f:{r:["@event"],s:"[_0.stopPropagation()]"}}]}," ",{t:4,f:["..."],n:50,x:{r:["~/selections","."],s:"_0.indexOf(_1)"}}," ",{t:4,f:["..."],n:50,x:{r:[".","~/expanded"],s:"_0===_1"}}," ",{t:4,f:["..."],n:50,x:{r:["~/virtual.offset"],s:"_0>0"}}," ",{t:4,f:["..."],n:50,x:{r:["~/fixedHeader","~/virtual.offset"],s:"!_0&&_1>0"}}," ",{t:4,f:["..."],n:50,x:{r:["~/columns.0.type"],s:'_0==="boolean"'}}," ",{t:4,f:["..."],n:50,x:{r:["@this"],s:"_0._allSelected()"}}],empty:[{t:7,e:"div",f:[{t:7,e:"div",f:[{t:2,x:{r:["message"],s:'_0||"No data."'}}]}]}],pagination:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-pagination",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-info",g:1}],f:[{t:4,f:[{t:2,x:{r:["~/page","~/pagination.per"],s:"_0*_1+1"}}," - ",{t:2,x:{r:["~/pagination.total","~/rows.length","~/page","~/pagination.per"],s:"_2+1===_0?_1:(_2+1)*_3"}}," of ",{t:2,r:"~/rows.length"},{t:4,f:[" (",{t:2,r:"~/items.length"}," total)"],n:50,r:"~/isFiltered"}],n:50,x:{r:["pagination","rows.length"],s:"_0&&_1"}}," ",{t:4,f:["​"],n:50,x:{r:["_paginate"],s:"_0===1"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-select-all-all",g:1}],f:[{t:4,f:[{t:7,e:"strong",f:[{t:2,r:"selections.length"}]}," of ",{t:7,e:"strong",f:[{t:2,r:"rows.length"}]}," selected",{t:4,f:[" - ",{t:7,e:"a",m:[{n:"href",f:"#",t:13,g:1},{n:["click"],t:70,f:"selectAllAll"}],f:["Select All"]}],n:50,x:{r:["@this","selections.length","rows.length"],s:"_0._allSelected()&&_1<_2"}}],n:50,x:{r:["selections.length"],s:"_0>0"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-pages",g:1}],f:[{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","~/page"],s:'[_0.set("page",_1-1)]'}}],f:["Previous"]}],n:50,x:{r:["~/page"],s:"_0>0"}}," ",{t:4,f:[{t:4,f:[{t:7,e:"input",m:[{n:["change"],t:70,f:{r:["~/pagination.total","@node.value","@this","@node","~/page"],s:'[(/^\\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1))||_2.nodeSet(_3,"value",_4+1)]'}},{n:"value",f:[{t:2,r:"."}],t:13},{t:73,v:"t",f:"false"}]}],n:50,x:{r:[".","~/page"],s:"_0==_1+1"}},{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","@index","../"],s:'[_0.set("page",_2[_1-1])]'}}],f:["..."]}," "],n:50,x:{r:["."],s:'_0==="..."'},l:1},{t:4,f:[" ",{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","."],s:'[_0.set("page",_1-1)]'}}],f:[{t:2,r:"."}]}],n:51,l:1}],n:52,r:"~/pagination.array"}," ",{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","~/page"],s:'[_0.set("page",_1+1)]'}}],f:["Next"]}],n:50,x:{r:["~/page","~/pagination.total"],s:"_0<_1-1"}}]}]}]}},css:function(e){return[function(e){var t=Object.assign({},e("raui.primary"),e("raui.table.primary")),n=Object.assign({},t,e("raui.primary.active"),e("raui.table.primary.active")),r=Object.assign({selected:{},header:{},footer:{}},e("raui.table"));return"\n .rtable {\n display: flex;\n flex-direction: column;\n overflow: auto;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n flex-grow: 2;\n }\n \n .rtable.rtable-border {\n border: 1px solid "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-header {\n min-height: 2em;\n }\n \n .rtable-group > div > div,\n .rtable-header > div > div,\n .rtable-row > div > div {\n padding: "+(r.padding||"0.5em")+";\n overflow: inherit;\n text-overflow: inherit;\n line-height: 1em;\n }\n .rtable-row > .rtable-no-pad > div {\n padding: 0;\n }\n \n .rtable-auto .row > *,\n .rtable-fixed .row > *\n {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n \n .rtable-header > div > div, .rtable-column {\n overflow: hidden;\n }\n \n .rtable-number-column {\n text-align: right;\n }\n .rtable-date-column {\n text-align: right;\n }\n \n .rtable-sortable {\n cursor: pointer;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n \n .grid .row.rtable-row, .grid .rtable-header > .row {\n width: auto;\n min-width: min-content;\n flex-grow: 1;\n }\n \n .rtable-nowrap .grid .rtable-row, .rtable-nowrap .grid .rtable-header > .row {\n flex-wrap: nowrap;\n }\n .rtable-nowrap .rtable-row-wrap, .rtable-inner-row-wrap {\n flex-grow: 1;\n } \n \n .rtable-row-wrap {\n display: flex;\n flex-grow: 1;\n align-items: center;\n z-index: 2;\n align-items: stretch;\n color: "+(t.fg||"#222")+";\n background-color: "+(r.even||t.bga||"#f4f4f4")+";\n }\n .rtable-row-wrap:focus-within {\n z-index: 3;\n }\n .rtable-row-wrap.rtable-odd {\n background-color: "+(r.odd||t.bg||"#fff")+";\n }\n .rtable-row-wrap:hover .rtable-inner-row-wrap, .rtable-row-wrap:hover .rtable-select-row {\n background-color: "+(r.over||n.bg||"#e6f0fa")+";\n }\n .rtable-row-wrap:hover .rtable-inner-row-wrap,\n .rtable-wrap .rtable-row-wrap:hover .rtable-select-row {\n position: relative;\n }\n .rtable-row-wrap:hover .rtable-select-row {\n overflow: visible;\n }\n \n .rtable-row-wrap:hover {\n border-bottom: "+(r.dividerSize||"4px")+" solid "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-row-wrap.rtable-selected {\n background-color: "+(r.selected.bg||"#cee5fd")+";\n color: "+(r.selected.fg||t.fg||"#222")+";\n }\n .rtable-row-wrap.rtable-selected.rtable-odd {\n background-color: "+(r.selected.odd||"#c5dffb")+";\n }\n \n .rtable-nowrap .rtable-row-wrap {\n display: inline-flex;\n min-width: 100%;\n box-sizing: border-box;\n }\n \n .rtable-nowrap > .rtable-top > .grid {\n line-height: 1em;\n }\n \n .rtable-border .rtable-row .rtable-column,\n .rtable-border .rtable-group .rtable-column {\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-style: solid;\n border-width: 0 0 0 1px;\n margin: 0 0 0 -1px;\n }\n .rtable-wrap.rtable-border .rtable-row .rtable-column,\n .rtable-border .rtable-group .rtable-column {\n border-width: 0 0 1px 1px;\n margin: 0 0 -1px -1px;\n }\n \n .rtable-border .rtable-header .rtable-column {\n border-width: 0 0 0 0;\n margin: 0 0 0 0;\n }\n .rtable-wrap.rtable-border .rtable-header .rtable-column {\n border-width: 0 0 1px 0;\n margin: 0 0 -1px 0;\n }\n \n .rtable-border .rtable-row .rtable-column:nth-child(1),\n .rtable-border .rtable-group .rtable-column:nth-child(1) {\n border-left-width: 0;\n }\n .rtable-border.rtable-with-select .rtable-row .rtable-column:nth-child(1),\n .rtable-border.rtable-with-select .rtable-group .rtable-column:nth-child(1) {\n border-left-width: 1px;\n }\n \n .rtable-border .rtable-row-wrap {\n border-bottom-width: 1px;\n }\n \n .rtable-border .rtable-row-expand, .rtable-border .rtable-row-extra {\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-style: solid;\n border-width: 1px 0 0 0;\n margin-left: -1px;\n width: 100%;\n }\n .rtable-border.rtable-with-select .rtable-row-expand, .rtable-border.rtable-with-select .rtable-row-extra {\n border-left-width: 1px;\n }\n \n .rtable-row-expand, .rtable-row-extra {\n box-sizing: border-box;\n padding: "+(r.padding||"0.5em")+";\n }\n \n .rtable-row-hover {\n pointer-events: none;\n position: relative;\n z-index: 1;\n }\n .rtable-row-hover-content {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n }\n .rtable-row-hover-content > * {\n pointer-events: visible;\n }\n \n .rtable-group {\n border-bottom: 2px solid "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-header.rtable-row-wrap, .rtable-header.rtable-row-wrap:hover {\n font-weight: bold;\n background-color: "+(r.header.bg||"#dedede")+";\n }\n .rtable-header-fixed {\n line-height: 1em;\n background-color: "+(r.header.bg||"#dedede")+";\n }\n \n .rtable-header.rtable-row-wrap, .rtable-header-extra.rtable-noheader {\n border-bottom: 2px solid "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-header-extra {\n background-color: "+(r.header.bg||"#dedede")+";\n padding: "+(r.padding||"0.5em")+";\n line-height: 1em;\n z-index: 4;\n box-sizing: border-box;\n min-width: 100%;\n }\n .rtable-nowrap .rtable-header-extra {\n position: sticky;\n left: 0;\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n position: relative;\n }\n .rtable-fixed-header .rtable-header {\n position: relative;\n z-index: 3;\n }\n .rtable-fixed-header.rtable-scrolled-down .rtable-header-fixed {\n box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15), 0 0.25em 0.5em rgba(0,0,0,0.25);\n z-index: 3;\n }\n .rtable-fixed-header .rtable-top {\n margin-top: 0;\n }\n .rtable-nowrap.rtable-fixed-header .rtable-header-wrapper {\n flex-shrink: 0;\n width: 100%;\n overflow-x: auto;\n scrollbar-width: none;\n }\n .rtable-nowrap.rtable-fixed-header .rtable-header-wrapper::-webkit-scrollbar {\n height: 0;\n }\n .rtable-fixed-header .rtable-header-fixed::-webkit-scrollbar {\n width: 0;\n height: 0;\n }\n \n .rtable-nowrap .rtable-fixed-column, .rtable-nowrap .rtable-row-extra, .rtable-nowrap .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n position: -webkit-sticky;\n position: sticky;\n left: 0;\n }\n .rtable-border..rtable-nowrap .rtable-fixed-column, .rtable-border.rtable-nowrap .rtable-row-extra, .rtable-border.rtable-nowrap .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n left: 1px;\n }\n .rtable-nowrap.rtable-with-select .rtable-fixed-column, .rtable-nowrap.rtable-with-select .rtable-row-extra, .rtable-nowrap.rtable-with-select .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n left: "+(r.selectWidth||"2em")+";\n }\n .rtabe-border.rtable-nowrap.rtable-with-select .rtable-fixed-column, .rtabe-border.rtable-nowrap.rtable-with-select .rtable-row-extra, .rtabe-border.rtable-nowrap.rtable-with-select .rtable-row-expand, .rtable-nowrap .rtable-row-hover {\n left: "+(r.selectWidth||"2em")+";\n }\n \n .rtable-nowrap .rtable-inner-row-wrap {\n background-color: inherit;\n }\n \n .rtable-nowrap .row,\n .rtable-nowrap .rtable-fixed-column,\n .rtable-nowrap .rtable-select-row,\n .rtable-nowrap .rtable-select-header {\n background-color: inherit;\n z-index: 1;\n }\n \n .rtable-nowrap .rtable-select-row,\n .rtable-nowrap .rtable-select-header {\n position: sticky;\n position: -webkit-sticky;\n left: 0;\n z-index: 1;\n }\n .rtable-nowrap .rtable-select-header {\n z-index: 2;\n }\n \n .rtable-nowrap.rtable-border .rtable-fixed-column {\n border-right-width: 1px;\n }\n \n .rtable-scrolled-up .rtable-bottom {\n box-shadow: 0 -1px 2px 0 rgba(60, 64, 67, 0.3), 0 -1px 3px 1px rgba(60, 64, 67, 0.15), 0 -0.25em 0.5em rgba(0,0,0,0.25);\n z-index: 3;\n }\n .rtable-bottom {\n padding: "+(r.padding||"0.5em")+";\n background-color: "+(r.footer.bg||r.header.bg||"#dedede")+";\n border-top: 2px solid "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-pagination {\n display: flex;\n flex-wrap: wrap;\n flex-shrink: 0;\n justify-content: space-between;\n user-select: none;\n }\n \n .rtable-pages span {\n margin: 0.3em;\n cursor: pointer;\n }\n .rtable-pages span:first-of-type {\n margin-left: 0;\n }\n .rtable-pages input {\n text-align: center;\n width: 2.5em;\n font-size: 1em;\n background-color: transparent;\n border: none;\n padding: 0;\n font-weight: bold;\n text-decoration: underline;\n }\n \n /* checkboxes */\n .rtable-select {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n position: absolute;\n display: block;\n margin: 0;\n width: 3em;\n height: 3em;\n box-shadow: none;\n outline: none;\n opacity: 0;\n top: -0.75em;\n left: -0.75em;\n border-radius: 2em;\n transition: transform 0.2s, opacity 0.2s;\n background-color: "+(t.bc||"#ccc")+";\n cursor: pointer;\n }\n \n .rtable-select-header > div, .rtable-select-row > div, .rtable-header > div.rtable-select-header > div {\n padding: 0;\n overflow: visible;\n width: 1.5em;\n height: 1.5em;\n position: relative;\n line-height: 1.8em;\n cursor: pointer;\n display: flex;\n justify-content: space-around;\n align-items: center;\n flex-grow: 0;\n display: block;\n }\n \n .rtable-select:checked {\n background-color: "+(t.fga||"#07e")+';\n }\n \n .rtable-select-header:hover .rtable-select, .rtable-select-row:hover .rtable-select {\n opacity: 0.04;\n }\n \n .rtable-select:focus {\n opacity: 0.12;\n transform: scale(1);\n }\n \n .rtable-select-header:hover .rtable-select:focus, .rtable-select-row:hover .rtable.select:focus {\n opacity: 0.16;\n }\n \n .rtable-select:active {\n opacity: 0.4;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n \n .rtable-select-row > div:before, .rtable-select-header > div:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n border: solid 0.125em; /* Safari */\n border-color: '+(t.fg||"#222")+";\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n position: absolute;\n top: 0.3em;\n left: 0.15em;\n transition: border-color 0.2s, background-color 0.2s;\n }\n \n .rtable-select-row > div:after, .rtable-select-header > div:after {\n content: '';\n display: inline-block;\n opacity: 0;\n position: absolute;\n width: 1.2em;\n height: 1.2em;\n top: 0.3em;\n left: 0.15em;\n border-radius: 0.125em;\n }\n \n .rtable-selected .rtable-select-row > div:before, .rtable-all-selected > div:before {\n border-color: "+(t.fga||"#07e")+";\n }\n \n .rtable-selected .rtable-select-row > div:after, .rtable-all-selected > div:after {\n border-color: "+(t.bg||"#fff")+';\n background: no-repeat center/80% url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="'+(t.bg||"#fff").replace(/#/g,"%23")+'" d="m 15.378906,1.7050781 a 1.0583349,1.0583349 0 0 0 -1.478515,0.234375 L 6.6210937,11.960938 1.8652344,8.5058594 a 1.0583349,1.0583349 0 0 0 -1.47851565,0.234375 1.0583349,1.0583349 0 0 0 0.234375,1.4785156 L 6.234375,14.294922 A 1.0584408,1.0584408 0 0 0 7.7128906,14.060547 L 15.613281,3.1835938 A 1.0583349,1.0583349 0 0 0 15.378906,1.7050781 Z" /></svg>\') '+(t.fga||"#07e")+";\n opacity: 1;\n }\n \n .rtable-row-wrap > .rtable-select-header,\n .rtable-row-wrap > .rtable-select-row {\n text-align: center;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: "+(r.selectWidth||"2em")+";\n }\n \n .rtable-row-wrap > .rtable-select-row {\n border-style: solid;\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-width: 0 0 1px 0;\n }\n \n .rtable-inner-row-wrap {\n border-style: solid;\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-width: 0 0 1px 0;\n }\n \n .rtable-column button, .rtable-column .btn {\n padding: 0 0.5em;\n margin: 0.2em 0.5em;\n min-height: 0;\n }\n \n .rtable-column.rtable-editing, .rtable-column.rtable-editing > .rtable-edit {\n padding: 0;\n }\n .rtable-column.rtable-editing input {\n width: 100%;\n box-sizing: border-box;\n height: 100%;\n margin: 0;\n border: none;\n background-color: transparent;\n padding: 0.25em 0.5em;\n }\n \n .rtable-valign-top .rtable-row:not(.rtable-header) .rtable-column > div,\n .rtable .rtable-row:not(.rtable-header) > .rtable-column.rtable-valign-col-top > div {\n display: flex;\n height: 100%;\n align-items: flex-start;\n box-sizing: border-box;\n }\n .rtable-valign-bottom .rtable-row:not(.rtable-header) .rtable-column > div,\n .rtable .rtable-row:not(.rtable-header) > .rtable-column.rtable-valign-col-bottom > div {\n display: flex;\n height: 100%;\n align-items: flex-end;\n box-sizing: border-box;\n }\n .rtable-valign-center .rtable-row:not(.rtable-header) .rtable-column > div,\n .rtable .rtable-row:not(.rtable-header) > .rtable-column.rtable-valign-col-center > div {\n display: flex;\n height: 100%;\n align-items: center;\n box-sizing: border-box;\n }\n "+(e("table.includeGrid")?b(e):"")}.call(this,e)].join(" ")},cssId:"rtable",noCssTransform:!0,attributes:["auto-titles","paginate","items","filter","data-handler","sort-handler","sort","helpers","fixed","allow-select","allow-select-all","border","fixed-header","valign","no-header","empty","shuffle","no-wrap","parameters"],components:{table:!1,Table:!1},syncComputedChildren:!0,decorators:{grid:h,sized:i,scrollother:function e(t,n){var r=this,i=function(i){e.lock&&e.lock!==t||(e.tm&&clearTimeout(e.tm),e.lock=t,r.find(n).scrollLeft=i.target.scrollLeft,e.tm=setTimeout(function(){e.tm=null,e.lock=!1},100))};return t.addEventListener("scroll",i,{passive:!0}),{teardown:function(){t.removeEventListener("scroll",i)}}}},events:{},use:[g({name:"clickd",count:1}),g({name:"dblclickd",count:2}),(void 0===A&&(A={}),function(e){e.instance.transitions[A.name||"expand"]=k}),(void 0===L&&(L={}),function(e){e.instance.decorators[L.name||"scrolled"]=O})],on:{construct:function(){var e,t,n,r,i,o,a,l,s=this.component;if(!s)return;var d=s.template.f||[],c=s.template.m?s.template.m.slice():[],f=s.template;s.template={e:f.e,f:f.f,t:f.t,m:c};var u=0;function h(e,t,n){if(e&&e.f&&1===e.f.length&&2===e.f[0].t){var r="_a"+u++;return c.push({t:13,n:r,f:e.f}),n?r:t?{t:[{t:2,r:"~/"+r}]}:{t:2,r:"~/"+r}}return e&&e.f}function b(e){var t=[],n=[];return e.forEach(function(e){if("column"===e.e||"col"===e.e){var r,i={},o=e.m||N;if(i.index=t.length,t.push(i),i.content=(e.f||[]).filter(function(e){return"edit"!==e.e&&"header"!==e.e}),i.editP=(e.f||[]).find(function(e){return"edit"===e.e}),i.editP&&(i.editP=i.editP.f),(r=o.find(function(e){return"id"===e.n}))&&S(r.f)&&(i.id=r.f),i.label=(e.f||[]).find(function(e){return"header"===e.e}),i.label?(i.label=i.label.f,i.title=o.find(function(e){return"label"===e.n}),i.title||(i.title=o.find(function(e){return"header"===e.n})),i.title&&i.title.f&&(i.title=h(i.title))):(i.label=o.find(function(e){return"label"===e.n}),i.label||(i.label=o.find(function(e){return"header"===e.n})),i.label&&i.label.f&&(i.label=h(i.label))),i.label||(i.label=""),i.id||(i.id=i.label),Array.isArray(i.label)||(i.label=[i.label]),i.type=o.find(function(e){return"type"===e.n}),i.type&&i.type.f&&(i.type=i.type.f),i.type||(i.type="string"),i.filter=o.find(function(e){return"filter"===e.n}),i.filter&&i.filter.f&&(i.filter=h(i.filter),i.filter.r&&(i.filter=i.filter.r)),i.sort=o.find(function(e){return"sort"===e.n}),i.sort&&i.sort.f&&(i.sort=h(i.sort),i.sort.r&&(i.sort=i.sort.r)),i.dir=o.find(function(e){return"dir"===e.n}),i.dir&&i.dir.f&&(i.dir=h(i.dir),i.dir.r&&(i.dir=i.dir.r)),i.hidden=o.find(function(e){return"hidden"===e.n}),i.hidden&&0===i.hidden.f?i.hidden=!0:i.hidden&&E(i.hidden.f)?i.hidden=h(i.hidden):i.hidden=!1,S(i.hidden)&&(i.hidden=!1),i.noPad=o.find(function(e){return"no-pad"===e.n}),i.noPad&&0===i.noPad.f?i.noPad=0:i.noPad&&E(i.noPad.f)?i.noPad=h(i.noPad):delete i.noPad,i.editable=o.find(function(e){return"editable"===e.n}),i.editable&&0===i.editable.f?i.editable=!0:i.editable&&E(i.editable.f)?i.editable=h(i.editable):i.editable=!1,i.valign=o.find(function(e){return"valign"===e.n}),i.valign&&E(i.valign.f)?i.valign=h(i.valign):i.valign&&"string"==typeof i.valign.f&&(i.valign=i.valign.f),i.fixed=o.find(function(e){return"fixed"===e.n}),i.fixed&&E(i.fixed.f)?i.fixed={path:h(i.fixed,!1,!0)}:i.fixed&&"string"==typeof i.fixed.f&&(i.fixed=i.fixed.f),(r=o.find(function(e){return"get"===e.n}))&&r.f){var a=h(r,!1,!0);field.get=function(e){var t=this.get(a);return"function"==typeof t?t.call(this,e):void 0}}i.attrs=o.filter(function(e){return!~R.indexOf(e.n)}),i.attrs.forEach(function(e,t){C.test(e.n)&&(i.attrs[t]={t:13,n:"class-"+e.n})})}else if("field"===e.e){var l,s={},d=e.m||N;if(S(l=d.find(function(e){return"path"===e.n}))?s.path=l:l&&l.f&&(s.path=h(l)),(l=d.find(function(e){return"value"===e.n}))&&l.f&&(s.value=h(l)),S(l=d.find(function(e){return"type"===e.n}))?s.type=l:l&&l.f&&(s.type=h(l)),S((l=d.find(function(e){return"id"===e.n})).f)&&(s.id=l.f),S(l=d.find(function(e){return"dir"===e.n}))?s.dir=l:l&&S(l.f)&&(s.dir=l.f),S(l=d.find(function(e){return"label"===e.n}))?s.label=l:l&&l.f&&(s.label=h(l)),(l=d.find(function(e){return"get"===e.n}))&&l.f){var c=h(l,!1,!0);s.get=function(e){var t=this.get(c);return"function"==typeof t?t.call(this,e):void 0}}s.id||(s.id=s.label),s.path||(s.path=s.id),n.push(s)}}),{fields:n,columns:t}}e=d.find(function(e){return"expand"===e.e}),t=d.find(function(e){return"hover"===e.e}),n=d.find(function(e){return"group"===e.e}),r=d.find(function(e){return"wrapper"===e.e}),i=d.find(function(e){return"row"===e.e}),o=d.find(function(e){return"top"===e.e}),a=d.find(function(e){return"bottom"===e.e}),this._init={sets:b(d),partials:{}};var p=this._init.sets.columns;this._init.sets["meta.expand"]=e&&e.f&&e.f.length&&e.f,this._init.sets["meta.hover"]=t&&t.f&&t.f.length&&t.f,this._init.sets["meta.extra"]=i&&i.f&&i.f.length&&i.f,this._init.sets["meta.top"]=o&&o.f&&o.f.length&&o.f,this._init.sets["meta.topAttrs"]=o&&o.m,this._init.sets["meta.bottom"]=a&&a.f&&a.f.length&&a.f,this._init.sets["meta.bottomAttrs"]=a&&a.m;var g=M(p),v=g[0],m=g[1],w=g[2],x=[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-wrap"},{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-header"},{t:4,f:[{n:"style-opacity",f:"0",t:13}],n:50,x:{r:["~/fixedHeader","~/virtual.offset"],s:"!_0&&_1>0"}},{t:4,n:50,r:"~/fixedHeader",f:[{t:13,n:"style-padding-right",f:[{t:2,r:"~/scrollOffset"},"px"]}]}],f:[{t:7,e:"div",f:[{t:8,r:"grid-head-cols"}],m:[{t:13,n:"class-row"}]}]}];x[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-header"},{t:13,n:"class-rtable-column"},{t:13,n:"title",f:[{t:2,r:"selections.length"}," items selected"]},{t:13,n:"class-rtable-all-selected",f:[{t:2,x:{r:["@this"],s:"_0._allSelected()"}}]}],f:[{t:7,e:"div",f:[{t:4,n:50,r:"~/allowSelectAll",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["@this"],s:"_0._allSelected()"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:"selectAll"}]}]}],m:[{t:70,n:["clickd"],f:"selectAll"}]}]}]});var _,y=[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-wrap"},{t:13,n:"class-rtable-odd",f:[{t:2,x:{r:["@index","~/virtual.offset"],s:"(_0+_1)%2===1"}}]},{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-live"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-inner-row-wrap"}],f:[{t:7,e:"div",f:[{t:8,r:"grid-row-cols"}],m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-row"},{t:70,n:e&&e.f?["dblclickd"]:["click","dblclick"],f:{r:["@this","~/rows","~/visibleRows","."],s:"[_0._open(_3,_1.indexOf(_3),_2.indexOf(_3))]"}}]}]}]}];i&&i.m&&i.m.length&&(this._init.sets.rowAttrs=i.m.slice(),y[0].f[0].f[0].m.push({t:16,r:"~/rowAttrs",c:{r:"."},z:w}));r&&r.m&&r.m.length&&(this._init.sets.wrapperAttrs=r.m.slice(),y[0].m.push({t:16,r:"~/wrapperAttrs",c:{r:"."},z:w}));i&&i.f&&i.f.length&&y[0].f[0].f.push({t:7,e:"div",m:[{t:13,n:"class-rtable-row-extra"},{t:4,n:50,r:"~/noWrap",f:[{t:13,n:"style-width",f:[{t:2,x:{r:["~/tableWidth","~/allowSelect","@style.raui.table.selectWidth"],s:"_1?'calc('+_0+'px - '+(_2||'2em')+')':_0+'px'"}}]}]}],f:[{t:16,r:"~/meta.extra",c:{r:"."},z:w}]});if(e&&e.f&&e.f.length){var k={t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}},O=e.m&&e.m.find(function(e){return"skip"===e.n});O=O&&O.f&&O.f[0]&&2===O.f[0].t?Object.assign({},O.f[0],{t:4,n:51,f:[k]}):k,y[0].f[0].f.push({t:4,n:50,x:{r:[".","~/expanded"],s:"_0===_1"},f:[{t:7,e:"div",f:[{t:7,e:"div",f:[{t:16,r:"~/meta.expand",c:{r:"."},z:w}]}],m:[{t:13,n:"class-rtable-row-expand"},{t:4,n:50,r:"~/noWrap",f:[{t:13,n:"style-width",f:[{t:2,x:{r:["~/tableWidth","~/allowSelect","@style.raui.table.selectWidth"],s:"_1?'calc('+_0+'px - '+(_2||'2em')+')':_0+'px'"}}]}]}]}]}),y[0].f[0].f[0].m.push(O),y[0].f[0].f[1].f[0].m.push({t:70,n:["click"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}})}t&&t.f&&t.f.length&&(y[0].f[0].f.unshift({t:4,n:50,x:{r:[".","~/hovered"],s:"_0===_1"},f:[{t:7,e:"div",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-hover-content"}].concat(t.m||[]),f:[{t:16,r:"~/meta.hover",c:{r:"."},z:w}]}],m:[{t:13,n:"class-rtable-row-hover"},{t:4,n:50,r:"~/noWrap",f:[{t:13,n:"style-width",f:[{t:2,x:{r:["~/tableWidth","~/allowSelect","@style.raui.table.selectWidth"],s:"_1?'calc('+_0+'px - '+(_2||'2em')+')':_0+'px'"}}]}]}]}]}),y[0].m.push({t:70,n:["mouseenter"],f:{r:["@this","@index"],s:"[_0._hover(_1)]"}},{t:70,n:["mouseleave"],f:{r:["@this","@index"],s:"[_0._unhover(_1)]"}}));if(y[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-row"},{t:13,n:"class-rtable-column"},{t:70,n:["clickd"],f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}}],f:[{t:7,e:"div",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}}]}]}]}]}),n&&n.m&&(_=n.m.find(function(e){return"by"===e.n}))&&(S(_.f)||1===_.length&&2===_[0].t)){var P={t:4,n:50,f:[{t:7,e:"div",m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-group"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:70,n:e&&e.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(n.m.filter(function(e){return"by"!==e.n&&"select"!==e.n}))}],x:{s:"_0&&_1[(_1&&(_2*_3+_4))||_4]",r:["~/showGroups","~/groups","~/page","~/pagination.per","@index"]}};y.unshift(P),this._init.by=_.f;var L,A=b(n.f).columns.filter(function(e){return!0!==e.hidden}).map(function(e){var t={t:7,e:"div",f:[{t:7,e:"div",f:e.content}],m:e.attrs};e.type&&t.m.unshift({t:13,n:"class-rtable-"+e.type+"-column"}),t.m.push({t:13,n:"class-rtable-column"}),t.m.find(function(e){return"title"===e.n})||t.m.unshift({t:13,n:"title",f:e.content});var n=t;return e.hidden&&e.hidden.r&&(n={t:4,n:51,r:e.hidden.r,f:[t]}),n});A.unshift({t:4,n:50,r:"~/allowGroupSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-row"},{t:13,n:"class-rtable-column"},{t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._selectGroup(_1),false]"}},{t:13,n:"class-rtable-all-selected",f:[{t:2,x:{r:["@this","@index"],s:"_0._groupSelected(_1)"}}]}],f:[{t:7,e:"div",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["@this","@index"],s:"_0._groupSelected(_1)"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:{r:["@this","@index"],s:"[_0._selectGroup(_1),false]"}}]}]}]}]}),(L=n.m.find(function(e){return"select"===e.n}))&&(l||(l=[])).push(Object.assign({},L,{n:"allowGroupSelect"})),(L=n.m.find(function(e){return"show"===e.n}))&&(l||(l=[])).push(Object.assign({},L,{n:"showGroups"})),P.f[0].f=A}this._init.partials["grid-row"]=y,this._init.partials["grid-row-cols"]=m,this._init.partials["grid-head"]=x,this._init.partials["grid-head-cols"]=v,l&&this.component&&(this.component.mappings=l)},config:function(){this.set(this._init.sets),Object.assign(this.partials,this._init.partials)},render:function(){this._autoObserver&&this._autoObserver.fire()},selectAll:function(){var e,t;return this._allSelected()?(t=null,e=[],this.set({selections:e,selected:t})):(t=(e=("virtual"===this.get("paginate")?this.get("rows"):this.get("visibleRows")).slice())[0],this.set({selections:e,selected:t})),this.fire("selection",{},{item:t,items:e}),!1},selectAllAll:function(){var e=this.get("rows").slice();return this.set({selections:e,selected:null}),this.fire("selection",{},{item:null,items:e}),!1}},observe:{_rows:function(){var e=this;this._rowbounce&&clearTimeout(this._rowbounce),setTimeout(function(){return e._rows()},this.get("@style.raui.table.debounce")||160)},paginate:{handler:function(e){var n=this;if("auto"===e||"virtual"===e||e instanceof t){this._autoObserver&&this._autoObserver.cancel(),this._scrollListener&&this._scrollListener.cancel();("auto"===e||"virtual"===e)&&this.root;var r,i=!1,o=function(){if(n.rendered){var t=n.find(".rtable-top");if(t)if(n.get("items.length")){var r=t.clientHeight+","+t.clientWidth;if(o.last!==r||!i){var a=n.getContext(t);a.decorators&&a.decorators.scrolled&&a.decorators.scrolled.refresh();var l=n.find(".rtable-header")||{},s=Array.apply(null,n.findAll(".rtable-live")).map(function(e){return e.offsetHeight});if(s.length<5){var d=Math.floor(t.clientHeight/(l.offsetHeight||1));d<5&&(d=5),n.set("_paginate",d),s=Array.apply(null,n.findAll(".rtable-live")).map(function(e){return e.offsetHeight})}s.length>0?i=!0:s=[25];var c=Math.ceil(s.reduce(function(e,t){return e+t},0)/s.length);n._avgSize=c;var f=Math.floor((t.clientHeight-(l.offsetHeight||1))/c);"virtual"===e&&(f+=10)<30&&(f=30),n.set("_paginate",f),o.last=r}}else n._autoLenObserver||(n._autoLenObserver=n.observeOnce("items",function(){n._autoLenObserver=0,setTimeout(o)}))}},a=function(){r&&clearTimeout(r),r=setTimeout(function(){o(),r=null,i&&n._scrollListener&&n._scrollListener.fn()},50)};if(this._autoObserver=this.observe("~/tableHeight",a),this._autoObserver.fire=a,"virtual"===e){var l,s=!1,d=function(){if(n.rendered){if(l||(l=n.find(".rtable-top")),!i)return a();var e=l.scrollTop,t=n.get("virtual")||{},r=t.offset,o=n.get("_paginate"),d=o-10,c=n.get("rows.length");o>c&&(o=c);var f=n._avgSize,u=d*f,h=Math.floor(e/f)-5;h<0&&(h=0);var b=h;if(h+o>c&&(h=c-o),r===h&&!isNaN(t.top))return s=!1;if(!P(r)||isNaN(r)||isNaN(t.top)||e<t.top+u||e>t.bottom-u||r>0&&e<f*d){var p=b,g=c-b-o;p<0?(g+=-1*p,p=0):p>c-o&&(p=c-o),g<0&&(g=0);var v,m,w=p*f,x=g*f;h<r+o&&h>r-o&&(v=h>r?n.findAll(".rtable-live")[h-r]:n.findAll(".rtable-live")[r-h]),v&&h>0&&v.offsetTop>l.scrollTop-u-5&&v.offsetTop<l.scrollTop+u&&(m=v.offsetTop),n.set({"virtual.above":w,"virtual.below":x,"virtual.offset":h}),"number"==typeof m&&m!==v.offsetTop&&n.set("virtual.above",w+(m-v.offsetTop)),n.set({"virtual.top":n.get("virtual.above"),"virtual.bottom":l.scrollHeight-x})}s=!1}else l=null},c=this._scrollListener=this.on("scroll",function(e){e.node;s||(s=!0,requestAnimationFrame(d))});c.fn=d,c.observer=this.observe("rows.length",function(){n.set("virtual.offset",null),d()},{init:!1,strict:!0,defer:!0});var f=c.cancel;c.cancel=function(){f(),c.observer.cancel()}}a()}else this._autoObserver&&this._autoObserver.cancel(),this._scrollListener&&this._scrollListener.cancel();P(e)&&this.set("_paginate",e)},defer:!0},"scrollOffset tableHeight":{handler:function(){var e=this;this.rendered&&requestAnimationFrame(function(){var t=e.find(".rtable-top"),n=t&&e.getContext(t);n&&n.decorators&&n.decorators.scrolled&&n.decorators.scrolled.refresh()})},init:!1},scroll:function(e,t){~(e||"").indexOf("top")&&!~(t||"").indexOf("top")&&this.fire("scrolltop",{}),~(e||"").indexOf("bottom")&&!~(t||"").indexOf("bottom")&&this.fire("scrollbottom",{})}},data:function(){return Object.assign({page:0,selections:[],showGroups:!0,allowGroupSelect:!0,expanded:null,minPerPage:10,virtual:{offset:0},shuffle:!1,rows:[]},z.settings)},computed:{allowSelect:function(){return this.get("allow-select")},allowSelectAll:function(){return this.get("allow-select-all")},fixedHeader:function(){return this.get("fixed-header")},autoTitles:function(){return this.get("auto-titles")},noHeader:function(){return this.get("no-header")},noWrap:function(){return this.get("no-wrap")},_rows:function(){var e=(this.get("items")||[]).slice(),t=this.get("filter"),n=this.get("sort"),r=this.get("parameters"),i=(this.get("data-handler"),this.get("@style.raui.table.data-handler"),[this.get("data-pre-handler"),this.get("@style.raui.table.data-pre-handler")]),o=i[0],a=i[1];return(o||a)&&(o||a)(this,e,t,n,r),{}},visibleRows:function(){var e=this,n=this.get("rows"),r=this.get("paginate"),i=r,o=this.get("_paginate"),a=this.get("page")||0,l=this.get("virtual");return i?("number"!=typeof i&&isNaN(+i)&&(i="auto"===i||"virtual"===i||i instanceof t?o||1:30),i<this.get("minPerPage")&&(i=this.get("minPerPage")),"virtual"===r?(a=l&&l.offset||0,n.slice(a,a+i)):(a*i>n.length&&setTimeout(function(){return e.set("page",0)},0),n.slice(i*a,i*a+i))):n},pagination:function(){var e=this.get("items")||N,t=this.get("rows"),n=this.get("paginate"),r=n,i=this.get("page")||0;if("number"!=typeof r&&isNaN(r)&&(r=this.get("_paginate")),r<this.get("minPerPage")&&(r=this.get("minPerPage")),r){var o=Math.ceil(t.length/r),a={max:Math.ceil(e.length/r),total:o,per:r};if("virtual"===n&&(a.height=this._avg*t.length),a.total>14){var l=a.array=[];i>5?l.push(1,2,3,"..."):l.push(1,2,3,4,5,6,7,8),i>5&&i+6<o?l.push(i-1,i,i+1,i+2,i+3,"...",o-2,o-1,o):i+6<o?l.push("...",o-2,o-1,o):l.push(o-7,o-6,o-5,o-4,o-3,o-2,o-1,o)}else a.array=Array.apply(null,{length:a.total}).map(function(e,t){return t+1});return a}},groups:function(){for(var e,t,n=this.get("rows"),r={},i=0;i<n.length;i++)(t=n[i][this._init.by])!=e&&(r[i]=1),e=t;return r}}});var H=/^[^\d]*/;function W(e){return P(e)?e:e&&(e=(""+e).replace(H,""))?parseFloat(e):1/0}function T(e,n,r){if("function"==typeof n.get)return n.get;var i=(r?n.sort:0)||n.path||n.filter||n.id;if("string"==typeof i){var o=t.splitKeypath(i);return function(e){for(var t=e,n=0;n<o.length;n++)t=t&&t[o[n]];return t}}}function j(e,t,n,r){var i=[].concat(e.viewmodel.value.columns,e.viewmodel.value.fields),o=i.reduce(function(e,t){return e[t.id]=T(0,t),e},{}),a=Object.values(o),l=t||[];if((n instanceof RegExp||S(n))&&n){var s=n===""+n.toLowerCase()||n===""+n.toUpperCase();try{var d=S(n)?new RegExp(n,s?"i":""):n;l=l.filter(function(e){for(var t=a.length;t--;){var n=e&&a[t](e);if(n&&d.test(n))return!0}})}catch(e){}}return(S(r)||E(r)&&!Array.isArray(r))&&(r=[r]),Array.isArray(r)&&(r=r.map(function(t){if(S(t)){var n="-"===t[0]||"+"===t[0]?t.substr(1):t,r=i.find(function(e){return e.id===n});if(!r)return;var o={get:T(0,r,!0),dir:"-"===t[0]?-1:1};if(r&&"number"===r.type){var a=o.get;o.get=function(t){return W(a.call(e,t))}}return o}if(t&&"object"==typeof t){var l=i.find(function(e){return e.id===id});if(!l)return;var s={dir:P(t.dir)?t.dir:"desc"===t.dir?-1:1,get:T(0,l,!0)};if("number"===t.type||l&&"number"===l.type){var d=s.get;s.get=function(t){return W(d.call(e,t))}}return s}}).filter(function(e){return e&&e.get}),l.sort(function(t,n){for(var i,o,a,l=0;l<r.length;l++)if(i=r[l].get.call(e,t),o=r[l].get.call(e,n),0!==(a=r[l].dir*(i<o?-1:i>o?1:0)))return a;return a})),l}function M(e){var t=[{n:"gridValue",x:{r:"~/gridValue"}},{n:"gridName",x:{r:"~/gridName"}},{n:"gridSize",x:{r:"~/tableWidth"}},{n:"gridMax",x:{r:"~/gridMax"}},{n:"table",x:{r:"@this"}}];return[e.filter(function(e){return!0!==e.hidden}).map(function(e,n){null==e.index&&(e.index=n),e.attrsHP=e.attrs.filter(function(e){return"title"!==e.n});var r={t:7,e:"div",f:[{t:7,e:"div",f:[{t:16,r:"~/columns."+n+".label",c:{r:"."},z:t}]}],m:[{t:13,n:"title",f:e.title||e.label},{t:16,r:"~/columns."+n+".attrsHP",z:t}]};if(e.type&&r.m.push({t:13,n:"class-rtable-"+e.type+"-column"}),(e.filter||e.sort)&&r.m.push({t:13,n:"class-rtable-sortable"},{t:4,n:53,r:"~/columns."+n,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:"[_0._setSort(_1,_2)]"}}]}),r.m.push({t:13,n:"class-rtable-column"}),e.fixed){var i=e.fixed.path||"~/columns."+n+".fixed";r.m.push({t:13,n:"class-rtable-fixed-column",f:[{t:2,r:i}]}),r.m.push({t:4,n:50,x:{r:["~/noWrap",i],s:"_0&&typeof _1==='string'"},f:[{t:13,n:"style-left",f:[{t:2,r:i}]}]})}var o=r;return e.hidden&&e.hidden.r&&(o={t:4,n:51,r:e.hidden.r,f:[r]}),o}),e.filter(function(e){return!0!==e.hidden}).map(function(e,n){var r=[{t:7,e:"div",f:[{t:16,r:"~/columns."+n+".content",c:{r:"."},z:t}]}];e.attrs.length?(e.attrsP=e.attrs,e.attrs=[{t:16,r:"~/columns."+n+".attrsP",c:{r:"."},z:t}]):e.attrs=[];var i=e.attrs;if(e.fixed){var o=e.fixed.path||"~/columns."+n+".fixed";i.push({t:13,n:"class-rtable-fixed-column",f:[{t:2,r:o}]}),i.push({t:4,n:50,x:{r:["~/noWrap",o],s:"_0&&typeof _1==='string'"},f:[{t:13,n:"style-left",f:[{t:2,r:o}]}]})}if(e.editable&&(e.filter||e.editP)){var a={t:70,n:["click","mousedown","pointerdown","MSPointerDown","touchstart"],f:{r:["@event"],s:"[_0.stopPropagation()]"}},l=[{t:4,n:50,x:{r:["~/columns."+n+".editP"],s:"Array.isArray(_0)"},f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-edit"},a],f:[{t:16,r:"~/columns."+n+".editP"}]}]},{t:4,n:50,l:1,x:{r:["~/columns."+n+".type"],s:"_0==='boolean'"},f:[{t:7,e:"input",m:[{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,r:e.filter}]},a]}]},{t:4,n:51,l:1,f:[{t:7,e:"input",m:[{t:13,n:"value",f:[{t:2,r:e.filter}]},a]}]}];"object"==typeof e.editable?(i.push({t:13,n:"class-rtable-editing",f:e.editable}),r=[Object.assign({},e.editable,{t:4,n:50,f:l}),{t:4,n:51,l:1,f:r}]):(i.push({t:13,n:"class-rtable-editing"}),r=l)}e.valign&&i.push({t:13,n:"class-rtable-valign-col-top",f:[{t:2,x:{r:["~/columns."+n+".valign"],s:"_0==='top'"}}]},{t:13,n:"class-rtable-valign-col-bottom",f:[{t:2,x:{r:["~/columns."+n+".valign"],s:"_0==='bottom'"}}]},{t:13,n:"class-rtable-valign-col-center",f:[{t:2,x:{r:["~/columns."+n+".valign"],s:"_0==='center'"}}]});var s={t:7,e:"div",f:r,m:i};e.type&&i.unshift({t:13,n:"class-rtable-"+e.type+"-column"}),i.push({t:13,n:"class-rtable-column"});var d=e.attrsP&&e.attrsP.find(function(e){return"title"===e.n});d?d.f||(i.unshift({t:13,n:"title",f:e.content.find(function(e){return e.e})?e.label:e.content}),e.attrsP.splice(i.indexOf(d),1)):i.unshift({t:4,n:50,r:"~/autoTitles",f:[{t:13,n:"title",f:e.content.find(function(e){return e.e})?e.label:e.content}]}),0===e.noPad?i.push({t:13,n:"class-rtable-no-pad"}):e.noPad&&i.push({t:13,n:"class-rtable-no-pad",f:e.noPad});var c=s;return e.hidden&&e.hidden.r&&(c={t:4,n:51,r:e.hidden.r,f:[s]}),c}),t]}var R=["label","type","filter","hidden","sort","no-pad","id","editable","fixed"],C=/^[a-z]{1,3}[0-9]+(?:-[0-9]+)?$/,N=[];function G(e){return void 0===e&&(e={}),function(t){var n=t.Ractive,r=t.instance;"includeGrid"in e&&n.styleSet("table.includeGrid",e.includeGrid),r.components[e.name||"data-table"]=z}}r("RauiTable","components",z),e.Table=z,e.numberify=W,e.plugin=G,e.default=G,Object.defineProperty(e,"__esModule",{value:!0})});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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