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

@evs-chris/raui

Package Overview
Dependencies
Maintainers
1
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evs-chris/raui - npm Package Compare versions

Comparing version 0.5.8 to 0.5.9

.vscode/settings.json

2

es/Card.js

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

var template = {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-wrapper",g:1},{t:8,r:"extra-attributes"},{n:"class-rcard-margin",t:13,f:[{t:2,r:"_card.margin"}]},{n:"class-rcard-wrapper-popout",t:13,f:[{t:2,r:"_card.popout"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard",g:1},{n:"class-rcard-no-pad",t:13,f:[{t:2,r:"_card.noPad"}]},{n:"class-rcard-section",t:13,f:[{t:2,r:"_card.section"}]},{n:"class-rcard-flat",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:"\"flat\" in _0?_1:_2"}}]},{n:"class-rcard-deep",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:"\"flat\" in _0?!_1:!_2"}}]},{n:"class-rcard-popout",t:13,f:[{t:2,r:"_card.popout"}]},{n:"class-rcard-collapsed",t:13,f:[{t:2,x:{r:["_card.expandable","_card.expanded"],s:"_0&&_1===false"}}]},{n:"class-rcard-expandable",t:13,f:[{t:2,r:"_card.expandable"}]},{n:"class-rcard-arrow",t:13,f:[{t:2,r:"_card.arrow"}]},{n:"class-rcard-no-fill",t:13,f:[{t:2,r:"_card.noFill"}]},{n:"class-rcard-with-header",t:13,f:[{t:2,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:"_0||_1||_2||_3||_4||(_5&&typeof _5===\"string\"||(_6&&_7))"}}]}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-header",g:1},{t:4,f:[{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:"[(_0).set(\"_card.expanded\",_1===false?true:false)]"}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-expand",g:1},{n:"class-rcard-expanded",t:13,f:[{t:2,x:{r:["_card.expanded"],s:"_0!==false"}}]}],f:[{t:7,e:"svg",f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:50,x:{r:["_card.arrow","_card.expandable"],s:"_0&&_1"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-pad",g:1}],f:[" "]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{n:"class-rcard-avatar-round",t:13,f:[{t:2,r:"_card.round"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar-inner",g:1},{n:"style-background-image",f:["url(",{t:2,r:"_card.avatar"},")"],t:13}]}]}],n:50,x:{r:["_card.avatar"],s:"_0&&typeof _0===\"string\""}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{t:4,f:[{t:8,r:"_card.avatarA"}],n:50,r:"_card.avatarA"}],f:[{t:8,r:"_card.avatarP"}]}],n:50,r:"_card.avatarP",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-titles",g:1},{n:"class-rcard-with-sub",t:13,f:[{t:2,x:{r:["_card.subtitle","_card.subtitleP"],s:"_0||_1"}}]},{n:"class-rcard-with-tabs",t:13,f:[{t:2,r:"_card.tabs"}]},{t:4,f:[{n:"class-rcard-shrink",t:13},{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:"[(_0).set(\"_card.expanded\",_1===false?true:false)]"}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&!_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1}],f:[{t:2,r:"_card.title"}]}],n:50,r:"_card.title"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1},{t:4,f:[{t:8,r:"_card.titleA"}],n:50,r:"_card.titleA"}],f:[{t:8,r:"_card.titleP"}]}],n:51,l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1}],f:[{t:2,r:"_card.subtitle"}]}],n:50,r:"_card.subtitle"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1},{t:4,f:[{t:8,r:"_card.subtitleA"}],n:50,r:"_card.subtitleA"}],f:[{t:8,r:"_card.subtitleP"}]}],n:50,r:"_card.subtitleP",l:1}]}," ",{t:4,f:[{t:8,r:"tabs"}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-right",g:1},{n:["click"],t:70,f:{r:[],s:"[false,false]"}}],f:[{t:8,r:"_card.titleRightP"}]}],n:50,r:"_card.titleRightP"}]}],n:50,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:"_0||_1||_2||_3||_4||(_5&&typeof _5===\"string\"||(_6&&_7))"}}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:7,e:"img",m:[{n:"src",f:[{t:2,r:"_card.image"}],t:13},{n:"alt",f:[{t:2,r:"_card.alt"}],t:13}]}]}],n:50,r:"_card.image"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"},{t:4,f:[{t:8,r:"_card.imageA"}],n:50,r:"_card.imageA"}],f:[{t:8,r:"_card.imageP"}]}],n:50,r:"_card.imageP",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-content",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.contentP"}]}],n:50,r:"_card.contentP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}," ",{t:8,r:"tabs"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&!_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-footer",g:1},{t:4,f:[{t:8,r:"_card.footerA"}],n:50,r:"_card.footerA"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.footerP"}]}],n:50,r:"_card.footerP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-actions",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:4,f:[{t:4,f:[{t:8,r:".P"}],n:50,r:".P"},{t:4,f:[{t:7,e:"button",m:[{t:8,x:{r:[".attrs"],s:"_0||[]"}}],f:[{t:8,r:".content"}]}],n:51,l:1}],n:52,r:"_card.actions"}]}],n:50,r:"_card.actions.length"}],n:50,x:{r:["_card.expandable","_card.expanded"],s:"!_0||_1!==false"}}]}]}],e:{"\"flat\" in _0?_1:_2":function (_0,_1,_2){return("flat" in _0?_1:_2);},"\"flat\" in _0?!_1:!_2":function (_0,_1,_2){return("flat" in _0?!_1:!_2);},"_0&&_1===false":function (_0,_1){return(_0&&_1===false);},"_0||_1||_2||_3||_4||(_5&&typeof _5===\"string\"||(_6&&_7))":function (_0,_1,_2,_3,_4,_5,_6,_7){return(_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7)));},"[(_0).set(\"_card.expanded\",_1===false?true:false)]":function (_0,_1){return([(_0).set("_card.expanded",_1===false?true:false)]);},"_0&&_1":function (_0,_1){return(_0&&_1);},"_0!==false":function (_0){return(_0!==false);},"_0&&typeof _0===\"string\"":function (_0){return(_0&&typeof _0==="string");},"_0||_1":function (_0,_1){return(_0||_1);},"_0&&!_1":function (_0,_1){return(_0&&!_1);},"[false,false]":function (){return([false,false]);},"_0||[]":function (_0){return(_0||[]);},"!_0||_1!==false":function (_0,_1){return(!_0||_1!==false);},"_0===_1+_2||(!_0&&!_1&&!_2)":function (_0,_1,_2){return(_0===_1+_2||(!_0&&!_1&&!_2));},"(_0||0)*100":function (_0){return((_0||0)*100);},"_0===_1||(!_0&&!_1)":function (_0,_1){return(_0===_1||(!_0&&!_1));},"[(_2).set(\"_card.selected\",_0+_1),(_2).set(\"_card.expanded\",true),false]":function (_0,_1,_2){return([(_2).set("_card.selected",_0+_1),(_2).set("_card.expanded",true),false]);},"[(_1).set(\"_card.selected\",_0),(_1).set(\"_card.expanded\",true),false]":function (_0,_1){return([(_1).set("_card.selected",_0),(_1).set("_card.expanded",true),false]);}},p:{"tab-body":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]}],f:[{t:8,r:".content"}]}],"tab-bodies":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-contents",g:1},{n:"style-left",f:["-",{t:2,x:{r:["_card.selected"],s:"(_0||0)*100"}},"%"],t:13}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]}],f:[{t:8,r:".content"}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.body"}],n:50,r:"_card.tablist"}]}]}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]},{n:["click"],t:70,f:{r:["_card.tabs.length","@index","@context"],s:"[(_2).set(\"_card.selected\",_0+_1),(_2).set(\"_card.expanded\",true),false]"}}],f:[{t:8,r:".title"}]}],tabs:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]},{n:["click"],t:70,f:{r:["@index","@context"],s:"[(_1).set(\"_card.selected\",_0),(_1).set(\"_card.expanded\",true),false]"}}],f:[{t:8,r:".title"}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.tab"}],n:50,r:"_card.tablist"}]}]}]}};
var template = {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-wrapper",g:1},{t:8,r:"extra-attributes"},{n:"class-rcard-margin",t:13,f:[{t:2,r:"_card.margin"}]},{n:"class-rcard-wrapper-popout",t:13,f:[{t:2,r:"_card.popout"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard",g:1},{n:"class-rcard-no-pad",t:13,f:[{t:2,r:"_card.noPad"}]},{n:"class-rcard-section",t:13,f:[{t:2,r:"_card.section"}]},{n:"class-rcard-flat",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:"\"flat\" in _0?_1:_2"}}]},{n:"class-rcard-deep",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:"\"flat\" in _0?!_1:!_2"}}]},{n:"class-rcard-popout",t:13,f:[{t:2,r:"_card.popout"}]},{n:"class-rcard-collapsed",t:13,f:[{t:2,x:{r:["_card.expandable","_card.expanded"],s:"_0&&_1===false"}}]},{n:"class-rcard-expandable",t:13,f:[{t:2,r:"_card.expandable"}]},{n:"class-rcard-arrow",t:13,f:[{t:2,r:"_card.arrow"}]},{n:"class-rcard-no-fill",t:13,f:[{t:2,r:"_card.noFill"}]},{n:"class-rcard-with-header",t:13,f:[{t:2,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:"_0||_1||_2||_3||_4||(_5&&typeof _5===\"string\"||(_6&&_7))"}}]}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-header",g:1},{t:4,f:[{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:"[(_0).set(\"_card.expanded\",_1===false?true:false)]"}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-expand",g:1},{n:"class-rcard-expanded",t:13,f:[{t:2,x:{r:["_card.expanded"],s:"_0!==false"}}]}],f:[{t:7,e:"svg",f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:50,x:{r:["_card.arrow","_card.expandable"],s:"_0&&_1"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-pad",g:1}],f:[" "]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{n:"class-rcard-avatar-round",t:13,f:[{t:2,r:"_card.round"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar-inner",g:1},{n:"style-background-image",f:["url(",{t:2,r:"_card.avatar"},")"],t:13}]}]}],n:50,x:{r:["_card.avatar"],s:"_0&&typeof _0===\"string\""}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{t:4,f:[{t:8,r:"_card.avatarA"}],n:50,r:"_card.avatarA"}],f:[{t:8,r:"_card.avatarP"}]}],n:50,r:"_card.avatarP",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-titles",g:1},{n:"class-rcard-with-sub",t:13,f:[{t:2,x:{r:["_card.subtitle","_card.subtitleP"],s:"_0||_1"}}]},{n:"class-rcard-with-tabs",t:13,f:[{t:2,r:"_card.tabs"}]},{t:4,f:[{n:"class-rcard-shrink",t:13},{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:"[(_0).set(\"_card.expanded\",_1===false?true:false)]"}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&!_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1}],f:[{t:2,r:"_card.title"}]}],n:50,r:"_card.title"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1},{t:4,f:[{t:8,r:"_card.titleA"}],n:50,r:"_card.titleA"}],f:[{t:8,r:"_card.titleP"}]}],n:51,l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1}],f:[{t:2,r:"_card.subtitle"}]}],n:50,r:"_card.subtitle"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1},{t:4,f:[{t:8,r:"_card.subtitleA"}],n:50,r:"_card.subtitleA"}],f:[{t:8,r:"_card.subtitleP"}]}],n:50,r:"_card.subtitleP",l:1}]}," ",{t:4,f:[{t:8,r:"tabs"}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-right",g:1},{n:["click"],t:70,f:{r:[],s:"[false,false]"}}],f:[{t:8,r:"_card.titleRightP"}]}],n:50,r:"_card.titleRightP"}]}],n:50,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:"_0||_1||_2||_3||_4||(_5&&typeof _5===\"string\"||(_6&&_7))"}}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:7,e:"img",m:[{n:"src",f:[{t:2,r:"_card.image"}],t:13},{n:"alt",f:[{t:2,r:"_card.alt"}],t:13}]}]}],n:50,r:"_card.image"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"},{t:4,f:[{t:8,r:"_card.imageA"}],n:50,r:"_card.imageA"}],f:[{t:8,r:"_card.imageP"}]}],n:50,r:"_card.imageP",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-content",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.contentP"}]}],n:50,r:"_card.contentP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}," ",{t:8,r:"tabs"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&!_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-footer",g:1},{t:4,f:[{t:8,r:"_card.footerA"}],n:50,r:"_card.footerA"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.footerP"}]}],n:50,r:"_card.footerP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-actions",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:4,f:[{t:4,f:[{t:8,r:".P"}],n:50,r:".P"},{t:4,f:[{t:7,e:"button",m:[{t:8,x:{r:[".attrs"],s:"_0||[]"}}],f:[{t:8,r:".content"}]}],n:51,l:1}],n:52,r:"_card.actions"}]}],n:50,r:"_card.actions.length"}],n:50,x:{r:["_card.expandable","_card.expanded"],s:"!_0||_1!==false"}}]}]}],e:{"\"flat\" in _0?_1:_2":function (_0,_1,_2){return("flat" in _0?_1:_2);},"\"flat\" in _0?!_1:!_2":function (_0,_1,_2){return("flat" in _0?!_1:!_2);},"_0&&_1===false":function (_0,_1){return(_0&&_1===false);},"_0||_1||_2||_3||_4||(_5&&typeof _5===\"string\"||(_6&&_7))":function (_0,_1,_2,_3,_4,_5,_6,_7){return(_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7)));},"[(_0).set(\"_card.expanded\",_1===false?true:false)]":function (_0,_1){return([(_0).set("_card.expanded",_1===false?true:false)]);},"_0&&_1":function (_0,_1){return(_0&&_1);},"_0!==false":function (_0){return(_0!==false);},"_0&&typeof _0===\"string\"":function (_0){return(_0&&typeof _0==="string");},"_0||_1":function (_0,_1){return(_0||_1);},"_0&&!_1":function (_0,_1){return(_0&&!_1);},"[false,false]":function (){return([false,false]);},"_0||[]":function (_0){return(_0||[]);},"!_0||_1!==false":function (_0,_1){return(!_0||_1!==false);},"_0===_1+_2||(!_0&&!_1&&!_2)":function (_0,_1,_2){return(_0===_1+_2||(!_0&&!_1&&!_2));},"(_0||0)*100":function (_0){return((_0||0)*100);},"_0===_1||(!_0&&!_1)":function (_0,_1){return(_0===_1||(!_0&&!_1));},"[(_2).set(\"_card.selected\",_0+_1),(_2).set(\"_card.expanded\",true),false]":function (_0,_1,_2){return([(_2).set("_card.selected",_0+_1),(_2).set("_card.expanded",true),false]);},"[(_1).set(\"_card.selected\",_0),(_1).set(\"_card.expanded\",true),false]":function (_0,_1){return([(_1).set("_card.selected",_0),(_1).set("_card.expanded",true),false]);}},p:{"tab-body":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]}],f:[{t:8,r:".content"}]}],"tab-bodies":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-contents",g:1},{n:"style-left",f:["-",{t:2,x:{r:["_card.selected"],s:"(_0||0)*100"}},"%"],t:13}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]}],f:[{t:8,r:".content",c:{r:"^^/"}}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.body"}],n:50,r:"_card.tablist"}]}]}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]},{n:["click"],t:70,f:{r:["_card.tabs.length","@index","@context"],s:"[(_2).set(\"_card.selected\",_0+_1),(_2).set(\"_card.expanded\",true),false]"}}],f:[{t:8,r:".title"}]}],tabs:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]},{n:["click"],t:70,f:{r:["@index","@context"],s:"[(_1).set(\"_card.selected\",_0),(_1).set(\"_card.expanded\",true),false]"}}],f:[{t:8,r:".title",c:{r:"^^/"}}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.tab"}],n:50,r:"_card.tablist"}]}]}]}};

@@ -8,0 +8,0 @@ export var Card = Ractive.macro(

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

import Ractive from"ractive";import globalRegister from"./globalRegister";import{expand}from"./transition-expand";var template={v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-wrapper",g:1},{t:8,r:"extra-attributes"},{n:"class-rcard-margin",t:13,f:[{t:2,r:"_card.margin"}]},{n:"class-rcard-wrapper-popout",t:13,f:[{t:2,r:"_card.popout"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard",g:1},{n:"class-rcard-no-pad",t:13,f:[{t:2,r:"_card.noPad"}]},{n:"class-rcard-section",t:13,f:[{t:2,r:"_card.section"}]},{n:"class-rcard-flat",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:'"flat" in _0?_1:_2'}}]},{n:"class-rcard-deep",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:'"flat" in _0?!_1:!_2'}}]},{n:"class-rcard-popout",t:13,f:[{t:2,r:"_card.popout"}]},{n:"class-rcard-collapsed",t:13,f:[{t:2,x:{r:["_card.expandable","_card.expanded"],s:"_0&&_1===false"}}]},{n:"class-rcard-expandable",t:13,f:[{t:2,r:"_card.expandable"}]},{n:"class-rcard-arrow",t:13,f:[{t:2,r:"_card.arrow"}]},{n:"class-rcard-no-fill",t:13,f:[{t:2,r:"_card.noFill"}]},{n:"class-rcard-with-header",t:13,f:[{t:2,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:'_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7))'}}]}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-header",g:1},{t:4,f:[{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:'[(_0).set("_card.expanded",_1===false?true:false)]'}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-expand",g:1},{n:"class-rcard-expanded",t:13,f:[{t:2,x:{r:["_card.expanded"],s:"_0!==false"}}]}],f:[{t:7,e:"svg",f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:50,x:{r:["_card.arrow","_card.expandable"],s:"_0&&_1"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-pad",g:1}],f:[" "]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{n:"class-rcard-avatar-round",t:13,f:[{t:2,r:"_card.round"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar-inner",g:1},{n:"style-background-image",f:["url(",{t:2,r:"_card.avatar"},")"],t:13}]}]}],n:50,x:{r:["_card.avatar"],s:'_0&&typeof _0==="string"'}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{t:4,f:[{t:8,r:"_card.avatarA"}],n:50,r:"_card.avatarA"}],f:[{t:8,r:"_card.avatarP"}]}],n:50,r:"_card.avatarP",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-titles",g:1},{n:"class-rcard-with-sub",t:13,f:[{t:2,x:{r:["_card.subtitle","_card.subtitleP"],s:"_0||_1"}}]},{n:"class-rcard-with-tabs",t:13,f:[{t:2,r:"_card.tabs"}]},{t:4,f:[{n:"class-rcard-shrink",t:13},{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:'[(_0).set("_card.expanded",_1===false?true:false)]'}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&!_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1}],f:[{t:2,r:"_card.title"}]}],n:50,r:"_card.title"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1},{t:4,f:[{t:8,r:"_card.titleA"}],n:50,r:"_card.titleA"}],f:[{t:8,r:"_card.titleP"}]}],n:51,l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1}],f:[{t:2,r:"_card.subtitle"}]}],n:50,r:"_card.subtitle"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1},{t:4,f:[{t:8,r:"_card.subtitleA"}],n:50,r:"_card.subtitleA"}],f:[{t:8,r:"_card.subtitleP"}]}],n:50,r:"_card.subtitleP",l:1}]}," ",{t:4,f:[{t:8,r:"tabs"}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-right",g:1},{n:["click"],t:70,f:{r:[],s:"[false,false]"}}],f:[{t:8,r:"_card.titleRightP"}]}],n:50,r:"_card.titleRightP"}]}],n:50,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:'_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7))'}}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:7,e:"img",m:[{n:"src",f:[{t:2,r:"_card.image"}],t:13},{n:"alt",f:[{t:2,r:"_card.alt"}],t:13}]}]}],n:50,r:"_card.image"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"},{t:4,f:[{t:8,r:"_card.imageA"}],n:50,r:"_card.imageA"}],f:[{t:8,r:"_card.imageP"}]}],n:50,r:"_card.imageP",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-content",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.contentP"}]}],n:50,r:"_card.contentP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}," ",{t:8,r:"tabs"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&!_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-footer",g:1},{t:4,f:[{t:8,r:"_card.footerA"}],n:50,r:"_card.footerA"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.footerP"}]}],n:50,r:"_card.footerP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-actions",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:4,f:[{t:4,f:[{t:8,r:".P"}],n:50,r:".P"},{t:4,f:[{t:7,e:"button",m:[{t:8,x:{r:[".attrs"],s:"_0||[]"}}],f:[{t:8,r:".content"}]}],n:51,l:1}],n:52,r:"_card.actions"}]}],n:50,r:"_card.actions.length"}],n:50,x:{r:["_card.expandable","_card.expanded"],s:"!_0||_1!==false"}}]}]}],e:{'"flat" in _0?_1:_2':function(_0,_1,_2){return"flat"in _0?_1:_2},'"flat" in _0?!_1:!_2':function(_0,_1,_2){return"flat"in _0?!_1:!_2},"_0&&_1===false":function(_0,_1){return _0&&_1===false},'_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7))':function(_0,_1,_2,_3,_4,_5,_6,_7){return _0||_1||_2||_3||_4||(_5&&typeof _5==="string"||_6&&_7)},'[(_0).set("_card.expanded",_1===false?true:false)]':function(_0,_1){return[_0.set("_card.expanded",_1===false?true:false)]},"_0&&_1":function(_0,_1){return _0&&_1},"_0!==false":function(_0){return _0!==false},'_0&&typeof _0==="string"':function(_0){return _0&&typeof _0==="string"},"_0||_1":function(_0,_1){return _0||_1},"_0&&!_1":function(_0,_1){return _0&&!_1},"[false,false]":function(){return[false,false]},"_0||[]":function(_0){return _0||[]},"!_0||_1!==false":function(_0,_1){return!_0||_1!==false},"_0===_1+_2||(!_0&&!_1&&!_2)":function(_0,_1,_2){return _0===_1+_2||!_0&&!_1&&!_2},"(_0||0)*100":function(_0){return(_0||0)*100},"_0===_1||(!_0&&!_1)":function(_0,_1){return _0===_1||!_0&&!_1},'[(_2).set("_card.selected",_0+_1),(_2).set("_card.expanded",true),false]':function(_0,_1,_2){return[_2.set("_card.selected",_0+_1),_2.set("_card.expanded",true),false]},'[(_1).set("_card.selected",_0),(_1).set("_card.expanded",true),false]':function(_0,_1){return[_1.set("_card.selected",_0),_1.set("_card.expanded",true),false]}},p:{"tab-body":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]}],f:[{t:8,r:".content"}]}],"tab-bodies":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-contents",g:1},{n:"style-left",f:["-",{t:2,x:{r:["_card.selected"],s:"(_0||0)*100"}},"%"],t:13}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]}],f:[{t:8,r:".content"}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.body"}],n:50,r:"_card.tablist"}]}]}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]},{n:["click"],t:70,f:{r:["_card.tabs.length","@index","@context"],s:'[(_2).set("_card.selected",_0+_1),(_2).set("_card.expanded",true),false]'}}],f:[{t:8,r:".title"}]}],tabs:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]},{n:["click"],t:70,f:{r:["@index","@context"],s:'[(_1).set("_card.selected",_0),(_1).set("_card.expanded",true),false]'}}],f:[{t:8,r:".title"}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.tab"}],n:50,r:"_card.tablist"}]}]}]}};export var Card=Ractive.macro(function(handle){init(handle);handle.setTemplate(template);return{update:function update(){updateAttrs(handle)},teardown:function teardown(){if(handle._link&&typeof handle._link==="string"){handle.unlink(handle._link)}}}},{cssId:"rm-card",css:function(data){return[function(data){var primary=Object.assign({},data("raui.primary"),data("raui.card.primary"));var header=Object.assign({},primary,data("raui.card.primary.header"));var themes=(data("raui.themes")||[]).slice();(data("raui.card.themes")||[]).forEach(function(t){if(!~themes.indexOf(t)){themes.push(t)}});return"\n .rcard-margin {\n padding: 0.5em;\n box-sizing: border-box;\n }\n .rcard-margin.rcard-wrapper-popout {\n padding-top: 2.5em;\n }\n .rcard-no-fill {\n height: auto;\n }\n .rcard {\n position: relative;\n display: block;\n color: "+(primary.fg||"#222")+";\n background-color: "+(primary.bg||"#fff")+";\n border-radius: "+(primary.radius||"0.2em")+";\n transition-duration: "+(primary.duration||"0.2s")+";\n transition-timing-function: "+(primary.easing||"ease-in-out")+";\n transition-property: box-shadow, border, background-color, color, margin, padding;\n height: 100%;\n }\n \n .rcard > div {\n margin-top: 1em;\n }\n .rcard.rcard-with-header > div:first-of-type {\n margin-top: 0;\n }\n .rcard > div:last-of-type {\n margin-bottom: 1em;\n }\n .rcard > .rcard-actions:last-of-type {\n margin-bottom: 0;\n }\n .rcard-section > .rcard-header:last-of-type {\n margin-bottom: 0;\n }\n \n .rcard-section {\n overflow: hidden;\n }\n \n .rcard-deep {\n box-shadow: "+(primary.shadow||"0 1px 4px 0 rgba(0,0,0,0.14)")+";\n border: 1px solid "+(primary.bc||"#ccc")+";\n }\n .rcard-flat {\n border: 0.0625em solid "+(primary.bc||"#ccc")+";\n box-shadow: none;\n }\n \n .rcard-no-pad > .rcard-content {\n padding: 0;\n }\n \n .rcard-content {\n padding: 0 1em;\n }\n \n .rcard-header {\n position: relative;\n display: flex;\n align-items: center;\n transition-duration: "+(header.duration||"0.2s")+";\n transition-timing-function: "+(header.easing||"ease-in-out")+";\n transition-property: color, background-color, padding, height;\n min-height: 4em;\n flex-wrap: wrap;\n }\n \n .rcard-section > .rcard-header {\n background-color: "+(header.fga||"#07e")+";\n color: "+(header.bg||"#fff")+";\n min-height: auto;\n }\n \n .rcard-section > .rcard-header:first-of-type {\n padding: 0;"+(header.gradient?"\n background: "+header.gradient+";\n color: "+(header.fg||"#222")+";\n border-bottom: 1px solid "+(header.bc||"#ccc")+";":"")+"\n }\n .rcard-header .rcard-title-pad {\n height: 100%;\n width: 0;"+(header.padding?"\n margin: "+header.padding+" 0;":"")+"\n }\n \n .rcard-avatar {\n width: 3em;\n height: 3em;\n margin: 1em 0 0 1em;\n transition-duration: "+(primary.duration||"0.2s")+";\n transition-timing-function: "+(primary.easing||"ease-in-out")+";\n transition-property: width, height, bottom;\n }\n \n .rcard-avatar-inner {\n height: 100%;\n background-size: cover;\n transition-duration: "+(primary.duration||"0.2s")+";\n transition-timing-function: "+(primary.easing||"ease-in-out")+";\n transition-property: border-radius, box-shadow;\n }\n \n .rcard-avatar-round .rcard-avatar-inner {\n border-radius: 100%;\n }\n \n .rcard-section > .rcard-header .rcard-avatar {\n margin: 0.5em 0 0.5em 1em;\n }\n \n .rcard-section.rcard-popout {\n overflow: visible;\n }\n .rcard-section.rcard-popout > .rcard-header {\n border-radius: "+(primary.easing||"0.2em")+" "+(primary.radius||"0.2em")+" 0 0;\n }\n .rcard-popout > .rcard-header .rcard-avatar {\n margin-top: -2em;\n width: 6em;\n height: 6em;\n }\n .rcard-popout.rcard-section > .rcard-header .rcard-avatar {\n width: 3.75em;\n height: 3.75em;\n margin-top: -1.25em;\n }\n .rcard-popout.rcard-deep > .rcard-header .rcard-avatar-inner {\n box-shadow: 0 2px 2px rgba(0, 0, 0, 0.24), 0 0 2px rgba(0, 0, 0, 0.12);\n }\n \n .rcard-titles {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n line-height: 1em;\n transition-duration: "+(primary.duration||"0.2s")+";\n transition-timing-function: "+(primary.easing||"ease-in-out")+";\n transition-property: margin;\n margin: 1em 1em 0 1em;\n }\n .rcard-section > .rcard-header .rcard-titles.rcard-with-tabs {\n flex-grow: 0;\n margin-right: 3em;\n }\n .rcard-titles.rcard-shrink {\n flex-grow: 0;\n }\n \n .rcard-with-sub {\n justify-content: space-evenly;\n }\n .rcard-with-sub > .rcard-title {\n font-size: 1.2em;\n }\n \n .rcard-title {\n font-size: 1.5em;\n }\n \n .rcard-subtitle {\n opacity: 0.7;\n font-size: 1em;\n }\n \n .rcard-section > .rcard-header .rcard-titles {\n line-height: 1.2em;\n margin: 0.5em 1em 0.5em 1em;\n }\n .rcard-section > .rcard-header .rcard-with-sub {\n line-height: 1em;\n }\n .rcard-section > .rcard-header .rcard-with-sub > .rcard-title {\n font-size: 1.1em;\n }\n .rcard-section > .rcard-header .rcard-title {\n font-size: 1.2em;\n }\n \n .rcard-title-right {\n margin-top: 1em;\n margin-left: auto;\n margin-right: 1em;\n cursor: default;\n }\n .rcard-section > .rcard-header .rcard-title-right {\n margin-top: 0;\n }\n \n .rcard-expandable > .rcard-header:first-of-type {\n transition-property: color, background-color, height;\n padding-right: 2em;\n }\n .rcard-clickable {\n cursor: pointer;\n }\n .rcard-header > .rcard-expand {\n position: absolute;\n height: 24px;\n top: 1.7em;\n right: 0.5em;\n transition: transform 0.2s ease-in-out, top 0.2s ease-in-out;\n z-index: 1;\n }\n .rcard-section > .rcard-header .rcard-expand {\n top: 0.8em;\n }\n .rcard-expand.rcard-expanded {\n transform: rotate(180deg);\n transform-origin: center;\n }\n .rcard-expand svg {\n width: 24px;\n height: 24px;\n }\n .rcard-expand svg path {\n fill: "+(header.fg||"#222")+";\n stroke: "+(header.fg||"#222")+";\n }\n .rcard-section > .rcard-header .rcard-expand svg path {\n fill: "+(header.bg||"#fff")+";\n stroke: "+(header.bg||"#fff")+";\n }\n \n .rcard-popout.rcard-collapsed > .rcard-header .rcard-avatar {\n bottom: 1em;\n }\n .rcard-popout.rcard-collapsed.rcard-section > .rcard-header .rcard-avatar {\n bottom: 0.5em;\n }\n \n .rcard > div:first-of-type.rcard-image {\n margin-top: 0;\n }\n \n .rcard-image {\n margin-top: 1em;\n }\n \n .rcard-image > img {\n width: 100%;\n }\n \n .rcard-tabs-window {\n overflow: auto;\n }\n .rcard-section > .rcard-header .rcard-tabs-window {\n align-self: flex-end;\n flex-grow: 1;\n }\n \n .rcard-tabs {\n display: flex;\n border-top: 0.15em solid "+(primary.bga||"#f4f4f4")+";\n }\n \n .rcard-tab {\n box-sizing: border-box;\n padding: 0.5em 1em;\n height: 2.5em;\n user-select: none;\n opacity: 0.9;\n cursor: pointer;\n transition-duration: 0.2s;\n transition-timing-function: ease-in-out;\n transition-property: opacity, background-color, color, border-top, border-width;\n border-top: 0.15em solid transparent;\n margin-top: -0.15em;\n white-space: nowrap;\n border-top: 0.15em solid "+(primary.bga||"#f4f4f4")+";\n }\n .rcard-tab:hover {\n opacity: 1;\n }\n \n .rcard-tab.rcard-tab-selected {\n border-top: 0.15em solid "+(primary.fga||"#07e")+";\n opacity: 1;\n font-weight: 500;\n cursor: default;\n }\n \n .rcard-section > .rcard-header .rcard-tabs {\n margin-top: 0.5em;\n border-top: 0;\n }\n .rcard-section > .rcard-header .rcard-tab {\n margin-top: 0;\n border-color: "+(header.gradient?primary.bc||"#ccc":primary.bg||"#fff")+";\n border-style: solid;\n border-width: 1px 1px 0 0;\n color: "+(header.gradient?primary.fga||"#07e":header.bg||"#fff")+";\n }\n .rcard-section > .rcard-header .rcard-tab:first-of-type {\n border-width: 1px 1px 0 1px;\n }\n .rcard-section > .rcard-header .rcard-tab-selected {\n background-color: "+(primary.bg||"#fff")+";\n color: "+(primary.fg||"#222")+";\n }"+(header.gradient?"\n .rcard-section > .rcard-header .rcard-tabs-window {\n margin-bottom: -1px;\n }":"")+"\n \n \n .rcard-tab-window {\n overflow: hidden;\n margin: 0.5em 1em;\n }\n \n .rcard-tab-contents {\n width: 100%;\n box-sizing: border-box;\n position: relative;\n display: flex;\n }\n \n .rcard-tab-content {\n width: 100%;\n box-sizing: border-box;\n flex-shrink: 0;\n flex-grow: 0;\n opacity: 0;\n transition: opacity 0.4s ease-in-out;\n }\n .rcard-content-selected {\n opacity: 1;\n }\n \n .rcard-actions {\n padding: 0.5em;\n }\n \n .rcard > .rcard-actions:nth-of-type(n+1) {\n margin-top: 0.5em;\n }\n \n .rcard-actions > button {\n text-decoration: none;\n text-align: center;\n letter-spacing: 0.5px;\n cursor: pointer;\n user-select: none;\n border: none;\n border-radius: 2px;\n padding: 0 2rem;\n transition: 0.2s ease-in-out;\n transition-property: box-shadow, opacity, background-color;\n font-size: 1em;\n line-height: 1.5em;\n background-color: "+(primary.bg||"#fff")+";\n color: "+(primary.fg||"#222")+";\n vertical-align: middle;\n min-height: 2.25em;\n outline: 0;\n margin: 0.25em;\n position: relative;\n overflow: hidden;\n font-weight: 500;\n -webkit-tap-highlight-color: transparent;\n box-shadow: none;\n }\n \n .rcard-actions > button[disabled], .btn.disabled {\n opacity: 0.7;\n cursor: not-allowed;\n }\n \n .rcard-actions > button[disabled]:hover {\n opacity: 0.7;\n }\n \n .rcard-actions > button.flat:hover {\n box-shadow: none;\n }\n \n .rcard-actions > button:after {\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 1.5em, transparent 1.6em);\n opacity: 0;\n transform: scale(5, 5);\n transition: opacity 0.6s ease-out, transform 0.5s ease-in;\n }\n \n .rcard-actions > button:before {\n content: ' ';\n position: absolute;\n height: 100%;\n width: 100%;\n background-color: rgba(0, 0, 0, 0.075);\n opacity: 0;\n top: 0;\n left: 0;\n transition: opacity 0.4s ease-in-out;\n }\n \n .rcard-actions > button:focus:before {\n opacity: 1;\n }\n .rcard-actions > button:hover:before {\n opacity: 0.5;\n }\n \n .rcard-actions > button:active:after {\n transform: scale(1, 1);\n opacity: 1;\n transition: none;\n }\n "+themes.map(function(t){var theme=Object.assign({},data("raui.primary"),data("raui.card.primary"),data("raui."+t),data("raui.card."+t));var header=Object.assign({},theme,data("raui.card.primary.header"),data("raui.card."+t+".header"));return"\n ."+t+".rcard {\n color: "+(theme.fg||"#222")+";\n background-color: "+(theme.bg||"#fff")+";\n border-radius: "+(theme.radius||"0.2em")+";\n }\n ."+t+".rcard-deep {\n box-shadow: "+(primary.shadow||"0 1px 4px 0 rgba(0,0,0,0.14)")+";\n border: 1px solid "+(primary.bc||"#ccc")+";\n }\n ."+t+".rcard-flat {\n border: 0.0625em solid "+(primary.bc||"#ccc")+";\n }\n \n ."+t+".rcard-section > .rcard-header {\n background-color: "+(header.fga||"#07e")+";\n color: "+(header.bg||"#fff")+";\n }\n \n ."+t+".rcard-section > .rcard-header:first-of-type {\n padding: "+(header.padding||"0.5em 1em")+";"+(header.gradient?"\n background: "+header.gradient+";\n color: "+(header.fg||"#222")+";\n border-bottom: 1px solid "+(header.bc||"#ccc")+";":"")+"\n }"+(header.gradient?"\n "+t+".rcard-section > .rcard-header .rcard-tabs {\n margin-bottom: -1px;\n }":"")+"\n \n ."+t+" > .rcard-header.rcard-expand svg path {\n fill: "+(header.fg||"#222")+";\n stroke: "+(header.fg||"#222")+";\n }\n ."+t+".rcard-section > .rcard-header .rcard-expand svg path {\n fill: "+(header.bg||"#fff")+";\n stroke: "+(header.bg||"#fff")+";\n }\n ."+t+" > .rcard-actions > button {\n background-color: "+(primary.bg||"#fff")+";\n color: "+(primary.fg||"#222")+";\n }\n "}).join("")}.call(this,data)].join(" ")},noCssTransform:true,attributes:["title","subtitle","image","avatar","avatar-round","no-pad","image-alt","section","flat","popout","margin","expandable","expanded","no-arrow"]});function init(h){var data=h.get("@local");h.aliasLocal("_card");updateAttrs(h);var tpl=h.partials.content;var content=[];h.partials.tabs=template.p.tabs;h.partials["tab-bodies"]=template.p["tab-bodies"];h.partials.tab=template.p.tab;h.partials["tab-body"]=template.p["tab-body"];tpl.forEach(function(n){if(n.e==="title"){data.titleA=n.m;data.titleP=n.f.filter(function(e){return e.e!=="right"});var right=n.f.find(function(e){return e.e==="right"});if(right){data.titleRightP=right.f}}else if(n.e==="subtitle"){data.subtitleA=n.m;data.subtitleP=n.f}else if(n.e==="avatar"){var img;if(n.m){data.avatarA=n.m.filter(function(a){return a.n!=="round"&&a.n!=="image"&&a.n!=="popout"});var a;if(a=n.m.find(function(a){return a.n==="round"})){if(a.f===0){data.avatarA.push({t:13,g:1,n:"class",f:"rcard-avatar-round"})}else{data.avatarA.push({t:13,n:"class-rcard-avatar-round",f:a.f})}}if(a=n.m.find(function(a){return a.n==="image"})){img=a.f}}if(img){data.avatarP=[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar-inner",g:1},{n:"style-background-image",f:["url("].concat(img,[")"]),t:13}]}];if(img.length===1&&img[0].t===2){data.avatarP=[Object.assign({},img[0],{t:4,n:50,f:data.avatarP})]}}else if(n.f&&n.f.length){data.avatarP=n.f}}else if(n.e==="footer"){data.footerA=n.m;data.footerP=n.f}else if(n.e==="action"){(data.actions||(data.actions=[])).push({attrs:n.m,content:n.f})}else if(n.t===4&&n.n===50&&n.f&&n.f.filter(function(n){return typeof n!=="string"}).length===1&&n.f.find(function(e){return e.e==="action"})){var section=Object.assign({},n);var b=section.f.find(function(e){return e.e==="action"});section.f=[{t:7,e:"button",m:b.m,f:b.f}];(data.actions||(data.actions=[])).push({P:[section]})}else if(n.e==="tabs"){var tabs=data.tabs=[];if(Array.isArray(n.f)){n.f.forEach(function(e){if(e.e==="tab"){var tab={content:e.f};tabs.push(tab);if(!Array.isArray(tab.content)){tab.content=[tab.content]}var attrs=e.m||[];var attr=attrs.find(function(a){return a.n==="title"})||tab.content.find(function(e){return e.e==="title"});if(attr){tab.title=attr.f}if(!Array.isArray(tab.title)){tab.title=[tab.title]}}})}}else if(n.e==="tablist"){var tablist={tab:[],body:[]};var items=n.m.find(function(a){return a.n==="items"});if(typeof items.f==="string"){tablist.items=items.f;tablist.tab.push({t:4,n:52,r:items.f,f:[]});tablist.body.push({t:4,n:52,r:items.f,f:[]});var e=n.f.find(function(e){return e.e==="title"})||n.m.find(function(a){return a.n==="title"});if(e&&e.f){tablist.tab[0].f=[Object.assign({},template.p.tab[0],{f:e.f})]}e=n.f.find(function(e){return e.e==="tab"});if(e&&e.f){tablist.body[0].f=[Object.assign({},template.p["tab-body"][0],{f:e.f})]}data.tablist=tablist;if(!data.tabs){data.tabs=[]}}}else{content.push(n)}});if(data.tablist){data._observer=h.observe("_card.tabs.length "+data.tablist.items+".length _card.selected",function(){var len=data.tabs.length+h.get(data.tablist.items+".length");if(h.get("_card.selected")>=len){setTimeout(function(){return h.set("_card.selected",len-1)})}},{init:false})}data.contentP=content;h.select=function(idx){return h.set("_card.selected",idx)};return{unrender:function unrender(){console.log("unrender!");if(data._observer){data._observer.cancel()}if(h.get("_card.expandLinked")){h.unlink("_card.expandLinked")}}}}var keys=["title","subtitle","image","section","flat","popout","margin","expandable"];function updateAttrs(h){keys.forEach(function(k){return k in h.attributes&&h.set("@local."+k,h.attributes[k])});"avatar-round"in h.attributes&&h.set("@local.round",h.attributes["avatar-round"]);"avatar"in h.attributes&&h.set("@local.avatar",h.attributes.avatar||h.attributes["avatar-image"]);"image-alt"in h.attributes&&h.set("@local.alt",h.attributes["image-alt"]);"no-pad"in h.attributes&&h.set("@local.noPad",h.attributes["no-pad"]);"no-fill"in h.attributes&&h.set("@local.noFill",h.attributes["no-fill"]);h.set("@local.arrow",!h.attributes["no-arrow"]);if("expanded"in h.attributes&&h._link!==h.attributes.expanded){if(h._link&&typeof h._link==="string"){h.unlink(h._link)}h._link=h.attributes.expanded;if(h._link&&typeof h._link==="string"){h.link(h._link,"_card.expanded");h.set("_card.expandLinked",true)}else{h.set({"_card.expanded":h.attributes.expanded,"_card.expandLinked":false})}}else{h.set("_card.expandLinked",true)}}export function plugin(opts){if(opts===void 0)opts={};return function(ref){var instance=ref.instance;if(!instance.transitions.expand){instance.transitions.expand=expand}instance.partials[opts.name||"card"]=Card}}globalRegister("RMCard","partials",Card);export default plugin;
import Ractive from"ractive";import globalRegister from"./globalRegister";import{expand}from"./transition-expand";var template={v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-wrapper",g:1},{t:8,r:"extra-attributes"},{n:"class-rcard-margin",t:13,f:[{t:2,r:"_card.margin"}]},{n:"class-rcard-wrapper-popout",t:13,f:[{t:2,r:"_card.popout"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard",g:1},{n:"class-rcard-no-pad",t:13,f:[{t:2,r:"_card.noPad"}]},{n:"class-rcard-section",t:13,f:[{t:2,r:"_card.section"}]},{n:"class-rcard-flat",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:'"flat" in _0?_1:_2'}}]},{n:"class-rcard-deep",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:'"flat" in _0?!_1:!_2'}}]},{n:"class-rcard-popout",t:13,f:[{t:2,r:"_card.popout"}]},{n:"class-rcard-collapsed",t:13,f:[{t:2,x:{r:["_card.expandable","_card.expanded"],s:"_0&&_1===false"}}]},{n:"class-rcard-expandable",t:13,f:[{t:2,r:"_card.expandable"}]},{n:"class-rcard-arrow",t:13,f:[{t:2,r:"_card.arrow"}]},{n:"class-rcard-no-fill",t:13,f:[{t:2,r:"_card.noFill"}]},{n:"class-rcard-with-header",t:13,f:[{t:2,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:'_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7))'}}]}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-header",g:1},{t:4,f:[{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:'[(_0).set("_card.expanded",_1===false?true:false)]'}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-expand",g:1},{n:"class-rcard-expanded",t:13,f:[{t:2,x:{r:["_card.expanded"],s:"_0!==false"}}]}],f:[{t:7,e:"svg",f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:50,x:{r:["_card.arrow","_card.expandable"],s:"_0&&_1"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-pad",g:1}],f:[" "]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{n:"class-rcard-avatar-round",t:13,f:[{t:2,r:"_card.round"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar-inner",g:1},{n:"style-background-image",f:["url(",{t:2,r:"_card.avatar"},")"],t:13}]}]}],n:50,x:{r:["_card.avatar"],s:'_0&&typeof _0==="string"'}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{t:4,f:[{t:8,r:"_card.avatarA"}],n:50,r:"_card.avatarA"}],f:[{t:8,r:"_card.avatarP"}]}],n:50,r:"_card.avatarP",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-titles",g:1},{n:"class-rcard-with-sub",t:13,f:[{t:2,x:{r:["_card.subtitle","_card.subtitleP"],s:"_0||_1"}}]},{n:"class-rcard-with-tabs",t:13,f:[{t:2,r:"_card.tabs"}]},{t:4,f:[{n:"class-rcard-shrink",t:13},{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:'[(_0).set("_card.expanded",_1===false?true:false)]'}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&!_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1}],f:[{t:2,r:"_card.title"}]}],n:50,r:"_card.title"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1},{t:4,f:[{t:8,r:"_card.titleA"}],n:50,r:"_card.titleA"}],f:[{t:8,r:"_card.titleP"}]}],n:51,l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1}],f:[{t:2,r:"_card.subtitle"}]}],n:50,r:"_card.subtitle"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1},{t:4,f:[{t:8,r:"_card.subtitleA"}],n:50,r:"_card.subtitleA"}],f:[{t:8,r:"_card.subtitleP"}]}],n:50,r:"_card.subtitleP",l:1}]}," ",{t:4,f:[{t:8,r:"tabs"}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-right",g:1},{n:["click"],t:70,f:{r:[],s:"[false,false]"}}],f:[{t:8,r:"_card.titleRightP"}]}],n:50,r:"_card.titleRightP"}]}],n:50,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:'_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7))'}}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:7,e:"img",m:[{n:"src",f:[{t:2,r:"_card.image"}],t:13},{n:"alt",f:[{t:2,r:"_card.alt"}],t:13}]}]}],n:50,r:"_card.image"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"},{t:4,f:[{t:8,r:"_card.imageA"}],n:50,r:"_card.imageA"}],f:[{t:8,r:"_card.imageP"}]}],n:50,r:"_card.imageP",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-content",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.contentP"}]}],n:50,r:"_card.contentP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}," ",{t:8,r:"tabs"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&!_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-footer",g:1},{t:4,f:[{t:8,r:"_card.footerA"}],n:50,r:"_card.footerA"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.footerP"}]}],n:50,r:"_card.footerP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-actions",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:4,f:[{t:4,f:[{t:8,r:".P"}],n:50,r:".P"},{t:4,f:[{t:7,e:"button",m:[{t:8,x:{r:[".attrs"],s:"_0||[]"}}],f:[{t:8,r:".content"}]}],n:51,l:1}],n:52,r:"_card.actions"}]}],n:50,r:"_card.actions.length"}],n:50,x:{r:["_card.expandable","_card.expanded"],s:"!_0||_1!==false"}}]}]}],e:{'"flat" in _0?_1:_2':function(_0,_1,_2){return"flat"in _0?_1:_2},'"flat" in _0?!_1:!_2':function(_0,_1,_2){return"flat"in _0?!_1:!_2},"_0&&_1===false":function(_0,_1){return _0&&_1===false},'_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7))':function(_0,_1,_2,_3,_4,_5,_6,_7){return _0||_1||_2||_3||_4||(_5&&typeof _5==="string"||_6&&_7)},'[(_0).set("_card.expanded",_1===false?true:false)]':function(_0,_1){return[_0.set("_card.expanded",_1===false?true:false)]},"_0&&_1":function(_0,_1){return _0&&_1},"_0!==false":function(_0){return _0!==false},'_0&&typeof _0==="string"':function(_0){return _0&&typeof _0==="string"},"_0||_1":function(_0,_1){return _0||_1},"_0&&!_1":function(_0,_1){return _0&&!_1},"[false,false]":function(){return[false,false]},"_0||[]":function(_0){return _0||[]},"!_0||_1!==false":function(_0,_1){return!_0||_1!==false},"_0===_1+_2||(!_0&&!_1&&!_2)":function(_0,_1,_2){return _0===_1+_2||!_0&&!_1&&!_2},"(_0||0)*100":function(_0){return(_0||0)*100},"_0===_1||(!_0&&!_1)":function(_0,_1){return _0===_1||!_0&&!_1},'[(_2).set("_card.selected",_0+_1),(_2).set("_card.expanded",true),false]':function(_0,_1,_2){return[_2.set("_card.selected",_0+_1),_2.set("_card.expanded",true),false]},'[(_1).set("_card.selected",_0),(_1).set("_card.expanded",true),false]':function(_0,_1){return[_1.set("_card.selected",_0),_1.set("_card.expanded",true),false]}},p:{"tab-body":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]}],f:[{t:8,r:".content"}]}],"tab-bodies":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-contents",g:1},{n:"style-left",f:["-",{t:2,x:{r:["_card.selected"],s:"(_0||0)*100"}},"%"],t:13}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]}],f:[{t:8,r:".content",c:{r:"^^/"}}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.body"}],n:50,r:"_card.tablist"}]}]}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]},{n:["click"],t:70,f:{r:["_card.tabs.length","@index","@context"],s:'[(_2).set("_card.selected",_0+_1),(_2).set("_card.expanded",true),false]'}}],f:[{t:8,r:".title"}]}],tabs:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]},{n:["click"],t:70,f:{r:["@index","@context"],s:'[(_1).set("_card.selected",_0),(_1).set("_card.expanded",true),false]'}}],f:[{t:8,r:".title",c:{r:"^^/"}}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.tab"}],n:50,r:"_card.tablist"}]}]}]}};export var Card=Ractive.macro(function(handle){init(handle);handle.setTemplate(template);return{update:function update(){updateAttrs(handle)},teardown:function teardown(){if(handle._link&&typeof handle._link==="string"){handle.unlink(handle._link)}}}},{cssId:"rm-card",css:function(data){return[function(data){var primary=Object.assign({},data("raui.primary"),data("raui.card.primary"));var header=Object.assign({},primary,data("raui.card.primary.header"));var themes=(data("raui.themes")||[]).slice();(data("raui.card.themes")||[]).forEach(function(t){if(!~themes.indexOf(t)){themes.push(t)}});return"\n .rcard-margin {\n padding: 0.5em;\n box-sizing: border-box;\n }\n .rcard-margin.rcard-wrapper-popout {\n padding-top: 2.5em;\n }\n .rcard-no-fill {\n height: auto;\n }\n .rcard {\n position: relative;\n display: block;\n color: "+(primary.fg||"#222")+";\n background-color: "+(primary.bg||"#fff")+";\n border-radius: "+(primary.radius||"0.2em")+";\n transition-duration: "+(primary.duration||"0.2s")+";\n transition-timing-function: "+(primary.easing||"ease-in-out")+";\n transition-property: box-shadow, border, background-color, color, margin, padding;\n height: 100%;\n }\n \n .rcard > div {\n margin-top: 1em;\n }\n .rcard.rcard-with-header > div:first-of-type {\n margin-top: 0;\n }\n .rcard > div:last-of-type {\n margin-bottom: 1em;\n }\n .rcard > .rcard-actions:last-of-type {\n margin-bottom: 0;\n }\n .rcard-section > .rcard-header:last-of-type {\n margin-bottom: 0;\n }\n \n .rcard-section {\n overflow: hidden;\n }\n \n .rcard-deep {\n box-shadow: "+(primary.shadow||"0 1px 4px 0 rgba(0,0,0,0.14)")+";\n border: 1px solid "+(primary.bc||"#ccc")+";\n }\n .rcard-flat {\n border: 0.0625em solid "+(primary.bc||"#ccc")+";\n box-shadow: none;\n }\n \n .rcard-no-pad > .rcard-content {\n padding: 0;\n }\n \n .rcard-content {\n padding: 0 1em;\n }\n \n .rcard-header {\n position: relative;\n display: flex;\n align-items: center;\n transition-duration: "+(header.duration||"0.2s")+";\n transition-timing-function: "+(header.easing||"ease-in-out")+";\n transition-property: color, background-color, padding, height;\n min-height: 4em;\n flex-wrap: wrap;\n }\n \n .rcard-section > .rcard-header {\n background-color: "+(header.fga||"#07e")+";\n color: "+(header.bg||"#fff")+";\n min-height: auto;\n }\n \n .rcard-section > .rcard-header:first-of-type {\n padding: 0;"+(header.gradient?"\n background: "+header.gradient+";\n color: "+(header.fg||"#222")+";\n border-bottom: 1px solid "+(header.bc||"#ccc")+";":"")+"\n }\n .rcard-header .rcard-title-pad {\n height: 100%;\n width: 0;"+(header.padding?"\n margin: "+header.padding+" 0;":"")+"\n }\n \n .rcard-avatar {\n width: 3em;\n height: 3em;\n margin: 1em 0 0 1em;\n transition-duration: "+(primary.duration||"0.2s")+";\n transition-timing-function: "+(primary.easing||"ease-in-out")+";\n transition-property: width, height, bottom;\n }\n \n .rcard-avatar-inner {\n height: 100%;\n background-size: cover;\n transition-duration: "+(primary.duration||"0.2s")+";\n transition-timing-function: "+(primary.easing||"ease-in-out")+";\n transition-property: border-radius, box-shadow;\n }\n \n .rcard-avatar-round .rcard-avatar-inner {\n border-radius: 100%;\n }\n \n .rcard-section > .rcard-header .rcard-avatar {\n margin: 0.5em 0 0.5em 1em;\n }\n \n .rcard-section.rcard-popout {\n overflow: visible;\n }\n .rcard-section.rcard-popout > .rcard-header {\n border-radius: "+(primary.easing||"0.2em")+" "+(primary.radius||"0.2em")+" 0 0;\n }\n .rcard-popout > .rcard-header .rcard-avatar {\n margin-top: -2em;\n width: 6em;\n height: 6em;\n }\n .rcard-popout.rcard-section > .rcard-header .rcard-avatar {\n width: 3.75em;\n height: 3.75em;\n margin-top: -1.25em;\n }\n .rcard-popout.rcard-deep > .rcard-header .rcard-avatar-inner {\n box-shadow: 0 2px 2px rgba(0, 0, 0, 0.24), 0 0 2px rgba(0, 0, 0, 0.12);\n }\n \n .rcard-titles {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n line-height: 1em;\n transition-duration: "+(primary.duration||"0.2s")+";\n transition-timing-function: "+(primary.easing||"ease-in-out")+";\n transition-property: margin;\n margin: 1em 1em 0 1em;\n }\n .rcard-section > .rcard-header .rcard-titles.rcard-with-tabs {\n flex-grow: 0;\n margin-right: 3em;\n }\n .rcard-titles.rcard-shrink {\n flex-grow: 0;\n }\n \n .rcard-with-sub {\n justify-content: space-evenly;\n }\n .rcard-with-sub > .rcard-title {\n font-size: 1.2em;\n }\n \n .rcard-title {\n font-size: 1.5em;\n }\n \n .rcard-subtitle {\n opacity: 0.7;\n font-size: 1em;\n }\n \n .rcard-section > .rcard-header .rcard-titles {\n line-height: 1.2em;\n margin: 0.5em 1em 0.5em 1em;\n }\n .rcard-section > .rcard-header .rcard-with-sub {\n line-height: 1em;\n }\n .rcard-section > .rcard-header .rcard-with-sub > .rcard-title {\n font-size: 1.1em;\n }\n .rcard-section > .rcard-header .rcard-title {\n font-size: 1.2em;\n }\n \n .rcard-title-right {\n margin-top: 1em;\n margin-left: auto;\n margin-right: 1em;\n cursor: default;\n }\n .rcard-section > .rcard-header .rcard-title-right {\n margin-top: 0;\n }\n \n .rcard-expandable > .rcard-header:first-of-type {\n transition-property: color, background-color, height;\n padding-right: 2em;\n }\n .rcard-clickable {\n cursor: pointer;\n }\n .rcard-header > .rcard-expand {\n position: absolute;\n height: 24px;\n top: 1.7em;\n right: 0.5em;\n transition: transform 0.2s ease-in-out, top 0.2s ease-in-out;\n z-index: 1;\n }\n .rcard-section > .rcard-header .rcard-expand {\n top: 0.8em;\n }\n .rcard-expand.rcard-expanded {\n transform: rotate(180deg);\n transform-origin: center;\n }\n .rcard-expand svg {\n width: 24px;\n height: 24px;\n }\n .rcard-expand svg path {\n fill: "+(header.fg||"#222")+";\n stroke: "+(header.fg||"#222")+";\n }\n .rcard-section > .rcard-header .rcard-expand svg path {\n fill: "+(header.bg||"#fff")+";\n stroke: "+(header.bg||"#fff")+";\n }\n \n .rcard-popout.rcard-collapsed > .rcard-header .rcard-avatar {\n bottom: 1em;\n }\n .rcard-popout.rcard-collapsed.rcard-section > .rcard-header .rcard-avatar {\n bottom: 0.5em;\n }\n \n .rcard > div:first-of-type.rcard-image {\n margin-top: 0;\n }\n \n .rcard-image {\n margin-top: 1em;\n }\n \n .rcard-image > img {\n width: 100%;\n }\n \n .rcard-tabs-window {\n overflow: auto;\n }\n .rcard-section > .rcard-header .rcard-tabs-window {\n align-self: flex-end;\n flex-grow: 1;\n }\n \n .rcard-tabs {\n display: flex;\n border-top: 0.15em solid "+(primary.bga||"#f4f4f4")+";\n }\n \n .rcard-tab {\n box-sizing: border-box;\n padding: 0.5em 1em;\n height: 2.5em;\n user-select: none;\n opacity: 0.9;\n cursor: pointer;\n transition-duration: 0.2s;\n transition-timing-function: ease-in-out;\n transition-property: opacity, background-color, color, border-top, border-width;\n border-top: 0.15em solid transparent;\n margin-top: -0.15em;\n white-space: nowrap;\n border-top: 0.15em solid "+(primary.bga||"#f4f4f4")+";\n }\n .rcard-tab:hover {\n opacity: 1;\n }\n \n .rcard-tab.rcard-tab-selected {\n border-top: 0.15em solid "+(primary.fga||"#07e")+";\n opacity: 1;\n font-weight: 500;\n cursor: default;\n }\n \n .rcard-section > .rcard-header .rcard-tabs {\n margin-top: 0.5em;\n border-top: 0;\n }\n .rcard-section > .rcard-header .rcard-tab {\n margin-top: 0;\n border-color: "+(header.gradient?primary.bc||"#ccc":primary.bg||"#fff")+";\n border-style: solid;\n border-width: 1px 1px 0 0;\n color: "+(header.gradient?primary.fga||"#07e":header.bg||"#fff")+";\n }\n .rcard-section > .rcard-header .rcard-tab:first-of-type {\n border-width: 1px 1px 0 1px;\n }\n .rcard-section > .rcard-header .rcard-tab-selected {\n background-color: "+(primary.bg||"#fff")+";\n color: "+(primary.fg||"#222")+";\n }"+(header.gradient?"\n .rcard-section > .rcard-header .rcard-tabs-window {\n margin-bottom: -1px;\n }":"")+"\n \n \n .rcard-tab-window {\n overflow: hidden;\n margin: 0.5em 1em;\n }\n \n .rcard-tab-contents {\n width: 100%;\n box-sizing: border-box;\n position: relative;\n display: flex;\n }\n \n .rcard-tab-content {\n width: 100%;\n box-sizing: border-box;\n flex-shrink: 0;\n flex-grow: 0;\n opacity: 0;\n transition: opacity 0.4s ease-in-out;\n }\n .rcard-content-selected {\n opacity: 1;\n }\n \n .rcard-actions {\n padding: 0.5em;\n }\n \n .rcard > .rcard-actions:nth-of-type(n+1) {\n margin-top: 0.5em;\n }\n \n .rcard-actions > button {\n text-decoration: none;\n text-align: center;\n letter-spacing: 0.5px;\n cursor: pointer;\n user-select: none;\n border: none;\n border-radius: 2px;\n padding: 0 2rem;\n transition: 0.2s ease-in-out;\n transition-property: box-shadow, opacity, background-color;\n font-size: 1em;\n line-height: 1.5em;\n background-color: "+(primary.bg||"#fff")+";\n color: "+(primary.fg||"#222")+";\n vertical-align: middle;\n min-height: 2.25em;\n outline: 0;\n margin: 0.25em;\n position: relative;\n overflow: hidden;\n font-weight: 500;\n -webkit-tap-highlight-color: transparent;\n box-shadow: none;\n }\n \n .rcard-actions > button[disabled], .btn.disabled {\n opacity: 0.7;\n cursor: not-allowed;\n }\n \n .rcard-actions > button[disabled]:hover {\n opacity: 0.7;\n }\n \n .rcard-actions > button.flat:hover {\n box-shadow: none;\n }\n \n .rcard-actions > button:after {\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 1.5em, transparent 1.6em);\n opacity: 0;\n transform: scale(5, 5);\n transition: opacity 0.6s ease-out, transform 0.5s ease-in;\n }\n \n .rcard-actions > button:before {\n content: ' ';\n position: absolute;\n height: 100%;\n width: 100%;\n background-color: rgba(0, 0, 0, 0.075);\n opacity: 0;\n top: 0;\n left: 0;\n transition: opacity 0.4s ease-in-out;\n }\n \n .rcard-actions > button:focus:before {\n opacity: 1;\n }\n .rcard-actions > button:hover:before {\n opacity: 0.5;\n }\n \n .rcard-actions > button:active:after {\n transform: scale(1, 1);\n opacity: 1;\n transition: none;\n }\n "+themes.map(function(t){var theme=Object.assign({},data("raui.primary"),data("raui.card.primary"),data("raui."+t),data("raui.card."+t));var header=Object.assign({},theme,data("raui.card.primary.header"),data("raui.card."+t+".header"));return"\n ."+t+".rcard {\n color: "+(theme.fg||"#222")+";\n background-color: "+(theme.bg||"#fff")+";\n border-radius: "+(theme.radius||"0.2em")+";\n }\n ."+t+".rcard-deep {\n box-shadow: "+(primary.shadow||"0 1px 4px 0 rgba(0,0,0,0.14)")+";\n border: 1px solid "+(primary.bc||"#ccc")+";\n }\n ."+t+".rcard-flat {\n border: 0.0625em solid "+(primary.bc||"#ccc")+";\n }\n \n ."+t+".rcard-section > .rcard-header {\n background-color: "+(header.fga||"#07e")+";\n color: "+(header.bg||"#fff")+";\n }\n \n ."+t+".rcard-section > .rcard-header:first-of-type {\n padding: "+(header.padding||"0.5em 1em")+";"+(header.gradient?"\n background: "+header.gradient+";\n color: "+(header.fg||"#222")+";\n border-bottom: 1px solid "+(header.bc||"#ccc")+";":"")+"\n }"+(header.gradient?"\n "+t+".rcard-section > .rcard-header .rcard-tabs {\n margin-bottom: -1px;\n }":"")+"\n \n ."+t+" > .rcard-header.rcard-expand svg path {\n fill: "+(header.fg||"#222")+";\n stroke: "+(header.fg||"#222")+";\n }\n ."+t+".rcard-section > .rcard-header .rcard-expand svg path {\n fill: "+(header.bg||"#fff")+";\n stroke: "+(header.bg||"#fff")+";\n }\n ."+t+" > .rcard-actions > button {\n background-color: "+(primary.bg||"#fff")+";\n color: "+(primary.fg||"#222")+";\n }\n "}).join("")}.call(this,data)].join(" ")},noCssTransform:true,attributes:["title","subtitle","image","avatar","avatar-round","no-pad","image-alt","section","flat","popout","margin","expandable","expanded","no-arrow"]});function init(h){var data=h.get("@local");h.aliasLocal("_card");updateAttrs(h);var tpl=h.partials.content;var content=[];h.partials.tabs=template.p.tabs;h.partials["tab-bodies"]=template.p["tab-bodies"];h.partials.tab=template.p.tab;h.partials["tab-body"]=template.p["tab-body"];tpl.forEach(function(n){if(n.e==="title"){data.titleA=n.m;data.titleP=n.f.filter(function(e){return e.e!=="right"});var right=n.f.find(function(e){return e.e==="right"});if(right){data.titleRightP=right.f}}else if(n.e==="subtitle"){data.subtitleA=n.m;data.subtitleP=n.f}else if(n.e==="avatar"){var img;if(n.m){data.avatarA=n.m.filter(function(a){return a.n!=="round"&&a.n!=="image"&&a.n!=="popout"});var a;if(a=n.m.find(function(a){return a.n==="round"})){if(a.f===0){data.avatarA.push({t:13,g:1,n:"class",f:"rcard-avatar-round"})}else{data.avatarA.push({t:13,n:"class-rcard-avatar-round",f:a.f})}}if(a=n.m.find(function(a){return a.n==="image"})){img=a.f}}if(img){data.avatarP=[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar-inner",g:1},{n:"style-background-image",f:["url("].concat(img,[")"]),t:13}]}];if(img.length===1&&img[0].t===2){data.avatarP=[Object.assign({},img[0],{t:4,n:50,f:data.avatarP})]}}else if(n.f&&n.f.length){data.avatarP=n.f}}else if(n.e==="footer"){data.footerA=n.m;data.footerP=n.f}else if(n.e==="action"){(data.actions||(data.actions=[])).push({attrs:n.m,content:n.f})}else if(n.t===4&&n.n===50&&n.f&&n.f.filter(function(n){return typeof n!=="string"}).length===1&&n.f.find(function(e){return e.e==="action"})){var section=Object.assign({},n);var b=section.f.find(function(e){return e.e==="action"});section.f=[{t:7,e:"button",m:b.m,f:b.f}];(data.actions||(data.actions=[])).push({P:[section]})}else if(n.e==="tabs"){var tabs=data.tabs=[];if(Array.isArray(n.f)){n.f.forEach(function(e){if(e.e==="tab"){var tab={content:e.f};tabs.push(tab);if(!Array.isArray(tab.content)){tab.content=[tab.content]}var attrs=e.m||[];var attr=attrs.find(function(a){return a.n==="title"})||tab.content.find(function(e){return e.e==="title"});if(attr){tab.title=attr.f}if(!Array.isArray(tab.title)){tab.title=[tab.title]}}})}}else if(n.e==="tablist"){var tablist={tab:[],body:[]};var items=n.m.find(function(a){return a.n==="items"});if(typeof items.f==="string"){tablist.items=items.f;tablist.tab.push({t:4,n:52,r:items.f,f:[]});tablist.body.push({t:4,n:52,r:items.f,f:[]});var e=n.f.find(function(e){return e.e==="title"})||n.m.find(function(a){return a.n==="title"});if(e&&e.f){tablist.tab[0].f=[Object.assign({},template.p.tab[0],{f:e.f})]}e=n.f.find(function(e){return e.e==="tab"});if(e&&e.f){tablist.body[0].f=[Object.assign({},template.p["tab-body"][0],{f:e.f})]}data.tablist=tablist;if(!data.tabs){data.tabs=[]}}}else{content.push(n)}});if(data.tablist){data._observer=h.observe("_card.tabs.length "+data.tablist.items+".length _card.selected",function(){var len=data.tabs.length+h.get(data.tablist.items+".length");if(h.get("_card.selected")>=len){setTimeout(function(){return h.set("_card.selected",len-1)})}},{init:false})}data.contentP=content;h.select=function(idx){return h.set("_card.selected",idx)};return{unrender:function unrender(){console.log("unrender!");if(data._observer){data._observer.cancel()}if(h.get("_card.expandLinked")){h.unlink("_card.expandLinked")}}}}var keys=["title","subtitle","image","section","flat","popout","margin","expandable"];function updateAttrs(h){keys.forEach(function(k){return k in h.attributes&&h.set("@local."+k,h.attributes[k])});"avatar-round"in h.attributes&&h.set("@local.round",h.attributes["avatar-round"]);"avatar"in h.attributes&&h.set("@local.avatar",h.attributes.avatar||h.attributes["avatar-image"]);"image-alt"in h.attributes&&h.set("@local.alt",h.attributes["image-alt"]);"no-pad"in h.attributes&&h.set("@local.noPad",h.attributes["no-pad"]);"no-fill"in h.attributes&&h.set("@local.noFill",h.attributes["no-fill"]);h.set("@local.arrow",!h.attributes["no-arrow"]);if("expanded"in h.attributes&&h._link!==h.attributes.expanded){if(h._link&&typeof h._link==="string"){h.unlink(h._link)}h._link=h.attributes.expanded;if(h._link&&typeof h._link==="string"){h.link(h._link,"_card.expanded");h.set("_card.expandLinked",true)}else{h.set({"_card.expanded":h.attributes.expanded,"_card.expandLinked":false})}}else{h.set("_card.expandLinked",true)}}export function plugin(opts){if(opts===void 0)opts={};return function(ref){var instance=ref.instance;if(!instance.transitions.expand){instance.transitions.expand=expand}instance.partials[opts.name||"card"]=Card}}globalRegister("RMCard","partials",Card);export default plugin;

@@ -8,3 +8,3 @@ import globalRegister from './globalRegister';

var boxy = data('raui.form.boxy');
return ("\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: " + (primary.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 " + (primary.bc || '#ccc') + ";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: " + (primary.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: " + (boxy ? primary.bg || '#fff' : 'transparent') + ";\n }\n\n label.field.focus {\n color: " + (active.fg || primary.fga || '#07e') + ";\n }\n\n label.field.textarea.focus {\n border-color: " + (active.fg || primary.fga || '#07e') + ";\n " + (!boxy ? ("box-shadow: 0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n 0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ";") : '') + "\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: " + (boxy ? '0.0625em' : '0 0 0.0625em 0') + ";\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n box-sizing: border-box;\n background-color: " + (boxy ? primary.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;" + (boxy ? ("\n border-radius: " + (primary.radius || '0.2em') + ";") : '') + "\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input" + (boxy ? '' : ':disabled') + ",\n label.field select" + (boxy ? '' : ':disabled') + " {\n padding: 0 0.75em;\n }\n label.field select" + (boxy ? '' : ':disabled') + " {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\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 " + (!boxy ? ("label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 " + (primary.bc || '#ccc') + ";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em " + (primary.bc || '#ccc') + ",\n -0.0625em 0.0625em " + (primary.bc || '#ccc') + ",\n 0.0625em -0.0625em " + (primary.bc || '#ccc') + ",\n -0.0625em -0.0625em " + (primary.bc || '#ccc') + ";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n 0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ";\n }") : '') + "\n\n /**** CHECK BOXES ****/\n\n label.field.check {\n position:relative;\n z-index: 0;\n overflow: visible;\n cursor: pointer;\n padding-top: 2.2em;\n }\n label.field.check.inline {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -3px;\n top: 23px;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n background-color: " + (primary.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 {\n top: 3px;\n left: -3px;\n }\n\n label.field.check input:checked {\n background-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: \"\";\n display: inline-block;\n box-sizing: border-box;\n margin: 3px 11px 3px 1px;\n border: solid 2px; /* Safari */\n border-color: " + (primary.fg || '#222') + ";\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: \"\";\n display: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n background-color: " + (primary.fga || '#07e') + ";\n }\n label.field.check.focus:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.check.checked:after {\n border-color: " + (primary.bg || '#fff') + ";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: " + (primary.bc || '#ccc') + ";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: " + (primary.bc || '#ccc') + ";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: " + (primary.bc || '#ccc') + ";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n 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;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 41px;\n height: 40px;\n background-color: " + (primary.bc || '#ccc') + ";\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 24px) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: \"\";\n display: inline-block;\n box-sizing: border-box;\n margin: 2px 10px 2px 0;\n border: solid 2px; /* Safari */\n border-color: " + (primary.fg || '#222') + ";\n border-radius: 50%;\n width: 20px;\n height: 20px;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: \"\";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 10px;\n height: 10px;\n background-color: " + (primary.fga || '#07e') + ";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.focus:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: " + (primary.bc || '#ccc') + ";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: " + (primary.bc || '#ccc') + ";\n }\n\n label.field.radio.disabled:after {\n background-color: " + (primary.bc || '#ccc') + ";\n }\n\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: 19px;\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: " + (primary.bc || '#ccc') + ";\n }\n\n label.field textarea {\n border: none;" + (boxy ? "\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: " + (active.fg || primary.fga || '#07e') + ";\n " + (!boxy ? ("box-shadow: 0 0.0625em 0 0 " + (active.fg || primary.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: " + (active.fg || primary.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: " + (primary.fg || '#222') + ";\n text-align: " + (boxy ? 'center' : 'left') + ";\n padding: 0.5em " + (boxy ? '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;" + (boxy ? ("\n border-radius: " + (primary.radius || '0.2em') + ";\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 0.0625em;") : ("\n border-bottom-color: " + (primary.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: " + (boxy ? '1.7' : '1.958') + "em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: " + (boxy ? '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 " + (boxy ? ("height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid " + (primary.bg || '#fff') + ";\n margin-left: 0;") :
return ("\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: " + (primary.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 " + (primary.bc || '#ccc') + ";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: " + (primary.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: " + (boxy ? primary.bg || '#fff' : 'transparent') + ";\n }\n\n label.field.focus {\n color: " + (active.fg || primary.fga || '#07e') + ";\n }\n\n label.field.textarea.focus {\n border-color: " + (active.fg || primary.fga || '#07e') + ";\n " + (!boxy ? ("box-shadow: 0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n 0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ";") : '') + "\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: " + (boxy ? '0.0625em' : '0 0 0.0625em 0') + ";\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n box-sizing: border-box;\n background-color: " + (boxy ? primary.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;" + (boxy ? ("\n border-radius: " + (primary.radius || '0.2em') + ";") : '') + "\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input" + (boxy ? '' : ':disabled') + ",\n label.field select" + (boxy ? '' : ':disabled') + " {\n padding: 0 0.75em;\n }\n label.field select" + (boxy ? '' : ':disabled') + " {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\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 " + (!boxy ? ("label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 " + (primary.bc || '#ccc') + ";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em " + (primary.bc || '#ccc') + ",\n -0.0625em 0.0625em " + (primary.bc || '#ccc') + ",\n 0.0625em -0.0625em " + (primary.bc || '#ccc') + ",\n -0.0625em -0.0625em " + (primary.bc || '#ccc') + ";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n 0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ";\n }") : '') + "\n\n /**** CHECK BOXES ****/\n\n label.field.check {\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 {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -3px;\n top: 23px;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n background-color: " + (primary.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 {\n top: 3px;\n left: -3px;\n }\n\n label.field.check input:checked {\n background-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: \"\";\n display: inline-block;\n box-sizing: border-box;\n margin: 3px 11px 3px 1px;\n border: solid 2px; /* Safari */\n border-color: " + (primary.fg || '#222') + ";\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: \"\";\n display: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n background-color: " + (primary.fga || '#07e') + ";\n }\n label.field.check.focus:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.check.checked:after {\n border-color: " + (primary.bg || '#fff') + ";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: " + (primary.bc || '#ccc') + ";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: " + (primary.bc || '#ccc') + ";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: " + (primary.bc || '#ccc') + ";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n 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;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 41px;\n height: 40px;\n background-color: " + (primary.bc || '#ccc') + ";\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 24px) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: \"\";\n display: inline-block;\n box-sizing: border-box;\n margin: 2px 10px 2px 0;\n border: solid 2px; /* Safari */\n border-color: " + (primary.fg || '#222') + ";\n border-radius: 50%;\n width: 20px;\n height: 20px;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: \"\";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 10px;\n height: 10px;\n background-color: " + (primary.fga || '#07e') + ";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.focus:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: " + (primary.bc || '#ccc') + ";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: " + (primary.bc || '#ccc') + ";\n }\n\n label.field.radio.disabled:after {\n background-color: " + (primary.bc || '#ccc') + ";\n }\n\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: 19px;\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: " + (primary.bc || '#ccc') + ";\n }\n\n label.field textarea {\n border: none;" + (boxy ? "\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: " + (active.fg || primary.fga || '#07e') + ";\n " + (!boxy ? ("box-shadow: 0 0.0625em 0 0 " + (active.fg || primary.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: " + (active.fg || primary.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: " + (primary.fg || '#222') + ";\n text-align: " + (boxy ? 'center' : 'left') + ";\n padding: 0.5em " + (boxy ? '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;" + (boxy ? ("\n border-radius: " + (primary.radius || '0.2em') + ";\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 0.0625em;") : ("\n border-bottom-color: " + (primary.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: " + (boxy ? '1.7' : '1.958') + "em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: " + (boxy ? '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 " + (boxy ? ("height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid " + (primary.bg || '#fff') + ";\n margin-left: 0;") :
"height: 2.25em;") + "\n }" + (boxy ? ("\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 " + (primary.radius || '0.2em') + " " + (primary.radius || '0.2em') + " 0;\n }\n label.field .with-buttons input {\n border-radius: " + (primary.radius || '0.2em') + " 0 0 " + (primary.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 }\n\n /* inline fields (no labels) */\n label.field.inline {\n 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." + (boxy ? '15' : '1') + "em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: " + (primary.fga || '#07e') + ";\n color: " + (primary.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 ");

@@ -11,0 +11,0 @@ // TODO: other themes

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

import globalRegister from"./globalRegister";import Ractive from"ractive";export function style(data){var primary=Object.assign({},data("raui.primary"),data("raui.form.primary"));var active=Object.assign({},data("raui.primary.active"),data("raui.form.primary.active"));var boxy=data("raui.form.boxy");return"\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: "+(primary.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 "+(primary.bc||"#ccc")+";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: "+(primary.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: "+(boxy?primary.bg||"#fff":"transparent")+";\n }\n\n label.field.focus {\n color: "+(active.fg||primary.fga||"#07e")+";\n }\n\n label.field.textarea.focus {\n border-color: "+(active.fg||primary.fga||"#07e")+";\n "+(!boxy?"box-shadow: 0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n 0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+";":"")+"\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: "+(boxy?"0.0625em":"0 0 0.0625em 0")+";\n border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n box-sizing: border-box;\n background-color: "+(boxy?primary.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;"+(boxy?"\n border-radius: "+(primary.radius||"0.2em")+";":"")+"\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input"+(boxy?"":":disabled")+",\n label.field select"+(boxy?"":":disabled")+" {\n padding: 0 0.75em;\n }\n label.field select"+(boxy?"":":disabled")+" {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\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 "+(!boxy?"label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 "+(primary.bc||"#ccc")+";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em "+(primary.bc||"#ccc")+",\n -0.0625em 0.0625em "+(primary.bc||"#ccc")+",\n 0.0625em -0.0625em "+(primary.bc||"#ccc")+",\n -0.0625em -0.0625em "+(primary.bc||"#ccc")+";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n 0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+";\n }":"")+"\n\n /**** CHECK BOXES ****/\n\n label.field.check {\n position:relative;\n z-index: 0;\n overflow: visible;\n cursor: pointer;\n padding-top: 2.2em;\n }\n label.field.check.inline {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -3px;\n top: 23px;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n background-color: "+(primary.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 {\n top: 3px;\n left: -3px;\n }\n\n label.field.check input:checked {\n background-color: "+(primary.fga||"#07e")+';\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 3px 11px 3px 1px;\n border: solid 2px; /* Safari */\n border-color: '+(primary.fg||"#222")+';\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: "";\n display: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: '+(primary.fga||"#07e")+";\n background-color: "+(primary.fga||"#07e")+";\n }\n label.field.check.focus:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.check.checked:after {\n border-color: "+(primary.bg||"#fff")+";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: "+(primary.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: "+(primary.bc||"#ccc")+";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: "+(primary.bc||"#ccc")+";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n 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;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 41px;\n height: 40px;\n background-color: "+(primary.bc||"#ccc")+';\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 24px) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 2px 10px 2px 0;\n border: solid 2px; /* Safari */\n border-color: '+(primary.fg||"#222")+';\n border-radius: 50%;\n width: 20px;\n height: 20px;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: "";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 10px;\n height: 10px;\n background-color: '+(primary.fga||"#07e")+";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio.checked:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio.focus:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: "+(primary.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: "+(primary.bc||"#ccc")+";\n }\n\n label.field.radio.disabled:after {\n background-color: "+(primary.bc||"#ccc")+";\n }\n\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: 19px;\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: "+(primary.bc||"#ccc")+";\n }\n\n label.field textarea {\n border: none;"+(boxy?"\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: "+(active.fg||primary.fga||"#07e")+";\n "+(!boxy?"box-shadow: 0 0.0625em 0 0 "+(active.fg||primary.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: "+(active.fg||primary.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: "+(primary.fg||"#222")+";\n text-align: "+(boxy?"center":"left")+";\n padding: 0.5em "+(boxy?"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;"+(boxy?"\n border-radius: "+(primary.radius||"0.2em")+";\n border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 0.0625em;":"\n border-bottom-color: "+(primary.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: "+(boxy?"1.7":"1.958")+"em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: "+(boxy?"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 "+(boxy?"height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid "+(primary.bg||"#fff")+";\n margin-left: 0;":"height: 2.25em;")+"\n }"+(boxy?"\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 "+(primary.radius||"0.2em")+" "+(primary.radius||"0.2em")+" 0;\n }\n label.field .with-buttons input {\n border-radius: "+(primary.radius||"0.2em")+" 0 0 "+(primary.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 }\n\n /* inline fields (no labels) */\n label.field.inline {\n 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."+(boxy?"15":"1")+"em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: "+(primary.fga||"#07e")+";\n color: "+(primary.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 "}function noop(){}function focused(ev){if(!~this.className.indexOf("focus")){this.className+=" focus"}}function blurred(ev){this.className=this.className.replace(/\bfocus\b/g,"").trim()}export function field(node){var ctx=this.getContext(node);var isField,isCheck,isRadio,isArea,isSelect,isFile,isButton,isPlain,isInput;var change,attrs;function invalidate(){var val=setup().split(/\s+/).filter(function(c){return!!c});isField=!!~val.indexOf("field");if(!isField){val.push("field");isField=true}isCheck=node.querySelector("input[type=checkbox]");if(isCheck&&!~val.indexOf("check")){val.push("check")}isRadio=node.querySelector("input[type=radio]");if(isRadio&&!~val.indexOf("radio")){val.push("radio")}var checkable=isCheck||isRadio;if(checkable&&checkable.checked&&!~val.indexOf("checked")){val.push("checked")}if(checkable&&checkable.disabled&&!~val.indexOf("disabled")){val.push("disabled")}if(!checkable&&change){change.cancel();change=0;if(attrs){attrs.disconnect();attrs=0}delete checkable._form_callback}else if(checkable){checkable._form_callback=function(ev,init){if(init===void 0)init=true;if(init&&checkable.type==="radio"&&checkable.name){var list=[];list.push.apply(list,document.querySelectorAll("input[type=radio][name="+checkable.name+"]"));list=list.filter(function(i){return i!==checkable});list.forEach(function(l){return l._form_callback&&l._form_callback(ev,false)})}var checked=checkable.checked;if(checked&&!~node.className.indexOf("checked")){node.className+=" checked"}else if(!checked&&~node.className.indexOf("checked")){node.className=node.className.replace(/\bchecked\b/g,"").replace(/ +/g," ").trim()}};if(MutationObserver){attrs=new MutationObserver(function(){var val;val=checkable.disabled;if(val&&!~node.className.indexOf("disabled")){node.className+=" disabled"}else if(!val&&~node.className.indexOf("disabled")){node.className=node.className.replace(/\bdisabled\b/g,"").replace(/ +/g," ").trim()}});attrs.observe(checkable,{attributes:true})}change=this.getContext(checkable).listen("change",checkable._form_callback)}isArea=!!node.querySelector("textarea");if(isArea&&!~val.indexOf("textarea")){val.push("textarea")}isSelect=!!node.querySelector("select");if(isSelect&&!~val.indexOf("select")){val.push("select")}isFile=!!node.querySelector("input[type=file]");if(isFile&&!~val.indexOf("file")){val.push("file")}isButton=node.querySelector("button");isButton=!!isButton&&isButton.parentNode===node;if(isButton&&!~val.indexOf("button")){val.push("button")}isPlain=!!node.querySelector("div");if(isPlain&&!~val.indexOf("plain")){val.push("plain")}isInput=!isCheck&&!isRadio&&!isFile&&!!node.querySelector("input");if(isInput&&!~val.indexOf("input")){val.push("input")}node.className=val.join(" ")}function setup(){var cls=node.className;if(!isField){cls=cls.replace(/\bfield\b/g,"").trim()}if(!isCheck){cls=cls.replace(/\bcheck(ed)?\b/g,"").trim()}if(!isRadio){cls=cls.replace(/\bradio\b/g,"").trim()}if(!isArea){cls=cls.replace(/\btextarea\b/g,"").trim()}if(!isSelect){cls=cls.replace(/\bselect\b/g,"").trim()}if(!isFile){cls=cls.replace(/\bfile\b/g,"").trim()}if(!isButton){cls=cls.replace(/\bbutton\b/g,"").trim()}if(!isPlain){cls=cls.replace(/\bplain\b/g,"").trim()}if(!isInput){cls=cls.replace(/\binput\b/g,"").trim()}cls=cls.replace(/ +/g," ");return cls}var focus=ctx.listen("focusin",focused);var blur=ctx.listen("focusout",blurred);invalidate.call(this);return{update:noop,invalidate:invalidate.bind(this),teardown:function teardown(){var cls=setup();cls=cls.replace(/\bfocus\b/g,"").trim();focus.cancel();blur.cancel();change&&change.cancel();node.className=cls}}}field.style=style;function findDeep(els,el){if(!els){return false}for(var i=0;i<els.length;i++){if(els[i].e===el){return true}if(els[i].f&&findDeep(els[i].f,el)){return true}}return false}export var macro=Ractive.macro(function(handle){var body=[];var attrs=(handle.template.m||[]).slice();var content=handle.template.f||[];var value=attrs.find(function(a){return a.n==="value"});var type=attrs.find(function(a){return a.n==="type"});var tip=attrs.find(function(a){return a.n==="tip"});if(tip){attrs.splice(attrs.indexOf(tip),1)}if(type&&typeof macro.types[type.f]==="function"){body.push.apply(body,macro.types[type.f](attrs,content,handle))}else if(value){var el={t:7,e:"input",m:[value]};if(findDeep(content,"option")){el.e="select";el.f=content}if(type){el.m.push(type);if(type.f==="checkbox"||type.f==="radio"){var target=attrs.find(function(a){return a.n==="target"});if(target){el.m.push(Object.assign({},target,{n:"name"}))}else{el.m.splice(el.m.indexOf(value),1,Object.assign({},value,{n:"checked"}))}}}el.m=el.m.concat(attrs.filter(function(a){return a.t===73||a.n==="placeholder"}));body.push(el);var btns=content.filter(function(e){return e.e==="button"||findDeep(e.f,"button")});if(btns.length){body.push.apply(body,btns);body=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:body}]}}else{var els=content.filter(function(e){return e.e});if(els.find(function(e){return e.e==="button"})&&els.length>1){body=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:content}]}else{body.push.apply(body,content)}}var label=attrs.find(function(a){return a.n==="label"});if(tip){body.unshift({t:7,e:"span",m:[{t:13,n:"class",f:"field-tip"+(!label?" field-solo-tip":""),g:1},{t:13,n:"title",f:tip.f},{t:70,n:["click"],f:{r:[],s:"[false]"}}],f:"?"})}if(label){body.unshift(label.f)}else{body.unshift(" ")}var outer={t:7,e:"label",m:[{t:71,n:"field"}].concat(attrs.filter(function(a){return a.t!==13&&a.t!==73||a.n!=="value"&&a.n!=="type"&&a.n!=="inline"&&a.n!=="label"&&a.n!=="placeholder"&&a.n!=="target"})),f:body};if(attrs.find(function(a){return a.n==="inline"})){outer.m.push({t:13,n:"class",f:"inline"})}handle.setTemplate([outer])});macro.types={};export function autofocus(node){if(typeof node.focus==="function"){node.focus()}return{teardown:noop}}export function plugin(opts){if(opts===void 0)opts={};return function(ref){var Ractive=ref.Ractive;var instance=ref.instance;if(!Ractive.isInstance(instance)){if(opts.includeStyle){if(instance===Ractive){Ractive.addCSS("form-decorator",style)}else{var css=instance.css;instance.css=function(data){var res=typeof css!=="function"?css||"":css(data);return res+style(data)}}}}instance.partials[opts.name||"field"]=macro;instance.decorators[opts.name||"field"]=field;instance.decorators[opts.autofocusName||"autofocus"]=autofocus}}globalRegister("field","decorators",field);globalRegister("field","partials",macro);globalRegister("autofocus","decorators",autofocus);export default plugin;
import globalRegister from"./globalRegister";import Ractive from"ractive";export function style(data){var primary=Object.assign({},data("raui.primary"),data("raui.form.primary"));var active=Object.assign({},data("raui.primary.active"),data("raui.form.primary.active"));var boxy=data("raui.form.boxy");return"\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: "+(primary.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 "+(primary.bc||"#ccc")+";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: "+(primary.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: "+(boxy?primary.bg||"#fff":"transparent")+";\n }\n\n label.field.focus {\n color: "+(active.fg||primary.fga||"#07e")+";\n }\n\n label.field.textarea.focus {\n border-color: "+(active.fg||primary.fga||"#07e")+";\n "+(!boxy?"box-shadow: 0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n 0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+";":"")+"\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: "+(boxy?"0.0625em":"0 0 0.0625em 0")+";\n border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n box-sizing: border-box;\n background-color: "+(boxy?primary.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;"+(boxy?"\n border-radius: "+(primary.radius||"0.2em")+";":"")+"\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input"+(boxy?"":":disabled")+",\n label.field select"+(boxy?"":":disabled")+" {\n padding: 0 0.75em;\n }\n label.field select"+(boxy?"":":disabled")+" {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\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 "+(!boxy?"label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 "+(primary.bc||"#ccc")+";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em "+(primary.bc||"#ccc")+",\n -0.0625em 0.0625em "+(primary.bc||"#ccc")+",\n 0.0625em -0.0625em "+(primary.bc||"#ccc")+",\n -0.0625em -0.0625em "+(primary.bc||"#ccc")+";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n 0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+";\n }":"")+"\n\n /**** CHECK BOXES ****/\n\n label.field.check {\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 {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -3px;\n top: 23px;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n background-color: "+(primary.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 {\n top: 3px;\n left: -3px;\n }\n\n label.field.check input:checked {\n background-color: "+(primary.fga||"#07e")+';\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 3px 11px 3px 1px;\n border: solid 2px; /* Safari */\n border-color: '+(primary.fg||"#222")+';\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: "";\n display: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: '+(primary.fga||"#07e")+";\n background-color: "+(primary.fga||"#07e")+";\n }\n label.field.check.focus:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.check.checked:after {\n border-color: "+(primary.bg||"#fff")+";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: "+(primary.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: "+(primary.bc||"#ccc")+";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: "+(primary.bc||"#ccc")+";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n 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;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 41px;\n height: 40px;\n background-color: "+(primary.bc||"#ccc")+';\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 24px) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 2px 10px 2px 0;\n border: solid 2px; /* Safari */\n border-color: '+(primary.fg||"#222")+';\n border-radius: 50%;\n width: 20px;\n height: 20px;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: "";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 10px;\n height: 10px;\n background-color: '+(primary.fga||"#07e")+";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio.checked:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio.focus:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: "+(primary.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: "+(primary.bc||"#ccc")+";\n }\n\n label.field.radio.disabled:after {\n background-color: "+(primary.bc||"#ccc")+";\n }\n\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: 19px;\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: "+(primary.bc||"#ccc")+";\n }\n\n label.field textarea {\n border: none;"+(boxy?"\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: "+(active.fg||primary.fga||"#07e")+";\n "+(!boxy?"box-shadow: 0 0.0625em 0 0 "+(active.fg||primary.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: "+(active.fg||primary.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: "+(primary.fg||"#222")+";\n text-align: "+(boxy?"center":"left")+";\n padding: 0.5em "+(boxy?"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;"+(boxy?"\n border-radius: "+(primary.radius||"0.2em")+";\n border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 0.0625em;":"\n border-bottom-color: "+(primary.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: "+(boxy?"1.7":"1.958")+"em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: "+(boxy?"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 "+(boxy?"height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid "+(primary.bg||"#fff")+";\n margin-left: 0;":"height: 2.25em;")+"\n }"+(boxy?"\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 "+(primary.radius||"0.2em")+" "+(primary.radius||"0.2em")+" 0;\n }\n label.field .with-buttons input {\n border-radius: "+(primary.radius||"0.2em")+" 0 0 "+(primary.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 }\n\n /* inline fields (no labels) */\n label.field.inline {\n 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."+(boxy?"15":"1")+"em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: "+(primary.fga||"#07e")+";\n color: "+(primary.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 "}function noop(){}function focused(ev){if(!~this.className.indexOf("focus")){this.className+=" focus"}}function blurred(ev){this.className=this.className.replace(/\bfocus\b/g,"").trim()}export function field(node){var ctx=this.getContext(node);var isField,isCheck,isRadio,isArea,isSelect,isFile,isButton,isPlain,isInput;var change,attrs;function invalidate(){var val=setup().split(/\s+/).filter(function(c){return!!c});isField=!!~val.indexOf("field");if(!isField){val.push("field");isField=true}isCheck=node.querySelector("input[type=checkbox]");if(isCheck&&!~val.indexOf("check")){val.push("check")}isRadio=node.querySelector("input[type=radio]");if(isRadio&&!~val.indexOf("radio")){val.push("radio")}var checkable=isCheck||isRadio;if(checkable&&checkable.checked&&!~val.indexOf("checked")){val.push("checked")}if(checkable&&checkable.disabled&&!~val.indexOf("disabled")){val.push("disabled")}if(!checkable&&change){change.cancel();change=0;if(attrs){attrs.disconnect();attrs=0}delete checkable._form_callback}else if(checkable){checkable._form_callback=function(ev,init){if(init===void 0)init=true;if(init&&checkable.type==="radio"&&checkable.name){var list=[];list.push.apply(list,document.querySelectorAll("input[type=radio][name="+checkable.name+"]"));list=list.filter(function(i){return i!==checkable});list.forEach(function(l){return l._form_callback&&l._form_callback(ev,false)})}var checked=checkable.checked;if(checked&&!~node.className.indexOf("checked")){node.className+=" checked"}else if(!checked&&~node.className.indexOf("checked")){node.className=node.className.replace(/\bchecked\b/g,"").replace(/ +/g," ").trim()}};if(MutationObserver){attrs=new MutationObserver(function(){var val;val=checkable.disabled;if(val&&!~node.className.indexOf("disabled")){node.className+=" disabled"}else if(!val&&~node.className.indexOf("disabled")){node.className=node.className.replace(/\bdisabled\b/g,"").replace(/ +/g," ").trim()}});attrs.observe(checkable,{attributes:true})}change=this.getContext(checkable).listen("change",checkable._form_callback)}isArea=!!node.querySelector("textarea");if(isArea&&!~val.indexOf("textarea")){val.push("textarea")}isSelect=!!node.querySelector("select");if(isSelect&&!~val.indexOf("select")){val.push("select")}isFile=!!node.querySelector("input[type=file]");if(isFile&&!~val.indexOf("file")){val.push("file")}isButton=node.querySelector("button");isButton=!!isButton&&isButton.parentNode===node;if(isButton&&!~val.indexOf("button")){val.push("button")}isPlain=!!node.querySelector("div");if(isPlain&&!~val.indexOf("plain")){val.push("plain")}isInput=!isCheck&&!isRadio&&!isFile&&!!node.querySelector("input");if(isInput&&!~val.indexOf("input")){val.push("input")}node.className=val.join(" ")}function setup(){var cls=node.className;if(!isField){cls=cls.replace(/\bfield\b/g,"").trim()}if(!isCheck){cls=cls.replace(/\bcheck(ed)?\b/g,"").trim()}if(!isRadio){cls=cls.replace(/\bradio\b/g,"").trim()}if(!isArea){cls=cls.replace(/\btextarea\b/g,"").trim()}if(!isSelect){cls=cls.replace(/\bselect\b/g,"").trim()}if(!isFile){cls=cls.replace(/\bfile\b/g,"").trim()}if(!isButton){cls=cls.replace(/\bbutton\b/g,"").trim()}if(!isPlain){cls=cls.replace(/\bplain\b/g,"").trim()}if(!isInput){cls=cls.replace(/\binput\b/g,"").trim()}cls=cls.replace(/ +/g," ");return cls}var focus=ctx.listen("focusin",focused);var blur=ctx.listen("focusout",blurred);invalidate.call(this);return{update:noop,invalidate:invalidate.bind(this),teardown:function teardown(){var cls=setup();cls=cls.replace(/\bfocus\b/g,"").trim();focus.cancel();blur.cancel();change&&change.cancel();node.className=cls}}}field.style=style;function findDeep(els,el){if(!els){return false}for(var i=0;i<els.length;i++){if(els[i].e===el){return true}if(els[i].f&&findDeep(els[i].f,el)){return true}}return false}export var macro=Ractive.macro(function(handle){var body=[];var attrs=(handle.template.m||[]).slice();var content=handle.template.f||[];var value=attrs.find(function(a){return a.n==="value"});var type=attrs.find(function(a){return a.n==="type"});var tip=attrs.find(function(a){return a.n==="tip"});if(tip){attrs.splice(attrs.indexOf(tip),1)}if(type&&typeof macro.types[type.f]==="function"){body.push.apply(body,macro.types[type.f](attrs,content,handle))}else if(value){var el={t:7,e:"input",m:[value]};if(findDeep(content,"option")){el.e="select";el.f=content}if(type){el.m.push(type);if(type.f==="checkbox"||type.f==="radio"){var target=attrs.find(function(a){return a.n==="target"});if(target){el.m.push(Object.assign({},target,{n:"name"}))}else{el.m.splice(el.m.indexOf(value),1,Object.assign({},value,{n:"checked"}))}}}el.m=el.m.concat(attrs.filter(function(a){return a.t===73||a.n==="placeholder"}));body.push(el);var btns=content.filter(function(e){return e.e==="button"||findDeep(e.f,"button")});if(btns.length){body.push.apply(body,btns);body=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:body}]}}else{var els=content.filter(function(e){return e.e});if(els.find(function(e){return e.e==="button"})&&els.length>1){body=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:content}]}else{body.push.apply(body,content)}}var label=attrs.find(function(a){return a.n==="label"});if(tip){body.unshift({t:7,e:"span",m:[{t:13,n:"class",f:"field-tip"+(!label?" field-solo-tip":""),g:1},{t:13,n:"title",f:tip.f},{t:70,n:["click"],f:{r:[],s:"[false]"}}],f:"?"})}if(label){body.unshift(label.f)}else{body.unshift(" ")}var outer={t:7,e:"label",m:[{t:71,n:"field"}].concat(attrs.filter(function(a){return a.t!==13&&a.t!==73||a.n!=="value"&&a.n!=="type"&&a.n!=="inline"&&a.n!=="label"&&a.n!=="placeholder"&&a.n!=="target"})),f:body};if(attrs.find(function(a){return a.n==="inline"})){outer.m.push({t:13,n:"class",f:"inline"})}handle.setTemplate([outer])});macro.types={};export function autofocus(node){if(typeof node.focus==="function"){node.focus()}return{teardown:noop}}export function plugin(opts){if(opts===void 0)opts={};return function(ref){var Ractive=ref.Ractive;var instance=ref.instance;if(!Ractive.isInstance(instance)){if(opts.includeStyle){if(instance===Ractive){Ractive.addCSS("form-decorator",style)}else{var css=instance.css;instance.css=function(data){var res=typeof css!=="function"?css||"":css(data);return res+style(data)}}}}instance.partials[opts.name||"field"]=macro;instance.decorators[opts.name||"field"]=field;instance.decorators[opts.autofocusName||"autofocus"]=autofocus}}globalRegister("field","decorators",field);globalRegister("field","partials",macro);globalRegister("autofocus","decorators",autofocus);export default plugin;

@@ -62,2 +62,3 @@ import globalRegister from './globalRegister';

function resize(size) {
if (typeof opts.offset === 'number') { size -= opts.offset; }
if (!opts.type || opts.type === 'class') {

@@ -64,0 +65,0 @@ var match, max = -1;

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

import globalRegister from"./globalRegister";import{sized}from"./watch-size";var el;function sizer(){if(!el){el=document.createElement("div");document.body.appendChild(el)}return el}var defaults={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,20,24],max:"64em",value:40},xlarge:{units:[2,3,4,5,6,8,10,12,20,24,32],max:"100em",value:50},ginormous:{units:[2,3,4,5,6,8,10,12,20,24,32,64],max:"150em",value:60}};var regexps={"grid grid-root":/\bgrid grid-root\b/g};var spaces=/\s+/g;export function grid(node,options){var ctx=this.getContext(node);var owner=this;var points;var opts=options||{};var breaks;function resize(size){if(!opts.type||opts.type==="class"){var match,max=-1;for(var k in points){if(points[k]<=size){regexps[k].lastIndex=-1;if(points[k]>max){match=k;max=points[k]}}node.className=node.className.replace(regexps[k],"").trim()}if(!match){return}if(!regexps[match].test(node.className)){node.className+=" "+match}if(opts.value){ctx.set(opts.value,breaks[match].value)}if(opts.name){ctx.set(opts.name,match)}node.className=node.className.replace(spaces," ")}}function settings(){var s=sizer();breaks=owner.get("@style.break")||defaults;points={};for(var k in breaks){s.style.width=breaks[k].max;points[k]=s.clientWidth;if(!regexps[k]){regexps[k]=new RegExp("\\b"+k+"\\b","g")}}s.style.width=0;resize(node.clientWidth)}var observer=this.observe("@style.break",settings,{init:false});var listener=ctx.observe("@local.width",resize,{init:false});var watcher=sized.call(this,node,{clientWidth:"@local.width"});node.className+=" grid grid-root";if(opts.immediate){settings()}else{requestAnimationFrame(settings)}return{update:function update(options){opts=options||{};requestAnimationFrame(function(){return resize(node.clientWidth)})},teardown:function teardown(){node.className=node.className.replace(regexps["grid grid-root"],"").trim();listener.cancel();observer.cancel();watcher.teardown()}}}export function style(data,optDefaults){var defs=data("raui.grid.break")||optDefaults||defaults;var wrappers=(data("raui.grid.wrappers")||[".row-wrap > ",".row-wrap > .row-wrap > "]).slice();wrappers.unshift("");var out=".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: "+(data("raui.grid.padding")||"0.5em")+"; }\n.grid .row > .pad { display: flex; flex-direction: column; padding: "+(data("raui.grid.padding")||"0.5em")+"; box-sizing: border-box; }";var str;var points=Object.keys(defs).map(function(k){return(defs[k].key=k)&&defs[k]});points.sort(function(l,r){return l.value>r.value?1:l.value<r.value?-1:0});var greater={};points.reverse().reduce(function(a,c){a.push(c.key);greater[c.key]=a.slice();return a},[]);var rows="",cols="";points.reverse().forEach(function(size){var name=size.prefix||size.key[0];size.units.forEach(function(u){cols+="\n"+greater[size.key].map(function(s){return wrappers.map(function(w){return"."+s+" > "+w+"."+name+"1, ."+s+" > "+w+".row > ."+name+"1, ."+s+" ."+name+"-n1, ."+s+" .row-"+name+"-n1 > *"}).join(", ")}).join(", ")+" { display: "+(data("raui.grid.display")||"inline-block")+"; width: 100%; flex-grow: 0; flex-shrink: 0; }\n"+greater[size.key].map(function(s){return wrappers.map(function(w){return"."+s+" > "+w+"."+name+"0, ."+s+" > "+w+".row > ."+name+"0, ."+s+" ."+name+"-n0, ."+s+" .row-"+name+"-n0 > *"}).join(", ")}).join(", ")+" { display: none; flex-grow: 0; flex-shrink: 0; }";rows+="\n"+greater[size.key].map(function(s){return"."+s+" .row-"+name+"-n1 > *"}).join(", ")+" { display: "+(data("raui.grid.display")||"inline-block")+"; width: 100%; }\n"+greater[size.key].map(function(s){return"."+s+" .row-"+name+"-n0 > *"}).join(", ")+" { display: none; }";var loop=function(i){str=""+i/u*100;str=str.substr(0,str.indexOf(".")+3);rows+="\n"+greater[size.key].map(function(s){return wrappers.map(function(w){return"."+s+" > "+w+".row-"+name+i+"-"+u+" > *, ."+s+" .row-"+name+"-n"+i+"-"+u+" > *, ."+s+" .row > ."+name+"-n"+i+"-"+u}).join(", ")}).join(", ")+" { display: "+(data("raui.grid.display")||"inline-block")+"; width: "+str+"%; }";cols+="\n"+greater[size.key].map(function(s){return wrappers.map(function(w){return"."+s+" > "+w+"."+name+i+"-"+u+", ."+s+" > "+w+".row > ."+name+i+"-"+u+", ."+s+" ."+name+"-n"+i+"-"+u+", ."+s+" .row-"+name+"-n"+i+"-"+u+" > *"}).join(", ")}).join(", ")+" { display: "+(data("raui.grid.display")||"inline-block")+"; width: "+str+"%; flex-grow: 0; flex-shrink: 0; }"};for(var i=1;i<u;i++)loop(i)});greater[size.key].forEach(function(s){return cols+=wrappers.map(function(w){return"."+s+" > "+w+".row > ."+name+"-fill"}).join(", ")+", ."+s+" ."+name+"-nfill { width: auto; flex-grow: 2; flex-shink: 2; }\n"+wrappers.map(function(w){return"."+s+" > "+w+".row > ."+name+"-auto"}).join(", ")+", ."+s+" ."+name+"-nauto { width: auto; flex-shrink: 2; }"})});out+=rows+cols;return out}grid.style=style;export function plugin(opts){if(opts===void 0)opts={};return function(ref){var Ractive=ref.Ractive;var instance=ref.instance;if(!Ractive.isInstance(instance)){if(opts.includeStyle){if(instance===Ractive){Ractive.addCSS("grid-decorator",style)}else{var css=instance.css;instance.css=function(data){var res=typeof css!=="function"?css||"":css(data);return res+style(data,opts.defaults)}}}}instance.decorators[opts.name||"grid"]=grid}}globalRegister("grid","decorators",grid);export default plugin;
import globalRegister from"./globalRegister";import{sized}from"./watch-size";var el;function sizer(){if(!el){el=document.createElement("div");document.body.appendChild(el)}return el}var defaults={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,20,24],max:"64em",value:40},xlarge:{units:[2,3,4,5,6,8,10,12,20,24,32],max:"100em",value:50},ginormous:{units:[2,3,4,5,6,8,10,12,20,24,32,64],max:"150em",value:60}};var regexps={"grid grid-root":/\bgrid grid-root\b/g};var spaces=/\s+/g;export function grid(node,options){var ctx=this.getContext(node);var owner=this;var points;var opts=options||{};var breaks;function resize(size){if(typeof opts.offset==="number"){size-=opts.offset}if(!opts.type||opts.type==="class"){var match,max=-1;for(var k in points){if(points[k]<=size){regexps[k].lastIndex=-1;if(points[k]>max){match=k;max=points[k]}}node.className=node.className.replace(regexps[k],"").trim()}if(!match){return}if(!regexps[match].test(node.className)){node.className+=" "+match}if(opts.value){ctx.set(opts.value,breaks[match].value)}if(opts.name){ctx.set(opts.name,match)}node.className=node.className.replace(spaces," ")}}function settings(){var s=sizer();breaks=owner.get("@style.break")||defaults;points={};for(var k in breaks){s.style.width=breaks[k].max;points[k]=s.clientWidth;if(!regexps[k]){regexps[k]=new RegExp("\\b"+k+"\\b","g")}}s.style.width=0;resize(node.clientWidth)}var observer=this.observe("@style.break",settings,{init:false});var listener=ctx.observe("@local.width",resize,{init:false});var watcher=sized.call(this,node,{clientWidth:"@local.width"});node.className+=" grid grid-root";if(opts.immediate){settings()}else{requestAnimationFrame(settings)}return{update:function update(options){opts=options||{};requestAnimationFrame(function(){return resize(node.clientWidth)})},teardown:function teardown(){node.className=node.className.replace(regexps["grid grid-root"],"").trim();listener.cancel();observer.cancel();watcher.teardown()}}}export function style(data,optDefaults){var defs=data("raui.grid.break")||optDefaults||defaults;var wrappers=(data("raui.grid.wrappers")||[".row-wrap > ",".row-wrap > .row-wrap > "]).slice();wrappers.unshift("");var out=".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: "+(data("raui.grid.padding")||"0.5em")+"; }\n.grid .row > .pad { display: flex; flex-direction: column; padding: "+(data("raui.grid.padding")||"0.5em")+"; box-sizing: border-box; }";var str;var points=Object.keys(defs).map(function(k){return(defs[k].key=k)&&defs[k]});points.sort(function(l,r){return l.value>r.value?1:l.value<r.value?-1:0});var greater={};points.reverse().reduce(function(a,c){a.push(c.key);greater[c.key]=a.slice();return a},[]);var rows="",cols="";points.reverse().forEach(function(size){var name=size.prefix||size.key[0];size.units.forEach(function(u){cols+="\n"+greater[size.key].map(function(s){return wrappers.map(function(w){return"."+s+" > "+w+"."+name+"1, ."+s+" > "+w+".row > ."+name+"1, ."+s+" ."+name+"-n1, ."+s+" .row-"+name+"-n1 > *"}).join(", ")}).join(", ")+" { display: "+(data("raui.grid.display")||"inline-block")+"; width: 100%; flex-grow: 0; flex-shrink: 0; }\n"+greater[size.key].map(function(s){return wrappers.map(function(w){return"."+s+" > "+w+"."+name+"0, ."+s+" > "+w+".row > ."+name+"0, ."+s+" ."+name+"-n0, ."+s+" .row-"+name+"-n0 > *"}).join(", ")}).join(", ")+" { display: none; flex-grow: 0; flex-shrink: 0; }";rows+="\n"+greater[size.key].map(function(s){return"."+s+" .row-"+name+"-n1 > *"}).join(", ")+" { display: "+(data("raui.grid.display")||"inline-block")+"; width: 100%; }\n"+greater[size.key].map(function(s){return"."+s+" .row-"+name+"-n0 > *"}).join(", ")+" { display: none; }";var loop=function(i){str=""+i/u*100;str=str.substr(0,str.indexOf(".")+3);rows+="\n"+greater[size.key].map(function(s){return wrappers.map(function(w){return"."+s+" > "+w+".row-"+name+i+"-"+u+" > *, ."+s+" .row-"+name+"-n"+i+"-"+u+" > *, ."+s+" .row > ."+name+"-n"+i+"-"+u}).join(", ")}).join(", ")+" { display: "+(data("raui.grid.display")||"inline-block")+"; width: "+str+"%; }";cols+="\n"+greater[size.key].map(function(s){return wrappers.map(function(w){return"."+s+" > "+w+"."+name+i+"-"+u+", ."+s+" > "+w+".row > ."+name+i+"-"+u+", ."+s+" ."+name+"-n"+i+"-"+u+", ."+s+" .row-"+name+"-n"+i+"-"+u+" > *"}).join(", ")}).join(", ")+" { display: "+(data("raui.grid.display")||"inline-block")+"; width: "+str+"%; flex-grow: 0; flex-shrink: 0; }"};for(var i=1;i<u;i++)loop(i)});greater[size.key].forEach(function(s){return cols+=wrappers.map(function(w){return"."+s+" > "+w+".row > ."+name+"-fill"}).join(", ")+", ."+s+" ."+name+"-nfill { width: auto; flex-grow: 2; flex-shink: 2; }\n"+wrappers.map(function(w){return"."+s+" > "+w+".row > ."+name+"-auto"}).join(", ")+", ."+s+" ."+name+"-nauto { width: auto; flex-shrink: 2; }"})});out+=rows+cols;return out}grid.style=style;export function plugin(opts){if(opts===void 0)opts={};return function(ref){var Ractive=ref.Ractive;var instance=ref.instance;if(!Ractive.isInstance(instance)){if(opts.includeStyle){if(instance===Ractive){Ractive.addCSS("grid-decorator",style)}else{var css=instance.css;instance.css=function(data){var res=typeof css!=="function"?css||"":css(data);return res+style(data,opts.defaults)}}}}instance.decorators[opts.name||"grid"]=grid}}globalRegister("grid","decorators",grid);export default plugin;

@@ -94,3 +94,5 @@ var notNumRE = /[^-0-9\.]/g;

range.push(dir);
node.setSelectionRange.apply(node, range);
try {
node.setSelectionRange.apply(node, range);
} catch (e) {}
}

@@ -97,0 +99,0 @@

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

var notNumRE=/[^-0-9\.]/g;var numRE=/[-0-9\.]/;var notMinusNumRE=/[^0-9\.]/g;var intRE=/(\d)(?=(\d{3})+$)/g;var decRE=/(\d)(?=(\d{3})+\.)/g;var decimalRE=/\./g;var endsWithDecRE=/\.$/;var startsZeroRE=/^(0(?!\.))+/;export function number(v,dec){v=v||"";if(dec===0){v=v.replace(/\..*/,"")}return v.replace(v.indexOf(".")===-1?intRE:decRE,"$1,")}export function numeric(options){if(options===void 0)options={};return function(node,opts){if(opts===void 0)opts={};if(typeof opts==="string"){opts={bind:opts}}var o=Object.assign({},options,opts);var ctx=this.getContext(node);var cleanup=[];var lock=false;var leave=false;if(typeof o.bind!=="string"){delete o.bind}var type=node.getAttribute("type");node.setAttribute("type","tel");node.className+=" rn-numeric";function update(){if(lock){return}var cur=node.value;var num=[cur.substr(0,node.selectionStart).replace(notNumRE,"").length,cur.substr(0,node.selectionEnd).replace(notNumRE,"").length];var dir=node.selectionDirection;var next=cur.replace(notNumRE,"");next=(next[0]||"")+next.substr(1).replace(notMinusNumRE,"");if(startsZeroRE.test(next)&&leave){var len=next.length;next=next.replace(startsZeroRE,"");num[0]-=len-next.length;num[1]-=len-next.length}var dec=next.indexOf(".");if(~dec){var preDec=next.substr(0,dec);var postDec=next.substr(dec+1).replace(decimalRE,"");if(typeof o.whole==="number"&&preDec.length>o.whole){preDec=preDec.substr(0,o.whole)}if(typeof o.decimal==="number"&&postDec.length>o.decimal){postDec=postDec.substr(0,o.decimal)}next=preDec+"."+postDec}else if(typeof o.whole==="number"&&next.length>o.whole){next=next.substr(0,o.whole)}if(o.bind){lock=true;ctx.set(o.bind,next.replace(endsWithDecRE,""));lock=false}next=""+(o.prefix||"")+number(next)+(o.suffix||"");var target=0;var offset=0;var range=[];for(var i=0;i<next.length&&target<2;i++){if(numRE.test(next[i])){offset++}if(offset===num[target]){range[target++]=i+1;if(num[target]===offset){range[target++]=i+1}}}if(range.length<1){range.push(next.length)}if(range.length<2){range.push(next.length)}node.value=next;range.push(dir);node.setSelectionRange.apply(node,range)}cleanup.push(ctx.listen("input",update).cancel);cleanup.push(ctx.listen("blur",function(){var cur=node.value.replace(notNumRE,"");node.value=cur.replace(endsWithDecRE,"");if(o.bind){lock=true;ctx.set(o.bind,node.value);lock=false}node.setSelectionRange(0,0);leave=true;update();leave=false}).cancel);cleanup.push(ctx.listen("focus",function(){if(node.selectionStart===0&&node.selectionEnd===0){setTimeout(function(){var cur=node.value;var pos;if(!numRE.test(cur)){pos=(o.prefix||"").length;node.setSelectionRange(pos,pos)}else if(decimalRE.test(cur)){pos=cur.indexOf(".");node.setSelectionRange(pos,pos)}else if(numRE.test(cur)){var i=cur.length;while(i--){if(numRE.test(cur[i])){pos=i+1;node.setSelectionRange(pos,pos);break}}}else{pos=cur.length-(o.suffix||"").length;node.setSelectionRange(pos,pos)}})}}).cancel);if(o.bind){ctx.observe(o.bind,function(v){if(lock){return}var cur=ctx.get(o.bind);node.value=cur;update()},{defer:true})}return{teardown:function teardown(){cleanup.forEach(function(fn){return fn()});node.setAttribute("type",type);node.className=node.className.replace(/ ?rn-numeric/,"")}}}}var styled=false;export function plugin(opts){if(opts===void 0)opts={};return function(ref){var Ractive=ref.Ractive;var instance=ref.instance;instance.decorators[opts.name||"numeric"]=numeric(opts);if(!styled){styled=true;Ractive.addCSS("rn-numeric","input.rn-numeric { text-align: right; }")}}}export default plugin;
var notNumRE=/[^-0-9\.]/g;var numRE=/[-0-9\.]/;var notMinusNumRE=/[^0-9\.]/g;var intRE=/(\d)(?=(\d{3})+$)/g;var decRE=/(\d)(?=(\d{3})+\.)/g;var decimalRE=/\./g;var endsWithDecRE=/\.$/;var startsZeroRE=/^(0(?!\.))+/;export function number(v,dec){v=v||"";if(dec===0){v=v.replace(/\..*/,"")}return v.replace(v.indexOf(".")===-1?intRE:decRE,"$1,")}export function numeric(options){if(options===void 0)options={};return function(node,opts){if(opts===void 0)opts={};if(typeof opts==="string"){opts={bind:opts}}var o=Object.assign({},options,opts);var ctx=this.getContext(node);var cleanup=[];var lock=false;var leave=false;if(typeof o.bind!=="string"){delete o.bind}var type=node.getAttribute("type");node.setAttribute("type","tel");node.className+=" rn-numeric";function update(){if(lock){return}var cur=node.value;var num=[cur.substr(0,node.selectionStart).replace(notNumRE,"").length,cur.substr(0,node.selectionEnd).replace(notNumRE,"").length];var dir=node.selectionDirection;var next=cur.replace(notNumRE,"");next=(next[0]||"")+next.substr(1).replace(notMinusNumRE,"");if(startsZeroRE.test(next)&&leave){var len=next.length;next=next.replace(startsZeroRE,"");num[0]-=len-next.length;num[1]-=len-next.length}var dec=next.indexOf(".");if(~dec){var preDec=next.substr(0,dec);var postDec=next.substr(dec+1).replace(decimalRE,"");if(typeof o.whole==="number"&&preDec.length>o.whole){preDec=preDec.substr(0,o.whole)}if(typeof o.decimal==="number"&&postDec.length>o.decimal){postDec=postDec.substr(0,o.decimal)}next=preDec+"."+postDec}else if(typeof o.whole==="number"&&next.length>o.whole){next=next.substr(0,o.whole)}if(o.bind){lock=true;ctx.set(o.bind,next.replace(endsWithDecRE,""));lock=false}next=""+(o.prefix||"")+number(next)+(o.suffix||"");var target=0;var offset=0;var range=[];for(var i=0;i<next.length&&target<2;i++){if(numRE.test(next[i])){offset++}if(offset===num[target]){range[target++]=i+1;if(num[target]===offset){range[target++]=i+1}}}if(range.length<1){range.push(next.length)}if(range.length<2){range.push(next.length)}node.value=next;range.push(dir);try{node.setSelectionRange.apply(node,range)}catch(e){}}cleanup.push(ctx.listen("input",update).cancel);cleanup.push(ctx.listen("blur",function(){var cur=node.value.replace(notNumRE,"");node.value=cur.replace(endsWithDecRE,"");if(o.bind){lock=true;ctx.set(o.bind,node.value);lock=false}node.setSelectionRange(0,0);leave=true;update();leave=false}).cancel);cleanup.push(ctx.listen("focus",function(){if(node.selectionStart===0&&node.selectionEnd===0){setTimeout(function(){var cur=node.value;var pos;if(!numRE.test(cur)){pos=(o.prefix||"").length;node.setSelectionRange(pos,pos)}else if(decimalRE.test(cur)){pos=cur.indexOf(".");node.setSelectionRange(pos,pos)}else if(numRE.test(cur)){var i=cur.length;while(i--){if(numRE.test(cur[i])){pos=i+1;node.setSelectionRange(pos,pos);break}}}else{pos=cur.length-(o.suffix||"").length;node.setSelectionRange(pos,pos)}})}}).cancel);if(o.bind){ctx.observe(o.bind,function(v){if(lock){return}var cur=ctx.get(o.bind);node.value=cur;update()},{defer:true})}return{teardown:function teardown(){cleanup.forEach(function(fn){return fn()});node.setAttribute("type",type);node.className=node.className.replace(/ ?rn-numeric/,"")}}}}var styled=false;export function plugin(opts){if(opts===void 0)opts={};return function(ref){var Ractive=ref.Ractive;var instance=ref.instance;instance.decorators[opts.name||"numeric"]=numeric(opts);if(!styled){styled=true;Ractive.addCSS("rn-numeric","input.rn-numeric { text-align: right; }")}}}export default plugin;

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

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",t:13,f:[{t:2,x:{r:["~/scroll"],s:"!~(_0||\"\").indexOf(\"top\")"}}]},{n:"class-rtable-with-select",t:13,f:[{t:2,r:"~/allowSelect"}]},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{n:"grid",t:71}],f:[{t:8,r:"grid-head"}]}],n:50,x:{r:["~/fixedHeader","~/display"],s:"_0&&_1===\"grid\""}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-top",g:1},{t:4,f:[{n:["scroll"],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:["~/fixedHeader","~/display"],s:"_0&&_1===\"grid\""}}],f:[{t:4,f:[{t:8,r:"grid"}],n:50,x:{r:["~/display"],s:"_0===\"grid\""}},{t:4,f:[{t:8,r:"table"}],n:51,l:1}]}," ",{t:4,f:[{t:8,r:"pagination"}],n:50,x:{r:["~/paginate"],s:"_0!==\"virtual\""}}]}],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&&_1===\"grid\"":function (_0,_1){return(_0&&_1==="grid");},"[{offsetHeight:\"~/tableHeight\",diffWidth:\"~/scrollOffset\"}]":function (){return([{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]);},"[\"~/scroll\"]":function (){return(["~/scroll"]);},"_0===\"grid\"":function (_0){return(_0==="grid");},"_0!==\"virtual\"":function (_0){return(_0!=="virtual");},"(_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]);},"[[\"select\",_2,_0.indexOf(_2),_1.indexOf(_2)]]":function (_0,_1,_2){return([["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]);},"[_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*_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,_1){return(_0&&_1);},"_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);},"true":function (){return(true);},"!_0":function (_0){return(!_0);},"_0+(_1?1:0)":function (_0,_1){return(_0+(_1?1:0));}},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:["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:["~/rows","~/visibleRows","."],s:"[[\"select\",_2,_0.indexOf(_2),_1.indexOf(_2)]]"}},{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:["No data."]}]}],pagination:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-bottom",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:2,r:"selections.length"}," of ",{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"}}]}]}],grid:[{t:7,e:"div",m:[{n:"grid",t:71},{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:8,r:"grid-head"}],n:51,r:"~/fixedHeader"}," ",{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"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-row row t1",g:1}],f:[{t:16,r:"empty"}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}],table:[{t:7,e:"table",m:[{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:8,r:"table-head"}," ",{t:4,f:[{t:8,r:"table-row"}],n:52,z:[{n:"source",x:{r:"~/items"}},{n:"shuffle",x:{x:{r:[],s:"true"}}}],r:"~/visibleRows"}," ",{t:4,f:[{t:7,e:"tr",m:[{t:13,n:"class",f:"rtable-row",g:1}],f:[{t:7,e:"td",m:[{n:"colspan",f:[{t:2,x:{r:["~/columns.length","~/allowSelect"],s:"_0+(_1?1:0)"}}],t:13}],f:[{t:16,r:"empty"}]}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}]}},
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",t:13,f:[{t:2,x:{r:["~/scroll"],s:"!~(_0||\"\").indexOf(\"top\")"}}]},{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\""}}]},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{n:"grid",t:71,f:{r:["~/scrollOffset"],s:"[{offset:_0}]"}}],f:[{t:8,r:"grid-head"}]}],n:50,r:"~/fixedHeader"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-top",g:1},{t:4,f:[{n:["scroll"],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,r:"~/fixedHeader"}],f:[{t:7,e:"div",m:[{n:"grid",t:71},{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:8,r:"grid-head"}],n:51,r:"~/fixedHeader"}," ",{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"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-row row t1",g:1}],f:[{t:16,r:"empty"}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}]}," ",{t:4,f:[{t:8,r:"pagination"}],n:50,x:{r:["~/paginate"],s:"_0!==\"virtual\""}}]}],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===\"top\"":function (_0){return(_0==="top");},"_0===\"center\"":function (_0){return(_0==="center");},"_0===\"bottom\"":function (_0){return(_0==="bottom");},"[{offset:_0}]":function (_0){return([{offset:_0}]);},"[{offsetHeight:\"~/tableHeight\",diffWidth:\"~/scrollOffset\"}]":function (){return([{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]);},"[\"~/scroll\"]":function (){return(["~/scroll"]);},"true":function (){return(true);},"!_0":function (_0){return(!_0);},"_0!==\"virtual\"":function (_0){return(_0!=="virtual");},"(_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]);},"[[\"select\",_2,_0.indexOf(_2),_1.indexOf(_2)]]":function (_0,_1,_2){return([["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]);},"[_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*_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,_1){return(_0&&_1);},"_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:["~/rows","~/visibleRows","."],s:"[[\"select\",_2,_0.indexOf(_2),_1.indexOf(_2)]]"}},{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:["No data."]}]}],pagination:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-bottom",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:2,r:"selections.length"}," of ",{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) {

@@ -280,7 +280,7 @@ var primary = Object.assign({}, data("raui.primary"), data("raui.table.primary"));

var table = Object.assign({ selected: {} }, 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 > div > table {\n width: 100%;\n border-collapse: collapse;\n display: table;\n }\n \n .rtable-auto > div > table,\n .rtable-fixed > div > table {\n table-layout: fixed;\n }\n \n .rtable td {\n padding: 0.5em;\n }\n .rtable-group > div > div,\n .rtable-header > div > div,\n .rtable-row > div > div {\n 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 td,\n .rtable-auto .row > *,\n .rtable-fixed td,\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-row-wrap {\n color: " + (primary.fg || '#222') + ";\n border-style: solid;\n border-color: " + (table.divider || primary.bc || '#ccc') + ";\n border-width: 0 0 1px 0;\n background-color: " + (table.even || primary.bga || '#f4f4f4') + ";\n }\n .rtable-row-wrap.rtable-odd {\n background-color: " + (table.odd || primary.bg || '#fff') + ";\n }\n .rtable-row-wrap:hover, .rtable-row-wrap.rtable-selected:hover {\n background-color: " + (table.over || active.bg || 'rgba(128, 182, 229, 0.2)') + ";\n position: relative;\n box-shadow: inset 1px 0 0 #dadce0,inset -1px 0 0 #dadce0, 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n z-index: 1;\n }\n \n .rtable-row-wrap.rtable-selected {\n background-color: " + (table.selected.bg || 'rgba(0, 119, 238, 0.12)') + ";\n color: " + (table.selected.fg || primary.fg || '#222') + ";\n }\n .rtable-row-wrap.rtable-selected.rtable-odd {\n background-color: " + (table.selected.odd || 'rgba(0, 119, 238, 0.1)') + ";\n }\n \n .rtable-row-wrap {\n display: flex;\n flex-grow: 1;\n align-items: center;\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 1px 1px;\n margin: 0 0 -1px -1px;\n }\n \n .rtable-border .rtable-row-wrap {\n border-width: 0 1px 1px 1px;\n }\n \n .rtable-border .rtable-row-expand {\n border-color: " + (table.divider || primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 1px 0 0 1px;\n margin-left: -1px;\n width: 100%;\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.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-header.rtable-row-wrap {\n border-bottom: 2px solid " + (table.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-header > th {\n padding: 0.5em;\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n margin: 0.5em 0;\n position: relative;\n }\n .rtable-fixed-header .rtable-header {\n margin-top: 0.5em;\n position: relative;\n z-index: 1;\n }\n .rtable-fixed-header.rtable-scrolled .rtable-header {\n box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n }\n .rtable-fixed-header .rtable-top {\n margin-top: 0;\n }\n \n .rtable-bottom {\n display: flex;\n flex-wrap: wrap;\n flex-shrink: 0;\n padding: 0 0.5em 0.5em 0.5em;\n justify-content: space-between;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n \n .rtable-bottom > * {\n padding: 0.5em;\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: 2em;\n height: 2em;\n box-shadow: none;\n outline: none;\n opacity: 0;\n top: 0;\n left: 0;\n border-radius: 2em;\n transform: translate(-0.1em, 0) scale(1);\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 position: relative;\n line-height: 1.8em;\n cursor: pointer;\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: translate(-0.1em, 0) 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: translate(-0.1em, 0) 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 2px; /* Safari */\n border-color: " + (primary.fg || '#222') + ";\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: middle;\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: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.35em, 0.55em) rotate(-45deg);\n opacity: 0;\n }\n \n .rtable-selected .rtable-select-row > div:before, .rtable-all-selected > div:before {\n border-color: " + (primary.fga || '#07e') + ";\n background-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 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: 2em;\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 {\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 " + (data('table.includeGrid') !== false ? gridStyle(data) : '');
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-group > div > div,\n .rtable-header > div > div,\n .rtable-row > div > div {\n 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-row-wrap {\n color: " + (primary.fg || '#222') + ";\n border-style: solid;\n border-color: " + (table.divider || primary.bc || '#ccc') + ";\n border-width: 0 0 1px 0;\n background-color: " + (table.even || primary.bga || '#f4f4f4') + ";\n }\n .rtable-row-wrap.rtable-odd {\n background-color: " + (table.odd || primary.bg || '#fff') + ";\n }\n .rtable-row-wrap:hover, .rtable-row-wrap.rtable-selected:hover {\n background-color: " + (table.over || active.bg || 'rgba(128, 182, 229, 0.2)') + ";\n position: relative;\n box-shadow: inset 1px 0 0 #dadce0,inset -1px 0 0 #dadce0, 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n z-index: 1;\n }\n \n .rtable-row-wrap.rtable-selected {\n background-color: " + (table.selected.bg || 'rgba(0, 119, 238, 0.12)') + ";\n color: " + (table.selected.fg || primary.fg || '#222') + ";\n }\n .rtable-row-wrap.rtable-selected.rtable-odd {\n background-color: " + (table.selected.odd || 'rgba(0, 119, 238, 0.1)') + ";\n }\n \n .rtable-row-wrap {\n display: flex;\n flex-grow: 1;\n align-items: center;\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 1px 1px;\n margin: 0 0 -1px -1px;\n }\n \n .rtable-border .rtable-row-wrap {\n border-width: 0 1px 1px 1px;\n }\n \n .rtable-border .rtable-row-expand {\n border-color: " + (table.divider || primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 1px 0 0 1px;\n margin-left: -1px;\n width: 100%;\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.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-header.rtable-row-wrap {\n border-bottom: 2px solid " + (table.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n margin: 0.5em 0;\n position: relative;\n }\n .rtable-fixed-header .rtable-header {\n margin-top: 0.5em;\n position: relative;\n z-index: 1;\n }\n .rtable-fixed-header.rtable-scrolled .rtable-header {\n box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n }\n .rtable-fixed-header .rtable-top {\n margin-top: 0;\n }\n \n .rtable-bottom {\n display: flex;\n flex-wrap: wrap;\n flex-shrink: 0;\n padding: 0 0.5em 0.5em 0.5em;\n justify-content: space-between;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n \n .rtable-bottom > * {\n padding: 0.5em;\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: 2em;\n height: 2em;\n box-shadow: none;\n outline: none;\n opacity: 0;\n top: 0;\n left: 0;\n border-radius: 2em;\n transform: translate(-0.1em, 0) scale(1);\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 position: relative;\n line-height: 1.8em;\n cursor: pointer;\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: translate(-0.1em, 0) 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: translate(-0.1em, 0) 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 2px; /* Safari */\n border-color: " + (primary.fg || '#222') + ";\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: middle;\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: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.35em, 0.55em) rotate(-45deg);\n opacity: 0;\n }\n \n .rtable-selected .rtable-select-row > div:before, .rtable-all-selected > div:before {\n border-color: " + (primary.fga || '#07e') + ";\n background-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 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: 2em;\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 {\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 .grid > .rtable-row-wrap > .rtable-row > .rtable-column > div,\n .rtable .grid > .rtable-row-wrap > .rtable-row > .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 .grid > .rtable-row-wrap > .rtable-row > .rtable-column > div,\n .rtable .grid > .rtable-row-wrap > .rtable-row > .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 .grid > .rtable-row-wrap > .rtable-row > .rtable-column > div,\n .rtable .grid > .rtable-row-wrap > .rtable-row > .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') !== false ? gridStyle(data) : '');
}).call(this, data)].join(' '); },
cssId: 'rtable',
noCssTransform: true,
attributes: ['paginate', 'items', 'filter', 'sort', 'helpers', 'fixed', 'display', 'allowSelect', 'allowSelectAll', 'border', 'fixedHeader'],
attributes: ['paginate', 'items', 'filter', 'sort', 'helpers', 'fixed', 'allowSelect', 'allowSelectAll', 'border', 'fixedHeader', 'valign'],
components: {

@@ -507,3 +507,2 @@ table: false,

return {
display: 'grid',
page: 0,

@@ -815,3 +814,3 @@ selections: [],

var rowEl, groupEl, mappings;
var rowEl, groupEl, wrapperEl, mappings;

@@ -888,2 +887,6 @@ var tpl = cmp.template.f || [];

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.attrs = attrs.filter(function (a) { return !~colAttrs.indexOf(a.n); });

@@ -932,123 +935,146 @@

groupEl = tpl.find(function (e) { return e.e === 'group'; });
wrapperEl = tpl.find(function (e) { return e.e === 'wrapper'; });
this._init = { sets: grabColumns(tpl), partials: {} };
var columns = this._init.sets.columns;
this._init.sets['meta.expand'] = rowEl && rowEl.f;
this._init.sets['meta.expand'] = rowEl && rowEl.f && rowEl.f.length;
var sortKey = '[_0._setSort(_1,_2)]';
// table
{
var header = [{ t: 7, e: 'tr', m: [{ t: 13, n: 'class-rtable-header' }, { t: 4, f: [{ n: 'style-opacity', f: '0', t: 13 }], n: 50, x: { r: ['~/virtual.offset'] , s: '_0>0' } }], f: columns.filter(function (c) { return c.hidden !== true; }).map(function (c) {
var th = { t: 7, e: 'th', f: c.label, m: [{ t: 13, n: 'class-rtable-header' }, { t: 4, n: 53, r: ("~/columns." + (c.index)), f: [{ t: 70, n: ['click'], f: { r: ['@this', '.index', '@event'], s: sortKey } }] }].concat(c.attrs) };
if (c.type) { th.m.push({ t: 13, n: ("class-rtable-" + (c.type) + "-column") }); }
if (c.filter || c.sort) { th.m.push({ t: 13, n: 'class-rtable-sortable' }); }
var res = th;
if (c.hidden && c.hidden.r) {
res = { t: 4, n: 51, r: c.hidden.r, f: [th] };
}
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: columns.filter(function (c) { return c.hidden !== true; }).map(function (c) {
var div = { t: 7, e: 'div', f: [{ t: 7, e: 'div', f: c.label }], m: [{ t: 4, n: 53, r: ("~/columns." + (c.index)), f: [{ t: 70, n: ['click'], f: { r: ['@this', '.index', '@event'], s: sortKey } }] }, { t: 13, n: 'title', f: c.label }].concat(c.attrs.filter(function (a) { return a.n !== 'title'; })) };
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' }); }
div.m.push({ t: 13, n: 'class-rtable-column' });
var res = div;
return res;
}) }];
if (c.hidden && c.hidden.r) {
res = { t: 4, n: 51, r: c.hidden.r, f: [div] };
}
// selectall
header[0].f.unshift({
t: 4, n: 50, r: '~/allowSelect', f: [{ t: 7, e: 'th', m: [{ t: 13, n: 'class-rtable-select-header' }, { 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()' } }] }, { t: 70, n: ['clickd'], f: 'selectAll' }], 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: 70, n: ['click'], f: 'selectAll' }, { t: 13, n: 'class-rtable-select' }] }] }] }]
});
return res;
}),
m: [
{ t: 13, n: 'class-row' }
] }] }];
var row = [{ t: 7, e: 'tr', f: columns.filter(function (c) { return c.hidden !== true; }).map(function (c) {
// TODO: editable
var td = { t: 7, e: 'td', f: [{ t: 16, r: ("~/columns." + (columns.indexOf(c)) + ".content"), c: { r: '.' } }], m: c.attrs.slice() };
if (c.type) { td.m.unshift({ t: 13, n: ("class-rtable-" + (c.type) + "-column") }, { t: 13, n: 'class-rtable-column' }); }
if (!td.m.find(function (a) { return a.n === 'title'; })) { td.m.unshift({ t: 13, n: 'title', f: c.content.find(function (e) { return e.e; }) ? c.label : c.content }); }
if (c.noPad === 0) { td.m.push({ t: 13, n: 'class-rtable-no-pad' }); }
else if (c.noPad) { td.m.push({ t: 13, n: 'class-rtable-no-pad', f: c.noPad }); }
var res = td;
// selectall
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' }] }] }]
});
if (c.hidden && c.hidden.r) {
res = { t: 4, n: 51, r: c.hidden.r, f: [td] };
//header[0].f.push({t: 4, f: [{ t: 7, e: 'div', m: [{ t: 13, n: 'class', f: 'rtable-header-scroll', g: 1 }, { n: 'style-width', f: [{ t: 2, r: '~/scrollOffset' }], t: 13 }] }], n: 50, r: '~/fixedHeader' });
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', f: 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: '.' } }] }];
if (c.attrs.length) {
c.attrsP = c.attrs;
c.attrs = [{ t: 16, r: ("~/columns." + cidx + ".attrsP"), c: { r: '.' } }];
} else {
c.attrs = [];
}
var attrs = c.attrs;
if (c.editable && c.filter) {
// TODO: moar types - pick, date, maybe custom via edit tag
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 + ".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;
}
}
return res;
}), m: [
{ t: 13, n: 'class-rtable-row' },
{ t: 13, n: 'class-rtable-selected', f: [{ t: 2, x: { r: ['~/selections', '.'], s: '~_0.indexOf(_1)' } }] },
{ t: 70, n: ['click'], f: { r: ['~/rows', '~/visibleRows', '.'], s: "[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]" } }
].concat((rowEl && rowEl.m) || empty)}];
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'" } }] }
);
}
// select
row[0].f.unshift({
t: 4, n: 50, r: '~/allowSelect', f: [{ t: 7, e: 'th', m: [{ t: 13, n: 'class-rtable-select-row' }, { t: 70, n: ['clickd'], f: { r: ['@this', '.', '@event'], s: '[_0._select(_1,_2),false]' } }], 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 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' });
if (!div.m.find(function (a) { return a.n === 'title'; })) { attrs.unshift({ t: 13, n: 'title', f: c.content.find(function (e) { return e.e; }) ? c.label : c.content }); }
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;
this._init.partials['table-row'] = row;
this._init.partials['table-head'] = header;
if (c.hidden && c.hidden.r) {
res = { t: 4, n: 51, r: c.hidden.r, f: [div] };
}
return res;
}), m: [
{ t: 13, n: 'class-row' }, { t: 13, n: 'class-rtable-row' },
{ t: 70, n: (rowEl && rowEl.f ? ['dblclickd'] : ['click', 'dblclick']), f: { r: ['~/rows', '~/visibleRows', '.'], s: "[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]" } }
] }] }];
// extra row attrs
if (rowEl && rowEl.m && rowEl.m.length) {
this._init.sets.rowAttrs = rowEl.m.slice();
row[0].f[0].m.push({ t: 16, r: '~/rowAttrs', c: { r: '.' } });
}
// grid
{
var header$1 = [{ 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: columns.filter(function (c) { return c.hidden !== true; }).map(function (c) {
var div = { t: 7, e: 'div', f: [{ t: 7, e: 'div', f: c.label }], m: [{ t: 4, n: 53, r: ("~/columns." + (c.index)), f: [{ t: 70, n: ['click'], f: { r: ['@this', '.index', '@event'], s: sortKey } }] }, { t: 13, n: 'title', f: c.label }].concat(c.attrs.filter(function (a) { return a.n !== 'title'; })) };
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' }); }
div.m.push({ t: 13, n: 'class-rtable-column' });
var res = div;
// extra wrapper attrs
if (wrapperEl && wrapperEl.m && wrapperEl.m.length) {
this._init.sets.wrapperAttrs = wrapperEl.m.slice();
row[0].m.push({ t: 16, r: '~/wrapperAttrs', c: { r: '.' } });
}
if (c.hidden && c.hidden.r) {
res = { t: 4, n: 51, r: c.hidden.r, f: [div] };
}
// expando rows
if (rowEl && rowEl.f && rowEl.f.length) {
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: '.' } }] }], m: [{ t: 13, n: 'class-t1' }, { t: 13, n: 'class-rtable-row-expand' }] }
] });
row[0].f[0].m.push({ t: 70, n: ['clickd'], f: { r: ['@this', '@index'], s: '[_0._expand(_1)]' } });
}
return res;
}),
m: [
{ t: 13, n: 'class-row' }
] }] }];
// select
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]' } }] }] }] }]
});
// selectall
header$1[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' }] }] }]
});
// group
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: (rowEl && rowEl.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;
//header[0].f.push({t: 4, f: [{ t: 7, e: 'div', m: [{ t: 13, n: 'class', f: 'rtable-header-scroll', g: 1 }, { n: 'style-width', f: [{ t: 2, r: '~/scrollOffset' }], t: 13 }] }], n: 50, r: '~/fixedHeader' });
var row$1 = [{ 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', f: columns.filter(function (c) { return c.hidden !== true; }).map(function (c) {
var content = [{ t: 7, e: 'div', f: [{ t: 16, r: ("~/columns." + (columns.indexOf(c)) + ".content"), c: { r: '.' } }] }];
var attrs = c.attrs.slice();
if (c.editable && c.filter) {
// TODO: moar types - pick, date, maybe custom via edit tag
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." + (columns.indexOf(c)) + ".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;
}
}
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' });
if (!div.m.find(function (a) { return a.n === 'title'; })) { attrs.unshift({ t: 13, n: 'title', f: c.content.find(function (e) { return e.e; }) ? c.label : c.content }); }
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 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;

@@ -1061,73 +1087,26 @@

return res;
}), m: [
{ t: 13, n: 'class-row' }, { t: 13, n: 'class-rtable-row' },
{ t: 70, n: (rowEl && rowEl.f ? ['dblclickd'] : ['click', 'dblclick']), f: { r: ['~/rows', '~/visibleRows', '.'], s: "[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]" } }
].concat((rowEl && rowEl.m) || empty) }] }];
});
// expando rows
if (rowEl && rowEl.f) {
row$1[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: '.' } }] }], m: [{ t: 13, n: 'class-t1' }, { t: 13, n: 'class-rtable-row-expand' }] }
] });
row$1[0].f[0].m.push({ t: 70, n: ['clickd'], f: { r: ['@this', '@index'], s: '[_0._expand(_1)]' } });
}
// select
row$1[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]' } }] }] }] }]
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]' } }] }] }] }]
});
// group
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: (rowEl && rowEl.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$1.unshift(group);
this._init.by = by.f;
var attr;
if (attr = groupEl.m.find(function (a) { return a.n === 'select'; })) {
(mappings || (mappings = [])).push(Object.assign({}, attr, { n: 'allowGroupSelect' }));
}
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 (attr = groupEl.m.find(function (a) { return a.n === 'show'; })) {
(mappings || (mappings = [])).push(Object.assign({}, attr, { n: 'showGroups' }));
}
if (c.hidden && c.hidden.r) {
res = { t: 4, n: 51, r: c.hidden.r, f: [div] };
}
group.f[0].f = parts;
}
return res;
});
this._init.partials['grid-row'] = row;
this._init.partials['grid-head'] = header;
// select
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$1;
this._init.partials['grid-head'] = header$1;
if (mappings && this.component) { this.component.mappings = mappings; }
}
if (mappings && this.component) { this.component.mappings = mappings; }
}

@@ -1134,0 +1113,0 @@

@@ -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}};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.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._setSort=function _setSort(idx,ev){var col=this.get("columns."+idx);if(!col||!(col.sort||col.filter)){return}var sort=col.sort||col.filter;if(isString(sort)&&sort[0]==="~"){sort=this.get(sort)}var multi=ev.ctrlKey;var sorts=this.get("sort");if(!Array.isArray(sort)){sort=[sort]}if(!sorts){sorts=[]}else if(!Array.isArray(sorts)){sorts=[sorts]}if(!sorts.length){this.set("sort",sort.map(function(s){return"+"+s}))}else{var cur=sorts.map(function(s){return sortRE.exec(s).slice(1)});var overlap=sort.reduce(function(a,c){return a&&!!cur.find(function(s){return s[1]===c})},true);if(overlap&&sorts.length!==sort.length&&!multi){this.set("sort",sort.map(function(s){return"+"+sort}))}else if(!multi){if(overlap){this.set("sort",cur.map(function(s){return""+(s[0]==="+"?"-":"+")+s[1]}))}else{this.set("sort",sort.map(function(s){return"+"+s}))}}else{if(overlap){this.set("sort",cur.map(function(s){return~sort.indexOf(s[1])?""+(s[0]==="+"?"-":"+")+s[1]:s[0]+s[1]}))}else{this.set("sort",sorts.concat(sort.map(function(s){return"+"+s})))}}}};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.select=function select(){var selected=this.get("selected");if(selected){this.fire("selected",{},selected,this.get("rows").indexOf(selected),this.get("visibleRows").indexOf(selected))}};prototypeAccessors.selections.get=function(){return this.get("selections")||[]};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 this$1=this;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$1.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};Object.defineProperties(Table.prototype,prototypeAccessors);return Table}(Ractive);function columnGetter(table,col){if(!table||!col){return}var getters=table._getters||(table._getters={});var v=col.filter;if(isString(v)&&v.indexOf("~/")===0){v=table.get(v)}var k=Array.isArray(v)?v.join("."):isString(v)?v:false;if(!k){return}if(!getters[k]){if(isString(v)&&~v.indexOf("*")){var parts=Ractive.splitKeypath(v);getters[k]=function(obj){var res=applyPathReduce(obj,parts);return res.v||res.l}}else{if(isString(v)){v=Ractive.splitKeypath(v)}getters[k]=function(obj){return applyPath(obj,v)}}}return getters[k]}function fieldGetter(table,field){if(!table||!field){return}var getters=table._getters||(table._getters={});var v=field.path;if(isString(v)&&v.indexOf("~/")===0){v=table.get(v)}var k=Array.isArray(v)?v.join("."):isString(v)?v:false;if(k){if(!getters[k]){if(isString(v)&&~v.indexOf("*")){var parts=Ractive.splitKeypath(v);getters[k]=function(obj){var res=applyPathReduce(obj,parts);return res.v||res.l}}else{if(isString(v)){v=Ractive.splitKeypath(v)}getters[k]=function(obj){return applyPath(obj,v)}}}return getters[k]}else{v=field.value;if(isString(v)&&v.indexOf("~/")===0){v=table.get(v)}if(typeof v==="function"){return v}}}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",t:13,f:[{t:2,x:{r:["~/scroll"],s:'!~(_0||"").indexOf("top")'}}]},{n:"class-rtable-with-select",t:13,f:[{t:2,r:"~/allowSelect"}]},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{n:"grid",t:71}],f:[{t:8,r:"grid-head"}]}],n:50,x:{r:["~/fixedHeader","~/display"],s:'_0&&_1==="grid"'}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-top",g:1},{t:4,f:[{n:["scroll"],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:["~/fixedHeader","~/display"],s:'_0&&_1==="grid"'}}],f:[{t:4,f:[{t:8,r:"grid"}],n:50,x:{r:["~/display"],s:'_0==="grid"'}},{t:4,f:[{t:8,r:"table"}],n:51,l:1}]}," ",{t:4,f:[{t:8,r:"pagination"}],n:50,x:{r:["~/paginate"],s:'_0!=="virtual"'}}]}],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&&_1==="grid"':function(_0,_1){return _0&&_1==="grid"},'[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]':function(){return[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]},'["~/scroll"]':function(){return["~/scroll"]},'_0==="grid"':function(_0){return _0==="grid"},'_0!=="virtual"':function(_0){return _0!=="virtual"},"(_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]},'[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]':function(_0,_1,_2){return[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]},"[_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*_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,_1){return _0&&_1},"_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},true:function(){return true},"!_0":function(_0){return!_0},"_0+(_1?1:0)":function(_0,_1){return _0+(_1?1:0)}},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:["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:["~/rows","~/visibleRows","."],s:'[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]'}},{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:["No data."]}]}],pagination:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-bottom",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:2,r:"selections.length"}," of ",{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"}}]}]}],grid:[{t:7,e:"div",m:[{n:"grid",t:71},{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:8,r:"grid-head"}],n:51,r:"~/fixedHeader"}," ",{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"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-row row t1",g:1}],f:[{t:16,r:"empty"}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}],table:[{t:7,e:"table",m:[{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:8,r:"table-head"}," ",{t:4,f:[{t:8,r:"table-row"}],n:52,z:[{n:"source",x:{r:"~/items"}},{n:"shuffle",x:{x:{r:[],s:"true"}}}],r:"~/visibleRows"}," ",{t:4,f:[{t:7,e:"tr",m:[{t:13,n:"class",f:"rtable-row",g:1}],f:[{t:7,e:"td",m:[{n:"colspan",f:[{t:2,x:{r:["~/columns.length","~/allowSelect"],s:"_0+(_1?1:0)"}}],t:13}],f:[{t:16,r:"empty"}]}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}]}},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:{}},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 > div > table {\n width: 100%;\n border-collapse: collapse;\n display: table;\n }\n \n .rtable-auto > div > table,\n .rtable-fixed > div > table {\n table-layout: fixed;\n }\n \n .rtable td {\n padding: 0.5em;\n }\n .rtable-group > div > div,\n .rtable-header > div > div,\n .rtable-row > div > div {\n 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 td,\n .rtable-auto .row > *,\n .rtable-fixed td,\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-row-wrap {\n color: "+(primary.fg||"#222")+";\n border-style: solid;\n border-color: "+(table.divider||primary.bc||"#ccc")+";\n border-width: 0 0 1px 0;\n background-color: "+(table.even||primary.bga||"#f4f4f4")+";\n }\n .rtable-row-wrap.rtable-odd {\n background-color: "+(table.odd||primary.bg||"#fff")+";\n }\n .rtable-row-wrap:hover, .rtable-row-wrap.rtable-selected:hover {\n background-color: "+(table.over||active.bg||"rgba(128, 182, 229, 0.2)")+";\n position: relative;\n box-shadow: inset 1px 0 0 #dadce0,inset -1px 0 0 #dadce0, 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n z-index: 1;\n }\n \n .rtable-row-wrap.rtable-selected {\n background-color: "+(table.selected.bg||"rgba(0, 119, 238, 0.12)")+";\n color: "+(table.selected.fg||primary.fg||"#222")+";\n }\n .rtable-row-wrap.rtable-selected.rtable-odd {\n background-color: "+(table.selected.odd||"rgba(0, 119, 238, 0.1)")+";\n }\n \n .rtable-row-wrap {\n display: flex;\n flex-grow: 1;\n align-items: center;\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 1px 1px;\n margin: 0 0 -1px -1px;\n }\n \n .rtable-border .rtable-row-wrap {\n border-width: 0 1px 1px 1px;\n }\n \n .rtable-border .rtable-row-expand {\n border-color: "+(table.divider||primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 1px 0 0 1px;\n margin-left: -1px;\n width: 100%;\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.divider||primary.bc||"#ccc")+";\n }\n \n .rtable-header.rtable-row-wrap {\n border-bottom: 2px solid "+(table.divider||primary.bc||"#ccc")+";\n }\n \n .rtable-header > th {\n padding: 0.5em;\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n margin: 0.5em 0;\n position: relative;\n }\n .rtable-fixed-header .rtable-header {\n margin-top: 0.5em;\n position: relative;\n z-index: 1;\n }\n .rtable-fixed-header.rtable-scrolled .rtable-header {\n box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n }\n .rtable-fixed-header .rtable-top {\n margin-top: 0;\n }\n \n .rtable-bottom {\n display: flex;\n flex-wrap: wrap;\n flex-shrink: 0;\n padding: 0 0.5em 0.5em 0.5em;\n justify-content: space-between;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n \n .rtable-bottom > * {\n padding: 0.5em;\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: 2em;\n height: 2em;\n box-shadow: none;\n outline: none;\n opacity: 0;\n top: 0;\n left: 0;\n border-radius: 2em;\n transform: translate(-0.1em, 0) scale(1);\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 position: relative;\n line-height: 1.8em;\n cursor: pointer;\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: translate(-0.1em, 0) 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: translate(-0.1em, 0) 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 2px; /* Safari */\n border-color: '+(primary.fg||"#222")+';\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: middle;\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: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.35em, 0.55em) rotate(-45deg);\n opacity: 0;\n }\n \n .rtable-selected .rtable-select-row > div:before, .rtable-all-selected > div:before {\n border-color: '+(primary.fga||"#07e")+";\n background-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 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: 2em;\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 {\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 "+(data("table.includeGrid")!==false?gridStyle(data):"")}.call(this,data)].join(" ")},cssId:"rtable",noCssTransform:true,attributes:["paginate","items","filter","sort","helpers","fixed","display","allowSelect","allowSelectAll","border","fixedHeader"],components:{table:false,Table:false},syncComputedChildren:true,decorators:{grid:grid,sized:sized},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})},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:{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 header=this$1.find(".rtable-header");if(!header){return}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);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)/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){return lock=false}if(!isNumber(offset)||isNaN(offset)||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)}});this._scrollListener.fn=fn$1;scroll.observer=this.observe("rows.length",function(){this$1.set("virtual.offset",null);fn$1()},{init:false,strict: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}},data:function data(){return{display:"grid",page:0,selections:[],allowSelect:true,allowSelectAll:true,showGroups:true,allowGroupSelect:true,expanded:null,minPerPage:10}},computed:{rows:{get:function get(){var this$1=this;var columns=this.viewmodel.value.columns;var fields=this.viewmodel.value.fields;var cols=columns.filter(function(c){return c.filter}).map(function(c){return columnGetter(this$1,c)}).filter(function(c){return c});var list=this.get("items")||[];var src=list;var filter=this.get("filter");var sort=this.get("sort");if(isObject(filter)&&!Array.isArray(filter)){filter=[filter]}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&&isString(v)&&re.test(v)){return true}}})}catch(e){}}else if(Array.isArray(filter)){var flts=buildFilter(this,filter,columns,fields);var recache={};try{list=list.filter(function(l){return flts.reduce(function(ok,flt){return ok&&applyFilter(flt,l,recache)},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)){return{dir:f[0]==="-"?-1:1,get:fieldGetter(this$1,{path:f[0]==="-"||f[0]==="+"?f.substr(1):f})}}else if(f){return{dir:isNumber(f.dir)?f.dir:f.dir==="desc"?-1:1,get:f.id&&(columnGetter(this$1,columns.find(function(c){return c.id===f.id}))||fieldGetter(this$1,fields.find(function(c){return c.id===f.id})))||f.path&&fieldGetter(this$1,{path:f.path,value:f.value})}}}).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(a);bb=sort[i].get(b);p=sort[i].dir*compare(aa,bb);if(p!==0){return p}}return p})}this.set("isFiltered",src.length!==list.length);return list}},visibleRows:{get:function get(){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:{get:function get(){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:{get:function get(){var this$1=this;var rows=this.get("rows");var last,cur;var res={};for(var i=0;i<rows.length;i++){cur=rows[i][this$1._init.by];if(cur!=last){res[i]=1}last=cur}return res}}}});function applyPath(src,path){if(path.length&&!src&&typeof src!=="object"){return}var res=src;for(var i=0;i<path.length;i++){res=res[path[i]];if(typeof res!=="object"||!res){return i+1<path.length?undefined:res}}return res}function applyPathReduce(src,path){if(!path.length){return{v:src}}if(path.length&&typeof src!=="object"){return{n:1}}var key=path[0];if(key==="*"&&Array.isArray(src)){var next=path.slice(1);return{l:src.reduce(function(a,c){var v=applyPathReduce(c,next);if(isObject(v)){if(v.v){a.push(v.v)}else if(v.l){a.push.apply(a,v.l)}else if(!v.n){a.push(v)}}else{a.push(v)}return a},[])}}else{return applyPathReduce(src[key],path.slice(1))}}function compare(a,b){return a<b?-1:a>b?1:a==b?0:!a&&b?-1:a&&!b?1:0}function buildFilter(grid,filter,columns,fields){return filter.map(function(f){var flt={op:f.op||"=",value:f.value||""};if(f.id){var field=columns.find(function(c){return c.id===f.id||c.filter===f.id});if(field){flt.get=columnGetter(grid,field);if(flt.get){flt.type=field.type||"string"}else{field=0}}if(!field){field=fields.find(function(c){return c.id===f.id});if(field){flt.get=fieldGetter(grid,field);flt.type=field.type||"string"}}}else{flt.op="skip"}if(f.op==="and"||f.op==="or"||f.op==="&&"||f.op==="||"){flt.op=f.op;if(Array.isArray(f.value)){flt.value=buildFilter(grid,f.value,columns,fields)}}return flt}).filter(function(f){return f.op!=="skip"})}function applyFilter(flt,item,recache){if(!item||!flt.get&&flt.op!=="and"&&flt.op!=="or"&&flt.op!=="&&"&&flt.op!=="||"){return false}var v=flt.get&&flt.get(item);if(flt.op==="="||flt.op==="=="||flt.op==="is"){if(flt.type==="number"||flt.type==="date"){return+v==+flt.value}return v==flt.value}else if(flt.op==="!="||flt.op==="<>"||flt.op==="not"){if(flt.type==="number"||flt.type==="date"){return+v!=+flt.value}return v!=flt.value}else if(flt.op===">"||flt.op==="gt"){return v>flt.value}else if(flt.op===">="||flt.op==="gte"){return v>=flt.value}else if(flt.op==="<"||flt.op==="lt"){return v<flt.value}else if(flt.op==="<="||flt.op==="lte"){return v<=flt.value}else if(flt.op==="like"||flt.op==="notlike"||flt.op==="~"||flt.op==="!~"){var res=flt.op==="like"||flt.op==="~"?true:false;if(isString(flt.value)){if(!flt.value){return true}var re=recache[flt.value]||(recache[flt.value]=new RegExp(".*"+flt.value.replace(/%/g,".*")+".*","gi"));res=re.test(v)}else if(isRegex(flt.value)){res=flt.value.test(v)}return flt.op==="like"||flt.op==="~"?res:!res}else if(flt.op==="contains"||flt.op==="@"){if(Array.isArray(v)){return!!~v.indexOf(flt.value)}}else if(flt.op==="containslike"||flt.op==="@~"||flt.op==="containsnotlike"||flt.op==="@!~"){if(Array.isArray(v)){var re$1=isRegex(flt.value)?flt.value:isString(flt.value)?recache[flt.value]||(recache[flt.value]=new RegExp(".*"+flt.value.replace(/%/g,".*")+".*","gi")):null;if(!re$1){return false}var match=v.findIndex(function(x){return re$1.test((x||"").toString())});return flt.op==="containslike"||flt.op==="@~"?match>=0:match<0}}else if((flt.op==="or"||flt.op==="||")&&Array.isArray(flt.value)){return flt.value.reduce(function(a,c){return a||applyFilter(c,item,recache)},false)}else if((flt.op==="and"||flt.op==="&&")&&Array.isArray(flt.value)){return flt.value.reduce(function(a,c){return a&&applyFilter(c,item,recache)},true)}return true}var colAttrs=["label","type","filter","hidden","sort","no-pad","id","editable"];var cell=/^[a-z]{1,3}[0-9]+(?:-[0-9]+)?$/;var empty=[];function construct(){var cmp=this.component;if(!cmp){return}var rowEl,groupEl,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){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});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"});attr=attrs.find(function(a){return a.n==="id"});if(attr&&isString(attr.f)){col.id=attr.f}col.label=attrs.find(function(a){return a.n==="label"});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.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.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={};var attrs$1=e.m||empty;var a;a=attrs$1.find(function(a){return a.n==="path"});if(isString(a)){field.path=a}else if(a&&a.f){field.path=map(a)}a=attrs$1.find(function(a){return a.n==="value"});if(a&&a.f){field.value=map(a)}a=attrs$1.find(function(a){return a.n==="type"});if(isString(a)){field.type=a}else if(a&&a.f){field.type=map(a)}a=attrs$1.find(function(a){return a.n==="id"});if(isString(a.f)){field.id=a.f}a=attrs$1.find(function(a){return a.n==="label"});if(isString(a)){field.label=a}else if(a&&a.f){field.label=map(a)}if(!field.id){field.id=field.label}if(!field.path){field.path=field.id}fields.push(field)}});return{fields:fields,columns:columns}}rowEl=tpl.find(function(e){return e.e==="row"});groupEl=tpl.find(function(e){return e.e==="group"});this._init={sets:grabColumns(tpl),partials:{}};var columns=this._init.sets.columns;this._init.sets["meta.expand"]=rowEl&&rowEl.f;var sortKey="[_0._setSort(_1,_2)]";{var header=[{t:7,e:"tr",m:[{t:13,n:"class-rtable-header"},{t:4,f:[{n:"style-opacity",f:"0",t:13}],n:50,x:{r:["~/virtual.offset"],s:"_0>0"}}],f:columns.filter(function(c){return c.hidden!==true}).map(function(c){var th={t:7,e:"th",f:c.label,m:[{t:13,n:"class-rtable-header"},{t:4,n:53,r:"~/columns."+c.index,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:sortKey}}]}].concat(c.attrs)};if(c.type){th.m.push({t:13,n:"class-rtable-"+c.type+"-column"})}if(c.filter||c.sort){th.m.push({t:13,n:"class-rtable-sortable"})}var res=th;if(c.hidden&&c.hidden.r){res={t:4,n:51,r:c.hidden.r,f:[th]}}return res})}];header[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"th",m:[{t:13,n:"class-rtable-select-header"},{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()"}}]},{t:70,n:["clickd"],f:"selectAll"}],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:70,n:["click"],f:"selectAll"},{t:13,n:"class-rtable-select"}]}]}]}]});var row=[{t:7,e:"tr",f:columns.filter(function(c){return c.hidden!==true}).map(function(c){var td={t:7,e:"td",f:[{t:16,r:"~/columns."+columns.indexOf(c)+".content",c:{r:"."}}],m:c.attrs.slice()};if(c.type){td.m.unshift({t:13,n:"class-rtable-"+c.type+"-column"},{t:13,n:"class-rtable-column"})}if(!td.m.find(function(a){return a.n==="title"})){td.m.unshift({t:13,n:"title",f:c.content.find(function(e){return e.e})?c.label:c.content})}if(c.noPad===0){td.m.push({t:13,n:"class-rtable-no-pad"})}else if(c.noPad){td.m.push({t:13,n:"class-rtable-no-pad",f:c.noPad})}var res=td;if(c.hidden&&c.hidden.r){res={t:4,n:51,r:c.hidden.r,f:[td]}}return res}),m:[{t:13,n:"class-rtable-row"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:70,n:["click"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(rowEl&&rowEl.m||empty)}];row[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"th",m:[{t:13,n:"class-rtable-select-row"},{t:70,n:["clickd"],f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}}],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]"}}]}]}]});this._init.partials["table-row"]=row;this._init.partials["table-head"]=header}{var header$1=[{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:columns.filter(function(c){return c.hidden!==true}).map(function(c){var div={t:7,e:"div",f:[{t:7,e:"div",f:c.label}],m:[{t:4,n:53,r:"~/columns."+c.index,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:sortKey}}]},{t:13,n:"title",f:c.label}].concat(c.attrs.filter(function(a){return a.n!=="title"}))};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"})}div.m.push({t:13,n:"class-rtable-column"});var res=div;if(c.hidden&&c.hidden.r){res={t:4,n:51,r:c.hidden.r,f:[div]}}return res}),m:[{t:13,n:"class-row"}]}]}];header$1[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$1=[{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",f:columns.filter(function(c){return c.hidden!==true}).map(function(c){var content=[{t:7,e:"div",f:[{t:16,r:"~/columns."+columns.indexOf(c)+".content",c:{r:"."}}]}];var attrs=c.attrs.slice();if(c.editable&&c.filter){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."+columns.indexOf(c)+".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}}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"});if(!div.m.find(function(a){return a.n==="title"})){attrs.unshift({t:13,n:"title",f:c.content.find(function(e){return e.e})?c.label:c.content})}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}),m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-row"},{t:70,n:rowEl&&rowEl.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(rowEl&&rowEl.m||empty)}]}];if(rowEl&&rowEl.f){row$1[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:"."}}]}],m:[{t:13,n:"class-t1"},{t:13,n:"class-rtable-row-expand"}]}]});row$1[0].f[0].m.push({t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}})}row$1[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:rowEl&&rowEl.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$1.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$1;this._init.partials["grid-head"]=header$1;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.inclideGrid",opts.includeGrid)}instance.components[opts.name||"data-table"]=Table}}globalRegister("RMTable","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}};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.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._setSort=function _setSort(idx,ev){var col=this.get("columns."+idx);if(!col||!(col.sort||col.filter)){return}var sort=col.sort||col.filter;if(isString(sort)&&sort[0]==="~"){sort=this.get(sort)}var multi=ev.ctrlKey;var sorts=this.get("sort");if(!Array.isArray(sort)){sort=[sort]}if(!sorts){sorts=[]}else if(!Array.isArray(sorts)){sorts=[sorts]}if(!sorts.length){this.set("sort",sort.map(function(s){return"+"+s}))}else{var cur=sorts.map(function(s){return sortRE.exec(s).slice(1)});var overlap=sort.reduce(function(a,c){return a&&!!cur.find(function(s){return s[1]===c})},true);if(overlap&&sorts.length!==sort.length&&!multi){this.set("sort",sort.map(function(s){return"+"+sort}))}else if(!multi){if(overlap){this.set("sort",cur.map(function(s){return""+(s[0]==="+"?"-":"+")+s[1]}))}else{this.set("sort",sort.map(function(s){return"+"+s}))}}else{if(overlap){this.set("sort",cur.map(function(s){return~sort.indexOf(s[1])?""+(s[0]==="+"?"-":"+")+s[1]:s[0]+s[1]}))}else{this.set("sort",sorts.concat(sort.map(function(s){return"+"+s})))}}}};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.select=function select(){var selected=this.get("selected");if(selected){this.fire("selected",{},selected,this.get("rows").indexOf(selected),this.get("visibleRows").indexOf(selected))}};prototypeAccessors.selections.get=function(){return this.get("selections")||[]};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 this$1=this;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$1.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};Object.defineProperties(Table.prototype,prototypeAccessors);return Table}(Ractive);function columnGetter(table,col){if(!table||!col){return}var getters=table._getters||(table._getters={});var v=col.filter;if(isString(v)&&v.indexOf("~/")===0){v=table.get(v)}var k=Array.isArray(v)?v.join("."):isString(v)?v:false;if(!k){return}if(!getters[k]){if(isString(v)&&~v.indexOf("*")){var parts=Ractive.splitKeypath(v);getters[k]=function(obj){var res=applyPathReduce(obj,parts);return res.v||res.l}}else{if(isString(v)){v=Ractive.splitKeypath(v)}getters[k]=function(obj){return applyPath(obj,v)}}}return getters[k]}function fieldGetter(table,field){if(!table||!field){return}var getters=table._getters||(table._getters={});var v=field.path;if(isString(v)&&v.indexOf("~/")===0){v=table.get(v)}var k=Array.isArray(v)?v.join("."):isString(v)?v:false;if(k){if(!getters[k]){if(isString(v)&&~v.indexOf("*")){var parts=Ractive.splitKeypath(v);getters[k]=function(obj){var res=applyPathReduce(obj,parts);return res.v||res.l}}else{if(isString(v)){v=Ractive.splitKeypath(v)}getters[k]=function(obj){return applyPath(obj,v)}}}return getters[k]}else{v=field.value;if(isString(v)&&v.indexOf("~/")===0){v=table.get(v)}if(typeof v==="function"){return v}}}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",t:13,f:[{t:2,x:{r:["~/scroll"],s:'!~(_0||"").indexOf("top")'}}]},{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"'}}]},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{n:"grid",t:71,f:{r:["~/scrollOffset"],s:"[{offset:_0}]"}}],f:[{t:8,r:"grid-head"}]}],n:50,r:"~/fixedHeader"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-top",g:1},{t:4,f:[{n:["scroll"],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,r:"~/fixedHeader"}],f:[{t:7,e:"div",m:[{n:"grid",t:71},{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:8,r:"grid-head"}],n:51,r:"~/fixedHeader"}," ",{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"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-row row t1",g:1}],f:[{t:16,r:"empty"}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}]}," ",{t:4,f:[{t:8,r:"pagination"}],n:50,x:{r:["~/paginate"],s:'_0!=="virtual"'}}]}],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==="top"':function(_0){return _0==="top"},'_0==="center"':function(_0){return _0==="center"},'_0==="bottom"':function(_0){return _0==="bottom"},"[{offset:_0}]":function(_0){return[{offset:_0}]},'[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]':function(){return[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]},'["~/scroll"]':function(){return["~/scroll"]},true:function(){return true},"!_0":function(_0){return!_0},'_0!=="virtual"':function(_0){return _0!=="virtual"},"(_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]},'[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]':function(_0,_1,_2){return[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]},"[_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*_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,_1){return _0&&_1},"_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:["~/rows","~/visibleRows","."],s:'[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]'}},{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:["No data."]}]}],pagination:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-bottom",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:2,r:"selections.length"}," of ",{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:{}},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-group > div > div,\n .rtable-header > div > div,\n .rtable-row > div > div {\n 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-row-wrap {\n color: "+(primary.fg||"#222")+";\n border-style: solid;\n border-color: "+(table.divider||primary.bc||"#ccc")+";\n border-width: 0 0 1px 0;\n background-color: "+(table.even||primary.bga||"#f4f4f4")+";\n }\n .rtable-row-wrap.rtable-odd {\n background-color: "+(table.odd||primary.bg||"#fff")+";\n }\n .rtable-row-wrap:hover, .rtable-row-wrap.rtable-selected:hover {\n background-color: "+(table.over||active.bg||"rgba(128, 182, 229, 0.2)")+";\n position: relative;\n box-shadow: inset 1px 0 0 #dadce0,inset -1px 0 0 #dadce0, 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n z-index: 1;\n }\n \n .rtable-row-wrap.rtable-selected {\n background-color: "+(table.selected.bg||"rgba(0, 119, 238, 0.12)")+";\n color: "+(table.selected.fg||primary.fg||"#222")+";\n }\n .rtable-row-wrap.rtable-selected.rtable-odd {\n background-color: "+(table.selected.odd||"rgba(0, 119, 238, 0.1)")+";\n }\n \n .rtable-row-wrap {\n display: flex;\n flex-grow: 1;\n align-items: center;\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 1px 1px;\n margin: 0 0 -1px -1px;\n }\n \n .rtable-border .rtable-row-wrap {\n border-width: 0 1px 1px 1px;\n }\n \n .rtable-border .rtable-row-expand {\n border-color: "+(table.divider||primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 1px 0 0 1px;\n margin-left: -1px;\n width: 100%;\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.divider||primary.bc||"#ccc")+";\n }\n \n .rtable-header.rtable-row-wrap {\n border-bottom: 2px solid "+(table.divider||primary.bc||"#ccc")+";\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n margin: 0.5em 0;\n position: relative;\n }\n .rtable-fixed-header .rtable-header {\n margin-top: 0.5em;\n position: relative;\n z-index: 1;\n }\n .rtable-fixed-header.rtable-scrolled .rtable-header {\n box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n }\n .rtable-fixed-header .rtable-top {\n margin-top: 0;\n }\n \n .rtable-bottom {\n display: flex;\n flex-wrap: wrap;\n flex-shrink: 0;\n padding: 0 0.5em 0.5em 0.5em;\n justify-content: space-between;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n \n .rtable-bottom > * {\n padding: 0.5em;\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: 2em;\n height: 2em;\n box-shadow: none;\n outline: none;\n opacity: 0;\n top: 0;\n left: 0;\n border-radius: 2em;\n transform: translate(-0.1em, 0) scale(1);\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 position: relative;\n line-height: 1.8em;\n cursor: pointer;\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: translate(-0.1em, 0) 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: translate(-0.1em, 0) 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 2px; /* Safari */\n border-color: '+(primary.fg||"#222")+';\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: middle;\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: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.35em, 0.55em) rotate(-45deg);\n opacity: 0;\n }\n \n .rtable-selected .rtable-select-row > div:before, .rtable-all-selected > div:before {\n border-color: '+(primary.fga||"#07e")+";\n background-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 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: 2em;\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 {\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 .grid > .rtable-row-wrap > .rtable-row > .rtable-column > div,\n .rtable .grid > .rtable-row-wrap > .rtable-row > .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 .grid > .rtable-row-wrap > .rtable-row > .rtable-column > div,\n .rtable .grid > .rtable-row-wrap > .rtable-row > .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 .grid > .rtable-row-wrap > .rtable-row > .rtable-column > div,\n .rtable .grid > .rtable-row-wrap > .rtable-row > .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")!==false?gridStyle(data):"")}.call(this,data)].join(" ")},cssId:"rtable",noCssTransform:true,attributes:["paginate","items","filter","sort","helpers","fixed","allowSelect","allowSelectAll","border","fixedHeader","valign"],components:{table:false,Table:false},syncComputedChildren:true,decorators:{grid:grid,sized:sized},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})},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:{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 header=this$1.find(".rtable-header");if(!header){return}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);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)/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){return lock=false}if(!isNumber(offset)||isNaN(offset)||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)}});this._scrollListener.fn=fn$1;scroll.observer=this.observe("rows.length",function(){this$1.set("virtual.offset",null);fn$1()},{init:false,strict: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}},data:function data(){return{page:0,selections:[],allowSelect:true,allowSelectAll:true,showGroups:true,allowGroupSelect:true,expanded:null,minPerPage:10}},computed:{rows:{get:function get(){var this$1=this;var columns=this.viewmodel.value.columns;var fields=this.viewmodel.value.fields;var cols=columns.filter(function(c){return c.filter}).map(function(c){return columnGetter(this$1,c)}).filter(function(c){return c});var list=this.get("items")||[];var src=list;var filter=this.get("filter");var sort=this.get("sort");if(isObject(filter)&&!Array.isArray(filter)){filter=[filter]}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&&isString(v)&&re.test(v)){return true}}})}catch(e){}}else if(Array.isArray(filter)){var flts=buildFilter(this,filter,columns,fields);var recache={};try{list=list.filter(function(l){return flts.reduce(function(ok,flt){return ok&&applyFilter(flt,l,recache)},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)){return{dir:f[0]==="-"?-1:1,get:fieldGetter(this$1,{path:f[0]==="-"||f[0]==="+"?f.substr(1):f})}}else if(f){return{dir:isNumber(f.dir)?f.dir:f.dir==="desc"?-1:1,get:f.id&&(columnGetter(this$1,columns.find(function(c){return c.id===f.id}))||fieldGetter(this$1,fields.find(function(c){return c.id===f.id})))||f.path&&fieldGetter(this$1,{path:f.path,value:f.value})}}}).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(a);bb=sort[i].get(b);p=sort[i].dir*compare(aa,bb);if(p!==0){return p}}return p})}this.set("isFiltered",src.length!==list.length);return list}},visibleRows:{get:function get(){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:{get:function get(){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:{get:function get(){var this$1=this;var rows=this.get("rows");var last,cur;var res={};for(var i=0;i<rows.length;i++){cur=rows[i][this$1._init.by];if(cur!=last){res[i]=1}last=cur}return res}}}});function applyPath(src,path){if(path.length&&!src&&typeof src!=="object"){return}var res=src;for(var i=0;i<path.length;i++){res=res[path[i]];if(typeof res!=="object"||!res){return i+1<path.length?undefined:res}}return res}function applyPathReduce(src,path){if(!path.length){return{v:src}}if(path.length&&typeof src!=="object"){return{n:1}}var key=path[0];if(key==="*"&&Array.isArray(src)){var next=path.slice(1);return{l:src.reduce(function(a,c){var v=applyPathReduce(c,next);if(isObject(v)){if(v.v){a.push(v.v)}else if(v.l){a.push.apply(a,v.l)}else if(!v.n){a.push(v)}}else{a.push(v)}return a},[])}}else{return applyPathReduce(src[key],path.slice(1))}}function compare(a,b){return a<b?-1:a>b?1:a==b?0:!a&&b?-1:a&&!b?1:0}function buildFilter(grid,filter,columns,fields){return filter.map(function(f){var flt={op:f.op||"=",value:f.value||""};if(f.id){var field=columns.find(function(c){return c.id===f.id||c.filter===f.id});if(field){flt.get=columnGetter(grid,field);if(flt.get){flt.type=field.type||"string"}else{field=0}}if(!field){field=fields.find(function(c){return c.id===f.id});if(field){flt.get=fieldGetter(grid,field);flt.type=field.type||"string"}}}else{flt.op="skip"}if(f.op==="and"||f.op==="or"||f.op==="&&"||f.op==="||"){flt.op=f.op;if(Array.isArray(f.value)){flt.value=buildFilter(grid,f.value,columns,fields)}}return flt}).filter(function(f){return f.op!=="skip"})}function applyFilter(flt,item,recache){if(!item||!flt.get&&flt.op!=="and"&&flt.op!=="or"&&flt.op!=="&&"&&flt.op!=="||"){return false}var v=flt.get&&flt.get(item);if(flt.op==="="||flt.op==="=="||flt.op==="is"){if(flt.type==="number"||flt.type==="date"){return+v==+flt.value}return v==flt.value}else if(flt.op==="!="||flt.op==="<>"||flt.op==="not"){if(flt.type==="number"||flt.type==="date"){return+v!=+flt.value}return v!=flt.value}else if(flt.op===">"||flt.op==="gt"){return v>flt.value}else if(flt.op===">="||flt.op==="gte"){return v>=flt.value}else if(flt.op==="<"||flt.op==="lt"){return v<flt.value}else if(flt.op==="<="||flt.op==="lte"){return v<=flt.value}else if(flt.op==="like"||flt.op==="notlike"||flt.op==="~"||flt.op==="!~"){var res=flt.op==="like"||flt.op==="~"?true:false;if(isString(flt.value)){if(!flt.value){return true}var re=recache[flt.value]||(recache[flt.value]=new RegExp(".*"+flt.value.replace(/%/g,".*")+".*","gi"));res=re.test(v)}else if(isRegex(flt.value)){res=flt.value.test(v)}return flt.op==="like"||flt.op==="~"?res:!res}else if(flt.op==="contains"||flt.op==="@"){if(Array.isArray(v)){return!!~v.indexOf(flt.value)}}else if(flt.op==="containslike"||flt.op==="@~"||flt.op==="containsnotlike"||flt.op==="@!~"){if(Array.isArray(v)){var re$1=isRegex(flt.value)?flt.value:isString(flt.value)?recache[flt.value]||(recache[flt.value]=new RegExp(".*"+flt.value.replace(/%/g,".*")+".*","gi")):null;if(!re$1){return false}var match=v.findIndex(function(x){return re$1.test((x||"").toString())});return flt.op==="containslike"||flt.op==="@~"?match>=0:match<0}}else if((flt.op==="or"||flt.op==="||")&&Array.isArray(flt.value)){return flt.value.reduce(function(a,c){return a||applyFilter(c,item,recache)},false)}else if((flt.op==="and"||flt.op==="&&")&&Array.isArray(flt.value)){return flt.value.reduce(function(a,c){return a&&applyFilter(c,item,recache)},true)}return true}var colAttrs=["label","type","filter","hidden","sort","no-pad","id","editable"];var cell=/^[a-z]{1,3}[0-9]+(?:-[0-9]+)?$/;var empty=[];function construct(){var cmp=this.component;if(!cmp){return}var rowEl,groupEl,wrapperEl,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){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});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"});attr=attrs.find(function(a){return a.n==="id"});if(attr&&isString(attr.f)){col.id=attr.f}col.label=attrs.find(function(a){return a.n==="label"});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.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.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={};var attrs$1=e.m||empty;var a;a=attrs$1.find(function(a){return a.n==="path"});if(isString(a)){field.path=a}else if(a&&a.f){field.path=map(a)}a=attrs$1.find(function(a){return a.n==="value"});if(a&&a.f){field.value=map(a)}a=attrs$1.find(function(a){return a.n==="type"});if(isString(a)){field.type=a}else if(a&&a.f){field.type=map(a)}a=attrs$1.find(function(a){return a.n==="id"});if(isString(a.f)){field.id=a.f}a=attrs$1.find(function(a){return a.n==="label"});if(isString(a)){field.label=a}else if(a&&a.f){field.label=map(a)}if(!field.id){field.id=field.label}if(!field.path){field.path=field.id}fields.push(field)}});return{fields:fields,columns:columns}}rowEl=tpl.find(function(e){return e.e==="row"});groupEl=tpl.find(function(e){return e.e==="group"});wrapperEl=tpl.find(function(e){return e.e==="wrapper"});this._init={sets:grabColumns(tpl),partials:{}};var columns=this._init.sets.columns;this._init.sets["meta.expand"]=rowEl&&rowEl.f&&rowEl.f.length;var sortKey="[_0._setSort(_1,_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:columns.filter(function(c){return c.hidden!==true}).map(function(c){var div={t:7,e:"div",f:[{t:7,e:"div",f:c.label}],m:[{t:4,n:53,r:"~/columns."+c.index,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:sortKey}}]},{t:13,n:"title",f:c.label}].concat(c.attrs.filter(function(a){return a.n!=="title"}))};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"})}div.m.push({t:13,n:"class-rtable-column"});var res=div;if(c.hidden&&c.hidden.r){res={t:4,n:51,r:c.hidden.r,f:[div]}}return res}),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",f: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:"."}}]}];if(c.attrs.length){c.attrsP=c.attrs;c.attrs=[{t:16,r:"~/columns."+cidx+".attrsP",c:{r:"."}}]}else{c.attrs=[]}var attrs=c.attrs;if(c.editable&&c.filter){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+".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"});if(!div.m.find(function(a){return a.n==="title"})){attrs.unshift({t:13,n:"title",f:c.content.find(function(e){return e.e})?c.label:c.content})}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}),m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-row"},{t:70,n:rowEl&&rowEl.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}]}]}];if(rowEl&&rowEl.m&&rowEl.m.length){this._init.sets.rowAttrs=rowEl.m.slice();row[0].f[0].m.push({t:16,r:"~/rowAttrs",c:{r:"."}})}if(wrapperEl&&wrapperEl.m&&wrapperEl.m.length){this._init.sets.wrapperAttrs=wrapperEl.m.slice();row[0].m.push({t:16,r:"~/wrapperAttrs",c:{r:"."}})}if(rowEl&&rowEl.f&&rowEl.f.length){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:"."}}]}],m:[{t:13,n:"class-t1"},{t:13,n:"class-rtable-row-expand"}]}]});row[0].f[0].m.push({t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._expand(_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:rowEl&&rowEl.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-head"]=header;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.inclideGrid",opts.includeGrid)}instance.components[opts.name||"data-table"]=Table}}globalRegister("RMTable","components",Table);export default plugin;
{
"name": "@evs-chris/raui",
"version": "0.5.8",
"version": "0.5.9",
"description": "Components, decorators, and helpers for Ractive apps that are generally Material-ish",

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

@@ -124,2 +124,3 @@ import globalRegister from './globalRegister';

padding-top: 2.2em;
white-space: normal;
}

@@ -249,2 +250,3 @@ label.field.check.inline {

padding-top: 2.2em;
white-space: normal;
}

@@ -251,0 +253,0 @@ label.field.radio.inline {

@@ -62,2 +62,3 @@ import globalRegister from './globalRegister';

function resize(size) {
if (typeof opts.offset === 'number') size -= opts.offset;
if (!opts.type || opts.type === 'class') {

@@ -64,0 +65,0 @@ let match, max = -1;

@@ -90,3 +90,5 @@ const notNumRE = /[^-0-9\.]/g;

range.push(dir);
node.setSelectionRange.apply(node, range);
try {
node.setSelectionRange.apply(node, range);
} catch (e) {}
}

@@ -93,0 +95,0 @@

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

var boxy = data('raui.form.boxy');
return ("\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: " + (primary.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 " + (primary.bc || '#ccc') + ";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: " + (primary.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: " + (boxy ? primary.bg || '#fff' : 'transparent') + ";\n }\n\n label.field.focus {\n color: " + (active.fg || primary.fga || '#07e') + ";\n }\n\n label.field.textarea.focus {\n border-color: " + (active.fg || primary.fga || '#07e') + ";\n " + (!boxy ? ("box-shadow: 0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n 0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ";") : '') + "\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: " + (boxy ? '0.0625em' : '0 0 0.0625em 0') + ";\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n box-sizing: border-box;\n background-color: " + (boxy ? primary.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;" + (boxy ? ("\n border-radius: " + (primary.radius || '0.2em') + ";") : '') + "\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input" + (boxy ? '' : ':disabled') + ",\n label.field select" + (boxy ? '' : ':disabled') + " {\n padding: 0 0.75em;\n }\n label.field select" + (boxy ? '' : ':disabled') + " {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\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 " + (!boxy ? ("label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 " + (primary.bc || '#ccc') + ";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em " + (primary.bc || '#ccc') + ",\n -0.0625em 0.0625em " + (primary.bc || '#ccc') + ",\n 0.0625em -0.0625em " + (primary.bc || '#ccc') + ",\n -0.0625em -0.0625em " + (primary.bc || '#ccc') + ";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n 0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ";\n }") : '') + "\n\n /**** CHECK BOXES ****/\n\n label.field.check {\n position:relative;\n z-index: 0;\n overflow: visible;\n cursor: pointer;\n padding-top: 2.2em;\n }\n label.field.check.inline {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -3px;\n top: 23px;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n background-color: " + (primary.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 {\n top: 3px;\n left: -3px;\n }\n\n label.field.check input:checked {\n background-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: \"\";\n display: inline-block;\n box-sizing: border-box;\n margin: 3px 11px 3px 1px;\n border: solid 2px; /* Safari */\n border-color: " + (primary.fg || '#222') + ";\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: \"\";\n display: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n background-color: " + (primary.fga || '#07e') + ";\n }\n label.field.check.focus:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.check.checked:after {\n border-color: " + (primary.bg || '#fff') + ";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: " + (primary.bc || '#ccc') + ";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: " + (primary.bc || '#ccc') + ";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: " + (primary.bc || '#ccc') + ";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n 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;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 41px;\n height: 40px;\n background-color: " + (primary.bc || '#ccc') + ";\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 24px) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: \"\";\n display: inline-block;\n box-sizing: border-box;\n margin: 2px 10px 2px 0;\n border: solid 2px; /* Safari */\n border-color: " + (primary.fg || '#222') + ";\n border-radius: 50%;\n width: 20px;\n height: 20px;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: \"\";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 10px;\n height: 10px;\n background-color: " + (primary.fga || '#07e') + ";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.focus:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: " + (primary.bc || '#ccc') + ";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: " + (primary.bc || '#ccc') + ";\n }\n\n label.field.radio.disabled:after {\n background-color: " + (primary.bc || '#ccc') + ";\n }\n\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: 19px;\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: " + (primary.bc || '#ccc') + ";\n }\n\n label.field textarea {\n border: none;" + (boxy ? "\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: " + (active.fg || primary.fga || '#07e') + ";\n " + (!boxy ? ("box-shadow: 0 0.0625em 0 0 " + (active.fg || primary.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: " + (active.fg || primary.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: " + (primary.fg || '#222') + ";\n text-align: " + (boxy ? 'center' : 'left') + ";\n padding: 0.5em " + (boxy ? '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;" + (boxy ? ("\n border-radius: " + (primary.radius || '0.2em') + ";\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 0.0625em;") : ("\n border-bottom-color: " + (primary.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: " + (boxy ? '1.7' : '1.958') + "em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: " + (boxy ? '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 " + (boxy ? ("height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid " + (primary.bg || '#fff') + ";\n margin-left: 0;") :
return ("\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: " + (primary.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 " + (primary.bc || '#ccc') + ";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: " + (primary.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: " + (boxy ? primary.bg || '#fff' : 'transparent') + ";\n }\n\n label.field.focus {\n color: " + (active.fg || primary.fga || '#07e') + ";\n }\n\n label.field.textarea.focus {\n border-color: " + (active.fg || primary.fga || '#07e') + ";\n " + (!boxy ? ("box-shadow: 0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n 0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ";") : '') + "\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: " + (boxy ? '0.0625em' : '0 0 0.0625em 0') + ";\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n box-sizing: border-box;\n background-color: " + (boxy ? primary.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;" + (boxy ? ("\n border-radius: " + (primary.radius || '0.2em') + ";") : '') + "\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input" + (boxy ? '' : ':disabled') + ",\n label.field select" + (boxy ? '' : ':disabled') + " {\n padding: 0 0.75em;\n }\n label.field select" + (boxy ? '' : ':disabled') + " {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\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 " + (!boxy ? ("label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 " + (primary.bc || '#ccc') + ";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em " + (primary.bc || '#ccc') + ",\n -0.0625em 0.0625em " + (primary.bc || '#ccc') + ",\n 0.0625em -0.0625em " + (primary.bc || '#ccc') + ",\n -0.0625em -0.0625em " + (primary.bc || '#ccc') + ";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n 0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ";\n }") : '') + "\n\n /**** CHECK BOXES ****/\n\n label.field.check {\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 {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -3px;\n top: 23px;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n background-color: " + (primary.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 {\n top: 3px;\n left: -3px;\n }\n\n label.field.check input:checked {\n background-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: \"\";\n display: inline-block;\n box-sizing: border-box;\n margin: 3px 11px 3px 1px;\n border: solid 2px; /* Safari */\n border-color: " + (primary.fg || '#222') + ";\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: \"\";\n display: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n background-color: " + (primary.fga || '#07e') + ";\n }\n label.field.check.focus:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.check.checked:after {\n border-color: " + (primary.bg || '#fff') + ";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: " + (primary.bc || '#ccc') + ";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: " + (primary.bc || '#ccc') + ";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: " + (primary.bc || '#ccc') + ";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n 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;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 41px;\n height: 40px;\n background-color: " + (primary.bc || '#ccc') + ";\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 24px) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: \"\";\n display: inline-block;\n box-sizing: border-box;\n margin: 2px 10px 2px 0;\n border: solid 2px; /* Safari */\n border-color: " + (primary.fg || '#222') + ";\n border-radius: 50%;\n width: 20px;\n height: 20px;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: \"\";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 10px;\n height: 10px;\n background-color: " + (primary.fga || '#07e') + ";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.focus:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: " + (primary.bc || '#ccc') + ";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: " + (primary.bc || '#ccc') + ";\n }\n\n label.field.radio.disabled:after {\n background-color: " + (primary.bc || '#ccc') + ";\n }\n\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: 19px;\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: " + (primary.bc || '#ccc') + ";\n }\n\n label.field textarea {\n border: none;" + (boxy ? "\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: " + (active.fg || primary.fga || '#07e') + ";\n " + (!boxy ? ("box-shadow: 0 0.0625em 0 0 " + (active.fg || primary.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: " + (active.fg || primary.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: " + (primary.fg || '#222') + ";\n text-align: " + (boxy ? 'center' : 'left') + ";\n padding: 0.5em " + (boxy ? '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;" + (boxy ? ("\n border-radius: " + (primary.radius || '0.2em') + ";\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 0.0625em;") : ("\n border-bottom-color: " + (primary.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: " + (boxy ? '1.7' : '1.958') + "em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: " + (boxy ? '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 " + (boxy ? ("height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid " + (primary.bg || '#fff') + ";\n margin-left: 0;") :
"height: 2.25em;") + "\n }" + (boxy ? ("\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 " + (primary.radius || '0.2em') + " " + (primary.radius || '0.2em') + " 0;\n }\n label.field .with-buttons input {\n border-radius: " + (primary.radius || '0.2em') + " 0 0 " + (primary.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 }\n\n /* inline fields (no labels) */\n label.field.inline {\n 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." + (boxy ? '15' : '1') + "em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: " + (primary.fga || '#07e') + ";\n color: " + (primary.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 ");

@@ -448,0 +448,0 @@ // TODO: other themes

@@ -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.RMAutocomplete={},e.Ractive)}(this,function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n="undefined"!=typeof window?window:null;function o(e,t,o){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 r=i.getAttribute("data-alias");r&&(r=(r=r.split("&")).reduce(function(e,t){var n=t.split("="),o=n[0],i=n[1];return e[o]=i,e},{})),Ractive[t][r&&r[e]||e]=o}}}function i(e,t){void 0===t&&(t={});var n=e.processParams(t,{duration:400,easing:"easeInOut"});t.dir=t.dir||!1;var o=t.distance||"20px",i=t.scale||"0.9",r="above"===t.dir?"translateY("+o+")":"left"===t.dir?"translateX("+o+")":"right"===t.dir?"translateX(-"+o+")":"translateY(-"+o+")";return e.isIntro||n.intro?(e.setStyle("opacity",0),e.setStyle("transform","scale("+i+") "+r),e.animateStyle({opacity:1,transform:"none"},n)):(e.setStyle("opacity",1),e.setStyle("transform","none"),e.animateStyle({opacity:0,transform:"scale("+i+") "+r},n))}function r(e){return void 0===e&&(e={}),function(t){t.instance.transitions[e.name||"pop"]=i}}function a(e,t){var n=!1,o=!1;function i(n){for(var o=n.target;o;){if(o===e)return;if(!o.parentNode&&o!==document)return;o=o.parentNode}t(n)}return setTimeout(function(){n=!0,o||(document.body.addEventListener("click",i),document.body.addEventListener("touchstop",i))}),{teardown:function(){o=!0,n&&(document.body.removeEventListener("click",i),document.body.removeEventListener("touchstop",i))}}}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}}o("pop","transitions",i),o("fade","transitions",l);var s,p,f,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:["click"],t:70,f:{r:[],s:"[false,false]"}}],n:51,l:1},{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?1:0)"}},"px"],t:13}],n:50,r:"position.tailTop"},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom","position.vert"],s:"_0+(_1?1:0)"}},"px"],t:13}],n:50,r:"position.tailBottom"},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft","position.vert"],s:"_0+(_1?0:1)"}},"px"],t:13}],n:50,r:"position.tailLeft"},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight","position.vert"],s:"_0+(_1?0:1)"}},"px"],t:13}],n:50,r:"position.tailRight"}]}," ",{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,r:"position.tailTop"},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom"],s:"_0-2"}},"px"],t:13}],n:50,r:"position.tailBottom"},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft"],s:"_0-2"}},"px"],t:13}],n:50,r:"position.tailLeft"},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight"],s:"_0-2"}},"px"],t:13}],n:50,r:"position.tailRight"}]}],n:50,r:"~/tail"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1}],f:[{t:16,r:"content"}]}]}],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)]},"[false,false]":function(){return[!1,!1]},"_0+(_1?1:0)":function(e,t){return e+(t?1:0)},"_0+(_1?0:1)":function(e,t){return e+(t?0:1)},"_0-2":function(e){return e-2},"[{delay:200}]":function(){return[{delay:200}]},"[_0.done(),false]":function(e){return[e.done(),!1]},"[_0?_1.done():false,false]":function(e,t){return[!!e&&t.done(),!1]},true:function(){return!0}},p:{modal:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop 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:["."],s:"[_0.done(),false]"}}],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"},{n:["click"],t:70,f:{r:[".clickClose","."],s:"[_0?_1.done():false,false]"}},{t:8,r:".attrs",c:{r:".context"}}],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(e){var t=e||this.source,n=this.get("popped");if(t&&n){var o=this.find("div");if(t&&o&&o.offsetParent){var i=o.offsetParent,r=i.getBoundingClientRect(),a=o.getBoundingClientRect(),l=t.getBoundingClientRect(),c=this.get("where")||"below",s=this.get("align")||"middle",p=this.get("tail"),f="above"===c||"below"===c,d=this.get("fit"),u=this.get("gap"),b="above"===c||"below"===c?0:"left"===c?-a.width-u:l.width+u,m="left"===c||"right"===c?-l.height:"above"===c?-l.height-a.height-u:u;"middle"===s?"below"===c||"above"===c?b-=(a.width-l.width)/2:"left"!==c&&"right"!==c||(m-=(a.height-l.height)/2):"end"===s&&("below"===c||"above"===c?b+=l.width-a.width:"left"!==c&&"right"!==c||(m+=l.height-a.height));var h={popTop:l.bottom-r.top+m,popLeft:l.left-r.left+b,tail:p,vert:"above"===c||"below"===c};if(i.scrollTop&&(h.popTop+=i.scrollTop),i.scrollLeft&&(h.popLeft+=i.scrollLeft),p){"above"===c?h.tailBottom=-10:"below"===c?h.tailTop=-10:"left"===c?h.tailRight=-10:"right"===c&&(h.tailLeft=-10);var g=this.tailSource?this.tailSource.getBoundingClientRect():l;"start"===s?f?h.tailLeft=Math.floor(g.width/2)-10:h.tailTop=Math.floor(g.height/2)-10:"end"===s?f?h.tailRight=Math.floor(g.width/2)-10:h.tailBottom=Math.floor(g.height/2)-10:"middle"===s&&(f?h.tailLeft=Math.floor(g.width/2)-10:h.tailTop=Math.floor(g.height/2)-10),g!==l?f?(h.tailLeft&&(h.tailLeft+=g.left-l.left),h.tailRight&&(h.tailRight+=l.right-g.right)):(h.tailTop&&(h.tailTop+=g.top-l.top),h.tailBottom&&(h.tailBottom+=l.bottom-g.bottom)):"middle"===s&&(f?(h.tailLeft&&(h.tailLeft+=g.left-(h.popLeft+r.left)),h.tailRight&&(h.tailRight+=h.popLeft+r.left+a.width-g.right)):(h.tailTop&&(h.tailTop+=g.top-(h.popTop+r.top)),h.tailBottom&&(h.tailBottom+=h.popTop+r.top+a.height-g.bottom)))}if(d){var v=i;if(this.get("offsets"))for(var y=this.get("offsets");y--;)v=v.offsetParent;var x=i.scrollWidth,w=i.scrollHeight;if(h.popLeft+a.width>x){var _=h.popLeft-(x-a.width);h.popLeft-=_,f&&h.tailLeft&&(h.tailLeft+=_),f&&h.tailRight&&(h.tailRight-=_),p&&!f&&(h.tail=!1)}if(h.popLeft<0){var k=-1*h.popLeft;h.popLeft+=k,f&&h.tailLeft&&(h.tailLeft-=k),f&&h.tailRight&&(h.tailRight+=k),p&&!f&&(h.tail=!1)}if(h.popTop+a.height>w){var T=h.popTop-(w-a.height);h.popTop-=T,!f&&h.tailTop&&(h.tailTop+=T),!f&&h.tailBottom&&(h.tailBottom-=T),p&&f&&(h.tail=!1)}if(h.popTop<0){var O=-1*h.popTop;h.popTop+=O,!f&&h.tailTop&&(h.tailTop-=O),!f&&h.tailBottom&&(h.tailBottom+=O),p&&f&&(h.tail=!1)}}this.set("position",h)}else this.set("position",null)}},t.prototype.show=function(e){this.source=e,this.set("popped",!0)},t.prototype.hide=function(){this.set("popped",!1)},t}(t);t.extendWith(u,{attributes:["popped","tail","where","align","top","left","fit","clickClose","noClickout","gap","offsets"],use:[r(),(void 0===f&&(f={}),function(e){e.instance.events[f.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: 11;\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: 10;\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=this;setTimeout(function(){t.get("popped")===e&&t.set("_popped",e)},100)},_popped:{handler:function(e){var t=this;if(e){var n=this.get("@style.raui.pop.mobile");n&&window.matchMedia("(max-width: "+n+")").matches?(p||(p=new b({target:document.body,append:!0})).observe("contents",function(e){s=(e||[]).length>0}),p.unshift("contents",{content:this.partials.content,context:this.getContext().getParent(!0),attrs:this.partials["extra-attributes"]||[],clickClose:this.get("clickClose"),noClickout:this.get("noClickout"),done:function(){t.set("popped",!1)}})):this.set("__popped",!0)}else s?p.shift("contents"):this.set("__popped",!1)},defer:!0},__popped:{handler:function(e){if(e){var t=this.find("div"),n=t,o=n.offsetHeight+n.offsetTop,i=n.offsetWidth+n.offsetLeft,r=n.offsetParent;if(!this.overflows)for(var a=this.overflows={e:[],v:[]};t&&t.style;){if(t===r){if(t.offsetWidth>=i&&t.offsetHeight>=o)break;i+=t.offsetLeft,o+=t.offsetTop,r=t.offsetParent}var l=getComputedStyle(t);if("auto"===l.overflow)break;"hidden"===l.overflow&&(a.e.push(t),a.v.push(t.style.overflow),t.style.overflow="visible"),t=t.parentNode}this.position(),this.transition("pop",n,{intro:!0,dir:this.get("where")||"below"})}else this.source=null,this.tailSource=null},defer:!0},"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,o,i,r,a,l,c,s,p,f,d=this.getContext(e);function u(){var d=b().split(/\s+/).filter(function(e){return!!e});(t=!!~d.indexOf("field"))||(d.push("field"),t=!0),(n=e.querySelector("input[type=checkbox]"))&&!~d.indexOf("check")&&d.push("check"),(o=e.querySelector("input[type=radio]"))&&!~d.indexOf("radio")&&d.push("radio");var u=n||o;u&&u.checked&&!~d.indexOf("checked")&&d.push("checked"),u&&u.disabled&&!~d.indexOf("disabled")&&d.push("disabled"),!u&&p?(p.cancel(),p=0,f&&(f.disconnect(),f=0),delete u._form_callback):u&&(u._form_callback=function(t,n){if(void 0===n&&(n=!0),n&&"radio"===u.type&&u.name){var o=[];o.push.apply(o,document.querySelectorAll("input[type=radio][name="+u.name+"]")),(o=o.filter(function(e){return e!==u})).forEach(function(e){return e._form_callback&&e._form_callback(t,!1)})}var i=u.checked;i&&!~e.className.indexOf("checked")?e.className+=" checked":!i&&~e.className.indexOf("checked")&&(e.className=e.className.replace(/\bchecked\b/g,"").replace(/ +/g," ").trim())},MutationObserver&&(f=new MutationObserver(function(){var t;(t=u.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(u,{attributes:!0}),p=this.getContext(u).listen("change",u._form_callback)),(i=!!e.querySelector("textarea"))&&!~d.indexOf("textarea")&&d.push("textarea"),(r=!!e.querySelector("select"))&&!~d.indexOf("select")&&d.push("select"),(a=!!e.querySelector("input[type=file]"))&&!~d.indexOf("file")&&d.push("file"),(l=!!(l=e.querySelector("button"))&&l.parentNode===e)&&!~d.indexOf("button")&&d.push("button"),(c=!!e.querySelector("div"))&&!~d.indexOf("plain")&&d.push("plain"),(s=!(n||o||a||!e.querySelector("input")))&&!~d.indexOf("input")&&d.push("input"),e.className=d.join(" ")}function b(){var p=e.className;return t||(p=p.replace(/\bfield\b/g,"").trim()),n||(p=p.replace(/\bcheck(ed)?\b/g,"").trim()),o||(p=p.replace(/\bradio\b/g,"").trim()),i||(p=p.replace(/\btextarea\b/g,"").trim()),r||(p=p.replace(/\bselect\b/g,"").trim()),a||(p=p.replace(/\bfile\b/g,"").trim()),l||(p=p.replace(/\bbutton\b/g,"").trim()),c||(p=p.replace(/\bplain\b/g,"").trim()),s||(p=p.replace(/\binput\b/g,"").trim()),p=p.replace(/ +/g," ")}var v=d.listen("focusin",h),y=d.listen("focusout",g);return u.call(this),{update:m,invalidate:u.bind(this),teardown:function(){var t=b();t=t.replace(/\bfocus\b/g,"").trim(),v.cancel(),y.cancel(),p&&p.cancel(),e.className=t}}}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()]}),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")),o=e("raui.form.boxy");return"\n label.field {\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 {\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 select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\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 {\n position:relative;\n z-index: 0;\n overflow: visible;\n cursor: pointer;\n padding-top: 2.2em;\n }\n label.field.check.inline {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -3px;\n top: 23px;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 40px;\n height: 40px;\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 {\n top: 3px;\n left: -3px;\n }\n\n label.field.check input:checked {\n background-color: "+(t.fga||"#07e")+';\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 3px 11px 3px 1px;\n border: solid 2px; /* Safari */\n border-color: '+(t.fg||"#222")+';\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: "";\n display: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: '+(t.fga||"#07e")+";\n background-color: "+(t.fga||"#07e")+";\n }\n label.field.check.focus:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.check.checked:after {\n border-color: "+(t.bg||"#fff")+";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: "+(t.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: "+(t.bc||"#ccc")+";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: "+(t.bc||"#ccc")+";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n 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;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 41px;\n height: 40px;\n background-color: "+(t.bc||"#ccc")+';\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 24px) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 2px 10px 2px 0;\n border: solid 2px; /* Safari */\n border-color: '+(t.fg||"#222")+';\n border-radius: 50%;\n width: 20px;\n height: 20px;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: "";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 10px;\n height: 10px;\n background-color: '+(t.fga||"#07e")+";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio.checked:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio.focus:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: "+(t.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: "+(t.bc||"#ccc")+";\n }\n\n label.field.radio.disabled:after {\n background-color: "+(t.bc||"#ccc")+";\n }\n\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: 19px;\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 }\n\n /* inline fields (no labels) */\n label.field.inline {\n 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=(e.template.m||[]).slice(),o=e.template.f||[],i=n.find(function(e){return"value"===e.n}),r=n.find(function(e){return"type"===e.n}),a=n.find(function(e){return"tip"===e.n});if(a&&n.splice(n.indexOf(a),1),r&&"function"==typeof x.types[r.f])t.push.apply(t,x.types[r.f](n,o,e));else if(i){var l={t:7,e:"input",m:[i]};if(y(o,"option")&&(l.e="select",l.f=o),r&&(l.m.push(r),"checkbox"===r.f||"radio"===r.f)){var c=n.find(function(e){return"target"===e.n});c?l.m.push(Object.assign({},c,{n:"name"})):l.m.splice(l.m.indexOf(i),1,Object.assign({},i,{n:"checked"}))}l.m=l.m.concat(n.filter(function(e){return 73===e.t||"placeholder"===e.n})),t.push(l);var s=o.filter(function(e){return"button"===e.e||y(e.f,"button")});s.length&&(t.push.apply(t,s),t=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:t}])}else{var p=o.filter(function(e){return e.e});p.find(function(e){return"button"===e.e})&&p.length>1?t=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:o}]:t.push.apply(t,o)}var f=n.find(function(e){return"label"===e.n});a&&t.unshift({t:7,e:"span",m:[{t:13,n:"class",f:"field-tip"+(f?"":" field-solo-tip"),g:1},{t:13,n:"title",f:a.f},{t:70,n:["click"],f:{r:[],s:"[false]"}}],f:"?"}),f?t.unshift(f.f):t.unshift(" ");var d={t:7,e:"label",m:[{t:71,n:"field"}].concat(n.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})),f:t};n.find(function(e){return"inline"===e.n})&&d.m.push({t:13,n:"class",f:"inline"}),e.setTemplate([d])});function w(e){return"function"==typeof e.focus&&e.focus(),{teardown:m}}x.types={},o("field","decorators",v),o("field","partials",x),o("autofocus","decorators",w);var _={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:["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:"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:"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},{n:"class-rac-selected",t:13,f:[{t:2,x:{r:["rac.value","."],s:"_0===_1"}}]},{n:"class-rac-hover",t:13,f:[{t:2,x:{r:["rac.selected","@index"],s:"_0===_1"}}]},{n:["click"],t:70,f:{r:["@context","."],s:'[(_0).set("rac.value",_1)]'}},{n:["mouseover"],t:70,f:{r:["@context","@index"],s:'[(_0).set("rac.selected",_1)]'}}],f:[{t:2,x:{r:["rac","."],s:"_0._member(_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.input(_1)]":function(e,t){return[e.input(t)]},"[_0.key(_1)]":function(e,t){return[e.key(t)]},'[(_0).raise("pop",{},_1)]':function(e,t){return[e.raise("pop",{},t)]},"_0===_1":function(e,t){return e===t},'[(_0).set("rac.value",_1)]':function(e,t){return[e.set("rac.value",t)]},'[(_0).set("rac.selected",_1)]':function(e,t){return[e.set("rac.selected",t)]},"_0._member(_1)":function(e,t){return e._member(t)}}};function k(e,t){return t.reduce(function(e,t){return e?e[t]:e},e)}var T=t.macro(function(e){var n,o;function i(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 o=n(t);"object"==typeof o&&"function"==typeof o.then?o.then(function(t){return e.set("rac.list",t)}):e.set("rac.list",o)}else if(Array.isArray(n)){var i,r=e.get("rac._member");try{i=new RegExp(t||"","i")}catch(e){i=new RegExp((t||"").replace(/([\{\(\[\]\)\}\?\*\^\$])/g,"\\$1"))}e.set("rac.list",n.filter(function(e){return i.test(r(e))}))}else e.set("rac.list",[])}function r(n,r,a){var l=e.get("rac.member");if(e.get("rac.__member")!==l||void 0===e.get("rac._member")){if("string"==typeof l){var s=t.splitKeypath(l);l=function(e){return null==e?"(none)":k(e,s)}}else Array.isArray(l)?l=function(e){return null==e?"(none)":k(e,e)}:l||(l=function(e){return null==e?"(none)":""+e});e.set("rac._member",l),e.set("rac.__member",e.get("rac.member")),e.set("rac.display",l(e.get("rac.value")))}l=e.get("rac.items"),e.get("rac.__items")===l&&void 0!==e.get("rac._items")||(Array.isArray(l)?e.set("rac._items",l):"function"==typeof l?e.set("rac._items",l):"object"==typeof l&&"function"==typeof l.then?l.then(function(t){e.set("rac._items",t),i()}):e.set("rac._items",[]),e.set("rac.__items",e.get("rac.items"))),o&&"rac.display"===a&&e.get("rac.limit")&&!o.contains(document.activeElement)&&c(),i()}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.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 o=e.get("rac.selected"),i=e.get("rac.list");38===n?o<=0||null==o?e.set("rac.selected",Array.isArray(i)?i.length-1:0):e.set("rac.selected",o-1):Array.isArray(i)?e.set("rac.selected",o<i.length?o+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")])}else 9===n&&(e.set("rac.popped",!1),e.get("rac.updateDisplay")())}),e.set("rac.input",function(t){n&&clearTimeout(n),n=setTimeout(function(){n=null,i(t.target.value),e.get("rac.pop").show(e.find("input"))},500),e.set("rac.display",t.target.value)}),e.setTemplate(_);var a={init:!1,defer:!0},l=[e.observe("rac.display",r,a),e.observe("rac.member",r,a),e.observe("rac.items",r,a),e.observe("rac.list",function(t){Array.isArray(t)?e.set("rac.selected",t.indexOf(e.get("rac.value"))):e.set("rac.selected",-1)},a),e.observe("rac.value",function(t){c(),e.set("rac.popped",!1),e.set("rac.tempValue",t)})];function c(){var t=e.get("rac._member");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.display&&e.link(t.display,"rac.display"),t.value&&e.link(t.value,"rac.value"),t.selected&&e.link(t.selected,"rac.selected"),"member"in t&&e.set("rac.member",t.member),"offsets"in t?(e.set("rac.offsets",t.offsets),e.set("rac.fit",!0)):e.set("rac.fit",!1),e.set("rac.limit",t["limit-set"]),e.get("rac.limit")&&e.get("input"))&&(e.get("input")!==document.activeElement&&c());r()}return e.set("rac.updateDisplay",function(t){setTimeout(function(){o&&e.get("rac.limit")&&!o.contains(document.activeElement)&&c()},140)}),s(e.attributes),{teardown:function(){e.unlink("rac.items"),e.unlink("rac.display"),e.unlink("rac.value"),e.unlink("rac.selected"),l.forEach(function(e){return e.cancel()})},update:s,render:function(){o=e.find("span")}}},{attributes:["items","selected","display","value","member","limit-set","offsets"],css:function(e){return[function(e){var t=Object.assign({},e("raui.primary"),e("raui.autocomplete.primary"));return".rautocomplete {\n position: relative;\n display: inline-block;\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: 10em;\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-invalid {\n cursor: not-allowed;\n }\n \n input.rac-modal {\n width: 100%;\n box-sizing: border-box;\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"]=T,n.components["rac-pop"]=u,n.decorators.autocompletefocus=w}}e.Autocomplete=T,e.FieldType=function(e){return void 0===e&&(e={}),function(t,n,o){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.RMAutocomplete={},e.Ractive)}(this,function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n="undefined"!=typeof window?window:null;function o(e,t,o){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 r=i.getAttribute("data-alias");r&&(r=(r=r.split("&")).reduce(function(e,t){var n=t.split("="),o=n[0],i=n[1];return e[o]=i,e},{})),Ractive[t][r&&r[e]||e]=o}}}function i(e,t){void 0===t&&(t={});var n=e.processParams(t,{duration:400,easing:"easeInOut"});t.dir=t.dir||!1;var o=t.distance||"20px",i=t.scale||"0.9",r="above"===t.dir?"translateY("+o+")":"left"===t.dir?"translateX("+o+")":"right"===t.dir?"translateX(-"+o+")":"translateY(-"+o+")";return e.isIntro||n.intro?(e.setStyle("opacity",0),e.setStyle("transform","scale("+i+") "+r),e.animateStyle({opacity:1,transform:"none"},n)):(e.setStyle("opacity",1),e.setStyle("transform","none"),e.animateStyle({opacity:0,transform:"scale("+i+") "+r},n))}function r(e){return void 0===e&&(e={}),function(t){t.instance.transitions[e.name||"pop"]=i}}function a(e,t){var n=!1,o=!1;function i(n){for(var o=n.target;o;){if(o===e)return;if(!o.parentNode&&o!==document)return;o=o.parentNode}t(n)}return setTimeout(function(){n=!0,o||(document.body.addEventListener("click",i),document.body.addEventListener("touchstop",i))}),{teardown:function(){o=!0,n&&(document.body.removeEventListener("click",i),document.body.removeEventListener("touchstop",i))}}}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}}o("pop","transitions",i),o("fade","transitions",l);var s,p,f,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:["click"],t:70,f:{r:[],s:"[false,false]"}}],n:51,l:1},{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?1:0)"}},"px"],t:13}],n:50,r:"position.tailTop"},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom","position.vert"],s:"_0+(_1?1:0)"}},"px"],t:13}],n:50,r:"position.tailBottom"},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft","position.vert"],s:"_0+(_1?0:1)"}},"px"],t:13}],n:50,r:"position.tailLeft"},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight","position.vert"],s:"_0+(_1?0:1)"}},"px"],t:13}],n:50,r:"position.tailRight"}]}," ",{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,r:"position.tailTop"},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom"],s:"_0-2"}},"px"],t:13}],n:50,r:"position.tailBottom"},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft"],s:"_0-2"}},"px"],t:13}],n:50,r:"position.tailLeft"},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight"],s:"_0-2"}},"px"],t:13}],n:50,r:"position.tailRight"}]}],n:50,r:"~/tail"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1}],f:[{t:16,r:"content"}]}]}],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)]},"[false,false]":function(){return[!1,!1]},"_0+(_1?1:0)":function(e,t){return e+(t?1:0)},"_0+(_1?0:1)":function(e,t){return e+(t?0:1)},"_0-2":function(e){return e-2},"[{delay:200}]":function(){return[{delay:200}]},"[_0.done(),false]":function(e){return[e.done(),!1]},"[_0?_1.done():false,false]":function(e,t){return[!!e&&t.done(),!1]},true:function(){return!0}},p:{modal:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop 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:["."],s:"[_0.done(),false]"}}],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"},{n:["click"],t:70,f:{r:[".clickClose","."],s:"[_0?_1.done():false,false]"}},{t:8,r:".attrs",c:{r:".context"}}],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(e){var t=e||this.source,n=this.get("popped");if(t&&n){var o=this.find("div");if(t&&o&&o.offsetParent){var i=o.offsetParent,r=i.getBoundingClientRect(),a=o.getBoundingClientRect(),l=t.getBoundingClientRect(),c=this.get("where")||"below",s=this.get("align")||"middle",p=this.get("tail"),f="above"===c||"below"===c,d=this.get("fit"),u=this.get("gap"),b="above"===c||"below"===c?0:"left"===c?-a.width-u:l.width+u,m="left"===c||"right"===c?-l.height:"above"===c?-l.height-a.height-u:u;"middle"===s?"below"===c||"above"===c?b-=(a.width-l.width)/2:"left"!==c&&"right"!==c||(m-=(a.height-l.height)/2):"end"===s&&("below"===c||"above"===c?b+=l.width-a.width:"left"!==c&&"right"!==c||(m+=l.height-a.height));var h={popTop:l.bottom-r.top+m,popLeft:l.left-r.left+b,tail:p,vert:"above"===c||"below"===c};if(i.scrollTop&&(h.popTop+=i.scrollTop),i.scrollLeft&&(h.popLeft+=i.scrollLeft),p){"above"===c?h.tailBottom=-10:"below"===c?h.tailTop=-10:"left"===c?h.tailRight=-10:"right"===c&&(h.tailLeft=-10);var g=this.tailSource?this.tailSource.getBoundingClientRect():l;"start"===s?f?h.tailLeft=Math.floor(g.width/2)-10:h.tailTop=Math.floor(g.height/2)-10:"end"===s?f?h.tailRight=Math.floor(g.width/2)-10:h.tailBottom=Math.floor(g.height/2)-10:"middle"===s&&(f?h.tailLeft=Math.floor(g.width/2)-10:h.tailTop=Math.floor(g.height/2)-10),g!==l?f?(h.tailLeft&&(h.tailLeft+=g.left-l.left),h.tailRight&&(h.tailRight+=l.right-g.right)):(h.tailTop&&(h.tailTop+=g.top-l.top),h.tailBottom&&(h.tailBottom+=l.bottom-g.bottom)):"middle"===s&&(f?(h.tailLeft&&(h.tailLeft+=g.left-(h.popLeft+r.left)),h.tailRight&&(h.tailRight+=h.popLeft+r.left+a.width-g.right)):(h.tailTop&&(h.tailTop+=g.top-(h.popTop+r.top)),h.tailBottom&&(h.tailBottom+=h.popTop+r.top+a.height-g.bottom)))}if(d){var v=i;if(this.get("offsets"))for(var y=this.get("offsets");y--;)v=v.offsetParent;var x=i.scrollWidth,w=i.scrollHeight;if(h.popLeft+a.width>x){var _=h.popLeft-(x-a.width);h.popLeft-=_,f&&h.tailLeft&&(h.tailLeft+=_),f&&h.tailRight&&(h.tailRight-=_),p&&!f&&(h.tail=!1)}if(h.popLeft<0){var k=-1*h.popLeft;h.popLeft+=k,f&&h.tailLeft&&(h.tailLeft-=k),f&&h.tailRight&&(h.tailRight+=k),p&&!f&&(h.tail=!1)}if(h.popTop+a.height>w){var T=h.popTop-(w-a.height);h.popTop-=T,!f&&h.tailTop&&(h.tailTop+=T),!f&&h.tailBottom&&(h.tailBottom-=T),p&&f&&(h.tail=!1)}if(h.popTop<0){var O=-1*h.popTop;h.popTop+=O,!f&&h.tailTop&&(h.tailTop-=O),!f&&h.tailBottom&&(h.tailBottom+=O),p&&f&&(h.tail=!1)}}this.set("position",h)}else this.set("position",null)}},t.prototype.show=function(e){this.source=e,this.set("popped",!0)},t.prototype.hide=function(){this.set("popped",!1)},t}(t);t.extendWith(u,{attributes:["popped","tail","where","align","top","left","fit","clickClose","noClickout","gap","offsets"],use:[r(),(void 0===f&&(f={}),function(e){e.instance.events[f.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: 11;\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: 10;\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=this;setTimeout(function(){t.get("popped")===e&&t.set("_popped",e)},100)},_popped:{handler:function(e){var t=this;if(e){var n=this.get("@style.raui.pop.mobile");n&&window.matchMedia("(max-width: "+n+")").matches?(p||(p=new b({target:document.body,append:!0})).observe("contents",function(e){s=(e||[]).length>0}),p.unshift("contents",{content:this.partials.content,context:this.getContext().getParent(!0),attrs:this.partials["extra-attributes"]||[],clickClose:this.get("clickClose"),noClickout:this.get("noClickout"),done:function(){t.set("popped",!1)}})):this.set("__popped",!0)}else s?p.shift("contents"):this.set("__popped",!1)},defer:!0},__popped:{handler:function(e){if(e){var t=this.find("div"),n=t,o=n.offsetHeight+n.offsetTop,i=n.offsetWidth+n.offsetLeft,r=n.offsetParent;if(!this.overflows)for(var a=this.overflows={e:[],v:[]};t&&t.style;){if(t===r){if(t.offsetWidth>=i&&t.offsetHeight>=o)break;i+=t.offsetLeft,o+=t.offsetTop,r=t.offsetParent}var l=getComputedStyle(t);if("auto"===l.overflow)break;"hidden"===l.overflow&&(a.e.push(t),a.v.push(t.style.overflow),t.style.overflow="visible"),t=t.parentNode}this.position(),this.transition("pop",n,{intro:!0,dir:this.get("where")||"below"})}else this.source=null,this.tailSource=null},defer:!0},"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,o,i,r,a,l,c,s,p,f,d=this.getContext(e);function u(){var d=b().split(/\s+/).filter(function(e){return!!e});(t=!!~d.indexOf("field"))||(d.push("field"),t=!0),(n=e.querySelector("input[type=checkbox]"))&&!~d.indexOf("check")&&d.push("check"),(o=e.querySelector("input[type=radio]"))&&!~d.indexOf("radio")&&d.push("radio");var u=n||o;u&&u.checked&&!~d.indexOf("checked")&&d.push("checked"),u&&u.disabled&&!~d.indexOf("disabled")&&d.push("disabled"),!u&&p?(p.cancel(),p=0,f&&(f.disconnect(),f=0),delete u._form_callback):u&&(u._form_callback=function(t,n){if(void 0===n&&(n=!0),n&&"radio"===u.type&&u.name){var o=[];o.push.apply(o,document.querySelectorAll("input[type=radio][name="+u.name+"]")),(o=o.filter(function(e){return e!==u})).forEach(function(e){return e._form_callback&&e._form_callback(t,!1)})}var i=u.checked;i&&!~e.className.indexOf("checked")?e.className+=" checked":!i&&~e.className.indexOf("checked")&&(e.className=e.className.replace(/\bchecked\b/g,"").replace(/ +/g," ").trim())},MutationObserver&&(f=new MutationObserver(function(){var t;(t=u.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(u,{attributes:!0}),p=this.getContext(u).listen("change",u._form_callback)),(i=!!e.querySelector("textarea"))&&!~d.indexOf("textarea")&&d.push("textarea"),(r=!!e.querySelector("select"))&&!~d.indexOf("select")&&d.push("select"),(a=!!e.querySelector("input[type=file]"))&&!~d.indexOf("file")&&d.push("file"),(l=!!(l=e.querySelector("button"))&&l.parentNode===e)&&!~d.indexOf("button")&&d.push("button"),(c=!!e.querySelector("div"))&&!~d.indexOf("plain")&&d.push("plain"),(s=!(n||o||a||!e.querySelector("input")))&&!~d.indexOf("input")&&d.push("input"),e.className=d.join(" ")}function b(){var p=e.className;return t||(p=p.replace(/\bfield\b/g,"").trim()),n||(p=p.replace(/\bcheck(ed)?\b/g,"").trim()),o||(p=p.replace(/\bradio\b/g,"").trim()),i||(p=p.replace(/\btextarea\b/g,"").trim()),r||(p=p.replace(/\bselect\b/g,"").trim()),a||(p=p.replace(/\bfile\b/g,"").trim()),l||(p=p.replace(/\bbutton\b/g,"").trim()),c||(p=p.replace(/\bplain\b/g,"").trim()),s||(p=p.replace(/\binput\b/g,"").trim()),p=p.replace(/ +/g," ")}var v=d.listen("focusin",h),y=d.listen("focusout",g);return u.call(this),{update:m,invalidate:u.bind(this),teardown:function(){var t=b();t=t.replace(/\bfocus\b/g,"").trim(),v.cancel(),y.cancel(),p&&p.cancel(),e.className=t}}}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()]}),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")),o=e("raui.form.boxy");return"\n label.field {\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 {\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 select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\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 {\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 {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -3px;\n top: 23px;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 40px;\n height: 40px;\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 {\n top: 3px;\n left: -3px;\n }\n\n label.field.check input:checked {\n background-color: "+(t.fga||"#07e")+';\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 3px 11px 3px 1px;\n border: solid 2px; /* Safari */\n border-color: '+(t.fg||"#222")+';\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: "";\n display: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: '+(t.fga||"#07e")+";\n background-color: "+(t.fga||"#07e")+";\n }\n label.field.check.focus:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.check.checked:after {\n border-color: "+(t.bg||"#fff")+";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: "+(t.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: "+(t.bc||"#ccc")+";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: "+(t.bc||"#ccc")+";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n 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;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 41px;\n height: 40px;\n background-color: "+(t.bc||"#ccc")+';\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 24px) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 2px 10px 2px 0;\n border: solid 2px; /* Safari */\n border-color: '+(t.fg||"#222")+';\n border-radius: 50%;\n width: 20px;\n height: 20px;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: "";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 10px;\n height: 10px;\n background-color: '+(t.fga||"#07e")+";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio.checked:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio.focus:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: "+(t.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: "+(t.bc||"#ccc")+";\n }\n\n label.field.radio.disabled:after {\n background-color: "+(t.bc||"#ccc")+";\n }\n\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: 19px;\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 }\n\n /* inline fields (no labels) */\n label.field.inline {\n 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=(e.template.m||[]).slice(),o=e.template.f||[],i=n.find(function(e){return"value"===e.n}),r=n.find(function(e){return"type"===e.n}),a=n.find(function(e){return"tip"===e.n});if(a&&n.splice(n.indexOf(a),1),r&&"function"==typeof x.types[r.f])t.push.apply(t,x.types[r.f](n,o,e));else if(i){var l={t:7,e:"input",m:[i]};if(y(o,"option")&&(l.e="select",l.f=o),r&&(l.m.push(r),"checkbox"===r.f||"radio"===r.f)){var c=n.find(function(e){return"target"===e.n});c?l.m.push(Object.assign({},c,{n:"name"})):l.m.splice(l.m.indexOf(i),1,Object.assign({},i,{n:"checked"}))}l.m=l.m.concat(n.filter(function(e){return 73===e.t||"placeholder"===e.n})),t.push(l);var s=o.filter(function(e){return"button"===e.e||y(e.f,"button")});s.length&&(t.push.apply(t,s),t=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:t}])}else{var p=o.filter(function(e){return e.e});p.find(function(e){return"button"===e.e})&&p.length>1?t=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:o}]:t.push.apply(t,o)}var f=n.find(function(e){return"label"===e.n});a&&t.unshift({t:7,e:"span",m:[{t:13,n:"class",f:"field-tip"+(f?"":" field-solo-tip"),g:1},{t:13,n:"title",f:a.f},{t:70,n:["click"],f:{r:[],s:"[false]"}}],f:"?"}),f?t.unshift(f.f):t.unshift(" ");var d={t:7,e:"label",m:[{t:71,n:"field"}].concat(n.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})),f:t};n.find(function(e){return"inline"===e.n})&&d.m.push({t:13,n:"class",f:"inline"}),e.setTemplate([d])});function w(e){return"function"==typeof e.focus&&e.focus(),{teardown:m}}x.types={},o("field","decorators",v),o("field","partials",x),o("autofocus","decorators",w);var _={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:["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:"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:"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},{n:"class-rac-selected",t:13,f:[{t:2,x:{r:["rac.value","."],s:"_0===_1"}}]},{n:"class-rac-hover",t:13,f:[{t:2,x:{r:["rac.selected","@index"],s:"_0===_1"}}]},{n:["click"],t:70,f:{r:["@context","."],s:'[(_0).set("rac.value",_1)]'}},{n:["mouseover"],t:70,f:{r:["@context","@index"],s:'[(_0).set("rac.selected",_1)]'}}],f:[{t:2,x:{r:["rac","."],s:"_0._member(_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.input(_1)]":function(e,t){return[e.input(t)]},"[_0.key(_1)]":function(e,t){return[e.key(t)]},'[(_0).raise("pop",{},_1)]':function(e,t){return[e.raise("pop",{},t)]},"_0===_1":function(e,t){return e===t},'[(_0).set("rac.value",_1)]':function(e,t){return[e.set("rac.value",t)]},'[(_0).set("rac.selected",_1)]':function(e,t){return[e.set("rac.selected",t)]},"_0._member(_1)":function(e,t){return e._member(t)}}};function k(e,t){return t.reduce(function(e,t){return e?e[t]:e},e)}var T=t.macro(function(e){var n,o;function i(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 o=n(t);"object"==typeof o&&"function"==typeof o.then?o.then(function(t){return e.set("rac.list",t)}):e.set("rac.list",o)}else if(Array.isArray(n)){var i,r=e.get("rac._member");try{i=new RegExp(t||"","i")}catch(e){i=new RegExp((t||"").replace(/([\{\(\[\]\)\}\?\*\^\$])/g,"\\$1"))}e.set("rac.list",n.filter(function(e){return i.test(r(e))}))}else e.set("rac.list",[])}function r(n,r,a){var l=e.get("rac.member");if(e.get("rac.__member")!==l||void 0===e.get("rac._member")){if("string"==typeof l){var s=t.splitKeypath(l);l=function(e){return null==e?"(none)":k(e,s)}}else Array.isArray(l)?l=function(e){return null==e?"(none)":k(e,e)}:l||(l=function(e){return null==e?"(none)":""+e});e.set("rac._member",l),e.set("rac.__member",e.get("rac.member")),e.set("rac.display",l(e.get("rac.value")))}l=e.get("rac.items"),e.get("rac.__items")===l&&void 0!==e.get("rac._items")||(Array.isArray(l)?e.set("rac._items",l):"function"==typeof l?e.set("rac._items",l):"object"==typeof l&&"function"==typeof l.then?l.then(function(t){e.set("rac._items",t),i()}):e.set("rac._items",[]),e.set("rac.__items",e.get("rac.items"))),o&&"rac.display"===a&&e.get("rac.limit")&&!o.contains(document.activeElement)&&c(),i()}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.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 o=e.get("rac.selected"),i=e.get("rac.list");38===n?o<=0||null==o?e.set("rac.selected",Array.isArray(i)?i.length-1:0):e.set("rac.selected",o-1):Array.isArray(i)?e.set("rac.selected",o<i.length?o+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")])}else 9===n&&(e.set("rac.popped",!1),e.get("rac.updateDisplay")())}),e.set("rac.input",function(t){n&&clearTimeout(n),n=setTimeout(function(){n=null,i(t.target.value),e.get("rac.pop").show(e.find("input"))},500),e.set("rac.display",t.target.value)}),e.setTemplate(_);var a={init:!1,defer:!0},l=[e.observe("rac.display",r,a),e.observe("rac.member",r,a),e.observe("rac.items",r,a),e.observe("rac.list",function(t){Array.isArray(t)?e.set("rac.selected",t.indexOf(e.get("rac.value"))):e.set("rac.selected",-1)},a),e.observe("rac.value",function(t){c(),e.set("rac.popped",!1),e.set("rac.tempValue",t)})];function c(){var t=e.get("rac._member");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.display&&e.link(t.display,"rac.display"),t.value&&e.link(t.value,"rac.value"),t.selected&&e.link(t.selected,"rac.selected"),"member"in t&&e.set("rac.member",t.member),"offsets"in t?(e.set("rac.offsets",t.offsets),e.set("rac.fit",!0)):e.set("rac.fit",!1),e.set("rac.limit",t["limit-set"]),e.get("rac.limit")&&e.get("input"))&&(e.get("input")!==document.activeElement&&c());r()}return e.set("rac.updateDisplay",function(t){setTimeout(function(){o&&e.get("rac.limit")&&!o.contains(document.activeElement)&&c()},140)}),s(e.attributes),{teardown:function(){e.unlink("rac.items"),e.unlink("rac.display"),e.unlink("rac.value"),e.unlink("rac.selected"),l.forEach(function(e){return e.cancel()})},update:s,render:function(){o=e.find("span")}}},{attributes:["items","selected","display","value","member","limit-set","offsets"],css:function(e){return[function(e){var t=Object.assign({},e("raui.primary"),e("raui.autocomplete.primary"));return".rautocomplete {\n position: relative;\n display: inline-block;\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: 10em;\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-invalid {\n cursor: not-allowed;\n }\n \n input.rac-modal {\n width: 100%;\n box-sizing: border-box;\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"]=T,n.components["rac-pop"]=u,n.decorators.autocompletefocus=w}}e.Autocomplete=T,e.FieldType=function(e){return void 0===e&&(e={}),function(t,n,o){return[{t:7,e:e.name||"autocomplete",m:t,f:n}]}},e.plugin=O,e.default=O,Object.defineProperty(e,"__esModule",{value:!0})});

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

var template = {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-wrapper",g:1},{t:8,r:"extra-attributes"},{n:"class-rcard-margin",t:13,f:[{t:2,r:"_card.margin"}]},{n:"class-rcard-wrapper-popout",t:13,f:[{t:2,r:"_card.popout"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard",g:1},{n:"class-rcard-no-pad",t:13,f:[{t:2,r:"_card.noPad"}]},{n:"class-rcard-section",t:13,f:[{t:2,r:"_card.section"}]},{n:"class-rcard-flat",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:"\"flat\" in _0?_1:_2"}}]},{n:"class-rcard-deep",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:"\"flat\" in _0?!_1:!_2"}}]},{n:"class-rcard-popout",t:13,f:[{t:2,r:"_card.popout"}]},{n:"class-rcard-collapsed",t:13,f:[{t:2,x:{r:["_card.expandable","_card.expanded"],s:"_0&&_1===false"}}]},{n:"class-rcard-expandable",t:13,f:[{t:2,r:"_card.expandable"}]},{n:"class-rcard-arrow",t:13,f:[{t:2,r:"_card.arrow"}]},{n:"class-rcard-no-fill",t:13,f:[{t:2,r:"_card.noFill"}]},{n:"class-rcard-with-header",t:13,f:[{t:2,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:"_0||_1||_2||_3||_4||(_5&&typeof _5===\"string\"||(_6&&_7))"}}]}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-header",g:1},{t:4,f:[{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:"[(_0).set(\"_card.expanded\",_1===false?true:false)]"}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-expand",g:1},{n:"class-rcard-expanded",t:13,f:[{t:2,x:{r:["_card.expanded"],s:"_0!==false"}}]}],f:[{t:7,e:"svg",f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:50,x:{r:["_card.arrow","_card.expandable"],s:"_0&&_1"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-pad",g:1}],f:[" "]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{n:"class-rcard-avatar-round",t:13,f:[{t:2,r:"_card.round"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar-inner",g:1},{n:"style-background-image",f:["url(",{t:2,r:"_card.avatar"},")"],t:13}]}]}],n:50,x:{r:["_card.avatar"],s:"_0&&typeof _0===\"string\""}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{t:4,f:[{t:8,r:"_card.avatarA"}],n:50,r:"_card.avatarA"}],f:[{t:8,r:"_card.avatarP"}]}],n:50,r:"_card.avatarP",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-titles",g:1},{n:"class-rcard-with-sub",t:13,f:[{t:2,x:{r:["_card.subtitle","_card.subtitleP"],s:"_0||_1"}}]},{n:"class-rcard-with-tabs",t:13,f:[{t:2,r:"_card.tabs"}]},{t:4,f:[{n:"class-rcard-shrink",t:13},{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:"[(_0).set(\"_card.expanded\",_1===false?true:false)]"}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&!_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1}],f:[{t:2,r:"_card.title"}]}],n:50,r:"_card.title"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1},{t:4,f:[{t:8,r:"_card.titleA"}],n:50,r:"_card.titleA"}],f:[{t:8,r:"_card.titleP"}]}],n:51,l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1}],f:[{t:2,r:"_card.subtitle"}]}],n:50,r:"_card.subtitle"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1},{t:4,f:[{t:8,r:"_card.subtitleA"}],n:50,r:"_card.subtitleA"}],f:[{t:8,r:"_card.subtitleP"}]}],n:50,r:"_card.subtitleP",l:1}]}," ",{t:4,f:[{t:8,r:"tabs"}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-right",g:1},{n:["click"],t:70,f:{r:[],s:"[false,false]"}}],f:[{t:8,r:"_card.titleRightP"}]}],n:50,r:"_card.titleRightP"}]}],n:50,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:"_0||_1||_2||_3||_4||(_5&&typeof _5===\"string\"||(_6&&_7))"}}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:7,e:"img",m:[{n:"src",f:[{t:2,r:"_card.image"}],t:13},{n:"alt",f:[{t:2,r:"_card.alt"}],t:13}]}]}],n:50,r:"_card.image"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"},{t:4,f:[{t:8,r:"_card.imageA"}],n:50,r:"_card.imageA"}],f:[{t:8,r:"_card.imageP"}]}],n:50,r:"_card.imageP",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-content",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.contentP"}]}],n:50,r:"_card.contentP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}," ",{t:8,r:"tabs"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&!_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-footer",g:1},{t:4,f:[{t:8,r:"_card.footerA"}],n:50,r:"_card.footerA"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.footerP"}]}],n:50,r:"_card.footerP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-actions",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:4,f:[{t:4,f:[{t:8,r:".P"}],n:50,r:".P"},{t:4,f:[{t:7,e:"button",m:[{t:8,x:{r:[".attrs"],s:"_0||[]"}}],f:[{t:8,r:".content"}]}],n:51,l:1}],n:52,r:"_card.actions"}]}],n:50,r:"_card.actions.length"}],n:50,x:{r:["_card.expandable","_card.expanded"],s:"!_0||_1!==false"}}]}]}],e:{"\"flat\" in _0?_1:_2":function (_0,_1,_2){return("flat" in _0?_1:_2);},"\"flat\" in _0?!_1:!_2":function (_0,_1,_2){return("flat" in _0?!_1:!_2);},"_0&&_1===false":function (_0,_1){return(_0&&_1===false);},"_0||_1||_2||_3||_4||(_5&&typeof _5===\"string\"||(_6&&_7))":function (_0,_1,_2,_3,_4,_5,_6,_7){return(_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7)));},"[(_0).set(\"_card.expanded\",_1===false?true:false)]":function (_0,_1){return([(_0).set("_card.expanded",_1===false?true:false)]);},"_0&&_1":function (_0,_1){return(_0&&_1);},"_0!==false":function (_0){return(_0!==false);},"_0&&typeof _0===\"string\"":function (_0){return(_0&&typeof _0==="string");},"_0||_1":function (_0,_1){return(_0||_1);},"_0&&!_1":function (_0,_1){return(_0&&!_1);},"[false,false]":function (){return([false,false]);},"_0||[]":function (_0){return(_0||[]);},"!_0||_1!==false":function (_0,_1){return(!_0||_1!==false);},"_0===_1+_2||(!_0&&!_1&&!_2)":function (_0,_1,_2){return(_0===_1+_2||(!_0&&!_1&&!_2));},"(_0||0)*100":function (_0){return((_0||0)*100);},"_0===_1||(!_0&&!_1)":function (_0,_1){return(_0===_1||(!_0&&!_1));},"[(_2).set(\"_card.selected\",_0+_1),(_2).set(\"_card.expanded\",true),false]":function (_0,_1,_2){return([(_2).set("_card.selected",_0+_1),(_2).set("_card.expanded",true),false]);},"[(_1).set(\"_card.selected\",_0),(_1).set(\"_card.expanded\",true),false]":function (_0,_1){return([(_1).set("_card.selected",_0),(_1).set("_card.expanded",true),false]);}},p:{"tab-body":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]}],f:[{t:8,r:".content"}]}],"tab-bodies":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-contents",g:1},{n:"style-left",f:["-",{t:2,x:{r:["_card.selected"],s:"(_0||0)*100"}},"%"],t:13}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]}],f:[{t:8,r:".content"}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.body"}],n:50,r:"_card.tablist"}]}]}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]},{n:["click"],t:70,f:{r:["_card.tabs.length","@index","@context"],s:"[(_2).set(\"_card.selected\",_0+_1),(_2).set(\"_card.expanded\",true),false]"}}],f:[{t:8,r:".title"}]}],tabs:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]},{n:["click"],t:70,f:{r:["@index","@context"],s:"[(_1).set(\"_card.selected\",_0),(_1).set(\"_card.expanded\",true),false]"}}],f:[{t:8,r:".title"}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.tab"}],n:50,r:"_card.tablist"}]}]}]}};
var template = {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-wrapper",g:1},{t:8,r:"extra-attributes"},{n:"class-rcard-margin",t:13,f:[{t:2,r:"_card.margin"}]},{n:"class-rcard-wrapper-popout",t:13,f:[{t:2,r:"_card.popout"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard",g:1},{n:"class-rcard-no-pad",t:13,f:[{t:2,r:"_card.noPad"}]},{n:"class-rcard-section",t:13,f:[{t:2,r:"_card.section"}]},{n:"class-rcard-flat",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:"\"flat\" in _0?_1:_2"}}]},{n:"class-rcard-deep",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:"\"flat\" in _0?!_1:!_2"}}]},{n:"class-rcard-popout",t:13,f:[{t:2,r:"_card.popout"}]},{n:"class-rcard-collapsed",t:13,f:[{t:2,x:{r:["_card.expandable","_card.expanded"],s:"_0&&_1===false"}}]},{n:"class-rcard-expandable",t:13,f:[{t:2,r:"_card.expandable"}]},{n:"class-rcard-arrow",t:13,f:[{t:2,r:"_card.arrow"}]},{n:"class-rcard-no-fill",t:13,f:[{t:2,r:"_card.noFill"}]},{n:"class-rcard-with-header",t:13,f:[{t:2,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:"_0||_1||_2||_3||_4||(_5&&typeof _5===\"string\"||(_6&&_7))"}}]}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-header",g:1},{t:4,f:[{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:"[(_0).set(\"_card.expanded\",_1===false?true:false)]"}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-expand",g:1},{n:"class-rcard-expanded",t:13,f:[{t:2,x:{r:["_card.expanded"],s:"_0!==false"}}]}],f:[{t:7,e:"svg",f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:50,x:{r:["_card.arrow","_card.expandable"],s:"_0&&_1"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-pad",g:1}],f:[" "]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{n:"class-rcard-avatar-round",t:13,f:[{t:2,r:"_card.round"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar-inner",g:1},{n:"style-background-image",f:["url(",{t:2,r:"_card.avatar"},")"],t:13}]}]}],n:50,x:{r:["_card.avatar"],s:"_0&&typeof _0===\"string\""}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{t:4,f:[{t:8,r:"_card.avatarA"}],n:50,r:"_card.avatarA"}],f:[{t:8,r:"_card.avatarP"}]}],n:50,r:"_card.avatarP",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-titles",g:1},{n:"class-rcard-with-sub",t:13,f:[{t:2,x:{r:["_card.subtitle","_card.subtitleP"],s:"_0||_1"}}]},{n:"class-rcard-with-tabs",t:13,f:[{t:2,r:"_card.tabs"}]},{t:4,f:[{n:"class-rcard-shrink",t:13},{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:"[(_0).set(\"_card.expanded\",_1===false?true:false)]"}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&!_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1}],f:[{t:2,r:"_card.title"}]}],n:50,r:"_card.title"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1},{t:4,f:[{t:8,r:"_card.titleA"}],n:50,r:"_card.titleA"}],f:[{t:8,r:"_card.titleP"}]}],n:51,l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1}],f:[{t:2,r:"_card.subtitle"}]}],n:50,r:"_card.subtitle"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1},{t:4,f:[{t:8,r:"_card.subtitleA"}],n:50,r:"_card.subtitleA"}],f:[{t:8,r:"_card.subtitleP"}]}],n:50,r:"_card.subtitleP",l:1}]}," ",{t:4,f:[{t:8,r:"tabs"}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-right",g:1},{n:["click"],t:70,f:{r:[],s:"[false,false]"}}],f:[{t:8,r:"_card.titleRightP"}]}],n:50,r:"_card.titleRightP"}]}],n:50,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:"_0||_1||_2||_3||_4||(_5&&typeof _5===\"string\"||(_6&&_7))"}}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:7,e:"img",m:[{n:"src",f:[{t:2,r:"_card.image"}],t:13},{n:"alt",f:[{t:2,r:"_card.alt"}],t:13}]}]}],n:50,r:"_card.image"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"},{t:4,f:[{t:8,r:"_card.imageA"}],n:50,r:"_card.imageA"}],f:[{t:8,r:"_card.imageP"}]}],n:50,r:"_card.imageP",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-content",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.contentP"}]}],n:50,r:"_card.contentP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}," ",{t:8,r:"tabs"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&!_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-footer",g:1},{t:4,f:[{t:8,r:"_card.footerA"}],n:50,r:"_card.footerA"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.footerP"}]}],n:50,r:"_card.footerP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-actions",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:4,f:[{t:4,f:[{t:8,r:".P"}],n:50,r:".P"},{t:4,f:[{t:7,e:"button",m:[{t:8,x:{r:[".attrs"],s:"_0||[]"}}],f:[{t:8,r:".content"}]}],n:51,l:1}],n:52,r:"_card.actions"}]}],n:50,r:"_card.actions.length"}],n:50,x:{r:["_card.expandable","_card.expanded"],s:"!_0||_1!==false"}}]}]}],e:{"\"flat\" in _0?_1:_2":function (_0,_1,_2){return("flat" in _0?_1:_2);},"\"flat\" in _0?!_1:!_2":function (_0,_1,_2){return("flat" in _0?!_1:!_2);},"_0&&_1===false":function (_0,_1){return(_0&&_1===false);},"_0||_1||_2||_3||_4||(_5&&typeof _5===\"string\"||(_6&&_7))":function (_0,_1,_2,_3,_4,_5,_6,_7){return(_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7)));},"[(_0).set(\"_card.expanded\",_1===false?true:false)]":function (_0,_1){return([(_0).set("_card.expanded",_1===false?true:false)]);},"_0&&_1":function (_0,_1){return(_0&&_1);},"_0!==false":function (_0){return(_0!==false);},"_0&&typeof _0===\"string\"":function (_0){return(_0&&typeof _0==="string");},"_0||_1":function (_0,_1){return(_0||_1);},"_0&&!_1":function (_0,_1){return(_0&&!_1);},"[false,false]":function (){return([false,false]);},"_0||[]":function (_0){return(_0||[]);},"!_0||_1!==false":function (_0,_1){return(!_0||_1!==false);},"_0===_1+_2||(!_0&&!_1&&!_2)":function (_0,_1,_2){return(_0===_1+_2||(!_0&&!_1&&!_2));},"(_0||0)*100":function (_0){return((_0||0)*100);},"_0===_1||(!_0&&!_1)":function (_0,_1){return(_0===_1||(!_0&&!_1));},"[(_2).set(\"_card.selected\",_0+_1),(_2).set(\"_card.expanded\",true),false]":function (_0,_1,_2){return([(_2).set("_card.selected",_0+_1),(_2).set("_card.expanded",true),false]);},"[(_1).set(\"_card.selected\",_0),(_1).set(\"_card.expanded\",true),false]":function (_0,_1){return([(_1).set("_card.selected",_0),(_1).set("_card.expanded",true),false]);}},p:{"tab-body":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]}],f:[{t:8,r:".content"}]}],"tab-bodies":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-contents",g:1},{n:"style-left",f:["-",{t:2,x:{r:["_card.selected"],s:"(_0||0)*100"}},"%"],t:13}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]}],f:[{t:8,r:".content",c:{r:"^^/"}}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.body"}],n:50,r:"_card.tablist"}]}]}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]},{n:["click"],t:70,f:{r:["_card.tabs.length","@index","@context"],s:"[(_2).set(\"_card.selected\",_0+_1),(_2).set(\"_card.expanded\",true),false]"}}],f:[{t:8,r:".title"}]}],tabs:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]},{n:["click"],t:70,f:{r:["@index","@context"],s:"[(_1).set(\"_card.selected\",_0),(_1).set(\"_card.expanded\",true),false]"}}],f:[{t:8,r:".title",c:{r:"^^/"}}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.tab"}],n:50,r:"_card.tablist"}]}]}]}};

@@ -69,0 +69,0 @@ var Card = Ractive$1.macro(

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

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],n):n(t.RMCard={},t.Ractive)}(this,function(t,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var r="undefined"!=typeof window?window:null;function a(t,n,a){if(r&&r.Ractive&&"object"==typeof r.Ractive[n]){var e=document.currentScript;if(e||(e=(e=document.querySelectorAll("script"))[e.length-1]),e){var i=e.getAttribute("data-alias");i&&(i=(i=i.split("&")).reduce(function(t,n){var r=n.split("="),a=r[0],e=r[1];return t[a]=e,t},{})),Ractive[n][i&&i[t]||t]=a}}}function e(t,n){var r=t.processParams(n,{duration:200,easing:"easeInOut"});return new Promise(function(n){requestAnimationFrame(function(){t.setStyle("overflow","hidden");var a="x"===r.axis?"width":"height";if(t.isIntro||r.intro){var e=t.getStyle(a);t.setStyle(a,0),t.setStyle("opacity",0),n(t.animateStyle(a,e,r).then(function(){return t.animateStyle("opacity",1,r)}).then(function(){t.setStyle(a,""),t.setStyle("overflow","")}))}else t.setStyle(a,t.getStyle(a)),t.setStyle("opacity",1),n(t.animateStyle("opacity",0,r).then(function(){return t.animateStyle(a,0,r)}))})})}a("expand","transitions",e);var i={v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-wrapper",g:1},{t:8,r:"extra-attributes"},{n:"class-rcard-margin",t:13,f:[{t:2,r:"_card.margin"}]},{n:"class-rcard-wrapper-popout",t:13,f:[{t:2,r:"_card.popout"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard",g:1},{n:"class-rcard-no-pad",t:13,f:[{t:2,r:"_card.noPad"}]},{n:"class-rcard-section",t:13,f:[{t:2,r:"_card.section"}]},{n:"class-rcard-flat",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:'"flat" in _0?_1:_2'}}]},{n:"class-rcard-deep",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:'"flat" in _0?!_1:!_2'}}]},{n:"class-rcard-popout",t:13,f:[{t:2,r:"_card.popout"}]},{n:"class-rcard-collapsed",t:13,f:[{t:2,x:{r:["_card.expandable","_card.expanded"],s:"_0&&_1===false"}}]},{n:"class-rcard-expandable",t:13,f:[{t:2,r:"_card.expandable"}]},{n:"class-rcard-arrow",t:13,f:[{t:2,r:"_card.arrow"}]},{n:"class-rcard-no-fill",t:13,f:[{t:2,r:"_card.noFill"}]},{n:"class-rcard-with-header",t:13,f:[{t:2,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:'_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7))'}}]}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-header",g:1},{t:4,f:[{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:'[(_0).set("_card.expanded",_1===false?true:false)]'}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-expand",g:1},{n:"class-rcard-expanded",t:13,f:[{t:2,x:{r:["_card.expanded"],s:"_0!==false"}}]}],f:[{t:7,e:"svg",f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:50,x:{r:["_card.arrow","_card.expandable"],s:"_0&&_1"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-pad",g:1}],f:[" "]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{n:"class-rcard-avatar-round",t:13,f:[{t:2,r:"_card.round"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar-inner",g:1},{n:"style-background-image",f:["url(",{t:2,r:"_card.avatar"},")"],t:13}]}]}],n:50,x:{r:["_card.avatar"],s:'_0&&typeof _0==="string"'}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{t:4,f:[{t:8,r:"_card.avatarA"}],n:50,r:"_card.avatarA"}],f:[{t:8,r:"_card.avatarP"}]}],n:50,r:"_card.avatarP",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-titles",g:1},{n:"class-rcard-with-sub",t:13,f:[{t:2,x:{r:["_card.subtitle","_card.subtitleP"],s:"_0||_1"}}]},{n:"class-rcard-with-tabs",t:13,f:[{t:2,r:"_card.tabs"}]},{t:4,f:[{n:"class-rcard-shrink",t:13},{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:'[(_0).set("_card.expanded",_1===false?true:false)]'}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&!_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1}],f:[{t:2,r:"_card.title"}]}],n:50,r:"_card.title"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1},{t:4,f:[{t:8,r:"_card.titleA"}],n:50,r:"_card.titleA"}],f:[{t:8,r:"_card.titleP"}]}],n:51,l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1}],f:[{t:2,r:"_card.subtitle"}]}],n:50,r:"_card.subtitle"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1},{t:4,f:[{t:8,r:"_card.subtitleA"}],n:50,r:"_card.subtitleA"}],f:[{t:8,r:"_card.subtitleP"}]}],n:50,r:"_card.subtitleP",l:1}]}," ",{t:4,f:[{t:8,r:"tabs"}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-right",g:1},{n:["click"],t:70,f:{r:[],s:"[false,false]"}}],f:[{t:8,r:"_card.titleRightP"}]}],n:50,r:"_card.titleRightP"}]}],n:50,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:'_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7))'}}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:7,e:"img",m:[{n:"src",f:[{t:2,r:"_card.image"}],t:13},{n:"alt",f:[{t:2,r:"_card.alt"}],t:13}]}]}],n:50,r:"_card.image"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"},{t:4,f:[{t:8,r:"_card.imageA"}],n:50,r:"_card.imageA"}],f:[{t:8,r:"_card.imageP"}]}],n:50,r:"_card.imageP",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-content",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.contentP"}]}],n:50,r:"_card.contentP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}," ",{t:8,r:"tabs"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&!_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-footer",g:1},{t:4,f:[{t:8,r:"_card.footerA"}],n:50,r:"_card.footerA"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.footerP"}]}],n:50,r:"_card.footerP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-actions",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:4,f:[{t:4,f:[{t:8,r:".P"}],n:50,r:".P"},{t:4,f:[{t:7,e:"button",m:[{t:8,x:{r:[".attrs"],s:"_0||[]"}}],f:[{t:8,r:".content"}]}],n:51,l:1}],n:52,r:"_card.actions"}]}],n:50,r:"_card.actions.length"}],n:50,x:{r:["_card.expandable","_card.expanded"],s:"!_0||_1!==false"}}]}]}],e:{'"flat" in _0?_1:_2':function(t,n,r){return"flat"in t?n:r},'"flat" in _0?!_1:!_2':function(t,n,r){return"flat"in t?!n:!r},"_0&&_1===false":function(t,n){return t&&!1===n},'_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7))':function(t,n,r,a,e,i,d,c){return t||n||r||a||e||i&&"string"==typeof i||d&&c},'[(_0).set("_card.expanded",_1===false?true:false)]':function(t,n){return[t.set("_card.expanded",!1===n)]},"_0&&_1":function(t,n){return t&&n},"_0!==false":function(t){return!1!==t},'_0&&typeof _0==="string"':function(t){return t&&"string"==typeof t},"_0||_1":function(t,n){return t||n},"_0&&!_1":function(t,n){return t&&!n},"[false,false]":function(){return[!1,!1]},"_0||[]":function(t){return t||[]},"!_0||_1!==false":function(t,n){return!t||!1!==n},"_0===_1+_2||(!_0&&!_1&&!_2)":function(t,n,r){return t===n+r||!t&&!n&&!r},"(_0||0)*100":function(t){return 100*(t||0)},"_0===_1||(!_0&&!_1)":function(t,n){return t===n||!t&&!n},'[(_2).set("_card.selected",_0+_1),(_2).set("_card.expanded",true),false]':function(t,n,r){return[r.set("_card.selected",t+n),r.set("_card.expanded",!0),!1]},'[(_1).set("_card.selected",_0),(_1).set("_card.expanded",true),false]':function(t,n){return[n.set("_card.selected",t),n.set("_card.expanded",!0),!1]}},p:{"tab-body":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]}],f:[{t:8,r:".content"}]}],"tab-bodies":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-contents",g:1},{n:"style-left",f:["-",{t:2,x:{r:["_card.selected"],s:"(_0||0)*100"}},"%"],t:13}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]}],f:[{t:8,r:".content"}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.body"}],n:50,r:"_card.tablist"}]}]}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]},{n:["click"],t:70,f:{r:["_card.tabs.length","@index","@context"],s:'[(_2).set("_card.selected",_0+_1),(_2).set("_card.expanded",true),false]'}}],f:[{t:8,r:".title"}]}],tabs:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]},{n:["click"],t:70,f:{r:["@index","@context"],s:'[(_1).set("_card.selected",_0),(_1).set("_card.expanded",true),false]'}}],f:[{t:8,r:".title"}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.tab"}],n:50,r:"_card.tablist"}]}]}]}},d=n.macro(function(t){return function(t){var n=t.get("@local");t.aliasLocal("_card"),o(t);var r=t.partials.content,a=[];t.partials.tabs=i.p.tabs,t.partials["tab-bodies"]=i.p["tab-bodies"],t.partials.tab=i.p.tab,t.partials["tab-body"]=i.p["tab-body"],r.forEach(function(t){if("title"===t.e){n.titleA=t.m,n.titleP=t.f.filter(function(t){return"right"!==t.e});var r=t.f.find(function(t){return"right"===t.e});r&&(n.titleRightP=r.f)}else if("subtitle"===t.e)n.subtitleA=t.m,n.subtitleP=t.f;else if("avatar"===t.e){var e,d;t.m&&(n.avatarA=t.m.filter(function(t){return"round"!==t.n&&"image"!==t.n&&"popout"!==t.n}),(d=t.m.find(function(t){return"round"===t.n}))&&(0===d.f?n.avatarA.push({t:13,g:1,n:"class",f:"rcard-avatar-round"}):n.avatarA.push({t:13,n:"class-rcard-avatar-round",f:d.f})),(d=t.m.find(function(t){return"image"===t.n}))&&(e=d.f)),e?(n.avatarP=[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar-inner",g:1},{n:"style-background-image",f:["url("].concat(e,[")"]),t:13}]}],1===e.length&&2===e[0].t&&(n.avatarP=[Object.assign({},e[0],{t:4,n:50,f:n.avatarP})])):t.f&&t.f.length&&(n.avatarP=t.f)}else if("footer"===t.e)n.footerA=t.m,n.footerP=t.f;else if("action"===t.e)(n.actions||(n.actions=[])).push({attrs:t.m,content:t.f});else if(4===t.t&&50===t.n&&t.f&&1===t.f.filter(function(t){return"string"!=typeof t}).length&&t.f.find(function(t){return"action"===t.e})){var c=Object.assign({},t),o=c.f.find(function(t){return"action"===t.e});c.f=[{t:7,e:"button",m:o.m,f:o.f}],(n.actions||(n.actions=[])).push({P:[c]})}else if("tabs"===t.e){var s=n.tabs=[];Array.isArray(t.f)&&t.f.forEach(function(t){if("tab"===t.e){var n={content:t.f};s.push(n),Array.isArray(n.content)||(n.content=[n.content]);var r=(t.m||[]).find(function(t){return"title"===t.n})||n.content.find(function(t){return"title"===t.e});r&&(n.title=r.f),Array.isArray(n.title)||(n.title=[n.title])}})}else if("tablist"===t.e){var f={tab:[],body:[]},l=t.m.find(function(t){return"items"===t.n});if("string"==typeof l.f){f.items=l.f,f.tab.push({t:4,n:52,r:l.f,f:[]}),f.body.push({t:4,n:52,r:l.f,f:[]});var u=t.f.find(function(t){return"title"===t.e})||t.m.find(function(t){return"title"===t.n});u&&u.f&&(f.tab[0].f=[Object.assign({},i.p.tab[0],{f:u.f})]),(u=t.f.find(function(t){return"tab"===t.e}))&&u.f&&(f.body[0].f=[Object.assign({},i.p["tab-body"][0],{f:u.f})]),n.tablist=f,n.tabs||(n.tabs=[])}}else a.push(t)}),n.tablist&&(n._observer=t.observe("_card.tabs.length "+n.tablist.items+".length _card.selected",function(){var r=n.tabs.length+t.get(n.tablist.items+".length");t.get("_card.selected")>=r&&setTimeout(function(){return t.set("_card.selected",r-1)})},{init:!1}));n.contentP=a,t.select=function(n){return t.set("_card.selected",n)}}(t),t.setTemplate(i),{update:function(){o(t)},teardown:function(){t._link&&"string"==typeof t._link&&t.unlink(t._link)}}},{cssId:"rm-card",css:function(t){return[function(t){var n=Object.assign({},t("raui.primary"),t("raui.card.primary")),r=Object.assign({},n,t("raui.card.primary.header")),a=(t("raui.themes")||[]).slice();return(t("raui.card.themes")||[]).forEach(function(t){~a.indexOf(t)||a.push(t)}),"\n .rcard-margin {\n padding: 0.5em;\n box-sizing: border-box;\n }\n .rcard-margin.rcard-wrapper-popout {\n padding-top: 2.5em;\n }\n .rcard-no-fill {\n height: auto;\n }\n .rcard {\n position: relative;\n display: block;\n color: "+(n.fg||"#222")+";\n background-color: "+(n.bg||"#fff")+";\n border-radius: "+(n.radius||"0.2em")+";\n transition-duration: "+(n.duration||"0.2s")+";\n transition-timing-function: "+(n.easing||"ease-in-out")+";\n transition-property: box-shadow, border, background-color, color, margin, padding;\n height: 100%;\n }\n \n .rcard > div {\n margin-top: 1em;\n }\n .rcard.rcard-with-header > div:first-of-type {\n margin-top: 0;\n }\n .rcard > div:last-of-type {\n margin-bottom: 1em;\n }\n .rcard > .rcard-actions:last-of-type {\n margin-bottom: 0;\n }\n .rcard-section > .rcard-header:last-of-type {\n margin-bottom: 0;\n }\n \n .rcard-section {\n overflow: hidden;\n }\n \n .rcard-deep {\n box-shadow: "+(n.shadow||"0 1px 4px 0 rgba(0,0,0,0.14)")+";\n border: 1px solid "+(n.bc||"#ccc")+";\n }\n .rcard-flat {\n border: 0.0625em solid "+(n.bc||"#ccc")+";\n box-shadow: none;\n }\n \n .rcard-no-pad > .rcard-content {\n padding: 0;\n }\n \n .rcard-content {\n padding: 0 1em;\n }\n \n .rcard-header {\n position: relative;\n display: flex;\n align-items: center;\n transition-duration: "+(r.duration||"0.2s")+";\n transition-timing-function: "+(r.easing||"ease-in-out")+";\n transition-property: color, background-color, padding, height;\n min-height: 4em;\n flex-wrap: wrap;\n }\n \n .rcard-section > .rcard-header {\n background-color: "+(r.fga||"#07e")+";\n color: "+(r.bg||"#fff")+";\n min-height: auto;\n }\n \n .rcard-section > .rcard-header:first-of-type {\n padding: 0;"+(r.gradient?"\n background: "+r.gradient+";\n color: "+(r.fg||"#222")+";\n border-bottom: 1px solid "+(r.bc||"#ccc")+";":"")+"\n }\n .rcard-header .rcard-title-pad {\n height: 100%;\n width: 0;"+(r.padding?"\n margin: "+r.padding+" 0;":"")+"\n }\n \n .rcard-avatar {\n width: 3em;\n height: 3em;\n margin: 1em 0 0 1em;\n transition-duration: "+(n.duration||"0.2s")+";\n transition-timing-function: "+(n.easing||"ease-in-out")+";\n transition-property: width, height, bottom;\n }\n \n .rcard-avatar-inner {\n height: 100%;\n background-size: cover;\n transition-duration: "+(n.duration||"0.2s")+";\n transition-timing-function: "+(n.easing||"ease-in-out")+";\n transition-property: border-radius, box-shadow;\n }\n \n .rcard-avatar-round .rcard-avatar-inner {\n border-radius: 100%;\n }\n \n .rcard-section > .rcard-header .rcard-avatar {\n margin: 0.5em 0 0.5em 1em;\n }\n \n .rcard-section.rcard-popout {\n overflow: visible;\n }\n .rcard-section.rcard-popout > .rcard-header {\n border-radius: "+(n.easing||"0.2em")+" "+(n.radius||"0.2em")+" 0 0;\n }\n .rcard-popout > .rcard-header .rcard-avatar {\n margin-top: -2em;\n width: 6em;\n height: 6em;\n }\n .rcard-popout.rcard-section > .rcard-header .rcard-avatar {\n width: 3.75em;\n height: 3.75em;\n margin-top: -1.25em;\n }\n .rcard-popout.rcard-deep > .rcard-header .rcard-avatar-inner {\n box-shadow: 0 2px 2px rgba(0, 0, 0, 0.24), 0 0 2px rgba(0, 0, 0, 0.12);\n }\n \n .rcard-titles {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n line-height: 1em;\n transition-duration: "+(n.duration||"0.2s")+";\n transition-timing-function: "+(n.easing||"ease-in-out")+";\n transition-property: margin;\n margin: 1em 1em 0 1em;\n }\n .rcard-section > .rcard-header .rcard-titles.rcard-with-tabs {\n flex-grow: 0;\n margin-right: 3em;\n }\n .rcard-titles.rcard-shrink {\n flex-grow: 0;\n }\n \n .rcard-with-sub {\n justify-content: space-evenly;\n }\n .rcard-with-sub > .rcard-title {\n font-size: 1.2em;\n }\n \n .rcard-title {\n font-size: 1.5em;\n }\n \n .rcard-subtitle {\n opacity: 0.7;\n font-size: 1em;\n }\n \n .rcard-section > .rcard-header .rcard-titles {\n line-height: 1.2em;\n margin: 0.5em 1em 0.5em 1em;\n }\n .rcard-section > .rcard-header .rcard-with-sub {\n line-height: 1em;\n }\n .rcard-section > .rcard-header .rcard-with-sub > .rcard-title {\n font-size: 1.1em;\n }\n .rcard-section > .rcard-header .rcard-title {\n font-size: 1.2em;\n }\n \n .rcard-title-right {\n margin-top: 1em;\n margin-left: auto;\n margin-right: 1em;\n cursor: default;\n }\n .rcard-section > .rcard-header .rcard-title-right {\n margin-top: 0;\n }\n \n .rcard-expandable > .rcard-header:first-of-type {\n transition-property: color, background-color, height;\n padding-right: 2em;\n }\n .rcard-clickable {\n cursor: pointer;\n }\n .rcard-header > .rcard-expand {\n position: absolute;\n height: 24px;\n top: 1.7em;\n right: 0.5em;\n transition: transform 0.2s ease-in-out, top 0.2s ease-in-out;\n z-index: 1;\n }\n .rcard-section > .rcard-header .rcard-expand {\n top: 0.8em;\n }\n .rcard-expand.rcard-expanded {\n transform: rotate(180deg);\n transform-origin: center;\n }\n .rcard-expand svg {\n width: 24px;\n height: 24px;\n }\n .rcard-expand svg path {\n fill: "+(r.fg||"#222")+";\n stroke: "+(r.fg||"#222")+";\n }\n .rcard-section > .rcard-header .rcard-expand svg path {\n fill: "+(r.bg||"#fff")+";\n stroke: "+(r.bg||"#fff")+";\n }\n \n .rcard-popout.rcard-collapsed > .rcard-header .rcard-avatar {\n bottom: 1em;\n }\n .rcard-popout.rcard-collapsed.rcard-section > .rcard-header .rcard-avatar {\n bottom: 0.5em;\n }\n \n .rcard > div:first-of-type.rcard-image {\n margin-top: 0;\n }\n \n .rcard-image {\n margin-top: 1em;\n }\n \n .rcard-image > img {\n width: 100%;\n }\n \n .rcard-tabs-window {\n overflow: auto;\n }\n .rcard-section > .rcard-header .rcard-tabs-window {\n align-self: flex-end;\n flex-grow: 1;\n }\n \n .rcard-tabs {\n display: flex;\n border-top: 0.15em solid "+(n.bga||"#f4f4f4")+";\n }\n \n .rcard-tab {\n box-sizing: border-box;\n padding: 0.5em 1em;\n height: 2.5em;\n user-select: none;\n opacity: 0.9;\n cursor: pointer;\n transition-duration: 0.2s;\n transition-timing-function: ease-in-out;\n transition-property: opacity, background-color, color, border-top, border-width;\n border-top: 0.15em solid transparent;\n margin-top: -0.15em;\n white-space: nowrap;\n border-top: 0.15em solid "+(n.bga||"#f4f4f4")+";\n }\n .rcard-tab:hover {\n opacity: 1;\n }\n \n .rcard-tab.rcard-tab-selected {\n border-top: 0.15em solid "+(n.fga||"#07e")+";\n opacity: 1;\n font-weight: 500;\n cursor: default;\n }\n \n .rcard-section > .rcard-header .rcard-tabs {\n margin-top: 0.5em;\n border-top: 0;\n }\n .rcard-section > .rcard-header .rcard-tab {\n margin-top: 0;\n border-color: "+(r.gradient?n.bc||"#ccc":n.bg||"#fff")+";\n border-style: solid;\n border-width: 1px 1px 0 0;\n color: "+(r.gradient?n.fga||"#07e":r.bg||"#fff")+";\n }\n .rcard-section > .rcard-header .rcard-tab:first-of-type {\n border-width: 1px 1px 0 1px;\n }\n .rcard-section > .rcard-header .rcard-tab-selected {\n background-color: "+(n.bg||"#fff")+";\n color: "+(n.fg||"#222")+";\n }"+(r.gradient?"\n .rcard-section > .rcard-header .rcard-tabs-window {\n margin-bottom: -1px;\n }":"")+"\n \n \n .rcard-tab-window {\n overflow: hidden;\n margin: 0.5em 1em;\n }\n \n .rcard-tab-contents {\n width: 100%;\n box-sizing: border-box;\n position: relative;\n display: flex;\n }\n \n .rcard-tab-content {\n width: 100%;\n box-sizing: border-box;\n flex-shrink: 0;\n flex-grow: 0;\n opacity: 0;\n transition: opacity 0.4s ease-in-out;\n }\n .rcard-content-selected {\n opacity: 1;\n }\n \n .rcard-actions {\n padding: 0.5em;\n }\n \n .rcard > .rcard-actions:nth-of-type(n+1) {\n margin-top: 0.5em;\n }\n \n .rcard-actions > button {\n text-decoration: none;\n text-align: center;\n letter-spacing: 0.5px;\n cursor: pointer;\n user-select: none;\n border: none;\n border-radius: 2px;\n padding: 0 2rem;\n transition: 0.2s ease-in-out;\n transition-property: box-shadow, opacity, background-color;\n font-size: 1em;\n line-height: 1.5em;\n background-color: "+(n.bg||"#fff")+";\n color: "+(n.fg||"#222")+";\n vertical-align: middle;\n min-height: 2.25em;\n outline: 0;\n margin: 0.25em;\n position: relative;\n overflow: hidden;\n font-weight: 500;\n -webkit-tap-highlight-color: transparent;\n box-shadow: none;\n }\n \n .rcard-actions > button[disabled], .btn.disabled {\n opacity: 0.7;\n cursor: not-allowed;\n }\n \n .rcard-actions > button[disabled]:hover {\n opacity: 0.7;\n }\n \n .rcard-actions > button.flat:hover {\n box-shadow: none;\n }\n \n .rcard-actions > button:after {\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 1.5em, transparent 1.6em);\n opacity: 0;\n transform: scale(5, 5);\n transition: opacity 0.6s ease-out, transform 0.5s ease-in;\n }\n \n .rcard-actions > button:before {\n content: ' ';\n position: absolute;\n height: 100%;\n width: 100%;\n background-color: rgba(0, 0, 0, 0.075);\n opacity: 0;\n top: 0;\n left: 0;\n transition: opacity 0.4s ease-in-out;\n }\n \n .rcard-actions > button:focus:before {\n opacity: 1;\n }\n .rcard-actions > button:hover:before {\n opacity: 0.5;\n }\n \n .rcard-actions > button:active:after {\n transform: scale(1, 1);\n opacity: 1;\n transition: none;\n }\n "+a.map(function(r){var a=Object.assign({},t("raui.primary"),t("raui.card.primary"),t("raui."+r),t("raui.card."+r)),e=Object.assign({},a,t("raui.card.primary.header"),t("raui.card."+r+".header"));return"\n ."+r+".rcard {\n color: "+(a.fg||"#222")+";\n background-color: "+(a.bg||"#fff")+";\n border-radius: "+(a.radius||"0.2em")+";\n }\n ."+r+".rcard-deep {\n box-shadow: "+(n.shadow||"0 1px 4px 0 rgba(0,0,0,0.14)")+";\n border: 1px solid "+(n.bc||"#ccc")+";\n }\n ."+r+".rcard-flat {\n border: 0.0625em solid "+(n.bc||"#ccc")+";\n }\n \n ."+r+".rcard-section > .rcard-header {\n background-color: "+(e.fga||"#07e")+";\n color: "+(e.bg||"#fff")+";\n }\n \n ."+r+".rcard-section > .rcard-header:first-of-type {\n padding: "+(e.padding||"0.5em 1em")+";"+(e.gradient?"\n background: "+e.gradient+";\n color: "+(e.fg||"#222")+";\n border-bottom: 1px solid "+(e.bc||"#ccc")+";":"")+"\n }"+(e.gradient?"\n "+r+".rcard-section > .rcard-header .rcard-tabs {\n margin-bottom: -1px;\n }":"")+"\n \n ."+r+" > .rcard-header.rcard-expand svg path {\n fill: "+(e.fg||"#222")+";\n stroke: "+(e.fg||"#222")+";\n }\n ."+r+".rcard-section > .rcard-header .rcard-expand svg path {\n fill: "+(e.bg||"#fff")+";\n stroke: "+(e.bg||"#fff")+";\n }\n ."+r+" > .rcard-actions > button {\n background-color: "+(n.bg||"#fff")+";\n color: "+(n.fg||"#222")+";\n }\n "}).join("")}.call(this,t)].join(" ")},noCssTransform:!0,attributes:["title","subtitle","image","avatar","avatar-round","no-pad","image-alt","section","flat","popout","margin","expandable","expanded","no-arrow"]});var c=["title","subtitle","image","section","flat","popout","margin","expandable"];function o(t){c.forEach(function(n){return n in t.attributes&&t.set("@local."+n,t.attributes[n])}),"avatar-round"in t.attributes&&t.set("@local.round",t.attributes["avatar-round"]),"avatar"in t.attributes&&t.set("@local.avatar",t.attributes.avatar||t.attributes["avatar-image"]),"image-alt"in t.attributes&&t.set("@local.alt",t.attributes["image-alt"]),"no-pad"in t.attributes&&t.set("@local.noPad",t.attributes["no-pad"]),"no-fill"in t.attributes&&t.set("@local.noFill",t.attributes["no-fill"]),t.set("@local.arrow",!t.attributes["no-arrow"]),"expanded"in t.attributes&&t._link!==t.attributes.expanded?(t._link&&"string"==typeof t._link&&t.unlink(t._link),t._link=t.attributes.expanded,t._link&&"string"==typeof t._link?(t.link(t._link,"_card.expanded"),t.set("_card.expandLinked",!0)):t.set({"_card.expanded":t.attributes.expanded,"_card.expandLinked":!1})):t.set("_card.expandLinked",!0)}function s(t){return void 0===t&&(t={}),function(n){var r=n.instance;r.transitions.expand||(r.transitions.expand=e),r.partials[t.name||"card"]=d}}a("RMCard","partials",d),t.Card=d,t.plugin=s,t.default=s,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],n):n(t.RMCard={},t.Ractive)}(this,function(t,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var r="undefined"!=typeof window?window:null;function a(t,n,a){if(r&&r.Ractive&&"object"==typeof r.Ractive[n]){var e=document.currentScript;if(e||(e=(e=document.querySelectorAll("script"))[e.length-1]),e){var i=e.getAttribute("data-alias");i&&(i=(i=i.split("&")).reduce(function(t,n){var r=n.split("="),a=r[0],e=r[1];return t[a]=e,t},{})),Ractive[n][i&&i[t]||t]=a}}}function e(t,n){var r=t.processParams(n,{duration:200,easing:"easeInOut"});return new Promise(function(n){requestAnimationFrame(function(){t.setStyle("overflow","hidden");var a="x"===r.axis?"width":"height";if(t.isIntro||r.intro){var e=t.getStyle(a);t.setStyle(a,0),t.setStyle("opacity",0),n(t.animateStyle(a,e,r).then(function(){return t.animateStyle("opacity",1,r)}).then(function(){t.setStyle(a,""),t.setStyle("overflow","")}))}else t.setStyle(a,t.getStyle(a)),t.setStyle("opacity",1),n(t.animateStyle("opacity",0,r).then(function(){return t.animateStyle(a,0,r)}))})})}a("expand","transitions",e);var i={v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-wrapper",g:1},{t:8,r:"extra-attributes"},{n:"class-rcard-margin",t:13,f:[{t:2,r:"_card.margin"}]},{n:"class-rcard-wrapper-popout",t:13,f:[{t:2,r:"_card.popout"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard",g:1},{n:"class-rcard-no-pad",t:13,f:[{t:2,r:"_card.noPad"}]},{n:"class-rcard-section",t:13,f:[{t:2,r:"_card.section"}]},{n:"class-rcard-flat",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:'"flat" in _0?_1:_2'}}]},{n:"class-rcard-deep",t:13,f:[{t:2,x:{r:["_card","_card.flat","@style.card.flat"],s:'"flat" in _0?!_1:!_2'}}]},{n:"class-rcard-popout",t:13,f:[{t:2,r:"_card.popout"}]},{n:"class-rcard-collapsed",t:13,f:[{t:2,x:{r:["_card.expandable","_card.expanded"],s:"_0&&_1===false"}}]},{n:"class-rcard-expandable",t:13,f:[{t:2,r:"_card.expandable"}]},{n:"class-rcard-arrow",t:13,f:[{t:2,r:"_card.arrow"}]},{n:"class-rcard-no-fill",t:13,f:[{t:2,r:"_card.noFill"}]},{n:"class-rcard-with-header",t:13,f:[{t:2,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:'_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7))'}}]}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-header",g:1},{t:4,f:[{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:'[(_0).set("_card.expanded",_1===false?true:false)]'}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-expand",g:1},{n:"class-rcard-expanded",t:13,f:[{t:2,x:{r:["_card.expanded"],s:"_0!==false"}}]}],f:[{t:7,e:"svg",f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:50,x:{r:["_card.arrow","_card.expandable"],s:"_0&&_1"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-pad",g:1}],f:[" "]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{n:"class-rcard-avatar-round",t:13,f:[{t:2,r:"_card.round"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar-inner",g:1},{n:"style-background-image",f:["url(",{t:2,r:"_card.avatar"},")"],t:13}]}]}],n:50,x:{r:["_card.avatar"],s:'_0&&typeof _0==="string"'}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar",g:1},{t:4,f:[{t:8,r:"_card.avatarA"}],n:50,r:"_card.avatarA"}],f:[{t:8,r:"_card.avatarP"}]}],n:50,r:"_card.avatarP",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-titles",g:1},{n:"class-rcard-with-sub",t:13,f:[{t:2,x:{r:["_card.subtitle","_card.subtitleP"],s:"_0||_1"}}]},{n:"class-rcard-with-tabs",t:13,f:[{t:2,r:"_card.tabs"}]},{t:4,f:[{n:"class-rcard-shrink",t:13},{n:"class-rcard-clickable",t:13},{n:["click"],t:70,f:{r:["@context","_card.expanded"],s:'[(_0).set("_card.expanded",_1===false?true:false)]'}}],n:50,x:{r:["_card.expandable","_card.arrow"],s:"_0&&!_1"}}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1}],f:[{t:2,r:"_card.title"}]}],n:50,r:"_card.title"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title",g:1},{t:4,f:[{t:8,r:"_card.titleA"}],n:50,r:"_card.titleA"}],f:[{t:8,r:"_card.titleP"}]}],n:51,l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1}],f:[{t:2,r:"_card.subtitle"}]}],n:50,r:"_card.subtitle"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-subtitle",g:1},{t:4,f:[{t:8,r:"_card.subtitleA"}],n:50,r:"_card.subtitleA"}],f:[{t:8,r:"_card.subtitleP"}]}],n:50,r:"_card.subtitleP",l:1}]}," ",{t:4,f:[{t:8,r:"tabs"}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-title-right",g:1},{n:["click"],t:70,f:{r:[],s:"[false,false]"}}],f:[{t:8,r:"_card.titleRightP"}]}],n:50,r:"_card.titleRightP"}]}],n:50,x:{r:["_card.titleP","_card.subtitleP","_card.avatarP","_card.title","_card.subtitle","_card.avatar","_card.tabs","_card.section"],s:'_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7))'}}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:7,e:"img",m:[{n:"src",f:[{t:2,r:"_card.image"}],t:13},{n:"alt",f:[{t:2,r:"_card.alt"}],t:13}]}]}],n:50,r:"_card.image"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-image",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"},{t:4,f:[{t:8,r:"_card.imageA"}],n:50,r:"_card.imageA"}],f:[{t:8,r:"_card.imageP"}]}],n:50,r:"_card.imageP",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-content",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.contentP"}]}],n:50,r:"_card.contentP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-wrapper",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"tab-bodies"}," ",{t:8,r:"tabs"}]}],n:50,x:{r:["_card.tabs","_card.section"],s:"_0&&!_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-footer",g:1},{t:4,f:[{t:8,r:"_card.footerA"}],n:50,r:"_card.footerA"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:8,r:"_card.footerP"}]}],n:50,r:"_card.footerP"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-actions",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,r:"_card.expandable"}],f:[{t:4,f:[{t:4,f:[{t:8,r:".P"}],n:50,r:".P"},{t:4,f:[{t:7,e:"button",m:[{t:8,x:{r:[".attrs"],s:"_0||[]"}}],f:[{t:8,r:".content"}]}],n:51,l:1}],n:52,r:"_card.actions"}]}],n:50,r:"_card.actions.length"}],n:50,x:{r:["_card.expandable","_card.expanded"],s:"!_0||_1!==false"}}]}]}],e:{'"flat" in _0?_1:_2':function(t,n,r){return"flat"in t?n:r},'"flat" in _0?!_1:!_2':function(t,n,r){return"flat"in t?!n:!r},"_0&&_1===false":function(t,n){return t&&!1===n},'_0||_1||_2||_3||_4||(_5&&typeof _5==="string"||(_6&&_7))':function(t,n,r,a,e,i,d,c){return t||n||r||a||e||i&&"string"==typeof i||d&&c},'[(_0).set("_card.expanded",_1===false?true:false)]':function(t,n){return[t.set("_card.expanded",!1===n)]},"_0&&_1":function(t,n){return t&&n},"_0!==false":function(t){return!1!==t},'_0&&typeof _0==="string"':function(t){return t&&"string"==typeof t},"_0||_1":function(t,n){return t||n},"_0&&!_1":function(t,n){return t&&!n},"[false,false]":function(){return[!1,!1]},"_0||[]":function(t){return t||[]},"!_0||_1!==false":function(t,n){return!t||!1!==n},"_0===_1+_2||(!_0&&!_1&&!_2)":function(t,n,r){return t===n+r||!t&&!n&&!r},"(_0||0)*100":function(t){return 100*(t||0)},"_0===_1||(!_0&&!_1)":function(t,n){return t===n||!t&&!n},'[(_2).set("_card.selected",_0+_1),(_2).set("_card.expanded",true),false]':function(t,n,r){return[r.set("_card.selected",t+n),r.set("_card.expanded",!0),!1]},'[(_1).set("_card.selected",_0),(_1).set("_card.expanded",true),false]':function(t,n){return[n.set("_card.selected",t),n.set("_card.expanded",!0),!1]}},p:{"tab-body":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]}],f:[{t:8,r:".content"}]}],"tab-bodies":[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-contents",g:1},{n:"style-left",f:["-",{t:2,x:{r:["_card.selected"],s:"(_0||0)*100"}},"%"],t:13}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab-content",g:1},{n:"class-rcard-content-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]}],f:[{t:8,r:".content",c:{r:"^^/"}}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.body"}],n:50,r:"_card.tablist"}]}]}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index","_card.tabs.length"],s:"_0===_1+_2||(!_0&&!_1&&!_2)"}}]},{n:["click"],t:70,f:{r:["_card.tabs.length","@index","@context"],s:'[(_2).set("_card.selected",_0+_1),(_2).set("_card.expanded",true),false]'}}],f:[{t:8,r:".title"}]}],tabs:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs-window",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tabs",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-tab",g:1},{n:"class-rcard-tab-selected",t:13,f:[{t:2,x:{r:["_card.selected","@index"],s:"_0===_1||(!_0&&!_1)"}}]},{n:["click"],t:70,f:{r:["@index","@context"],s:'[(_1).set("_card.selected",_0),(_1).set("_card.expanded",true),false]'}}],f:[{t:8,r:".title",c:{r:"^^/"}}]}],n:52,r:"_card.tabs"}," ",{t:4,f:[{t:8,r:"_card.tablist.tab"}],n:50,r:"_card.tablist"}]}]}]}},d=n.macro(function(t){return function(t){var n=t.get("@local");t.aliasLocal("_card"),o(t);var r=t.partials.content,a=[];t.partials.tabs=i.p.tabs,t.partials["tab-bodies"]=i.p["tab-bodies"],t.partials.tab=i.p.tab,t.partials["tab-body"]=i.p["tab-body"],r.forEach(function(t){if("title"===t.e){n.titleA=t.m,n.titleP=t.f.filter(function(t){return"right"!==t.e});var r=t.f.find(function(t){return"right"===t.e});r&&(n.titleRightP=r.f)}else if("subtitle"===t.e)n.subtitleA=t.m,n.subtitleP=t.f;else if("avatar"===t.e){var e,d;t.m&&(n.avatarA=t.m.filter(function(t){return"round"!==t.n&&"image"!==t.n&&"popout"!==t.n}),(d=t.m.find(function(t){return"round"===t.n}))&&(0===d.f?n.avatarA.push({t:13,g:1,n:"class",f:"rcard-avatar-round"}):n.avatarA.push({t:13,n:"class-rcard-avatar-round",f:d.f})),(d=t.m.find(function(t){return"image"===t.n}))&&(e=d.f)),e?(n.avatarP=[{t:7,e:"div",m:[{t:13,n:"class",f:"rcard-avatar-inner",g:1},{n:"style-background-image",f:["url("].concat(e,[")"]),t:13}]}],1===e.length&&2===e[0].t&&(n.avatarP=[Object.assign({},e[0],{t:4,n:50,f:n.avatarP})])):t.f&&t.f.length&&(n.avatarP=t.f)}else if("footer"===t.e)n.footerA=t.m,n.footerP=t.f;else if("action"===t.e)(n.actions||(n.actions=[])).push({attrs:t.m,content:t.f});else if(4===t.t&&50===t.n&&t.f&&1===t.f.filter(function(t){return"string"!=typeof t}).length&&t.f.find(function(t){return"action"===t.e})){var c=Object.assign({},t),o=c.f.find(function(t){return"action"===t.e});c.f=[{t:7,e:"button",m:o.m,f:o.f}],(n.actions||(n.actions=[])).push({P:[c]})}else if("tabs"===t.e){var s=n.tabs=[];Array.isArray(t.f)&&t.f.forEach(function(t){if("tab"===t.e){var n={content:t.f};s.push(n),Array.isArray(n.content)||(n.content=[n.content]);var r=(t.m||[]).find(function(t){return"title"===t.n})||n.content.find(function(t){return"title"===t.e});r&&(n.title=r.f),Array.isArray(n.title)||(n.title=[n.title])}})}else if("tablist"===t.e){var f={tab:[],body:[]},l=t.m.find(function(t){return"items"===t.n});if("string"==typeof l.f){f.items=l.f,f.tab.push({t:4,n:52,r:l.f,f:[]}),f.body.push({t:4,n:52,r:l.f,f:[]});var u=t.f.find(function(t){return"title"===t.e})||t.m.find(function(t){return"title"===t.n});u&&u.f&&(f.tab[0].f=[Object.assign({},i.p.tab[0],{f:u.f})]),(u=t.f.find(function(t){return"tab"===t.e}))&&u.f&&(f.body[0].f=[Object.assign({},i.p["tab-body"][0],{f:u.f})]),n.tablist=f,n.tabs||(n.tabs=[])}}else a.push(t)}),n.tablist&&(n._observer=t.observe("_card.tabs.length "+n.tablist.items+".length _card.selected",function(){var r=n.tabs.length+t.get(n.tablist.items+".length");t.get("_card.selected")>=r&&setTimeout(function(){return t.set("_card.selected",r-1)})},{init:!1}));n.contentP=a,t.select=function(n){return t.set("_card.selected",n)}}(t),t.setTemplate(i),{update:function(){o(t)},teardown:function(){t._link&&"string"==typeof t._link&&t.unlink(t._link)}}},{cssId:"rm-card",css:function(t){return[function(t){var n=Object.assign({},t("raui.primary"),t("raui.card.primary")),r=Object.assign({},n,t("raui.card.primary.header")),a=(t("raui.themes")||[]).slice();return(t("raui.card.themes")||[]).forEach(function(t){~a.indexOf(t)||a.push(t)}),"\n .rcard-margin {\n padding: 0.5em;\n box-sizing: border-box;\n }\n .rcard-margin.rcard-wrapper-popout {\n padding-top: 2.5em;\n }\n .rcard-no-fill {\n height: auto;\n }\n .rcard {\n position: relative;\n display: block;\n color: "+(n.fg||"#222")+";\n background-color: "+(n.bg||"#fff")+";\n border-radius: "+(n.radius||"0.2em")+";\n transition-duration: "+(n.duration||"0.2s")+";\n transition-timing-function: "+(n.easing||"ease-in-out")+";\n transition-property: box-shadow, border, background-color, color, margin, padding;\n height: 100%;\n }\n \n .rcard > div {\n margin-top: 1em;\n }\n .rcard.rcard-with-header > div:first-of-type {\n margin-top: 0;\n }\n .rcard > div:last-of-type {\n margin-bottom: 1em;\n }\n .rcard > .rcard-actions:last-of-type {\n margin-bottom: 0;\n }\n .rcard-section > .rcard-header:last-of-type {\n margin-bottom: 0;\n }\n \n .rcard-section {\n overflow: hidden;\n }\n \n .rcard-deep {\n box-shadow: "+(n.shadow||"0 1px 4px 0 rgba(0,0,0,0.14)")+";\n border: 1px solid "+(n.bc||"#ccc")+";\n }\n .rcard-flat {\n border: 0.0625em solid "+(n.bc||"#ccc")+";\n box-shadow: none;\n }\n \n .rcard-no-pad > .rcard-content {\n padding: 0;\n }\n \n .rcard-content {\n padding: 0 1em;\n }\n \n .rcard-header {\n position: relative;\n display: flex;\n align-items: center;\n transition-duration: "+(r.duration||"0.2s")+";\n transition-timing-function: "+(r.easing||"ease-in-out")+";\n transition-property: color, background-color, padding, height;\n min-height: 4em;\n flex-wrap: wrap;\n }\n \n .rcard-section > .rcard-header {\n background-color: "+(r.fga||"#07e")+";\n color: "+(r.bg||"#fff")+";\n min-height: auto;\n }\n \n .rcard-section > .rcard-header:first-of-type {\n padding: 0;"+(r.gradient?"\n background: "+r.gradient+";\n color: "+(r.fg||"#222")+";\n border-bottom: 1px solid "+(r.bc||"#ccc")+";":"")+"\n }\n .rcard-header .rcard-title-pad {\n height: 100%;\n width: 0;"+(r.padding?"\n margin: "+r.padding+" 0;":"")+"\n }\n \n .rcard-avatar {\n width: 3em;\n height: 3em;\n margin: 1em 0 0 1em;\n transition-duration: "+(n.duration||"0.2s")+";\n transition-timing-function: "+(n.easing||"ease-in-out")+";\n transition-property: width, height, bottom;\n }\n \n .rcard-avatar-inner {\n height: 100%;\n background-size: cover;\n transition-duration: "+(n.duration||"0.2s")+";\n transition-timing-function: "+(n.easing||"ease-in-out")+";\n transition-property: border-radius, box-shadow;\n }\n \n .rcard-avatar-round .rcard-avatar-inner {\n border-radius: 100%;\n }\n \n .rcard-section > .rcard-header .rcard-avatar {\n margin: 0.5em 0 0.5em 1em;\n }\n \n .rcard-section.rcard-popout {\n overflow: visible;\n }\n .rcard-section.rcard-popout > .rcard-header {\n border-radius: "+(n.easing||"0.2em")+" "+(n.radius||"0.2em")+" 0 0;\n }\n .rcard-popout > .rcard-header .rcard-avatar {\n margin-top: -2em;\n width: 6em;\n height: 6em;\n }\n .rcard-popout.rcard-section > .rcard-header .rcard-avatar {\n width: 3.75em;\n height: 3.75em;\n margin-top: -1.25em;\n }\n .rcard-popout.rcard-deep > .rcard-header .rcard-avatar-inner {\n box-shadow: 0 2px 2px rgba(0, 0, 0, 0.24), 0 0 2px rgba(0, 0, 0, 0.12);\n }\n \n .rcard-titles {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n line-height: 1em;\n transition-duration: "+(n.duration||"0.2s")+";\n transition-timing-function: "+(n.easing||"ease-in-out")+";\n transition-property: margin;\n margin: 1em 1em 0 1em;\n }\n .rcard-section > .rcard-header .rcard-titles.rcard-with-tabs {\n flex-grow: 0;\n margin-right: 3em;\n }\n .rcard-titles.rcard-shrink {\n flex-grow: 0;\n }\n \n .rcard-with-sub {\n justify-content: space-evenly;\n }\n .rcard-with-sub > .rcard-title {\n font-size: 1.2em;\n }\n \n .rcard-title {\n font-size: 1.5em;\n }\n \n .rcard-subtitle {\n opacity: 0.7;\n font-size: 1em;\n }\n \n .rcard-section > .rcard-header .rcard-titles {\n line-height: 1.2em;\n margin: 0.5em 1em 0.5em 1em;\n }\n .rcard-section > .rcard-header .rcard-with-sub {\n line-height: 1em;\n }\n .rcard-section > .rcard-header .rcard-with-sub > .rcard-title {\n font-size: 1.1em;\n }\n .rcard-section > .rcard-header .rcard-title {\n font-size: 1.2em;\n }\n \n .rcard-title-right {\n margin-top: 1em;\n margin-left: auto;\n margin-right: 1em;\n cursor: default;\n }\n .rcard-section > .rcard-header .rcard-title-right {\n margin-top: 0;\n }\n \n .rcard-expandable > .rcard-header:first-of-type {\n transition-property: color, background-color, height;\n padding-right: 2em;\n }\n .rcard-clickable {\n cursor: pointer;\n }\n .rcard-header > .rcard-expand {\n position: absolute;\n height: 24px;\n top: 1.7em;\n right: 0.5em;\n transition: transform 0.2s ease-in-out, top 0.2s ease-in-out;\n z-index: 1;\n }\n .rcard-section > .rcard-header .rcard-expand {\n top: 0.8em;\n }\n .rcard-expand.rcard-expanded {\n transform: rotate(180deg);\n transform-origin: center;\n }\n .rcard-expand svg {\n width: 24px;\n height: 24px;\n }\n .rcard-expand svg path {\n fill: "+(r.fg||"#222")+";\n stroke: "+(r.fg||"#222")+";\n }\n .rcard-section > .rcard-header .rcard-expand svg path {\n fill: "+(r.bg||"#fff")+";\n stroke: "+(r.bg||"#fff")+";\n }\n \n .rcard-popout.rcard-collapsed > .rcard-header .rcard-avatar {\n bottom: 1em;\n }\n .rcard-popout.rcard-collapsed.rcard-section > .rcard-header .rcard-avatar {\n bottom: 0.5em;\n }\n \n .rcard > div:first-of-type.rcard-image {\n margin-top: 0;\n }\n \n .rcard-image {\n margin-top: 1em;\n }\n \n .rcard-image > img {\n width: 100%;\n }\n \n .rcard-tabs-window {\n overflow: auto;\n }\n .rcard-section > .rcard-header .rcard-tabs-window {\n align-self: flex-end;\n flex-grow: 1;\n }\n \n .rcard-tabs {\n display: flex;\n border-top: 0.15em solid "+(n.bga||"#f4f4f4")+";\n }\n \n .rcard-tab {\n box-sizing: border-box;\n padding: 0.5em 1em;\n height: 2.5em;\n user-select: none;\n opacity: 0.9;\n cursor: pointer;\n transition-duration: 0.2s;\n transition-timing-function: ease-in-out;\n transition-property: opacity, background-color, color, border-top, border-width;\n border-top: 0.15em solid transparent;\n margin-top: -0.15em;\n white-space: nowrap;\n border-top: 0.15em solid "+(n.bga||"#f4f4f4")+";\n }\n .rcard-tab:hover {\n opacity: 1;\n }\n \n .rcard-tab.rcard-tab-selected {\n border-top: 0.15em solid "+(n.fga||"#07e")+";\n opacity: 1;\n font-weight: 500;\n cursor: default;\n }\n \n .rcard-section > .rcard-header .rcard-tabs {\n margin-top: 0.5em;\n border-top: 0;\n }\n .rcard-section > .rcard-header .rcard-tab {\n margin-top: 0;\n border-color: "+(r.gradient?n.bc||"#ccc":n.bg||"#fff")+";\n border-style: solid;\n border-width: 1px 1px 0 0;\n color: "+(r.gradient?n.fga||"#07e":r.bg||"#fff")+";\n }\n .rcard-section > .rcard-header .rcard-tab:first-of-type {\n border-width: 1px 1px 0 1px;\n }\n .rcard-section > .rcard-header .rcard-tab-selected {\n background-color: "+(n.bg||"#fff")+";\n color: "+(n.fg||"#222")+";\n }"+(r.gradient?"\n .rcard-section > .rcard-header .rcard-tabs-window {\n margin-bottom: -1px;\n }":"")+"\n \n \n .rcard-tab-window {\n overflow: hidden;\n margin: 0.5em 1em;\n }\n \n .rcard-tab-contents {\n width: 100%;\n box-sizing: border-box;\n position: relative;\n display: flex;\n }\n \n .rcard-tab-content {\n width: 100%;\n box-sizing: border-box;\n flex-shrink: 0;\n flex-grow: 0;\n opacity: 0;\n transition: opacity 0.4s ease-in-out;\n }\n .rcard-content-selected {\n opacity: 1;\n }\n \n .rcard-actions {\n padding: 0.5em;\n }\n \n .rcard > .rcard-actions:nth-of-type(n+1) {\n margin-top: 0.5em;\n }\n \n .rcard-actions > button {\n text-decoration: none;\n text-align: center;\n letter-spacing: 0.5px;\n cursor: pointer;\n user-select: none;\n border: none;\n border-radius: 2px;\n padding: 0 2rem;\n transition: 0.2s ease-in-out;\n transition-property: box-shadow, opacity, background-color;\n font-size: 1em;\n line-height: 1.5em;\n background-color: "+(n.bg||"#fff")+";\n color: "+(n.fg||"#222")+";\n vertical-align: middle;\n min-height: 2.25em;\n outline: 0;\n margin: 0.25em;\n position: relative;\n overflow: hidden;\n font-weight: 500;\n -webkit-tap-highlight-color: transparent;\n box-shadow: none;\n }\n \n .rcard-actions > button[disabled], .btn.disabled {\n opacity: 0.7;\n cursor: not-allowed;\n }\n \n .rcard-actions > button[disabled]:hover {\n opacity: 0.7;\n }\n \n .rcard-actions > button.flat:hover {\n box-shadow: none;\n }\n \n .rcard-actions > button:after {\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 1.5em, transparent 1.6em);\n opacity: 0;\n transform: scale(5, 5);\n transition: opacity 0.6s ease-out, transform 0.5s ease-in;\n }\n \n .rcard-actions > button:before {\n content: ' ';\n position: absolute;\n height: 100%;\n width: 100%;\n background-color: rgba(0, 0, 0, 0.075);\n opacity: 0;\n top: 0;\n left: 0;\n transition: opacity 0.4s ease-in-out;\n }\n \n .rcard-actions > button:focus:before {\n opacity: 1;\n }\n .rcard-actions > button:hover:before {\n opacity: 0.5;\n }\n \n .rcard-actions > button:active:after {\n transform: scale(1, 1);\n opacity: 1;\n transition: none;\n }\n "+a.map(function(r){var a=Object.assign({},t("raui.primary"),t("raui.card.primary"),t("raui."+r),t("raui.card."+r)),e=Object.assign({},a,t("raui.card.primary.header"),t("raui.card."+r+".header"));return"\n ."+r+".rcard {\n color: "+(a.fg||"#222")+";\n background-color: "+(a.bg||"#fff")+";\n border-radius: "+(a.radius||"0.2em")+";\n }\n ."+r+".rcard-deep {\n box-shadow: "+(n.shadow||"0 1px 4px 0 rgba(0,0,0,0.14)")+";\n border: 1px solid "+(n.bc||"#ccc")+";\n }\n ."+r+".rcard-flat {\n border: 0.0625em solid "+(n.bc||"#ccc")+";\n }\n \n ."+r+".rcard-section > .rcard-header {\n background-color: "+(e.fga||"#07e")+";\n color: "+(e.bg||"#fff")+";\n }\n \n ."+r+".rcard-section > .rcard-header:first-of-type {\n padding: "+(e.padding||"0.5em 1em")+";"+(e.gradient?"\n background: "+e.gradient+";\n color: "+(e.fg||"#222")+";\n border-bottom: 1px solid "+(e.bc||"#ccc")+";":"")+"\n }"+(e.gradient?"\n "+r+".rcard-section > .rcard-header .rcard-tabs {\n margin-bottom: -1px;\n }":"")+"\n \n ."+r+" > .rcard-header.rcard-expand svg path {\n fill: "+(e.fg||"#222")+";\n stroke: "+(e.fg||"#222")+";\n }\n ."+r+".rcard-section > .rcard-header .rcard-expand svg path {\n fill: "+(e.bg||"#fff")+";\n stroke: "+(e.bg||"#fff")+";\n }\n ."+r+" > .rcard-actions > button {\n background-color: "+(n.bg||"#fff")+";\n color: "+(n.fg||"#222")+";\n }\n "}).join("")}.call(this,t)].join(" ")},noCssTransform:!0,attributes:["title","subtitle","image","avatar","avatar-round","no-pad","image-alt","section","flat","popout","margin","expandable","expanded","no-arrow"]});var c=["title","subtitle","image","section","flat","popout","margin","expandable"];function o(t){c.forEach(function(n){return n in t.attributes&&t.set("@local."+n,t.attributes[n])}),"avatar-round"in t.attributes&&t.set("@local.round",t.attributes["avatar-round"]),"avatar"in t.attributes&&t.set("@local.avatar",t.attributes.avatar||t.attributes["avatar-image"]),"image-alt"in t.attributes&&t.set("@local.alt",t.attributes["image-alt"]),"no-pad"in t.attributes&&t.set("@local.noPad",t.attributes["no-pad"]),"no-fill"in t.attributes&&t.set("@local.noFill",t.attributes["no-fill"]),t.set("@local.arrow",!t.attributes["no-arrow"]),"expanded"in t.attributes&&t._link!==t.attributes.expanded?(t._link&&"string"==typeof t._link&&t.unlink(t._link),t._link=t.attributes.expanded,t._link&&"string"==typeof t._link?(t.link(t._link,"_card.expanded"),t.set("_card.expandLinked",!0)):t.set({"_card.expanded":t.attributes.expanded,"_card.expandLinked":!1})):t.set("_card.expandLinked",!0)}function s(t){return void 0===t&&(t={}),function(n){var r=n.instance;r.transitions.expand||(r.transitions.expand=e),r.partials[t.name||"card"]=d}}a("RMCard","partials",d),t.Card=d,t.plugin=s,t.default=s,Object.defineProperty(t,"__esModule",{value:!0})});

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

var boxy = data('raui.form.boxy');
return ("\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: " + (primary.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 " + (primary.bc || '#ccc') + ";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: " + (primary.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: " + (boxy ? primary.bg || '#fff' : 'transparent') + ";\n }\n\n label.field.focus {\n color: " + (active.fg || primary.fga || '#07e') + ";\n }\n\n label.field.textarea.focus {\n border-color: " + (active.fg || primary.fga || '#07e') + ";\n " + (!boxy ? ("box-shadow: 0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n 0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ";") : '') + "\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: " + (boxy ? '0.0625em' : '0 0 0.0625em 0') + ";\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n box-sizing: border-box;\n background-color: " + (boxy ? primary.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;" + (boxy ? ("\n border-radius: " + (primary.radius || '0.2em') + ";") : '') + "\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input" + (boxy ? '' : ':disabled') + ",\n label.field select" + (boxy ? '' : ':disabled') + " {\n padding: 0 0.75em;\n }\n label.field select" + (boxy ? '' : ':disabled') + " {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\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 " + (!boxy ? ("label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 " + (primary.bc || '#ccc') + ";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em " + (primary.bc || '#ccc') + ",\n -0.0625em 0.0625em " + (primary.bc || '#ccc') + ",\n 0.0625em -0.0625em " + (primary.bc || '#ccc') + ",\n -0.0625em -0.0625em " + (primary.bc || '#ccc') + ";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n 0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ";\n }") : '') + "\n\n /**** CHECK BOXES ****/\n\n label.field.check {\n position:relative;\n z-index: 0;\n overflow: visible;\n cursor: pointer;\n padding-top: 2.2em;\n }\n label.field.check.inline {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -3px;\n top: 23px;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n background-color: " + (primary.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 {\n top: 3px;\n left: -3px;\n }\n\n label.field.check input:checked {\n background-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: \"\";\n display: inline-block;\n box-sizing: border-box;\n margin: 3px 11px 3px 1px;\n border: solid 2px; /* Safari */\n border-color: " + (primary.fg || '#222') + ";\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: \"\";\n display: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n background-color: " + (primary.fga || '#07e') + ";\n }\n label.field.check.focus:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.check.checked:after {\n border-color: " + (primary.bg || '#fff') + ";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: " + (primary.bc || '#ccc') + ";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: " + (primary.bc || '#ccc') + ";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: " + (primary.bc || '#ccc') + ";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n 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;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 41px;\n height: 40px;\n background-color: " + (primary.bc || '#ccc') + ";\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 24px) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: \"\";\n display: inline-block;\n box-sizing: border-box;\n margin: 2px 10px 2px 0;\n border: solid 2px; /* Safari */\n border-color: " + (primary.fg || '#222') + ";\n border-radius: 50%;\n width: 20px;\n height: 20px;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: \"\";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 10px;\n height: 10px;\n background-color: " + (primary.fga || '#07e') + ";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.focus:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: " + (primary.bc || '#ccc') + ";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: " + (primary.bc || '#ccc') + ";\n }\n\n label.field.radio.disabled:after {\n background-color: " + (primary.bc || '#ccc') + ";\n }\n\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: 19px;\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: " + (primary.bc || '#ccc') + ";\n }\n\n label.field textarea {\n border: none;" + (boxy ? "\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: " + (active.fg || primary.fga || '#07e') + ";\n " + (!boxy ? ("box-shadow: 0 0.0625em 0 0 " + (active.fg || primary.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: " + (active.fg || primary.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: " + (primary.fg || '#222') + ";\n text-align: " + (boxy ? 'center' : 'left') + ";\n padding: 0.5em " + (boxy ? '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;" + (boxy ? ("\n border-radius: " + (primary.radius || '0.2em') + ";\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 0.0625em;") : ("\n border-bottom-color: " + (primary.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: " + (boxy ? '1.7' : '1.958') + "em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: " + (boxy ? '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 " + (boxy ? ("height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid " + (primary.bg || '#fff') + ";\n margin-left: 0;") :
return ("\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: " + (primary.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 " + (primary.bc || '#ccc') + ";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: " + (primary.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: " + (boxy ? primary.bg || '#fff' : 'transparent') + ";\n }\n\n label.field.focus {\n color: " + (active.fg || primary.fga || '#07e') + ";\n }\n\n label.field.textarea.focus {\n border-color: " + (active.fg || primary.fga || '#07e') + ";\n " + (!boxy ? ("box-shadow: 0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n 0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ";") : '') + "\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: " + (boxy ? '0.0625em' : '0 0 0.0625em 0') + ";\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n box-sizing: border-box;\n background-color: " + (boxy ? primary.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;" + (boxy ? ("\n border-radius: " + (primary.radius || '0.2em') + ";") : '') + "\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input" + (boxy ? '' : ':disabled') + ",\n label.field select" + (boxy ? '' : ':disabled') + " {\n padding: 0 0.75em;\n }\n label.field select" + (boxy ? '' : ':disabled') + " {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\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 " + (!boxy ? ("label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 " + (primary.bc || '#ccc') + ";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em " + (primary.bc || '#ccc') + ",\n -0.0625em 0.0625em " + (primary.bc || '#ccc') + ",\n 0.0625em -0.0625em " + (primary.bc || '#ccc') + ",\n -0.0625em -0.0625em " + (primary.bc || '#ccc') + ";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em 0.0625em " + (active.fg || primary.fga || '#07e') + ",\n 0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ",\n -0.0625em -0.0625em " + (active.fg || primary.fga || '#07e') + ";\n }") : '') + "\n\n /**** CHECK BOXES ****/\n\n label.field.check {\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 {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -3px;\n top: 23px;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n background-color: " + (primary.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 {\n top: 3px;\n left: -3px;\n }\n\n label.field.check input:checked {\n background-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: \"\";\n display: inline-block;\n box-sizing: border-box;\n margin: 3px 11px 3px 1px;\n border: solid 2px; /* Safari */\n border-color: " + (primary.fg || '#222') + ";\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: \"\";\n display: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n background-color: " + (primary.fga || '#07e') + ";\n }\n label.field.check.focus:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.check.checked:after {\n border-color: " + (primary.bg || '#fff') + ";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: " + (primary.bc || '#ccc') + ";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: " + (primary.bc || '#ccc') + ";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: " + (primary.bc || '#ccc') + ";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n 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;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 41px;\n height: 40px;\n background-color: " + (primary.bc || '#ccc') + ";\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 24px) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: \"\";\n display: inline-block;\n box-sizing: border-box;\n margin: 2px 10px 2px 0;\n border: solid 2px; /* Safari */\n border-color: " + (primary.fg || '#222') + ";\n border-radius: 50%;\n width: 20px;\n height: 20px;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: \"\";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 10px;\n height: 10px;\n background-color: " + (primary.fga || '#07e') + ";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio.focus:before {\n border-color: " + (primary.fga || '#07e') + ";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: " + (primary.bc || '#ccc') + ";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: " + (primary.bc || '#ccc') + ";\n }\n\n label.field.radio.disabled:after {\n background-color: " + (primary.bc || '#ccc') + ";\n }\n\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: 19px;\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: " + (primary.bc || '#ccc') + ";\n }\n\n label.field textarea {\n border: none;" + (boxy ? "\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: " + (active.fg || primary.fga || '#07e') + ";\n " + (!boxy ? ("box-shadow: 0 0.0625em 0 0 " + (active.fg || primary.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: " + (active.fg || primary.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: " + (primary.fg || '#222') + ";\n text-align: " + (boxy ? 'center' : 'left') + ";\n padding: 0.5em " + (boxy ? '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;" + (boxy ? ("\n border-radius: " + (primary.radius || '0.2em') + ";\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 0.0625em;") : ("\n border-bottom-color: " + (primary.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: " + (boxy ? '1.7' : '1.958') + "em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: " + (boxy ? '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 " + (boxy ? ("height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid " + (primary.bg || '#fff') + ";\n margin-left: 0;") :
"height: 2.25em;") + "\n }" + (boxy ? ("\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 " + (primary.radius || '0.2em') + " " + (primary.radius || '0.2em') + " 0;\n }\n label.field .with-buttons input {\n border-radius: " + (primary.radius || '0.2em') + " 0 0 " + (primary.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 }\n\n /* inline fields (no labels) */\n label.field.inline {\n 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." + (boxy ? '15' : '1') + "em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: " + (primary.fga || '#07e') + ";\n color: " + (primary.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 ");

@@ -44,0 +44,0 @@ // TODO: other themes

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],n):n(e.RMForm={},e.Ractive)}(this,function(e,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var i="undefined"!=typeof window?window:null;function t(e,n,t){if(i&&i.Ractive&&"object"==typeof i.Ractive[n]){var l=document.currentScript;if(l||(l=(l=document.querySelectorAll("script"))[l.length-1]),l){var a=l.getAttribute("data-alias");a&&(a=(a=a.split("&")).reduce(function(e,n){var i=n.split("="),t=i[0],l=i[1];return e[t]=l,e},{})),Ractive[n][a&&a[e]||e]=t}}}function l(e){var n=Object.assign({},e("raui.primary"),e("raui.form.primary")),i=Object.assign({},e("raui.primary.active"),e("raui.form.primary.active")),t=e("raui.form.boxy");return"\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: "+(n.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 "+(n.bc||"#ccc")+";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: "+(n.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: "+(t?n.bg||"#fff":"transparent")+";\n }\n\n label.field.focus {\n color: "+(i.fg||n.fga||"#07e")+";\n }\n\n label.field.textarea.focus {\n border-color: "+(i.fg||n.fga||"#07e")+";\n "+(t?"":"box-shadow: 0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n 0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+";")+"\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: "+(t?"0.0625em":"0 0 0.0625em 0")+";\n border-color: "+(n.bc||"#ccc")+";\n border-style: solid;\n box-sizing: border-box;\n background-color: "+(t?n.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;"+(t?"\n border-radius: "+(n.radius||"0.2em")+";":"")+"\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input"+(t?"":":disabled")+",\n label.field select"+(t?"":":disabled")+" {\n padding: 0 0.75em;\n }\n label.field select"+(t?"":":disabled")+" {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\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 "+(t?"":"label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 "+(n.bc||"#ccc")+";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em "+(n.bc||"#ccc")+",\n -0.0625em 0.0625em "+(n.bc||"#ccc")+",\n 0.0625em -0.0625em "+(n.bc||"#ccc")+",\n -0.0625em -0.0625em "+(n.bc||"#ccc")+";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n 0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+";\n }")+"\n\n /**** CHECK BOXES ****/\n\n label.field.check {\n position:relative;\n z-index: 0;\n overflow: visible;\n cursor: pointer;\n padding-top: 2.2em;\n }\n label.field.check.inline {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -3px;\n top: 23px;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n background-color: "+(n.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 {\n top: 3px;\n left: -3px;\n }\n\n label.field.check input:checked {\n background-color: "+(n.fga||"#07e")+';\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 3px 11px 3px 1px;\n border: solid 2px; /* Safari */\n border-color: '+(n.fg||"#222")+';\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: "";\n display: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: '+(n.fga||"#07e")+";\n background-color: "+(n.fga||"#07e")+";\n }\n label.field.check.focus:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.check.checked:after {\n border-color: "+(n.bg||"#fff")+";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: "+(n.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: "+(n.bc||"#ccc")+";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: "+(n.bc||"#ccc")+";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n 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;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 41px;\n height: 40px;\n background-color: "+(n.bc||"#ccc")+';\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 24px) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 2px 10px 2px 0;\n border: solid 2px; /* Safari */\n border-color: '+(n.fg||"#222")+';\n border-radius: 50%;\n width: 20px;\n height: 20px;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: "";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 10px;\n height: 10px;\n background-color: '+(n.fga||"#07e")+";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio.checked:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio.focus:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: "+(n.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: "+(n.bc||"#ccc")+";\n }\n\n label.field.radio.disabled:after {\n background-color: "+(n.bc||"#ccc")+";\n }\n\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: 19px;\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: "+(n.bc||"#ccc")+";\n }\n\n label.field textarea {\n border: none;"+(t?"\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: "+(i.fg||n.fga||"#07e")+";\n "+(t?"":"box-shadow: 0 0.0625em 0 0 "+(i.fg||n.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: "+(i.fg||n.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: "+(n.fg||"#222")+";\n text-align: "+(t?"center":"left")+";\n padding: 0.5em "+(t?"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;"+(t?"\n border-radius: "+(n.radius||"0.2em")+";\n border-color: "+(n.bc||"#ccc")+";\n border-style: solid;\n border-width: 0.0625em;":"\n border-bottom-color: "+(n.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: "+(t?"1.7":"1.958")+"em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: "+(t?"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 "+(t?"height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid "+(n.bg||"#fff")+";\n margin-left: 0;":"height: 2.25em;")+"\n }"+(t?"\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 "+(n.radius||"0.2em")+" "+(n.radius||"0.2em")+" 0;\n }\n label.field .with-buttons input {\n border-radius: "+(n.radius||"0.2em")+" 0 0 "+(n.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 }\n\n /* inline fields (no labels) */\n label.field.inline {\n 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."+(t?"15":"1")+"em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: "+(n.fga||"#07e")+";\n color: "+(n.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 "}function a(){}function o(e){~this.className.indexOf("focus")||(this.className+=" focus")}function r(e){this.className=this.className.replace(/\bfocus\b/g,"").trim()}function c(e){var n,i,t,l,c,d,f,s,b,p,u,m=this.getContext(e);function h(){var a=g().split(/\s+/).filter(function(e){return!!e});(n=!!~a.indexOf("field"))||(a.push("field"),n=!0),(i=e.querySelector("input[type=checkbox]"))&&!~a.indexOf("check")&&a.push("check"),(t=e.querySelector("input[type=radio]"))&&!~a.indexOf("radio")&&a.push("radio");var o=i||t;o&&o.checked&&!~a.indexOf("checked")&&a.push("checked"),o&&o.disabled&&!~a.indexOf("disabled")&&a.push("disabled"),!o&&p?(p.cancel(),p=0,u&&(u.disconnect(),u=0),delete o._form_callback):o&&(o._form_callback=function(n,i){if(void 0===i&&(i=!0),i&&"radio"===o.type&&o.name){var t=[];t.push.apply(t,document.querySelectorAll("input[type=radio][name="+o.name+"]")),(t=t.filter(function(e){return e!==o})).forEach(function(e){return e._form_callback&&e._form_callback(n,!1)})}var l=o.checked;l&&!~e.className.indexOf("checked")?e.className+=" checked":!l&&~e.className.indexOf("checked")&&(e.className=e.className.replace(/\bchecked\b/g,"").replace(/ +/g," ").trim())},MutationObserver&&(u=new MutationObserver(function(){var n;(n=o.disabled)&&!~e.className.indexOf("disabled")?e.className+=" disabled":!n&&~e.className.indexOf("disabled")&&(e.className=e.className.replace(/\bdisabled\b/g,"").replace(/ +/g," ").trim())})).observe(o,{attributes:!0}),p=this.getContext(o).listen("change",o._form_callback)),(l=!!e.querySelector("textarea"))&&!~a.indexOf("textarea")&&a.push("textarea"),(c=!!e.querySelector("select"))&&!~a.indexOf("select")&&a.push("select"),(d=!!e.querySelector("input[type=file]"))&&!~a.indexOf("file")&&a.push("file"),(f=!!(f=e.querySelector("button"))&&f.parentNode===e)&&!~a.indexOf("button")&&a.push("button"),(s=!!e.querySelector("div"))&&!~a.indexOf("plain")&&a.push("plain"),(b=!(i||t||d||!e.querySelector("input")))&&!~a.indexOf("input")&&a.push("input"),e.className=a.join(" ")}function g(){var a=e.className;return n||(a=a.replace(/\bfield\b/g,"").trim()),i||(a=a.replace(/\bcheck(ed)?\b/g,"").trim()),t||(a=a.replace(/\bradio\b/g,"").trim()),l||(a=a.replace(/\btextarea\b/g,"").trim()),c||(a=a.replace(/\bselect\b/g,"").trim()),d||(a=a.replace(/\bfile\b/g,"").trim()),f||(a=a.replace(/\bbutton\b/g,"").trim()),s||(a=a.replace(/\bplain\b/g,"").trim()),b||(a=a.replace(/\binput\b/g,"").trim()),a=a.replace(/ +/g," ")}var x=m.listen("focusin",o),y=m.listen("focusout",r);return h.call(this),{update:a,invalidate:h.bind(this),teardown:function(){var n=g();n=n.replace(/\bfocus\b/g,"").trim(),x.cancel(),y.cancel(),p&&p.cancel(),e.className=n}}}function d(e,n){if(!e)return!1;for(var i=0;i<e.length;i++){if(e[i].e===n)return!0;if(e[i].f&&d(e[i].f,n))return!0}return!1}c.style=l;var f=n.macro(function(e){var n=[],i=(e.template.m||[]).slice(),t=e.template.f||[],l=i.find(function(e){return"value"===e.n}),a=i.find(function(e){return"type"===e.n}),o=i.find(function(e){return"tip"===e.n});if(o&&i.splice(i.indexOf(o),1),a&&"function"==typeof f.types[a.f])n.push.apply(n,f.types[a.f](i,t,e));else if(l){var r={t:7,e:"input",m:[l]};if(d(t,"option")&&(r.e="select",r.f=t),a&&(r.m.push(a),"checkbox"===a.f||"radio"===a.f)){var c=i.find(function(e){return"target"===e.n});c?r.m.push(Object.assign({},c,{n:"name"})):r.m.splice(r.m.indexOf(l),1,Object.assign({},l,{n:"checked"}))}r.m=r.m.concat(i.filter(function(e){return 73===e.t||"placeholder"===e.n})),n.push(r);var s=t.filter(function(e){return"button"===e.e||d(e.f,"button")});s.length&&(n.push.apply(n,s),n=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:n}])}else{var b=t.filter(function(e){return e.e});b.find(function(e){return"button"===e.e})&&b.length>1?n=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:t}]:n.push.apply(n,t)}var p=i.find(function(e){return"label"===e.n});o&&n.unshift({t:7,e:"span",m:[{t:13,n:"class",f:"field-tip"+(p?"":" field-solo-tip"),g:1},{t:13,n:"title",f:o.f},{t:70,n:["click"],f:{r:[],s:"[false]"}}],f:"?"}),p?n.unshift(p.f):n.unshift(" ");var u={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})),f:n};i.find(function(e){return"inline"===e.n})&&u.m.push({t:13,n:"class",f:"inline"}),e.setTemplate([u])});function s(e){return"function"==typeof e.focus&&e.focus(),{teardown:a}}function b(e){return void 0===e&&(e={}),function(n){var i=n.Ractive,t=n.instance;if(!i.isInstance(t)&&e.includeStyle)if(t===i)i.addCSS("form-decorator",l);else{var a=t.css;t.css=function(e){return("function"!=typeof a?a||"":a(e))+l(e)}}t.partials[e.name||"field"]=f,t.decorators[e.name||"field"]=c,t.decorators[e.autofocusName||"autofocus"]=s}}f.types={},t("field","decorators",c),t("field","partials",f),t("autofocus","decorators",s),e.style=l,e.field=c,e.macro=f,e.autofocus=s,e.plugin=b,e.default=b,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],n):n(e.RMForm={},e.Ractive)}(this,function(e,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var i="undefined"!=typeof window?window:null;function t(e,n,t){if(i&&i.Ractive&&"object"==typeof i.Ractive[n]){var l=document.currentScript;if(l||(l=(l=document.querySelectorAll("script"))[l.length-1]),l){var a=l.getAttribute("data-alias");a&&(a=(a=a.split("&")).reduce(function(e,n){var i=n.split("="),t=i[0],l=i[1];return e[t]=l,e},{})),Ractive[n][a&&a[e]||e]=t}}}function l(e){var n=Object.assign({},e("raui.primary"),e("raui.form.primary")),i=Object.assign({},e("raui.primary.active"),e("raui.form.primary.active")),t=e("raui.form.boxy");return"\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: "+(n.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 "+(n.bc||"#ccc")+";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: "+(n.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: "+(t?n.bg||"#fff":"transparent")+";\n }\n\n label.field.focus {\n color: "+(i.fg||n.fga||"#07e")+";\n }\n\n label.field.textarea.focus {\n border-color: "+(i.fg||n.fga||"#07e")+";\n "+(t?"":"box-shadow: 0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n 0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+";")+"\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: "+(t?"0.0625em":"0 0 0.0625em 0")+";\n border-color: "+(n.bc||"#ccc")+";\n border-style: solid;\n box-sizing: border-box;\n background-color: "+(t?n.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;"+(t?"\n border-radius: "+(n.radius||"0.2em")+";":"")+"\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input"+(t?"":":disabled")+",\n label.field select"+(t?"":":disabled")+" {\n padding: 0 0.75em;\n }\n label.field select"+(t?"":":disabled")+" {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\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 "+(t?"":"label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 "+(n.bc||"#ccc")+";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em "+(n.bc||"#ccc")+",\n -0.0625em 0.0625em "+(n.bc||"#ccc")+",\n 0.0625em -0.0625em "+(n.bc||"#ccc")+",\n -0.0625em -0.0625em "+(n.bc||"#ccc")+";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n 0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+";\n }")+"\n\n /**** CHECK BOXES ****/\n\n label.field.check {\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 {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -3px;\n top: 23px;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n background-color: "+(n.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 {\n top: 3px;\n left: -3px;\n }\n\n label.field.check input:checked {\n background-color: "+(n.fga||"#07e")+';\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 3px 11px 3px 1px;\n border: solid 2px; /* Safari */\n border-color: '+(n.fg||"#222")+';\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: "";\n display: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: '+(n.fga||"#07e")+";\n background-color: "+(n.fga||"#07e")+";\n }\n label.field.check.focus:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.check.checked:after {\n border-color: "+(n.bg||"#fff")+";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: "+(n.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: "+(n.bc||"#ccc")+";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: "+(n.bc||"#ccc")+";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n 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;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 41px;\n height: 40px;\n background-color: "+(n.bc||"#ccc")+';\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 24px) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 2px 10px 2px 0;\n border: solid 2px; /* Safari */\n border-color: '+(n.fg||"#222")+';\n border-radius: 50%;\n width: 20px;\n height: 20px;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: "";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 10px;\n height: 10px;\n background-color: '+(n.fga||"#07e")+";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio.checked:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio.focus:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: "+(n.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: "+(n.bc||"#ccc")+";\n }\n\n label.field.radio.disabled:after {\n background-color: "+(n.bc||"#ccc")+";\n }\n\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: 19px;\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: "+(n.bc||"#ccc")+";\n }\n\n label.field textarea {\n border: none;"+(t?"\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: "+(i.fg||n.fga||"#07e")+";\n "+(t?"":"box-shadow: 0 0.0625em 0 0 "+(i.fg||n.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: "+(i.fg||n.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: "+(n.fg||"#222")+";\n text-align: "+(t?"center":"left")+";\n padding: 0.5em "+(t?"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;"+(t?"\n border-radius: "+(n.radius||"0.2em")+";\n border-color: "+(n.bc||"#ccc")+";\n border-style: solid;\n border-width: 0.0625em;":"\n border-bottom-color: "+(n.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: "+(t?"1.7":"1.958")+"em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: "+(t?"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 "+(t?"height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid "+(n.bg||"#fff")+";\n margin-left: 0;":"height: 2.25em;")+"\n }"+(t?"\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 "+(n.radius||"0.2em")+" "+(n.radius||"0.2em")+" 0;\n }\n label.field .with-buttons input {\n border-radius: "+(n.radius||"0.2em")+" 0 0 "+(n.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 }\n\n /* inline fields (no labels) */\n label.field.inline {\n 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."+(t?"15":"1")+"em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: "+(n.fga||"#07e")+";\n color: "+(n.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 "}function a(){}function o(e){~this.className.indexOf("focus")||(this.className+=" focus")}function r(e){this.className=this.className.replace(/\bfocus\b/g,"").trim()}function c(e){var n,i,t,l,c,d,f,s,b,p,u,m=this.getContext(e);function h(){var a=g().split(/\s+/).filter(function(e){return!!e});(n=!!~a.indexOf("field"))||(a.push("field"),n=!0),(i=e.querySelector("input[type=checkbox]"))&&!~a.indexOf("check")&&a.push("check"),(t=e.querySelector("input[type=radio]"))&&!~a.indexOf("radio")&&a.push("radio");var o=i||t;o&&o.checked&&!~a.indexOf("checked")&&a.push("checked"),o&&o.disabled&&!~a.indexOf("disabled")&&a.push("disabled"),!o&&p?(p.cancel(),p=0,u&&(u.disconnect(),u=0),delete o._form_callback):o&&(o._form_callback=function(n,i){if(void 0===i&&(i=!0),i&&"radio"===o.type&&o.name){var t=[];t.push.apply(t,document.querySelectorAll("input[type=radio][name="+o.name+"]")),(t=t.filter(function(e){return e!==o})).forEach(function(e){return e._form_callback&&e._form_callback(n,!1)})}var l=o.checked;l&&!~e.className.indexOf("checked")?e.className+=" checked":!l&&~e.className.indexOf("checked")&&(e.className=e.className.replace(/\bchecked\b/g,"").replace(/ +/g," ").trim())},MutationObserver&&(u=new MutationObserver(function(){var n;(n=o.disabled)&&!~e.className.indexOf("disabled")?e.className+=" disabled":!n&&~e.className.indexOf("disabled")&&(e.className=e.className.replace(/\bdisabled\b/g,"").replace(/ +/g," ").trim())})).observe(o,{attributes:!0}),p=this.getContext(o).listen("change",o._form_callback)),(l=!!e.querySelector("textarea"))&&!~a.indexOf("textarea")&&a.push("textarea"),(c=!!e.querySelector("select"))&&!~a.indexOf("select")&&a.push("select"),(d=!!e.querySelector("input[type=file]"))&&!~a.indexOf("file")&&a.push("file"),(f=!!(f=e.querySelector("button"))&&f.parentNode===e)&&!~a.indexOf("button")&&a.push("button"),(s=!!e.querySelector("div"))&&!~a.indexOf("plain")&&a.push("plain"),(b=!(i||t||d||!e.querySelector("input")))&&!~a.indexOf("input")&&a.push("input"),e.className=a.join(" ")}function g(){var a=e.className;return n||(a=a.replace(/\bfield\b/g,"").trim()),i||(a=a.replace(/\bcheck(ed)?\b/g,"").trim()),t||(a=a.replace(/\bradio\b/g,"").trim()),l||(a=a.replace(/\btextarea\b/g,"").trim()),c||(a=a.replace(/\bselect\b/g,"").trim()),d||(a=a.replace(/\bfile\b/g,"").trim()),f||(a=a.replace(/\bbutton\b/g,"").trim()),s||(a=a.replace(/\bplain\b/g,"").trim()),b||(a=a.replace(/\binput\b/g,"").trim()),a=a.replace(/ +/g," ")}var x=m.listen("focusin",o),y=m.listen("focusout",r);return h.call(this),{update:a,invalidate:h.bind(this),teardown:function(){var n=g();n=n.replace(/\bfocus\b/g,"").trim(),x.cancel(),y.cancel(),p&&p.cancel(),e.className=n}}}function d(e,n){if(!e)return!1;for(var i=0;i<e.length;i++){if(e[i].e===n)return!0;if(e[i].f&&d(e[i].f,n))return!0}return!1}c.style=l;var f=n.macro(function(e){var n=[],i=(e.template.m||[]).slice(),t=e.template.f||[],l=i.find(function(e){return"value"===e.n}),a=i.find(function(e){return"type"===e.n}),o=i.find(function(e){return"tip"===e.n});if(o&&i.splice(i.indexOf(o),1),a&&"function"==typeof f.types[a.f])n.push.apply(n,f.types[a.f](i,t,e));else if(l){var r={t:7,e:"input",m:[l]};if(d(t,"option")&&(r.e="select",r.f=t),a&&(r.m.push(a),"checkbox"===a.f||"radio"===a.f)){var c=i.find(function(e){return"target"===e.n});c?r.m.push(Object.assign({},c,{n:"name"})):r.m.splice(r.m.indexOf(l),1,Object.assign({},l,{n:"checked"}))}r.m=r.m.concat(i.filter(function(e){return 73===e.t||"placeholder"===e.n})),n.push(r);var s=t.filter(function(e){return"button"===e.e||d(e.f,"button")});s.length&&(n.push.apply(n,s),n=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:n}])}else{var b=t.filter(function(e){return e.e});b.find(function(e){return"button"===e.e})&&b.length>1?n=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:t}]:n.push.apply(n,t)}var p=i.find(function(e){return"label"===e.n});o&&n.unshift({t:7,e:"span",m:[{t:13,n:"class",f:"field-tip"+(p?"":" field-solo-tip"),g:1},{t:13,n:"title",f:o.f},{t:70,n:["click"],f:{r:[],s:"[false]"}}],f:"?"}),p?n.unshift(p.f):n.unshift(" ");var u={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})),f:n};i.find(function(e){return"inline"===e.n})&&u.m.push({t:13,n:"class",f:"inline"}),e.setTemplate([u])});function s(e){return"function"==typeof e.focus&&e.focus(),{teardown:a}}function b(e){return void 0===e&&(e={}),function(n){var i=n.Ractive,t=n.instance;if(!i.isInstance(t)&&e.includeStyle)if(t===i)i.addCSS("form-decorator",l);else{var a=t.css;t.css=function(e){return("function"!=typeof a?a||"":a(e))+l(e)}}t.partials[e.name||"field"]=f,t.decorators[e.name||"field"]=c,t.decorators[e.autofocusName||"autofocus"]=s}}f.types={},t("field","decorators",c),t("field","partials",f),t("autofocus","decorators",s),e.style=l,e.field=c,e.macro=f,e.autofocus=s,e.plugin=b,e.default=b,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -139,2 +139,3 @@ (function (global, factory) {

function resize(size) {
if (typeof opts.offset === 'number') { size -= opts.offset; }
if (!opts.type || opts.type === 'class') {

@@ -141,0 +142,0 @@ var match, max = -1;

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.RMGrid={})}(this,function(e){"use strict";var t,i="undefined"!=typeof window?window:null;var n={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,20,24],max:"64em",value:40},xlarge:{units:[2,3,4,5,6,8,10,12,20,24,32],max:"100em",value:50},ginormous:{units:[2,3,4,5,6,8,10,12,20,24,32,64],max:"150em",value:60}},r={"grid grid-root":/\bgrid grid-root\b/g},o=/\s+/g;function a(e,i){var a,l,s=this.getContext(e),d=this,u=i||{};function c(t){if(!u.type||"class"===u.type){var i,n=-1;for(var d in a)a[d]<=t&&(r[d].lastIndex=-1,a[d]>n&&(i=d,n=a[d])),e.className=e.className.replace(r[d],"").trim();if(!i)return;r[i].test(e.className)||(e.className+=" "+i),u.value&&s.set(u.value,l[i].value),u.name&&s.set(u.name,i),e.className=e.className.replace(o," ")}}function f(){var i=(t||(t=document.createElement("div"),document.body.appendChild(t)),t);for(var o in l=d.get("@style.break")||n,a={},l)i.style.width=l[o].max,a[o]=i.clientWidth,r[o]||(r[o]=new RegExp("\\b"+o+"\\b","g"));i.style.width=0,c(e.clientWidth)}var p=this.observe("@style.break",f,{init:!1}),m=s.observe("@local.width",c,{init:!1}),g=function(e,t){var i=t.context||this.getContext(e),n={position:e.style.position,overflowY:e.style.overflowY};""!==e.style.position&&"static"!==e.style.position||(e.style.position="relative");var r=document.createElement("object");r.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;"),r.type="text/html";var o=function(){t.offsetWidth&&i.set(t.offsetWidth,e.offsetWidth),t.offsetHeight&&i.set(t.offsetHeight,e.offsetHeight),t.clientWidth&&i.set(t.clientWidth,e.clientWidth),t.clientHeight&&i.set(t.clientHeight,e.clientHeight),t.diffWidth&&i.set(t.diffWidth,e.offsetWidth-e.clientWidth),t.diffHeight&&i.set(t.diffHeight,e.offsetHeight-e.clientHeight)};return r.onload=function(){r.contentDocument.defaultView.addEventListener("resize",o),o()},/Trident/.test(navigator.userAgent)?(e.appendChild(r),r.data="about:blank"):(r.data="about:blank",e.appendChild(r)),{refresh:o,teardown:function(){e.removeChild(r),e.style.position=n.position,e.style.overflowY=n.overflowY}}}.call(this,e,{clientWidth:"@local.width"});return e.className+=" grid grid-root",u.immediate?f():requestAnimationFrame(f),{update:function(t){u=t||{},requestAnimationFrame(function(){return c(e.clientWidth)})},teardown:function(){e.className=e.className.replace(r["grid grid-root"],"").trim(),m.cancel(),p.cancel(),g.teardown()}}}function l(e,t){var i=e("raui.grid.break")||t||n,r=(e("raui.grid.wrappers")||[".row-wrap > ",".row-wrap > .row-wrap > "]).slice();r.unshift("");var o,a=".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; }",l=Object.keys(i).map(function(e){return(i[e].key=e)&&i[e]});l.sort(function(e,t){return e.value>t.value?1:e.value<t.value?-1:0});var s={};l.reverse().reduce(function(e,t){return e.push(t.key),s[t.key]=e.slice(),e},[]);var d="",u="";return l.reverse().forEach(function(t){var i=t.prefix||t.key[0];t.units.forEach(function(n){u+="\n"+s[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+i+"1, ."+e+" > "+t+".row > ."+i+"1, ."+e+" ."+i+"-n1, ."+e+" .row-"+i+"-n1 > *"}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: 100%; flex-grow: 0; flex-shrink: 0; }\n"+s[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+i+"0, ."+e+" > "+t+".row > ."+i+"0, ."+e+" ."+i+"-n0, ."+e+" .row-"+i+"-n0 > *"}).join(", ")}).join(", ")+" { display: none; flex-grow: 0; flex-shrink: 0; }",d+="\n"+s[t.key].map(function(e){return"."+e+" .row-"+i+"-n1 > *"}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: 100%; }\n"+s[t.key].map(function(e){return"."+e+" .row-"+i+"-n0 > *"}).join(", ")+" { display: none; }";for(var a=function(a){o=(o=""+a/n*100).substr(0,o.indexOf(".")+3),d+="\n"+s[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+".row-"+i+a+"-"+n+" > *, ."+e+" .row-"+i+"-n"+a+"-"+n+" > *, ."+e+" .row > ."+i+"-n"+a+"-"+n}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: "+o+"%; }",u+="\n"+s[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+i+a+"-"+n+", ."+e+" > "+t+".row > ."+i+a+"-"+n+", ."+e+" ."+i+"-n"+a+"-"+n+", ."+e+" .row-"+i+"-n"+a+"-"+n+" > *"}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: "+o+"%; flex-grow: 0; flex-shrink: 0; }"},l=1;l<n;l++)a(l)}),s[t.key].forEach(function(e){return u+=r.map(function(t){return"."+e+" > "+t+".row > ."+i+"-fill"}).join(", ")+", ."+e+" ."+i+"-nfill { width: auto; flex-grow: 2; flex-shink: 2; }\n"+r.map(function(t){return"."+e+" > "+t+".row > ."+i+"-auto"}).join(", ")+", ."+e+" ."+i+"-nauto { width: auto; flex-shrink: 2; }"})}),a+=d+u}function s(e){return void 0===e&&(e={}),function(t){var i=t.Ractive,n=t.instance;if(!i.isInstance(n)&&e.includeStyle)if(n===i)i.addCSS("grid-decorator",l);else{var r=n.css;n.css=function(t){return("function"!=typeof r?r||"":r(t))+l(t,e.defaults)}}n.decorators[e.name||"grid"]=a}}a.style=l,function(e,t,n){if(i&&i.Ractive&&"object"==typeof i.Ractive[t]){var r=document.currentScript;if(r||(r=(r=document.querySelectorAll("script"))[r.length-1]),r){var o=r.getAttribute("data-alias");o&&(o=(o=o.split("&")).reduce(function(e,t){var i=t.split("="),n=i[0],r=i[1];return e[n]=r,e},{})),Ractive[t][o&&o[e]||e]=n}}}("grid","decorators",a),e.grid=a,e.style=l,e.plugin=s,e.default=s,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.RMGrid={})}(this,function(e){"use strict";var t,i="undefined"!=typeof window?window:null;var n={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,20,24],max:"64em",value:40},xlarge:{units:[2,3,4,5,6,8,10,12,20,24,32],max:"100em",value:50},ginormous:{units:[2,3,4,5,6,8,10,12,20,24,32,64],max:"150em",value:60}},r={"grid grid-root":/\bgrid grid-root\b/g},o=/\s+/g;function a(e,i){var a,s,l=this.getContext(e),d=this,u=i||{};function f(t){if("number"==typeof u.offset&&(t-=u.offset),!u.type||"class"===u.type){var i,n=-1;for(var d in a)a[d]<=t&&(r[d].lastIndex=-1,a[d]>n&&(i=d,n=a[d])),e.className=e.className.replace(r[d],"").trim();if(!i)return;r[i].test(e.className)||(e.className+=" "+i),u.value&&l.set(u.value,s[i].value),u.name&&l.set(u.name,i),e.className=e.className.replace(o," ")}}function c(){var i=(t||(t=document.createElement("div"),document.body.appendChild(t)),t);for(var o in s=d.get("@style.break")||n,a={},s)i.style.width=s[o].max,a[o]=i.clientWidth,r[o]||(r[o]=new RegExp("\\b"+o+"\\b","g"));i.style.width=0,f(e.clientWidth)}var p=this.observe("@style.break",c,{init:!1}),m=l.observe("@local.width",f,{init:!1}),g=function(e,t){var i=t.context||this.getContext(e),n={position:e.style.position,overflowY:e.style.overflowY};""!==e.style.position&&"static"!==e.style.position||(e.style.position="relative");var r=document.createElement("object");r.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;"),r.type="text/html";var o=function(){t.offsetWidth&&i.set(t.offsetWidth,e.offsetWidth),t.offsetHeight&&i.set(t.offsetHeight,e.offsetHeight),t.clientWidth&&i.set(t.clientWidth,e.clientWidth),t.clientHeight&&i.set(t.clientHeight,e.clientHeight),t.diffWidth&&i.set(t.diffWidth,e.offsetWidth-e.clientWidth),t.diffHeight&&i.set(t.diffHeight,e.offsetHeight-e.clientHeight)};return r.onload=function(){r.contentDocument.defaultView.addEventListener("resize",o),o()},/Trident/.test(navigator.userAgent)?(e.appendChild(r),r.data="about:blank"):(r.data="about:blank",e.appendChild(r)),{refresh:o,teardown:function(){e.removeChild(r),e.style.position=n.position,e.style.overflowY=n.overflowY}}}.call(this,e,{clientWidth:"@local.width"});return e.className+=" grid grid-root",u.immediate?c():requestAnimationFrame(c),{update:function(t){u=t||{},requestAnimationFrame(function(){return f(e.clientWidth)})},teardown:function(){e.className=e.className.replace(r["grid grid-root"],"").trim(),m.cancel(),p.cancel(),g.teardown()}}}function s(e,t){var i=e("raui.grid.break")||t||n,r=(e("raui.grid.wrappers")||[".row-wrap > ",".row-wrap > .row-wrap > "]).slice();r.unshift("");var o,a=".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; }",s=Object.keys(i).map(function(e){return(i[e].key=e)&&i[e]});s.sort(function(e,t){return e.value>t.value?1:e.value<t.value?-1:0});var l={};s.reverse().reduce(function(e,t){return e.push(t.key),l[t.key]=e.slice(),e},[]);var d="",u="";return s.reverse().forEach(function(t){var i=t.prefix||t.key[0];t.units.forEach(function(n){u+="\n"+l[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+i+"1, ."+e+" > "+t+".row > ."+i+"1, ."+e+" ."+i+"-n1, ."+e+" .row-"+i+"-n1 > *"}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: 100%; flex-grow: 0; flex-shrink: 0; }\n"+l[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+i+"0, ."+e+" > "+t+".row > ."+i+"0, ."+e+" ."+i+"-n0, ."+e+" .row-"+i+"-n0 > *"}).join(", ")}).join(", ")+" { display: none; flex-grow: 0; flex-shrink: 0; }",d+="\n"+l[t.key].map(function(e){return"."+e+" .row-"+i+"-n1 > *"}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: 100%; }\n"+l[t.key].map(function(e){return"."+e+" .row-"+i+"-n0 > *"}).join(", ")+" { display: none; }";for(var a=function(a){o=(o=""+a/n*100).substr(0,o.indexOf(".")+3),d+="\n"+l[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+".row-"+i+a+"-"+n+" > *, ."+e+" .row-"+i+"-n"+a+"-"+n+" > *, ."+e+" .row > ."+i+"-n"+a+"-"+n}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: "+o+"%; }",u+="\n"+l[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+i+a+"-"+n+", ."+e+" > "+t+".row > ."+i+a+"-"+n+", ."+e+" ."+i+"-n"+a+"-"+n+", ."+e+" .row-"+i+"-n"+a+"-"+n+" > *"}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: "+o+"%; flex-grow: 0; flex-shrink: 0; }"},s=1;s<n;s++)a(s)}),l[t.key].forEach(function(e){return u+=r.map(function(t){return"."+e+" > "+t+".row > ."+i+"-fill"}).join(", ")+", ."+e+" ."+i+"-nfill { width: auto; flex-grow: 2; flex-shink: 2; }\n"+r.map(function(t){return"."+e+" > "+t+".row > ."+i+"-auto"}).join(", ")+", ."+e+" ."+i+"-nauto { width: auto; flex-shrink: 2; }"})}),a+=d+u}function l(e){return void 0===e&&(e={}),function(t){var i=t.Ractive,n=t.instance;if(!i.isInstance(n)&&e.includeStyle)if(n===i)i.addCSS("grid-decorator",s);else{var r=n.css;n.css=function(t){return("function"!=typeof r?r||"":r(t))+s(t,e.defaults)}}n.decorators[e.name||"grid"]=a}}a.style=s,function(e,t,n){if(i&&i.Ractive&&"object"==typeof i.Ractive[t]){var r=document.currentScript;if(r||(r=(r=document.querySelectorAll("script"))[r.length-1]),r){var o=r.getAttribute("data-alias");o&&(o=(o=o.split("&")).reduce(function(e,t){var i=t.split("="),n=i[0],r=i[1];return e[n]=r,e},{})),Ractive[t][o&&o[e]||e]=n}}}("grid","decorators",a),e.grid=a,e.style=s,e.plugin=l,e.default=l,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -100,3 +100,5 @@ (function (global, factory) {

range.push(dir);
node.setSelectionRange.apply(node, range);
try {
node.setSelectionRange.apply(node, range);
} catch (e) {}
}

@@ -103,0 +105,0 @@

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.RMNumericInput={})}(this,function(e){"use strict";var t=/[^-0-9\.]/g,n=/[-0-9\.]/,i=/[^0-9\.]/g,r=/(\d)(?=(\d{3})+$)/g,l=/(\d)(?=(\d{3})+\.)/g,s=/\./g,u=/\.$/,a=/^(0(?!\.))+/;function c(e,t){return e=e||"",0===t&&(e=e.replace(/\..*/,"")),e.replace(-1===e.indexOf(".")?r:l,"$1,")}function o(e){return void 0===e&&(e={}),function(r,l){void 0===l&&(l={}),"string"==typeof l&&(l={bind:l});var o=Object.assign({},e,l),f=this.getContext(r),d=[],p=!1,g=!1;"string"!=typeof o.bind&&delete o.bind;var h=r.getAttribute("type");function b(){if(!p){var e=r.value,l=[e.substr(0,r.selectionStart).replace(t,"").length,e.substr(0,r.selectionEnd).replace(t,"").length],d=r.selectionDirection,h=e.replace(t,"");if(h=(h[0]||"")+h.substr(1).replace(i,""),a.test(h)&&g){var b=h.length;h=h.replace(a,""),l[0]-=b-h.length,l[1]-=b-h.length}var v=h.indexOf(".");if(~v){var m=h.substr(0,v),y=h.substr(v+1).replace(s,"");"number"==typeof o.whole&&m.length>o.whole&&(m=m.substr(0,o.whole)),"number"==typeof o.decimal&&y.length>o.decimal&&(y=y.substr(0,o.decimal)),h=m+"."+y}else"number"==typeof o.whole&&h.length>o.whole&&(h=h.substr(0,o.whole));o.bind&&(p=!0,f.set(o.bind,h.replace(u,"")),p=!1),h=""+(o.prefix||"")+c(h)+(o.suffix||"");for(var x=0,S=0,R=[],w=0;w<h.length&&x<2;w++)n.test(h[w])&&S++,S===l[x]&&(R[x++]=w+1,l[x]===S&&(R[x++]=w+1));R.length<1&&R.push(h.length),R.length<2&&R.push(h.length),r.value=h,R.push(d),r.setSelectionRange.apply(r,R)}}return r.setAttribute("type","tel"),r.className+=" rn-numeric",d.push(f.listen("input",b).cancel),d.push(f.listen("blur",function(){var e=r.value.replace(t,"");r.value=e.replace(u,""),o.bind&&(p=!0,f.set(o.bind,r.value),p=!1),r.setSelectionRange(0,0),g=!0,b(),g=!1}).cancel),d.push(f.listen("focus",function(){0===r.selectionStart&&0===r.selectionEnd&&setTimeout(function(){var e,t=r.value;if(n.test(t))if(s.test(t))e=t.indexOf("."),r.setSelectionRange(e,e);else if(n.test(t)){for(var i=t.length;i--;)if(n.test(t[i])){e=i+1,r.setSelectionRange(e,e);break}}else e=t.length-(o.suffix||"").length,r.setSelectionRange(e,e);else e=(o.prefix||"").length,r.setSelectionRange(e,e)})}).cancel),o.bind&&f.observe(o.bind,function(e){if(!p){var t=f.get(o.bind);r.value=t,b()}},{defer:!0}),{teardown:function(){d.forEach(function(e){return e()}),r.setAttribute("type",h),r.className=r.className.replace(/ ?rn-numeric/,"")}}}}var f=!1;function d(e){return void 0===e&&(e={}),function(t){var n=t.Ractive;t.instance.decorators[e.name||"numeric"]=o(e),f||(f=!0,n.addCSS("rn-numeric","input.rn-numeric { text-align: right; }"))}}e.number=c,e.numeric=o,e.plugin=d,e.default=d,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.RMNumericInput={})}(this,function(e){"use strict";var t=/[^-0-9\.]/g,n=/[-0-9\.]/,i=/[^0-9\.]/g,r=/(\d)(?=(\d{3})+$)/g,l=/(\d)(?=(\d{3})+\.)/g,s=/\./g,u=/\.$/,c=/^(0(?!\.))+/;function a(e,t){return e=e||"",0===t&&(e=e.replace(/\..*/,"")),e.replace(-1===e.indexOf(".")?r:l,"$1,")}function o(e){return void 0===e&&(e={}),function(r,l){void 0===l&&(l={}),"string"==typeof l&&(l={bind:l});var o=Object.assign({},e,l),f=this.getContext(r),d=[],p=!1,g=!1;"string"!=typeof o.bind&&delete o.bind;var h=r.getAttribute("type");function b(){if(!p){var e=r.value,l=[e.substr(0,r.selectionStart).replace(t,"").length,e.substr(0,r.selectionEnd).replace(t,"").length],d=r.selectionDirection,h=e.replace(t,"");if(h=(h[0]||"")+h.substr(1).replace(i,""),c.test(h)&&g){var b=h.length;h=h.replace(c,""),l[0]-=b-h.length,l[1]-=b-h.length}var v=h.indexOf(".");if(~v){var m=h.substr(0,v),y=h.substr(v+1).replace(s,"");"number"==typeof o.whole&&m.length>o.whole&&(m=m.substr(0,o.whole)),"number"==typeof o.decimal&&y.length>o.decimal&&(y=y.substr(0,o.decimal)),h=m+"."+y}else"number"==typeof o.whole&&h.length>o.whole&&(h=h.substr(0,o.whole));o.bind&&(p=!0,f.set(o.bind,h.replace(u,"")),p=!1),h=""+(o.prefix||"")+a(h)+(o.suffix||"");for(var x=0,S=0,R=[],w=0;w<h.length&&x<2;w++)n.test(h[w])&&S++,S===l[x]&&(R[x++]=w+1,l[x]===S&&(R[x++]=w+1));R.length<1&&R.push(h.length),R.length<2&&R.push(h.length),r.value=h,R.push(d);try{r.setSelectionRange.apply(r,R)}catch(e){}}}return r.setAttribute("type","tel"),r.className+=" rn-numeric",d.push(f.listen("input",b).cancel),d.push(f.listen("blur",function(){var e=r.value.replace(t,"");r.value=e.replace(u,""),o.bind&&(p=!0,f.set(o.bind,r.value),p=!1),r.setSelectionRange(0,0),g=!0,b(),g=!1}).cancel),d.push(f.listen("focus",function(){0===r.selectionStart&&0===r.selectionEnd&&setTimeout(function(){var e,t=r.value;if(n.test(t))if(s.test(t))e=t.indexOf("."),r.setSelectionRange(e,e);else if(n.test(t)){for(var i=t.length;i--;)if(n.test(t[i])){e=i+1,r.setSelectionRange(e,e);break}}else e=t.length-(o.suffix||"").length,r.setSelectionRange(e,e);else e=(o.prefix||"").length,r.setSelectionRange(e,e)})}).cancel),o.bind&&f.observe(o.bind,function(e){if(!p){var t=f.get(o.bind);r.value=t,b()}},{defer:!0}),{teardown:function(){d.forEach(function(e){return e()}),r.setAttribute("type",h),r.className=r.className.replace(/ ?rn-numeric/,"")}}}}var f=!1;function d(e){return void 0===e&&(e={}),function(t){var n=t.Ractive;t.instance.decorators[e.name||"numeric"]=o(e),f||(f=!0,n.addCSS("rn-numeric","input.rn-numeric { text-align: right; }"))}}e.number=a,e.numeric=o,e.plugin=d,e.default=d,Object.defineProperty(e,"__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.RMTable={},e.Ractive)}(this,function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n,r="undefined"!=typeof window?window:null;function i(e,t,n){if(r&&r.Ractive&&"object"==typeof r.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]=n}}}function o(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=document.createElement("object");i.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;"),i.type="text/html";var o=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)};return i.onload=function(){i.contentDocument.defaultView.addEventListener("resize",o),o()},/Trident/.test(navigator.userAgent)?(e.appendChild(i),i.data="about:blank"):(i.data="about:blank",e.appendChild(i)),{refresh:o,teardown:function(){e.removeChild(i),e.style.position=r.position,e.style.overflowY=r.overflowY}}}var l={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,20,24],max:"64em",value:40},xlarge:{units:[2,3,4,5,6,8,10,12,20,24,32],max:"100em",value:50},ginormous:{units:[2,3,4,5,6,8,10,12,20,24,32,64],max:"150em",value:60}},s={"grid grid-root":/\bgrid grid-root\b/g},a=/\s+/g;function c(e,t){var r,i,c=this.getContext(e),f=this,d=t||{};function u(t){if(!d.type||"class"===d.type){var n,o=-1;for(var l in r)r[l]<=t&&(s[l].lastIndex=-1,r[l]>o&&(n=l,o=r[l])),e.className=e.className.replace(s[l],"").trim();if(!n)return;s[n].test(e.className)||(e.className+=" "+n),d.value&&c.set(d.value,i[n].value),d.name&&c.set(d.name,n),e.className=e.className.replace(a," ")}}function p(){var t=(n||(n=document.createElement("div"),document.body.appendChild(n)),n);for(var o in i=f.get("@style.break")||l,r={},i)t.style.width=i[o].max,r[o]=t.clientWidth,s[o]||(s[o]=new RegExp("\\b"+o+"\\b","g"));t.style.width=0,u(e.clientWidth)}var h=this.observe("@style.break",p,{init:!1}),b=c.observe("@local.width",u,{init:!1}),v=o.call(this,e,{clientWidth:"@local.width"});return e.className+=" grid grid-root",d.immediate?p():requestAnimationFrame(p),{update:function(t){d=t||{},requestAnimationFrame(function(){return u(e.clientWidth)})},teardown:function(){e.className=e.className.replace(s["grid grid-root"],"").trim(),b.cancel(),h.cancel(),v.teardown()}}}function f(e,t){var n=e("raui.grid.break")||t||l,r=(e("raui.grid.wrappers")||[".row-wrap > ",".row-wrap > .row-wrap > "]).slice();r.unshift("");var i,o=".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; }",s=Object.keys(n).map(function(e){return(n[e].key=e)&&n[e]});s.sort(function(e,t){return e.value>t.value?1:e.value<t.value?-1:0});var a={};s.reverse().reduce(function(e,t){return e.push(t.key),a[t.key]=e.slice(),e},[]);var c="",f="";return s.reverse().forEach(function(t){var n=t.prefix||t.key[0];t.units.forEach(function(o){f+="\n"+a[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+n+"1, ."+e+" > "+t+".row > ."+n+"1, ."+e+" ."+n+"-n1, ."+e+" .row-"+n+"-n1 > *"}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: 100%; flex-grow: 0; flex-shrink: 0; }\n"+a[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+n+"0, ."+e+" > "+t+".row > ."+n+"0, ."+e+" ."+n+"-n0, ."+e+" .row-"+n+"-n0 > *"}).join(", ")}).join(", ")+" { display: none; flex-grow: 0; flex-shrink: 0; }",c+="\n"+a[t.key].map(function(e){return"."+e+" .row-"+n+"-n1 > *"}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: 100%; }\n"+a[t.key].map(function(e){return"."+e+" .row-"+n+"-n0 > *"}).join(", ")+" { display: none; }";for(var l=function(l){i=(i=""+l/o*100).substr(0,i.indexOf(".")+3),c+="\n"+a[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+".row-"+n+l+"-"+o+" > *, ."+e+" .row-"+n+"-n"+l+"-"+o+" > *, ."+e+" .row > ."+n+"-n"+l+"-"+o}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: "+i+"%; }",f+="\n"+a[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+n+l+"-"+o+", ."+e+" > "+t+".row > ."+n+l+"-"+o+", ."+e+" ."+n+"-n"+l+"-"+o+", ."+e+" .row-"+n+"-n"+l+"-"+o+" > *"}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: "+i+"%; flex-grow: 0; flex-shrink: 0; }"},s=1;s<o;s++)l(s)}),a[t.key].forEach(function(e){return f+=r.map(function(t){return"."+e+" > "+t+".row > ."+n+"-fill"}).join(", ")+", ."+e+" ."+n+"-nfill { width: auto; flex-grow: 2; flex-shink: 2; }\n"+r.map(function(t){return"."+e+" > "+t+".row > ."+n+"-auto"}).join(", ")+", ."+e+" ."+n+"-nauto { width: auto; flex-shrink: 2; }"})}),o+=c+f}c.style=f,i("grid","decorators",c);var d=250;function u(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,l=Object.assign({},e,i);return(o=t.__r_clicks__)?o.subscribe(l.count||1,!!l.hold,r):(o=new p(n.getContext(t),l.delay||d,l.bubble||!1),t.__r_clicks__=o,o.subscribe(l.count||1,!!l.hold,r)),{teardown:function(){o.unsubscribe(l.count||1,!!l.hold,r)}}}}}u({name:"click",count:1}),u({name:"dblclick",count:2}),u({name:"trpclick",count:3});var p=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 h(e){return this.__r_clicks__.mousedown(e)}function b(e){return this.__r_clicks__.touchdown(e)}function v(){this.addEventListener("keydown",m,!1),this.addEventListener("blur",g,!1)}function g(){this.removeEventListener("keydown",m,!1),this.removeEventListener("blur",g,!1)}function m(e){if(32===e.which||10===e.which||13===e.which)return this.__r_clicks__.fire()}function _(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 x(e,t){void 0===t&&(t={});var n="string"==typeof t?t:t.bind;if("string"!=typeof n)return{teardown:function(){}};var r=t.allow||2,i=this.getContext(e);function o(){var t="";e.scrollHeight>e.clientHeight&&(t+="vscroll"),e.scrollWidth>e.clientWidth&&(t+=(t?" ":"")+"hscroll"),e.scrollTop<=r?t+=" top":e.scrollTop>=e.scrollHeight-e.clientHeight-r?t+=" bottom":t+=" vmiddle",e.scrollLeft<=r?t+=" left":e.scrollLeft>=e.scrollWidth-e.clientWidth-r?t+=" right":t+=" hmiddle",i.set(n,t)}return e.addEventListener("scroll",o,{passive:!0}),requestAnimationFrame(o),{refresh:o,teardown:function(){e.removeEventListener("scroll",o)}}}p.prototype.subscribe=function(e,t,n){(this.fires[e+","+t]||(this.fires[e+","+t]=[])).push(n),this.refs++},p.prototype.unsubscribe=function(e,t,n){var r=this.fires[e+","+t]||[];r.splice(r.indexOf(n),1),this.refs--,this.refs||this.teardown()},p.prototype.bind=function(){window.PointerEvent||window.navigator.pointerEnabled?this.context.listen("pointerdown",h):window.navigator.msPointerEnabled?this.context.listen("MSPointerDown",h):(this.context.listen("mousedown",h),this.context.listen("touchstart",b)),"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.context.listen("focus",v)},p.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},p.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,l=function(e){e.pointerId==o&&(t.fire(e,r,i),a())},s=function(e){e.pointerId==o&&(Math.abs(e.clientX-r)>=5||Math.abs(e.clientY-i)>=5)&&a()},a=function(){n&&clearTimeout(n),t.node.removeEventListener("MSPointerUp",l,!1),document.removeEventListener("MSPointerMove",s,!1),document.removeEventListener("MSPointerCancel",a,!1),t.node.removeEventListener("pointerup",l,!1),document.removeEventListener("pointermove",s,!1),document.removeEventListener("pointercancel",a,!1),t.node.removeEventListener("click",l,!1),document.removeEventListener("mousemove",s,!1)};return window.PointerEvent||window.navigator.pointerEnabled?(this.node.addEventListener("pointerup",l,!1),document.addEventListener("pointermove",s,!1),document.addEventListener("pointercancel",a,!1)):window.navigator.msPointerEnabled?(this.node.addEventListener("MSPointerUp",l,!1),document.addEventListener("MSPointerMove",s,!1),document.addEventListener("MSPointerCancel",a,!1)):(this.node.addEventListener("click",l,!1),document.addEventListener("mousemove",s,!1)),n=setTimeout(function(){a(),t.fire(e,r,i,!0)},400),this.bubble||e.stopPropagation(),this.bubble}},p.prototype.touchdown=function(e){var t,n=this,r=e.touches[0],i=r.clientX,o=r.clientY,l=r.identifier,s=function(e){e.changedTouches[0].identifier===l?(e.preventDefault(),n.preventMousedownEvents=!0,clearTimeout(n.preventMousedownTimeout),n.preventMousedownTimeout=setTimeout(function(){n.preventMousedownEvents=!1},400),n.fire(e,i,o),c()):c()},a=function(e){1===e.touches.length&&e.touches[0].identifier===l||c();var t=e.touches[0];(Math.abs(t.clientX-i)>=5||Math.abs(t.clientY-o)>=5)&&c()},c=function(){t&&clearTimeout(t),n.node.removeEventListener("touchend",s,!1),window.removeEventListener("touchmove",a,!1),window.removeEventListener("touchcancel",c,!1)};return this.node.addEventListener("touchend",s,!1),window.addEventListener("touchmove",a,!1),window.addEventListener("touchcancel",c,!1),t=setTimeout(function(){c(),n.fire(e,i,o,!0)},400),this.bubble||e.stopPropagation(),this.bubble},p.prototype.teardown=function(){var e=this.context;e.unlisten("pointerdown",h),e.unlisten("MSPointerDown",h),e.unlisten("mousedown",h),e.unlisten("touchstart",b),e.unlisten("focus",v),delete this.node.__r_clicks__},i("expand","transitions",_);var w=/^([-+])?([^\s]+)$/;function y(e){return"string"==typeof e}function k(e){return"number"==typeof e}function O(e){return"object"==typeof e}function S(e){return"object"==typeof e&&"RegExp"===Object.prototype.toString.call(e)}var A,E,P=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}};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.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._setSort=function(e,t){var n=this.get("columns."+e);if(n&&(n.sort||n.filter)){var r=n.sort||n.filter;y(r)&&"~"===r[0]&&(r=this.get(r));var i=t.ctrlKey,o=this.get("sort");if(Array.isArray(r)||(r=[r]),o?Array.isArray(o)||(o=[o]):o=[],o.length){var l=o.map(function(e){return w.exec(e).slice(1)}),s=r.reduce(function(e,t){return e&&!!l.find(function(e){return e[1]===t})},!0);s&&o.length!==r.length&&!i?this.set("sort",r.map(function(e){return"+"+r})):i?s?this.set("sort",l.map(function(e){return~r.indexOf(e[1])?("+"===e[0]?"-":"+")+e[1]:e[0]+e[1]})):this.set("sort",o.concat(r.map(function(e){return"+"+e}))):s?this.set("sort",l.map(function(e){return("+"===e[0]?"-":"+")+e[1]})):this.set("sort",r.map(function(e){return"+"+e}))}else this.set("sort",r.map(function(e){return"+"+e}))}},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.select=function(){var e=this.get("selected");e&&this.fire("selected",{},e,this.get("rows").indexOf(e),this.get("visibleRows").indexOf(e))},n.selections.get=function(){return this.get("selections")||[]},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 l=e>0?n[0]:n[n.length-1];this.set({selected:l,selections:[l]})}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"),l=r[t++],s=["selections"],a=[];for(~(n=o.indexOf(l))?a.push(n):s.push(l);t<r.length&&!(t in i);)l=r[t++],~(n=o.indexOf(l))?a.push(n):s.push(l);if(1===s.length)for(n=a.length;n--;)this.splice("selections",a[n],1);else this.push.apply(this,s);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},Object.defineProperties(t.prototype,n),t}(t);function L(e,n){if(e&&n){var r=e._getters||(e._getters={}),i=n.filter;y(i)&&0===i.indexOf("~/")&&(i=e.get(i));var o=Array.isArray(i)?i.join("."):!!y(i)&&i;if(o){if(!r[o])if(y(i)&&~i.indexOf("*")){var l=t.splitKeypath(i);r[o]=function(e){var t=T(e,l);return t.v||t.l}}else y(i)&&(i=t.splitKeypath(i)),r[o]=function(e){return H(e,i)};return r[o]}}}function j(e,n){if(e&&n){var r=e._getters||(e._getters={}),i=n.path;y(i)&&0===i.indexOf("~/")&&(i=e.get(i));var o=Array.isArray(i)?i.join("."):!!y(i)&&i;if(o){if(!r[o])if(y(i)&&~i.indexOf("*")){var l=t.splitKeypath(i);r[o]=function(e){var t=T(e,l);return t.v||t.l}}else y(i)&&(i=t.splitKeypath(i)),r[o]=function(e){return H(e,i)};return r[o]}return y(i=n.value)&&0===i.indexOf("~/")&&(i=e.get(i)),"function"==typeof i?i:void 0}}function H(e,t){if(!t.length||e||"object"==typeof e){for(var n=e,r=0;r<t.length;r++)if("object"!=typeof(n=n[t[r]])||!n)return r+1<t.length?void 0:n;return n}}function T(e,t){if(!t.length)return{v:e};if(t.length&&"object"!=typeof e)return{n:1};var n=t[0];if("*"===n&&Array.isArray(e)){var r=t.slice(1);return{l:e.reduce(function(e,t){var n=T(t,r);return O(n)?n.v?e.push(n.v):n.l?e.push.apply(e,n.l):n.n||e.push(n):e.push(n),e},[])}}return T(e[n],t.slice(1))}function M(e,t){return e<t?-1:e>t?1:e==t?0:!e&&t?-1:e&&!t?1:0}t.extendWith(P,{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",t:13,f:[{t:2,x:{r:["~/scroll"],s:'!~(_0||"").indexOf("top")'}}]},{n:"class-rtable-with-select",t:13,f:[{t:2,r:"~/allowSelect"}]},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{n:"grid",t:71}],f:[{t:8,r:"grid-head"}]}],n:50,x:{r:["~/fixedHeader","~/display"],s:'_0&&_1==="grid"'}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-top",g:1},{t:4,f:[{n:["scroll"],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:["~/fixedHeader","~/display"],s:'_0&&_1==="grid"'}}],f:[{t:4,f:[{t:8,r:"grid"}],n:50,x:{r:["~/display"],s:'_0==="grid"'}},{t:4,f:[{t:8,r:"table"}],n:51,l:1}]}," ",{t:4,f:[{t:8,r:"pagination"}],n:50,x:{r:["~/paginate"],s:'_0!=="virtual"'}}]}],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&&_1==="grid"':function(e,t){return e&&"grid"===t},'[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]':function(){return[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]},'["~/scroll"]':function(){return["~/scroll"]},'_0==="grid"':function(e){return"grid"===e},'_0!=="virtual"':function(e){return"virtual"!==e},"(_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]},'[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]':function(e,t,n){return[["select",n,e.indexOf(n),t.indexOf(n)]]},"[_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*_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,t){return e&&t},"_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},true:function(){return!0},"!_0":function(e){return!e},"_0+(_1?1:0)":function(e,t){return e+(t?1:0)}},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:["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:["~/rows","~/visibleRows","."],s:'[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]'}},{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:["No data."]}]}],pagination:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-bottom",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:2,r:"selections.length"}," of ",{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"}}]}]}],grid:[{t:7,e:"div",m:[{n:"grid",t:71},{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:8,r:"grid-head"}],n:51,r:"~/fixedHeader"}," ",{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"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-row row t1",g:1}],f:[{t:16,r:"empty"}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}],table:[{t:7,e:"table",m:[{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:8,r:"table-head"}," ",{t:4,f:[{t:8,r:"table-row"}],n:52,z:[{n:"source",x:{r:"~/items"}},{n:"shuffle",x:{x:{r:[],s:"true"}}}],r:"~/visibleRows"}," ",{t:4,f:[{t:7,e:"tr",m:[{t:13,n:"class",f:"rtable-row",g:1}],f:[{t:7,e:"td",m:[{n:"colspan",f:[{t:2,x:{r:["~/columns.length","~/allowSelect"],s:"_0+(_1?1:0)"}}],t:13}],f:[{t:16,r:"empty"}]}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}]}},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:{}},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 > div > table {\n width: 100%;\n border-collapse: collapse;\n display: table;\n }\n \n .rtable-auto > div > table,\n .rtable-fixed > div > table {\n table-layout: fixed;\n }\n \n .rtable td {\n padding: 0.5em;\n }\n .rtable-group > div > div,\n .rtable-header > div > div,\n .rtable-row > div > div {\n 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 td,\n .rtable-auto .row > *,\n .rtable-fixed td,\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-row-wrap {\n color: "+(t.fg||"#222")+";\n border-style: solid;\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-width: 0 0 1px 0;\n background-color: "+(r.even||t.bga||"#f4f4f4")+";\n }\n .rtable-row-wrap.rtable-odd {\n background-color: "+(r.odd||t.bg||"#fff")+";\n }\n .rtable-row-wrap:hover, .rtable-row-wrap.rtable-selected:hover {\n background-color: "+(r.over||n.bg||"rgba(128, 182, 229, 0.2)")+";\n position: relative;\n box-shadow: inset 1px 0 0 #dadce0,inset -1px 0 0 #dadce0, 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n z-index: 1;\n }\n \n .rtable-row-wrap.rtable-selected {\n background-color: "+(r.selected.bg||"rgba(0, 119, 238, 0.12)")+";\n color: "+(r.selected.fg||t.fg||"#222")+";\n }\n .rtable-row-wrap.rtable-selected.rtable-odd {\n background-color: "+(r.selected.odd||"rgba(0, 119, 238, 0.1)")+";\n }\n \n .rtable-row-wrap {\n display: flex;\n flex-grow: 1;\n align-items: center;\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 1px 1px;\n margin: 0 0 -1px -1px;\n }\n \n .rtable-border .rtable-row-wrap {\n border-width: 0 1px 1px 1px;\n }\n \n .rtable-border .rtable-row-expand {\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-style: solid;\n border-width: 1px 0 0 1px;\n margin-left: -1px;\n width: 100%;\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.divider||t.bc||"#ccc")+";\n }\n \n .rtable-header.rtable-row-wrap {\n border-bottom: 2px solid "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-header > th {\n padding: 0.5em;\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n margin: 0.5em 0;\n position: relative;\n }\n .rtable-fixed-header .rtable-header {\n margin-top: 0.5em;\n position: relative;\n z-index: 1;\n }\n .rtable-fixed-header.rtable-scrolled .rtable-header {\n box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n }\n .rtable-fixed-header .rtable-top {\n margin-top: 0;\n }\n \n .rtable-bottom {\n display: flex;\n flex-wrap: wrap;\n flex-shrink: 0;\n padding: 0 0.5em 0.5em 0.5em;\n justify-content: space-between;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n \n .rtable-bottom > * {\n padding: 0.5em;\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: 2em;\n height: 2em;\n box-shadow: none;\n outline: none;\n opacity: 0;\n top: 0;\n left: 0;\n border-radius: 2em;\n transform: translate(-0.1em, 0) scale(1);\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 position: relative;\n line-height: 1.8em;\n cursor: pointer;\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: translate(-0.1em, 0) 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: translate(-0.1em, 0) 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 2px; /* Safari */\n border-color: '+(t.fg||"#222")+';\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: middle;\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: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.35em, 0.55em) rotate(-45deg);\n opacity: 0;\n }\n \n .rtable-selected .rtable-select-row > div:before, .rtable-all-selected > div:before {\n border-color: '+(t.fga||"#07e")+";\n background-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 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: 2em;\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 {\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 "+(!1!==e("table.includeGrid")?f(e):"")}.call(this,e)].join(" ")},cssId:"rtable",noCssTransform:!0,attributes:["paginate","items","filter","sort","helpers","fixed","display","allowSelect","allowSelectAll","border","fixedHeader"],components:{table:!1,Table:!1},syncComputedChildren:!0,decorators:{grid:c,sized:o},events:{},use:[u({name:"clickd",count:1}),u({name:"dblclickd",count:2}),(void 0===E&&(E={}),function(e){e.instance.transitions[E.name||"expand"]=_}),(void 0===A&&(A={}),function(e){e.instance.decorators[A.name||"scrolled"]=x})],on:{construct:function(){var e,t,n,r=this.component;if(!r)return;var i=r.template.f||[],o=r.template.m?r.template.m.slice():[],l=r.template;r.template={e:l.e,f:l.f,t:l.t,m:o};var s=0;function a(e,t){if(e&&e.f&&1===e.f.length&&2===e.f[0].t){var n="_a"+s++;return o.push({t:13,n:n,f:e.f}),t?{t:[{t:2,r:"~/"+n}]}:{t:2,r:"~/"+n}}return e&&e.f}function c(e){var t=[],n=[];return e.forEach(function(e){if("column"===e.e||"col"===e.e){var r,i={},o=e.m||z;i.index=t.length,t.push(i),i.content=(e.f||[]).filter(function(e){return"edit"!==e.e}),(r=o.find(function(e){return"id"===e.n}))&&y(r.f)&&(i.id=r.f),i.label=o.find(function(e){return"label"===e.n}),i.label&&i.label.f&&(i.label=a(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=a(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=a(i.sort),i.sort.r&&(i.sort=i.sort.r)),i.hidden=o.find(function(e){return"hidden"===e.n}),i.hidden&&0===i.hidden.f?i.hidden=!0:i.hidden&&O(i.hidden.f)?i.hidden=a(i.hidden):i.hidden=!1,y(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&&O(i.noPad.f)?i.noPad=a(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&&O(i.editable.f)?i.editable=a(i.editable):i.editable=!1,i.attrs=o.filter(function(e){return!~R.indexOf(e.n)}),i.attrs.forEach(function(e,t){W.test(e.n)&&(i.attrs[t]={t:13,n:"class-"+e.n})})}else if("field"===e.e){var l,s={},c=e.m||z;y(l=c.find(function(e){return"path"===e.n}))?s.path=l:l&&l.f&&(s.path=a(l)),(l=c.find(function(e){return"value"===e.n}))&&l.f&&(s.value=a(l)),y(l=c.find(function(e){return"type"===e.n}))?s.type=l:l&&l.f&&(s.type=a(l)),y((l=c.find(function(e){return"id"===e.n})).f)&&(s.id=l.f),y(l=c.find(function(e){return"label"===e.n}))?s.label=l:l&&l.f&&(s.label=a(l)),s.id||(s.id=s.label),s.path||(s.path=s.id),n.push(s)}}),{fields:n,columns:t}}e=i.find(function(e){return"row"===e.e}),t=i.find(function(e){return"group"===e.e}),this._init={sets:c(i),partials:{}};var f=this._init.sets.columns;this._init.sets["meta.expand"]=e&&e.f;var d="[_0._setSort(_1,_2)]",u=[{t:7,e:"tr",m:[{t:13,n:"class-rtable-header"},{t:4,f:[{n:"style-opacity",f:"0",t:13}],n:50,x:{r:["~/virtual.offset"],s:"_0>0"}}],f:f.filter(function(e){return!0!==e.hidden}).map(function(e){var t={t:7,e:"th",f:e.label,m:[{t:13,n:"class-rtable-header"},{t:4,n:53,r:"~/columns."+e.index,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:d}}]}].concat(e.attrs)};e.type&&t.m.push({t:13,n:"class-rtable-"+e.type+"-column"}),(e.filter||e.sort)&&t.m.push({t:13,n:"class-rtable-sortable"});var n=t;return e.hidden&&e.hidden.r&&(n={t:4,n:51,r:e.hidden.r,f:[t]}),n})}];u[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"th",m:[{t:13,n:"class-rtable-select-header"},{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()"}}]},{t:70,n:["clickd"],f:"selectAll"}],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:70,n:["click"],f:"selectAll"},{t:13,n:"class-rtable-select"}]}]}]}]});var p=[{t:7,e:"tr",f:f.filter(function(e){return!0!==e.hidden}).map(function(e){var t={t:7,e:"td",f:[{t:16,r:"~/columns."+f.indexOf(e)+".content",c:{r:"."}}],m:e.attrs.slice()};e.type&&t.m.unshift({t:13,n:"class-rtable-"+e.type+"-column"},{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.find(function(e){return e.e})?e.label:e.content}),0===e.noPad?t.m.push({t:13,n:"class-rtable-no-pad"}):e.noPad&&t.m.push({t:13,n:"class-rtable-no-pad",f:e.noPad});var n=t;return e.hidden&&e.hidden.r&&(n={t:4,n:51,r:e.hidden.r,f:[t]}),n}),m:[{t:13,n:"class-rtable-row"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:70,n:["click"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(e&&e.m||z)}];p[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"th",m:[{t:13,n:"class-rtable-select-row"},{t:70,n:["clickd"],f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}}],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]"}}]}]}]}),this._init.partials["table-row"]=p,this._init.partials["table-head"]=u;var h=[{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:f.filter(function(e){return!0!==e.hidden}).map(function(e){var t={t:7,e:"div",f:[{t:7,e:"div",f:e.label}],m:[{t:4,n:53,r:"~/columns."+e.index,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:d}}]},{t:13,n:"title",f:e.label}].concat(e.attrs.filter(function(e){return"title"!==e.n}))};e.type&&t.m.push({t:13,n:"class-rtable-"+e.type+"-column"}),(e.filter||e.sort)&&t.m.push({t:13,n:"class-rtable-sortable"}),t.m.push({t:13,n:"class-rtable-column"});var n=t;return e.hidden&&e.hidden.r&&(n={t:4,n:51,r:e.hidden.r,f:[t]}),n}),m:[{t:13,n:"class-row"}]}]}];h[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 b,v=[{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",f:f.filter(function(e){return!0!==e.hidden}).map(function(e){var t=[{t:7,e:"div",f:[{t:16,r:"~/columns."+f.indexOf(e)+".content",c:{r:"."}}]}],n=e.attrs.slice();if(e.editable&&e.filter){var r={t:70,n:["click","mousedown","pointerdown","MSPointerDown","touchstart"],f:{r:["@event"],s:"[_0.stopPropagation()]"}},i=[{t:4,n:50,x:{r:["~/columns."+f.indexOf(e)+".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}]},r]}]},{t:4,n:51,l:1,f:[{t:7,e:"input",m:[{t:13,n:"value",f:[{t:2,r:e.filter}]},r]}]}];"object"==typeof e.editable?(n.push({t:13,n:"class-rtable-editing",f:e.editable}),t=[Object.assign({},e.editable,{t:4,n:50,f:i}),{t:4,n:51,l:1,f:t}]):(n.push({t:13,n:"class-rtable-editing"}),t=i)}var o={t:7,e:"div",f:t,m:n};e.type&&n.unshift({t:13,n:"class-rtable-"+e.type+"-column"}),n.push({t:13,n:"class-rtable-column"}),o.m.find(function(e){return"title"===e.n})||n.unshift({t:13,n:"title",f:e.content.find(function(e){return e.e})?e.label:e.content}),0===e.noPad?n.push({t:13,n:"class-rtable-no-pad"}):e.noPad&&n.push({t:13,n:"class-rtable-no-pad",f:e.noPad});var l=o;return e.hidden&&e.hidden.r&&(l={t:4,n:51,r:e.hidden.r,f:[o]}),l}),m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-row"},{t:70,n:e&&e.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(e&&e.m||z)}]}];e&&e.f&&(v[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:"."}}]}],m:[{t:13,n:"class-t1"},{t:13,n:"class-rtable-row-expand"}]}]}),v[0].f[0].m.push({t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}}));if(v[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]"}}]}]}]}]}),t&&t.m&&(b=t.m.find(function(e){return"by"===e.n}))&&(y(b.f)||1===b.length&&2===b[0].t)){var g={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(t.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"]}};v.unshift(g),this._init.by=b.f;var m,_=c(t.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});_.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]"}}]}]}]}]}),(m=t.m.find(function(e){return"select"===e.n}))&&(n||(n=[])).push(Object.assign({},m,{n:"allowGroupSelect"})),(m=t.m.find(function(e){return"show"===e.n}))&&(n||(n=[])).push(Object.assign({},m,{n:"showGroups"})),g.f[0].f=_}this._init.partials["grid-row"]=v,this._init.partials["grid-head"]=h,n&&this.component&&(this.component.mappings=n)},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;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})},selectAllAll:function(){var e=this.get("rows").slice();return this.set({selections:e,selected:null}),this.fire("selection",{},{item:null,items:e}),!1}},observe:{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 l=n.find(".rtable-header");if(l){var s=Array.apply(null,n.findAll(".rtable-live")).map(function(e){return e.offsetHeight});if(s.length<5){var a=Math.floor(t.clientHeight/l.offsetHeight);a<5&&(a=5),n.set("_paginate",a),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)/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)}))}},l=function(){r&&clearTimeout(r),r=setTimeout(function(){o(),r=null,i&&n._scrollListener&&n._scrollListener.fn()},50)};if(this._autoObserver=this.observe("~/tableHeight",l),this._autoObserver.fire=l,"virtual"===e){var s,a=!1,c=function(){if(n.rendered){if(s||(s=n.find(".rtable-top")),!i)return l();var e=s.scrollTop,t=n.get("virtual")||{},r=t.offset,o=n.get("_paginate"),c=o-10,f=n.get("rows.length");o>f&&(o=f);var d=n._avgSize,u=c*d,p=Math.floor(e/d)-5;p<0&&(p=0);var h=p;if(p+o>f&&(p=f-o),r===p)return a=!1;if(!k(r)||isNaN(r)||e<t.top+u||e>t.bottom-u||r>0&&e<d*c){var b=h,v=f-h-o;b<0?(v+=-1*b,b=0):b>f-o&&(b=f-o),v<0&&(v=0);var g,m,_=b*d,x=v*d;p<r+o&&p>r-o&&(g=p>r?n.findAll(".rtable-live")[p-r]:n.findAll(".rtable-live")[r-p]),g&&p>0&&g.offsetTop>s.scrollTop-u-5&&g.offsetTop<s.scrollTop+u&&(m=g.offsetTop),n.set({"virtual.above":_,"virtual.below":x,"virtual.offset":p}),"number"==typeof m&&m!==g.offsetTop&&n.set("virtual.above",_+(m-g.offsetTop)),n.set({"virtual.top":n.get("virtual.above"),"virtual.bottom":s.scrollHeight-x})}a=!1}else s=null},f=this._scrollListener=this.on("scroll",function(e){e.node;a||(a=!0,requestAnimationFrame(c))});this._scrollListener.fn=c,f.observer=this.observe("rows.length",function(){n.set("virtual.offset",null),c()},{init:!1,strict:!0});var d=f.cancel;f.cancel=function(){d(),f.observer.cancel()}}l()}else this._autoObserver&&this._autoObserver.cancel(),this._scrollListener&&this._scrollListener.cancel();k(e)&&this.set("_paginate",e)},defer:!0}},data:function(){return{display:"grid",page:0,selections:[],allowSelect:!0,allowSelectAll:!0,showGroups:!0,allowGroupSelect:!0,expanded:null,minPerPage:10}},computed:{rows:{get:function(){var e=this,t=this.viewmodel.value.columns,n=this.viewmodel.value.fields,r=t.filter(function(e){return e.filter}).map(function(t){return L(e,t)}).filter(function(e){return e}),i=this.get("items")||[],o=i,l=this.get("filter"),s=this.get("sort");if(O(l)&&!Array.isArray(l)&&(l=[l]),(l instanceof RegExp||y(l))&&l){var a=l===""+l.toLowerCase()||l===""+l.toUpperCase();try{var c=y(l)?new RegExp(l,a?"i":""):l;i=i.filter(function(e){for(var t=r.length;t--;){var n=e&&r[t](e);if(n&&y(n)&&c.test(n))return!0}})}catch(e){}}else if(Array.isArray(l)){var f=function e(t,n,r,i){return n.map(function(n){var o={op:n.op||"=",value:n.value||""};if(n.id){var l=r.find(function(e){return e.id===n.id||e.filter===n.id});l&&(o.get=L(t,l),o.get?o.type=l.type||"string":l=0),l||(l=i.find(function(e){return e.id===n.id}))&&(o.get=j(t,l),o.type=l.type||"string")}else o.op="skip";return"and"!==n.op&&"or"!==n.op&&"&&"!==n.op&&"||"!==n.op||(o.op=n.op,Array.isArray(n.value)&&(o.value=e(t,n.value,r,i))),o}).filter(function(e){return"skip"!==e.op})}(this,l,t,n),d={};try{i=i.filter(function(e){return f.reduce(function(t,n){return t&&function e(t,n,r){if(!n||!t.get&&"and"!==t.op&&"or"!==t.op&&"&&"!==t.op&&"||"!==t.op)return!1;var i=t.get&&t.get(n);if("="===t.op||"=="===t.op||"is"===t.op)return"number"===t.type||"date"===t.type?+i==+t.value:i==t.value;if("!="===t.op||"<>"===t.op||"not"===t.op)return"number"===t.type||"date"===t.type?+i!=+t.value:i!=t.value;if(">"===t.op||"gt"===t.op)return i>t.value;if(">="===t.op||"gte"===t.op)return i>=t.value;if("<"===t.op||"lt"===t.op)return i<t.value;if("<="===t.op||"lte"===t.op)return i<=t.value;if("like"===t.op||"notlike"===t.op||"~"===t.op||"!~"===t.op){var o="like"===t.op||"~"===t.op;if(y(t.value)){if(!t.value)return!0;var l=r[t.value]||(r[t.value]=new RegExp(".*"+t.value.replace(/%/g,".*")+".*","gi"));o=l.test(i)}else S(t.value)&&(o=t.value.test(i));return"like"===t.op||"~"===t.op?o:!o}if("contains"===t.op||"@"===t.op){if(Array.isArray(i))return!!~i.indexOf(t.value)}else if("containslike"===t.op||"@~"===t.op||"containsnotlike"===t.op||"@!~"===t.op){if(Array.isArray(i)){var s=S(t.value)?t.value:y(t.value)?r[t.value]||(r[t.value]=new RegExp(".*"+t.value.replace(/%/g,".*")+".*","gi")):null;if(!s)return!1;var a=i.findIndex(function(e){return s.test((e||"").toString())});return"containslike"===t.op||"@~"===t.op?a>=0:a<0}}else{if(("or"===t.op||"||"===t.op)&&Array.isArray(t.value))return t.value.reduce(function(t,i){return t||e(i,n,r)},!1);if(("and"===t.op||"&&"===t.op)&&Array.isArray(t.value))return t.value.reduce(function(t,i){return t&&e(i,n,r)},!0)}return!0}(n,e,d)},!0)})}catch(e){}}return(y(s)||O(s)&&!Array.isArray(s))&&(s=[s]),Array.isArray(s)&&(s=s.map(function(r){return y(r)?{dir:"-"===r[0]?-1:1,get:j(e,{path:"-"===r[0]||"+"===r[0]?r.substr(1):r})}:r?{dir:k(r.dir)?r.dir:"desc"===r.dir?-1:1,get:r.id&&(L(e,t.find(function(e){return e.id===r.id}))||j(e,n.find(function(e){return e.id===r.id})))||r.path&&j(e,{path:r.path,value:r.value})}:void 0}).filter(function(e){return e&&e.get}),i.sort(function(e,t){for(var n,r,i,o=0;o<s.length;o++)if(n=s[o].get(e),r=s[o].get(t),0!==(i=s[o].dir*M(n,r)))return i;return i})),this.set("isFiltered",o.length!==i.length),i}},visibleRows:{get:function(){var e=this,n=this.get("rows"),r=this.get("paginate"),i=r,o=this.get("_paginate"),l=this.get("page")||0,s=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?(l=s&&s.offset||0,n.slice(l,l+i)):(l*i>n.length&&setTimeout(function(){return e.set("page",0)},0),n.slice(i*l,i*l+i))):n}},pagination:{get:function(){var e=this.get("items")||z,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),l={max:Math.ceil(e.length/r),total:o,per:r};if("virtual"===n&&(l.height=this._avg*t.length),l.total>14){var s=l.array=[];i>5?s.push(1,2,3,"..."):s.push(1,2,3,4,5,6,7,8),i>5&&i+6<o?s.push(i-1,i,i+1,i+2,i+3,"...",o-2,o-1,o):i+6<o?s.push("...",o-2,o-1,o):s.push(o-7,o-6,o-5,o-4,o-3,o-2,o-1,o)}else l.array=Array.apply(null,{length:l.total}).map(function(e,t){return t+1});return l}}},groups:{get: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 R=["label","type","filter","hidden","sort","no-pad","id","editable"],W=/^[a-z]{1,3}[0-9]+(?:-[0-9]+)?$/,z=[];function N(e){return void 0===e&&(e={}),function(t){var n=t.Ractive,r=t.instance;"includeGrid"in e&&n.styleSet("table.inclideGrid",e.includeGrid),r.components[e.name||"data-table"]=P}}i("RMTable","components",P),e.Table=P,e.plugin=N,e.default=N,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.RMTable={},e.Ractive)}(this,function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n,r="undefined"!=typeof window?window:null;function i(e,t,n){if(r&&r.Ractive&&"object"==typeof r.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]=n}}}function o(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=document.createElement("object");i.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;"),i.type="text/html";var o=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)};return i.onload=function(){i.contentDocument.defaultView.addEventListener("resize",o),o()},/Trident/.test(navigator.userAgent)?(e.appendChild(i),i.data="about:blank"):(i.data="about:blank",e.appendChild(i)),{refresh:o,teardown:function(){e.removeChild(i),e.style.position=r.position,e.style.overflowY=r.overflowY}}}var a={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,20,24],max:"64em",value:40},xlarge:{units:[2,3,4,5,6,8,10,12,20,24,32],max:"100em",value:50},ginormous:{units:[2,3,4,5,6,8,10,12,20,24,32,64],max:"150em",value:60}},l={"grid grid-root":/\bgrid grid-root\b/g},s=/\s+/g;function c(e,t){var r,i,c=this.getContext(e),f=this,d=t||{};function u(t){if("number"==typeof d.offset&&(t-=d.offset),!d.type||"class"===d.type){var n,o=-1;for(var a in r)r[a]<=t&&(l[a].lastIndex=-1,r[a]>o&&(n=a,o=r[a])),e.className=e.className.replace(l[a],"").trim();if(!n)return;l[n].test(e.className)||(e.className+=" "+n),d.value&&c.set(d.value,i[n].value),d.name&&c.set(d.name,n),e.className=e.className.replace(s," ")}}function p(){var t=(n||(n=document.createElement("div"),document.body.appendChild(n)),n);for(var o in i=f.get("@style.break")||a,r={},i)t.style.width=i[o].max,r[o]=t.clientWidth,l[o]||(l[o]=new RegExp("\\b"+o+"\\b","g"));t.style.width=0,u(e.clientWidth)}var h=this.observe("@style.break",p,{init:!1}),b=c.observe("@local.width",u,{init:!1}),g=o.call(this,e,{clientWidth:"@local.width"});return e.className+=" grid grid-root",d.immediate?p():requestAnimationFrame(p),{update:function(t){d=t||{},requestAnimationFrame(function(){return u(e.clientWidth)})},teardown:function(){e.className=e.className.replace(l["grid grid-root"],"").trim(),b.cancel(),h.cancel(),g.teardown()}}}function f(e,t){var n=e("raui.grid.break")||t||a,r=(e("raui.grid.wrappers")||[".row-wrap > ",".row-wrap > .row-wrap > "]).slice();r.unshift("");var i,o=".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; }",l=Object.keys(n).map(function(e){return(n[e].key=e)&&n[e]});l.sort(function(e,t){return e.value>t.value?1:e.value<t.value?-1:0});var s={};l.reverse().reduce(function(e,t){return e.push(t.key),s[t.key]=e.slice(),e},[]);var c="",f="";return l.reverse().forEach(function(t){var n=t.prefix||t.key[0];t.units.forEach(function(o){f+="\n"+s[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+n+"1, ."+e+" > "+t+".row > ."+n+"1, ."+e+" ."+n+"-n1, ."+e+" .row-"+n+"-n1 > *"}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: 100%; flex-grow: 0; flex-shrink: 0; }\n"+s[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+n+"0, ."+e+" > "+t+".row > ."+n+"0, ."+e+" ."+n+"-n0, ."+e+" .row-"+n+"-n0 > *"}).join(", ")}).join(", ")+" { display: none; flex-grow: 0; flex-shrink: 0; }",c+="\n"+s[t.key].map(function(e){return"."+e+" .row-"+n+"-n1 > *"}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: 100%; }\n"+s[t.key].map(function(e){return"."+e+" .row-"+n+"-n0 > *"}).join(", ")+" { display: none; }";for(var a=function(a){i=(i=""+a/o*100).substr(0,i.indexOf(".")+3),c+="\n"+s[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+".row-"+n+a+"-"+o+" > *, ."+e+" .row-"+n+"-n"+a+"-"+o+" > *, ."+e+" .row > ."+n+"-n"+a+"-"+o}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: "+i+"%; }",f+="\n"+s[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+n+a+"-"+o+", ."+e+" > "+t+".row > ."+n+a+"-"+o+", ."+e+" ."+n+"-n"+a+"-"+o+", ."+e+" .row-"+n+"-n"+a+"-"+o+" > *"}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: "+i+"%; flex-grow: 0; flex-shrink: 0; }"},l=1;l<o;l++)a(l)}),s[t.key].forEach(function(e){return f+=r.map(function(t){return"."+e+" > "+t+".row > ."+n+"-fill"}).join(", ")+", ."+e+" ."+n+"-nfill { width: auto; flex-grow: 2; flex-shink: 2; }\n"+r.map(function(t){return"."+e+" > "+t+".row > ."+n+"-auto"}).join(", ")+", ."+e+" ."+n+"-nauto { width: auto; flex-shrink: 2; }"})}),o+=c+f}c.style=f,i("grid","decorators",c);var d=250;function u(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 p(n.getContext(t),a.delay||d,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)}}}}}u({name:"click",count:1}),u({name:"dblclick",count:2}),u({name:"trpclick",count:3});var p=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 h(e){return this.__r_clicks__.mousedown(e)}function b(e){return this.__r_clicks__.touchdown(e)}function g(){this.addEventListener("keydown",m,!1),this.addEventListener("blur",v,!1)}function v(){this.removeEventListener("keydown",m,!1),this.removeEventListener("blur",v,!1)}function m(e){if(32===e.which||10===e.which||13===e.which)return this.__r_clicks__.fire()}function _(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 w(e,t){void 0===t&&(t={});var n="string"==typeof t?t:t.bind;if("string"!=typeof n)return{teardown:function(){}};var r=t.allow||2,i=this.getContext(e);function o(){var t="";e.scrollHeight>e.clientHeight&&(t+="vscroll"),e.scrollWidth>e.clientWidth&&(t+=(t?" ":"")+"hscroll"),e.scrollTop<=r?t+=" top":e.scrollTop>=e.scrollHeight-e.clientHeight-r?t+=" bottom":t+=" vmiddle",e.scrollLeft<=r?t+=" left":e.scrollLeft>=e.scrollWidth-e.clientWidth-r?t+=" right":t+=" hmiddle",i.set(n,t)}return e.addEventListener("scroll",o,{passive:!0}),requestAnimationFrame(o),{refresh:o,teardown:function(){e.removeEventListener("scroll",o)}}}p.prototype.subscribe=function(e,t,n){(this.fires[e+","+t]||(this.fires[e+","+t]=[])).push(n),this.refs++},p.prototype.unsubscribe=function(e,t,n){var r=this.fires[e+","+t]||[];r.splice(r.indexOf(n),1),this.refs--,this.refs||this.teardown()},p.prototype.bind=function(){window.PointerEvent||window.navigator.pointerEnabled?this.context.listen("pointerdown",h):window.navigator.msPointerEnabled?this.context.listen("MSPointerDown",h):(this.context.listen("mousedown",h),this.context.listen("touchstart",b)),"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.context.listen("focus",g)},p.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},p.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)>=5||Math.abs(e.clientY-i)>=5)&&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}},p.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),c()):c()},s=function(e){1===e.touches.length&&e.touches[0].identifier===a||c();var t=e.touches[0];(Math.abs(t.clientX-i)>=5||Math.abs(t.clientY-o)>=5)&&c()},c=function(){t&&clearTimeout(t),n.node.removeEventListener("touchend",l,!1),window.removeEventListener("touchmove",s,!1),window.removeEventListener("touchcancel",c,!1)};return this.node.addEventListener("touchend",l,!1),window.addEventListener("touchmove",s,!1),window.addEventListener("touchcancel",c,!1),t=setTimeout(function(){c(),n.fire(e,i,o,!0)},400),this.bubble||e.stopPropagation(),this.bubble},p.prototype.teardown=function(){var e=this.context;e.unlisten("pointerdown",h),e.unlisten("MSPointerDown",h),e.unlisten("mousedown",h),e.unlisten("touchstart",b),e.unlisten("focus",g),delete this.node.__r_clicks__},i("expand","transitions",_);var x=/^([-+])?([^\s]+)$/;function y(e){return"string"==typeof e}function k(e){return"number"==typeof e}function O(e){return"object"==typeof e}function S(e){return"object"==typeof e&&"RegExp"===Object.prototype.toString.call(e)}var A,E,P=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}};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.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._setSort=function(e,t){var n=this.get("columns."+e);if(n&&(n.sort||n.filter)){var r=n.sort||n.filter;y(r)&&"~"===r[0]&&(r=this.get(r));var i=t.ctrlKey,o=this.get("sort");if(Array.isArray(r)||(r=[r]),o?Array.isArray(o)||(o=[o]):o=[],o.length){var a=o.map(function(e){return x.exec(e).slice(1)}),l=r.reduce(function(e,t){return e&&!!a.find(function(e){return e[1]===t})},!0);l&&o.length!==r.length&&!i?this.set("sort",r.map(function(e){return"+"+r})):i?l?this.set("sort",a.map(function(e){return~r.indexOf(e[1])?("+"===e[0]?"-":"+")+e[1]:e[0]+e[1]})):this.set("sort",o.concat(r.map(function(e){return"+"+e}))):l?this.set("sort",a.map(function(e){return("+"===e[0]?"-":"+")+e[1]})):this.set("sort",r.map(function(e){return"+"+e}))}else this.set("sort",r.map(function(e){return"+"+e}))}},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.select=function(){var e=this.get("selected");e&&this.fire("selected",{},e,this.get("rows").indexOf(e),this.get("visibleRows").indexOf(e))},n.selections.get=function(){return this.get("selections")||[]},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},Object.defineProperties(t.prototype,n),t}(t);function L(e,n){if(e&&n){var r=e._getters||(e._getters={}),i=n.filter;y(i)&&0===i.indexOf("~/")&&(i=e.get(i));var o=Array.isArray(i)?i.join("."):!!y(i)&&i;if(o){if(!r[o])if(y(i)&&~i.indexOf("*")){var a=t.splitKeypath(i);r[o]=function(e){var t=T(e,a);return t.v||t.l}}else y(i)&&(i=t.splitKeypath(i)),r[o]=function(e){return H(e,i)};return r[o]}}}function j(e,n){if(e&&n){var r=e._getters||(e._getters={}),i=n.path;y(i)&&0===i.indexOf("~/")&&(i=e.get(i));var o=Array.isArray(i)?i.join("."):!!y(i)&&i;if(o){if(!r[o])if(y(i)&&~i.indexOf("*")){var a=t.splitKeypath(i);r[o]=function(e){var t=T(e,a);return t.v||t.l}}else y(i)&&(i=t.splitKeypath(i)),r[o]=function(e){return H(e,i)};return r[o]}return y(i=n.value)&&0===i.indexOf("~/")&&(i=e.get(i)),"function"==typeof i?i:void 0}}function H(e,t){if(!t.length||e||"object"==typeof e){for(var n=e,r=0;r<t.length;r++)if("object"!=typeof(n=n[t[r]])||!n)return r+1<t.length?void 0:n;return n}}function T(e,t){if(!t.length)return{v:e};if(t.length&&"object"!=typeof e)return{n:1};var n=t[0];if("*"===n&&Array.isArray(e)){var r=t.slice(1);return{l:e.reduce(function(e,t){var n=T(t,r);return O(n)?n.v?e.push(n.v):n.l?e.push.apply(e,n.l):n.n||e.push(n):e.push(n),e},[])}}return T(e[n],t.slice(1))}function M(e,t){return e<t?-1:e>t?1:e==t?0:!e&&t?-1:e&&!t?1:0}t.extendWith(P,{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",t:13,f:[{t:2,x:{r:["~/scroll"],s:'!~(_0||"").indexOf("top")'}}]},{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"'}}]},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{n:"grid",t:71,f:{r:["~/scrollOffset"],s:"[{offset:_0}]"}}],f:[{t:8,r:"grid-head"}]}],n:50,r:"~/fixedHeader"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-top",g:1},{t:4,f:[{n:["scroll"],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,r:"~/fixedHeader"}],f:[{t:7,e:"div",m:[{n:"grid",t:71},{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:8,r:"grid-head"}],n:51,r:"~/fixedHeader"}," ",{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"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-row row t1",g:1}],f:[{t:16,r:"empty"}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}]}," ",{t:4,f:[{t:8,r:"pagination"}],n:50,x:{r:["~/paginate"],s:'_0!=="virtual"'}}]}],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==="top"':function(e){return"top"===e},'_0==="center"':function(e){return"center"===e},'_0==="bottom"':function(e){return"bottom"===e},"[{offset:_0}]":function(e){return[{offset:e}]},'[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]':function(){return[{offsetHeight:"~/tableHeight",diffWidth:"~/scrollOffset"}]},'["~/scroll"]':function(){return["~/scroll"]},true:function(){return!0},"!_0":function(e){return!e},'_0!=="virtual"':function(e){return"virtual"!==e},"(_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]},'[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]':function(e,t,n){return[["select",n,e.indexOf(n),t.indexOf(n)]]},"[_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*_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,t){return e&&t},"_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:["~/rows","~/visibleRows","."],s:'[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]'}},{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:["No data."]}]}],pagination:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-bottom",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:2,r:"selections.length"}," of ",{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:{}},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-group > div > div,\n .rtable-header > div > div,\n .rtable-row > div > div {\n 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-row-wrap {\n color: "+(t.fg||"#222")+";\n border-style: solid;\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-width: 0 0 1px 0;\n background-color: "+(r.even||t.bga||"#f4f4f4")+";\n }\n .rtable-row-wrap.rtable-odd {\n background-color: "+(r.odd||t.bg||"#fff")+";\n }\n .rtable-row-wrap:hover, .rtable-row-wrap.rtable-selected:hover {\n background-color: "+(r.over||n.bg||"rgba(128, 182, 229, 0.2)")+";\n position: relative;\n box-shadow: inset 1px 0 0 #dadce0,inset -1px 0 0 #dadce0, 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n z-index: 1;\n }\n \n .rtable-row-wrap.rtable-selected {\n background-color: "+(r.selected.bg||"rgba(0, 119, 238, 0.12)")+";\n color: "+(r.selected.fg||t.fg||"#222")+";\n }\n .rtable-row-wrap.rtable-selected.rtable-odd {\n background-color: "+(r.selected.odd||"rgba(0, 119, 238, 0.1)")+";\n }\n \n .rtable-row-wrap {\n display: flex;\n flex-grow: 1;\n align-items: center;\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 1px 1px;\n margin: 0 0 -1px -1px;\n }\n \n .rtable-border .rtable-row-wrap {\n border-width: 0 1px 1px 1px;\n }\n \n .rtable-border .rtable-row-expand {\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-style: solid;\n border-width: 1px 0 0 1px;\n margin-left: -1px;\n width: 100%;\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.divider||t.bc||"#ccc")+";\n }\n \n .rtable-header.rtable-row-wrap {\n border-bottom: 2px solid "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n margin: 0.5em 0;\n position: relative;\n }\n .rtable-fixed-header .rtable-header {\n margin-top: 0.5em;\n position: relative;\n z-index: 1;\n }\n .rtable-fixed-header.rtable-scrolled .rtable-header {\n box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n }\n .rtable-fixed-header .rtable-top {\n margin-top: 0;\n }\n \n .rtable-bottom {\n display: flex;\n flex-wrap: wrap;\n flex-shrink: 0;\n padding: 0 0.5em 0.5em 0.5em;\n justify-content: space-between;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n \n .rtable-bottom > * {\n padding: 0.5em;\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: 2em;\n height: 2em;\n box-shadow: none;\n outline: none;\n opacity: 0;\n top: 0;\n left: 0;\n border-radius: 2em;\n transform: translate(-0.1em, 0) scale(1);\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 position: relative;\n line-height: 1.8em;\n cursor: pointer;\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: translate(-0.1em, 0) 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: translate(-0.1em, 0) 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 2px; /* Safari */\n border-color: '+(t.fg||"#222")+';\n border-radius: 2px;\n width: 18px;\n height: 18px;\n vertical-align: middle;\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: block;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 10px;\n height: 5px;\n border: solid 2px transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.35em, 0.55em) rotate(-45deg);\n opacity: 0;\n }\n \n .rtable-selected .rtable-select-row > div:before, .rtable-all-selected > div:before {\n border-color: '+(t.fga||"#07e")+";\n background-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 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: 2em;\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 {\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 .grid > .rtable-row-wrap > .rtable-row > .rtable-column > div,\n .rtable .grid > .rtable-row-wrap > .rtable-row > .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 .grid > .rtable-row-wrap > .rtable-row > .rtable-column > div,\n .rtable .grid > .rtable-row-wrap > .rtable-row > .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 .grid > .rtable-row-wrap > .rtable-row > .rtable-column > div,\n .rtable .grid > .rtable-row-wrap > .rtable-row > .rtable-column.rtable-valign-col-center > div {\n display: flex;\n height: 100%;\n align-items: center;\n box-sizing: border-box;\n }\n "+(!1!==e("table.includeGrid")?f(e):"")}.call(this,e)].join(" ")},cssId:"rtable",noCssTransform:!0,attributes:["paginate","items","filter","sort","helpers","fixed","allowSelect","allowSelectAll","border","fixedHeader","valign"],components:{table:!1,Table:!1},syncComputedChildren:!0,decorators:{grid:c,sized:o},events:{},use:[u({name:"clickd",count:1}),u({name:"dblclickd",count:2}),(void 0===E&&(E={}),function(e){e.instance.transitions[E.name||"expand"]=_}),(void 0===A&&(A={}),function(e){e.instance.decorators[A.name||"scrolled"]=w})],on:{construct:function(){var e,t,n,r,i=this.component;if(!i)return;var o=i.template.f||[],a=i.template.m?i.template.m.slice():[],l=i.template;i.template={e:l.e,f:l.f,t:l.t,m:a};var s=0;function c(e,t){if(e&&e.f&&1===e.f.length&&2===e.f[0].t){var n="_a"+s++;return a.push({t:13,n:n,f:e.f}),t?{t:[{t:2,r:"~/"+n}]}:{t:2,r:"~/"+n}}return e&&e.f}function f(e){var t=[],n=[];return e.forEach(function(e){if("column"===e.e||"col"===e.e){var r,i={},o=e.m||z;i.index=t.length,t.push(i),i.content=(e.f||[]).filter(function(e){return"edit"!==e.e}),(r=o.find(function(e){return"id"===e.n}))&&y(r.f)&&(i.id=r.f),i.label=o.find(function(e){return"label"===e.n}),i.label&&i.label.f&&(i.label=c(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=c(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=c(i.sort),i.sort.r&&(i.sort=i.sort.r)),i.hidden=o.find(function(e){return"hidden"===e.n}),i.hidden&&0===i.hidden.f?i.hidden=!0:i.hidden&&O(i.hidden.f)?i.hidden=c(i.hidden):i.hidden=!1,y(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&&O(i.noPad.f)?i.noPad=c(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&&O(i.editable.f)?i.editable=c(i.editable):i.editable=!1,i.valign=o.find(function(e){return"valign"===e.n}),i.valign&&O(i.valign.f)?i.valign=c(i.valign):i.valign&&"string"==typeof i.valign.f&&(i.valign=i.valign.f),i.attrs=o.filter(function(e){return!~R.indexOf(e.n)}),i.attrs.forEach(function(e,t){W.test(e.n)&&(i.attrs[t]={t:13,n:"class-"+e.n})})}else if("field"===e.e){var a,l={},s=e.m||z;y(a=s.find(function(e){return"path"===e.n}))?l.path=a:a&&a.f&&(l.path=c(a)),(a=s.find(function(e){return"value"===e.n}))&&a.f&&(l.value=c(a)),y(a=s.find(function(e){return"type"===e.n}))?l.type=a:a&&a.f&&(l.type=c(a)),y((a=s.find(function(e){return"id"===e.n})).f)&&(l.id=a.f),y(a=s.find(function(e){return"label"===e.n}))?l.label=a:a&&a.f&&(l.label=c(a)),l.id||(l.id=l.label),l.path||(l.path=l.id),n.push(l)}}),{fields:n,columns:t}}e=o.find(function(e){return"row"===e.e}),t=o.find(function(e){return"group"===e.e}),n=o.find(function(e){return"wrapper"===e.e}),this._init={sets:f(o),partials:{}};var d=this._init.sets.columns;this._init.sets["meta.expand"]=e&&e.f&&e.f.length;var u="[_0._setSort(_1,_2)]",p=[{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:d.filter(function(e){return!0!==e.hidden}).map(function(e){var t={t:7,e:"div",f:[{t:7,e:"div",f:e.label}],m:[{t:4,n:53,r:"~/columns."+e.index,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:u}}]},{t:13,n:"title",f:e.label}].concat(e.attrs.filter(function(e){return"title"!==e.n}))};e.type&&t.m.push({t:13,n:"class-rtable-"+e.type+"-column"}),(e.filter||e.sort)&&t.m.push({t:13,n:"class-rtable-sortable"}),t.m.push({t:13,n:"class-rtable-column"});var n=t;return e.hidden&&e.hidden.r&&(n={t:4,n:51,r:e.hidden.r,f:[t]}),n}),m:[{t:13,n:"class-row"}]}]}];p[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 h,b=[{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",f:d.filter(function(e){return!0!==e.hidden}).map(function(e,t){var n=[{t:7,e:"div",f:[{t:16,r:"~/columns."+t+".content",c:{r:"."}}]}];e.attrs.length?(e.attrsP=e.attrs,e.attrs=[{t:16,r:"~/columns."+t+".attrsP",c:{r:"."}}]):e.attrs=[];var r=e.attrs;if(e.editable&&e.filter){var i={t:70,n:["click","mousedown","pointerdown","MSPointerDown","touchstart"],f:{r:["@event"],s:"[_0.stopPropagation()]"}},o=[{t:4,n:50,x:{r:["~/columns."+t+".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}]},i]}]},{t:4,n:51,l:1,f:[{t:7,e:"input",m:[{t:13,n:"value",f:[{t:2,r:e.filter}]},i]}]}];"object"==typeof e.editable?(r.push({t:13,n:"class-rtable-editing",f:e.editable}),n=[Object.assign({},e.editable,{t:4,n:50,f:o}),{t:4,n:51,l:1,f:n}]):(r.push({t:13,n:"class-rtable-editing"}),n=o)}e.valign&&r.push({t:13,n:"class-rtable-valign-col-top",f:[{t:2,x:{r:["~/columns."+t+".valign"],s:"_0==='top'"}}]},{t:13,n:"class-rtable-valign-col-bottom",f:[{t:2,x:{r:["~/columns."+t+".valign"],s:"_0==='bottom'"}}]},{t:13,n:"class-rtable-valign-col-center",f:[{t:2,x:{r:["~/columns."+t+".valign"],s:"_0==='center'"}}]});var a={t:7,e:"div",f:n,m:r};e.type&&r.unshift({t:13,n:"class-rtable-"+e.type+"-column"}),r.push({t:13,n:"class-rtable-column"}),a.m.find(function(e){return"title"===e.n})||r.unshift({t:13,n:"title",f:e.content.find(function(e){return e.e})?e.label:e.content}),0===e.noPad?r.push({t:13,n:"class-rtable-no-pad"}):e.noPad&&r.push({t:13,n:"class-rtable-no-pad",f:e.noPad});var l=a;return e.hidden&&e.hidden.r&&(l={t:4,n:51,r:e.hidden.r,f:[a]}),l}),m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-row"},{t:70,n:e&&e.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}]}]}];e&&e.m&&e.m.length&&(this._init.sets.rowAttrs=e.m.slice(),b[0].f[0].m.push({t:16,r:"~/rowAttrs",c:{r:"."}}));n&&n.m&&n.m.length&&(this._init.sets.wrapperAttrs=n.m.slice(),b[0].m.push({t:16,r:"~/wrapperAttrs",c:{r:"."}}));e&&e.f&&e.f.length&&(b[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:"."}}]}],m:[{t:13,n:"class-t1"},{t:13,n:"class-rtable-row-expand"}]}]}),b[0].f[0].m.push({t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}}));if(b[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]"}}]}]}]}]}),t&&t.m&&(h=t.m.find(function(e){return"by"===e.n}))&&(y(h.f)||1===h.length&&2===h[0].t)){var g={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(t.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"]}};b.unshift(g),this._init.by=h.f;var v,m=f(t.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});m.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]"}}]}]}]}]}),(v=t.m.find(function(e){return"select"===e.n}))&&(r||(r=[])).push(Object.assign({},v,{n:"allowGroupSelect"})),(v=t.m.find(function(e){return"show"===e.n}))&&(r||(r=[])).push(Object.assign({},v,{n:"showGroups"})),g.f[0].f=m}this._init.partials["grid-row"]=b,this._init.partials["grid-head"]=p,r&&this.component&&(this.component.mappings=r)},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;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})},selectAllAll:function(){var e=this.get("rows").slice();return this.set({selections:e,selected:null}),this.fire("selection",{},{item:null,items:e}),!1}},observe:{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.find(".rtable-header");if(a){var l=Array.apply(null,n.findAll(".rtable-live")).map(function(e){return e.offsetHeight});if(l.length<5){var s=Math.floor(t.clientHeight/a.offsetHeight);s<5&&(s=5),n.set("_paginate",s),l=Array.apply(null,n.findAll(".rtable-live")).map(function(e){return e.offsetHeight})}l.length>0?i=!0:l=[25];var c=Math.ceil(l.reduce(function(e,t){return e+t},0)/l.length);n._avgSize=c;var f=Math.floor((t.clientHeight-a.offsetHeight)/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,c=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"),c=o-10,f=n.get("rows.length");o>f&&(o=f);var d=n._avgSize,u=c*d,p=Math.floor(e/d)-5;p<0&&(p=0);var h=p;if(p+o>f&&(p=f-o),r===p)return s=!1;if(!k(r)||isNaN(r)||e<t.top+u||e>t.bottom-u||r>0&&e<d*c){var b=h,g=f-h-o;b<0?(g+=-1*b,b=0):b>f-o&&(b=f-o),g<0&&(g=0);var v,m,_=b*d,w=g*d;p<r+o&&p>r-o&&(v=p>r?n.findAll(".rtable-live")[p-r]:n.findAll(".rtable-live")[r-p]),v&&p>0&&v.offsetTop>l.scrollTop-u-5&&v.offsetTop<l.scrollTop+u&&(m=v.offsetTop),n.set({"virtual.above":_,"virtual.below":w,"virtual.offset":p}),"number"==typeof m&&m!==v.offsetTop&&n.set("virtual.above",_+(m-v.offsetTop)),n.set({"virtual.top":n.get("virtual.above"),"virtual.bottom":l.scrollHeight-w})}s=!1}else l=null},f=this._scrollListener=this.on("scroll",function(e){e.node;s||(s=!0,requestAnimationFrame(c))});this._scrollListener.fn=c,f.observer=this.observe("rows.length",function(){n.set("virtual.offset",null),c()},{init:!1,strict:!0});var d=f.cancel;f.cancel=function(){d(),f.observer.cancel()}}a()}else this._autoObserver&&this._autoObserver.cancel(),this._scrollListener&&this._scrollListener.cancel();k(e)&&this.set("_paginate",e)},defer:!0}},data:function(){return{page:0,selections:[],allowSelect:!0,allowSelectAll:!0,showGroups:!0,allowGroupSelect:!0,expanded:null,minPerPage:10}},computed:{rows:{get:function(){var e=this,t=this.viewmodel.value.columns,n=this.viewmodel.value.fields,r=t.filter(function(e){return e.filter}).map(function(t){return L(e,t)}).filter(function(e){return e}),i=this.get("items")||[],o=i,a=this.get("filter"),l=this.get("sort");if(O(a)&&!Array.isArray(a)&&(a=[a]),(a instanceof RegExp||y(a))&&a){var s=a===""+a.toLowerCase()||a===""+a.toUpperCase();try{var c=y(a)?new RegExp(a,s?"i":""):a;i=i.filter(function(e){for(var t=r.length;t--;){var n=e&&r[t](e);if(n&&y(n)&&c.test(n))return!0}})}catch(e){}}else if(Array.isArray(a)){var f=function e(t,n,r,i){return n.map(function(n){var o={op:n.op||"=",value:n.value||""};if(n.id){var a=r.find(function(e){return e.id===n.id||e.filter===n.id});a&&(o.get=L(t,a),o.get?o.type=a.type||"string":a=0),a||(a=i.find(function(e){return e.id===n.id}))&&(o.get=j(t,a),o.type=a.type||"string")}else o.op="skip";return"and"!==n.op&&"or"!==n.op&&"&&"!==n.op&&"||"!==n.op||(o.op=n.op,Array.isArray(n.value)&&(o.value=e(t,n.value,r,i))),o}).filter(function(e){return"skip"!==e.op})}(this,a,t,n),d={};try{i=i.filter(function(e){return f.reduce(function(t,n){return t&&function e(t,n,r){if(!n||!t.get&&"and"!==t.op&&"or"!==t.op&&"&&"!==t.op&&"||"!==t.op)return!1;var i=t.get&&t.get(n);if("="===t.op||"=="===t.op||"is"===t.op)return"number"===t.type||"date"===t.type?+i==+t.value:i==t.value;if("!="===t.op||"<>"===t.op||"not"===t.op)return"number"===t.type||"date"===t.type?+i!=+t.value:i!=t.value;if(">"===t.op||"gt"===t.op)return i>t.value;if(">="===t.op||"gte"===t.op)return i>=t.value;if("<"===t.op||"lt"===t.op)return i<t.value;if("<="===t.op||"lte"===t.op)return i<=t.value;if("like"===t.op||"notlike"===t.op||"~"===t.op||"!~"===t.op){var o="like"===t.op||"~"===t.op;if(y(t.value)){if(!t.value)return!0;var a=r[t.value]||(r[t.value]=new RegExp(".*"+t.value.replace(/%/g,".*")+".*","gi"));o=a.test(i)}else S(t.value)&&(o=t.value.test(i));return"like"===t.op||"~"===t.op?o:!o}if("contains"===t.op||"@"===t.op){if(Array.isArray(i))return!!~i.indexOf(t.value)}else if("containslike"===t.op||"@~"===t.op||"containsnotlike"===t.op||"@!~"===t.op){if(Array.isArray(i)){var l=S(t.value)?t.value:y(t.value)?r[t.value]||(r[t.value]=new RegExp(".*"+t.value.replace(/%/g,".*")+".*","gi")):null;if(!l)return!1;var s=i.findIndex(function(e){return l.test((e||"").toString())});return"containslike"===t.op||"@~"===t.op?s>=0:s<0}}else{if(("or"===t.op||"||"===t.op)&&Array.isArray(t.value))return t.value.reduce(function(t,i){return t||e(i,n,r)},!1);if(("and"===t.op||"&&"===t.op)&&Array.isArray(t.value))return t.value.reduce(function(t,i){return t&&e(i,n,r)},!0)}return!0}(n,e,d)},!0)})}catch(e){}}return(y(l)||O(l)&&!Array.isArray(l))&&(l=[l]),Array.isArray(l)&&(l=l.map(function(r){return y(r)?{dir:"-"===r[0]?-1:1,get:j(e,{path:"-"===r[0]||"+"===r[0]?r.substr(1):r})}:r?{dir:k(r.dir)?r.dir:"desc"===r.dir?-1:1,get:r.id&&(L(e,t.find(function(e){return e.id===r.id}))||j(e,n.find(function(e){return e.id===r.id})))||r.path&&j(e,{path:r.path,value:r.value})}:void 0}).filter(function(e){return e&&e.get}),i.sort(function(e,t){for(var n,r,i,o=0;o<l.length;o++)if(n=l[o].get(e),r=l[o].get(t),0!==(i=l[o].dir*M(n,r)))return i;return i})),this.set("isFiltered",o.length!==i.length),i}},visibleRows:{get: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:{get:function(){var e=this.get("items")||z,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:{get: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 R=["label","type","filter","hidden","sort","no-pad","id","editable"],W=/^[a-z]{1,3}[0-9]+(?:-[0-9]+)?$/,z=[];function N(e){return void 0===e&&(e={}),function(t){var n=t.Ractive,r=t.instance;"includeGrid"in e&&n.styleSet("table.inclideGrid",e.includeGrid),r.components[e.name||"data-table"]=P}}i("RMTable","components",P),e.Table=P,e.plugin=N,e.default=N,Object.defineProperty(e,"__esModule",{value:!0})});

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

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