/* @license Copyright (C) Exontrol. All rights reserved. */ !function(){"use strict";function e(e){try{var t=window.innerWidth-j,o=parseInt(getComputedStyle(vsplit).width)+4,r=j;e=Math.max(0,Math.min(e,t-o)),list.style.width=W(e),content.style.width=W(t-(o+parseInt(list.style.width))),vsplit.style.height=content.style.height=list.style.height=W(window.innerHeight-r),n()}catch(e){}}function n(){}function t(){window.frameElement&&(window.frameElement.height=window.parent.innerHeight-58)}function o(){ne(F,me,!Filter.value)}function r(e){return(e=(null!=e?String(e):"").toLowerCase())&&"ex"!=e.substr(0,"ex".length)&&(e="ex"+e),e}function i(){return document.getElementById(be)}function a(e,n){return e.getElementsByTagName(n).item(0)}function l(e,n){function t(){C&&C.setExample(e.exsamp.sQ)}if(e&&e.exsamp){var o=i();o&&o==e||(c(!1),e.id=be,!I.Get(Ie)&&C&&(n?t():(clearTimeout(H),H=setTimeout(function(){t()},64))),e.parentElement.id&&e.exsamp.e&&(I.Set(Le,e.parentElement.id),I.Set(Oe,e.exsamp.e),I.Set(Ie,null),window.top.history.replaceState(null,null,I.href),ne(content,be)))}}function c(e){var n=i();n&&(n.removeAttribute(Ee),(e||null==e)&&(I.Set(Oe,null),I.Set(Ie,null),window.top.history.replaceState(null,null,I.href),ne(content,be,!0)))}function u(e,n,t){if(O&&clearTimeout(O),e&&e.scrollIntoView){var o={block:t=t||"nearest"};(n=null!=n?n:128)?O=setTimeout(function(){o.behavior="smooth",e.scrollIntoView(o),O=null},n):e.scrollIntoView(o)}}function s(e,n,t){e=Z(e);var o=_(e);return{q:e,p:function(e){var n,t=e instanceof HTMLLIElement?e.parentElement:e,o="";return t instanceof HTMLUListElement&&~(n=(o=t.previousElementSibling.innerText.toLowerCase()).indexOf("\n"))&&(o=o.substr(0,n).trim()),re+o}(t),e:o.o&&o.o.e&&o.o.e[0]||n||0,sQ:o}}function f(e){function n(e){!function(e,n){e&&e.exsamp&&(e.exsamp=s(J(e.exsamp.sQ.c,n,e.exsamp.sQ.o),e.exsamp.e,e),i()==e&&!I.Get(Ie)&&C&&C.setExample(e.exsamp.sQ),h(e.parentElement))}(this.parentElement.parentElement,this.innerHTML)}var t,o,r=i(),c=e.previousElementSibling.exname;return r&&r.parentElement!=e&&!confirm("You are about to add a copy of the selected question '"+r.exsamp.sQ.d+"' to a different component '"+c+"'. Is this really what you want to do?")||(o=Q.addLI(e,(r&&r.exsamp.q||Fe+oe+"o"+c).replace(Re,"$1"+function(){var n,t,o=e.children.length+1,r=e.lastChild;return r&&r.exsamp&&(n=r.exsamp.e)&&(t=n.match(ke))&&(o=n.replace(ke,1+~~t[0])),o}()+"$3").replace(Me,""),!0))&&(Ue&&(o.className=we,(t=a(o,"QDESC"))&&(t.setAttribute(se,le),t.oninput=n,t.onkeydown=function(e){if(13==e.keyCode)return C&&C.code.focus(),D(e)})),l(o),u(o),h(e)),o}function m(e){for(var n=e&&e.target;n;){if(n.tagName!=ie&&n.tagName!=ae||(n=n.parentElement),n&&Q.contains(n)&&"A"==n.tagName&&"LI"==n.parentElement.tagName)return n;n=n.parentElement}}function d(e){if(e&&e.exname){var n,t=e.exname,o=document.getElementById(r(e.exname));o&&o.children&&o.children.length&&(n=o.children.length-ee(o.getElementsByClassName(he)).length)&&(t+=""+n,n!=o.children.length&&(t+="/"+o.children.length),t+=""),e.innerHTML=t}}function h(e,n){ne(e,de,n),ne(e.previousElementSibling,de,n),!n&&g(e)}function p(e){return e?[e]:ee(Q.getElementsByTagName(Se))}function g(e){p(e).forEach(function(e){e.exblob&&(URL.revokeObjectURL(e.exblob),e.exblob=null)})}function w(e){var n,t=new Map,o=[];if(e){for(var r in z)t.set(r=(re+r).toLowerCase(),r);e.toLowerCase().split(" ").forEach(function(e){(e=function(e){if(e&&e.startsWith(re))for(var n in te)if(~te[n].indexOf(e)){e=n;break}return e}(e.trim()))&&(!n&&t.has(e)?n=e:~o.indexOf(e)||o.push(e))})}return(n||o.length)&&{c:n,f:o}||null}function x(e){function n(e){return e.exsamp.q}function t(e){ee(document.getElementsByClassName(he)).forEach(function(e){ne(e,he,!0)}),r&&Q.getElementsByTagName(Qe).forEach(function(n){n.exsamp&&!((!r.c||n.exsamp.p==r.c)&&function(e){for(var n=!0,t=0,o=r.f.length;n&&t"}function E(e,n,t){var o="",r=0,i=-1,a=n.length;if(a)for(;~(i=e.indexOf(n,r));)o+=e.substr(r,i-r)+t,r=i+a;return o+=e.substr(r)}function b(e,n){var t="";return e.children.forEach(function(e){if(!~e.className.indexOf(xe)&&e.exsamp&&(t+=t?oe:"",t+=e.exsamp.q,n))for(var o=e.exsamp.q,r=0,i=o.length;!n.c&&r255&&(n.c=o.charAt(r),n.li=e)}),function(e){return B&&B.forEach(function(n,t){e=E(e,n,v(t))}),e}(t).replace(/\n/g,"\r\n")}function y(e){p(e).forEach(function(e){~e.className.indexOf(de)&&function(e){function n(e){var n=this.parentElement.nextElementSibling;this.remove(),e&&n&&h(n,!0)}var t,o=e.previousElementSibling;o&&o.exname&&(ee(o.getElementsByClassName(pe)).forEach(function(e){n.call(e)}),g(e),e.exblob=URL.createObjectURL(new Blob([b(e)],{type:"text/plain"})),(t=document.createElement(ye)).href=e.exblob,t.download=e.id+ce,t.className=pe,t.onclick=n,o.appendChild(t))}(e)})}function S(){document.getElementsByClassName(de).length&&(k||!Ue||confirm("Do you want to save the changes?"))&&(k=!0,y(),Ue&&function(e){var n,t,o,r,i,a=window.top.location;if("file:"==a.protocol&&(n=a.pathname.substr(1,a.pathname.lastIndexOf("/")))){for(var c={},s=p(e),f=0,m=s.length;!i&&fl;)c=l,l=t+oe.length,u++;n=a.substr(c,i-c),c=i-c,r=e.getBoundingClientRect(),o=getComputedStyle(e),e.scrollLeft=function(e,n){var t=document.createElement("canvas").getContext("2d");return t.font=n,t.measureText(e)}(n,o.font).width-r.width/2,e.scrollTop=parseInt(o.lineHeight)*u-r.height/2}(C.code))},128)}):t&&((o=new XMLHttpRequest).onreadystatechange=function(){this.readyState==(XMLHttpRequest.DONE||4)&&(~this.response.indexOf(Ne)?ee(Q.getElementsByClassName(de)).forEach(function(e){ne(e,de,!0)}):R||(R=!0,alert("\n\nThe 'localhost-upload.py' server is not running or the file contains non-ANSI characters. Start the server and ensure only ANSI characters are used to allow changes to be saved with CTRL + S.\n\nYou can still press CTRL + S to run the script after making changes.")))},o.open("POST","http://localhost:6798/"),o.send(t))}}())}function T(e,n){function t(e){return e&&(e.nextElementSibling||e.parentElement.nextElementSibling&&e.parentElement.nextElementSibling.nextElementSibling&&e.parentElement.nextElementSibling.nextElementSibling.firstElementChild)}function o(e){return e&&(e.previousElementSibling||e.parentElement.previousElementSibling&&e.parentElement.previousElementSibling.previousElementSibling&&e.parentElement.previousElementSibling.previousElementSibling.lastElementChild)}for(var r=-1==e||2==e?o:t,i=function(e,n){var r;return-2==e||2==e?(r=Q.getElementsByTagName(Qe))&&r.length&&(-2==e?r.item(0):r.item(r.length-1))||null:-1==e?o(n):t(n)}(e,n);i&&~i.className.indexOf(he);)i=r(i);return i}function L(){return(new Date).getTime()}function N(){function e(){var e="Runs in: "+function(e){function n(e,n){var o=1==e?t:t%e;return t=~~(t/e),o?o+n:""}for(var t=e,o=[n(1e3," ms"),n(60," sec"),n(60," min"),n(24," hour"),n(1," day")],r="",i=o.length-1;i>=0;i--)o[i]&&(r+=(r?" ":"")+o[i]);return r}(L()-s);a&&a.onTestAll&&a.onTestAll("end");var n,t=window.extnfo,o=e;t&&(t.err&&(e+="\nError(s): "+(t.err||0)),t.run&&(e+="\nRun for: "+(t.run||0)+" times"),t.rel&&(e+="\nReplace path for: "+(t.rel||0)+" times"),t.occ&&(e+="\nUnique replace path for: "+t.occ.size+" times"),o=e,t.occ&&t.occ.forEach(function(e,n){o+="\n "+n}),n="\nChecksum: "+((t.run||0)*(t.run||0)+(t.rel||0)+1)*((t.err||0)+1)*((t.occ&&t.occ.size||0)+1)%256,e+=n,o+=n),setTimeout(function(){alert(e),console.log("--------------------------------"),console.log(o),console.log("--------------------------------")},128),window.exttsa=null}function n(){clearTimeout(t),t=setTimeout(function(){Pe?e():(l(r,!0),u(r,0),window.extnfo=window.extnfo||{},window.extnfo.run=(window.extnfo.run||0)+1,(r=T(1,r))?n():e())},c)}var t,o,r=i(),a=C&&C.code,c=64,s=L();if(!r&&(o=Q.getElementsByTagName(Se)))for(var f=0,m=o.length;!r&&f/,qe=/(?:.*\s*){2}/m,Fe="//e://t://k://Sample",Ue=comrun.isLocal(),De=comrun.isLocal("testAll"),Pe=!1,Ve="AddTreeView,RemoveTreeView,TreeView,TreeColumnIndex".split(",");window.onload=function(){function n(){function e(e,n){var t,o=i.get(e.toLowerCase());o&&(t=document.getElementById(r(n)))&&Q.addUL(n.toLowerCase(),function(t){return t=function(e,n,t,o){var r="",i=0,a=-1,l=n.length;if(l)for(;~(a=e.indexOf(n,i));)r+=e.substr(i,a-i)+(o(a,n)?t:n),i=a+l;return r+=e.substr(i)}(t,e,n,function(e,n){function o(e){return/['"]/.test(e)}function r(e){return/\s|[\[\](){};,]/.test(e)||o(e)}for(var i,a=!0,l=e,c=e+n.length,u=t.length;l-1>0&&!r(t.charAt(l-1));)l--;for(l>0&&o(t.charAt(l-1))&&l--;co.clientWidth-18)&&o.exname?f(o.nextElementSibling):o.exsamp?t?confirm("You are about to delete '"+o.exsamp.sQ.d+"'. Is this really what you want to do?")&&function(e){if(e&&e.exsamp){var n=e.parentElement,t=n.previousElementSibling,o=i();e.remove(),d(t),!o&&window.top.history.replaceState(null,null,I.Set(Oe,null).href),ne(content,be,o),h(n),Ue&&(e=function(e){for(var n=e.lastElementChild;n&&~n.className.indexOf(he);)n=n.previousElementSibling;return n}(n))&&ne(e,we)}}(o):l(o):o.className.indexOf(pe)<0&&(o==Q||!function(e){for(;e;){if(e.exsamp)return!0;e=e.parentElement}}(o))&&(c(),o.exname&&window.top.history.replaceState(null,null,I.Set(Le,r(o.exname)).href)))})},Q.onkeydown=function(e){if(document.activeElement==Q){var n=0,t=e.keyCode,o=i();if(36==t&&(n=-2),38==t&&(n=-1),40==t&&(n=1),35==t&&(n=2),n)return e.altKey?Filter.focus():(l(o=T(n,o)||function(){var e,n,t=T(-2);if(t)for(n=t.offsetTop;t&&t.offsetTop-n'+r.exsamp.e+""+function(e){var n=He.exec(e);return n&&(e=e.substr(0,n.index).trim()),e}(r.exsamp.sQ.d)+"",e.insertBefore(r,o),t&&d(e.previousElementSibling),r},Q.addUL=function(e,n,t){function o(n){if(!c){var o=document.createElement(Te);o.exname=e,Ue&&(o.className=ge),(c=document.createElement(Se)).id=l,Q.insertBefore(c,function(e){for(var n=null,t=Q.getElementsByTagName(Se),o=0,r=t.length;ot.item(o).id;o++)n=t.item(o);return n&&n.nextElementSibling||null}(l)),Q.insertBefore(o,c),d(o)}if(n=Z(n))return Q.addLI(c,n,null,t)}if(e){var i,a=-1,l=r(e),c=document.getElementById(l);return Y(Re,n,function(e){~a&&(i=o(n.substr(a,e.index-a))||i),a=e.index}),i=o(n.substr(a))||i,Ue&&i&&!~i.className.indexOf(xe)&&ne(i,we),c}},Filter.oninput=function(){clearTimeout(M),M=setTimeout(function(){x(Filter.value||"")},256)},Filter.onkeydown=function(e){if(38==e.keyCode||40==e.keyCode)return Q.focus(),!1},Q.style.background="url(https://exontrol.com/images/wait.gif) no-repeat center",C=content.contentWindow,I=new U(function(){var e="";return P(function(){e=window.top.location.href},window),e}()),(A=new U(I.o.host)).Set("config","/js"),t(),Be=~~((~~V(fe)||Be+1)-1),o(),e(Be),document.getElementsByClassName(ve).forEach(function(e){(B=B||new Map).set(e.id,E(e.innerHTML,"-x_yz2","").trim())}),n()},window.onpointerdown=window.onmousedown=function(e){var n=function(e){var n=e&&e.target;if(n.tagName==ie)return n}(e);if((!n||n.getAttribute(se)!=le)&&m(e))return D(e)},window.onclick=function(e){var n=m(e);if(n)return l(n.parentElement),D(e)},window.onbeforeunload=function(){g(),G(fe,Be+1)},window.onresize=function(){t(),e(Be),n()},window.onkeydown=function(e){var n=!1;switch(e.keyCode){case 83:(n=e.ctrlKey)&&S();break;case 27:Pe=!0;break;case 13:(n=De&&e.shiftKey&&e.ctrlKey)&&N()}if(n)return D(e)},window.onexample=function(e){var n,t,o=e,r=i();r&&r.exsamp.q!=o&&(r.exsamp=s(o,0,r),(n=a(r,ae))&&(n.innerHTML=r.exsamp.e),(t=a(r,ie))&&(t.innerHTML=r.exsamp.sQ.d),h(r.parentElement)),S()},window.setError=function(e,n,t,o){e&&(Pe=!0)},window.testAll=N}();