var apiphany;(function(){function u(n){this._n=n}function f(n,t,i){var u=Math.pow(10,t),r,f;return r=(Math.round(n*u)/u).toFixed(t),i&&(f=new RegExp("0{1,"+i+"}$"),r=r.replace(f,"")),r}function e(n,t){return t.indexOf("$")>-1?h(n,t):t.indexOf("%")>-1?c(n,t):t.indexOf(":")>-1?l(n,t):v(n,t)}function s(i,u){var f,o;if(u.indexOf(":")>-1)i._n=a(u);else if(u===r)i._n=0;else{f=u;n[t].delimiters.decimal!=="."&&(u=u.replace(/\./g,"").replace(n[t].delimiters.decimal,"."));var h=new RegExp(n[t].abbreviations.thousand+"(?:\\)|(\\"+n[t].currency.symbol+")?(?:\\))?)?$"),c=new RegExp(n[t].abbreviations.million+"(?:\\)|(\\"+n[t].currency.symbol+")?(?:\\))?)?$"),l=new RegExp(n[t].abbreviations.billion+"(?:\\)|(\\"+n[t].currency.symbol+")?(?:\\))?)?$"),v=new RegExp(n[t].abbreviations.trillion+"(?:\\)|(\\"+n[t].currency.symbol+")?(?:\\))?)?$"),s=["KB","MB","GB","TB","PB","EB","ZB","YB"],e=!1;for(o=0;o<=s.length;o++)if(e=u.indexOf(s[o])>-1?Math.pow(1024,o+1):!1,e)break;i._n=(e?e:1)*(f.match(h)?Math.pow(10,3):1)*(f.match(c)?Math.pow(10,6):1)*(f.match(l)?Math.pow(10,9):1)*(f.match(v)?Math.pow(10,12):1)*(u.indexOf("%")>-1?.01:1)*Number((u.indexOf("(")>-1?"-":"")+u.replace(/[^0-9\.-]+/g,""));i._n=e?Math.ceil(i._n):i._n}return i._n}function h(i,r){var o=r.indexOf("$")<=1?!0:!1,f="",u;return r.indexOf(" $")>-1?(f=" ",r=r.replace(" $","")):r.indexOf("$ ")>-1?(f=" ",r=r.replace("$ ","")):r=r.replace("$",""),u=e(i,r),o?u.indexOf("(")>-1||u.indexOf("-")>-1?(u=u.split(""),u.splice(1,0,n[t].currency.symbol+f),u=u.join("")):u=n[t].currency.symbol+f+u:u.indexOf(")")>-1?(u=u.split(""),u.splice(-1,0,f+n[t].currency.symbol),u=u.join("")):u=u+f+n[t].currency.symbol,u}function c(n,t){var r="",i;return t.indexOf(" %")>-1?(r=" ",t=t.replace(" %","")):t=t.replace("%",""),n._n=n._n*100,i=e(n,t),i.indexOf(")")>-1?(i=i.split(""),i.splice(-1,0,r+"%"),i=i.join("")):i=i+r+"%",i}function l(n){var i=Math.floor(n._n/3600),t=Math.floor((n._n-i*3600)/60),r=Math.round(n._n-i*3600-t*60);return i+":"+(t<10?"0"+t:t)+":"+(r<10?"0"+r:r)}function a(n){var i=n.split(":"),t=0;return i.length===3?(t=t+Number(i[0])*3600,t=t+Number(i[1])*60,t=t+Number(i[2])):i.lenght===2&&(t=t+Number(i[0])*60,t=t+Number(i[1])),Number(t)}function v(i,u){var y=!1,k=!1,e="",a="",v="",c=Math.abs(i._n),b,p,d,l;if(i._n===0&&r!==null)return r;if(u.indexOf("(")>-1&&(y=!0,u=u.slice(1,-1)),u.indexOf("a")>-1&&(u.indexOf(" a")>-1?(e=" ",u=u.replace(" a","")):u=u.replace("a",""),c>=Math.pow(10,12)?(e=e+n[t].abbreviations.trillion,i._n=i._n/Math.pow(10,12)):c<Math.pow(10,12)&&c>=Math.pow(10,9)?(e=e+n[t].abbreviations.billion,i._n=i._n/Math.pow(10,9)):c<Math.pow(10,9)&&c>=Math.pow(10,6)?(e=e+n[t].abbreviations.million,i._n=i._n/Math.pow(10,6)):c<Math.pow(10,6)&&c>=Math.pow(10,3)&&(e=e+n[t].abbreviations.thousand,i._n=i._n/Math.pow(10,3))),u.indexOf("b")>-1)for(u.indexOf(" b")>-1?(a=" ",u=u.replace(" b","")):u=u.replace("b",""),b=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],l=0;l<=b.length;l++)if(p=Math.pow(1024,l),d=Math.pow(1024,l+1),i._n>=p&&i._n<d){a=a+b[l];p>0&&(i._n=i._n/p);break}u.indexOf("o")>-1&&(u.indexOf(" o")>-1?(v=" ",u=u.replace(" o","")):u=u.replace("o",""),v=v+n[t].ordinal(i._n));u.indexOf("[.]")>-1&&(k=!0,u=u.replace("[.]","."));var s=i._n.toString().split(".")[0],o=u.split(".")[1],g=u.indexOf(","),h="",w=!1;return o?(o.indexOf("[")>-1?(o=o.replace("]",""),o=o.split("["),h=f(i._n,o[0].length+o[1].length,o[1].length)):h=f(i._n,o.length),s=h.split(".")[0],h=h.split(".")[1].length?n[t].delimiters.decimal+h.split(".")[1]:"",k&&Number(h.slice(1))===0&&(h="")):s=f(i._n,null),s.indexOf("-")>-1&&(s=s.slice(1),w=!0),g>-1&&(s=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+n[t].delimiters.thousands)),u.indexOf(".")===0&&(s=""),(y&&w?"(":"")+(!y&&w?"-":"")+s+h+(v?v:"")+(e?e:"")+(a?a:"")+(y&&w?")":"")}function y(t,i){n[t]=i}var i,n={},t="en",r=null,o=typeof module!="undefined"&&module.exports;i=function(n){return i.isNumeral(n)?n=n.value():Number(n)||(n=0),new u(Number(n))};i.version="1.4.7";i.isNumeral=function(n){return n instanceof u};i.language=function(r,u){return r?(r&&!u&&(t=r),(u||!n[r])&&y(r,u),i):t};i.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(n){var t=n%10;return~~(n%100/10)==1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th"},currency:{symbol:"$"}});i.zeroFormat=function(n){r=typeof n=="string"?n:null};i.fn=u.prototype={clone:function(){return i(this)},format:function(n){return e(this,n?n:i.defaultFormat)},unformat:function(n){return s(this,n?n:i.defaultFormat)},value:function(){return this._n},valueOf:function(){return this._n},set:function(n){return this._n=Number(n),this},add:function(n){return this._n=this._n+Number(n),this},subtract:function(n){return this._n=this._n-Number(n),this},multiply:function(n){return this._n=this._n*Number(n),this},divide:function(n){return this._n=this._n/Number(n),this},difference:function(n){var t=this._n-Number(n);return t<0&&(t=-t),t}};o&&(module.exports=i);typeof ender=="undefined"&&(this.numeral=i);typeof define=="function"&&define.amd&&define([],function(){return i})}).call(this),function(n){var t;(function(n){var t;(function(n){n[n.Milisecond=0]="Milisecond";n[n.Second=1]="Second";n[n.Minute=2]="Minute";n[n.Hour=3]="Hour";n[n.Day=4]="Day";n[n.Week=5]="Week";n[n.Month=6]="Month";n[n.Year=7]="Year"})(t=n.TimeResolutionUnits||(n.TimeResolutionUnits={}))})(t=n.Core||(n.Core={}))}(apiphany||(apiphany={})),function(n){var t;(function(n){function wt(){return{value:!1,accept:function(n){n.resolveYesNo(this)}}}function bt(n){return{promise:n,accept:function(n){n.resolveDunno(this)}}}function kt(){return{value:!0,accept:function(n){n.resolveYesNo(this)}}}function dt(n){return n.substr(0,1).toUpperCase()+n.substr(1)}function gt(t,i){return Math.abs(t-i)<n.insignificantDifference}function ni(n,t){if(n==null||n=="")return t;var i=Number(n);return isNaN(i)||!isFinite(i)?t:i}function ti(n,t){var i=Math.pow(10,t),r=n*i,u=Math.round(r);return u/i}function ii(n){return n!=null&&typeof n=="string"?n.replace(/^\s+|\s+$/g,""):n||null}function ri(n,t){return new Array(n+1).join(t)}function ui(n,t){for(var u=[],r,i=0,f=n.length;i<f;i++)(r=n.charAt(i),t[r])&&u.push(r);return u}function fi(n,t){var u,f,e,o,i,s,r;for(t===void 0&&(t=0),u="",f=0;f<t;f++)u+=" ";for(e=n.split("\n"),o=[],i=0,s=e.length;i<s;i++)r=e[i],i>0&&(r=u+r),o.push(r);return o}function ei(n,t){var i,u,r;if(!n.length)throw new Error("There are no elements in the array.");for(i=0,u=n.length;i<u;i++)if(r=n[i],t(r)===!0)return r;throw new Error("Unable to find the first element in the array that matches the predicate.");}function y(n,t){return n<t?-1:n>t?1:0}function oi(n,t){return n==null?t==null?0:-1:t==null?1:n.toLocaleLowerCase().localeCompare(t.toLocaleLowerCase())}function p(n,t){return n-t}function si(n,t){var i=r(n),f=r(t),u;if(i!==f)throw new Error("Unable to compare values of different types: '"+i+"', '"+f+"'.");if(u=w[i],u==null)throw new Error("There is no comparer for the type '"+i+"'.");return u(n,t)}function u(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate())}function i(n,t){var i=new Date(n.getTime());return i.setDate(n.getDate()+t),i}function b(n,t){var u=n.getFullYear(),f=n.getMonth(),r=n.getDate(),e=new Date(u,f+t,1),i=nt(e),o=i.getDate();return r<=o?new Date(i.getFullYear(),i.getMonth(),r):i}function k(n,t){var i=new Date(n.getTime());return i.setHours(n.getHours()+t),i}function d(n,t){var i=new Date(n.getTime());return i.setMinutes(n.getMinutes()+t),i}function hi(n,t){var i=new Date(n.getTime());return i.setSeconds(n.getSeconds()+t),i}function o(n,t){var i=new Date(n.getTime());return i.setMilliseconds(n.getMilliseconds()+t),i}function g(n,t){var i=new Date(n.getTime());return i.setFullYear(n.getFullYear()+t),i}function ci(t,r,u){var f;switch(r){case n.TimeResolutionUnits.Day:f=i(t,u);break;case n.TimeResolutionUnits.Hour:f=k(t,u);break;case n.TimeResolutionUnits.Milisecond:f=o(t,u);break;case n.TimeResolutionUnits.Minute:f=d(t,u);break;case n.TimeResolutionUnits.Month:f=b(t,u);break;case n.TimeResolutionUnits.Week:f=i(t,u*7);break;case n.TimeResolutionUnits.Year:f=g(t,u);break;default:throw new Error("Unexpected time unit: "+r+".");}return f}function li(n){return n.getDate()===1}function nt(n){var t=tt(n),r=t.getFullYear(),u=t.getMonth(),f=new Date(r,u+1,1);return i(f,-1)}function ai(n){var t,r,f;return n=u(n),t=n.getMonth(),n=i(n,1),r=n.getMonth(),f=t!==r,f}function vi(n){var t=u(n);return i(t,-n.getDay())}function yi(n){var t=u(n);return i(t,6-n.getDay())}function tt(n){var t=n.getFullYear(),i=n.getMonth();return new Date(t,i)}function pi(n){return r(n)==="date"}function r(n){var t=Object.prototype.toString.call(n);return t.substring(8,t.length-1).toLowerCase()}function wi(n){return n.getDay()%6==0}function f(n){return n==null}function rt(n){return it.test(n)}function s(n){return f(n)||rt(n)}function ut(n){return f(n)||isNaN(n.getTime())}function bi(n){var t=r(n),i=ft[t]||f;return i(n)}function ki(n,t){var r=t,i=n.match(et);if(i!=null&&i.length==3){var u=Number(i[0])-1,f=Number(i[1]),e=Number(i[2]);r=new Date(e,u,f)}return r}function di(t,i){var e,f=t.split("-"),u,r;return f.length>1?(r=n.tryParseDate(f[0],null),u=n.tryParseDate(f[1],null),e=r!=null?u!=null?{from:r,to:u}:{from:r,to:null}:u!=null?{from:null,to:u}:i):(r=n.tryParseDate(f[0],null),e=r!=null?{from:r,to:null}:i),e}function gi(n){return n.getMonth()+1+"/"+n.getDate()+"/"+n.getFullYear()}function nr(){try{throw new Error;}catch(n){console.log(n.stack)}}function ht(t,i){var u=new Date,r=n.toDate(u),f=n.addDays(r,t),e=n.addDays(r,i),s=o(e,-1);return{from:f,to:s}}function tr(){return n.toDateRange(0,1)}function ir(){return n.toDateRange(-1,0)}function rr(n){return ht(-n,1)}function ur(){return new Date}function h(n,t,i){return n!=null?t!=null?i(n,t):!1:t!=null?!1:!0}function c(n,t){return h(n,t,function(n,t){var i=n.getTime(),r=t.getTime();return i===r})}function fr(n,t){return h(n,t,function(n,t){return c(n.from,t.from)&&c(n.to,t.to)})}function er(){var n="__ap_"+l;return l++,n}function or(n,t){for(var i=0,r=n.length;i<r;i++)n[i]=t}function ct(n,t){return t!=null&&n>t?e.set(n).format("0 a").toUpperCase():e.set(n).format("0,0")}function sr(n){return e.set(n).format("0.0 b")}function hr(n){return ct(n)+" ms"}function lt(t,i){for(var e=i.from.getTime(),o=i.to.getTime(),s=o-e,r=n.knownResolutions,u=0;;){var f=r[u],h=vt(f),c=s/h;if(c>t)if(u++,u<r.length)continue;else return r[r.length];else return f}}function cr(n,t){var i=lt(n,t);return{from:t.from,to:t.to,resolution:i}}function at(t){switch(t){case n.TimeResolutionUnits.Second:return n.secondInMs;case n.TimeResolutionUnits.Minute:return n.minuteInMs;case n.TimeResolutionUnits.Hour:return n.hourInMs;case n.TimeResolutionUnits.Day:return n.dayInMs;case n.TimeResolutionUnits.Week:return n.weekInMs;case n.TimeResolutionUnits.Month:return 30*n.dayInMs;case n.TimeResolutionUnits.Year:return 365*n.dayInMs;default:throw new Error('Unexpected time resolution unit "'+t+'".');}}function vt(n){var t=at(n.unit);return t*n.value}function lr(t){switch(t){case n.TimeResolutionUnits.Second:throw new Error("Seconds are not supported.");case n.TimeResolutionUnits.Minute:return"Minute";case n.TimeResolutionUnits.Hour:return"Hour";case n.TimeResolutionUnits.Day:return"Day";case n.TimeResolutionUnits.Week:return"Week";case n.TimeResolutionUnits.Month:return"Month";case n.TimeResolutionUnits.Year:return"Year";default:throw new Error('Unit "'+t+'" is not supported.');}}function t(n,t){return{unit:n,value:t}}function ar(n,t,i){var f,u,e,r;for(i===void 0&&(i=null),f=[],u=0,e=n.length;u<e;u++)(r=n[u],i!=null&&(r=r[i]),s(r))||f.push(r);return f.join(t)}function vr(n){return new Date(n)}function yt(n){for(var i=0,t=0,r=n.length;t<r;t++)i+=n[t];return i}function yr(n,t,i){var u,f,r,e;if(i===void 0&&(i=0),u=t.length,u>0){for(f=0,r=0;r<u;r++)e=t[r],f+=e[n];return f}return i}function a(n){if(n.length<1)throw new Error("There are no elements in the array.");var t=yt(n);return t/n.length}function pt(n,t){var r,i,u,e,f;for(t===void 0&&(t=a(n)),r=0,i=0,u=n.length;i<u;i++)e=n[i],f=e-t,r+=f*f;return r/u}function pr(n,t){t===void 0&&(t=a(n));var i=pt(n,t);return Math.sqrt(i)}function wr(n,t){for(var u=[],r,i=0,f=n.length;i<f;i++)r=n[i],t(r)&&u.push(r);return u}function br(n,t,i,r,u,f){var e=f,o=0;if(t<r&&(e--,o=1),i>u&&e--,e<1)throw new Error;if(n<r)return 0;if(n>u)return f-1;var s=n-r,h=s/(u-r),c=h*(e-1);return o+Math.round(c)}function kr(n){return n==null||n.trim()==""?!0:!1}function dr(n,t){return n==null||n.length<t.length?!1:n.substr(0,t.length)==t}function gr(n,t){return n==null||n.length<t.length?!1:n.substr(n.length-t.length,t.length)==t}function nu(t){return n.isNullOrEmpty(t)?t:n.startsWith(t,"/")?t.substr(1):t}function tu(t){return n.isNullOrEmpty(t)?t:n.endsWith(t,"/")?t.substr(0,t.length-1):t}function iu(n,t){document.cookie=n+"="+encodeURI(t)+"; path=/; "}function ru(n){var i=new RegExp(n+"=([^;]+)"),t=i.exec(document.cookie);return t!=null?decodeURI(t[1]):null}function uu(n,t,i,r){var u,f;u=window.screen.width/2-(i/2+10);f=window.screen.height/2-(r/2+50);window.open(t,n,"status=no,height="+r+",width="+i+",resizable=yes,left="+u+",top="+f+",screenX="+u+",screenY="+f+",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no").focus()}function fu(t,i){return n.isNullOrEmpty(t)?i:n.isNullOrEmpty(i)?t:n.startsWith(i,"?")||n.startsWith(i,"&")?t+i:n.removeTrailingSlash(t)+"/"+n.removeLeadingSlash(i)}function eu(n){var u,i,t;n===void 0&&(n=null);var f=window.location.href,r={},e=f.indexOf("?");if(e<0)return r;for(u=f.slice(e+1).split("&"),i=0;i<u.length;i++)t=u[i].split("="),(n==null||n.indexOf(t[0])>=0)&&(r[t[0]]=t.length>1?t[1]:null);return r}function ou(n,t){var u=n.indexOf("?")>=0,i,r;for(i in t)r=t[i],n+=(u?"&":"?")+i+(r==null?"":"="+r),u=!0;return n}function su(){return this.getQueryStringParams(["page","pageSize","pattern"])}var v,w,it,ft,et,ot,st,l,e;n.no=wt;n.dunno=bt;n.yes=kt;v=function(){function n(n){this.values=n;this.reset()}return n.prototype.reset=function(){this.index=-1},n.prototype.current=function(){var n=this.index;if(n<0)throw new Error;return this.values[n]},n.prototype.moveNext=function(){var t=this.values,n;if(t==null)throw new Error;return n=this.index+1,n<t.length?(this.index=n,!0):!1},n.prototype.dispose=function(){this.values=null;this.index=-1},n}();n.UnsafeArrayEnumerator=v;n.notAvailableText="na";n.bigNumber=1e7;n.fullMonthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];n.shortMonthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.fullDayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];n.shortDayNames=["Su","Mn","Tu","We","Th","Fr","Sa"];n.secondInMs=1e3;n.minuteInMs=n.secondInMs*60;n.hourInMs=n.minuteInMs*60;n.dayInMs=n.hourInMs*24;n.weekInMs=n.dayInMs*7;n.insignificantDifference=1e-8;n.noIssues=[];n.knownResolutions=[t(n.TimeResolutionUnits.Minute,1),t(n.TimeResolutionUnits.Minute,5),t(n.TimeResolutionUnits.Minute,15),t(n.TimeResolutionUnits.Minute,30),t(n.TimeResolutionUnits.Hour,1),t(n.TimeResolutionUnits.Hour,3),t(n.TimeResolutionUnits.Hour,6),t(n.TimeResolutionUnits.Hour,12),t(n.TimeResolutionUnits.Day,1),t(n.TimeResolutionUnits.Week,1),t(n.TimeResolutionUnits.Month,1),t(n.TimeResolutionUnits.Year,1)];n.capitalize=dt;n.areInsignificantlyClose=gt;n.toNumber=ni;n.roundNumber=ti;n.trim=ii;n.repeatTimes=ri;n.distill=ui;n.toLines=fi;n.firstInArray=ei;n.compareStrings=y;n.compareStringsCaseInsensitive=oi;n.compareNumbers=p;w={string:y,number:p};n.compare=si;n.toDate=u;n.addDays=i;n.addMonths=b;n.addHours=k;n.addMinutes=d;n.addSeconds=hi;n.addMiliseconds=o;n.addYears=g;n.addTime=ci;n.isFirstDayOfMonth=li;n.toLastDayOfMonth=nt;n.isLastDayOfMonth=ai;n.toFirstDayOfWeek=vi;n.toLastDayOfWeek=yi;n.toFirstDayOfMonth=tt;n.isDate=pi;n.typeOf=r;n.isWeekendDay=wi;n.isNothing=f;it=new RegExp("^\\s*$","g");n.isWhitespaceUnsafe=rt;n.isEmptyText=s;n.isEmptyDate=ut;ft={string:s,date:ut};n.isEmpty=bi;et=/(\d+)/g;n.tryParseDate=ki;n.tryParseDateRange=di;ot=function(){function t(){}return t.prototype.convert=function(n){var t=this.tryConvert(n,null);if(t==null)throw new Error('Unable to convert the "'+n+'" to Date.');return t},t.prototype.tryConvert=function(t,i){return n.tryParseDate(t,i)},t.prototype.convertBack=function(t){return n.renderDate(t)},t}();n.standardStringToDateConverter=new ot;st=function(){function t(){}return t.prototype.convert=function(n){var t=this.tryConvert(n,null);if(t==null)throw new Error('Unable to convert the "'+n+'" to a time range.');return t},t.prototype.tryConvert=function(t,i){return n.tryParseDateRange(t,i)},t.prototype.convertBack=function(t){var r=t.from,i=t.to,u;return r!=null?i!=null?n.renderDate(r)+" - "+n.renderDate(i):u=n.renderDate(r)+" - ":i!=null?" - "+n.renderDate(i):""},t}();n.defaultStringToDateRangeConverter=new st;n.renderDate=gi;n.dumpStack=nr;n.toDateRange=ht;n.todayDateRange=tr;n.yesterdayDateRange=ir;n.lastNDaysDateRange=rr;n.now=ur;n.areObjectsEqual=h;n.areDatesEqual=c;n.areTimeRangesEqual=fr;l=0;n.nextId=er;n.setAll=or;e=numeral();n.formatInteger=ct;n.formatBytes=sr;n.formatMiliseconds=hr;n.timeRangeToResolution=lt;n.timeRangeToResolvedTimeRange=cr;n.timeUnitToMiliseconds=at;n.timeResolutionToMiliseconds=vt;n.timeUnitToText=lr;n.createTimeResolution=t;n.joinNonEmpty=ar;n.parseDate=vr;n.sum=yt;n.sumField=yr;n.average=a;n.variance=pt;n.standardDeviation=pr;n.filterNumbers=wr;n.quantize=br;n.isNullOrEmpty=kr;n.startsWith=dr;n.endsWith=gr;n.removeLeadingSlash=nu;n.removeTrailingSlash=tu;n.setCookie=iu;n.getCookie=ru;n.windowPop=uu;n.combineUrl=fu;n.getQueryStringParams=eu;n.appendQueryStringParams=ou;n.getPagingQueryStringParams=su})(t=n.Core||(n.Core={}))}(apiphany||(apiphany={}))