diff --git a/3rd/css/autocomplete.css b/3rd/css/autocomplete.css new file mode 100644 index 0000000..db7eef1 --- /dev/null +++ b/3rd/css/autocomplete.css @@ -0,0 +1,28 @@ +.ac-renderer{ + position: absolute; + border: 1px solid #ccc; + margin-top: -1px; + max-width: 400px; +} +.ac-row { + white-space: nowrap; + position: relative; + cursor: pointer; + padding: 5px; + background-color: #fff; + overflow: hidden !important; + text-overflow: ellipsis; +} +.ac-row .suffix { + font-size:.8em; + color:#ccc; + padding:.1em 0 .1em 5px; +} +.ac-row .type { + font-size:.7em; + color:#aaa; + display:block; + width:100%; +} +.ac-highlighted {font-weight: bold;} +.ac-active {background-color: #eee;} diff --git a/3rd/js/autocomplete.js b/3rd/js/autocomplete.js new file mode 100644 index 0000000..2554b86 --- /dev/null +++ b/3rd/js/autocomplete.js @@ -0,0 +1,125 @@ +// Part of open-source library at https://github.com/klokantech/javascript +// compiled from https://github.com/klokantech/javascript/blob/master/src/osmnamesautocomplete.js +(function(){var g,aa=aa||{},n=this;function p(a){return void 0!==a}function ba(a,b){var c=a.split("."),d=n;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)!c.length&&p(b)?d[e]=b:d=d[e]?d[e]:d[e]={}}function ca(){} +function ea(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function q(a){return"array"==ea(a)}function fa(a){var b=ea(a);return"array"==b||"object"==b&&"number"==typeof a.length}function r(a){return"string"==typeof a}function t(a){return"number"==typeof a}function ga(a){return"function"==ea(a)}function ha(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ia(a){return a[ja]||(a[ja]=++ka)}var ja="closure_uid_"+(1E9*Math.random()>>>0),ka=0; +function la(a,b,c){return a.call.apply(a.bind,arguments)}function ma(a,b,c){if(!a)throw Error();if(2/g,ua=/"/g,va=/'/g,wa=/\x00/g,qa=/[\x00&<>"']/;function xa(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#b?1:0};var za=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(r(a))return r(b)&&1==b.length?a.indexOf(b,c):-1;for(;cb?null:r(a)?a.charAt(b):a[b]}function Ea(a,b){var c=za(a,b),d;(d=0<=c)&&Array.prototype.splice.call(a,c,1);return d}function Fa(a){return Array.prototype.concat.apply(Array.prototype,arguments)}function Ga(a){var b=a.length;if(0=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};function Ia(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function Ja(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return!0;return!1}function Ka(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function La(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function Ma(){var a=Na,b;for(b in a)return!1;return!0}var Oa="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "); +function Pa(a,b){for(var c,d,e=1;e2*this.f&&Ua(this),!0):!1}; +function Ua(a){if(a.f!=a.h.length){for(var b=0,c=0;bparseFloat(lb)){kb=String(nb);break a}}kb=lb}var gb={}; +function I(a){return fb(a,function(){for(var b=0,c=oa(String(kb)).split("."),d=oa(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f=a.keyCode)a.keyCode=-1}catch(b){}};var Pb="closure_listenable_"+(1E6*Math.random()|0);function Qb(a){return!(!a||!a[Pb])}var Rb=0;function Sb(a,b,c,d,e){this.listener=a;this.Na=null;this.src=b;this.type=c;this.pa=!!d;this.Ca=e;this.key=++Rb;this.na=this.za=!1}function Ub(a){a.na=!0;a.listener=null;a.Na=null;a.src=null;a.Ca=null};function Vb(a){this.src=a;this.A={};this.xa=0}g=Vb.prototype;g.add=function(a,b,c,d,e){var f=a.toString();a=this.A[f];a||(a=this.A[f]=[],this.xa++);var h=Wb(a,b,d,e);-1e.keyCode||void 0!=e.returnValue)){a:{var f=!1;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(l){f=!0}if(f||void 0==e.returnValue)e.returnValue=!0}e=[];for(f=c.currentTarget;f;f=f.parentNode)e.push(f);for(var f=a.type,h=e.length-1;!c.fa&&0<=h;h--){c.currentTarget=e[h];var k=jc(e[h],f,!0,c),d=d&&k}for(h=0;!c.fa&&h< +e.length;h++)c.currentTarget=e[h],k=jc(e[h],f,!1,c),d=d&&k}return d}return kc(a,new P(b,this))}function cc(a){a=a[Yb];return a instanceof Vb?a:null}var lc="__closure_events_fn_"+(1E9*Math.random()>>>0);function ac(a){if(ga(a))return a;a[lc]||(a[lc]=function(b){return a.handleEvent(b)});return a[lc]};function S(){N.call(this);this.O=new Vb(this);this.lc=this;this.ob=null}x(S,N);S.prototype[Pb]=!0;g=S.prototype;g.addEventListener=function(a,b,c,d){R(this,a,b,c,d)};g.removeEventListener=function(a,b,c,d){hc(this,a,b,c,d)}; +g.dispatchEvent=function(a){var b,c=this.ob;if(c)for(b=[];c;c=c.ob)b.push(c);var c=this.lc,d=a.type||a;if(r(a))a=new O(a,c);else if(a instanceof O)a.target=a.target||c;else{var e=a;a=new O(d,c);Pa(a,e)}var e=!0,f;if(b)for(var h=b.length-1;!a.fa&&0<=h;h--)f=a.currentTarget=b[h],e=mc(f,d,!0,a)&&e;a.fa||(f=a.currentTarget=c,e=mc(f,d,!0,a)&&e,a.fa||(e=mc(f,d,!1,a)&&e));if(b)for(h=0;!a.fa&&h=a.B&&ca.B)c--;else if(a.xb&&c==a.B){a.T(-1);break}else if(!a.kc||-1!=c&&c!=a.B)break;else c=b;if(a.T(c))break}}g.T=function(a){var b=Qc(this,a),c=this.j[b];return c&&this.U.gb&&this.U.gb(c)?!1:(this.Y=a,this.I.T(a),-1!=b)}; +function Rc(a){var b=Qc(a,a.Y);if(-1!=b){var c=a.j[b],d=a.Qa;if(d.c){var e=c.toString();if(p(void 0)?0:d.ma){var f=Wc(d,d.c.value,Xc(d.c)[0]),h=Yc(d,d.c.value);d.Nc.test(e)||(e=e.replace(/[\s\xa0]+$/,"")+d.sc);d.Tc&&(0==f||/^[\s\xa0]*$/.test(h[f-1])||(e=" "+e),f==h.length-1&&(e+=" "));if(e!=h[f]){h[f]=e;e=d.c;(E||B&&I("9"))&&e.blur();e.value=h.join("");for(var k=0,l=0;l<=f;l++)k+=h[l].length;e.focus();f=k;h=d.c;e=f;Zc(h)?h.selectionStart=e:B&&!I("9")&&(k=$c(h),l=k[0],l.inRange(k[1])&&(e=ad(h,e),l.collapse(!0), +l.move("character",e),l.select()));h=d.c;Zc(h)?h.selectionEnd=f:B&&!I("9")&&(k=$c(h),e=k[1],k[0].inRange(e)&&(f=ad(h,f),h=ad(h,Xc(h)[0]),e.collapse(!0),e.moveEnd("character",f-h),e.select()))}}else d.c.value=e;d.sb=!0}a.dc?(a.K=null,Tc(a)):a.S();a.dispatchEvent({type:"update",row:c,index:b});a.dc&&a.Qa.update(!0);return!0}a.S();a.dispatchEvent({type:"update",row:null,index:null});return!1} +g.S=function(){this.Y=-1;this.K=null;this.B+=this.j.length;this.j=[];window.clearTimeout(this.ba);this.ba=null;this.I.S();this.dispatchEvent("suggestionsupdate");this.dispatchEvent(Pc)};function Tc(a){a.ba||(a.ba=window.setTimeout(v(a.S,a),100))}g.Gb=function(){return this.ba?(window.clearTimeout(this.ba),this.ba=null,!0):!1};function Sc(a){a.Gb()||window.setTimeout(v(a.Gb,a),10)}g.l=function(){Lc.o.l.call(this);delete this.Hb;this.I.X();this.Qa.X();this.U=null}; +g.Cc=function(a,b,c){this.K==a&&this.qb(b,c)};g.qb=function(a,b){var c="object"==ea(b)&&b,d=(c?c.Vc():b)?Qc(this,this.Y):-1;this.B+=this.j.length;this.j=a;for(var e=[],f=0;fc||c>=a.j.length?-1:c}g.update=function(a){this.Qa.update(a)};var bd;Qa("A AREA BUTTON HEAD INPUT LINK MENU META OPTGROUP OPTION PROGRESS STYLE SELECT SOURCE TEXTAREA TITLE TRACK".split(" "));function cd(a,b){b?a.setAttribute("role",b):a.removeAttribute("role")} +function dd(a,b,c){q(c)&&(c=c.join(" "));var d="aria-"+b;""===c||void 0==c?(bd||(bd={atomic:!1,autocomplete:"none",dropeffect:"none",haspopup:!1,live:"off",multiline:!1,multiselectable:!1,orientation:"vertical",readonly:!1,relevant:"additions text",required:!1,sort:"none",busy:!1,disabled:!1,hidden:!1,invalid:"false"}),c=bd,b in c?a.setAttribute(d,c[b]):a.removeAttribute(d)):a.setAttribute(d,c)}function ed(a,b){var c="";b&&(c=b.id);dd(a,"activedescendant",c)};function Xc(a){var b=0,c=0;if(Zc(a))b=a.selectionStart,c=-1;else if(B&&!I("9")){var d=$c(a),e=d[0],d=d[1];if(e.inRange(d)){e.setEndPoint("EndToStart",d);if("textarea"==a.type){d.duplicate();b=a=e.text;for(c=!1;!c;)0==e.compareEndPoints("StartToEnd",e)?c=!0:(e.moveEnd("character",-1),e.text==a?b+="\r\n":c=!0);e=[b.length,-1];return e}b=e.text.length;c=-1}}return[b,c]} +function $c(a){var b=a.ownerDocument||a.document,c=b.selection.createRange();"textarea"==a.type?(b=b.body.createTextRange(),b.moveToElementText(a)):b=a.createTextRange();return[b,c]}function ad(a,b){"textarea"==a.type&&(b=a.value.substring(0,b).replace(/(\r\n|\r|\n)/g,"\n").length);return b}function Zc(a){try{return"number"==typeof a.selectionStart}catch(b){return!1}};function fd(a){N.call(this);this.ka=a;this.h={}}x(fd,N);var gd=[];g=fd.prototype;g.D=function(a,b,c,d){q(b)||(b&&(gd[0]=b.toString()),b=gd);for(var e=0;e=a||96<=a&&106>=a||65<=a&&90>=a||(G||D)&&0==a)return!0;switch(a){case 32:case 43:case 63:case 64:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:return!0;default:return!1}}function kd(a){if(E)a=ld(a);else if(H&&G)a:switch(a){case 93:a=91;break a}return a} +function ld(a){switch(a){case 61:return 187;case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return a}};function md(a,b){S.call(this);a&&nd(this,a,b)}x(md,S);g=md.prototype;g.b=null;g.Ga=null;g.hb=null;g.Ha=null;g.C=-1;g.Z=-1;g.Ya=!1; +var od={3:13,12:144,63232:38,63233:40,63234:37,63235:39,63236:112,63237:113,63238:114,63239:115,63240:116,63241:117,63242:118,63243:119,63244:120,63245:121,63246:122,63247:123,63248:44,63272:46,63273:36,63275:35,63276:33,63277:34,63289:144,63302:45},pd={Up:38,Down:40,Left:37,Right:39,Enter:13,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"U+007F":46,Home:36,End:35,PageUp:33,PageDown:34,Insert:45},qd=B||D||G&&I("525"),rd=H&&E;g=md.prototype; +g.xc=function(a){if(G||D)if(17==this.C&&!a.ctrlKey||18==this.C&&!a.altKey||H&&91==this.C&&!a.metaKey)this.Z=this.C=-1;-1==this.C&&(a.ctrlKey&&17!=a.keyCode?this.C=17:a.altKey&&18!=a.keyCode?this.C=18:a.metaKey&&91!=a.keyCode&&(this.C=91));qd&&!id(a.keyCode,this.C,a.shiftKey,a.ctrlKey,a.altKey,a.metaKey)?this.handleEvent(a):(this.Z=kd(a.keyCode),rd&&(this.Ya=a.altKey))};g.zc=function(a){this.Z=this.C=-1;this.Ya=a.altKey}; +g.handleEvent=function(a){var b=a.ja,c,d,e=b.altKey;B&&"keypress"==a.type?(c=this.Z,d=13!=c&&27!=c?b.keyCode:0):(G||D)&&"keypress"==a.type?(c=this.Z,d=0<=b.charCode&&63232>b.charCode&&jd(c)?b.charCode:0):hb&&!G?(c=this.Z,d=jd(c)?b.keyCode:0):(c=b.keyCode||this.Z,d=b.charCode||0,rd&&(e=this.Ya),H&&63==d&&224==c&&(c=191));var f=c=kd(c);c?63232<=c&&c in od?f=od[c]:25==c&&a.shiftKey&&(f=9):b.keyIdentifier&&b.keyIdentifier in pd&&(f=pd[b.keyIdentifier]);a=f==this.C;this.C=f;b=new sd(f,d,a,b);b.altKey= +e;this.dispatchEvent(b)};g.getElement=function(){return this.b};function nd(a,b,c){a.Ha&&a.detach();a.b=b;a.Ga=R(a.b,"keypress",a,c);a.hb=R(a.b,"keydown",a.xc,c,a);a.Ha=R(a.b,"keyup",a.zc,c,a)}g.detach=function(){this.Ga&&(ic(this.Ga),ic(this.hb),ic(this.Ha),this.Ha=this.hb=this.Ga=null);this.b=null;this.Z=this.C=-1};g.l=function(){md.o.l.call(this);this.detach()};function sd(a,b,c,d){P.call(this,d);this.type="key";this.keyCode=a;this.charCode=b;this.repeat=c}x(sd,P);var td=A("iPhone")&&!A("iPod")&&!A("iPad")||A("iPod"),ud=A("iPad");function vd(a,b,c,d){N.call(this);d=d||150;this.ma=null!=c?c:!0;this.va=a||",;";this.sc=this.va.substring(0,1);a=this.ma?"[\\s"+this.va+"]+":"[\\s]+";this.ec=new RegExp("^"+a+"|"+a+"$","g");this.Nc=new RegExp("\\s*["+this.va+"]$");this.Lb=b||"";this.Hc=!1;this.Gc=this.ma;this.g=0=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +g.expand=function(a,b,c,d){ha(a)?(this.top-=a.top,this.right+=a.right,this.bottom+=a.bottom,this.left-=a.left):(this.top-=a,this.right+=Number(b),this.bottom+=Number(c),this.left-=Number(d));return this};g.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this}; +g.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};g.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};g.translate=function(a,b){a instanceof K?(this.left+=a.x,this.right+=a.x,this.top+=a.y,this.bottom+=a.y):(this.left+=a,this.right+=a,t(b)&&(this.top+=b,this.bottom+=b));return this}; +g.scale=function(a,b){var c=t(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function Od(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}g=Od.prototype;g.clone=function(){return new Od(this.left,this.top,this.width,this.height)};g.intersects=function(a){return this.left<=a.left+a.width&&a.left<=this.left+this.width&&this.top<=a.top+a.height&&a.top<=this.top+this.height}; +g.contains=function(a){return a instanceof K?a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height:this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height};g.distance=function(a){var b=a.xa.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null} +function Rd(a){for(var b=new T(0,Infinity,Infinity,0),c=L(a),d=c.v.body,e=c.v.documentElement,f=wb(c.v);a=Qd(a);)if(!(B&&0==a.clientWidth||G&&0==a.clientHeight&&a==d)&&a!=d&&a!=e&&"visible"!=V(a,"overflow")){var h=Sd(a),k=new K(a.clientLeft,a.clientTop);h.x+=k.x;h.y+=k.y;b.top=Math.max(b.top,h.y);b.right=Math.min(b.right,h.x+a.clientWidth);b.bottom=Math.min(b.bottom,h.y+a.clientHeight);b.left=Math.max(b.left,h.x)}d=f.scrollLeft;f=f.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,f);c=(xb(c.v)|| +window).document;c=yb(c)?c.documentElement:c.body;c=new rb(c.clientWidth,c.clientHeight);b.right=Math.min(b.right,d+c.width);b.bottom=Math.min(b.bottom,f+c.height);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null}function Sd(a){var b=M(a),c=new K(0,0),d;d=b?M(b):document;d=!B||9<=Number(J)||yb(L(d).v)?d.documentElement:d.body;if(a==d)return c;a=Pd(a);b=vb(L(b).v);c.x=a.left+b.x;c.y=a.top+b.y;return c}function Td(a){"number"==typeof a&&(a+="px");return a} +function Ud(a){var b=Vd;if("none"!=V(a,"display"))return b(a);var c=a.style,d=c.display,e=c.visibility,f=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";a=b(a);c.display=d;c.position=f;c.visibility=e;return a}function Vd(a){var b=a.offsetWidth,c=a.offsetHeight,d=G&&!b&&!c;return p(b)&&!d||!a.getBoundingClientRect?new rb(b,c):(a=Pd(a),new rb(a.right-a.left,a.bottom-a.top))}var Wd=E?"MozUserSelect":G||D?"WebkitUserSelect":null; +function Xd(a){var b=a.getElementsByTagName("*");if(Wd){var c="none";a.style&&(a.style[Wd]=c);if(b){a=0;for(var d;d=b[a];a++)d.style&&(d.style[Wd]=c)}}else if(B||hb)if(c="on",a.setAttribute("unselectable",c),b)for(a=0;d=b[a];a++)d.setAttribute("unselectable",c)}function Yd(a,b){if(/^\d+px?$/.test(b))return parseInt(b,10);var c=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;var e=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return+e} +function Zd(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?Yd(a,c):0}var $d={thin:2,medium:4,thick:6};function ae(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null;return c in $d?$d[c]:Yd(a,c)} +function be(a){if(B&&!(9<=Number(J))){var b=ae(a,"borderLeft"),c=ae(a,"borderRight"),d=ae(a,"borderTop");a=ae(a,"borderBottom");return new T(d,c,a,b)}b=U(a,"borderLeftWidth");c=U(a,"borderRightWidth");d=U(a,"borderTopWidth");a=U(a,"borderBottomWidth");return new T(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))};function W(a,b,c,d,e){Ld.call(this,b,c,d,e);this.element=a}x(W,Ld);W.prototype.Ua=ca;W.prototype.nb=function(){this.Ua();W.o.nb.call(this)};W.prototype.$=function(){this.Ua();W.o.$.call(this)};W.prototype.V=function(){this.Ua();W.o.V.call(this)};function X(a,b,c,d,e){t(b)&&(b=[b]);t(c)&&(c=[c]);W.call(this,a,b,c,d,e);if(1!=b.length||1!=c.length)throw Error("Start and end points must be 1D");this.Ja=ce}x(X,W);var de=1/1024,ce=-1; +X.prototype.Ua=function(){var a=this.coords[0];if(Math.abs(a-this.Ja)>=de){var b=this.element.style;"opacity"in b?b.opacity=a:"MozOpacity"in b?b.MozOpacity=a:"filter"in b&&(b.filter=""===a?"":"alpha(opacity\x3d"+100*Number(a)+")");this.Ja=a}};X.prototype.V=function(){this.Ja=ce;X.o.V.call(this)};X.prototype.$=function(){this.Ja=ce;X.o.$.call(this)};X.prototype.show=function(){this.element.style.display=""};function ee(a,b,c){X.call(this,a,1,0,b,c)}x(ee,X);ee.prototype.V=function(){this.show();ee.o.V.call(this)}; +ee.prototype.$=function(){this.element.style.display="none";ee.o.$.call(this)};function fe(a,b,c){X.call(this,a,0,1,b,c)}x(fe,X);fe.prototype.V=function(){this.show();fe.o.V.call(this)};function ge(a,b){return(b&8&&"rtl"==V(a,"direction")?b^4:b)&-9};function Y(){}Y.eb=void 0;Y.Bb=function(){return Y.eb?Y.eb:Y.eb=new Y};Y.prototype.Mb=0;function he(a,b,c,d){S.call(this);this.pb=a||document.body;this.N=L(this.pb);this.Lc=!a;this.b=null;this.K="";this.j=[];this.ga=[];this.bc=this.Ea=-1;this.R=!1;this.className="ac-renderer";this.rb="ac-row";this.Kb="active";this.wb="ac-active";this.Ac="ac-highlighted";this.ia=b||null;this.Sc=null!=d?d:!0;this.Dc=!0;this.Da=!1;this.Mc=!!c;this.Ta=!1;this.Ka=0;this.ac=!1}x(he,S);g=he.prototype;g.pc=0;g.getElement=function(){return this.b}; +g.qb=function(a,b,c){this.K=b;this.j=a;this.Ea=-1;this.bc=w();this.w=c;this.ga=[];ie(this)};g.S=function(){this.R&&(this.R=!1,je(this,!1),0=m.right)&&(e&=-2),132==(e&132)&&(h.y= +m.bottom)&&(e&=-5),h.xm.right&&(k.width=Math.min(m.right-h.x,C+k.width-m.left),k.width=Math.max(k.width,0),l|=4)),h.x+k.width>m.right&&e&1&&(h.x=Math.max(m.right-k.width,m.left),l|=1),e&2&&(l|=(h.xm.right?32:0)),h.ym.bottom&&(k.height=Math.min(m.bottom-h.y,C+k.height-m.top),k.height=Math.max(k.height,0), +l|=8)),h.y+k.height>m.bottom&&e&4&&(h.y=Math.max(m.bottom-k.height,m.top),l|=2),e&8&&(l|=(h.ym.bottom?128:0)),e=l):e=256,k=e);e=new Od(0,0,0,0);e.left=b.x;e.top=b.y;e.width=c.width;e.height=c.height;k&496||(b=e.getTopLeft(),b instanceof K?(m=b.x,b=b.y):(m=b,b=void 0),d.style.left=Td(m),d.style.top=Td(b),c=e.getSize(),f==c||f&&c&&f.width==c.width&&f.height==c.height||(e=c,m=yb(L(M(d)).v),!B||I("10")||m&&I("8")?(d=d.style,E?d.MozBoxSizing="border-box":G?d.WebkitBoxSizing= +"border-box":d.boxSizing="border-box",d.width=Math.max(e.width,0)+"px",d.height=Math.max(e.height,0)+"px"):(f=d.style,m?(B?(m=Zd(d,"paddingLeft"),b=Zd(d,"paddingRight"),c=Zd(d,"paddingTop"),h=Zd(d,"paddingBottom"),m=new T(c,b,h,m)):(m=U(d,"paddingLeft"),b=U(d,"paddingRight"),c=U(d,"paddingTop"),h=U(d,"paddingBottom"),m=new T(parseFloat(c),parseFloat(b),parseFloat(h),parseFloat(m))),d=be(d),f.pixelWidth=e.width-d.left-m.left-m.right-d.right,f.pixelHeight=e.height-d.top-m.top-m.bottom-d.bottom):(f.pixelWidth= +e.width,f.pixelHeight=e.height))));a.Ta&&(a.b.style.visibility="visible")}}g.getTarget=function(){return this.w||null};g.l=function(){this.b&&(hc(this.b,"click",this.Cb,!1,this),hc(this.b,"mousedown",this.Db,!1,this),hc(this.b,"mouseover",this.Eb,!1,this),this.N.removeNode(this.b),this.b=null,this.R=!1);Mb(this.ha);this.pb=null;he.o.l.call(this)}; +function me(a,b,c){if(a.Da||!a.hc)if(3==b.nodeType){var d=null;q(c)&&1w()-this.bc)&&this.dispatchEvent({type:Mc,row:this.j[a].id})};function Z(a,b,c,d){this.Ma=null;d&&(this.Ma=new Za((location.hash||"").substr(1)));this.u=r(a)?document.getElementById(a):a;R(this.u,["focus","click"],function(){this.u.setSelectionRange(0,this.u.value.length)},!1,this);a=new he(null,{Yb:function(a,b,c){b='\x3cspan class\x3d"name"\x3e';var d=a.data.name_suffix;b=d?b+(a.data.name+'\x3c/span\x3e\x3cspan class\x3d"suffix"\x3e'+d):b+a.data.display_name;b+="\x3c/span\x3e";(a=a.data.type)&&(b+='\x3cspan class\x3d"type"\x3e'+a+"\x3c/span\x3e");c.innerHTML= +b}});a.ic=this.u;this.U=new qe(b,c,this.Ma,this.u);this.da=new vd(null,null,!1);xd(this.da);this.da.fc=!1;this.da.i=this;Lc.call(this,this.U,a,this.da);this.Ba=!1;this.D("update",function(a){this.u.value=a.row?a.row.name:""},!1,this);this.enable(!0);if(this.Ma){var e=this.Ma.get("q");e&&r(e)&&setTimeout(v(function(){this.u.value=e.toString();this.da.update()},this),0)}}x(Z,Lc); +Z.prototype.enable=function(a){if(this.Ba!=a)if(this.Ba=a){a=this.da;var b=this.u;ha(b)&&1==b.nodeType&&(cd(b,"combobox"),dd(b,"autocomplete","list"));a.s.D(b,"focus",a.bb);a.s.D(b,"blur",a.ab);if(!a.c&&(a.ya.D(b,"keydown",a.Pb),ha(b)&&1==b.nodeType)){var c;a:{var d=M(b);try{c=d&&d.activeElement;break a}catch(e){}c=null}c==b&&Ad(a,b)}}else c=this.da,a=this.u,ha(a)&&1==a.nodeType&&(a.removeAttribute("role"),a.removeAttribute("aria-autocomplete")),a==c.c&&c.ab(),c.s.F(a,"focus",c.bb),c.s.F(a,"blur", +c.ab),c.c||c.ya.F(a,"keydown",c.Pb)};Z.prototype.tb=function(a){this.U.tb(a);this.Ba&&this.update(!0)};Z.prototype.Jc=function(a,b){b&&R(this.I,"rowhilite",function(b){b.row&&a(b.row)},!1,this);R(this,"update",function(b){b.row&&a(b.row)},!1,this);var c=v(function(b){b.preventDefault();this.Ba&&this.search(this.u.value,1,v(function(b,c){var d=c[0];d&&a(d)},this))},this),d=Cb(this.u);d&&R(d,"submit",c);R(this.u,["webkitspeechchange","speechchange"],c)}; +Z.prototype.search=function(a,b,c){Cd(this.U,a,b,c)};ba("kt.OsmNamesAutocomplete",Z);ba("kt.OsmNamesAutocomplete.prototype.registerCallback",Z.prototype.Jc);ba("kt.OsmNamesAutocomplete.prototype.setCountryCode",Z.prototype.tb);function qe(a,b,c,d){this.Rc=a||"https://search.osmnames.org/";this.Ib=b;this.Aa=c&&c.get("country_code")||null;this.la=c||null;this.u=d}qe.prototype.tb=function(a){this.Aa=a;this.la&&(this.la.set("country_code",this.Aa),location.hash=this.la.toString())}; +function Cd(a,b,c,d){a.u&&Ib(a.u,"working");a.Pa&&b!=a.Nb&&(a.Pa.abort(),a.Pa=null);b&&1!=b.length?(1==c&&(a.Nb=b),1a[0]&& +-180>a[2]&&(a[0]+=360,a[2]+=360)},this),d(b,a),this.Pa=null)},a)))):d(b,[])};})(); diff --git a/3rd/js/ics.deps.min.js b/3rd/js/ics.deps.min.js new file mode 100644 index 0000000..751f522 --- /dev/null +++ b/3rd/js/ics.deps.min.js @@ -0,0 +1,4 @@ +/*! ics.js Wed Aug 20 2014 17:23:02 */ +var saveAs=saveAs||function(e){"use strict";if(typeof e==="undefined"||typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o="download"in r,a=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},i=/constructor/i.test(e.HTMLElement)||e.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent),u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},s="application/octet-stream",d=1e3*40,c=function(e){var t=function(){if(typeof e==="string"){n().revokeObjectURL(e)}else{e.remove()}};setTimeout(t,d)},l=function(e,t,n){t=[].concat(t);var r=t.length;while(r--){var o=e["on"+t[r]];if(typeof o==="function"){try{o.call(e,n||e)}catch(a){u(a)}}}},p=function(e){if(/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)){return new Blob([String.fromCharCode(65279),e],{type:e.type})}return e},v=function(t,u,d){if(!d){t=p(t)}var v=this,w=t.type,m=w===s,y,h=function(){l(v,"writestart progress write writeend".split(" "))},S=function(){if((f||m&&i)&&e.FileReader){var r=new FileReader;r.onloadend=function(){var t=f?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");var n=e.open(t,"_blank");if(!n)e.location.href=t;t=undefined;v.readyState=v.DONE;h()};r.readAsDataURL(t);v.readyState=v.INIT;return}if(!y){y=n().createObjectURL(t)}if(m){e.location.href=y}else{var o=e.open(y,"_blank");if(!o){e.location.href=y}}v.readyState=v.DONE;h();c(y)};v.readyState=v.INIT;if(o){y=n().createObjectURL(t);setTimeout(function(){r.href=y;r.download=u;a(r);h();c(y);v.readyState=v.DONE});return}S()},w=v.prototype,m=function(e,t,n){return new v(e,t||e.name||"download",n)};if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob){return function(e,t,n){t=t||e.name||"download";if(!n){e=p(e)}return navigator.msSaveOrOpenBlob(e,t)}}w.abort=function(){};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return m}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!==null){define("FileSaver.js",function(){return saveAs})} + +var ics=function(e,t){"use strict";{if(!(navigator.userAgent.indexOf("MSIE")>-1&&-1==navigator.userAgent.indexOf("MSIE 10"))){void 0===e&&(e="default"),void 0===t&&(t="Calendar");var r=-1!==navigator.appVersion.indexOf("Win")?"\r\n":"\n",n=[],i=["BEGIN:VCALENDAR","PRODID:"+t,"VERSION:2.0"].join(r),o=r+"END:VCALENDAR",a=["SU","MO","TU","WE","TH","FR","SA"];return{events:function(){return n},calendar:function(){return i+r+n.join(r)+o},addEvent:function(t,i,o,l,u,s){if(void 0===t||void 0===i||void 0===o||void 0===l||void 0===u)return!1;if(s&&!s.rrule){if("YEARLY"!==s.freq&&"MONTHLY"!==s.freq&&"WEEKLY"!==s.freq&&"DAILY"!==s.freq)throw"Recurrence rrule frequency must be provided and be one of the following: 'YEARLY', 'MONTHLY', 'WEEKLY', or 'DAILY'";if(s.until&&isNaN(Date.parse(s.until)))throw"Recurrence rrule 'until' must be a valid date string";if(s.interval&&isNaN(parseInt(s.interval)))throw"Recurrence rrule 'interval' must be an integer";if(s.count&&isNaN(parseInt(s.count)))throw"Recurrence rrule 'count' must be an integer";if(void 0!==s.byday){if("[object Array]"!==Object.prototype.toString.call(s.byday))throw"Recurrence rrule 'byday' must be an array";if(s.byday.length>7)throw"Recurrence rrule 'byday' array must not be longer than the 7 days in a week";s.byday=s.byday.filter(function(e,t){return s.byday.indexOf(e)==t});for(var c in s.byday)if(a.indexOf(s.byday[c])<0)throw"Recurrence rrule 'byday' values must include only the following: 'SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA'"}}var g=new Date(l),d=new Date(u),f=new Date,S=("0000"+g.getFullYear().toString()).slice(-4),E=("00"+(g.getMonth()+1).toString()).slice(-2),v=("00"+g.getDate().toString()).slice(-2),y=("00"+g.getHours().toString()).slice(-2),A=("00"+g.getMinutes().toString()).slice(-2),T=("00"+g.getSeconds().toString()).slice(-2),b=("0000"+d.getFullYear().toString()).slice(-4),D=("00"+(d.getMonth()+1).toString()).slice(-2),N=("00"+d.getDate().toString()).slice(-2),h=("00"+d.getHours().toString()).slice(-2),I=("00"+d.getMinutes().toString()).slice(-2),R=("00"+d.getMinutes().toString()).slice(-2),M=("0000"+f.getFullYear().toString()).slice(-4),w=("00"+(f.getMonth()+1).toString()).slice(-2),L=("00"+f.getDate().toString()).slice(-2),O=("00"+f.getHours().toString()).slice(-2),p=("00"+f.getMinutes().toString()).slice(-2),Y=("00"+f.getMinutes().toString()).slice(-2),U="",V="";y+A+T+h+I+R!=0&&(U="T"+y+A+T,V="T"+h+I+R);var B,C=S+E+v+U,j=b+D+N+V,m=M+w+L+("T"+O+p+Y);if(s)if(s.rrule)B=s.rrule;else{if(B="rrule:FREQ="+s.freq,s.until){var x=new Date(Date.parse(s.until)).toISOString();B+=";UNTIL="+x.substring(0,x.length-13).replace(/[-]/g,"")+"000000Z"}s.interval&&(B+=";INTERVAL="+s.interval),s.count&&(B+=";COUNT="+s.count),s.byday&&s.byday.length>0&&(B+=";BYDAY="+s.byday.join(","))}(new Date).toISOString();var H=["BEGIN:VEVENT","UID:"+n.length+"@"+e,"CLASS:PUBLIC","DESCRIPTION:"+i,"DTSTAMP;VALUE=DATE-TIME:"+m,"DTSTART;VALUE=DATE-TIME:"+C,"DTEND;VALUE=DATE-TIME:"+j,"LOCATION:"+o,"SUMMARY;LANGUAGE=en-us:"+t,"TRANSP:TRANSPARENT","END:VEVENT"];return B&&H.splice(4,0,B),H=H.join(r),n.push(H),H},download:function(e,t){if(n.length<1)return!1;t=void 0!==t?t:".ics",e=void 0!==e?e:"calendar";var a,l=i+r+n.join(r)+o;if(-1===navigator.userAgent.indexOf("MSIE 10"))a=new Blob([l]);else{var u=new BlobBuilder;u.append(l),a=u.getBlob("text/x-vCalendar;charset="+document.characterSet)}return saveAs(a,e+t),l},build:function(){return!(n.length<1)&&i+r+n.join(r)+o}}}console.log("Unsupported Browser")}}; diff --git a/3rd/js/isotope.pkgd.min.js b/3rd/js/isotope.pkgd.min.js new file mode 100644 index 0000000..4d6c129 --- /dev/null +++ b/3rd/js/isotope.pkgd.min.js @@ -0,0 +1,12 @@ +/*! + * Isotope PACKAGED v3.0.6 + * + * Licensed GPLv3 for open source use + * or Isotope Commercial License for commercial use + * + * https://isotope.metafizzy.co + * Copyright 2010-2018 Metafizzy + */ + +!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var o=this._onceEvents&&this._onceEvents[t],n=0;n