@evs-chris/raui
Advanced tools
Comparing version
@@ -42,3 +42,3 @@ import Ractive from 'ractive'; | ||
var primary = Object.assign({}, data('raui.primary'), data('raui.shell.primary')); | ||
return ("\n .rshell {\n width: 100%;\n height: 100%;\n position: absolute;\n overflow: hidden;\n }\n .rshell-sizer {\n position: absolute;\n }\n .rshell-modal {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n background-color: #000;\n z-index: -1;\n transition: opacity " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out, z-index 0s linear " + (data('raui.shell.slide.ms') || 400) + "ms;\n }\n .rshell-modal.rshell-blocked {\n opacity: 0.5;\n z-index: 3;\n transition: opacity " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out, z-index 0s linear;\n }\n .rshell-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n z-index: 1;\n }\n \n .rshell-middle {\n flex-grow: 1;\n position: relative;\n }\n \n .rshell-left, .rshell-right {\n position: absolute;\n top: 0;\n box-sizing: border-box;\n height: 100%;\n overflow: auto;\n z-index: 4;\n background-color: " + (primary.bg || 'inherit') + ";\n transition: transform " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out;\n }\n .rshell-left {\n left: 0;\n width: " + left + ";\n }\n .rshell-right {\n right: 0;\n width: " + right + ";\n }\n .rshell-left-hidden > .rshell-left {\n transform: translateX(-100%);\n }\n .rshell-right-hidden > .rshell-right {\n transform: translateX(100%);\n }\n .rshell-has-right > .rshell-right,\n .rshell-has-left > .rshell-left {\n z-index: 2;\n }\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-right {\n z-index: 2;\n }\n \n .rshell-left-pop, .rshell-right-pop, .rshell-top-pop, .rshell-bottom-pop {\n z-index: 5;\n transition: transform " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out;\n position: absolute;\n }\n .rshell-left-pop, .rshell-right-pop {\n top: 0;\n bottom: 0;\n max-width: 100%;\n overflow: auto;\n }\n .rshell-top-pop, .rshell-bottom-pop {\n left: 0;\n right: 0;\n max-height: 100%;\n overflow: auto;\n }\n \n .rshell-left-pop {\n transform: translateX(-100%);\n }\n .rshell-right-pop {\n transform: translateX(100%);\n right: 0;\n }\n .rshell-top-pop {\n top: 0;\n transform: translateY(-100%);\n }\n .rshell-bottom-pop {\n bottom: 0;\n transform: translateY(100%);\n }\n \n .rshell-left-popped > .rshell-left-pop,\n .rshell-right-popped > .rshell-right-pop,\n .rshell-top-popped > .rshell-top-pop,\n .rshell-bottom-popped > .rshell-bottom-pop {\n transform: none;\n }\n \n .rshell-center {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n box-sizing: border-box;\n transition: left " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out, width " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out;\n height: 100%;\n width: 100%;\n flex-grow: 1;\n overflow: auto;\n }\n .rshell-has-left > .rshell-center {\n width: calc(100% - " + left + ");\n left: " + left + ";\n }\n .rshell-has-right > .rshell-center {\n width: calc(100% - " + right + ");\n left: 0;\n }\n .rshell-has-left.rshell-has-right > .rshell-center {\n width: calc(100% - " + left + " - " + right + ");\n left: " + left + ";\n }\n .rshell-has-left.rshell-left-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n .rshell-has-right.rshell-right-hidden > .rshell-center {\n width: 100%;\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden > .rshell-center {\n width: calc(100% - " + right + ");\n left: 0;\n }\n .rshell-has-left.rshell-has-right.rshell-right-hidden > .rshell-center {\n width: calc(100% - " + left + ");\n left: " + left + ";\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden.rshell-right-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n \n .rshell-overflow {\n overflow: visible;\n }\n "); | ||
return ("\n .rshell {\n width: 100%;\n height: 100%;\n position: absolute;\n overflow: hidden;\n }\n .rshell-sizer {\n position: absolute;\n }\n .rshell-modal {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n background-color: #000;\n z-index: -1;\n transition: opacity " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out, z-index 0s linear " + (data('raui.shell.slide.ms') || 400) + "ms;\n }\n .rshell-modal.rshell-blocked {\n opacity: 0.5;\n z-index: 3;\n transition: opacity " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out, z-index 0s linear;\n }\n .rshell-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n z-index: 1;\n background-color: " + (primary.bg || 'inherit') + ";\n }\n \n .rshell-middle {\n flex-grow: 1;\n position: relative;\n }\n \n .rshell-left, .rshell-right {\n position: absolute;\n top: 0;\n box-sizing: border-box;\n height: 100%;\n overflow: auto;\n z-index: 4;\n background-color: " + (primary.bg || 'inherit') + ";\n transition: transform " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out;\n }\n .rshell-left {\n left: 0;\n width: " + left + ";\n }\n .rshell-right {\n right: 0;\n width: " + right + ";\n }\n .rshell-left-hidden > .rshell-left {\n transform: translateX(-100%);\n }\n .rshell-right-hidden > .rshell-right {\n transform: translateX(100%);\n }\n .rshell-has-right > .rshell-right,\n .rshell-has-left > .rshell-left {\n z-index: 2;\n }\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-right {\n z-index: 2;\n }\n \n .rshell-left-pop, .rshell-right-pop, .rshell-top-pop, .rshell-bottom-pop {\n z-index: 5;\n transition: transform " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out;\n position: absolute;\n }\n .rshell-left-pop, .rshell-right-pop {\n top: 0;\n bottom: 0;\n max-width: 100%;\n overflow: auto;\n }\n .rshell-top-pop, .rshell-bottom-pop {\n left: 0;\n right: 0;\n max-height: 100%;\n overflow: auto;\n }\n \n .rshell-left-pop {\n transform: translateX(-100%);\n }\n .rshell-right-pop {\n transform: translateX(100%);\n right: 0;\n }\n .rshell-top-pop {\n top: 0;\n transform: translateY(-100%);\n }\n .rshell-bottom-pop {\n bottom: 0;\n transform: translateY(100%);\n }\n \n .rshell-left-popped > .rshell-left-pop,\n .rshell-right-popped > .rshell-right-pop,\n .rshell-top-popped > .rshell-top-pop,\n .rshell-bottom-popped > .rshell-bottom-pop {\n transform: none;\n }\n \n .rshell-center {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n flex-grow: 1;\n overflow: auto;\n }\n .rshell-has-left > .rshell-center {\n width: calc(100% - " + left + ");\n left: " + left + ";\n }\n .rshell-has-right > .rshell-center {\n width: calc(100% - " + right + ");\n left: 0;\n }\n .rshell-has-left.rshell-has-right > .rshell-center {\n width: calc(100% - " + left + " - " + right + ");\n left: " + left + ";\n }\n .rshell-has-left.rshell-left-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n .rshell-has-right.rshell-right-hidden > .rshell-center {\n width: 100%;\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden > .rshell-center {\n width: calc(100% - " + right + ");\n left: 0;\n }\n .rshell-has-left.rshell-has-right.rshell-right-hidden > .rshell-center {\n width: calc(100% - " + left + ");\n left: " + left + ";\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden.rshell-right-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n \n .rshell-overflow {\n overflow: visible;\n }\n "); | ||
// TODO: other themes | ||
@@ -45,0 +45,0 @@ }).call(this, data)].join(' '); }, |
@@ -1,1 +0,1 @@ | ||
import Ractive from"ractive";import{left as swipeleft,right as swiperight}from"./event-swipe";import globalRegister from"./globalRegister";export var Shell=function(Ractive){function Shell(opts){Ractive.call(this,opts)}if(Ractive)Shell.__proto__=Ractive;Shell.prototype=Object.create(Ractive&&Ractive.prototype);Shell.prototype.constructor=Shell;Shell.prototype.adaptSize=function adaptSize(reinit){if(reinit){if(this._media){this._media.cancel()}initMediaListener(this)}else{this._media&&this._media.fn()}};Shell.prototype.sizeInPx=function sizeInPx(size){if(!this.sizer){return 160}this.sizer.style.width=typeof size==="number"?size+"px":size;return this.sizer.clientWidth};Shell.prototype.relativeSize=function relativeSize(size,rel){if(rel===void 0)rel="1em";if(!this.sizer){return 10}return this.sizeInPx(size)/this.sizeInPx(rel)};return Shell}(Ractive);Ractive.extendWith(Shell,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell",g:1},{t:16,r:"extra-attributes"},{n:"tracked",t:71,f:{r:[],s:'["outer"]'}},{n:"class-rshell-left-popped",t:13,f:[{t:2,r:".leftPop"}]},{n:"class-rshell-right-popped",t:13,f:[{t:2,r:".rightPop"}]},{n:"class-rshell-top-popped",t:13,f:[{t:2,r:".topPop"}]},{n:"class-rshell-bottom-popped",t:13,f:[{t:2,r:".bottomPop"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-sizer",g:1},{n:"tracked",t:71,f:{r:[],s:'["sizer"]'}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-main",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-top",g:1},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/topOverflow"}]},{t:4,f:[{t:16,r:"._topA"}],n:50,r:"._topA"}],f:[{t:16,r:"._top"}]}],n:50,r:"._top"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-middle",g:1},{n:"class-rshell-has-left",t:13,f:[{t:2,x:{r:["._left","._leftOver",".leftOver"],s:"_0&&!_1&&!_2"}}]},{n:"class-rshell-has-right",t:13,f:[{t:2,x:{r:["._right","._rightOver",".rightOver"],s:"_0&&!_1&&!_2"}}]},{n:"class-rshell-left-hidden",t:13,f:[{t:2,r:".leftHidden"}]},{n:"class-rshell-right-hidden",t:13,f:[{t:2,r:".rightHidden"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-modal",g:1},{n:"class-rshell-blocked",t:13,f:[{t:2,x:{r:[".blocked",".blockableLeft",".leftPull",".blockableRight",".rightPull"],s:"_0||(_1&&_2)||(_3&&_4)"}}]},{n:["click"],t:70,f:{r:["@this",".leftOver","._leftOver",".leftHidden",".rightOver","._rightOver",".rightHidden"],s:"[_0.set({leftHidden:_1||_2?true:_3,rightHidden:_4||_5?true:_6})]"}},{t:4,f:[{n:["swipeleft"],t:70,a:{r:[],s:'[{bind:".leftPush"}]'},f:{r:["@this"],s:'[_0.set("leftHidden",true)]'}},{n:["swiperight"],t:70,a:{r:[],s:'[{bind:".rightPush"}]'},f:{r:["@this"],s:'[_0.set("rightHidden",true)]'}}],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-opacity",f:[{t:2,x:{r:[".leftPull",".rightPull"],s:"Math.min(_0||_1,100)/200"}}],t:13}],n:50,x:{r:[".leftPull",".rightPull"],s:"_0||_1"}}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-left",g:1},{n:"tracked",t:71,f:{r:[],s:'["left"]'}},{t:4,f:[{t:16,r:"._leftA"}],n:50,r:"._leftA"},{t:4,f:[{n:["swipeleft"],t:70,a:{r:[],s:'[{bind:".leftPush"}]'},f:{r:["@this"],s:'[_0.set("leftHidden",true)]'}}],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(-",{t:2,x:{r:[".leftPull"],s:"100-(_0>100?100:_0)"}},"%)"],t:13}],n:50,r:".leftPull"},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(-",{t:2,x:{r:[".leftPush"],s:"_0>100?100:_0"}},"%)"],t:13}],n:50,r:".leftPush"},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/leftOverflow"}]}],f:[{t:16,r:"._left"}]}],n:50,r:"._left"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-center",g:1},{n:"tracked",t:71,f:{r:[],s:'["center"]'}},{t:4,f:[{t:16,r:"._centerA"}],n:50,r:"._centerA"},{t:4,f:[" ",{t:4,f:[{n:["swiperight"],t:70,a:{r:[],s:'[{maxX:80,bind:".leftPull"}]'},f:{r:["@this"],s:'[_0.set("leftHidden",false)]'}}],n:50,x:{r:["._left",".leftHidden"],s:"_0&&_1"}}," ",{t:4,f:[{n:["swipeleft"],t:70,a:{r:[],s:'[{minX:-80,bind:".rightPull"}]'},f:{r:["@this"],s:'[_0.set("rightHidden",false)]'}}],n:50,x:{r:["._right",".rightHidden"],s:"_0&&_1"}}," "],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/centerOverflow"}]}],f:[{t:16,r:"._center"}]}],n:50,r:"._center"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-right",g:1},{n:"tracked",t:71,f:{r:[],s:'["right"]'}},{t:4,f:[{t:16,r:"._rightA"}],n:50,r:"._rightA"},{t:4,f:[{n:["swiperight"],t:70,a:{r:[],s:'[{bind:".rightPush"}]'},f:{r:["@this"],s:'[_0.set("rightHidden",true)]'}}],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(",{t:2,x:{r:[".rightPull"],s:"100-(_0>100?100:_0)"}},"%)"],t:13}],n:50,r:".rightPull"},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(",{t:2,x:{r:[".rightPush"],s:"_0>100?100:_0"}},"%)"],t:13}],n:50,r:".rightPush"},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/rightOverflow"}]}],f:[{t:16,r:"._right"}]}],n:50,r:"._right"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-bottom",g:1},{t:4,f:[{t:16,r:"._bottomA"}],n:50,r:"._bottomA"},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/bottomOverflow"}]}],f:[{t:16,r:"._bottom"}]}],n:50,r:"._bottom"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-left-pop",g:1},{t:4,f:[{t:16,r:"._leftPopA"}],n:50,r:"._leftPopA"}],f:[{t:16,r:"._leftPop"}]}],n:50,r:"._leftPop"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-right-pop",g:1},{t:4,f:[{t:16,r:"._rightPopA"}],n:50,r:"._rightPopA"}],f:[{t:16,r:"._rightPop"}]}],n:50,r:"._rightPop"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-bottom-pop",g:1},{t:4,f:[{t:16,r:"._bottomPopA"}],n:50,r:"._bottomPopA"}],f:[{t:16,r:"._bottomPop"}]}],n:50,r:"._bottomPop"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-top-pop",g:1},{t:4,f:[{t:16,r:"._topPopA"}],n:50,r:"._topPopA"}],f:[{t:16,r:"._topPop"}]}],n:50,r:"._topPop"}]}],e:{'["outer"]':function(){return["outer"]},'["sizer"]':function(){return["sizer"]},"_0&&!_1&&!_2":function(_0,_1,_2){return _0&&!_1&&!_2},"_0||(_1&&_2)||(_3&&_4)":function(_0,_1,_2,_3,_4){return _0||_1&&_2||_3&&_4},"[_0.set({leftHidden:_1||_2?true:_3,rightHidden:_4||_5?true:_6})]":function(_0,_1,_2,_3,_4,_5,_6){return[_0.set({leftHidden:_1||_2?true:_3,rightHidden:_4||_5?true:_6})]},'[{bind:".leftPush"}]':function(){return[{bind:".leftPush"}]},'[_0.set("leftHidden",true)]':function(_0){return[_0.set("leftHidden",true)]},'[{bind:".rightPush"}]':function(){return[{bind:".rightPush"}]},'[_0.set("rightHidden",true)]':function(_0){return[_0.set("rightHidden",true)]},'"side-swipe"':function(){return"side-swipe"},"Math.min(_0||_1,100)/200":function(_0,_1){return Math.min(_0||_1,100)/200},"_0||_1":function(_0,_1){return _0||_1},'["left"]':function(){return["left"]},"100-(_0>100?100:_0)":function(_0){return 100-(_0>100?100:_0)},"_0>100?100:_0":function(_0){return _0>100?100:_0},'["center"]':function(){return["center"]},'[{maxX:80,bind:".leftPull"}]':function(){return[{maxX:80,bind:".leftPull"}]},'[_0.set("leftHidden",false)]':function(_0){return[_0.set("leftHidden",false)]},"_0&&_1":function(_0,_1){return _0&&_1},'[{minX:-80,bind:".rightPull"}]':function(){return[{minX:-80,bind:".rightPull"}]},'[_0.set("rightHidden",false)]':function(_0){return[_0.set("rightHidden",false)]},'["right"]':function(){return["right"]}}},css:function(data){return[function(data){var left=data("raui.shell.left.width")||data("raui.menu.width")||"18em";var right=data("raui.shell.right.width")||data("raui.menu.width")||"18em";var primary=Object.assign({},data("raui.primary"),data("raui.shell.primary"));return"\n .rshell {\n width: 100%;\n height: 100%;\n position: absolute;\n overflow: hidden;\n }\n .rshell-sizer {\n position: absolute;\n }\n .rshell-modal {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n background-color: #000;\n z-index: -1;\n transition: opacity "+(data("raui.shell.slide.ms")||400)+"ms ease-in-out, z-index 0s linear "+(data("raui.shell.slide.ms")||400)+"ms;\n }\n .rshell-modal.rshell-blocked {\n opacity: 0.5;\n z-index: 3;\n transition: opacity "+(data("raui.shell.slide.ms")||400)+"ms ease-in-out, z-index 0s linear;\n }\n .rshell-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n z-index: 1;\n }\n \n .rshell-middle {\n flex-grow: 1;\n position: relative;\n }\n \n .rshell-left, .rshell-right {\n position: absolute;\n top: 0;\n box-sizing: border-box;\n height: 100%;\n overflow: auto;\n z-index: 4;\n background-color: "+(primary.bg||"inherit")+";\n transition: transform "+(data("raui.shell.slide.ms")||400)+"ms ease-in-out;\n }\n .rshell-left {\n left: 0;\n width: "+left+";\n }\n .rshell-right {\n right: 0;\n width: "+right+";\n }\n .rshell-left-hidden > .rshell-left {\n transform: translateX(-100%);\n }\n .rshell-right-hidden > .rshell-right {\n transform: translateX(100%);\n }\n .rshell-has-right > .rshell-right,\n .rshell-has-left > .rshell-left {\n z-index: 2;\n }\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-right {\n z-index: 2;\n }\n \n .rshell-left-pop, .rshell-right-pop, .rshell-top-pop, .rshell-bottom-pop {\n z-index: 5;\n transition: transform "+(data("raui.shell.slide.ms")||400)+"ms ease-in-out;\n position: absolute;\n }\n .rshell-left-pop, .rshell-right-pop {\n top: 0;\n bottom: 0;\n max-width: 100%;\n overflow: auto;\n }\n .rshell-top-pop, .rshell-bottom-pop {\n left: 0;\n right: 0;\n max-height: 100%;\n overflow: auto;\n }\n \n .rshell-left-pop {\n transform: translateX(-100%);\n }\n .rshell-right-pop {\n transform: translateX(100%);\n right: 0;\n }\n .rshell-top-pop {\n top: 0;\n transform: translateY(-100%);\n }\n .rshell-bottom-pop {\n bottom: 0;\n transform: translateY(100%);\n }\n \n .rshell-left-popped > .rshell-left-pop,\n .rshell-right-popped > .rshell-right-pop,\n .rshell-top-popped > .rshell-top-pop,\n .rshell-bottom-popped > .rshell-bottom-pop {\n transform: none;\n }\n \n .rshell-center {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n box-sizing: border-box;\n transition: left "+(data("raui.shell.slide.ms")||400)+"ms ease-in-out, width "+(data("raui.shell.slide.ms")||400)+"ms ease-in-out;\n height: 100%;\n width: 100%;\n flex-grow: 1;\n overflow: auto;\n }\n .rshell-has-left > .rshell-center {\n width: calc(100% - "+left+");\n left: "+left+";\n }\n .rshell-has-right > .rshell-center {\n width: calc(100% - "+right+");\n left: 0;\n }\n .rshell-has-left.rshell-has-right > .rshell-center {\n width: calc(100% - "+left+" - "+right+");\n left: "+left+";\n }\n .rshell-has-left.rshell-left-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n .rshell-has-right.rshell-right-hidden > .rshell-center {\n width: 100%;\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden > .rshell-center {\n width: calc(100% - "+right+");\n left: 0;\n }\n .rshell-has-left.rshell-has-right.rshell-right-hidden > .rshell-center {\n width: calc(100% - "+left+");\n left: "+left+";\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden.rshell-right-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n \n .rshell-overflow {\n overflow: visible;\n }\n "}.call(this,data)].join(" ")},attributes:["adaptive","side-swipe"],use:[swipeleft,swiperight],decorators:{tracked:function tracked(node,name){this[name]=node;return{teardown:function teardown(){this[name]=undefined}}}},cssId:"rshell",noCssTransform:true,computed:{blockableLeft:function blockableLeft(){return this.get("_left")&&(this.get("leftOver")||this.get("_leftOver"))},blockableRight:function blockableRight(){return this.get("_right")&&(this.get("rightOver")||this.get("_rightOver"))},blocked:function blocked(){return this.get("blockableLeft")&&!this.get("leftHidden")||this.get("blockableRight")&&!this.get("rightHidden")||this.get("leftPop")||this.get("rightPop")||this.get("topPop")||this.get("bottomPop")}},on:{construct:construct,config:function config(){if(this._items){this.set(this._items)}},init:function init(){var this$1=this;if(this.get("@style.shell.sides.initialTimeout")&&(this.get("rightOver")||this.get("leftOver"))){setTimeout(function(){if(this$1.get("rightOver")){this$1.set("rightHidden",true)}if(this$1.get("leftOver")){this$1.set("leftHidden",true)}},this.get("@style.shell.sides.initialTimeout")||1500)}else{if(this.get("rightOver")){this.set("rightHidden",true)}if(this.get("leftOver")){this.set("leftHidden",true)}}},complete:function complete(){initMediaListener(this)},unrender:function unrender(){if(this._media){this._media.cancel()}}},observe:{"leftHidden rightHidden":{handler:function handler(v,o,k){var this$1=this;if(~k.indexOf("left")&&!this.get("leftOver")&&!this.get("_leftOver")||~k.indexOf("right")&&!this.get("rightOver")&&!this.get("_rightOver")){setTimeout(function(){this$1._media&&this$1._media.listener&&this$1._media.listener.silence();this$1._media&&this$1._media.observer&&this$1._media.observer.silence();this$1.fire("resize");this$1._media&&this$1._media.listener&&this$1._media.listener.resume();this$1._media&&this$1._media.observer&&this$1._media.observer.resume()},(this.get("shell.slide.ms")||400)+10)}},defer:true,init:false}}});var parts=["top","bottom","center","left","right","left-pop","right-pop","top-pop","bottom-pop"];var skipAttrs=["hidden","primary","over","popped","overflow","forced"];function construct(){var cmp=this.component;if(!cmp){return}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 items={};tpl.forEach(function(e){if(~parts.indexOf(e.e)){var name=e.e==="left-pop"?"leftPop":e.e==="right-pop"?"rightPop":e.e==="top-pop"?"topPop":e.e==="bottom-pop"?"bottomPop":e.e;items["_"+name]={t:e.f};if(e.m){var as=e.m.filter(function(a){return!~skipAttrs.indexOf(a.n)});if(as.length){items["_"+name+"A"]={t:as}}if(as.length!==e.m.length){var a=e.m.find(function(a){return a.n==="hidden"});if(a){attrs.push({t:13,n:name+"Hidden",f:a.f})}a=e.m.find(function(a){return a.n==="over"});if(a){attrs.push({t:13,n:name+"Over",f:a.f})}a=e.m.find(function(a){return a.n==="primary"});if(a){attrs.push({t:13,n:"_"+name+"Primary",f:a.f})}if(~e.e.indexOf("-pop")){a=e.m.find(function(a){return a.n==="popped"});if(a){attrs.push({t:13,n:name,f:a.f})}}a=e.m.find(function(a){return a.n==="overflow"});if(a){attrs.push({t:13,n:name+"Overflow",f:a.f})}a=(e.e==="left"||e.e==="right")&&e.m.find(function(a){return a.n==="forced"});if(a){attrs.push({t:13,n:"_"+name+"Over",f:a.f})}}}}});this._items=items}function initMediaListener(r){if(typeof window==="undefined"){return}if(!r.left&&!r.right){return}if(r._media){return r._media.fn}var inited=0;var tm;var media={fn:function fn(){var outer=r.relativeSize("100%");if(media.last===outer){return}else{media.last=outer}var sizes={left:!r.get("leftOver")&&r.left&&r.left.clientWidth||0,right:!r.get("rightOver")&&r.right&&r.right.clientWidth||0};if(sizes.left){sizes.left=r.relativeSize(sizes.left)}if(sizes.right){sizes.right=r.relativeSize(sizes.right)}var primary=r.get("_rightPrimary")?"right":"left";var secondary=primary==="right"?"left":"right";var medium=r.relativeSize(r.get("@style.break.medium")||"60rem","1rem");var overs={_leftOver:false,_rightOver:false};var hides={leftHidden:r.get("leftOver"),rightHidden:r.get("rightOver")};if(!inited){overs.leftHidden=false;overs.rightHidden=false}var w=outer-sizes.left-sizes.right;if(w<=medium){w+=sizes[secondary];hides[secondary+"Hidden"]=true;overs["_"+secondary+"Over"]=true;if(w<=medium){hides[primary+"Hidden"]=true;overs["_"+primary+"Over"]=true}}r.set(overs);if(!inited){inited=1;setTimeout(function(){inited=2;r.set(hides)},r.get("@style.shell.sides.initialTimeout")||1500)}else if(inited===2){r.set(hides)}if(tm){clearTimeout(tm)}tm=setTimeout(function(){if(media.listener){media.listener.silence()}r.fire("resize");if(media.listener){media.listener.resume()}tm=0},(r.get("shell.slide.ms")||400)+100)},cancel:function cancel(){r._media=null;window.removeEventListener("resize",media.fn);if(media.observer){media.observer.cancel()}if(media.listener){media.listener.cancel()}}};window.addEventListener("resize",media.fn);media.observer=r.observe("@style leftOver rightOver _leftPrimary _rightPrimary",media.fn,{init:false});if(r.get("adaptive")){media.listener=r.root.on("*.resize",media.fn)}r._media=media;r._media.fn()}export function plugin(opts){if(opts===void 0)opts={};return function(ref){var instance=ref.instance;instance.components[opts.name||"shell"]=Shell}}globalRegister("RMShell","components",Shell);export default plugin; | ||
import Ractive from"ractive";import{left as swipeleft,right as swiperight}from"./event-swipe";import globalRegister from"./globalRegister";export var Shell=function(Ractive){function Shell(opts){Ractive.call(this,opts)}if(Ractive)Shell.__proto__=Ractive;Shell.prototype=Object.create(Ractive&&Ractive.prototype);Shell.prototype.constructor=Shell;Shell.prototype.adaptSize=function adaptSize(reinit){if(reinit){if(this._media){this._media.cancel()}initMediaListener(this)}else{this._media&&this._media.fn()}};Shell.prototype.sizeInPx=function sizeInPx(size){if(!this.sizer){return 160}this.sizer.style.width=typeof size==="number"?size+"px":size;return this.sizer.clientWidth};Shell.prototype.relativeSize=function relativeSize(size,rel){if(rel===void 0)rel="1em";if(!this.sizer){return 10}return this.sizeInPx(size)/this.sizeInPx(rel)};return Shell}(Ractive);Ractive.extendWith(Shell,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell",g:1},{t:16,r:"extra-attributes"},{n:"tracked",t:71,f:{r:[],s:'["outer"]'}},{n:"class-rshell-left-popped",t:13,f:[{t:2,r:".leftPop"}]},{n:"class-rshell-right-popped",t:13,f:[{t:2,r:".rightPop"}]},{n:"class-rshell-top-popped",t:13,f:[{t:2,r:".topPop"}]},{n:"class-rshell-bottom-popped",t:13,f:[{t:2,r:".bottomPop"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-sizer",g:1},{n:"tracked",t:71,f:{r:[],s:'["sizer"]'}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-main",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-top",g:1},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/topOverflow"}]},{t:4,f:[{t:16,r:"._topA"}],n:50,r:"._topA"}],f:[{t:16,r:"._top"}]}],n:50,r:"._top"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-middle",g:1},{n:"class-rshell-has-left",t:13,f:[{t:2,x:{r:["._left","._leftOver",".leftOver"],s:"_0&&!_1&&!_2"}}]},{n:"class-rshell-has-right",t:13,f:[{t:2,x:{r:["._right","._rightOver",".rightOver"],s:"_0&&!_1&&!_2"}}]},{n:"class-rshell-left-hidden",t:13,f:[{t:2,r:".leftHidden"}]},{n:"class-rshell-right-hidden",t:13,f:[{t:2,r:".rightHidden"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-modal",g:1},{n:"class-rshell-blocked",t:13,f:[{t:2,x:{r:[".blocked",".blockableLeft",".leftPull",".blockableRight",".rightPull"],s:"_0||(_1&&_2)||(_3&&_4)"}}]},{n:["click"],t:70,f:{r:["@this",".leftOver","._leftOver",".leftHidden",".rightOver","._rightOver",".rightHidden"],s:"[_0.set({leftHidden:_1||_2?true:_3,rightHidden:_4||_5?true:_6})]"}},{t:4,f:[{n:["swipeleft"],t:70,a:{r:[],s:'[{bind:".leftPush"}]'},f:{r:["@this"],s:'[_0.set("leftHidden",true)]'}},{n:["swiperight"],t:70,a:{r:[],s:'[{bind:".rightPush"}]'},f:{r:["@this"],s:'[_0.set("rightHidden",true)]'}}],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-opacity",f:[{t:2,x:{r:[".leftPull",".rightPull"],s:"Math.min(_0||_1,100)/200"}}],t:13}],n:50,x:{r:[".leftPull",".rightPull"],s:"_0||_1"}}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-left",g:1},{n:"tracked",t:71,f:{r:[],s:'["left"]'}},{t:4,f:[{t:16,r:"._leftA"}],n:50,r:"._leftA"},{t:4,f:[{n:["swipeleft"],t:70,a:{r:[],s:'[{bind:".leftPush"}]'},f:{r:["@this"],s:'[_0.set("leftHidden",true)]'}}],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(-",{t:2,x:{r:[".leftPull"],s:"100-(_0>100?100:_0)"}},"%)"],t:13}],n:50,r:".leftPull"},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(-",{t:2,x:{r:[".leftPush"],s:"_0>100?100:_0"}},"%)"],t:13}],n:50,r:".leftPush"},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/leftOverflow"}]}],f:[{t:16,r:"._left"}]}],n:50,r:"._left"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-center",g:1},{n:"tracked",t:71,f:{r:[],s:'["center"]'}},{t:4,f:[{t:16,r:"._centerA"}],n:50,r:"._centerA"},{t:4,f:[" ",{t:4,f:[{n:["swiperight"],t:70,a:{r:[],s:'[{maxX:80,bind:".leftPull"}]'},f:{r:["@this"],s:'[_0.set("leftHidden",false)]'}}],n:50,x:{r:["._left",".leftHidden"],s:"_0&&_1"}}," ",{t:4,f:[{n:["swipeleft"],t:70,a:{r:[],s:'[{minX:-80,bind:".rightPull"}]'},f:{r:["@this"],s:'[_0.set("rightHidden",false)]'}}],n:50,x:{r:["._right",".rightHidden"],s:"_0&&_1"}}," "],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/centerOverflow"}]}],f:[{t:16,r:"._center"}]}],n:50,r:"._center"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-right",g:1},{n:"tracked",t:71,f:{r:[],s:'["right"]'}},{t:4,f:[{t:16,r:"._rightA"}],n:50,r:"._rightA"},{t:4,f:[{n:["swiperight"],t:70,a:{r:[],s:'[{bind:".rightPush"}]'},f:{r:["@this"],s:'[_0.set("rightHidden",true)]'}}],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(",{t:2,x:{r:[".rightPull"],s:"100-(_0>100?100:_0)"}},"%)"],t:13}],n:50,r:".rightPull"},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(",{t:2,x:{r:[".rightPush"],s:"_0>100?100:_0"}},"%)"],t:13}],n:50,r:".rightPush"},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/rightOverflow"}]}],f:[{t:16,r:"._right"}]}],n:50,r:"._right"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-bottom",g:1},{t:4,f:[{t:16,r:"._bottomA"}],n:50,r:"._bottomA"},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/bottomOverflow"}]}],f:[{t:16,r:"._bottom"}]}],n:50,r:"._bottom"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-left-pop",g:1},{t:4,f:[{t:16,r:"._leftPopA"}],n:50,r:"._leftPopA"}],f:[{t:16,r:"._leftPop"}]}],n:50,r:"._leftPop"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-right-pop",g:1},{t:4,f:[{t:16,r:"._rightPopA"}],n:50,r:"._rightPopA"}],f:[{t:16,r:"._rightPop"}]}],n:50,r:"._rightPop"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-bottom-pop",g:1},{t:4,f:[{t:16,r:"._bottomPopA"}],n:50,r:"._bottomPopA"}],f:[{t:16,r:"._bottomPop"}]}],n:50,r:"._bottomPop"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-top-pop",g:1},{t:4,f:[{t:16,r:"._topPopA"}],n:50,r:"._topPopA"}],f:[{t:16,r:"._topPop"}]}],n:50,r:"._topPop"}]}],e:{'["outer"]':function(){return["outer"]},'["sizer"]':function(){return["sizer"]},"_0&&!_1&&!_2":function(_0,_1,_2){return _0&&!_1&&!_2},"_0||(_1&&_2)||(_3&&_4)":function(_0,_1,_2,_3,_4){return _0||_1&&_2||_3&&_4},"[_0.set({leftHidden:_1||_2?true:_3,rightHidden:_4||_5?true:_6})]":function(_0,_1,_2,_3,_4,_5,_6){return[_0.set({leftHidden:_1||_2?true:_3,rightHidden:_4||_5?true:_6})]},'[{bind:".leftPush"}]':function(){return[{bind:".leftPush"}]},'[_0.set("leftHidden",true)]':function(_0){return[_0.set("leftHidden",true)]},'[{bind:".rightPush"}]':function(){return[{bind:".rightPush"}]},'[_0.set("rightHidden",true)]':function(_0){return[_0.set("rightHidden",true)]},'"side-swipe"':function(){return"side-swipe"},"Math.min(_0||_1,100)/200":function(_0,_1){return Math.min(_0||_1,100)/200},"_0||_1":function(_0,_1){return _0||_1},'["left"]':function(){return["left"]},"100-(_0>100?100:_0)":function(_0){return 100-(_0>100?100:_0)},"_0>100?100:_0":function(_0){return _0>100?100:_0},'["center"]':function(){return["center"]},'[{maxX:80,bind:".leftPull"}]':function(){return[{maxX:80,bind:".leftPull"}]},'[_0.set("leftHidden",false)]':function(_0){return[_0.set("leftHidden",false)]},"_0&&_1":function(_0,_1){return _0&&_1},'[{minX:-80,bind:".rightPull"}]':function(){return[{minX:-80,bind:".rightPull"}]},'[_0.set("rightHidden",false)]':function(_0){return[_0.set("rightHidden",false)]},'["right"]':function(){return["right"]}}},css:function(data){return[function(data){var left=data("raui.shell.left.width")||data("raui.menu.width")||"18em";var right=data("raui.shell.right.width")||data("raui.menu.width")||"18em";var primary=Object.assign({},data("raui.primary"),data("raui.shell.primary"));return"\n .rshell {\n width: 100%;\n height: 100%;\n position: absolute;\n overflow: hidden;\n }\n .rshell-sizer {\n position: absolute;\n }\n .rshell-modal {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n background-color: #000;\n z-index: -1;\n transition: opacity "+(data("raui.shell.slide.ms")||400)+"ms ease-in-out, z-index 0s linear "+(data("raui.shell.slide.ms")||400)+"ms;\n }\n .rshell-modal.rshell-blocked {\n opacity: 0.5;\n z-index: 3;\n transition: opacity "+(data("raui.shell.slide.ms")||400)+"ms ease-in-out, z-index 0s linear;\n }\n .rshell-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n z-index: 1;\n background-color: "+(primary.bg||"inherit")+";\n }\n \n .rshell-middle {\n flex-grow: 1;\n position: relative;\n }\n \n .rshell-left, .rshell-right {\n position: absolute;\n top: 0;\n box-sizing: border-box;\n height: 100%;\n overflow: auto;\n z-index: 4;\n background-color: "+(primary.bg||"inherit")+";\n transition: transform "+(data("raui.shell.slide.ms")||400)+"ms ease-in-out;\n }\n .rshell-left {\n left: 0;\n width: "+left+";\n }\n .rshell-right {\n right: 0;\n width: "+right+";\n }\n .rshell-left-hidden > .rshell-left {\n transform: translateX(-100%);\n }\n .rshell-right-hidden > .rshell-right {\n transform: translateX(100%);\n }\n .rshell-has-right > .rshell-right,\n .rshell-has-left > .rshell-left {\n z-index: 2;\n }\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-right {\n z-index: 2;\n }\n \n .rshell-left-pop, .rshell-right-pop, .rshell-top-pop, .rshell-bottom-pop {\n z-index: 5;\n transition: transform "+(data("raui.shell.slide.ms")||400)+"ms ease-in-out;\n position: absolute;\n }\n .rshell-left-pop, .rshell-right-pop {\n top: 0;\n bottom: 0;\n max-width: 100%;\n overflow: auto;\n }\n .rshell-top-pop, .rshell-bottom-pop {\n left: 0;\n right: 0;\n max-height: 100%;\n overflow: auto;\n }\n \n .rshell-left-pop {\n transform: translateX(-100%);\n }\n .rshell-right-pop {\n transform: translateX(100%);\n right: 0;\n }\n .rshell-top-pop {\n top: 0;\n transform: translateY(-100%);\n }\n .rshell-bottom-pop {\n bottom: 0;\n transform: translateY(100%);\n }\n \n .rshell-left-popped > .rshell-left-pop,\n .rshell-right-popped > .rshell-right-pop,\n .rshell-top-popped > .rshell-top-pop,\n .rshell-bottom-popped > .rshell-bottom-pop {\n transform: none;\n }\n \n .rshell-center {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n flex-grow: 1;\n overflow: auto;\n }\n .rshell-has-left > .rshell-center {\n width: calc(100% - "+left+");\n left: "+left+";\n }\n .rshell-has-right > .rshell-center {\n width: calc(100% - "+right+");\n left: 0;\n }\n .rshell-has-left.rshell-has-right > .rshell-center {\n width: calc(100% - "+left+" - "+right+");\n left: "+left+";\n }\n .rshell-has-left.rshell-left-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n .rshell-has-right.rshell-right-hidden > .rshell-center {\n width: 100%;\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden > .rshell-center {\n width: calc(100% - "+right+");\n left: 0;\n }\n .rshell-has-left.rshell-has-right.rshell-right-hidden > .rshell-center {\n width: calc(100% - "+left+");\n left: "+left+";\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden.rshell-right-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n \n .rshell-overflow {\n overflow: visible;\n }\n "}.call(this,data)].join(" ")},attributes:["adaptive","side-swipe"],use:[swipeleft,swiperight],decorators:{tracked:function tracked(node,name){this[name]=node;return{teardown:function teardown(){this[name]=undefined}}}},cssId:"rshell",noCssTransform:true,computed:{blockableLeft:function blockableLeft(){return this.get("_left")&&(this.get("leftOver")||this.get("_leftOver"))},blockableRight:function blockableRight(){return this.get("_right")&&(this.get("rightOver")||this.get("_rightOver"))},blocked:function blocked(){return this.get("blockableLeft")&&!this.get("leftHidden")||this.get("blockableRight")&&!this.get("rightHidden")||this.get("leftPop")||this.get("rightPop")||this.get("topPop")||this.get("bottomPop")}},on:{construct:construct,config:function config(){if(this._items){this.set(this._items)}},init:function init(){var this$1=this;if(this.get("@style.shell.sides.initialTimeout")&&(this.get("rightOver")||this.get("leftOver"))){setTimeout(function(){if(this$1.get("rightOver")){this$1.set("rightHidden",true)}if(this$1.get("leftOver")){this$1.set("leftHidden",true)}},this.get("@style.shell.sides.initialTimeout")||1500)}else{if(this.get("rightOver")){this.set("rightHidden",true)}if(this.get("leftOver")){this.set("leftHidden",true)}}},complete:function complete(){initMediaListener(this)},unrender:function unrender(){if(this._media){this._media.cancel()}}},observe:{"leftHidden rightHidden":{handler:function handler(v,o,k){var this$1=this;if(~k.indexOf("left")&&!this.get("leftOver")&&!this.get("_leftOver")||~k.indexOf("right")&&!this.get("rightOver")&&!this.get("_rightOver")){setTimeout(function(){this$1._media&&this$1._media.listener&&this$1._media.listener.silence();this$1._media&&this$1._media.observer&&this$1._media.observer.silence();this$1.fire("resize");this$1._media&&this$1._media.listener&&this$1._media.listener.resume();this$1._media&&this$1._media.observer&&this$1._media.observer.resume()},(this.get("shell.slide.ms")||400)+10)}},defer:true,init:false}}});var parts=["top","bottom","center","left","right","left-pop","right-pop","top-pop","bottom-pop"];var skipAttrs=["hidden","primary","over","popped","overflow","forced"];function construct(){var cmp=this.component;if(!cmp){return}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 items={};tpl.forEach(function(e){if(~parts.indexOf(e.e)){var name=e.e==="left-pop"?"leftPop":e.e==="right-pop"?"rightPop":e.e==="top-pop"?"topPop":e.e==="bottom-pop"?"bottomPop":e.e;items["_"+name]={t:e.f};if(e.m){var as=e.m.filter(function(a){return!~skipAttrs.indexOf(a.n)});if(as.length){items["_"+name+"A"]={t:as}}if(as.length!==e.m.length){var a=e.m.find(function(a){return a.n==="hidden"});if(a){attrs.push({t:13,n:name+"Hidden",f:a.f})}a=e.m.find(function(a){return a.n==="over"});if(a){attrs.push({t:13,n:name+"Over",f:a.f})}a=e.m.find(function(a){return a.n==="primary"});if(a){attrs.push({t:13,n:"_"+name+"Primary",f:a.f})}if(~e.e.indexOf("-pop")){a=e.m.find(function(a){return a.n==="popped"});if(a){attrs.push({t:13,n:name,f:a.f})}}a=e.m.find(function(a){return a.n==="overflow"});if(a){attrs.push({t:13,n:name+"Overflow",f:a.f})}a=(e.e==="left"||e.e==="right")&&e.m.find(function(a){return a.n==="forced"});if(a){attrs.push({t:13,n:"_"+name+"Over",f:a.f})}}}}});this._items=items}function initMediaListener(r){if(typeof window==="undefined"){return}if(!r.left&&!r.right){return}if(r._media){return r._media.fn}var inited=0;var tm;var media={fn:function fn(){var outer=r.relativeSize("100%");if(media.last===outer){return}else{media.last=outer}var sizes={left:!r.get("leftOver")&&r.left&&r.left.clientWidth||0,right:!r.get("rightOver")&&r.right&&r.right.clientWidth||0};if(sizes.left){sizes.left=r.relativeSize(sizes.left)}if(sizes.right){sizes.right=r.relativeSize(sizes.right)}var primary=r.get("_rightPrimary")?"right":"left";var secondary=primary==="right"?"left":"right";var medium=r.relativeSize(r.get("@style.break.medium")||"60rem","1rem");var overs={_leftOver:false,_rightOver:false};var hides={leftHidden:r.get("leftOver"),rightHidden:r.get("rightOver")};if(!inited){overs.leftHidden=false;overs.rightHidden=false}var w=outer-sizes.left-sizes.right;if(w<=medium){w+=sizes[secondary];hides[secondary+"Hidden"]=true;overs["_"+secondary+"Over"]=true;if(w<=medium){hides[primary+"Hidden"]=true;overs["_"+primary+"Over"]=true}}r.set(overs);if(!inited){inited=1;setTimeout(function(){inited=2;r.set(hides)},r.get("@style.shell.sides.initialTimeout")||1500)}else if(inited===2){r.set(hides)}if(tm){clearTimeout(tm)}tm=setTimeout(function(){if(media.listener){media.listener.silence()}r.fire("resize");if(media.listener){media.listener.resume()}tm=0},(r.get("shell.slide.ms")||400)+100)},cancel:function cancel(){r._media=null;window.removeEventListener("resize",media.fn);if(media.observer){media.observer.cancel()}if(media.listener){media.listener.cancel()}}};window.addEventListener("resize",media.fn);media.observer=r.observe("@style leftOver rightOver _leftPrimary _rightPrimary",media.fn,{init:false});if(r.get("adaptive")){media.listener=r.root.on("*.resize",media.fn)}r._media=media;r._media.fn()}export function plugin(opts){if(opts===void 0)opts={};return function(ref){var instance=ref.instance;instance.components[opts.name||"shell"]=Shell}}globalRegister("RMShell","components",Shell);export default plugin; |
@@ -130,3 +130,3 @@ import Ractive from 'ractive'; | ||
Ractive.extendWith(Tabs, { | ||
template: {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs",g:1},{t:16,r:"extra-attributes"},{n:"class-rtabs-flat",t:13,f:[{t:2,r:"~/flat"}]},{n:"class-rtabs-margin",t:13,f:[{t:2,r:"~/margin"}]},{n:"class-rtabs-fill",t:13,f:[{t:2,r:"~/fill"}]},{n:"sized",t:71,f:{r:[],s:"[{clientWidth:\"~/clientWidth\"}]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window-wrapper",g:1},{n:"class-rtabs-scroll-right",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsRight()"}}]},{n:"class-rtabs-scroll-left",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsLeft()"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window",g:1},{t:4,f:[{n:"class-rtabs-going-left",t:13}],n:50,x:{r:[".direction"],s:"_0===\"left\""}},{t:4,f:[{n:"class-rtabs-going-right",t:13}],n:51,l:1},{n:"scrolled",t:71,f:{r:[],s:"[\"~/scrollStatus\"]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-left",g:1},{n:"class-rtabs-center",t:13,f:[{t:2,r:"~/center"}]}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"!_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-right",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-indicator",g:1},{n:"style-left",f:[{t:2,r:".selectedLeft"},"px"],t:13},{t:4,f:[{n:"style-right",f:[{t:2,r:".selectedRight"},"px"],t:13}],n:50,x:{r:[".selectedRight"],s:"_0!==undefined"}}]}],n:51,r:"@style.raui.tabs.boxy"}]}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-wrapper",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-window",g:1},{t:4,f:[{n:"class-rtabs-trans-fade",t:13}],n:50,x:{r:[".transition"],s:"_0===\"fade\""}},{t:4,f:[{n:"class-rtabs-trans-slide",t:13}],n:50,x:{r:[".transition"],s:"_0===\"slide\""},l:1},{n:["scroll"],t:70,f:{r:["@this","@node"],s:"[_0.stopHorizontalScroll(_1)]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-contents",g:1},{n:"style-opacity",f:[{t:2,r:"~/opacity"}],t:13},{n:"style-left",f:[{t:2,x:{r:[".selectedContent"],s:"_0*-100"}},"%"],t:13},{n:"class-rtabs-pad",t:13,f:[{t:2,r:"~/pad"}]}],f:[{t:4,f:[{t:8,r:"tab-content"}],n:52,r:".tabs"}]}]}]}]}],e:{"[{clientWidth:\"~/clientWidth\"}]":function (){return([{clientWidth:"~/clientWidth"}]);},"_0._scrollsRight()":function (_0){return(_0._scrollsRight());},"_0._scrollsLeft()":function (_0){return(_0._scrollsLeft());},"_0===\"left\"":function (_0){return(_0==="left");},"[\"~/scrollStatus\"]":function (){return(["~/scrollStatus"]);},"!_0&&!_1._hidden(_2)":function (_0,_1,_2){return(!_0&&!_1._hidden(_2));},"_0&&!_1._hidden(_2)":function (_0,_1,_2){return(_0&&!_1._hidden(_2));},"_0!==undefined":function (_0){return(_0!==undefined);},"_0===\"fade\"":function (_0){return(_0==="fade");},"_0===\"slide\"":function (_0){return(_0==="slide");},"[_0.stopHorizontalScroll(_1)]":function (_0,_1){return([_0.stopHorizontalScroll(_1)]);},"_0*-100":function (_0){return(_0*-100);},"_0===_1":function (_0,_1){return(_0===_1);},"_0===\"dynamic\"":function (_0){return(_0==="dynamic");},"_0!==_1":function (_0,_1){return(_0!==_1);},"_0===false":function (_0){return(_0===false);},"[_0.checkSelection((_1),_2)]":function (_0,_1,_2){return([_0.checkSelection((_1),_2)]);},"(_3===\"always\"&&_0===_1)||(_3&&_2)||!_3":function (_0,_1,_2,_3){return((_3==="always"&&_0===_1)||(_3&&_2)||!_3);},"!_0":function (_0){return(!_0);},"_0===_1&&!_2":function (_0,_1,_2){return(_0===_1&&!_2);},"typeof _1===\"string\"?_0.get(_1):_1":function (_0,_1){return(typeof _1==="string"?_0.get(_1):_1);},"[[\"select\",_0]]":function (_0){return([["select",_0]]);},"[_0.button()]":function (_0){return([_0.button()]);},"typeof _0===\"function\"":function (_0){return(typeof _0==="function");},"[_0]":function (_0){return([_0]);},"typeof _0===\"string\"":function (_0){return(typeof _0==="string");},"[[\"close\",_0]]":function (_0){return([["close",_0]]);},"_0&&!_1":function (_0,_1){return(_0&&!_1);}},p:{"tab-content":[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-content",g:1},{n:"class-rtabs-selected-content",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0===_1"}}]},{n:"class-rtabs-dyna",t:13,f:[{t:2,x:{r:["~/height"],s:"_0===\"dynamic\""}}]},{n:"class-rtabs-not-selected",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0!==_1"}}]},{t:4,f:[{t:16,r:".extra"}],n:50,r:".extra"},{t:4,f:[{n:"class-rtabs-no-pad",t:13}],n:50,x:{r:[".pad"],s:"_0===false"}},{t:4,f:[{n:"class-rtabs-no-pad",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".padRef"}]}}]}],n:50,r:".padRef",l:1},{n:["focus"],t:70,f:{r:["@this","@context","@index"],s:"[_0.checkSelection((_1),_2)]"}}],f:[{t:4,f:[{t:16,r:".template"}],n:50,x:{r:["~/selectedContent","@index",".load","~/defer"],s:"(_3===\"always\"&&_0===_1)||(_3&&_2)||!_3"}}]}],n:50,x:{r:[".button"],s:"!_0"}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-placeholder",g:1}]}],n:51,l:1}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab",g:1},{n:"class-rtabs-selected",t:13,f:[{t:2,x:{r:["~/selected","@index",".button"],s:"_0===_1&&!_2"}}]},{t:4,f:[{n:"class-rtabs-disabled",t:13}],n:50,x:{r:["@this",".disabled"],s:"typeof _1===\"string\"?_0.get(_1):_1"}},{t:4,f:[{n:["click"],t:70,f:{r:["@index"],s:"[[\"select\",_0]]"}}],n:50,x:{r:[".button"],s:"!_0"},l:1},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.button()]"}}],n:50,x:{r:[".button"],s:"typeof _0===\"function\""},l:1},{n:"registered",t:71,f:{r:["@index"],s:"[_0]"}},{t:4,f:[{t:16,r:".extraTab"}],n:50,r:".extraTab"},{n:"data-tab-index",f:[{t:2,r:"@index"}],t:13}],f:[{t:4,f:[{t:2,r:"title"}],n:50,x:{r:[".title"],s:"typeof _0===\"string\""}},{t:4,f:[{t:16,r:".title"}],n:50,r:".title",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-close",g:1},{n:["click"],t:70,f:{r:["@index"],s:"[[\"close\",_0]]"}}],f:["×"]}],n:50,x:{r:[".closable",".button"],s:"_0&&!_1"}}]}]}}, | ||
template: {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs",g:1},{t:16,r:"extra-attributes"},{n:"class-rtabs-flat",t:13,f:[{t:2,r:"~/flat"}]},{n:"class-rtabs-margin",t:13,f:[{t:2,r:"~/margin"}]},{n:"class-rtabs-fill",t:13,f:[{t:2,r:"~/fill"}]},{n:"sized",t:71,f:{r:[],s:"[{clientWidth:\"~/clientWidth\"}]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window-wrapper",g:1},{n:"class-rtabs-scroll-right",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsRight()"}}]},{n:"class-rtabs-scroll-left",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsLeft()"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window",g:1},{t:4,f:[{n:"class-rtabs-going-left",t:13}],n:50,x:{r:[".direction"],s:"_0===\"left\""}},{t:4,f:[{n:"class-rtabs-going-right",t:13}],n:51,l:1},{n:"scrolled",t:71,f:{r:[],s:"[\"~/scrollStatus\"]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-left",g:1},{n:"class-rtabs-center",t:13,f:[{t:2,r:"~/center"}]}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"!_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-right",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-indicator",g:1},{n:"style-left",f:[{t:2,r:".selectedLeft"},"px"],t:13},{t:4,f:[{n:"style-right",f:[{t:2,r:".selectedRight"},"px"],t:13}],n:50,x:{r:[".selectedRight"],s:"_0!==undefined"}}]}],n:51,r:"@style.raui.tabs.boxy"}]}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-wrapper",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-window",g:1},{t:4,f:[{n:"class-rtabs-trans-fade",t:13}],n:50,x:{r:[".transition"],s:"_0===\"fade\""}},{t:4,f:[{n:"class-rtabs-trans-slide",t:13}],n:50,x:{r:[".transition"],s:"_0===\"slide\""},l:1},{n:["scroll"],t:70,f:{r:["@this","@node"],s:"[_0.stopHorizontalScroll(_1)]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-contents",g:1},{n:"style-opacity",f:[{t:2,r:"~/opacity"}],t:13},{n:"style-left",f:[{t:2,x:{r:[".selectedContent"],s:"_0*-100"}},"%"],t:13},{n:"class-rtabs-pad",t:13,f:[{t:2,r:"~/pad"}]}],f:[{t:4,f:[{t:8,r:"tab-content"}],n:52,r:".tabs"}]}]}]}]}],e:{"[{clientWidth:\"~/clientWidth\"}]":function (){return([{clientWidth:"~/clientWidth"}]);},"_0._scrollsRight()":function (_0){return(_0._scrollsRight());},"_0._scrollsLeft()":function (_0){return(_0._scrollsLeft());},"_0===\"left\"":function (_0){return(_0==="left");},"[\"~/scrollStatus\"]":function (){return(["~/scrollStatus"]);},"!_0&&!_1._hidden(_2)":function (_0,_1,_2){return(!_0&&!_1._hidden(_2));},"_0&&!_1._hidden(_2)":function (_0,_1,_2){return(_0&&!_1._hidden(_2));},"_0!==undefined":function (_0){return(_0!==undefined);},"_0===\"fade\"":function (_0){return(_0==="fade");},"_0===\"slide\"":function (_0){return(_0==="slide");},"[_0.stopHorizontalScroll(_1)]":function (_0,_1){return([_0.stopHorizontalScroll(_1)]);},"_0*-100":function (_0){return(_0*-100);},"_0===_1":function (_0,_1){return(_0===_1);},"_0===\"dynamic\"":function (_0){return(_0==="dynamic");},"_0!==_1":function (_0,_1){return(_0!==_1);},"_0===false":function (_0){return(_0===false);},"[_0.checkSelection((_1),_2)]":function (_0,_1,_2){return([_0.checkSelection((_1),_2)]);},"(_3===\"always\"&&_0===_1)||(_3&&_2)||!_3":function (_0,_1,_2,_3){return((_3==="always"&&_0===_1)||(_3&&_2)||!_3);},"!_0":function (_0){return(!_0);},"_0===_1&&!_2":function (_0,_1,_2){return(_0===_1&&!_2);},"typeof _1===\"string\"?_0.get(_1):_1":function (_0,_1){return(typeof _1==="string"?_0.get(_1):_1);},"[[\"select\",_0]]":function (_0){return([["select",_0]]);},"[_0.button()]":function (_0){return([_0.button()]);},"typeof _0===\"function\"":function (_0){return(typeof _0==="function");},"[_0]":function (_0){return([_0]);},"typeof _0===\"string\"":function (_0){return(typeof _0==="string");},"[[\"close\",_0]]":function (_0){return([["close",_0]]);},"_0&&!_1":function (_0,_1){return(_0&&!_1);}},p:{"tab-content":[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-content",g:1},{n:"class-rtabs-selected-content",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0===_1"}}]},{n:"class-rtabs-dyna",t:13,f:[{t:2,x:{r:["~/height"],s:"_0===\"dynamic\""}}]},{n:"class-rtabs-not-selected",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0!==_1"}}]},{t:4,f:[{t:16,r:".extra"}],n:50,r:".extra"},{t:4,f:[{n:"class-rtabs-no-pad",t:13}],n:50,x:{r:[".pad"],s:"_0===false"}},{t:4,f:[{n:"class-rtabs-no-pad",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".padRef"}]}}]}],n:50,r:".padRef",l:1},{n:["focusin"],t:70,f:{r:["@this","@context","@index"],s:"[_0.checkSelection((_1),_2)]"}}],f:[{t:4,f:[{t:16,r:".template"}],n:50,x:{r:["~/selectedContent","@index",".load","~/defer"],s:"(_3===\"always\"&&_0===_1)||(_3&&_2)||!_3"}}]}],n:50,x:{r:[".button"],s:"!_0"}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-placeholder",g:1}]}],n:51,l:1}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab",g:1},{n:"class-rtabs-selected",t:13,f:[{t:2,x:{r:["~/selected","@index",".button"],s:"_0===_1&&!_2"}}]},{t:4,f:[{n:"class-rtabs-disabled",t:13}],n:50,x:{r:["@this",".disabled"],s:"typeof _1===\"string\"?_0.get(_1):_1"}},{t:4,f:[{n:["click"],t:70,f:{r:["@index"],s:"[[\"select\",_0]]"}}],n:50,x:{r:[".button"],s:"!_0"},l:1},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.button()]"}}],n:50,x:{r:[".button"],s:"typeof _0===\"function\""},l:1},{n:"registered",t:71,f:{r:["@index"],s:"[_0]"}},{t:4,f:[{t:16,r:".extraTab"}],n:50,r:".extraTab"},{n:"data-tab-index",f:[{t:2,r:"@index"}],t:13}],f:[{t:4,f:[{t:2,r:"title"}],n:50,x:{r:[".title"],s:"typeof _0===\"string\""}},{t:4,f:[{t:16,r:".title"}],n:50,r:".title",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-close",g:1},{n:["click"],t:70,f:{r:["@index"],s:"[[\"close\",_0]]"}}],f:["×"]}],n:50,x:{r:[".closable",".button"],s:"_0&&!_1"}}]}]}}, | ||
cssId: 'rtab', | ||
@@ -145,3 +145,3 @@ noCssTransform: true, | ||
return "\n .rtabs {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n \n .rtabs-tab-window {\n overflow-y: hidden;\n overflow-x: auto;\n " + (!boxy ? ("box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n color: " + (primary.fg || '#222') + ";\n background-color: " + (primary.bg || '#fff') + ";") : | ||
("border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 1px 1px 0 1px;\n color: " + (primary.fg || '#222') + ";\n background-color: " + (primary.bga || '#f4f4f4') + ";\n ")) + "\n position: relative;\n flex-shrink: 0;\n }\n .alt > div > .rtabs-tab-window {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fga || '#07e') + ";\n }" + (boxy ? ("\n .alt > div > .rtabs-tab-window .rtabs-tab {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fga || '#07e') + ";\n }") : '') + "\n \n .rtabs-tab-window-wrapper {\n position: relative;\n z-index: 10;\n }\n .rtabs-tab-window-wrapper:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n background: linear-gradient(to right, " + (primary.indicator.color || primary.fga || '#07e') + ", transparent);\n z-index: 999;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-left:before {\n opacity: 1;\n }\n \n .rtabs-tab-window-wrapper:after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n background: linear-gradient(to left, " + (primary.indicator.color || primary.fga || '#07e') + ", transparent);\n transition: opacity 0.3s ease-in-out;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-right:after {\n opacity: 1;\n }\n \n .rtabs-flat > div > .rtabs-tab-window {\n box-shadow: none;\n border-width: 0;\n }\n " + (!boxy ? (".rtabs-flat > div > .rtabs-tab-window:after {\n content: '';\n height: 0.15em;\n position: absolute;\n bottom: 0px;\n width: 100%;\n display: block;\n background-color: " + (primary.bga || '#f4f4f4') + ";\n }\n .rtabs-flat.alt > div > .rtabs-tab-window:after {\n background-color: " + (primary.fga || '#07e') + ";\n }") : ("\n .rtabs-flat > div > .rtabs-tab-window {\n background-color: " + (primary.bg || '#fff') + ";\n }\n .alt.rtabs-flat > div > .rtabs-tab-window {\n background-color: " + (primary.fga || '#07e') + ";\n }\n .rtabs-flat > div > .rtabs-tab-window .rtabs-tab {\n border-top-width: 1px;\n }")) + "\n \n .rtabs-center.rtabs-left {\n text-align: center;\n }" + (boxy ? "\n .rtabs-center > .rtabs-tab:first-child {\n border-left-width: 1px;\n }" : '') + "\n \n .rtabs-pad {\n padding: 1em;\n }\n \n .rtabs-fill {\n flex-grow: 1;\n height: 100%;\n }\n \n .rtabs-tabs {\n display: table;\n position: relative;\n min-width: 100%;\n white-space: nowrap;" + (boxy ? ("\n border-style: solid;\n border-width: 0 0 1px 0;\n border-color: " + (primary.bc || '#ccc') + ";\n line-height: 1.5em;") : '') + "\n }\n \n .rtabs-tab {\n display: inline-block;\n box-sizing: border-box;\n padding: 0.5em 1em;\n height: 2.5em;\n transition: opacity 0.2s ease-in-out;\n user-select: none;\n cursor: pointer;" + (!boxy ? "\n opacity: 0.9;" : ("\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 0 1px 1px 0;\n margin-bottom: -1px;\n color: " + (primary.fg || '#222') + ";\n background-color: " + (primary.bga || '#f4f4f4') + ";\n ")) + "\n }\n .rtabs-tab:hover {\n opacity: 1;\n }\n \n .rtabs-selected" + (boxy ? ",\n .alt > div > .rtabs-tab-window .rtabs-selected" : '') + " {\n opacity: 1;" + (boxy ? ("\n font-weight: bold;\n border-bottom-color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.selected.bg || primary.bg || '#fff') + ";\n color: " + (primary.selected.fg || primary.fg || '#222') + ";") : '') + "\n }\n \n .rtabs-disabled {\n opacity: 0.4;\n }\n \n .rtabs-right {\n text-align: right;\n display: table-cell;\n }\n \n .rtabs-left {\n text-align: left;\n display: table-cell;\n }\n \n .rtabs-close {\n display: inline-block;\n margin-right: -0.5em;\n font-weight: 700;\n opacity: 0.3;\n transition: opacity: 0.2s ease-in-out;\n }\n \n .rtabs-close:hover {\n opacity: 1;\n }\n \n .rtabs-indicator {\n position: absolute;\n bottom: 0;\n height: 0.15em;\n background-color: " + (primary.indicator.color || primary.fga || '#07e') + ";\n z-index: 2;\n }\n \n .alt > div > .rtabs-tab-window .rtabs-indicator {\n background-color: " + (primary.bg || '#fff') + ";\n }\n \n .rtabs-going-left .rtabs-indicator {\n transition: left 0.2s ease-in-out, right 0.2s ease-in-out 0.1s;\n }\n .rtabs-going-right .rtabs-indicator {\n transition: left 0.2s ease-in-out 0.1s, right 0.2s ease-in-out;\n }\n \n .rtabs-content-wrapper {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-grow: 2;\n overflow: hidden;\n }\n \n .rtabs-content-window {\n width: 100%;\n display: flex;\n flex-grow: 1;\n overflow-y: auto;\n overflow-x: hidden\n }\n \n .rtabs {\n color: " + (primary.fg || '#222') + ";\n background-color: " + (primary.bg || '#fff') + ";\n }\n \n .rtabs-contents {\n list-style: none;\n padding: 0;\n margin: 0;\n position: relative;\n left: 0;\n display: block;\n flex-wrap: nowrap;\n white-space: nowrap;\n width: 100%;\n }\n .rtabs-trans-slide > .rtabs-contents {\n transition: left 0.2s ease-in-out;\n }\n .rtabs-trans-fade > .rtabs-contents {\n transition: opacity 0.15s ease;\n opacity: 1;\n white-space: nowrap;\n }\n \n .rtabs-fill > div > div > .rtabs-contents {\n display: flex;\n }\n \n .rtabs-tab-content {\n position: relative;\n width: 100%;\n overflow: auto;\n vertical-align: top;\n white-space: initial;\n transition: opacity 0.1s ease-in-out;\n flex-shrink: 0;\n white-space: initial;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n \n .rtabs-placeholder {\n display: inline-block;\n width: 100%;\n height: 1px;\n flex-shrink: 0;\n }\n .rtabs-dyna.rtabs-not-selected {\n height: 1px;\n opacity: 0;\n overflow: hidden;\n }\n .rtabs-pad > .rtabs-tab-content {\n padding: 1em;\n box-sizing: border-box;\n }\n .rtabs-pad > .rtabs-tab-content.rtabs-no-pad {\n padding: 0;\n }\n .rtabs > .rtabs-tab-content.rtabs-pad {\n padding: 1em;\n box-sizing: border-box;\n }\n " + themes.map(function (t) { | ||
("border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 1px 1px 0 1px;\n color: " + (primary.fg || '#222') + ";\n background-color: " + (primary.bga || '#f4f4f4') + ";\n ")) + "\n position: relative;\n flex-shrink: 0;\n }\n .alt > div > .rtabs-tab-window {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fga || '#07e') + ";\n }" + (boxy ? ("\n .alt > div > .rtabs-tab-window .rtabs-tab {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fga || '#07e') + ";\n }") : '') + "\n \n .rtabs-tab-window-wrapper {\n position: relative;\n z-index: 10;\n }\n .rtabs-tab-window-wrapper:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n background: linear-gradient(to right, " + (primary.indicator.color || primary.fga || '#07e') + ", transparent);\n z-index: 999;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-left:before {\n opacity: 1;\n }\n \n .rtabs-tab-window-wrapper:after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n background: linear-gradient(to left, " + (primary.indicator.color || primary.fga || '#07e') + ", transparent);\n transition: opacity 0.3s ease-in-out;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-right:after {\n opacity: 1;\n }\n \n .rtabs-flat > div > .rtabs-tab-window {\n box-shadow: none;\n border-width: 0;\n }\n " + (!boxy ? (".rtabs-flat > div > .rtabs-tab-window:after {\n content: '';\n height: 0.15em;\n position: absolute;\n bottom: 0px;\n width: 100%;\n display: block;\n background-color: " + (primary.bga || '#f4f4f4') + ";\n }\n .rtabs-flat.alt > div > .rtabs-tab-window:after {\n background-color: " + (primary.fga || '#07e') + ";\n }") : ("\n .rtabs-flat > div > .rtabs-tab-window {\n background-color: " + (primary.bg || '#fff') + ";\n }\n .alt.rtabs-flat > div > .rtabs-tab-window {\n background-color: " + (primary.fga || '#07e') + ";\n }\n .rtabs-flat > div > .rtabs-tab-window .rtabs-tab {\n border-top-width: 1px;\n }")) + "\n \n .rtabs-center.rtabs-left {\n text-align: center;\n }" + (boxy ? "\n .rtabs-center > .rtabs-tab:first-child {\n border-left-width: 1px;\n }" : '') + "\n \n .rtabs-pad {\n padding: 1em;\n }\n \n .rtabs-fill {\n flex-grow: 1;\n height: 100%;\n }\n \n .rtabs-tabs {\n display: table;\n position: relative;\n min-width: 100%;\n white-space: nowrap;" + (boxy ? ("\n border-style: solid;\n border-width: 0 0 1px 0;\n border-color: " + (primary.bc || '#ccc') + ";\n line-height: 1.5em;") : '') + "\n }\n \n .rtabs-tab {\n display: inline-block;\n box-sizing: border-box;\n padding: 0.5em 1em;\n height: 2.5em;\n transition: opacity 0.2s ease-in-out;\n user-select: none;\n cursor: pointer;" + (!boxy ? "\n opacity: 0.9;" : ("\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 0 1px 1px 0;\n margin-bottom: -1px;\n color: " + (primary.fg || '#222') + ";\n background-color: " + (primary.bga || '#f4f4f4') + ";\n ")) + "\n }\n .rtabs-tab:hover {\n opacity: 1;\n }\n \n .rtabs-selected" + (boxy ? ",\n .alt > div > .rtabs-tab-window .rtabs-selected" : '') + " {\n opacity: 1;" + (boxy ? ("\n font-weight: bold;\n border-bottom-color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.selected.bg || primary.bg || '#fff') + ";\n color: " + (primary.selected.fg || primary.fg || '#222') + ";") : '') + "\n }\n \n .rtabs-disabled {\n opacity: 0.4;\n }\n \n .rtabs-right {\n text-align: right;\n display: table-cell;\n }\n \n .rtabs-left {\n text-align: left;\n display: table-cell;\n }\n \n .rtabs-close {\n display: inline-block;\n margin-right: -0.5em;\n font-weight: 700;\n opacity: 0.3;\n transition: opacity: 0.2s ease-in-out;\n }\n \n .rtabs-close:hover {\n opacity: 1;\n }\n \n .rtabs-indicator {\n position: absolute;\n bottom: 0;\n height: 0.15em;\n background-color: " + (primary.indicator.color || primary.fga || '#07e') + ";\n z-index: 2;\n }\n \n .alt > div > .rtabs-tab-window .rtabs-indicator {\n background-color: " + (primary.bg || '#fff') + ";\n }\n \n .rtabs-going-left .rtabs-indicator {\n transition: left 0.2s ease-in-out, right 0.2s ease-in-out 0.1s;\n }\n .rtabs-going-right .rtabs-indicator {\n transition: left 0.2s ease-in-out 0.1s, right 0.2s ease-in-out;\n }\n \n .rtabs-content-wrapper {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-grow: 2;\n overflow: hidden;\n }\n \n .rtabs-content-window {\n width: 100%;\n display: flex;\n flex-grow: 1;\n overflow-y: auto;\n overflow-x: hidden\n }\n \n .rtabs {\n color: " + (primary.fg || '#222') + ";\n background-color: " + (primary.bg || '#fff') + ";\n }\n \n .rtabs-contents {\n list-style: none;\n padding: 0;\n margin: 0;\n position: relative;\n left: 0;\n display: flex;\n flex-wrap: nowrap;\n white-space: nowrap;\n width: 100%;\n }\n .rtabs-trans-slide > .rtabs-contents {\n transition: left 0.2s ease-in-out;\n }\n .rtabs-trans-fade > .rtabs-contents {\n transition: opacity 0.15s ease;\n opacity: 1;\n white-space: nowrap;\n }\n \n .rtabs-fill > div > div > .rtabs-contents {\n display: flex;\n }\n \n .rtabs-tab-content {\n position: relative;\n width: 100%;\n overflow: auto;\n vertical-align: top;\n white-space: initial;\n transition: opacity 0.1s ease-in-out;\n flex-shrink: 0;\n white-space: initial;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n \n .rtabs-placeholder {\n display: inline-block;\n width: 100%;\n height: 1px;\n flex-shrink: 0;\n }\n .rtabs-dyna.rtabs-not-selected {\n height: 1px;\n opacity: 0;\n overflow: hidden;\n }\n .rtabs-pad > .rtabs-tab-content {\n padding: 1em;\n box-sizing: border-box;\n }\n .rtabs-pad > .rtabs-tab-content.rtabs-no-pad {\n padding: 0;\n }\n .rtabs > .rtabs-tab-content.rtabs-pad {\n padding: 1em;\n box-sizing: border-box;\n }\n " + themes.map(function (t) { | ||
var theme = Object.assign({}, data('raui.primary'), data('raui.tabs.primary'), data(("raui." + t)), data(("raui.tabs." + t))); | ||
@@ -148,0 +148,0 @@ theme.selected = Object.assign({}, data('raui.tabs.selected'), data('raui.tabs.primary.selected'), data(("raui.tabs." + t + ".selected"))); |
@@ -1,1 +0,1 @@ | ||
import Ractive from"ractive";import{scrolled}from"./scrolled";import{sized}from"./watch-size";import globalRegister from"./globalRegister";export var Tabs=function(Ractive){function Tabs(opts){Ractive.call(this,opts)}if(Ractive)Tabs.__proto__=Ractive;Tabs.prototype=Object.create(Ractive&&Ractive.prototype);Tabs.prototype.constructor=Tabs;var prototypeAccessors={visibleSelection:{configurable:true}};Tabs.prototype.addTab=function addTab(tab,idx){if(!tab.template){tab.template=[]}if(typeof idx==="number"){this.splice("tabs",idx,0,tab)}else{this.push("tabs",tab)}var res=new Handle(this,tab);if(tab.select){this.select(res.index)}return res};Tabs.prototype.getTab=function getTab(id){var tabs=this.get("tabs");var tab=tabs.find(function(t){return t.id===id});if(tab){return new Handle(this,tab)}else if(id in tabs&&typeof tabs[id]==="object"){return new Handle(this,tabs[id])}};Tabs.prototype.updateIndicator=function updateIndicator(){if(!this.rendered||!this._tabs){return}var ctx=this.getContext(this.find(".rtabs-tab-window"));if(ctx.decorators.scrolled){ctx.decorators.scrolled.refresh()}if(this.get("@style.raui.tabs.boxy")){return}var node=this._tabs[this.get("selected")];if(!node||!node.offsetParent){return}if(node){var start=this.get("selectedLeft");if(start===undefined){this.set({selectedLeft:node.offsetLeft,selectedRight:node.offsetParent.clientWidth-(node.offsetLeft+node.offsetWidth)})}else{var max=node.offsetParent.clientWidth;var left=node.offsetLeft,width=node.clientWidth,right=max-left-width;this.set({direction:left<start?"left":"right",selectedLeft:left,selectedRight:right})}}else{this.set({selectedLeft:0,selectedRight:this.find(".tabs").offsetWidth})}};Tabs.prototype.checkSelection=function checkSelection(ctx,idx){if(this.get("selected")!==idx){select.call(this,ctx,idx)}};Tabs.prototype.select=function select(idx){if(idx<0||idx>=(this.get("tabs.length")||0)){return}this.fire("select",{},idx)};Tabs.prototype._hidden=function _hidden(idx){var this$1=this;var hidden=this.get("tabs."+idx+".hidden");if(typeof hidden==="string"){hidden=this.get(hidden)}setTimeout(function(){if(hidden&&this$1.get("selected")===idx){this$1.select(0)}});return hidden};Tabs.prototype.stopHorizontalScroll=function stopHorizontalScroll(node){if(node.scrollLeft){node.scrollLeft=0}};Tabs.prototype._scrollsRight=function _scrollsRight(){var scroll=this.get("scrollStatus")||"";if(/hscroll.*(hmiddle|left)/.test(scroll)&&!/right/.test(scroll)){return true}};Tabs.prototype._scrollsLeft=function _scrollsLeft(){var scroll=this.get("scrollStatus")||"";if(/hscroll.*(hmiddle|right)/.test(scroll)&&!/left/.test(scroll)){return true}};prototypeAccessors.visibleSelection.get=function(){var idx=0;var tabs=this.get("tabs");var active=this.get("selected");for(var i=0;i<tabs.length;i++){var tab=tabs[i];if(active===i){return idx}var hidden=tab.hidden;if(typeof hidden==="string"){hidden=this.get(hidden)}if(!hidden){idx++}}return idx};Object.defineProperties(Tabs.prototype,prototypeAccessors);return Tabs}(Ractive);var tabAttrs=["closable","disabled","title","right","button","no-pad","hidden","id","load"];Ractive.extendWith(Tabs,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs",g:1},{t:16,r:"extra-attributes"},{n:"class-rtabs-flat",t:13,f:[{t:2,r:"~/flat"}]},{n:"class-rtabs-margin",t:13,f:[{t:2,r:"~/margin"}]},{n:"class-rtabs-fill",t:13,f:[{t:2,r:"~/fill"}]},{n:"sized",t:71,f:{r:[],s:'[{clientWidth:"~/clientWidth"}]'}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window-wrapper",g:1},{n:"class-rtabs-scroll-right",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsRight()"}}]},{n:"class-rtabs-scroll-left",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsLeft()"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window",g:1},{t:4,f:[{n:"class-rtabs-going-left",t:13}],n:50,x:{r:[".direction"],s:'_0==="left"'}},{t:4,f:[{n:"class-rtabs-going-right",t:13}],n:51,l:1},{n:"scrolled",t:71,f:{r:[],s:'["~/scrollStatus"]'}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-left",g:1},{n:"class-rtabs-center",t:13,f:[{t:2,r:"~/center"}]}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"!_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-right",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-indicator",g:1},{n:"style-left",f:[{t:2,r:".selectedLeft"},"px"],t:13},{t:4,f:[{n:"style-right",f:[{t:2,r:".selectedRight"},"px"],t:13}],n:50,x:{r:[".selectedRight"],s:"_0!==undefined"}}]}],n:51,r:"@style.raui.tabs.boxy"}]}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-wrapper",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-window",g:1},{t:4,f:[{n:"class-rtabs-trans-fade",t:13}],n:50,x:{r:[".transition"],s:'_0==="fade"'}},{t:4,f:[{n:"class-rtabs-trans-slide",t:13}],n:50,x:{r:[".transition"],s:'_0==="slide"'},l:1},{n:["scroll"],t:70,f:{r:["@this","@node"],s:"[_0.stopHorizontalScroll(_1)]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-contents",g:1},{n:"style-opacity",f:[{t:2,r:"~/opacity"}],t:13},{n:"style-left",f:[{t:2,x:{r:[".selectedContent"],s:"_0*-100"}},"%"],t:13},{n:"class-rtabs-pad",t:13,f:[{t:2,r:"~/pad"}]}],f:[{t:4,f:[{t:8,r:"tab-content"}],n:52,r:".tabs"}]}]}]}]}],e:{'[{clientWidth:"~/clientWidth"}]':function(){return[{clientWidth:"~/clientWidth"}]},"_0._scrollsRight()":function(_0){return _0._scrollsRight()},"_0._scrollsLeft()":function(_0){return _0._scrollsLeft()},'_0==="left"':function(_0){return _0==="left"},'["~/scrollStatus"]':function(){return["~/scrollStatus"]},"!_0&&!_1._hidden(_2)":function(_0,_1,_2){return!_0&&!_1._hidden(_2)},"_0&&!_1._hidden(_2)":function(_0,_1,_2){return _0&&!_1._hidden(_2)},"_0!==undefined":function(_0){return _0!==undefined},'_0==="fade"':function(_0){return _0==="fade"},'_0==="slide"':function(_0){return _0==="slide"},"[_0.stopHorizontalScroll(_1)]":function(_0,_1){return[_0.stopHorizontalScroll(_1)]},"_0*-100":function(_0){return _0*-100},"_0===_1":function(_0,_1){return _0===_1},'_0==="dynamic"':function(_0){return _0==="dynamic"},"_0!==_1":function(_0,_1){return _0!==_1},"_0===false":function(_0){return _0===false},"[_0.checkSelection((_1),_2)]":function(_0,_1,_2){return[_0.checkSelection(_1,_2)]},'(_3==="always"&&_0===_1)||(_3&&_2)||!_3':function(_0,_1,_2,_3){return _3==="always"&&_0===_1||_3&&_2||!_3},"!_0":function(_0){return!_0},"_0===_1&&!_2":function(_0,_1,_2){return _0===_1&&!_2},'typeof _1==="string"?_0.get(_1):_1':function(_0,_1){return typeof _1==="string"?_0.get(_1):_1},'[["select",_0]]':function(_0){return[["select",_0]]},"[_0.button()]":function(_0){return[_0.button()]},'typeof _0==="function"':function(_0){return typeof _0==="function"},"[_0]":function(_0){return[_0]},'typeof _0==="string"':function(_0){return typeof _0==="string"},'[["close",_0]]':function(_0){return[["close",_0]]},"_0&&!_1":function(_0,_1){return _0&&!_1}},p:{"tab-content":[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-content",g:1},{n:"class-rtabs-selected-content",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0===_1"}}]},{n:"class-rtabs-dyna",t:13,f:[{t:2,x:{r:["~/height"],s:'_0==="dynamic"'}}]},{n:"class-rtabs-not-selected",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0!==_1"}}]},{t:4,f:[{t:16,r:".extra"}],n:50,r:".extra"},{t:4,f:[{n:"class-rtabs-no-pad",t:13}],n:50,x:{r:[".pad"],s:"_0===false"}},{t:4,f:[{n:"class-rtabs-no-pad",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".padRef"}]}}]}],n:50,r:".padRef",l:1},{n:["focus"],t:70,f:{r:["@this","@context","@index"],s:"[_0.checkSelection((_1),_2)]"}}],f:[{t:4,f:[{t:16,r:".template"}],n:50,x:{r:["~/selectedContent","@index",".load","~/defer"],s:'(_3==="always"&&_0===_1)||(_3&&_2)||!_3'}}]}],n:50,x:{r:[".button"],s:"!_0"}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-placeholder",g:1}]}],n:51,l:1}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab",g:1},{n:"class-rtabs-selected",t:13,f:[{t:2,x:{r:["~/selected","@index",".button"],s:"_0===_1&&!_2"}}]},{t:4,f:[{n:"class-rtabs-disabled",t:13}],n:50,x:{r:["@this",".disabled"],s:'typeof _1==="string"?_0.get(_1):_1'}},{t:4,f:[{n:["click"],t:70,f:{r:["@index"],s:'[["select",_0]]'}}],n:50,x:{r:[".button"],s:"!_0"},l:1},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.button()]"}}],n:50,x:{r:[".button"],s:'typeof _0==="function"'},l:1},{n:"registered",t:71,f:{r:["@index"],s:"[_0]"}},{t:4,f:[{t:16,r:".extraTab"}],n:50,r:".extraTab"},{n:"data-tab-index",f:[{t:2,r:"@index"}],t:13}],f:[{t:4,f:[{t:2,r:"title"}],n:50,x:{r:[".title"],s:'typeof _0==="string"'}},{t:4,f:[{t:16,r:".title"}],n:50,r:".title",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-close",g:1},{n:["click"],t:70,f:{r:["@index"],s:'[["close",_0]]'}}],f:["×"]}],n:50,x:{r:[".closable",".button"],s:"_0&&!_1"}}]}]}},cssId:"rtab",noCssTransform:true,css:function(data){return[function(data){var primary=Object.assign({},data("raui.primary"),data("raui.tabs.primary"));primary.selected=Object.assign({},data("raui.tabs.selected"),data("raui.tabs.primary.selected"));primary.indicator=Object.assign({},data("raui.tabs.indicator"),data("raui.tabs.primary.indicator"));var themes=(data("raui.themes")||[]).slice();(data("raui.tabs.themes")||[]).forEach(function(t){if(!~themes.indexOf(t)){themes.push(t)}});var boxy=data("raui.tabs.boxy")||data("raui.tabs.primary.boxy");return"\n .rtabs {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n \n .rtabs-tab-window {\n overflow-y: hidden;\n overflow-x: auto;\n "+(!boxy?"box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n color: "+(primary.fg||"#222")+";\n background-color: "+(primary.bg||"#fff")+";":"border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 1px 1px 0 1px;\n color: "+(primary.fg||"#222")+";\n background-color: "+(primary.bga||"#f4f4f4")+";\n ")+"\n position: relative;\n flex-shrink: 0;\n }\n .alt > div > .rtabs-tab-window {\n color: "+(primary.bg||"#fff")+";\n background-color: "+(primary.fga||"#07e")+";\n }"+(boxy?"\n .alt > div > .rtabs-tab-window .rtabs-tab {\n color: "+(primary.bg||"#fff")+";\n background-color: "+(primary.fga||"#07e")+";\n }":"")+"\n \n .rtabs-tab-window-wrapper {\n position: relative;\n z-index: 10;\n }\n .rtabs-tab-window-wrapper:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n background: linear-gradient(to right, "+(primary.indicator.color||primary.fga||"#07e")+", transparent);\n z-index: 999;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-left:before {\n opacity: 1;\n }\n \n .rtabs-tab-window-wrapper:after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n background: linear-gradient(to left, "+(primary.indicator.color||primary.fga||"#07e")+", transparent);\n transition: opacity 0.3s ease-in-out;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-right:after {\n opacity: 1;\n }\n \n .rtabs-flat > div > .rtabs-tab-window {\n box-shadow: none;\n border-width: 0;\n }\n "+(!boxy?".rtabs-flat > div > .rtabs-tab-window:after {\n content: '';\n height: 0.15em;\n position: absolute;\n bottom: 0px;\n width: 100%;\n display: block;\n background-color: "+(primary.bga||"#f4f4f4")+";\n }\n .rtabs-flat.alt > div > .rtabs-tab-window:after {\n background-color: "+(primary.fga||"#07e")+";\n }":"\n .rtabs-flat > div > .rtabs-tab-window {\n background-color: "+(primary.bg||"#fff")+";\n }\n .alt.rtabs-flat > div > .rtabs-tab-window {\n background-color: "+(primary.fga||"#07e")+";\n }\n .rtabs-flat > div > .rtabs-tab-window .rtabs-tab {\n border-top-width: 1px;\n }")+"\n \n .rtabs-center.rtabs-left {\n text-align: center;\n }"+(boxy?"\n .rtabs-center > .rtabs-tab:first-child {\n border-left-width: 1px;\n }":"")+"\n \n .rtabs-pad {\n padding: 1em;\n }\n \n .rtabs-fill {\n flex-grow: 1;\n height: 100%;\n }\n \n .rtabs-tabs {\n display: table;\n position: relative;\n min-width: 100%;\n white-space: nowrap;"+(boxy?"\n border-style: solid;\n border-width: 0 0 1px 0;\n border-color: "+(primary.bc||"#ccc")+";\n line-height: 1.5em;":"")+"\n }\n \n .rtabs-tab {\n display: inline-block;\n box-sizing: border-box;\n padding: 0.5em 1em;\n height: 2.5em;\n transition: opacity 0.2s ease-in-out;\n user-select: none;\n cursor: pointer;"+(!boxy?"\n opacity: 0.9;":"\n border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 0 1px 1px 0;\n margin-bottom: -1px;\n color: "+(primary.fg||"#222")+";\n background-color: "+(primary.bga||"#f4f4f4")+";\n ")+"\n }\n .rtabs-tab:hover {\n opacity: 1;\n }\n \n .rtabs-selected"+(boxy?",\n .alt > div > .rtabs-tab-window .rtabs-selected":"")+" {\n opacity: 1;"+(boxy?"\n font-weight: bold;\n border-bottom-color: "+(primary.bg||"#fff")+";\n background-color: "+(primary.selected.bg||primary.bg||"#fff")+";\n color: "+(primary.selected.fg||primary.fg||"#222")+";":"")+"\n }\n \n .rtabs-disabled {\n opacity: 0.4;\n }\n \n .rtabs-right {\n text-align: right;\n display: table-cell;\n }\n \n .rtabs-left {\n text-align: left;\n display: table-cell;\n }\n \n .rtabs-close {\n display: inline-block;\n margin-right: -0.5em;\n font-weight: 700;\n opacity: 0.3;\n transition: opacity: 0.2s ease-in-out;\n }\n \n .rtabs-close:hover {\n opacity: 1;\n }\n \n .rtabs-indicator {\n position: absolute;\n bottom: 0;\n height: 0.15em;\n background-color: "+(primary.indicator.color||primary.fga||"#07e")+";\n z-index: 2;\n }\n \n .alt > div > .rtabs-tab-window .rtabs-indicator {\n background-color: "+(primary.bg||"#fff")+";\n }\n \n .rtabs-going-left .rtabs-indicator {\n transition: left 0.2s ease-in-out, right 0.2s ease-in-out 0.1s;\n }\n .rtabs-going-right .rtabs-indicator {\n transition: left 0.2s ease-in-out 0.1s, right 0.2s ease-in-out;\n }\n \n .rtabs-content-wrapper {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-grow: 2;\n overflow: hidden;\n }\n \n .rtabs-content-window {\n width: 100%;\n display: flex;\n flex-grow: 1;\n overflow-y: auto;\n overflow-x: hidden\n }\n \n .rtabs {\n color: "+(primary.fg||"#222")+";\n background-color: "+(primary.bg||"#fff")+";\n }\n \n .rtabs-contents {\n list-style: none;\n padding: 0;\n margin: 0;\n position: relative;\n left: 0;\n display: block;\n flex-wrap: nowrap;\n white-space: nowrap;\n width: 100%;\n }\n .rtabs-trans-slide > .rtabs-contents {\n transition: left 0.2s ease-in-out;\n }\n .rtabs-trans-fade > .rtabs-contents {\n transition: opacity 0.15s ease;\n opacity: 1;\n white-space: nowrap;\n }\n \n .rtabs-fill > div > div > .rtabs-contents {\n display: flex;\n }\n \n .rtabs-tab-content {\n position: relative;\n width: 100%;\n overflow: auto;\n vertical-align: top;\n white-space: initial;\n transition: opacity 0.1s ease-in-out;\n flex-shrink: 0;\n white-space: initial;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n \n .rtabs-placeholder {\n display: inline-block;\n width: 100%;\n height: 1px;\n flex-shrink: 0;\n }\n .rtabs-dyna.rtabs-not-selected {\n height: 1px;\n opacity: 0;\n overflow: hidden;\n }\n .rtabs-pad > .rtabs-tab-content {\n padding: 1em;\n box-sizing: border-box;\n }\n .rtabs-pad > .rtabs-tab-content.rtabs-no-pad {\n padding: 0;\n }\n .rtabs > .rtabs-tab-content.rtabs-pad {\n padding: 1em;\n box-sizing: border-box;\n }\n "+themes.map(function(t){var theme=Object.assign({},data("raui.primary"),data("raui.tabs.primary"),data("raui."+t),data("raui.tabs."+t));theme.selected=Object.assign({},data("raui.tabs.selected"),data("raui.tabs.primary.selected"),data("raui.tabs."+t+".selected"));theme.indicator=Object.assign({},data("raui.tabs.indicator"),data("raui.tabs.primary.indicator"),data("raui.tabs."+t+".indicator"));var boxy="boxy"in theme?theme.boxy:data("raui.tabs.boxy");return".rtabs."+t+" > div > .rtabs-tab-window {\n "+(!boxy?"box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n color: "+(theme.fg||"#222")+";\n background-color: "+(theme.bg||"#fff")+";":"border-color: "+(theme.bc||"#ccc")+";\n color: "+(theme.fg||"#222")+";\n background-color: "+(theme.bga||"#f4f4f4")+";\n ")+"\n }\n .rtabs."+t+" > .rtabs-tab-window-wrapper:before {\n background: linear-gradient(to right, "+(theme.indicator.color||theme.fga||"#07e")+", transparent);\n }\n .rtabs."+t+" > .rtabs-tab-window-wrapper:after {\n background: linear-gradient(to left, "+(theme.indicator.color||theme.fga||"#07e")+", transparent);\n }\n .rtabs."+t+".alt > div > .rtabs-tab-window {\n color: "+(theme.bg||"#fff")+";\n background-color: "+(theme.fga||"#07e")+";\n }"+(boxy?"\n .rtabs."+t+".alt > div > .rtabs-tab-window .rtabs-tab {\n color: "+(theme.bg||"#fff")+";\n background-color: "+(theme.fga||"#07e")+";\n }":"")+"\n \n "+(!boxy?".rtabs-flat."+t+" > div > .rtabs-tab-window:after {\n background-color: "+(theme.bga||"#f4f4f4")+";\n }\n .rtabs-flat.alt."+t+" > div > .rtabs-tab-window:after {\n background-color: "+(theme.fga||"#07e")+";\n }":"\n .rtabs-flat."+t+" > div > .rtabs-tab-window {\n background-color: "+(theme.bg||"#fff")+";\n }\n .alt.rtabs-flat."+t+" > div > .rtabs-tab-window {\n background-color: "+(theme.fga||"#07e")+";\n }")+"\n \n "+(boxy?".rtabs."+t+" > div > .rtabs-tab-window .rtabs-tabs {\n border-color: "+(theme.bc||"#ccc")+";\n }":"")+"\n \n .rtabs."+t+" > div > .rtabs-tab-window > .rtabs-tab {\n cursor: pointer;"+(!boxy?"":"\n border-color: "+(theme.bc||"#ccc")+";\n color: "+(theme.fg||"#222")+";\n background-color: "+(theme.bga||"#f4f4f4")+";\n ")+"\n }\n \n .rtabs."+t+" > div > .rtabs-tab-window .rtabs-selected"+(boxy?",\n .rtabs."+t+".alt > div > .rtabs-tab-window .rtabs-selected":"")+" {"+(boxy?"\n border-bottom-color: "+(them.bg||"#fff")+";\n background-color: "+(theme.selected.bg||theme.bg||"#fff")+";"+(theme.indicator?"\n background-image: linear-gradient(to bottom, "+(theme.indicator.color||theme.fga||"#07e")+", "+(theme.bg||"#fff")+" 3px);":"")+"\n color: "+(theme.selected.fg||theme.fg||"#222")+";":"")+"\n }\n \n .rtabs."+t+" > div > .rtabs-tab-window .rtabs-indicator {\n background-color: "+(theme.indicator.color||theme.fga||"#07e")+";\n }\n \n .rtabs."+t+".alt > div > .rtabs-tab-window .rtabs-indicator {\n background-color: "+(theme.bg||"#fff")+";\n }\n \n .rtabs."+t+" {\n color: "+(theme.fg||"#222")+";\n background-color: "+(theme.bg||"#fff")+";\n }\n "}).join("\n")}.call(this,data)].join(" ")},attributes:["transition","flat","pad","center","height","fill","defer","selected"],data:function data(){return{tabs:[],rightTabs:[],selected:-1,selectedContent:-1,opacity:1,scrollStatus:""}},on:{construct:construct,config:function config(){var this$1=this;if(this._ctabs){this.set("tabs",(this.get("tabs")||[]).concat(this._ctabs),{shuffle:true})}this._ctabs=0;var tabs=this.get("tabs");var xs=this.indicatorObservers=[];tabs.forEach(function(t){if(typeof t.hidden==="string"){xs.push(this$1.observe(t.hidden,function(){return setTimeout(function(){return this$1.updateIndicator()})},{init:false,defer:true}))}});xs.push(this.observe("tabs.*.hidden",function(){return setTimeout(function(){return this$1.updateIndicator()})},{init:false,defer:true}));this.once("render",function(){var sel=this$1.get("selected");if(sel===-1){this$1.select(0)}else{this$1.set("selectedContent",sel)}})},select:select,close:close,teardown:function teardown(){this.indicatorObservers.forEach(function(o){return o.cancel()})}},observe:{selected:{handler:function handler(v){var this$1=this;var hidden=this._hidden(v);var tabs=this.get("tabs");if(hidden){setTimeout(function(){var trans=this$1.get("transition");this$1.set("transition","");this$1.select(v+1>=tabs.length?0:v+1);this$1.set("transition",trans)})}},init:false},clientWidth:function clientWidth(){this.updateIndicator()}},decorators:{registered:function registered(node,idx){var me=this;if(!this._tabs){this._tabs=[]}this._tabs[idx]=node;this.updateIndicator();return{teardown:function teardown(){},invalidate:function invalidate(){me.updateIndicator()},update:function update(idx){me._tabs[idx]=node;setTimeout(function(){return me.updateIndicator()})}}},scrolled:scrolled,sized:sized}});function construct(){var cmp=this.component;if(!cmp){return}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 tabs=tpl.filter(function(n){return n.e==="tab"}).map(function(t){var tab={template:{t:t.f.filter(function(n){return n.e!=="title"})}};var extra=[];var extraTab=[];t.m&&t.m.forEach(function(a){if(a.t===13&&~tabAttrs.indexOf(a.n)){if(a.n==="disabled"&&a.f&&a.f.length===1&&a.f[0].t===2){var cnd="_cnd"+attrs.length;tab.disabled=cnd;attrs.push({t:13,n:cnd,f:a.f})}else if(a.n==="no-pad"){if(!a.f){tab.pad=false}else if(a.f.length===1&&a.f[0].t===2){var cnd$1="_cnd"+attrs.length;tab.padRef=cnd$1;attrs.push({t:13,n:cnd$1,f:a.f})}}else if(a.n==="hidden"&&a.f&&a.f.length===1&&a.f[0].t===2){var cnd$2="_cnd"+attrs.length;tab.hidden=cnd$2;attrs.push({t:13,n:cnd$2,f:a.f})}else{tab[a.n]=a.f===0?true:typeof a.f==="string"?a.f:{t:a.f}}}else if(a.t===70){extraTab.push(a)}else{extra.push(a)}});var tmp;tmp=t.f.find(function(n){return n.e==="title"});if(tmp){tab.title=tmp.f;if(tmp.m){extraTab.push.apply(extraTab,tmp.m)}}if(extra.length){tab.extra={t:extra}}if(extraTab.length){tab.extraTab={t:extraTab}}return tab});this._ctabs=tabs}function select(ctx,idx){var this$1=this;var obj;if(idx<-1||idx>=this.get("tabs.length")){return}var current=this.get("selected");var prs=[];var trans=this.get("transition");if(this._fadetm){this.set("opacity",1);clearTimeout(this._fadetm);this._fadetm=0}if(current!==idx){if(this.rendered){var cur=this.getContext(this.find(".rtabs-selected"));var window=this.find(".rtabs-content-window");if(~current){this.set("scroll."+cur.get("@index"),window.scrollTop)}if(cur.hasListener("leave")){cur.raise("leave")}if(trans==="fade"){this.set({opacity:0,selected:idx});this.updateIndicator();var ctx$1=this.getContext(this.find(".rtabs-selected"));this._fadetm=setTimeout(function(){var obj;this$1._fadetm=0;this$1.set((obj={selectedContent:idx},obj["tabs."+idx+".load"]=true,obj.opacity=1,obj));if(ctx$1.hasListener("enter")){ctx$1.raise("enter")}if(window&&~current){window.scrollTop=this$1.get("scroll."+idx)||0}},150)}else if(trans==="slide"){this.set("selected",idx);this.set("tabs."+idx+".load",true);this.set("selectedContent",idx);this.updateIndicator();var ctx$2=this.getContext(this.find(".rtabs-selected"));if(ctx$2.hasListener("enter")){ctx$2.raise("enter")}if(window&&~current){window.scrollTop=this.get("scroll."+idx)||0}}else{this.set((obj={selected:idx},obj["tabs."+idx+".load"]=true,obj.selectedContent=idx,obj));this.updateIndicator();var ctx$3=this.getContext(this.find(".rtabs-selected"));if(ctx$3.hasListener("enter")){ctx$3.raise("enter")}if(window){window.scrollTop=this.get("scroll."+idx)||0}}if(~current&&window&&window.scrollLeft){window.scrollLeft=0}}else{this.set({selected:idx,selectedContent:idx})}}}function close(ctx,idx){var tab=this.getContext(this._tabs[idx]);var ok=true;if(typeof tab.onclose==="function"){ok=tab.onclose.call(undefined)!==false}if(ok&&tab.element.events.find(function(e){return e.events.find(function(e){return e.name==="close"})})){ok=tab.raise("close")!==false}if(ok){this.splice("tabs",idx,1)}return false}export var Handle=function Handle(tabs,item){this.tabs=tabs;this.item=item};var prototypeAccessors$1={keypath:{configurable:true},id:{configurable:true},index:{configurable:true},title:{configurable:true},template:{configurable:true},hidden:{configurable:true},right:{configurable:true},pad:{configurable:true},disabled:{configurable:true},button:{configurable:true},closable:{configurable:true},load:{configurable:true}};prototypeAccessors$1.keypath.get=function(){if(this.removed){return}return"tabs."+this.index};prototypeAccessors$1.id.get=function(){return this.get("id")};prototypeAccessors$1.id.set=function(v){this.set("id",v)};prototypeAccessors$1.index.get=function(){return this.tabs.get("tabs").indexOf(this.item)};prototypeAccessors$1.title.get=function(){return this.get("title")};prototypeAccessors$1.title.set=function(v){this.set("title",v)};prototypeAccessors$1.template.get=function(){return this.get("template")};prototypeAccessors$1.template.set=function(v){return this.set("template",v)};prototypeAccessors$1.hidden.get=function(){return this.get("hidden")};prototypeAccessors$1.hidden.set=function(v){return this.set("hidden",v)};prototypeAccessors$1.right.get=function(){return this.get("right")};prototypeAccessors$1.right.set=function(v){return this.set("right",v)};prototypeAccessors$1.pad.get=function(){return this.get("pad")};prototypeAccessors$1.pad.set=function(v){return this.set("pad",v)};prototypeAccessors$1.disabled.get=function(){return this.get("disabled")};prototypeAccessors$1.disabled.set=function(v){return this.set("disabled",v)};prototypeAccessors$1.button.get=function(){return this.get("button")};prototypeAccessors$1.button.set=function(v){return this.set("button",v)};prototypeAccessors$1.closable.get=function(){return this.get("closable")};prototypeAccessors$1.closable.set=function(v){return this.set("closable",v)};prototypeAccessors$1.load.get=function(){return this.get("load")};prototypeAccessors$1.load.set=function(v){return this.set("load",v)};Handle.prototype.select=function select(){if(this.removed){return}this.tabs.select(this.index)};Handle.prototype.remove=function remove(){if(this.removed){return false}this.tabs.splice("tabs",this.index,1);this.removed=true;return true};Handle.prototype.get=function get(keypath){if(this.removed){return false}if(!keypath){return this.tabs.get(this.keypath)}var key=keypath.replace(/^[\.\/]*/,"");return this.tabs.get(this.keypath+"."+key)};Handle.prototype.set=function set(keypath,value){if(this.removed){return false}var key=keypath.replace(/^[\.\/]*/,"");return this.tabs.set(this.keypath+"."+key,value)};Object.defineProperties(Handle.prototype,prototypeAccessors$1);export function plugin(opts){if(opts===void 0)opts={};return function(ref){var instance=ref.instance;instance.components[opts.name||"tabs"]=Tabs}}globalRegister("RMTabs","components",Tabs);export default plugin; | ||
import Ractive from"ractive";import{scrolled}from"./scrolled";import{sized}from"./watch-size";import globalRegister from"./globalRegister";export var Tabs=function(Ractive){function Tabs(opts){Ractive.call(this,opts)}if(Ractive)Tabs.__proto__=Ractive;Tabs.prototype=Object.create(Ractive&&Ractive.prototype);Tabs.prototype.constructor=Tabs;var prototypeAccessors={visibleSelection:{configurable:true}};Tabs.prototype.addTab=function addTab(tab,idx){if(!tab.template){tab.template=[]}if(typeof idx==="number"){this.splice("tabs",idx,0,tab)}else{this.push("tabs",tab)}var res=new Handle(this,tab);if(tab.select){this.select(res.index)}return res};Tabs.prototype.getTab=function getTab(id){var tabs=this.get("tabs");var tab=tabs.find(function(t){return t.id===id});if(tab){return new Handle(this,tab)}else if(id in tabs&&typeof tabs[id]==="object"){return new Handle(this,tabs[id])}};Tabs.prototype.updateIndicator=function updateIndicator(){if(!this.rendered||!this._tabs){return}var ctx=this.getContext(this.find(".rtabs-tab-window"));if(ctx.decorators.scrolled){ctx.decorators.scrolled.refresh()}if(this.get("@style.raui.tabs.boxy")){return}var node=this._tabs[this.get("selected")];if(!node||!node.offsetParent){return}if(node){var start=this.get("selectedLeft");if(start===undefined){this.set({selectedLeft:node.offsetLeft,selectedRight:node.offsetParent.clientWidth-(node.offsetLeft+node.offsetWidth)})}else{var max=node.offsetParent.clientWidth;var left=node.offsetLeft,width=node.clientWidth,right=max-left-width;this.set({direction:left<start?"left":"right",selectedLeft:left,selectedRight:right})}}else{this.set({selectedLeft:0,selectedRight:this.find(".tabs").offsetWidth})}};Tabs.prototype.checkSelection=function checkSelection(ctx,idx){if(this.get("selected")!==idx){select.call(this,ctx,idx)}};Tabs.prototype.select=function select(idx){if(idx<0||idx>=(this.get("tabs.length")||0)){return}this.fire("select",{},idx)};Tabs.prototype._hidden=function _hidden(idx){var this$1=this;var hidden=this.get("tabs."+idx+".hidden");if(typeof hidden==="string"){hidden=this.get(hidden)}setTimeout(function(){if(hidden&&this$1.get("selected")===idx){this$1.select(0)}});return hidden};Tabs.prototype.stopHorizontalScroll=function stopHorizontalScroll(node){if(node.scrollLeft){node.scrollLeft=0}};Tabs.prototype._scrollsRight=function _scrollsRight(){var scroll=this.get("scrollStatus")||"";if(/hscroll.*(hmiddle|left)/.test(scroll)&&!/right/.test(scroll)){return true}};Tabs.prototype._scrollsLeft=function _scrollsLeft(){var scroll=this.get("scrollStatus")||"";if(/hscroll.*(hmiddle|right)/.test(scroll)&&!/left/.test(scroll)){return true}};prototypeAccessors.visibleSelection.get=function(){var idx=0;var tabs=this.get("tabs");var active=this.get("selected");for(var i=0;i<tabs.length;i++){var tab=tabs[i];if(active===i){return idx}var hidden=tab.hidden;if(typeof hidden==="string"){hidden=this.get(hidden)}if(!hidden){idx++}}return idx};Object.defineProperties(Tabs.prototype,prototypeAccessors);return Tabs}(Ractive);var tabAttrs=["closable","disabled","title","right","button","no-pad","hidden","id","load"];Ractive.extendWith(Tabs,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs",g:1},{t:16,r:"extra-attributes"},{n:"class-rtabs-flat",t:13,f:[{t:2,r:"~/flat"}]},{n:"class-rtabs-margin",t:13,f:[{t:2,r:"~/margin"}]},{n:"class-rtabs-fill",t:13,f:[{t:2,r:"~/fill"}]},{n:"sized",t:71,f:{r:[],s:'[{clientWidth:"~/clientWidth"}]'}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window-wrapper",g:1},{n:"class-rtabs-scroll-right",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsRight()"}}]},{n:"class-rtabs-scroll-left",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsLeft()"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window",g:1},{t:4,f:[{n:"class-rtabs-going-left",t:13}],n:50,x:{r:[".direction"],s:'_0==="left"'}},{t:4,f:[{n:"class-rtabs-going-right",t:13}],n:51,l:1},{n:"scrolled",t:71,f:{r:[],s:'["~/scrollStatus"]'}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-left",g:1},{n:"class-rtabs-center",t:13,f:[{t:2,r:"~/center"}]}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"!_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-right",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-indicator",g:1},{n:"style-left",f:[{t:2,r:".selectedLeft"},"px"],t:13},{t:4,f:[{n:"style-right",f:[{t:2,r:".selectedRight"},"px"],t:13}],n:50,x:{r:[".selectedRight"],s:"_0!==undefined"}}]}],n:51,r:"@style.raui.tabs.boxy"}]}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-wrapper",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-window",g:1},{t:4,f:[{n:"class-rtabs-trans-fade",t:13}],n:50,x:{r:[".transition"],s:'_0==="fade"'}},{t:4,f:[{n:"class-rtabs-trans-slide",t:13}],n:50,x:{r:[".transition"],s:'_0==="slide"'},l:1},{n:["scroll"],t:70,f:{r:["@this","@node"],s:"[_0.stopHorizontalScroll(_1)]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-contents",g:1},{n:"style-opacity",f:[{t:2,r:"~/opacity"}],t:13},{n:"style-left",f:[{t:2,x:{r:[".selectedContent"],s:"_0*-100"}},"%"],t:13},{n:"class-rtabs-pad",t:13,f:[{t:2,r:"~/pad"}]}],f:[{t:4,f:[{t:8,r:"tab-content"}],n:52,r:".tabs"}]}]}]}]}],e:{'[{clientWidth:"~/clientWidth"}]':function(){return[{clientWidth:"~/clientWidth"}]},"_0._scrollsRight()":function(_0){return _0._scrollsRight()},"_0._scrollsLeft()":function(_0){return _0._scrollsLeft()},'_0==="left"':function(_0){return _0==="left"},'["~/scrollStatus"]':function(){return["~/scrollStatus"]},"!_0&&!_1._hidden(_2)":function(_0,_1,_2){return!_0&&!_1._hidden(_2)},"_0&&!_1._hidden(_2)":function(_0,_1,_2){return _0&&!_1._hidden(_2)},"_0!==undefined":function(_0){return _0!==undefined},'_0==="fade"':function(_0){return _0==="fade"},'_0==="slide"':function(_0){return _0==="slide"},"[_0.stopHorizontalScroll(_1)]":function(_0,_1){return[_0.stopHorizontalScroll(_1)]},"_0*-100":function(_0){return _0*-100},"_0===_1":function(_0,_1){return _0===_1},'_0==="dynamic"':function(_0){return _0==="dynamic"},"_0!==_1":function(_0,_1){return _0!==_1},"_0===false":function(_0){return _0===false},"[_0.checkSelection((_1),_2)]":function(_0,_1,_2){return[_0.checkSelection(_1,_2)]},'(_3==="always"&&_0===_1)||(_3&&_2)||!_3':function(_0,_1,_2,_3){return _3==="always"&&_0===_1||_3&&_2||!_3},"!_0":function(_0){return!_0},"_0===_1&&!_2":function(_0,_1,_2){return _0===_1&&!_2},'typeof _1==="string"?_0.get(_1):_1':function(_0,_1){return typeof _1==="string"?_0.get(_1):_1},'[["select",_0]]':function(_0){return[["select",_0]]},"[_0.button()]":function(_0){return[_0.button()]},'typeof _0==="function"':function(_0){return typeof _0==="function"},"[_0]":function(_0){return[_0]},'typeof _0==="string"':function(_0){return typeof _0==="string"},'[["close",_0]]':function(_0){return[["close",_0]]},"_0&&!_1":function(_0,_1){return _0&&!_1}},p:{"tab-content":[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-content",g:1},{n:"class-rtabs-selected-content",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0===_1"}}]},{n:"class-rtabs-dyna",t:13,f:[{t:2,x:{r:["~/height"],s:'_0==="dynamic"'}}]},{n:"class-rtabs-not-selected",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0!==_1"}}]},{t:4,f:[{t:16,r:".extra"}],n:50,r:".extra"},{t:4,f:[{n:"class-rtabs-no-pad",t:13}],n:50,x:{r:[".pad"],s:"_0===false"}},{t:4,f:[{n:"class-rtabs-no-pad",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".padRef"}]}}]}],n:50,r:".padRef",l:1},{n:["focusin"],t:70,f:{r:["@this","@context","@index"],s:"[_0.checkSelection((_1),_2)]"}}],f:[{t:4,f:[{t:16,r:".template"}],n:50,x:{r:["~/selectedContent","@index",".load","~/defer"],s:'(_3==="always"&&_0===_1)||(_3&&_2)||!_3'}}]}],n:50,x:{r:[".button"],s:"!_0"}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-placeholder",g:1}]}],n:51,l:1}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab",g:1},{n:"class-rtabs-selected",t:13,f:[{t:2,x:{r:["~/selected","@index",".button"],s:"_0===_1&&!_2"}}]},{t:4,f:[{n:"class-rtabs-disabled",t:13}],n:50,x:{r:["@this",".disabled"],s:'typeof _1==="string"?_0.get(_1):_1'}},{t:4,f:[{n:["click"],t:70,f:{r:["@index"],s:'[["select",_0]]'}}],n:50,x:{r:[".button"],s:"!_0"},l:1},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.button()]"}}],n:50,x:{r:[".button"],s:'typeof _0==="function"'},l:1},{n:"registered",t:71,f:{r:["@index"],s:"[_0]"}},{t:4,f:[{t:16,r:".extraTab"}],n:50,r:".extraTab"},{n:"data-tab-index",f:[{t:2,r:"@index"}],t:13}],f:[{t:4,f:[{t:2,r:"title"}],n:50,x:{r:[".title"],s:'typeof _0==="string"'}},{t:4,f:[{t:16,r:".title"}],n:50,r:".title",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-close",g:1},{n:["click"],t:70,f:{r:["@index"],s:'[["close",_0]]'}}],f:["×"]}],n:50,x:{r:[".closable",".button"],s:"_0&&!_1"}}]}]}},cssId:"rtab",noCssTransform:true,css:function(data){return[function(data){var primary=Object.assign({},data("raui.primary"),data("raui.tabs.primary"));primary.selected=Object.assign({},data("raui.tabs.selected"),data("raui.tabs.primary.selected"));primary.indicator=Object.assign({},data("raui.tabs.indicator"),data("raui.tabs.primary.indicator"));var themes=(data("raui.themes")||[]).slice();(data("raui.tabs.themes")||[]).forEach(function(t){if(!~themes.indexOf(t)){themes.push(t)}});var boxy=data("raui.tabs.boxy")||data("raui.tabs.primary.boxy");return"\n .rtabs {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n \n .rtabs-tab-window {\n overflow-y: hidden;\n overflow-x: auto;\n "+(!boxy?"box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n color: "+(primary.fg||"#222")+";\n background-color: "+(primary.bg||"#fff")+";":"border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 1px 1px 0 1px;\n color: "+(primary.fg||"#222")+";\n background-color: "+(primary.bga||"#f4f4f4")+";\n ")+"\n position: relative;\n flex-shrink: 0;\n }\n .alt > div > .rtabs-tab-window {\n color: "+(primary.bg||"#fff")+";\n background-color: "+(primary.fga||"#07e")+";\n }"+(boxy?"\n .alt > div > .rtabs-tab-window .rtabs-tab {\n color: "+(primary.bg||"#fff")+";\n background-color: "+(primary.fga||"#07e")+";\n }":"")+"\n \n .rtabs-tab-window-wrapper {\n position: relative;\n z-index: 10;\n }\n .rtabs-tab-window-wrapper:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n background: linear-gradient(to right, "+(primary.indicator.color||primary.fga||"#07e")+", transparent);\n z-index: 999;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-left:before {\n opacity: 1;\n }\n \n .rtabs-tab-window-wrapper:after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n background: linear-gradient(to left, "+(primary.indicator.color||primary.fga||"#07e")+", transparent);\n transition: opacity 0.3s ease-in-out;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-right:after {\n opacity: 1;\n }\n \n .rtabs-flat > div > .rtabs-tab-window {\n box-shadow: none;\n border-width: 0;\n }\n "+(!boxy?".rtabs-flat > div > .rtabs-tab-window:after {\n content: '';\n height: 0.15em;\n position: absolute;\n bottom: 0px;\n width: 100%;\n display: block;\n background-color: "+(primary.bga||"#f4f4f4")+";\n }\n .rtabs-flat.alt > div > .rtabs-tab-window:after {\n background-color: "+(primary.fga||"#07e")+";\n }":"\n .rtabs-flat > div > .rtabs-tab-window {\n background-color: "+(primary.bg||"#fff")+";\n }\n .alt.rtabs-flat > div > .rtabs-tab-window {\n background-color: "+(primary.fga||"#07e")+";\n }\n .rtabs-flat > div > .rtabs-tab-window .rtabs-tab {\n border-top-width: 1px;\n }")+"\n \n .rtabs-center.rtabs-left {\n text-align: center;\n }"+(boxy?"\n .rtabs-center > .rtabs-tab:first-child {\n border-left-width: 1px;\n }":"")+"\n \n .rtabs-pad {\n padding: 1em;\n }\n \n .rtabs-fill {\n flex-grow: 1;\n height: 100%;\n }\n \n .rtabs-tabs {\n display: table;\n position: relative;\n min-width: 100%;\n white-space: nowrap;"+(boxy?"\n border-style: solid;\n border-width: 0 0 1px 0;\n border-color: "+(primary.bc||"#ccc")+";\n line-height: 1.5em;":"")+"\n }\n \n .rtabs-tab {\n display: inline-block;\n box-sizing: border-box;\n padding: 0.5em 1em;\n height: 2.5em;\n transition: opacity 0.2s ease-in-out;\n user-select: none;\n cursor: pointer;"+(!boxy?"\n opacity: 0.9;":"\n border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 0 1px 1px 0;\n margin-bottom: -1px;\n color: "+(primary.fg||"#222")+";\n background-color: "+(primary.bga||"#f4f4f4")+";\n ")+"\n }\n .rtabs-tab:hover {\n opacity: 1;\n }\n \n .rtabs-selected"+(boxy?",\n .alt > div > .rtabs-tab-window .rtabs-selected":"")+" {\n opacity: 1;"+(boxy?"\n font-weight: bold;\n border-bottom-color: "+(primary.bg||"#fff")+";\n background-color: "+(primary.selected.bg||primary.bg||"#fff")+";\n color: "+(primary.selected.fg||primary.fg||"#222")+";":"")+"\n }\n \n .rtabs-disabled {\n opacity: 0.4;\n }\n \n .rtabs-right {\n text-align: right;\n display: table-cell;\n }\n \n .rtabs-left {\n text-align: left;\n display: table-cell;\n }\n \n .rtabs-close {\n display: inline-block;\n margin-right: -0.5em;\n font-weight: 700;\n opacity: 0.3;\n transition: opacity: 0.2s ease-in-out;\n }\n \n .rtabs-close:hover {\n opacity: 1;\n }\n \n .rtabs-indicator {\n position: absolute;\n bottom: 0;\n height: 0.15em;\n background-color: "+(primary.indicator.color||primary.fga||"#07e")+";\n z-index: 2;\n }\n \n .alt > div > .rtabs-tab-window .rtabs-indicator {\n background-color: "+(primary.bg||"#fff")+";\n }\n \n .rtabs-going-left .rtabs-indicator {\n transition: left 0.2s ease-in-out, right 0.2s ease-in-out 0.1s;\n }\n .rtabs-going-right .rtabs-indicator {\n transition: left 0.2s ease-in-out 0.1s, right 0.2s ease-in-out;\n }\n \n .rtabs-content-wrapper {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-grow: 2;\n overflow: hidden;\n }\n \n .rtabs-content-window {\n width: 100%;\n display: flex;\n flex-grow: 1;\n overflow-y: auto;\n overflow-x: hidden\n }\n \n .rtabs {\n color: "+(primary.fg||"#222")+";\n background-color: "+(primary.bg||"#fff")+";\n }\n \n .rtabs-contents {\n list-style: none;\n padding: 0;\n margin: 0;\n position: relative;\n left: 0;\n display: flex;\n flex-wrap: nowrap;\n white-space: nowrap;\n width: 100%;\n }\n .rtabs-trans-slide > .rtabs-contents {\n transition: left 0.2s ease-in-out;\n }\n .rtabs-trans-fade > .rtabs-contents {\n transition: opacity 0.15s ease;\n opacity: 1;\n white-space: nowrap;\n }\n \n .rtabs-fill > div > div > .rtabs-contents {\n display: flex;\n }\n \n .rtabs-tab-content {\n position: relative;\n width: 100%;\n overflow: auto;\n vertical-align: top;\n white-space: initial;\n transition: opacity 0.1s ease-in-out;\n flex-shrink: 0;\n white-space: initial;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n \n .rtabs-placeholder {\n display: inline-block;\n width: 100%;\n height: 1px;\n flex-shrink: 0;\n }\n .rtabs-dyna.rtabs-not-selected {\n height: 1px;\n opacity: 0;\n overflow: hidden;\n }\n .rtabs-pad > .rtabs-tab-content {\n padding: 1em;\n box-sizing: border-box;\n }\n .rtabs-pad > .rtabs-tab-content.rtabs-no-pad {\n padding: 0;\n }\n .rtabs > .rtabs-tab-content.rtabs-pad {\n padding: 1em;\n box-sizing: border-box;\n }\n "+themes.map(function(t){var theme=Object.assign({},data("raui.primary"),data("raui.tabs.primary"),data("raui."+t),data("raui.tabs."+t));theme.selected=Object.assign({},data("raui.tabs.selected"),data("raui.tabs.primary.selected"),data("raui.tabs."+t+".selected"));theme.indicator=Object.assign({},data("raui.tabs.indicator"),data("raui.tabs.primary.indicator"),data("raui.tabs."+t+".indicator"));var boxy="boxy"in theme?theme.boxy:data("raui.tabs.boxy");return".rtabs."+t+" > div > .rtabs-tab-window {\n "+(!boxy?"box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n color: "+(theme.fg||"#222")+";\n background-color: "+(theme.bg||"#fff")+";":"border-color: "+(theme.bc||"#ccc")+";\n color: "+(theme.fg||"#222")+";\n background-color: "+(theme.bga||"#f4f4f4")+";\n ")+"\n }\n .rtabs."+t+" > .rtabs-tab-window-wrapper:before {\n background: linear-gradient(to right, "+(theme.indicator.color||theme.fga||"#07e")+", transparent);\n }\n .rtabs."+t+" > .rtabs-tab-window-wrapper:after {\n background: linear-gradient(to left, "+(theme.indicator.color||theme.fga||"#07e")+", transparent);\n }\n .rtabs."+t+".alt > div > .rtabs-tab-window {\n color: "+(theme.bg||"#fff")+";\n background-color: "+(theme.fga||"#07e")+";\n }"+(boxy?"\n .rtabs."+t+".alt > div > .rtabs-tab-window .rtabs-tab {\n color: "+(theme.bg||"#fff")+";\n background-color: "+(theme.fga||"#07e")+";\n }":"")+"\n \n "+(!boxy?".rtabs-flat."+t+" > div > .rtabs-tab-window:after {\n background-color: "+(theme.bga||"#f4f4f4")+";\n }\n .rtabs-flat.alt."+t+" > div > .rtabs-tab-window:after {\n background-color: "+(theme.fga||"#07e")+";\n }":"\n .rtabs-flat."+t+" > div > .rtabs-tab-window {\n background-color: "+(theme.bg||"#fff")+";\n }\n .alt.rtabs-flat."+t+" > div > .rtabs-tab-window {\n background-color: "+(theme.fga||"#07e")+";\n }")+"\n \n "+(boxy?".rtabs."+t+" > div > .rtabs-tab-window .rtabs-tabs {\n border-color: "+(theme.bc||"#ccc")+";\n }":"")+"\n \n .rtabs."+t+" > div > .rtabs-tab-window > .rtabs-tab {\n cursor: pointer;"+(!boxy?"":"\n border-color: "+(theme.bc||"#ccc")+";\n color: "+(theme.fg||"#222")+";\n background-color: "+(theme.bga||"#f4f4f4")+";\n ")+"\n }\n \n .rtabs."+t+" > div > .rtabs-tab-window .rtabs-selected"+(boxy?",\n .rtabs."+t+".alt > div > .rtabs-tab-window .rtabs-selected":"")+" {"+(boxy?"\n border-bottom-color: "+(them.bg||"#fff")+";\n background-color: "+(theme.selected.bg||theme.bg||"#fff")+";"+(theme.indicator?"\n background-image: linear-gradient(to bottom, "+(theme.indicator.color||theme.fga||"#07e")+", "+(theme.bg||"#fff")+" 3px);":"")+"\n color: "+(theme.selected.fg||theme.fg||"#222")+";":"")+"\n }\n \n .rtabs."+t+" > div > .rtabs-tab-window .rtabs-indicator {\n background-color: "+(theme.indicator.color||theme.fga||"#07e")+";\n }\n \n .rtabs."+t+".alt > div > .rtabs-tab-window .rtabs-indicator {\n background-color: "+(theme.bg||"#fff")+";\n }\n \n .rtabs."+t+" {\n color: "+(theme.fg||"#222")+";\n background-color: "+(theme.bg||"#fff")+";\n }\n "}).join("\n")}.call(this,data)].join(" ")},attributes:["transition","flat","pad","center","height","fill","defer","selected"],data:function data(){return{tabs:[],rightTabs:[],selected:-1,selectedContent:-1,opacity:1,scrollStatus:""}},on:{construct:construct,config:function config(){var this$1=this;if(this._ctabs){this.set("tabs",(this.get("tabs")||[]).concat(this._ctabs),{shuffle:true})}this._ctabs=0;var tabs=this.get("tabs");var xs=this.indicatorObservers=[];tabs.forEach(function(t){if(typeof t.hidden==="string"){xs.push(this$1.observe(t.hidden,function(){return setTimeout(function(){return this$1.updateIndicator()})},{init:false,defer:true}))}});xs.push(this.observe("tabs.*.hidden",function(){return setTimeout(function(){return this$1.updateIndicator()})},{init:false,defer:true}));this.once("render",function(){var sel=this$1.get("selected");if(sel===-1){this$1.select(0)}else{this$1.set("selectedContent",sel)}})},select:select,close:close,teardown:function teardown(){this.indicatorObservers.forEach(function(o){return o.cancel()})}},observe:{selected:{handler:function handler(v){var this$1=this;var hidden=this._hidden(v);var tabs=this.get("tabs");if(hidden){setTimeout(function(){var trans=this$1.get("transition");this$1.set("transition","");this$1.select(v+1>=tabs.length?0:v+1);this$1.set("transition",trans)})}},init:false},clientWidth:function clientWidth(){this.updateIndicator()}},decorators:{registered:function registered(node,idx){var me=this;if(!this._tabs){this._tabs=[]}this._tabs[idx]=node;this.updateIndicator();return{teardown:function teardown(){},invalidate:function invalidate(){me.updateIndicator()},update:function update(idx){me._tabs[idx]=node;setTimeout(function(){return me.updateIndicator()})}}},scrolled:scrolled,sized:sized}});function construct(){var cmp=this.component;if(!cmp){return}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 tabs=tpl.filter(function(n){return n.e==="tab"}).map(function(t){var tab={template:{t:t.f.filter(function(n){return n.e!=="title"})}};var extra=[];var extraTab=[];t.m&&t.m.forEach(function(a){if(a.t===13&&~tabAttrs.indexOf(a.n)){if(a.n==="disabled"&&a.f&&a.f.length===1&&a.f[0].t===2){var cnd="_cnd"+attrs.length;tab.disabled=cnd;attrs.push({t:13,n:cnd,f:a.f})}else if(a.n==="no-pad"){if(!a.f){tab.pad=false}else if(a.f.length===1&&a.f[0].t===2){var cnd$1="_cnd"+attrs.length;tab.padRef=cnd$1;attrs.push({t:13,n:cnd$1,f:a.f})}}else if(a.n==="hidden"&&a.f&&a.f.length===1&&a.f[0].t===2){var cnd$2="_cnd"+attrs.length;tab.hidden=cnd$2;attrs.push({t:13,n:cnd$2,f:a.f})}else{tab[a.n]=a.f===0?true:typeof a.f==="string"?a.f:{t:a.f}}}else if(a.t===70){extraTab.push(a)}else{extra.push(a)}});var tmp;tmp=t.f.find(function(n){return n.e==="title"});if(tmp){tab.title=tmp.f;if(tmp.m){extraTab.push.apply(extraTab,tmp.m)}}if(extra.length){tab.extra={t:extra}}if(extraTab.length){tab.extraTab={t:extraTab}}return tab});this._ctabs=tabs}function select(ctx,idx){var this$1=this;var obj;if(idx<-1||idx>=this.get("tabs.length")){return}var current=this.get("selected");var prs=[];var trans=this.get("transition");if(this._fadetm){this.set("opacity",1);clearTimeout(this._fadetm);this._fadetm=0}if(current!==idx){if(this.rendered){var cur=this.getContext(this.find(".rtabs-selected"));var window=this.find(".rtabs-content-window");if(~current){this.set("scroll."+cur.get("@index"),window.scrollTop)}if(cur.hasListener("leave")){cur.raise("leave")}if(trans==="fade"){this.set({opacity:0,selected:idx});this.updateIndicator();var ctx$1=this.getContext(this.find(".rtabs-selected"));this._fadetm=setTimeout(function(){var obj;this$1._fadetm=0;this$1.set((obj={selectedContent:idx},obj["tabs."+idx+".load"]=true,obj.opacity=1,obj));if(ctx$1.hasListener("enter")){ctx$1.raise("enter")}if(window&&~current){window.scrollTop=this$1.get("scroll."+idx)||0}},150)}else if(trans==="slide"){this.set("selected",idx);this.set("tabs."+idx+".load",true);this.set("selectedContent",idx);this.updateIndicator();var ctx$2=this.getContext(this.find(".rtabs-selected"));if(ctx$2.hasListener("enter")){ctx$2.raise("enter")}if(window&&~current){window.scrollTop=this.get("scroll."+idx)||0}}else{this.set((obj={selected:idx},obj["tabs."+idx+".load"]=true,obj.selectedContent=idx,obj));this.updateIndicator();var ctx$3=this.getContext(this.find(".rtabs-selected"));if(ctx$3.hasListener("enter")){ctx$3.raise("enter")}if(window){window.scrollTop=this.get("scroll."+idx)||0}}if(~current&&window&&window.scrollLeft){window.scrollLeft=0}}else{this.set({selected:idx,selectedContent:idx})}}}function close(ctx,idx){var tab=this.getContext(this._tabs[idx]);var ok=true;if(typeof tab.onclose==="function"){ok=tab.onclose.call(undefined)!==false}if(ok&&tab.element.events.find(function(e){return e.events.find(function(e){return e.name==="close"})})){ok=tab.raise("close")!==false}if(ok){this.splice("tabs",idx,1)}return false}export var Handle=function Handle(tabs,item){this.tabs=tabs;this.item=item};var prototypeAccessors$1={keypath:{configurable:true},id:{configurable:true},index:{configurable:true},title:{configurable:true},template:{configurable:true},hidden:{configurable:true},right:{configurable:true},pad:{configurable:true},disabled:{configurable:true},button:{configurable:true},closable:{configurable:true},load:{configurable:true}};prototypeAccessors$1.keypath.get=function(){if(this.removed){return}return"tabs."+this.index};prototypeAccessors$1.id.get=function(){return this.get("id")};prototypeAccessors$1.id.set=function(v){this.set("id",v)};prototypeAccessors$1.index.get=function(){return this.tabs.get("tabs").indexOf(this.item)};prototypeAccessors$1.title.get=function(){return this.get("title")};prototypeAccessors$1.title.set=function(v){this.set("title",v)};prototypeAccessors$1.template.get=function(){return this.get("template")};prototypeAccessors$1.template.set=function(v){return this.set("template",v)};prototypeAccessors$1.hidden.get=function(){return this.get("hidden")};prototypeAccessors$1.hidden.set=function(v){return this.set("hidden",v)};prototypeAccessors$1.right.get=function(){return this.get("right")};prototypeAccessors$1.right.set=function(v){return this.set("right",v)};prototypeAccessors$1.pad.get=function(){return this.get("pad")};prototypeAccessors$1.pad.set=function(v){return this.set("pad",v)};prototypeAccessors$1.disabled.get=function(){return this.get("disabled")};prototypeAccessors$1.disabled.set=function(v){return this.set("disabled",v)};prototypeAccessors$1.button.get=function(){return this.get("button")};prototypeAccessors$1.button.set=function(v){return this.set("button",v)};prototypeAccessors$1.closable.get=function(){return this.get("closable")};prototypeAccessors$1.closable.set=function(v){return this.set("closable",v)};prototypeAccessors$1.load.get=function(){return this.get("load")};prototypeAccessors$1.load.set=function(v){return this.set("load",v)};Handle.prototype.select=function select(){if(this.removed){return}this.tabs.select(this.index)};Handle.prototype.remove=function remove(){if(this.removed){return false}this.tabs.splice("tabs",this.index,1);this.removed=true;return true};Handle.prototype.get=function get(keypath){if(this.removed){return false}if(!keypath){return this.tabs.get(this.keypath)}var key=keypath.replace(/^[\.\/]*/,"");return this.tabs.get(this.keypath+"."+key)};Handle.prototype.set=function set(keypath,value){if(this.removed){return false}var key=keypath.replace(/^[\.\/]*/,"");return this.tabs.set(this.keypath+"."+key,value)};Object.defineProperties(Handle.prototype,prototypeAccessors$1);export function plugin(opts){if(opts===void 0)opts={};return function(ref){var instance=ref.instance;instance.components[opts.name||"tabs"]=Tabs}}globalRegister("RMTabs","components",Tabs);export default plugin; |
{ | ||
"name": "@evs-chris/raui", | ||
"version": "0.8.5", | ||
"version": "0.8.6", | ||
"description": "Components, decorators, and helpers for Ractive apps that are generally Material-ish", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/evs-chris/raui", |
@@ -390,3 +390,3 @@ (function (global, factory) { | ||
var primary = Object.assign({}, data('raui.primary'), data('raui.shell.primary')); | ||
return ("\n .rshell {\n width: 100%;\n height: 100%;\n position: absolute;\n overflow: hidden;\n }\n .rshell-sizer {\n position: absolute;\n }\n .rshell-modal {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n background-color: #000;\n z-index: -1;\n transition: opacity " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out, z-index 0s linear " + (data('raui.shell.slide.ms') || 400) + "ms;\n }\n .rshell-modal.rshell-blocked {\n opacity: 0.5;\n z-index: 3;\n transition: opacity " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out, z-index 0s linear;\n }\n .rshell-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n z-index: 1;\n }\n \n .rshell-middle {\n flex-grow: 1;\n position: relative;\n }\n \n .rshell-left, .rshell-right {\n position: absolute;\n top: 0;\n box-sizing: border-box;\n height: 100%;\n overflow: auto;\n z-index: 4;\n background-color: " + (primary.bg || 'inherit') + ";\n transition: transform " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out;\n }\n .rshell-left {\n left: 0;\n width: " + left$$1 + ";\n }\n .rshell-right {\n right: 0;\n width: " + right$$1 + ";\n }\n .rshell-left-hidden > .rshell-left {\n transform: translateX(-100%);\n }\n .rshell-right-hidden > .rshell-right {\n transform: translateX(100%);\n }\n .rshell-has-right > .rshell-right,\n .rshell-has-left > .rshell-left {\n z-index: 2;\n }\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-right {\n z-index: 2;\n }\n \n .rshell-left-pop, .rshell-right-pop, .rshell-top-pop, .rshell-bottom-pop {\n z-index: 5;\n transition: transform " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out;\n position: absolute;\n }\n .rshell-left-pop, .rshell-right-pop {\n top: 0;\n bottom: 0;\n max-width: 100%;\n overflow: auto;\n }\n .rshell-top-pop, .rshell-bottom-pop {\n left: 0;\n right: 0;\n max-height: 100%;\n overflow: auto;\n }\n \n .rshell-left-pop {\n transform: translateX(-100%);\n }\n .rshell-right-pop {\n transform: translateX(100%);\n right: 0;\n }\n .rshell-top-pop {\n top: 0;\n transform: translateY(-100%);\n }\n .rshell-bottom-pop {\n bottom: 0;\n transform: translateY(100%);\n }\n \n .rshell-left-popped > .rshell-left-pop,\n .rshell-right-popped > .rshell-right-pop,\n .rshell-top-popped > .rshell-top-pop,\n .rshell-bottom-popped > .rshell-bottom-pop {\n transform: none;\n }\n \n .rshell-center {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n box-sizing: border-box;\n transition: left " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out, width " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out;\n height: 100%;\n width: 100%;\n flex-grow: 1;\n overflow: auto;\n }\n .rshell-has-left > .rshell-center {\n width: calc(100% - " + left$$1 + ");\n left: " + left$$1 + ";\n }\n .rshell-has-right > .rshell-center {\n width: calc(100% - " + right$$1 + ");\n left: 0;\n }\n .rshell-has-left.rshell-has-right > .rshell-center {\n width: calc(100% - " + left$$1 + " - " + right$$1 + ");\n left: " + left$$1 + ";\n }\n .rshell-has-left.rshell-left-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n .rshell-has-right.rshell-right-hidden > .rshell-center {\n width: 100%;\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden > .rshell-center {\n width: calc(100% - " + right$$1 + ");\n left: 0;\n }\n .rshell-has-left.rshell-has-right.rshell-right-hidden > .rshell-center {\n width: calc(100% - " + left$$1 + ");\n left: " + left$$1 + ";\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden.rshell-right-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n \n .rshell-overflow {\n overflow: visible;\n }\n "); | ||
return ("\n .rshell {\n width: 100%;\n height: 100%;\n position: absolute;\n overflow: hidden;\n }\n .rshell-sizer {\n position: absolute;\n }\n .rshell-modal {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n background-color: #000;\n z-index: -1;\n transition: opacity " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out, z-index 0s linear " + (data('raui.shell.slide.ms') || 400) + "ms;\n }\n .rshell-modal.rshell-blocked {\n opacity: 0.5;\n z-index: 3;\n transition: opacity " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out, z-index 0s linear;\n }\n .rshell-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n z-index: 1;\n background-color: " + (primary.bg || 'inherit') + ";\n }\n \n .rshell-middle {\n flex-grow: 1;\n position: relative;\n }\n \n .rshell-left, .rshell-right {\n position: absolute;\n top: 0;\n box-sizing: border-box;\n height: 100%;\n overflow: auto;\n z-index: 4;\n background-color: " + (primary.bg || 'inherit') + ";\n transition: transform " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out;\n }\n .rshell-left {\n left: 0;\n width: " + left$$1 + ";\n }\n .rshell-right {\n right: 0;\n width: " + right$$1 + ";\n }\n .rshell-left-hidden > .rshell-left {\n transform: translateX(-100%);\n }\n .rshell-right-hidden > .rshell-right {\n transform: translateX(100%);\n }\n .rshell-has-right > .rshell-right,\n .rshell-has-left > .rshell-left {\n z-index: 2;\n }\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-right {\n z-index: 2;\n }\n \n .rshell-left-pop, .rshell-right-pop, .rshell-top-pop, .rshell-bottom-pop {\n z-index: 5;\n transition: transform " + (data('raui.shell.slide.ms') || 400) + "ms ease-in-out;\n position: absolute;\n }\n .rshell-left-pop, .rshell-right-pop {\n top: 0;\n bottom: 0;\n max-width: 100%;\n overflow: auto;\n }\n .rshell-top-pop, .rshell-bottom-pop {\n left: 0;\n right: 0;\n max-height: 100%;\n overflow: auto;\n }\n \n .rshell-left-pop {\n transform: translateX(-100%);\n }\n .rshell-right-pop {\n transform: translateX(100%);\n right: 0;\n }\n .rshell-top-pop {\n top: 0;\n transform: translateY(-100%);\n }\n .rshell-bottom-pop {\n bottom: 0;\n transform: translateY(100%);\n }\n \n .rshell-left-popped > .rshell-left-pop,\n .rshell-right-popped > .rshell-right-pop,\n .rshell-top-popped > .rshell-top-pop,\n .rshell-bottom-popped > .rshell-bottom-pop {\n transform: none;\n }\n \n .rshell-center {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n flex-grow: 1;\n overflow: auto;\n }\n .rshell-has-left > .rshell-center {\n width: calc(100% - " + left$$1 + ");\n left: " + left$$1 + ";\n }\n .rshell-has-right > .rshell-center {\n width: calc(100% - " + right$$1 + ");\n left: 0;\n }\n .rshell-has-left.rshell-has-right > .rshell-center {\n width: calc(100% - " + left$$1 + " - " + right$$1 + ");\n left: " + left$$1 + ";\n }\n .rshell-has-left.rshell-left-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n .rshell-has-right.rshell-right-hidden > .rshell-center {\n width: 100%;\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden > .rshell-center {\n width: calc(100% - " + right$$1 + ");\n left: 0;\n }\n .rshell-has-left.rshell-has-right.rshell-right-hidden > .rshell-center {\n width: calc(100% - " + left$$1 + ");\n left: " + left$$1 + ";\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden.rshell-right-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n \n .rshell-overflow {\n overflow: visible;\n }\n "); | ||
// TODO: other themes | ||
@@ -393,0 +393,0 @@ }).call(this, data)].join(' '); }, |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],e):e(t.RMShell={},t.Ractive)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n=Math.abs;function i(t){var e=Object.assign({},{distance:150,flick:200,threshold:.2},t);return function(n){var i=n.Ractive;n.instance.events[t.name||"swipe"+(t.direction||"")]=function(t,n,r){var s;void 0===r&&(r={});var o=Object.assign({},{direction:"right"},e,r);return o.fire=n,(s=t.__r_swipes__)?s.subscribe(o):(s=new l(i.getContext(t)),t.__r_swipes__=s,s.subscribe(o)),{teardown:function(){s.unsubscribe(n)}}}}}var r=i({direction:"left"}),s=i({direction:"right"}),l=(i({direction:"up"}),i({direction:"down"}),function(t){this.context=t,this.node=t.node,this.fires=[],this.bind()});function o(t){return this.__r_swipes__.mousedown(t)}function h(t){return this.__r_swipes__.touchdown(t)}function d(t){t.preventDefault()}l.prototype.subscribe=function(t){this.fires.push(t),this.hasBinding=!!this.fires.find(function(t){return t.bindPx||t.bind}),this.hasBounds=!!this.fires.find(function(t){return null!=t.maxX||null!=t.maxY||null!=t.minX||null!=t.minY})},l.prototype.unsubscribe=function(t){this.fires=this.fires.filter(function(e){return e.fire!==t}),this.fires.length||this.teardown(),this.hasBinding=!!this.fires.find(function(t){return t.bindPx||t.bind}),this.hasBounds=!!this.fires.find(function(t){return null!=t.maxX||null!=t.maxY||null!=t.minX||null!=t.minY})},l.prototype.bind=function(){"ontouchstart"in window?(this.context.listen("mousedown",o),this.context.listen("dragstart",d),this.context.listen("touchstart",h,{passive:!1})):window.PointerEvent||window.navigator.pointerEnabled?this.context.listen("pointerdown",o,{passive:!1}):window.navigator.msPointerEnabled?this.context.listen("MSPointerDown",o):(this.context.listen("mousedown",o),this.context.listen("dragstart",d),this.context.listen("touchstart",h,{passive:!1}))},l.prototype.fire=function(t,e,i,r,s,l){var o,h=this,d=this.node;return this.fires.forEach(function(f){if(f.active){var a=l<f.flick?r-e+f.flick/l*(r-e):r-e,c=l<f.flick?s-i+f.flick/l*(s-i):s-i,u=n(f.threshold<=0?Math.max(a,c):f.threshold<1?"right"===f.direction||"left"===f.direction?f.threshold*a:f.threshold*c:f.threshold),p=f.bindPx,m=f.bind;a>0&&"right"===f.direction&&a>=f.distance&&n(c)<=u?(f.fire({node:d,event:t}),o=!0):a<0&&"left"===f.direction&&-a>=f.distance&&n(c)<=u&&(f.fire({node:d,event:t}),o=!0),c>0&&"down"===f.direction&&c>=f.distance&&n(a)<=u?(f.fire({node:d,event:t}),o=!0):c<0&&"up"===f.direction&&-c>=f.distance&&n(a)<=u&&(f.fire({node:d,event:t}),o=!0),p&&h.context.set(p,0),m&&h.context.set(m,0)}else f.active=!0}),o},l.prototype.checkBounds=function(t,e){var n=this.node.getBoundingClientRect(),i=t-n.x,r=e-n.y;return this.fires.forEach(function(t){var e=t.maxX,s=t.maxY,l=t.minX,o=t.minY;e>0&&i>e?t.active=!1:e<0&&i>n.width+e?t.active=!1:s>0&&r>s?t.active=!1:s<0&&r>n.height+s?t.active=!1:l>0&&i<l?t.active=!1:l<0&&i<n.width+l?t.active=!1:o>0&&r<o?t.active=!1:o<0&&r<n.width+o?t.active=!1:t.active=!0}),!!this.fires.find(function(t){return t.active})},l.prototype.updateBindings=function(t,e,i,r){var s=this;this.fires.forEach(function(l){if(l.active&&(l.bindPx||l.bind)){var o=l.bindPx,h=l.bind,d=i-t,f=r-e,a=n(l.threshold<=0?Math.max(d,f):l.threshold<1?"right"===l.direction||"left"===l.direction?l.threshold*d:l.threshold*f:l.threshold);o&&("left"===l.direction?s.context.set(o,d<0&&n(f)<=a?-d:0):"right"===l.direction?s.context.set(o,d>0&&n(f)<=a?d:0):"up"===l.direction?s.context.set(o,f<0&&n(d)<=a?-f:0):"down"===l.direction&&s.context.set(o,f>0&&n(d)<=a?f:0)),h&&("left"===l.direction?s.context.set(h,d<0&&n(f)<=a?-d/l.distance*100:0):"right"===l.direction?s.context.set(h,d>0&&n(f)<=a?d/l.distance*100:0):"up"===l.direction?s.context.set(h,f<0&&n(d)<=a?-f/l.distance*100:0):"down"===l.direction&&s.context.set(h,f>0&&n(d)<=a?f/l.distance*100:0))}})},l.prototype.mousedown=function(t){var e=this;if(!this.preventMousedownEvents&&(void 0===t.which||1===t.which)){var n=new Date,i=t.clientX,r=t.clientY;if(!this.hasBounds||this.checkBounds(i,r)){var s=t.pointerId,l=function(t){e.fire(t,i,r,t.clientX,t.clientY,new Date-n)&&!1!==t.cancelable&&t.preventDefault(),h()},o=function(t){t.pointerId==s&&e.hasBinding&&e.updateBindings(i,r,t.clientX,t.clientY)},h=function(){e.node.removeEventListener("MSPointerUp",l,!1),document.removeEventListener("MSPointerMove",o,!1),document.removeEventListener("MSPointerCancel",h,!1),document.removeEventListener("pointerup",l,!1),document.removeEventListener("pointermove",o,!1),document.removeEventListener("pointercancel",h,!1),document.removeEventListener("mouseup",l,!1),document.removeEventListener("click",l,!1),document.removeEventListener("mousemove",o,!1)};window.PointerEvent||window.navigator.pointerEnabled?(document.addEventListener("pointerup",l,!1),document.addEventListener("pointermove",o,!1),document.addEventListener("pointercancel",h,!1)):window.navigator.msPointerEnabled?(document.addEventListener("MSPointerUp",l,!1),document.addEventListener("MSPointerMove",o,!1),document.addEventListener("MSPointerCancel",h,!1)):(document.addEventListener("mouseup",l,!1),document.addEventListener("click",l,!1),document.addEventListener("mousemove",o,!1))}}},l.prototype.touchdown=function(t){var e=this,i=t.touches[0],r=new Date,s=i.clientX,l=i.clientY;if(!this.hasBounds||this.checkBounds(s,l)){var o=i.identifier,h=function(t){var n=t.changedTouches[0];n.identifier===o?(e.preventMousedownEvents=!0,clearTimeout(e.preventMousedownTimeout),e.preventMousedownTimeout=setTimeout(function(){e.preventMousedownEvents=!1},400),e.fire(t,s,l,n.clientX,n.clientY,new Date-r)&&!1!==t.cancelable&&t.preventDefault(),f()):f()},d=function(t){1===t.touches.length&&t.touches[0].identifier===o||f();var i=t.touches[0];if(t.cancelable){var r=i.clientX-s,h=i.clientY-l;n(r)>n(h)&&(r>0&&e.fires.find(function(t){return"right"===t.direction})&&t.preventDefault(),r<0&&e.fires.find(function(t){return"left"===t.direction})&&t.preventDefault())}e.hasBinding&&e.updateBindings(s,l,i.clientX,i.clientY)},f=function(){e.node.removeEventListener("touchend",h,!1),window.removeEventListener("touchmove",d,{passive:!1,capture:!1}),window.removeEventListener("touchcancel",f,!1)};this.node.addEventListener("touchend",h,!1),window.addEventListener("touchmove",d,{passive:!1,capture:!1}),window.addEventListener("touchcancel",f,!1)}},l.prototype.teardown=function(){var t=this.context;t.unlisten("pointerdown",o),t.unlisten("MSPointerDown",o),t.unlisten("mousedown",o),t.unlisten("touchstart",h),t.unlisten("dragstart",d),delete this.node.__r_swipes__};var f="undefined"!=typeof window?window:null;var a=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.adaptSize=function(t){t?(this._media&&this._media.cancel(),p(this)):this._media&&this._media.fn()},e.prototype.sizeInPx=function(t){return this.sizer?(this.sizer.style.width="number"==typeof t?t+"px":t,this.sizer.clientWidth):160},e.prototype.relativeSize=function(t,e){return void 0===e&&(e="1em"),this.sizer?this.sizeInPx(t)/this.sizeInPx(e):10},e}(e);e.extendWith(a,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell",g:1},{t:16,r:"extra-attributes"},{n:"tracked",t:71,f:{r:[],s:'["outer"]'}},{n:"class-rshell-left-popped",t:13,f:[{t:2,r:".leftPop"}]},{n:"class-rshell-right-popped",t:13,f:[{t:2,r:".rightPop"}]},{n:"class-rshell-top-popped",t:13,f:[{t:2,r:".topPop"}]},{n:"class-rshell-bottom-popped",t:13,f:[{t:2,r:".bottomPop"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-sizer",g:1},{n:"tracked",t:71,f:{r:[],s:'["sizer"]'}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-main",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-top",g:1},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/topOverflow"}]},{t:4,f:[{t:16,r:"._topA"}],n:50,r:"._topA"}],f:[{t:16,r:"._top"}]}],n:50,r:"._top"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-middle",g:1},{n:"class-rshell-has-left",t:13,f:[{t:2,x:{r:["._left","._leftOver",".leftOver"],s:"_0&&!_1&&!_2"}}]},{n:"class-rshell-has-right",t:13,f:[{t:2,x:{r:["._right","._rightOver",".rightOver"],s:"_0&&!_1&&!_2"}}]},{n:"class-rshell-left-hidden",t:13,f:[{t:2,r:".leftHidden"}]},{n:"class-rshell-right-hidden",t:13,f:[{t:2,r:".rightHidden"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-modal",g:1},{n:"class-rshell-blocked",t:13,f:[{t:2,x:{r:[".blocked",".blockableLeft",".leftPull",".blockableRight",".rightPull"],s:"_0||(_1&&_2)||(_3&&_4)"}}]},{n:["click"],t:70,f:{r:["@this",".leftOver","._leftOver",".leftHidden",".rightOver","._rightOver",".rightHidden"],s:"[_0.set({leftHidden:_1||_2?true:_3,rightHidden:_4||_5?true:_6})]"}},{t:4,f:[{n:["swipeleft"],t:70,a:{r:[],s:'[{bind:".leftPush"}]'},f:{r:["@this"],s:'[_0.set("leftHidden",true)]'}},{n:["swiperight"],t:70,a:{r:[],s:'[{bind:".rightPush"}]'},f:{r:["@this"],s:'[_0.set("rightHidden",true)]'}}],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-opacity",f:[{t:2,x:{r:[".leftPull",".rightPull"],s:"Math.min(_0||_1,100)/200"}}],t:13}],n:50,x:{r:[".leftPull",".rightPull"],s:"_0||_1"}}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-left",g:1},{n:"tracked",t:71,f:{r:[],s:'["left"]'}},{t:4,f:[{t:16,r:"._leftA"}],n:50,r:"._leftA"},{t:4,f:[{n:["swipeleft"],t:70,a:{r:[],s:'[{bind:".leftPush"}]'},f:{r:["@this"],s:'[_0.set("leftHidden",true)]'}}],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(-",{t:2,x:{r:[".leftPull"],s:"100-(_0>100?100:_0)"}},"%)"],t:13}],n:50,r:".leftPull"},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(-",{t:2,x:{r:[".leftPush"],s:"_0>100?100:_0"}},"%)"],t:13}],n:50,r:".leftPush"},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/leftOverflow"}]}],f:[{t:16,r:"._left"}]}],n:50,r:"._left"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-center",g:1},{n:"tracked",t:71,f:{r:[],s:'["center"]'}},{t:4,f:[{t:16,r:"._centerA"}],n:50,r:"._centerA"},{t:4,f:[" ",{t:4,f:[{n:["swiperight"],t:70,a:{r:[],s:'[{maxX:80,bind:".leftPull"}]'},f:{r:["@this"],s:'[_0.set("leftHidden",false)]'}}],n:50,x:{r:["._left",".leftHidden"],s:"_0&&_1"}}," ",{t:4,f:[{n:["swipeleft"],t:70,a:{r:[],s:'[{minX:-80,bind:".rightPull"}]'},f:{r:["@this"],s:'[_0.set("rightHidden",false)]'}}],n:50,x:{r:["._right",".rightHidden"],s:"_0&&_1"}}," "],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/centerOverflow"}]}],f:[{t:16,r:"._center"}]}],n:50,r:"._center"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-right",g:1},{n:"tracked",t:71,f:{r:[],s:'["right"]'}},{t:4,f:[{t:16,r:"._rightA"}],n:50,r:"._rightA"},{t:4,f:[{n:["swiperight"],t:70,a:{r:[],s:'[{bind:".rightPush"}]'},f:{r:["@this"],s:'[_0.set("rightHidden",true)]'}}],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(",{t:2,x:{r:[".rightPull"],s:"100-(_0>100?100:_0)"}},"%)"],t:13}],n:50,r:".rightPull"},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(",{t:2,x:{r:[".rightPush"],s:"_0>100?100:_0"}},"%)"],t:13}],n:50,r:".rightPush"},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/rightOverflow"}]}],f:[{t:16,r:"._right"}]}],n:50,r:"._right"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-bottom",g:1},{t:4,f:[{t:16,r:"._bottomA"}],n:50,r:"._bottomA"},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/bottomOverflow"}]}],f:[{t:16,r:"._bottom"}]}],n:50,r:"._bottom"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-left-pop",g:1},{t:4,f:[{t:16,r:"._leftPopA"}],n:50,r:"._leftPopA"}],f:[{t:16,r:"._leftPop"}]}],n:50,r:"._leftPop"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-right-pop",g:1},{t:4,f:[{t:16,r:"._rightPopA"}],n:50,r:"._rightPopA"}],f:[{t:16,r:"._rightPop"}]}],n:50,r:"._rightPop"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-bottom-pop",g:1},{t:4,f:[{t:16,r:"._bottomPopA"}],n:50,r:"._bottomPopA"}],f:[{t:16,r:"._bottomPop"}]}],n:50,r:"._bottomPop"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-top-pop",g:1},{t:4,f:[{t:16,r:"._topPopA"}],n:50,r:"._topPopA"}],f:[{t:16,r:"._topPop"}]}],n:50,r:"._topPop"}]}],e:{'["outer"]':function(){return["outer"]},'["sizer"]':function(){return["sizer"]},"_0&&!_1&&!_2":function(t,e,n){return t&&!e&&!n},"_0||(_1&&_2)||(_3&&_4)":function(t,e,n,i,r){return t||e&&n||i&&r},"[_0.set({leftHidden:_1||_2?true:_3,rightHidden:_4||_5?true:_6})]":function(t,e,n,i,r,s,l){return[t.set({leftHidden:!(!e&&!n)||i,rightHidden:!(!r&&!s)||l})]},'[{bind:".leftPush"}]':function(){return[{bind:".leftPush"}]},'[_0.set("leftHidden",true)]':function(t){return[t.set("leftHidden",!0)]},'[{bind:".rightPush"}]':function(){return[{bind:".rightPush"}]},'[_0.set("rightHidden",true)]':function(t){return[t.set("rightHidden",!0)]},'"side-swipe"':function(){return"side-swipe"},"Math.min(_0||_1,100)/200":function(t,e){return Math.min(t||e,100)/200},"_0||_1":function(t,e){return t||e},'["left"]':function(){return["left"]},"100-(_0>100?100:_0)":function(t){return 100-(t>100?100:t)},"_0>100?100:_0":function(t){return t>100?100:t},'["center"]':function(){return["center"]},'[{maxX:80,bind:".leftPull"}]':function(){return[{maxX:80,bind:".leftPull"}]},'[_0.set("leftHidden",false)]':function(t){return[t.set("leftHidden",!1)]},"_0&&_1":function(t,e){return t&&e},'[{minX:-80,bind:".rightPull"}]':function(){return[{minX:-80,bind:".rightPull"}]},'[_0.set("rightHidden",false)]':function(t){return[t.set("rightHidden",!1)]},'["right"]':function(){return["right"]}}},css:function(t){return[function(t){var e=t("raui.shell.left.width")||t("raui.menu.width")||"18em",n=t("raui.shell.right.width")||t("raui.menu.width")||"18em",i=Object.assign({},t("raui.primary"),t("raui.shell.primary"));return"\n .rshell {\n width: 100%;\n height: 100%;\n position: absolute;\n overflow: hidden;\n }\n .rshell-sizer {\n position: absolute;\n }\n .rshell-modal {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n background-color: #000;\n z-index: -1;\n transition: opacity "+(t("raui.shell.slide.ms")||400)+"ms ease-in-out, z-index 0s linear "+(t("raui.shell.slide.ms")||400)+"ms;\n }\n .rshell-modal.rshell-blocked {\n opacity: 0.5;\n z-index: 3;\n transition: opacity "+(t("raui.shell.slide.ms")||400)+"ms ease-in-out, z-index 0s linear;\n }\n .rshell-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n z-index: 1;\n }\n \n .rshell-middle {\n flex-grow: 1;\n position: relative;\n }\n \n .rshell-left, .rshell-right {\n position: absolute;\n top: 0;\n box-sizing: border-box;\n height: 100%;\n overflow: auto;\n z-index: 4;\n background-color: "+(i.bg||"inherit")+";\n transition: transform "+(t("raui.shell.slide.ms")||400)+"ms ease-in-out;\n }\n .rshell-left {\n left: 0;\n width: "+e+";\n }\n .rshell-right {\n right: 0;\n width: "+n+";\n }\n .rshell-left-hidden > .rshell-left {\n transform: translateX(-100%);\n }\n .rshell-right-hidden > .rshell-right {\n transform: translateX(100%);\n }\n .rshell-has-right > .rshell-right,\n .rshell-has-left > .rshell-left {\n z-index: 2;\n }\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-right {\n z-index: 2;\n }\n \n .rshell-left-pop, .rshell-right-pop, .rshell-top-pop, .rshell-bottom-pop {\n z-index: 5;\n transition: transform "+(t("raui.shell.slide.ms")||400)+"ms ease-in-out;\n position: absolute;\n }\n .rshell-left-pop, .rshell-right-pop {\n top: 0;\n bottom: 0;\n max-width: 100%;\n overflow: auto;\n }\n .rshell-top-pop, .rshell-bottom-pop {\n left: 0;\n right: 0;\n max-height: 100%;\n overflow: auto;\n }\n \n .rshell-left-pop {\n transform: translateX(-100%);\n }\n .rshell-right-pop {\n transform: translateX(100%);\n right: 0;\n }\n .rshell-top-pop {\n top: 0;\n transform: translateY(-100%);\n }\n .rshell-bottom-pop {\n bottom: 0;\n transform: translateY(100%);\n }\n \n .rshell-left-popped > .rshell-left-pop,\n .rshell-right-popped > .rshell-right-pop,\n .rshell-top-popped > .rshell-top-pop,\n .rshell-bottom-popped > .rshell-bottom-pop {\n transform: none;\n }\n \n .rshell-center {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n box-sizing: border-box;\n transition: left "+(t("raui.shell.slide.ms")||400)+"ms ease-in-out, width "+(t("raui.shell.slide.ms")||400)+"ms ease-in-out;\n height: 100%;\n width: 100%;\n flex-grow: 1;\n overflow: auto;\n }\n .rshell-has-left > .rshell-center {\n width: calc(100% - "+e+");\n left: "+e+";\n }\n .rshell-has-right > .rshell-center {\n width: calc(100% - "+n+");\n left: 0;\n }\n .rshell-has-left.rshell-has-right > .rshell-center {\n width: calc(100% - "+e+" - "+n+");\n left: "+e+";\n }\n .rshell-has-left.rshell-left-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n .rshell-has-right.rshell-right-hidden > .rshell-center {\n width: 100%;\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden > .rshell-center {\n width: calc(100% - "+n+");\n left: 0;\n }\n .rshell-has-left.rshell-has-right.rshell-right-hidden > .rshell-center {\n width: calc(100% - "+e+");\n left: "+e+";\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden.rshell-right-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n \n .rshell-overflow {\n overflow: visible;\n }\n "}.call(this,t)].join(" ")},attributes:["adaptive","side-swipe"],use:[r,s],decorators:{tracked:function(t,e){return this[e]=t,{teardown:function(){this[e]=void 0}}}},cssId:"rshell",noCssTransform:!0,computed:{blockableLeft:function(){return this.get("_left")&&(this.get("leftOver")||this.get("_leftOver"))},blockableRight:function(){return this.get("_right")&&(this.get("rightOver")||this.get("_rightOver"))},blocked:function(){return this.get("blockableLeft")&&!this.get("leftHidden")||this.get("blockableRight")&&!this.get("rightHidden")||this.get("leftPop")||this.get("rightPop")||this.get("topPop")||this.get("bottomPop")}},on:{construct:function(){var t=this.component;if(!t)return;var e=t.template.f||[],n=t.template.m?t.template.m.slice():[],i=t.template;t.template={e:i.e,f:i.f,t:i.t,m:n};var r={};e.forEach(function(t){if(~c.indexOf(t.e)){var e="left-pop"===t.e?"leftPop":"right-pop"===t.e?"rightPop":"top-pop"===t.e?"topPop":"bottom-pop"===t.e?"bottomPop":t.e;if(r["_"+e]={t:t.f},t.m){var i=t.m.filter(function(t){return!~u.indexOf(t.n)});if(i.length&&(r["_"+e+"A"]={t:i}),i.length!==t.m.length){var s=t.m.find(function(t){return"hidden"===t.n});s&&n.push({t:13,n:e+"Hidden",f:s.f}),(s=t.m.find(function(t){return"over"===t.n}))&&n.push({t:13,n:e+"Over",f:s.f}),(s=t.m.find(function(t){return"primary"===t.n}))&&n.push({t:13,n:"_"+e+"Primary",f:s.f}),~t.e.indexOf("-pop")&&(s=t.m.find(function(t){return"popped"===t.n}))&&n.push({t:13,n:e,f:s.f}),(s=t.m.find(function(t){return"overflow"===t.n}))&&n.push({t:13,n:e+"Overflow",f:s.f}),(s=("left"===t.e||"right"===t.e)&&t.m.find(function(t){return"forced"===t.n}))&&n.push({t:13,n:"_"+e+"Over",f:s.f})}}}}),this._items=r},config:function(){this._items&&this.set(this._items)},init:function(){var t=this;this.get("@style.shell.sides.initialTimeout")&&(this.get("rightOver")||this.get("leftOver"))?setTimeout(function(){t.get("rightOver")&&t.set("rightHidden",!0),t.get("leftOver")&&t.set("leftHidden",!0)},this.get("@style.shell.sides.initialTimeout")||1500):(this.get("rightOver")&&this.set("rightHidden",!0),this.get("leftOver")&&this.set("leftHidden",!0))},complete:function(){p(this)},unrender:function(){this._media&&this._media.cancel()}},observe:{"leftHidden rightHidden":{handler:function(t,e,n){var i=this;(~n.indexOf("left")&&!this.get("leftOver")&&!this.get("_leftOver")||~n.indexOf("right")&&!this.get("rightOver")&&!this.get("_rightOver"))&&setTimeout(function(){i._media&&i._media.listener&&i._media.listener.silence(),i._media&&i._media.observer&&i._media.observer.silence(),i.fire("resize"),i._media&&i._media.listener&&i._media.listener.resume(),i._media&&i._media.observer&&i._media.observer.resume()},(this.get("shell.slide.ms")||400)+10)},defer:!0,init:!1}}});var c=["top","bottom","center","left","right","left-pop","right-pop","top-pop","bottom-pop"],u=["hidden","primary","over","popped","overflow","forced"];function p(t){if("undefined"!=typeof window&&(t.left||t.right)){if(t._media)return t._media.fn;var e,n=0,i={fn:function(){var r=t.relativeSize("100%");if(i.last!==r){i.last=r;var s={left:!t.get("leftOver")&&t.left&&t.left.clientWidth||0,right:!t.get("rightOver")&&t.right&&t.right.clientWidth||0};s.left&&(s.left=t.relativeSize(s.left)),s.right&&(s.right=t.relativeSize(s.right));var l=t.get("_rightPrimary")?"right":"left",o="right"===l?"left":"right",h=t.relativeSize(t.get("@style.break.medium")||"60rem","1rem"),d={_leftOver:!1,_rightOver:!1},f={leftHidden:t.get("leftOver"),rightHidden:t.get("rightOver")};n||(d.leftHidden=!1,d.rightHidden=!1);var a=r-s.left-s.right;a<=h&&(a+=s[o],f[o+"Hidden"]=!0,d["_"+o+"Over"]=!0,a<=h&&(f[l+"Hidden"]=!0,d["_"+l+"Over"]=!0)),t.set(d),n?2===n&&t.set(f):(n=1,setTimeout(function(){n=2,t.set(f)},t.get("@style.shell.sides.initialTimeout")||1500)),e&&clearTimeout(e),e=setTimeout(function(){i.listener&&i.listener.silence(),t.fire("resize"),i.listener&&i.listener.resume(),e=0},(t.get("shell.slide.ms")||400)+100)}},cancel:function(){t._media=null,window.removeEventListener("resize",i.fn),i.observer&&i.observer.cancel(),i.listener&&i.listener.cancel()}};window.addEventListener("resize",i.fn),i.observer=t.observe("@style leftOver rightOver _leftPrimary _rightPrimary",i.fn,{init:!1}),t.get("adaptive")&&(i.listener=t.root.on("*.resize",i.fn)),t._media=i,t._media.fn()}}function m(t){return void 0===t&&(t={}),function(e){e.instance.components[t.name||"shell"]=a}}!function(t,e,n){if(f&&f.Ractive&&"object"==typeof f.Ractive[e]){var i=document.currentScript;if(i||(i=(i=document.querySelectorAll("script"))[i.length-1]),i){var r=i.getAttribute("data-alias");r&&(r=(r=r.split("&")).reduce(function(t,e){var n=e.split("="),i=n[0],r=n[1];return t[i]=r,t},{})),Ractive[e][r&&r[t]||t]=n}}}("RMShell","components",a),t.Shell=a,t.plugin=m,t.default=m,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],e):e(t.RMShell={},t.Ractive)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n=Math.abs;function i(t){var e=Object.assign({},{distance:150,flick:200,threshold:.2},t);return function(n){var i=n.Ractive;n.instance.events[t.name||"swipe"+(t.direction||"")]=function(t,n,r){var s;void 0===r&&(r={});var o=Object.assign({},{direction:"right"},e,r);return o.fire=n,(s=t.__r_swipes__)?s.subscribe(o):(s=new l(i.getContext(t)),t.__r_swipes__=s,s.subscribe(o)),{teardown:function(){s.unsubscribe(n)}}}}}var r=i({direction:"left"}),s=i({direction:"right"}),l=(i({direction:"up"}),i({direction:"down"}),function(t){this.context=t,this.node=t.node,this.fires=[],this.bind()});function o(t){return this.__r_swipes__.mousedown(t)}function h(t){return this.__r_swipes__.touchdown(t)}function d(t){t.preventDefault()}l.prototype.subscribe=function(t){this.fires.push(t),this.hasBinding=!!this.fires.find(function(t){return t.bindPx||t.bind}),this.hasBounds=!!this.fires.find(function(t){return null!=t.maxX||null!=t.maxY||null!=t.minX||null!=t.minY})},l.prototype.unsubscribe=function(t){this.fires=this.fires.filter(function(e){return e.fire!==t}),this.fires.length||this.teardown(),this.hasBinding=!!this.fires.find(function(t){return t.bindPx||t.bind}),this.hasBounds=!!this.fires.find(function(t){return null!=t.maxX||null!=t.maxY||null!=t.minX||null!=t.minY})},l.prototype.bind=function(){"ontouchstart"in window?(this.context.listen("mousedown",o),this.context.listen("dragstart",d),this.context.listen("touchstart",h,{passive:!1})):window.PointerEvent||window.navigator.pointerEnabled?this.context.listen("pointerdown",o,{passive:!1}):window.navigator.msPointerEnabled?this.context.listen("MSPointerDown",o):(this.context.listen("mousedown",o),this.context.listen("dragstart",d),this.context.listen("touchstart",h,{passive:!1}))},l.prototype.fire=function(t,e,i,r,s,l){var o,h=this,d=this.node;return this.fires.forEach(function(f){if(f.active){var a=l<f.flick?r-e+f.flick/l*(r-e):r-e,c=l<f.flick?s-i+f.flick/l*(s-i):s-i,u=n(f.threshold<=0?Math.max(a,c):f.threshold<1?"right"===f.direction||"left"===f.direction?f.threshold*a:f.threshold*c:f.threshold),p=f.bindPx,m=f.bind;a>0&&"right"===f.direction&&a>=f.distance&&n(c)<=u?(f.fire({node:d,event:t}),o=!0):a<0&&"left"===f.direction&&-a>=f.distance&&n(c)<=u&&(f.fire({node:d,event:t}),o=!0),c>0&&"down"===f.direction&&c>=f.distance&&n(a)<=u?(f.fire({node:d,event:t}),o=!0):c<0&&"up"===f.direction&&-c>=f.distance&&n(a)<=u&&(f.fire({node:d,event:t}),o=!0),p&&h.context.set(p,0),m&&h.context.set(m,0)}else f.active=!0}),o},l.prototype.checkBounds=function(t,e){var n=this.node.getBoundingClientRect(),i=t-n.x,r=e-n.y;return this.fires.forEach(function(t){var e=t.maxX,s=t.maxY,l=t.minX,o=t.minY;e>0&&i>e?t.active=!1:e<0&&i>n.width+e?t.active=!1:s>0&&r>s?t.active=!1:s<0&&r>n.height+s?t.active=!1:l>0&&i<l?t.active=!1:l<0&&i<n.width+l?t.active=!1:o>0&&r<o?t.active=!1:o<0&&r<n.width+o?t.active=!1:t.active=!0}),!!this.fires.find(function(t){return t.active})},l.prototype.updateBindings=function(t,e,i,r){var s=this;this.fires.forEach(function(l){if(l.active&&(l.bindPx||l.bind)){var o=l.bindPx,h=l.bind,d=i-t,f=r-e,a=n(l.threshold<=0?Math.max(d,f):l.threshold<1?"right"===l.direction||"left"===l.direction?l.threshold*d:l.threshold*f:l.threshold);o&&("left"===l.direction?s.context.set(o,d<0&&n(f)<=a?-d:0):"right"===l.direction?s.context.set(o,d>0&&n(f)<=a?d:0):"up"===l.direction?s.context.set(o,f<0&&n(d)<=a?-f:0):"down"===l.direction&&s.context.set(o,f>0&&n(d)<=a?f:0)),h&&("left"===l.direction?s.context.set(h,d<0&&n(f)<=a?-d/l.distance*100:0):"right"===l.direction?s.context.set(h,d>0&&n(f)<=a?d/l.distance*100:0):"up"===l.direction?s.context.set(h,f<0&&n(d)<=a?-f/l.distance*100:0):"down"===l.direction&&s.context.set(h,f>0&&n(d)<=a?f/l.distance*100:0))}})},l.prototype.mousedown=function(t){var e=this;if(!this.preventMousedownEvents&&(void 0===t.which||1===t.which)){var n=new Date,i=t.clientX,r=t.clientY;if(!this.hasBounds||this.checkBounds(i,r)){var s=t.pointerId,l=function(t){e.fire(t,i,r,t.clientX,t.clientY,new Date-n)&&!1!==t.cancelable&&t.preventDefault(),h()},o=function(t){t.pointerId==s&&e.hasBinding&&e.updateBindings(i,r,t.clientX,t.clientY)},h=function(){e.node.removeEventListener("MSPointerUp",l,!1),document.removeEventListener("MSPointerMove",o,!1),document.removeEventListener("MSPointerCancel",h,!1),document.removeEventListener("pointerup",l,!1),document.removeEventListener("pointermove",o,!1),document.removeEventListener("pointercancel",h,!1),document.removeEventListener("mouseup",l,!1),document.removeEventListener("click",l,!1),document.removeEventListener("mousemove",o,!1)};window.PointerEvent||window.navigator.pointerEnabled?(document.addEventListener("pointerup",l,!1),document.addEventListener("pointermove",o,!1),document.addEventListener("pointercancel",h,!1)):window.navigator.msPointerEnabled?(document.addEventListener("MSPointerUp",l,!1),document.addEventListener("MSPointerMove",o,!1),document.addEventListener("MSPointerCancel",h,!1)):(document.addEventListener("mouseup",l,!1),document.addEventListener("click",l,!1),document.addEventListener("mousemove",o,!1))}}},l.prototype.touchdown=function(t){var e=this,i=t.touches[0],r=new Date,s=i.clientX,l=i.clientY;if(!this.hasBounds||this.checkBounds(s,l)){var o=i.identifier,h=function(t){var n=t.changedTouches[0];n.identifier===o?(e.preventMousedownEvents=!0,clearTimeout(e.preventMousedownTimeout),e.preventMousedownTimeout=setTimeout(function(){e.preventMousedownEvents=!1},400),e.fire(t,s,l,n.clientX,n.clientY,new Date-r)&&!1!==t.cancelable&&t.preventDefault(),f()):f()},d=function(t){1===t.touches.length&&t.touches[0].identifier===o||f();var i=t.touches[0];if(t.cancelable){var r=i.clientX-s,h=i.clientY-l;n(r)>n(h)&&(r>0&&e.fires.find(function(t){return"right"===t.direction})&&t.preventDefault(),r<0&&e.fires.find(function(t){return"left"===t.direction})&&t.preventDefault())}e.hasBinding&&e.updateBindings(s,l,i.clientX,i.clientY)},f=function(){e.node.removeEventListener("touchend",h,!1),window.removeEventListener("touchmove",d,{passive:!1,capture:!1}),window.removeEventListener("touchcancel",f,!1)};this.node.addEventListener("touchend",h,!1),window.addEventListener("touchmove",d,{passive:!1,capture:!1}),window.addEventListener("touchcancel",f,!1)}},l.prototype.teardown=function(){var t=this.context;t.unlisten("pointerdown",o),t.unlisten("MSPointerDown",o),t.unlisten("mousedown",o),t.unlisten("touchstart",h),t.unlisten("dragstart",d),delete this.node.__r_swipes__};var f="undefined"!=typeof window?window:null;var a=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.adaptSize=function(t){t?(this._media&&this._media.cancel(),p(this)):this._media&&this._media.fn()},e.prototype.sizeInPx=function(t){return this.sizer?(this.sizer.style.width="number"==typeof t?t+"px":t,this.sizer.clientWidth):160},e.prototype.relativeSize=function(t,e){return void 0===e&&(e="1em"),this.sizer?this.sizeInPx(t)/this.sizeInPx(e):10},e}(e);e.extendWith(a,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell",g:1},{t:16,r:"extra-attributes"},{n:"tracked",t:71,f:{r:[],s:'["outer"]'}},{n:"class-rshell-left-popped",t:13,f:[{t:2,r:".leftPop"}]},{n:"class-rshell-right-popped",t:13,f:[{t:2,r:".rightPop"}]},{n:"class-rshell-top-popped",t:13,f:[{t:2,r:".topPop"}]},{n:"class-rshell-bottom-popped",t:13,f:[{t:2,r:".bottomPop"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-sizer",g:1},{n:"tracked",t:71,f:{r:[],s:'["sizer"]'}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-main",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-top",g:1},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/topOverflow"}]},{t:4,f:[{t:16,r:"._topA"}],n:50,r:"._topA"}],f:[{t:16,r:"._top"}]}],n:50,r:"._top"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-middle",g:1},{n:"class-rshell-has-left",t:13,f:[{t:2,x:{r:["._left","._leftOver",".leftOver"],s:"_0&&!_1&&!_2"}}]},{n:"class-rshell-has-right",t:13,f:[{t:2,x:{r:["._right","._rightOver",".rightOver"],s:"_0&&!_1&&!_2"}}]},{n:"class-rshell-left-hidden",t:13,f:[{t:2,r:".leftHidden"}]},{n:"class-rshell-right-hidden",t:13,f:[{t:2,r:".rightHidden"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-modal",g:1},{n:"class-rshell-blocked",t:13,f:[{t:2,x:{r:[".blocked",".blockableLeft",".leftPull",".blockableRight",".rightPull"],s:"_0||(_1&&_2)||(_3&&_4)"}}]},{n:["click"],t:70,f:{r:["@this",".leftOver","._leftOver",".leftHidden",".rightOver","._rightOver",".rightHidden"],s:"[_0.set({leftHidden:_1||_2?true:_3,rightHidden:_4||_5?true:_6})]"}},{t:4,f:[{n:["swipeleft"],t:70,a:{r:[],s:'[{bind:".leftPush"}]'},f:{r:["@this"],s:'[_0.set("leftHidden",true)]'}},{n:["swiperight"],t:70,a:{r:[],s:'[{bind:".rightPush"}]'},f:{r:["@this"],s:'[_0.set("rightHidden",true)]'}}],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-opacity",f:[{t:2,x:{r:[".leftPull",".rightPull"],s:"Math.min(_0||_1,100)/200"}}],t:13}],n:50,x:{r:[".leftPull",".rightPull"],s:"_0||_1"}}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-left",g:1},{n:"tracked",t:71,f:{r:[],s:'["left"]'}},{t:4,f:[{t:16,r:"._leftA"}],n:50,r:"._leftA"},{t:4,f:[{n:["swipeleft"],t:70,a:{r:[],s:'[{bind:".leftPush"}]'},f:{r:["@this"],s:'[_0.set("leftHidden",true)]'}}],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(-",{t:2,x:{r:[".leftPull"],s:"100-(_0>100?100:_0)"}},"%)"],t:13}],n:50,r:".leftPull"},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(-",{t:2,x:{r:[".leftPush"],s:"_0>100?100:_0"}},"%)"],t:13}],n:50,r:".leftPush"},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/leftOverflow"}]}],f:[{t:16,r:"._left"}]}],n:50,r:"._left"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-center",g:1},{n:"tracked",t:71,f:{r:[],s:'["center"]'}},{t:4,f:[{t:16,r:"._centerA"}],n:50,r:"._centerA"},{t:4,f:[" ",{t:4,f:[{n:["swiperight"],t:70,a:{r:[],s:'[{maxX:80,bind:".leftPull"}]'},f:{r:["@this"],s:'[_0.set("leftHidden",false)]'}}],n:50,x:{r:["._left",".leftHidden"],s:"_0&&_1"}}," ",{t:4,f:[{n:["swipeleft"],t:70,a:{r:[],s:'[{minX:-80,bind:".rightPull"}]'},f:{r:["@this"],s:'[_0.set("rightHidden",false)]'}}],n:50,x:{r:["._right",".rightHidden"],s:"_0&&_1"}}," "],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/centerOverflow"}]}],f:[{t:16,r:"._center"}]}],n:50,r:"._center"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-right",g:1},{n:"tracked",t:71,f:{r:[],s:'["right"]'}},{t:4,f:[{t:16,r:"._rightA"}],n:50,r:"._rightA"},{t:4,f:[{n:["swiperight"],t:70,a:{r:[],s:'[{bind:".rightPush"}]'},f:{r:["@this"],s:'[_0.set("rightHidden",true)]'}}],n:50,rx:{r:"~/",m:[{r:[],s:'"side-swipe"'}]}},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(",{t:2,x:{r:[".rightPull"],s:"100-(_0>100?100:_0)"}},"%)"],t:13}],n:50,r:".rightPull"},{t:4,f:[{n:"style-transition",f:"none",t:13},{n:"style-transform",f:["translate(",{t:2,x:{r:[".rightPush"],s:"_0>100?100:_0"}},"%)"],t:13}],n:50,r:".rightPush"},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/rightOverflow"}]}],f:[{t:16,r:"._right"}]}],n:50,r:"._right"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-bottom",g:1},{t:4,f:[{t:16,r:"._bottomA"}],n:50,r:"._bottomA"},{n:"class-rshell-overflow",t:13,f:[{t:2,r:"~/bottomOverflow"}]}],f:[{t:16,r:"._bottom"}]}],n:50,r:"._bottom"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-left-pop",g:1},{t:4,f:[{t:16,r:"._leftPopA"}],n:50,r:"._leftPopA"}],f:[{t:16,r:"._leftPop"}]}],n:50,r:"._leftPop"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-right-pop",g:1},{t:4,f:[{t:16,r:"._rightPopA"}],n:50,r:"._rightPopA"}],f:[{t:16,r:"._rightPop"}]}],n:50,r:"._rightPop"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-bottom-pop",g:1},{t:4,f:[{t:16,r:"._bottomPopA"}],n:50,r:"._bottomPopA"}],f:[{t:16,r:"._bottomPop"}]}],n:50,r:"._bottomPop"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rshell-top-pop",g:1},{t:4,f:[{t:16,r:"._topPopA"}],n:50,r:"._topPopA"}],f:[{t:16,r:"._topPop"}]}],n:50,r:"._topPop"}]}],e:{'["outer"]':function(){return["outer"]},'["sizer"]':function(){return["sizer"]},"_0&&!_1&&!_2":function(t,e,n){return t&&!e&&!n},"_0||(_1&&_2)||(_3&&_4)":function(t,e,n,i,r){return t||e&&n||i&&r},"[_0.set({leftHidden:_1||_2?true:_3,rightHidden:_4||_5?true:_6})]":function(t,e,n,i,r,s,l){return[t.set({leftHidden:!(!e&&!n)||i,rightHidden:!(!r&&!s)||l})]},'[{bind:".leftPush"}]':function(){return[{bind:".leftPush"}]},'[_0.set("leftHidden",true)]':function(t){return[t.set("leftHidden",!0)]},'[{bind:".rightPush"}]':function(){return[{bind:".rightPush"}]},'[_0.set("rightHidden",true)]':function(t){return[t.set("rightHidden",!0)]},'"side-swipe"':function(){return"side-swipe"},"Math.min(_0||_1,100)/200":function(t,e){return Math.min(t||e,100)/200},"_0||_1":function(t,e){return t||e},'["left"]':function(){return["left"]},"100-(_0>100?100:_0)":function(t){return 100-(t>100?100:t)},"_0>100?100:_0":function(t){return t>100?100:t},'["center"]':function(){return["center"]},'[{maxX:80,bind:".leftPull"}]':function(){return[{maxX:80,bind:".leftPull"}]},'[_0.set("leftHidden",false)]':function(t){return[t.set("leftHidden",!1)]},"_0&&_1":function(t,e){return t&&e},'[{minX:-80,bind:".rightPull"}]':function(){return[{minX:-80,bind:".rightPull"}]},'[_0.set("rightHidden",false)]':function(t){return[t.set("rightHidden",!1)]},'["right"]':function(){return["right"]}}},css:function(t){return[function(t){var e=t("raui.shell.left.width")||t("raui.menu.width")||"18em",n=t("raui.shell.right.width")||t("raui.menu.width")||"18em",i=Object.assign({},t("raui.primary"),t("raui.shell.primary"));return"\n .rshell {\n width: 100%;\n height: 100%;\n position: absolute;\n overflow: hidden;\n }\n .rshell-sizer {\n position: absolute;\n }\n .rshell-modal {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n background-color: #000;\n z-index: -1;\n transition: opacity "+(t("raui.shell.slide.ms")||400)+"ms ease-in-out, z-index 0s linear "+(t("raui.shell.slide.ms")||400)+"ms;\n }\n .rshell-modal.rshell-blocked {\n opacity: 0.5;\n z-index: 3;\n transition: opacity "+(t("raui.shell.slide.ms")||400)+"ms ease-in-out, z-index 0s linear;\n }\n .rshell-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n z-index: 1;\n background-color: "+(i.bg||"inherit")+";\n }\n \n .rshell-middle {\n flex-grow: 1;\n position: relative;\n }\n \n .rshell-left, .rshell-right {\n position: absolute;\n top: 0;\n box-sizing: border-box;\n height: 100%;\n overflow: auto;\n z-index: 4;\n background-color: "+(i.bg||"inherit")+";\n transition: transform "+(t("raui.shell.slide.ms")||400)+"ms ease-in-out;\n }\n .rshell-left {\n left: 0;\n width: "+e+";\n }\n .rshell-right {\n right: 0;\n width: "+n+";\n }\n .rshell-left-hidden > .rshell-left {\n transform: translateX(-100%);\n }\n .rshell-right-hidden > .rshell-right {\n transform: translateX(100%);\n }\n .rshell-has-right > .rshell-right,\n .rshell-has-left > .rshell-left {\n z-index: 2;\n }\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-left-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-top-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-bottom-popped > .rshell-main > .rshell-middle > .rshell-right,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-left,\n .rshell-right-popped > .rshell-main > .rshell-middle > .rshell-right {\n z-index: 2;\n }\n \n .rshell-left-pop, .rshell-right-pop, .rshell-top-pop, .rshell-bottom-pop {\n z-index: 5;\n transition: transform "+(t("raui.shell.slide.ms")||400)+"ms ease-in-out;\n position: absolute;\n }\n .rshell-left-pop, .rshell-right-pop {\n top: 0;\n bottom: 0;\n max-width: 100%;\n overflow: auto;\n }\n .rshell-top-pop, .rshell-bottom-pop {\n left: 0;\n right: 0;\n max-height: 100%;\n overflow: auto;\n }\n \n .rshell-left-pop {\n transform: translateX(-100%);\n }\n .rshell-right-pop {\n transform: translateX(100%);\n right: 0;\n }\n .rshell-top-pop {\n top: 0;\n transform: translateY(-100%);\n }\n .rshell-bottom-pop {\n bottom: 0;\n transform: translateY(100%);\n }\n \n .rshell-left-popped > .rshell-left-pop,\n .rshell-right-popped > .rshell-right-pop,\n .rshell-top-popped > .rshell-top-pop,\n .rshell-bottom-popped > .rshell-bottom-pop {\n transform: none;\n }\n \n .rshell-center {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n flex-grow: 1;\n overflow: auto;\n }\n .rshell-has-left > .rshell-center {\n width: calc(100% - "+e+");\n left: "+e+";\n }\n .rshell-has-right > .rshell-center {\n width: calc(100% - "+n+");\n left: 0;\n }\n .rshell-has-left.rshell-has-right > .rshell-center {\n width: calc(100% - "+e+" - "+n+");\n left: "+e+";\n }\n .rshell-has-left.rshell-left-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n .rshell-has-right.rshell-right-hidden > .rshell-center {\n width: 100%;\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden > .rshell-center {\n width: calc(100% - "+n+");\n left: 0;\n }\n .rshell-has-left.rshell-has-right.rshell-right-hidden > .rshell-center {\n width: calc(100% - "+e+");\n left: "+e+";\n }\n .rshell-has-left.rshell-has-right.rshell-left-hidden.rshell-right-hidden > .rshell-center {\n width: 100%;\n left: 0;\n }\n \n .rshell-overflow {\n overflow: visible;\n }\n "}.call(this,t)].join(" ")},attributes:["adaptive","side-swipe"],use:[r,s],decorators:{tracked:function(t,e){return this[e]=t,{teardown:function(){this[e]=void 0}}}},cssId:"rshell",noCssTransform:!0,computed:{blockableLeft:function(){return this.get("_left")&&(this.get("leftOver")||this.get("_leftOver"))},blockableRight:function(){return this.get("_right")&&(this.get("rightOver")||this.get("_rightOver"))},blocked:function(){return this.get("blockableLeft")&&!this.get("leftHidden")||this.get("blockableRight")&&!this.get("rightHidden")||this.get("leftPop")||this.get("rightPop")||this.get("topPop")||this.get("bottomPop")}},on:{construct:function(){var t=this.component;if(!t)return;var e=t.template.f||[],n=t.template.m?t.template.m.slice():[],i=t.template;t.template={e:i.e,f:i.f,t:i.t,m:n};var r={};e.forEach(function(t){if(~c.indexOf(t.e)){var e="left-pop"===t.e?"leftPop":"right-pop"===t.e?"rightPop":"top-pop"===t.e?"topPop":"bottom-pop"===t.e?"bottomPop":t.e;if(r["_"+e]={t:t.f},t.m){var i=t.m.filter(function(t){return!~u.indexOf(t.n)});if(i.length&&(r["_"+e+"A"]={t:i}),i.length!==t.m.length){var s=t.m.find(function(t){return"hidden"===t.n});s&&n.push({t:13,n:e+"Hidden",f:s.f}),(s=t.m.find(function(t){return"over"===t.n}))&&n.push({t:13,n:e+"Over",f:s.f}),(s=t.m.find(function(t){return"primary"===t.n}))&&n.push({t:13,n:"_"+e+"Primary",f:s.f}),~t.e.indexOf("-pop")&&(s=t.m.find(function(t){return"popped"===t.n}))&&n.push({t:13,n:e,f:s.f}),(s=t.m.find(function(t){return"overflow"===t.n}))&&n.push({t:13,n:e+"Overflow",f:s.f}),(s=("left"===t.e||"right"===t.e)&&t.m.find(function(t){return"forced"===t.n}))&&n.push({t:13,n:"_"+e+"Over",f:s.f})}}}}),this._items=r},config:function(){this._items&&this.set(this._items)},init:function(){var t=this;this.get("@style.shell.sides.initialTimeout")&&(this.get("rightOver")||this.get("leftOver"))?setTimeout(function(){t.get("rightOver")&&t.set("rightHidden",!0),t.get("leftOver")&&t.set("leftHidden",!0)},this.get("@style.shell.sides.initialTimeout")||1500):(this.get("rightOver")&&this.set("rightHidden",!0),this.get("leftOver")&&this.set("leftHidden",!0))},complete:function(){p(this)},unrender:function(){this._media&&this._media.cancel()}},observe:{"leftHidden rightHidden":{handler:function(t,e,n){var i=this;(~n.indexOf("left")&&!this.get("leftOver")&&!this.get("_leftOver")||~n.indexOf("right")&&!this.get("rightOver")&&!this.get("_rightOver"))&&setTimeout(function(){i._media&&i._media.listener&&i._media.listener.silence(),i._media&&i._media.observer&&i._media.observer.silence(),i.fire("resize"),i._media&&i._media.listener&&i._media.listener.resume(),i._media&&i._media.observer&&i._media.observer.resume()},(this.get("shell.slide.ms")||400)+10)},defer:!0,init:!1}}});var c=["top","bottom","center","left","right","left-pop","right-pop","top-pop","bottom-pop"],u=["hidden","primary","over","popped","overflow","forced"];function p(t){if("undefined"!=typeof window&&(t.left||t.right)){if(t._media)return t._media.fn;var e,n=0,i={fn:function(){var r=t.relativeSize("100%");if(i.last!==r){i.last=r;var s={left:!t.get("leftOver")&&t.left&&t.left.clientWidth||0,right:!t.get("rightOver")&&t.right&&t.right.clientWidth||0};s.left&&(s.left=t.relativeSize(s.left)),s.right&&(s.right=t.relativeSize(s.right));var l=t.get("_rightPrimary")?"right":"left",o="right"===l?"left":"right",h=t.relativeSize(t.get("@style.break.medium")||"60rem","1rem"),d={_leftOver:!1,_rightOver:!1},f={leftHidden:t.get("leftOver"),rightHidden:t.get("rightOver")};n||(d.leftHidden=!1,d.rightHidden=!1);var a=r-s.left-s.right;a<=h&&(a+=s[o],f[o+"Hidden"]=!0,d["_"+o+"Over"]=!0,a<=h&&(f[l+"Hidden"]=!0,d["_"+l+"Over"]=!0)),t.set(d),n?2===n&&t.set(f):(n=1,setTimeout(function(){n=2,t.set(f)},t.get("@style.shell.sides.initialTimeout")||1500)),e&&clearTimeout(e),e=setTimeout(function(){i.listener&&i.listener.silence(),t.fire("resize"),i.listener&&i.listener.resume(),e=0},(t.get("shell.slide.ms")||400)+100)}},cancel:function(){t._media=null,window.removeEventListener("resize",i.fn),i.observer&&i.observer.cancel(),i.listener&&i.listener.cancel()}};window.addEventListener("resize",i.fn),i.observer=t.observe("@style leftOver rightOver _leftPrimary _rightPrimary",i.fn,{init:!1}),t.get("adaptive")&&(i.listener=t.root.on("*.resize",i.fn)),t._media=i,t._media.fn()}}function m(t){return void 0===t&&(t={}),function(e){e.instance.components[t.name||"shell"]=a}}!function(t,e,n){if(f&&f.Ractive&&"object"==typeof f.Ractive[e]){var i=document.currentScript;if(i||(i=(i=document.querySelectorAll("script"))[i.length-1]),i){var r=i.getAttribute("data-alias");r&&(r=(r=r.split("&")).reduce(function(t,e){var n=e.split("="),i=n[0],r=n[1];return t[i]=r,t},{})),Ractive[e][r&&r[t]||t]=n}}}("RMShell","components",a),t.Shell=a,t.plugin=m,t.default=m,Object.defineProperty(t,"__esModule",{value:!0})}); |
@@ -246,3 +246,3 @@ (function (global, factory) { | ||
Ractive$1.extendWith(Tabs, { | ||
template: {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs",g:1},{t:16,r:"extra-attributes"},{n:"class-rtabs-flat",t:13,f:[{t:2,r:"~/flat"}]},{n:"class-rtabs-margin",t:13,f:[{t:2,r:"~/margin"}]},{n:"class-rtabs-fill",t:13,f:[{t:2,r:"~/fill"}]},{n:"sized",t:71,f:{r:[],s:"[{clientWidth:\"~/clientWidth\"}]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window-wrapper",g:1},{n:"class-rtabs-scroll-right",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsRight()"}}]},{n:"class-rtabs-scroll-left",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsLeft()"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window",g:1},{t:4,f:[{n:"class-rtabs-going-left",t:13}],n:50,x:{r:[".direction"],s:"_0===\"left\""}},{t:4,f:[{n:"class-rtabs-going-right",t:13}],n:51,l:1},{n:"scrolled",t:71,f:{r:[],s:"[\"~/scrollStatus\"]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-left",g:1},{n:"class-rtabs-center",t:13,f:[{t:2,r:"~/center"}]}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"!_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-right",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-indicator",g:1},{n:"style-left",f:[{t:2,r:".selectedLeft"},"px"],t:13},{t:4,f:[{n:"style-right",f:[{t:2,r:".selectedRight"},"px"],t:13}],n:50,x:{r:[".selectedRight"],s:"_0!==undefined"}}]}],n:51,r:"@style.raui.tabs.boxy"}]}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-wrapper",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-window",g:1},{t:4,f:[{n:"class-rtabs-trans-fade",t:13}],n:50,x:{r:[".transition"],s:"_0===\"fade\""}},{t:4,f:[{n:"class-rtabs-trans-slide",t:13}],n:50,x:{r:[".transition"],s:"_0===\"slide\""},l:1},{n:["scroll"],t:70,f:{r:["@this","@node"],s:"[_0.stopHorizontalScroll(_1)]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-contents",g:1},{n:"style-opacity",f:[{t:2,r:"~/opacity"}],t:13},{n:"style-left",f:[{t:2,x:{r:[".selectedContent"],s:"_0*-100"}},"%"],t:13},{n:"class-rtabs-pad",t:13,f:[{t:2,r:"~/pad"}]}],f:[{t:4,f:[{t:8,r:"tab-content"}],n:52,r:".tabs"}]}]}]}]}],e:{"[{clientWidth:\"~/clientWidth\"}]":function (){return([{clientWidth:"~/clientWidth"}]);},"_0._scrollsRight()":function (_0){return(_0._scrollsRight());},"_0._scrollsLeft()":function (_0){return(_0._scrollsLeft());},"_0===\"left\"":function (_0){return(_0==="left");},"[\"~/scrollStatus\"]":function (){return(["~/scrollStatus"]);},"!_0&&!_1._hidden(_2)":function (_0,_1,_2){return(!_0&&!_1._hidden(_2));},"_0&&!_1._hidden(_2)":function (_0,_1,_2){return(_0&&!_1._hidden(_2));},"_0!==undefined":function (_0){return(_0!==undefined);},"_0===\"fade\"":function (_0){return(_0==="fade");},"_0===\"slide\"":function (_0){return(_0==="slide");},"[_0.stopHorizontalScroll(_1)]":function (_0,_1){return([_0.stopHorizontalScroll(_1)]);},"_0*-100":function (_0){return(_0*-100);},"_0===_1":function (_0,_1){return(_0===_1);},"_0===\"dynamic\"":function (_0){return(_0==="dynamic");},"_0!==_1":function (_0,_1){return(_0!==_1);},"_0===false":function (_0){return(_0===false);},"[_0.checkSelection((_1),_2)]":function (_0,_1,_2){return([_0.checkSelection((_1),_2)]);},"(_3===\"always\"&&_0===_1)||(_3&&_2)||!_3":function (_0,_1,_2,_3){return((_3==="always"&&_0===_1)||(_3&&_2)||!_3);},"!_0":function (_0){return(!_0);},"_0===_1&&!_2":function (_0,_1,_2){return(_0===_1&&!_2);},"typeof _1===\"string\"?_0.get(_1):_1":function (_0,_1){return(typeof _1==="string"?_0.get(_1):_1);},"[[\"select\",_0]]":function (_0){return([["select",_0]]);},"[_0.button()]":function (_0){return([_0.button()]);},"typeof _0===\"function\"":function (_0){return(typeof _0==="function");},"[_0]":function (_0){return([_0]);},"typeof _0===\"string\"":function (_0){return(typeof _0==="string");},"[[\"close\",_0]]":function (_0){return([["close",_0]]);},"_0&&!_1":function (_0,_1){return(_0&&!_1);}},p:{"tab-content":[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-content",g:1},{n:"class-rtabs-selected-content",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0===_1"}}]},{n:"class-rtabs-dyna",t:13,f:[{t:2,x:{r:["~/height"],s:"_0===\"dynamic\""}}]},{n:"class-rtabs-not-selected",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0!==_1"}}]},{t:4,f:[{t:16,r:".extra"}],n:50,r:".extra"},{t:4,f:[{n:"class-rtabs-no-pad",t:13}],n:50,x:{r:[".pad"],s:"_0===false"}},{t:4,f:[{n:"class-rtabs-no-pad",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".padRef"}]}}]}],n:50,r:".padRef",l:1},{n:["focus"],t:70,f:{r:["@this","@context","@index"],s:"[_0.checkSelection((_1),_2)]"}}],f:[{t:4,f:[{t:16,r:".template"}],n:50,x:{r:["~/selectedContent","@index",".load","~/defer"],s:"(_3===\"always\"&&_0===_1)||(_3&&_2)||!_3"}}]}],n:50,x:{r:[".button"],s:"!_0"}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-placeholder",g:1}]}],n:51,l:1}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab",g:1},{n:"class-rtabs-selected",t:13,f:[{t:2,x:{r:["~/selected","@index",".button"],s:"_0===_1&&!_2"}}]},{t:4,f:[{n:"class-rtabs-disabled",t:13}],n:50,x:{r:["@this",".disabled"],s:"typeof _1===\"string\"?_0.get(_1):_1"}},{t:4,f:[{n:["click"],t:70,f:{r:["@index"],s:"[[\"select\",_0]]"}}],n:50,x:{r:[".button"],s:"!_0"},l:1},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.button()]"}}],n:50,x:{r:[".button"],s:"typeof _0===\"function\""},l:1},{n:"registered",t:71,f:{r:["@index"],s:"[_0]"}},{t:4,f:[{t:16,r:".extraTab"}],n:50,r:".extraTab"},{n:"data-tab-index",f:[{t:2,r:"@index"}],t:13}],f:[{t:4,f:[{t:2,r:"title"}],n:50,x:{r:[".title"],s:"typeof _0===\"string\""}},{t:4,f:[{t:16,r:".title"}],n:50,r:".title",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-close",g:1},{n:["click"],t:70,f:{r:["@index"],s:"[[\"close\",_0]]"}}],f:["×"]}],n:50,x:{r:[".closable",".button"],s:"_0&&!_1"}}]}]}}, | ||
template: {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs",g:1},{t:16,r:"extra-attributes"},{n:"class-rtabs-flat",t:13,f:[{t:2,r:"~/flat"}]},{n:"class-rtabs-margin",t:13,f:[{t:2,r:"~/margin"}]},{n:"class-rtabs-fill",t:13,f:[{t:2,r:"~/fill"}]},{n:"sized",t:71,f:{r:[],s:"[{clientWidth:\"~/clientWidth\"}]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window-wrapper",g:1},{n:"class-rtabs-scroll-right",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsRight()"}}]},{n:"class-rtabs-scroll-left",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsLeft()"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window",g:1},{t:4,f:[{n:"class-rtabs-going-left",t:13}],n:50,x:{r:[".direction"],s:"_0===\"left\""}},{t:4,f:[{n:"class-rtabs-going-right",t:13}],n:51,l:1},{n:"scrolled",t:71,f:{r:[],s:"[\"~/scrollStatus\"]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-left",g:1},{n:"class-rtabs-center",t:13,f:[{t:2,r:"~/center"}]}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"!_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-right",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-indicator",g:1},{n:"style-left",f:[{t:2,r:".selectedLeft"},"px"],t:13},{t:4,f:[{n:"style-right",f:[{t:2,r:".selectedRight"},"px"],t:13}],n:50,x:{r:[".selectedRight"],s:"_0!==undefined"}}]}],n:51,r:"@style.raui.tabs.boxy"}]}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-wrapper",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-window",g:1},{t:4,f:[{n:"class-rtabs-trans-fade",t:13}],n:50,x:{r:[".transition"],s:"_0===\"fade\""}},{t:4,f:[{n:"class-rtabs-trans-slide",t:13}],n:50,x:{r:[".transition"],s:"_0===\"slide\""},l:1},{n:["scroll"],t:70,f:{r:["@this","@node"],s:"[_0.stopHorizontalScroll(_1)]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-contents",g:1},{n:"style-opacity",f:[{t:2,r:"~/opacity"}],t:13},{n:"style-left",f:[{t:2,x:{r:[".selectedContent"],s:"_0*-100"}},"%"],t:13},{n:"class-rtabs-pad",t:13,f:[{t:2,r:"~/pad"}]}],f:[{t:4,f:[{t:8,r:"tab-content"}],n:52,r:".tabs"}]}]}]}]}],e:{"[{clientWidth:\"~/clientWidth\"}]":function (){return([{clientWidth:"~/clientWidth"}]);},"_0._scrollsRight()":function (_0){return(_0._scrollsRight());},"_0._scrollsLeft()":function (_0){return(_0._scrollsLeft());},"_0===\"left\"":function (_0){return(_0==="left");},"[\"~/scrollStatus\"]":function (){return(["~/scrollStatus"]);},"!_0&&!_1._hidden(_2)":function (_0,_1,_2){return(!_0&&!_1._hidden(_2));},"_0&&!_1._hidden(_2)":function (_0,_1,_2){return(_0&&!_1._hidden(_2));},"_0!==undefined":function (_0){return(_0!==undefined);},"_0===\"fade\"":function (_0){return(_0==="fade");},"_0===\"slide\"":function (_0){return(_0==="slide");},"[_0.stopHorizontalScroll(_1)]":function (_0,_1){return([_0.stopHorizontalScroll(_1)]);},"_0*-100":function (_0){return(_0*-100);},"_0===_1":function (_0,_1){return(_0===_1);},"_0===\"dynamic\"":function (_0){return(_0==="dynamic");},"_0!==_1":function (_0,_1){return(_0!==_1);},"_0===false":function (_0){return(_0===false);},"[_0.checkSelection((_1),_2)]":function (_0,_1,_2){return([_0.checkSelection((_1),_2)]);},"(_3===\"always\"&&_0===_1)||(_3&&_2)||!_3":function (_0,_1,_2,_3){return((_3==="always"&&_0===_1)||(_3&&_2)||!_3);},"!_0":function (_0){return(!_0);},"_0===_1&&!_2":function (_0,_1,_2){return(_0===_1&&!_2);},"typeof _1===\"string\"?_0.get(_1):_1":function (_0,_1){return(typeof _1==="string"?_0.get(_1):_1);},"[[\"select\",_0]]":function (_0){return([["select",_0]]);},"[_0.button()]":function (_0){return([_0.button()]);},"typeof _0===\"function\"":function (_0){return(typeof _0==="function");},"[_0]":function (_0){return([_0]);},"typeof _0===\"string\"":function (_0){return(typeof _0==="string");},"[[\"close\",_0]]":function (_0){return([["close",_0]]);},"_0&&!_1":function (_0,_1){return(_0&&!_1);}},p:{"tab-content":[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-content",g:1},{n:"class-rtabs-selected-content",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0===_1"}}]},{n:"class-rtabs-dyna",t:13,f:[{t:2,x:{r:["~/height"],s:"_0===\"dynamic\""}}]},{n:"class-rtabs-not-selected",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0!==_1"}}]},{t:4,f:[{t:16,r:".extra"}],n:50,r:".extra"},{t:4,f:[{n:"class-rtabs-no-pad",t:13}],n:50,x:{r:[".pad"],s:"_0===false"}},{t:4,f:[{n:"class-rtabs-no-pad",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".padRef"}]}}]}],n:50,r:".padRef",l:1},{n:["focusin"],t:70,f:{r:["@this","@context","@index"],s:"[_0.checkSelection((_1),_2)]"}}],f:[{t:4,f:[{t:16,r:".template"}],n:50,x:{r:["~/selectedContent","@index",".load","~/defer"],s:"(_3===\"always\"&&_0===_1)||(_3&&_2)||!_3"}}]}],n:50,x:{r:[".button"],s:"!_0"}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-placeholder",g:1}]}],n:51,l:1}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab",g:1},{n:"class-rtabs-selected",t:13,f:[{t:2,x:{r:["~/selected","@index",".button"],s:"_0===_1&&!_2"}}]},{t:4,f:[{n:"class-rtabs-disabled",t:13}],n:50,x:{r:["@this",".disabled"],s:"typeof _1===\"string\"?_0.get(_1):_1"}},{t:4,f:[{n:["click"],t:70,f:{r:["@index"],s:"[[\"select\",_0]]"}}],n:50,x:{r:[".button"],s:"!_0"},l:1},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.button()]"}}],n:50,x:{r:[".button"],s:"typeof _0===\"function\""},l:1},{n:"registered",t:71,f:{r:["@index"],s:"[_0]"}},{t:4,f:[{t:16,r:".extraTab"}],n:50,r:".extraTab"},{n:"data-tab-index",f:[{t:2,r:"@index"}],t:13}],f:[{t:4,f:[{t:2,r:"title"}],n:50,x:{r:[".title"],s:"typeof _0===\"string\""}},{t:4,f:[{t:16,r:".title"}],n:50,r:".title",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-close",g:1},{n:["click"],t:70,f:{r:["@index"],s:"[[\"close\",_0]]"}}],f:["×"]}],n:50,x:{r:[".closable",".button"],s:"_0&&!_1"}}]}]}}, | ||
cssId: 'rtab', | ||
@@ -261,3 +261,3 @@ noCssTransform: true, | ||
return "\n .rtabs {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n \n .rtabs-tab-window {\n overflow-y: hidden;\n overflow-x: auto;\n " + (!boxy ? ("box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n color: " + (primary.fg || '#222') + ";\n background-color: " + (primary.bg || '#fff') + ";") : | ||
("border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 1px 1px 0 1px;\n color: " + (primary.fg || '#222') + ";\n background-color: " + (primary.bga || '#f4f4f4') + ";\n ")) + "\n position: relative;\n flex-shrink: 0;\n }\n .alt > div > .rtabs-tab-window {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fga || '#07e') + ";\n }" + (boxy ? ("\n .alt > div > .rtabs-tab-window .rtabs-tab {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fga || '#07e') + ";\n }") : '') + "\n \n .rtabs-tab-window-wrapper {\n position: relative;\n z-index: 10;\n }\n .rtabs-tab-window-wrapper:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n background: linear-gradient(to right, " + (primary.indicator.color || primary.fga || '#07e') + ", transparent);\n z-index: 999;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-left:before {\n opacity: 1;\n }\n \n .rtabs-tab-window-wrapper:after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n background: linear-gradient(to left, " + (primary.indicator.color || primary.fga || '#07e') + ", transparent);\n transition: opacity 0.3s ease-in-out;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-right:after {\n opacity: 1;\n }\n \n .rtabs-flat > div > .rtabs-tab-window {\n box-shadow: none;\n border-width: 0;\n }\n " + (!boxy ? (".rtabs-flat > div > .rtabs-tab-window:after {\n content: '';\n height: 0.15em;\n position: absolute;\n bottom: 0px;\n width: 100%;\n display: block;\n background-color: " + (primary.bga || '#f4f4f4') + ";\n }\n .rtabs-flat.alt > div > .rtabs-tab-window:after {\n background-color: " + (primary.fga || '#07e') + ";\n }") : ("\n .rtabs-flat > div > .rtabs-tab-window {\n background-color: " + (primary.bg || '#fff') + ";\n }\n .alt.rtabs-flat > div > .rtabs-tab-window {\n background-color: " + (primary.fga || '#07e') + ";\n }\n .rtabs-flat > div > .rtabs-tab-window .rtabs-tab {\n border-top-width: 1px;\n }")) + "\n \n .rtabs-center.rtabs-left {\n text-align: center;\n }" + (boxy ? "\n .rtabs-center > .rtabs-tab:first-child {\n border-left-width: 1px;\n }" : '') + "\n \n .rtabs-pad {\n padding: 1em;\n }\n \n .rtabs-fill {\n flex-grow: 1;\n height: 100%;\n }\n \n .rtabs-tabs {\n display: table;\n position: relative;\n min-width: 100%;\n white-space: nowrap;" + (boxy ? ("\n border-style: solid;\n border-width: 0 0 1px 0;\n border-color: " + (primary.bc || '#ccc') + ";\n line-height: 1.5em;") : '') + "\n }\n \n .rtabs-tab {\n display: inline-block;\n box-sizing: border-box;\n padding: 0.5em 1em;\n height: 2.5em;\n transition: opacity 0.2s ease-in-out;\n user-select: none;\n cursor: pointer;" + (!boxy ? "\n opacity: 0.9;" : ("\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 0 1px 1px 0;\n margin-bottom: -1px;\n color: " + (primary.fg || '#222') + ";\n background-color: " + (primary.bga || '#f4f4f4') + ";\n ")) + "\n }\n .rtabs-tab:hover {\n opacity: 1;\n }\n \n .rtabs-selected" + (boxy ? ",\n .alt > div > .rtabs-tab-window .rtabs-selected" : '') + " {\n opacity: 1;" + (boxy ? ("\n font-weight: bold;\n border-bottom-color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.selected.bg || primary.bg || '#fff') + ";\n color: " + (primary.selected.fg || primary.fg || '#222') + ";") : '') + "\n }\n \n .rtabs-disabled {\n opacity: 0.4;\n }\n \n .rtabs-right {\n text-align: right;\n display: table-cell;\n }\n \n .rtabs-left {\n text-align: left;\n display: table-cell;\n }\n \n .rtabs-close {\n display: inline-block;\n margin-right: -0.5em;\n font-weight: 700;\n opacity: 0.3;\n transition: opacity: 0.2s ease-in-out;\n }\n \n .rtabs-close:hover {\n opacity: 1;\n }\n \n .rtabs-indicator {\n position: absolute;\n bottom: 0;\n height: 0.15em;\n background-color: " + (primary.indicator.color || primary.fga || '#07e') + ";\n z-index: 2;\n }\n \n .alt > div > .rtabs-tab-window .rtabs-indicator {\n background-color: " + (primary.bg || '#fff') + ";\n }\n \n .rtabs-going-left .rtabs-indicator {\n transition: left 0.2s ease-in-out, right 0.2s ease-in-out 0.1s;\n }\n .rtabs-going-right .rtabs-indicator {\n transition: left 0.2s ease-in-out 0.1s, right 0.2s ease-in-out;\n }\n \n .rtabs-content-wrapper {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-grow: 2;\n overflow: hidden;\n }\n \n .rtabs-content-window {\n width: 100%;\n display: flex;\n flex-grow: 1;\n overflow-y: auto;\n overflow-x: hidden\n }\n \n .rtabs {\n color: " + (primary.fg || '#222') + ";\n background-color: " + (primary.bg || '#fff') + ";\n }\n \n .rtabs-contents {\n list-style: none;\n padding: 0;\n margin: 0;\n position: relative;\n left: 0;\n display: block;\n flex-wrap: nowrap;\n white-space: nowrap;\n width: 100%;\n }\n .rtabs-trans-slide > .rtabs-contents {\n transition: left 0.2s ease-in-out;\n }\n .rtabs-trans-fade > .rtabs-contents {\n transition: opacity 0.15s ease;\n opacity: 1;\n white-space: nowrap;\n }\n \n .rtabs-fill > div > div > .rtabs-contents {\n display: flex;\n }\n \n .rtabs-tab-content {\n position: relative;\n width: 100%;\n overflow: auto;\n vertical-align: top;\n white-space: initial;\n transition: opacity 0.1s ease-in-out;\n flex-shrink: 0;\n white-space: initial;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n \n .rtabs-placeholder {\n display: inline-block;\n width: 100%;\n height: 1px;\n flex-shrink: 0;\n }\n .rtabs-dyna.rtabs-not-selected {\n height: 1px;\n opacity: 0;\n overflow: hidden;\n }\n .rtabs-pad > .rtabs-tab-content {\n padding: 1em;\n box-sizing: border-box;\n }\n .rtabs-pad > .rtabs-tab-content.rtabs-no-pad {\n padding: 0;\n }\n .rtabs > .rtabs-tab-content.rtabs-pad {\n padding: 1em;\n box-sizing: border-box;\n }\n " + themes.map(function (t) { | ||
("border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 1px 1px 0 1px;\n color: " + (primary.fg || '#222') + ";\n background-color: " + (primary.bga || '#f4f4f4') + ";\n ")) + "\n position: relative;\n flex-shrink: 0;\n }\n .alt > div > .rtabs-tab-window {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fga || '#07e') + ";\n }" + (boxy ? ("\n .alt > div > .rtabs-tab-window .rtabs-tab {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fga || '#07e') + ";\n }") : '') + "\n \n .rtabs-tab-window-wrapper {\n position: relative;\n z-index: 10;\n }\n .rtabs-tab-window-wrapper:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n background: linear-gradient(to right, " + (primary.indicator.color || primary.fga || '#07e') + ", transparent);\n z-index: 999;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-left:before {\n opacity: 1;\n }\n \n .rtabs-tab-window-wrapper:after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n background: linear-gradient(to left, " + (primary.indicator.color || primary.fga || '#07e') + ", transparent);\n transition: opacity 0.3s ease-in-out;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-right:after {\n opacity: 1;\n }\n \n .rtabs-flat > div > .rtabs-tab-window {\n box-shadow: none;\n border-width: 0;\n }\n " + (!boxy ? (".rtabs-flat > div > .rtabs-tab-window:after {\n content: '';\n height: 0.15em;\n position: absolute;\n bottom: 0px;\n width: 100%;\n display: block;\n background-color: " + (primary.bga || '#f4f4f4') + ";\n }\n .rtabs-flat.alt > div > .rtabs-tab-window:after {\n background-color: " + (primary.fga || '#07e') + ";\n }") : ("\n .rtabs-flat > div > .rtabs-tab-window {\n background-color: " + (primary.bg || '#fff') + ";\n }\n .alt.rtabs-flat > div > .rtabs-tab-window {\n background-color: " + (primary.fga || '#07e') + ";\n }\n .rtabs-flat > div > .rtabs-tab-window .rtabs-tab {\n border-top-width: 1px;\n }")) + "\n \n .rtabs-center.rtabs-left {\n text-align: center;\n }" + (boxy ? "\n .rtabs-center > .rtabs-tab:first-child {\n border-left-width: 1px;\n }" : '') + "\n \n .rtabs-pad {\n padding: 1em;\n }\n \n .rtabs-fill {\n flex-grow: 1;\n height: 100%;\n }\n \n .rtabs-tabs {\n display: table;\n position: relative;\n min-width: 100%;\n white-space: nowrap;" + (boxy ? ("\n border-style: solid;\n border-width: 0 0 1px 0;\n border-color: " + (primary.bc || '#ccc') + ";\n line-height: 1.5em;") : '') + "\n }\n \n .rtabs-tab {\n display: inline-block;\n box-sizing: border-box;\n padding: 0.5em 1em;\n height: 2.5em;\n transition: opacity 0.2s ease-in-out;\n user-select: none;\n cursor: pointer;" + (!boxy ? "\n opacity: 0.9;" : ("\n border-color: " + (primary.bc || '#ccc') + ";\n border-style: solid;\n border-width: 0 1px 1px 0;\n margin-bottom: -1px;\n color: " + (primary.fg || '#222') + ";\n background-color: " + (primary.bga || '#f4f4f4') + ";\n ")) + "\n }\n .rtabs-tab:hover {\n opacity: 1;\n }\n \n .rtabs-selected" + (boxy ? ",\n .alt > div > .rtabs-tab-window .rtabs-selected" : '') + " {\n opacity: 1;" + (boxy ? ("\n font-weight: bold;\n border-bottom-color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.selected.bg || primary.bg || '#fff') + ";\n color: " + (primary.selected.fg || primary.fg || '#222') + ";") : '') + "\n }\n \n .rtabs-disabled {\n opacity: 0.4;\n }\n \n .rtabs-right {\n text-align: right;\n display: table-cell;\n }\n \n .rtabs-left {\n text-align: left;\n display: table-cell;\n }\n \n .rtabs-close {\n display: inline-block;\n margin-right: -0.5em;\n font-weight: 700;\n opacity: 0.3;\n transition: opacity: 0.2s ease-in-out;\n }\n \n .rtabs-close:hover {\n opacity: 1;\n }\n \n .rtabs-indicator {\n position: absolute;\n bottom: 0;\n height: 0.15em;\n background-color: " + (primary.indicator.color || primary.fga || '#07e') + ";\n z-index: 2;\n }\n \n .alt > div > .rtabs-tab-window .rtabs-indicator {\n background-color: " + (primary.bg || '#fff') + ";\n }\n \n .rtabs-going-left .rtabs-indicator {\n transition: left 0.2s ease-in-out, right 0.2s ease-in-out 0.1s;\n }\n .rtabs-going-right .rtabs-indicator {\n transition: left 0.2s ease-in-out 0.1s, right 0.2s ease-in-out;\n }\n \n .rtabs-content-wrapper {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-grow: 2;\n overflow: hidden;\n }\n \n .rtabs-content-window {\n width: 100%;\n display: flex;\n flex-grow: 1;\n overflow-y: auto;\n overflow-x: hidden\n }\n \n .rtabs {\n color: " + (primary.fg || '#222') + ";\n background-color: " + (primary.bg || '#fff') + ";\n }\n \n .rtabs-contents {\n list-style: none;\n padding: 0;\n margin: 0;\n position: relative;\n left: 0;\n display: flex;\n flex-wrap: nowrap;\n white-space: nowrap;\n width: 100%;\n }\n .rtabs-trans-slide > .rtabs-contents {\n transition: left 0.2s ease-in-out;\n }\n .rtabs-trans-fade > .rtabs-contents {\n transition: opacity 0.15s ease;\n opacity: 1;\n white-space: nowrap;\n }\n \n .rtabs-fill > div > div > .rtabs-contents {\n display: flex;\n }\n \n .rtabs-tab-content {\n position: relative;\n width: 100%;\n overflow: auto;\n vertical-align: top;\n white-space: initial;\n transition: opacity 0.1s ease-in-out;\n flex-shrink: 0;\n white-space: initial;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n \n .rtabs-placeholder {\n display: inline-block;\n width: 100%;\n height: 1px;\n flex-shrink: 0;\n }\n .rtabs-dyna.rtabs-not-selected {\n height: 1px;\n opacity: 0;\n overflow: hidden;\n }\n .rtabs-pad > .rtabs-tab-content {\n padding: 1em;\n box-sizing: border-box;\n }\n .rtabs-pad > .rtabs-tab-content.rtabs-no-pad {\n padding: 0;\n }\n .rtabs > .rtabs-tab-content.rtabs-pad {\n padding: 1em;\n box-sizing: border-box;\n }\n " + themes.map(function (t) { | ||
var theme = Object.assign({}, data('raui.primary'), data('raui.tabs.primary'), data(("raui." + t)), data(("raui.tabs." + t))); | ||
@@ -264,0 +264,0 @@ theme.selected = Object.assign({}, data('raui.tabs.selected'), data('raui.tabs.primary.selected'), data(("raui.tabs." + t + ".selected"))); |
@@ -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.RMTabs={},t.Ractive)}(this,function(t,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var e="undefined"!=typeof window?window:null;var i=function(t){function n(n){t.call(this,n)}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var e={visibleSelection:{configurable:!0}};return n.prototype.addTab=function(t,n){t.template||(t.template=[]),"number"==typeof n?this.splice("tabs",n,0,t):this.push("tabs",t);var e=new o(this,t);return t.select&&this.select(e.index),e},n.prototype.getTab=function(t){var n=this.get("tabs"),e=n.find(function(n){return n.id===t});return e?new o(this,e):t in n&&"object"==typeof n[t]?new o(this,n[t]):void 0},n.prototype.updateIndicator=function(){if(this.rendered&&this._tabs){var t=this.getContext(this.find(".rtabs-tab-window"));if(t.decorators.scrolled&&t.decorators.scrolled.refresh(),!this.get("@style.raui.tabs.boxy")){var n=this._tabs[this.get("selected")];if(n&&n.offsetParent)if(n){var e=this.get("selectedLeft");if(void 0===e)this.set({selectedLeft:n.offsetLeft,selectedRight:n.offsetParent.clientWidth-(n.offsetLeft+n.offsetWidth)});else{var i=n.offsetParent.clientWidth,r=n.offsetLeft,s=i-r-n.clientWidth;this.set({direction:r<e?"left":"right",selectedLeft:r,selectedRight:s})}}else this.set({selectedLeft:0,selectedRight:this.find(".tabs").offsetWidth})}}},n.prototype.checkSelection=function(t,n){this.get("selected")!==n&&s.call(this,t,n)},n.prototype.select=function(t){t<0||t>=(this.get("tabs.length")||0)||this.fire("select",{},t)},n.prototype._hidden=function(t){var n=this,e=this.get("tabs."+t+".hidden");return"string"==typeof e&&(e=this.get(e)),setTimeout(function(){e&&n.get("selected")===t&&n.select(0)}),e},n.prototype.stopHorizontalScroll=function(t){t.scrollLeft&&(t.scrollLeft=0)},n.prototype._scrollsRight=function(){var t=this.get("scrollStatus")||"";if(/hscroll.*(hmiddle|left)/.test(t)&&!/right/.test(t))return!0},n.prototype._scrollsLeft=function(){var t=this.get("scrollStatus")||"";if(/hscroll.*(hmiddle|right)/.test(t)&&!/left/.test(t))return!0},e.visibleSelection.get=function(){for(var t=0,n=this.get("tabs"),e=this.get("selected"),i=0;i<n.length;i++){var r=n[i];if(e===i)return t;var s=r.hidden;"string"==typeof s&&(s=this.get(s)),s||t++}return t},Object.defineProperties(n.prototype,e),n}(n),r=["closable","disabled","title","right","button","no-pad","hidden","id","load"];function s(t,n){var e,i=this;if(!(n<-1||n>=this.get("tabs.length"))){var r=this.get("selected"),s=this.get("transition");if(this._fadetm&&(this.set("opacity",1),clearTimeout(this._fadetm),this._fadetm=0),r!==n)if(this.rendered){var o=this.getContext(this.find(".rtabs-selected")),a=this.find(".rtabs-content-window");if(~r&&this.set("scroll."+o.get("@index"),a.scrollTop),o.hasListener("leave")&&o.raise("leave"),"fade"===s){this.set({opacity:0,selected:n}),this.updateIndicator();var l=this.getContext(this.find(".rtabs-selected"));this._fadetm=setTimeout(function(){var t;i._fadetm=0,i.set(((t={selectedContent:n})["tabs."+n+".load"]=!0,t.opacity=1,t)),l.hasListener("enter")&&l.raise("enter"),a&&~r&&(a.scrollTop=i.get("scroll."+n)||0)},150)}else if("slide"===s){this.set("selected",n),this.set("tabs."+n+".load",!0),this.set("selectedContent",n),this.updateIndicator();var c=this.getContext(this.find(".rtabs-selected"));c.hasListener("enter")&&c.raise("enter"),a&&~r&&(a.scrollTop=this.get("scroll."+n)||0)}else{this.set(((e={selected:n})["tabs."+n+".load"]=!0,e.selectedContent=n,e)),this.updateIndicator();var d=this.getContext(this.find(".rtabs-selected"));d.hasListener("enter")&&d.raise("enter"),a&&(a.scrollTop=this.get("scroll."+n)||0)}~r&&a&&a.scrollLeft&&(a.scrollLeft=0)}else this.set({selected:n,selectedContent:n})}}n.extendWith(i,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs",g:1},{t:16,r:"extra-attributes"},{n:"class-rtabs-flat",t:13,f:[{t:2,r:"~/flat"}]},{n:"class-rtabs-margin",t:13,f:[{t:2,r:"~/margin"}]},{n:"class-rtabs-fill",t:13,f:[{t:2,r:"~/fill"}]},{n:"sized",t:71,f:{r:[],s:'[{clientWidth:"~/clientWidth"}]'}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window-wrapper",g:1},{n:"class-rtabs-scroll-right",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsRight()"}}]},{n:"class-rtabs-scroll-left",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsLeft()"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window",g:1},{t:4,f:[{n:"class-rtabs-going-left",t:13}],n:50,x:{r:[".direction"],s:'_0==="left"'}},{t:4,f:[{n:"class-rtabs-going-right",t:13}],n:51,l:1},{n:"scrolled",t:71,f:{r:[],s:'["~/scrollStatus"]'}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-left",g:1},{n:"class-rtabs-center",t:13,f:[{t:2,r:"~/center"}]}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"!_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-right",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-indicator",g:1},{n:"style-left",f:[{t:2,r:".selectedLeft"},"px"],t:13},{t:4,f:[{n:"style-right",f:[{t:2,r:".selectedRight"},"px"],t:13}],n:50,x:{r:[".selectedRight"],s:"_0!==undefined"}}]}],n:51,r:"@style.raui.tabs.boxy"}]}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-wrapper",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-window",g:1},{t:4,f:[{n:"class-rtabs-trans-fade",t:13}],n:50,x:{r:[".transition"],s:'_0==="fade"'}},{t:4,f:[{n:"class-rtabs-trans-slide",t:13}],n:50,x:{r:[".transition"],s:'_0==="slide"'},l:1},{n:["scroll"],t:70,f:{r:["@this","@node"],s:"[_0.stopHorizontalScroll(_1)]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-contents",g:1},{n:"style-opacity",f:[{t:2,r:"~/opacity"}],t:13},{n:"style-left",f:[{t:2,x:{r:[".selectedContent"],s:"_0*-100"}},"%"],t:13},{n:"class-rtabs-pad",t:13,f:[{t:2,r:"~/pad"}]}],f:[{t:4,f:[{t:8,r:"tab-content"}],n:52,r:".tabs"}]}]}]}]}],e:{'[{clientWidth:"~/clientWidth"}]':function(){return[{clientWidth:"~/clientWidth"}]},"_0._scrollsRight()":function(t){return t._scrollsRight()},"_0._scrollsLeft()":function(t){return t._scrollsLeft()},'_0==="left"':function(t){return"left"===t},'["~/scrollStatus"]':function(){return["~/scrollStatus"]},"!_0&&!_1._hidden(_2)":function(t,n,e){return!t&&!n._hidden(e)},"_0&&!_1._hidden(_2)":function(t,n,e){return t&&!n._hidden(e)},"_0!==undefined":function(t){return void 0!==t},'_0==="fade"':function(t){return"fade"===t},'_0==="slide"':function(t){return"slide"===t},"[_0.stopHorizontalScroll(_1)]":function(t,n){return[t.stopHorizontalScroll(n)]},"_0*-100":function(t){return-100*t},"_0===_1":function(t,n){return t===n},'_0==="dynamic"':function(t){return"dynamic"===t},"_0!==_1":function(t,n){return t!==n},"_0===false":function(t){return!1===t},"[_0.checkSelection((_1),_2)]":function(t,n,e){return[t.checkSelection(n,e)]},'(_3==="always"&&_0===_1)||(_3&&_2)||!_3':function(t,n,e,i){return"always"===i&&t===n||i&&e||!i},"!_0":function(t){return!t},"_0===_1&&!_2":function(t,n,e){return t===n&&!e},'typeof _1==="string"?_0.get(_1):_1':function(t,n){return"string"==typeof n?t.get(n):n},'[["select",_0]]':function(t){return[["select",t]]},"[_0.button()]":function(t){return[t.button()]},'typeof _0==="function"':function(t){return"function"==typeof t},"[_0]":function(t){return[t]},'typeof _0==="string"':function(t){return"string"==typeof t},'[["close",_0]]':function(t){return[["close",t]]},"_0&&!_1":function(t,n){return t&&!n}},p:{"tab-content":[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-content",g:1},{n:"class-rtabs-selected-content",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0===_1"}}]},{n:"class-rtabs-dyna",t:13,f:[{t:2,x:{r:["~/height"],s:'_0==="dynamic"'}}]},{n:"class-rtabs-not-selected",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0!==_1"}}]},{t:4,f:[{t:16,r:".extra"}],n:50,r:".extra"},{t:4,f:[{n:"class-rtabs-no-pad",t:13}],n:50,x:{r:[".pad"],s:"_0===false"}},{t:4,f:[{n:"class-rtabs-no-pad",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".padRef"}]}}]}],n:50,r:".padRef",l:1},{n:["focus"],t:70,f:{r:["@this","@context","@index"],s:"[_0.checkSelection((_1),_2)]"}}],f:[{t:4,f:[{t:16,r:".template"}],n:50,x:{r:["~/selectedContent","@index",".load","~/defer"],s:'(_3==="always"&&_0===_1)||(_3&&_2)||!_3'}}]}],n:50,x:{r:[".button"],s:"!_0"}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-placeholder",g:1}]}],n:51,l:1}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab",g:1},{n:"class-rtabs-selected",t:13,f:[{t:2,x:{r:["~/selected","@index",".button"],s:"_0===_1&&!_2"}}]},{t:4,f:[{n:"class-rtabs-disabled",t:13}],n:50,x:{r:["@this",".disabled"],s:'typeof _1==="string"?_0.get(_1):_1'}},{t:4,f:[{n:["click"],t:70,f:{r:["@index"],s:'[["select",_0]]'}}],n:50,x:{r:[".button"],s:"!_0"},l:1},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.button()]"}}],n:50,x:{r:[".button"],s:'typeof _0==="function"'},l:1},{n:"registered",t:71,f:{r:["@index"],s:"[_0]"}},{t:4,f:[{t:16,r:".extraTab"}],n:50,r:".extraTab"},{n:"data-tab-index",f:[{t:2,r:"@index"}],t:13}],f:[{t:4,f:[{t:2,r:"title"}],n:50,x:{r:[".title"],s:'typeof _0==="string"'}},{t:4,f:[{t:16,r:".title"}],n:50,r:".title",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-close",g:1},{n:["click"],t:70,f:{r:["@index"],s:'[["close",_0]]'}}],f:["×"]}],n:50,x:{r:[".closable",".button"],s:"_0&&!_1"}}]}]}},cssId:"rtab",noCssTransform:!0,css:function(t){return[function(t){var n=Object.assign({},t("raui.primary"),t("raui.tabs.primary"));n.selected=Object.assign({},t("raui.tabs.selected"),t("raui.tabs.primary.selected")),n.indicator=Object.assign({},t("raui.tabs.indicator"),t("raui.tabs.primary.indicator"));var e=(t("raui.themes")||[]).slice();(t("raui.tabs.themes")||[]).forEach(function(t){~e.indexOf(t)||e.push(t)});var i=t("raui.tabs.boxy")||t("raui.tabs.primary.boxy");return"\n .rtabs {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n \n .rtabs-tab-window {\n overflow-y: hidden;\n overflow-x: auto;\n "+(i?"border-color: "+(n.bc||"#ccc")+";\n border-style: solid;\n border-width: 1px 1px 0 1px;\n color: "+(n.fg||"#222")+";\n background-color: "+(n.bga||"#f4f4f4")+";\n ":"box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n color: "+(n.fg||"#222")+";\n background-color: "+(n.bg||"#fff")+";")+"\n position: relative;\n flex-shrink: 0;\n }\n .alt > div > .rtabs-tab-window {\n color: "+(n.bg||"#fff")+";\n background-color: "+(n.fga||"#07e")+";\n }"+(i?"\n .alt > div > .rtabs-tab-window .rtabs-tab {\n color: "+(n.bg||"#fff")+";\n background-color: "+(n.fga||"#07e")+";\n }":"")+"\n \n .rtabs-tab-window-wrapper {\n position: relative;\n z-index: 10;\n }\n .rtabs-tab-window-wrapper:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n background: linear-gradient(to right, "+(n.indicator.color||n.fga||"#07e")+", transparent);\n z-index: 999;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-left:before {\n opacity: 1;\n }\n \n .rtabs-tab-window-wrapper:after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n background: linear-gradient(to left, "+(n.indicator.color||n.fga||"#07e")+", transparent);\n transition: opacity 0.3s ease-in-out;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-right:after {\n opacity: 1;\n }\n \n .rtabs-flat > div > .rtabs-tab-window {\n box-shadow: none;\n border-width: 0;\n }\n "+(i?"\n .rtabs-flat > div > .rtabs-tab-window {\n background-color: "+(n.bg||"#fff")+";\n }\n .alt.rtabs-flat > div > .rtabs-tab-window {\n background-color: "+(n.fga||"#07e")+";\n }\n .rtabs-flat > div > .rtabs-tab-window .rtabs-tab {\n border-top-width: 1px;\n }":".rtabs-flat > div > .rtabs-tab-window:after {\n content: '';\n height: 0.15em;\n position: absolute;\n bottom: 0px;\n width: 100%;\n display: block;\n background-color: "+(n.bga||"#f4f4f4")+";\n }\n .rtabs-flat.alt > div > .rtabs-tab-window:after {\n background-color: "+(n.fga||"#07e")+";\n }")+"\n \n .rtabs-center.rtabs-left {\n text-align: center;\n }"+(i?"\n .rtabs-center > .rtabs-tab:first-child {\n border-left-width: 1px;\n }":"")+"\n \n .rtabs-pad {\n padding: 1em;\n }\n \n .rtabs-fill {\n flex-grow: 1;\n height: 100%;\n }\n \n .rtabs-tabs {\n display: table;\n position: relative;\n min-width: 100%;\n white-space: nowrap;"+(i?"\n border-style: solid;\n border-width: 0 0 1px 0;\n border-color: "+(n.bc||"#ccc")+";\n line-height: 1.5em;":"")+"\n }\n \n .rtabs-tab {\n display: inline-block;\n box-sizing: border-box;\n padding: 0.5em 1em;\n height: 2.5em;\n transition: opacity 0.2s ease-in-out;\n user-select: none;\n cursor: pointer;"+(i?"\n border-color: "+(n.bc||"#ccc")+";\n border-style: solid;\n border-width: 0 1px 1px 0;\n margin-bottom: -1px;\n color: "+(n.fg||"#222")+";\n background-color: "+(n.bga||"#f4f4f4")+";\n ":"\n opacity: 0.9;")+"\n }\n .rtabs-tab:hover {\n opacity: 1;\n }\n \n .rtabs-selected"+(i?",\n .alt > div > .rtabs-tab-window .rtabs-selected":"")+" {\n opacity: 1;"+(i?"\n font-weight: bold;\n border-bottom-color: "+(n.bg||"#fff")+";\n background-color: "+(n.selected.bg||n.bg||"#fff")+";\n color: "+(n.selected.fg||n.fg||"#222")+";":"")+"\n }\n \n .rtabs-disabled {\n opacity: 0.4;\n }\n \n .rtabs-right {\n text-align: right;\n display: table-cell;\n }\n \n .rtabs-left {\n text-align: left;\n display: table-cell;\n }\n \n .rtabs-close {\n display: inline-block;\n margin-right: -0.5em;\n font-weight: 700;\n opacity: 0.3;\n transition: opacity: 0.2s ease-in-out;\n }\n \n .rtabs-close:hover {\n opacity: 1;\n }\n \n .rtabs-indicator {\n position: absolute;\n bottom: 0;\n height: 0.15em;\n background-color: "+(n.indicator.color||n.fga||"#07e")+";\n z-index: 2;\n }\n \n .alt > div > .rtabs-tab-window .rtabs-indicator {\n background-color: "+(n.bg||"#fff")+";\n }\n \n .rtabs-going-left .rtabs-indicator {\n transition: left 0.2s ease-in-out, right 0.2s ease-in-out 0.1s;\n }\n .rtabs-going-right .rtabs-indicator {\n transition: left 0.2s ease-in-out 0.1s, right 0.2s ease-in-out;\n }\n \n .rtabs-content-wrapper {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-grow: 2;\n overflow: hidden;\n }\n \n .rtabs-content-window {\n width: 100%;\n display: flex;\n flex-grow: 1;\n overflow-y: auto;\n overflow-x: hidden\n }\n \n .rtabs {\n color: "+(n.fg||"#222")+";\n background-color: "+(n.bg||"#fff")+";\n }\n \n .rtabs-contents {\n list-style: none;\n padding: 0;\n margin: 0;\n position: relative;\n left: 0;\n display: block;\n flex-wrap: nowrap;\n white-space: nowrap;\n width: 100%;\n }\n .rtabs-trans-slide > .rtabs-contents {\n transition: left 0.2s ease-in-out;\n }\n .rtabs-trans-fade > .rtabs-contents {\n transition: opacity 0.15s ease;\n opacity: 1;\n white-space: nowrap;\n }\n \n .rtabs-fill > div > div > .rtabs-contents {\n display: flex;\n }\n \n .rtabs-tab-content {\n position: relative;\n width: 100%;\n overflow: auto;\n vertical-align: top;\n white-space: initial;\n transition: opacity 0.1s ease-in-out;\n flex-shrink: 0;\n white-space: initial;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n \n .rtabs-placeholder {\n display: inline-block;\n width: 100%;\n height: 1px;\n flex-shrink: 0;\n }\n .rtabs-dyna.rtabs-not-selected {\n height: 1px;\n opacity: 0;\n overflow: hidden;\n }\n .rtabs-pad > .rtabs-tab-content {\n padding: 1em;\n box-sizing: border-box;\n }\n .rtabs-pad > .rtabs-tab-content.rtabs-no-pad {\n padding: 0;\n }\n .rtabs > .rtabs-tab-content.rtabs-pad {\n padding: 1em;\n box-sizing: border-box;\n }\n "+e.map(function(n){var e=Object.assign({},t("raui.primary"),t("raui.tabs.primary"),t("raui."+n),t("raui.tabs."+n));e.selected=Object.assign({},t("raui.tabs.selected"),t("raui.tabs.primary.selected"),t("raui.tabs."+n+".selected")),e.indicator=Object.assign({},t("raui.tabs.indicator"),t("raui.tabs.primary.indicator"),t("raui.tabs."+n+".indicator"));var i="boxy"in e?e.boxy:t("raui.tabs.boxy");return".rtabs."+n+" > div > .rtabs-tab-window {\n "+(i?"border-color: "+(e.bc||"#ccc")+";\n color: "+(e.fg||"#222")+";\n background-color: "+(e.bga||"#f4f4f4")+";\n ":"box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n color: "+(e.fg||"#222")+";\n background-color: "+(e.bg||"#fff")+";")+"\n }\n .rtabs."+n+" > .rtabs-tab-window-wrapper:before {\n background: linear-gradient(to right, "+(e.indicator.color||e.fga||"#07e")+", transparent);\n }\n .rtabs."+n+" > .rtabs-tab-window-wrapper:after {\n background: linear-gradient(to left, "+(e.indicator.color||e.fga||"#07e")+", transparent);\n }\n .rtabs."+n+".alt > div > .rtabs-tab-window {\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fga||"#07e")+";\n }"+(i?"\n .rtabs."+n+".alt > div > .rtabs-tab-window .rtabs-tab {\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fga||"#07e")+";\n }":"")+"\n \n "+(i?"\n .rtabs-flat."+n+" > div > .rtabs-tab-window {\n background-color: "+(e.bg||"#fff")+";\n }\n .alt.rtabs-flat."+n+" > div > .rtabs-tab-window {\n background-color: "+(e.fga||"#07e")+";\n }":".rtabs-flat."+n+" > div > .rtabs-tab-window:after {\n background-color: "+(e.bga||"#f4f4f4")+";\n }\n .rtabs-flat.alt."+n+" > div > .rtabs-tab-window:after {\n background-color: "+(e.fga||"#07e")+";\n }")+"\n \n "+(i?".rtabs."+n+" > div > .rtabs-tab-window .rtabs-tabs {\n border-color: "+(e.bc||"#ccc")+";\n }":"")+"\n \n .rtabs."+n+" > div > .rtabs-tab-window > .rtabs-tab {\n cursor: pointer;"+(i?"\n border-color: "+(e.bc||"#ccc")+";\n color: "+(e.fg||"#222")+";\n background-color: "+(e.bga||"#f4f4f4")+";\n ":"")+"\n }\n \n .rtabs."+n+" > div > .rtabs-tab-window .rtabs-selected"+(i?",\n .rtabs."+n+".alt > div > .rtabs-tab-window .rtabs-selected":"")+" {"+(i?"\n border-bottom-color: "+(them.bg||"#fff")+";\n background-color: "+(e.selected.bg||e.bg||"#fff")+";"+(e.indicator?"\n background-image: linear-gradient(to bottom, "+(e.indicator.color||e.fga||"#07e")+", "+(e.bg||"#fff")+" 3px);":"")+"\n color: "+(e.selected.fg||e.fg||"#222")+";":"")+"\n }\n \n .rtabs."+n+" > div > .rtabs-tab-window .rtabs-indicator {\n background-color: "+(e.indicator.color||e.fga||"#07e")+";\n }\n \n .rtabs."+n+".alt > div > .rtabs-tab-window .rtabs-indicator {\n background-color: "+(e.bg||"#fff")+";\n }\n \n .rtabs."+n+" {\n color: "+(e.fg||"#222")+";\n background-color: "+(e.bg||"#fff")+";\n }\n "}).join("\n")}.call(this,t)].join(" ")},attributes:["transition","flat","pad","center","height","fill","defer","selected"],data:function(){return{tabs:[],rightTabs:[],selected:-1,selectedContent:-1,opacity:1,scrollStatus:""}},on:{construct:function(){var t=this.component;if(!t)return;var n=t.template.f||[],e=t.template.m?t.template.m.slice():[],i=t.template;t.template={e:i.e,f:i.f,t:i.t,m:e};var s=n.filter(function(t){return"tab"===t.e}).map(function(t){var n,i={template:{t:t.f.filter(function(t){return"title"!==t.e})}},s=[],o=[];return t.m&&t.m.forEach(function(t){if(13===t.t&&~r.indexOf(t.n))if("disabled"===t.n&&t.f&&1===t.f.length&&2===t.f[0].t){var n="_cnd"+e.length;i.disabled=n,e.push({t:13,n:n,f:t.f})}else if("no-pad"===t.n)if(t.f){if(1===t.f.length&&2===t.f[0].t){var a="_cnd"+e.length;i.padRef=a,e.push({t:13,n:a,f:t.f})}}else i.pad=!1;else if("hidden"===t.n&&t.f&&1===t.f.length&&2===t.f[0].t){var l="_cnd"+e.length;i.hidden=l,e.push({t:13,n:l,f:t.f})}else i[t.n]=0===t.f||("string"==typeof t.f?t.f:{t:t.f});else 70===t.t?o.push(t):s.push(t)}),(n=t.f.find(function(t){return"title"===t.e}))&&(i.title=n.f,n.m&&o.push.apply(o,n.m)),s.length&&(i.extra={t:s}),o.length&&(i.extraTab={t:o}),i});this._ctabs=s},config:function(){var t=this;this._ctabs&&this.set("tabs",(this.get("tabs")||[]).concat(this._ctabs),{shuffle:!0}),this._ctabs=0;var n=this.get("tabs"),e=this.indicatorObservers=[];n.forEach(function(n){"string"==typeof n.hidden&&e.push(t.observe(n.hidden,function(){return setTimeout(function(){return t.updateIndicator()})},{init:!1,defer:!0}))}),e.push(this.observe("tabs.*.hidden",function(){return setTimeout(function(){return t.updateIndicator()})},{init:!1,defer:!0})),this.once("render",function(){var n=t.get("selected");-1===n?t.select(0):t.set("selectedContent",n)})},select:s,close:function(t,n){var e=this.getContext(this._tabs[n]),i=!0;"function"==typeof e.onclose&&(i=!1!==e.onclose.call(void 0));i&&e.element.events.find(function(t){return t.events.find(function(t){return"close"===t.name})})&&(i=!1!==e.raise("close"));i&&this.splice("tabs",n,1);return!1},teardown:function(){this.indicatorObservers.forEach(function(t){return t.cancel()})}},observe:{selected:{handler:function(t){var n=this,e=this._hidden(t),i=this.get("tabs");e&&setTimeout(function(){var e=n.get("transition");n.set("transition",""),n.select(t+1>=i.length?0:t+1),n.set("transition",e)})},init:!1},clientWidth:function(){this.updateIndicator()}},decorators:{registered:function(t,n){var e=this;return this._tabs||(this._tabs=[]),this._tabs[n]=t,this.updateIndicator(),{teardown:function(){},invalidate:function(){e.updateIndicator()},update:function(n){e._tabs[n]=t,setTimeout(function(){return e.updateIndicator()})}}},scrolled:function(t,n){void 0===n&&(n={});var e="string"==typeof n?n:n.bind;if("string"!=typeof e)return{teardown:function(){}};var i=n.allow||2,r=this.getContext(t);function s(){var n="";t.scrollHeight>t.clientHeight&&(n+="vscroll"),t.scrollWidth>t.clientWidth&&(n+=(n?" ":"")+"hscroll"),t.scrollTop<=i&&(n+=" top"),t.scrollTop>=t.scrollHeight-t.clientHeight-i&&(n+=" bottom"),~n.indexOf("top")||~n.indexOf("bottom")||(n+=" vmiddle"),t.scrollLeft<=i&&(n+=" left"),t.scrollLeft>=t.scrollWidth-t.clientWidth-i?n+=" right":~n.indexOf("left")||~n.indexOf("right")||(n+=" hmiddle"),r.set(e,n)}return t.addEventListener("scroll",s,{passive:!0}),requestAnimationFrame(s),{refresh:s,teardown:function(){t.removeEventListener("scroll",s)}}},sized:function(t,n){var e=n.context||this.getContext(t),i={position:t.style.position,overflowY:t.style.overflowY};""!==t.style.position&&"static"!==t.style.position||(t.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.setAttribute("tabindex","-1"),r.type="text/html";var s=function(){n.offsetWidth&&e.set(n.offsetWidth,t.offsetWidth),n.offsetHeight&&e.set(n.offsetHeight,t.offsetHeight),n.clientWidth&&e.set(n.clientWidth,t.clientWidth),n.clientHeight&&e.set(n.clientHeight,t.clientHeight),n.diffWidth&&e.set(n.diffWidth,t.offsetWidth-t.clientWidth),n.diffHeight&&e.set(n.diffHeight,t.offsetHeight-t.clientHeight)};return r.onload=function(){r.contentDocument.defaultView.addEventListener("resize",s),s()},/Trident/.test(navigator.userAgent)?(t.appendChild(r),r.data="about:blank"):(r.data="about:blank",t.appendChild(r)),{refresh:s,teardown:function(){t.removeChild(r),t.style.position=i.position,t.style.overflowY=i.overflowY}}}}});var o=function(t,n){this.tabs=t,this.item=n},a={keypath:{configurable:!0},id:{configurable:!0},index:{configurable:!0},title:{configurable:!0},template:{configurable:!0},hidden:{configurable:!0},right:{configurable:!0},pad:{configurable:!0},disabled:{configurable:!0},button:{configurable:!0},closable:{configurable:!0},load:{configurable:!0}};function l(t){return void 0===t&&(t={}),function(n){n.instance.components[t.name||"tabs"]=i}}a.keypath.get=function(){if(!this.removed)return"tabs."+this.index},a.id.get=function(){return this.get("id")},a.id.set=function(t){this.set("id",t)},a.index.get=function(){return this.tabs.get("tabs").indexOf(this.item)},a.title.get=function(){return this.get("title")},a.title.set=function(t){this.set("title",t)},a.template.get=function(){return this.get("template")},a.template.set=function(t){return this.set("template",t)},a.hidden.get=function(){return this.get("hidden")},a.hidden.set=function(t){return this.set("hidden",t)},a.right.get=function(){return this.get("right")},a.right.set=function(t){return this.set("right",t)},a.pad.get=function(){return this.get("pad")},a.pad.set=function(t){return this.set("pad",t)},a.disabled.get=function(){return this.get("disabled")},a.disabled.set=function(t){return this.set("disabled",t)},a.button.get=function(){return this.get("button")},a.button.set=function(t){return this.set("button",t)},a.closable.get=function(){return this.get("closable")},a.closable.set=function(t){return this.set("closable",t)},a.load.get=function(){return this.get("load")},a.load.set=function(t){return this.set("load",t)},o.prototype.select=function(){this.removed||this.tabs.select(this.index)},o.prototype.remove=function(){return!this.removed&&(this.tabs.splice("tabs",this.index,1),this.removed=!0,!0)},o.prototype.get=function(t){if(this.removed)return!1;if(!t)return this.tabs.get(this.keypath);var n=t.replace(/^[\.\/]*/,"");return this.tabs.get(this.keypath+"."+n)},o.prototype.set=function(t,n){if(this.removed)return!1;var e=t.replace(/^[\.\/]*/,"");return this.tabs.set(this.keypath+"."+e,n)},Object.defineProperties(o.prototype,a),function(t,n,i){if(e&&e.Ractive&&"object"==typeof e.Ractive[n]){var r=document.currentScript;if(r||(r=(r=document.querySelectorAll("script"))[r.length-1]),r){var s=r.getAttribute("data-alias");s&&(s=(s=s.split("&")).reduce(function(t,n){var e=n.split("="),i=e[0],r=e[1];return t[i]=r,t},{})),Ractive[n][s&&s[t]||t]=i}}}("RMTabs","components",i),t.Tabs=i,t.Handle=o,t.plugin=l,t.default=l,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.RMTabs={},t.Ractive)}(this,function(t,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var e="undefined"!=typeof window?window:null;var i=function(t){function n(n){t.call(this,n)}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var e={visibleSelection:{configurable:!0}};return n.prototype.addTab=function(t,n){t.template||(t.template=[]),"number"==typeof n?this.splice("tabs",n,0,t):this.push("tabs",t);var e=new o(this,t);return t.select&&this.select(e.index),e},n.prototype.getTab=function(t){var n=this.get("tabs"),e=n.find(function(n){return n.id===t});return e?new o(this,e):t in n&&"object"==typeof n[t]?new o(this,n[t]):void 0},n.prototype.updateIndicator=function(){if(this.rendered&&this._tabs){var t=this.getContext(this.find(".rtabs-tab-window"));if(t.decorators.scrolled&&t.decorators.scrolled.refresh(),!this.get("@style.raui.tabs.boxy")){var n=this._tabs[this.get("selected")];if(n&&n.offsetParent)if(n){var e=this.get("selectedLeft");if(void 0===e)this.set({selectedLeft:n.offsetLeft,selectedRight:n.offsetParent.clientWidth-(n.offsetLeft+n.offsetWidth)});else{var i=n.offsetParent.clientWidth,r=n.offsetLeft,s=i-r-n.clientWidth;this.set({direction:r<e?"left":"right",selectedLeft:r,selectedRight:s})}}else this.set({selectedLeft:0,selectedRight:this.find(".tabs").offsetWidth})}}},n.prototype.checkSelection=function(t,n){this.get("selected")!==n&&s.call(this,t,n)},n.prototype.select=function(t){t<0||t>=(this.get("tabs.length")||0)||this.fire("select",{},t)},n.prototype._hidden=function(t){var n=this,e=this.get("tabs."+t+".hidden");return"string"==typeof e&&(e=this.get(e)),setTimeout(function(){e&&n.get("selected")===t&&n.select(0)}),e},n.prototype.stopHorizontalScroll=function(t){t.scrollLeft&&(t.scrollLeft=0)},n.prototype._scrollsRight=function(){var t=this.get("scrollStatus")||"";if(/hscroll.*(hmiddle|left)/.test(t)&&!/right/.test(t))return!0},n.prototype._scrollsLeft=function(){var t=this.get("scrollStatus")||"";if(/hscroll.*(hmiddle|right)/.test(t)&&!/left/.test(t))return!0},e.visibleSelection.get=function(){for(var t=0,n=this.get("tabs"),e=this.get("selected"),i=0;i<n.length;i++){var r=n[i];if(e===i)return t;var s=r.hidden;"string"==typeof s&&(s=this.get(s)),s||t++}return t},Object.defineProperties(n.prototype,e),n}(n),r=["closable","disabled","title","right","button","no-pad","hidden","id","load"];function s(t,n){var e,i=this;if(!(n<-1||n>=this.get("tabs.length"))){var r=this.get("selected"),s=this.get("transition");if(this._fadetm&&(this.set("opacity",1),clearTimeout(this._fadetm),this._fadetm=0),r!==n)if(this.rendered){var o=this.getContext(this.find(".rtabs-selected")),a=this.find(".rtabs-content-window");if(~r&&this.set("scroll."+o.get("@index"),a.scrollTop),o.hasListener("leave")&&o.raise("leave"),"fade"===s){this.set({opacity:0,selected:n}),this.updateIndicator();var l=this.getContext(this.find(".rtabs-selected"));this._fadetm=setTimeout(function(){var t;i._fadetm=0,i.set(((t={selectedContent:n})["tabs."+n+".load"]=!0,t.opacity=1,t)),l.hasListener("enter")&&l.raise("enter"),a&&~r&&(a.scrollTop=i.get("scroll."+n)||0)},150)}else if("slide"===s){this.set("selected",n),this.set("tabs."+n+".load",!0),this.set("selectedContent",n),this.updateIndicator();var c=this.getContext(this.find(".rtabs-selected"));c.hasListener("enter")&&c.raise("enter"),a&&~r&&(a.scrollTop=this.get("scroll."+n)||0)}else{this.set(((e={selected:n})["tabs."+n+".load"]=!0,e.selectedContent=n,e)),this.updateIndicator();var d=this.getContext(this.find(".rtabs-selected"));d.hasListener("enter")&&d.raise("enter"),a&&(a.scrollTop=this.get("scroll."+n)||0)}~r&&a&&a.scrollLeft&&(a.scrollLeft=0)}else this.set({selected:n,selectedContent:n})}}n.extendWith(i,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs",g:1},{t:16,r:"extra-attributes"},{n:"class-rtabs-flat",t:13,f:[{t:2,r:"~/flat"}]},{n:"class-rtabs-margin",t:13,f:[{t:2,r:"~/margin"}]},{n:"class-rtabs-fill",t:13,f:[{t:2,r:"~/fill"}]},{n:"sized",t:71,f:{r:[],s:'[{clientWidth:"~/clientWidth"}]'}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window-wrapper",g:1},{n:"class-rtabs-scroll-right",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsRight()"}}]},{n:"class-rtabs-scroll-left",t:13,f:[{t:2,x:{r:["@this"],s:"_0._scrollsLeft()"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-window",g:1},{t:4,f:[{n:"class-rtabs-going-left",t:13}],n:50,x:{r:[".direction"],s:'_0==="left"'}},{t:4,f:[{n:"class-rtabs-going-right",t:13}],n:51,l:1},{n:"scrolled",t:71,f:{r:[],s:'["~/scrollStatus"]'}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-left",g:1},{n:"class-rtabs-center",t:13,f:[{t:2,r:"~/center"}]}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"!_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-right",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:"tab"}],n:50,x:{r:[".right","@this","@index"],s:"_0&&!_1._hidden(_2)"}}],n:52,r:".tabs"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-indicator",g:1},{n:"style-left",f:[{t:2,r:".selectedLeft"},"px"],t:13},{t:4,f:[{n:"style-right",f:[{t:2,r:".selectedRight"},"px"],t:13}],n:50,x:{r:[".selectedRight"],s:"_0!==undefined"}}]}],n:51,r:"@style.raui.tabs.boxy"}]}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-wrapper",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-content-window",g:1},{t:4,f:[{n:"class-rtabs-trans-fade",t:13}],n:50,x:{r:[".transition"],s:'_0==="fade"'}},{t:4,f:[{n:"class-rtabs-trans-slide",t:13}],n:50,x:{r:[".transition"],s:'_0==="slide"'},l:1},{n:["scroll"],t:70,f:{r:["@this","@node"],s:"[_0.stopHorizontalScroll(_1)]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-contents",g:1},{n:"style-opacity",f:[{t:2,r:"~/opacity"}],t:13},{n:"style-left",f:[{t:2,x:{r:[".selectedContent"],s:"_0*-100"}},"%"],t:13},{n:"class-rtabs-pad",t:13,f:[{t:2,r:"~/pad"}]}],f:[{t:4,f:[{t:8,r:"tab-content"}],n:52,r:".tabs"}]}]}]}]}],e:{'[{clientWidth:"~/clientWidth"}]':function(){return[{clientWidth:"~/clientWidth"}]},"_0._scrollsRight()":function(t){return t._scrollsRight()},"_0._scrollsLeft()":function(t){return t._scrollsLeft()},'_0==="left"':function(t){return"left"===t},'["~/scrollStatus"]':function(){return["~/scrollStatus"]},"!_0&&!_1._hidden(_2)":function(t,n,e){return!t&&!n._hidden(e)},"_0&&!_1._hidden(_2)":function(t,n,e){return t&&!n._hidden(e)},"_0!==undefined":function(t){return void 0!==t},'_0==="fade"':function(t){return"fade"===t},'_0==="slide"':function(t){return"slide"===t},"[_0.stopHorizontalScroll(_1)]":function(t,n){return[t.stopHorizontalScroll(n)]},"_0*-100":function(t){return-100*t},"_0===_1":function(t,n){return t===n},'_0==="dynamic"':function(t){return"dynamic"===t},"_0!==_1":function(t,n){return t!==n},"_0===false":function(t){return!1===t},"[_0.checkSelection((_1),_2)]":function(t,n,e){return[t.checkSelection(n,e)]},'(_3==="always"&&_0===_1)||(_3&&_2)||!_3':function(t,n,e,i){return"always"===i&&t===n||i&&e||!i},"!_0":function(t){return!t},"_0===_1&&!_2":function(t,n,e){return t===n&&!e},'typeof _1==="string"?_0.get(_1):_1':function(t,n){return"string"==typeof n?t.get(n):n},'[["select",_0]]':function(t){return[["select",t]]},"[_0.button()]":function(t){return[t.button()]},'typeof _0==="function"':function(t){return"function"==typeof t},"[_0]":function(t){return[t]},'typeof _0==="string"':function(t){return"string"==typeof t},'[["close",_0]]':function(t){return[["close",t]]},"_0&&!_1":function(t,n){return t&&!n}},p:{"tab-content":[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab-content",g:1},{n:"class-rtabs-selected-content",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0===_1"}}]},{n:"class-rtabs-dyna",t:13,f:[{t:2,x:{r:["~/height"],s:'_0==="dynamic"'}}]},{n:"class-rtabs-not-selected",t:13,f:[{t:2,x:{r:["~/selectedContent","@index"],s:"_0!==_1"}}]},{t:4,f:[{t:16,r:".extra"}],n:50,r:".extra"},{t:4,f:[{n:"class-rtabs-no-pad",t:13}],n:50,x:{r:[".pad"],s:"_0===false"}},{t:4,f:[{n:"class-rtabs-no-pad",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".padRef"}]}}]}],n:50,r:".padRef",l:1},{n:["focusin"],t:70,f:{r:["@this","@context","@index"],s:"[_0.checkSelection((_1),_2)]"}}],f:[{t:4,f:[{t:16,r:".template"}],n:50,x:{r:["~/selectedContent","@index",".load","~/defer"],s:'(_3==="always"&&_0===_1)||(_3&&_2)||!_3'}}]}],n:50,x:{r:[".button"],s:"!_0"}},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-placeholder",g:1}]}],n:51,l:1}],tab:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-tab",g:1},{n:"class-rtabs-selected",t:13,f:[{t:2,x:{r:["~/selected","@index",".button"],s:"_0===_1&&!_2"}}]},{t:4,f:[{n:"class-rtabs-disabled",t:13}],n:50,x:{r:["@this",".disabled"],s:'typeof _1==="string"?_0.get(_1):_1'}},{t:4,f:[{n:["click"],t:70,f:{r:["@index"],s:'[["select",_0]]'}}],n:50,x:{r:[".button"],s:"!_0"},l:1},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.button()]"}}],n:50,x:{r:[".button"],s:'typeof _0==="function"'},l:1},{n:"registered",t:71,f:{r:["@index"],s:"[_0]"}},{t:4,f:[{t:16,r:".extraTab"}],n:50,r:".extraTab"},{n:"data-tab-index",f:[{t:2,r:"@index"}],t:13}],f:[{t:4,f:[{t:2,r:"title"}],n:50,x:{r:[".title"],s:'typeof _0==="string"'}},{t:4,f:[{t:16,r:".title"}],n:50,r:".title",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtabs-close",g:1},{n:["click"],t:70,f:{r:["@index"],s:'[["close",_0]]'}}],f:["×"]}],n:50,x:{r:[".closable",".button"],s:"_0&&!_1"}}]}]}},cssId:"rtab",noCssTransform:!0,css:function(t){return[function(t){var n=Object.assign({},t("raui.primary"),t("raui.tabs.primary"));n.selected=Object.assign({},t("raui.tabs.selected"),t("raui.tabs.primary.selected")),n.indicator=Object.assign({},t("raui.tabs.indicator"),t("raui.tabs.primary.indicator"));var e=(t("raui.themes")||[]).slice();(t("raui.tabs.themes")||[]).forEach(function(t){~e.indexOf(t)||e.push(t)});var i=t("raui.tabs.boxy")||t("raui.tabs.primary.boxy");return"\n .rtabs {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n \n .rtabs-tab-window {\n overflow-y: hidden;\n overflow-x: auto;\n "+(i?"border-color: "+(n.bc||"#ccc")+";\n border-style: solid;\n border-width: 1px 1px 0 1px;\n color: "+(n.fg||"#222")+";\n background-color: "+(n.bga||"#f4f4f4")+";\n ":"box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n color: "+(n.fg||"#222")+";\n background-color: "+(n.bg||"#fff")+";")+"\n position: relative;\n flex-shrink: 0;\n }\n .alt > div > .rtabs-tab-window {\n color: "+(n.bg||"#fff")+";\n background-color: "+(n.fga||"#07e")+";\n }"+(i?"\n .alt > div > .rtabs-tab-window .rtabs-tab {\n color: "+(n.bg||"#fff")+";\n background-color: "+(n.fga||"#07e")+";\n }":"")+"\n \n .rtabs-tab-window-wrapper {\n position: relative;\n z-index: 10;\n }\n .rtabs-tab-window-wrapper:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n background: linear-gradient(to right, "+(n.indicator.color||n.fga||"#07e")+", transparent);\n z-index: 999;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-left:before {\n opacity: 1;\n }\n \n .rtabs-tab-window-wrapper:after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n width: 10px;\n opacity: 0;\n background: linear-gradient(to left, "+(n.indicator.color||n.fga||"#07e")+", transparent);\n transition: opacity 0.3s ease-in-out;\n pointer-events: none;\n }\n .rtabs-tab-window-wrapper.rtabs-scroll-right:after {\n opacity: 1;\n }\n \n .rtabs-flat > div > .rtabs-tab-window {\n box-shadow: none;\n border-width: 0;\n }\n "+(i?"\n .rtabs-flat > div > .rtabs-tab-window {\n background-color: "+(n.bg||"#fff")+";\n }\n .alt.rtabs-flat > div > .rtabs-tab-window {\n background-color: "+(n.fga||"#07e")+";\n }\n .rtabs-flat > div > .rtabs-tab-window .rtabs-tab {\n border-top-width: 1px;\n }":".rtabs-flat > div > .rtabs-tab-window:after {\n content: '';\n height: 0.15em;\n position: absolute;\n bottom: 0px;\n width: 100%;\n display: block;\n background-color: "+(n.bga||"#f4f4f4")+";\n }\n .rtabs-flat.alt > div > .rtabs-tab-window:after {\n background-color: "+(n.fga||"#07e")+";\n }")+"\n \n .rtabs-center.rtabs-left {\n text-align: center;\n }"+(i?"\n .rtabs-center > .rtabs-tab:first-child {\n border-left-width: 1px;\n }":"")+"\n \n .rtabs-pad {\n padding: 1em;\n }\n \n .rtabs-fill {\n flex-grow: 1;\n height: 100%;\n }\n \n .rtabs-tabs {\n display: table;\n position: relative;\n min-width: 100%;\n white-space: nowrap;"+(i?"\n border-style: solid;\n border-width: 0 0 1px 0;\n border-color: "+(n.bc||"#ccc")+";\n line-height: 1.5em;":"")+"\n }\n \n .rtabs-tab {\n display: inline-block;\n box-sizing: border-box;\n padding: 0.5em 1em;\n height: 2.5em;\n transition: opacity 0.2s ease-in-out;\n user-select: none;\n cursor: pointer;"+(i?"\n border-color: "+(n.bc||"#ccc")+";\n border-style: solid;\n border-width: 0 1px 1px 0;\n margin-bottom: -1px;\n color: "+(n.fg||"#222")+";\n background-color: "+(n.bga||"#f4f4f4")+";\n ":"\n opacity: 0.9;")+"\n }\n .rtabs-tab:hover {\n opacity: 1;\n }\n \n .rtabs-selected"+(i?",\n .alt > div > .rtabs-tab-window .rtabs-selected":"")+" {\n opacity: 1;"+(i?"\n font-weight: bold;\n border-bottom-color: "+(n.bg||"#fff")+";\n background-color: "+(n.selected.bg||n.bg||"#fff")+";\n color: "+(n.selected.fg||n.fg||"#222")+";":"")+"\n }\n \n .rtabs-disabled {\n opacity: 0.4;\n }\n \n .rtabs-right {\n text-align: right;\n display: table-cell;\n }\n \n .rtabs-left {\n text-align: left;\n display: table-cell;\n }\n \n .rtabs-close {\n display: inline-block;\n margin-right: -0.5em;\n font-weight: 700;\n opacity: 0.3;\n transition: opacity: 0.2s ease-in-out;\n }\n \n .rtabs-close:hover {\n opacity: 1;\n }\n \n .rtabs-indicator {\n position: absolute;\n bottom: 0;\n height: 0.15em;\n background-color: "+(n.indicator.color||n.fga||"#07e")+";\n z-index: 2;\n }\n \n .alt > div > .rtabs-tab-window .rtabs-indicator {\n background-color: "+(n.bg||"#fff")+";\n }\n \n .rtabs-going-left .rtabs-indicator {\n transition: left 0.2s ease-in-out, right 0.2s ease-in-out 0.1s;\n }\n .rtabs-going-right .rtabs-indicator {\n transition: left 0.2s ease-in-out 0.1s, right 0.2s ease-in-out;\n }\n \n .rtabs-content-wrapper {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-grow: 2;\n overflow: hidden;\n }\n \n .rtabs-content-window {\n width: 100%;\n display: flex;\n flex-grow: 1;\n overflow-y: auto;\n overflow-x: hidden\n }\n \n .rtabs {\n color: "+(n.fg||"#222")+";\n background-color: "+(n.bg||"#fff")+";\n }\n \n .rtabs-contents {\n list-style: none;\n padding: 0;\n margin: 0;\n position: relative;\n left: 0;\n display: flex;\n flex-wrap: nowrap;\n white-space: nowrap;\n width: 100%;\n }\n .rtabs-trans-slide > .rtabs-contents {\n transition: left 0.2s ease-in-out;\n }\n .rtabs-trans-fade > .rtabs-contents {\n transition: opacity 0.15s ease;\n opacity: 1;\n white-space: nowrap;\n }\n \n .rtabs-fill > div > div > .rtabs-contents {\n display: flex;\n }\n \n .rtabs-tab-content {\n position: relative;\n width: 100%;\n overflow: auto;\n vertical-align: top;\n white-space: initial;\n transition: opacity 0.1s ease-in-out;\n flex-shrink: 0;\n white-space: initial;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n \n .rtabs-placeholder {\n display: inline-block;\n width: 100%;\n height: 1px;\n flex-shrink: 0;\n }\n .rtabs-dyna.rtabs-not-selected {\n height: 1px;\n opacity: 0;\n overflow: hidden;\n }\n .rtabs-pad > .rtabs-tab-content {\n padding: 1em;\n box-sizing: border-box;\n }\n .rtabs-pad > .rtabs-tab-content.rtabs-no-pad {\n padding: 0;\n }\n .rtabs > .rtabs-tab-content.rtabs-pad {\n padding: 1em;\n box-sizing: border-box;\n }\n "+e.map(function(n){var e=Object.assign({},t("raui.primary"),t("raui.tabs.primary"),t("raui."+n),t("raui.tabs."+n));e.selected=Object.assign({},t("raui.tabs.selected"),t("raui.tabs.primary.selected"),t("raui.tabs."+n+".selected")),e.indicator=Object.assign({},t("raui.tabs.indicator"),t("raui.tabs.primary.indicator"),t("raui.tabs."+n+".indicator"));var i="boxy"in e?e.boxy:t("raui.tabs.boxy");return".rtabs."+n+" > div > .rtabs-tab-window {\n "+(i?"border-color: "+(e.bc||"#ccc")+";\n color: "+(e.fg||"#222")+";\n background-color: "+(e.bga||"#f4f4f4")+";\n ":"box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n color: "+(e.fg||"#222")+";\n background-color: "+(e.bg||"#fff")+";")+"\n }\n .rtabs."+n+" > .rtabs-tab-window-wrapper:before {\n background: linear-gradient(to right, "+(e.indicator.color||e.fga||"#07e")+", transparent);\n }\n .rtabs."+n+" > .rtabs-tab-window-wrapper:after {\n background: linear-gradient(to left, "+(e.indicator.color||e.fga||"#07e")+", transparent);\n }\n .rtabs."+n+".alt > div > .rtabs-tab-window {\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fga||"#07e")+";\n }"+(i?"\n .rtabs."+n+".alt > div > .rtabs-tab-window .rtabs-tab {\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fga||"#07e")+";\n }":"")+"\n \n "+(i?"\n .rtabs-flat."+n+" > div > .rtabs-tab-window {\n background-color: "+(e.bg||"#fff")+";\n }\n .alt.rtabs-flat."+n+" > div > .rtabs-tab-window {\n background-color: "+(e.fga||"#07e")+";\n }":".rtabs-flat."+n+" > div > .rtabs-tab-window:after {\n background-color: "+(e.bga||"#f4f4f4")+";\n }\n .rtabs-flat.alt."+n+" > div > .rtabs-tab-window:after {\n background-color: "+(e.fga||"#07e")+";\n }")+"\n \n "+(i?".rtabs."+n+" > div > .rtabs-tab-window .rtabs-tabs {\n border-color: "+(e.bc||"#ccc")+";\n }":"")+"\n \n .rtabs."+n+" > div > .rtabs-tab-window > .rtabs-tab {\n cursor: pointer;"+(i?"\n border-color: "+(e.bc||"#ccc")+";\n color: "+(e.fg||"#222")+";\n background-color: "+(e.bga||"#f4f4f4")+";\n ":"")+"\n }\n \n .rtabs."+n+" > div > .rtabs-tab-window .rtabs-selected"+(i?",\n .rtabs."+n+".alt > div > .rtabs-tab-window .rtabs-selected":"")+" {"+(i?"\n border-bottom-color: "+(them.bg||"#fff")+";\n background-color: "+(e.selected.bg||e.bg||"#fff")+";"+(e.indicator?"\n background-image: linear-gradient(to bottom, "+(e.indicator.color||e.fga||"#07e")+", "+(e.bg||"#fff")+" 3px);":"")+"\n color: "+(e.selected.fg||e.fg||"#222")+";":"")+"\n }\n \n .rtabs."+n+" > div > .rtabs-tab-window .rtabs-indicator {\n background-color: "+(e.indicator.color||e.fga||"#07e")+";\n }\n \n .rtabs."+n+".alt > div > .rtabs-tab-window .rtabs-indicator {\n background-color: "+(e.bg||"#fff")+";\n }\n \n .rtabs."+n+" {\n color: "+(e.fg||"#222")+";\n background-color: "+(e.bg||"#fff")+";\n }\n "}).join("\n")}.call(this,t)].join(" ")},attributes:["transition","flat","pad","center","height","fill","defer","selected"],data:function(){return{tabs:[],rightTabs:[],selected:-1,selectedContent:-1,opacity:1,scrollStatus:""}},on:{construct:function(){var t=this.component;if(!t)return;var n=t.template.f||[],e=t.template.m?t.template.m.slice():[],i=t.template;t.template={e:i.e,f:i.f,t:i.t,m:e};var s=n.filter(function(t){return"tab"===t.e}).map(function(t){var n,i={template:{t:t.f.filter(function(t){return"title"!==t.e})}},s=[],o=[];return t.m&&t.m.forEach(function(t){if(13===t.t&&~r.indexOf(t.n))if("disabled"===t.n&&t.f&&1===t.f.length&&2===t.f[0].t){var n="_cnd"+e.length;i.disabled=n,e.push({t:13,n:n,f:t.f})}else if("no-pad"===t.n)if(t.f){if(1===t.f.length&&2===t.f[0].t){var a="_cnd"+e.length;i.padRef=a,e.push({t:13,n:a,f:t.f})}}else i.pad=!1;else if("hidden"===t.n&&t.f&&1===t.f.length&&2===t.f[0].t){var l="_cnd"+e.length;i.hidden=l,e.push({t:13,n:l,f:t.f})}else i[t.n]=0===t.f||("string"==typeof t.f?t.f:{t:t.f});else 70===t.t?o.push(t):s.push(t)}),(n=t.f.find(function(t){return"title"===t.e}))&&(i.title=n.f,n.m&&o.push.apply(o,n.m)),s.length&&(i.extra={t:s}),o.length&&(i.extraTab={t:o}),i});this._ctabs=s},config:function(){var t=this;this._ctabs&&this.set("tabs",(this.get("tabs")||[]).concat(this._ctabs),{shuffle:!0}),this._ctabs=0;var n=this.get("tabs"),e=this.indicatorObservers=[];n.forEach(function(n){"string"==typeof n.hidden&&e.push(t.observe(n.hidden,function(){return setTimeout(function(){return t.updateIndicator()})},{init:!1,defer:!0}))}),e.push(this.observe("tabs.*.hidden",function(){return setTimeout(function(){return t.updateIndicator()})},{init:!1,defer:!0})),this.once("render",function(){var n=t.get("selected");-1===n?t.select(0):t.set("selectedContent",n)})},select:s,close:function(t,n){var e=this.getContext(this._tabs[n]),i=!0;"function"==typeof e.onclose&&(i=!1!==e.onclose.call(void 0));i&&e.element.events.find(function(t){return t.events.find(function(t){return"close"===t.name})})&&(i=!1!==e.raise("close"));i&&this.splice("tabs",n,1);return!1},teardown:function(){this.indicatorObservers.forEach(function(t){return t.cancel()})}},observe:{selected:{handler:function(t){var n=this,e=this._hidden(t),i=this.get("tabs");e&&setTimeout(function(){var e=n.get("transition");n.set("transition",""),n.select(t+1>=i.length?0:t+1),n.set("transition",e)})},init:!1},clientWidth:function(){this.updateIndicator()}},decorators:{registered:function(t,n){var e=this;return this._tabs||(this._tabs=[]),this._tabs[n]=t,this.updateIndicator(),{teardown:function(){},invalidate:function(){e.updateIndicator()},update:function(n){e._tabs[n]=t,setTimeout(function(){return e.updateIndicator()})}}},scrolled:function(t,n){void 0===n&&(n={});var e="string"==typeof n?n:n.bind;if("string"!=typeof e)return{teardown:function(){}};var i=n.allow||2,r=this.getContext(t);function s(){var n="";t.scrollHeight>t.clientHeight&&(n+="vscroll"),t.scrollWidth>t.clientWidth&&(n+=(n?" ":"")+"hscroll"),t.scrollTop<=i&&(n+=" top"),t.scrollTop>=t.scrollHeight-t.clientHeight-i&&(n+=" bottom"),~n.indexOf("top")||~n.indexOf("bottom")||(n+=" vmiddle"),t.scrollLeft<=i&&(n+=" left"),t.scrollLeft>=t.scrollWidth-t.clientWidth-i?n+=" right":~n.indexOf("left")||~n.indexOf("right")||(n+=" hmiddle"),r.set(e,n)}return t.addEventListener("scroll",s,{passive:!0}),requestAnimationFrame(s),{refresh:s,teardown:function(){t.removeEventListener("scroll",s)}}},sized:function(t,n){var e=n.context||this.getContext(t),i={position:t.style.position,overflowY:t.style.overflowY};""!==t.style.position&&"static"!==t.style.position||(t.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.setAttribute("tabindex","-1"),r.type="text/html";var s=function(){n.offsetWidth&&e.set(n.offsetWidth,t.offsetWidth),n.offsetHeight&&e.set(n.offsetHeight,t.offsetHeight),n.clientWidth&&e.set(n.clientWidth,t.clientWidth),n.clientHeight&&e.set(n.clientHeight,t.clientHeight),n.diffWidth&&e.set(n.diffWidth,t.offsetWidth-t.clientWidth),n.diffHeight&&e.set(n.diffHeight,t.offsetHeight-t.clientHeight)};return r.onload=function(){r.contentDocument.defaultView.addEventListener("resize",s),s()},/Trident/.test(navigator.userAgent)?(t.appendChild(r),r.data="about:blank"):(r.data="about:blank",t.appendChild(r)),{refresh:s,teardown:function(){t.removeChild(r),t.style.position=i.position,t.style.overflowY=i.overflowY}}}}});var o=function(t,n){this.tabs=t,this.item=n},a={keypath:{configurable:!0},id:{configurable:!0},index:{configurable:!0},title:{configurable:!0},template:{configurable:!0},hidden:{configurable:!0},right:{configurable:!0},pad:{configurable:!0},disabled:{configurable:!0},button:{configurable:!0},closable:{configurable:!0},load:{configurable:!0}};function l(t){return void 0===t&&(t={}),function(n){n.instance.components[t.name||"tabs"]=i}}a.keypath.get=function(){if(!this.removed)return"tabs."+this.index},a.id.get=function(){return this.get("id")},a.id.set=function(t){this.set("id",t)},a.index.get=function(){return this.tabs.get("tabs").indexOf(this.item)},a.title.get=function(){return this.get("title")},a.title.set=function(t){this.set("title",t)},a.template.get=function(){return this.get("template")},a.template.set=function(t){return this.set("template",t)},a.hidden.get=function(){return this.get("hidden")},a.hidden.set=function(t){return this.set("hidden",t)},a.right.get=function(){return this.get("right")},a.right.set=function(t){return this.set("right",t)},a.pad.get=function(){return this.get("pad")},a.pad.set=function(t){return this.set("pad",t)},a.disabled.get=function(){return this.get("disabled")},a.disabled.set=function(t){return this.set("disabled",t)},a.button.get=function(){return this.get("button")},a.button.set=function(t){return this.set("button",t)},a.closable.get=function(){return this.get("closable")},a.closable.set=function(t){return this.set("closable",t)},a.load.get=function(){return this.get("load")},a.load.set=function(t){return this.set("load",t)},o.prototype.select=function(){this.removed||this.tabs.select(this.index)},o.prototype.remove=function(){return!this.removed&&(this.tabs.splice("tabs",this.index,1),this.removed=!0,!0)},o.prototype.get=function(t){if(this.removed)return!1;if(!t)return this.tabs.get(this.keypath);var n=t.replace(/^[\.\/]*/,"");return this.tabs.get(this.keypath+"."+n)},o.prototype.set=function(t,n){if(this.removed)return!1;var e=t.replace(/^[\.\/]*/,"");return this.tabs.set(this.keypath+"."+e,n)},Object.defineProperties(o.prototype,a),function(t,n,i){if(e&&e.Ractive&&"object"==typeof e.Ractive[n]){var r=document.currentScript;if(r||(r=(r=document.querySelectorAll("script"))[r.length-1]),r){var s=r.getAttribute("data-alias");s&&(s=(s=s.split("&")).reduce(function(t,n){var e=n.split("="),i=e[0],r=e[1];return t[i]=r,t},{})),Ractive[n][s&&s[t]||t]=i}}}("RMTabs","components",i),t.Tabs=i,t.Handle=o,t.plugin=l,t.default=l,Object.defineProperty(t,"__esModule",{value:!0})}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
2612833
-0.02%29115
050
8.7%