/* Copyright © 2015 Adobe Systems Incorporated. All rights reserved. Generated by Adobe RoboHelp 2015 */ (function(){var t,e,n,r,i,o,s=[].slice;null==window.rh&&(window.rh={}),i=window.rh,null==i._&&(i._={}),i.util=i._,o=i._,e=Array.prototype.forEach,n=Object.keys,t=Object.prototype.hasOwnProperty,o.time=function(){return(new Date).getTime()},o.delay=function(t,e){var n;return n=Array.prototype.slice.call(arguments,2),i._debug&&n.push(o.stackTrace()),setTimeout(function(){return t.apply(null,n)},e)},o.defer=function(t){var e;return e=Array.prototype.slice.call(arguments,1),this.delay.apply(this,[t,1].concat(e))},o.debounce=function(t,e,n){var r;return r=null,function(){var i,o,u;return i=1<=arguments.length?s.call(arguments,0):[],u=this,o=function(){return n||t.apply(u,i),r=null},r?clearTimeout(r):n&&t.apply(u,i),r=setTimeout(o,e||100)}},o.throttle=function(t,e){var n;return n=null,function(){var r,i,o;return r=1<=arguments.length?s.call(arguments,0):[],o=this,i=function(){return t.apply(o,r),n=null},n?clearTimeout(n):t.apply(o,r),n=setTimeout(i,e||100)}},o.timeout=function(t,e){return function(){var n,r,u;return n=1<=arguments.length?s.call(arguments,0):[],u=this,r=function(){return t.apply(u,n)},i._debug&&n.push(o.stackTrace()),setTimeout(r,e)}},o.toggleTimeout=function(t,e,n){return function(){var r,u,a;return r=1<=arguments.length?s.call(arguments,0):[],a=this,u=function(){return t.apply(a,r)},n?(i._debug&&r.push(o.stackTrace()),setTimeout(u,e)):u(),n=!n}},o.has=function(e,n){return null!=e&&t.call(e,n)},o.keys=function(t){var e,r;return"object"!=typeof t?[]:n?n(t):r=function(){var n;n=[];for(e in t)o.has(t,e)&&n.push(e);return n}()},o.any=function(t,e,n){var r,i,s,u;if(null==n&&(n=this),null==t)return!1;for(s=t.length!==+t.length&&o.keys(t),u=(s||t).length,r=0;;){if(r>=u)break;if(i=s?s[r]:r,e.call(n,t[i],i,t))return!0;r++}return!1},o.each=function(t,n,r){var i,o,s,u,a;if(null==r&&(r=this),null!=t){if(e===t.forEach)t.forEach(n,r);else if(t.length===+t.length)for(i=u=0,a=t.length;a>u;i=++u)s=t[i],n.call(r,s,i,t);else for(o in t)s=t[o],n.call(r,s,o,t);return t}},o.map=function(t,e,n){var r;return null==n&&(n=this),r=[],o.each(t,function(t,i,o){return r.push(e.call(n,t,i,o))}),r},o.reduce=function(t,e,n,r){return null==r&&(r=this),o.each(t,function(t,i){return n=e.call(r,n,t,i)}),n},o.find=function(t,e,n){var r;return null==n&&(n=this),r=void 0,o.any(t,function(t,i,o){return e.call(n,t,i,o)?(r=t,!0):void 0}),r},o.findIndex=function(t,e,n){var r;return null==n&&(n=this),r=-1,o.any(t,function(t,i,o){return e.call(n,t,i,o)?(r=i,!0):void 0}),r},o.findParentNode=function(t,e,n,r){var i;for(null==e&&(e=document),null==r&&(r=this),i=null;;){if(!t||t===e)break;if(n.call(r,t)){i=t;break}t=t.parentNode}return i},o.filter=function(t,e,n){var r;return null==n&&(n=this),r=[],o.each(t,function(t,i,o){return e.call(n,t,i,o)?r.push(t):void 0}),r},o.flatten=function(t){return o.reduce(t,function(t,e){return t.concat(e)},[])},o.unique=function(t,e,n){return null==n&&(n=this),e&&(t=o.map(t,e,n)),o.filter(t,function(e,n){return t.indexOf(e)===n})},o.union=function(t,e,n){return null==n&&(n=this),e&&(t=o.map(t,e,n)),o.unique(o.flatten(t))},o.count=function(t,e,n){var r;return null==n&&(n=this),r=0,o.each(t,function(t,i,o){return e.call(n,t,i,o)?r++:void 0}),r},o.extend=function(t,e,n){return o.each(e,function(e,n){return t[n]=e}),n&&o.each(n,function(e,n){return t[n]=e}),t},o.clone=function(t){return o.isObject(t)?o.reduce(t,function(t,e,n){return t[n]=o.clone(e),t},{}):t},o.compact=function(t){return o.filter(t,function(t){return t})},o.compactObject=function(t){return null==t&&(t={}),o.reduce(t,function(t,e,n){return null!=e&&(o.isObject(e)?(e=o.compactObject(e),o.isEmptyObject(e)||(t[n]=e)):t[n]=e),t},{})},o.isString=function(t){return"string"==typeof t},o.isFunction=function(t){return"function"==typeof t},o.isObject=function(t){return null!==t&&"object"==typeof t},o.isDefined=function(t){return null!==t&&void 0!==t},o.isEmptyString=function(t){return 0===t.length},o.isUsefulString=function(t){return o.isDefined(t)&&!o.isEmptyString(t)},o.isEmptyObject=function(t){return 0===Object.keys(t).length},o.isEqual=function(t,e){if(typeof t!=typeof e)return!1;if(!o.isDefined(t)||!o.isDefined(e))return t===e;switch(typeof t){case"object":return o.isEqualObject(t,e);case"array":return!o.any(t,function(t,n){return!o.isEqual(t,e[n])});default:return t===e}},o.isEqualObject=function(t,e){var n,r;return n=o.filter(o.keys(t),function(e){return void 0!==t[e]}),r=o.filter(o.keys(e),function(t){return void 0!==e[t]}),n.length!==r.length?!1:!o.any(n,function(n){return!o.isEqual(t[n],e[n])})},o.isZeroCSSValue=function(t){return"0"===t||"0px"===t||"0em"===t||"0%"===t},o.canUseLocalDB=function(){var t;try{localStorage.setItem("testLocalDB",!0),t=null!=localStorage.getItem("testLocalDB"),localStorage.removeItem("testLocalDB")}catch(e){t=!1}return function(){return t}}(),o.isIframe=function(){return parent!==window},o.loadScript=function(t,e,n){var r;return null==e&&(e=!0),r=document.createElement("script"),r.type="text/javascript",r.async=e===!0,r.src=t,null!=n&&(r.onerror=r.onload=n),document.body.appendChild(r)},r=function(){return Math.floor(65536*(1+Math.random())).toString(32).substring(1)},o.uniqueId=function(){return""+o.time().toString(32)+"_"+r()+r()+r()}}).call(this),function(){var t,e,n,r;r=window.rh._,t=window.rh.consts,r.mapToEncodedString=function(t,e,n){return null==e&&(e="&"),null==n&&(n="="),r.reduce(t,function(t,r,i){return null!=r&&(t.length>0&&(t+=e),t+=""+i+n+encodeURIComponent(r)),t},"")},r.encodedStringToMap=function(t,e,n){var i;return null==e&&(e="&"),null==n&&(n="="),i=r.explodeAndMap(t,e,n,{"default":""}),r.each(i,function(t,e){return i[e]=decodeURIComponent(t)}),i},r.urlParams=function(t){return null==t&&(t=location.search.substring(1)),r.encodedStringToMap(t)},r.urlParam=function(t){return t&&r.urlParams()[t]},r.hashParams=function(t){return null==t&&(t=location.hash.substring(1)),r.encodedStringToMap(t)},r.hashParam=function(t){return t&&r.hashParams()[t]},r.updateHashMap=function(t,e){var n,i;return i=r.extend({},r.hashParams(),t),n=r.mapToEncodedString(i),n.length>0&&(n="#"+n),e?location.hash=n:""!==n&&location.hash!==n?location.replace(n):void 0},r.stripStringBetween=function(t,e,n){var r,i,o;return o=t.indexOf(e),-1!==o&&(r=t.indexOf(n),o>r&&(r=t.length),i=""+t.substring(0,o)+t.substring(r,t.length)),i||t},r.stripParam=function(t){return null==t&&(t=document.location.href),r.stripStringBetween(t,"?","#")},r.stripBookmark=function(t){return null==t&&(t=document.location.href),r.stripStringBetween(t,"#","?")},r.extractStringBetween=function(t,e,n){var r,i,o;return i=t.indexOf(e),-1!==i&&(r=t.indexOf(n),i>r&&(r=t.length),o=t.substring(i+1,r)),o||""},r.extractParamString=function(t){return null==t&&(t=document.location.href),r.extractStringBetween(t,"?","#")},r.extractHashString=function(t){return null==t&&(t=document.location.href),r.extractStringBetween(t,"#","?")},r.traverseToPath=function(){return""},n=function(t,e,n){switch(null==n&&(n="/"),e){case".":return t;case"..":return t.substring(0,t.lastIndexOf(n));default:return t+n+e}},r.traverseByPath=function(t,e,r){var i,o,s,u;for(null==r&&(r="/"),t=t.substring(0,t.lastIndexOf(r)),o=e.split(r),s=0,u=o.length;u>s;s++)i=o[s],i.length>0&&(t=n(t,i,r));return t+r},r.scheme=function(t){var e,n;return e=t.indexOf(":"),-1!==e&&(n=t.substring(0,e+1).toLowerCase().trim()),n},r.protocol=function(t){var e,n,r;return e=t.trim().indexOf(":"),-1!==e&&(r=t.substring(0,e+1).toLowerCase()),r&&(n=r.match(/[a-z]+:/),n&&n[0].length===r.length||(r=void 0)),r},r.isJavaScriptUrl=function(t){return"javascript:"===r.scheme(t)},r.isRelativeUrl=function(t){return!r.scheme(t)&&t.trim().indexOf("/")},r.isValidFileUrl=function(t){var e;return"#"===t[0]?!1:(e=r.scheme(t),!e||-1!==["http:","https:","ftp:","file:"].indexOf(e))},r.makeRelativeUrl=function(t,e){var n,i,o;return null==e&&(e=document.location.href),t===e?"":(n=r.filePath(t),i=r.filePath(e),o=r.makeRelativePath(n,i),""+o+t.substring(n.length))},r.makeRelativePath=function(t,e){var n,i,o,s,u,a;if(null==e&&(e=r.filePath()),!t||r.isRelativeUrl(t)||r.isRelativeUrl(e))u=t;else{for(a=t.split("/"),n=e.split("/"),o=0;;){if(a.length===o||n.length===o)break;if(a[o]!==n[o])break;o++}for(s=a.slice(o),u="",i=n.length-o-1;;){if(0>=i)break;u+="../",i--}u+=s.join("/")}return u},r.makeFullUrl=function(t){return r.isRelativeUrl(t)?window._getFullPath(rh._.parentPath(),t):t},r.isLocal=function(){return"file:"===window.location.protocol},r.isRemote=function(){return"file:"!==window.location.protocol},e=null,r.isSameOrigin=function(t){var n;return r.isLocal()?!0:(n=window.location,null==e&&(e=n.origin),null==e&&(e=""+n.protocol+"//"+n.hostname,n.port&&(e+=":"+n.port)),e===t)},r.filePath=function(t){var e;return null==t&&(t=document.location.href),e=t.indexOf("?"),-1!==e&&(t=t.substring(0,e)),e=t.indexOf("#"),-1!==e&&(t=t.substring(0,e)),t},r.parentPath=function(t){var e;return null==t&&(t=r.filePath()),e=t.lastIndexOf("/"),-1!==e&&(t=t.substring(0,e+1)),t},r.getFileName=function(t){var e,n,i;return n=r.filePath(t),i=n.lastIndexOf("/"),e=-1!==i?n.substring(i+1):n,e||""},r.getFileExtention=function(t){var e,n,i;return n=r.getFileName(t),i=null!=n?n.lastIndexOf("."):void 0,-1!==i&&(e=n.substring(i)),e||""}}.call(this),function(){var t,e,n;n=window.rh._,t=/\#{([^}]*)\}/g,e=/\B\/([^\/]*)\//g,n.toRegExp=function(t){var r,i,o,s,u;return t&&n.isString(t)?(o=t.match(e),i=o&&o[0],i&&(s=i.substring(1,i.length-1),r=t.substring(i.length),u=new RegExp(s,r)),u||t):t},n.splitAndTrim=function(t,e){return null==t&&(t=""),n.map(t.split(e),function(t){return t.trim()})},n.explodeAndMap=function(t,e,n,r){var i,o,s,u,a,l,c,h,d;for(null==t&&(t=" "),null==r&&(r={}),u=t.split(e),l=new RegExp(""+n+"(.+)?"),o={},h=0,d=u.length;d>h;h++)a=u[h],s=a.split(l),i=s[0].trim(),c=s[1],r.caseInsensitive&&(i=i.toLowerCase()),r.trim&&(c=c&&c.trim()),null!=r["default"]&&null==c&&(c=r["default"]),""!==i&&(o[i]=c);return o},n.resolveController=function(t){return t.replace(/(^|[^._a-zA-Z0-9])\$(?=[^.(])/g," this.controllers.")},n.resolveEnclosedVar=function(e,n){var r,i,o,s,u;if(o=e.match(t))for(s=0,u=o.length;u>s;s++)i=o[s],r=n(i.substring(2,i.length-1).trim()),e=e.replace(i,null!=r?r:"");return e},n.resolveAttr=function(t){return n.reduce(n.explodeAndMap(t,";",":"),function(t,e,r){return n.each(r.split(","),function(n){return t[n.trim()]=e}),t},{})},n.resolveNiceJSON=function(t){return null==t&&(t=" "),t=t.replace(/'/g,'"'),t="{"+t+"}",JSON.parse(t.replace(/(\{|,)\s*(.+?)\s*:/g,'$1 "$2":'))},n.resolvePipedExpression=function(t){var e;return null==t&&(t=""),e=!1,n.reduce(t.split("|"),function(t,n){var r;return e&&t.length>0&&(r=""+t[t.length-1]+" ||"+n,t.length=t.length-1),e=0===n.length,r&&(n=r),0!==n.length&&t.push(n.trim()),t},[])},n.resolveWidgetArgs=function(t){var e,r;return r=n.resolvePipedExpression(t),e=r.shift()||"",e=0r?t>Math.PI/4?"down":t<-Math.PI/4?"up":"right":t>Math.PI/4?"up":t<-Math.PI/4?"down":"left",rh.model.publish(".touchmove",{x:r,y:o,x1:i,y1:s}),rh.model.publish(rh.consts("EVT_SWIPE_DIR"),e,{sync:!0}),rh.model.publish(rh.consts("EVT_SWIPE_DIR"),null),r=o=0},200),t.addEventListener(document,"touchmove",function(e){var u,a;return i=(null!=(u=e.touches[0])?u.pageX:void 0)||0,s=(null!=(a=e.touches[0])?a.pageY:void 0)||0,0===r&&0===o&&(r=i,o=s),n(),t.preventDefault(e)})):void 0}}()}.call(this),function(){var t,e,n,r;r=window.rh._,n=/(^|[^\\])@([\w\.]*)\((.*)\)/,t=/(^|[^\\])@([\w\.]*)/,e=/@([A-Z][_A-Z0-9]*)/,r.resolvePublish=function(t){var e,r;for(r=new RegExp(n);;){if(e=r.exec(t),!e)break;t=t.replace(e[0],""+e[1]+" this.publish('"+e[2]+"', "+e[3]+")")}return t},r.resolveGet=function(e,n){var r,i;for(i=new RegExp(t);;){if(r=i.exec(e),!r)break;n&&-1===n.indexOf(r[2])&&n.push(r[2]),e=e.replace(r[0],""+r[1]+" this.get('"+r[2]+"')")}return e},r.resolveModelConst=function(t){var n,r,i,o,s;for(s="",o=new RegExp(e);;){if(i=o.exec(t),!i)break;r=rh.consts(i[1]),null!=r?t=t.replace(i[0],"@"+r):(n=i.index+i[1].length+1,s+=t.substring(0,n),t=t.substring(n))}return s+t},r.resolveModelKeys=function(t,e){return this.resolveGet(this.resolvePublish(this.resolveModelConst(t)),e)},r.isValidModelKey=function(t){var e;return"true"===t||"false"===t?!1:(e=t.match(/[._a-zA-Z][._a-zA-Z0-9]*/),e&&e[0]===t)},r.isValidModelConstKey=function(t){var e;return e=t.match(/[A-Z][_A-Z0-9]*/),e&&e[0]===t},r.get=function(t,e){var n,r,i,o,s,u;for(i=e.split("."),n=s=0,u=i.length;u>s;n=++s)if(r=i[n],0===n)o=t[r];else{if(!o)break;o=o[r]}return o},r.isScreenAttached=function(t){return!0===rh.model.get(""+rh.consts("KEY_SCREEN")+"."+t+".attached")},r.parentKey=function(t){var e;return e=t.split("."),e.pop(),e.join(".")},r.lastKey=function(t){var e;return e=t.split("."),e[e.length-1]},r.splitKey=function(t){var e,n,r;return n=t.split("."),e=n.pop(),r=n.join("."),{key:e,parentKey:r}}}.call(this),function(){var t;t=window.rh._,t.hasNonAsciiChar=function(e){return null==e&&(e=""),t.any(e,function(t){return t.charCodeAt(0)>127})}}.call(this),function(){var t,e,n;e=window.rh,n=e._,e._params=n.urlParams(),e._debugFilter=n.toRegExp(e._params.rh_debug),e._debug=null!=e._debugFilter,e._testFilter=n.toRegExp(e._params.rh_test),e._test=null!=e._testFilter,e._errorFilter=n.toRegExp(e._params.rh_error),e._error=null!=e._errorFilter,e._breakFilter=n.toRegExp(e._params.rh_break),e._break=null!=e._breakFilter,t=function(t,e){return t.join(" ").match(e)},e._d=function(){var n,r,i,o;return r=window.console,e._debug&&r&&"function"==typeof r.log&&(n=Array.prototype.slice.call(arguments,0),["info","log","warn","debug","error"].indexOf(n[0])>-1?(i=r[n[0]],n=n.slice(1)):i=r.debug,o=["[ "+n[0]+" ]:"].concat(n.slice(1)),""===e._debugFilter||t(o,e._debugFilter))?e._break&&t(o,e._breakFilter)?Function("","debugger")():e._error&&t(o,e._errorFilter)?r.error.apply(r,o):i.apply(r,o):void 0}}.call(this),function(){var t,e,n;n=window.rh,t={},n.consts=e=function(e,r){return null==r?(n._debug&&null==t[e]&&n._d("error","consts",""+e+" is not available"),t[e]):null==t[e]?t[e]=r:n._debug?n._d("error","consts",""+e+" is already registered"):void 0},e("KEY_SHARED_INPUT","._sharedkeys.input"),e("KEY_SHARED_OUTPUT","._sharedkeys.output"),e("KEY_PROJECT_TOPICLIST",".p.topiclist"),e("KEY_PROJECT_BRSLIST",".p.brslist"),e("KEY_PROJECT_TAG_COMBINATIONS",".p.tag_combinations"),e("KEY_PROJECT_TAG_STATES",".p.tag_states"),e("KEY_MERGED_FILTER_KEY",".p.tags"),e("KEY_PROJECT_FILTER_CAPTION",".p.filter_caption"),e("KEY_PROJECT_FILTER_TYPE",".p.filter_type"),e("KEY_PROJECT_LIST",".p.projects"),e("KEY_SEARCH_RESULTS",".p.searchresults"),e("KEY_SEARCH_RESULT_PARAMS",".p.searchresultparams"),e("KEY_ONSEARCH_TAG_STATES",".p.onsearchtagstates"),e("KEY_LNG",".p.lng_db"),e("KEY_DEFAULT_FILTER",".p.deffilter"),e("KEY_MERGED_PROJECT_MAP",".mp.tmap"),e("KEY_TEMP_DATA",".temp.data"),e("KEY_TOPIC_URL",".t.topicurl"),e("KEY_TOPIC_ID",".t.topicid"),e("KEY_TOPIC_TITLE",".t.topictitle"),e("KEY_TOPIC_BRSMAP",".t.brsmap"),e("KEY_TOPIC_ORIGIN",".t.origin"),e("KEY_TOPIC_HEIGHT",".t.topic_height"),e("KEY_SEARCH_TERM",".l.searchterm"),e("KEY_SEARCHED_TERM",".l.searched_term"),e("KEY_TAG_EXPRESSION",".l.tag_expression"),e("KEY_UI_MODE",".l.uimode"),e("KEY_BASE_IFRAME_NAME",".l.base_iframe_name"),e("KEY_CAN_HANDLE_SERCH",".l.can_handle_search"),e("KEY_CAN_HANDLE_SEARCH",".l.can_handle_search"),e("KEY_CSH_MODE",".l.csh_mode"),e("KEY_ONSEARCH_TAG_EXPR",".l.onsearchtagexpr"),e("KEY_AND_SEARCH",".l.andsearch"),e("KEY_FEATURE",".l.features"),e("KEY_SEARCH_PROGRESS",".l.search_progress"),e("KEY_LAYOUT_VERSION",".l.layout_version"),e("KEY_TOPIC_IN_IFRAME",".l.topic_in_iframe"),e("KEY_SHOW_TAGS",".l.showtags"),e("KEY_DIR",".l.dir"),e("KEY_SEARCH_LOCATION",".l.search_location"),e("KEY_DEFAULT_SEARCH_LOCATION",".l.default_search_location"),e("KEY_FILTER_LOCATION",".l.filter_location"),e("KEY_ACTIVE_TAB",".l.active_tab"),e("KEY_DEFAULT_TAB",".l.default_tab"),e("KEY_ACTIVE_TOPIC_TAB",".l.active_topic_tab"),e("KEY_TOC_DRILL_DOWN",".l.toc_drilldown"),e("KEY_MOBILE_TOC_DRILL_DOWN",".l.mobile_toc_drilldown"),e("KEY_SCREEN",".l.screen"),e("KEY_DEFAULT_SCREEN",".l.default_screen"),e("KEY_SCREEN_NAMES",".l.screen_names"),e("KEY_SCREEN_DESKTOP",""+e("KEY_SCREEN")+".desktop.attached"),e("KEY_SCREEN_TABLET",""+e("KEY_SCREEN")+".tablet.attached"),e("KEY_SCREEN_TABLET_PORTRAIT",""+e("KEY_SCREEN")+".tablet_portrait.attached"),e("KEY_SCREEN_PHONE",""+e("KEY_SCREEN")+".phone.attached"),e("KEY_SCREEN_IOS",""+e("KEY_SCREEN")+".ios.attached"),e("KEY_SCREEN_IPAD",""+e("KEY_SCREEN")+".ipad.attached"),e("KEY_SCREEN_PRINT",""+e("KEY_SCREEN")+".print.attached"),e("KEY_IFRAME_EVENTS",".l.iframe_events"),e("EVT_HASH_CHANGE",".e.hashchange"),e("EVT_BASE_IFRAME_LOAD",".e.base_iframe_load"),e("EVT_SCROLL_TO_TOP",".e.scroll_to_top"),e("EVT_WIDGET_BEFORELOAD",".e.widget_beforeload"),e("EVT_WIDGET_LOADED",".e.widget_loaded"),e("EVT_SEARCH_TERM",".e.search_term"),e("EVT_NAVIGATE_TO_URL",".e.navigate_to_url"),e("EVT_PROJECT_LOADED",".e.project_loaded"),e("EVT_TOC_LOADED",".e.toc_loaded"),e("EVT_TOPIC_LOADED",".e.topic_loaded"),e("EVT_TOPIC_LOADING",".e.topic_loading"),e("EVT_BEFORE_UNLOAD",".e.before_unload"),e("EVT_UNLOAD",".e.unload"),e("EVT_BOOKMARK",".e.bookmark."),e("EVT_PRINT_TOPIC",".e.print_topic"),e("EVT_MOUSEMOVE",".e.mousemove"),e("EVT_SWIPE_DIR",".e.swipe_dir"),e("EVT_FAST_CLICK",".e.fast_click"),e("EVT_CLICK_INSIDE_IFRAME",".e.click_inside_iframe"),e("EVT_SCROLL_INSIDE_IFRAME",".e.scroll_inside_iframe"),e("EVT_SEARCH_IN_PROGRESS",".e.search_in_progress"),e("EVT_ORIENTATION_CHANGE",".e.orientationchange"),e("EVT_INSIDE_IFRAME_DOM_CONTENTLOADED","e.inside_iframe_dom_contentloaded"),e("EVT_RELOAD_TOPIC",".e.reload_topic"),e("EVT_LOAD_IDX",".e.load_idx"),e("EVT_LOAD_GLO",".e.load_glo"),e("HASH_KEY_RH_HIGHLIGHT","rhhlterm"),e("HASH_KEY_RH_SYNS","rhsyns"),e("HASH_KEY_RH_SEARCH","rhsearch"),e("HASH_KEY_RH_TOCID","rhtocid"),e("HASH_KEY_TOPIC","t"),e("HASH_KEY_UIMODE","ux"),e("HASH_KEY_RANDOM","random"),e("PATH_PROJECT_TAGDATA_FILE","/whxdata/whtagdata.js")}.call(this),function(){var t,e,n;e=window.rh,n=e._,t=e.$=function(t,e){var n;return null!=e&&0===e?document.querySelector(t):(n=document.querySelectorAll(t),null!=e&&e1?(t=arguments[0],e=arguments[1]):(t=document,e=arguments[0]),t.querySelectorAll(e)},t.traverseNode=function(e,n,r,i,o){return null==o&&(o=window),n&&n.call(o,e)&&(t.eachChildNode(e,function(e){return!i||i.call(o,e)?t.traverseNode(e,n,r,i,o):void 0}),r&&r.call(o,e)),e},t.eachChildNode=function(t,e,n){var r,i,o,s;for(null==n&&(n=window),s=t.children,i=0,o=s.length;o>i;i++)r=s[i],e.call(n,r)},t.eachChild=function(t,e,n,r){var i,o,s,u;for(null==r&&(r=window),u=this.find(t,e),o=0,s=u.length;s>o;o++)i=u[o],n.call(r,i)},t.eachDataNode=function(e,n,r,i){var o,s,u,a;for(null==i&&(i=window),a=this.find(e,"[data-"+n+"]"),s=0,u=a.length;u>s;s++)o=a[s],r.call(i,o,t.dataset(o,n))},t.eachAttributes=function(t,e,n){var r,i,o,s;for(s=function(){var e,n,i,o;for(i=t.attributes,o=[],e=0,n=i.length;n>e;e++)r=i[e],o.push([r.specified,r.name,r.value]);return o}(),i=-1;++i1?(o=t[1],(i=this.children[o])&&(r.push({fns:this.subscribers,key:e,value:n}),s=""+e+"."+o,i.getSubscribers(t.slice(1),s,null!=n?n[o]:void 0,r))):t.length>0&&this._getAllChildSubscribers(e,n,r),r},t.prototype.addSubscribers=function(e,n){var r,i;return 1===n.length?this.subscribers.push(e):n.length>1?(r=n[1],null==(i=this.children)[r]&&(i[r]=new t),this.children[r].addSubscribers(e,n.slice(1))):void 0},t.prototype.removeSubscriber=function(t,e){return 1===e.length?this._deleteSubscriber(t):e.length>1?this.children[e[1]].removeSubscriber(t,e.slice(1)):void 0},t.prototype._deleteSubscriber=function(t){var e;return e=this.subscribers.indexOf(t),null!=e&&-1!==e?this.subscribers.splice(e,1):r._debug?r._d("error","unsubscribe",""+this+".{key} is not subscribed with "+t):void 0},t.prototype._getAllChildSubscribers=function(t,e,n){var r,i,o;if(n.push({fns:this.subscribers,key:t,value:e}),this.children){null==e&&(e={}),o=this.children;for(i in o)r=o[i],r._getAllChildSubscribers(""+t+"."+i,e[i],n)}return n},t}(),n=function(e){function n(t,e,r){this.subscribers=t,this.children=e,this.data=null!=r?r:{},n.__super__.constructor.call(this,this.subscribers,this.childs)}return s(n,e),n.prototype.getSubscribers=function(t){var e,n;return n=t[0],e=this.children[n],e?e.getSubscribers(t,""+t[0],this.data[t[0]],[]):[]},n.prototype.addSubscribers=function(e,n){var r,i;return r=n[0],null==(i=this.children)[r]&&(i[r]=new t),this.children[r].addSubscribers(e,n)},n.prototype.removeSubscriber=function(t,e){var n,r;return n=e[0],null!=(r=this.children[n])?r.removeSubscriber(t,e):void 0},n.prototype.getData=function(t){var e,n,r,o,s,u;for(e=this.data,n=s=0,u=t.length;u>s&&(r=t[n],i.isDefined(e));n=++s)n===t.length-1?o=e[r]:e=e[r];return o},n.prototype.setData=function(t,e){var n,r,o,s,u;for(n=this.data,r=s=0,u=t.length;u>s;r=++s)o=t[r],r===t.length-1?n[o]=e:(i.isDefined(n[o])||(n[o]={}),n=n[o])},n}(t),e=function(){function t(){this._rootNode=new n,this._count=e,e+=1}var e;return e=0,t.prototype.toString=function(){return"Model_"+this._count},t.prototype.get=function(t){var e;return this._isForGlobal(t)?r.model.get(t):(i.isString(t)?e=this._rootNode.getData(this._getKeys(t)):r._d("error","Get",""+this+"."+t+" is not a string"),r._debug&&r._d("log","Get",""+this+"."+t+": "+JSON.stringify(e)),e)},t.prototype.publish=function(t,e,n){var o,s,u,a,l,c,h,d;if(null==n&&(n={}),this._isForGlobal(t))return r.model.publish(t,e,n);if(r._debug&&r._d("log","Publish",""+this+"."+t+": "+JSON.stringify(e)),"string"==typeof t){for(this._rootNode.setData(this._getKeys(t),e),u=this._rootNode.getSubscribers(this._getKeys(t)),a=0,c=u.length;c>a;a++)if(s=u[a],s.fns)for(d=s.fns,l=0,h=d.length;h>l;l++)o=d[l],i.isDefined(o)&&(r._debug&&r._d("log","Publish call",""+this+"."+s.key+": "+JSON.stringify(s.value)),n.sync?o(s.value,s.key):r._.defer(o,s.value,s.key))}else r._d("error","Publish",""+this+"."+t+" is not a string")},t.prototype.isSubscribed=function(t){var e,n,i,o,s;if(this._isForGlobal(t))return r.model.isSubscribed(t);for("."===t[0]&&(t=t.substring(1)),i=this._rootNode.getSubscribers(this._getKeys(t)),o=0,s=i.length;s>o;o++)n=i[o],n.key===t&&(e=!0);return e===!0},t.prototype.subscribe=function(t,e,n){var i,o;return null==n&&(n={}),this._isForGlobal(t)?r.model.subscribe(t,e,n):(r._debug&&r._d("log","Subscribe",""+this+"."+t),this._rootNode.addSubscribers(e,this._getKeys(t)),o=this._rootNode.getData(this._getKeys(t)),(n.forceInit||null!=o&&!n.initDone)&&e(o,t),i=function(n){return function(){return n.unsubscribe(t,e)}}(this))},t.prototype.unsubscribe=function(t,e){return this._isForGlobal(t)?r.model.unsubscribe(t):(r._debug&&r._d("log","Unsubscribe",""+this+"."+t),this._rootNode.removeSubscriber(e,this._getKeys(t)))},t.prototype.isGlobal=function(){return this===r.model},t.prototype.isGlobalKey=function(t){return t&&"."===t[0]},t.prototype._isForGlobal=function(t){return!this.isGlobal()&&this.isGlobalKey(t)},t.prototype._getKeys=function(t){var e;return e=t.split("."),""===e[0]&&(e=e.slice(1)),r._debug&&0===e.length&&r._d("error","Model",""+this+"."+t+" is invalid"),e},t}(),r.Model=e,r.model=new e,r.model.toString=function(){return"GlobalModel"}}.call(this),function(){var t,e,n,r,i,o;i=window.rh,o=i._,t=i.$,r=function(e,n){var r,s,u,a,l,c,h,d,p,f,_;for(_=t.find(e,"[data-rhwidget]"),p=0,f=_.length;f>p;p++)if(u=_[p],!t.dataset(u,"loaded")&&t.isDescendent(e,u)){s=t.dataset(u,"config"),s=s?o.resolveNiceJSON(s):{},l=o.explodeAndMap(t.dataset(u,"rhwidget"),";",":");for(c in l)a=l[c],a&&a.length>0&&(c[0]===c[0].toLowerCase()?s.rawArg=a:(r=o.resolveWidgetArgs(a),r.pipedArgs.length>0&&(s.pipedArgs=r.pipedArgs),r.config&&o.extend(s,r.config))),s.node=u,h=i.widgets[c],d=new h(s),d.init(n)}},e=function(e){var n,r,s,u,a,l,c;for(l=t.find(e,"[data-rhtags]"),c=[],u=0,a=l.length;a>u;u++)r=l[u],t.isDescendent(e,r)&&(n=t.dataset(r,"config"),n=n?o.resolveNiceJSON(n):{},n.ids=t.dataset(r,"rhtags").split(","),n.node=r,c.push(s=new i.widgets.ContentFilter(n)));return c},n=function(t,n){return r(t,n),e(t)},o.loadWidgets=r,o.loadContentFilter=e,o.loadDataHandlers=n}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=window.rh,t=function(){function t(){this.guard=n(this.guard,this)}return t.prototype.guard=function(t,e){return null==this.guardedNames&&(this.guardedNames=[]),-1===this.guardedNames.indexOf(e)?(this.guardedNames.push(e),t.call(this),this.guardedNames.splice(this.guardedNames.indexOf(e),1)):void 0},t}(),e.Guard=t,e.guard=(new t).guard}.call(this),function(){var t,e,n;e=window.rh,n=e._,t=function(){function t(){}return t.prototype.attachOwner=function(t){var e,n,r,i;if(null==this._ownerFns&&(this._ownerFns={}),this.hasOwner()&&this.detach(this.owner),this.owner=t,this._overrideNames)for(i=this._overrideNames,n=0,r=i.length;r>n;n++)e=i[n],this._overrideOwnerFn(e);return this.ownerIsChanged()},t.prototype.detachOwner=function(){var t;if(this.hasOwner()){if(this._ownerFns)for(t in this._ownerFns)this._restoreOwnerFn(t);return this.owner=null,this._ownerFns={},this.ownerIsChanged()}},t.prototype.ownerIsChanged=function(){},t.prototype.hasOwner=function(){return null!=this.owner},t.prototype.addOverrides=function(t){var e,n,r,i;for(null==this._overrideNames&&(this._overrideNames=[]),i=[],n=0,r=t.length;r>n;n++)e=t[n],this._overrideNames.push(e),i.push(this._overrideOwnerFn(e));return i},t.prototype.removeOverrides=function(t){var e,n,r,i,o;for(o=[],r=0,i=t.length;i>r;r++)e=t[r],this._restoreOwnerFn(e),n=this._overrideNames.indexOf(e),o.push(n>-1?this._overrideNames.splice(n,1):void 0);return o},t.prototype._overrideOwnerFn=function(t){var e;return this.hasOwner()?(e=this.owner[t],this._ownerFns[t]=e,this.owner[t]=function(n){return function(){var r,i;return r=Array.prototype.slice.call(arguments,0),i=function(t){return e&&null!=e.apply?e.apply(n.owner,t):void 0},n[t](i,r)}}(this)):void 0},t.prototype._restoreOwnerFn=function(t){return this.hasOwner()?(this.owner[t]=this._ownerFns[t],delete this._ownerFns[t]):void 0},t}(),e.Plugin=t}.call(this),function(){var t,e,n,r,i={}.hasOwnProperty,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};n=window.rh,r=n._,t=n.$,e=function(e){function n(){this.$el=t("#console",0),this.$el&&(null==window.console&&(window.console={}),this.attachOwner(window.console),this.addOverrides(s),r.each(s,function(t,e){return this[t]=function(){return this.color=i[e],this.logger.apply(this,arguments)}},this),this.createChildNodes(),this.setUpInputBox())}var i,s;return o(n,e),s=["info","log","warn","debug","error"],i=["#00FF00","#000000","#0000FF","#0000FF","#FF0000"],n.prototype.ownerIsChanged=function(){return this.$el.style.display=this.hasOwner()?"":this.$el?"none":void 0},n.prototype.logger=function(e,n,i){var o,s,u,a,l,c,h;for(null==i&&(i="span"),u=[],l=document.createElement(i),c=0,h=n.length;h>c;c++)if(o=n[c],r.isFunction(o)||r.isString(o))u.push(o);else if(null!=o){try{a=JSON.stringify(o)}catch(d){s=d,a=""+s.name+": "+s.message}u.push(a)}else u.push("undefined");return"#FF0000"===this.color&&u.push(r.stackTrace()),l.style.color=this.color,t.textContent(l,u.join(" ")),this.$logNode.appendChild(l),this.$logNode.appendChild(document.createElement("br")),this.$el.scrollTop=this.$el.scrollHeight,e?e(n):void 0},n.prototype.createChildNodes=function(){var e;return this.$logNode=t.find(this.$el,"p")[0],this.$logNode||(this.$logNode=document.createElement("p"),this.$logNode.className="console",this.$el.appendChild(this.$logNode)),this.$input=t.find(this.$el,"input")[0],this.$input?void 0:(e=document.createElement("label"),t.textContent(e,"> "),e.style.color="blue",this.$input=document.createElement("input"),this.$input.type="text",this.$input.className="console",this.$input.style.width="98%",this.$input.style.border="0",this.$input.style.padding="2px",this.$input.placeholder="Enter a valid expression",e.appendChild(this.$input),this.$el.appendChild(e)) },n.prototype.setUpInputBox=function(){return this.$input.onkeydown=function(t){return function(e){var n,r,i;if(13===e.keyCode){t.color="#0000FF",r=t.$input.value;try{return i=Function("event","return "+r)(e),t.$input.value="",t.logger(null,[r],"b"),t.logger(null,[i])}catch(o){return n=o,t.color="#FF1100",t.logger(null,[""+n.name+": "+n.message],"b")}}}}(this)},n}(n.Plugin),n.Console=e}.call(this),function(){var t,e,n,r,i,o=function(t,e){return function(){return t.apply(e,arguments)}},s={}.hasOwnProperty,u=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=window.rh,i=r._,t=r.$,n=r.consts,e=function(e){function s(t){this.reRender=o(this.reRender,this);var e,n,i,s;for(a+=1,this._count=a,s=this.supportedArgs,n=0,i=s.length;i>n;n++)e=s[n],t[e]&&(this[e]=t[e]);this.parseOpts(t),this.node||r._d("error","constructor",""+this+" does not have a node")}var a;return u(s,e),a=0,s.prototype.toString=function(){return""+this.constructor.name+"_"+this._count},s.prototype.mapDataAttrMethods=function(t){return i.reduce(t,function(t,e){return t["data-"+e]="data_"+e,t},{})},s.prototype.dataAttrs=["init","stext","shtml","controller","class","animate","css","attr","value","checked","html","text","if","hidden","keydown","keyup","scroll","change","toggle","toggleclass","method","trigger","click","load","mouseover","mouseout","focus","blur","swipeleft","swiperight","swipeup","swipedown","screenvar"],s.prototype.dataAttrMethods=function(){return s.prototype.mapDataAttrMethods(s.prototype.dataAttrs)}(),s.prototype.dataIAttrs=["itext","ihtml","iclass"],s.prototype.dataIAttrMethods=function(){return s.prototype.mapDataAttrMethods(s.prototype.dataIAttrs)}(),s.prototype.supportedArgs=["node","model","useTemplate"],s.prototype.destruct=function(){var t,e,n,r;if(this.resetContent(),this._subscriptions)for(r=this._subscriptions,e=0,n=r.length;n>e;e++)(t=r[e])();return this._subscriptions=[],delete this.model,delete this.controllers},s.prototype.parseOpts=function(t){return this.opts=t},s.prototype.get=function(t){return null==this.model&&(this.model=new r.Model),this.model.get(t)},s.prototype.publish=function(t,e,n){return null==this.model&&(this.model=new r.Model),this.model.publish(t,e,n)},s.prototype.subscribe=function(t,e,n){var i;if(null!=t)return null==this.model&&(this.model=new r.Model),i=this.model.subscribe(t,e,n),(this.model.isGlobal()||this.model.isGlobal(t))&&(i=this.storeSubscribe(i)),i},s.prototype.subscribeOnly=function(t,e){return this.subscribe(t,e,{initDone:!0})},s.prototype.storeSubscribe=function(t){var e;return null==this._subscriptions&&(this._subscriptions=[]),e=function(n){return function(){var r;return r=n._subscriptions.indexOf(e),null!=r&&-1!==r&&n._subscriptions.splice(r,1),t()}}(this),this._subscriptions.push(e),e},s.prototype.patchScreenOptions=function(t,e){var r,o;return r=i.isString(e)?[e]:e,o=i.map(r,function(t){return"@"+n("KEY_SCREEN")+"."+t+".attached"}).join(" || "),o?""+o+" ? ("+t+") : null":t},s.prototype.patchDirOptions=function(t,e){return"@"+n("KEY_DIR")+" == '"+e+"' ? ("+t+") : null"},s.prototype.patchRawExprOptions=function(t,e){return e.screen&&(t=this.patchScreenOptions(t,e.screen)),null!=e.dir&&(t=this.patchDirOptions(t,e.dir)),t},s.prototype.patchRawExpr=function(t,e){return t&&i.isValidModelKey(t)&&(t="@"+t),e&&(t=this.patchRawExprOptions(t,e)),t},s.prototype.resolveEventRawExpr=function(){var t;return t={},function(e){var n,r,o,s,u,a;return s=t[e],null==s&&(a=i.resolveExprOptions(e),r=a.expr,u=a.opts,r=this.patchRawExpr(r,u),o=this._function("event, node",r),n=function(){var t;return t=Array.prototype.slice.call(arguments,0),i.safeExec(o,this,t)},n=i.applyCallbackOptions(n,u),s={callback:n,opts:u}),s}}(),s.prototype.resolveRawExprWithValue=function(){var t;return t={},function(e){var n,r,o,s,u,a,l;return u=t[e],null==u&&(s=[],l=i.resolveExprOptions(e),r=l.expr,a=l.opts,r=this.patchRawExpr(r,a),o=this._functionWithValue("",r,s),n=function(){return i.safeExec(o,this)},n=i.applyCallbackOptions(n,a),u={callback:n,keys:s,opts:a},t[e]=u),u}}(),s.prototype.subscribeExpr=function(t,e,n){var r,i,o,s,u,a,l,c,h;if(null!=t){for(h=this.resolveRawExprWithValue(t),r=h.callback,o=h.keys,s=h.opts,u=function(t){return function(){return e.call(t,r.call(t),s)}}(this),l=0,c=o.length;c>l;l++)i=o[l],a=this.subscribeOnly(i,u);return n&&n.push(a),u()}},s.prototype.resetContent=function(){var t,e,n,r,i,o,s,u;if(this.children)for(s=this.children,n=0,i=s.length;i>n;n++)t=s[n],t.destruct();if(this.htmlSubs)for(u=this.htmlSubs,r=0,o=u.length;o>r;r++)(e=u[r])();return this.children=[],this.htmlSubs=[]},s.prototype.addChild=function(t){return null==this.children&&(this.children=[]),this.children.push(t)},s.prototype.linkModel=function(t,e,n){var r,o,s,u;if(t&&(t=i.splitAndTrim(t,",")),t&&t.length>0)for(r=function(t){return function(e,r){return t.guard(function(){return n.publish(r,e,{sync:!0})},t.toString())}}(this),s=0,u=t.length;u>s;s++)o=t[s],this.storeSubscribe(e.subscribe(o,r))},s.prototype.init=function(e){var n,i,o,s;if(!this.initDone)return this.initDone=!0,e&&e.addChild(this),i=t.dataset(this.node,"input"),o=t.dataset(this.node,"output"),(i||o)&&(s=(null!=e?e.model:void 0)||r.model,"."===(i||o).trim()?this.model=s:(null==this.model&&(this.model=new r.Model),this.linkModel(i,s,this.model),this.linkModel(o,this.model,s))),(n=t.dataset(this.node,"init"))&&(this.data_init(this.node,n),t.dataset(this.node,"init",null)),this.render(),this.subscribeOnly(this.opts.renderkey,this.reRender)},s.prototype.initUI=function(){var e;return r._debug?(e=t.dataset(this.node,"loaded"),e&&(e=""+e+";"+this),t.dataset(this.node,"loaded",e||this)):t.dataset(this.node,"loaded",!0),null==this.tplNode&&(this.tplNode=this.node),this.resetContent()},s.prototype.reRender=function(t){return t?this.render():void 0},s.prototype.preRender=function(){var t;return this.useTemplate&&(t=this.node,this.node=this.tplNode.cloneNode(!0)),t},s.prototype.postRender=function(t){return t&&t.parentNode?t.parentNode.replaceChild(this.node,t):void 0},s.prototype.alterNodeContent=function(){},s.prototype.render=function(){var t;return r._test&&r.model.publish("test."+this+".render.begin",i.time()),this.initUI(),t=this.preRender(),this.nodeHolder=new r.NodeHolder([this.node]),this.resolveDataAttrs(this.node),this.alterNodeContent(),this.resolveDataRepeat(),this.resolveDataAttrsOnChild(this.node),i.loadDataHandlers(this.node,this),this.postRender(t),r._test?r.model.publish("test."+this+".render.end",i.time()):void 0},s.prototype.isVisible=function(){return this.nodeHolder.isVisible()},s.prototype.show=function(){return this.nodeHolder.show()},s.prototype.hide=function(){return this.nodeHolder.hide()},s.prototype.toggle=function(){return this.isVisible()?this.hide():this.show()},s.prototype.isWidgetNode=function(e){return t.dataset(e,"rhwidget")},s.prototype.isDescendent=function(t){var e,n,r;for(e=t;;){if(r=e.parentNode,!r)break;if(this.isWidgetNode(e)){n=r;break}if(this.node===r)break;e=r}return null!=n},s.prototype.eachChild=function(e,n){return t.eachChild(this.node,e,function(t){return this.isDescendent(t)?void 0:n.call(this,t)},this)},s.prototype.eachDataNode=function(e,n){return t.eachDataNode(this.node,e,function(t,e){return this.isDescendent(t)?void 0:n.call(this,t,e)},this)},s.prototype.traverseNode=function(e,n,r){return t.traverseNode(e,n,r,function(t){return!this.isDescendent(t)},this)},s.prototype.resolveDataAttrsOnChild=function(t){return this.traverseNode(t,function(e){return e!==t&&this.resolveDataAttrs(e),!0})},s.prototype.resolveDataAttrs=function(e){return t.eachAttributes(e,function(t,n){var r;return r=this.dataAttrMethods[t],r&&n?this[r].call(this,e,n):void 0},this)},s.prototype.resolveDataRepeat=function(){return this.eachDataNode("repeat",function(t,e){return this.data_repeat(t,e)})},s.prototype.resolveRepeatVar=function(t,e,n,r,o){return r[t]=r[t]||function(){switch(t){case"@index":return n;case"@size":return e.length;case"this":return e;default:return i.isValidModelKey(t)?i.get(e,t):this._data_iexpr(o,t,e,n)}}.call(this)},s.prototype.resolveEnclosedVar=function(t,e,n,r,o){return i.resolveEnclosedVar(t,function(t){return function(i){return t.resolveRepeatVar(i,e,n,r,o)}}(this))},s.prototype.resolveItemIndex=function(e,n,r){var o;return e.children&&(o={},this.traverseNode(e,function(e){return t.eachAttributes(e,function(s,u,a){var l;if(i.isString(u)){if(0===s.search("data-")){if(u=this.resolveEnclosedVar(u,n,r,o,e),""===u)return t.removeAttribute(e,s);t.setAttribute(e,s,u)}if(l=this.dataIAttrMethods[s]){if(this[l].call(this,e,u,n,r,a))return t.removeAttribute(e,s)}else if(0===s.search("data-i-"))return this.data_iHandler(e,u,n,r,s.substring(7)),t.removeAttribute(e,s)}},this),!0})),e},s.prototype.guard=function(t,e){return null==e&&(e="ui"),s.__super__.guard.call(this,t,e)},s.prototype.data_repeat=function(e,n){var o,s,u,a,l,c,h;return h=i.resolvePipedExpression(n),s=h[0],a=h[1]&&i.resolveNiceJSON(h[1]),(null!=a?a.filter:void 0)&&(o=this._functionWithValue("item, index",a.filter)),l=(null!=a?a.step:void 0)||1,e.removeAttribute("data-repeat"),c=e.cloneNode(!0),u=new r.NodeHolder([e]),this._data_expr(s,function(e){var n,r,i,s,a,h,d;for(null==e&&(e=[]),s=[],l>0?(r=h=0,d=e.length):r=h=e.length-1;l>0?d>h:h>=0;r=h+=l)i=e[r],(!o||o.call(this,i,r))&&(n=this.resolve_rif(c,i,r))&&s.push(this.resolveItemIndex(n,i,r));return 0===s.length&&(a=c.cloneNode(!1),t.addClass(a,"rh-hide"),s.push(a)),u.updateNodes(s)})},s.prototype.resolve_rif=function(e,n,r){var i,o,s,u,a,l,c,h;if((a=t.dataset(e,"rif"))&&(i=this._functionWithValue("item, index",a)),!i||i.call(this,n,r))for(u=e.cloneNode(!1),t.removeAttribute(u,"data-rif"),h=e.childNodes,l=0,c=h.length;c>l;l++)o=h[l],s=this.resolve_rif(o,n,r),s&&u.appendChild(s);return u},s.prototype._functionCache={},s.prototype._function=function(t,e,n){var o,u,a,l,c,h,d,p;if(o=s.prototype._functionCache[t],o&&(u=o[e]),null!=u){if(n&&u.keys)for(p=u.keys,h=0,d=p.length;d>h;h++)c=p[h],n.push(c)}else{e=i.resolveController(e),e=i.resolveModelKeys(e,n);try{l=new Function(t,e)}catch(f){a=f,l=function(){},r._debug&&r._d("error","Expression: "+e,a.message)}u={fn:l,keys:n},null==o&&(o={}),o[e]=u,s.prototype._functionCache[t]=o}return u.fn},s.prototype._functionWithValueCache={},s.prototype._functionWithValue=function(t,e,n){var r,i,o,u,a,l,c;if(r=s.prototype._functionWithValueCache[t],r&&(i=r[e]),i){if(n&&i.keys)for(c=i.keys,a=0,l=c.length;l>a;a++)u=c[a],n.push(u)}else o=this._function(t,"return "+e+";",n),i={fn:o,keys:n},null==r&&(r={}),r[e]=i,s.prototype._functionWithValueCache[t]=r;return i.fn},s.prototype._data_iexpr=function(t,e,n,i){var o,s;s=this._functionWithValue("item, index, node",e);try{return s.call(this,n,i,t)}catch(u){if(o=u,r._debug)return r._d("error","iExpression: "+e,o.message)}},s.prototype.data_itext=function(e,n,r,i){return t.textContent(e,this._data_iexpr(e,n,r,i)),!0},s.prototype.data_ihtml=function(t,e,n,r){return t.innerHTML=this._data_iexpr(t,e,n,r),!0},s.prototype.data_iclass=function(e,n,r,i){var o;return o=this._data_iexpr(e,n,r,i),o&&t.addClass(e,o),!0},s.prototype.data_iHandler=function(e,n,r,i,o){var s;return s=this._data_iexpr(e,n,r,i),s&&t.setAttribute(e,o,s),!0},s.prototype.data_shtml=function(e,n){return t.removeAttribute(e,"data-shtml"),e.innerHTML=this.get(n)},s.prototype.data_stext=function(e,n){return t.removeAttribute(e,"data-stext"),t.textContent(e,this.get(n)||"")},s.prototype.data_init=function(t,e){var n,r;return r=i.resolveExprOptions(e),n=this._function("node",r.expr),n=i.applyCallbackOptions(n,r.opts),n.call(this,t)},s.prototype._data_expr=function(t,e){return this.subscribeExpr(t,e,this.htmlSubs)},s.prototype._eventCallBackData={},s.prototype._data_event_callback=function(t){var e,n;return e=s.prototype._eventCallBackData[t],null==e&&(e={},n=i.resolvePipedExpression(t),e.callback=this._function("event, node",n[0]),n[1]&&(e.opts=i.resolveNiceJSON(n[1])),s.prototype._eventCallBackData[t]=e),e},s.prototype.data_if=function(t,e){var n;return n=new r.NodeHolder([t]),this._data_expr(e,function(t){return t?n.show():n.hide()})},s.prototype.data_hidden=function(t,e){var n;return n=new r.NodeHolder([t]),this._data_expr(e,function(t){return n.accessible(!t)})},s.prototype.data_html=function(t,e){return this._data_expr(e,function(e){return null==e&&(e=""),t.innerHTML=e})},s.prototype.data_text=function(e,n){return this._data_expr(n,function(n){return null==n&&(n=""),t.textContent(e,n)})},s.prototype.resolveAttr=function(){var t;return t={},function(e){var n;return n=t[e],null==n&&(n=i.resolveAttr(e),t[e]=n),n}}(),s.prototype.data_class=function(t,e){return i.each(this.resolveAttr(e),function(e,n){var i;return i=new r.NodeHolder([t]),this._data_expr(e,function(t){var e;return e=t?[n]:[],i.updateClass(e)})},this)},s.prototype.data_attr=function(e,n){return i.each(this.resolveAttr(n),function(n,r){return this._data_expr(n,function(n){return null!=n?t.setAttribute(e,r,n):t.hasAttribute(e,r)?t.removeAttribute(e,r):void 0})},this)},s.prototype.data_css=function(e,n){return i.each(this.resolveAttr(n),function(n,r){return this._data_expr(n,function(n){return null==n&&(n=null),t.css(e,r,n)})},this)},s.prototype.data_checked=function(e,r){var o;return i.isValidModelConstKey(r)&&(r=n(r)),o=e.getAttribute("type"),"checkbox"===o||"radio"===o?(t.getAttribute(e,"checked")&&this.guard(function(){return this.publish(r,e.getAttribute("value",{sync:!0}))}),e.onclick=function(t){return function(){var n,i;return n=e.getAttribute("value"),i=null===n?e.checked:e.checked?n:void 0,t.guard(function(){return this.publish(r,i,{sync:!0})})}}(this),this.htmlSubs.push(this.subscribe(r,function(t){var n;return n=e.getAttribute("value"),e.checked=null!=n?t===n:t===!0}))):void 0},s.prototype.data_value=function(t,e){var r;return i.isValidModelConstKey(e)&&(e=n(e)),r=Math.random(),t.value&&this.guard(function(){return this.publish(e,t.value,{sync:!0})},r),t.onchange=function(n){return function(){return n.guard(function(){return this.guard(function(){return this.publish(e,t.value,{sync:!0})})},r)}}(this),this.htmlSubs.push(this.subscribe(e,function(e){return function(n){return e.guard(function(){return t.value=n},r)}}(this)))},s.prototype._register_event_with_rawExpr=function(t,e,n){var r;return r=this.resolveEventRawExpr(n).callback,i.addEventListener(e,t,function(t){return function(e){return r.call(t,e,e.currentTarget)}}(this)),r},s.prototype.data_click=function(t,e){return this._register_event_with_rawExpr("click",t,e)},s.prototype.data_mouseover=function(t,e){return this._register_event_with_rawExpr("mouseover",t,e)},s.prototype.data_mouseout=function(t,e){return this._register_event_with_rawExpr("mouseout",t,e)},s.prototype.data_focus=function(t,e){return this._register_event_with_rawExpr("focus",t,e)},s.prototype.data_blur=function(t,e){return this._register_event_with_rawExpr("blur",t,e)},s.prototype.data_trigger=function(t,e){return i.isValidModelConstKey(e)&&(e=n(e)),i.addEventListener(t,"click",function(t){return function(){return t.publish(e,null)}}(this))},s.prototype.data_method=function(t,e){return i.addEventListener(t,"click",function(t){return function(n){return n.defaultPrevented?void 0:(t[e]||window[e])(n)}}(this))},s.prototype._toggleData={},s.prototype.data_toggle=function(t,e){var n,r,o,u,a,l;return u=[],o=s.prototype._toggleData[e],null==o&&(l=i.resolvePipedExpression(e),r=l.shift()||"",r=i.explodeAndMap(r,";",":",{trim:!0}),l[0]&&(a=i.resolveNiceJSON(l[0])),o={keyValues:r,opts:a},s.prototype._toggleData[e]=o),i.each(o.keyValues,function(t,e){return u.push(e),null!=t?this.guard(function(){return this.publish(e,"true"===t,{sync:!0})}):void 0},this),n=function(t){return function(e){return t.guard(function(){return this.publish(e,!this.get(e),{sync:!0})})}}(this),o.opts&&(n=i.applyCallbackOptions(n,o.opts)),i.addEventListener(t,"click",function(t){return i.each(u,function(e){return t.defaultPrevented?void 0:n(e)})})},s.prototype.data_toggleclass=function(e,n){var r;return r=i.splitAndTrim(n,","),i.addEventListener(e,"click",function(n){return n.defaultPrevented?void 0:(e=n.currentTarget,i.each(r,function(n){return t.hasClass(e,n)?t.removeClass(e,n):t.addClass(e,n)}))})},s.prototype.data_change=function(t,e){var n,r;return r=this._data_event_callback(e),n=i.applyCallbackOptions(r.callback,r.opts),t.onchange=function(t){return function(e){return n.call(t,e,e.currentTarget)}}(this)},s.prototype.data_keydown=function(t,e){var n,r,o;return r=this._data_event_callback(e),n=i.applyCallbackOptions(r.callback,r.opts),o=r.opts&&r.opts.keyCode,t.onkeydown=function(t){return function(e){return o&&o!==e.keyCode?void 0:n.call(t,e,e.currentTarget)}}(this)},s.prototype.data_keyup=function(t,e){var n,r,o;return r=this._data_event_callback(e),n=i.applyCallbackOptions(r.callback,r.opts),o=r.opts&&r.opts.keyCode,t.onkeyup=function(t){return function(e){return o&&o!==e.keyCode?void 0:n.call(t,e,e.currentTarget)}}(this)},s.prototype.data_scroll=function(t,e){var n,r,o,s;return r=this._data_event_callback(e),s=r.opts,o=s&&s.delta||100,n=function(e){return function(n){var i;return i=t.getBoundingClientRect(),t.scrollTop>t.scrollHeight-(i.height+o)?r.callback.call(e,n,t):void 0}}(this),s&&(n=i.applyCallbackOptions(n,s)),i.addEventListener(t,"scroll",n)},s.prototype._loadData={},s.prototype.data_load=function(e,n){var r,o,u;return u=n.split(":"),r=u[0],o=u[1],s.prototype._loadData[r]?void 0:i.addEventListener(e,"click",function(n){return function(){var u;return s.prototype._loadData[r]?void 0:(s.prototype._loadData[r]=!0,o&&(t.addClass(e,"loading"),u=n.subscribeOnly(o,function(){return t.removeClass(e,"loading"),u()})),i.loadScript(r))}}(this))},s.prototype.data_controller=function(t,e){var n,o,s,u,a,l,c,h,d;for(null==this.controllers&&(this.controllers={}),d=i.splitAndTrim(e,";"),c=0,h=d.length;h>c;c++)u=d[c],l=i.resolvePipedExpression(u),l[1]&&(a=i.resolveNiceJSON(l[1])),l=i.splitAndTrim(l[0],":"),0===l.length&&(l=i.splitAndTrim(l[0]," as ")),o=r._controllers[l[0]],s=l[1],o&&!this.controllers[s]?(n=new o(this,a),s&&(this.controllers[s]=n)):r._debug&&!o&&r._d("error","Controller "+o+" not found")},s.prototype.data_screenvar=function(t,e){var r,o,s,u;return s=i.splitAndTrim(e,","),o=i.findIndex(this.get(n("KEY_SCREEN")),function(t){return t.attached}),r={},r[o]={},u=this.get(n("KEY_SCREEN")),i.each(i.keys(u),function(t){return this.subscribeOnly(""+n("KEY_SCREEN")+"."+t+".attached",function(e){return function(n){var u;if(n)return i.each(s,function(e){return r[o][e]=this.get(e),null!=r[t]?this.publish(e,r[t][e]):void 0},e),null!=r[u=o=t]?r[u]:r[u]={}}}(this))},this)},s}(r.Guard),r.widgets={},r.Widget=e,r.widgets.Basic=e}.call(this),function(){var t,e,n,r,i,o;r=window.rh,o=r._,t=r.$,e=r.consts,n=t("head",0),i=document.createElement("style"),i.innerHTML=".rh-hide:not(.rh-animate){display:none !important;}",n.insertBefore(i,n.childNodes[0]),o.addEventListener(document,"DOMContentLoaded",function(){return r._debug&&null==r.console&&(r.console=new r.Console),r.model.publish(e("EVT_WIDGET_BEFORELOAD"),!0,{sync:!0}),o.loadWidgets(document),o.loadContentFilter(document),r.model.publish(e("EVT_WIDGET_LOADED"),!0,{sync:!0})}),o.isIframe()&&(o.addEventListener(window,"beforeunload",function(){return void r.model.publish(e("EVT_BEFORE_UNLOAD"),!0,{sync:!0})}),o.addEventListener(window,"unload",function(){return void r.model.publish(e("EVT_UNLOAD"),!0,{sync:!0})}))}.call(this),function(){var t,e;t=window.rh,e=t._,e.addEventListener(window,"message",function(n){var r,i,o,s,u,a,l;if(e.isSameOrigin(n.origin)&&(i=n.data,e.isObject(i))){if(i.rhmodel_publish&&(r=i.rhmodel_publish))for(s in r)l=r[s],t.iframe.publish(s,l,{sync:!0});return i.rhmodel_subscribe&&(r=i.rhmodel_subscribe,o=r.input||[],a=!t.model.get("_sharedkeys.input"),u=e.reduce(o,function(t,e){return(a||e.nested!==!1)&&t.push(e.key),t},[]),(null!=u?u.length:void 0)&&t.iframe.linkModel(n.source,r.id,u)),i.rhmodel_unsubscribe?(r=i.rhmodel_unsubscribe,t.iframe.clean(r.id)):void 0}})}.call(this),function(){var t,e,n,r,i,o=function(t,e){return function(){return t.apply(e,arguments)}},s={}.hasOwnProperty,u=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=window.rh,i=r._,t=r.$,n=r.consts,e=function(t){function e(){this.unsubscribe=o(this.unsubscribe,this),this.linkedSubs={},i.isIframe()&&(r.model.subscribe(n("EVT_BEFORE_UNLOAD"),this.unsubscribe),r.model.subscribe(n("EVT_UNLOAD"),this.unsubscribe))}return u(e,t),e.prototype.toString=function(){return"Iframe"},e.prototype.unsubscribe=function(){var t;return this.parent?(t={id:this.id},this.parent.postMessage({rhmodel_unsubscribe:t},"*"),this.parent=void 0):void 0},e.prototype.init=function(){var t,e,n,o;return null==this.id&&(this.id=i.uniqueId()),this.parent=window.parent,i.isIframe()&&(t=r.model.get("_sharedkeys.input"),t&&(e=i.map(t,function(t){return i.isString(t)?{key:t}:t}),n={input:e,id:this.id},this.parent.postMessage({rhmodel_subscribe:n},"*")),o=r.model.get("_sharedkeys.output"))?this.linkModel(this.parent,this.id,o):void 0},e.prototype.clean=function(t){var e,n,r,i;if(e=this.linkedSubs[t]){for(r=0,i=e.length;i>r;r++)(n=e[r])();return delete this.linkedSubs[t]}},e.prototype.linkModel=function(t,e,n){var i,o,s,u,a;for(null==n&&(n=[]),s=[],i=function(n){return function(r,i){return n.guard(function(){var e;return e={},e[i]=r,t.postMessage({rhmodel_publish:e},"*")},e)}}(this),u=0,a=n.length;a>u;u++)o=n[u],o=o.trim(),s.push(r.model.subscribe(o,i));return this.clean(e),this.linkedSubs[e]=s},e.prototype.publish=function(t,e,n){return null==n&&(n={}),this.guard(function(){return r.model.publish(t,e,n)})},e.prototype.guard=function(t,n){return null==n&&(n=this.id),e.__super__.guard.call(this,t,n)},e}(r.Guard),r.iframe=new e}.call(this),function(){var t,e,n;e=window.rh,n=e._,t=function(){function t(){}return t.prototype.toString=function(){return"Storage"},t.prototype.init=function(t){var r,i;return this.namespace?e._debug&&this.namespace!==t?e._d("error","Storage","Namespace cann't be changed"):void 0:(this.namespace=t,n.canUseLocalDB()?r=localStorage.getItem(this.namespace):(i=n.explodeAndMap(document.cookie,";","="),i[this.namespace]&&(r=unescape(i[this.namespace]))),this.storageMap=r?JSON.parse(r):{})},t.prototype.isValid=function(){return e._debug&&!this.storageMap&&e._d("error","Storage","Namespace is not set yet."),null!=this.storageMap},t.prototype.persist=function(t,e){return this.isValid()?(this.storageMap[t]=e,this.dump()):void 0},t.prototype.fetch=function(t){return this.isValid()?this.storageMap[t]:void 0},t.prototype.dump=function(){return this.isValid()?n.canUseLocalDB()?localStorage.setItem(this.namespace,JSON.stringify(this.storageMap)):document.cookie=""+this.namespace+"="+escape(JSON.stringify(this.storageMap)):void 0},t}(),e.storage=new t}.call(this),function(){var t,e,n,r,i;r=window.rh,i=r._,e=r.consts,n=r.model,t=function(){function t(){this.subs=[],n.subscribe(e("EVT_ORIENTATION_CHANGE"),function(t){return function(){return i.each(t.subs,function(t){return t.eventHandler(t.mql)})}}(this)),r._debug&&!this.isSupported()&&r._d("Browser Issue","matchMedia is not supported.")}return t.prototype.toString=function(){return"Responsive"},t.prototype.isSupported=function(){return null!=window.matchMedia},t.prototype.attach=function(t,e,n){var r,i;return this.isSupported?(i=window.matchMedia(t),r=function(t){return t.matches?e():n()},r(i),i.addListener(r),this.subs.push({mql:i,on:e,off:n,eventHandler:r})):void 0},t.prototype.detach=function(t,e,n){var r,i,o,s,u;for(u=this.subs,r=o=0,s=u.length;s>o;r=++o)if(i=u[r],i.mql.media===t&&i.on===e&&i.off===n){i.mql.removeListener(i.eventHandler),this.subs.splice(r);break}},t}(),r.responsive=new t}.call(this),function(){var t,e,n,r,i,o,s=function(t,e){return function(){return t.apply(e,arguments)}};i=window.rh,o=i._,e=i.consts,r=i.model,n={desktop:{media_query:"screen and (min-width: 1296px)"},tablet:{media_query:"screen and (min-width: 942px) and (max-width: 1295px)"},phone:{media_query:"screen and (max-width: 941px)"},ios:{user_agent:/(iPad|iPhone|iPod)/g},ipad:{user_agent:/(iPad)/g},print:{media_query:"print"}},t=function(){function t(){this.offScreen=s(this.offScreen,this),this.onScreen=s(this.onScreen,this),this.subscribeScreen=s(this.subscribeScreen,this);var t;t=o.extend({},n,r.get(e("KEY_SCREEN"))),t&&o.each(t,this.subscribeScreen)}return t.prototype.attachedKey=function(t){return""+e("KEY_SCREEN")+"."+t+".attached"},t.prototype.subscribeScreen=function(t,n){return t.user_agent&&!window.navigator.userAgent.match(o.toRegExp(t.user_agent))?this.offScreen(n):t.media_query?i.responsive.isSupported()?i.responsive.attach(t.media_query,function(t){return function(){return t.onScreen(n)}}(this),function(t){return function(){return t.offScreen(n)}}(this)):n===r.get(e("KEY_DEFAULT_SCREEN"))?this.onScreen(n):this.offScreen(n):this.onScreen(n)},t.prototype.onScreen=function(t){var e;return e=this.attachedKey(t),r.publish(e,!0)},t.prototype.offScreen=function(t){var e;return e=this.attachedKey(t),!1!==r.get(e)?r.publish(e,!1):void 0},t}(),r.subscribe(e("EVT_WIDGET_BEFORELOAD"),function(){var e;return e=null,function(){return null!=e?e:e=new t}}()),r.publish(e("KEY_SCREEN_NAMES"),["desktop","tablet","phone"]),r.publish(e("KEY_SCREEN"),n),r.publish(e("KEY_DEFAULT_SCREEN"),"phone")}.call(this),function(){var t,e,n,r;n=window.rh,t=n.$,r=n._,e=function(){function e(t){this.nodes=t}return e.prototype.isVisible=function(e){return null==e&&(e=this.nodes[0]),!t.hasClass(e,"rh-hide")},e.prototype.show=function(){return r.each(this.nodes,function(e){return this.isVisible(e)?void 0:(t.removeClass(e,"rh-hide"),e.hidden=!1)},this)},e.prototype.hide=function(){return r.each(this.nodes,function(e){return this.isVisible(e)?(t.addClass(e,"rh-hide"),e.hidden=!0):void 0},this)},e.prototype.accessible=function(t){return r.each(this.nodes,function(e){return e.hidden=t})},e.prototype.updateClass=function(e){var n,r,i,o,s,u,a,l,c,h;for(null==this.oldClasses&&(this.oldClasses=[]),c=this.nodes,i=0,u=c.length;u>i;i++){for(r=c[i],h=this.oldClasses,o=0,a=h.length;a>o;o++)n=h[o],t.removeClass(r,n);for(s=0,l=e.length;l>s;s++)n=e[s],n.length>0&&(t.addClass(r,n),this.oldClasses.push(n))}},e.prototype.updateNodes=function(t){var e,n,r,i,o,s,u,a;for(e=this.nodes[0],r=e.parentNode,i=0,s=t.length;s>i;i++)n=t[i],r.insertBefore(n,e);for(a=this.nodes,o=0,u=a.length;u>o;o++)n=a[o],r.removeChild(n);return this.nodes=t},e}(),n.NodeHolder=e}.call(this),function(){var t,e;t=window.rh,e=t._,t._controllers={},t.registerController=function(e,n){return e&&n?t._controllers[e]=n:void 0}}.call(this),function(){var t;t=window.rh,t.registerDataAttr=function(e,n,r){var i;return null==r&&(r=t.Widget),i="data_"+e,r.prototype.dataAttrMethods["data-"+e]=i,r.prototype.dataAttrs.push(e),r.prototype[i]=function(t,e){return new n(this,t,e)}}}.call(this),function(){var t,e,n,r,i,o=function(t,e){return function(){return t.apply(e,arguments)}};r=window.rh,i=r._,t=r.$,n=r.consts,e=function(){function t(t,e,r){var s,u,a;this.widget=t,this.node=e,this.handleMouseMove=o(this.handleMouseMove,this),this.handleMouseDown=o(this.handleMouseDown,this),a=this.widget.resolveRawExprWithValue(r),s=a.callback,u=a.opts,this.opts=u,this.callback=function(){return s.call(this.widget)},null==u.maxx&&(u.maxx=1),null==u.minx&&(u.minx=0),null==u.maxy&&(u.maxy=1),null==u.miny&&(u.miny=0),this.resize=!1,i.initMouseMove(),i.addEventListener(this.node,"mousedown",this.handleMouseDown),this.widget.subscribe(n("EVT_MOUSEMOVE"),this.handleMouseMove)}return t.prototype.handleMouseDown=function(t){var e;if(1===t.which)return this.resize=t.target===this.node&&!t.defaultPrevented,this.resize?(e=this.callback(),this.resize=e!==!1&&null!==e):void 0},t.prototype.handleMouseMove=function(t){return t.defaultPrevented&&(this.resize=!1),this.resize?(t.defaultPrevented=!0,1===t.which?this.publish(t):this.resize=!1):void 0},t.prototype.getBaseWidth=function(){return this.opts.basex||document.body.offsetWidth},t.prototype.getBaseHeight=function(){return this.opts.basey||document.body.offsetHeight},t.prototype.publish=function(t){var e,r,i;return e=this.getBaseWidth(),i="rtl"===this.widget.get(n("KEY_DIR")),r=i?e-t.x:t.x,this.publishPos(e,this.opts.minx,this.opts.maxx,this.opts.x,r)?void 0:(e=this.getBaseHeight(),r=i?e-t.y:t.y,this.publishPos(e,this.opts.miny,this.opts.maxy,this.opts.y,r))},t.prototype.publishPos=function(t,e,n,r,i){var o;return null!=r&&null!=i&&(o=this.widget.get(r),o!==i)?(i>n*t?i=n*t:e*t>i&&(i=e*t),this.widget.publish(r,""+i+"px"),this.callback(),!0):void 0},t}(),r.registerDataAttr("resize",e)}.call(this),function(){var t,e,n,r,i={}.hasOwnProperty,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};n=window.rh,r=n._,t=n.$,e=function(t){function e(t){e.__super__.constructor.call(this,t),null==this.model&&(this.model=n.model)}return o(e,t),e}(n.Widget),window.rh.widgets.Global=e}.call(this),function(){var t,e,n,r,i,o,s=function(t,e){return function(){return t.apply(e,arguments)}},u={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};i=window.rh,o=i._,t=i.$,r=i.consts,n=i.Widget,e=function(e){function u(t){this.renderChunck=s(this.renderChunck,this),this.reRender=s(this.reRender,this),u.__super__.constructor.call(this,t),null==this.key&&(this.key="_"+this),null==this.path&&(this.path=[]),null==this.children&&(this.children=[]),null==this.controllers&&(this.controllers={}),this.useTemplate=!0,this.renderedIndex=0,this.renderedCount=0,this.subscribeExpr(this.keyexpr,function(t){return null==t&&(t=[]),this.publish(this.key,t,{sync:!0})}),this.subscribeOnly(this.key,this.reRender),this.subscribeOnly(this.opts.loadmore,this.renderChunck)}return a(u,e),u.prototype.dataIAttrs=["child"].concat(n.prototype.dataIAttrs),u.prototype.dataIAttrMethods=function(){return n.prototype.mapDataAttrMethods(u.prototype.dataIAttrs)}(),u.prototype.supportedArgs=["node","model","key","controllers","filter","spliton","path","tplNode","tplChildNodes"],u.prototype.parseOpts=function(t){var e;return u.__super__.parseOpts.apply(this,arguments),t.arg&&(this.key=t.arg),(e=t.pipedArgs)&&(e[0]&&e[0].length>0&&(this.filter=e[0]),e[1]&&e[1].length>0&&(this.spliton=e[1])),o.isString(this.filter)&&(this.filter=this.listItemExpr(this.filter)),o.isString(this.spliton)&&(this.spliton=this.listItemExpr(this.spliton)),this.key&&(o.isValidModelConstKey(this.key)&&(this.key=r(this.key)),!o.isValidModelKey(this.key))?(this.keyexpr=this.key,this.key=null):void 0},u.prototype.notifyLoading=function(t){return this.opts.loading?this.publish(this.opts.loading,t):void 0},u.prototype.listItemExpr=function(){var t;return t={},function(e){var n;return n=t[e],null==n&&(n=this._functionWithValue("item, index",e),t[e]=n),n}}(),u.prototype.isWidgetNode=function(e){return u.__super__.isWidgetNode.apply(this,arguments)||t.dataset(e,"child")},u.prototype.reRender=function(t){return this.data=null,this.renderedIndex=0,this.renderedCount=0,u.__super__.reRender.call(this,t)},u.prototype.preRender=function(){var t,e;return e=this.node,null==this.tplChildNodes&&(this.tplChildNodes=function(){var e,n,r,i;for(r=this.tplNode.childNodes,i=[],e=0,n=r.length;n>e;e++)t=r[e],i.push(t);return i}.call(this)),this.node=this.tplNode.cloneNode(!1),e},u.prototype.alterNodeContent=function(){return null==this.data&&(this.data=this.get(this.key)||[]),this.renderChunck()},u.prototype.renderChunck=function(){var t,e,n,r,i;for(this.notifyLoading(!1),t=n=r=this.renderedIndex,i=this.data.length-1;i>=n;t=n+=1)if(e=this.data[t],!this.filter||this.filter(e,t)){if(this.spliton&&t!==this.renderedIndex&&this.spliton(e,t)){this.notifyLoading(!0); break}this.renderOneItem(e,t)}return this.renderedIndex=t,0===this.renderedCount&&o.defer(function(t){return function(){return t.hide()}}(this)),this.opts.loaded&&t===this.data.length?this.publish(this.opts.loaded,!0):void 0},u.prototype.renderOneItem=function(e,n){var r,o,s,u,a,l,c;for(this.renderedIndex=n,r=this.opts.generateindex||i._debug,c=this.tplChildNodes,a=0,l=c.length;l>a;a++)u=c[a],(s=this.resolve_rif(u,e,n))&&(("undefined"==typeof o||null===o)&&(this.renderedCount++,o=!0),r&&t.dataset(s,"listindex",this.renderedCount-1),s.hasChildNodes()&&this.renderChildList(s,e,n),this.node.appendChild(this.resolveItemIndex(s,e,n,this.key)))},u.prototype.convertToListContainer=function(){},u.prototype._pathId=function(t){var e;return e="_",e+=this.path.join("_"),null!=t&&(this.path.length>0&&(e+="_"),e+=t),e},u.prototype._pathKey=function(t){var e;return null==t&&(t=""),t=t.toString(),e=this.path.join("."),t.length>0&&e.length>0?"."+e+"."+t:t.length>0?"."+t:"."+e},u.prototype.resolveRepeatVar=function(t,e,n,r,i){return r[t]=r[t]||function(){switch(t){case"@itemkey":return""+this.key+"."+n;case"@key":return this.key;case"@id":return this._pathId(n);case"@pid":return this._pathId();case"@path":return this._pathKey(n);case"@ppath":return this._pathKey();case"@level":return this.path.length;default:return u.__super__.resolveRepeatVar.call(this,t,e,n,r,i)}}.call(this)},u.prototype.data_child=function(e,n,r,i){return o.isValidModelKey(n)||t.dataset(e,"child",this._data_iexpr(e,n,r,i)),!1},u.prototype.renderChildList=function(e,n,r){return t.eachDataNode(e,"child",function(i,o){var s,a,l,c;return this.convertToListContainer(e),this.resolveItemIndex(i,n,r),o=t.dataset(i,"child"),"undefined"===o||""===o?i.parentNode.removeChild(i):(s=o.split("|"),c=s[1],l=s[0],a=new u({node:i,model:this.model,key:l,controllers:this.controllers,path:this.path.concat([this.renderedCount-1]),filter:c,tplNode:i.cloneNode(!1),tplChildNodes:this.tplChildNodes}),a.init(this),this.children.push(a))},this)},u}(n),window.rh.widgets.List=e}.call(this),function(){var t,e,n,r,i={}.hasOwnProperty,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};n=window.rh,r=n._,t=n.$,e=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return o(n,e),n.prototype.convertToListContainer=function(e){return this.traverseNode(e,function(e){var n;return(n=t.dataset(e,"checked"))&&(t.dataset(e,"listindex",this.children.length),t.removeAttribute(e,"data-ivalue")),!n})},n.prototype.data_checked=function(e,r){var i;return(i=t.dataset(e,"listindex"))?this.data_gchecked(e,r,i):n.__super__.data_checked.call(this,e,r)},n.prototype.data_gchecked=function(t,e,n){var r,i,o;r=this.children[n],o=t.getAttribute("type"),("checkbox"===o||"radio"===o)&&(i=[],r.traverseNode(r.node,function(t){var e;return e=t.getAttribute("value"),e&&i.push(e),!0}),i=JSON.stringify(i),t.onclick=function(n){return function(){var r;return r=t.checked?JSON.parse(i):[],n.guard(function(){return this.publish(e,r,{sync:!0})})}}(this),this.htmlSubs.push(this.subscribe(e,function(e){return t.checked=i===JSON.stringify(e)})))},n}(n.widgets.List),window.rh.widgets.CheckboxList=e}.call(this),function(){var t,e,n,r,i,o,s,u,a={}.hasOwnProperty,l=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};for(r=window.rh,i=r._,t=r.$,n=function(e){var n;return n=function(n){function i(n){i.__super__.constructor.call(this,n),null==this.model&&(this.model=r.model),t.dataset(this.node,e,n.rawArg),this.initUI(),this.resolveDataAttrs(this.node),this.initDone=!0}return l(i,n),i.prototype.toString=function(){return""+e+"_"+this._count},i.prototype.dataAttrMethods=function(){var t;return t={},t["data-"+e]="data_"+e,t}(),i}(r.Widget)},u=r.Widget.prototype.dataAttrs,o=0,s=u.length;s>o;o++)e=u[o],window.rh.widgets[e]=n(e)}.call(this);