"Z"))return u=1,l;for(u=0,i=Ye[l];i&&(l=s.shift());)i=i[l];return i&&i._extend?o?i=Ue(i._extend(o)):n[e]=i=Ue(i._extend()):n[e]=i=null,i}function a(e,t,r){for(var n=t.length,i=r;i=1){var l,u,p=o[0],c=0,f=!1;Array.isArray(p)?(c=o.length-1,l=p[0],u=p[1]):(l=p,u=o[1]),u||(f=!0,u={});var h=!1,d=void 0===l?"undefined":ze(l);if("string"==d){var g=l[0];if(g>="A"&&g<="Z"||l.indexOf(".")>=0){console.log("warning: unknown react class ("+l+")");continue}}else if(dt(l))h=!0;else if("function"!=d){console.log("warning: unknown react class");continue}if(c){var v=[];a(v,o,1),h?e.push(ft(l,u,v)):e.push(ht(l,u,v))}else h?e.push(f?l:ft(l,u)):e.push(ht(l,u))}}else e.push(ht(o));else e.push(o)}}}var s,l,u=0,p=t[0],c=0,f=!1;if(Array.isArray(p)?(c=t.length-1,s=p[0],l=p[1]):(s=p,l=t[1]),l||(f=!0,l={}),!s){var h=l.html||[];if(h.length>0){var d=document.createElement("div");d.innerHTML=h.join("");for(var g=[],v=r.push(g)-1,y=0;P=d.children[y];y+=1)g.push(P);return e.push(ht("div",{className:"rewgt-static",name:v+""})),!0}return!1}var _="";i&&l.key&&(_=i+"."+l.key);var m="RefDiv"===s||"RefSpan"===s?s:"";if(m)return e.push(ht(o(m,_),l)),!1;var b=o(s,_);if(!b){var w="string"==typeof s?" ("+s+")":"";return console.log("warning: can not find template"+w),!1}if(u>0)if(c>0){var k=[];a(k,t,1),3==u?e.push(ft(b,l,e)):e.push(ht(b,l,k))}else 3==u?e.push(f?b:ft(b,l)):e.push(ht(b,l));else{var O=[b,l];if(c>0){for(var x,P,S=!1,y=1;P=t[y];y+=1)Array.isArray(P)?Z(O,P,r,n,_)&&(S=!0):dt(P)?O.push(P):"string"==(x=void 0===P?"undefined":ze(P))?O.push(ht(yr,{"html.":P})):"function"==x&&O.push(ht(P));S&&(O[1]=Object.assign({},l,{"hasStatic.":!0}))}e.push(ht.apply(null,O))}return!1}function Q(e,t){var r=e.widget;if(r){var n=e.$gui,i=n.cssWidth,o=n.cssHeight,a=!!t;if(("number"==typeof i||"number"==typeof o)&&(n.isPanel||!([].concat(e.state.margin,e.state.padding).indexOf(null)>=0))){var s=0;n.comps.forEach(function(e){if(e){var t=b(e),n=t&&r[t];if(n=n&&n.component){if(n.willResizing&&!n.willResizing(i,o,a))return;s||(s=p()),n.setState({parentWidth:i,parentHeight:o,id__:s})}}})}}}function ee(e,t,r){function n(){setTimeout(function(){ot=!1},300),r&&r()}if(qe.__design__){var i=[],o=[],a={};if(Z(i,t,o,a),1==i.length){ot=!0;var s=i[0];Ve.unmountComponentAtNode(e),e.style.visibility="hidden",e.innerHTML="",setTimeout(function(){Ge.widgetNum(0),nt=null,at=!1,it=!0,st=[],qe.$cachedClass=a,qe.$staticNodes=o,Ve.render(s,e,function(){e.style.visibility="visible";var t=qe.$main.$$onLoad_;"function"==typeof t&&t(n)})},0)}else r&&r()}else r&&r()}function te(e,t,r){function n(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(//g,">")}t=t||0;var i,o,a,s=e[0],l=0;Array.isArray(s)?(l=e.length-1,i=s[0],o=s[1],a=s[2]):(i=s,o=e[1],a=e[2]),"number"!=typeof a&&(a=1);var u=new Array(t+1).join(" "),p=u;if(!i){var c=o.html||[],f=r<=1?"":"",h=r<=1?"
":"";return 0==c.length?p="":1==c.length?p+=f+c[0]+h+"\n":(p+=f+"\n",c.forEach(function(e){p+=u+" "+e+"\n"}),p+=u+h+"\n"),p}var d=!1;"RefDiv"==i?(!0,d=o["isPre."],l=0,p+=(d?""+y.slice(u.length+2):p+=">"+y:p+=">\n"+y}else p+=">",v&&(p+=d?v:v.replace(/&/g,"&").replace(//g,">"));return d?p+="
\n":3==a?y&&"\n"==y.slice(-1)?p+=u+"\n":p+="\n":v||"\n"!=p.slice(-1)?p+="\n":p+=u+"\n",p}function re(e,t){var r=e.component;if(!r)return null;for(var n in r.$gui.compIdx){var i=e[n],o=i&&i.component;if(o)if(o.props["isNavigator."]){var a=o.$gui.navItems,s=a&&a[t];if(s&&s.props["isPlayground."])return i}else if(!o.props["childInline."]&&(i=re(i,t)))return i}return null}function ne(e,t){if(!t)return[];var r=b(e),n=r&&t[r];if(n){var i=[];return(n=n.component)?(n.$gui.comps.forEach(function(e){e&&i.push(e)}),i):i}return gt(e.props.children)}function ie(e){var t=e,r=t.indexOf("./"),n=t[0],i=0,o=!1;if(0==r)i=1,t=t.slice(2);else if(1==r&&"."==n)for(i=2,t=t.slice(3);0==(r=t.indexOf("../"));)i+=1,t=t.slice(3);else if("."==n)i=-1,t=t.slice(1);else if("/"==n){if("/"===t[1])return[t.slice(2),-1,!0];i=-1,t=t.slice(1)}else o=!0;return t.indexOf("/")>=0?(Ge.instantShow("error: invalid reference path ("+e+")."),null):[t,i,o]}function oe(e,t){function r(e){return(e=e&&e.component)||(console.log("warning: can not find widget ("+t+")."),null)}var n=ie(t);if(!n)return null;var i=n[0],o=n[1];if(n[2]){var a=l=e.widget;if(o<0&&(a=l&&l.parent),a){for(var s=i.slice(0,2);"//"==s;){if(!(a=a.parent))return r(null);s=(i=i.slice(2)).slice(0,2)}return r(i?a.W(i):a)}}else if(-1==o){if(i)return r(qe.W(i))}else{for(var l=e.widget;l&&o>0;){var u=l&&l.component;if(u&&u.props["isNavigator."]&&0==(o-=1))break;var p=l.parent;if(!p){o-=1,l=qe;break}l=p}if(l&&0==o)return r(i?l.W(i):l)}return r(null)}function ae(e){this.comps={},this.element=e,this.pathSeg=""}function se(e,t,r){function n(e,t,r){var n=ie(t);if(!n)return i(null,t);var a=n[0],s=n[1],l=e instanceof ae;if(n[2]){if(l)return i(null,t);if(s<0&&(p=e.widget)){for(var u=a.slice(0,2);"//"==u;){if(!(p=p.parent))return i(null,t);u=(a=a.slice(2)).slice(0,2)}return void o(p,a,t,!1)}}else{if(-1==s)return void o(null,a,t,!1);var p=e;if(l){var c=(p=e.element).props["hookTo."],f=!1;for(c||(c=(c=p.widget)&&c.parent);p&&s>0&&c;){if(!(c instanceof ae)){if(Array.isArray(c)){if(r)return i(null,t);p=c.component,f=!0;break}return i(null,t)}if(r){if(!(n=c.comps[r]))return i(null,t);var h=n[0];if(4==h)(r=n[2])||(p=c.element,r=c.pathSeg,(c=p.props["hookTo."])||(c=(c=p.widget)&&c.parent));else{if(3!=h)return i(null,t);if(0==(s-=1))return void o(c,a,t,!0,r);r=n[2]}}else p=c.element,r=c.pathSeg,(c=p.props["hookTo."])||(c=(c=p.widget)&&c.parent)}if(!p||!c||!f)return i(null,t)}for(p=p.widget;p&&s>0;){var d=p&&p.component;if(d&&d.props["isNavigator."]&&0==(s-=1))break;var g=p.parent;if(!g){s-=1,p=qe;break}p=g}if(p&&0==s)return void o(p,a,t,!1)}i(null,t)}function i(n,i){if(!n)return Ge.instantShow("error: can not find reference ("+i+")."),void r();s?n.props["childInline."]||Ge.instantShow("warning: reference target ("+i+") should be inline widget."):f(n.props.className,["rewgt-panel","rewgt-unit"])||Ge.instantShow("warning: reference target ("+i+") should be: panel, div, paragraph.");var o=e.$gui,a=t.slice(1),c=null,h=o.compIdx[t];if("number"==typeof h){c=o.comps[h];var d=o.compIdx[a];"number"!=typeof d?c&&(o.compIdx[a]=h,delete o.compIdx[t],o.removeNum+=1):(h=d,o.removeNum+=1)}if(!c)return Ge.instantShow("error: invalid linker ("+t+")."),void r();l.unshift(c.props);var g={},v={},y=0;n.props.style&&(Object.assign(v,n.props.style),y+=1);for(var _=l.pop();_;){var m=w(_);m.style&&(Object.assign(v,m.style),y+=1),Object.assign(g,m),_=l.pop()}y&&(g.style=v),g["hookTo."]=e.widget,s?g["data-span.path"]=u:g["data-unit.path"]=u;var b=c.props.styles;if(b&&(g.styles=b),qe.__design__){var k={};g["link.props"]=Object.assign(k,w(c.props)),b&&(k.styles=b)}var O=parseInt(a),x=O+""===a?O:a;g.key=a,g["keyid."]=x,o.comps[h]=ft(n,g),e.setState({id__:p()},function(){var t=e.widget[x];(t=t&&t.component)&&de(t),r()})}function o(e,t,r,o,a){var u;if(e){if(!t){if(o)return i(e.element,r);var p=e.parent,c=e.component;return p=p&&p.component,p&&c&&"number"==typeof(w=p.$gui.compIdx[c.$gui.keyid])?i(c.fullClone(),r):i(null,r)}u=t.split(".")}else{if(!t||o)return i(null,r);if((u=t.split(".")).length<=1)return i(null,r);if(!(e=qe[u.shift()]))return i(null,r)}for(;e&&u.length;){var f=u.shift();if(!f)return i(null,r);var h=null,d=null,g="";if(o){if(qe.__design__)return i(null,r);d=e,a?(g=a,u.unshift(f)):g=f}else{if(!(h=e.component)&&(e===qe&&((e=qe[f])&&(h=e.component),f=u.shift()),!h||!f))return i(null,r);if((!qe.__design__||h.isLibGui)&&h.props["isTemplate."]){if(!(d=h.$gui.template))return i(null,r);g=f,h=null}}if(d){for(var v=d.comps[g];v;){var y=v[0],_=v[1];if(2==y){if(0!=u.length)break;var m=2==(O=_.props)["isReference."],b=O.$;if(O["hookTo."]===d&&"string"==typeof b){if(!(b=b.trim()))return i(null,b);if(s!=m&&Ge.instantShow("warning: reference type ("+r+") mismatch."),"/"==b[0]&&"/"==b[1]){if(b.indexOf("/",2)>=0)return i(null,b);(u=g.split(".")).pop(),g=u.join("."),u=b.slice(2).split("."),g&&(g+="."),g+=u.shift(),v=d.comps[g],l.push(O);continue}return l.push(O),void n(d,b,v[2])}break}if(4==y&&(_=(d=_).element),0==u.length)return i(_,r);4==y?g=u.shift():g+="."+u.shift(),v=d.comps[g]}return i(null,r)}if(0==u.length){var w=h.$gui.compIdx[f];if("number"==typeof w){var k=e[f];return k=k&&k.component,k?i(k.fullClone(),r):i(null,r)}if("number"==typeof(w=h.$gui.compIdx["$"+f])&&(_=h.$gui.comps[w])&&_.props["isReference."]){var O=_.props,m=2==O["isReference."];if("string"==typeof(b=O.$))return(b=b.trim())?(s!=m&&Ge.instantShow("warning: reference type ("+r+") mismatch."),l.push(O),void n(h,b,"")):i(null,b)}return i(null,r)}e=e[f]}i(null,r)}var a,s=!1,l=[],u="",c=e.$gui.compIdx[t];if(e.widget&&"number"==typeof c&&"$"==t[0]&&(a=e.$gui.comps[c])&&a.props["isReference."]){var h=a.props;2==h["isReference."]&&(s=!0),"string"!=typeof(u=h.$)||0==(u=u.trim()).length?(""!==u&&console.log("warning: load reference ("+t+") failed: invalid path"),r()):u?n(e,u,""):i(null,u)}else console.log("warning: load reference ("+t+") failed."),r()}function le(e){function t(e){e.target.style.opacity="0.1"}function r(e){e.target.style.opacity="0"}var n=this.pageIndex=0,i=this.keys=[],o=this.namedPage={};e.forEach(function(e,t){i.push(e[0]+"");var r=e[1],a=t==n?"block":"none";r.state.style.display!==a&&(r.duals.style={display:a});var s=r.props.name;s&&"string"==typeof s&&(o[s]=t)});var a=window.innerWidth,s=Math.max(Math.floor(a/20),20),l=document.createElement("div");l.setAttribute("style","position:absolute; left:0px; top:0px; width:"+s+"px; height:100%; background-color:#000; opacity:0; z-index:3000;"),document.body.appendChild(l);var u=document.createElement("div");u.setAttribute("style","position:absolute; right:0px; top:0px; width:"+s+"px; height:100%; background-color:#000; opacity:0; z-index:3000;"),document.body.appendChild(u),this.leftPanel=l,this.rightPanel=u;var p=this;l.onclick=function(e){p.prevPage()},u.onclick=function(e){p.nextPage()},l.onmouseover=t,l.onmouseout=r,u.onmouseover=t,u.onmouseout=r}function ue(){var e=[],t=nt&&nt.component;return t&&(t.$gui.comps||[]).forEach(function(t){if(t){var r=b(t),n=r&&nt[r];(n=n&&n.component)&&n.props["isScenePage."]&&(!qe.__design__&&n.props.noShow||e.push([r,n]))}}),e}function pe(e){if(!Array.isArray(e))return"number"==typeof e?[e,e,e,e]:[0,0,0,0];var t=e.length;if(0==t)return[0,0,0,0];if(1==t)return[r=parseFloat(e[0])||0,r,r,r];if(2==t)return[r=parseFloat(e[0])||0,n=parseFloat(e[1])||0,r,n];if(3==t)return[r=parseFloat(e[0])||0,n=parseFloat(e[1])||0,i=parseFloat(e[2])||0,n];var r=parseFloat(e[0])||0,n=parseFloat(e[1])||0,i=parseFloat(e[2])||0;return[r,n,i,parseFloat(e[3])||0]}function ce(e){if(!Array.isArray(e))return"number"==typeof e?[e,e,e,e]:null===e?[null,null,null,null]:[0,0,0,0];var t=e.length;if(0==t)return[0,0,0,0];if(1==t)return r=null===(r=e[0])?null:parseFloat(r)||0,[r,r,r,r];if(2==t){var r=e[0],n=e[1];return r=null===r?null:parseFloat(r)||0,n=null===n?null:parseFloat(n)||0,[r,n,r,n]}if(3==t){var r=e[0],n=e[1],i=e[2];return r=null===r?null:parseFloat(r)||0,n=null===n?null:parseFloat(n)||0,i=null===i?null:parseFloat(i)||0,[r,n,i,n]}var r=e[0],n=e[1],i=e[2],o=e[3];return r=null===r?null:parseFloat(r)||0,n=null===n?null:parseFloat(n)||0,i=null===i?null:parseFloat(i)||0,o=null===o?null:parseFloat(o)||0,[r,n,i,o]}function fe(e,t,r,n){if("number"!=typeof n)return null;var i,o,a=n,s=e.$gui;if(e.state?(i=e.state.sizes,o=parseFloat(e.state.cellSpacing)||0):(i=e.props.sizes,o=parseFloat(e.props.cellSpacing)||0),Array.isArray(i)){for(var l=i.length,u=0;u=0&&(a-=h>=1?h:h>=.9999?n:h*n)}return a-=o*l,a<0?null:a}for(var p=s.comps,l=p.length,u=0;u=0&&(a-=h>=1?h:h>=.9999?n:h*n),a-=r?(f[1]||0)+(f[3]||0):(f[0]||0)+(f[2]||0)}}return a<=0?null:a}function he(e){e.popDesigner=G,e.saveDesigner=X,e.dumpTree=Y,e.loadTree=ee,e.streamTree=te,e.listScenePage=ue,e.keyOfNode=function(e){return u(e)},e.splitterMouseDn=function(){return lt}}function de(e,t){var r=e.getHtmlNode();if(r){for(var n=[],i=r.querySelectorAll(".rewgt-static"),o=0;l=i[o];o++){for(var a=l.parentNode,s=!1;a&&a!==document;){if(a===r){s=!0;break}if(a.classList.contains("rewgt-static"))break;a=a.parentNode}if(s){p=(c=l.getAttribute("name")||void 0)&&parseInt(c);if(!isNaN(p)){if(l.children.length>0){if(!(t&&p>=1048576))continue;l.innerHTML=""}n.push([p,c,l])}}}for(var l,o=0;l=n[o];o++){var u,p=l[0],c=l[1],f=l[2],h=p>=1048576;if(h){var d=e.$gui.statics;u=d&&d[c]}else u=qe.$staticNodes[p];if(Array.isArray(u))for(var g,v=0;g=u[v];v++)f.appendChild(h?g:g.cloneNode(!0))}}}function ge(e,t,r){function n(){r&&r()}var i=e.widget;if(!i)return n();var o=!1,a=e.$gui,s=a.cssWidth,l=a.cssHeight,u=a.useSparedX;if(u){var c=fe(e,i,!0,s);a.sparedX!==c?(a.sparedX=c,"number"==typeof c&&(o=!0)):t&&(o=!0)}else if(a.useSparedY){var f=fe(e,i,!1,l);a.sparedY!==f?(a.sparedY=f,"number"==typeof f&&(o=!0)):t&&(o=!0)}if(!o)return n();if("number"!=typeof s&&"number"!=typeof l)return n();var h=[];a.comps.forEach(function(e){if(e){var t=b(e);if(t){var r=i[t];if(r=r&&r.component){var n=u?r.state.width:r.state.height;"number"==typeof n&&n<0&&h.push(r)}}}}),h.length&&setTimeout(function(){var e=Ge.dragInfo.inDragging;h.forEach(function(t){t.willResizing&&!t.willResizing(s,l,e)||t.setState({parentWidth:s,parentHeight:l,id__:p()})})},0),n()}function ve(e,t){var r=!1;if(e){var n=void 0===e?"undefined":ze(e);if("string"==n)e=[e],r=!0;else if("object"==n)if(Array.isArray(e)){var i;"string"==typeof e[0]&&"object"==ze(i=e[1])&&"string"!=typeof i.$trigger&&(e=[e]),r=!0}else"string"==typeof e.$trigger&&(e=[e],r=!0)}if(!r)throw new Error("invalid trigger data (key="+this.$gui.keyid+")");this.state.trigger=e}function ye(e){var t=e.$gui;if(t.isPanel)return console.log("warning: panel not support virtual widget"),null;var r=t.comps,n=r.length,i=t.keyid+"",o=e.props["data-rewgt-owner"];o&&(i=o+"."+i);for(var a=0;a=0&&dt(i=r[o])){if(o>=1&&"foo"!==b(i))for(var s=o-1;s>=0;){var l=r[s];if(dt(l)&&"foo"===b(l)){var u=r.slice(0,s);(f=me(l,t))&&u.push(f);for(var p=s+1;p<=o;p++)u.push(r[p]);return n?(u.unshift(n,{}),ft.apply(null,u)):u}s-=1}var c=r.slice(0,-1),f=me(i,t);return f&&c.push(f),n?(c.unshift(n,{}),ft.apply(null,c)):c}return n?ft.apply(void 0,[n,{}].concat(a(t))):null}function be(e){return e.hasOwnProperty("prototype")}function we(e,t){Array.isArray(e)&&function(e,t,r){for(var n=[],i=[],o=t.length-1;o>=0;o--){var a=t[o];if(Array.isArray(a)){var s=a[0],l=a[1];if(s&&"string"==typeof s&&l)if("string"==typeof l)l=a[1]=ht(Jt,{key:s,"keyid.":s,"html.":l}),n.unshift(s),i.unshift(l);else if(dt(l))l.props["keyid."]!==s&&(l=a[1]=ft(l,{key:s,"keyid.":s})),n.unshift(s),i.unshift(l);else{if(Array.isArray(l)&&l[0]&&(l=Ge.loadElement(l))){l.props["keyid."]!==s&&(l=ft(l,{key:s,"keyid.":s})),a[1]=l,n.unshift(s),i.unshift(l);continue}t.splice(o,1)}else t.splice(o,1)}}if(!qe.__design__){for(var u=[],o=r.length-1;o>=0;o--)s=(a=r[o])[0],n.indexOf(s)<0&&u.unshift("-"+s);(u=u.concat(i)).length&&setTimeout(function(){e.setChild.apply(e,u)},0)}}(this,e,t)}function ke(e,t,r){return function(e){function a(e,i){o(this,a);var s=n(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,e||t,i));return r&&(s._htmlText=!1),s}return i(a,e),Le(a,[{key:"getDefaultProps",value:function(){var e=Fe(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"getDefaultProps",this).call(this);return e["tagName."]=t.toLowerCase(),e}}]),a}(e)}function Oe(e){e.stepPlay=function(e){if(this.isHooked){var t=this.getHtmlNode();if(t&&t.readyState>=2)return t.play(),!0}return!1},e.stepPause=function(e){if(this.isHooked){var t=this.getHtmlNode();if(t)return t.paused||t.pause(),!0}return!1},e.stepIsDone=function(){if(!this.isHooked)return!0;var e=this.getHtmlNode();return!e||e.readyState<2||e.paused}}function xe(e,t,r){function n(t,r){if(t||0===t){var n=e.widget;if(n=n&&n[t],(n=n&&n.component)&&n.navWillLeave){var i=n.navWillLeave();if(!i||"string"==typeof i&&!window.confirm(i))return!0}}return!1}function i(t,r){e.state.checkedId=r,F(e,"checkedId",t)}var o=e.$gui;if(t&&o.compState){var a=o.navSubkey,s=e.state.checkedId;if(o.navItems[t]){if(!n(s,t))return i(s,t),void e.reRender(r)}else if(a){var l=e.widget,u=l&&l[a];if((u=u&&u.component)&&u.props["isNavigator."]&&!n(s,t))return i(s,t),void u.fireChecked(t,r)}e.state.checkedId=t}r&&r()}function Pe(e,t){if(z(e),e["hide."])return null;var r=e.state["tagName."];if(!r)return ye(e);var n=!1,i=void 0,o=e.parentOf(!0);o&&o.props["isNavigator."]&&(i=o.state.checkedId||"",n=!0);var a=e.prepareState(),s=Object.assign({},e.state.style);n&&(i&&i==e.$gui.keyid?s.display="block":s.display="none");var l=a.length,u=e.$gui.insertEle;u&&(a=me(u,a),l=!0),l||2!=t||(a=e.state["html."]||null);var p=k(e,s);return ht(r,p,a)}function Se(e){var t=e.widget;for(t=t&&t.parent;t;){var r=t.component;if(!r)break;if(r.props["isNavigator."])return r;t=t.parent}return null}function $e(e,t,r,n){if("string"==typeof t.path&&(t.state||(t.state={opened:!1}),r?(delete r.state,t=Object.assign({},t,r)):t=Object.assign({},t),!t.state.opened)){var i=t.path;i||(i="./"+this.$gui.keyid);var o=e.componentOf(i);if(o=o&&o.fullClone())return void Ge.popWin.showWindow(o,t,function(){e.duals["data-checked"]="1",n(!0)},e);Ge.instantShow("warning: can not locate popup window ("+i+").")}n(!1)}function je(e,t){if(t||(t=e.findNavOwner()),t){var r=e.$gui.keyid;t.listOptComp().forEach(function(t){t!==e&&t.clearChecked&&t.$gui.keyid!==r&&t.clearChecked()})}}function De(e,t,r,n){function i(r){var n=r.shift();n?setTimeout(function(){e.state["data-checked"]?t():i(r)},n):t()}function o(){u&&(je(e,p),e.fireTrigger()),t&&t()}e.state.disabled&&!n&&t&&t();var a=e.state.recheckable,s=e.state["data-checked"],l=e.state.popOption;if(l){if(!l.state||!l.state.opened)return void(!a&&s||$e(e,l,r,function(e){t&&t()}));if(!n)return}if(!s)return e.duals["data-checked"]="1",void(t&&i([100,100,100]));a&&(e.state.recheckable=!1,setTimeout(function(){e.state.recheckable=!0},300));var u=!1,p=null;if(e.state.isolated)return(n||a)&&(u=!0),void o();if(p=e.findNavOwner()){var c=e.$gui.keyid+"";if((p.state.checkedId!==c||n||a)&&(!p.canNavigateTo||p.canNavigateTo(c)))return(n||a)&&(u=!0),void xe(p,c,o)}o()}function Ne(e,t){var r=s(e.props.$trigger||e.props.popOption);e.defineDual("isolated",function(e,t){this.state.isolated=s(e)}),void 0===e.props.isolated&&(e.duals.isolated=r),e.defineDual("recheckable",function(e,t){this.state.recheckable=s(e)}),void 0===e.props.recheckable&&(e.duals.recheckable=r),t.disabled="",e.defineDual("disabled",function(e,t){this.state.disabled=s(e)}),e.defineDual("popOption"),t["data-checked"]="",e.defineDual("data-checked",function(t,r){var n=s(r),i=s(t);n!=i?i?(e.state["data-checked"]=i,setTimeout(function(){e.setChecked(null,void 0,!0)},0)):e.state["data-checked"]=i:e.state["data-checked"]=n})}function Ee(e,t){return e["data-checked"]=[t+1,"string",["","1"]],e.isolated=[t+2,"string",["","1"]],e.disabled=[t+3,"string",["","1"]],e.recheckable=[t+4,"string",["","1"]],e.trigger=[t+5,"string",null,"[string]: [sPath,{trigger,pop_option},[sPath,modifier], ...]"],e.popOption=[t+6,"object",null,"[object]: {path:bodyElePath}"],e}function Ie(e,t){function r(e,t,n,i){var o=n[0],a=n[1],s=4==o?a.element.props.children:a.props.children;if(s){var l=i;3==o?l=t:4==o&&(e=a,l=t,t=""),Be.Children.forEach(s,function(n,i){var o=n.props["keyid."];if(!o&&0!==o){var a=b(n);if(a){var s=parseInt(a);o=s+""===a?s:a}else o=i}var u=o+"",p=1,c=ft(n,{"keyid.":o,key:u,"hookTo.":e}),f=t?t+"."+u:u;n.props["isTemplate."]?(p=4,(c=new ae(c)).pathSeg=f):n.props["isNavigator."]?p=3:n.props["isReference."]&&(p=2);var h=[p,c,l];e.comps[f]=h,2!=p&&r(e,f,h,l)})}}var n=b(t);if(!n)return!1;var i,o=parseInt(n),a=o+""===n?o:n,s=1;t.props["isReference."]?(s=2,"$"==n[0]&&(n=n.slice(1),(o=parseInt(n))+""==n&&(a=o)),i=ft(t,{"hookTo.":e,"keyid.":a,key:n})):(i=ft(t,{"hookTo.":e,"keyid.":a,key:n}),t.props["isTemplate."]?(s=4,(i=new ae(i)).pathSeg=n):t.props["isNavigator."]&&(s=3));var l=[s,i,""];return e.comps[n]=l,2!=s&&r(e,n,l,""),!0}function Ae(e){var t=e.widget,r=null;if(t=t&&t.parent){var n=t.component;if(n){var i=n.$gui.compIdx[e.$gui.keyid];if("number"==typeof i){var o=n.$gui.comps[i];o&&(r=new ae(o))}}}if(!r)return!1;e.$gui.template=r;for(var a=e.$gui.comps,s=a.length,l=0;l=0&&e.exprAttrs.splice(r,1)}}function Ce(e,t){if(!t||"string"!=typeof t)return null;var r=t[0];if("."!=r&&"/"!=r){var n=e.$gui.template;if(!n)return null;for(var i=t.split("."),o=i.shift(),a=n.comps[o];a;){var s=a[0],l=a[1];if(2==s)return 0==i.length?l:null;if(4==s){if(0==i.length)return null;l=(n=l).element,o=i.shift(),a=n.comps[o]}else{if(0==i.length)return l;o+="."+i.shift(),a=n.comps[o]}}}else{var u=t.lastIndexOf("./");if(u>=0)return(c=e.componentOf(t.slice(0,u+2)))?c.elementOf(t.slice(u+2)):null;if("."==r){if((u=t.indexOf(".",1))>1){var p=qe.W(t.slice(0,u)),c=p&&p.component;if(c)return c.elementOf(t.slice(u+1))}}else if("/"==r&&"/"==t[1]){var f=e.parentOf();return f?f.elementOf(t.slice(2)):null}}return null}function Re(e){e.stopPropagation()}function He(){function e(t,r){Object.keys(t).forEach(function(n){if(n&&"_"!=n[n.length-1]){var i=t[n];if("object"==(void 0===i?"undefined":ze(i)))if(i.getDefaultProps){var o=i.getDefaultProps(),a=1;o["childInline."]&&(a=f(o.className||"","rewgt-unit")?2:3),3!=a&&(en[r+n]=a),o["isPre."]&&(tn[r+n]=!0)}else e(i,r+n+".")}})}return en||(en={},tn={},e(Ye,"")),[en,tn]}function We(e,t,r){for(var n,i=[],o=[],a=0;n=e.children[a];a++){var s=Je.scanNodeAttr(n,t,a);if(s){var l=s[0],u=s[1];if("RefDiv"==l)i.push(ht(Gr,u));else if("RefSpan"==l)i.push(ht(Kr,u));else{var p,c=l.split(".");if(1==c.length&&(p=l[0])>="a"&&p<="z"){var f=u["html."]||null;delete u["html."],delete u["isPre."],i.push(ht(h,u,f))}else{var h=S(l)[c.pop()],d=t+"["+a+"]."+l;if(!h){console.log("error: can not find WTC ("+d+")");continue}var g=n.nodeName,v=[];"DIV"!=g&&"SPAN"!=g||(v=We(n,d,r)),v.unshift(h,u),i.push(ht.apply(null,v))}}}else if(n.classList.contains("rewgt-static"))for(var y,_=0;y=n.childNodes[_];_++)o.push(y);else o.push(n)}if(0==i.length&&o.length){var m={className:"rewgt-static",name:qe.$staticNodes.push(o)-1+""};r||(m["data-marked"]="1"),i.push(ht("div",m))}return i}function Me(e,t,r){function n(t){o.removeNum+=o.comps.length,o.compIdx={},o.comps=[],o.statics={},a&&(e.firstScan=!0,e.cellKeys={},e.cellStyles={});for(var n,s=[],l=[],u=0;n=t.children[u];u++){var c=n.getAttribute("$"),h=n.nodeName;if(!c||"PRE"!=h&&"DIV"!=h){if(!c)if(a)if(p.length&&(i(o,p),p=[]),"HR"==h){N=ht("hr",{"markedRow.":!0});o.comps.push(N),a&&(s.push(l),l=[])}else"P"==n.nodeName&&""===n.innerHTML||p.push(n);else p.push(n)}else{p.length&&(i(o,p),p=[]);var d=Je.scanNodeAttr(n,"",0),g=d&&d[0];if(!d||"RefSpan"===g){console.log("error: invalid node (<"+h+" $="+c+">)");continue}var v,y=d[1],_="RefDiv"!=g,m=!1,b=null,w=null;if(_){var k,O=g.split(".");if(1==O.length&&(k=g[0])>="a"&&k<="z")m=!0,v=g;else{if(!(v=S(g)[O.pop()])){console.log("error: can not find WTC ("+g+")");continue}v.defaultProps&&!f(v.defaultProps.className||"",["rewgt-panel","rewgt-unit"])&&(b=v,w=y,v=Jt,y={})}}else v=Gr;var x,P=o.comps.length,$=y.key,j="",D="";$&&"string"==typeof $&&0!=$.search(rn)?(j=D=$,_||"$"==$[0]||($="$"+$),x=$):(D=x="auto"+(P+o.removeNum),$=_?x:x="$"+x);var N;if(m){y.key=$;var E=y["html."]||null;delete y["html."],delete y["isPre."],N=ht(v,y,E)}else{Object.assign(y,{"hookTo.":e.widget,"keyid.":x,key:$}),_||(y.style?y.style.display="":y.style={display:""});var I=[];"DIV"==h&&(I=We(n,"["+u+"]."+g,!1)),b&&(I.unshift(b,w),I=[ht.apply(null,I)]),I.unshift(v,y),N=ht.apply(null,I)}o.compIdx[$]=P,o.comps.push(N),j&&(a?s[j]=N:l[j]=N),l.push([D,N]),it&&!_&&st.push([e,$])}}p.length&&i(o,p),a?l.length&&s.push(l):s=l,r&&setTimeout(function(){r(!0,s)},0)}function i(e,t){if(!s){var r=e.comps.length,n=1048576+e.removeNum+r+"",i=r+e.removeNum+"",o={className:"rewgt-static",name:n,key:i};e.compIdx[i]=r,e.comps.push(ht("div",o)),e.statics[n]=t}}var o=e.$gui,a=e.props["markedTable."],s=e.props.noShow;try{var l=Ge.marked(t),u=document.createElement("div"),p=[];u.innerHTML=l;var c=[];o.comps.forEach(function(e){if(e&&e.props["hookTo."]){var t=b(e);t&&c.push("-"+t)}}),c.length&&e.isHooked?e.setChild(c,function(){n(u)}):n(u)}catch(e){console.log(e),r&&r(!1)}}var Fe=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(n)},Le=function(){function e(e,t){for(var r=0;r0,Je.appBase=function(){return"/app/files/rewgt/web"}}(window.location),Ge.version=function(){return"1.1.0"};var Ze=function(e){var t=e.match(/trident.*rv[ :]*([\d.]+)/);if(t){if(parseFloat(t[1])>=11)return["ie",t[1]]}else{if(t=e.match(/firefox\/([\d.]+)/))return["firefox",t[1]];if(t=e.match(/chrome\/([\d.]+)/))return["chrome",t[1]];if(t=e.match(/opera.([\d.]+)/))return["opera",t[1]];if(t=e.match(/safari\/([\d.]+)/))return["safari",t[1]];if(t=e.match(/webkit\/([\d.]+)/))return["webkit",t[1]]}return e.match(/msie ([\d.]+)/)?["ie",""]:["",""]}(window.navigator.userAgent.toLowerCase());Ge.vendorId=Ze;var Qe=/[^A-Za-z0-9\+\/\=]/g,et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",tt=Ge.Base64={encode:function(e){var t,r,n,i,o,a,s,l="",u=0;for(e=tt._utf8_encode(e);u>2,o=(3&t)<<4|(r=e.charCodeAt(u++))>>4,a=(15&r)<<2|(n=e.charCodeAt(u++))>>6,s=63&n,isNaN(r)?a=s=64:isNaN(n)&&(s=64),l=l+et.charAt(i)+et.charAt(o)+et.charAt(a)+et.charAt(s);return l},decode:function(e){var t,r,n,i,o,a,s="",l=0;for(e=e.replace(Qe,"");l>4,r=(15&i)<<4|(o=et.indexOf(e.charAt(l++)))>>2,n=(3&o)<<6|(a=et.indexOf(e.charAt(l++))),s+=String.fromCharCode(t),64!=o&&(s+=String.fromCharCode(r)),64!=a&&(s+=String.fromCharCode(n));return s=tt._utf8_decode(s)},_utf8_encode:function(e){for(var t="",r=0;r127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t},_utf8_decode:function(e){for(var t,r,n,i=0,o="";i191&&t<224?(r=e.charCodeAt(i+1),o+=String.fromCharCode((31&t)<<6|63&r),i+=2):(r=e.charCodeAt(i+1),n=e.charCodeAt(i+2),o+=String.fromCharCode((15&t)<<12|(63&r)<<6|63&n),i+=3);return o}},rt=null,nt=null,it=!0,ot=!1,at=!1,st=[],lt=!1,ut="",pt=null,ct=Ve.findDOMNode,ft=Be.cloneElement,ht=Be.createElement,dt=Be.isValidElement,gt=Be.Children.toArray,vt=tt.hasOwnProperty,yt={$:!0,styles:!0,"tagName.":!0,"isReference.":!0,"hookTo.":!0,width:!0,height:!0,className:!0,"childInline.":!0},_t=["for","if","elif","else"];Ge.isUnderBody=l,Ge.keyOfNode=function(e){return u(e)},Ge.dragInfo={inDragging:!1,justResized:!1};var mt=4;Ge.identicalId=p,Ge.classNameOf=c,Ge.hasClass=function(e,t){return f(c(e),t)},Ge.addClass=function(e,t){for(var r=e.state.klass||"",n=" "+(e.$gui.className||"")+" "+r+" ",i="",o=Array.isArray(t)?t:String(t).split(/ +/),a=o.length,s=0;s=0;o--){var a=r[o];if(a){var s=a[0];"-"==s?n.unshift(a.slice(1)):"+"==s?i.unshift(a.slice(1)):i.unshift(a)}}return Ge.removeClass(e,n,i)};var bt=["S1","S2","S3","S4","S5","S6"];Je.mergeClass=function(e,t,r){var n=v(r);return g(e,t,n[0],n[1])},Ge.mergeClass=function(e,t){var r=v(t),n=r[0],i=r[1];return Ge.removeClass(e,n,i)},Ge.klassNames=y,Ge.clearKlass=_,Ge.setupKlass=function(e,t){for(var r=[_(e,t)],n=arguments.length,i=2;i=2?O(void 0,e,arguments[1]):O(void 0,e)},Ge.setChildren=function(e,t,r,n){"function"==typeof r&&(n=r,r=void 0);var i=e.$gui;if(t||(t=i.comps),r&&(i.isPanel||e.widget===nt?(console.log("error: invalid argument (insertEle) for panel"),r=void 0):Array.isArray(r)?0==r.length&&(r=null):dt(r)&&void 0===r.props["childInline."]||(console.log("error: invalid argument (insertEle)"),r=null)),Array.isArray(t))if((r||null===r)&&(i.insertEle=r),t!==i.comps){for(var o=[],a=t.length,s=0;s=1.5?e.setState({id__:x(e.state.id__)},n):setTimeout(function(){e.setState({id__:x(e.state.id__)},n)},0)}else n&&(i.inSync?setTimeout(function(){n()},0):n())},Ge.getWTC=S;var kt={ie:"ms",firefox:"Moz",opera:"O",chrome:"Webkit",safari:"Webkit",webkit:"Webkit"};Xe.regist("vendor",function(){return kt[Ze[0]]||""}),Xe.regist("vendorId",function(){return"-"+(kt[Ze[0]]||"").toLowerCase()+"-"}),Xe.regist("__design__",function(){return parseInt(qe.__design__||0)}),Xe.regist("__debug__",function(){return parseInt(qe.__debug__||0)}),Xe.regist("time",function(e){return(e?new Date(e):new Date).valueOf()}),Xe.regist("isFalse",function(e){return!e}),Xe.regist("isTrue",function(e){return!!e}),Xe.regist("parseInt",function(e){return parseInt(e)}),Xe.regist("parseFloat",function(e){return parseFloat(e)}),Xe.regist("escape",function(e){return escape(e)}),Xe.regist("unescape",function(e){return unescape(e)}),Xe.regist("evalInfo",function(){var e=void 0,t=this.component;if(!t)return e;var r=t.widget,n=r&&r.$callspace;if(n&&(e=n.exprSpace.$info,n.forSpace)){var i=n.forSpace.exprSpace.$info;e?i&&i[2]>=e[2]&&(e=i):e=i}return e}),Xe.regist("tagValue",function(e){if("object"!=(void 0===e?"undefined":ze(e)))return e;var t,r=Object.assign({},e),n=r.$set;if(n){if("object"!=(void 0===n?"undefined":ze(n)))return e;n=r.$set=Object.assign({},n)}else{if(!(n=r.$merge))return t=Xe.time(),Object.keys(r).forEach(function(e){if("$"!=e[0]){var n=r[e];if("object"==(void 0===n?"undefined":ze(n))){var i=(n=r[e]=Object.assign({},n)).$set;if(i){if("object"!=(void 0===i?"undefined":ze(i)))return;(i=n.$set=Object.assign({},i)).time=t}else if(i=n.$merge){if("object"!=(void 0===i?"undefined":ze(i)))return;(i=n.$merge=Object.assign({},i)).time=t}else vt.call(n,"value")&&(n.time={$set:t})}}}),r;if("object"!=(void 0===n?"undefined":ze(n)))return e;n=r.$merge=Object.assign({},n)}return t=Xe.time(),Object.keys(n).forEach(function(e){if("$"!=e[0]){var r=n[e];"object"==(void 0===r?"undefined":ze(r))&&(r.time=t)}}),r}),Xe.regist("tagFired",function(){var e=arguments.length;if(e<2)return"";var t,r=arguments[0];for(t=1;t":"ex>",o<=0)t&&console.log(i);else{for(var a=0;a=2&&("number"==typeof(r=arguments[i-1])?(r<0&&(o=!1),i-=1):2==i&&Array.isArray(r)&&(i=(n=r).length)>=1&&"number"==typeof(r=n[i-1])&&(r<0&&(o=!1),i-=1));var a=[];if(n)for(s=0;sl?o?1:-1:o?-1:1}return 0}):u.sort(function(e,t){return o?e===t?0:e>t?1:-1:e===t?0:e>t?-1:1})}),Xe.regist("jsonp",function(e,t){var r=this.evalInfo(),n=null,i="";return r&&(n=r[0],i=r[1],t&&n&&vt.call(n.duals,i)&&void 0===n.state[i]&&(n.duals[i]=t)),e=Object.assign({},e),e.callback=function(e){n&&i&&vt.call(n.duals,i)&&(n.duals[i]=e)},Ge.jsonp(e),n&&i?n.state[i]:void 0}),Xe.regist("ajax",function(e,t){var r=this.evalInfo(),n=null,i="";return r&&(n=r[0],i=r[1],t&&n&&i&&vt.call(n.duals,i)&&void 0===n.state[i]&&(n.duals[i]=t)),e.success=function(e){n&&i&&vt.call(n.duals,i)&&(n.duals[i]={status:"success",data:e})},e.error=function(e,t){n&&i&&vt.call(n.duals,i)&&(n.duals[i]={status:t||"error",data:null})},Ge.ajax(e),n?n.state[i]:void 0}),j.defunct=function(e){throw new Error("Unexpected character ("+e+") at offset ("+(this.index-1)+")")};var Ot=new j,xt=[];Ot.addRule(/\s+/,function(e){return D(e,1,-1)}).addRule(/[0-9]+(?:\.[0-9]+)?\b/,function(e){return D(e,2,-1)}).addRule(/[_$A-Za-z](?:[_$A-Za-z0-9]+)?/,function(e){return D(e,3,-1)}).addRule(/(?:"((?:\\.|[^"])*)"|'((?:\\.|[^'])*)')/,function(e){return D(e,4,-1)}).addRule(/[?]/,function(e){return D(e,5,4)}).addRule(/[:]/,function(e){return D(e,6,-1)}).addRule(/[,]/,function(e){return D(e,7,-1)}).addRule(/[{]/,function(e){return D(e,8,-1)}).addRule(/[}]/,function(e){return D(e,9,-1)}).addRule(/[\[]/,function(e){return D(e,10,-1)}).addRule(/[\]]/,function(e){return D(e,11,-1)}).addRule(/[(]/,function(e){return D(e,12,-1)}).addRule(/[)]/,function(e){return D(e,13,-1)}).addRule(/[.]/,function(e){return D(e,14,18)}).addRule(/[*]/,function(e){return D(e,14,14)}).addRule(/[/]/,function(e){return D(e,14,14)}).addRule(/[%]/,function(e){return D(e,14,14)}).addRule(/[+]/,function(e){return D(e,14,13)}).addRule(/[-]/,function(e){return D(e,14,13)}).addRule(/[>]{3}/,function(e){return D(e,14,12)}).addRule(/[>]{2}/,function(e){return D(e,14,12)}).addRule(/[<]{2}/,function(e){return D(e,14,12)}).addRule(/[<][=]/,function(e){return D(e,14,11)}).addRule(/[<]/,function(e){return D(e,14,11)}).addRule(/[>][=]/,function(e){return D(e,14,11)}).addRule(/[>]/,function(e){return D(e,14,11)}).addRule(/[=]{3}/,function(e){return D(e,14,10)}).addRule(/[!][=]{2}/,function(e){return D(e,14,10)}).addRule(/[=]{2}/,function(e){return D(e,14,10)}).addRule(/[!][=]/,function(e){return D(e,14,10)}).addRule(/[&]{2}/,function(e){return D(e,14,6)}).addRule(/[&]/,function(e){return D(e,14,9)}).addRule(/[\^]/,function(e){return D(e,14,8)}).addRule(/[|]{2}/,function(e){return D(e,14,5)}).addRule(/[|]/,function(e){return D(e,14,7)}).addRule(/$/,function(e){return D(e,20,-1)});var Pt=[2,3,4,9,11,13,31,32,33,34,35,36,37,38,39,40,41,42,43],St=1,$t=["props","state","duals","item","count","index"],jt=0;Ge.triggerDual=F,Ge.popWin={showWindow:function(e,t,r,n){if(qe.__design__&&(it||ot))r&&r();else{var i=nt&&nt.$pop,o=i&&i.component;if(o&&e)if(f(e.props.className,["rewgt-panel","rewgt-unit"])){var a=t.frameElement||null;!a&&n&&(a=B(n,t));var s=void 0;n&&n.props["isOption."]&&vt.call(n.state,"data-checked")&&(s=n.state["data-checked"]),o.setChild(ht(Qr,{popOption:t,popFrame:a},e),function(){qe.__design__&&(rt&&rt.setDesignModal&&rt.setDesignModal(!0),void 0!==s&&n&&setTimeout(function(){n.state["data-checked"]=s},300)),r&&r()})}else Ge.instantShow("error: only panel, div, paragraph can use as popup window.")}},listWindow:function(){var e=nt&&nt.$pop,t=e&&e.component;if(!t)return[];var r=[];return t.$gui.comps.forEach(function(e){if(e){var t=b(e);if(t){var n=parseInt(t);n+""===t&&(t=n),r.push([t,e.props.popOption])}}}),r},closeAll:function(e){function t(){e&&e()}var r=nt&&nt.$pop,n=r&&r.component;if(!n)return t();var i=[];n.$gui.comps.length;if(n.$gui.comps.forEach(function(e){if(e){var t=b(e);t&&i.unshift("-"+t)}}),!i.length)return t();i.push(t),n.setChild.apply(n,i)},popWindow:function(e){var t=nt&&nt.$pop,r=t&&t.component;if(r){for(var n=null,i=r.$gui.comps,o=i.length-1;o>=0;){var a=i[o],s=a&&b(a);if(s&&(a=t[s])&&(n=a.component))break;o-=1}if(n){n.props.optPath;var l=n.$gui.keyid,u=n.state.popOption;if(0==arguments.length){var p=u&&u.beforeClose;"function"==typeof p&&(e=p())}var c=u&&u.callback;r.setChild("-"+l,function(){"function"==typeof c&&c(e)})}}}},Je.getCompRenewProp=V,Je.deepCloneReactEle=U;var Dt=null,Nt=0;Je.staticMouseDown=K,Je.staticDbClick=J,Ge.loadElement=function(){var e=[],t=arguments.length;if(1==t)return Z(e,arguments[0],qe.$staticNodes,qe.$cachedClass),1==e.length?e[0]:null;if(0==t)return null;for(var r=0;r0&&(i=e.slice(s),e=e.slice(0,s));var l=parseInt(e);l+""==e&&(e=l,a="number")}if("string"==a&&e){var u=this.namedPage[e];if("number"!=typeof u)return i="",r();e=u}else if("number"!=a)return i="",r();var p=this.keys.length;if(!p)return r();e>=p&&(e=p-1),e<0&&(e=0);var c=this.gotoPage_(this.keys,e);n=c[0],(o=c[1])||(i=""),r()}else t&&t("")},prevPage:function(){return this.gotoPage(this.pageIndex-1)},nextPage:function(){return this.gotoPage(this.pageIndex+1)},renewPages:function(e){var t=[],r={};e.forEach(function(e){var n=e[0];parseInt(n)+""!==n&&(r[n]=t.length),t.push(n)});var n=this.keys[this.pageIndex],i=!0;if("string"==typeof n){var o=t.indexOf(n);o>=0&&(this.pageIndex=o,i=!0)}this.keys=t,this.namedPage=r,i||(t.length?this.gotoPage(0):this.pageIndex=0)},setDisplay:function(e){function t(e){return(e=Math.max(e||0,0))<.9999?e*=window.innerWidth:e<1&&(e=window.innerWidth),e}vt.call(e,"leftCtrlWidth")&&(this.leftPanel.style.width=t(e.leftCtrlWidth)+"px"),vt.call(e,"rightCtrlWidth")&&(this.rightPanel.style.width=t(e.rightCtrlWidth)+"px")},destory:function(){this.leftPanel&&(this.leftPanel.parentNode.removeChild(this.leftPanel),this.leftPanel=null),this.rightPanel&&(this.rightPanel.parentNode.removeChild(this.rightPanel),this.rightPanel=null)}},Je.pageCtrl_=le,qe.$main.$$onLoad_=function(e){function t(e){var r=st.shift();r?se(r[0],r[1],function(){t(e)}):e()}function r(){var i=n.shift();i?i(r):t(function(){if(at=!1,it=!1,!qe.__design__&&rt&&!Ge.pageCtrl){var t=ue();t.length&&(Ge.pageCtrl=new le(t))}setTimeout(function(){if(qe.__design__)qe.$main.$onLoad=[],qe.$main.inRunning=!0,e&&e();else{var t,r=qe.$main.$onReady;if(Array.isArray(r))for(;t=r.shift();)t();else"function"==typeof r&&r();var n=qe.$main.$onLoad;if(Array.isArray(n))for(;t=n.shift();)t();qe.$main.inRunning=!0;var i=window.location.hash;i&&setTimeout(function(){Ge.gotoHash(i)},300)}},0)})}at=!0;var n=qe.$main.$$onLoading=(qe.$main.$$onLoad||[]).slice(0);r()};var It=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({onCopy:!0,onCut:!0,onPaste:!0,onCompositionEnd:!0,onCompositionStart:!0,onCompositionUpdate:!0,onKeyDown:!0,onKeyPress:!0,onKeyUp:!0,onFocus:!0,onBlur:!0,onChange:!0,onInput:!0,onSubmit:!0,onClick:!0,onContextMenu:!0,onDoubleClick:!0,onDrag:!0,onDragEnd:!0,onDragEnter:!0,onDragExit:!0,onDragLeave:!0,onDragOver:!0,onDragStart:!0,onDrop:!0,onMouseDown:!0,onMouseEnter:!0,onMouseLeave:!0,onMouseMove:!0,onMouseOut:!0,onMouseOver:!0,onMouseUp:!0,onSelect:!0,onTouchCancel:!0,onTouchEnd:!0,onTouchMove:!0,onTouchStart:!0,onScroll:!0,onWheel:!0,onAbort:!0,onCanPlay:!0,onCanPlayThrough:!0,onDurationChange:!0,onEmptied:!0,onEncrypted:!0,onEnded:!0,onError:!0,onLoadedData:!0,onLoadedMetadata:!0,onLoadStart:!0,onPause:!0,onPlay:!0,onPlaying:!0,onProgress:!0,onRateChange:!0,onSeeked:!0,onSeeking:!0,onStalled:!0,onSuspend:!0,onTimeUpdate:!0,onVolumeChange:!0,onWaiting:!0,onLoad:!0},"onError",!0),At={accept:1,acceptCharset:1,accessKey:1,action:1,allowFullScreen:1,allowTransparency:1,alt:1,async:1,autoComplete:1,autoFocus:1,autoPlay:1,capture:1,cellPadding:1,cellSpacing:1,challenge:1,charSet:1,checked:1,cite:1,classID:1,colSpan:1,cols:1,content:1,contentEditable:1,contextMenu:1,controls:1,coords:1,crossOrigin:1,data:1,dateTime:1,default:1,defer:1,dir:1,disabled:1,download:1,draggable:1,encType:1,form:1,formAction:1,formEncType:1,formMethod:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:1,hidden:1,high:1,href:1,hrefLang:1,htmlFor:1,httpEquiv:1,icon:1,id:1,inputMode:1,integrity:1,is:1,keyParams:1,keyType:1,kind:1,label:1,lang:1,list:1,loop:1,low:1,manifest:1,marginHeight:1,marginWidth:1,max:1,maxLength:1,media:1,mediaGroup:1,method:1,min:1,minLength:1,multiple:1,muted:1,name:1,noValidate:1,nonce:1,open:1,optimum:1,pattern:1,placeholder:1,poster:1,preload:1,profile:1,radioGroup:1,readOnly:1,rel:1,required:1,reversed:1,role:1,rowSpan:1,rows:1,sandbox:1,scope:1,scoped:1,scrolling:1,seamless:1,selected:1,shape:1,size:1,sizes:1,span:1,spellCheck:1,src:1,srcDoc:1,srcLang:1,srcSet:1,start:1,step:1,summary:1,tabIndex:1,target:1,title:1,type:1,useMap:1,value:1,wmode:1,wrap:1,about:2,datatype:2,inlist:2,prefix:2,property:2,resource:2,typeof:2,vocab:2,autoCapitalize:3,autoCorrect:3,color:3,itemProp:3,itemScope:3,itemType:3,itemRef:3,itemID:3,security:3,unselectable:3,results:3,autoSave:3,dangerouslySetInnerHTML:4,className:5,style:5,width:5,height:5};Je.renewWidgetSpared=ge;var Tt=/-(.)/g,Ct=["Top","Right","Bottom","Left"],Rt=function(){function e(t,r){o(this,e),this._className=t,this._classDesc=r||"",this._statedProp=["width","height","left","top"],this._silentProp=["className","hookTo.","keyid.","childInline.","tagName."],this._defaultProp={width:.9999,height:.9999,left:0,top:0},this._htmlText=!1,this._docUrl="doc"}return Le(e,[{key:"_desc",value:function(){return this._classDesc?"<"+this._className+":"+this._classDesc+">":"<"+this._className+">"}},{key:"_extend",value:function(e){if("string"==typeof e){if(qe.__design__)return null;(e=qe.$main[e])||console.log("warning: _extend('"+e+"') load nothing!")}var t=this._methods;if(!t){var r={},n={};t=this._methods={$eventset:[r,n]};for(var i={},o=Object.getPrototypeOf(this);o;){var a=Object.getPrototypeOf(o);if(!a)break;Object.getOwnPropertyNames(o).forEach(function(e){"_"!=e[0]&&(i[e]=!0)}),o=a}for(f in i)if("constructor"!=f){var s=this[f];if("function"==typeof s){if("$"==f[0]){var l=!1,u="$"==f[1]?(l=!0,f.slice(2)):f.slice(1);It[u]&&(l?n[u]=!0:r[u]=!0)}t[f]=s}}t.getShadowTemplate=function(e){return function(){return e}}(this)}var p=Object.assign({},t),c=p.$eventset,r=Object.assign({},c[0]),n=Object.assign({},c[1]);p.$eventset=[r,n,this._className],e||(e={});for(var f,h=Object.keys(e),d=0;f=h[d];d++){var g=e[f];if("$"==f[0]&&"function"==typeof g){var l=!1,u="$"==f[1]?(l=!0,f.slice(2)):f.slice(1);It[u]&&(l?n[u]=!0:r[u]=!0)}var v=p[f];"function"==typeof v&&"_"!=f[0]&&(p["_"+f]=function(e){return function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i=2)return console.log("error: can not define duals."+e+" after first render"),this;if(!s||!l)return this;void 0!==r&&l.initDuals0.push([e,r]);var u,p=Object.getOwnPropertyDescriptor(s,e),c=!1;if(p)t?(u=L(this,e,p.set,t.bind(this),n),Object.defineProperty(s,e,{enumerable:!0,configurable:!0,get:p.get,set:u[1]})):n&&(c=!0);else{t?u=L(this,e,null,t.bind(this),n):(n&&(c=!0),u=L(this,e,null)),Object.defineProperty(s,e,{enumerable:!0,configurable:!0,get:u[0],set:u[1]});var f=At[e];f&&5!=f&&l.tagAttrs.push(e)}return c&&console.log("warning: base.setter should use with setter."),this}},{key:"undefineDual",value:function(e){if(Array.isArray(e)){var t=e.length;for(s=0;s=2)return console.log("error: undefineDual("+e+") only can be called before first render"),this;if(!i||!n)return this;for(var o,a=[n.initDuals,n.initDuals0],s=0;o=a[s];s++)for(var l=o.length-1;l>=0;)o[l][0]===e&&o.splice(l,1),l-=1;delete i[e];var u=n.tagAttrs.indexOf(e);return u>=0&&n.tagAttrs.splice(u,1),this}},{key:"setEvent",value:function(e){var t,r=this.$gui;if(r&&(t=r.eventset)){if(r.compState>=2)console.log("error: can not call setEvent() after first render.");else for(var n,i=Object.keys(e),o=0;n=i[o];o++)if("$"==n[0]){var a=n.slice(1);if("$"!=a[0]){var s=e[n];"function"==typeof s&&(this[n]=t[a]=function(e,t,r){return function(){e.apply(r,arguments),t&&t.apply(r,arguments)}}(s,t[a],this))}}}else console.log("error: invalid state for setEvent().")}},{key:"getInitialState",value:function(){var e=this.getShadowTemplate();Object.defineProperty(this,"_",{enumerable:!1,configurable:!1,writable:!1,value:e}),this.isHooked=!1,this["hide."]=!1,this.duals={};var t=0==Ge.widgetNum(),r={inSync:!1,removeNum:0,className:this.props.className||"",compState:0,duals:{},initDuals:[],initDuals0:[],connectTo:{},connectBy:{},id__:0,id2__:0,sparedX:null,sparedY:null},n=r.eventset={},i=r.tagAttrs=[],o=r.dualAttrs={},a=r.dataset=[],s=r.exprAttrs=[],l="",u="",c="";r.forExpr=!1,r.hasIdSetter=!1;for(var h={},g=this.$eventset||[{},{}],v=g[0],y=g[1],_=null,m=Object.keys(this.props),w=0;C=m[w];w++)if(0==C.indexOf("data-"))"data-unit.path"!=C&&"data-span.path"!=C||(l=C,u=this.props[C]),a.push(C);else if(0==C.indexOf("dual-")){var k=C.slice(5).replace(Tt,function(e,t){return t.toUpperCase()});k&&(o[k]=C)}else if(0==C.indexOf("aria-"))a.push(C);else if("$"==C[0]&&C.length>1){var O=this.props[C],x=void 0===O?"undefined":ze(O);if("string"==x){if("$id__"!=C){var P=!1;"$for"==(C=C.slice(1))&&(C="for",P=!0),_t.indexOf(C)>=0?"for"==C?(r.forExpr?console.log("warning: reduplicate property ($for)"):(r.forExpr=P?2:1,s.push(C)),t&&console.log("error: can not use '$for' in topmost widget")):c?console.log("error: property ($"+C+") conflict with previous ($"+c+")"):(c=C,"else"!=C&&s.push(C)):"children"==C?vt.call(this.props,"for.index")&&(r.isChildExpr=!0,r.children2=this.props.children):"key"!=C&&s.push(C);continue}x=void 0===(O=Ke[O])?"undefined":ze(O)}if("function"==x){if("$"==C[1]){console.log("warning: invalid using props."+C);continue}var S=C.slice(1);"id__"==S?_=O:this[C]=h[S]=be(O)?O.bind(this):O}}else{var $=At[C];$&&5!=$&&i.push(C)}r.flowFlag=c,r.dataset2=a.slice(0);var j=this.props["keyid."];if(t&&!j&&(j="body"),j){var D=void 0===j?"undefined":ze(j);"string"!=D&&"number"!=D&&(j=void 0)}var N=this.props["hookTo."];t&&!N&&(N=qe),"string"==typeof N&&(N=qe.W(N)),Array.isArray(N)&&N.W&&(void 0!==j?N.$set(j,N.W(this)):j=N.push(N.W(this))-1,r.keyid=j);var E=this.props["data-rewgt-owner"];if(E){var I,A=r.eventset2={};if(N&&(I=N.component))for(var C,m=Object.keys(I.$gui.eventset),w=0;C=m[w];w++)n[C]=_e(this,C,E),A[C]=!0}var R=Object.assign({},v,h);for(var H in R)n[H]=_e(this,H,E);for(var H in y)n[H]=this["$$"+H];t&&(r.className=d(r.className,["rewgt-panel","row-reverse","reverse-row","col-reverse","reverse-col"])),Object.defineProperty(this,"$gui",{enumerable:!1,configurable:!1,writable:!1,value:r});var W={id__:0,childNumId:0,duals:[],"tagName.":this.props["tagName."],exprAttrs:s.slice(0)};if(qe.__design__){var F=e._getGroupOpt(this);W["data-group.opt"]=F.type+"/"+F.editable}Object.assign(W,{left:0,top:0,width:null,height:null,minWidth:0,maxWidth:0,minHeight:0,maxHeight:0,borderWidth:[0,0,0,0],padding:[0,0,0,0],margin:[0,0,0,0],klass:"",style:{}});var L=r.isPanel=f(r.className,"rewgt-panel"),z=!1,B=!1,V=this.props["childInline."];if(V||t||!L||(f(r.className+" "+this.props.klass,["col-reverse","reverse-col"])?B=!0:z=!0),r.useSparedX=!1,r.useSparedY=!1,r.respared=!1,r.sparedTotal=0,r.compIdx={},r.comps=gt(this.props.children),Object.defineProperty(this.duals,"keyid",{enumerable:!0,configurable:!0,get:function(){return this.$gui.keyid}.bind(this),set:function(e,t){throw new Error("property (keyid) is readonly")}}),this.defineDual("klass",function(e,t){this.state.klass=e||""}),this.defineDual("style",function(e,t){if(this.state["tagName."])this.state.style=Object.assign({},t,e);else{var r=Ge.eachComponent(this)[0];r&&(r.duals.style=e)}}),this.defineDual("left",function(e,t){this.state.left=isNaN(e)?null:e}),this.defineDual("top",function(e,t){this.state.top=isNaN(e)?null:e}),this.defineDual("width",function(e,t){var r,n=!1;if(isNaN(e)?r=null:(r=e,null!==e&&(n=!0)),this.state.width=r,n){var i=this.parentOf(!0);i&&i.$gui.useSparedX&&ge(i,!1)}}),this.defineDual("height",function(e,t){var r,n=!1;if(isNaN(e)?r=null:(r=e,null!==e&&(n=!0)),this.state.height=r,n){var i=this.parentOf(!0);i&&i.$gui.useSparedY&&ge(i,!1)}}),this.defineDual("minWidth",function(e,t){var r=e||0;r>0&&this.state.maxWidth>0&&this.state.maxWidth0&&this.state.minWidth>0&&this.state.minWidth>r?console.log("warning: invalid widget minWidth or maxWidth"):this.state.maxWidth=r}),this.defineDual("minHeight",function(e,t){var r=e||0;r>0&&this.state.maxHeight>0&&this.state.maxHeight0&&this.state.minHeight>0&&this.state.minHeight>r?console.log("warning: invalid widget minHeight or maxHeight"):this.state.maxHeight=r}),this.defineDual("borderWidth",function(e,t){var n=t||[0,0,0,0],i=this.state.borderWidth=r.isPanel?pe(e):ce(e),o=!1;this.$gui.useSparedX?n[1]===i[1]&&n[3]===i[3]||(o=!0):this.$gui.useSparedY&&(n[0]===i[0]&&n[2]===i[2]||(o=!0)),o&&ge(this,!1)}),this.defineDual("padding",function(e,t){var n,i=this.state.padding=r.isPanel?pe(e):ce(e);if((n=this.$gui.useSparedX)||this.$gui.useSparedX){var o=!1,a=t||[0,0,0,0];n?a[1]===i[1]&&a[3]===i[3]||(o=!0):a[0]===i[0]&&a[2]===i[2]||(o=!0),o&&ge(this,!1)}}),this.defineDual("margin",function(e,t){this.state.margin=r.isPanel?pe(e):ce(e)}),this.defineDual("id__",function(e,t){this.state.id__=e,r.id__=r.id2__=e}),_&&this.defineDual("id__",_),this.defineDual("trigger",ve),this.defineDual("cellSpacing"),this.defineDual("sizes"),N){var U=N&&N.component;U&&(U.props["isTableRow."]&&(this.props.tdStyle&&this.defineDual("tdStyle",function(e,t){this.state.tdStyle=Object.assign({},t,e),setTimeout(function(){U.reRender()},0)},this.props.tdStyle),this.props.colSpan&&this.defineDual("colSpan",function(e,t){this.state.colSpan=e,setTimeout(function(){U.reRender()},0)},this.props.colSpan),this.props.rowSpan&&this.defineDual("rowSpan",function(e,t){this.state.rowSpan=e,setTimeout(function(){U.reRender()},0)},this.props.rowSpan)),U.props["isScenePage."]&&(r.inScene=!0))}r.cssWidth=null,r.cssHeight=null;var q=null,Y=null,G=this.widget;if(N&&G)if(l&&(G.$callspace={flowFlag:"ref",forSpace:null},G.$callspace[l]=u,T(G.$callspace.exprSpace={},this)),t&&(nt=Je.topmostWidget_=G,(rt=Je.containNode_=document.getElementById("react-container"))||console.log("fatal error: can not find 'react-container' node.")),t&&rt){qe.__design__&&(rt.style.zIndex="3000",this.duals.style={zIndex:"-1000",overflow:"hidden"});var X=rt.frameInfo;X||(X=rt.frameInfo={topHi:0,leftWd:0,rightWd:0,bottomHi:0}),X.rootName="."+j;var Z=function(){var e=Math.max(100,window.innerWidth-X.leftWd-X.rightWd),t=Math.max(100,window.innerHeight-X.topHi-X.bottomHi),n=this.state.innerSize,i=[e,t],o={left:X.leftWd,top:X.topHi,parentWidth:e,parentHeight:t,innerSize:i};if(Ge.dragInfo.justResized&&(o.id__=p()),this.setState(o),vt.call(this.duals,"innerSize")){var a=r.connectTo.innerSize;a&&r.compState>=2&&setTimeout(function(){M(a,i,n,"innerSize")},0)}}.bind(this);rt.refreshFrame=Z,he(rt);var Q=function(){Ge.dragInfo.inDragging=!1,Ge.dragInfo.justResized=!0,setTimeout(function(){Ge.dragInfo.justResized=!1},1200),Z()},ee=0;r.onWinResize=function(e){Ge.dragInfo.inDragging=!0,ee&&clearTimeout(ee),ee=setTimeout(Q,500),Z()},this.duals.style=Object.assign({},this.props.style,{position:"absolute"}),this.duals.left=X.leftWd,this.duals.top=X.topHi,q=Math.max(100,window.innerWidth-X.leftWd-X.rightWd),Y=Math.max(100,window.innerHeight-X.topHi-X.bottomHi)}else{var te=N.component;te&&(q=te.$gui.cssWidth,Y=te.$gui.cssHeight)}return W.parentWidth=q,W.parentHeight=Y,this.defineDual("childNumId",function(e,n){var i=this,o=i.widget;if(o){var a=i.state.sizes,s=Array.isArray(a),l=r.compIdx,u=r.comps,p=i.props["isScenePage."],c=!1,h=!1,d=0,g=!1;u.forEach(function(e,n){if("string"==typeof e){if(0==n&&1==u.length&&vt.call(i.duals,"html."))return setTimeout(function(){i.duals["html."]=e},0),void(g=!0);if(!V)return u[n]=void 0,void console.log("warning: can not add text element to panel ("+o.getPath()+")");e=u[n]=ht(yr,{"html.":e})}else if(!e)return;var a,s=b(e),v=!1;if(s){var y=parseInt(s);a=y+""===s?y:s,"number"==typeof l[s]&&(v=!0)}else s=(a=n+r.removeNum)+"";if(f(e.props.className,"rewgt-static")){if(v)return void(l[a]=n);if(L)u[n]=void 0,console.log("warning: can not add rewgt-static to panel ("+o.getPath()+") directly.");else{var _=Object.assign({},e.props);_.key=s,!qe.__design__||i.props.$for||i.props.$$for||(_.onMouseDown=K,_.onDoubleClick=J.bind(i)),l[a]=n,u[n]=V?ht("span",_):ht("div",_)}}else{var m=e.props["childInline."];if(void 0===m)return l[a]=n,void(v||(u[n]=ft(e,{key:s})));if(V){if(!m)return console.log("error: can not add panel or div ("+s+") to paragraph ("+o.getPath()+")."),void(u[n]=void 0)}else if(!f(e.props.className,["rewgt-panel","rewgt-unit"]))return u[n]=void 0,void console.log("error: only panel, div, paragraph ("+a+") can add to panel or div ("+o.getPath()+").");var w=!1;e.props["isReference."]&&(w=!0,v||("$"!=s[0]&&(s=a="$"+s),it&&st.push([i,a])));var k=e.props.width,O=e.props.height,x="number"!=typeof k,P="number"!=typeof O;if(z)x?c=!0:k<0&&!w&&(h=!0,d+=-k);else if(B)P?c=!0:O<0&&!w&&(h=!0,d+=-O);else{var S="";!x&&k<0?S="width":!P&&O<0&&(S="height"),S&&console.log("error: can not use negative "+S+" under widget ("+o.getPath()+")")}if(v&&e.props["hookTo."]!==o&&(v=!1),v)l[a]=n;else{var $={"hookTo.":o,key:s,"keyid.":a};if(V){var j=f(e.props.className,"rewgt-unit");if(!x&&k>=0){var D=k>=1?k+"px":k>=.9999?"100%":100*k+"%";$.style=Object.assign({},e.props.style,{width:D}),j&&($.width=k)}else j&&($.width=null);if(!P&&O>=0){var N=O>=1?O+"px":O>=.9999?"100%":100*O+"%";$.style=Object.assign({},e.props.style,{height:N}),j&&($.height=O)}else j&&($.height=null)}else $.width=x?null:k,$.height=P?null:O,t&&e.props["isScenePage."]&&e.props.noShow&&!qe.__design__&&($["isTemplate."]=!0);if(p){var E=Object.assign({},e.props.style),I=(parseInt(E.zIndex)||0)+"";"0"!==I&&(E.zIndex=I),$.style=E}else qe.__debug__&&!t&&r.isPanel&&"absolute"==($.style||{}).display&&console.log("warning: can not use 'display:absolute' under a panel");l[a]=n,u[n]=ft(e,$)}}}),g&&u.splice(0),s||(h&&!c?((d>0||r.useSparedX!=z||r.useSparedY!=B)&&(r.respared=!0),r.sparedTotal=d,r.useSparedX=z,r.useSparedY=B):(r.sparedTotal=0,r.useSparedX=!1,r.useSparedY=!1)),t&&0==n&&(l.$pop=u.length+r.removeNum,u.push(ht(Ue(Ye.Panel._extend()),{"hookTo.":o,key:"$pop","keyid.":"$pop",left:0,top:0,width:0,height:0,style:{position:"absolute",zIndex:3016,overflow:"visible"}})))}}),W}},{key:"shouldComponentUpdate",value:function(e,t){var r=Ge.shouldUpdate(this,e,t);if(r&&this.props.children!==e.children&&!this.props["marked."]){var n=this.$gui,i=n.duals.children=e.children;n.comps=gt(i),n.removeNum+=1}return r}},{key:"componentWillReceiveProps",value:function(e){for(var t,r=this.$gui,n=this.duals,i=r.duals,o=Object.keys(n),a=0;t=o[a];a++){var s=e[t];if(void 0===s){var l=r.dualAttrs[t];if(!l)continue;if(void 0===(s=e[l]))continue}s!==i[t]&&(n[t]=i[t]=s)}}},{key:"componentDidMount",value:function(){this.isHooked=!!this.widget,this.props["hasStatic."]&&de(this);var e=this.$gui;if(e.syncExpr){for(var t;t=e.syncExpr.shift();)e.exprAttrs[t[0]]=t[1];delete e.syncExpr}var r=this.props.styles;if(r&&(this.props["data-span.path"]||this.props["data-unit.path"])){var n=this;Object.keys(r).forEach(function(e){var t=r[e];if("object"==(void 0===t?"undefined":ze(t))&&e){var i=n.componentOf(e);i&&(i.duals.style=t)}})}e.hasIdSetter&&(this.duals.id__=2)}},{key:"componentWillUnmount",value:function(){if(qe.__debug__){var e=this.props.teardown__;if("function"==typeof e)try{e.apply(this)}catch(e){console.log(e)}}var t=this.$gui;t.hasIdSetter&&(this.duals.id__=0);for(var r,n=Object.keys(t.connectBy),i=[],o=0;r=n[o];o++)(a=t.connectBy[r][0])!==this&&i.indexOf(a)<0&&i.push(a);for(var a,o=0;a=i[o];o++)a.unlisten("*",this);if(t.connectTo={},t.connectBy={},t.compState=0,Array.isArray(this.widget)){var s=this.widget.parent;if(Array.isArray(s)){var l=t.keyid,u=s.component;if(u){var p=u.$gui;if(!p.flowFlag&&!p.forExpr){var c=p.compIdx[l];"number"==typeof c&&(delete p.comps[c],delete p.compIdx[l])}}s.$unhook(this.widget,l)}delete this.widget.component,delete this.widget}t.eventset={},this.isHooked=!1}},{key:"reRender",value:function(e,t){if(this.isHooked)if(this.$gui.inSync){var r=this;setTimeout(function(){var n=x(r.state.id__),i=Object.assign({},t,{id__:n});r.setState(i,e)},0)}else{var n=x(this.state.id__),i=Object.assign({},t,{id__:n});this.setState(i,e)}else this.state.id__>1&&(qe.__design__||qe.__debug__)&&console.log("warning: reRender() failed when component unhooked."),e&&e()}},{key:"listen",value:function(e,t,r){function n(e){if(Object.getOwnPropertyDescriptor(o.duals,e))return!0;if(o.props["$"+e])return _t.indexOf(e)>0&&console.log("warning: '"+e+"' is not listenable."),!0;if(i.dataset.indexOf(e)>=0||i.tagAttrs.indexOf(e)>=0||vt.call(i.dualAttrs,e)){var t=L(o,e);return Object.defineProperty(o.duals,e,{enumerable:!0,configurable:!0,get:t[0],set:t[1]}),!0}return!1}var i=this.$gui,o=this;if("function"==typeof t){if(Array.isArray(e))p=e;else{if("string"!=typeof e||!e)return console.log("warning: invalid listen source."),this;p=[e]}for(var a,s=0;a=p[s];s++)if(n(a)){var l=i.connectTo[a];l||(l=i.connectTo[a]=[]),l.push([null,t,!1])}else console.log("warning: listen source ("+a+") inexistent.");return this}if(!t||!t.$gui)return console.log("warning: invalid listen target."),this;var u,p=[];if(Array.isArray(e))e.forEach(function(e){var t=("on-"+e).replace(Tt,function(e,t){return t.toUpperCase()});p.push([e,t])});else if("string"==(u=void 0===e?"undefined":ze(e)))r&&"string"==typeof r?p.push([e,r,r]):(r=("on-"+e).replace(Tt,function(e,t){return t.toUpperCase()}),p.push([e,r]));else{if(!action||"object"!=u)return this;Object.keys(e).forEach(function(t){p.push([t,e[t]])})}return p.forEach(function(e){var r=e[0],a=e[1],s=!1;if(r&&n(r)){if("function"!=typeof t[a]){var l=e[2];if(!l||!vt.call(t.duals,l))return void console.log("warning: invalid listen target ("+a+").");if(l===r&&t===o)return void console.log("warning: can not connect dual ("+r+") to self.");s=!0,a=l}var u=t.$gui.connectBy,p=-1,c=u[a];c?(p=c.findIndex(function(e){return e[0]===o&&e[1]===r}))>=0&&(c[p][2]=s):c=u[a]=[],p<0&&c.push([o,r,s]),p=-1,(c=i.connectTo[r])?(p=c.findIndex(function(e){return e[0]===t&&e[1]===a}))>=0&&(c[p][2]=s):c=i.connectTo[r]=[],p<0&&c.push([t,a,s])}else console.log("warning: listen source ("+r+") inexistent.")}),this}},{key:"unlisten",value:function(e,t,r){if("function"==typeof t){if("string"!=typeof e||!e)return console.log("warning: invalid unlisten source."),this;if(u=(a=this.$gui).connectTo[e]){var n=u.findIndex(function(e){return null===e[0]&&e[1]===t});n>=0&&(u.splice(n,1),0==u.length&&delete a.connectTo[e])}return this}if(!t||!t.$gui)return console.log("warning: invalid unlisten target."),this;var i,o=[],a=this.$gui;if(Array.isArray(e))e.forEach(function(e){var t=("on-"+e).replace(Tt,function(e,t){return t.toUpperCase()});o.push([e,t])});else if("string"==(i=void 0===e?"undefined":ze(e))){if("*"==e){var s=a.connectTo;return Object.keys(s).forEach(function(e){var r,n=s[e];if(n&&(r=n.length)>0){for(;--r>=0;)n[r][0]===t&&n.splice(r,1);0==n.length&&delete s[e]}}),this}if(r&&"string"==typeof r){if("*"==r){var l,u=(s=a.connectTo)[e];if(u&&(l=u.length)>0){for(;--l>=0;)u[l][0]===t&&u.splice(l,1);0==u.length&&delete s[e]}return this}}else r=("on-"+e).replace(Tt,function(e,t){return t.toUpperCase()});o.push([e,r])}else{if(!action||"object"!=i)return this;Object.keys(e).forEach(function(t){o.push([t,e[t]])})}return o.forEach(function(e){var r=e[0],n=e[1],i=a.connectTo[r];if(i){var o=i.findIndex(function(e){return e[0]===t&&e[1]===n});o>=0&&(i.splice(o,1),0==i.length&&delete a.connectTo[r])}}),this}},{key:"getHtmlNode",value:function(e){if(this.state["tagName."]||e)return ct(e||this);var t=this.widget;if(t){for(var r=Object.keys(t),n=r.length,i=null,o=0;o=l)return null;s+=1,n=a,a=(o=o.parent)&&o.component}else for(;t&&a&&a.state.role!==t;)a=(o=o.parent)&&o.component;return a||null}},{key:"childOf",value:function(e,t){var r,n=this,i=n.widget;if(t)for(;i;){var o=n.$gui.comps,a=o.length;for(r=0;r=a)return null}else if(e){var u=i[e];return u&&u.component||null}return null}},{key:"componentOf",value:function(e){var t=void 0===e?"undefined":ze(e);if("number"==t){var r=[],n=A(this,e,r,0);return n&&r[1]?n:(console.log("warning: locate callspace ("+e+") failed."),null)}if("string"!=t)return null;var i=e[0];if("."!=i&&"/"!=i){var o=this.widget,a=o&&o.W(e);return a&&a.component||null}return oe(this,e)}},{key:"elementOf",value:function(e){var t,r=null,n="",i=void 0===e?"undefined":ze(e);if("number"==i)r=(r=this.componentOf(e))&&r.widget;else if(e){if("string"!=i)return null;if("."!=(t=e[0])&&"/"!=t)r=this.widget,n=e;else{var o=e.lastIndexOf("./");if(o>=0){if(!(f=this.componentOf(e.slice(0,o+2))))return null;r=f.widget,n=e.slice(o+2)}else{if("."!=t)return"/"==t&&"/"==e[1]&&(h=this.parentOf())?h.elementOf(e.slice(2)):null;if(r=qe,!(n=e.slice(1)))return null}}}else r=this.widget;if(!r)return null;if(!n){if(f=r.component){var a=r.parent;if((h=a&&a.component)&&"number"==typeof(d=h.$gui.compIdx[f.$gui.keyid]))return h.$gui.comps[d]}return null}if(n.indexOf("/")>=0)return null;for(var s,l=n.split("."),u=l.length-1,p=0;s=l[p];p++){var c=r[s];if(!Array.isArray(c)||!c.W){var f=r.component;return f&&f.props["isTemplate."]?f.elementOf(l.slice(p).join(".")):null}if(!(p=0;o--){var a=n.comps[o];if(a){var s=b(a);return a=s&&e[s],a?a.component:void 0}}}}},{key:"nextSibling",value:function(){var e=this.widget,t=this.$gui.keyid,r=(e=e&&e.parent)&&e.component;if(r&&(t||0===t)){var n=r.$gui,i=n.compIdx[t];if("number"==typeof i)for(var o=n.comps.length,a=i+1;an)&&(Ge.instantShow("warning: invalid keyid ("+t+")"),t=n),[i&&t==n,t]}var r=void 0,n=!1,i=arguments.length;i>0&&("function"!=typeof(r=arguments[i-1])?r=void 0:i-=1);var o=this.widget,a=o===nt,s=this.$gui;if(!o)return Ge.instantShow("warning: invalid target widget in setChild()."),e();if(!this.isHooked)return Ge.instantShow("warning: can not add child to unhooked widget."),e();if(this.props["isTemplate."])if(at){for(var l=s.template,u=0;u=0;v--){var y,_=g[v],m=_&&b(_);m?(d.unshift(m),f(_.props.className,"rewgt-static")?g[v]=ft(_,{key:m}):(y=($=parseInt(m))+""===m?$:m)!==_.props["keyid."]&&(g[v]=ft(_,{"keyid.":y,key:m}))):(g.splice(v,1),h+=1,n=!0)}for(var w=void 0,k="",O=0;O=0&&(d.splice(R,1),g.splice(R,1),h+=1,n=!0),k="",w=void 0):"+"==k&&(R=d.indexOf(P))<0&&(k="")}else if(P&&dt(P)){if(f(P.props.className,"rewgt-static")){console.log("warning: setChild() not support rewgt-static."),k="",w=void 0;continue}var j=!0,D=P.props["childInline."];void 0===D||(1==p||2==p?f(P.props.className,["rewgt-panel","rewgt-unit"])||(j=!1):D||(j=!1));var N=void 0,E=!0;"+"==k&&void 0!==w?N=w:E=!1;var I,A=!1;if("+"!=k&&void 0!==w)I=w;else{var T=t(P);A=T[0],I=T[1]}if(j){P.props["isReference."]&&("string"==typeof I?"$"!=I[0]&&(I="$"+I):I="$"+I,it&&st.push([this,I]));var C=A||E?-1:d.indexOf(I+"");if(C>=0)g[C]=[I,P];else{var R=E?d.indexOf(N+""):-1;if(R>=0?(g.splice(R,0,[I,P]),d.splice(R,0,I+"")):(g.push([I,P]),d.push(I+"")),E&&!A){var H=d.indexOf(I+"");H>=0&&H==R&&R>=0&&(H=d.indexOf(I+"",R+1)),H>=0&&(g.splice(H,1),d.splice(H,1),h+=1)}}n=!0}else Ge.instantShow("error: display type of child widget ("+I+") mismatch to owner ("+o.getPath()+").");k="",w=void 0}else if(Array.isArray(P))for(var W=P.length,M="",F=void 0,L=0;L=0&&(d.splice(Z,1),g.splice(Z,1),h+=1,n=!0),M="",F=void 0):"+"==M&&(Z=d.indexOf(z))<0&&(M="")}else if(z&&dt(z)){if(f(z.props.className,"rewgt-static")){console.log("warning: setChild() not support rewgt-static."),M="",F=void 0;continue}var U=!0,q=z.props["childInline."];void 0===q||(1==p||2==p?f(z.props.className,["rewgt-panel","rewgt-unit"])||(U=!1):q||(U=!1));var Y=!0;"+"==M&&void 0!==F?F:"+"==k&&void 0!==w?insBefor2=w:Y=!1;var G,X=!1;if("+"!=M&&void 0!==F)G=F;else{var K=t(z);X=K[0],G=K[1]}if(U){z.props["isReference."]&&("string"==typeof G?"$"!=G[0]&&(G="$"+G):G="$"+G,it&&st.push([this,G]));var J=X||Y?-1:d.indexOf(G+"");if(J>=0)g[J]=[G,z];else{var Z=Y?d.indexOf(insBefor2+""):-1;if(Z>=0?(g.splice(Z,0,[G,z]),d.splice(Z,0,G+"")):(g.push([G,z]),d.push(G+"")),Y&&!X){var Q=d.indexOf(G+"");Q>=0&&Q==Z&&Z>=0&&(Q=d.indexOf(G+"",Z+1)),Q>=0&&(g.splice(Q,1),d.splice(Q,1),h+=1)}}n=!0}else Ge.instantShow("error: display type of child widget ("+G+") mismatch to owner ("+o.getPath()+").");M="",F=void 0}}}if(n){var ee=!1;!a&&s.isPanel&&(f(this.props.className+" "+this.props.klass,["col-reverse","reverse-col"])?ee=!0:!0);var te=null,re=0,ne=0;s.isPanel&&Array.isArray(this.props.sizes)&&(te=this.state.sizes,Array.isArray(te)&&(ee?ne=te.length:re=te.length));for(var ie=g.length,oe=[],ae={},v=0;v=1||0==n?n:n<=-1?r?0:n:"number"!=typeof e?null:n>=.9999?e:n>=0?n*e:r?0:n>-.9999?n*e:-e}function t(e,t,r){return null===e?"":e>=1?e+"px":0==e||r&&e<0?"0":e<=-1?e+"px":t?"0":e>=.9999?"100%":e<=-.9999?"-100%":100*e+"%"}function r(e,t,r,n){return null===t||t>=1?t:0==t||n&&t<0?0:t<=-1?t:"number"!=typeof e?null:r?0:t>=.9999?e:t<=-.9999?-e:t*e}var n=this.state.parentWidth,i=this.state.parentHeight,o="number"!=typeof n,a="number"!=typeof i,s=this.state.padding,l=this.state.borderWidth,u=this.state.margin,p=null,c=null;"number"==typeof this.state.left&&(p=e(n,this.state.left,!1)),"number"==typeof this.state.top&&(c=e(i,this.state.top,!1));var f=[0,0,0,0],h=[0,0,0,0],d=[0,0,0,0],g={};o?(s.forEach(function(e,r){g["padding"+Ct[r]]=t(e,!1,!0)}),l.forEach(function(e,r){g["border"+Ct[r]+"Width"]=t(e,!0,!0)}),u.forEach(function(e,r){g["margin"+Ct[r]]=t(e,!1,!1)})):(s.forEach(function(e,t){var i=r(n,e,!1,!0);g["padding"+Ct[t]]=null===i?"":i+"px",f[t]=i||0}),l.forEach(function(e,t){var i=r(n,e,!0,!0);g["border"+Ct[t]+"Width"]=null===i?"":i+"px",h[t]=i||0}),u.forEach(function(e,t){var i=r(n,e,!1,!1);g["margin"+Ct[t]]=null===i?"":i+"px",d[t]=i||0}));var v=this.widget,y=this.$gui,_=null,m=this.state.minWidth,b=this.state.maxWidth,w=this.state.minHeight,k=this.state.maxHeight,O=this.state.width,x=this.state.height,P=null,S="number"!=typeof O||!(O>=1||0==O)&&o,$=null,j="number"!=typeof x||!(x>=1||0==O)&&a,D=!1,N=!1;if(!S){var E=null;O<0?(_=this.parentOf(!0))?"number"==typeof(A=_.$gui.sparedX)&&(E=A*(0-O)):_=void 0:E=e(n,O,!0),"number"!=typeof E?S=!0:(m&&Eb&&(E=b),(P=E-f[3]-f[1]-h[3]-h[1])<0?P=null:y.cssWidth!==P&&(D=!0))}if(!j){var I=null;if(x<0)if(null===_&&(_=this.parentOf(!0)),_){var A=_.$gui.sparedY;"number"==typeof A&&(I=A*(0-x))}else _=void 0;else I=e(i,x,!0);"number"!=typeof I?j=!0:(w&&Ik&&(I=k),($=I-f[0]-f[2]-h[0]-h[2])<0?$=null:y.cssHeight!==$&&(N=!0))}m&&(m=Math.max(0,m-f[3]-f[1]-h[3]-h[1])),b&&(b=Math.max(0,b-f[3]-f[1]-h[3]-h[1])),w&&(w=Math.max(0,w-f[0]-f[2]-h[0]-h[2])),k&&(k=Math.max(0,k-f[0]-f[2]-h[0]-h[2])),y.cssWidth=P,y.cssHeight=$;var T=y.respared;if(y.respared=!1,v&&(y.isPanel||v===nt)&&(D||N||T||Ge.dragInfo.justResized)&&(y.useSparedX?(D||T)&&(y.sparedX=fe(this,v,!0,P),T=!0):y.useSparedY&&(N||T)&&(y.sparedY=fe(this,v,!1,$),T=!0),this.isHooked||T)){var C=this;setTimeout(function(){C.isHooked&&Q(C,Ge.dragInfo.inDragging)},0)}var R=Object.assign({},this.state.style,g);"number"!=typeof p?delete R.left:R.left=p+"px","number"!=typeof c?delete R.top:R.top=c+"px",S?delete R.width:R.width=P+f[3]+f[1]+h[3]+h[1]+"px",j?delete R.height:R.height=$+f[0]+f[2]+h[0]+h[2]+"px",m?R.minWidth=m+"px":delete R.minWidth,b?R.maxWidth=b+"px":delete R.maxWidth,w?R.minHeight=w+"px":delete R.minHeight,k?R.maxHeight=k+"px":delete R.maxHeight,this.state.style=R;var H=[];return y.comps.forEach(function(e){e&&H.push(e)}),H}},{key:"render",value:function(){if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState(),r=k(this),n=this.$gui.insertEle;return n&&(t=me(n,t)),ht(e,r,t)}}]),e}();Ye.Widget_=Rt;var Ht=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"BodyPanel",r))}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.className="rewgt-unit",e["keyid."]="body",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return this.defineDual("innerSize",function(e,t){throw new Error("duals.innerSize is readonly")},[e.parentWidth,e.parentHeight]),this.defineDual("nodes",we,[]),e}},{key:"renewPages",value:function(){if(!qe.__design__&&this.isHooked&&Ge.pageCtrl){var e=this.$gui.comps,t=this.widget,r=[];e.forEach(function(e){if(e&&e.props["isScenePage."]&&!e.props.noShow){var n=b(e),i=n&&t[n];(i=i&&i.component)&&r.push([n,i])}});var n=!1,i=Ge.pageCtrl.keys;if(i.length!=r.length)n=!0;else for(var o,a=0;o=i[a];a++)if(o!==r[a][0]){n=!0;break}n&&setTimeout(function(){Ge.pageCtrl.renewPages(r)},0)}}},{key:"componentDidMount",value:function(){Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this);var e=this.$gui;e.onWinResize&&window.addEventListener("resize",e.onWinResize,!1);var r=ct(this);r&&u(r)}},{key:"componentWillUnmount",value:function(){var e=this.$gui;e.onWinResize&&(window.removeEventListener("resize",e.onWinResize,!1),e.onWinResize=null),Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this)}},{key:"render",value:function(){return this.widget!==nt&&console.log("warning: BodyPanel only can be topmost widget."),Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this)}}]),t}(Rt);Ye.BodyPanel_=Ht,Ye.BodyPanel=new Ht;var Wt=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Panel",r))}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),i="[any]: null for auto, 0~1 for percent, 0.9999 for 100%, N pixels, -0.xx for spared percent",o=n.width,a=n.height;return o&&(o[3]=i),a&&(a[3]=i),n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.className="rewgt-panel",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return this.defineDual("nodes",we,[]),e}},{key:"isRow",value:function(){return!f(this.props.className+" "+this.state.klass,["col-reverse","reverse-col"])}},{key:"isReverse",value:function(){return f(this.props.className+" "+this.state.klass,["reverse-row","reverse-col"])}},{key:"render",value:function(){return this.state["tagName."]||console.log("warning: Panel can not be virtual widget."),Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this)}}]),t}(Rt);Ye.Panel_=Wt,Ye.Panel=new Wt;var Mt=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Unit",r))}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),i="[any]: null for auto, 0~1 for percent, 0.9999 for 100%, N pixels, -0.xx for spared percent",o=n.width,a=n.height;return o&&(o[3]=i),a&&(a[3]=i),n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.className="rewgt-unit",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return l(this)&&(this.duals.style=Object.assign({},this.props.style,{position:"absolute"})),e}}]),t}(Rt);Ye.Unit_=Mt,Ye.Unit=new Mt;var Ft=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"SplitDiv",r));return i._defaultProp.width=4,i._defaultProp.height=4,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.width=4,e.height=4,e}},{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),i="[number]: 0~1 for percent, 0.9999 for 100%, N pixels";return n.width=[r+1,"number",null,i],n.height=[r+2,"number",null,i],n}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);this.$gui.comps=[];var r=this.parentOf(!0),n=this.widget;if(!r)return Ge.instantShow("error: no owner widget for SplitDiv"),e;if(!f(r.props.className,"rewgt-panel"))return Ge.instantShow("error: owner of widget ("+n.getPath()+") is not rewgt-panel"),e;var i=!0;return f(r.props.className+" "+r.props.klass,["col-reverse","reverse-col"])&&(i=!1),Object.assign(this.$gui,{inRow:i,reversed:!1,inDrag:!1,dragStartX:0,dragStartY:0,resizeOwner:void 0,resizeTarg:void 0,sizingFunc:null}),this.defineDual("id__",function(e,t){if(1==t){var r=this.state;i?(("number"!=typeof r.width||r.width<1)&&(r.width=4),r.width>=1&&(r.minWidth=r.width,r.maxWidth=r.width),this.props.height>=1&&this.props.height<=4&&(r.height=.9999),void 0===this.props.minHeight&&(r.minHeight=10)):(("number"!=typeof r.height||r.height<1)&&(r.height=4),r.height>=1&&(r.minHeight=r.height,r.maxHeight=r.height),this.props.width>=1&&this.props.width<=4&&(r.width=.9999),void 0===this.props.minWidth&&(r.minWidth=10));var n={cursor:i?"ew-resize":"ns-resize"},o=!1;for(var a in r.style)if(0==a.indexOf("background")){o=!0;break}o||(n.backgroundColor="#ddd"),r.style=Object.assign({},r.style,n)}}),e}},{key:"$$onMouseDown",value:function(e){function t(e,t){var r=o.resizeOwner,n=o.resizeTarg;if(r&&n){var i=!1,a=-1,s=-1;if(o.inRow){a=n.state.width;var l=e-o.dragStartX;if(0!=l){var u=n.state.minWidth,p=n.state.maxWidth,c=a<1?a*n.state.parentWidth:a;if(a=o.reversed?c-l:c+l,u&&ap&&(a=p),a<1&&(a=1),a!=c){v=a-c;o.reversed&&(v=-v),v!=l&&(e+=v-l),o.dragStartX=e,o.dragStartY=t,o.sizingFunc?o.sizingFunc(n,a,s,!o.inDrag):(n.state.width=a,ge(r,!o.inDrag,function(){n.reRender()})),i=!0}}}else{s=n.state.height;var f=t-o.dragStartY;if(0!=f){var h=n.state.minHeight,d=n.state.maxHeight,g=s<1?s*n.state.parentHeight:s;if(s=o.reversed?g-f:g+f,h&&sd&&(s=d),s<1&&(s=1),s!=g){var v=s-g;o.reversed&&(v=-v),v!=f&&(t+=v-f),o.dragStartX=e,o.dragStartY=t,o.sizingFunc?o.sizingFunc(n,a,s,!o.inDrag):(n.state.height=s,ge(r,!o.inDrag,function(){n.reRender()})),i=!0}}}i||o.inDrag||!(a>=1||s>=1)||(o.sizingFunc?o.sizingFunc(n,a,s,!0):ge(r,!0,function(){n.reRender()}))}}function r(e){if(!o.inDrag){var r=i.parentOf(!0);if(!r||!r.$gui.isPanel)return;if(Array.isArray(r.props.sizes))return;var n=!1,a=o.inRow;if(a?Math.abs(e.clientX-o.dragStartX)>=4&&(n=!0):Math.abs(e.clientY-o.dragStartY)>=4&&(n=!0),n){for(var s=i.prevSibling();s;){var l=a?s.state.width:s.state.height,u=a?s.state.minWidth:s.state.minHeight,p=a?s.state.maxWidth:s.state.maxHeight;if("number"==typeof l&&l>0&&(0==u||0==p||u!=p)){o.reversed=f(r.props.className+" "+r.state.klass,["reverse-row","reverse-col"]),o.resizeOwner=r,o.resizeTarg=s,o.inDrag=!0,Ge.dragInfo.inDragging=!0;break}s=s.prevSibling()}var c;if(!o.inDrag&&!i.nextSibling()&&(c=r.parentOf(!0))&&r.$gui.sparedTotal>.989&&r.$gui.sparedTotal<=1.01){var l=a?r.state.width:r.state.height,u=a?r.state.minWidth:r.state.minHeight,p=a?r.state.maxWidth:r.state.maxHeight;if("number"==typeof l&&l>0&&.9999!=l&&(0==u||0==p||u!=p)&&(o.reversed=f(c.props.className+" "+c.state.klass,["reverse-row","reverse-col"]),o.resizeOwner=c,o.resizeTarg=r,o.inDrag=!0,Ge.dragInfo.inDragging=!0),!o.inDrag&&"number"==typeof l&&l>0&&c.$gui.sparedTotal>.989&&c.$gui.sparedTotal<=1.01){var h=c.parentOf(!0);if(h){var l=a?c.state.width:c.state.height,u=a?c.state.minWidth:c.state.minHeight,p=a?c.state.maxWidth:c.state.maxHeight;"number"==typeof l&&l>0&&.9999!=l&&(0==u||0==p||u!=p)&&(o.reversed=f(h.props.className+" "+h.state.klass,["reverse-row","reverse-col"]),o.resizeOwner=h,o.resizeTarg=c,o.inDrag=!0,Ge.dragInfo.inDragging=!0)}}if(o.inDrag){var d=o.resizeOwner.$gui.onCellSizing;d&&(o.sizingFunc=d)}}}}o.inDrag&&(e.stopPropagation(),t(e.clientX,e.clientY))}function n(e){Ge.dragInfo.inDragging=!1,o.inDrag=!1,setTimeout(function(){lt=!1},300),document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),e.stopPropagation(),t(e.clientX,e.clientY),o.resizeOwner=null,o.resizeTarg=null,o.sizingFunc=null}var i=this,o=this.$gui;o.dragStartX=e.clientX,o.dragStartY=e.clientY,o.inDrag=!1,lt=!0,document.addEventListener("mouseup",n,!1),document.addEventListener("mousemove",r,!1),e.stopPropagation(),this.$onMouseDown&&this.$onMouseDown(e)}},{key:"$onClick",value:function(e){e.stopPropagation()}}]),t}(Mt);Ye.SplitDiv_=Ft,Ye.SplitDiv=new Ft;var Lt=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"GridPanel",r))}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.sizes=[r+1,"any",null,"[any]: [0.2,0.3,-0.4,-0.6], negative value stand for left space"],n.cellSpacing=[r+2,"number",null,"[number]: 0,1,2,..."],n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.sizes=[.3,.3,-1],e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);if(!Array.isArray(this.props.sizes))return e;var r=this.$gui;return r.inRow=!f(r.className+" "+this.props.klass,["col-reverse","reverse-col"]),this.defineDual("cellSpacing",function(e,t){r.comps.length&&(r.useSparedX||r.useSparedY)&&(r.respared=!0)}),e.sizes=null,this.defineDual("sizes",function(e,t){if(Array.isArray(e)){e=this.state.sizes=e.slice(0);var n=!1,i=!1,o=0,a=this.widget===nt;!a&&r.isPanel||(e.splice(0),n=!0,a&&console.log("error: only none-topmost panel can use props.sizes"));for(var s=e.length-1;s>=0;s--){var l=e[s];"number"!=typeof l||isNaN(l)?(e[s]=null,n=!0):l<0&&(i=!0,o+=-l)}var u=!1,p=!1;f(this.props.className+" "+this.state.klass,["col-reverse","reverse-col"])?p=!0:u=!0;var c=!q(e,t);if(!n&&i&&(u||p)){r.sparedTotal=o;var h=r.useSparedX,d=r.useSparedY;u?r.useSparedX=!0:r.useSparedY=!0,c||h==r.useSparedX&&d==r.useSparedY||(c=!0)}else r.sparedTotal=0,r.useSparedX=!1,r.useSparedY=!1;c&&(r.comps.length&&(r.removeNum+=1),r.respared=!0,this.reRender())}else this.state.sizes=null,r.sparedTotal=0,r.useSparedX=!1,r.useSparedY=!1,Array.isArray(t)&&(r.comps.length&&(r.removeNum+=1),this.reRender())}),this.defineDual("childNumId",function(e,t){var n=this.state.sizes;if(Array.isArray(n)){var i=0,o=n.length;r.comps.forEach(function(e,t){if(e)if(f(e.props.className,"rewgt-static"))i++;else if(e.props["isReference."])i++;else if(void 0!==e.props["childInline."]){var a=n[i++%o];r.inRow?e.props.width!==a&&(r.comps[t]=ft(e,{width:a})):e.props.height!==a&&(r.comps[t]=ft(e,{height:a}))}else i++})}}),r.onCellSizing=function(e,t,r,n){var i=e.$gui.keyid,o=this.state.sizes;if(Array.isArray(o)){var a=this.$gui,s=a.compIdx[i],l=null,u=this.widget;if("number"==typeof s&&s>=0&&(l=a.comps[s]),l&&u){var p=o.length;if(a.inRow){if("number"==typeof t&&t>=0){t<1&&("number"!=typeof a.cssWidth?t=null:t*=a.cssWidth),o[v=s%p]=t;g=[];for(var c in a.compIdx)"number"==typeof(_=a.compIdx[c])&&_>=0&&_%p==v&&(m=(m=u[c])&&m.component)&&(m.state.width=t,g.push(m));ge(this,n,function(){for(var e,t=0;e=g[t];t++)e.reRender()})}else if("number"==typeof r&&r>=0){y=(v=Math.floor(s/p))+p;for(var c in a.compIdx)if("number"==typeof(_=a.compIdx[c])&&_>=v&&_=0){var f=m.state.minHeight,h=m.state.maxHeight,d=r;"number"==typeof r&&r<1&&(d="number"!=typeof a.cssHeight?null:r*a.cssHeight),f&&("number"!=typeof d||dh)&&(d=h),b!==d&&m.setState({height:d})}}}else if("number"==typeof r&&r>=0){r<1&&("number"!=typeof a.cssHeight?r=null:r*=a.cssHeight),o[v=s%p]=r;var g=[];for(var c in a.compIdx)"number"==typeof(_=a.compIdx[c])&&_>=0&&_%p==v&&(m=(m=u[c])&&m.component)&&(m.state.height=r,g.push(m));ge(this,n,function(){for(var e,t=0;e=g[t];t++)e.reRender()})}else if("number"==typeof t&&t>=0){var v=Math.floor(s/p),y=v+p;for(var c in a.compIdx){var _=a.compIdx[c];if("number"==typeof _&&_>=v&&_=0){var f=m.state.minWidth,h=m.state.maxWidth,d=t;"number"==typeof t&&t<1&&(d="number"!=typeof a.cssWidth?null:t*a.cssWidth),f&&("number"!=typeof d||dh)&&(d=h),b!==d&&m.setState({width:d})}}}}}}}}.bind(this),e}},{key:"render",value:function(){if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState();qe.__design__&&t.push(ht("div",{key:"$end",title:"end of GridPanel",style:{width:"100%",height:"10px",backgroundColor:"#eee"}}));var r=k(this),n=this.$gui.insertEle;return n&&(t=me(n,t)),ht(e,r,t)}}]),t}(Wt);Ye.GridPanel_=Lt,Ye.GridPanel=new Lt;var zt=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TableRow",r));return i._silentProp.push("isTableRow."),i._defaultProp.height=null,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="tr",e["isTableRow."]=!0,e.height=null,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);if(qe.__design__){var r=this;this.defineDual("childNumId",function(e,t){var n=r.parentOf(!0);n&&setTimeout(function(){n.reRender()},0)})}return e}},{key:"render",value:function(){var e=this.$gui,t=e.cssWidth,r=e.cssHeight;if(z(this),this["hide."])return null;var n=this.state["tagName."];if(!n)return ye(this);var i=e.cssWidth=this.state.parentWidth,o="number"!=typeof i||i<0,a=this.state.parentHeight,s=this.state.height,l="number"!=typeof s||s<0;l?a=e.cssHeight=null:s>=1?a=e.cssHeight=s:"number"==typeof a?s>=.9999?(e.cssHeight=a,("number"!=typeof a||a<0)&&(l=!0)):a=e.cssHeight=a*s:(a=e.cssHeight=null,l=!0);var u=t!==i,p=this.widget,c=[];if(this.$gui.comps.forEach(function(e){if(e){var t=b(e);if(t){var r,n,i,o,a,s=p&&p[t];(s=s&&s.component)?(r=s.state.width,n=s.state.height,i=s.state.colSpan,o=s.state.rowSpan,a=s.state.tdStyle):(r=e.props.width,n=e.props.height,i=e.props.colSpan,o=e.props.rowSpan,a=e.props.tdStyle);var f=t,h=parseInt(t);h+""===t&&(f=h);var d={key:t,"keyid.":f};i=parseInt(i),o=parseInt(o),i&&(d.colSpan=i+""),o&&(d.rowSpan=o+"");var g=null,v=null,y=!1;"number"==typeof r&&r>=0&&(g=r,d.style={width:r>=1?r+"px":r>=.9999?"100%":100*r+"%"}),"object"==(void 0===a?"undefined":ze(a))&&(d.style=Object.assign(d.style||{},a)),"number"==typeof n&&n>=0?n>=1?(v=n,!1):l?y=!0:v=n:!0,(u&&null!==g||y)&&(e=ft(e,{width:g,height:v})),c.push(ht("td",d,e))}}}),this.isHooked&&(!o&&t!==i||!l&&r!==a||Ge.dragInfo.justResized)){var f=this;setTimeout(function(){Q(f,Ge.dragInfo.inDragging)},0)}var h=Object.assign({},this.state.style);!l&&a>=0?h.height=a+"px":delete h.height;var d=k(this,h),g=e.insertEle;return g&&(c=me(g,c)),ht(n,d,c)}}]),t}(Mt);Ye.TableRow_=zt,Ye.TableRow=new zt;var Bt=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TablePanel",r));return i._defaultProp.height=null,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="table",e.className="rewgt-unit rewgt-table",e.height=null,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=this;return this.defineDual("childNumId",function(e,t){r.$gui.respared=!0}),e}},{key:"render",value:function(){var e=this.$gui,t=e.cssWidth,r=e.cssHeight;if(z(this),this["hide."])return null;var n=this.state["tagName."];if(!n)return ye(this);var i=this.prepareState();if(this.isHooked&&("number"==typeof e.cssWidth&&t!==e.cssWidth||"number"==typeof e.cssHeight&&r!==e.cssHeight||Ge.dragInfo.justResized)){var o=this;setTimeout(function(){Q(o,Ge.dragInfo.inDragging)},0)}var a=this.widget;if(qe.__design__&&a){var s=2,l=[];i.forEach(function(e){if(e){var t=0,r=0,n=!1;ne(e,a).forEach(function(e){for(var i=l[t]||0;i>=2;)l[t++]=i-1,r+=1,i=l[t]||0;var o=parseInt(e.props.rowSpan||0),a=parseInt(e.props.colSpan||0);if(a>=2)for(;a>=2;){a-=1;var s=Math.max(0,(l[t]||0)-1);l[t++]=Math.max(s,o),r+=1}var u=e.props.width;("number"!=typeof u||u<0)&&(n=!0),l[t++]=o,r+=1}),l.splice(t),n||(r+=1),r>s&&(s=r)}});for(var u={style:{margin:"10px"}},p={style:{margin:"2px"}},c=[],f=0;f1){var w=this.props[I],k=void 0===w?"undefined":ze(w);if("string"==k){if("$id__"!=I){var O=!1;"$for"==(I=I.slice(1))&&(I="for",O=!0),_t.indexOf(I)>=0?"for"==I?t.forExpr?console.log("warning: reduplicate property ($for)"):(t.forExpr=O?2:1,a.push(I)):u?console.log("error: property ($"+I+") conflict with previous ($"+u+")"):(u=I,"else"!=I&&a.push(I)):"children"==I?vt.call(this.props,"for.index")&&(t.isChildExpr=!0,t.children2=this.props.children):"key"!=I&&a.push(I);continue}k=void 0===(w=Ke[w])?"undefined":ze(w)}if("function"==k){if("$"==I[1]){console.log("warning: invalid using props."+I);continue}var x=I.slice(1);"id__"==x?v=w:this[I]=p[x]=be(w)?w.bind(this):w}}else{var P=At[I];P&&5!=P&&n.push(I)}t.flowFlag=u,t.dataset2=o.slice(0);var S=this.props["keyid."];if(S){var $=void 0===S?"undefined":ze(S);"string"!=$&&"number"!=$&&(S=void 0)}var j=this.props["hookTo."];"string"==typeof j&&(j=qe.W(j)),Array.isArray(j)&&j.W&&(void 0!==S?j.$set(S,j.W(this)):S=j.push(j.W(this))-1,t.keyid=S);var D=this.props["data-rewgt-owner"];if(D){var N,E=t.eventset2={};if(j&&(N=j.component))for(var I,y=Object.keys(N.$gui.eventset),_=0;I=y[_];_++)r[I]=_e(this,I,D),E[I]=!0}var A=Object.assign({},d,p);for(var C in A)r[C]=_e(this,C,D);for(var C in g)r[C]=this["$$"+C];Object.defineProperty(this,"$gui",{enumerable:!1,configurable:!1,writable:!1,value:t}),qe.__design__&&(t.className=h(t.className,"rewgt-inline"));Object.assign({},this.props.style);var R={id__:0,childNumId:0,duals:[],"tagName.":this.props["tagName."],exprAttrs:a.slice(0),klass:"",style:{},"html.":null};if(qe.__design__){var H=e._getGroupOpt(this);R["data-group.opt"]=H.type+"/"+H.editable}t.compIdx={},t.comps=gt(this.props.children),Object.defineProperty(this.duals,"keyid",{enumerable:!0,configurable:!0,get:function(){return this.$gui.keyid}.bind(this),set:function(e,t){throw new Error("property (keyid) is readonly")}}),this.defineDual("klass",function(e,t){this.state.klass=e||""}),this.defineDual("style",function(e,t){if(this.state["tagName."])this.state.style=Object.assign({},t,e);else{var r=Ge.eachComponent(this)[0];r&&(r.duals.style=e)}}),this.defineDual("html.",function(e,t){this.state["html."]=e||null}),this.defineDual("id__",function(e,r){this.state.id__=e,t.id__=t.id2__=e}),v&&this.defineDual("id__",v),this.defineDual("trigger",ve);var W=this.widget;return j&&W&&s&&(W.$callspace={flowFlag:"ref",forSpace:null},W.$callspace[s]=l,T(W.$callspace.exprSpace={},this)),this.defineDual("childNumId",function(e,r){var n=this,i=this.widget;if(i){0==r&&i.parent===nt&&console.log("warning: can not hook inline widget to topmost directly.");var o=t.compIdx,a=t.comps,s=!1;a.forEach(function(e,r){if("string"==typeof e){if(0==r&&1==a.length&&vt.call(n.duals,"html."))return setTimeout(function(){n.duals["html."]=e},0),void(s=!0);e=a[r]=ht(yr,{"html.":e})}else if(!e)return;var l,u=b(e),p=!1;if(u){var c=parseInt(u);l=c+""===u?c:u,"number"==typeof o[u]&&(p=!0)}else u=(l=r+t.removeNum)+"";if(f(e.props.className,"rewgt-static")){if(p)return void(o[l]=r);var h=Object.assign({},e.props);return h.key=u,!qe.__design__||n.props.$for||n.props.$$for||(h.onMouseDown=K,h.onDoubleClick=J.bind(n)),o[l]=r,void(a[r]=ht("span",h))}var d=e.props["childInline."];return void 0===d?(o[l]=r,void(p||(a[r]=ft(e,{key:u})))):d?(!p&&e.props["isReference."]&&("$"!=u[0]&&(u=l="$"+u),it&&st.push([n,l])),p&&i!==e.props["hookTo."]&&(p=!1),o[l]=r,void(p||(a[r]=ft(e,{"hookTo.":i,key:u,"keyid.":l})))):(a[r]=void 0,void console.log("warning: widget ("+i.getPath()+"."+u+") can not be panel"))}),s&&a.splice(0)}}),R}},{key:"willResizing",value:function(e,t,r){return!1}},{key:"prepareState",value:function(){console.log("warning: inline widget not support prepareState()")}},{key:"render",value:function(){if(z(this),this["hide."])return ht("span",gr);var e=this.state["tagName."];if(!e)return ye(this);var t=k(this),r=this.$gui.comps,n=r.length,i=this.$gui.insertEle;return i&&(r=me(i,r),n=!0),ht(e,t,n?r:this.state["html."])}}]),t}(Rt);Ye.Span_=vr,Ye.Span=new vr;var yr=Ye.Span._createClass(null),_r=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"VirtualSpan",r))}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="",e}}]),t}(vr);Ye.VirtualSpan_=_r,Ye.VirtualSpan=new _r;var mr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"HiddenSpan",r))}return i(t,e),Le(t,[{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return qe.__design__||(this.duals.style={display:"none"}),e}}]),t}(vr);Ye.HiddenSpan_=mr,Ye.HiddenSpan=new mr;var br=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Br",r));return i._htmlText=!1,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="br",e}}]),t}(vr);Ye.Br_=br,Ye.Br=new br;var wr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"A",r))}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="a",e}},{key:"$$onClick",value:function(e){qe.__design__&&e.preventDefault(),this.$onClick&&this.$onClick(e)}}]),t}(vr);Ye.A_=wr,Ye.A=new wr,Ye.Q_=ke(vr,"Q"),Ye.Q=new Ye.Q_,Ye.Abbr_=ke(vr,"Abbr"),Ye.Abbr=new Ye.Abbr_;var kr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Audio",r))}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.src=[r+1,"string",null],n.autoPlay=[r+2,"string",["","1"]],n.controls=[r+3,"string",["","1"]],n.loop=[r+4,"string",["","1"]],n.muted=[r+5,"string",["","1"]],n.preload=[r+6,"string",["auto","meta","none"]],n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="audio",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Oe(this),e}}]),t}(vr);Ye.Audio_=kr,Ye.Audio=new kr,Ye.Source_=ke(vr,"Source"),Ye.Source=new Ye.Source_,Ye.Track_=ke(vr,"Track"),Ye.Track=new Ye.Track_,Ye.Bdi_=ke(vr,"Bdi"),Ye.Bdi=new Ye.Bdi_,Ye.Bdo_=ke(vr,"Bdo"),Ye.Bdo=new Ye.Bdo_,Ye.Data_=ke(vr,"Data"),Ye.Data=new Ye.Data_,Ye.Mark_=ke(vr,"Mark"),Ye.Mark=new Ye.Mark_,Ye.Wbr_=ke(vr,"Wbr"),Ye.Wbr=new Ye.Wbr_,Ye.Button_=ke(vr,"Button"),Ye.Button=new Ye.Button_;var Or=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Textarea",r))}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.disabled=[r+1,"string",["","1"]],n.readonly=[r+2,"string",["","1"]],n.placeholder=[r+3,"string"],n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="textarea",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=void 0!==this.props.value?this.props.value||"":this.props.defaultValue||"";return this.defineDual("value",null,r),e}},{key:"$$onChange",value:function(e){this.duals.value=e.target.value,this.$onChange&&this.$onChange(e)}}]),t}(vr);Ye.Textarea_=Or,Ye.Textarea=new Or;var xr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Progress",r))}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.value=[r+1,"string"],n.max=[r+2,"string"],n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="progress",e}}]),t}(vr);Ye.Progress_=xr,Ye.Progress=new xr;var Pr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Img",r));return i._htmlText=!1,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="img",e}},{key:"$$onDragStart",value:function(e){qe.__design__?e.preventDefault():this.$onDragStart&&this.$onDragStart(e)}}]),t}(vr);Ye.Img_=Pr,Ye.Img=new Pr;var Sr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Video",r))}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="video",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Oe(this),e}}]),t}(vr);Ye.Video_=Sr,Ye.Video=new Sr,Ye.Canvas_=ke(vr,"Canvas"),Ye.Canvas=new Ye.Canvas_,Ye.Picture_=ke(vr,"Picture"),Ye.Picture=new Ye.Picture_,Ye.Map_=ke(vr,"Map"),Ye.Map=new Ye.Map_,Ye.Area_=ke(vr,"Area"),Ye.Area=new Ye.Area_,Ye.Time_=ke(vr,"Time"),Ye.Time=new Ye.Time_,Ye.Output_=ke(vr,"Output"),Ye.Output=new Ye.Output_;var $r=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Input",r));return i._htmlText=!1,i}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return Object.assign(n,{type:[r+1,"string",["text","button","checkbox","file","hidden","image","password","radio","reset","submit","color","date","datetime","datetime-local","email","month","number","range","search","tel","time","url","week"]],checked:[r+2,"string",["","1"]],disabled:[r+3,"string",["","1"]],readonly:[r+4,"string",["","1"]],value:[r+5,"string"],placeholder:[r+6,"string"],min:[r+7,"string"],max:[r+8,"string"],step:[r+9,"string"],pattern:[r+10,"string"],src:[r+11,"string"],defaultValue:[r+12,"string"],defaultChecked:[r+13,"string"],required:[r+14,"string",["","required"]]}),n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="input",e.type="text",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=this.props.type;if("checkbox"===r||"radio"===r){var n=s(void 0!==this.props.checked?this.props.checked:this.props.defaultChecked);this.defineDual("checked",null,n)}else if("select"==r&&this.props.multiple){i=this.props.value||this.props.defaultValue;Array.isArray(i)||(i=[]),this.defineDual("value",null,i)}else{var i=void 0!==this.props.value?this.props.value||"":this.props.defaultValue||"";this.defineDual("value",null,i)}return e}},{key:"$$onChange",value:function(e){var t=this.props.type,r=e.target;if("checkbox"===t||"radio"===t)this.duals.checked=r.checked;else if("select"==t&&this.props.multiple){for(var n=[],i=r.options,o=i&&i.length||0,a=0;a=0;o--){var p=r.navOrder[o];p[1]?e(p[0])<0&&i.splice(u,0,p):(s=e(p[0]))<0?r.navOrder.splice(o,1):u=s}r.navOrder=i},this.defineDual("childNumId",function(e,t){r.updateNavItems()}),e}},{key:"listOptComp",value:function(e){function t(n){var i=n.component;if(i)if(i.props["isOption."])if(e){if(e===i.$gui.keyid)return r.push(i),!0}else r.push(i);else{if(i.props["isNavigator."])return!1;for(var o=i.$gui.comps,a=o.length,s=0;s=0;)(s=t[i]).props["isPlayground."]&&(n&&n==b(s)?o=!0:t.splice(i,1)),i-=1;if(!o&&n){var a=this.$gui,s=a.navItems[n];if(s){var l=a.navOrder.findIndex(function(e){return e[0]===n});if(l<0)t.push(s);else{for(var u,p,c=a.navOrder.slice(l+1),f=0,h=!1;(u=c.findIndex(function(e,t){return t>=f&&!e[1]}))>=0;){if((p=function(e,t){for(var r,n=0;r=e[n];n++)if(t==b(r))return n;return-1}(t,c[u][0]))>=0){h=!0;break}f=u}h?t.splice(p,0,s):t.push(s)}}}}var d=k(this),g=this.$gui.insertEle;return g&&(t=me(g,t)),ht(e,d,t)}}]),t}(Wt);Ye.NavPanel_=Ir,Ye.NavPanel=new Ir;var Ar=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"NavDiv",r));return i._defaultProp.height=null,i._defaultProp.minHeight=20,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.className="rewgt-unit",e["isNavigator."]=2,e.height=null,e.minHeight=20,e}}]),t}(Ir);Ye.NavDiv_=Ar,Ye.NavDiv=new Ar;var Tr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"GroundPanel",r));return i._silentProp.push("isPlayground."),i._defaultProp.height=null,i._defaultProp.minHeight=20,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isPlayground."]=1,e.width=.9999,e.height=null,e.minHeight=20,e}},{key:"render",value:function(){return qe.__design__?Pe(this,1):Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this)}}]),t}(Wt);Ye.GroundPanel_=Tr,Ye.GroundPanel=new Tr;var Cr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"GroundDiv",r));return i._silentProp.push("isPlayground."),i._defaultProp.height=null,i._defaultProp.minHeight=20,i._htmlText=!0,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.width=.9999,e.height=null,e.minHeight=20,e["isPlayground."]=2,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return e["html."]=null,this.defineDual("html.",function(e,t){this.state["html."]=e||null}),e}},{key:"render",value:function(){if(qe.__design__)return Pe(this,2);if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState(),r=t.length,n=k(this),i=this.$gui.insertEle;return i&&(t=me(i,t),r=!0),ht(e,n,r?t:this.state["html."])}}]),t}(Mt);Ye.GroundDiv_=Cr,Ye.GroundDiv=new Cr;var Rr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptSpan",r));return i._statedProp.push("data-checked"),i._silentProp.push("isOption."),i._defaultProp["data-checked"]="",i}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){return r=r||1200,Ee(Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),r)}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["data-checked"]="",e["isOption."]=!0,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Ne(this,e),e}},{key:"findNavOwner",value:function(){return Se(this)}},{key:"fireTrigger",value:function(){O(void 0,this)}},{key:"clearChecked",value:function(){this.state["data-checked"]&&(this.duals["data-checked"]="")}},{key:"setChecked",value:function(e,t,r){De(this,e,t,r)}},{key:"$$onClick",value:function(e){qe.__design__&&e.stopPropagation(),this.state.disabled||(this.setChecked(null),this.$onClick&&this.$onClick(e))}}]),t}(vr);Ye.OptSpan_=Rr,Ye.OptSpan=new Rr;var Hr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptA",r))}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="a",e}},{key:"$$onClick",value:function(e){qe.__design__&&e.preventDefault(),Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"$$onClick",this).call(this,e)}}]),t}(Rr);Ye.OptA_=Hr,Ye.OptA=new Hr;var Wr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptImg",r));return i._htmlText=!1,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="img",e}}]),t}(Rr);Ye.OptImg_=Wr,Ye.OptImg=new Wr;var Mr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptButton",r))}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="button",e}}]),t}(Rr);Ye.OptButton_=Mr,Ye.OptButton=new Mr;var Fr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptOption",r));return i._silentProp.push("selected"),i}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.value=[r+1,"string"],n.label=[r+2,"string"],n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="option",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=(this.$gui,this.parentOf(!0));return r&&("optgroup"==r.props["tagName."]&&(r=r.parentOf(!0)),r&&"select"==r.props["tagName."]?r.props.multiple?(console.log('error: can not use OptOption in multiple "select"'),r=null):r.listen("value",function(e,t){this.isHooked&&this.$gui.syncSelect()}.bind(this)):r=null),this.$gui.syncSelect=function(){if(r&&!this.state.disabled){var e=this.state.value;e&&(this.duals["data-checked"]=s(e===r.state.value))}}.bind(this),this.defineDual("data-checked",function(e,t){var n=s(e);vt.call(this.props,"selected")&&(this.state.selected=n);var i=this;setTimeout(function(){var e=i.getHtmlNode();if(e&&(e.selected=!!n,n&&r)){var t=i.state.value;t&&(r.duals.value=t)}},0)}),e}},{key:"componentDidMount",value:function(){Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this),this.$gui.syncSelect()}},{key:"$$onClick",value:function(e){this.$onClick&&this.$onClick(e)}}]),t}(Rr);Ye.OptOption_=Fr,Ye.OptOption=new Fr;var Lr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptDiv",r));return i._statedProp.push("data-checked"),i._silentProp.push("isOption."),i._defaultProp["data-checked"]="",i}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){return r=r||1200,Ee(Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),r)}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["data-checked"]="",e["isOption."]=!0,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Ne(this,e),e}},{key:"findNavOwner",value:function(){return Se(this)}},{key:"fireTrigger",value:function(){O(void 0,this)}},{key:"clearChecked",value:function(){this.state["data-checked"]&&(this.duals["data-checked"]="")}},{key:"setChecked",value:function(e,t,r){De(this,e,t,r)}},{key:"$$onClick",value:function(e){qe.__design__&&e.stopPropagation(),this.state.disabled||(this.setChecked(null),this.$onClick&&this.$onClick(e))}}]),t}(Vt);Ye.OptDiv_=Lr,Ye.OptDiv=new Lr;var zr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptLi",r));return i._statedProp.push("data-checked"),i._silentProp.push("isOption."),i._defaultProp["data-checked"]="",i}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){return r=r||1200,Ee(Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),r)}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="li",e["data-checked"]="",e["isOption."]=!0,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Ne(this,e),e}},{key:"findNavOwner",value:function(){return Se(this)}},{key:"fireTrigger",value:function(){O(void 0,this)}},{key:"clearChecked",value:function(){this.state["data-checked"]&&(this.duals["data-checked"]="")}},{key:"setChecked",value:function(e,t,r){De(this,e,t,r)}},{key:"$$onClick",value:function(e){qe.__design__&&e.stopPropagation(),this.state.disabled||(this.setChecked(null),this.$onClick&&this.$onClick(e))}}]),t}(Kt);Ye.OptLi_=zr,Ye.OptLi=new zr;var Br=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptInput",r));return i._htmlText=!1,i}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.type=[r+1,"string",["checkbox","radio","button","image"]],n.value=[r+2,"string"],n.src=[r+3,"string"],n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="input",e.type="checkbox",e.checked="",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=this.props.type;if("checkbox"===r||"radio"===r)void 0===this.props.checked&&this.$gui.tagAttrs.push("checked");else{var n=void 0!==this.props.value?this.props.value||"":this.props.defaultValue||"";this.defineDual("value",null,n)}return this.defineDual("data-checked",function(e,t){this.state.checked=s(e)}),e}},{key:"clearChecked",value:function(e){e||(e=this.getHtmlNode()),e&&(e.checked&&(e.checked=!1),this.state["data-checked"]&&(this.duals["data-checked"]=""))}},{key:"$$onChange",value:function(e){qe.__design__&&e.stopPropagation();var t=this.state.type,r=e.target;"checkbox"===t||"radio"===t?r.checked?this.setChecked(null):this.clearChecked(r):this.duals.value=r.value,this.$onChange&&this.$onChange(e)}},{key:"$$onClick",value:function(e){if(qe.__design__&&e.stopPropagation(),!this.state.disabled){var t=this.state.type;"checkbox"!==t&&"radio"!==t&&this.setChecked(null),this.$onClick&&this.$onClick(e)}}}]),t}(Rr);Ye.OptInput_=Br,Ye.OptInput=new Br;var Vr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TempPanel",r));return i._silentProp.push("isTemplate.","data-temp.type"),i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isTemplate."]=1,qe.__design__?e["data-temp.type"]=1:(e.width=0,e.height=0),e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);Te(this.$gui),this.isLibGui=!1;var r=this.props.style;if(l(this)&&(this.duals.style=r=Object.assign({},r,{position:"absolute"}),0==(this.$gui.keyid+"").indexOf("$$")&&(this.isLibGui=!0)),qe.__design__&&!this.isLibGui)this.duals.style=Object.assign({},r,{display:"none"}),Ae(this);else{var n=this.props.template;n instanceof ae?this.$gui.template=n:Ae(this),this.$gui.compIndex={},this.$gui.comps=[]}return e}},{key:"elementOf",value:function(e){return Ce(this,e)}},{key:"render",value:function(){if(qe.__design__&&!this.isLibGui)return Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this);if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var r=k(this,Object.assign({},this.state.style,{width:"0px",height:"0px",display:"none"}));return ht(e,r)}}]),t}(Wt);Ye.TempPanel_=Vr,Ye.TempPanel=new Vr;var Ur=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TempDiv",r));return i._silentProp.push("isTemplate.","data-temp.type"),i._htmlText=!0,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isTemplate."]=2,qe.__design__?e["data-temp.type"]=2:(e.width=0,e.height=0),e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);Te(this.$gui),this.isLibGui=!1;var r=this.props.style;if(l(this)&&(this.duals.style=r=Object.assign({},r,{position:"absolute"}),0==(this.$gui.keyid+"").indexOf("$$")&&(this.isLibGui=!0)),qe.__design__&&!this.isLibGui)this.duals.style=Object.assign({},r,{display:"none"}),Ae(this);else{var n=this.props.template;n instanceof ae?this.$gui.template=n:Ae(this),this.$gui.compIndex={},this.$gui.comps=[]}return e}},{key:"elementOf",value:function(e){return Ce(this,e)}},{key:"render",value:function(){if(qe.__design__&&!this.isLibGui)return Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this);if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var r=k(this,Object.assign({},this.state.style,{width:"0px",height:"0px",display:"none"}));return ht(e,r)}}]),t}(Mt);Ye.TempDiv_=Ur,Ye.TempDiv=new Ur;var qr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TempSpan",r));return i._silentProp.push("isTemplate.","data-temp.type"),i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isTemplate."]=3,qe.__design__&&(e["data-temp.type"]=3),e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);if(Te(this.$gui),this.isLibGui=!1,qe.__design__)this.duals.style=Object.assign({},this.props.style,{display:"none"}),Ae(this);else{var r=this.props.template;r instanceof ae?this.$gui.template=r:Ae(this),this.$gui.compIndex={},this.$gui.comps=[]}return e}},{key:"elementOf",value:function(e){return Ce(this,e)}},{key:"render",value:function(){if(qe.__design__)return Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this);if(z(this),this["hide."])return ht("span",gr);var e=this.state["tagName."];if(!e)return ye(this);var r=k(this,Object.assign({},this.state.style,{width:"0px",height:"0px",display:"none"}));return ht(e,r)}}]),t}(vr);Ye.TempSpan_=qr,Ye.TempSpan=new qr;var Yr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"RefDiv",r));return i._silentProp.push("isReference."),i._htmlText=!0,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.width=0,e.height=0,e["isReference."]=1,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return l(this)&&Ge.instantShow("warning: can not add RefDiv to topmost widget."),e}},{key:"componentDidMount",value:function(){Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this);var e;if(!it&&(e=this.widget)){var r=(e=e.parent)&&e.component;r&&se(r,this.$gui.keyid+"",function(){})}}},{key:"render",value:function(){var e=c(this),t={style:{width:"0px",height:"0px"}};return e&&(t.className=e),ht("div",t)}}]),t}(Mt);Ye.RefDiv_=Yr,Ye.RefDiv=new Yr;var Gr=Ye.RefDiv._createClass(null),Xr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"RefSpan",r));return i._silentProp.push("isReference."),i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isReference."]=2,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return l(this)&&Ge.instantShow("error: can not hook RefSpan to topmost widget."),e}},{key:"componentDidMount",value:function(){Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this);var e;if(!it&&(e=this.widget)){var r=(e=e.parent)&&e.component;r&&se(r,this.$gui.keyid+"",function(){})}}},{key:"render",value:function(){var e=c(this),t={style:{width:"0px",height:"0px"}};return e&&(t.className=e),ht("span",t)}}]),t}(vr);Ye.RefSpan_=Xr,Ye.RefSpan=new Xr;var Kr=Ye.RefSpan._createClass(null),Jr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"ScenePage",r));return i._silentProp.push("isScenePage.","isTemplate."),i._defaultProp.noShow="",i}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);n.noShow=[r+1,"string",["","1"],"[string]: disable show content"];var i="[number]: 0~1 for percent, 0.9999 for 100%, N pixels",o=n.width,a=n.height;return o&&(o[1]="number",o[3]=i),a&&(a[1]="number",a[3]=i),n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.noShow="",e["tagName."]="article",e["isScenePage."]=1,e.className="rewgt-panel rewgt-scene",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);l(this)||Ge.instantShow("error: ScenePage only hook to topmost widget.");var r=Object.assign({},this.props.style,{position:"absolute",display:"none"});r.zIndex||(r.zIndex="0"),this.duals.style=r;var n=this.props.width,i=this.props.height;if("number"==typeof n&&n>0||console.log("warning: invalid width of ScenePage ("+this.$gui.keyid+")"),"number"==typeof i&&i>0||console.log("warning: invalid height of ScenePage ("+this.$gui.keyid+")"),qe.__design__)this.$gui.currSelected="";else if(this.props["isTemplate."]){Te(this.$gui),this.isLibGui=!1;var o=this.props.template;o instanceof ae?this.$gui.template=o:Ae(this),this.$gui.compIndex={},this.$gui.comps=[]}return e}},{key:"elementOf",value:function(e){return this.props["isTemplate."]?Ce(this,e):Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"elementOf",this).call(this,e)}},{key:"setSelected",value:function(e){function t(e,t){var n=r&&r[e];if(n=n&&n.component){var i=parseInt(n.state.style.zIndex)||0;t?i>=-997&&i<=999&&n.setState({style:Object.assign({},n.state.style,{zIndex:i+2e3})}):i>=1e3&&i<=2999&&n.setState({style:Object.assign({},n.state.style,{zIndex:i-2e3})})}}if(qe.__design__){var r=this.widget,n=this.$gui;if(n.currSelected){if(e==n.currSelected)return;t(n.currSelected,!1),n.currSelected=""}e&&(t(e,!0),n.currSelected=e)}}},{key:"render",value:function(){if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);if(this.props["isTemplate."]){o=k(this,r=Object.assign({},this.state.style,{width:"0px",height:"0px",display:"none"}));return ht("div",o)}var t=this.prepareState(),r=void 0;this.props.noShow&&!qe.__design__&&((r=Object.assign({},this.state.style)).display="none");var n=this.$gui.insertEle;n&&(t=me(n,t));var i=ht("div",{className:"rewgt-center"},t),o=k(this,r);return ht(e,o,i)}}]),t}(Wt);Ye.ScenePage_=Jr,Ye.ScenePage=new Jr;Ye.ScenePage._createClass(null);var Zr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"MaskPanel",r))}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.klass="noselect-txt",e}},{key:"getInitialState",value:function(){function e(e,t,r){return e<1&&(e>=.9999?e=t:e>0?e*=t:e=r),e}function r(e,t,r){return"number"!=typeof e?e=(t-r)/2:e<1&&(e*=t),e<0&&(e=0),e}var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return this.defineDual("popOption"),this.defineDual("id__",function(t,n){if(1===n){var i,o=null,a=null,s=this.$gui,l=this.props.popOption;l&&((i=l.frame)?(a=this.props.popFrame)&&!a.props&&(a=null):i={},this.props.children&&(o=gt(this.props.children)[0]),s.compIdx={},s.comps=[]);var u=this.widget;if(o&&u&&rt){var p=rt.frameInfo,c=window.innerWidth,f=window.innerHeight;this.state.left=0,this.state.top=0,this.state.width=c-p.leftWd-p.rightWd,this.state.height=f-p.topHi-p.bottomHi,this.state.style=Object.assign({},this.state.style,{position:"absolute",zIndex:"auto",backgroundColor:l.maskColor||"rgba(238,238,238,0.84)"});var h=this.state.width,d=this.state.height;if(a){var g=e(i.width||.9,h,4),v=e(i.height||.9,d,4),y=r(i.left,h,g),_=r(i.top,d,v),m={"hookTo.":u,"keyid.":"",key:"",style:Object.assign({},a.props.style,{position:"absolute",zIndex:"auto"}),left:y,top:_,width:g,height:v};s.compIdx[0]=0,s.comps.push(ft(a,m))}var w=e(l.width||.8,h,6),k=e(l.height||.8,d,6),O=r(l.left,h,w),x=r(l.top,d,k);!a&&O>0&&x>0&&O+w24||(n.isHooked?Me(n,e,function(e,t){e&&(n.props.noShow&&(n.$gui.compIdx={},n.$gui.comps=[]),n.reRender(function(){de(n,!0);var e=null;0==n.state.nodes.length?t&&t.length&&(e=t):e=t||[],e&&setTimeout(function(){n.duals.nodes=e},10)}))}):i.delayTid=setTimeout(function(){r()},100))}if(this.widget&&"string"==typeof e){var o=0;r()}}),r.nodes=[],this.defineDual("nodes"),r}},{key:"willResizing",value:function(e,t,r){if(!r&&this.isHooked){var n=this;setTimeout(function(){Q(n,!1)},0)}return!0}},{key:"render",value:function(){if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState(),r=k(this),n=this.$gui.insertEle;return n&&(t=me(n,t)),ht(e,r,t)}}]),t}(Vt);Ye.MarkedDiv_=nn,Ye.MarkedDiv=new nn;var on=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"MarkedTable",r));return i._silentProp.push("markedTable."),i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["markedTable."]=!0,e["tagName."]="table",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return this.firstScan=!0,this.cellKeys={},this.cellStyles={},e}},{key:"render",value:function(){if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState(),r=k(this);if(this.props.noShow)return ht("div",r);0==t.length&&t.push(ht(Jt,{"html.":" "}));var n=["tbody",null],i=null,o=this,a=this.firstScan;this.firstScan=!1,t.forEach(function(e){if(e.props["markedRow."])i&&n.push(ht.apply(null,i)),i=["tr",null];else{i||(i=["tr",null]);var t=e.props["keyid."],r=void 0,s=void 0,l=null;if(void 0!==t&&(t+=""),t&&e.props["marked."])if(a){var u,p;(u=e.props.rowSpan)&&!isNaN(p=parseInt(u))&&(r=p+""),(u=e.props.colSpan)&&!isNaN(p=parseInt(u))&&(s=p+""),o.cellKeys[t]=[r,s],l=o.cellStyles[t]=e.props.tdStyle}else{var c=o.cellKeys[t];Array.isArray(c)&&(r=c[0],s=c[1]),l=o.cellStyles[t]}var f=null;t&&(f={key:t,rowSpan:r,colSpan:s},l&&(f.style=l)),i.push(ht("td",f,e))}}),i&&n.push(ht.apply(null,i));var s=ht.apply(null,n);return ht(e,r,s)}}]),t}(nn);Ye.MarkedTable_=on,Ye.MarkedTable=new on,t.exports=Ye},{"./react_widget":9,"create-react-class":2,react:void 0,"react-dom":void 0}],11:[function(e,t,r){function n(e){if(u===setTimeout)return setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function o(){d&&f&&(d=!1,f.length?h=f.concat(h):g=-1,h.length&&a())}function a(){if(!d){var e=n(o);d=!0;for(var t=h.length;t;){for(f=h,h=[];++g1)for(var r=1;r