diff --git a/output/keymanweb.js b/output/keymanweb.js index fe3cd3afce..151cceea6e 100644 --- a/output/keymanweb.js +++ b/output/keymanweb.js @@ -8,12 +8,12 @@ String.prototype.kmwCodePointToCodeUnit=function(a){if(null===a)return null;var String.prototype.kmwBMPNextChar=function(a){return 0>a||a>=(""+this).length-1?null:a+1};String.prototype.kmwBMPPrevChar=function(a){return 0>=a||a>(""+this).length?null:a-1};String.prototype.kmwBMPCodePointToCodeUnit=function(a){return a};String.prototype.kmwBMPCodeUnitToCodePoint=function(a){return a};String.prototype.kmwBMPLength=function(){return(""+this).length};String.prototype.kmwBMPSubstr=function(a,b){var c=""+this;return-1screen.height)b=screen.height;return Math.round(100*b/window.innerWidth)/100}catch(a){return 1}};f.barHeight=function(){var b=0;k.formFactor=="phone"&&(b=screen.height/2-window.innerHeight-(f.landscapeView()?k.dyLandscape:k.dyPortrait));return b};f._EncodeEntities=function(b){return b.replace("&","&").replace("<","<").replace(">",">")};f.createShim=f.createShim=function(){var b=f._CreateElement("IFRAME"); b.src="";b.style.display="none";b.style.position="absolute";b.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";b.frameBorder="0";b.scrolling="no";return b};f.showShim=f.showShim=function(b,a,d){if(a)try{a.style.left=f._GetAbsoluteX(b)+"px";a.style.top=f._GetAbsoluteY(b)+"px";if(d){a.style.width=f._GetAbsoluteX(d)-f._GetAbsoluteX(b)+d.offsetWidth+"px";a.style.height=f._GetAbsoluteY(d)-f._GetAbsoluteY(b)+d.offsetHeight+"px"}else{a.style.width=b.offsetWidth+"px";a.style.height= b.offsetHeight+"px"}a.style.zindex="9999";a.style.display="block"}catch(e){}};f.hideShim=function(b){try{if(b)b.style.display="none"}catch(a){}};f.rgba=f.rgba=function(b,a,d,e,h){var j="transparent";if(f._GetIEVersion()<9){h=Math.floor(100*h);a=a.toString(16);d=d.toString(16);e=e.toString(16);a=("00"+a).substr(-2);d=("00"+d).substr(-2);e=("00"+e).substr(-2);e=h+a+d+e;b.filter="progid:DXImageTransform.Microsoft.gradient(startColorstr=#"+e+",endColorstr=#"+e+")";b.zoom="1"}else try{j="rgba("+a+","+ -d+","+e+","+h+")"}catch(s){j="rgb("+a+","+d+","+e+")"}return j};f.addStyleSheet=f.addStyleSheet=function(b){var a=document.createElement("STYLE");a.type="text/css";a.styleSheet?a.styleSheet.cssText=b:a.appendChild(document.createTextNode(b));b=document.getElementsByTagName("HEAD");b.length>0?b[0].appendChild(a):document.body.appendChild(a);return a};f.removeStyleSheet=f.removeStyleSheet=function(b){if(b==null||typeof b!="object"||b.nodeName!="STYLE"||typeof b.parentNode=="undefined"||b.parentNode== -null)return false;b.parentNode.removeChild(b);return true};f.linkStyleSheet=f.linkStyleSheet=function(b){var a=document.getElementsByTagName("head");if(a.length>0){var d=document.createElement("link");d.type="text/css";d.rel="stylesheet";d.href=b;a[0].appendChild(d)}};f.addFontFaceStyleSheet=function(g){if(typeof g!="undefined"){typeof g.files=="undefined"&&(g.files=g.source);if(typeof g.files!="undefined"){var a,d="",e="",h="",j=[];for(a=0;a0&&(d=j[a]);j[a].indexOf(".woff")>0&&(e=j[a]);j[a].indexOf(".eot")>0&&(h=j[a])}d!=""&&d.indexOf("/")<0&&(d=b.options.fonts+d);e!=""&&e.indexOf("/")<0&&(e=b.options.fonts+e);h!=""&&h.indexOf("/")<0&&(h=b.options.fonts+h);a="@font-face {\nfont-family:"+g.family+";\nfont-style:normal;\nfont-weight:normal;\n";j=f._GetIEVersion();if(j>=999)if(k.OS=="iOS")if(d!="")a=a+"src:url('"+d+"') format('truetype');";else return; -else if(d!=""&&e!="")a=a+"src:url('"+e+"') format('woff'),url('"+d+"') format('truetype');";else if(e!="")a=a+"src:url('"+e+"') format('woff');";else if(d!="")a=a+"src:url('"+d+"') format('truetype');";else return;else if(h!=""&&j<9)a=a+"src:url('"+h+"?#iefix') format('embedded-opentype');";else if(h!="")a=a+"src:url('"+h+"');";else return;f.addStyleSheet(a+"\n}\n");b.embeddedFonts.push(g.family)}}};f.loadCookie=f.loadCookie=function(b){var a={};if(arguments.length>0){var d=f.loadCookie(),e;for(e in d)if(e== -b)for(var h=unescape(d[e]).split(";"),j=0;j1?s[1]:""}}else if(typeof document.cookie!="undefined"&&document.cookie!=""){d=document.cookie.split(/;\s*/);for(j=0;j1&&(d=a);return typeof b=="undefined"||b==null||b==0||b==""?d:""+b};f.deepCopy=function(b,a){var d=a||{},e;for(e in b)if(typeof b[e]==="object"){d[e]=b[e].constructor===Array?[]:{};f.deepCopy(b[e],d[e])}else d[e]=b[e];return d};"indexOf"in Array||(Array.prototype.indexOf=function(b,a){for(var d=a||0;d1?c:null};f.prepareWait=function(){var a=document.createElement("DIV"),c=document.createElement("DIV"), -d=document.createElement("DIV"),e=document.createElement("DIV"),h=document.createElement("DIV");a.className="kmw-wait-background";c.className="kmw-wait-box";a.dismiss=null;d.className="kmw-wait-text";e.className="kmw-wait-graphic";h.className="kmw-alert-close";c.onmousedown=c.onclick=function(){if(h.style.display=="block"){a.style.display="none";a.dismiss&&a.dismiss()}};c.addEventListener("touchstart",c.onclick,false);a.onmousedown=a.onclick=function(b){b.preventDefault();b.stopPropagation()};a.addEventListener("touchstart", -a.onclick,false);c.appendChild(h);c.appendChild(d);c.appendChild(e);a.appendChild(c);document.body.appendChild(a);b.waiting=a};f.myPath=function(b){var a,d=document.getElementsByTagName("script"),e;for(a=0;a=0)return e.src.substr(0,e.src.lastIndexOf("/")+1)}return""};f.prependProtocol=function(a){return/^https?:/.test(a)?a:a.substr(0,2)=="//"?b.protocol+a:a.substr(0,1)=="/"?b.protocol+"/"+a:b.protocol+"//"+a};f.testString=function(b){var a=b.family;if("sample"in -b&&typeof b.sample=="string")return"BESbswy"+b.sample;for(var d=["TamilWeb","TibetanWeb","LatinWeb","CherokeeWeb","EgyptianWeb","SinhalaWeb","KhmerWeb","ArabicWeb","BurmeseWeb","LaoWeb","OriyaWeb","GeezWeb"],e=["\u0bbe\u0bf5","\u0f7f\u0fd0","\u02b0\u02a4","\u13d0\u13c9","\ua723\uf7d3","\u0dd8\u0da3","\u17d6\u178e","\u0639\u06b3","\u1038\u1024","\u0ec0\u0edd","\u0b03\u0b06","\u1361\u132c"],b=0;b0?b[0].appendChild(a):document.body.appendChild(a);return a};f.removeStyleSheet=f.removeStyleSheet=function(b){if(b==null||typeof b!="object"||b.nodeName!="STYLE"||typeof b.parentNode=="undefined"||b.parentNode== +null)return false;b.parentNode.removeChild(b);return true};f.linkStyleSheet=f.linkStyleSheet=function(b){var a=document.getElementsByTagName("head");if(a.length>0){var d=document.createElement("link");d.type="text/css";d.rel="stylesheet";d.href=b;a[0].appendChild(d)}};f.addFontFaceStyleSheet=function(g){if(typeof g!="undefined"){typeof g.files=="undefined"&&(g.files=g.source);if(typeof g.files!="undefined"){var a,d="",e="",h="",j="",o=[];for(a=0;a0&&(d=o[a]);o[a].indexOf(".woff")>0&&(e=o[a]);o[a].indexOf(".eot")>0&&(h=o[a]);o[a].indexOf(".svg")>0&&(j=o[a])}d!=""&&d.indexOf("/")<0&&(d=b.options.fonts+d);e!=""&&e.indexOf("/")<0&&(e=b.options.fonts+e);h!=""&&h.indexOf("/")<0&&(h=b.options.fonts+h);j!=""&&j.indexOf("/")<0&&(j=b.options.fonts+j);a="@font-face {\nfont-family:"+g.family+";\nfont-style:normal;\nfont-weight:normal;\n";if(f._GetIEVersion()>= +9)if(k.OS=="iOS")if(d!="")a=a+"src:url('"+d+"') format('truetype');";else return;else{h=[];if(k.OS=="Android"){j!=""&&h.push("url('"+j+"') format('svg')");e!=""&&h.push("url('"+e+"') format('woff')");d!=""&&h.push("url('"+d+"') format('truetype')")}else{e!=""&&h.push("url('"+e+"') format('woff')");d!=""&&h.push("url('"+d+"') format('truetype')");j!=""&&h.push("url('"+j+"') format('svg')")}if(h.length==0)return;a=a+("src:"+h.join(",")+";")}else if(h!="")a=a+"src:url('"+h+"');";else return;f.addStyleSheet(a+ +"\n}\n");b.embeddedFonts.push(g.family)}}};f.loadCookie=f.loadCookie=function(b){var a={};if(arguments.length>0){var d=f.loadCookie(),e;for(e in d)if(e==b)for(var h=unescape(d[e]).split(";"),j=0;j1?o[1]:""}}else if(typeof document.cookie!="undefined"&&document.cookie!=""){d=document.cookie.split(/;\s*/);for(j=0;j1&&(d=a);return typeof b=="undefined"||b==null||b==0||b==""?d:""+b};f.deepCopy=function(b,a){var d=a||{},e;for(e in b)if(typeof b[e]==="object"){d[e]=b[e].constructor=== +Array?[]:{};f.deepCopy(b[e],d[e])}else d[e]=b[e];return d};"indexOf"in Array||(Array.prototype.indexOf=function(b,a){for(var d=a||0;d1?c:null};f.prepareWait=function(){var a=document.createElement("DIV"),c=document.createElement("DIV"),d=document.createElement("DIV"),e=document.createElement("DIV"),h=document.createElement("DIV");a.className="kmw-wait-background";c.className="kmw-wait-box";a.dismiss=null;d.className="kmw-wait-text";e.className="kmw-wait-graphic";h.className="kmw-alert-close";c.onmousedown=c.onclick=function(){if(h.style.display=="block"){a.style.display= +"none";a.dismiss&&a.dismiss()}};c.addEventListener("touchstart",c.onclick,false);a.onmousedown=a.onclick=function(b){b.preventDefault();b.stopPropagation()};a.addEventListener("touchstart",a.onclick,false);c.appendChild(h);c.appendChild(d);c.appendChild(e);a.appendChild(c);document.body.appendChild(a);b.waiting=a};f.myPath=function(b){var a,d=document.getElementsByTagName("script"),e;for(a=0;a=0)return e.src.substr(0,e.src.lastIndexOf("/")+1)}return""};f.prependProtocol= +function(a){return/^https?:/.test(a)?a:a.substr(0,2)=="//"?b.protocol+a:a.substr(0,1)=="/"?b.protocol+"/"+a:b.protocol+"//"+a};f.testString=function(b){var a=b.family;if("sample"in b&&typeof b.sample=="string")return"BESbswy"+b.sample;for(var d=["TamilWeb","TibetanWeb","LatinWeb","CherokeeWeb","EgyptianWeb","SinhalaWeb","KhmerWeb","ArabicWeb","BurmeseWeb","LaoWeb","OriyaWeb","GeezWeb"],e=["\u0bbe\u0bf5","\u0f7f\u0fd0","\u02b0\u02a4","\u13d0\u13c9","\ua723\uf7d3","\u0dd8\u0da3","\u17d6\u178e","\u0639\u06b3", +"\u1038\u1024","\u0ec0\u0edd","\u0b03\u0b06","\u1361\u132c"],b=0;b"+c.innerHTML}};b.debugElement=null; b.addEventListener=b.addEventListener=function(b,a){return i.addEventListener("kmw."+b,a)};b.setupTouchDevice=function(){b.cancelInput=function(){b._ActiveElement=null;b.hideCaret();f.hideNow()};b.setBlur=function(a){"relatedTarget"in a&&a.relatedTarget&&("DIV"!=a.relatedTarget.nodeName||-1==a.relatedTarget.className.indexOf("keymanweb-input"))?b.cancelInput():b.focusing||b.cancelInput()};b.setFocus=function(a){b.focusing=!0;b.focusTimer=window.setTimeout(function(){b.focusing=!1},1E3);var d=a;a? "object"==typeof a.touches&&(d=a.touches[0]):(d={clientX:0,clientY:0},d.target=b._LastActiveElement?b._LastActiveElement.kmw_ip:b.sortedInputs[0].kmw_ip);var a=d.clientX,g=d.clientY,e=d.target,c;c="SPAN"==e.nodeName?e.parentNode:null!=e.className&&0<=e.className.indexOf("keymanweb-input")?e.firstChild:e;d=c.parentNode;b._ActiveElement!=d&&(b.hideCaret(),b._ActiveElement=d,d.focus());b._SetTargDir(d);b.useInternalKeyboard=!1;f.ready&&!f._Visible&&f._Show();if("DIV"==e.nodeName)g=i._GetAbsoluteX(c.firstChild), -"rtl"==d.dir?(g+=c.firstChild.offsetWidth,c=a>g?0:1E5):c=ak;k++){s=i._GetAbsoluteY(e)-l;if(s>g&&c>h&&c!=j)j=c,c=Math.round((c+h)/2);else if(sg&&c>h;)b.setTextCaret(d, ---c);for(;i._GetAbsoluteY(e)-lk;k++){g=i._GetAbsoluteX(e);if(gh&&c!=j)j=c,c=Math.round((c+h)/2);else if(g>a&&ch;)b.setTextCaret(d,--c);for(;i._GetAbsoluteX(e)>a&&ck;k++){g=i._GetAbsoluteX(e);if(g>a&&c>h&&c!=j)j=c,c=Math.round((c+h)/2);else if(gg?0:1E5):c=ak;k++){o=i._GetAbsoluteY(e)-l;if(o>g&&c>h&&c!=j)j=c,c=Math.round((c+h)/2);else if(og&&c>h;)b.setTextCaret(d, +--c);for(;i._GetAbsoluteY(e)-lk;k++){g=i._GetAbsoluteX(e);if(gh&&c!=j)j=c,c=Math.round((c+h)/2);else if(g>a&&ch;)b.setTextCaret(d,--c);for(;i._GetAbsoluteX(e)>a&&ck;k++){g=i._GetAbsoluteX(e);if(g>a&&c>h&&c!=j)j=c,c=Math.round((c+h)/2);else if(ga&&c>h;)b.setTextCaret(d,--c);for(;i._GetAbsoluteX(e)d.firstChild.childNodes.length)){var a=d.firstChild,g=b.caret.style,e=a.childNodes[1];b.caret.parentNode!=a&&a.appendChild(b.caret);g.left=e.offsetLeft+"px";g.top=e.offsetTop+"px";g.height=e.offsetHeight-1+"px";g.visibility="hidden";b.scrollBody(d);b.setScrollBar(d)}};b.setScrollBar=function(b){var d=b.childNodes[0],a=b.childNodes[1].style;(d.offsetWidth>b.offsetWidth||0>d.offsetLeft)&&"TEXTAREA"!=b.base.nodeName? @@ -51,24 +51,24 @@ a.visibility="hidden";a.zIndex="9998";b.showCaret=function(d){if(d&&d.firstChild function(){var d=b._LastActiveElement;if(d&&null!=d.className&&0<=d.className.indexOf("keymanweb-input")){d.base.value=b.getText(d);b.setText(d,null,1E5);var a=d.firstChild.style;"TEXTAREA"==d.base.nodeName?a.top="0":a.left="rtl"==d.base.dir?d.offsetWidth-d.firstChild.offsetWidth-8+"px":"0";b.caret.parentNode&&b.caret.parentNode.removeChild(b.caret);b.caret.style.visibility="hidden";1g&&(g=0);c=a._kmwLength();if(null===g||g>c)g=c;j=a._kmwSubstr(0,g);a=a._kmwSubstr(g);"string"==typeof h.textContent?h.textContent=j:h.innerText=j;"string"==typeof e.textContent?e.textContent=a:e.innerText=a}}b.updateBaseElement(d, c)};b.updateBaseElement=function(d,a){d.base.value=b.getText(d);d.style.backgroundColor=0==a?"transparent":window.getComputedStyle(d.base,null).backgroundColor;"iOS"==k.OS&&(d.base.style.visibility=0==a?"visible":"hidden")};b.getText=function(b){return null==b?"":"string"==typeof b.textContent?b.textContent:b.innerText};b.getTextBeforeCaret=function(b){if(b&&1a.className.indexOf("keymanweb-input"))a=a.parentNode;if(null==a.className||0>a.className.indexOf("keymanweb-input"))a=a.parentNode;if(!(null==a.className||0>a.className.indexOf("keymanweb-input"))){var g="object"==typeof d.touches?d.touches[0].screenX:d.screenX,e="object"==typeof d.touches? d.touches[0].screenY:d.screenY;if("undefined"==typeof b.firstTouch||null==b.firstTouch)b.firstTouch={x:g,y:e};else{var c=b.firstTouch.x,h=b.firstTouch.y,d=a.firstChild,j;if("TEXTAREA"==a.base.nodeName){if(g=parseInt(d.style.top,10),isNaN(g)&&(g=0),c=h-e,-4>c||4j||4c&&(e=c),ed.className.indexOf("keymanweb-input"))){var a=d.firstChild;if(!(3>a.childNodes.length)){var e=a.childNodes[1],g=i._GetAbsoluteX(e),e=i._GetAbsoluteY(e),c=i._GetAbsoluteX(d),h=i._GetAbsoluteY(d),j=parseInt(a.style.left,10),f=parseInt(a.style.top,10),s=0,l=0;isNaN(j)&&(j=0);isNaN(f)&&(f=0);"TEXTAREA"==d.base.nodeName?(g=Math.round(d.offsetHeight/d.base.rows),eh+d.offsetHeight- -g&&(l=e-h-d.offsetHeight+g),0!=l&&(a.style.top=(fc+d.offsetWidth-12&&(s=g-c-d.offsetWidth+12),0!=s&&(a.style.left=(jb.className.indexOf("keymanweb-input")||!f.ready)){var b=b.firstChild.childNodes[1],d=i._GetAbsoluteY(b),a=window.pageYOffset,e=0;de&&(e=0));0!=e&&window.scrollTo(0,e+window.pageYOffset)}}; +e+"px",b.firstTouch.x=g}b.setScrollBar(a)}}};b.scrollInput=function(d){if(d&&d.firstChild&&!(null==d.className||0>d.className.indexOf("keymanweb-input"))){var a=d.firstChild;if(!(3>a.childNodes.length)){var e=a.childNodes[1],g=i._GetAbsoluteX(e),e=i._GetAbsoluteY(e),c=i._GetAbsoluteX(d),h=i._GetAbsoluteY(d),j=parseInt(a.style.left,10),f=parseInt(a.style.top,10),o=0,l=0;isNaN(j)&&(j=0);isNaN(f)&&(f=0);"TEXTAREA"==d.base.nodeName?(g=Math.round(d.offsetHeight/d.base.rows),eh+d.offsetHeight- +g&&(l=e-h-d.offsetHeight+g),0!=l&&(a.style.top=(fc+d.offsetWidth-12&&(o=g-c-d.offsetWidth+12),0!=o&&(a.style.left=(jb.className.indexOf("keymanweb-input")||!f.ready)){var b=b.firstChild.childNodes[1],d=i._GetAbsoluteY(b),a=window.pageYOffset,e=0;de&&(e=0));0!=e&&window.scrollTo(0,e+window.pageYOffset)}}; b.updateInput=function(b){var d=b.style,a=b.base,e=window.getComputedStyle(a,null),g=parseInt(e.marginLeft,10),c=parseInt(e.marginTop,10),h=i._GetAbsoluteX(a),j=i._GetAbsoluteY(a),f=b.offsetParent;f&&(h-=i._GetAbsoluteX(f),j-=i._GetAbsoluteY(f));isNaN(g)&&(g=0);isNaN(c)&&(c=0);d.left=h-g+"px";d.top=j-c+"px";"undefined"!=typeof e.MozBoxSizing&&(d.left=h+"px",d.top=j+"px");var g=a.offsetWidth,a=a.offsetHeight,c=parseInt(e.paddingLeft,10),h=parseInt(e.paddingRight,10),j=parseInt(e.paddingTop,10),f=parseInt(e.paddingBottom, -10),s=parseInt(e.borderLeft,10),l=parseInt(e.borderRight,10),n=parseInt(e.borderTop,10),q=parseInt(e.borderBottom,10),D="undefined";"undefined"!=typeof e.boxSizing?D=e.boxSizing:"undefined"!=typeof e.MozBoxSizing&&(D=e.MozBoxSizing);"content-box"==D&&(isNaN(c)||(g-=c),isNaN(h)||(g-=h),isNaN(s)||(g-=s),isNaN(l)||(g-=l),isNaN(j)||(a-=j),isNaN(f)||(a-=f),isNaN(n)||(a-=n),isNaN(q)||(a-=q));"Android"==k.OS&&("undefined"!=typeof e.MozBoxSizing?(d.paddingTop=j+1+"px",d.paddingLeft=c+"px","TEXTAREA"==b.base.nodeName? +10),o=parseInt(e.borderLeft,10),l=parseInt(e.borderRight,10),r=parseInt(e.borderTop,10),q=parseInt(e.borderBottom,10),D="undefined";"undefined"!=typeof e.boxSizing?D=e.boxSizing:"undefined"!=typeof e.MozBoxSizing&&(D=e.MozBoxSizing);"content-box"==D&&(isNaN(c)||(g-=c),isNaN(h)||(g-=h),isNaN(o)||(g-=o),isNaN(l)||(g-=l),isNaN(j)||(a-=j),isNaN(f)||(a-=f),isNaN(r)||(a-=r),isNaN(q)||(a-=q));"Android"==k.OS&&("undefined"!=typeof e.MozBoxSizing?(d.paddingTop=j+1+"px",d.paddingLeft=c+"px","TEXTAREA"==b.base.nodeName? d.marginTop="1px":d.marginLeft="1px",g--,a--):(g++,a++));d.width=g+"px";d.height=a+"px"};for(var c=0;2>c;c++)for(var d=document.getElementsByTagName(0==c?"INPUT":"TEXTAREA"),a=0;ae.base.rows+1&&(e.base.rows=d)),h.width=c.width,h.minHeight=c.height):(h.minWidth=c.width,h.height=c.height),e.base.style.visibility="hidden",function(d){d.base.addEventListener("resize",function(){b.updateInput(d)},false)}(e),b.setText(e,e.base.value,null)};b.setupDesktopPage=function(){for(var a= -0;2>a;a++)for(var c=document.getElementsByTagName(0==a?"INPUT":"TEXTAREA"),d=0;dc[d].className.indexOf("kmw-disabled")&&!c[d].readOnly&&b.inputList.push(c[d]),c[d].className=c[d].className?c[d].className+" keymanweb-font":"keymanweb-font"};b.getBaseFont=function(){var b=document.getElementsByTagName("INPUT"),a=document.getElementsByTagName("TEXTAREA"),d=0,e;0==b.length&&0==a.length?d=0:0 -a[0].offsetTop?d=2:b[0].offsetLefta[0].offsetLeft&&(d=2);switch(d){case 0:case 1:i.getStyleValue(b[0],"font-family");case 2:e=i.getStyleValue(a[0],"font-family")}if("undefined"==typeof e||"monospace"==e)e="Arial,sans-serif";return e};b.setFocus=function(){};b.timerID=null;b.getText=function(){return""};b.setText=function(){};b.getTextBeforeCaret=function(){return""};b.setTextBeforeCaret=function(){};b.getTextCaret=function(){return 0};b.setTextCaret=function(){}; -b.hideCaret=function(){};b.flashCaret=function(){};b.updateInput=function(){};b.addKeyboards=function(a){0==arguments.length?b.keymanCloudRequest("",!1):b.addKeyboardArray(arguments)};b.addKeyboardArray=function(a){if(b.initialized){if(0!=a.length){var c,d,e,h,j,f=d="";b.cloudList=[];for(c=0;ce.base.rows+1&&(e.base.rows=d)),h.width=c.width,h.minHeight=c.height):(h.minWidth=c.width,h.height=c.height),e.base.style.visibility="hidden",function(d){d.base.addEventListener("resize",function(){b.updateInput(d)},false)}(e),b.setText(e,e.base.value,null)};b.setupDesktopPage=function(){for(var a=0;2>a;a++)for(var c= +document.getElementsByTagName(0==a?"INPUT":"TEXTAREA"),d=0;dc[d].className.indexOf("kmw-disabled")&&!c[d].readOnly&&b.inputList.push(c[d]),c[d].className=c[d].className?c[d].className+" keymanweb-font":"keymanweb-font"};b.getBaseFont=function(){var b=document.getElementsByTagName("INPUT"),a=document.getElementsByTagName("TEXTAREA"),d=0,e;0==b.length&&0==a.length?d=0:0a[0].offsetTop? +d=2:b[0].offsetLefta[0].offsetLeft&&(d=2);switch(d){case 0:case 1:i.getStyleValue(b[0],"font-family");case 2:e=i.getStyleValue(a[0],"font-family")}if("undefined"==typeof e||"monospace"==e)e="Arial,sans-serif";return e};b.setFocus=function(){};b.timerID=null;b.getText=function(){return""};b.setText=function(){};b.getTextBeforeCaret=function(){return""};b.setTextBeforeCaret=function(){};b.getTextCaret=function(){return 0};b.setTextCaret=function(){};b.hideCaret= +function(){};b.flashCaret=function(){};b.updateInput=function(){};b.addKeyboards=function(a){0==arguments.length?b.keymanCloudRequest("",!1):b.addKeyboardArray(arguments)};b.addKeyboardArray=function(a){if(b.initialized){if(0!=a.length){var c,d,e,h,j,f=d="";b.cloudList=[];for(c=0;carguments.length||e.LanguageCode==c))return e;return null};b.GetKeyboardDetail=function(a){for(var c=b.getKeyboards(),d=0;dd.indexOf("kmw-disabled"))&&!e.readOnly)e.disabled=!0,e.kmwInput=!0;for(c=0;cd.indexOf("kmw-disabled"))&&!e.readOnly)if("text"==e.type||"search"==e.type)e.disabled=!0,e.kmwInput= +document.readyState)window.setTimeout(function(){b.init(a)},50);else{b._MasterDocument=window.document;if(k.touchable){j=document.getElementsByTagName("textarea");o=document.getElementsByTagName("input");for(c=0;cd.indexOf("kmw-disabled"))&&!e.readOnly)e.disabled=!0,e.kmwInput=!0;for(c=0;cd.indexOf("kmw-disabled"))&&!e.readOnly)if("text"==e.type||"search"==e.type)e.disabled=!0,e.kmwInput= !0}"Android"==k.OS&&(k.dpi=i.getDPI(),k.formFactor=screen.height<4*k.dpi||screen.width<4*k.dpi?"phone":"tablet");window.removeEventListener&&window.removeEventListener("focus",b._BubbledFocus,!0);"manual"!=b.options.attachType&&b._AttachToControls(document);b.initialized=1;f.prepare();i.prepareWait();b.addKeyboardArray(b.deferredStubs);for(c=0;c=0||h.className.indexOf("kmw-key-")>=0)return;if(typeof h.parentNode!="undefined"){h=h.parentNode;if(h.className.indexOf("keymanweb-input")>=0||h.className.indexOf("kmw-key-")>=0)return}}f.hideNow()}},document.body.addEventListener("touchstart",b.hideOskWhileScrolling,!1)):(b.conditionallyHideOsk=function(){b.hideOnRelease&&f.hideNow();b.hideOnRelease=false},b.hideOskIfOnBody= @@ -141,16 +141,16 @@ a._DivVKbd,h=j.style;if("width"in b){var f=b.width-(e.offsetWidth-j.offsetWidth) e.stopPropagation();if(!("object"==typeof e.touches&&1f&&cl&&jf&&(m=f),0>m&&(m=0),c.left=m+"px",f=document.createElement("DIV"),f.className="arrow-border", -l=f.style,m=g._GetAbsoluteX(b)+0.5*b.offsetWidth-16,r=e.offsetTop+e.offsetHeight-1,l.left=m+"px",l.top=r+"px",b=document.createElement("DIV"),b.className="arrow-content",l=b.style,l.left=m+1+"px",l.top=r-1+"px",f.appendChild(b),e.appendChild(f),c.visibility="visible")}};a.getVKDictionaryCode=function(a){if(!b._ActiveKeyboard.VKDictionary){var e=[];if("string"==typeof b._ActiveKeyboard.KVKD)for(var c=b._ActiveKeyboard.KVKD.split(" "),g=0;gl.length)return!0;"popup"==l[0]&&l.splice(0,1);if(null!=e){var n=l[0],l=l[1];c=g=a.getModifierState(a.layerId);"undefined"!=typeof d.key&&(c=d.key.nextlayer);null==b._ActiveElement&&(b._ActiveElement=e);switch(l){case "K_LSHIFT":case "K_RSHIFT":case "K_SHIFT":return a.highlightKey(d,!1),a.updateLayer(c?c:"shift"),a._Show(),!0;case "K_LCONTROL":case "K_RCONTROL":case "K_LCTRL":case "K_RCTRL":case "K_CTRL":return a.highlightKey(d, -!1),a.updateLayer(c?c:"ctrl"),a._Show(),!0;case "K_LALT":case "K_RALT":case "K_ALT":return a.highlightKey(d,!1),a.updateLayer(c?c:"alt"),a._Show(),!0;case "K_ALTGR":return a.highlightKey(d,!1),a.updateLayer(c?c:"ctrlalt"),a._Show(),!0;case "K_LOPT":case "K_ROPT":return a.optionKey(d,l,!0),!0;case "K_CURRENCIES":case "K_NUMERALS":case "K_SHIFTED":case "K_UPPER":case "K_LOWER":case "K_SYMBOLS":return a.highlightKey(d,!1),a.updateLayer(c?c:"default"),a._Show(),!0}a.highlightKey(d,!1);"K_SPACE"!=l&&(s= -d.childNodes[0].innerHTML);c=e._KeymanWebSelectionStart;g=e._KeymanWebSelectionEnd;s=b._Selection;b._IsActivatingKeymanWebUI=1;b._IgnoreNextSelChange=100;b._FocusLastActiveElement();b._IsMozillaEditableIframe(e,0)&&(e=e.documentElement);document.selection&&null!=s&&s.select();e._KeymanWebSelectionStart=c;e._KeymanWebSelectionEnd=g;b._IgnoreNextSelChange=0;b._CachedSelectionStart=null;b._DeadkeyDeleteMatched();c={Ltarg:e,Lmodifiers:0,Lcode:f[l],LisVirtualKey:!0};"U_"==l.substr(0,2)&&(c.LisVirtualKey= -!1);"undefined"==typeof c.Lcode&&(c.Lcode=a.getVKDictionaryCode(l),!c.Lcode&&"U_"==l.substr(0,2)&&(g=parseInt(l.substr(2),16),isNaN(g)||(c.Lcode=g)));g="undefined"==typeof d.key?null:d.key.layer;g=null==g?a.getModifierState(n):a.getModifierState(g);c.Lmodifiers=16*g;b._ActiveKeyboard&&b._ActiveKeyboard.KM?(s=d.firstChild.firstChild.wholeText,c.LisVirtualKey=!1,c.LisVirtualKeyCode=!1,c.vkCode=c.Lcode,32!=c.Lcode&&(c.Lcode="string"==typeof s&&""!=s?s.charCodeAt(0):0,160==c.Lcode&&(c.Lcode=0)),c.Lmodifiers= +l=f.style,m=g._GetAbsoluteX(b)+0.5*b.offsetWidth-16,s=e.offsetTop+e.offsetHeight-1,l.left=m+"px",l.top=s+"px",b=document.createElement("DIV"),b.className="arrow-content",l=b.style,l.left=m+1+"px",l.top=s-1+"px",f.appendChild(b),e.appendChild(f),c.visibility="visible")}};a.getVKDictionaryCode=function(a){if(!b._ActiveKeyboard.VKDictionary){var e=[];if("string"==typeof b._ActiveKeyboard.KVKD)for(var c=b._ActiveKeyboard.KVKD.split(" "),g=0;gl.length)return!0;"popup"==l[0]&&l.splice(0,1);if(null!=e){var r=l[0],l=l[1];c=g=a.getModifierState(a.layerId);"undefined"!=typeof d.key&&(c=d.key.nextlayer);null==b._ActiveElement&&(b._ActiveElement=e);switch(l){case "K_LSHIFT":case "K_RSHIFT":case "K_SHIFT":return a.highlightKey(d,!1),a.updateLayer(c?c:"shift"),a._Show(),!0;case "K_LCONTROL":case "K_RCONTROL":case "K_LCTRL":case "K_RCTRL":case "K_CTRL":return a.highlightKey(d, +!1),a.updateLayer(c?c:"ctrl"),a._Show(),!0;case "K_LALT":case "K_RALT":case "K_ALT":return a.highlightKey(d,!1),a.updateLayer(c?c:"alt"),a._Show(),!0;case "K_ALTGR":return a.highlightKey(d,!1),a.updateLayer(c?c:"ctrlalt"),a._Show(),!0;case "K_LOPT":case "K_ROPT":return a.optionKey(d,l,!0),!0;case "K_CURRENCIES":case "K_NUMERALS":case "K_SHIFTED":case "K_UPPER":case "K_LOWER":case "K_SYMBOLS":return a.highlightKey(d,!1),a.updateLayer(c?c:"default"),a._Show(),!0}a.highlightKey(d,!1);"K_SPACE"!=l&&(o= +d.childNodes[0].innerHTML);c=e._KeymanWebSelectionStart;g=e._KeymanWebSelectionEnd;o=b._Selection;b._IsActivatingKeymanWebUI=1;b._IgnoreNextSelChange=100;b._FocusLastActiveElement();b._IsMozillaEditableIframe(e,0)&&(e=e.documentElement);document.selection&&null!=o&&o.select();e._KeymanWebSelectionStart=c;e._KeymanWebSelectionEnd=g;b._IgnoreNextSelChange=0;b._CachedSelectionStart=null;b._DeadkeyDeleteMatched();c={Ltarg:e,Lmodifiers:0,Lcode:f[l],LisVirtualKey:!0};"U_"==l.substr(0,2)&&(c.LisVirtualKey= +!1);"undefined"==typeof c.Lcode&&(c.Lcode=a.getVKDictionaryCode(l),!c.Lcode&&"U_"==l.substr(0,2)&&(g=parseInt(l.substr(2),16),isNaN(g)||(c.Lcode=g)));g="undefined"==typeof d.key?null:d.key.layer;g=null==g?a.getModifierState(r):a.getModifierState(g);c.Lmodifiers=16*g;b._ActiveKeyboard&&b._ActiveKeyboard.KM?(o=d.firstChild.firstChild.wholeText,c.LisVirtualKey=!1,c.LisVirtualKeyCode=!1,c.vkCode=c.Lcode,32!=c.Lcode&&(c.Lcode="string"==typeof o&&""!=o?o.charCodeAt(0):0,160==c.Lcode&&(c.Lcode=0)),c.Lmodifiers= 0):c.vkCode=c.Lcode;"undefined"==typeof b._ActiveKeyboard.KM&&(c.Lcode=b._USKeyCodeToCharCode(c),c.LisVirtualKey=!1);if(!b._ActiveKeyboard||0!=c.Lcode&&!b._ActiveKeyboard.gs(e,c))switch(c.Lcode=c.vkCode,l){case "K_BKSP":b.KO(1,b._LastActiveElement,"");break;case "K_TAB":b.moveToNext("shift"==a.layerId);break;case "K_TABBACK":b.moveToNext(!0);break;case "K_TABFWD":b.moveToNext(!1);break;case "K_ENTER":"TEXTAREA"==e.nodeName||"undefined"!=typeof e.base&&"TEXTAREA"==e.base.nodeName?b.KO(0,e,"\n"):"INPUT"== -e.nodeName&&("search"==e.type||"submit"==e.type)?e.form.submit():"undefined"!=typeof e.base&&("search"==e.base.type||"submit"==e.base.type)?(e.base.disabled=!1,e.base.form.submit()):b.moveToNext(!1);break;case "K_SPACE":b.KO(0,e," ");break;default:n=0,c=c.Lcode,"U_"==l.substr(0,2)&&32c)?n=String.fromCharCode(c):48<=c&&57>=c?n=i[g][0][c-48]:65<=c&&90>=c?n=String.fromCharCode(c+(g?0:32)):186<=c&&192>=c?n=i[g][1][c-186]:219<=c&&222>=c&&(n=i[g][2][c-219]),n&&b.KO(0,e,n)}"undefined"!=typeof d.key&& +e.nodeName&&("search"==e.type||"submit"==e.type)?e.form.submit():"undefined"!=typeof e.base&&("search"==e.base.type||"submit"==e.base.type)?(e.base.disabled=!1,e.base.form.submit()):b.moveToNext(!1);break;case "K_SPACE":b.KO(0,e," ");break;default:r=0,c=c.Lcode,"U_"==l.substr(0,2)&&32c)?r=String.fromCharCode(c):48<=c&&57>=c?r=i[g][0][c-48]:65<=c&&90>=c?r=String.fromCharCode(c+(g?0:32)):186<=c&&192>=c?r=i[g][1][c-186]:219<=c&&222>=c&&(r=i[g][2][c-219]),r&&b.KO(0,e,r)}"undefined"!=typeof d.key&& null!==d.key.nextlayer?a.nextLayer=d.key.nextlayer:"undefined"!=typeof d.nextLayer&&null!==d.nextLayer&&(a.nextLayer=d.nextLayer);a.nextLayer!=a.layerId&&(a.layerId=a.nextLayer,a._Show());e._KeymanWebSelectionStart=null;e._KeymanWebSelectionEnd=null}b._IsActivatingKeymanWebUI=0;return!0};a.getLayerId=function(a){var b="";if(0==a)return"default";a&1&&(b="shift");a&4&&(b="alt"+b);a&2&&(b="ctrl"+b);return b};a.getModifierState=function(a){var b=0;0<=a.indexOf("shift")&&(b+=1);0<=a.indexOf("ctrl")&&(b+= 2);0<=a.indexOf("alt")&&(b+=4);return b};a.updateLayer=function(b){var e=a.layerId,c;c=b.replace("shift","");c=c.replace("ctrl","");c=c.replace("alt","");if("default"==a.layerId||"numeric"==a.layerId||"symbol"==a.layerId||"currency"==a.layerId||""!=c)e=b;else{c=a.getModifierState(e);e=e.replace("shift","");e=e.replace("ctrl","");e=e.replace("alt","");switch(b){case "shift":c^=1;break;case "ctrl":c^=2;break;case "alt":c^=4;break;default:e=b}"default"!=e&&(c&1&&(e="shift"+e),c&2&&(e="ctrl"+e),c&4&& (e="alt"+e))}""==e&&(e="default");a.layerId=e.replace("altctrl","ctrlalt");for(b=0;ba.spaceBar.offsetLeft&&(da.sp g._CreateElement("P"),i.innerHTML=String.fromCharCode(l+64),j.appendChild(i);j.addEventListener("touchstart",function(b){a.scrollToLanguage(b,h,f)},!1);j.addEventListener("touchend",function(a){a.stopPropagation();a.preventDefault()},!1);e.appendChild(j);e.addEventListener("scroll",function(){a.lgList.scrolling=true},!1);h.addEventListener("scroll",function(){if(h.scrollTop<1)h.scrollTop=1;if(h.scrollTop>h.scrollHeight-h.offsetHeight-1)h.scrollTop=h.scrollHeight-h.offsetHeight-1},!1);a.lgList.activeLgNo= a.addLanguagesToMenu(f,d);a.lgList.visibility="hidden";document.body.appendChild(a.lgList);"Android"==c.OS&&"devicePixelRatio"in window&&(a.lgList.style.fontSize=2/window.devicePixelRatio+"em");if("Android"==c.OS&&("tablet"==c.formFactor&&"devicePixelRatio"in window)&&(l=parseInt(g.getStyleValue(e,"width"),10),d=e.style,isNaN(l)||(d.width=d.maxWidth=2*l/window.devicePixelRatio+"px"),l=parseInt(g.getStyleValue(h,"width"),10),d=h.style,isNaN(l)||(d.width=d.maxWidth=2*l/window.devicePixelRatio+"px"), l=parseInt(g.getStyleValue(f,"width"),10),d=f.style,!isNaN(l)))d.width=d.maxWidth=2*l/window.devicePixelRatio+"px";a.adjustLanguageMenu(0);d=Math.floor(e.offsetHeight/26);i=Math.round(100*d/(j.childNodes[1].offsetTop-j.childNodes[0].offsetTop))/100;var k=0.6l;l++){var m=j.childNodes[l].style;2==k&&1==l%2?m.display="none":(m.fontSize=i*k+"em",m.lineHeight=d*k+"px")}l=h.offsetWidth;h.scrollHeight>h.offsetHeight+3?l+=j.offsetWidth:j.style.display="none";e.style.width= -l+"px";a.lgList.visibility="";e=f.firstChild.offsetHeight*a.lgList.activeLgNo+1;h.scrollTop=e;h.scrollToph.scrollHeight-h.offsetHeight-1&&(h.scrollTop=h.scrollHeight-h.offsetHeight-1)}};a.adjustLanguageMenu=function(b){var e=a.lgList,h=e.firstChild,j=h.firstChild,f=0,i=e.style,e=e.childNodes[1],n=window.innerHeight-a.lgKey.offsetHeight-16,b=(j.childNodes.length+b-1)*j.firstChild.firstChild.offsetHeight;"iOS"==c.OS&&("phone"==c.formFactor? -(f=g.landscapeView()?36:0,n=(window.innerHeight-f-16)*g.getViewportScale()):"tablet"==c.formFactor&&(f=g.landscapeView()?16:0,n-=f));i.left=g._GetAbsoluteX(a.lgKey)+"px";b>n&&(b=n);i.height=b+"px";i.top=g._GetAbsoluteY(a._Box)+a._Box.offsetHeight-b+window.pageYOffset-6+"px";i.bottom="auto";e.style.height=h.style.height=i.height};a.scrollToLanguage=function(a,b,c){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();if("P"==a.touches[0].target.nodeName){var g,f,i=0,a=a.touches[0].target.innerHTML.charCodeAt(0), -n=c.childNodes;try{for(g=0;g=a);g++);}catch(k){}try{i=c.firstChild.offsetHeight*g+1,b.scrollTop=i}catch(m){i=0}try{if(b.scrollTopb.scrollHeight-b.offsetHeight-1)b.scrollTop=b.scrollHeight-b.offsetHeight-1}catch(r){}}};a.addLanguagesToMenu=function(d,e){var h=e.length,j,f,i,n=[];for(f=0;f=this.className.indexOf("selected")&& -(this.className+=" selected");a.lgList.scrolling=!1;a.lgList.y0=b.touches[0].pageY;return!0},c=function(b){b.stopImmediatePropagation();var d=a.lgList.childNodes[0],e=d.scrollHeight-d.offsetHeight,c=b.touches[0].pageY,h=c-a.lgList.y0;if(0>h)d.scrollTop>=e-1&&(b.preventDefault(),a.lgList.y0=c);else if(0d.scrollTop&&(b.preventDefault(),a.lgList.y0=c);else return;if(-5>h||5C&&(C=x)}C="desktop"==e?C+5:C+15;for(l=0;lparseInt(t[0].pad,10)?(o=parseInt(t[0].width,10)*E/C,t[0].widthpc= -o,z+=o,t[0].padpc=E-z):0v||90c||10f;f++){0o+65*f)&&(p.text="`1234567890-=\u00a7~~qwertyuiop[]\\~~~asdfghjkl;'~~~~~?zxcvbnm,./~~~~~ ~!@#$%^&*()_+\u00a7~~QWERTYUIOP{}\\~~~ASDFGHJKL:\"~~~~~?ZXCVBNM<>?~~~~~ "[o+65*f]),"undefined"==typeof p.text&&(p.text=""),"K_SHIFT"==p.id&&(w=p),r.test(p.text)||(B+=p.text)}t.valid=0f;f++){n=i[f].row;for(q=0;qr;r++)for(l=0;l";e.style.border="1px solid #ccc";return e};a.adjustHeights=function(){var b=a._Box.firstChild.firstChild.childNodes,e=b[0].childNodes.length,h=a.getHeight(),f=Math.floor(h/e),i,l,k,q,m,r,p,A,x,t=4;i=1;"Android"==c.OS&&"devicePixelRatio"in window&&(f/=window.devicePixelRatio);h=e*f;l=a._Box; -k=l.style;k.height=k.maxHeight=h+3+"px";l=l.firstChild.firstChild;k=l.style;k.height=k.maxHeight=h+3+"px";"phone"==c.formFactor&&(t=2,i=0.6);"iOS"==c.OS&&(i/=g.getViewportScale());k.fontSize=i+"em";var o="iOS"==c.OS&&"phone"==c.formFactor&&g.landscapeView();for(i=0;ip.childNodes[x].className.indexOf("key-label"));x++);A=p.childNodes[x].style;A.bottom=k.bottom;A.height=f-t+"px";o&&0
Copyright © 2013 Tavultesoft Pty Ltd')};a.resizeBar=function(){var b=g._CreateElement("DIV");b.className="kmw-footer";b.onmousedown=a._CancelMouse;var c=g._CreateElement("DIV");c.className="kmw-footer-caption";c.innerHTML="Keyboard © 2013 Tavultesoft Pty Ltd";c.id="keymanweb-osk-footer-caption"; -g.attachDOMEvent(c,"dblclick",function(b){b&&b.shiftKey&&a.showBuild()},!1);"onselectstart"in c&&(c.onselectstart=g.selectStartHandler);b.appendChild(c);c=g._CreateElement("DIV");c.className="kmw-footer-resize";c.onmousedown=a._VResizeMouseDown;c.onmouseover=c.onmouseout=a._VResizeMouseOut;b.appendChild(c);a.resizeIcon=c;return b};a._VKbdMouseOver=function(){b._IsActivatingKeymanWebUI=1};a._VKbdMouseOut=function(){b._IsActivatingKeymanWebUI=0};a._VResizeMouseOver=a._VResizeMouseOut=function(d){d= -b._GetEventObject(d);if(!d)return!1;d&&d.preventDefault&&d.preventDefault();var c=a.getRect();a.width=c.width;a.height=c.height;d.cancelBubble=!0;return!1};a._VResizeMouseDown=function(d){b._JustActivatedKeymanWebUI=1;d=b._GetEventObject(d);if(!d)return!0;a.resizing=1;var c,g;d.pageX?(c=d.pageX,g=d.pageY):d.clientX&&(c=d.clientX+document.body.scrollLeft,g=d.clientY+document.body.scrollTop);a._ResizeMouseX=c;a._ResizeMouseY=g;document.onmousemove!=a._VResizeMouseMove&&document.onmousemove!=a._VMoveMouseMove&& -(a._VPreviousMouseMove=document.onmousemove,a._VPreviousMouseUp=document.onmouseup);a._VPreviousCursor=document.body.style.cursor;a._VPreviousMouseButton="undefined"==typeof d.which?d.button:d.which;a._VOriginalWidth=a._DivVKbd.offsetWidth;a._VOriginalHeight=a._DivVKbd.offsetHeight;document.onmousemove=a._VResizeMouseMove;document.onmouseup=a._VResizeMoveMouseUp;document.body.style.cursor&&(document.body.style.cursor="se-resize");d&&d.preventDefault&&d.preventDefault();d.cancelBubble=!0;return!1}; -a._VResizeMouseMove=function(d){var c,h,d=b._GetEventObject(d);if(!d)return!0;a.resizing=1;if(a._VPreviousMouseButton!=("undefined"==typeof d.which?d.button:d.which))return a._VResizeMoveMouseUp(d);d.pageX?(c=d.pageX,h=d.pageY):d.clientX&&(c=d.clientX+document.body.scrollLeft,h=d.clientY+document.body.scrollTop);c=a._VOriginalWidth+c-a._ResizeMouseX;h=a._VOriginalHeight+h-a._ResizeMouseY;c<0.2*screen.width&&(c=0.2*screen.width);h<0.1*screen.height&&(h=0.1*screen.height);c>0.9*screen.width&&(c=0.9* -screen.width);h>0.5*screen.height&&(c=0.5*screen.height);a._DivVKbd.style.width=c+"px";a._DivVKbd.style.height=h+"px";a._DivVKbd.style.fontSize=h/8+"px";g.showShim(a._DivVKbd,a.shim,a._DivVKbdHelp);d&&d.preventDefault&&d.preventDefault();d.cancelBubble=!0;return!1};a._VMoveMouseDown=function(d){var c,g;b._JustActivatedKeymanWebUI=1;d=b._GetEventObject(d);if(!d)return!0;a.resizing=1;d.pageX?(c=d.pageX,g=d.pageY):d.clientX&&(c=d.clientX+document.body.scrollLeft,g=d.clientY+document.body.scrollTop); -document.onmousemove!=a._VResizeMouseMove&&document.onmousemove!=a._VMoveMouseMove&&(a._VPreviousMouseMove=document.onmousemove,a._VPreviousMouseUp=document.onmouseup);a._VPreviousCursor=document.body.style.cursor;a._VPreviousMouseButton="undefined"==typeof d.which?d.button:d.which;a._VMoveX=c-a._Box.offsetLeft;a._VMoveY=g-a._Box.offsetTop;b.isCJK()&&(a.pinImg.style.left="15px");document.onmousemove=a._VMoveMouseMove;document.onmouseup=a._VResizeMoveMouseUp;document.body.style.cursor&&(document.body.style.cursor= -"move");d&&d.preventDefault&&d.preventDefault();d.cancelBubble=!0;return!1};a._VMoveMouseMove=function(d){var c,h,d=b._GetEventObject(d);if(!d||a.noDrag)return!0;a.resizing=1;a.userPositioned=!0;a.pinImg.style.display="block";if(a._VPreviousMouseButton!=("undefined"==typeof d.which?d.button:d.which))return a._VResizeMoveMouseUp(d);d.pageX?(c=d.pageX,h=d.pageY):d.clientX&&(c=d.clientX+document.body.scrollLeft,h=d.clientY+document.body.scrollTop);a._Box.style.left=c-a._VMoveX+"px";a._Box.style.top= -h-a._VMoveY+"px";a._DivVKbd?g.showShim(a._DivVKbd,a.shim,a._DivVKbdHelp):g.showShim(a._Box,a.shim);d&&d.preventDefault&&d.preventDefault();c=a.getRect();a.width=c.width;a.height=c.height;d.cancelBubble=!0;return!1};a._VResizeMoveMouseUp=function(d){d=b._GetEventObject(d);if(!d)return!0;a.resizing=0;a.currentKey=null;document.onmousemove=a._VPreviousMouseMove;document.onmouseup=a._VPreviousMouseUp;document.body.style.cursor&&(document.body.style.cursor=a._VPreviousCursor);b._FocusLastActiveElement(); -d&&d.preventDefault&&d.preventDefault();b._JustActivatedKeymanWebUI=0;b._IsActivatingKeymanWebUI=0;a._DivVKbd&&(a._VOriginalWidth=a._DivVKbd.offsetWidth,a._VOriginalHeight=a._DivVKbd.offsetHeight);a.doResizeMove();d.cancelBubble=!0;a.saveCookie();return!1};a.userLocated=function(){return a.userPositioned};a.show=function(b){0parseInt(h.height,10)?"120%":"200%",a.lgKey=a.getSpecialKey(i,"K_LOPT"),a.hkKey=a.getSpecialKey(i,"K_ROPT"),"iOS"==c.OS&&"phone"==c.formFactor&&a.adjustHeights());a.spaceBar=a.getSpecialKey(i, -"K_SPACE")}h.display="block";a.showLanguage();if("desktop"==c.formFactor&&(h.position="absolute",h.display="block",h.left="0px",a.loadCookie(),0<=d?(h.left=d+"px",h.top=e+"px"):a.userPositioned?(h.left=a.x+"px",h.top=a.y+"px"):(f=b._ActiveElement,""!=a.dfltX?h.left=a.dfltX:"undefined"!=typeof f&&null!=f&&(h.left=g._GetAbsoluteX(f)+"px"),""!=a.dfltY)?h.top=a.dfltY:"undefined"!=typeof f&&null!=f&&(h.top=g._GetAbsoluteY(f)+f.offsetHeight+"px"),a._Enabled=1,a._Visible=1,a._DivVKbd&&(a.width=a._DivVKbd.offsetWidth, -a.height=a._DivVKbd.offsetHeight),a.saveCookie(),f=a.pinImg,"undefined"!=typeof f&&null!=f))f.style.display=a.userPositioned?"block":"none";"hidden"==h.visibility&&window.setTimeout(function(){a._Box.style.visibility="visible"},0);c.touchable||(h={},h.x=a._Box.offsetLeft,h.y=a._Box.offsetTop,h.userLocated=a.userPositioned,a.doShow(h))}};a.adjustRowLengths=function(b){if(!(0<=b)){var e,f=a._DivVKbd.childNodes[0].childNodes;if(!(0>b||b>=f.length||f[b].aligned)&&"block"==f[b].style.display){e=a._DivVKbd.childNodes[0].offsetWidth- -6;"Windows"==c.OS&&(e-=g.landscapeView()?4:40);var i,k=f[b].childNodes,l,n,q;for(i=0;i?~~~~~ "}),a._GenerateVisualKeyboard(e,d, -i)):(a.ddOSK=!1,e=g._CreateElement("DIV"),e.className="kmw-title-bar",e.appendChild(a._TitleBarInterior()),e.onmousedown=a._VMoveMouseDown,a._Box.appendChild(e),e=g._CreateElement("DIV"),e.className="kmw-osk-static",e.innerHTML=d,a._Box.appendChild(e),b._ActiveKeyboard.KHF&&b._ActiveKeyboard.KHF(a._Box));b._TitleElement&&(b._TitleElement.innerHTML=""+b._ActiveKeyboard.KN+" - "+b._TitleElement.innerHTML,b._TitleElement.className="",b._TitleElement.style.color= -"#fff")}a.createKeyTip();d=a._Box.firstChild;e=" kmw-keyboard-"+(b._ActiveKeyboard?b._ActiveKeyboard.KI.replace("Keyboard_",""):"");"keymanweb_title_bar"==d.id&&(d=d.nextSibling);d.className="kmw-osk-inner-frame"+e;a.appendStyleSheet();a._Enabled&&a._Show()}};a.appendStyleSheet=function(){if(null!=b._ActiveStub){a.styleSheet&&g.removeStyleSheet(a.styleSheet);var d=b._ActiveStub,c=d.KFont,d=d.KOskFont;g.addFontFaceStyleSheet(c);g.addFontFaceStyleSheet(d);b.alignInputs(!1);var f=a.addFontStyle(c,d); -null!=b._ActiveKeyboard&&"string"==typeof b._ActiveKeyboard.KCSS&&(f+=b._ActiveKeyboard.KCSS);a.styleSheet=g.addStyleSheet(f);a.waitForFonts(c,d)&&b.alignInputs(!0)}};a.addFontStyle=function(a,c){var g=b.baseFont;"undefined"!=typeof a&&"undefined"!=typeof a.family&&(g=a.family);var f=b.appliedFont,f=f.replace(RegExp("s?"+g+",?"),""),f=f.replace(/,$/,""),f=""==f?g:g+","+f,g=".keymanweb-font{\nfont-family:"+f+" !important;\n}\n";"undefined"!=typeof c?g=g+".kmw-key-text{\nfont-family:"+c.family+";\n}\n": -"undefined"!=typeof a&&(g=g+".kmw-key-text{\nfont-family:"+a.family+";\n}\n");b.appliedFont=f;return g};a._Unload=function(){a._VShift=a._DivVKbd=a._VKeySpans=a._Box=0};a.saveCookie=function(){var b=g.loadCookie("KeymanWeb_OnScreenKeyboard"),c=a.getPos();b.visible=a._Enabled?1:0;b.userSet=a.userPositioned?1:0;b.left=c.left;b.top=c.top;a._DivVKbd&&(b.width=a.width,b.height=a.height);g.saveCookie("KeymanWeb_OnScreenKeyboard",b)};a.loadCookie=function(){var b=g.loadCookie("KeymanWeb_OnScreenKeyboard"); +l+"px";a.lgList.visibility="";e=f.firstChild.offsetHeight*a.lgList.activeLgNo+1;h.scrollTop=e;h.scrollToph.scrollHeight-h.offsetHeight-1&&(h.scrollTop=h.scrollHeight-h.offsetHeight-1)}};a.adjustLanguageMenu=function(b){var e=a.lgList,h=e.firstChild,j=h.firstChild,f=0,i=e.style,e=e.childNodes[1],r=window.innerHeight-a.lgKey.offsetHeight-16,b=(j.childNodes.length+b-1)*j.firstChild.firstChild.offsetHeight;"iOS"==c.OS&&("phone"==c.formFactor? +(f=g.landscapeView()?36:0,r=(window.innerHeight-f-16)*g.getViewportScale()):"tablet"==c.formFactor&&(f=g.landscapeView()?16:0,r-=f));i.left=g._GetAbsoluteX(a.lgKey)+"px";b>r&&(b=r);i.height=b+"px";i.top=g._GetAbsoluteY(a._Box)+a._Box.offsetHeight-b+window.pageYOffset-6+"px";i.bottom="auto";e.style.height=h.style.height=i.height};a.scrollToLanguage=function(a,b,c){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();if("P"==a.touches[0].target.nodeName){var g,f,i=0,a=a.touches[0].target.innerHTML.charCodeAt(0), +r=c.childNodes;try{for(g=0;g=a);g++);}catch(k){}try{i=c.firstChild.offsetHeight*g+1,b.scrollTop=i}catch(m){i=0}try{if(b.scrollTopb.scrollHeight-b.offsetHeight-1)b.scrollTop=b.scrollHeight-b.offsetHeight-1}catch(s){}}};a.addLanguagesToMenu=function(d,e){var h=e.length,j,f,i,k=[];for(f=0;f=this.className.indexOf("selected")&& +(this.className+=" selected");a.lgList.scrolling=!1;a.lgList.y0=b.touches[0].pageY;return!0},c=function(b){b.stopImmediatePropagation();var d=a.lgList.childNodes[0],e=d.scrollHeight-d.offsetHeight,c,h;if("undefined"!=typeof b.pageY)c=b.pageY;else if("undefined"!=typeof b.touches)c=b.touches[0].pageY;else return;h=c-a.lgList.y0;if(0>h)d.scrollTop>=e-1&&(b.preventDefault(),a.lgList.y0=c);else if(0d.scrollTop&&(b.preventDefault(),a.lgList.y0=c);else return;if(-5>h||5C&&(C=x)}C="desktop"==e?C+5:C+15;for(l=0;lparseInt(t[0].pad,10)?(n=parseInt(t[0].width,10)*E/C,t[0].widthpc=n,z+=n,t[0].padpc=E-z):0v||90f||10f;f++){0n+65*f)&&(p.text="`1234567890-=\u00a7~~qwertyuiop[]\\~~~asdfghjkl;'~~~~~?zxcvbnm,./~~~~~ ~!@#$%^&*()_+\u00a7~~QWERTYUIOP{}\\~~~ASDFGHJKL:\"~~~~~?ZXCVBNM<>?~~~~~ "[n+65*f]),"undefined"==typeof p.text&&(p.text=""),"K_SHIFT"==p.id&&(w=p),s.test(p.text)||(B+=p.text)}t.valid=0f;f++){r=i[f].row;for(q=0;qs;s++)for(l=0;l";e.style.border="1px solid #ccc";return e};a.adjustHeights=function(){if(a._Box&&a._Box.firstChild&&a._Box.firstChild.firstChild&&a._Box.firstChild.firstChild.childNodes){var b=a._Box.firstChild.firstChild.childNodes,e=b[0].childNodes.length,h=a.getHeight(), +f=Math.floor(h/e),i,l,k,q,m,s,p,A,x,t=4;i=1;"Android"==c.OS&&"devicePixelRatio"in window&&(f/=window.devicePixelRatio);h=e*f;l=a._Box;k=l.style;k.height=k.maxHeight=h+3+"px";l=l.firstChild.firstChild;k=l.style;k.height=k.maxHeight=h+3+"px";"phone"==c.formFactor&&(t=2,i=0.6);"iOS"==c.OS&&(i/=g.getViewportScale());k.fontSize=i+"em";var n="iOS"==c.OS&&"phone"==c.formFactor&&g.landscapeView();for(i=0;ip.childNodes[x].className.indexOf("key-label"));x++);A=p.childNodes[x].style;A.bottom=k.bottom;A.height=f-t+"px";n&&0
Copyright © 2013 Tavultesoft Pty Ltd')};a.resizeBar=function(){var b=g._CreateElement("DIV");b.className="kmw-footer";b.onmousedown=a._CancelMouse;var c= +g._CreateElement("DIV");c.className="kmw-footer-caption";c.innerHTML="Keyboard © 2013 Tavultesoft Pty Ltd";c.id="keymanweb-osk-footer-caption";g.attachDOMEvent(c,"dblclick",function(b){b&&b.shiftKey&&a.showBuild()},!1);"onselectstart"in c&&(c.onselectstart=g.selectStartHandler);b.appendChild(c);c=g._CreateElement("DIV");c.className="kmw-footer-resize";c.onmousedown=a._VResizeMouseDown;c.onmouseover=c.onmouseout=a._VResizeMouseOut;b.appendChild(c);a.resizeIcon=c;return b};a._VKbdMouseOver=function(){b._IsActivatingKeymanWebUI= +1};a._VKbdMouseOut=function(){b._IsActivatingKeymanWebUI=0};a._VResizeMouseOver=a._VResizeMouseOut=function(d){d=b._GetEventObject(d);if(!d)return!1;d&&d.preventDefault&&d.preventDefault();var c=a.getRect();a.width=c.width;a.height=c.height;d.cancelBubble=!0;return!1};a._VResizeMouseDown=function(d){b._JustActivatedKeymanWebUI=1;d=b._GetEventObject(d);if(!d)return!0;a.resizing=1;var c,g;d.pageX?(c=d.pageX,g=d.pageY):d.clientX&&(c=d.clientX+document.body.scrollLeft,g=d.clientY+document.body.scrollTop); +a._ResizeMouseX=c;a._ResizeMouseY=g;document.onmousemove!=a._VResizeMouseMove&&document.onmousemove!=a._VMoveMouseMove&&(a._VPreviousMouseMove=document.onmousemove,a._VPreviousMouseUp=document.onmouseup);a._VPreviousCursor=document.body.style.cursor;a._VPreviousMouseButton="undefined"==typeof d.which?d.button:d.which;a._VOriginalWidth=a._DivVKbd.offsetWidth;a._VOriginalHeight=a._DivVKbd.offsetHeight;document.onmousemove=a._VResizeMouseMove;document.onmouseup=a._VResizeMoveMouseUp;document.body.style.cursor&& +(document.body.style.cursor="se-resize");d&&d.preventDefault&&d.preventDefault();d.cancelBubble=!0;return!1};a._VResizeMouseMove=function(d){var c,h,d=b._GetEventObject(d);if(!d)return!0;a.resizing=1;if(a._VPreviousMouseButton!=("undefined"==typeof d.which?d.button:d.which))return a._VResizeMoveMouseUp(d);d.pageX?(c=d.pageX,h=d.pageY):d.clientX&&(c=d.clientX+document.body.scrollLeft,h=d.clientY+document.body.scrollTop);c=a._VOriginalWidth+c-a._ResizeMouseX;h=a._VOriginalHeight+h-a._ResizeMouseY;c< +0.2*screen.width&&(c=0.2*screen.width);h<0.1*screen.height&&(h=0.1*screen.height);c>0.9*screen.width&&(c=0.9*screen.width);h>0.5*screen.height&&(c=0.5*screen.height);a._DivVKbd.style.width=c+"px";a._DivVKbd.style.height=h+"px";a._DivVKbd.style.fontSize=h/8+"px";g.showShim(a._DivVKbd,a.shim,a._DivVKbdHelp);d&&d.preventDefault&&d.preventDefault();d.cancelBubble=!0;return!1};a._VMoveMouseDown=function(d){var c,g;b._JustActivatedKeymanWebUI=1;d=b._GetEventObject(d);if(!d)return!0;a.resizing=1;d.pageX? +(c=d.pageX,g=d.pageY):d.clientX&&(c=d.clientX+document.body.scrollLeft,g=d.clientY+document.body.scrollTop);document.onmousemove!=a._VResizeMouseMove&&document.onmousemove!=a._VMoveMouseMove&&(a._VPreviousMouseMove=document.onmousemove,a._VPreviousMouseUp=document.onmouseup);a._VPreviousCursor=document.body.style.cursor;a._VPreviousMouseButton="undefined"==typeof d.which?d.button:d.which;a._VMoveX=c-a._Box.offsetLeft;a._VMoveY=g-a._Box.offsetTop;b.isCJK()&&(a.pinImg.style.left="15px");document.onmousemove= +a._VMoveMouseMove;document.onmouseup=a._VResizeMoveMouseUp;document.body.style.cursor&&(document.body.style.cursor="move");d&&d.preventDefault&&d.preventDefault();d.cancelBubble=!0;return!1};a._VMoveMouseMove=function(d){var c,h,d=b._GetEventObject(d);if(!d||a.noDrag)return!0;a.resizing=1;a.userPositioned=!0;a.pinImg.style.display="block";if(a._VPreviousMouseButton!=("undefined"==typeof d.which?d.button:d.which))return a._VResizeMoveMouseUp(d);d.pageX?(c=d.pageX,h=d.pageY):d.clientX&&(c=d.clientX+ +document.body.scrollLeft,h=d.clientY+document.body.scrollTop);a._Box.style.left=c-a._VMoveX+"px";a._Box.style.top=h-a._VMoveY+"px";a._DivVKbd?g.showShim(a._DivVKbd,a.shim,a._DivVKbdHelp):g.showShim(a._Box,a.shim);d&&d.preventDefault&&d.preventDefault();c=a.getRect();a.width=c.width;a.height=c.height;d.cancelBubble=!0;return!1};a._VResizeMoveMouseUp=function(d){d=b._GetEventObject(d);if(!d)return!0;a.resizing=0;a.currentKey=null;document.onmousemove=a._VPreviousMouseMove;document.onmouseup=a._VPreviousMouseUp; +document.body.style.cursor&&(document.body.style.cursor=a._VPreviousCursor);b._FocusLastActiveElement();d&&d.preventDefault&&d.preventDefault();b._JustActivatedKeymanWebUI=0;b._IsActivatingKeymanWebUI=0;a._DivVKbd&&(a._VOriginalWidth=a._DivVKbd.offsetWidth,a._VOriginalHeight=a._DivVKbd.offsetHeight);a.doResizeMove();d.cancelBubble=!0;a.saveCookie();return!1};a.userLocated=function(){return a.userPositioned};a.show=function(b){0parseInt(h.height,10)?"120%":"200%",a.lgKey=a.getSpecialKey(i, +"K_LOPT"),a.hkKey=a.getSpecialKey(i,"K_ROPT"),"iOS"==c.OS&&"phone"==c.formFactor&&a.adjustHeights());a.spaceBar=a.getSpecialKey(i,"K_SPACE")}h.display="block";a.showLanguage();if("desktop"==c.formFactor&&(h.position="absolute",h.display="block",h.left="0px",a.loadCookie(),0<=d?(h.left=d+"px",h.top=e+"px"):a.userPositioned?(h.left=a.x+"px",h.top=a.y+"px"):(f=b._ActiveElement,""!=a.dfltX?h.left=a.dfltX:"undefined"!=typeof f&&null!=f&&(h.left=g._GetAbsoluteX(f)+"px"),""!=a.dfltY)?h.top=a.dfltY:"undefined"!= +typeof f&&null!=f&&(h.top=g._GetAbsoluteY(f)+f.offsetHeight+"px"),a._Enabled=1,a._Visible=1,a._DivVKbd&&(a.width=a._DivVKbd.offsetWidth,a.height=a._DivVKbd.offsetHeight),a.saveCookie(),f=a.pinImg,"undefined"!=typeof f&&null!=f))f.style.display=a.userPositioned?"block":"none";"hidden"==h.visibility&&window.setTimeout(function(){a._Box.style.visibility="visible"},0);c.touchable||(h={},h.x=a._Box.offsetLeft,h.y=a._Box.offsetTop,h.userLocated=a.userPositioned,a.doShow(h))}};a.adjustRowLengths=function(b){if(!(0<= +b)){var e,f=a._DivVKbd.childNodes[0].childNodes;if(!(0>b||b>=f.length||f[b].aligned)&&"block"==f[b].style.display){e=a._DivVKbd.childNodes[0].offsetWidth-6;"Windows"==c.OS&&(e-=g.landscapeView()?4:40);var i,k=f[b].childNodes,l,r,q;for(i=0;i?~~~~~ "}), +a._GenerateVisualKeyboard(e,d,i)):(a.ddOSK=!1,e=g._CreateElement("DIV"),e.className="kmw-title-bar",e.appendChild(a._TitleBarInterior()),e.onmousedown=a._VMoveMouseDown,a._Box.appendChild(e),e=g._CreateElement("DIV"),e.className="kmw-osk-static",e.innerHTML=d,a._Box.appendChild(e),b._ActiveKeyboard.KHF&&b._ActiveKeyboard.KHF(a._Box));b._TitleElement&&(b._TitleElement.innerHTML=""+b._ActiveKeyboard.KN+" - "+b._TitleElement.innerHTML,b._TitleElement.className="", +b._TitleElement.style.color="#fff")}a.createKeyTip();d=a._Box.firstChild;e=" kmw-keyboard-"+(b._ActiveKeyboard?b._ActiveKeyboard.KI.replace("Keyboard_",""):"");"keymanweb_title_bar"==d.id&&(d=d.nextSibling);d.className="kmw-osk-inner-frame"+e;a.appendStyleSheet();a._Enabled&&a._Show()}};a.appendStyleSheet=function(){if(null!=b._ActiveStub){a.styleSheet&&g.removeStyleSheet(a.styleSheet);var d=b._ActiveStub,c=d.KFont,d=d.KOskFont;g.addFontFaceStyleSheet(c);g.addFontFaceStyleSheet(d);b.alignInputs(!1); +var f=a.addFontStyle(c,d);null!=b._ActiveKeyboard&&"string"==typeof b._ActiveKeyboard.KCSS&&(f+=b._ActiveKeyboard.KCSS);a.styleSheet=g.addStyleSheet(f);a.waitForFonts(c,d)&&b.alignInputs(!0)}};a.addFontStyle=function(a,c){var g=b.baseFont;"undefined"!=typeof a&&"undefined"!=typeof a.family&&(g=a.family);var f=b.appliedFont,f=f.replace(RegExp("s?"+g+",?"),""),f=f.replace(/,$/,""),f=""==f?g:g+","+f,g=".keymanweb-font{\nfont-family:"+f+" !important;\n}\n";"undefined"!=typeof c?g=g+".kmw-key-text{\nfont-family:"+ +c.family+";\n}\n":"undefined"!=typeof a&&(g=g+".kmw-key-text{\nfont-family:"+a.family+";\n}\n");b.appliedFont=f;return g};a._Unload=function(){a._VShift=a._DivVKbd=a._VKeySpans=a._Box=0};a.saveCookie=function(){var b=g.loadCookie("KeymanWeb_OnScreenKeyboard"),c=a.getPos();b.visible=a._Enabled?1:0;b.userSet=a.userPositioned?1:0;b.left=c.left;b.top=c.top;a._DivVKbd&&(b.width=a.width,b.height=a.height);g.saveCookie("KeymanWeb_OnScreenKeyboard",b)};a.loadCookie=function(){var b=g.loadCookie("KeymanWeb_OnScreenKeyboard"); if("undefined"==typeof b||null==b)return a.userPositioned=!1;a._Enabled=g.toNumber(b.visible,!0);a.userPositioned=g.toNumber(b.userSet,!1);a.x=g.toNumber(b.left,-1);a.y=g.toNumber(b.top,-1);var c=g.toNumber(b.width,0.3*screen.width),b=g.toNumber(b.height,0.15*screen.height);c<0.2*screen.width&&(c=0.2*screen.width);b<0.1*screen.height&&(b=0.1*screen.height);c>0.9*screen.width&&(c=0.9*screen.width);b>0.5*screen.height&&(c=0.5*screen.height);a._DivVKbd&&(a._DivVKbd.style.width=c+"px",a._DivVKbd.style.height= b+"px",a._DivVKbd.style.fontSize=b/8+"px");if(-1==a.x||-1==a.y||!a._Box)a.userPositioned=!1;a.xa.y&&(a.x=-1,a.y=-1,a.userPositioned=!1);a.userPositioned&&a._Box&&a.setPos({left:a.x,top:a.y});return!0};b.executePopupKey=function(c){if(!b._ActiveKeyboard)return!1;var c=c.replace("popup-",""),c=c.split("-"),e=1j)?k=String.fromCharCode(j):48<=j&&57>=j?k=i[e][0][j-48]:65<=j&&90>=j?k=String.fromCharCode(j+(e?0:32)):186<=j&&192>=j?k=i[e][1][j-186]:219<= -j&&222>=j&&(k=i[e][2][j-219]);k&&b.KO(0,g,k);return!0};b.touchMenuPos=function(){if(null==a.lgKey)return"";var b=g._GetAbsoluteX(a.lgKey)-g._GetAbsoluteX(a._DivVKbd)+a.lgKey.offsetWidth/2,c=g._GetAbsoluteY(a.lgKey)-g._GetAbsoluteY(a._DivVKbd);return b+","+c}})();(function(){var b=window.tavultesoft.keymanweb,f=b.osk,i=b.util,k=i.device;b.fullInitialization=!0;b.setDefaultDeviceOptions=function(a){""==a.attachType&&(a.attachType=k.touchable?"manual":"auto")};i.wait=function(a){var g=b.waiting;if(!("undefined"==typeof g||null==g||b.warned)){var c=g.firstChild.childNodes;a?(g.pending=!0,window.setTimeout(function(){g.pending&&(window.scrollTo(0,0),c[0].style.display="none",c[1].className="kmw-wait-text",c[1].innerHTML=a,c[2].style.display="block",g.style.display= +j&&222>=j&&(k=i[e][2][j-219]);k&&b.KO(0,g,k);return!0}})();(function(){var b=window.tavultesoft.keymanweb,f=b.osk,i=b.util,k=i.device;b.fullInitialization=!0;b.setDefaultDeviceOptions=function(a){""==a.attachType&&(a.attachType=k.touchable?"manual":"auto")};i.wait=function(a){var g=b.waiting;if(!("undefined"==typeof g||null==g||b.warned)){var c=g.firstChild.childNodes;a?(g.pending=!0,window.setTimeout(function(){g.pending&&(window.scrollTo(0,0),c[0].style.display="none",c[1].className="kmw-wait-text",c[1].innerHTML=a,c[2].style.display="block",g.style.display= "block")},1E3)):g.pending&&(c[1].innerHTML="",g.pending=!1,g.style.display="none")}};b.getStyleSheetPath=function(a){return i.getOption("resources")+"osk/"+a};b.getKeyboardPath=function(a){return(/^(([.]\/)|([.][.]\/)|(\/))|(:)/.test(a)?"":b.options.keyboards)+a};b.keyboardUnavailable=function(a){return window.setTimeout(function(){i.wait(!1);var g=b._KeyboardStubs[a],c=g.KN,g=g.KL,c=c.replace(/\s*keyboard\s*/i,"");i.alert("Sorry, the "+c+" keyboard for "+g+" is not currently available!",b.setDfltKeyboard); 02*a?c.focusNode.substringData(c.focusOffset- 2*a,2*a)._kmwSubstr(-a)._kmwSubstr(0,g):c.focusNode.substringData(0,c.focusOffset)._kmwSubstr(-a)._kmwSubstr(0,g)}else{if(c.setSelectionRange){if(c._KeymanWebSelectionStart)d=c._KeymanWebSelectionStart;else{if(null===b._CachedSelectionStart||c.selectionStart!==b._LastCachedSelection)b._LastCachedSelection=c.selectionStart,b._CachedSelectionStart=c.value._kmwCodeUnitToCodePoint(c.selectionStart),b._CachedSelectionEnd=c.value._kmwCodeUnitToCodePoint(c.selectionEnd);d=b._CachedSelectionStart}return d< a?c.value._kmwSubstr(0,d):c.value._kmwSubstring(d-a,d-a+g)}if(e&&(d=e.selection))return c=d.createRange(),c.moveStart("character",-2*a),c.text._kmwSubstr(-a)._kmwSubstring(0,g)}return""};b.alignInputs=function(a){if(k.touchable)for(var g=0;gj&&bk&&cj&&bk&&ca.id.indexOf("K_SPACE")&&0>a.id.indexOf("popup")){var c=a.firstChild,d=f.keytip, e=d.style;d.textContent=c.textContent;e.fontFamily=i.getStyleValue(c,"font-family");var h=i.getStyleInt(c,"font-size");0!=h&&(e.fontSize=1.5*h+"px");h=i._GetAbsoluteX(a);i._GetAbsoluteY(a);var j=a.offsetWidth,k=1.5*c.offsetWidth+i.getStyleInt(d,"padding-left")+i.getStyleInt(d,"padding-right"),l=i.getStyleInt(a,"margin-right"),c=1.5*c.offsetHeight+i.getStyleInt(d,"padding-top")+i.getStyleInt(d,"padding-bottom"),d=i.getStyleInt(a,"margin-top");e.left=h-l+(j-k)/2+"px";e.top=i._GetAbsoluteY(a)-d-f._Box.offsetTop- c+"px";e.display="block"}}else f.keytip.style.display="none"};b.handleRotationEvents=function(){"iOS"==k.OS&&i.attachDOMEvent(window,"orientationchange",b.rotateDevice);"Android"==k.OS&&(f.wasVisible=f.isVisible,"onmozorientationchange"in screen?i.attachDOMEvent(screen,"mozorientationchange",f.hideNow):i.attachDOMEvent(window,"orientationchange",f.hideNow),i.attachDOMEvent(window,"resize",function(){b.alignInputs(!0);f.hideLanguageList();f._Load();f.wasVisible&&f._Show()}))};b.rotateDevice=function(){f.hideLanguageList(); @@ -244,7 +244,7 @@ a+1};b.KCM=b.KCM=function(a,b,c,d){a=this.KC(a,d,b);if(!1!==a&&a===c)return!0;th b.code=a.Lcode;b.modifiers=a.Lmodifiers;return b};b.KDM=b.KDM=function(a,g,c){if(0==b._DeadKeys.length)return!1;a=b._SelPos(g)-a;for(g=0;ga?(g.value=g.value._kmwSubstring(0,f)+c+g.value._kmwSubstring(d),a=0):g.value=f