diff --git a/assets/js/docs.min.js b/assets/js/docs.min.js index 98ff73ccc..6cb8d4972 100644 --- a/assets/js/docs.min.js +++ b/assets/js/docs.min.js @@ -17,7 +17,7 @@ Issues: https://github.com/imsky/holder/issues License: MIT */ -!function(r){if(r.document){var o=r.document;o.querySelectorAll||(o.querySelectorAll=function(e){var t,n=o.createElement("style"),i=[];for(o.documentElement.firstChild.appendChild(n),o._qsa=[],n.styleSheet.cssText=e+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",r.scrollBy(0,0),n.parentNode.removeChild(n);o._qsa.length;)t=o._qsa.shift(),t.style.removeAttribute("x-qsa"),i.push(t);return o._qsa=null,i}),o.querySelector||(o.querySelector=function(e){var t=o.querySelectorAll(e);return t.length?t[0]:null}),o.getElementsByClassName||(o.getElementsByClassName=function(e){return e=String(e).replace(/^|\s+/g,"."),o.querySelectorAll(e)}),Object.keys||(Object.keys=function(e){if(e!==Object(e))throw TypeError("Object.keys called on non-object");var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);return n}),Array.prototype.forEach||(Array.prototype.forEach=function(e){if(void 0===this||null===this)throw TypeError();var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw TypeError();var i,r=arguments[1];for(i=0;i>16&255)),i.push(String.fromCharCode(r>>8&255)),i.push(String.fromCharCode(255&r)),o=0,r=0),n+=1;return 12===o?(r>>=4,i.push(String.fromCharCode(255&r))):18===o&&(r>>=2,i.push(String.fromCharCode(r>>8&255)),i.push(String.fromCharCode(255&r))),i.join("")},e.btoa=e.btoa||function(e){e=String(e);var t,n,i,r,o,a,s,l=0,c=[];if(/[^\x00-\xFF]/.test(e))throw Error("InvalidCharacterError");for(;l>2,o=(3&t)<<4|n>>4,a=(15&n)<<2|i>>6,s=63&i,l===e.length+2?(a=64,s=64):l===e.length+1&&(s=64),c.push(u.charAt(r),u.charAt(o),u.charAt(a),u.charAt(s));return c.join("")}}(r),Object.prototype.hasOwnProperty||(Object.prototype.hasOwnProperty=function(e){var t=this.__proto__||this.constructor.prototype;return e in this&&(!(e in t)||t[e]!==this[e])}),function(){if("performance"in r==!1&&(r.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in r.performance==!1){var e=Date.now();performance.timing&&performance.timing.navigationStart&&(e=performance.timing.navigationStart),r.performance.now=function(){return Date.now()-e}}}(),r.requestAnimationFrame||(r.webkitRequestAnimationFrame&&r.webkitCancelAnimationFrame?!function(t){t.requestAnimationFrame=function(e){return webkitRequestAnimationFrame(function(){e(t.performance.now())})},t.cancelAnimationFrame=t.webkitCancelAnimationFrame}(r):r.mozRequestAnimationFrame&&r.mozCancelAnimationFrame?!function(t){t.requestAnimationFrame=function(e){return mozRequestAnimationFrame(function(){e(t.performance.now())})},t.cancelAnimationFrame=t.mozCancelAnimationFrame}(r):!function(t){t.requestAnimationFrame=function(e){return t.setTimeout(e,1e3/60)},t.cancelAnimationFrame=t.clearTimeout}(r))}}(this),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Holder=t():e.Holder=t()}(this,function(){return function(n){function i(e){if(r[e])return r[e].exports;var t=r[e]={exports:{},id:e,loaded:!1};return n[e].call(t.exports,t,t.exports,i),t.loaded=!0,t.exports}var r={};return i.m=n,i.c=r,i.p="",i(0)}([function(e,t,n){e.exports=n(1)},function(D,e,F){(function(h){function o(e,t,n,i){var r=f(n.substr(n.lastIndexOf(e.domain)),e);r&&d({mode:null,el:i,flags:r,engineSettings:t})}function f(e,t){var n={theme:S(j.settings.themes.gray,null),stylesheets:t.stylesheets,instanceOptions:t},i=e.indexOf("?"),r=[e];i!==-1&&(r=[e.slice(0,i),e.slice(i+1)]);var o=r[0].split("/");n.holderURL=e;var a=o[1],s=a.match(/([\d]+p?)x([\d]+p?)/);if(!s)return!1;if(n.fluid=a.indexOf("p")!==-1,n.dimensions={width:s[1].replace("p","%"),height:s[2].replace("p","%")},2===r.length){var l=p.parse(r[1]);if(b.truthy(l.ratio)){n.fluid=!0;var c=parseFloat(n.dimensions.width.replace("%","")),u=parseFloat(n.dimensions.height.replace("%",""));u=Math.floor(100*(u/c)),c=100,n.dimensions.width=c+"%",n.dimensions.height=u+"%"}if(n.auto=b.truthy(l.auto),l.bg&&(n.theme.bg=b.parseColor(l.bg)),l.fg&&(n.theme.fg=b.parseColor(l.fg)),l.bg&&!l.fg&&(n.autoFg=!0),l.theme&&n.instanceOptions.themes.hasOwnProperty(l.theme)&&(n.theme=S(n.instanceOptions.themes[l.theme],null)),l.text&&(n.text=l.text),l.textmode&&(n.textmode=l.textmode),l.size&&(n.size=l.size),l.font&&(n.font=l.font),l.align&&(n.align=l.align),l.lineWrap&&(n.lineWrap=l.lineWrap),n.nowrap=b.truthy(l.nowrap),n.outline=b.truthy(l.outline),b.truthy(l.random)){j.vars.cache.themeKeys=j.vars.cache.themeKeys||Object.keys(n.instanceOptions.themes);var h=j.vars.cache.themeKeys[0|Math.random()*j.vars.cache.themeKeys.length];n.theme=S(n.instanceOptions.themes[h],null)}}return n}function d(e){var t=e.mode,n=e.el,i=e.flags,r=e.engineSettings,o=i.dimensions,a=i.theme,s=o.width+"x"+o.height;t=null==t?i.fluid?"fluid":"image":t;var l=/holder_([a-z]+)/g,c=!1;if(null!=i.text&&(a.text=i.text,"object"===n.nodeName.toLowerCase())){for(var u=a.text.split("\\n"),h=0;h1){var v,y=0,b=0,w=0;m=new s.Group("line"+w),"left"!==e.align&&"right"!==e.align||(o=e.width*(1-2*(1-i)));for(var x=0;x=o||k===!0)&&(t(p,m,y,p.properties.leading),p.add(m),y=0,b+=p.properties.leading,w+=1,m=new s.Group("line"+w),m.y=b),k!==!0&&(g.moveTo(y,0),y+=A.spaceWidth+S.width,m.add(g))}if(t(p,m,y,p.properties.leading),p.add(m),"left"===e.align)p.moveTo(e.width-r,null,null);else if("right"===e.align){for(v in p.children)m=p.children[v],m.moveTo(e.width-m.width,null,null);p.moveTo(0-(e.width-r),null,null)}else{for(v in p.children)m=p.children[v],m.moveTo((p.width-m.width)/2,null,null);p.moveTo((e.width-p.width)/2,null,null)}p.moveTo(null,(e.height-p.height)/2,null),(e.height-p.height)/2<0&&p.moveTo(null,0,null)}else g=new s.Text(e.text),m=new s.Group("line0"),m.add(g),p.add(m),"left"===e.align?p.moveTo(e.width-r,null,null):"right"===e.align?p.moveTo(0-(e.width-r),null,null):p.moveTo((e.width-A.boundingBox.width)/2,null,null),p.moveTo(null,(e.height-A.boundingBox.height)/2,null);return a}function C(e,t,n,i){var r=parseInt(e,10),o=parseInt(t,10),a=Math.max(r,o),s=Math.min(r,o),l=.8*Math.min(s,a*i);return Math.round(Math.max(n,l))}function v(e){var t;t=null==e||null==e.nodeType?j.vars.resizableImages:[e];for(var n=0,i=t.length;n1){v.nodeValue="";for(var p=0;p=0?t:1)}function o(e){w?r(e):x.push(e)}null==document.readyState&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",function e(){document.removeEventListener("DOMContentLoaded",e,!1),document.readyState="complete"},!1),document.readyState="loading");var a=e.document,s=a.documentElement,l="load",c=!1,u="on"+l,h="complete",f="readyState",d="attachEvent",p="detachEvent",A="addEventListener",g="DOMContentLoaded",m="onreadystatechange",v="removeEventListener",y=A in a,b=c,w=c,x=[];if(a[f]===h)r(n);else if(y)a[A](g,t,c),e[A](l,t,c);else{a[d](m,t),e[d](u,t);try{b=null==e.frameElement&&s}catch(e){}b&&b.doScroll&&!function t(){if(!w){try{b.doScroll("left")}catch(e){return r(t,50)}i(),n()}}()}return o.version="1.4.0",o.isReady=function(){return w},o}e.exports="undefined"!=typeof window&&n(window)},function(e,t,n){var o=encodeURIComponent,c=decodeURIComponent,u=n(4),a=n(5),h=/(\w+)\[(\d+)\]/,f=/\w+\.\w+/;t.parse=function(e){if("string"!=typeof e)return{};if(e=u(e),""===e)return{};"?"===e.charAt(0)&&(e=e.slice(1));for(var t={},n=e.split("&"),i=0;i=0;i--)n=e.charCodeAt(i),n>128?t.unshift(["&#",n,";"].join("")):t.unshift(e[i]);return t.join("")},t.imageExists=function(e,t){var n=new Image;n.onerror=function(){t.call(this,!1)},n.onload=function(){t.call(this,!0)},n.src=e},t.decodeHtmlEntity=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(t)})},t.dimensionCheck=function(e){var t={height:e.clientHeight,width:e.clientWidth};return!(!t.height||!t.width)&&t},t.truthy=function(e){return"string"==typeof e?"true"===e||"yes"===e||"1"===e||"on"===e||"✓"===e:!!e},t.parseColor=function(e){var t,n=/(^(?:#?)[0-9a-f]{6}$)|(^(?:#?)[0-9a-f]{3}$)/i,i=/^rgb\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,r=/^rgba\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0\.\d{1,}|1)\)$/,o=e.match(n);return null!==o?(t=o[1]||o[2],"#"!==t[0]?"#"+t:t):(o=e.match(i),null!==o?t="rgb("+o.slice(1).join(",")+")":(o=e.match(r),null!==o?t="rgba("+o.slice(1).join(",")+")":null))},t.canvasRatio=function(){var e=1,t=1;if(r.document){var n=r.document.createElement("canvas");if(n.getContext){var i=n.getContext("2d");e=r.devicePixelRatio||1,t=i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1}}return e/t}}).call(t,function(){return this}())},function(e,t,n){(function(c){var u=n(9),s="http://www.w3.org/2000/svg",l=8;t.initSVG=function(e,t,n){var i,r,o=!1;e&&e.querySelector?(r=e.querySelector("style"),null===r&&(o=!0)):(e=u.newEl("svg",s),o=!0),o&&(i=u.newEl("defs",s),r=u.newEl("style",s),u.setAttr(r,{type:"text/css"}),i.appendChild(r),e.appendChild(i)),e.webkitMatchesSelector&&e.setAttribute("xmlns",s);for(var a=0;a=0;a--){var s=o.createProcessingInstruction("xml-stylesheet",'href="'+r[a]+'" rel="stylesheet"');o.insertBefore(s,o.firstChild)}o.removeChild(o.documentElement),i=n.serializeToString(o)}var l=n.serializeToString(e);return l=l.replace(/\&(\#[0-9]{2,}\;)/g,"&$1"),i+l}}}).call(t,function(){return this}())},function(e,t){(function(n){t.newEl=function(e,t){if(n.document)return null==t?n.document.createElement(e):n.document.createElementNS(t,e)},t.setAttr=function(e,t){for(var n in t)e.setAttribute(n,t[n])},t.createXML=function(){if(n.DOMParser)return(new DOMParser).parseFromString("","application/xml")},t.getNodeArray=function(e){var t=null;return"string"==typeof e?t=document.querySelectorAll(e):n.NodeList&&e instanceof n.NodeList?t=e:n.Node&&e instanceof n.Node?t=[e]:n.HTMLCollection&&e instanceof n.HTMLCollection?t=e:e instanceof Array?t=e:null===e&&(t=[]),t=Array.prototype.slice.call(t)}}).call(t,function(){return this}())},function(e,t){var s=function(e,t){"string"==typeof e&&(this.original=e,"#"===e.charAt(0)&&(e=e.slice(1)),/[^a-f0-9]+/i.test(e)||(3===e.length&&(e=e.replace(/./g,"$&$&")),6===e.length&&(this.alpha=1,t&&t.alpha&&(this.alpha=t.alpha),this.set(parseInt(e,16)))))};s.rgb2hex=function(e,t,n){function i(e){var t=(0|e).toString(16);return e<16&&(t="0"+t),t}return[e,t,n].map(i).join("")},s.hsl2rgb=function(e,t,n){var i=e/60,r=(1-Math.abs(2*n-1))*t,o=r*(1-Math.abs(parseInt(i)%2-1)),a=n-r/2,s=0,l=0,c=0;return i>=0&&i<1?(s=r,l=o):i>=1&&i<2?(s=o,l=r):i>=2&&i<3?(l=r,c=o):i>=3&&i<4?(l=o,c=r):i>=4&&i<5?(s=o,c=r):i>=5&&i<6&&(s=r,c=o),s+=a,l+=a,c+=a,s=parseInt(255*s),l=parseInt(255*l),c=parseInt(255*c),[s,l,c]},s.prototype.set=function(e){this.raw=e;var t=(16711680&this.raw)>>16,n=(65280&this.raw)>>8,i=255&this.raw,r=.2126*t+.7152*n+.0722*i,o=-.09991*t-.33609*n+.436*i,a=.615*t-.55861*n-.05639*i;return this.rgb={r:t,g:n,b:i},this.yuv={y:r,u:o,v:a},this},s.prototype.lighten=function(e){var t=Math.min(1,Math.max(0,Math.abs(e)))*(e<0?-1:1),n=255*t|0,i=Math.min(255,Math.max(0,this.rgb.r+n)),r=Math.min(255,Math.max(0,this.rgb.g+n)),o=Math.min(255,Math.max(0,this.rgb.b+n)),a=s.rgb2hex(i,r,o);return new s(a)},s.prototype.toHex=function(e){return(e?"#":"")+this.raw.toString(16)},s.prototype.lighterThan=function(e){return e instanceof s||(e=new s(e)),this.yuv.y>e.yuv.y},s.prototype.blendAlpha=function(e){e instanceof s||(e=new s(e));var t=e,n=this,i=t.alpha*t.rgb.r+(1-t.alpha)*n.rgb.r,r=t.alpha*t.rgb.g+(1-t.alpha)*n.rgb.g,o=t.alpha*t.rgb.b+(1-t.alpha)*n.rgb.b;return new s(s.rgb2hex(i,r,o))},e.exports=s},function(e,t){e.exports={version:"2.9.4",svg_ns:"http://www.w3.org/2000/svg"}},function(e,t,n){function w(e,t){return T.element({tag:t,width:e.width,height:e.height,fill:e.properties.fill})}function x(e){return r.cssProps({fill:e.fill,"font-weight":e.font.weight,"font-family":e.font.family+", monospace","font-size":e.font.size+e.font.units})}function S(e,t,n){var i=n/2;return["M",i,i,"H",e-i,"V",t-i,"H",i,"V",0,"M",0,i,"L",e,t-i,"M",0,t-i,"L",e,i].join(" ")}var k=n(13),C=n(8),i=n(11),r=n(7),E=i.svg_ns,T={element:function(e){var t=e.tag,n=e.content||"";return delete e.tag,delete e.content,[t,n,e]}};e.exports=function(e,t){var n=t.engineSettings,i=n.stylesheets,r=i.map(function(e){return''}).join("\n"),o="holder_"+Number(new Date).toString(16),a=e.root,s=a.children.holderTextGroup,l="#"+o+" text { "+x(s.properties)+" } ";s.y+=.8*s.textPositionData.boundingBox.height;var c=[];Object.keys(s.children).forEach(function(e){var o=s.children[e];Object.keys(o.children).forEach(function(e){var t=o.children[e],n=s.x+o.x+t.x,i=s.y+o.y+t.y,r=T.element({tag:"text",content:t.properties.text,x:n,y:i});c.push(r)})});var u=T.element({tag:"g",content:c}),h=null;if(a.children.holderBg.properties.outline){var f=a.children.holderBg.properties.outline;h=T.element({tag:"path",d:S(a.children.holderBg.width,a.children.holderBg.height,f.width),"stroke-width":f.width,stroke:f.fill,fill:"none"})}var d=w(a.children.holderBg,"rect"),p=[];p.push(d),f&&p.push(h),p.push(u);var A=T.element({tag:"g",id:o,content:p}),g=T.element({tag:"style",content:l,type:"text/css"}),m=T.element({tag:"defs",content:g}),v=T.element({tag:"svg",content:[m,A],width:a.properties.width,height:a.properties.height,xmlns:E,viewBox:[0,0,a.properties.width,a.properties.height].join(" "),preserveAspectRatio:"none"}),y=k(v);y=r+y[0];var b=C.svgStringToDataURI(y,"background"===t.mode);return b}},function(e,t,n){n(14);e.exports=function e(t,n,a){"use strict";function i(e){var t=e.match(/^[\w-]+/),n={tag:t?t[0]:"div",attr:{},children:[]},i=e.match(/#([\w-]+)/),r=e.match(/\$([\w-]+)/),o=e.match(/\.[\w-]+/g);return i&&(n.attr.id=i[1],a[i[1]]=n),r&&(a[r[1]]=n),o&&(n.attr["class"]=o.join(" ").replace(/\./g,"")),e.match(/&$/g)&&(d=!1),n}function r(e,t){if(null!==t&&t!==!1&&void 0!==t)return"string"!=typeof t&&"object"!=typeof t?String(t):t}function o(e){return e||0===e?String(e).replace(/&/g,"&").replace(/"/g,"""):""}function s(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}var l,c,u,h,f=1,d=!0;if(a=a||{},"string"==typeof t[0])t[0]=i(t[0]);else{if(!Array.isArray(t[0]))throw new Error("First element of array must be a string, or an array and not "+JSON.stringify(t[0]));f=0}for(;f",t[0]=l}return a[0]=t[0],u&&u(t[0]),a}},function(e,t){"use strict";function n(e){var t=""+e,n=s.exec(t);if(!n)return t;var i,r="",o=0,a=0;for(o=n.index;o]/;e.exports=n},function(e,t,n){var i=n(9),m=n(7);e.exports=function(){var A=i.newEl("canvas"),g=null;return function(e){null==g&&(g=A.getContext("2d"));var t=m.canvasRatio(),n=e.root;A.width=t*n.properties.width,A.height=t*n.properties.height,g.textBaseline="middle";var i=n.children.holderBg,r=t*i.width,o=t*i.height,a=2,s=a/2;g.fillStyle=i.properties.fill,g.fillRect(0,0,r,o),i.properties.outline&&(g.strokeStyle=i.properties.outline.fill,g.lineWidth=i.properties.outline.width,g.moveTo(s,s),g.lineTo(r-s,s),g.lineTo(r-s,o-s),g.lineTo(s,o-s),g.lineTo(s,s),g.moveTo(0,s),g.lineTo(r,o-s),g.moveTo(0,o-s),g.lineTo(r,s),g.stroke());var l=n.children.holderTextGroup;g.font=l.properties.font.weight+" "+t*l.properties.font.size+l.properties.font.units+" "+l.properties.font.family+", monospace",g.fillStyle=l.properties.fill;for(var c in l.children){var u=l.children[c];for(var h in u.children){var f=u.children[h],d=t*(l.x+u.x+f.x),p=t*(l.y+u.y+f.y+l.properties.leading/2);g.fillText(f.properties.text,d,p)}}return A.toDataURL("image/png")}}()}])}),function(e,t){t&&(Holder=e.Holder)}(this,"undefined"!=typeof Meteor&&"undefined"!=typeof Package); +!function(r){if(r.document){var o=r.document;o.querySelectorAll||(o.querySelectorAll=function(e){var t,n=o.createElement("style"),i=[];for(o.documentElement.firstChild.appendChild(n),o._qsa=[],n.styleSheet.cssText=e+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",r.scrollBy(0,0),n.parentNode.removeChild(n);o._qsa.length;)t=o._qsa.shift(),t.style.removeAttribute("x-qsa"),i.push(t);return o._qsa=null,i}),o.querySelector||(o.querySelector=function(e){var t=o.querySelectorAll(e);return t.length?t[0]:null}),o.getElementsByClassName||(o.getElementsByClassName=function(e){return e=String(e).replace(/^|\s+/g,"."),o.querySelectorAll(e)}),Object.keys||(Object.keys=function(e){if(e!==Object(e))throw TypeError("Object.keys called on non-object");var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);return n}),Array.prototype.forEach||(Array.prototype.forEach=function(e){if(void 0===this||null===this)throw TypeError();var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw TypeError();var i,r=arguments[1];for(i=0;i>16&255)),i.push(String.fromCharCode(r>>8&255)),i.push(String.fromCharCode(255&r)),o=0,r=0),n+=1;return 12===o?(r>>=4,i.push(String.fromCharCode(255&r))):18===o&&(r>>=2,i.push(String.fromCharCode(r>>8&255)),i.push(String.fromCharCode(255&r))),i.join("")},e.btoa=e.btoa||function(e){e=String(e);var t,n,i,r,o,a,s,l=0,c=[];if(/[^\x00-\xFF]/.test(e))throw Error("InvalidCharacterError");for(;l>2,o=(3&t)<<4|n>>4,a=(15&n)<<2|i>>6,s=63&i,l===e.length+2?(a=64,s=64):l===e.length+1&&(s=64),c.push(u.charAt(r),u.charAt(o),u.charAt(a),u.charAt(s));return c.join("")}}(r),Object.prototype.hasOwnProperty||(Object.prototype.hasOwnProperty=function(e){var t=this.__proto__||this.constructor.prototype;return e in this&&(!(e in t)||t[e]!==this[e])}),function(){if("performance"in r==!1&&(r.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in r.performance==!1){var e=Date.now();performance.timing&&performance.timing.navigationStart&&(e=performance.timing.navigationStart),r.performance.now=function(){return Date.now()-e}}}(),r.requestAnimationFrame||(r.webkitRequestAnimationFrame&&r.webkitCancelAnimationFrame?!function(t){t.requestAnimationFrame=function(e){return webkitRequestAnimationFrame(function(){e(t.performance.now())})},t.cancelAnimationFrame=t.webkitCancelAnimationFrame}(r):r.mozRequestAnimationFrame&&r.mozCancelAnimationFrame?!function(t){t.requestAnimationFrame=function(e){return mozRequestAnimationFrame(function(){e(t.performance.now())})},t.cancelAnimationFrame=t.mozCancelAnimationFrame}(r):!function(t){t.requestAnimationFrame=function(e){return t.setTimeout(e,1e3/60)},t.cancelAnimationFrame=t.clearTimeout}(r))}}(this),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Holder=t():e.Holder=t()}(this,function(){return function(n){function i(e){if(r[e])return r[e].exports;var t=r[e]={exports:{},id:e,loaded:!1};return n[e].call(t.exports,t,t.exports,i),t.loaded=!0,t.exports}var r={};return i.m=n,i.c=r,i.p="",i(0)}([function(e,t,n){e.exports=n(1)},function(D,e,F){(function(h){function o(e,t,n,i){var r=f(n.substr(n.lastIndexOf(e.domain)),e);r&&d({mode:null,el:i,flags:r,engineSettings:t})}function f(e,t){var n={theme:S(j.settings.themes.gray,null),stylesheets:t.stylesheets,instanceOptions:t},i=e.indexOf("?"),r=[e];i!==-1&&(r=[e.slice(0,i),e.slice(i+1)]);var o=r[0].split("/");n.holderURL=e;var a=o[1],s=a.match(/([\d]+p?)x([\d]+p?)/);if(!s)return!1;if(n.fluid=a.indexOf("p")!==-1,n.dimensions={width:s[1].replace("p","%"),height:s[2].replace("p","%")},2===r.length){var l=p.parse(r[1]);if(b.truthy(l.ratio)){n.fluid=!0;var c=parseFloat(n.dimensions.width.replace("%","")),u=parseFloat(n.dimensions.height.replace("%",""));u=Math.floor(100*(u/c)),c=100,n.dimensions.width=c+"%",n.dimensions.height=u+"%"}if(n.auto=b.truthy(l.auto),l.bg&&(n.theme.bg=b.parseColor(l.bg)),l.fg&&(n.theme.fg=b.parseColor(l.fg)),l.bg&&!l.fg&&(n.autoFg=!0),l.theme&&n.instanceOptions.themes.hasOwnProperty(l.theme)&&(n.theme=S(n.instanceOptions.themes[l.theme],null)),l.text&&(n.text=l.text),l.textmode&&(n.textmode=l.textmode),l.size&&(n.size=l.size),l.font&&(n.font=l.font),l.align&&(n.align=l.align),l.lineWrap&&(n.lineWrap=l.lineWrap),n.nowrap=b.truthy(l.nowrap),n.outline=b.truthy(l.outline),b.truthy(l.random)){j.vars.cache.themeKeys=j.vars.cache.themeKeys||Object.keys(n.instanceOptions.themes);var h=j.vars.cache.themeKeys[0|Math.random()*j.vars.cache.themeKeys.length];n.theme=S(n.instanceOptions.themes[h],null)}}return n}function d(e){var t=e.mode,n=e.el,i=e.flags,r=e.engineSettings,o=i.dimensions,a=i.theme,s=o.width+"x"+o.height;t=null==t?i.fluid?"fluid":"image":t;var l=/holder_([a-z]+)/g,c=!1;if(null!=i.text&&(a.text=i.text,"object"===n.nodeName.toLowerCase())){for(var u=a.text.split("\\n"),h=0;h1){var v,y=0,b=0,w=0;m=new s.Group("line"+w),"left"!==e.align&&"right"!==e.align||(o=e.width*(1-2*(1-i)));for(var x=0;x=o||k===!0)&&(t(p,m,y,p.properties.leading),p.add(m),y=0,b+=p.properties.leading,w+=1,m=new s.Group("line"+w),m.y=b),k!==!0&&(g.moveTo(y,0),y+=A.spaceWidth+S.width,m.add(g))}if(t(p,m,y,p.properties.leading),p.add(m),"left"===e.align)p.moveTo(e.width-r,null,null);else if("right"===e.align){for(v in p.children)m=p.children[v],m.moveTo(e.width-m.width,null,null);p.moveTo(0-(e.width-r),null,null)}else{for(v in p.children)m=p.children[v],m.moveTo((p.width-m.width)/2,null,null);p.moveTo((e.width-p.width)/2,null,null)}p.moveTo(null,(e.height-p.height)/2,null),(e.height-p.height)/2<0&&p.moveTo(null,0,null)}else g=new s.Text(e.text),m=new s.Group("line0"),m.add(g),p.add(m),"left"===e.align?p.moveTo(e.width-r,null,null):"right"===e.align?p.moveTo(0-(e.width-r),null,null):p.moveTo((e.width-A.boundingBox.width)/2,null,null),p.moveTo(null,(e.height-A.boundingBox.height)/2,null);return a}function E(e,t,n,i){var r=parseInt(e,10),o=parseInt(t,10),a=Math.max(r,o),s=Math.min(r,o),l=.8*Math.min(s,a*i);return Math.round(Math.max(n,l))}function v(e){var t;t=null==e||null==e.nodeType?j.vars.resizableImages:[e];for(var n=0,i=t.length;n1){v.nodeValue="";for(var p=0;p=0?t:1)}function o(e){w?r(e):x.push(e)}null==document.readyState&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",function e(){document.removeEventListener("DOMContentLoaded",e,!1),document.readyState="complete"},!1),document.readyState="loading");var a=e.document,s=a.documentElement,l="load",c=!1,u="on"+l,h="complete",f="readyState",d="attachEvent",p="detachEvent",A="addEventListener",g="DOMContentLoaded",m="onreadystatechange",v="removeEventListener",y=A in a,b=c,w=c,x=[];if(a[f]===h)r(n);else if(y)a[A](g,t,c),e[A](l,t,c);else{a[d](m,t),e[d](u,t);try{b=null==e.frameElement&&s}catch(e){}b&&b.doScroll&&!function t(){if(!w){try{b.doScroll("left")}catch(e){return r(t,50)}i(),n()}}()}return o.version="1.4.0",o.isReady=function(){return w},o}e.exports="undefined"!=typeof window&&n(window)},function(e,t,n){var o=encodeURIComponent,c=decodeURIComponent,u=n(4),a=n(5),h=/(\w+)\[(\d+)\]/,f=/\w+\.\w+/;t.parse=function(e){if("string"!=typeof e)return{};if(e=u(e),""===e)return{};"?"===e.charAt(0)&&(e=e.slice(1));for(var t={},n=e.split("&"),i=0;i=0;i--)n=e.charCodeAt(i),n>128?t.unshift(["&#",n,";"].join("")):t.unshift(e[i]);return t.join("")},t.imageExists=function(e,t){var n=new Image;n.onerror=function(){t.call(this,!1)},n.onload=function(){t.call(this,!0)},n.src=e},t.decodeHtmlEntity=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(t)})},t.dimensionCheck=function(e){var t={height:e.clientHeight,width:e.clientWidth};return!(!t.height||!t.width)&&t},t.truthy=function(e){return"string"==typeof e?"true"===e||"yes"===e||"1"===e||"on"===e||"✓"===e:!!e},t.parseColor=function(e){var t,n=/(^(?:#?)[0-9a-f]{6}$)|(^(?:#?)[0-9a-f]{3}$)/i,i=/^rgb\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,r=/^rgba\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0\.\d{1,}|1)\)$/,o=e.match(n);return null!==o?(t=o[1]||o[2],"#"!==t[0]?"#"+t:t):(o=e.match(i),null!==o?t="rgb("+o.slice(1).join(",")+")":(o=e.match(r),null!==o?t="rgba("+o.slice(1).join(",")+")":null))},t.canvasRatio=function(){var e=1,t=1;if(r.document){var n=r.document.createElement("canvas");if(n.getContext){var i=n.getContext("2d");e=r.devicePixelRatio||1,t=i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1}}return e/t}}).call(t,function(){return this}())},function(e,t,n){(function(c){var u=n(9),s="http://www.w3.org/2000/svg",l=8;t.initSVG=function(e,t,n){var i,r,o=!1;e&&e.querySelector?(r=e.querySelector("style"),null===r&&(o=!0)):(e=u.newEl("svg",s),o=!0),o&&(i=u.newEl("defs",s),r=u.newEl("style",s),u.setAttr(r,{type:"text/css"}),i.appendChild(r),e.appendChild(i)),e.webkitMatchesSelector&&e.setAttribute("xmlns",s);for(var a=0;a=0;a--){var s=o.createProcessingInstruction("xml-stylesheet",'href="'+r[a]+'" rel="stylesheet"');o.insertBefore(s,o.firstChild)}o.removeChild(o.documentElement),i=n.serializeToString(o)}var l=n.serializeToString(e);return l=l.replace(/\&(\#[0-9]{2,}\;)/g,"&$1"),i+l}}}).call(t,function(){return this}())},function(e,t){(function(n){t.newEl=function(e,t){if(n.document)return null==t?n.document.createElement(e):n.document.createElementNS(t,e)},t.setAttr=function(e,t){for(var n in t)e.setAttribute(n,t[n])},t.createXML=function(){if(n.DOMParser)return(new DOMParser).parseFromString("","application/xml")},t.getNodeArray=function(e){var t=null;return"string"==typeof e?t=document.querySelectorAll(e):n.NodeList&&e instanceof n.NodeList?t=e:n.Node&&e instanceof n.Node?t=[e]:n.HTMLCollection&&e instanceof n.HTMLCollection?t=e:e instanceof Array?t=e:null===e&&(t=[]),t=Array.prototype.slice.call(t)}}).call(t,function(){return this}())},function(e,t){var s=function(e,t){"string"==typeof e&&(this.original=e,"#"===e.charAt(0)&&(e=e.slice(1)),/[^a-f0-9]+/i.test(e)||(3===e.length&&(e=e.replace(/./g,"$&$&")),6===e.length&&(this.alpha=1,t&&t.alpha&&(this.alpha=t.alpha),this.set(parseInt(e,16)))))};s.rgb2hex=function(e,t,n){function i(e){var t=(0|e).toString(16);return e<16&&(t="0"+t),t}return[e,t,n].map(i).join("")},s.hsl2rgb=function(e,t,n){var i=e/60,r=(1-Math.abs(2*n-1))*t,o=r*(1-Math.abs(parseInt(i)%2-1)),a=n-r/2,s=0,l=0,c=0;return i>=0&&i<1?(s=r,l=o):i>=1&&i<2?(s=o,l=r):i>=2&&i<3?(l=r,c=o):i>=3&&i<4?(l=o,c=r):i>=4&&i<5?(s=o,c=r):i>=5&&i<6&&(s=r,c=o),s+=a,l+=a,c+=a,s=parseInt(255*s),l=parseInt(255*l),c=parseInt(255*c),[s,l,c]},s.prototype.set=function(e){this.raw=e;var t=(16711680&this.raw)>>16,n=(65280&this.raw)>>8,i=255&this.raw,r=.2126*t+.7152*n+.0722*i,o=-.09991*t-.33609*n+.436*i,a=.615*t-.55861*n-.05639*i;return this.rgb={r:t,g:n,b:i},this.yuv={y:r,u:o,v:a},this},s.prototype.lighten=function(e){var t=Math.min(1,Math.max(0,Math.abs(e)))*(e<0?-1:1),n=255*t|0,i=Math.min(255,Math.max(0,this.rgb.r+n)),r=Math.min(255,Math.max(0,this.rgb.g+n)),o=Math.min(255,Math.max(0,this.rgb.b+n)),a=s.rgb2hex(i,r,o);return new s(a)},s.prototype.toHex=function(e){return(e?"#":"")+this.raw.toString(16)},s.prototype.lighterThan=function(e){return e instanceof s||(e=new s(e)),this.yuv.y>e.yuv.y},s.prototype.blendAlpha=function(e){e instanceof s||(e=new s(e));var t=e,n=this,i=t.alpha*t.rgb.r+(1-t.alpha)*n.rgb.r,r=t.alpha*t.rgb.g+(1-t.alpha)*n.rgb.g,o=t.alpha*t.rgb.b+(1-t.alpha)*n.rgb.b;return new s(s.rgb2hex(i,r,o))},e.exports=s},function(e,t){e.exports={version:"2.9.4",svg_ns:"http://www.w3.org/2000/svg"}},function(e,t,n){function w(e,t){return T.element({tag:t,width:e.width,height:e.height,fill:e.properties.fill})}function x(e){return r.cssProps({fill:e.fill,"font-weight":e.font.weight,"font-family":e.font.family+", monospace","font-size":e.font.size+e.font.units})}function S(e,t,n){var i=n/2;return["M",i,i,"H",e-i,"V",t-i,"H",i,"V",0,"M",0,i,"L",e,t-i,"M",0,t-i,"L",e,i].join(" ")}var k=n(13),E=n(8),i=n(11),r=n(7),C=i.svg_ns,T={element:function(e){var t=e.tag,n=e.content||"";return delete e.tag,delete e.content,[t,n,e]}};e.exports=function(e,t){var n=t.engineSettings,i=n.stylesheets,r=i.map(function(e){return''}).join("\n"),o="holder_"+Number(new Date).toString(16),a=e.root,s=a.children.holderTextGroup,l="#"+o+" text { "+x(s.properties)+" } ";s.y+=.8*s.textPositionData.boundingBox.height;var c=[];Object.keys(s.children).forEach(function(e){var o=s.children[e];Object.keys(o.children).forEach(function(e){var t=o.children[e],n=s.x+o.x+t.x,i=s.y+o.y+t.y,r=T.element({tag:"text",content:t.properties.text,x:n,y:i});c.push(r)})});var u=T.element({tag:"g",content:c}),h=null;if(a.children.holderBg.properties.outline){var f=a.children.holderBg.properties.outline;h=T.element({tag:"path",d:S(a.children.holderBg.width,a.children.holderBg.height,f.width),"stroke-width":f.width,stroke:f.fill,fill:"none"})}var d=w(a.children.holderBg,"rect"),p=[];p.push(d),f&&p.push(h),p.push(u);var A=T.element({tag:"g",id:o,content:p}),g=T.element({tag:"style",content:l,type:"text/css"}),m=T.element({tag:"defs",content:g}),v=T.element({tag:"svg",content:[m,A],width:a.properties.width,height:a.properties.height,xmlns:C,viewBox:[0,0,a.properties.width,a.properties.height].join(" "),preserveAspectRatio:"none"}),y=k(v);y=r+y[0];var b=E.svgStringToDataURI(y,"background"===t.mode);return b}},function(e,t,n){n(14);e.exports=function e(t,n,a){"use strict";function i(e){var t=e.match(/^[\w-]+/),n={tag:t?t[0]:"div",attr:{},children:[]},i=e.match(/#([\w-]+)/),r=e.match(/\$([\w-]+)/),o=e.match(/\.[\w-]+/g);return i&&(n.attr.id=i[1],a[i[1]]=n),r&&(a[r[1]]=n),o&&(n.attr["class"]=o.join(" ").replace(/\./g,"")),e.match(/&$/g)&&(d=!1),n}function r(e,t){if(null!==t&&t!==!1&&void 0!==t)return"string"!=typeof t&&"object"!=typeof t?String(t):t}function o(e){return e||0===e?String(e).replace(/&/g,"&").replace(/"/g,"""):""}function s(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}var l,c,u,h,f=1,d=!0;if(a=a||{},"string"==typeof t[0])t[0]=i(t[0]);else{if(!Array.isArray(t[0]))throw new Error("First element of array must be a string, or an array and not "+JSON.stringify(t[0]));f=0}for(;f",t[0]=l}return a[0]=t[0],u&&u(t[0]),a}},function(e,t){"use strict";function n(e){var t=""+e,n=s.exec(t);if(!n)return t;var i,r="",o=0,a=0;for(o=n.index;o]/;e.exports=n},function(e,t,n){var i=n(9),m=n(7);e.exports=function(){var A=i.newEl("canvas"),g=null;return function(e){null==g&&(g=A.getContext("2d"));var t=m.canvasRatio(),n=e.root;A.width=t*n.properties.width,A.height=t*n.properties.height,g.textBaseline="middle";var i=n.children.holderBg,r=t*i.width,o=t*i.height,a=2,s=a/2;g.fillStyle=i.properties.fill,g.fillRect(0,0,r,o),i.properties.outline&&(g.strokeStyle=i.properties.outline.fill,g.lineWidth=i.properties.outline.width,g.moveTo(s,s),g.lineTo(r-s,s),g.lineTo(r-s,o-s),g.lineTo(s,o-s),g.lineTo(s,s),g.moveTo(0,s),g.lineTo(r,o-s),g.moveTo(0,o-s),g.lineTo(r,s),g.stroke());var l=n.children.holderTextGroup;g.font=l.properties.font.weight+" "+t*l.properties.font.size+l.properties.font.units+" "+l.properties.font.family+", monospace",g.fillStyle=l.properties.fill;for(var c in l.children){var u=l.children[c];for(var h in u.children){var f=u.children[h],d=t*(l.x+u.x+f.x),p=t*(l.y+u.y+f.y+l.properties.leading/2);g.fillText(f.properties.text,d,p)}}return A.toDataURL("image/png")}}()}])}),function(e,t){t&&(Holder=e.Holder)}(this,"undefined"!=typeof Meteor&&"undefined"!=typeof Package); /*! * jQuery Smooth Scroll - v2.2.0 - 2017-05-05 * https://github.com/kswedberg/jquery-smooth-scroll @@ -25,4 +25,4 @@ License: MIT * Licensed MIT */ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(m){var d={},e={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,autoFocus:!1,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},n=function(e){var t=[],n=!1,i=e.dir&&"left"===e.dir?"scrollLeft":"scrollTop";return this.each(function(){var e=m(this);if(this!==document&&this!==window)return!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(e[i]()>0?t.push(this):(e[i](1),n=e[i]()>0,n&&t.push(this),e[i](0))):(t.push(document.scrollingElement),!1)}),t.length||this.each(function(){this===document.documentElement&&"smooth"===m(this).css("scrollBehavior")&&(t=[this]),t.length||"BODY"!==this.nodeName||(t=[this])}),"first"===e.el&&t.length>1&&(t=[t[0]]),t},i=/^([\-\+]=)(\d+)/;m.fn.extend({scrollable:function(e){var t=n.call(this,{dir:e});return this.pushStack(t)},firstScrollable:function(e){var t=n.call(this,{el:"first",dir:e});return this.pushStack(t)},smoothScroll:function(e,n){if("options"===(e=e||{}))return n?this.each(function(){var e=m(this),t=m.extend(e.data("ssOpts")||{},n);m(this).data("ssOpts",t)}):this.first().data("ssOpts");var g=m.extend({},m.fn.smoothScroll.defaults,e),t=function(e){var t=function(e){return e.replace(/(:|\.|\/)/g,"\\$1")},n=this,i=m(this),r=m.extend({},g,i.data("ssOpts")||{}),o=g.exclude,a=r.excludeWithin,s=0,l=0,c=!0,u={},h=m.smoothScroll.filterPath(location.pathname),f=m.smoothScroll.filterPath(n.pathname),d=location.hostname===n.hostname||!n.hostname,p=r.scrollTarget||f===h,A=t(n.hash);if(A&&!m(A).length&&(c=!1),r.scrollTarget||d&&p&&A){for(;c&&ss;s++){var c=a[s].split("="),u=p(c.shift()),h=c.join("=");if(e&&e===u){o=g(h,t);break}e||void 0===(h=g(h))||(o[u]=h)}return o};m.defaults={},f.removeCookie=function(e,t){return void 0===f.cookie(e)?!1:(f.cookie(e,"",f.extend({},t,{expires:-1})),!f.cookie(e))}});(function(u){"use strict";var a=function(e,t,n){this.el=e;this.$el=u(e);this.options=t;this.uuid=this.$el.attr("id")?this.$el.attr("id"):n;this.state={};this.init();return this};a.prototype={init:function(){var n=this;n._load();n.$el.find("ul").each(function(e){var t=u(this);t.attr("data-index",e);if(n.options.save&&n.state.hasOwnProperty(e)){t.parent().addClass(n.options.openClass);t.show()}else if(t.parent().hasClass(n.options.openClass)){t.show();n.state[e]=1}else if(t.parent().hasClass("active")){n.toggle(true,e)}else{t.hide()}});var e=u("").append(n.options.caretHtml);var t=n.$el.find("li > a");n._trigger(e,false);n._trigger(t,true);n.$el.find("li:has(ul) > a").append(e);n.options.onInitAfter.call(this,this,{})},_trigger:function(e,o){var a=this;e.on("click",function(e){e.stopPropagation();var t=o?u(this).next():u(this).parent().next();var n=false;if(o){var i=u(this).attr("href");n=i===undefined||i===""||i==="#"}t=t.length>0?t:false;a.options.onClickBefore.call(this,e,t);if(!o||t&&n){e.preventDefault();a._toggle(t,t.is(":hidden"));a._save()}else if(a.options.accordion){var r=a.state=a._parents(u(this));a.$el.find("ul").filter(":visible").each(function(){var e=u(this),t=e.attr("data-index");if(!r.hasOwnProperty(t)){a._toggle(e,false)}});a._save()}a.options.onClickAfter.call(this,e,t)})},_toggle:function(e,t){var n=this,i=e.attr("data-index"),r=e.parent();n.options.onToggleBefore.call(this,e,t);if(t){r.addClass(n.options.openClass);e.slideDown(n.options.slide);n.state[i]=1;if(n.options.accordion){var o=n.state=n._parents(e);o[i]=n.state[i]=1;n.$el.find("ul").filter(":visible").each(function(){var e=u(this),t=e.attr("data-index");if(!o.hasOwnProperty(t)){n._toggle(e,false)}})}}else{r.removeClass(n.options.openClass);e.slideUp(n.options.slide);n.state[i]=0}n.options.onToggleAfter.call(this,e,t)},_parents:function(e,n){var i={},t=e.parent(),r=t.parents("ul");r.each(function(){var e=u(this),t=e.attr("data-index");if(!t){return false}i[t]=n?e:1});return i},_save:function(){if(this.options.save){var e={};for(var t in this.state){if(this.state[t]===1){e[t]=1}}if(this.options.storageType==="local"&&typeof Storage!=="undefined"){r=r===null?{}:r;r[this.uuid]=this.state=e;var n=JSON.stringify(r);sessionStorage.setItem(this.options.cookie.name,n)}else{i[this.uuid]=this.state=e;u.cookie(this.options.cookie.name,JSON.stringify(i),this.options.cookie)}}},_load:function(){if(this.options.save){if(this.options.storageType==="local"&&typeof Storage!=="undefined"){var e=sessionStorage.getItem(this.options.cookie.name);var t=e&&e!=="undefined"?JSON.parse(e):{};this.state=t.hasOwnProperty(this.uuid)?t[this.uuid]:{}}else if(this.options.storageType==="cookie"){if(i===null){var n=u.cookie(this.options.cookie.name);i=n?JSON.parse(n):{}}this.state=i.hasOwnProperty(this.uuid)?i[this.uuid]:{}}}},toggle:function(t){var n=this,e=arguments.length;if(e<=1){n.$el.find("ul").each(function(){var e=u(this);n._toggle(e,t)})}else{var i,r={},o=Array.prototype.slice.call(arguments,1);e--;for(var a=0;a a").unbind("click");this.$el.find("li:has(ul) > a > span").unbind("click")}};u.fn.navgoco=function(i){if(typeof i==="string"&&i.charAt(0)!=="_"&&i!=="init"){var r=true,o=Array.prototype.slice.call(arguments,1)}else{i=u.extend({},u.fn.navgoco.defaults,i||{});if(!u.cookie&&i.storageType==="cookie"){i.save=false}}return this.each(function(e){var t=u(this),n=t.data("navgoco");if(!n){n=new a(this,r?u.fn.navgoco.defaults:i,e);t.data("navgoco",n)}if(r){n[i].apply(n,o)}})};var i=null,r=null;u.fn.navgoco.defaults={storageType:"cookie",caretHtml:"",accordion:false,openClass:"open",save:true,cookie:{name:"navgoco",expires:false,path:"/"},slide:{duration:400,easing:"swing"},onInitAfter:u.noop,onClickBefore:u.noop,onClickAfter:u.noop,onToggleBefore:u.noop,onToggleAfter:u.noop}})(jQuery);(function(r){"use strict";r(function(){r(".tooltip-demo").tooltip({selector:'[data-toggle="tooltip"]',container:"body"});r(document).on("click",'[data-toggle="lightbox"]',function(e){e.preventDefault();r(this).ekkoLightbox()});r('[data-toggle="popover"]').popover();r(".tooltip-test").tooltip();r(".popover-test").popover();r('.bd-example-indeterminate [type="checkbox"]').prop("indeterminate",true);r('.bd-content [href="#"]').click(function(e){e.preventDefault()});r("#exampleModal").on("show.bs.modal",function(e){var t=r(e.relatedTarget);var n=t.data("whatever");var i=r(this);i.find(".modal-title").text("New message to "+n);i.find(".modal-body input").val(n)});r(".bd-toggle-animated-progress").on("click",function(){r(this).siblings(".progress").find(".progress-bar-striped").toggleClass("progress-bar-animated")});r("figure.highlight, div.highlight").each(function(){var e='
';r(this).before(e);r(".btn-clipboard").tooltip().on("mouseleave",function(){r(this).tooltip("hide")})});var e=new Clipboard(".btn-clipboard",{target:function(e){return e.parentNode.nextElementSibling}});e.on("success",function(e){r(e.trigger).attr("title","Copied!").tooltip("_fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("_fixTitle");e.clearSelection()});e.on("error",function(e){var t=/Mac/i.test(navigator.userAgent)?"⌘":"Ctrl-";var n="Press "+t+"C to copy";r(e.trigger).attr("title",n).tooltip("_fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("_fixTitle")});var t=r("#bd-docs-nav-list").navgoco({caretHtml:'',accordion:true,openClass:"opened",save:true,storageType:"local",cookie:{name:"codefresh-menu",expires:false,path:"/"},slide:{duration:10,easing:"linear"},onInitAfter:function(e){var t=r("#bd-docs-nav");var n=r("#bd-docs-nav li.active");if(n.length>0){var i=t.scrollTop()+(n.last().offset().top-(window.localStorage.getItem("scrollto")||t.height()/2));i=i.toFixed();setTimeout(function(){t.animate({scrollTop:i},{duration:0,easing:"linear",complete:function(){window.localStorage.removeItem("scrollto")}})},0)}},onClickAfter:function(e,t){window.localStorage.setItem("scrollto",r(e.currentTarget).offset().top)}});anchors.options={icon:"#"};anchors.add(".bd-content-inner > h2, .bd-content-inner > h3, .bd-content-inner > h4, .bd-content-inner > h5");r(".bd-content-inner > h2, .bd-content-inner > h3, .bd-content-inner > h4, .bd-content-inner > h5").wrapInner("
");r("a").smoothScroll({offset:0});r(".section-nav").on("click","a",function(){window.location.hash=r(this).attr("href");return false});Holder.addTheme("gray",{bg:"#777",fg:"rgba(255,255,255,.75)",font:"Helvetica",fontweight:"normal"})})})(jQuery);(function(){"use strict";function e(){var e=/MSIE ([0-9.]+)/.exec(window.navigator.userAgent);if(e===null){return null}var t=parseInt(e[1],10);var n=Math.floor(t);return n}function t(){var e=new Function("/*@cc_on return @_jscript_version; @*/")();if(typeof e==="undefined"){return 11}if(e<9){return 8}return e}var n=window.navigator.userAgent;if(n.indexOf("Opera")>-1||n.indexOf("Presto")>-1){return}var i=e();if(i===null){return}var r=t();if(i!==r){window.alert("WARNING: You appear to be using IE"+r+" in IE"+i+" emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!")}})();(function(){"use strict";if("serviceWorker"in navigator){window.addEventListener("load",function(){navigator.serviceWorker.register("/sw.js").then(function(e){console.log("ServiceWorker registration successful with scope: ",e.scope)}).catch(function(e){console.log("ServiceWorker registration failed: ",e)})})}else{console.log("Service workers are not supported.")}})();(function(n){"use strict";function i(){return document.cookie.split(";").find(function(e){return e.trim().startsWith("doctype")})}function r(e){var t=e.split("=").pop();return t==="ArgoPlatform"}function o(e){var t=e.split("=").pop();return t==="Classic"}function a(e){var t=localStorage.getItem("redirectFrom");return r(e)&&t&&t.startsWith(window.location.origin)}function s(){document.cookie="doctype=Classic; SameSite=Lax; Secure; Domain=.codefresh.io; Max-age=2592000; Path=/"}function l(){s();n("#redirectModal").modal("hide")}n(function(){if(window.location.hostname==="localhost"||localStorage.getItem("ignoreRedirect")){return}n('a[href*="codefresh.io/docs').each(function(){n(this).on("click",function(){s();localStorage.removeItem("redirectFrom");if(typeof window.ga==="function"){window.ga("send","event","Navbar","Docs links","Open CF Classic Docs")}})});try{var e=i();if(e){if(o(e)){localStorage.setItem("redirectFrom",window.location.href);window.location.href="https://codefresh.io/docs/"}else if(a(e)){n("#redirectModal").modal({backdrop:false,show:true});n("#redirectModal").on("hide.bs.modal",function(){localStorage.removeItem("redirectFrom")});var t=localStorage.getItem("redirectFrom");n("#redirectModal .redirect-popup__footer-link").attr("href",t);n("#redirectModal .redirect-popup__footer-link").on("click",l)}}}catch(e){console.error(e)}})})(jQuery); \ No newline at end of file +!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(f){function d(e){return m.raw?e:encodeURIComponent(e)}function p(e){return m.raw?e:decodeURIComponent(e)}function A(e){return d(m.json?JSON.stringify(e):String(e))}function i(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(t," ")),m.json?JSON.parse(e):e}catch(e){}}function g(e,t){var n=m.raw?e:i(e);return f.isFunction(t)?t(n):n}var t=/\+/g,m=f.cookie=function(e,t,n){if(void 0!==t&&!f.isFunction(t)){if(n=f.extend({},m.defaults,n),"number"==typeof n.expires){var i=n.expires,r=n.expires=new Date;r.setTime(+r+864e5*i)}return document.cookie=[d(e),"=",A(t),n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("")}for(var o=e?void 0:{},a=document.cookie?document.cookie.split("; "):[],s=0,l=a.length;l>s;s++){var c=a[s].split("="),u=p(c.shift()),h=c.join("=");if(e&&e===u){o=g(h,t);break}e||void 0===(h=g(h))||(o[u]=h)}return o};m.defaults={},f.removeCookie=function(e,t){return void 0===f.cookie(e)?!1:(f.cookie(e,"",f.extend({},t,{expires:-1})),!f.cookie(e))}});(function(u){"use strict";var a=function(e,t,n){this.el=e;this.$el=u(e);this.options=t;this.uuid=this.$el.attr("id")?this.$el.attr("id"):n;this.state={};this.init();return this};a.prototype={init:function(){var n=this;n._load();n.$el.find("ul").each(function(e){var t=u(this);t.attr("data-index",e);if(n.options.save&&n.state.hasOwnProperty(e)){t.parent().addClass(n.options.openClass);t.show()}else if(t.parent().hasClass(n.options.openClass)){t.show();n.state[e]=1}else if(t.parent().hasClass("active")){n.toggle(true,e)}else{t.hide()}});var e=u("").append(n.options.caretHtml);var t=n.$el.find("li > a");n._trigger(e,false);n._trigger(t,true);n.$el.find("li:has(ul) > a").append(e);n.options.onInitAfter.call(this,this,{})},_trigger:function(e,o){var a=this;e.on("click",function(e){e.stopPropagation();var t=o?u(this).next():u(this).parent().next();var n=false;if(o){var i=u(this).attr("href");n=i===undefined||i===""||i==="#"}t=t.length>0?t:false;a.options.onClickBefore.call(this,e,t);if(!o||t&&n){e.preventDefault();a._toggle(t,t.is(":hidden"));a._save()}else if(a.options.accordion){var r=a.state=a._parents(u(this));a.$el.find("ul").filter(":visible").each(function(){var e=u(this),t=e.attr("data-index");if(!r.hasOwnProperty(t)){a._toggle(e,false)}});a._save()}a.options.onClickAfter.call(this,e,t)})},_toggle:function(e,t){var n=this,i=e.attr("data-index"),r=e.parent();n.options.onToggleBefore.call(this,e,t);if(t){r.addClass(n.options.openClass);e.slideDown(n.options.slide);n.state[i]=1;if(n.options.accordion){var o=n.state=n._parents(e);o[i]=n.state[i]=1;n.$el.find("ul").filter(":visible").each(function(){var e=u(this),t=e.attr("data-index");if(!o.hasOwnProperty(t)){n._toggle(e,false)}})}}else{r.removeClass(n.options.openClass);e.slideUp(n.options.slide);n.state[i]=0}n.options.onToggleAfter.call(this,e,t)},_parents:function(e,n){var i={},t=e.parent(),r=t.parents("ul");r.each(function(){var e=u(this),t=e.attr("data-index");if(!t){return false}i[t]=n?e:1});return i},_save:function(){if(this.options.save){var e={};for(var t in this.state){if(this.state[t]===1){e[t]=1}}if(this.options.storageType==="local"&&typeof Storage!=="undefined"){r=r===null?{}:r;r[this.uuid]=this.state=e;var n=JSON.stringify(r);sessionStorage.setItem(this.options.cookie.name,n)}else{i[this.uuid]=this.state=e;u.cookie(this.options.cookie.name,JSON.stringify(i),this.options.cookie)}}},_load:function(){if(this.options.save){if(this.options.storageType==="local"&&typeof Storage!=="undefined"){var e=sessionStorage.getItem(this.options.cookie.name);var t=e&&e!=="undefined"?JSON.parse(e):{};this.state=t.hasOwnProperty(this.uuid)?t[this.uuid]:{}}else if(this.options.storageType==="cookie"){if(i===null){var n=u.cookie(this.options.cookie.name);i=n?JSON.parse(n):{}}this.state=i.hasOwnProperty(this.uuid)?i[this.uuid]:{}}}},toggle:function(t){var n=this,e=arguments.length;if(e<=1){n.$el.find("ul").each(function(){var e=u(this);n._toggle(e,t)})}else{var i,r={},o=Array.prototype.slice.call(arguments,1);e--;for(var a=0;a a").unbind("click");this.$el.find("li:has(ul) > a > span").unbind("click")}};u.fn.navgoco=function(i){if(typeof i==="string"&&i.charAt(0)!=="_"&&i!=="init"){var r=true,o=Array.prototype.slice.call(arguments,1)}else{i=u.extend({},u.fn.navgoco.defaults,i||{});if(!u.cookie&&i.storageType==="cookie"){i.save=false}}return this.each(function(e){var t=u(this),n=t.data("navgoco");if(!n){n=new a(this,r?u.fn.navgoco.defaults:i,e);t.data("navgoco",n)}if(r){n[i].apply(n,o)}})};var i=null,r=null;u.fn.navgoco.defaults={storageType:"cookie",caretHtml:"",accordion:false,openClass:"open",save:true,cookie:{name:"navgoco",expires:false,path:"/"},slide:{duration:400,easing:"swing"},onInitAfter:u.noop,onClickBefore:u.noop,onClickAfter:u.noop,onToggleBefore:u.noop,onToggleAfter:u.noop}})(jQuery);(function(r){"use strict";r(function(){r(".tooltip-demo").tooltip({selector:'[data-toggle="tooltip"]',container:"body"});r(document).on("click",'[data-toggle="lightbox"]',function(e){e.preventDefault();r(this).ekkoLightbox()});r('[data-toggle="popover"]').popover();r(".tooltip-test").tooltip();r(".popover-test").popover();r('.bd-example-indeterminate [type="checkbox"]').prop("indeterminate",true);r('.bd-content [href="#"]').click(function(e){e.preventDefault()});r("#exampleModal").on("show.bs.modal",function(e){var t=r(e.relatedTarget);var n=t.data("whatever");var i=r(this);i.find(".modal-title").text("New message to "+n);i.find(".modal-body input").val(n)});r(".bd-toggle-animated-progress").on("click",function(){r(this).siblings(".progress").find(".progress-bar-striped").toggleClass("progress-bar-animated")});r("figure.highlight, div.highlight").each(function(){var e='
';r(this).before(e);r(".btn-clipboard").tooltip().on("mouseleave",function(){r(this).tooltip("hide")})});var e=new Clipboard(".btn-clipboard",{target:function(e){return e.parentNode.nextElementSibling}});e.on("success",function(e){r(e.trigger).attr("title","Copied!").tooltip("_fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("_fixTitle");e.clearSelection()});e.on("error",function(e){var t=/Mac/i.test(navigator.userAgent)?"⌘":"Ctrl-";var n="Press "+t+"C to copy";r(e.trigger).attr("title",n).tooltip("_fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("_fixTitle")});var t=r("#bd-docs-nav-list").navgoco({caretHtml:'',accordion:true,openClass:"opened",save:true,storageType:"local",cookie:{name:"codefresh-menu",expires:false,path:"/"},slide:{duration:10,easing:"linear"},onInitAfter:function(e){var t=r("#bd-docs-nav");var n=r("#bd-docs-nav li.active");if(n.length>0){var i=t.scrollTop()+(n.last().offset().top-(window.localStorage.getItem("scrollto")||t.height()/2));i=i.toFixed();setTimeout(function(){t.animate({scrollTop:i},{duration:0,easing:"linear",complete:function(){window.localStorage.removeItem("scrollto")}})},0)}},onClickAfter:function(e,t){window.localStorage.setItem("scrollto",r(e.currentTarget).offset().top)}});anchors.options={icon:"#"};anchors.add(".bd-content-inner > h2, .bd-content-inner > h3, .bd-content-inner > h4, .bd-content-inner > h5");r(".bd-content-inner > h2, .bd-content-inner > h3, .bd-content-inner > h4, .bd-content-inner > h5").wrapInner("
");r("a").smoothScroll({offset:0});r(".section-nav").on("click","a",function(){window.location.hash=r(this).attr("href");return false});Holder.addTheme("gray",{bg:"#777",fg:"rgba(255,255,255,.75)",font:"Helvetica",fontweight:"normal"})})})(jQuery);(function(){"use strict";function e(){var e=/MSIE ([0-9.]+)/.exec(window.navigator.userAgent);if(e===null){return null}var t=parseInt(e[1],10);var n=Math.floor(t);return n}function t(){var e=new Function("/*@cc_on return @_jscript_version; @*/")();if(typeof e==="undefined"){return 11}if(e<9){return 8}return e}var n=window.navigator.userAgent;if(n.indexOf("Opera")>-1||n.indexOf("Presto")>-1){return}var i=e();if(i===null){return}var r=t();if(i!==r){window.alert("WARNING: You appear to be using IE"+r+" in IE"+i+" emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!")}})();(function(){"use strict";if("serviceWorker"in navigator){window.addEventListener("load",function(){navigator.serviceWorker.register("/sw.js").then(function(e){console.log("ServiceWorker registration successful with scope: ",e.scope)}).catch(function(e){console.log("ServiceWorker registration failed: ",e)})})}else{console.log("Service workers are not supported.")}})(); \ No newline at end of file diff --git a/assets/js/src/redirect-popup.js b/assets/js/src/redirect-popup.js index e38ed6dd4..b1da3b363 100644 --- a/assets/js/src/redirect-popup.js +++ b/assets/js/src/redirect-popup.js @@ -1,75 +1,75 @@ -(function ($) { - 'use strict' +// (function ($) { +// 'use strict' - function getDocTypeCookie() { - return document.cookie.split(';').find(function (item) { - return item.trim().startsWith('doctype') - }) - } +// function getDocTypeCookie() { +// return document.cookie.split(';').find(function (item) { +// return item.trim().startsWith('doctype') +// }) +// } - function isLastlyVisitedCsdp(docTypeCookie) { - var docType = docTypeCookie.split('=').pop() +// function isLastlyVisitedCsdp(docTypeCookie) { +// var docType = docTypeCookie.split('=').pop() - return docType === 'ArgoPlatform' - } +// return docType === 'ArgoPlatform' +// } - function isLastlyVisitedClassic(docTypeCookie) { - var docType = docTypeCookie.split('=').pop() +// function isLastlyVisitedClassic(docTypeCookie) { +// var docType = docTypeCookie.split('=').pop() - return docType === 'Classic' - } +// return docType === 'Classic' +// } - function isRedirectedFromClassicDocs(docTypeCookie) { - var redirectFromUrl = localStorage.getItem('redirectFrom') +// function isRedirectedFromClassicDocs(docTypeCookie) { +// var redirectFromUrl = localStorage.getItem('redirectFrom') - return isLastlyVisitedCsdp(docTypeCookie) && redirectFromUrl && redirectFromUrl.startsWith(window.location.origin) - } +// return isLastlyVisitedCsdp(docTypeCookie) && redirectFromUrl && redirectFromUrl.startsWith(window.location.origin) +// } - function setDocumentationCookie() { - document.cookie = 'doctype=Classic; SameSite=Lax; Secure; Domain=.codefresh.io; Max-age=2592000; Path=/' - } +// function setDocumentationCookie() { +// document.cookie = 'doctype=Classic; SameSite=Lax; Secure; Domain=.codefresh.io; Max-age=2592000; Path=/' +// } - function handleNavigateBackToClassic() { - setDocumentationCookie() - $('#redirectModal').modal('hide') - } +// function handleNavigateBackToClassic() { +// setDocumentationCookie() +// $('#redirectModal').modal('hide') +// } - $(function () { - if (window.location.hostname === 'localhost' || localStorage.getItem('ignoreRedirect')) { - return - } +// $(function () { +// if (window.location.hostname === 'localhost' || localStorage.getItem('ignoreRedirect')) { +// return +// } - $('a[href*="codefresh.io/docs').each(function () { - $(this).on('click', function () { - setDocumentationCookie() - localStorage.removeItem('redirectFrom') - if (typeof window.ga === 'function') { - window.ga('send', 'event', 'Navbar', 'Docs links', 'Open CF Classic Docs') - } - }) - }) +// $('a[href*="codefresh.io/docs').each(function () { +// $(this).on('click', function () { +// setDocumentationCookie() +// localStorage.removeItem('redirectFrom') +// if (typeof window.ga === 'function') { +// window.ga('send', 'event', 'Navbar', 'Docs links', 'Open CF Classic Docs') +// } +// }) +// }) - try { - var docTypeCookie = getDocTypeCookie() - if (docTypeCookie) { - if (isLastlyVisitedClassic(docTypeCookie)) { - localStorage.setItem('redirectFrom', window.location.href) - window.location.href = 'https://codefresh.io/docs/' - } else if (isRedirectedFromClassicDocs(docTypeCookie)) { - $('#redirectModal').modal({ - backdrop: false, - show: true - }) - $('#redirectModal').on('hide.bs.modal', function () { - localStorage.removeItem('redirectFrom') - }) - var redirectFromUrl = localStorage.getItem('redirectFrom') - $('#redirectModal .redirect-popup__footer-link').attr('href', redirectFromUrl) - $('#redirectModal .redirect-popup__footer-link').on('click', handleNavigateBackToClassic) - } - } - } catch (error) { - console.error(error) - } - }) -}(jQuery)) +// try { +// var docTypeCookie = getDocTypeCookie() +// if (docTypeCookie) { +// if (isLastlyVisitedClassic(docTypeCookie)) { +// localStorage.setItem('redirectFrom', window.location.href) +// window.location.href = 'https://codefresh.io/docs/' +// } else if (isRedirectedFromClassicDocs(docTypeCookie)) { +// $('#redirectModal').modal({ +// backdrop: false, +// show: true +// }) +// $('#redirectModal').on('hide.bs.modal', function () { +// localStorage.removeItem('redirectFrom') +// }) +// var redirectFromUrl = localStorage.getItem('redirectFrom') +// $('#redirectModal .redirect-popup__footer-link').attr('href', redirectFromUrl) +// $('#redirectModal .redirect-popup__footer-link').on('click', handleNavigateBackToClassic) +// } +// } +// } catch (error) { +// console.error(error) +// } +// }) +// }(jQuery))