text: "use strict";!function(a){a.fn.subbscribe=function(b){var d,e,f,g,h,i,c=a.extend({list:"MailChimp",url:"",title:"Never miss a post!",text:"Get our latest posts and announcements in your inbox. You won't regret it!",name:"Subbscribe",color:"#ee6262",thumbnail:"https://s3-ap-southeast-2.amazonaws.com/subbscribe/img/avatar.png",emailonly:!1,cm_mail_field:"",delay:0},b);if(""!==c.url)if("CampaignMonitor"!==c.list||c.cm_mail_field.length){if(d="",e="",f="","MailChimp"===c.list)d="NAME",e="EMAIL",f=c.url.replace("/post?","/post-json?").concat("&c=?");else{if("CampaignMonitor"!==c.list)return void console.log("Subbscribe Error: list value must be set to MailChimp or CampaignMonitor");d="cm-name",e=c.cm_mail_field,f=c.url+"?callback=?"}g="",h='<input type="email" name="'+e+'" id="subb-EMAIL" placeholder="Email Address" />',c.emailonly||(g=' <input type="text" name="'+d+'" id="subb-NAME" placeholder="Name" />'),i='<div id="subbscribe" style="display: none"><div class="subb-title">'+c.title+' <img class="close-x" src="https://s3-ap-southeast-2.amazonaws.com/subbscribe/img/close.svg" />  </div> <div class="subb-body"> <div class="subb-hidden"> <div class="subb-thumbnail"> <img style="width: 40px; height: 40px;" src="'+c.thumbnail+'" /> </div> <div class="subb-hidden"> <div class="subb-site"> &nbsp;'+c.name+' </div> <button class="subb-button show-form">Subscribe</button> </div> </div> <div class="subb-form" style="display: none"> <p>'+c.text+'</p> <form id="mc-embedded-subbscribe-form" method="post" action="'+c.url+'"> <div class="subbscribe-alert subbscribe-error" style="display: none">Oops! Check your details and try again.</div> <div class="subbscribe-alert subbscribe-success" style="display: none">Thanks! Check your email for confirmation.</div> <div class="text-input"> '+g+' </div> <div class="text-input"> '+h+' </div> <button class="subb-button submit-form" type="submit" style="width: 100%; margin-bottom: 10px;">Subscribe</button></form></div> </div> </div>',1!==function(a){var b,c,d,e;for(b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(e=c[d];" "===e.charAt(0);)e=e.substring(1);if(0===e.indexOf(b))return e.substring(b.length,e.length)}return""}("subbscribe-hidden")&&0===a(this).find("#subbscribe").length&&(this.append(i),setTimeout(function(){a("#subbscribe").css("display","block"),a("#subbscribe").css("width",a(".subb-site").width()+200),a("#subbscribe").addClass("animated slideInRight")},1e3*c.delay)),a("#subbscribe .subb-button").css("background-color",c.color),a("#subbscribe .close-x").click(function(){a("#subbscribe").toggleClass("slideInRight fadeOut"),a("#subbscribe").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){a("#subbscribe").remove()}),"function"==typeof c.onClose&&c.onClose.call()}),a("#subbscribe .show-form").click(function(){a("#subbscribe .subb-hidden").hide(),a("#subbscribe .subb-form").show()}),a("#mc-embedded-subbscribe-form").submit(function(b){var d,e,g;b.preventDefault(),d=!0,e=a("#subb-NAME"),g=a("#subb-EMAIL"),c.emailonly||(e.val().length<2?(d=!1,e.addClass("error")):e.removeClass("error")),function(a){return/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(a)}(g.val())?g.removeClass("error"):(d=!1,g.addClass("error")),d?(a("#subbscribe .subbscribe-error").slideUp(),a("#subbscribe .submit-form").attr("disabled","disabled"),a.ajax({url:f,type:"post",data:a(this).serialize(),dataType:"json",contentType:"application/json; charset=utf-8",success:function(b){!function(a){return console.log(a),"MailChimp"===c.list?"success"!==a.result:"CampaignMonitor"!==c.list||400===a.Status}(b)?console.log("Subbscribe Error: submission failed."):(a("#subbscribe input").each(function(){a(this).val("")}),a(".subbscribe-success").slideDown(),setTimeout(function(){a("#subbscribe").addClass("animated fadeOut")},2e3),a("#subbscribe").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){a("#subbscribe").remove(),"function"==typeof c.onSubbscribe&&c.onSubbscribe.call()}))}})):a("#subbscribe .subbscribe-error").slideDown()})}else console.log("You must provide the mail input name. Found in the form code from Campaign Monitor");else console.log("Subbscribe Error: You must provide a valid MailChimp form URL.")}}(jQuery),function(){function c(){for(;b.length;)b[0](),b.shift()}function d(a){this.a=e,this.b=void 0,this.f=[];var b=this;try{a(function(a){!function c(a,b){var d,f;if(a.a==e){if(b==a)throw new TypeError;d=!1;try{if(f=b&&b.then,null!=b&&"object"==typeof b&&"function"==typeof f)return void f.call(b,function(b){d||c(a,b),d=!0},function(b){d||g(a,b),d=!0})}catch(i){return void(d||g(a,i))}a.a=0,a.b=b,h(a)}}(b,a)},function(a){g(b,a)})}catch(c){g(b,c)}}function f(a){return new d(function(b){b(a)})}function g(a,b){if(a.a==e){if(b==a)throw new TypeError;a.a=1,a.b=b,h(a)}}function h(c){!function(c){b.push(c),1==b.length&&a()}(function(){if(c.a!=e)for(;c.f.length;){var a=(f=c.f.shift())[0],b=f[1],d=f[2],f=f[3];try{0==c.a?d("function"==typeof a?a.call(void 0,c.b):c.b):1==c.a&&("function"==typeof b?d(b.call(void 0,c.b)):f(c.b))}catch(g){f(g)}}})}var b=[],a=function(){setTimeout(c)},e=2;d.prototype.g=function(a){return this.c(void 0,a)},d.prototype.c=function(a,b){var c=this;return new d(function(d,e){c.f.push([a,b,d,e]),h(c)})},window.Promise||(window.Promise=d,window.Promise.resolve=f,window.Promise.reject=function(a){return new d(function(b,c){c(a)})},window.Promise.race=function(a){return new d(function(b,c){for(var d=0;d<a.length;d+=1)f(a[d]).c(b,c)})},window.Promise.all=function(a){return new d(function(b,c){function d(c){return function(d){g[c]=d,(e+=1)==a.length&&b(g)}}var h,e=0,g=[];for(0==a.length&&b(g),h=0;h<a.length;h+=1)f(a[h]).c(d(h),c)})},window.Promise.prototype.then=d.prototype.c,window.Promise.prototype.catch=d.prototype.g)}(),function(){function b(b,c){a?b.addEventListener("scroll",c,!1):b.attachEvent("scroll",c)}function c(a){this.a=document.createElement("div"),this.a.setAttribute("aria-hidden","true"),this.a.appendChild(document.createTextNode(a)),this.b=document.createElement("span"),this.c=document.createElement("span"),this.h=document.createElement("span"),this.f=document.createElement("span"),this.g=-1,this.b.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.c.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.f.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.h.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;",this.b.appendChild(this.h),this.c.appendChild(this.f),this.a.appendChild(this.b),this.a.appendChild(this.c)}function d(a,b){a.a.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;left:-999px;white-space:nowrap;font:"+b+";"}function e(a){var b=a.a.offsetWidth,c=b+100;return a.f.style.width=c+"px",a.c.scrollLeft=c,a.b.scrollLeft=a.b.scrollWidth+100,a.g!==b&&(a.g=b,!0)}function f(a,c){function d(){var a=f;e(a)&&null!==a.a.parentNode&&c(a.g)}var f=a;b(a.b,d),b(a.c,d),e(a)}function g(a,b){var c=b||{};this.family=a,this.style=c.style||"normal",this.weight=c.weight||"normal",this.stretch=c.stretch||"normal"}function k(a,b){return[a.style,a.weight,function(){if(null===i){var a=document.createElement("div");try{a.style.font="condensed 100px sans-serif"}catch(b){}i=""!==a.style.font}return i}()?a.stretch:"","100px",b].join(" ")}var a=!!document.addEventListener,h=null,i=null,j=!!window.FontFace;g.prototype.load=function(b,e){var g=this,i=b||"BESbswy",l=e||3e3,m=(new Date).getTime();return new Promise(function(b,e){if(j){var n=new Promise(function(a,b){!function c(){(new Date).getTime()-m>=l?b():document.fonts.load(k(g,g.family),i).then(function(b){1<=b.length?a():setTimeout(c,25)},function(){b()})}()}),o=new Promise(function(a,b){setTimeout(b,l)});Promise.race([o,n]).then(function(){b(g)},function(){e(g)})}else!function(b){document.body?b():a?document.addEventListener("DOMContentLoaded",b):document.attachEvent("onreadystatechange",function(){"interactive"!=document.readyState&&"complete"!=document.readyState||b()})}(function(){function a(){var a;(a=-1!=p&&-1!=q||-1!=p&&-1!=r||-1!=q&&-1!=r)&&((a=p!=q&&p!=r&&q!=r)||(null===h&&(a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),h=!!a&&(536>parseInt(a[1],10)||536===parseInt(a[1],10)&&11>=parseInt(a[2],10))),a=h&&(p==s&&q==s&&r==s||p==t&&q==t&&r==t||p==u&&q==u&&r==u)),a=!a),a&&(null!==v.parentNode&&v.parentNode.removeChild(v),clearTimeout(w),b(g))}var j=new c(i),n=new c(i),o=new c(i),p=-1,q=-1,r=-1,s=-1,t=-1,u=-1,v=document.createElement("div"),w=0;v.dir="ltr",d(j,k(g,"sans-serif")),d(n,k(g,"serif")),d(o,k(g,"monospace")),v.appendChild(j.a),v.appendChild(n.a),v.appendChild(o.a),document.body.appendChild(v),s=j.a.offsetWidth,t=n.a.offsetWidth,u=o.a.offsetWidth,function x(){if((new Date).getTime()-m>=l)null!==v.parentNode&&v.parentNode.removeChild(v),e(g);else{var b=document.hidden;!0!==b&&void 0!==b||(p=j.a.offsetWidth,q=n.a.offsetWidth,r=o.a.offsetWidth,a()),w=setTimeout(x,50)}}(),f(j,function(b){p=b,a()}),d(j,k(g,'"'+g.family+'",sans-serif')),f(n,function(b){q=b,a()}),d(n,k(g,'"'+g.family+'",serif')),f(o,function(b){r=b,a()}),d(o,k(g,'"'+g.family+'",monospace'))})})},window.FontFaceObserver=g,window.FontFaceObserver.prototype.check=window.FontFaceObserver.prototype.load=g.prototype.load,"undefined"!=typeof module&&(module.exports=window.FontFaceObserver)}(),$(function(){window.CaffeineTheme={version:"3.0.4",search:{container:function(){return $("#results")},form:function(a){return $("#search-container")[a]()}},context:function(){var a;return""===(a=document.body.className.split(" ")[0].split("-")[0])?"error":a},app:document.body,is:function(a,b){return this.app.dataset?this.app.dataset[a]===b:this.app.getAttribute("data-"+a)===b},redirect:function(a){var b="";b+=a>1?"/page/"+a+"/#open":"/#open",window.location.href=b},isOpen:function(){return"#open"===location.hash},getOpenHashFragment:function(){return"#open"},open:function(){window.history.replaceState(null,null,"#open")},close:function(){window.history.replaceState(null,null,"#")},getLastPageNum:function(){var a="";return window.store&&window.store.enabled&&(a=window.store.get("pageNum")||""),a},setLastPageNum:function(){var a=$("#pageNum").text()||"";a.length>0&&window.store&&window.store.enabled&&window.store.set("pageNum",a)},readTime:function(){return new function(a){return $(a).each(function(){var a,b;return a=$(this).attr("datetime"),b=$(this).html(),$(this).mouseover(function(){return $(this).html(a)}),$(this).mouseout(function(){return $(this).html(b)})})}(".meta > time")},device:function(){var a;return a=window.innerWidth,window.innerHeight,480>=a?"mobile":1024>=a?"tablet":"desktop"},hideIndexPage:function(){$("#default-nav-header, .blog-header, .material-cover, .page-index").addClass("transparent")},showIndexPage:function(){$("#default-nav-header, .blog-header, .material-cover, .page-index").removeClass("transparent")},showNotification:function(){if(window.notificationOptions&&window.toastr){var a,b=window.notificationOptions.message||"",c=window.notificationOptions.type||"info",d=window.notificationOptions.isShownOnce||!0,e="";a=function(){window.store&&window.store.enabled&&(e&&window.store.remove("notification"),d&&window.store.set("notification",b))},window.toastr.options={closeButton:!0,debug:!1,newestOnTop:!1,progressBar:!0,positionClass:"toast-bottom-right",preventDuplicates:!0,onclick:null,escapeHtml:window.notificationOptions.escapeHtml||!1,timeOut:window.notificationOptions.timeOut||"25000",extendedTimeOut:window.notificationOptions.extendedTimeOut||"10000",onHidden:a},window.store&&window.store.enabled&&(e=window.store.get("notification")||""),void 0!==e&&e===b||window.toastr[c](b)}},getGridWidth:function(a){var b=null;return!isNaN(a)&&a>0&&2!==a&&(b=Math.floor((100-2*a)/a),b+="%"),b},mediaQueryListener:function(a,b,c){var d=window.matchMedia(a);d.matches?b.call(this):c.call(this),d.addListener(function(a){a.matches?b.call(this):c.call(this)})}}}),function(a){var b,d,c=function(a){var b=new c.Index;return b.pipeline.add(c.stopWordFilter,c.stemmer),a&&a.call(b,b),b};c.version="0.4.3","undefined"!=typeof module&&(module.exports=c),c.utils={},c.utils.warn=(b=this,function(a){b.console&&console.warn&&console.warn(a)}),c.utils.zeroFillArray=function(){var a=[0];return function(b){for(;b>a.length;)a=a.concat(a);return a.slice(0,b)}}(),c.EventEmitter=function(){this.events={}},c.EventEmitter.prototype.addListener=function(){var a=Array.prototype.slice.call(arguments),b=a.pop(),c=a;if("function"!=typeof b)throw new TypeError("last argument must be a function");c.forEach(function(a){this.hasHandler(a)||(this.events[a]=[]),this.events[a].push(b)},this)},c.EventEmitter.prototype.removeListener=function(a,b){if(this.hasHandler(a)){var c=this.events[a].indexOf(b);this.events[a].splice(c,1),this.events[a].length||delete this.events[a]}},c.EventEmitter.prototype.emit=function(a){if(this.hasHandler(a)){var b=Array.prototype.slice.call(arguments,1);this.events[a].forEach(function(a){a.apply(void 0,b)})}},c.EventEmitter.prototype.hasHandler=function(a){return a in this.events},c.tokenizer=function(a){if(!arguments.length||null==a||void 0==a)return[];if(Array.isArray(a))return a.map(function(a){return a.toLowerCase()});for(var b=(""+a).replace(/^\s+/,""),c=b.length-1;c>=0;c--)if(/\S/.test(b.charAt(c))){b=b.substring(0,c+1);break}return b.split(/\s+/).map(function(a){return a.replace(/^\W+/,"").replace(/\W+$/,"").toLowerCase()})},c.Pipeline=function(){this._stack=[]},c.Pipeline.registeredFunctions={},c.Pipeline.registerFunction=function(a,b){b in this.registeredFunctions&&c.utils.warn("Overwriting existing registered function: "+b),a.label=b,c.Pipeline.registeredFunctions[a.label]=a},c.Pipeline.warnIfFunctionNotRegistered=function(a){a.label&&a.label in this.registeredFunctions||c.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",a)},c.Pipeline.load=function(a){var b=new c.Pipeline;return a.forEach(function(a){var d=c.Pipeline.registeredFunctions[a];if(!d)throw Error("Cannot load un-registered function: "+a);b.add(d)}),b},c.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(a){c.Pipeline.warnIfFunctionNotRegistered(a),this._stack.push(a)},this)},c.Pipeline.prototype.after=function(a,b){c.Pipeline.warnIfFunctionNotRegistered(b);var d=this._stack.indexOf(a)+1;this._stack.splice(d,0,b)},c.Pipeline.prototype.before=function(a,b){c.Pipeline.warnIfFunctionNotRegistered(b);var d=this._stack.indexOf(a);this._stack.splice(d,0,b)},c.Pipeline.prototype.remove=function(a){var b=this._stack.indexOf(a);this._stack.splice(b,1)},c.Pipeline.prototype.run=function(a){var b,c,d,e,f,g;for(b=[],c=a.length,d=this._stack.length,e=0;c>e;e++){for(f=a[e],g=0;d>g&&void 0!==(f=this._stack[g](f,e,a));g++);void 0!==f&&b.push(f)}return b},c.Pipeline.prototype.toJSON=function(){return this._stack.map(function(a){return c.Pipeline.warnIfFunctionNotRegistered(a),a.label})},c.Vector=function(a){this.elements=a},c.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var a,b=0,c=this.elements,d=c.length,e=0;d>e;e++)a=c[e],b+=a*a;return this._magnitude=Math.sqrt(b)},c.Vector.prototype.dot=function(a){for(var b=this.elements,c=a.elements,d=b.length,e=0,f=0;d>f;f++)e+=b[f]*c[f];return e},c.Vector.prototype.similarity=function(a){return this.dot(a)/(this.magnitude()*a.magnitude())},c.Vector.prototype.toArray=function(){return this.elements},c.SortedSet=function(){this.length=0,this.elements=[]},c.SortedSet.load=function(a){var b=new this;return b.elements=a,b.length=a.length,b},c.SortedSet.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(a){~this.indexOf(a)||this.elements.splice(this.locationFor(a),0,a)},this),this.length=this.elements.length},c.SortedSet.prototype.toArray=function(){return this.elements.slice()},c.SortedSet.prototype.map=function(a,b){return this.elements.map(a,b)},c.SortedSet.prototype.forEach=function(a,b){return this.elements.forEach(a,b)},c.SortedSet.prototype.indexOf=function(a,b,c){b=b||0;var d=(c=c||this.elements.length)-b,e=b+Math.floor(d/2),f=this.elements[e];return 1>=d?f===a?e:-1:a>f?this.indexOf(a,e,c):f>a?this.indexOf(a,b,e):f===a?e:void 0},c.SortedSet.prototype.locationFor=function(a,b,c){b=b||0;var d=(c=c||this.elements.length)-b,e=b+Math.floor(d/2),f=this.elements[e];if(1>=d){if(f>a)return e;if(a>f)return e+1}return a>f?this.locationFor(a,e,c):f>a?this.locationFor(a,b,e):void 0},c.SortedSet.prototype.intersect=function(a){for(var b=new c.SortedSet,d=0,e=0,f=this.length,g=a.length,h=this.elements,i=a.elements;!(d>f-1||e>g-1);)h[d]!==i[e]?h[d]<i[e]?d++:h[d]>i[e]&&e++:(b.add(h[d]),d++,e++);return b},c.SortedSet.prototype.clone=function(){var a=new c.SortedSet;return a.elements=this.toArray(),a.length=a.elements.length,a},c.SortedSet.prototype.union=function(a){var b,c,d;return this.length>=a.length?(b=this,c=a):(b=a,c=this),(d=b.clone()).add.apply(d,c.toArray()),d},c.SortedSet.prototype.toJSON=function(){return this.toArray()},c.Index=function(){this._fields=[],this._ref="id",this.pipeline=new c.Pipeline,this.documentStore=new c.Store,this.tokenStore=new c.TokenStore,this.corpusTokens=new c.SortedSet,this.eventEmitter=new c.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},c.Index.prototype.on=function(){var a=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,a)},c.Index.prototype.off=function(a,b){return this.eventEmitter.removeListener(a,b)},c.Index.load=function(a){a.version!==c.version&&c.utils.warn("version mismatch: current "+c.version+" importing "+a.version);var b=new this;return b._fields=a.fields,b._ref=a.ref,b.documentStore=c.Store.load(a.documentStore),b.tokenStore=c.TokenStore.load(a.tokenStore),b.corpusTokens=c.SortedSet.load(a.corpusTokens),b.pipeline=c.Pipeline.load(a.pipeline),b},c.Index.prototype.field=function(a,b){var c={name:a,boost:(b=b||{}).boost||1};return this._fields.push(c),this},c.Index.prototype.ref=function(a){return this._ref=a,this},c.Index.prototype.add=function(a,b){var g,h,i,d={},e=new c.SortedSet,f=a[this._ref];for(b=void 0===b||b,this._fields.forEach(function(b){var f=this.pipeline.run(c.tokenizer(a[b.name]));d[b.name]=f,c.SortedSet.prototype.add.apply(e,f)},this),this.documentStore.set(f,e),c.SortedSet.prototype.add.apply(this.corpusTokens,e.toArray()),g=0;e.length>g;g++)h=e.elements[g],i=this._fields.reduce(function(a,b){var c=d[b.name].length;return c?a+d[b.name].filter(function(a){return a===h}).length/c*b.boost:a},0),this.tokenStore.add(h,{ref:f,tf:i});b&&this.eventEmitter.emit("add",a,this)},c.Index.prototype.remove=function(a,b){var d,c=a[this._ref];b=void 0===b||b,this.documentStore.has(c)&&(d=this.documentStore.get(c),this.documentStore.remove(c),d.forEach(function(a){this.tokenStore.remove(a,c)},this),b&&this.eventEmitter.emit("remove",a,this))},c.Index.prototype.update=function(a,b){b=void 0===b||b,this.remove(a,!1),this.add(a,!1),b&&this.eventEmitter.emit("update",a,this)},c.Index.prototype.idf=function(a){if(this._idfCache[a])return this._idfCache[a];var b=this.tokenStore.count(a),c=1;return b>0&&(c=1+Math.log(this.tokenStore.length/b)),this._idfCache[a]=c},c.Index.prototype.search=function(a){var g,h,b=this.pipeline.run(c.tokenizer(a)),d=c.utils.zeroFillArray(this.corpusTokens.length),e=[],f=this._fields.reduce(function(a,b){return a+b.boost},0);return b.some(function(a){return this.tokenStore.has(a)},this)?(b.forEach(function(a,b,g){var h=1/g.length*this._fields.length*f,i=this,j=this.tokenStore.expand(a).reduce(function(b,e){var l,f=i.corpusTokens.indexOf(e),g=i.idf(e),j=1,k=new c.SortedSet;return e!==a&&(l=Math.max(3,e.length-a.length),j=1/Math.log(l)),f>-1&&(d[f]=h*g*j),Object.keys(i.tokenStore.get(e)).forEach(function(a){k.add(a)}),b.union(k)},new c.SortedSet);e.push(j)},this),g=e.reduce(function(a,b){return a.intersect(b)}),h=new c.Vector(d),g.map(function(a){return{ref:a,score:h.similarity(this.documentVector(a))}},this).sort(function(a,b){return b.score-a.score})):[]},c.Index.prototype.documentVector=function(a){var b,d,e,f,g,h,i;for(b=this.documentStore.get(a),d=b.length,e=c.utils.zeroFillArray(this.corpusTokens.length),f=0;d>f;f++)g=b.elements[f],h=this.tokenStore.get(g)[a].tf,i=this.idf(g),e[this.corpusTokens.indexOf(g)]=h*i;return new c.Vector(e)},c.Index.prototype.toJSON=function(){return{version:c.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},c.Store=function(){this.store={},this.length=0},c.Store.load=function(a){var b=new this;return b.length=a.length,b.store=Object.keys(a.store).reduce(function(b,d){return b[d]=c.SortedSet.load(a.store[d]),b},{}),b},c.Store.prototype.set=function(a,b){this.store[a]=b,this.length=Object.keys(this.store).length},c.Store.prototype.get=function(a){return this.store[a]},c.Store.prototype.has=function(a){return a in this.store},c.Store.prototype.remove=function(a){this.has(a)&&(delete this.store[a],this.length--)},c.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},c.stemmer=function(){var a={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},b={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},c="[aeiouy]",d="[^aeiou][^aeiouy]*",e=c+"[aeiou]*",f="^("+d+")?"+e+d,g="^("+d+")?"+e+d+e+d,h="^("+d+")?"+c;return function(e){var i,j,k,l,m,n,o,p;return 3>e.length?e:("y"==(k=e.substr(0,1))&&(e=k.toUpperCase()+e.substr(1)),m=/^(.+?)([^s])s$/,(l=/^(.+?)(ss|i)es$/).test(e)?e=e.replace(l,"$1$2"):m.test(e)&&(e=e.replace(m,"$1$2")),m=/^(.+?)(ed|ing)$/,(l=/^(.+?)eed$/).test(e)?(p=l.exec(e),(l=RegExp(f)).test(p[1])&&(l=/.$/,e=e.replace(l,""))):m.test(e)&&(i=(p=m.exec(e))[1],(m=RegExp(h)).test(i)&&(e=i,m=/(at|bl|iz)$/,n=RegExp("([^aeiouylsz])\\1$"),o=RegExp("^"+d+c+"[^aeiouwxy]$"),m.test(e)?e+="e":n.test(e)?(l=/.$/,e=e.replace(l,"")):o.test(e)&&(e+="e"))),(l=/^(.+?)y$/).test(e)&&(i=(p=l.exec(e))[1],(l=RegExp(h)).test(i)&&(e=i+"i")),(l=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/).test(e)&&(i=(p=l.exec(e))[1],j=p[2],(l=RegExp(f)).test(i)&&(e=i+a[j])),(l=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/).test(e)&&(i=(p=l.exec(e))[1],j=p[2],(l=RegExp(f)).test(i)&&(e=i+b[j])),m=/^(.+?)(s|t)(ion)$/,(l=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/).test(e)?(i=(p=l.exec(e))[1],(l=RegExp(g)).test(i)&&(e=i)):m.test(e)&&(i=(p=m.exec(e))[1]+p[2],(m=RegExp(g)).test(i)&&(e=i)),(l=/^(.+?)e$/).test(e)&&(i=(p=l.exec(e))[1],l=RegExp(g),m=RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$"),n=RegExp("^"+d+c+"[^aeiouwxy]$"),(l.test(i)||m.test(i)&&!n.test(i))&&(e=i)),l=/ll$/,m=RegExp(g),l.test(e)&&m.test(e)&&(l=/.$/,e=e.replace(l,"")),"y"==k&&(e=k.toLowerCase()+e.substr(1)),e)}}(),c.Pipeline.registerFunction(c.stemmer,"stemmer"),c.stopWordFilter=function(a){return-1===c.stopWordFilter.stopWords.indexOf(a)?a:void 0},c.stopWordFilter.stopWords=new c.SortedSet,c.stopWordFilter.stopWords.length=119,c.stopWordFilter.stopWords.elements=["","a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"],c.Pipeline.registerFunction(c.stopWordFilter,"stopWordFilter"),c.TokenStore=function(){this.root={docs:{}},this.length=0},c.TokenStore.load=function(a){var b=new this;return b.root=a.root,b.length=a.length,b},c.TokenStore.prototype.add=function(a,b,c){c=c||this.root;var d=a[0],e=a.slice(1);return d in c||(c[d]={docs:{}}),0===e.length?(c[d].docs[b.ref]=b,void(this.length+=1)):this.add(e,b,c[d])},c.TokenStore.prototype.has=function(a){if(!a)return!1;for(var b=this.root,c=0;a.length>c;c++){if(!b[a[c]])return!1;b=b[a[c]]}return!0},c.TokenStore.prototype.getNode=function(a){if(!a)return{};for(var b=this.root,c=0;a.length>c;c++){if(!b[a[c]])return{};b=b[a[c]]}return b},c.TokenStore.prototype.get=function(a,b){return this.getNode(a,b).docs||{}},c.TokenStore.prototype.count=function(a,b){return Object.keys(this.get(a,b)).length},c.TokenStore.prototype.remove=function(a,b){if(a){for(var c=this.root,d=0;a.length>d;d++){if(!(a[d]in c))return;c=c[a[d]]}delete c.docs[b]}},c.TokenStore.prototype.expand=function(a,b){var c=this.getNode(a),d=c.docs||{};return b=b||[],Object.keys(d).length&&b.push(a),Object.keys(c).forEach(function(c){"docs"!==c&&b.concat(this.expand(a+c,b))},this),b},c.TokenStore.prototype.toJSON=function(){return{root:this.root,length:this.length}},a.fn.ghostHunter=function(b){var c=a.extend({},a.fn.ghostHunter.defaults,b);return c.results?(d.init(this,c),d):void 0},a.fn.ghostHunter.defaults={results:!1,rss:"/rss",onKeyUp:!1,result_template:"<a href='{{link}}'><p><h2>{{title}}</h2><h4>{{date}}</h4></p></a>",info_template:"<p>找到的文章: {{amount}}</p>",displaySearchInfo:!0,zeroResultsInfo:!0,before:!1,onComplete:!1},d={isInit:!1,init:function(a,b){var d=this;this.target=a,this.rss=b.rss,this.results=b.results,this.blogData=[],this.result_template=b.result_template,this.info_template=b.info_template,this.zeroResultsInfo=b.zeroResultsInfo,this.displaySearchInfo=b.displaySearchInfo,this.before=b.before,this.onComplete=b.onComplete,this.index=c(function(){this.field("title",{boost:10}),this.field("description"),this.field("link"),this.field("category"),this.field("pubDate"),this.ref("id")}),a.focus(function(){d.loadRSS()}),a.closest("form").submit(function(b){b.preventDefault(),d.find(a.val())}),b.onKeyUp&&(d.loadRSS(),a.keyup(function(){d.find(a.val())}))},loadRSS:function(){if(this.isInit)return!1;var b=this.index,c=this.rss,d=this.blogData;a.get(c,function(c){var e,f,g,h;for(e=a(c).find("item"),f=0;e&&f<e.length;f++)g=e.eq(f),h={id:f+1,title:g.find("title").text(),description:g.find("description").text(),category:g.find("category").text(),pubDate:g.find("pubDate").text(),link:g.find("link").text()},b.add(h),d.push(h)}),this.isInit=!0},find:function(b){var f,g,c=this.index.search(b),d=a(this.results),e=[];for(d.empty(),this.before&&this.before(),(this.zeroResultsInfo||c.length>0)&&this.displaySearchInfo&&d.append(this.format(this.info_template,{amount:c.length})),f=0;f<c.length;f++)g=this.blogData[c[f].ref-1],d.append(this.format(this.result_template,g)),e.push(g);this.onComplete&&this.onComplete(e)},clear:function(){a(this.results).empty(),this.target.val("")},format:function(a,b){return a.replace(/{{([^{}]*)}}/g,function(a,c){var d=b[c];return"string"==typeof d||"number"==typeof d?d:a})}}}(jQuery),function(a){var b=new a.FontFaceObserver("Raleway",{weight:400}),c=new a.FontFaceObserver("Raleway",{weight:700}),d=new a.FontFaceObserver("Roboto Slab",{weight:300}),e=new a.FontFaceObserver("Roboto Slab",{weight:400});a.Promise.all([b.check(),c.check(),d.check(),e.check()]).then(function(){-1==a.document.documentElement.className.indexOf("fonts-loaded")&&(a.document.documentElement.className+=" fonts-loaded");try{var b=window.sessionStorage;b&&b.setItem("fonts-loaded","1")}catch(c){}}).catch(function(){a.document.documentElement.className+=" fonts-unavailable"})}(this),$(function(){var a,b,d,e,f,g,h,c=$("ol.posts");if((b=CaffeineTheme.app).dataset?(b.dataset.page=CaffeineTheme.context(),b.dataset.device=CaffeineTheme.device()):$(b).attr("data-page",CaffeineTheme.context()).attr("data-device",CaffeineTheme.device()),CaffeineTheme.readTime(),window.profile_title&&$(".profile-title").text(window.profile_title),window.profile_resume&&$("#profile-resume").text(window.profile_resume),window.tag_names)for(d=0;d<window.tag_names.length;d++)e=window.tag_names[d],f="/tag/"+e+"/"+CaffeineTheme.getOpenHashFragment(),$("<a>",{href:f,text:e}).appendTo("#popular-tags .tags");window.mailchimpOptions&&window.mailchimpOptions.url&&$(".subscribe-button").removeClass("hide"),CaffeineTheme.is("page","post")&&($("main").readingTime({readingTimeTarget:".reading-time > span"}),$(".content").fitVids(),$("#back-button").on("click",function(a){var b=CaffeineTheme.getLastPageNum();a.preventDefault(),b.length>0?CaffeineTheme.redirect(b):window.history.back()})),c&&c.masonry?(a=c.masonry({itemSelector:".card",percentPosition:!0}),window.gridOptions&&(g=window.gridOptions,h=CaffeineTheme.getGridWidth(g.columns),h&&CaffeineTheme.mediaQueryListener("all and (max-width: 700px)",function(){c.find(".card").css("width","100%")},function(){c.find(".card").css("width",h)})),a.imagesLoaded&&a.imagesLoaded().done(function(){a.masonry("layout")}).progress(function(){a.masonry("layout")})):c.find(".card").css("width",CaffeineTheme.getGridWidth(1)),$(window).load(function(){CaffeineTheme.is("page","home")&&($(".blog-header").addClass("animated fade-in"),CaffeineTheme.isOpen()&&CaffeineTheme.showNotification()),c.addClass("animated fade-in"),window.ScrollReveal&&$(".card").length>0?window.sr=window.ScrollReveal().reveal(".card",{afterReveal:function(){a&&a.masonry("layout")}}):c.css("visibility","visible"),CaffeineTheme.setLastPageNum()})}),function(a){a.fn.fitVids=function(b){var d,e,c={customSelector:null};return document.getElementById("fit-vids-style")||(d=document.head||document.getElementsByTagName("head")[0],e=document.createElement("div"),e.innerHTML='<p>x</p><style id="fit-vids-style">.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>',d.appendChild(e.childNodes[1])),b&&a.extend(c,b),this.each(function(){var d,b=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com'][src*='video.html']","object","embed"];c.customSelector&&b.push(c.customSelector),d=a(this).find(b.join(",")),(d=d.not("object object")).each(function(){var c,d,b=a(this);"embed"===this.tagName.toLowerCase()&&b.parent("object").length||b.parent(".fluid-width-video-wrapper").length||(c=("object"===this.tagName.toLowerCase()||b.attr("height")&&!isNaN(parseInt(b.attr("height"),10))?parseInt(b.attr("height"),10):b.height())/(isNaN(parseInt(b.attr("width"),10))?b.width():parseInt(b.attr("width"),10)),b.attr("id")||(d="fitvid"+Math.floor(999999*Math.random()),b.attr("id",d)),b.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*c+"%"),b.removeAttr("height").removeAttr("width"))})})}}(window.jQuery||window.Zepto),$(function(){var a,b,c,d,e,f,g,h,i,j;if(h=$(".cover"),e=$("#default-nav-header"),f=$(".tags-button"),g=e.find("#home-button"),i=$(".tags-overlay"),j=$("#search-field"),a=function(){h.toggleClass("expanded"),h.hasClass("expanded")?CaffeineTheme.close():CaffeineTheme.open()
      },c=function(){i.toggleClass("show"),f.find("i").toggleClass("fa-search fa-close"),j.focus()},b=function(){return i.hasClass("show")},d=function(d){return d.preventDefault(),CaffeineTheme.showIndexPage(),b()&&c(),CaffeineTheme.is("page","home")&&CaffeineTheme.showNotification(),a()},f.click(function(){c()}),$(".home-link").click(function(b){return CaffeineTheme.is("page","home")&&(b.preventDefault(),CaffeineTheme.showIndexPage(),CaffeineTheme.showNotification(),!CaffeineTheme.isOpen())?a():void 0}),$(".subscribe-link").click(function(a){if(a.preventDefault(),window.toastr&&window.toastr.remove(),window.mailchimpOptions&&window.mailchimpOptions.url){var b=window.mailchimpOptions;$("body").subbscribe({title:b.title||"Never miss a post!",text:b.text||"Stay up to the date with the latest posts!",name:b.name||"<a href='https://www.facebook.com/caffeinecoding' target='_blank'>@caffeinecoding</a>",color:b.color||"#56817A",thumbnail:b.thumbnail||"http://i.imgur.com/39erIwp.png",list:"MailChimp",url:b.url})}}),g.click(d),$(".open-link").click(d),CaffeineTheme.is("page","home")&&!CaffeineTheme.isOpen()){if(!window.disableCover)return CaffeineTheme.hideIndexPage(),a();CaffeineTheme.open()}}),function(a){a.fn.readingTime=function(b){var c,d,e,f,g,h,i,j,k,l,m,n;return this.length?(c=this,d=a(this),c.settings=a.extend({},{readingTimeTarget:".eta",wordCountTarget:null,wordsPerMinute:270,round:!0,lang:"en",remotePath:null,remoteTarget:null},b),e=c.settings.readingTimeTarget,f=c.settings.wordCountTarget,g=c.settings.wordsPerMinute,h=c.settings.round,i=c.settings.lang,j=c.settings.remotePath,k=c.settings.remoteTarget,"fr"==i?(l="Moins d'une minute",m="min"):"de"==i?(l="Weniger als eine Minute",m="min"):"es"==i?(l="Menos de un minuto",m="min"):(l="Less than a minute",m="min"),n=function(a){var k,b=a.split(" ").length,c=b/(g/60),i=Math.round(c/60),j=Math.round(c-60*i);!0===h?i>0?d.find(e).text(i+" "+m):d.find(e).text(l):(k=i+":"+j,d.find(e).text(k)),""!==f&&void 0!==f&&d.find(f).text(b)},d.each(function(){null!=j&&null!=k?a.get(j,function(b){n(a(b).children().text())}):n(d.text())}),void 0):this}}(jQuery),$(function(){var a,b,c=$("#search-field"),d=$("#popular-tags");return a=function(){return d.show()},b=function(){return d.hide()},c.ghostHunter({results:"#search-results",zeroResultsInfo:!1,onKeyUp:!0,displaySearchInfo:!0,result_template:"<a class=\"result\" href='{{link}}'>\n  <h2>{{title}}</h2>\n  <h4>{{pubDate}}</h4>\n</a>",onComplete:function(c){return c.length>0?b():a()}})});var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var d,a=/\blang(?:uage)?-(?!\*)(\w+)\b/i,b=_self.Prism={util:{encode:function(a){return a instanceof c?new c(a.type,b.util.encode(a.content),a.alias):"Array"===b.util.type(a)?a.map(b.util.encode):a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(a){return Object.prototype.toString.call(a).match(/\[object (\w+)\]/)[1]},clone:function(a){var c,d;switch(b.util.type(a)){case"Object":c={};for(d in a)a.hasOwnProperty(d)&&(c[d]=b.util.clone(a[d]));return c;case"Array":return a.map&&a.map(function(a){return b.util.clone(a)})}return a}},languages:{extend:function(a,c){var e,d=b.util.clone(b.languages[a]);for(e in c)d[e]=c[e];return d},insertBefore:function(a,c,d,e){var g,h,i,f=(e=e||b.languages)[a];if(2==arguments.length){d=arguments[1];for(g in d)d.hasOwnProperty(g)&&(f[g]=d[g]);return f}h={};for(i in f)if(f.hasOwnProperty(i)){if(i==c)for(g in d)d.hasOwnProperty(g)&&(h[g]=d[g]);h[i]=f[i]}return b.languages.DFS(b.languages,function(b,c){c===e[a]&&b!=a&&(this[b]=h)}),e[a]=h},DFS:function(a,c,d){for(var e in a)a.hasOwnProperty(e)&&(c.call(a,e,a[e],d||e),"Object"===b.util.type(a[e])?b.languages.DFS(a[e],c):"Array"===b.util.type(a[e])&&b.languages.DFS(a[e],c,e))}},plugins:{},highlightAll:function(a,c){for(var d,e=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),f=0;d=e[f++];)b.highlightElement(d,!0===a,c)},highlightElement:function(c,d,e){var f,g,h,i,j,k;for(h=c;h&&!a.test(h.className);)h=h.parentNode;h&&(f=(h.className.match(a)||[,""])[1],g=b.languages[f]),c.className=c.className.replace(a,"").replace(/\s+/g," ")+" language-"+f,h=c.parentNode,/pre/i.test(h.nodeName)&&(h.className=h.className.replace(a,"").replace(/\s+/g," ")+" language-"+f),i=c.textContent,j={element:c,language:f,grammar:g,code:i},i&&g?(b.hooks.run("before-highlight",j),d&&_self.Worker?(k=new Worker(b.filename),k.onmessage=function(a){j.highlightedCode=a.data,b.hooks.run("before-insert",j),j.element.innerHTML=j.highlightedCode,e&&e.call(j.element),b.hooks.run("after-highlight",j),b.hooks.run("complete",j)},k.postMessage(JSON.stringify({language:j.language,code:j.code,immediateClose:!0}))):(j.highlightedCode=b.highlight(j.code,j.grammar,j.language),b.hooks.run("before-insert",j),j.element.innerHTML=j.highlightedCode,e&&e.call(c),b.hooks.run("after-highlight",j),b.hooks.run("complete",j))):b.hooks.run("complete",j)},highlight:function(a,d,e){var f=b.tokenize(a,d);return c.stringify(b.util.encode(f),e)},tokenize:function(a,c){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,e=b.Token,f=[a],g=c.rest;if(g){for(h in g)c[h]=g[h];delete c.rest}a:for(h in c)if(c.hasOwnProperty(h)&&c[h])for(i=c[h],i="Array"===b.util.type(i)?i:[i],j=0;j<i.length;++j)for(k=i[j],l=k.inside,m=!!k.lookbehind,n=0,o=k.alias,k=k.pattern||k,p=0;p<f.length;p++){if(q=f[p],f.length>a.length)break a;q instanceof e||(k.lastIndex=0,(r=k.exec(q))&&(m&&(n=r[1].length),s=r.index-1+n,t=s+(r=r[0].slice(n)).length,u=q.slice(0,s+1),v=q.slice(t+1),w=[p,1],u&&w.push(u),x=new e(h,l?b.tokenize(r,l):r,o),w.push(x),v&&w.push(v),Array.prototype.splice.apply(f,w)))}return f},hooks:{all:{},add:function(a,c){var d=b.hooks.all;d[a]=d[a]||[],d[a].push(c)},run:function(a,c){var e,f,d=b.hooks.all[a];if(d&&d.length)for(f=0;e=d[f++];)e(c)}}},c=b.Token=function(a,b,c){this.type=a,this.content=b,this.alias=c};return c.stringify=function(a,d,e){var f,g,h,i;if("string"==typeof a)return a;if("Array"===b.util.type(a))return a.map(function(b){return c.stringify(b,d,a)}).join("");f={type:a.type,content:c.stringify(a.content,d,e),tag:"span",classes:["token",a.type],attributes:{},language:d,parent:e},"comment"==f.type&&(f.attributes.spellcheck="true"),a.alias&&(g="Array"===b.util.type(a.alias)?a.alias:[a.alias],Array.prototype.push.apply(f.classes,g)),b.hooks.run("wrap",f),h="";for(i in f.attributes)h+=(h?" ":"")+i+'="'+(f.attributes[i]||"")+'"';return"<"+f.tag+' class="'+f.classes.join(" ")+'" '+h+">"+f.content+"</"+f.tag+">"},_self.document?(d=document.getElementsByTagName("script"),(d=d[d.length-1])&&(b.filename=d.src,document.addEventListener&&!d.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",b.highlightAll)),_self.Prism):_self.addEventListener?(_self.addEventListener("message",function(a){var c=JSON.parse(a.data),d=c.language,e=c.code,f=c.immediateClose;_self.postMessage(b.highlight(e,b.languages[d],d)),f&&_self.close()},!1),_self.Prism):_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism),Prism.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=.$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&amp;/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\w\W]*?>)[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css"}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),Prism.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript"}}),Prism.languages.js=Prism.languages.javascript,"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(){var a={js:"javascript",html:"markup",svg:"markup",xml:"markup",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell"};Array.prototype.forEach&&Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(b){var c,d,e,f,g,h,i;for(d=b.getAttribute("data-src"),e=b,f=/\blang(?:uage)?-(?!\*)(\w+)\b/i;e&&!f.test(e.className);)e=e.parentNode;e&&(c=(b.className.match(f)||[,""])[1]),c||(g=(d.match(/\.(\w+)$/)||[,""])[1],c=a[g]||g),h=document.createElement("code"),h.className="language-"+c,b.textContent="",h.textContent="Loading…",b.appendChild(h),i=new XMLHttpRequest,i.open("GET",d,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?(h.textContent=i.responseText,Prism.highlightElement(h)):h.textContent=i.status>=400?"✖ Error "+i.status+" while fetching file: "+i.statusText:"✖ Error: File does not exist or is empty")},i.send(null)})},self.Prism.fileHighlight()),("function"==typeof define&&define.amd?define:function(a,b){"undefined"!=typeof module&&module.exports?module.exports=b(require("jquery")):window.toastr=b(window.jQuery)})(["jquery"],function(a){return function(){function b(b,c){return b||(b=g()),(i=a("#"+b.containerId)).length?i:(c&&(i=function(b){return(i=a("<div/>").attr("id",b.containerId).addClass(b.positionClass).attr("aria-live","polite").attr("role","alert")).appendTo(a(b.target)),i}(b)),i)}function c(b){for(var c=i.children(),e=c.length-1;e>=0;e--)d(a(c[e]),b)}function d(b,c,d){var e=!(!d||!d.force)&&d.force;return!(!b||!e&&0!==a(":focus",b).length||(b[c.hideMethod]({duration:c.hideDuration,easing:c.hideEasing,complete:function(){h(b)}}),0))}function e(a){j&&j(a)}function f(c){function d(a){return null==a&&(a=""),new String(a).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function f(b){var c=b&&!1!==o.closeMethod?o.closeMethod:o.hideMethod,d=b&&!1!==o.closeDuration?o.closeDuration:o.hideDuration,f=b&&!1!==o.closeEasing?o.closeEasing:o.hideEasing;return!a(":focus",r).length||b?(clearTimeout(w.intervalId),r[c]({duration:d,easing:f,complete:function(){h(r),o.onHidden&&"hidden"!==x.state&&o.onHidden(),x.state="hidden",x.endTime=new Date,e(x)}})):void 0}function j(){(o.timeOut>0||o.extendedTimeOut>0)&&(q=setTimeout(f,o.extendedTimeOut),w.maxHideTime=parseFloat(o.extendedTimeOut),w.hideEta=(new Date).getTime()+w.maxHideTime)}function m(){clearTimeout(q),w.hideEta=0,r.stop(!0,!0)[o.showMethod]({duration:o.showDuration,easing:o.showEasing})}function n(){var a=100*((w.hideEta-(new Date).getTime())/w.maxHideTime);u.width(a+"%")}var q,r,s,t,u,v,w,x,o=g(),p=c.iconClass||o.iconClass;return void 0!==c.optionsOverride&&(o=a.extend(o,c.optionsOverride),p=c.optionsOverride.iconClass||p),function(a,b){if(a.preventDuplicates){if(b.message===k)return!0;k=b.message}return!1}(o,c)?void 0:(l++,i=b(o,!0),q=null,r=a("<div/>"),s=a("<div/>"),t=a("<div/>"),u=a("<div/>"),v=a(o.closeHtml),w={intervalId:null,hideEta:null,maxHideTime:null},x={toastId:l,state:"visible",startTime:new Date,options:o,map:c},c.iconClass&&r.addClass(o.toastClass).addClass(p),c.title&&(s.append(o.escapeHtml?d(c.title):c.title).addClass(o.titleClass),r.append(s)),c.message&&(t.append(o.escapeHtml?d(c.message):c.message).addClass(o.messageClass),r.append(t)),o.closeButton&&(v.addClass("toast-close-button").attr("role","button"),r.prepend(v)),o.progressBar&&(u.addClass("toast-progress"),r.prepend(u)),o.newestOnTop?i.prepend(r):i.append(r),r.hide(),r[o.showMethod]({duration:o.showDuration,easing:o.showEasing,complete:o.onShown}),o.timeOut>0&&(q=setTimeout(f,o.timeOut),w.maxHideTime=parseFloat(o.timeOut),w.hideEta=(new Date).getTime()+w.maxHideTime,o.progressBar&&(w.intervalId=setInterval(n,10))),r.hover(m,j),!o.onclick&&o.tapToDismiss&&r.click(f),o.closeButton&&v&&v.click(function(a){a.stopPropagation?a.stopPropagation():void 0!==a.cancelBubble&&!0!==a.cancelBubble&&(a.cancelBubble=!0),f(!0)}),o.onclick&&r.click(function(a){o.onclick(a),f()}),e(x),o.debug&&console&&console.log(x),r)}function g(){return a.extend({},{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">&times;</button>',newestOnTop:!0,preventDuplicates:!1,progressBar:!1},n.options)}function h(a){i||(i=b()),a.is(":visible")||(a.remove(),a=null,0===i.children().length&&(i.remove(),k=void 0))}var i,j,k,l=0,m={error:"error",info:"info",success:"success",warning:"warning"},n={clear:function(a,e){var f=g();i||b(f),d(a,f,e)||c(f)},remove:function(c){var d=g();return i||b(d),c&&0===a(":focus",c).length?void h(c):void(i.children().length&&i.remove())},error:function(a,b,c){return f({type:m.error,iconClass:g().iconClasses.error,message:a,optionsOverride:c,title:b})},getContainer:b,info:function(a,b,c){return f({type:m.info,iconClass:g().iconClasses.info,message:a,optionsOverride:c,title:b})},options:{},subscribe:function(a){j=a},success:function(a,b,c){return f({type:m.success,iconClass:g().iconClasses.success,message:a,optionsOverride:c,title:b})},version:"2.1.2",warning:function(a,b,c){return f({type:m.warning,iconClass:g().iconClasses.warning,message:a,optionsOverride:c,title:b})}};return n}()}),function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.store=b()}(this,function(){var a,g,h,j,k,l,m,b={},c="undefined"!=typeof window?window:global,d=c.document,e="localStorage",f="script";if(b.disabled=!1,b.version="1.3.20",b.set=function(){},b.get=function(){},b.has=function(a){return void 0!==b.get(a)},b.remove=function(){},b.clear=function(){},b.transact=function(a,c,d){null==d&&(d=c,c=null),null==c&&(c={});var e=b.get(a,c);d(e),b.set(a,e)},b.getAll=function(){},b.forEach=function(){},b.serialize=function(a){return JSON.stringify(a)},b.deserialize=function(a){if("string"==typeof a)try{return JSON.parse(a)}catch(b){return a||void 0}},function(){try{return e in c&&c[e]}catch(a){return!1}}())a=c[e],b.set=function(c,d){return void 0===d?b.remove(c):(a.setItem(c,b.serialize(d)),d)},b.get=function(c,d){var e=b.deserialize(a.getItem(c));return void 0===e?d:e},b.remove=function(b){a.removeItem(b)},b.clear=function(){a.clear()},b.getAll=function(){var a={};return b.forEach(function(b,c){a[b]=c}),a},b.forEach=function(c){var d,e;for(d=0;d<a.length;d++)e=a.key(d),c(e,b.get(e))};else if(d&&d.documentElement.addBehavior){try{(h=new ActiveXObject("htmlfile")).open(),h.write("<"+f+">document.w=window</"+f+'><iframe src="/favicon.ico"></iframe>'),h.close(),g=h.w.frames[0].document,a=g.createElement("div")}catch(i){a=d.createElement("div"),g=d.body}j=function(c){return function(){var f,d=Array.prototype.slice.call(arguments,0);return d.unshift(a),g.appendChild(a),a.addBehavior("#default#userData"),a.load(e),f=c.apply(b,d),g.removeChild(a),f}},k=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g"),l=function(a){return a.replace(/^d/,"___$&").replace(k,"___")},b.set=j(function(a,c,d){return c=l(c),void 0===d?b.remove(c):(a.setAttribute(c,b.serialize(d)),a.save(e),d)}),b.get=j(function(a,c,d){c=l(c);var e=b.deserialize(a.getAttribute(c));return void 0===e?d:e}),b.remove=j(function(a,b){b=l(b),a.removeAttribute(b),a.save(e)}),b.clear=j(function(a){var c,b=a.XMLDocument.documentElement.attributes;for(a.load(e),c=b.length-1;c>=0;c--)a.removeAttribute(b[c].name);a.save(e)}),b.getAll=function(){var c={};return b.forEach(function(a,b){c[a]=b}),c},b.forEach=j(function(a,c){for(var d,e=a.XMLDocument.documentElement.attributes,f=0;d=e[f];++f)c(d.name,b.deserialize(a.getAttribute(d.name)))})}try{m="__storejs__",b.set(m,m),b.get(m)!=m&&(b.disabled=!0),b.remove(m)}catch(i){b.disabled=!0}return b.enabled=!b.disabled,b});
  