-
Notifications
You must be signed in to change notification settings - Fork 0
/
qml.app.min.js
1 lines (1 loc) · 160 KB
/
qml.app.min.js
1
"use strict";var log=null,$manifest$author$email="team@pureqml.com",$manifest$author$name="PureQML Team",$manifest$author$organization="PureQML",$manifest$author$site="https://pureqml.com",$manifest$cssAutoClassificator=!1,$manifest$cssDisableTransformations=!1,$manifest$cssDisableTransitions=!1,$manifest$disableAnimations=!1,$manifest$domain="com.pureqml.mosaicdemo",$manifest$expectRunContextEvent=!1,$manifest$html5$prefix="",$manifest$log$disable=!1,$manifest$requireExplicitRecursiveVisibilityStyle=!1,$manifest$requireVerticalTextAlignmentStyle=!1,$manifest$resolutionHeight=720,$manifest$resolutionWidth=1280,$manifest$style$font$family="Arial",$manifest$style$font$lineHeight=1.2,$manifest$style$font$pixelSize=16,$manifest$style$font$pointSize=0,$manifest$system$fingerprint=!1,$manifest$title="mosaic",$manifest$trace$focus=!1,$manifest$trace$keys=!1,$manifest$trace$listeners=!1,$manifest$useNativeFocusForInput=!0,$manifest$virtual$height=720,$manifest$virtual$width=1280,qml=function(){var t={},k=t;k.core||(k.core={});var P=k.core;k.web||(k.web={});k.web;k.controls||(k.controls={});k.controls;k.controls.core||(k.controls.core={});var a=k.controls.core;k.controls.mixins||(k.controls.mixins={});var s=k.controls.mixins;k.controls.pure||(k.controls.pure={});k.controls.pure;k.controls.experimental||(k.controls.experimental={});var c=k.controls.experimental;k.controls.web||(k.controls.web={});var v=k.controls.web;k.controls.web.api||(k.controls.web.api={});var i=k.controls.web.api;k.video||(k.video={});k.video;k.video.html5||(k.video.html5={});k.video.html5;k.html5||(k.html5={});var r=k.html5;k.src||(k.src={});var l=k.src;k.core.core=function(){var i=k;P.device=0,P.vendor="",P.__videoBackends={},"undefined"!=typeof navigator?(i.core.os=navigator.platform,i.core.userAgent=navigator.userAgent,i.core.language=navigator.language):(i.core.os="unknown",i.core.userAgent="Unknown");var t=function(t,e){i.core.userAgent.indexOf(t)<0||(i.core.vendor=e.vendor,i.core.device=e.device,i.core.os=e.os)};i.core.vendor||(t("Blackberry",{vendor:"blackberry",device:2,os:"blackberry"}),t("Android",{vendor:"google",device:2,os:"android"}),t("iPhone",{vendor:"apple",device:2,os:"iOS"}),t("iPad",{vendor:"apple",device:2,os:"iOS"}),t("iPod",{vendor:"apple",device:2,os:"iOS"})),0<=i.core.userAgent.indexOf("Chromium")?i.core.browser="Chromium":0<=i.core.userAgent.indexOf("Chrome")?i.core.browser="Chrome":0<=i.core.userAgent.indexOf("Opera")?i.core.browser="Opera":0<=i.core.userAgent.indexOf("Firefox")?i.core.browser="Firefox":0<=i.core.userAgent.indexOf("Safari")?i.core.browser="Safari":0<=i.core.userAgent.indexOf("MSIE")?i.core.browser="IE":0<=i.core.userAgent.indexOf("YaBrowser")?i.core.browser="Yandex":i.core.browser="",k._backend=function(){return k.html5.html},k.core.__locationBackend=function(){return k.html5.location},k.core.__localStorageBackend=function(){return k.html5.localstorage},k.core.__videoBackends.html5=function(){return k.video.html5.backend},k.core.__deviceBackend=function(){return k.web.device},i.core.keyCodes={13:"Select",16:"Shift",17:"Ctrl",18:"LeftAlt",27:"Back",37:"Left",32:"Space",33:"PageUp",34:"PageDown",36:"Menu",38:"Up",39:"Right",40:"Down",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",112:"Red",113:"Green",114:"Yellow",115:"Blue",219:"Red",221:"Green",186:"Yellow",222:"Blue",230:"RightAlt",187:"VolumeUp",189:"VolumeDown",191:"Mute",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",107:"VolumeUp",109:"VolumeDown",111:"Mute"},i.closeApp=function(){window.close()},Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),i=this,n=function(){},o=function(){return i.apply(this instanceof n&&t?this:t,e.concat(Array.prototype.slice.call(arguments)))};return n.prototype=this.prototype,o.prototype=new n,o},null===log&&(log=function(){for(var t="",e=0;e<arguments.length;++e)t+=arguments[e]+" ";console.log(t)})),null===log&&(log=console.log.bind(console));var c={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32","":"",transparent:"0000"};i.core.safeCall=function(e,i,n){return function(t){return function(t,e,i,n){try{return t.apply(e,i)}catch(t){n(t)}}(t,e,i,n)}},i.core.assign=function(t,e,i){for(var n=(e=e.split(".")).length-1,o=0;o<n;++o)t=t[e[o]];t[e[n]]=i},P.getKeyCodeByName=function(t){var e=P.keyCodes;for(var i in e)if(e[i]===t)return~~i};var e=P.CoreObject=function(t){this._local=Object.create(t?t._local:null)},n=e.prototype;n.componentName="core.CoreObject",n.constructor=e,n.$c=function(){},n.$s=function(){},n.__init=function(){var t={};this.$c(t),this.$s(t),this.completed()},n.__complete=function(){},n._get=function(t,e){if(t in this)return this[t];if(t in this._local)return this._local[t];if(e)return null;throw new Error("invalid property requested: '"+t+"'")};var l=P.Color=function(t){if(Array.isArray(t))return this.r=t[0],this.g=t[1],this.b=t[2],void(this.a=void 0!==t[3]?t[3]:255);if("string"!=typeof t)return this.r=this.b=this.a=255,this.g=0,void log("invalid color specification: "+t,(new Error).stack);var e;if("#"===t[0])e=t.substring(1);else{if("rgba"===t.substring(0,4)){var i=t.indexOf("("),n=t.lastIndexOf(")");return t=t.substring(i+1,n).split(","),this.r=parseInt(t[0],10),this.g=parseInt(t[1],10),this.b=parseInt(t[2],10),void(this.a=Math.floor(255*parseFloat(t[3])))}e=c[t]}if(!e)return this.r=this.b=this.a=255,this.g=0,void log("invalid color specification: "+t,(new Error).stack);var o=e.length;if(3===o||4===o){var r=parseInt(e[0],16),a=parseInt(e[1],16),s=(i=parseInt(e[2],16),4===o?parseInt(e[3],16):15);this.r=r<<4|r,this.g=a<<4|a,this.b=i<<4|i,this.a=s<<4|s}else{if(6!==o&&8!==o)throw new Error("invalid color specification: "+t);this.r=parseInt(e.substring(0,2),16),this.g=parseInt(e.substring(2,4),16),this.b=parseInt(e.substring(4,6),16),this.a=8===o?parseInt(e.substring(6,8),16):255}};l.interpolate=function(t,e,i){t instanceof l||(t=new l(t)),e instanceof l||(e=new l(e));var n=function(t,e,i){return Math.floor(i*(t-e)+e)},o=n(t.r,e.r,i),r=n(t.g,e.g,i),a=n(t.b,e.b,i),s=n(t.a,e.a,i);return new l([o,r,a,s])},l.normalize=function(t){return t instanceof l?t:new l(t)};var o=l.prototype;o.constructor=P.Color,o.rgba=o.toString=function(){var t=this.a;return 255==t?"rgb("+this.r+","+this.g+","+this.b+")":"rgba("+this.r+","+this.g+","+this.b+","+t/255+")"};var r=function(t){var e=t>>4&15,i=15&t;return e+=9<e?87:48,i+=9<i?87:48,String.fromCharCode(e,i)};o.hex=function(){return"#"+r(this.r)+r(this.g)+r(this.b)+r(this.a)},o.ahex=function(){return"#"+r(this.a)+r(this.r)+r(this.g)+r(this.b)},i.addLazyProperty=function(e,n,o){var i=function(t){var e=t.__properties,i=e[n];return void 0!==i?(void 0===i.value&&(i.value=o(t)),i):e[n]=new a(o(t))};Object.defineProperty(e,n,{get:function(){return i(this).value},set:function(t){if(!i(this).forwardSet(this,n,t,null))throw new Error("could not set lazy property "+n+" in "+e.componentName)},enumerable:!0})},i.addConstProperty=function(t,e,i){Object.defineProperty(t,e,{get:function(){return i.call(this)},set:function(t){throw new Error("could not set const property")},enumerable:!0})};var a=function(t){this.value=t,this.onChanged=[]},s=(i.PropertyStorage=a).prototype;s.getAnimation=function(t,e){var i=this.animation;return i&&i.enabled()&&!i._native&&i._context._completed?i:null},s.__removeUpdater=function(t){for(var e=this.deps,i=0,n=e.length;i<n;i+=2){var o=e[i],r=e[i+1];o.removeOnChanged(r,t)}},s.removeUpdater=function(){var t=this.callback;void 0!==t&&(this.__removeUpdater(t),this.deps=this.callback=void 0)},s.replaceUpdater=function(t,e,i){var n=this.callback;void 0!==n&&this.__removeUpdater(n),this.callback=e,this.deps=i;for(var o=t.connectOnChanged,r=0,a=i.length;r<a;r+=2){var s=i[r],c=i[r+1];o.call(t,s,c,e)}e()},s.forwardSet=function(n,o,t,e){var i=this.getCurrentValue(e);if(null!==i&&i instanceof Object){var r;if(void 0===(r=i.defaultProperty))return!1;var a=i[r];return t!==a&&(i[r]=t,this.callOnChanged(n,o,t,a)),!0}if(t instanceof Object)return void 0===(r=t.defaultProperty)||n.connectOnChanged(t,r,function(t,e){var i=n.__properties[o];void 0!==i&&i.callOnChanged(n,o,t,e)}),!1},s.discard=function(){var t=this.getAnimation();t&&t.complete(),this.onChanged=[]},s.getSimpleValue=function(t){var e=this.value;return void 0!==e?e:t},s.getCurrentValue=function(t){var e=this.interpolatedValue;return void 0!==e?e:this.getSimpleValue(t)},s.setCurrentValue=function(t,e,i,n,o){var r=this.value;this.interpolatedValue=void 0,this.value=i,o&&this.callOnChanged(t,e,i,r)},s.set=function(t,e,i,n,o){var r=this.value;void 0===r&&(r=n),r!==i&&(this.forwardSet(t,e,i,n)||(this.value=i,o&&this.callOnChanged(t,e,i,r)))};var h=function(t,e,i,n){var o=t["__changed__"+e],r=void 0!==o,a=void 0!==n;if(r||a){var s=P.safeCall(t,[i],function(t){log("on "+e+" changed callback failed: ",t,t.stack)});r&&o.forEach(s),a&&n.forEach(s)}};s.callOnChanged=function(t,e,i){h(t,e,i,this.onChanged)},s.removeOnChanged=function(t){var e=this.onChanged,i=e.indexOf(t);if(0<=i)return e.splice(i,1)};var g=i.getDefaultValueForType=function(t){switch(t){case"enum":case"int":return 0;case"bool":return!1;case"real":return 0;case"string":return"";case"array":return[];case"color":case"Color":return"#0000";default:return t[0].toUpperCase()===t[0]?null:void 0}},_=(i.convertTo=function(t,e){switch(t){case"enum":case"int":return~~e;case"bool":return!!e;case"real":return+e;case"string":return String(e);default:return e}},i.getConvertFunction=function(t){switch(t){case"enum":case"int":return function(t){return~~t};case"bool":return function(t){return!!t};case"real":return function(t){return+t};case"string":return function(t){return String(t)};default:return function(t){return t}}});i.addProperty=function(t,e,d,p){var u=_(e),i=function(t){switch(t){case"int":case"real":case"color":case"Color":return!0;default:return!1}}(e);p=void 0!==p?u(p):g(e);var f=function(t){var e=this.__properties,i=e[d];if(void 0===i){if(t===p)return;i=e[d]=new a(p)}return i};Object.defineProperty(t,d,{get:i?function(){var t=this.__properties[d];return void 0!==t?t.getCurrentValue(p):p}:function(){var t=this.__properties[d];return void 0!==t?t.getSimpleValue(p):p},set:i?function(t){t=u(t);var e=f.call(this,t);if(void 0!==e){var i=e.getAnimation();if(i&&e.value!==t){var n=this._context,o=n.backend;e.frameRequest&&o.cancelAnimationFrame(e.frameRequest),e.started=Date.now();var r=e.getCurrentValue(p),a=t,s=this,c=function(){e.frameRequest&&(o.cancelAnimationFrame(e.frameRequest),e.frameRequest=void 0),i.complete=function(){},e.interpolatedValue=void 0,e.started=void 0,i.running=!1,e.callOnChanged(s,d,a,r)},l=i.duration,h=n.wrapNativeCallback(function(){var t=1*(Date.now()-e.started)/l;1<=t||!i.active()?c():(e.interpolatedValue=u(i.interpolate(a,r,t)),e.callOnChanged(s,d,e.getCurrentValue(p),r),e.frameRequest=o.requestAnimationFrame(h))});e.frameRequest=o.requestAnimationFrame(h),i.running=!0,i.complete=c}e.set(this,d,t,p,!i)}}:function(t){t=u(t);var e=f.call(this,t);void 0!==e&&e.set(this,d,t,p,!0)},enumerable:!0})},i.addAliasProperty=function(i,n,t,e){var o=t();i.connectOnChanged(o,e,function(t){var e=i.__properties[n];void 0!==e?e.callOnChanged(i,n,t):h(i,n,t)}),Object.defineProperty(i,n,{get:function(){return o[e]},set:function(t){o[e]=t},enumerable:!0})},P.createSignal=function(t){return function(){this.emitWithArgs(t,arguments)}},P.createSignalForwarder=function(t,e){return function(){t.emitWithArgs(e,arguments)}},P.EventBinder=function(t){this.target=t,this.callbacks={},this.enabled=!1},P.EventBinder.prototype.on=function(t,e){if(t in this.callbacks)throw new Error("double adding of event ("+t+")");this.callbacks[t]=e,this.enabled&&this.target.on(t,e)},P.EventBinder.prototype.constructor=P.EventBinder,P.EventBinder.prototype.enable=function(t){if(t!=this.enabled){var e=this.target;if(this.enabled=t)for(var i in this.callbacks)e.on(i,this.callbacks[i]);else for(var i in this.callbacks)e.removeListener(i,this.callbacks[i])}};var d=function(t,e,i,n){var o=t+i,r=e[o];if(void 0!==r)if(e.hasOwnProperty(o))r.push(n);else{var a=r.slice();a.push(n),e[o]=a}else e[o]=[n]};P._protoOn=function(t,e,i){d("__on__",t,e,i)},P._protoOnChanged=function(t,e,i){d("__changed__",t,e,i)},P._protoOnKey=function(t,e,i){d("__key__",t,e,i)};var p=function(t){this._callback=t,this._queue=[],this.history=[]},u=p.prototype;return u.constructor=p,u.unshift=function(){var t=this._queue;t.unshift.apply(t,arguments)},u.push=function(){var t=this._queue;t.push.apply(t,arguments)},u.enumerate=function(t,e){var i=[this,e],n=this._queue;for(n.unshift(t);n.length;){var o=n.shift();if(this.history.push(o),this._callback.apply(o,i))break}},i.forEach=function(t,e,i){return new p(e).enumerate(t,i),i},i.createObject=function(t){t.__init();var e=t.parent;"_updateVisibilityForChild"in e&&e._updateVisibilityForChild(t,e.recursiveVisible),"_tryFocus"in e&&e._tryFocus(),t._context.scheduleComplete()},i}();var y=k.core.core,n=P.CoreObject,e=n.prototype,o=P.EventEmitter=function(t,e){n.apply(this,arguments),this._eventHandlers={},this._onConnections=[]},h=o.prototype=Object.create(e);h.constructor=o,h.componentName="core.EventEmitter",h.discard=function(){for(var t in this.removeAllOn(),this._eventHandlers)this.removeAllListeners(t)},h.removeAllOn=function(){for(var t=this._onConnections,e=0,i=t.length;e<i;e+=3)t[e].removeListener(t[e+1],t[e+2]);this._onConnections=[]},h.removeAllListeners=function(t){delete this._eventHandlers[t]},h.emit=function(e){if(""===e)throw new Error("empty listener name");var t=this["__on__"+e],i=this._eventHandlers[e];if(void 0!==t||void 0!==i){for(var n=arguments.length,o=new Array(n-1),r=0,a=1;a<n;)o[r++]=arguments[a++];var s=P.safeCall(this,o,function(t){log("event/signal "+e+" handler failed:",t,t.stack)});void 0!==t&&t.forEach(s),void 0!==i&&i.forEach(s)}},h.emitWithArgs=function(e,t){if(""===e)throw new Error("empty listener name");var i=this["__on__"+e],n=this._eventHandlers[e];if(void 0!==i||void 0!==n){var o=P.safeCall(this,t,function(t){log("event/signal "+e+" handler failed:",t,t.stack)});void 0!==i&&i.forEach(o),void 0!==n&&n.forEach(o)}},h.removeListener=function(t,e){if(t in this._eventHandlers&&null!=e&&""!==t){var i=this._eventHandlers[t],n=i.indexOf(e);0<=n?i.splice(n,1):$manifest$trace$listeners&&log("failed to remove listener for",t,"from",this),i.length||this.removeAllListeners(t)}else $manifest$trace$listeners&&log("invalid removeListener("+t+", "+e+") invocation",(new Error).stack)},h.on=function(t,e){if(""===t)throw new Error("empty listener name");var i=this._eventHandlers,n=i[t];void 0!==n?n.push(e):i[t]=[e]},h.connectOn=function(t,e,i){t.on(e,i),this._onConnections.push(t,e,i)},h.$c=function(t){e.$c.call(this,t.$b={})},h.$s=function(t){e.$s.call(this,t.$b),delete t.$b,this.completed()};var d=P.EventEmitter,p=d.prototype,u=P.Object=function(t,e){d.apply(this,arguments),this.parent=t,this.children=[],this.__properties={},this.__attachedObjects=[],t&&t.__attachedObjects.push(this);this._context=t?t._context:null;if(e){var i=this._local;i.model=e,i._delegate=this}this._changedConnections=[],this._properties={}},f=u.prototype=Object.create(p);f._propertyToStyle={width:"width",height:"height",x:"left",y:"top",viewX:"left",viewY:"top",opacity:"opacity",border:"border",radius:"border-radius",rotate:"transform",boxshadow:"box-shadow",transform:"transform",visible:"visibility",visibleInView:"visibility",background:"background",color:"color",backgroundImage:"background-image",font:"font"},f.constructor=u,f.componentName="core.Object",f.completed=function(){this.__complete!==P.CoreObject.prototype.__complete&&this._registerDelayedAction("complete")&&this._context.__onCompleted(this)},f.discard=function(){this.removeAllOnChanged();var t=this.__attachedObjects;this.__attachedObjects=[],t.forEach(function(t){t.discard()});var e=this.parent;if(e){var i=e.__attachedObjects.indexOf(this);0<=i&&e.__attachedObjects.splice(i,1)}this.children=[],this.parent=null,this._local={};var n=this.__properties;for(var o in n)n[o].discard();this._properties={},P.EventEmitter.prototype.discard.apply(this)},f.removeAllOnChanged=function(){for(var t=this._changedConnections,e=0,i=t.length;e<i;e+=3)t[e].removeOnChanged(t[e+1],t[e+2]);this._changedConnections=[]},f.getComponentPath=function(){for(var t=[],e=this;e;){var i=e.componentName;if(e.parent){var n=e.parent.children.indexOf(e);0<=n&&(i+="@"+n)}t.unshift(i),e=e.parent}return t.join(" → ")},f._tryFocus=function(){return!1},f.addChild=function(t){this.children.push(t)},f.removeChild=function(t){var e=this.children,i=e.indexOf(t);0<=i&&e.splice(i,1)},f._cancelDelayedAction=function(t){this._registeredDelayedActions[t]=!1},f._setId=function(t){for(var e=this;e;)e._local[t]=this,e=e.parent},f._registerDelayedAction=function(t){var e=this._registeredDelayedActions;return void 0===e&&(e=this._registeredDelayedActions={}),!0!==e[t]&&(e[t]=!0)},f.resetAnimation=function(t){var e=this.__properties[t];if(void 0!==e&&e.animation){var i=e.animation;i.disable();var n=i.target;i.target=n,e.animation=null,i.enable(),i.target=n}},f._removeUpdater=function(t){var e=this.__properties[t];void 0!==e&&e.removeUpdater()},f.updateAnimation=function(t,e){this._context.backend.setAnimation(this,t,e)},f.setAnimation=function(t,e){this._get("context",!0);if(!$manifest$disableAnimations){if(null===e)return this.resetAnimation(t);var i=this._context.backend;"contentX"!==t&&"contentY"!==t||log("WARNING: you're trying to animate contentX/contentY property, this will always use animation frames, ignoring CSS transitions, please use content.x/content.y instead"),e.target=this,e.property=t,this._createPropertyStorage(t).animation=e,i.setAnimation(this,t,e)&&(e._native=!0)}},f.removeOnChanged=function(t,e){var i,n=this.__properties[t];void 0!==n&&(i=n.removeOnChanged(e)),$manifest$trace$listeners&&!i&&log("failed to remove changed listener for",t,"from",this)},f.onChanged=function(t,e){this._createPropertyStorage(t).onChanged.push(e)},f._replaceUpdater=function(t,e,i){this._createPropertyStorage(t).replaceUpdater(this,e,i)},f._setProperty=function(t,e){var i=this._createPropertyStorage(t,e),n=i.animation;void 0!==n&&n.disable(),i.setCurrentValue(this,null,e),void 0!==n&&n.enable()},f._createPropertyStorage=function(t,e){var i=this.__properties[t];return void 0!==i?i:this.__properties[t]=new P.core.PropertyStorage(e)},f.connectOnChanged=function(t,e,i){t.onChanged(e,i),this._changedConnections.push(t,e,i)},f.$c=function(t){p.$c.call(this,t.$b={})},f.$s=function(t){p.$s.call(this,t.$b),delete t.$b,this.completed()};var g=P.Object,_=g.prototype,m=i.Rest=function(t,e){g.apply(this,arguments),this._methods={}},b=m.prototype=Object.create(_);b.constructor=m,b.componentName="controls.web.api.Rest",b.internetConnectionLost=P.createSignal("internetConnectionLost"),b.error=P.createSignal("error"),y.addProperty(b,"string","baseUrl"),b.args=function(t){return t},b.headers=function(t){},b.call=function(t,e,i,n,o,r){if(t.indexOf("://")<0){var a=this.baseUrl;t="/"===a[a.length-1]||"/"===t[0]?a+t:a+"/"+t}this._call(t,e,i,n,JSON.stringify(o),r)},b._call=function(t,n,o,r,e,i){var a=this._get("apiRequest",!0),s=i||{};e&&(e=this.args(e),s["Content-Type"]="application/json");var c=this.headers(s);void 0!==c&&(s=c);var l=t,h=this;a.ajax({method:r||"GET",headers:s,contentType:"application/json",url:l,data:e,done:function(e){if(e.target&&400<=e.target.status)return log("Error in request",e),o&&o(e),void h.error({url:l,method:r,response:e});var i=e.target.responseText;if(i){try{e=JSON.parse(i)}catch(t){e=i}n(e)}else n("")},error:function(t){o&&o(t),h.error({url:l,method:r,response:t})}})},b._registerMethod=function(t,e){var i=this._get("api",!0);if(t){i=this;this[t]=function(){e.call(i,arguments)}}},P._protoOn(b,"error",function(t,e,i){("undefined"!=typeof window&&!window.navigator.onLine||i&&i.target&&0===i.target.status&&""===i.target.response)&&this.internetConnectionLost({url:t,method:e,response:i})}),b.$c=function(t){_.$c.call(this,t.$b={});var e=new P.Request(this);(t._this$child0=e).$c(t.$c$_this$child0={}),e._setId("apiRequest"),this.addChild(e)},b.$s=function(t){_.$s.call(this,t.$b),delete t.$b;var e=t._this$child0;e.$s(t.$c$_this$child0),delete t.$c$_this$child0,e.completed(),this.completed()};var $=i.Rest,w=$.prototype,x=l.AppApi=function(t,e){$.apply(this,arguments)},C=x.prototype=Object.create(w);C.constructor=x,C.componentName="src.AppApi",y.addProperty(C,"string","apiKey","a20b12b279f744f2b3c7b5c5400c4eb5"),C.$c=function(t){w.$c.call(this,t.$b={});var e=new i.Method(this);(t._this$child0=e).$c(t.$c$_this$child0={}),this.addChild(e)},C.$s=function(t){w.$s.call(this,t.$b),delete t.$b,this._removeUpdater("baseUrl"),this.baseUrl="https://api.start.ru";var e=t._this$child0;e.$s(t.$c$_this$child0),delete t.$c$_this$child0,e._replaceUpdater("path",function(){e.path="/web/main?apikey="+e.parent.apiKey},[e.parent,"apiKey"]),e._removeUpdater("name"),e.name="getMain",e.completed(),this.completed()};var A=P.Object,O=A.prototype,S=P.System=function(t,e){A.apply(this,arguments),this.vendor=P.vendor,this.device=P.device,this.os=P.os,this.browser=P.browser,this.userAgent=P.userAgent,this.language=P.language;var i=this._context;i.language=this.language.replace("-","_"),this.webkit=0<=this.userAgent.toLowerCase().indexOf("webkit"),this.support3dTransforms=i.backend.capabilities.csstransforms3d||!1,this.supportTransforms=i.backend.capabilities.csstransforms||!1,this.supportTransitions=i.backend.capabilities.csstransitions||!1,this.resolutionWidth=$manifest$resolutionWidth,this.resolutionHeight=$manifest$resolutionHeight},I=S.prototype=Object.create(O);I.constructor=S,I.componentName="core.System",y.addProperty(I,"string","userAgent"),y.addProperty(I,"string","language"),y.addProperty(I,"string","browser"),y.addProperty(I,"string","vendor"),y.addProperty(I,"string","os"),y.addProperty(I,"bool","webkit"),y.addProperty(I,"bool","support3dTransforms"),y.addProperty(I,"bool","supportTransforms"),y.addProperty(I,"bool","supportTransitions"),y.addProperty(I,"bool","portrait"),y.addProperty(I,"bool","landscape"),y.addProperty(I,"bool","pageActive",!0),y.addProperty(I,"int","screenWidth"),y.addProperty(I,"int","screenHeight"),y.addProperty(I,"int","contextWidth"),y.addProperty(I,"int","contextHeight"),y.addProperty(I,"int","resolutionWidth"),y.addProperty(I,"int","resolutionHeight"),y.addProperty(I,"bool","virtualKeyboard"),I.Desktop=0,S.Desktop=0,I.Tv=1,S.Tv=1,I.Mobile=2,S.Mobile=2,y.addProperty(I,"enum","device"),I.MobileS=0,S.MobileS=0,I.MobileM=1,S.MobileM=1,I.MobileL=2,S.MobileL=2,I.Tablet=3,S.Tablet=3,I.Laptop=4,S.Laptop=4,I.LaptopL=5,S.LaptopL=5,I.Laptop4K=6,S.Laptop4K=6,y.addProperty(I,"enum","layoutType"),I._updateLayoutType=function(){if(this.contextWidth&&this.contextHeight){var t=this.contextWidth;t<=320?this.layoutType=this.MobileS:t<=375?this.layoutType=this.MobileM:t<=425?this.layoutType=this.MobileL:t<=768?this.layoutType=this.Tablet:this.contextWidth<=1024?this.layoutType=this.Laptop:this.contextWidth<=1440?this.layoutType=this.LaptopL:this.layoutType=this.Laptop4K}};var T=function(t){this._updateLayoutType()};P._protoOnChanged(I,"contextHeight",T),P._protoOnChanged(I,"contextWidth",T),I.$c=function(t){O.$c.call(this,t.$b={})},I.$s=function(t){var e=this;O.$s.call(this,t.$b),delete t.$b,e._replaceUpdater("portrait",function(){e.portrait=e.parent.width<e.parent.height},[e.parent,"height",e.parent,"width"]),e._replaceUpdater("contextWidth",function(){e.contextWidth=e._context.width},[e._context,"width"]),e._replaceUpdater("virtualKeyboard",function(){e.virtualKeyboard=e.device===k.core.System.prototype.Tv||e.device===k.core.System.prototype.Mobile},[e,"device"]),e._replaceUpdater("landscape",function(){e.landscape=!e.portrait},[e,"portrait"]),e._replaceUpdater("contextHeight",function(){e.contextHeight=e._context.height},[e._context,"height"]),e.completed()};var U=P.Object,E=U.prototype,L=P.Shadow=function(t,e){U.apply(this,arguments)},z=L.prototype=Object.create(E);z.constructor=L,z.componentName="core.Shadow",y.addProperty(z,"real","x"),y.addProperty(z,"real","y"),y.addProperty(z,"color","color","black"),y.addProperty(z,"real","blur"),y.addProperty(z,"real","spread"),z._empty=function(){return!(this.x||this.y||this.blur||this.spread)},z._getFilterStyle=function(){var t=this.x+"px "+this.y+"px "+this.blur+"px ";return 0<this.spread&&(t+=this.spread+"px "),t+=P.Color.normalize(this.color)};T=function(t){this.parent._updateStyle(!0)};P._protoOnChanged(z,"x",T),P._protoOnChanged(z,"spread",T),P._protoOnChanged(z,"y",T),P._protoOnChanged(z,"blur",T),P._protoOnChanged(z,"color",T),z.$c=function(t){E.$c.call(this,t.$b={})},z.$s=function(t){E.$s.call(this,t.$b),delete t.$b,this.completed()};var M=P.Object,R=M.prototype,H=P.Item=function(t,e){if(M.apply(this,arguments),this._pressedHandlers={},this._topPadding=0,t){if(this.element)throw new Error("double ctor call");this._createElement(this.getTag(),this.getClass())}},j=H.prototype=Object.create(R);j.constructor=H,j.componentName="core.Item",j.anchorsMarginsUpdated=P.createSignal("anchorsMarginsUpdated"),j.newBoundingBox=P.createSignal("newBoundingBox"),y.addProperty(j,"int","x"),y.addProperty(j,"int","y"),y.addProperty(j,"int","z"),y.addProperty(j,"int","width"),y.addProperty(j,"int","height"),y.addProperty(j,"bool","clip"),y.addLazyProperty(j,"radius",function(t,e){var i,n={lazy$radius:i=new P.Radius(t,e)};return i.$c(n.$c$lazy$radius={}),(i=n.lazy$radius).$s(n.$c$lazy$radius),delete n.$c$lazy$radius,i.completed(),i}),y.addProperty(j,"bool","focus"),y.addProperty(j,"bool","focused"),y.addProperty(j,"bool","activeFocus"),y.addProperty(j,"Item","focusedChild"),y.addProperty(j,"bool","visible",!0),y.addProperty(j,"bool","visibleInView",!0),y.addProperty(j,"bool","recursiveVisible",!1),y.addProperty(j,"real","opacity",1),y.addLazyProperty(j,"anchors",function(t,e){var i,n={lazy$anchors:i=new P.Anchors(t,e)};return i.$c(n.$c$lazy$anchors={}),(i=n.lazy$anchors).$s(n.$c$lazy$anchors),delete n.$c$lazy$anchors,i.completed(),i}),y.addLazyProperty(j,"effects",function(t,e){var i,n={lazy$effects:i=new P.Effects(t,e)};return i.$c(n.$c$lazy$effects={}),(i=n.lazy$effects).$s(n.$c$lazy$effects),delete n.$c$lazy$effects,i.completed(),i}),y.addLazyProperty(j,"transform",function(t,e){var i,n={lazy$transform:i=new P.Transform(t,e)};return i.$c(n.$c$lazy$transform={}),(i=n.lazy$transform).$s(n.$c$lazy$transform),delete n.$c$lazy$transform,i.completed(),i}),y.addProperty(j,"bool","cssTranslatePositioning"),y.addProperty(j,"bool","cssNullTranslate3D"),y.addProperty(j,"bool","cssDelegateAlwaysVisibleOnAcceleratedSurfaces",!0),y.addProperty(j,"bool","cssPointerTouchEvents",!1),y.addConstProperty(j,"left",function(){return[this,0]}),y.addConstProperty(j,"top",function(){return[this,1]}),y.addConstProperty(j,"right",function(){return[this,2]}),y.addConstProperty(j,"bottom",function(){return[this,3]}),y.addConstProperty(j,"horizontalCenter",function(){return[this,4]}),y.addConstProperty(j,"verticalCenter",function(){return[this,5]}),y.addProperty(j,"int","viewX"),y.addProperty(j,"int","viewY"),y.addProperty(j,"int","keyProcessDelay"),j.discard=function(){P.Object.prototype.discard.apply(this),this.focusedChild=null,this._pressedHandlers={},this.element&&this.element.discard()},j._tryFocus=function(){if(!this.visible)return!1;if(this.focusedChild&&this.focusedChild._tryFocus())return!0;for(var t=this.children,e=0;e<t.length;++e){var i=t[e];if(i._tryFocus())return this._focusChild(i),!0}return this.focus},j.setFocus=function(){this.forceActiveFocus()},j._updateStyle=function(){var t=this.element;t&&t.updateStyle()},j.toScreen=function(){for(var t=this,e=0,i=0,n=this.width+(this._borderWidthAdjust||0)+(this._borderInnerWidthAdjust||0),o=this.height+(this._borderHeightAdjust||0)+(this._borderInnerHeightAdjust||0);t;){if(e+=t.x+t.viewX+(t._borderXAdjust||0),i+=t.y+t.viewY+(t._borderYAdjust||0),t.hasOwnProperty("view")){var r=t.view.content;e+=r.x,i+=r.y}t=t.parent}return[e,i,e+n,i+o,e+n/2,i+o/2]},j.hasActiveFocus=function(){for(var t=this;t.parent;){if(t.parent.focusedChild!=t)return!1;t=t.parent}return!0},j.forceActiveFocus=function(){for(var t=this;t.parent;)t.parent._focusChild(t),t=t.parent;this._tryFocus()&&this._propagateFocusToParents()},j._propagateFocusToParents=function(){for(var t=this;t.parent&&(!t.parent.focusedChild||!t.parent.focusedChild.visible);)t.parent._focusChild(t),t=t.parent},j._updateVisibility=function(){var t=this.visible&&this.visibleInView,e=!0,i=this.view;if(void 0!==i){var n=i.content;n.cssDelegateAlwaysVisibleOnAcceleratedSurfaces&&(n.cssTranslatePositioning||n.cssNullTranslate3D)&&!$manifest$cssDisableTransformations&&(e=!1)}e&&this.style("visibility",t?"inherit":"hidden"),this.recursiveVisible=t&&(null===this.parent||this.parent.recursiveVisible)},j._setSizeAdjust=function(){var t=this.x+this.viewX+(this._borderXAdjust||0),e=this.y+this.viewY+(this._borderYAdjust||0);this.cssTranslatePositioning&&!$manifest$cssDisableTransformations?(this.transform.translateX=t,this.transform.translateY=e):(this.style("left",t),this.style("top",e)),this.newBoundingBox()},j.getClass=function(){return""},j.getTag=function(){return"div"},j._focusTree=function(t){this.activeFocus=t,this.focusedChild&&this.focusedChild._focusTree(t)},j.addChild=function(t){P.Object.prototype.addChild.apply(this,arguments),t._tryFocus()&&t._propagateFocusToParents()},j._focusChild=function(t){if(t.parent!==this)throw new Error("invalid object passed as child");this.focusedChild!==t&&(this.focusedChild&&(this.focusedChild._focusTree(!1),this.focusedChild.focused=!1),this.focusedChild=t,this.focusedChild&&(this.focusedChild._focusTree(this.hasActiveFocus()),this.focusedChild.focused=!0))},j.focusChild=function(t){this._propagateFocusToParents(),this._focusChild(t)},j._updateVisibilityForChild=function(t,e){t.recursiveVisible=e&&t.visible&&t.visibleInView},j._attachElement=function(t){this.element&&this.element.discard(),this.element=t;var e=this.parent;e&&e.element.append(t)},j._processKey=function(e,t){$manifest$trace$keys&&log(this.getComponentPath(),"_processKey",e,t);var i=t.timeStamp;if(this.keyProcessDelay){if(this._lastEvent&&i>this._lastEvent&&i-this._lastEvent<this.keyProcessDelay)return!0;this._lastEvent=i}var n=P.safeCall(this,[e,t],function(t){log("on "+e+" handler failed:",t,t.stack)}),o=this["__key__"+e];if(e in this._pressedHandlers&&this.invokeKeyHandlers(e,t,this._pressedHandlers[e],n))return!0;if(o&&this.invokeKeyHandlers(e,t,o,n))return!0;o=this.__key__Key;return!!("Key"in this._pressedHandlers&&this.invokeKeyHandlers(e,t,this._pressedHandlers.Key,n))||!(!o||!this.invokeKeyHandlers(e,t,o,n))},j.invokeKeyHandlers=function(t,e,i,n){for(var o=i.length-1;0<=o;--o){if(n(i[o]))return $manifest$trace$keys&&log("key "+t+" handled in "+(performance.now()-e.timeStamp).toFixed(3)+" ms by",this,(new Error).stack),!0}return!1},j.onPressed=function(t,i){var e;this._get("key",!0);e="Key"!=t?function(t,e){return e.accepted=!0,i(t,e),e.accepted}:i,t in this._pressedHandlers?this._pressedHandlers[t].push(e):this._pressedHandlers[t]=[e]},j.style=function(t,e){var i=this.element;if(i)return i.style(t,e);log("WARNING: style skipped:",t,e)},j._enqueueNextChildInFocusChain=function(t,e){this._tryFocus();var i=this.focusedChild;i&&i.visible&&(t.unshift(i),e.unshift(i))},j.registerStyle=function(t,e){var i="position: absolute; visibility: inherit; opacity: 1.0;";i+="border-style: solid; border-width: 0px; border-radius: 0px; box-sizing: border-box; border-color: rgba(0,0,0,1);",i+="white-space: nowrap; transform: none;",i+="left: 0px; top: 0px; width: 0px; height: 0px;",i+="font-family: "+$manifest$style$font$family+"; line-height: "+$manifest$style$font$lineHeight+"; ",i+="pointer-events: none; touch-action: none; ",$manifest$style$font$pixelSize?i+="font-size: "+$manifest$style$font$pixelSize+"px; ":$manifest$style$font$pointSize&&(i+="font-size: "+$manifest$style$font$pointSize+"pt; "),t.addRule(e,i)},j._createElement=function(t,e){var i=this._get("context",!0);null===(i=this._context)&&(i=this),i.registerStyle(this,t,e),this._attachElement(i.createElement(t,e))},P._protoOnChanged(j,"cssNullTranslate3D",function(t){$manifest$cssDisableTransformations||this.style("transform",t?"translateZ(0)":"")}),P._protoOnChanged(j,"focus",function(t){this.parent&&this.parent._tryFocus()}),P._protoOnChanged(j,"height",function(t){this.style("height",t-this._topPadding+(this._borderHeightAdjust||0)),this.newBoundingBox()}),P._protoOnChanged(j,"width",function(t){this.style("width",t+(this._borderWidthAdjust||0)),this.newBoundingBox()}),P._protoOnChanged(j,"recursiveVisible",function(t){for(var e=this.children,i=0,n=e.length;i<n;++i){var o=e[i];this._updateVisibilityForChild(o,t)}!t&&this.parent&&this.parent._tryFocus(),$manifest$requireExplicitRecursiveVisibilityStyle&&this.style("-pure-recursive-visibility",t)}),P._protoOnChanged(j,"cssPointerTouchEvents",function(t){var e=t?"auto":"none";this.style("pointer-events",e),this.style("touch-action",e)});T=function(t){var e=this.x+this.viewX;this.cssTranslatePositioning&&!$manifest$cssDisableTransformations?this.transform.translateX=e:this.style("left",e),this.newBoundingBox()};P._protoOnChanged(j,"x",T),P._protoOnChanged(j,"viewX",T);var N=function(t){var e=this.y+this.viewY;this.cssTranslatePositioning&&!$manifest$cssDisableTransformations?this.transform.translateY=e:this.style("top",e),this.newBoundingBox()};P._protoOnChanged(j,"viewY",N),P._protoOnChanged(j,"y",N),P._protoOnChanged(j,"opacity",function(t){this.element&&this.style("opacity",t)});var B=function(t){this._updateVisibility()};P._protoOnChanged(j,"visible",B),P._protoOnChanged(j,"visibleInView",B),P._protoOnChanged(j,"clip",function(t){this.style("overflow",t?"hidden":"visible")}),P._protoOnChanged(j,"z",function(t){this.style("z-index",t)}),j.$c=function(t){R.$c.call(this,t.$b={})},j.$s=function(t){R.$s.call(this,t.$b),delete t.$b,this.completed()};var V=P.Item,W=V.prototype,F=P.Text=function(t,e){V.apply(this,arguments),this._context.backend.initText(this),0<this.text.length&&this._setText(this.text)},D=F.prototype=Object.create(W);D.constructor=F,D.componentName="core.Text",y.addProperty(D,"string","text"),y.addProperty(D,"color","color"),y.addLazyProperty(D,"shadow",function(t,e){var i,n={lazy$shadow:i=new P.Shadow(t,e)};return i.$c(n.$c$lazy$shadow={}),(i=n.lazy$shadow).$s(n.$c$lazy$shadow),delete n.$c$lazy$shadow,i.completed(),i}),y.addLazyProperty(D,"font",function(t,e){var i,n={lazy$font:i=new P.Font(t,e)};return i.$c(n.$c$lazy$font={}),(i=n.lazy$font).$s(n.$c$lazy$font),delete n.$c$lazy$font,i.completed(),i}),y.addProperty(D,"int","paintedWidth"),y.addProperty(D,"int","paintedHeight"),D.AlignTop=0,F.AlignTop=0,D.AlignBottom=1,F.AlignBottom=1,D.AlignVCenter=2,F.AlignVCenter=2,y.addProperty(D,"enum","verticalAlignment"),D.Html=0,F.Html=0,D.Text=1,F.Text=1,y.addProperty(D,"enum","textFormat"),D.AlignLeft=0,F.AlignLeft=0,D.AlignRight=1,F.AlignRight=1,D.AlignHCenter=2,F.AlignHCenter=2,D.AlignJustify=3,F.AlignJustify=3,y.addProperty(D,"enum","horizontalAlignment"),D.NoWrap=0,F.NoWrap=0,D.WordWrap=1,F.WordWrap=1,D.WrapAnywhere=2,F.WrapAnywhere=2,D.Wrap=3,F.Wrap=3,y.addProperty(D,"enum","wrapMode"),D._updateSize=function(){this.recursiveVisible&&(this._updateSizeNeeded||this.clip)&&this._scheduleUpdateSize()},D._updateStyle=function(){this.shadow&&!this.shadow._empty()?this.style("text-shadow",this.shadow._getFilterStyle()):this.style("text-shadow",""),P.Item.prototype._updateStyle.apply(this,arguments)},D._updateSizeImpl=function(){if(0===this.text.length)return this.paintedWidth=0,void(this.paintedHeight=0);this._context.backend.layoutText(this)},D._scheduleUpdateSize=function(){this._context.delayedAction("text:update-size",this,this._updateSizeImpl)},D._enableSizeUpdate=function(){this._updateSizeNeeded=!0,this._updateSize()},D._updateWSHandling=function(){var t=this.textFormat===this.Text;switch(this.wrapMode){case this.NoWrap:this.style({"white-space":t?"pre":"nowrap","word-break":""});break;case this.Wrap:case this.WordWrap:this.style({"white-space":t?"pre-wrap":"normal","word-break":""});break;case this.WrapAnywhere:this.style({"white-space":t?"pre-wrap":"normal","word-break":"break-all"})}this._updateSize()},D.getClass=function(){return"core-text"},D._setText=function(t){this._context.backend.setText(this,t)},D.on=function(t,e){this._updateSizeNeeded||"newBoundingBox"===t&&this._enableSizeUpdate(),P.Item.prototype.on.apply(this,arguments)},D.onChanged=function(t,e){if(!this._updateSizeNeeded)switch(t){case"right":case"width":case"bottom":case"height":case"verticalCenter":case"horizontalCenter":this._enableSizeUpdate()}P.Item.prototype.onChanged.apply(this,arguments)},D.registerStyle=function(t,e){t.addRule(e,"width: auto; height: auto;")},P._protoOnChanged(D,"recursiveVisible",function(t){t&&this._updateSize()}),P._protoOnChanged(D,"horizontalAlignment",function(t){switch(t){case this.AlignLeft:this.style("text-align","left");break;case this.AlignRight:this.style("text-align","right");break;case this.AlignHCenter:this.style("text-align","center");break;case this.AlignJustify:this.style("text-align","justify")}}),P._protoOnChanged(D,"verticalAlignment",function(t){if(this._enableSizeUpdate(),$manifest$requireVerticalTextAlignmentStyle)switch(t){case this.AlignTop:this.style("-pure-text-vertical-align","top");break;case this.AlignVCenter:this.style("-pure-text-vertical-align","middle");break;case this.AlignBottom:this.style("-pure-text-vertical-align","bottom")}});T=function(t){this._updateWSHandling()};P._protoOnChanged(D,"wrapMode",T),P._protoOnChanged(D,"textFormat",T),P._protoOnChanged(D,"text",function(t){this._setText(t),this._updateSize()});N=function(t){this._updateSize()};P._protoOnChanged(D,"height",N),P._protoOnChanged(D,"width",N),P._protoOnChanged(D,"color",function(t){this.style("color",P.Color.normalize(t))}),D.$c=function(t){W.$c.call(this,t.$b={})},D.$s=function(t){var e=this;W.$s.call(this,t.$b),delete t.$b,e._replaceUpdater("width",function(){e.width=e.paintedWidth},[e,"paintedWidth"]),e._replaceUpdater("height",function(){e.height=e.paintedHeight},[e,"paintedHeight"]),e.completed()};var Y=P.Text,X=Y.prototype,q=v.EllipsisText=function(t,e){Y.apply(this,arguments)},G=q.prototype=Object.create(X);G.constructor=q,G.componentName="controls.web.EllipsisText",y.addProperty(G,"bool","active",!0),G.__complete=function(){X.__complete.call(this),this.updateStyle()},G.updateStyle=function(){this.style("text-overflow",this.active?"ellipsis":"clip")},P._protoOnChanged(G,"active",function(t){this.updateStyle()}),G.$c=function(t){X.$c.call(this,t.$b={})},G.$s=function(t){X.$s.call(this,t.$b),delete t.$b,this._removeUpdater("clip"),this.clip=!0,this.completed()};var K=P.Item,Z=K.prototype,J=P.BaseViewContent=function(t,e){K.apply(this,arguments),this.style("will-change","scroll-position, transform, left, top")},Q=J.prototype=Object.create(Z);Q.constructor=J,Q.componentName="core.BaseViewContent",Q._updateScrollPositions=function(t,e,i){this._setProperty("x",-t),this._setProperty("y",-e),(void 0===i||i)&&this.parent._scheduleLayout()};T=function(t){this.parent._scheduleLayout()};P._protoOnChanged(Q,"x",T),P._protoOnChanged(Q,"y",T),Q.$c=function(t){Z.$c.call(this,t.$b={})},Q.$s=function(t){Z.$s.call(this,t.$b),delete t.$b,this.completed()};var tt=P.Object,et=tt.prototype,it=P.Animation=function(t,e){tt.apply(this,arguments),this._disabled=0,this._native=!1},nt=it.prototype=Object.create(et);nt.constructor=it,nt.componentName="core.Animation",y.addProperty(nt,"int","delay",0),y.addProperty(nt,"int","duration",200),y.addProperty(nt,"bool","cssTransition",!0),y.addProperty(nt,"bool","running",!1),y.addProperty(nt,"string","easing","ease"),y.addProperty(nt,"Object","target"),y.addProperty(nt,"string","property"),y.addProperty(nt,"variant","from"),y.addProperty(nt,"variant","to"),nt._updateAnimation=function(){this.target&&this.target.updateAnimation(this.property,this)},nt.active=function(){return this.enabled()&&0<this.duration},nt.disable=function(){++this._disabled,this._updateAnimation()},nt.enable=function(){--this._disabled,this._updateAnimation()},nt.enabled=function(){return 0===this._disabled},nt.complete=function(){},nt.interpolate=function(t,e,i){return i*(t-e)+e};T=function(t){this._updateAnimation()};P._protoOnChanged(nt,"easing",T),P._protoOnChanged(nt,"duration",T),P._protoOnChanged(nt,"delay",T),P._protoOnChanged(nt,"cssTransition",T),P._protoOnChanged(nt,"running",T),nt.$c=function(t){et.$c.call(this,t.$b={})},nt.$s=function(t){et.$s.call(this,t.$b),delete t.$b,this.completed()};var ot=P.Item,rt=ot.prototype,at=a.ActivityManager=function(t,e){ot.apply(this,arguments),this._activityStack=[]},st=at.prototype=Object.create(rt);st.constructor=at,st.componentName="controls.core.ActivityManager",y.addProperty(st,"int","count"),y.addProperty(st,"bool","keepLastActivity",!0),y.addProperty(st,"string","currentActivity"),st._initTopIntent=function(){if(this._activityStack.length){var t=this._activityStack[this._activityStack.length-1],e=this.children;log("initTopIntent: "+t.name);for(var i=0;i<e.length;++i){var n=e[i];if(n&&n instanceof k.controls.core.BaseActivity)if(n.name===t.name){log("Init:",t);var o=t.state||{};o.lastActivity||(o.lastActivity=this.currentActivity),n.init(t.intent,o),n.index=this._activityStack.length-1,n.start(),n.setFocus(),this.currentActivity=n.name}else n.stop()}}else log("Activity stack is empty")},st.initTopIntent=function(){try{this._initTopIntent()}catch(t){log("initTopIntent failed:",t),this.pop()}},st.clear=function(){for(var t=this.children,e=0;e<t.length;++e){var i=t[e];i&&i instanceof k.controls.core.Activity&&i.stop()}this._activityStack=[]},st.pop=function(t){if(this.keepLastActivity&&1<this.count||!this.keepLastActivity&&0<this.count){var e=1;return e=void 0===t?1:t>this.count-1&&this.keepLastActivity?this.count-1:t>this.count&&!this.keepLastActivity?this.count:t,this._activityStack.splice(-e,e),this.count-=e,this.initTopIntent(),!0}return log("No activity to pop"),!1},st.setIntent=function(t,e){if(e){var i=this.createActivity(e);i&&(i.intent=t)}else this._activityStack[this._activityStack.length-1].intent=t},st.removeActivity=function(t){if(t==this.currentActivity)this.pop();else{for(var e=-1,i=0;i<this._activityStack.length;++i)if(this._activityStack[i].name==t){e=i;break}if(e<0)return void log("Activity",t,"not found");this._activityStack.splice(e,1)}},st.isActivityInStack=function(e){var t=this._activityStack.filter(function(t){return t.name==e});return t&&0<t.length},st.findActivity=function(e){var t=this.children.filter(function(t){return t instanceof k.controls.core.BaseActivity&&t.name==e}),i=null;return t&&t.length&&(i=t[0].getActivity()),i||log("Activity for name",e,"not found"),i},st.createActivity=function(e){var t=this.findActivity(e);if(t)return t;var i=this.children.filter(function(t){return t instanceof k.controls.core.LazyActivity&&t.name==e});return i&&i.length?(t=i[0]).createActivity():(log("Activity for name",e,"not found"),null)},st.closeAllExcept=function(t){var e=this.findActivity(t);e?(this.count=1,this._activityStack=[e]):(log("Activity",t,"not found, close all"),this.count=0,this._activityStack=[]),this.currentActivity!=t&&this.initTopIntent()},st.replaceTopActivity=function(t,e,i){return 0<this.count?(this._activityStack.pop(),this._activityStack.push({name:t,intent:e,state:i}),this.initTopIntent(),!0):(log("No activity to pop"),!1)},st.push=function(t,e,i){this._activityStack.push({name:t,intent:e,state:i}),this.count++,this.initTopIntent()},st.popWithState=function(t){return this.keepLastActivity&&1<this.count||!this.keepLastActivity&&0<this.count?(this._activityStack.pop(),--this.count,this.setState(t),this.initTopIntent(),!0):(log("No activity to pop"),!1)},st.setState=function(t,e){if(e){var i=this.createActivity(e);i&&(i.state=t)}else this._activityStack[this._activityStack.length-1].state=t},st.$c=function(t){rt.$c.call(this,t.$b={})},st.$s=function(t){rt.$s.call(this,t.$b),delete t.$b,this.completed()};var ct=P.Item,lt=ct.prototype,ht=P.Loader=function(t,e){ct.apply(this,arguments)},dt=ht.prototype=Object.create(lt);dt.constructor=ht,dt.componentName="core.Loader",dt.loaded=P.createSignal("loaded"),y.addProperty(dt,"string","source"),y.addProperty(dt,"Object","item"),dt.discard=function(){this.discardItem(),P.Item.prototype.discard.call(this)},dt.discardItem=function(){var t=this.item;t&&(t.discard(),t=null)},dt._load=function(){var t=this.source;if(t){log("loading "+t+"…");for(var e=t.split("."),i=k;e.length;){if(void 0===(i=i[e.shift()]))throw new Error("unknown component used: "+t)}this.item=new i(this),P.core.createObject(this.item),this.loaded()}},dt.__complete=function(){lt.__complete.call(this),!this.item&&this.source&&this._load()},P._protoOnChanged(dt,"recursiveVisible",function(t){this.item&&this._updateVisibilityForChild(this.item,t)}),P._protoOnChanged(dt,"source",function(t){this.discardItem(),this._load()}),dt.$c=function(t){lt.$c.call(this,t.$b={})},dt.$s=function(t){lt.$s.call(this,t.$b),delete t.$b,this.completed()};var pt=P.Item,ut=pt.prototype,ft=a.BaseActivity=function(t,e){pt.apply(this,arguments)},gt=ft.prototype=Object.create(ut);gt.constructor=ft,gt.componentName="controls.core.BaseActivity",gt.started=P.createSignal("started"),gt.stopped=P.createSignal("stopped"),y.addProperty(gt,"bool","active"),y.addProperty(gt,"string","name"),y.addProperty(gt,"Item","manager"),gt.clear=function(){this.manager.clear()},gt.pop=function(t){this.manager.pop(t)},gt.init=function(t,e){},gt.closeAllExcept=function(t){this.manager.closeAllExcept(t)},gt.removeActivity=function(t){this.manager.removeActivity(t)},gt.push=function(t,e,i){this.manager.push(t,e,i)},gt.replaceTopActivity=function(t,e,i){this.manager.replaceTopActivity(t,e,i)},gt.popWithState=function(t){this.manager.popWithState(t)},gt.setIntent=function(t,e){this.manager.setIntent(t,e)},gt.setState=function(t,e){this.manager.setState(t,e)},P._protoOnKey(gt,"Back",function(t,e){return this.manager.pop(),!0}),gt.$c=function(t){ut.$c.call(this,t.$b={})},gt.$s=function(t){var e=this;ut.$s.call(this,t.$b),delete t.$b,e._replaceUpdater("visible",function(){e.visible=e.active},[e,"active"]),e._removeUpdater("manager"),e.manager=e.parent,e.completed()};var _t=a.BaseActivity,mt=_t.prototype,vt=a.LazyActivity=function(t,e){_t.apply(this,arguments)},yt=vt.prototype=Object.create(mt);yt.constructor=vt,yt.componentName="controls.core.LazyActivity",y.addProperty(yt,"string","component"),yt.init=function(){k.controls.core.BaseActivity.prototype.init.apply(this,arguments);var t=this.createActivity();t&&t.init.apply(t,arguments)},yt.start=function(){this.createActivity().start(),this.visible=!0},yt.stop=function(){this.visible=!1;var t=this.getActivity();t&&t.stop()},yt.getActivity=function(){return this._get("loader",!0).item},yt.createActivity=function(){var t=this._get("loader",!0),e=t.item;if(!e){if(t.source=this.component,((e=t.item).anchors.fill=this)._context._processActions(),e.manager=this.manager,!e)throw new Error("can't create component "+this.component);var i=this;e.on("started",function(){i.started()}),e.on("stopped",function(){i.stopped()})}return t.item},yt.$c=function(t){mt.$c.call(this,t.$b={});var e=new P.Loader(this);(t._this$child0=e).$c(t.$c$_this$child0={}),e._setId("loader"),this.addChild(e)},yt.$s=function(t){var e=this;mt.$s.call(this,t.$b),delete t.$b,e.anchors._replaceUpdater("fill",function(){e.anchors.fill=e.manager},[e,"manager"]);var i=t._this$child0;i.$s(t.$c$_this$child0),delete t.$c$_this$child0,i.anchors._replaceUpdater("fill",function(){i.anchors.fill=i.parent.manager},[i.parent,"manager"]),i.completed(),e.completed()};var bt=P.Object,$t=bt.prototype,wt=P.Radius=function(t,e){bt.apply(this,arguments)},xt=wt.prototype=Object.create($t);xt.defaultProperty="radius",xt.constructor=wt,xt.componentName="core.Radius",y.addProperty(xt,"real","radius"),y.addProperty(xt,"real","topLeft"),y.addProperty(xt,"real","topRight"),y.addProperty(xt,"real","bottomLeft"),y.addProperty(xt,"real","bottomRight"),xt.__complete=function(){$t.__complete.call(this);var t=this.radius,e=this.topLeft||t,i=this.topRight||t,n=this.bottomLeft||t,o=this.bottomRight||t;e==i&&n==o&&e==n?this.parent.style("border-radius",e):this.parent.style("border-radius",e+"px "+i+"px "+o+"px "+n+"px")};T=function(){log("updating border")};P._protoOn(xt,"bottomLeftUpdate",T),P._protoOn(xt,"radiusUpdate",T),P._protoOn(xt,"bottomRightUpdate",T),P._protoOn(xt,"topLeftUpdate",T),P._protoOn(xt,"topRightUpdate",T),xt.$c=function(t){$t.$c.call(this,t.$b={})},xt.$s=function(t){$t.$s.call(this,t.$b),delete t.$b,this.completed()};var Ct=P.Object,kt=Ct.prototype,Pt=P.LocalStorage=function(t,e){Ct.apply(this,arguments);var i=P.__localStorageBackend;this.impl=i().createLocalStorage(this)},At=Pt.prototype=Object.create(kt);At.constructor=Pt,At.componentName="core.LocalStorage",At._ensureErrCallback=function(t){return t||function(t){log(t.message)}},At._ensureCallback=function(t,e){return t||function(t){log("ignore value of",e,"gotten from storage:",t)}},At._checkNameValid=function(t){if(!t)throw new Error("empty name")},At.getOrDefault=function(t,e,i){this._checkNameValid(t),e=this._ensureCallback(e,t),this.impl.get(t,e,function(){e(i)},this)},At.get=function(t,e,i){this._checkNameValid(t),this.impl.get(t,this._ensureCallback(e,t),this._ensureErrCallback(i),this)},At.erase=function(t,e){this._checkNameValid(t),this.impl.erase(t,this._ensureErrCallback(e),this)},At.set=function(t,e,i){this._checkNameValid(t),this.impl.set(t,e,this._ensureErrCallback(i),this)},At.$c=function(t){kt.$c.call(this,t.$b={})},At.$s=function(t){kt.$s.call(this,t.$b),delete t.$b,this.completed()};var Ot=P.LocalStorage,St=Ot.prototype,It=P.PropertyStorage=function(t,e){Ot.apply(this,arguments)},Tt=It.prototype=Object.create(St);Tt.constructor=It,Tt.componentName="core.PropertyStorage",Tt.ready=P.createSignal("ready"),y.addProperty(Tt,"string","name"),y.addProperty(Tt,"string","value"),y.addProperty(Tt,"string","defaultValue"),Tt._checkNameValid=function(){if(!this.name)throw new Error("empty property name")},Tt._write=function(){this._checkNameValid(),this.value?this.set(this.name,this.value):this.erase(this.name)},Tt._read=function(){this._checkNameValid(),this.getOrDefault(this.name,function(t){this._setProperty("value",t),this.ready()}.bind(this),this.defaultValue)},Tt.__complete=function(){St.__complete.call(this),this.value&&(this._setProperty("value",this.value),this.ready())},P._protoOnChanged(Tt,"name",function(t){this._setProperty("value",""),this._read()}),P._protoOnChanged(Tt,"value",function(t){this._write()}),Tt.$c=function(t){St.$c.call(this,t.$b={})},Tt.$s=function(t){St.$s.call(this,t.$b),delete t.$b,this.completed()};var Ut=P.Object,Et=Ut.prototype,Lt=s.BaseMixin=function(t,e){Ut.apply(this,arguments)},zt=Lt.prototype=Object.create(Et);zt.constructor=Lt,zt.componentName="controls.mixins.BaseMixin",zt.stopPropagation=function(t){var e=this._get("context",!0);t?t.stopPropagation&&t.stopPropagation():e.window.event.cancelBubble=!0},zt.$c=function(t){Et.$c.call(this,t.$b={})},zt.$s=function(t){Et.$s.call(this,t.$b),delete t.$b,this.completed()};var Mt=P.Item,Rt=Mt.prototype,Ht=P.BaseLayout=function(t,e){Mt.apply(this,arguments),this.count=0},jt=Ht.prototype=Object.create(Rt);jt.constructor=Ht,jt.componentName="core.BaseLayout",y.addProperty(jt,"int","count"),y.addProperty(jt,"bool","trace"),y.addProperty(jt,"int","spacing"),y.addProperty(jt,"int","currentIndex"),y.addProperty(jt,"int","contentWidth"),y.addProperty(jt,"int","contentHeight"),y.addProperty(jt,"bool","keyNavigationWraps"),y.addProperty(jt,"bool","handleNavigationKeys"),y.addProperty(jt,"int","layoutDelay"),y.addProperty(jt,"int","prerenderDelay"),y.addProperty(jt,"bool","offlineLayout"),jt._scheduleLayout=function(){(this.recursiveVisible||this.offlineLayout)&&(0<=this.prerenderDelay?(this._context.delayedAction("layout",this,this._doLayoutNP,this.layoutDelay),this._context.delayedAction("prerender",this,this._doLayout,this.prerenderDelay)):this._context.delayedAction("layout",this,this._doLayout,this.layoutDelay))},jt._doLayout=function(){this._attach(),this._processUpdates(),this._layout()},jt._doLayoutNP=function(){this._attach(),this._processUpdates(),this._layout(!0)},jt.__complete=function(){Rt.__complete.call(this),this._scheduleLayout()};T=function(){};jt._attach=T,jt._processUpdates=T;N=function(t){this._scheduleLayout()};P._protoOnChanged(jt,"recursiveVisible",N),P._protoOnChanged(jt,"spacing",N),jt.$c=function(t){Rt.$c.call(this,t.$b={})},jt.$s=function(t){var e=this;Rt.$s.call(this,t.$b),delete t.$b,e._removeUpdater("layoutDelay"),e.layoutDelay=-1,e._removeUpdater("prerenderDelay"),e.prerenderDelay=-1,e.completed()};var Nt=P.Object,Bt=Nt.prototype,Vt=P.Request=function(t,e){Nt.apply(this,arguments)},Wt=Vt.prototype=Object.create(Bt);Wt.constructor=Vt,Wt.componentName="core.Request",y.addProperty(Wt,"bool","loading",!1),Wt.ajax=function(t){t.done&&(t.done=this._context.wrapNativeCallback(t.done)),t.error&&(t.error=this._context.wrapNativeCallback(t.error)),this._context.backend.ajax(this,t)},Wt.$c=function(t){Bt.$c.call(this,t.$b={})},Wt.$s=function(t){Bt.$s.call(this,t.$b),delete t.$b,this.completed()};var Ft=P.Object,Dt=Ft.prototype,Yt=v.HoverClickMixin=function(t,e){Ft.apply(this,arguments),this.element=this.parent.element,this.parent.style("cursor",this.cursor),this._bindClick(this.clickable),this._bindHover(this.enabled),this._bindActiveHover(this.activeHoverEnabled)},Xt=Yt.prototype=Object.create(Dt);Xt.constructor=Yt,Xt.componentName="controls.web.HoverClickMixin",y.addProperty(Xt,"bool","enabled",!0),y.addProperty(Xt,"bool","clickable",!0),y.addProperty(Xt,"bool","activeHoverEnabled",!1),y.addProperty(Xt,"bool","value"),y.addProperty(Xt,"bool","activeHover",!1),y.addProperty(Xt,"string","cursor"),Xt._bindActiveHover=function(t){t&&!this._hmActiveHoverBinder&&(this._hmActiveHoverBinder=new k.core.EventBinder(this.parent.element),this._hmActiveHoverBinder.on("mouseover",function(){this.activeHover=!0}.bind(this)),this._hmActiveHoverBinder.on("mouseout",function(){this.activeHover=!1}.bind(this))),this._hmActiveHoverBinder&&this._hmActiveHoverBinder.enable(t)},Xt._bindClick=function(t){t&&!this._hmClickBinder&&(this._hmClickBinder=new k.core.EventBinder(this.element),this._hmClickBinder.on("click",k.core.createSignalForwarder(this.parent,"clicked").bind(this))),this._hmClickBinder&&this._hmClickBinder.enable(t)},Xt._bindHover=function(t){t&&!this._hmHoverBinder&&(this._hmHoverBinder=new k.core.EventBinder(this.parent.element),this._context.backend.capabilities.mouseEnterLeaveSupported?(this._hmHoverBinder.on("mouseenter",function(){this.value=!0}.bind(this)),this._hmHoverBinder.on("mouseleave",function(){this.value=!1}.bind(this))):(this._hmHoverBinder.on("mouseover",function(){this.value=!0}.bind(this)),this._hmHoverBinder.on("mouseout",function(){this.value=!1}.bind(this)))),this._hmHoverBinder&&this._hmHoverBinder.enable(t)},P._protoOnChanged(Xt,"cursor",function(t){this._get("cursor",!0);this.parent.style("cursor",t)}),P._protoOnChanged(Xt,"activeHoverEnabled",function(t){this._bindActiveHover(t)}),P._protoOnChanged(Xt,"clickable",function(t){this._bindClick(t)}),P._protoOnChanged(Xt,"enabled",function(t){this._bindHover(t)}),Xt.$c=function(t){Dt.$c.call(this,t.$b={})},Xt.$s=function(t){Dt.$s.call(this,t.$b),delete t.$b,this.completed()};var qt=a.ActivityManager,Gt=qt.prototype,Kt=l.UiApp=function(t,e){qt.apply(this,arguments)},Zt=Kt.prototype=Object.create(Gt);Zt.constructor=Kt,Zt.componentName="src.UiApp",y.addProperty(Zt,"int","contextWidth"),y.addProperty(Zt,"int","contextHeight"),Zt.__complete=function(){Gt.__complete.call(this),this.push("mosaic")},Zt.$c=function(t){var e=this;Gt.$c.call(this,t.$b={});var i=new P.Rectangle(e);(t._this$child0=i).$c(t.$c$_this$child0={}),e.addChild(i);var n=new l.AppApi(e);(t._this$child1=n).$c(t.$c$_this$child1={}),n._setId("api"),e.addChild(n);var o=new l.AnotherApi(e);(t._this$child2=o).$c(t.$c$_this$child2={}),o._setId("anotherApi"),e.addChild(o);var r=new a.LazyActivity(e);(t._this$child3=r).$c(t.$c$_this$child3={}),e.addChild(r),e._setId("root")},Zt.$s=function(t){var e=this;Gt.$s.call(this,t.$b),delete t.$b,e._replaceUpdater("contextHeight",function(){e.contextHeight=e._context.height},[e._context,"height"]),e._replaceUpdater("contextWidth",function(){e.contextWidth=e._context.width},[e._context,"width"]),e._removeUpdater("clip"),e.clip=!0,e.anchors._replaceUpdater("fill",function(){e.anchors.fill=e._context},[e,"context"]);var i=t._this$child0;i.$s(t.$c$_this$child0),delete t.$c$_this$child0,i._removeUpdater("color"),i.color="#424242",i.anchors._removeUpdater("fill"),i.anchors.fill=i.parent,i.completed();var n=t._this$child1;n.$s(t.$c$_this$child1),delete t.$c$_this$child1,n.completed();var o=t._this$child2;o.$s(t.$c$_this$child2),delete t.$c$_this$child2,o.completed();var r=t._this$child3;r.$s(t.$c$_this$child3),delete t.$c$_this$child3,r._removeUpdater("component"),r.component="src.MosaicPage",r._removeUpdater("name"),r.name="mosaic",r.completed(),e.completed()};var Jt=P.Object,Qt=Jt.prototype,te=P.GradientStop=function(t,e){Jt.apply(this,arguments)},ee=te.prototype=Object.create(Qt);ee.constructor=te,ee.componentName="core.GradientStop",y.addProperty(ee,"real","position"),y.addProperty(ee,"color","color"),ee._getDeclaration=function(){return new P.gradient.GradientStop(this.color,this.position)};T=function(t){this.parent._updateStyle()};P._protoOnChanged(ee,"position",T),P._protoOnChanged(ee,"color",T),ee.$c=function(t){Qt.$c.call(this,t.$b={})},ee.$s=function(t){Qt.$s.call(this,t.$b),delete t.$b,this.completed()};var ie=P.Item,ne=ie.prototype,oe=P.VideoPlayer=function(t,e){ie.apply(this,arguments),this.impl=null,this._createPlayer()},re=oe.prototype=Object.create(ne);re.constructor=oe,re.componentName="core.VideoPlayer",re.text=P.createSignal("text"),re.finished=P.createSignal("finished"),re.error=P.createSignal("error"),y.addProperty(re,"string","backend"),y.addProperty(re,"string","source"),y.addProperty(re,"string","backgroundImage"),y.addProperty(re,"color","backgroundColor","#000"),y.addProperty(re,"float","volume",1),y.addProperty(re,"bool","loop"),y.addProperty(re,"bool","ready"),y.addProperty(re,"bool","muted"),y.addProperty(re,"bool","paused"),y.addProperty(re,"bool","waiting"),y.addProperty(re,"bool","seeking"),y.addProperty(re,"bool","stalled"),y.addProperty(re,"bool","autoPlay"),y.addProperty(re,"real","duration"),y.addProperty(re,"real","progress"),y.addProperty(re,"real","buffered"),y.addProperty(re,"real","startPosition"),re.play=function(){if(this.source){log("play",this.source);var t=this._getPlayer();t&&(this._scheduleLayout(),t.play()),this.applyVolume()}},re._getPlayer=function(){return null===this.impl&&this._createPlayer(),this.impl},re._createPlayer=function(){if(this.impl)return this.impl;var t=this.source,e=this.backend;log("preferred backend: "+e);var i=P.__videoBackends,n=[];if(e&&i[e]){var o=i[e]();return this.impl=o.createPlayer(this)}for(var r in i){var a=(o=i[r]()).probeUrl(t);0<a&&n.push({backend:o,score:a})}if(n.sort(function(t,e){return e.score-t.score}),0===n.length)throw new Error("no backends for source "+t);return this.impl=n[0].backend.createPlayer(this)},re._scheduleLayout=function(){this._context.delayedAction("layout",this,this._doLayout)},re.pause=function(){var t=this._getPlayer();t&&t.pause()},re._doLayout=function(){var t=this._getPlayer();t&&t.setRect.apply(t,this.toScreen().slice(0,4))},re.stop=function(){var t=this._getPlayer();t&&t.stop()},re.getAudioTracks=function(){var t=this._getPlayer();return t?t.getAudioTracks():[]},re.getSubtitles=function(){var t=this._getPlayer();return t?t.getSubtitles():[]},re.getVideoTracks=function(){var t=this._getPlayer();return t?t.getVideoTracks():[]},re.applyVolume=function(){var t=this._get("volumeStorage",!0);1<this.volume?this.volume=1:this.volume<0&&(this.volume=0),t.value=this.volume;var e=this._getPlayer();e&&e.setVolume(this.volume)},re.__complete=function(){var t=this._get("volumeStorage",!0);ne.__complete.call(this),this.volume=+t.value;var e=this._getPlayer();e&&e.setBackgroundColor(this.backgroundColor),this.autoPlay&&this.source&&this.play()},re.volumeUp=function(){this.volume+=.1},re.volumeDown=function(){this.volume-=.1},re.toggleMute=function(){var t=this._getPlayer();t&&t.setMute(!this.muted)},re.setOption=function(t,e){var i=this._getPlayer();i&&i.setOption(t,e)},re.setAudioTrack=function(t){var e=this._getPlayer();e&&e.setAudioTrack(t)},re.setSubtitles=function(t){var e=this._getPlayer();e&&e.setSubtitles(t)},re.setVideoTrack=function(t){var e=this._getPlayer();e&&e.setVideoTrack(t)},re.setupDrm=function(t,e,i,n){var o=this._getPlayer();o&&o.setupDrm(t,e,i,n)},re.seek=function(t){var e=this._getPlayer();e&&e.seek(t)},re.seekTo=function(t){var e=this._getPlayer();e&&e.seekTo(t)},P._protoOnChanged(re,"backend",function(t){this.impl=null,this._createPlayer()}),P._protoOnChanged(re,"backgroundColor",function(t){var e=this._getPlayer();e&&e.setBackgroundColor(t)}),P._protoOnChanged(re,"loop",function(t){var e=this._getPlayer();e&&e.setLoop(t)}),P._protoOnChanged(re,"source",function(t){var e=this._getPlayer();e&&e.setSource(t)}),P._protoOnChanged(re,"recursiveVisible",function(t){var e=this._getPlayer();e&&e.setVisibility(t)}),P._protoOnChanged(re,"ready",function(t){log("ReadyState: "+this.ready)}),P._protoOnChanged(re,"volume",function(t){this.applyVolume()}),P._protoOnChanged(re,"autoPlay",function(t){this.setOption("autoplay",t)}),P._protoOnChanged(re,"backgroundImage",function(t){this.setOption("poster",t)}),P._protoOn(re,"newBoundingBox",function(){this._scheduleLayout()}),P._protoOn(re,"error",function(t){this.paused=!1,this.waiting=!1}),re.$c=function(t){ne.$c.call(this,t.$b={});var e=new P.PropertyStorage(this);(t._this$child0=e).$c(t.$c$_this$child0={}),e._setId("volumeStorage"),this.addChild(e)},re.$s=function(t){ne.$s.call(this,t.$b),delete t.$b;var e=t._this$child0;e.$s(t.$c$_this$child0),delete t.$c$_this$child0,e._removeUpdater("defaultValue"),e.defaultValue=1,e._removeUpdater("name"),e.name="volume",e.completed(),this.completed()};var ae=P.Item,se=ae.prototype,ce=P.Rectangle=function(t,e){ae.apply(this,arguments),this._context.backend.initRectangle(this)},le=ce.prototype=Object.create(se);(le._propertyToStyle=Object.create(se._propertyToStyle)).color="background-color",le.constructor=ce,le.componentName="core.Rectangle",y.addProperty(le,"color","color","#0000"),y.addLazyProperty(le,"border",function(t,e){var i,n={lazy$border:i=new P.Border(t,e)};return i.$c(n.$c$lazy$border={}),(i=n.lazy$border).$s(n.$c$lazy$border),delete n.$c$lazy$border,i.completed(),i}),y.addProperty(le,"Gradient","gradient"),P._protoOnChanged(le,"color",function(t){this.style("background-color",P.Color.normalize(t))}),le.$c=function(t){se.$c.call(this,t.$b={})},le.$s=function(t){se.$s.call(this,t.$b),delete t.$b,this.completed()};var he=P.Rectangle,de=he.prototype,pe=c.NestedVideo=function(t,e){he.apply(this,arguments)},ue=pe.prototype=Object.create(de);ue.constructor=pe,ue.componentName="controls.experimental.NestedVideo",y.addProperty(ue,"bool","display"),ue.hide=function(){var t=this._get("videoPlayer",!0);this.visible=!1,this.display=!1,t.stop()},ue.showAndPlay=function(t){var e=this._get("videoPlayer",!0);this.visible=!0,this.display=!0,e.source=t},ue.$c=function(t){de.$c.call(this,t.$b={});var e=new P.VideoPlayer(this);(t._this$child0=e).$c(t.$c$_this$child0={}),e._setId("videoPlayer"),this.addChild(e)},ue.$s=function(t){var e=this;de.$s.call(this,t.$b),delete t.$b,e._removeUpdater("color"),e.color="transparent",e._removeUpdater("visible"),e.visible=!1,e.transform._replaceUpdater("scaleX",function(){e.transform.scaleX=e.display?1.1:.001},[e,"display"]),e.transform._removeUpdater("scaleY"),e.transform.scaleY=1.1,e._removeUpdater("clip"),e.clip=!0;var i=t._this$child0;i.$s(t.$c$_this$child0),delete t.$c$_this$child0,i._removeUpdater("autoPlay"),i.autoPlay=!0,i.anchors._removeUpdater("fill"),i.anchors.fill=i.parent,i.completed();var n,o={behavior__this_on_transform:n=new P.Animation(e)};n.$c(o.$c$behavior__this_on_transform={}),(n=o.behavior__this_on_transform).$s(o.$c$behavior__this_on_transform),delete o.$c$behavior__this_on_transform,n._removeUpdater("duration"),n.duration=300,n._removeUpdater("delay"),n.delay=300,n.completed(),e.setAnimation("transform",n),e.completed()};var fe=P.Object,ge=fe.prototype,_e=P.MouseMoveMixin=function(t,e){fe.apply(this,arguments),this.element=this.parent.element,this._bindMove(this.enabled)},me=_e.prototype=Object.create(ge);me.constructor=_e,me.componentName="core.MouseMoveMixin",me.mouseMove=P.createSignal("mouseMove"),y.addProperty(me,"bool","enabled",!0),y.addProperty(me,"int","mouseX"),y.addProperty(me,"int","mouseY"),me._updatePosition=function(t){var e=this.parent,i=t.offsetX,n=t.offsetY;return 0<=i&&0<=n&&i<e.width&&n<e.height&&(this.mouseX=i,this.mouseY=n,this.mouseMove(i,n),!0)},me._bindMove=function(t){t&&!this._mouseMoveBinder&&(this._mouseMoveBinder=new P.EventBinder(this.element),this._mouseMoveBinder.on("mousemove",function(t){this._updatePosition(t)||t.preventDefault()}.bind(this))),this._mouseMoveBinder&&this._mouseMoveBinder.enable(t)},P._protoOnChanged(me,"enabled",function(t){this._bindMove(t)}),me.$c=function(t){ge.$c.call(this,t.$b={})},me.$s=function(t){ge.$s.call(this,t.$b),delete t.$b,this.completed()};var ve=P.Object,ye=ve.prototype,be=i.Method=function(t,e){ve.apply(this,arguments)},$e=be.prototype=Object.create(ye);$e.constructor=be,$e.componentName="controls.web.api.Method",y.addProperty($e,"string","type","GET"),y.addProperty($e,"string","name"),y.addProperty($e,"string","path"),$e.args=function(){},$e.call=function(t,e){var i=this.args.length;if(e.length<i+2)throw new Error("not enough arguments for method "+this.name);i=e.length-2;var n=Array.prototype.slice.call(e,0,i),o=this.args.apply(this,n),r=e[i+0],a=e[i+1],s={},c=this.headers(s);void 0!==c&&(s=c);var l=this.pathArgs(this.path,n);t.call(l,r,a,this.type,o,s)},$e.headers=function(t){},$e.pathArgs=function(t,e){t=this.path;var i=0;return t=t.replace(/\{(\w+)\}/g,function(t){return i<e.length?e[i++]:""})},P._protoOnChanged($e,"name",function(t){this.parent._registerMethod(this.name,this)}),$e.$c=function(t){ye.$c.call(this,t.$b={})},$e.$s=function(t){ye.$s.call(this,t.$b),delete t.$b,this.completed()};var we=P.Object,xe=we.prototype,Ce=P.Font=function(t,e){we.apply(this,arguments)},ke=Ce.prototype=Object.create(xe);ke.constructor=Ce,ke.componentName="core.Font",y.addProperty(ke,"string","family",$manifest$style$font$family),y.addProperty(ke,"bool","italic"),y.addProperty(ke,"bool","bold"),y.addProperty(ke,"bool","underline"),y.addProperty(ke,"bool","overline"),y.addProperty(ke,"bool","strike"),y.addProperty(ke,"bool","strikeout"),y.addProperty(ke,"real","letterSpacing"),y.addProperty(ke,"real","wordSpacing"),y.addProperty(ke,"int","pixelSize",$manifest$style$font$pixelSize),y.addProperty(ke,"int","pointSize"),y.addProperty(ke,"real","lineHeight",$manifest$style$font$lineHeight),y.addProperty(ke,"int","weight"),ke.MixedCase=0,Ce.MixedCase=0,ke.AllUppercase=1,Ce.AllUppercase=1,ke.AllLowercase=2,Ce.AllLowercase=2,ke.SmallCaps=3,Ce.SmallCaps=3,ke.Capitalize=4,Ce.Capitalize=4,y.addProperty(ke,"enum","capitalization"),ke._updateTextDecoration=function(){var t=(this.underline?" underline":"")+(this.overline?" overline":"")+(this.strike||this.strikeout?" line-through":"");this.parent.style("text-decoration",t),this.parent._updateSize()},P._protoOnChanged(ke,"capitalization",function(t){switch(this.parent.style("text-transform","none"),this.parent.style("font-variant","normal"),t){case this.AllUppercase:this.parent.style("text-transform","uppercase");break;case this.AllLowercase:this.parent.style("text-transform","lowercase");break;case this.SmallCaps:this.parent.style("font-variant","small-caps");break;case this.Capitalize:this.parent.style("text-transform","capitalize")}}),P._protoOnChanged(ke,"pointSize",function(t){0<t&&(this.pixelSize=0),this.parent.style("font-size",0<t?t+"pt":""),this.parent._updateSize()}),P._protoOnChanged(ke,"pixelSize",function(t){0<t&&(this.pointSize=0),this.parent.style("font-size",0<t?t+"px":""),this.parent._updateSize()});T=function(t){this._updateTextDecoration()};P._protoOnChanged(ke,"strike",T),P._protoOnChanged(ke,"overline",T),P._protoOnChanged(ke,"strikeout",T),P._protoOnChanged(ke,"underline",T),P._protoOnChanged(ke,"family",function(t){this.parent.style("font-family",t),this.parent._updateSize()}),P._protoOnChanged(ke,"italic",function(t){this.parent.style("font-style",t?"italic":"normal"),this.parent._updateSize()}),P._protoOnChanged(ke,"weight",function(t){this.parent.style("font-weight",t),this.parent._updateSize()}),P._protoOnChanged(ke,"bold",function(t){this.parent.style("font-weight",t?"bold":"normal"),this.parent._updateSize()}),P._protoOnChanged(ke,"letterSpacing",function(t){this.parent.style("letter-spacing",t+"px"),this.parent._updateSize()}),P._protoOnChanged(ke,"lineHeight",function(t){this.parent.style("line-height",t),this.parent._updateSize()}),P._protoOnChanged(ke,"wordSpacing",function(t){this.parent.style("word-spacing",t+"px"),this.parent._updateSize()}),ke.$c=function(t){xe.$c.call(this,t.$b={})},ke.$s=function(t){xe.$s.call(this,t.$b),delete t.$b,this.completed()};var Pe=P.BaseLayout,Ae=Pe.prototype,Oe=P.BaseView=function(t,e){Pe.apply(this,arguments),this._items=[],this._modelUpdate=new P.model.ModelUpdate,this._attached=null,this._modelReset=this._onReset.bind(this),this._modelRowsInserted=this._onRowsInserted.bind(this),this._modelRowsChanged=this._onRowsChanged.bind(this),this._modelRowsRemoved=this._onRowsRemoved.bind(this)},Se=Oe.prototype=Object.create(Ae);Se.constructor=Oe,Se.componentName="core.BaseView",Se.scrollEvent=P.createSignal("scrollEvent"),Se.layoutFinished=P.createSignal("layoutFinished"),y.addProperty(Se,"Item","highlight"),y.addProperty(Se,"Object","model"),y.addProperty(Se,"Item","delegate"),y.addProperty(Se,"int","contentX"),y.addProperty(Se,"int","contentY"),y.addProperty(Se,"int","scrollingStep",0),y.addProperty(Se,"int","animationDuration",0),y.addProperty(Se,"string","animationEasing","ease"),y.addProperty(Se,"bool","contentFollowsCurrentItem",!0),y.addProperty(Se,"bool","nativeScrolling"),y.addProperty(Se,"real","prerender",.5),y.addProperty(Se,"string","visibilityProperty"),y.addProperty(Se,"BaseViewContent","content"),Se.Contain=0,Oe.Contain=0,Se.Beginning=1,Oe.Beginning=1,Se.Center=2,Oe.Center=2,Se.End=3,Oe.End=3,Se.Visible=4,Oe.Visible=4,Se.Page=5,Oe.Page=5,y.addProperty(Se,"enum","positionMode"),Se.discard=function(){this._detach(),P.BaseLayout.prototype.discard.apply(this)},Se._processUpdates=function(){this._modelUpdate.apply(this),qml.core.BaseLayout.prototype._processUpdates.apply(this),this.count=this._items.length},Se.focusCurrent=function(){var t=this.count;if(0!==t){var e=this.currentIndex;if(e<0||t<=e)this.keyNavigationWraps?this.currentIndex=(e+t)%t:this.currentIndex=e<0?0:t-1;else{var i=this._items[e];i&&this.focusChild(i),this.contentFollowsCurrentItem&&this.positionViewAtIndex(e),this.highlight&&(this.highlight.x=i.viewX,this.highlight.y=i.viewY,this.highlight.width=i.width,this.highlight.height=i.height)}}},Se._attach=function(){var t=this._get("model",!0);if(!this._attached&&this.model&&this.delegate){this.trace&&log("attaching model...");var e=P.Model,i=typeof(t=this.model);if(void 0!==e&&t instanceof e);else if(Array.isArray(t))t=new P.model.ArrayModelWrapper(t);else{if("number"!==i)throw new Error("unknown value of type '"+typeof t+"', attached to model property: "+t+("object"===i&&"componentName"in t?", component name: "+t.componentName:""));for(var n=[],o=0;o<t;++o)n.push({});t=new P.model.ArrayModelWrapper(n)}t.on("reset",this._modelReset),t.on("rowsInserted",this._modelRowsInserted),t.on("rowsChanged",this._modelRowsChanged),t.on("rowsRemoved",this._modelRowsRemoved),this._attached=t,this._onReset()}},Se._detach=function(){var t=this._get("model",!0);(t=this._attached)&&(this.trace&&log("detaching model..."),this._attached=null,t.removeListener("reset",this._modelReset),t.removeListener("rowsInserted",this._modelRowsInserted),t.removeListener("rowsChanged",this._modelRowsChanged),t.removeListener("rowsRemoved",this._modelRowsRemoved))},Se._onReset=function(){var t=this._get("model",!0);t=this._attached;this.trace&&log("reset",this._items.length,t.count),this._modelUpdate.reset(t),this._scheduleLayout()},Se.__complete=function(){Ae.__complete.call(this),this.highlight&&(this.highlight.element.remove(),this.content.element.prepend(this.highlight.element));var i=this;this.element.on("scroll",function(){var t=i.element.getScrollX(),e=i.element.getScrollY();i._updateScrollPositions(t,e),i.scrollEvent(t,e)}.bind(this))},Se._updateItems=function(t,e){for(var i=t;i<e;++i)this._updateDelegate(i)},Se._onRowsChanged=function(t,e){this.trace&&log("rows changed",t,e),this._modelUpdate.update(this._attached,t,e),this._scheduleLayout()},Se._onRowsInserted=function(t,e){this.trace&&log("rows inserted",t,e),this._modelUpdate.insert(this._attached,t,e),this._scheduleLayout()},Se._onRowsRemoved=function(t,e){this.trace&&log("rows removed",t,e),this._modelUpdate.remove(this._attached,t,e),this._scheduleLayout()},Se._removeItems=function(t,e){var i=this._items.splice(t,e-t),n=this;i.forEach(function(t){n._discardItem(t)})},Se._insertItems=function(t,e){var i=e-t+2,n=new Array(i);n[0]=t,n[1]=0;for(var o=2;o<i;++o)n[o]=null;Array.prototype.splice.apply(this._items,n)},Se._updateDelegateIndex=function(t){var e=this._items[t];e&&(e._local.model.index=t,e._createPropertyStorage("_rowIndex").callOnChanged(e,"_rowIndex"))},Se._updateDelegate=function(t){var e=this._items[t];if(e){var i=this._attached.get(t);i.index=t,e._local.model=i,e._createPropertyStorage("_row").callOnChanged(e,"_row")}},Se.itemAtIndex=function(t){var e=this._items[t];return e||null},Se._createDelegate=function(t,e){var i=this._items,n=i[t];if(null!=n)return n;var o=this.visibilityProperty,r=this._attached.get(t);return this.trace&&log("createDelegate",t,r),o&&!r[o]?null:(r.index=t,n=this.delegate(this,r),(i[t]=n).view=this,n.element.remove(),void 0===e?this.content.element.append(n.element):e.call(this,n),n.recursiveVisible=this.recursiveVisible&&n.visible&&n.visibleInView,n)},Se._discardItem=function(t){null!==t&&(this.focusedChild===t&&(this.focusedChild=null),t.discard())},Se.positionViewAtItemHorizontally=function(t,e,i){var n=this.contentX,o=(this.contentY,t[0]),r=(t[1],t[2]),a=(t[3],this.width),s=(this.height,o-a/2+r/2);a<r?this.contentX=i?s:o:e&&this.contentWidth>a?this.contentX=s<0?0:o>this.contentWidth-a/2-r/2?this.contentWidth-a:s:o-n<=0?this.contentX=o:a<o-n+r&&(this.contentX=o+r-a)},Se.positionViewAtItemVertically=function(t,e,i){this.contentX;var n=this.contentY,o=(t[0],t[1]),r=(t[2],t[3]),a=(this.width,this.height),s=o-a/2+r/2;a<r?this.contentY=i?s:o:e&&this.contentHeight>a?this.contentY=s<0?0:o>this.contentHeight-a/2-r/2?this.contentHeight-a:s:o-n<=0?this.contentY=o:a<o-n+r&&(this.contentY=o+r-a)},Se.itemAt=function(t,e){var i=this.indexAt(t,e);return 0<=i?this._items[i]:null},Se._updateScrollPositions=function(t,e,i){this._setProperty("contentX",t),this._setProperty("contentY",e),this.content._updateScrollPositions(t,e,i)},P._protoOnChanged(Se,"model",function(t){this.trace&&log("model changed to ",t),this._detach(),this._modelUpdate.clear(),this._removeItems(0,this.count),this.count=0,this._scheduleLayout()}),P._protoOnChanged(Se,"recursiveVisible",function(e){e&&this._scheduleLayout();var i=this;this._items.forEach(function(t){null!==t&&i._updateVisibilityForChild(t,e)}),this._updateVisibilityForChild(this.content,e)}),P._protoOnChanged(Se,"delegate",function(t){t&&(t.visible=!1)}),P._protoOnChanged(Se,"currentIndex",function(t){this.focusCurrent()}),P._protoOnChanged(Se,"focusedChild",function(t){var e=this._items.indexOf(this.focusedChild);0<=e&&(this.currentIndex=e)});T=function(t){this._scheduleLayout()};P._protoOnChanged(Se,"height",T),P._protoOnChanged(Se,"width",T),P._protoOnChanged(Se,"contentX",function(t){this.content.x=-t}),P._protoOnChanged(Se,"contentY",function(t){this.content.y=-t}),Se.$c=function(t){Ae.$c.call(this,t.$b={});var e=new P.BaseViewContent(this);(t._this$content=e).$c(t.$c$_this$content={}),this.content=e},Se.$s=function(t){var e=this;Ae.$s.call(this,t.$b),delete t.$b,e._removeUpdater("keyNavigationWraps"),e.keyNavigationWraps=!0,e._replaceUpdater("cssPointerTouchEvents",function(){e.cssPointerTouchEvents=e.nativeScrolling},[e,"nativeScrolling"]);var i=t._this$content;i.$s(t.$c$_this$content),delete t.$c$_this$content,i._replaceUpdater("cssTranslatePositioning",function(){i.cssTranslatePositioning=i.parent.cssTranslatePositioning},[i.parent,"cssTranslatePositioning"]),i._replaceUpdater("cssPointerTouchEvents",function(){i.cssPointerTouchEvents=i.parent.cssPointerTouchEvents},[i.parent,"cssPointerTouchEvents"]);var n,o={behavior__this_content_on_y:n=new P.Animation(i)};n.$c(o.$c$behavior__this_content_on_y={}),(n=o.behavior__this_content_on_y).$s(o.$c$behavior__this_content_on_y),delete o.$c$behavior__this_content_on_y,n._replaceUpdater("duration",function(){n.duration=n.parent.parent.animationDuration},[n.parent.parent,"animationDuration"]),n._replaceUpdater("easing",function(){n.easing=n.parent.parent.animationEasing},[n.parent.parent,"animationEasing"]),n.completed(),i.setAnimation("y",n);var r,a={behavior__this_content_on_x:r=new P.Animation(i)};r.$c(a.$c$behavior__this_content_on_x={}),(r=a.behavior__this_content_on_x).$s(a.$c$behavior__this_content_on_x),delete a.$c$behavior__this_content_on_x,r._replaceUpdater("duration",function(){r.duration=r.parent.parent.animationDuration},[r.parent.parent,"animationDuration"]),r._replaceUpdater("easing",function(){r.easing=r.parent.parent.animationEasing},[r.parent.parent,"animationEasing"]),r.completed(),i.setAnimation("x",r);var s,c={behavior__this_content_on_transform:s=new P.Animation(i)};s.$c(c.$c$behavior__this_content_on_transform={}),(s=c.behavior__this_content_on_transform).$s(c.$c$behavior__this_content_on_transform),delete c.$c$behavior__this_content_on_transform,s._replaceUpdater("duration",function(){s.duration=s.parent.parent.animationDuration},[s.parent.parent,"animationDuration"]),s._replaceUpdater("easing",function(){s.easing=s.parent.parent.animationEasing},[s.parent.parent,"animationEasing"]),s.completed(),i.setAnimation("transform",s),i.completed(),e._replaceUpdater("nativeScrolling",function(){e.nativeScrolling=e._context.system.device===e._context.system.Mobile},[e._context.system,"device",e._context.system,"Mobile"]),e._removeUpdater("contentWidth"),e.contentWidth=1,e._removeUpdater("contentHeight"),e.contentHeight=1,e._removeUpdater("handleNavigationKeys"),e.handleNavigationKeys=!0,e.completed()};var Ie=P.BaseView,Te=Ie.prototype,Ue=P.GridView=function(t,e){Ie.apply(this,arguments)},Ee=Ue.prototype=Object.create(Te);Ee.constructor=Ue,Ee.componentName="core.GridView",y.addProperty(Ee,"int","cellWidth",100),y.addProperty(Ee,"int","cellHeight",100),y.addProperty(Ee,"int","rows"),y.addProperty(Ee,"int","columns"),Ee.FlowLeftToRight=0,Ue.FlowLeftToRight=0,Ee.FlowTopToBottom=1,Ue.FlowTopToBottom=1,y.addProperty(Ee,"enum","flow"),Ee._updateOverflow=function(){if(this.nativeScrolling){var t={};this.flow!==this.FlowLeftToRight?(t["overflow-x"]="auto",t["overflow-y"]="hidden"):(t["overflow-x"]="hidden",t["overflow-y"]="auto"),this.style(t)}},Ee.moveUp=function(){if(this.flow===this.FlowLeftToRight){if(!this.keyNavigationWraps&&this.currentIndex<this.columns)return!1;this.keyNavigationWraps&&this.currentIndex-this.columns<0?this.currentIndex=this.count-1:this.currentIndex-this.columns<0?this.currentIndex=0:this.currentIndex-=this.columns}else{if(!this.keyNavigationWraps&&0===this.currentIndex)return!1;--this.currentIndex}return!0},Ee.moveLeft=function(){if(this.flow===this.FlowLeftToRight)if(this.keyNavigationWraps&&0===this.currentIndex)this.currentIndex=this.count-1;else{if(!this.keyNavigationWraps&&0===this.currentIndex)return!1;--this.currentIndex}else{if(!this.keyNavigationWraps&&this.currentIndex<this.rows)return!1;this.currentIndex-this.rows<0?this.currentIndex=0:this.currentIndex-=this.rows}return!0},Ee.moveRight=function(){if(this.flow===this.FlowLeftToRight)if(this.keyNavigationWraps&&this.currentIndex===this.count-1)this.currentIndex=0;else{if(!this.keyNavigationWraps&&this.currentIndex===this.count-1)return!1;++this.currentIndex}else{if(!this.keyNavigationWraps&&this.currentIndex>this.count-this.rows+1)return!1;this.currentIndex+this.rows>=this.count?this.currentIndex=this.count-1:this.currentIndex+=this.rows}return!0},Ee.moveDown=function(){if(this.flow===this.FlowLeftToRight){var t=Math.floor(this.currentIndex/this.columns),e=Math.floor(this.count/this.columns);if(!this.keyNavigationWraps&&e<=t)return!1;this.keyNavigationWraps&&this.currentIndex+this.columns>=this.count?this.currentIndex=0:this.currentIndex+this.columns>=this.count?this.currentIndex=this.count-1:this.currentIndex+=this.columns}else{if(!this.keyNavigationWraps&&this.currentIndex===this.columns-1)return!1;++this.currentIndex}return!0},Ee._layout=function(){var t=this._get("model",!0);if(this.recursiveVisible||this.offlineLayout)if(t=this._attached)if(this.count=t.count,this.count){var e=this.flow===this.FlowLeftToRight,i=this._items,n=i.length,o=this.width,r=this.height;this.trace&&log("layout "+n+" into "+o+"x"+r+" @ "+this.content.x+","+this.content.y);for(var a=!1,s=0,c=0,l=this.content.x,h=this.content.y,d=e?function(){return r<=h+c}:function(){return o<=l+s},p=this.cellWidth,u=this.cellHeight,f=p+this.spacing,g=u+this.spacing,_=0;_<n&&!d();++_){if((v=this._items[_])||(v=this._createDelegate(_))&&(a=!0),0,v&&(v.viewX=s,v.viewY=c),v){this.currentIndex!==_||v.focused||(this.focusChild(v),this.contentFollowsCurrentItem&&this.positionViewAtIndex(_));var m=e?0<=h+c+v.height&&h+c<r:0<=l+s+v.width&&l+s<o;v.visibleInView=m}e?0<(s+=f)&&o<s+p&&(s=0,c+=g):0<(c+=g)&&r<c+u&&(c=0,s+=f)}for(;_<n;++_){var v;(v=i[_])&&(v.visibleInView=!1)}e?(this.columns=Math.floor((o+this.spacing)/(this.cellWidth+this.spacing)),this.rows=Math.floor((n+this.columns-1)/this.columns)):(this.rows=Math.floor((r+this.spacing)/(this.cellHeight+this.spacing)),this.columns=Math.floor((n+this.rows-1)/this.rows)),this.contentWidth=this.content.width=this.columns*(this.cellWidth+this.spacing)-this.spacing,this.contentHeight=this.content.height=this.rows*(this.cellHeight+this.spacing)-this.spacing,this.layoutFinished(),a&&this._context.scheduleComplete()}else this.layoutFinished();else this.layoutFinished()},Ee.__complete=function(){Te.__complete.call(this),this._updateOverflow()},Ee.move=function(t,e){var i,n,o=this.flow===this.FlowLeftToRight;o&&this.contentHeight>this.height?((n=this.contentY+e)<0?n=0:n>this.contentHeight-this.height&&(n=this.contentHeight-this.height),this.contentY=n):!o&&this.contentWidth>this.width&&((i=this.contentX+t)<0?i=0:i>this.contentWidth-this.width&&(i=this.contentWidth-this.width),this.contentX=i)},Ee.positionViewAtIndex=function(t){var e=this.contentX,i=this.contentY,n=this.getItemPosition(t),o=n[0],r=n[1],a=n[2],s=n[3],c=this.width,l=this.height;if(this.flow===this.FlowLeftToRight){if(l<s)return void(this.contentY=r-l/2+s/2);r-i<0?this.contentY=r:l<r-i+s&&(this.contentY=r+s-l)}else{if(c<a)return void(this.contentX=o-c/2+a/2);o-e<0?this.contentX=o:c<o-e+a&&(this.contentX=o+a-c)}},Ee.getItemPosition=function(t){var e,i,n=this.flow===this.FlowLeftToRight,o=this.cellWidth,r=this.cellHeight;if(n){if(0===this.columns)return[0,0,0,0];e=t%this.columns*o,i=Math.floor(t/this.columns)*r}else{if(0===this.rows)return[0,0,0,0];e=Math.floor(t/this.rows)*o,i=t%this.rows*r}return[e,i,o,r]},Ee.indexAt=function(t,e){t-=this.content.x,e-=this.content.y;var i=this.flow===this.FlowLeftToRight;return t=Math.floor(t/(this.cellWidth+this.spacing)),e=Math.floor(e/(this.cellHeight+this.spacing)),i?e*this.columns+t:t*this.rows+e},P._protoOnChanged(Ee,"count",function(t){0==t&&(this.rows=0,this.columns=0)});T=function(t){this._scheduleLayout()};P._protoOnChanged(Ee,"cellWidth",T),P._protoOnChanged(Ee,"cellHeight",T),P._protoOnChanged(Ee,"flow",function(t){this._updateOverflow(),this._scheduleLayout()}),P._protoOnKey(Ee,"Key",function(t,e){if(!this.handleNavigationKeys)return!1;switch(t){case"Up":return this.moveUp();case"Down":return this.moveDown();case"Left":return this.moveLeft();case"Right":return this.moveRight()}}),Ee.$c=function(t){Te.$c.call(this,t.$b={})},Ee.$s=function(t){Te.$s.call(this,t.$b),delete t.$b,this.completed()};var Le=P.GridView,ze=Le.prototype,Me=c.Mosaic=function(t,e){Le.apply(this,arguments)},Re=Me.prototype=Object.create(ze);Re.constructor=Me,Re.componentName="controls.experimental.Mosaic",Re.play=P.createSignal("play"),Re.itemFocused=P.createSignal("itemFocused"),y.addProperty(Re,"bool","hoverMode"),y.addProperty(Re,"bool","mobile"),y.addProperty(Re,"int","offset"),y.addProperty(Re,"int","delegateRadius"),Re.fill=function(t,e){var i=[];for(var n in t){var o=e(t[n]);o&&i.push(o)}this.model.assign(i)},P._protoOnKey(Re,"Key",function(t,e){return this.hoverMode=!1}),Re.$c=function(t){ze.$c.call(this,t.$b={}),this.delegate=function(t,e){var i={delegate:f=new P.Rectangle(t,e)};f.$c(i.$c$delegate={}),f.pressed=P.createSignal("pressed").bind(f),y.addProperty(f,"bool","active"),y.addProperty(f,"Mixin","hoverMixin");var n=new P.MouseMoveMixin(f);(i.delegate$child0=n).$c(i.$c$delegate$child0={}),f.addChild(n);var o=new P.Image(f);(i.delegate$child1=o).$c(i.$c$delegate$child1={}),y.addProperty(o,"bool","display"),o._setId("programImage"),f.addChild(o);var r=new P.Rectangle(f);(i.delegate$child2=r).$c(i.$c$delegate$child2={});var a=new P.Gradient(r);(i.delegate_child2$gradient=a).$c(i.$c$delegate_child2$gradient={});var s=new P.GradientStop(a);(i.delegate_child2_gradient$child0=s).$c(i.$c$delegate_child2_gradient$child0={}),a.addChild(s);var c=new P.GradientStop(a);(i.delegate_child2_gradient$child1=c).$c(i.$c$delegate_child2_gradient$child1={}),a.addChild(c),r.gradient=a,f.addChild(r);var l=new P.Image(f);(i.delegate$child3=l).$c(i.$c$delegate$child3={}),f.addChild(l);var h=new v.EllipsisText(f);(i.delegate$child4=h).$c(i.$c$delegate$child4={}),f.addChild(h);var d=new P.Rectangle(f);(i.delegate$child5=d).$c(i.$c$delegate$child5={});var p=new P.Rectangle(d);(i.delegate_child5$child0=p).$c(i.$c$delegate_child5$child0={}),d.addChild(p),f.addChild(d);var u=new P.Timer(f);(i.delegate$child6=u).$c(i.$c$delegate$child6={}),u._setId("flipTimer"),f.addChild(u);var f,g=new v.HoverClickMixin(f);(i.delegate$hoverMixin=g).$c(i.$c$delegate$hoverMixin={}),f.hoverMixin=g,y.addAliasProperty(f,"hover",function(){return f.hoverMixin},"value"),(f=i.delegate).$s(i.$c$delegate),delete i.$c$delegate,f._removeUpdater("clip"),f.clip=!0,f._removeUpdater("color"),f.color="#464646",(g=i.delegate$hoverMixin).$s(i.$c$delegate$hoverMixin),delete i.$c$delegate$hoverMixin,g.completed(),f.effects.shadow._removeUpdater("blur"),f.effects.shadow.blur=10,f._replaceUpdater("height",function(){f.height=f.parent.cellHeight},[f.parent,"cellHeight"]),f._replaceUpdater("width",function(){f.width=f.parent.cellWidth},[f.parent,"cellWidth"]),f._replaceUpdater("radius",function(){f.radius=f._get("nowonTvGrid").delegateRadius},[f._get("nowonTvGrid"),"delegateRadius"]),f.effects.shadow._replaceUpdater("color",function(){f.effects.shadow.color=f.active?"#00f":"#0000"},[f,"active"]),f._replaceUpdater("active",function(){f.active=f.activeFocus},[f,"activeFocus"]),f.effects.shadow._removeUpdater("spread"),f.effects.shadow.spread=1,f._replaceUpdater("z",function(){f.z=f.active?f.parent.z+1:f.parent.z},[f.parent,"z",f,"active"]),f.transform._replaceUpdater("scaleX",function(){f.transform.scaleX=f.active?1.05:1},[f,"active"]),f.transform._replaceUpdater("scaleY",function(){f.transform.scaleY=f.active?1.05:1},[f,"active"]),f.on("clicked",function(){var t=this._get("model",!0);this.parent.currentIndex=t.index,this.pressed()}.bind(f)),f.on("pressed",function(){var t=this._get("model",!0);this.parent.play(t.index)}.bind(f)),f.onChanged("active",function(t){var e=this._get("flipTimer",!0);t&&e.restart()}.bind(f)),f.onPressed("Select",function(t,e){this.pressed()}.bind(f)),(n=i.delegate$child0).$s(i.$c$delegate$child0),delete i.$c$delegate$child0,n.on("mouseMove",function(){var t=this._get("model",!0),e=this._get("nowonTvGrid",!0);e.hoverMode=!0,e.currentIndex=t.index}.bind(n)),n.completed(),(o=i.delegate$child1).$s(i.$c$delegate$child1),delete i.$c$delegate$child1,o._replaceUpdater("source",function(){o.source=o._get("model").preview?o._get("model").preview:""},[o._get("_delegate"),"_row"]),o._removeUpdater("fillMode"),o.fillMode=k.core.Image.prototype.PreserveAspectCrop,o._replaceUpdater("visible",function(){o.visible=o.source},[o,"source"]),o.anchors._removeUpdater("fill"),o.anchors.fill=o.parent,o.onChanged("status",function(t){this.display=this.status==this.Ready}.bind(o)),o.completed(),(r=i.delegate$child2).$s(i.$c$delegate$child2),delete i.$c$delegate$child2,r.anchors._replaceUpdater("bottomMargin",function(){r.anchors.bottomMargin=2*r._context.virtualScale},[r._context,"virtualScale"]),r._replaceUpdater("width",function(){r.width=r.parent.width},[r.parent,"width"]),(a=i.delegate_child2$gradient).$s(i.$c$delegate_child2$gradient),delete i.$c$delegate_child2$gradient,(s=i.delegate_child2_gradient$child0).$s(i.$c$delegate_child2_gradient$child0),delete i.$c$delegate_child2_gradient$child0,s._removeUpdater("color"),s.color="#0000",s._removeUpdater("position"),s.position=0,s.completed(),(c=i.delegate_child2_gradient$child1).$s(i.$c$delegate_child2_gradient$child1),delete i.$c$delegate_child2_gradient$child1,c._removeUpdater("color"),c.color="#000",c._removeUpdater("position"),c.position=1,c.completed(),a.completed(),r.anchors._replaceUpdater("bottom",function(){r.anchors.bottom=r.parent.bottom},[r.parent,"bottom"]),r._replaceUpdater("height",function(){r.height=70*r._context.virtualScale},[r._context,"virtualScale"]),r.completed(),(l=i.delegate$child3).$s(i.$c$delegate$child3),delete i.$c$delegate$child3,l._removeUpdater("horizontalAlignment"),l.horizontalAlignment=k.core.Image.prototype.AlignRight,l._replaceUpdater("source",function(){l.source=l._get("model").icon?l._get("model").icon:""},[l._get("_delegate"),"_row"]),l.anchors._replaceUpdater("bottomMargin",function(){l.anchors.bottomMargin=21*l._context.virtualScale},[l._context,"virtualScale"]),l._replaceUpdater("height",function(){l.height=70*l._context.virtualScale},[l._context,"virtualScale"]),l._replaceUpdater("width",function(){l.width=100*l._context.virtualScale},[l._context,"virtualScale"]),l._removeUpdater("fillMode"),l.fillMode=k.core.Image.prototype.PreserveAspectFit,l._removeUpdater("verticalAlignment"),l.verticalAlignment=k.core.Image.prototype.AlignTop,l.anchors._replaceUpdater("bottom",function(){l.anchors.bottom=l.parent.bottom},[l.parent,"bottom"]),l._replaceUpdater("x",function(){l.x=10*l._context.virtualScale},[l._context,"virtualScale"]),l.completed(),(h=i.delegate$child4).$s(i.$c$delegate$child4),delete i.$c$delegate$child4,h._removeUpdater("color"),h.color="#fff",h._replaceUpdater("text",function(){h.text=h._get("model").title},[h._get("_delegate"),"_row"]),h.anchors._replaceUpdater("bottomMargin",function(){h.anchors.bottomMargin=6*h._context.virtualScale},[h._context,"virtualScale"]),h._replaceUpdater("width",function(){h.width=270*h._context.virtualScale},[h._context,"virtualScale"]),h.anchors._replaceUpdater("bottom",function(){h.anchors.bottom=h.parent.bottom},[h.parent,"bottom"]),h.font._replaceUpdater("pixelSize",function(){h.font.pixelSize=h._get("nowonTvGrid").mobile?9*h._context.virtualScale:18*h._context.virtualScale},[h._get("nowonTvGrid"),"mobile",h._context,"virtualScale"]),h._replaceUpdater("x",function(){h.x=10*h._context.virtualScale},[h._context,"virtualScale"]),h.completed(),(d=i.delegate$child5).$s(i.$c$delegate$child5),delete i.$c$delegate$child5,d._removeUpdater("color"),d.color="#000c",d._replaceUpdater("width",function(){d.width=d.parent.width},[d.parent,"width"]),d.anchors._replaceUpdater("bottom",function(){d.anchors.bottom=d.parent.bottom},[d.parent,"bottom"]),d._removeUpdater("clip"),d.clip=!0,d._replaceUpdater("height",function(){d.height=2*d._context.virtualScale},[d._context,"virtualScale"]),(p=i.delegate_child5$child0).$s(i.$c$delegate_child5$child0),delete i.$c$delegate_child5$child0,p._removeUpdater("color"),p.color="#e53935",p._replaceUpdater("width",function(){p.width=p.parent.width*p._get("model").progress},[p._get("_delegate"),"_row",p.parent,"width"]),p._replaceUpdater("height",function(){p.height=p.parent.height},[p.parent,"height"]),p.completed(),d.completed(),(u=i.delegate$child6).$s(i.$c$delegate$child6),delete i.$c$delegate$child6,u._removeUpdater("interval"),u.interval=3e3,u.on("triggered",function(){var t=this._get("model",!0),e=this._get("nowonTvGrid",!0);this.parent.active&&(this.parent.transform.scaleX=0,e.itemFocused(t.index))}.bind(u)),u.completed();var _,m={behavior_delegate_on_transform:_=new P.Animation(f)};return _.$c(m.$c$behavior_delegate_on_transform={}),(_=m.behavior_delegate_on_transform).$s(m.$c$behavior_delegate_on_transform),delete m.$c$behavior_delegate_on_transform,_._removeUpdater("duration"),_.duration=300,_.completed(),f.setAnimation("transform",_),f.completed(),f};var e=new P.ListModel(this);(t._this$model=e).$c(t.$c$_this$model={}),this.model=e,this._setId("nowonTvGrid")},Re.$s=function(t){var e=this;ze.$s.call(this,t.$b),delete t.$b,e._replaceUpdater("cellWidth",function(){e.cellWidth=(e._context.width>e._context.height?.25:.5)*e.width-e.spacing},[e,"width",e._context,"height",e._context,"width",e,"spacing"]),e._replaceUpdater("mobile",function(){e.mobile=e._context.system.device===e._context.system.Mobile},[e._context.system,"device",e._context.system,"Mobile"]),e._removeUpdater("keyNavigationWraps"),e.keyNavigationWraps=!1,e._replaceUpdater("spacing",function(){e.spacing=10*e._context.virtualScale},[e._context,"virtualScale"]),e._replaceUpdater("contentFollowsCurrentItem",function(){e.contentFollowsCurrentItem=!e.hoverMode},[e,"hoverMode"]),e._replaceUpdater("height",function(){e.height=e.parent.height},[e.parent,"height"]),e._replaceUpdater("width",function(){e.width=e.parent.width},[e.parent,"width"]),e._removeUpdater("nativeScrolling"),e.nativeScrolling=!0,e.content._removeUpdater("cssTranslatePositioning"),e.content.cssTranslatePositioning=!0;var i=t._this$model;i.$s(t.$c$_this$model),delete t.$c$_this$model,i.completed(),e._replaceUpdater("cellHeight",function(){e.cellHeight=.625*e.cellWidth},[e,"cellWidth"]),e.completed()};var He=P.Object,je=He.prototype,Ne=P.Border=function(t,e){He.apply(this,arguments)},Be=Ne.prototype=Object.create(je);Be.constructor=Ne,Be.componentName="core.Border",y.addProperty(Be,"int","width"),y.addProperty(Be,"color","color","black"),y.addLazyProperty(Be,"left",function(t,e){var i,n={lazy$left:i=new P.BorderSide(t,e)};return i.$c(n.$c$lazy$left={}),(i=n.lazy$left).$s(n.$c$lazy$left),delete n.$c$lazy$left,i._removeUpdater("name"),i.name="left",i.completed(),i}),y.addLazyProperty(Be,"right",function(t,e){var i,n={lazy$right:i=new P.BorderSide(t,e)};return i.$c(n.$c$lazy$right={}),(i=n.lazy$right).$s(n.$c$lazy$right),delete n.$c$lazy$right,i._removeUpdater("name"),i.name="right",i.completed(),i}),y.addLazyProperty(Be,"top",function(t,e){var i,n={lazy$top:i=new P.BorderSide(t,e)};return i.$c(n.$c$lazy$top={}),(i=n.lazy$top).$s(n.$c$lazy$top),delete n.$c$lazy$top,i._removeUpdater("name"),i.name="top",i.completed(),i}),y.addLazyProperty(Be,"bottom",function(t,e){var i,n={lazy$bottom:i=new P.BorderSide(t,e)};return i.$c(n.$c$lazy$bottom={}),(i=n.lazy$bottom).$s(n.$c$lazy$bottom),delete n.$c$lazy$bottom,i._removeUpdater("name"),i.name="bottom",i.completed(),i}),Be.None=0,Ne.None=0,Be.Hidden=1,Ne.Hidden=1,Be.Dotted=2,Ne.Dotted=2,Be.Dashed=3,Ne.Dashed=3,Be.Solid=4,Ne.Solid=4,Be.Double=5,Ne.Double=5,Be.Groove=6,Ne.Groove=6,Be.Ridge=7,Ne.Ridge=7,Be.Inset=8,Ne.Inset=8,Be.Outset=9,Ne.Outset=9,y.addProperty(Be,"enum","style",Ne.Solid),Be.Inner=0,Ne.Inner=0,Be.Outer=1,Ne.Outer=1,Be.Center=2,Ne.Center=2,y.addProperty(Be,"enum","type"),P._protoOnChanged(Be,"color",function(t){var e=P.Color.normalize(this.color);this.parent.style("border-color",e)}),P._protoOnChanged(Be,"width",function(t){var e=this.parent;switch(e.style("border-width",t),this.type){case this.Inner:e._borderXAdjust=0,e._borderYAdjust=0,e._borderInnerWidthAdjust=-2*t,e._borderInnerHeightAdjust=-2*t,e._setSizeAdjust();break;case this.Outer:e._borderXAdjust=-t,e._borderYAdjust=-t,e._borderWidthAdjust=0,e._borderHeightAdjust=0,e._setSizeAdjust();break;case this.Center:e._borderXAdjust=-t/2,e._borderYAdjust=-t/2,e._borderWidthAdjust=-t,e._borderHeightAdjust=-t,e._setSizeAdjust()}}),P._protoOnChanged(Be,"type",function(t){var e;switch(t){case this.Inner:e="border-box";break;case this.Outer:case this.Center:e="content-box"}this.parent.style("box-sizing",e)}),P._protoOnChanged(Be,"style",function(t){var e;switch(t){case this.None:e="none";break;case this.Hidden:e="hidden";break;case this.Dotted:e="dotted";break;case this.Dashed:e="dashed";break;case this.Solid:e="solid";break;case this.Double:e="double";break;case this.Groove:e="groove";break;case this.Ridge:e="ridge";break;case this.Inset:e="inset";break;case this.Outset:e="outset"}this.parent.style("border-style",e)}),Be.$c=function(t){je.$c.call(this,t.$b={})},Be.$s=function(t){je.$s.call(this,t.$b),delete t.$b,this.completed()};var Ve=P.Object,We=Ve.prototype,Fe=P.Timer=function(t,e){Ve.apply(this,arguments),this._trigger=this._context.wrapNativeCallback(this.triggered.bind(this))},De=Fe.prototype=Object.create(We);De.constructor=Fe,De.componentName="core.Timer",De.triggered=P.createSignal("triggered"),y.addProperty(De,"int","interval",1e3),y.addProperty(De,"bool","repeat"),y.addProperty(De,"bool","running"),y.addProperty(De,"bool","triggeredOnStart"),De._restart=function(){if(this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._interval&&(clearTimeout(this._interval),this._interval=void 0),this.running){this._context;this.repeat?this._interval=setInterval(this._trigger,this.interval):this._timeout=setTimeout(this._trigger,this.interval)}},De.__complete=function(){We.__complete.call(this),this.running&&this.triggeredOnStart&&this.triggered()},De.stop=function(){this.running=!1},De.start=function(){this.running=!0},De.restart=function(){this.stop(),this.start()},P._protoOnChanged(De,"running",function(t){this._restart(),t&&this.triggeredOnStart&&(this._triggered=!1,this.triggered())});T=function(t){this._restart()};P._protoOnChanged(De,"interval",T),P._protoOnChanged(De,"repeat",T),P._protoOn(De,"triggered",function(){this.repeat||this.triggeredOnStart&&!this._triggered||(this.running=!1),this._triggered=!0}),De.$c=function(t){We.$c.call(this,t.$b={})},De.$s=function(t){We.$s.call(this,t.$b),delete t.$b,this.completed()};var Ye=a.BaseActivity,Xe=Ye.prototype,qe=a.Activity=function(t,e){Ye.apply(this,arguments)},Ge=qe.prototype=Object.create(Xe);Ge.constructor=qe,Ge.componentName="controls.core.Activity",Ge.getActivity=function(){return this},Ge.stop=function(){this.active=!1,this.stopped()},Ge.start=function(){this.active=!0,this.started()},Ge.$c=function(t){Xe.$c.call(this,t.$b={})},Ge.$s=function(t){Xe.$s.call(this,t.$b),delete t.$b,this.completed()};var Ke=a.Activity,Ze=Ke.prototype,Je=l.MosaicPage=function(t,e){Ke.apply(this,arguments)},Qe=Je.prototype=Object.create(Ze);Qe.constructor=Je,Qe.componentName="src.MosaicPage",y.addProperty(Qe,"int","delegateRadius"),Qe.init=function(){var t=this._get("anotherApi",!0),e=this._get("mosaicGrid",!0);this._get("api",!0);t.getMain(function(t){e.fill(t.element.collectionItems.items,function(t){if(t.element.basicCovers.items&&0<t.element.basicCovers.items.length){var e="",i=t.element.trailers.items;for(var n in i)if(0<=i[n].media.mimeType.indexOf("mp4")){e=i[n].url;break}return{video:e,preview:t.element.basicCovers.items[0].url,title:t.element.name}}return null})},function(t){log("Failed to get content",t)})},Qe.$c=function(t){Ze.$c.call(this,t.$b={});var e=new P.Item(this);(t._this$child0=e).$c(t.$c$_this$child0={});var i=new s.OverflowMixin(e);(t._this_child0$child0=i).$c(t.$c$_this_child0$child0={}),e.addChild(i);var n=new c.Mosaic(e);(t._this_child0$child1=n).$c(t.$c$_this_child0$child1={});var o=new c.NestedVideo(n);(t._this_child0_child1$highlight=o).$c(t.$c$_this_child0_child1$highlight={});var r=new P.ClickMixin(o);(t._this_child0_child1_highlight$child0=r).$c(t.$c$_this_child0_child1_highlight$child0={}),o.addChild(r),n.highlight=o,n._setId("mosaicGrid"),e.addChild(n),this.addChild(e)},Qe.$s=function(t){var e=this;Ze.$s.call(this,t.$b),delete t.$b,e._replaceUpdater("delegateRadius",function(){e.delegateRadius=10*e._context.virtualScale},[e._context,"virtualScale"]),e._removeUpdater("name"),e.name="mosaic",e.anchors._removeUpdater("fill"),e.anchors.fill=e.parent;var i=t._this$child0;i.$s(t.$c$_this$child0),delete t.$c$_this$child0,i._replaceUpdater("width",function(){i.width=i.parent.width},[i.parent,"width"]),i._replaceUpdater("height",function(){i.height=i.parent.height},[i.parent,"height"]);var n=t._this_child0$child0;n.$s(t.$c$_this_child0$child0),delete t.$c$_this_child0$child0,n._removeUpdater("value"),n.value=k.controls.mixins.OverflowMixin.prototype.ScrollY,n.completed();var o=t._this_child0$child1;o.$s(t.$c$_this_child0$child1),delete t.$c$_this_child0$child1,o._removeUpdater("keyProcessDelay"),o.keyProcessDelay=300,o._replaceUpdater("delegateRadius",function(){o.delegateRadius=o.parent.delegateRadius},[o.parent,"delegateRadius"]);var r=t._this_child0_child1$highlight;r.$s(t.$c$_this_child0_child1$highlight),delete t.$c$_this_child0_child1$highlight,r._replaceUpdater("z",function(){r.z=r.display?1:0},[r,"display"]),r._replaceUpdater("radius",function(){r.radius=r.parent.delegateRadius},[r.parent,"delegateRadius"]),r.on("clicked",function(){var t=this._get("mosaicGrid",!0);t.play(t.currentIndex)}.bind(r));var a=t._this_child0_child1_highlight$child0;a.$s(t.$c$_this_child0_child1_highlight$child0),delete t.$c$_this_child0_child1_highlight$child0,a.completed();var s,c={behavior__this_child0_child1_highlight_on_y:s=new P.Animation(r)};s.$c(c.$c$behavior__this_child0_child1_highlight_on_y={}),(s=c.behavior__this_child0_child1_highlight_on_y).$s(c.$c$behavior__this_child0_child1_highlight_on_y),delete c.$c$behavior__this_child0_child1_highlight_on_y,s._removeUpdater("duration"),s.duration=300,s.completed(),r.setAnimation("y",s);var l,h={behavior__this_child0_child1_highlight_on_x:l=new P.Animation(r)};l.$c(h.$c$behavior__this_child0_child1_highlight_on_x={}),(l=h.behavior__this_child0_child1_highlight_on_x).$s(h.$c$behavior__this_child0_child1_highlight_on_x),delete h.$c$behavior__this_child0_child1_highlight_on_x,l._removeUpdater("duration"),l.duration=300,l.completed(),r.setAnimation("x",l);var d,p={behavior__this_child0_child1_highlight_on_height:d=new P.Animation(r)};d.$c(p.$c$behavior__this_child0_child1_highlight_on_height={}),(d=p.behavior__this_child0_child1_highlight_on_height).$s(p.$c$behavior__this_child0_child1_highlight_on_height),delete p.$c$behavior__this_child0_child1_highlight_on_height,d._removeUpdater("duration"),d.duration=300,d.completed(),r.setAnimation("height",d);var u,f={behavior__this_child0_child1_highlight_on_width:u=new P.Animation(r)};u.$c(f.$c$behavior__this_child0_child1_highlight_on_width={}),(u=f.behavior__this_child0_child1_highlight_on_width).$s(f.$c$behavior__this_child0_child1_highlight_on_width),delete f.$c$behavior__this_child0_child1_highlight_on_width,u._removeUpdater("duration"),u.duration=300,u.completed(),r.setAnimation("width",u),r.completed(),o._replaceUpdater("height",function(){o.height=o.contentHeight},[o,"contentHeight"]),o._replaceUpdater("width",function(){o.width=.9*o.parent.width},[o.parent,"width"]),o._removeUpdater("nativeScrolling"),o.nativeScrolling=!1,o._removeUpdater("animationDuration"),o.animationDuration=300,o._replaceUpdater("y",function(){o.y=.05*o.parent.height},[o.parent,"height"]),o._replaceUpdater("x",function(){o.x=.05*o.parent.width},[o.parent,"width"]),o.focusIndex=function(t){var e=this.model.get(t);this.highlight.showAndPlay(e.video)}.bind(o),o.on("itemFocused",function(t){this.focusIndex(t)}.bind(o)),o.onChanged("currentIndex",function(t){this.highlight.hide()}.bind(o)),o.onPressed("Back",function(t,e){this.focusIndex(this.currentIndex)}.bind(o)),o.completed(),i.completed(),e.completed()};var ti=P.Object,ei=ti.prototype,ii=P.Effects=function(t,e){ti.apply(this,arguments)},ni=ii.prototype=Object.create(ei);ni.constructor=ii,ni.componentName="core.Effects",y.addProperty(ni,"real","blur"),y.addProperty(ni,"real","grayscale"),y.addProperty(ni,"real","sepia"),y.addProperty(ni,"real","brightness"),y.addProperty(ni,"real","contrast"),y.addProperty(ni,"real","hueRotate"),y.addProperty(ni,"real","invert"),y.addProperty(ni,"real","saturate"),y.addLazyProperty(ni,"shadow",function(t,e){var i,n={lazy$shadow:i=new P.Shadow(t,e)};return i.$c(n.$c$lazy$shadow={}),(i=n.lazy$shadow).$s(n.$c$lazy$shadow),delete n.$c$lazy$shadow,i.completed(),i}),ni._getFilterStyle=function(){var t=[];return this._addStyle(t,"blur","blur","px"),this._addStyle(t,"grayscale"),this._addStyle(t,"sepia"),this._addStyle(t,"brightness"),this._addStyle(t,"contrast"),this._addStyle(t,"hueRotate","hue-rotate","deg"),this._addStyle(t,"invert"),this._addStyle(t,"saturate"),t},ni._addStyle=function(t,e,i,n){var o=this[e];o&&t.push((i||e)+"("+o+(n||"")+") ")},ni._updateStyle=function(t){var e=this._getFilterStyle().join(""),i=this.parent,n={};n["-webkit-filter"]=e,n.filter=e,!this.shadow||this.shadow._empty()&&!t||(n["box-shadow"]=this.shadow._getFilterStyle()),i.style(n)};T=function(t){this._updateStyle()};P._protoOnChanged(ni,"saturate",T),P._protoOnChanged(ni,"brightness",T),P._protoOnChanged(ni,"grayscale",T),P._protoOnChanged(ni,"sepia",T),P._protoOnChanged(ni,"invert",T),P._protoOnChanged(ni,"hueRotate",T),P._protoOnChanged(ni,"contrast",T),P._protoOnChanged(ni,"blur",T),ni.$c=function(t){ei.$c.call(this,t.$b={})},ni.$s=function(t){ei.$s.call(this,t.$b),delete t.$b,this.completed()};var oi=P.Item,ri=oi.prototype,ai=P.Context=function(t,e){oi.apply(this,arguments),this.options=arguments[2],this.l10n=this.options.l10n||{},((this._local.context=this)._context=this)._started=!1,this._completed=!1,this._processingActions=!1,this._delayedActions=[],this._completedObjects=[],this._stylesRegistered={},this._asyncInvoker=P.safeCall(this,[],function(t){log("async action failed:",t,t.stack)}),this.backend=k._backend(),this._init()},si=ai.prototype=Object.create(ri);si.constructor=ai,si.componentName="core.Context",si.message=P.createSignal("message"),y.addProperty(si,"int","scrollY"),y.addProperty(si,"int","keyProcessDelay"),y.addProperty(si,"bool","fullscreen"),y.addProperty(si,"string","language"),y.addProperty(si,"System","system"),y.addProperty(si,"Location","location"),y.addProperty(si,"Stylesheet","stylesheet"),y.addProperty(si,"string","buildIdentifier"),y.addProperty(si,"int","virtualWidth",$manifest$virtual$width),y.addProperty(si,"int","virtualHeight",$manifest$virtual$height),y.addProperty(si,"real","virtualScale"),si._processActions=function(){if(this._started&&!this._processingActions){this._processingActions=!0;for(var t=this._asyncInvoker;this._delayedActions.length||this._completedObjects.length;){var e=this._delayedActions;this._delayedActions=[];for(var i=0,n=e.length;i<n;++i)t(e[i]);var o=this._completedObjects;this._completedObjects=[];for(i=0,n=o.length;i<n;++i){var r=o[i];try{r.__complete()}catch(t){log("onCompleted failed",t,t.stack)}}}this._processingActions=!1,this.backend.tick(this)}},si._init=function(){log("Context: initializing..."),new this.backend.init(this)},si._run=function(){log("Context: signalling layout"),this.visibleInView=!0,this.newBoundingBox(),log("Context: calling completed()"),this._started=!0,this._processActions(),this._completed=!0},si.init=function(){this.__init(),this.backend.initSystem(this.system)},si.run=function(){this.backend.run(this,this._run.bind(this))},si.scheduleComplete=function(){this._get("context",!0);this.delayedAction("context:completed",this,this._processActions)},si.tr=function(){return this.qsTr.apply(this,arguments)},si.scheduleAction=function(t){this._delayedActions.push(t)},si.wrapNativeCallback=function(e){var i=this;return function(){try{var t=e.apply(this,arguments);return i._processActions(),t}catch(t){throw i._processActions(),t}}},si.start=function(t){return this.children.push(t),t.__init(),log("Context: created instance"),t},si.registerStyle=function(t,e,i){var n=(i=this.mangleClass(i))?e+"."+i:e;n in this._stylesRegistered||(t.registerStyle(this.stylesheet,n),this._stylesRegistered[n]=!0)},si.processKey=function(t,e){for(var i=y.forEach(this,P.Item.prototype._enqueueNextChildInFocusChain,[]),n=i.length,o=0;o<n;++o){if(i[o]._processKey(t,e))return!0}return!1},si.updateL10n=function(t,e){this.l10n[t]=e,this.__properties.language.callOnChanged(this,"language",this.language,this.language)},si.mangleClass=function(t){return $manifest$html5$prefix+t},si.delayedAction=function(t,e,i,n){if(e._registerDelayedAction(t)){var o=function(){e._cancelDelayedAction(t),i.call(e)};0<n?setTimeout(this.wrapNativeCallback(o),n):0===n?this.backend.requestAnimationFrame(this.wrapNativeCallback(o)):this.scheduleAction(o)}},si.__onCompleted=function(t){this._completedObjects.push(t)},si.createElement=function(t,e){return this.backend.createElement(this,t,e)},si.qsTr=function(t){var i=arguments,e=this.language,n=(this.l10n[e]||{})[t]||{};for(var o in n){t=n[o];break}return t.replace(/%(\d+)/,function(t,e){return i[e]})},P._protoOnChanged(si,"fullscreen",function(t){t?this.backend.enterFullscreenMode(this.element):this.backend.exitFullscreenMode()}),si.$c=function(t){var e=this;ri.$c.call(this,t.$b={});var i=new r.Stylesheet(e);(t._this$stylesheet=i).$c(t.$c$_this$stylesheet={}),e.stylesheet=i;var n=new P.System(e);(t._this$system=n).$c(t.$c$_this$system={}),e.system=n;var o=new P.Location(e);(t._this$location=o).$c(t.$c$_this$location={}),e.location=o},si.$s=function(t){var e=this;ri.$s.call(this,t.$b),delete t.$b;var i=t._this$stylesheet;i.$s(t.$c$_this$stylesheet),delete t.$c$_this$stylesheet,i.completed(),e._replaceUpdater("virtualScale",function(){e.virtualScale=Math.min((e.system.resolutionWidth||e.width)/e.virtualWidth,(e.system.resolutionHeight||e.height)/e.virtualHeight)},[e.system,"resolutionWidth",e,"virtualHeight",e,"height",e,"virtualWidth",e,"width",e.system,"resolutionHeight"]);var n=t._this$system;n.$s(t.$c$_this$system),delete t.$c$_this$system,n.completed(),e._removeUpdater("visibleInView"),e.visibleInView=!1;var o=t._this$location;o.$s(t.$c$_this$location),delete t.$c$_this$location,o.completed(),e.completed()};var ci=P.Object,li=ci.prototype,hi=P.Transform=function(t,e){ci.apply(this,arguments),this._transforms=new P.transform.Transform},di=hi.prototype=Object.create(li);di.constructor=hi,di.componentName="core.Transform",y.addProperty(di,"int","perspective"),y.addProperty(di,"int","translateX"),y.addProperty(di,"int","translateY"),y.addProperty(di,"int","translateZ"),y.addProperty(di,"real","rotateX"),y.addProperty(di,"real","rotateY"),y.addProperty(di,"real","rotateZ"),y.addProperty(di,"real","rotate"),y.addProperty(di,"real","scaleX"),y.addProperty(di,"real","scaleY"),y.addProperty(di,"real","skewX"),y.addProperty(di,"real","skewY"),di._updateTransform=function(){this.parent.style("transform",this._transforms)},di._animateAll=function(i){var n=this;["perspective","translateX","translateY","translateZ","rotateX","rotateY","rotateZ","rotate","scaleX","scaleY","skewX","skewY"].forEach(function(t){var e=new P.Animation(n);P.core.createObject(e),e.delay=i.delay,e.duration=i.duration,e.cssTransition=!1,e.easing=i.easing,n.setAnimation(t,e)}),this._context._processActions()},P._protoOnChanged(di,"perspective",function(t){this._transforms.add("perspective",t,"px"),this._updateTransform()}),P._protoOnChanged(di,"rotate",function(t){this._transforms.add("rotate",t,"deg"),this._updateTransform()}),P._protoOnChanged(di,"rotateX",function(t){this._transforms.add("rotateX",t,"deg"),this._updateTransform()}),P._protoOnChanged(di,"rotateY",function(t){this._transforms.add("rotateY",t,"deg"),this._updateTransform()}),P._protoOnChanged(di,"rotateZ",function(t){this._transforms.add("rotateZ",t,"deg"),this._updateTransform()}),P._protoOnChanged(di,"scaleX",function(t){this._transforms.add("scaleX",t),this._updateTransform()}),P._protoOnChanged(di,"scaleY",function(t){this._transforms.add("scaleY",t),this._updateTransform()}),P._protoOnChanged(di,"skewX",function(t){this._transforms.add("skewX",t,"deg"),this._updateTransform()}),P._protoOnChanged(di,"skewY",function(t){this._transforms.add("skewY",t,"deg"),this._updateTransform()}),P._protoOnChanged(di,"translateX",function(t){this._transforms.add("translateX",t,"px"),this._updateTransform()}),P._protoOnChanged(di,"translateY",function(t){this._transforms.add("translateY",t,"px"),this._updateTransform()}),P._protoOnChanged(di,"translateZ",function(t){this._transforms.add("translateZ",t,"px"),this._updateTransform()}),di.$c=function(t){li.$c.call(this,t.$b={})},di.$s=function(t){li.$s.call(this,t.$b),delete t.$b,this.completed()};var pi=s.BaseMixin,ui=pi.prototype,fi=s.OverflowMixin=function(t,e){pi.apply(this,arguments)},gi=fi.prototype=Object.create(ui);gi.constructor=fi,gi.componentName="controls.mixins.OverflowMixin",gi.Visible=0,fi.Visible=0,gi.Hidden=1,fi.Hidden=1,gi.Scroll=2,fi.Scroll=2,gi.ScrollX=3,fi.ScrollX=3,gi.ScrollY=4,fi.ScrollY=4,y.addProperty(gi,"enum","value"),gi.__complete=function(){ui.__complete.call(this),this._updateOverflow(this.value)},gi._updateOverflow=function(t){switch(t){case this.Visible:this.parent.style("overflow","visible");break;case this.Hidden:this.parent.style("overflow","hidden");break;case this.Scroll:this.parent.style("overflow","auto");break;case this.ScrollX:this.parent.style("overflow","auto"),this.parent.style("overflow-y","hidden");break;case this.ScrollY:this.parent.style("overflow","auto"),this.parent.style("overflow-x","hidden")}},P._protoOnChanged(gi,"value",function(t){this._updateOverflow(t)}),gi.$c=function(t){ui.$c.call(this,t.$b={})},gi.$s=function(t){ui.$s.call(this,t.$b),delete t.$b,this.completed()};var _i=P.Object,mi=_i.prototype,vi=P.BorderSide=function(t,e){_i.apply(this,arguments)},yi=vi.prototype=Object.create(mi);yi.constructor=vi,yi.componentName="core.BorderSide",y.addProperty(yi,"string","name"),y.addProperty(yi,"int","width"),y.addProperty(yi,"color","color"),y.addProperty(yi,"int","style"),yi._updateStyle=function(){if(this.parent&&this.parent.parent&&this.name){var t;P.Border;switch(this.style){case k.core.Border.prototype.None:t="none";break;case k.core.Border.prototype.Hidden:t="hidden";break;case k.core.Border.prototype.Dotted:t="dotted";break;case k.core.Border.prototype.Dashed:t="dashed";break;case k.core.Border.prototype.Solid:t="solid";break;case k.core.Border.prototype.Double:t="double";break;case k.core.Border.prototype.Groove:t="groove";break;case k.core.Border.prototype.Ridge:t="ridge";break;case k.core.Border.prototype.Inset:t="inset";break;case k.core.Border.prototype.Outset:t="outset"}var e=this.width+"px "+t+" "+P.Color.normalize(this.color);this.parent.parent.style("border-"+this.name,e)}};T=function(t){this._updateStyle()};P._protoOnChanged(yi,"width",T),P._protoOnChanged(yi,"color",T),P._protoOnChanged(yi,"style",T),yi.$c=function(t){mi.$c.call(this,t.$b={})},yi.$s=function(t){var e=this;mi.$s.call(this,t.$b),delete t.$b,e._replaceUpdater("color",function(){e.color=e.parent.color},[e.parent,"color"]),e._replaceUpdater("width",function(){e.width=e.parent.width},[e.parent,"width"]),e._replaceUpdater("style",function(){e.style=e.parent.style},[e.parent,"style"]),e.completed()};var bi=P.Object,$i=bi.prototype,wi=P.Model=function(t,e){bi.apply(this,arguments)},xi=wi.prototype=Object.create($i);xi.constructor=wi,xi.componentName="core.Model",xi.reset=P.createSignal("reset"),xi.rowsChanged=P.createSignal("rowsChanged"),xi.rowsRemoved=P.createSignal("rowsRemoved"),xi.rowsInserted=P.createSignal("rowsInserted"),y.addProperty(xi,"int","count"),xi.$c=function(t){$i.$c.call(this,t.$b={})},xi.$s=function(t){$i.$s.call(this,t.$b),delete t.$b,this.completed()};var Ci=P.Model,ki=Ci.prototype,Pi=P.ListModel=function(t,e){Ci.apply(this,arguments),this._rows=[]},Ai=Pi.prototype=Object.create(ki);Ai.constructor=Pi,Ai.componentName="core.ListModel",y.addProperty(Ai,"array","data"),Ai.clear=function(){this.assign([])},Ai.forEach=function(t){return this._rows.forEach(t)},Ai.addChild=function(t){this.append(t)},Ai.get=function(t){if(t<0||t>=this._rows.length)throw new Error("index "+t+" out of bounds ("+this._rows.length+")");var e=this._rows[t];if(!(e instanceof Object))throw new Error("row is non-object");return e.index=t,e},Ai.remove=function(t,e){if(t<0||t>=this._rows.length)throw new Error("index "+t+" out of bounds");void 0===e&&(e=1),this._rows.splice(t,e),this.count=this._rows.length,this.rowsRemoved(t,t+e)},Ai.setProperty=function(t,e,i){if(t<0||t>=this._rows.length)throw new Error("index "+t+" out of bounds ("+this._rows.length+")");var n=this._rows[t];if(!(n instanceof Object))throw new Error("row is non-object, invalid index? ("+t+")");n[e]!==i&&(n[e]=i,this.rowsChanged(t,t+1))},Ai.insert=function(t,e){if(t<0||t>this._rows.length)throw new Error("index "+t+" out of bounds ("+this._rows.length+")");this._rows.splice(t,0,e),this.count=this._rows.length,this.rowsInserted(t,t+1)},Ai.set=function(t,e){if(t<0||t>=this._rows.length)throw new Error("index "+t+" out of bounds ("+this._rows.length+")");if(!(e instanceof Object))throw new Error("row is non-object");this._rows[t]=e,this.rowsChanged(t,t+1)},Ai.append=function(t){var e=this._rows.length;Array.isArray(t)?(Array.prototype.push.apply(this._rows,t),this.count=this._rows.length,this.rowsInserted(e,e+t.length)):(this._rows.push(t),this.count=this._rows.length,this.rowsInserted(e,e+1))},Ai.assign=function(t){this._rows=t,this.count=this._rows.length,this.reset()},P._protoOnChanged(Ai,"data",function(t){this.assign(t)}),Ai.$c=function(t){ki.$c.call(this,t.$b={})},Ai.$s=function(t){ki.$s.call(this,t.$b),delete t.$b,this.completed()};var Oi=P.Object,Si=Oi.prototype,Ii=P.Location=function(t,e){Oi.apply(this,arguments);var i=P.__locationBackend;if(!i)throw new Error("no backend found");this.impl=i().createLocation(this)},Ti=Ii.prototype=Object.create(Si);Ti.constructor=Ii,Ti.componentName="core.Location",y.addProperty(Ti,"string","hash"),y.addProperty(Ti,"string","host"),y.addProperty(Ti,"string","href"),y.addProperty(Ti,"string","port"),y.addProperty(Ti,"string","origin"),y.addProperty(Ti,"string","hostname"),y.addProperty(Ti,"string","pathname"),y.addProperty(Ti,"string","protocol"),y.addProperty(Ti,"string","search"),y.addProperty(Ti,"Object","state"),Ti.changeHref=function(t){this.impl.changeHref(t)},Ti.pushState=function(t,e,i){this.impl.pushState(t,e,i)},Ti.$c=function(t){Si.$c.call(this,t.$b={})},Ti.$s=function(t){Si.$s.call(this,t.$b),delete t.$b,this.completed()};var Ui=P.Item,Ei=Ui.prototype,Li=P.Image=function(t,e){Ui.apply(this,arguments),this._context.backend.initImage(this),this._scheduleLoad()},zi=Li.prototype=Object.create(Ei);zi.constructor=Li,zi.componentName="core.Image",y.addProperty(zi,"int","paintedWidth"),y.addProperty(zi,"int","paintedHeight"),y.addProperty(zi,"int","sourceWidth"),y.addProperty(zi,"int","sourceHeight"),y.addProperty(zi,"string","source"),y.addProperty(zi,"bool","smooth",!0),y.addProperty(zi,"bool","preload",!1),zi.Null=0,Li.Null=0,zi.Ready=1,Li.Ready=1,zi.Loading=2,Li.Loading=2,zi.Error=3,Li.Error=3,y.addProperty(zi,"enum","status"),zi.AlignHCenter=0,Li.AlignHCenter=0,zi.AlignLeft=1,Li.AlignLeft=1,zi.AlignRight=2,Li.AlignRight=2,y.addProperty(zi,"enum","horizontalAlignment"),zi.Stretch=0,Li.Stretch=0,zi.PreserveAspectFit=1,Li.PreserveAspectFit=1,zi.PreserveAspectCrop=2,Li.PreserveAspectCrop=2,zi.Tile=3,Li.Tile=3,zi.TileVertically=4,Li.TileVertically=4,zi.TileHorizontally=5,Li.TileHorizontally=5,zi.Pad=6,Li.Pad=6,y.addProperty(zi,"enum","fillMode"),zi.AlignVCenter=0,Li.AlignVCenter=0,zi.AlignTop=1,Li.AlignTop=1,zi.AlignBottom=2,Li.AlignBottom=2,y.addProperty(zi,"enum","verticalAlignment"),zi._scheduleLoad=function(){(this.preload||this.recursiveVisible)&&this._context.delayedAction("image.load",this,this._load)},zi._load=function(){if(this.status!==this.Ready&&(this.preload||this.recursiveVisible))if(this.source){this.status=this.Loading;var t=this._context,e=this._imageLoaded.bind(this);t.backend.loadImage(this,t.wrapNativeCallback(e))}else this._resetImage()},zi._onError=function(){this.status=this.Error},zi._resetImage=function(){this.style("background-image","")},zi.getClass=function(){return"core-image"},zi._imageLoaded=function(t){if(t){var e={"background-image":'url("'+this.source+'")'},i=t.width,n=t.height;switch(this.sourceWidth=i,this.sourceHeight=n,this.fillMode!==Li.PreserveAspectFit&&(this.paintedWidth=this.width,this.paintedHeight=this.height),this.horizontalAlignment){case Li.AlignHCenter:e["background-position-x"]="center";break;case Li.AlignLeft:e["background-position-x"]="left";break;case Li.AlignRight:e["background-position-x"]="right"}switch(this.verticalAlignment){case Li.AlignVCenter:e["background-position-y"]="center";break;case Li.AlignTop:e["background-position-y"]="top";break;case Li.AlignBottom:e["background-position-y"]="bottom"}switch(this.fillMode){case Li.Stretch:e["background-repeat"]="no-repeat",e["background-size"]="100% 100%";break;case Li.TileVertically:e["background-repeat"]="repeat-y",e["background-size"]="100% "+n+"px";break;case Li.TileHorizontally:e["background-repeat"]="repeat-x",e["background-size"]=i+"px 100%";break;case Li.Tile:e["background-repeat"]="repeat-y repeat-x",e["background-size"]="auto";break;case Li.PreserveAspectCrop:e["background-repeat"]="no-repeat",e["background-size"]="cover";break;case Li.Pad:e["background-repeat"]="no-repeat",e["background-position"]="0% 0%",e["background-size"]="auto";break;case Li.PreserveAspectFit:e["background-repeat"]="no-repeat",e["background-size"]="contain";var o=this.width,r=this.height,a=0,s=i/n;o&&r&&(a=o/r),a<s&&o?(this.paintedWidth=o,this.paintedHeight=o/s):(this.paintedHeight=r,this.paintedWidth=r*s)}e["image-rendering"]=this.smooth?"auto":"pixelated",this.style(e),this.status=Li.Ready}else this.status=Li.Error};T=function(t){this._scheduleLoad()};P._protoOnChanged(zi,"width",T),P._protoOnChanged(zi,"preload",T),P._protoOnChanged(zi,"height",T),P._protoOnChanged(zi,"recursiveVisible",T),P._protoOnChanged(zi,"fillMode",T),P._protoOnChanged(zi,"source",function(t){this.status=this.Null,this._scheduleLoad()}),zi.$c=function(t){Ei.$c.call(this,t.$b={})},zi.$s=function(t){var e=this;Ei.$s.call(this,t.$b),delete t.$b,e._replaceUpdater("width",function(){e.width=e.sourceWidth},[e,"sourceWidth"]),e._replaceUpdater("height",function(){e.height=e.sourceHeight},[e,"sourceHeight"]),e.completed()};var Mi=P.Object,Ri=Mi.prototype,Hi=P.Anchors=function(t,e){Mi.apply(this,arguments),this._items=[],this._grabX=!1,this._grabY=!1},ji=Hi.prototype=Object.create(Ri);ji.constructor=Hi,ji.componentName="core.Anchors",y.addProperty(ji,"AnchorLine","bottom"),y.addProperty(ji,"AnchorLine","verticalCenter"),y.addProperty(ji,"AnchorLine","top"),y.addProperty(ji,"AnchorLine","left"),y.addProperty(ji,"AnchorLine","horizontalCenter"),y.addProperty(ji,"AnchorLine","right"),y.addProperty(ji,"Item","fill"),y.addProperty(ji,"Item","centerIn"),y.addProperty(ji,"int","margins"),y.addProperty(ji,"int","bottomMargin"),y.addProperty(ji,"int","topMargin"),y.addProperty(ji,"int","leftMargin"),y.addProperty(ji,"int","rightMargin"),ji._scheduleUpdate=function(){this._context.delayedAction("update-anchors",this,this._updateAll)},ji._updateAll=function(){var t=this,e=t.parent;if(null!==e){var i,n,o,r,a,s,c=e.parent.toScreen(),l=c[0],h=c[1],d=t.fill,p=t._getAnchor("left")||(d?d.left:null),u=t._getAnchor("right")||(d?d.right:null),f=t._getAnchor("top")||(d?d.top:null),g=t._getAnchor("bottom")||(d?d.bottom:null),_=t.centerIn,m=t._getAnchor("horizontalCenter")||(_?_.horizontalCenter:null),v=t._getAnchor("verticalCenter")||(_?_.verticalCenter:null),y=t.leftMargin||t.margins,b=t.rightMargin||t.margins,$=t.topMargin||t.margins,w=t.bottomMargin||t.margins,x=[],C=[],k=function(t){var e,i=t[0],n=t[1],o=x.indexOf(i);return o<0?(e=i.toScreen(),x.push(i),C.push(e)):e=C[o],e[n]};p&&u?(i=k(p),o=k(u),e.x=i+y-l-e.viewX,e.width=o-i-b-y):p&&m?(i=k(p),a=k(m),e.x=i+y-l-e.viewX,e.width=2*(a-i)-b-y):m&&u?(a=k(m),o=k(u),e.width=2*(o-a)-b-y,e.x=a-(e.width+y-b)/2-l-e.viewX):p?(i=k(p),e.x=i+y-l-e.viewX):u?(o=k(u),e.x=o-l-b-e.width-e.viewX):m?(a=k(m),e.x=a-(e.width+y-b)/2-l-e.viewX):this._grabX&&(e.x=y),f&&g?(n=k(f),r=k(g),e.y=n+$-h-e.viewY,e.height=r-n-w-$):f&&v?(n=k(f),s=k(v),e.y=n+$-h-e.viewY,e.height=2*(s-n)-w-$):v&&g?(s=k(v),r=k(g),e.height=2*(r-s)-w-$,e.y=s-(e.height+$-w)/2-h-e.viewY):f?(n=k(f),e.y=n+$-h-e.viewY):g?(r=k(g),e.y=r-h-w-e.height-e.viewY):v?(s=k(v),e.y=s-(e.height+$-w)/2-h-e.viewY):this._grabY&&(e.y=$)}},ji._grab=function(t,e){"x"===e&&(this._grabX=!0),"y"===e&&(this._grabY=!0),t._removeUpdater(e)},ji._getAnchor=function(t){var e=this[t];return e?Array.isArray(e)?e:e[t]:null},ji._subscribe=function(t){var e=this._items;e.indexOf(t)<0&&(e.push(t),this.connectOn(t,"newBoundingBox",this._scheduleUpdate.bind(this)))},P._protoOnChanged(ji,"fill",function(t){if(this._scheduleUpdate(),null!==t){var e=this.parent;this._grab(e,"x"),this._grab(e,"width"),this._grab(e,"y"),this._grab(e,"height"),this._subscribe(t)}}),P._protoOnChanged(ji,"centerIn",function(t){if(this._scheduleUpdate(),null!==t){var e=this.parent;this._grab(e,"x"),this._grab(e,"y"),this._subscribe(t),this._subscribe(e)}}),P._protoOnChanged(ji,"bottom",function(t){this._scheduleUpdate();var e=this._getAnchor("bottom");if(null!==e){var i=this.parent;this._grab(i,"y"),(this.top||this.verticalCenter)&&this._grab(i,"height"),this._subscribe(i),this._subscribe(e[0])}}),P._protoOnChanged(ji,"horizontalCenter",function(t){this._scheduleUpdate();var e=this._getAnchor("horizontalCenter");if(null!==e){var i=this.parent;this._grab(i,"x"),(this.left||this.right)&&this._grab(i,"width"),this._subscribe(i),this._subscribe(e[0])}}),P._protoOnChanged(ji,"left",function(t){this._scheduleUpdate();var e=this._getAnchor("left");if(null!==e){var i=this.parent;this._grab(i,"x"),(this.right||this.horizontalCenter)&&(this._grab(i,"width"),this._subscribe(i)),this._subscribe(e[0])}}),P._protoOnChanged(ji,"right",function(t){this._scheduleUpdate();var e=this._getAnchor("right");if(null!==e){var i=this.parent;this._grab(i,"x"),(this.left||this.horizontalCenter)&&this._grab(i,"width"),this._subscribe(i),this._subscribe(e[0])}}),P._protoOnChanged(ji,"top",function(t){this._scheduleUpdate();var e=this._getAnchor("top");if(null!==e){var i=this.parent;this._grab(i,"y"),(this.bottom||this.verticalCenter)&&(this._grab(i,"height"),this._subscribe(i)),this._subscribe(e[0])}}),P._protoOnChanged(ji,"verticalCenter",function(t){this._scheduleUpdate();var e=this._getAnchor("verticalCenter");if(null!==e){var i=this.parent;this._grab(i,"y"),(this.top||this.bottom)&&this._grab(i,"height"),this._subscribe(i),this._subscribe(e[0])}});T=function(t){this.parent.anchorsMarginsUpdated(),this._scheduleUpdate()};P._protoOnChanged(ji,"bottomMargin",T),P._protoOnChanged(ji,"leftMargin",T),P._protoOnChanged(ji,"topMargin",T),P._protoOnChanged(ji,"rightMargin",T),P._protoOnChanged(ji,"margin",T),ji.$c=function(t){Ri.$c.call(this,t.$b={})},ji.$s=function(t){Ri.$s.call(this,t.$b),delete t.$b,this.completed()};var Ni=P.Object,Bi=Ni.prototype,Vi=P.Gradient=function(t,e){Ni.apply(this,arguments),this.stops=[]},Wi=Vi.prototype=Object.create(Bi);Wi.constructor=Vi,Wi.componentName="core.Gradient",y.addProperty(Wi,"real","angle"),Wi.Vertical=0,Vi.Vertical=0,Wi.Horizontal=1,Vi.Horizontal=1,Wi.BottomRight=2,Vi.BottomRight=2,Wi.TopRight=3,Vi.TopRight=3,Wi.Custom=4,Vi.Custom=4,y.addProperty(Wi,"enum","orientation"),Wi._updateStyle=function(){var t=this._getDeclaration();t&&this.parent.style({"background-color":"",background:t})},Wi._getDeclaration=function(){var t=this.stops,e=t.length;if(!(e<2)){var i;switch(this.orientation){default:case this.Vertical:i="to bottom";break;case this.Horizontal:i="to left";break;case this.BottomRight:i="to bottom right";break;case this.TopRight:i="to top right";break;case this.Custom:i=this.angle+"deg"}for(var n=new P.gradient.Gradient(i),o=0;o<e;++o){var r=t[o];n.add(r._getDeclaration())}return n}},Wi.__complete=function(){Bi.__complete.call(this),this._updateStyle()},Wi.addChild=function(t){P.Object.prototype.addChild.apply(this,arguments),t instanceof P.GradientStop&&(this.stops.push(t),this.stops.sort(function(t,e){return t.position>e.position}),this._updateStyle())},Wi.$c=function(t){Bi.$c.call(this,t.$b={})},Wi.$s=function(t){Bi.$s.call(this,t.$b),delete t.$b,this.completed()};var Fi=P.Object,Di=Fi.prototype,Yi=P.ClickMixin=function(t,e){Fi.apply(this,arguments),this.element=this.parent.element,this._bindClick(this.enabled)},Xi=Yi.prototype=Object.create(Di);Xi.constructor=Yi,Xi.componentName="core.ClickMixin",y.addProperty(Xi,"bool","enabled",!0),Xi._bindClick=function(t){t&&!this._cmClickBinder&&(this._cmClickBinder=new P.EventBinder(this.element),this._cmClickBinder.on("click",P.createSignalForwarder(this.parent,"clicked").bind(this))),this._cmClickBinder&&this._cmClickBinder.enable(t)},P._protoOnChanged(Xi,"enabled",function(t){this._bindClick(t)}),Xi.$c=function(t){Di.$c.call(this,t.$b={})},Xi.$s=function(t){Di.$s.call(this,t.$b),delete t.$b,this.completed()};var qi=i.Rest,Gi=qi.prototype,Ki=l.AnotherApi=function(t,e){qi.apply(this,arguments)},Zi=Ki.prototype=Object.create(Gi);Zi.constructor=Ki,Zi.componentName="src.AnotherApi",Zi.$c=function(t){Gi.$c.call(this,t.$b={});var e=new i.Method(this);(t._this$child0=e).$c(t.$c$_this$child0={}),this.addChild(e)},Zi.$s=function(t){Gi.$s.call(this,t.$b),delete t.$b,this._removeUpdater("baseUrl"),this.baseUrl="https://ctx.playfamily.ru";var e=t._this$child0;e.$s(t.$c$_this$child0),delete t.$c$_this$child0,e._removeUpdater("path"),e.path="/screenapi/v1/noauth/collection/web/1?elementAlias=topfilms&elementType=COLLECTION&limit=16&offset=0&withInnerCollections=true",e._removeUpdater("name"),e.name="getMain",e.completed(),this.completed()};var Ji=P.EventEmitter,Qi=Ji.prototype,tn=P.RAIIEventEmitter=function(t,e){Ji.apply(this,arguments),this._onListener={}},en=tn.prototype=Object.create(Qi);en.constructor=tn,en.componentName="core.RAIIEventEmitter",en.removeAllListeners=function(t){P.EventEmitter.prototype.removeAllListeners.call(this,t),t in this._onListener?this._onListener[t][1](t):""in this._onListener&&this._onListener[""][1](t)},en.on=function(t,e){if(!(t in this._eventHandlers)&&(t in this._onListener?this._onListener[t][0](t):""in this._onListener&&this._onListener[""][0](t),this._eventHandlers[t]))throw new Error("listener callback added event handler");P.EventEmitter.prototype.on.call(this,t,e)},en.onListener=function(t,e,i){this._onListener[t]=[e,i]},en.$c=function(t){Qi.$c.call(this,t.$b={})},en.$s=function(t){Qi.$s.call(this,t.$b),delete t.$b,this.completed()};var nn,on,rn,an,sn,cn,ln,hn,dn=P.Object,pn=dn.prototype,un=r.Stylesheet=function(t,e){dn.apply(this,arguments);var i=this._context,n=i.options,o=this.style=i.createElement("style");o.dom.type="text/css",this.prefix=n.prefix;var r=n.id,a=null===document.getElementById(i,r),s=window.Modernizr.prefixedCSS("user-select")+": none; ",c=k.core.os,l="android"===c||"androidttk"===c||"hisense"===c;o.setHtml("div#"+r+" { position: absolute; visibility: hidden; left: 0px; top: 0px; }"+("webOS"===c||l?this.mangleRule("div","{ "+s+" }"):"")+(l?this.mangleRule("div","{ -webkit-tap-highlight-color: rgba(255, 255, 255, 0); -webkit-focus-ring-color: rgba(255, 255, 255, 0); outline: none; }"):"")+(a?"body { padding: 0; margin: 0; border: 0px; overflow: hidden; }":"")+this.mangleRule("video","{ position: absolute; }")+this.mangleRule("img","{ position: absolute; -webkit-touch-callout: none; "+s+" }"));var h=k.html5.html.getElement(i,"head");h.append(o),h.updateStyle(),this._addRule=k.html5.html.createAddRule(o.dom).bind(this),this._lastId=0},fn=un.prototype=Object.create(pn);return fn.constructor=un,fn.componentName="html5.Stylesheet",fn.allocateClass=function(t){var e=this.prefix;return(e||"")+t+"-"+this._lastId++},fn.mangleSelector=function(t){var e=this.prefix;return e?t+"."+e+"core-item":t},fn.mangleRule=function(t,e){return this.mangleSelector(t)+" "+e+" "},fn.addRule=function(t,e){this._addRule(t,e)},fn.$c=function(t){pn.$c.call(this,t.$b={})},fn.$s=function(t){pn.$s.call(this,t.$b),delete t.$b,this.completed()},k.core.model=function(){var t={},l=function(t,e){this.type=t,this.length=e};t.ModelUpdate=function(){this.count=0,this._reset()},t.ModelUpdate.prototype.constructor=t.ModelUpdate,t.ModelUpdate.prototype._reset=function(){this._ranges=[new l(0,this.count)],this._updateIndex=this.count},t.ModelUpdate.prototype._setUpdateIndex=function(t){t<this._updateIndex&&(this._updateIndex=t)},t.ModelUpdate.prototype._find=function(t){var e,i=this._ranges;for(e=0;e<i.length;++e){var n=i[e];if(t<n.length)return{index:e,offset:t};0<n.length&&(t-=n.length)}if(0!=t)throw new Error("invalid index "+t);return{index:e-1,offset:n.length}},t.ModelUpdate.prototype.reset=function(t){this.update(t,0,Math.min(t.count,this.count)),this.count<t.count?this.insert(t,this.count,t.count):this.remove(t,t.count,this.count)},t.ModelUpdate.prototype._merge=function(){for(var t=this._ranges,e=1;e<t.length;){var i=t[e-1],n=t[e];if(i.type===n.type)if(1===i.type&&i.length<0&&0<n.length){var o=Math.min(-i.length,n.length);i.type=2,n.length+=i.length,i.length=o,1<e&&--e}else i.length+=n.length,t.splice(e,1);else 1===i.type&&0===i.length?t.splice(e,1):++e}},t.ModelUpdate.prototype._split=function(t,e,i,n){var o=this._ranges;if(0===e)return o.splice(t,0,new l(i,n)),t+1;var r=o[t],a=r.length-e;return r.length=e,0!=a?o.splice(t+1,0,new l(i,n),new l(r.type,a)):o.splice(t+1,0,new l(i,n)),t+2},t.ModelUpdate.prototype.insert=function(t,e,i){if(!(i<=e)){this._setUpdateIndex(e);var n=this._ranges,o=i-e;if(this.count+=o,this.count!=t.count)throw new Error("unbalanced insert "+this.count+" + ["+e+"-"+i+"], model reported "+t.count);var r=this._find(e),a=n[r.index];0===a.length?(a.type=1,a.length+=o):0<=r.offset?this._split(r.index,r.offset,1,o):this._split(r.index+1,0,1,o),this._merge()}},t.ModelUpdate.prototype.remove=function(t,e,i){if(!(i<=e)){this._setUpdateIndex(e);var n=this._ranges,o=i-e;if(this.count-=o,this.count!=t.count)throw new Error("unbalanced remove "+this.count+" + ["+e+"-"+i+"], model reported "+t.count);var r=this._find(e);if(1===(s=n[r.index]).type)s.length-=o;else for(var a=this._split(r.index,r.offset,1,-o);0<o;){var s;(s=n[a]).length<=o?(n.splice(a,1),o-=s.length):(s.length-=o,o=0)}this._merge()}},t.ModelUpdate.prototype.update=function(t,e,i){if(!(i<=e)){var n=this._ranges,o=i-e,r=this._find(e),a=r.index,s=n[a];if(0<r.offset&&(n.splice(a+1,0,new l(s.type,s.length-r.offset)),s.length=r.offset,++a,0===s.length))throw new Error("invalid offset");for(;0<o;){var c=(s=n[a]).length;switch(s.type){case 0:o<c?(s.length-=o,n.splice(a,0,new l(2,o))):s.type=2,o-=c;break;case 1:0<c&&(o-=c),++a;break;case 2:o-=c,++a}}this._merge()}},t.ModelUpdate.prototype.clear=function(){this.count=0,this._reset()},t.ModelUpdate.prototype.apply=function(i,t){var n=0;if(this._ranges.forEach(function(t){var e=t.length;switch(t.type){case 1:0<e?(i._insertItems(n,n+e),n+=e):e<0&&i._removeItems(n,n-e);break;case 2:i._updateItems(n,n+e),n+=e;break;default:n+=t.length}}),!t&&i._items.length!=this.count)throw new Error("unbalanced items update, view: "+i._items.length+", update:"+this.count);for(var e=this._updateIndex;e<this.count;++e)i._updateDelegateIndex(e);this._reset()};var e=t.ArrayModelWrapper=function(t){this.data=t,this.count=t.length};return e.prototype.get=function(t){return{value:this.data[t]}},e.prototype.on=function(){},e.prototype.removeListener=function(){},t}(),k.core.gradient=function(){var t={},e=function(t,e){this.color=P.Color.normalize(t),this.position=e},i=e.prototype;i.constructor=e,i.toString=function(){return this.color+" "+Math.floor(100*this.position)+"%"};var n=function(t){this.orientation=t,this.stops=[]},o=n.prototype;return o.constructor=n,o.add=function(t){this.stops.push(t)},o.toString=function(){return"linear-gradient("+this.orientation+","+this.stops.join()+")"},t.GradientStop=e,t.Gradient=n,t}(),k.core.transform=function(){var t={},n=function(t,e){this.value=t,this.unit=e},e=n.prototype;e.constructor=n,e.toString=function(){var t=this.unit;return null!=t?this.value+t:this.value};var i=function(){this.transforms={}},o=i.prototype;return o.constructor=i,o.add=function(t,e,i){this.transforms[t]=new n(e,i)},o.toString=function(){var t=this.transforms,e="";for(var i in t){e+=i+"("+t[i]+") "}return e},t.Transform=i,t}(),k.html5.localstorage=(nn={},(on=function(t){if(t&&t.name,this._storage=window.localStorage,!this._storage)throw new Error("no local storage support")}).prototype.get=function(t,e,i){var n=this._storage.getItem(t);null!==n?e(n):i(new Error("no item with name "+t))},on.prototype.set=function(t,e){this._storage.setItem(t,e)},on.prototype.erase=function(t,e){this._storage.removeItem(t)},nn.createLocalStorage=function(t){return new on(t)},nn.LocalStorage=on,nn),k.html5.html=function(){var g={},p=window.Modernizr;g.capabilities={csstransforms3d:p.csstransforms3d,csstransforms:p.csstransforms,csstransitions:p.csstransitions,mouseEnterLeaveSupported:"netcast"!=k.core.os};var u=null;g.createAddRule=function(t){if((t.sheet||{}).insertRule){i=t.sheet;return function(e,t){try{i.insertRule(e+"{"+t+"}",i.cssRules.length)}catch(t){log("insertRule failed on rule "+e)}}}var i=t.styleSheet||t.sheet;return function(e,t){try{i.addRule(e,t)}catch(t){log("addRule failed on rule "+e)}}};var f=function(){this._cache={}},t=f.prototype;t.constructor=f,t.update=function(t,e,i){var n=this._cache,o=t._uniqueId,r=n[o];if(void 0!==r)r.data[e]=i,++r.size;else{var a={};a[e]=i,n[o]={data:a,element:t,size:1}}},t.pop=function(t){var e=t._uniqueId,i=this._cache[e];if(void 0!==i)return delete this._cache[e],i},t.apply=function(){var t=this._cache;for(var e in this._cache={},t){var i=t[e];i.element.updateStyle(i)}};var _=function(t){var e=document.createElement("style");e.type="text/css",document.head.appendChild(e),this.prefix=t+"C-",this.style=e,this.total=0,this.stats={},this.classes={},this.classes_total=0,this._addRule=g.createAddRule(e)},e=_.prototype;e.constructor=_,e.add=function(t){this.stats[t]=(this.stats[t]||0)+1,++this.total},e.register=function(t){var e=t.join(";"),i=this.classes,n=i[e];return void 0!==n||(n=i[e]=this.prefix+this.classes_total++,this._addRule("."+n,e)),n},e.classify=function(i){var n=this.total;if(n<10)return"";i.sort();var o=[],r=[],a=this.stats;return i.forEach(function(t,e){.05<a[t]/n&&(o.push(t),r.push(e))}),r.length<2?"":(r.forEach(function(t,e){i.splice(t-e,1)}),this.register(o))};var i={};0<=k.core.userAgent.toLowerCase().indexOf("webkit")&&(i.appearance="-webkit-appearance");var l=function(t){var e=i[t];return void 0===e&&(i[t]=e=window.Modernizr.prefixedCSS(t)),e};g.getPrefixedName=l;var r=["touchstart","touchmove","touchend","wheel","mousewheel","scroll"],a=!!p.passiveeventlisteners&&{passive:!0},s=["mousedown","mouseup","click","dblclick","mousemove","mouseover","mousewheel","mouseout","contextmenu","mouseenter","mouseleave"],c=["touchstart","touchmove","touchend","touchcancel"],h=function(n){var o=n.__domEventListeners;void 0===o&&(o=n.__domEventListeners={}),n.onListener("",function(t){var e=o[t]=n._context.wrapNativeCallback(function(){n.emitWithArgs(t,arguments)}),i=[t,e];(0<=r.indexOf(t)&&i.push(a),0<=s.indexOf(t))&&(1===(n.__mouseHandlerCount=1+~~n.__mouseHandlerCount)&&n.style("pointer-events","auto"));0<=c.indexOf(t)&&(1===(n.__touchHandlerCount=1+~~n.__touchHandlerCount)&&n.style("touch-action","auto"));n.dom.addEventListener.apply(n.dom,i)},function(t){0<=s.indexOf(t)&&((n.__mouseHandlerCount=~~n.__mouseHandlerCount-1)<=0&&n.style("pointer-events","none"));0<=c.indexOf(t)&&((n.__touchHandlerCount=~~n.__touchHandlerCount-1)<=0&&n.style("touch-action","none"));n.dom.removeEventListener(t,o[t])})},n={};g.loadExternalStylesheet=function(t){if(!n[t]){var e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),document.head.appendChild(e),n[t]=!0}};var d=0,m={};function v(t){return $manifest$html5$prefix+t}g.Element=function(t,e,i){if("string"==typeof e){void 0===i&&(i="");var n=e+"."+i;if(!m[n]){var o=document.createElement(e);($manifest$html5$prefix||i)&&o.classList.add(v(i)),$manifest$html5$prefix&&i&&o.classList.add(v("")),m[n]=o}this.dom=m[n].cloneNode(!1)}else this.dom=e;k.core.RAIIEventEmitter.apply(this),this._context=t,this._transitions={},this._class="",this._uniqueId=(++d).toString(36),this._firstChildIndex=0,h(this)};var o=g.Element.prototype=Object.create(k.core.RAIIEventEmitter.prototype);o.constructor=g.Element,o.addClass=function(t){this.dom.classList.add(t)},o.appendChildren=function(t){if(0<t.length){var e=document.createDocumentFragment();t.forEach(function(t){e.appendChild(t)}),this.dom.appendChild(e)}},o.removeChildren=function(t){var n=[],o=this.dom;return t.children.forEach(function(t){var e=t.element;if(void 0!==e){var i=e.dom;i.parentNode===o&&(o.removeChild(i),n.push(i))}}),n},o.setHtml=function(t,e){var i,n=this.dom;i=void 0!==e?this.removeChildren(e):[],n.innerHTML=t,this.appendChildren(i)},o.width=function(){return this.updateStyle(),this.dom.clientWidth},o.height=function(){return this.updateStyle(),this.dom.clientHeight},o.fullWidth=function(){return this.updateStyle(),this.dom.scrollWidth},o.fullHeight=function(){return this.updateStyle(),this.dom.scrollHeight};var y=["overflow","overflow-x","overflow-y"];o.style=function(t,e){var i=this._context._styleCache;if(void 0!==e)i.update(this,t,e),0<=y.indexOf(t)&&(i.update(this,"pointer-events","auto"),i.update(this,"touch-action","auto"));else{if("object"!=typeof t)throw new Error("cache is write-only");for(var n in t)0<=y.indexOf(t)&&(i.update(this,"pointer-events","auto"),i.update(this,"touch-action","auto")),i.update(this,n,t[n])}},o.setAttribute=function(t,e){return this.dom.setAttribute(t,e)},o.getAttribute=function(t){return this.dom.getAttribute(t)},o.setProperty=function(t,e){return this.dom[t]=e},o.getProperty=function(t){return this.dom[t]};var b={left:"px",top:"px",width:"px",height:"px","border-radius":"px","border-width":"px","margin-left":"px","margin-top":"px","margin-right":"px","margin-bottom":"px","padding-left":"px","padding-top":"px","padding-right":"px","padding-bottom":"px",padding:"px"};o.forceLayout=function(){return this.updateStyle(),this.dom.offsetWidth|this.dom.offsetHeight},o.updateStyle=function(t){var e=this.dom;if(e&&(void 0!==t||void 0!==(t=this._context._styleCache.pop(this)))){var i=t.data,n=e.style;for(var o in i){var r=i[o],a=l(o),s=!1!==a?a:o;if(r instanceof k.core.Color?r=r.rgba():Array.isArray(r)&&(r=r.join(",")),"number"==typeof r){var c=b[o];void 0!==c&&(r+=c)}n[s]=r}}},o.append=function(t){this.dom.appendChild(t instanceof g.Element?t.dom:t)},o.prepend=function(t){this.dom.insertBefore(t instanceof g.Element?t.dom:t,this.dom.childNodes[0])},o.discard=function(){k.core.RAIIEventEmitter.prototype.discard.apply(this),this.remove()},o.remove=function(){var t=this.dom;t.parentNode&&t.parentNode.removeChild(t)},o.focus=function(){var t=this.dom;t.focus(),t.select()},o.blur=function(){this.dom.blur()},o.getScrollX=function(){return this.dom.scrollLeft},o.getScrollY=function(){return this.dom.scrollTop},g.Document=function(t,e){k.core.RAIIEventEmitter.apply(this),this._context=t,this.dom=e,h(this)},(g.Document.prototype=Object.create(k.core.RAIIEventEmitter.prototype)).constructor=g.Document,g.Window=function(t,e){k.core.RAIIEventEmitter.apply(this),this._context=t,this.dom=e,h(this)};var $=g.Window.prototype=Object.create(k.core.RAIIEventEmitter.prototype);$.constructor=g.Window,$.width=function(){return this.dom.innerWidth},$.height=function(){return this.dom.innerHeight},$.scrollY=function(){return this.dom.scrollY},$.style=function(){},g.getElement=function(t,e){var i=document.getElementsByTagName(e);if(1!=i.length)throw new Error("no tag "+e+"/multiple tags");return new g.Element(t,i[0])},g.init=function(n){u=new k.html5.cache.Cache(w),n._styleCache=new f;var t=n.options,e=n._prefix,i=t.id,o=t.tag||"div";e&&log("Context: using prefix",e+="-");var r=new k.html5.html.Document(n,document);n.document=r;var a,s,c=new k.html5.html.Window(n,window);n.window=c;var l=g,h=document.getElementById(i);null===h?(a=c.width(),s=c.height(),log("Context: window size: "+a+"x"+s),(h=l.createElement(n,o)).dom.id=i,c.on("resize",function(){n.width=c.width(),n.height=c.height()}),l.getElement(n,"body").append(h)):(a=(h=new l.Element(n,h)).width(),s=h.height(),log("Context: found element by id, size: "+a+"x"+s),c.on("resize",function(){n.width=h.width(),n.height=h.height()}));p.canvastext?(n._textCanvas=l.createElement(n,"canvas"),n._textCanvas.style("width",0),n._textCanvas.style("height",0),h.append(n._textCanvas),n._textCanvasContext="getContext"in n._textCanvas.dom?n._textCanvas.dom.getContext("2d"):null):n._textCanvasContext=null,n.element=h,n.width=a,n.height=s,c.on("scroll",function(t){n.scrollY=c.scrollY()});var d=function(t){var e=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;log("fullscreen change event:",e),n.fullscreen=e};new Array("webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange").forEach(function(t){h.on(t,d,!0)}),c.on("keydown",n.wrapNativeCallback(function(t){var e=t.which||t.keyCode,i=P.keyCodes[e];void 0!==i?n.processKey(i,t)&&t.preventDefault():log("unhandled keycode "+e+": ["+t.charCode+" "+t.keyCode+" "+t.which+" "+t.key+" "+t.code+" "+t.location+"]")})),c.on("orientationchange",function(t){log("orientation changed event"),n.system.screenWidth=window.screen.width,n.system.screenHeight=window.screen.height}),n._styleClassifier=$manifest$cssAutoClassificator?new _(n._prefix):null},g.initSystem=function(t){var e=t._context.window;e.on("focus",function(){t.pageActive=!0}),e.on("blur",function(){t.pageActive=!1}),t.screenWidth=window.screen.width,t.screenHeight=window.screen.height},g.createElement=function(t,e,i){return new g.Element(t,e,i)},g.initRectangle=function(t){};var w=function(t,e){var i=new Image;i.onerror=function(){i.onload=null,i.onerror=null,e(null)},i.onload=function(){i.onload=null,i.onerror=null,e({width:i.naturalWidth,height:i.naturalHeight})},i.src=t};g.initImage=function(t){},g.loadImage=function(t,e){t.source.indexOf("?")<0?u.get(t.source,e):w(t.source,e)},g.initText=function(t){};var x=function(t,e){switch(t.verticalAlignment){case t.AlignTop:t._topPadding=0;break;case t.AlignBottom:t._topPadding=t.height-t.paintedHeight;break;case t.AlignVCenter:t._topPadding=(t.height-t.paintedHeight)/2}e["padding-top"]=t._topPadding,e.height=t.height-t._topPadding,t.style(e)};g.setText=function(t,e){t.element.setHtml(e,t)},g.layoutText=function(t){var e=t._context._textCanvasContext,i=t.wrapMode!==k.core.Text.NoWrap,n=t.element,o=(n.dom,t.textFormat===t.Html||0<=t.text.search(/[\<\&]/));if(!i&&null!==e&&!o){var r,a=t.font;r=a.pointSize?Math.round(96*a.pointSize/72):a.pixelSize,e.font=r+"px "+a.family;var s=e.measureText(t.text);return t.paintedWidth=s.width,t.paintedHeight=r*a.lineHeight,void x(t,{})}var c=n.removeChildren(t);i?t.style({height:"auto","padding-top":0}):t.style({width:"auto",height:"auto","padding-top":0});var l,h=n.fullWidth()+1,d=n.fullHeight()+1;h+1!==t.paintedWidth&&(t.paintedWidth=h),d+1!==t.paintedHeight&&(t.paintedHeight=d),l=i?{}:{width:t.width},x(t,l),n.appendChildren(c)},g.run=function(e,t){e.window.on("message",function(t){log("Context: received message from "+t.origin,t),e.message(t)}),e.window.on($manifest$expectRunContextEvent?"runContext":"load",function(){t()})},g.tick=function(t){t._styleCache.apply()};var C={width:"width",height:"height",x:"left",y:"top",viewX:"left",viewY:"top",opacity:"opacity",border:"border",radius:"border-radius",rotate:"transform",boxshadow:"box-shadow",transform:"transform",visible:"visibility",visibleInView:"visibility",background:"background",color:"color",backgroundImage:"background-image",font:"font"};return g.setAnimation=function(t,e,i){if(!g.capabilities.csstransitions||$manifest$cssDisableTransitions||i&&!i.cssTransition)return!1;var n=C[e];return void 0!==n&&function(t,e,i){var n=g,o=n.getPrefixedName("transition-property"),r=n.getPrefixedName("transition-delay"),a=n.getPrefixedName("transition-duration"),s=n.getPrefixedName("transition-timing-function"),c=t.element;c.forceLayout(),e=n.getPrefixedName(e)||e;var l=c._transitions,h=l[o]||[],d=l[a]||[],p=l[s]||[],u=l[r]||[],f=h.indexOf(e);return-1===f?i&&(h.push(e),d.push(i.duration+"ms"),p.push(i.easing),u.push(i.delay+"ms")):i&&i.active()?(d[f]=i.duration+"ms",p[f]=i.easing,u[f]=i.delay+"ms"):(h.splice(f,1),d.splice(f,1),p.splice(f,1),u.splice(f,1)),l[o]=h,l[a]=d,l[s]=p,l[r]=u,"orsay"!==t._context.system.os&&"netcast"!==t._context.system.os||(l["transition-property"]=h,l["transition-duration"]=d,l["transition-delay"]=u,l["transition-timing-function"]=p),t.style(l),!0}(t,n,i)},g.requestAnimationFrame=p.prefixed("requestAnimationFrame",window)||function(t){return setTimeout(t,0)},g.cancelAnimationFrame=p.prefixed("cancelAnimationFrame",window)||function(t){return clearTimeout(t)},g.enterFullscreenMode=function(t){return p.prefixed("requestFullscreen",t.dom)()},g.exitFullscreenMode=function(){return window.Modernizr.prefixed("exitFullscreen",document)()},g.inFullscreenMode=function(){return!!window.Modernizr.prefixed("fullscreenElement",document)},g.ajax=function(t,e){var i=e.url,n=e.error,o=e.headers,r=e.done,a=e.settings,s=new XMLHttpRequest;for(var c in n&&s.addEventListener("error",n),r&&s.addEventListener("load",r),s.open(e.method||"GET",i),a)s[c]=a[c];for(var c in o)s.setRequestHeader(c,o[c]);e.data?s.send(e.data):s.send()},g.fingerprint=function(t,e){var i=g;try{var n=i.createElement(t,"canvas");n.dom.width=2e3,n.dom.height=32;var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789 abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ –—‘“”„†•…‰™œŠŸž€ ΑΒΓΔΩαβγδω АБВГДабвгд ∀∂∈ℝ∧∪≡∞ ↑↗↨↻⇣ ┐┼╔╘░►☺♀ fi�⑀₂ἠḂӥẄɐː⍎אԱა",r=n.dom.getContext("2d");r.textBaseline="top",r.font="20px 'Arial'",r.textBaseline="alphabetic",r.fillStyle="#fedcba",r.fillRect(0,0,2e3,32),r.fillStyle="#12345678",r.fillText(o,1.5,23.5,2e3),r.font="19.5px 'Arial'",r.fillStyle="#789abcde",r.fillText(o,1,22,2e3),e.update(n.dom.toDataURL())}catch(t){log("canvas test failed: "+t)}try{e.update(window.navigator.userAgent)}catch(t){log(t)}try{e.update(window.navigator.plugins)}catch(t){log(t)}try{e.update(window.navigator.mimeTypes)}catch(t){log(t)}try{e.update(window.navigator.language)}catch(t){log(t)}try{e.update(window.navigator.platform)}catch(t){log(t)}try{e.update(window.navigator.product)}catch(t){log(t)}try{e.update(window.navigator.productSub)}catch(t){log(t)}try{e.update(window.navigator.vendorSub)}catch(t){log(t)}try{e.update(window.navigator.hardwareConcurrency)}catch(t){log(t)}try{e.update(window.screen.availWidth)}catch(t){log(t)}try{e.update(window.screen.availHeight)}catch(t){log(t)}try{e.update(window.screen.colorDepth)}catch(t){log(t)}},g}(),k.html5.cache=function(){var t={},n=function(){return Math.floor((new Date).getTime()/1e3)},o=function(){this.created=n(),this.waiters=[],this.invoker=null};o.prototype.expired=function(t){return n()-this.created>=t},o.prototype.set=function(t){this.created=n();for(var e=this.invoker=k.core.safeCall(null,[t],function(t){log("cache entry callback failed: ",t,t.stack)});this.waiters.length;){var i=this.waiters;this.waiters=[],i.forEach(e)}this.waiters=null},o.prototype.wait=function(t){null!==this.invoker?this.invoker(t):this.waiters.push(t)};var e=function(t,e){if(!t)throw new Error("create callback is required");this._create=t,this._ttl=e||3600,this._cache={},setInterval(this.cleanup.bind(this),this._ttl/2*1e3)};return e.prototype.get=function(t,e){var i=this._cache[t];(void 0===i||i.expired(this._ttl))&&(this._cache[t]=i=new o,this._create(t,function(t){i.set(t)})),i.wait(e)},e.prototype.cleanup=function(){for(var t in this._cache){this._cache[t].expired(this._ttl)&&delete this._cache[t]}},t.Cache=e,t}(),k.html5.location=(rn={},(an=function(t){this._ui=t;var e=window.location;this.updateActualValues();var i=this,n=t._context;n.window.on("hashchange",function(){i._ui.hash=e.hash}.bind(this)),n.window.on("popstate",function(){i.updateActualValues()}.bind(this))}).prototype.updateActualValues=function(){var t=this._ui,e=t._context.window.dom;t.hash=e.location.hash,t.href=e.location.href,t.port=e.location.port,t.host=e.location.host,t.origin=e.location.origin,t.hostname=e.location.hostname,t.pathname=e.location.pathname,t.protocol=e.location.protocol,t.search=e.location.search,t.state=e.history.state},an.prototype.changeHref=function(t){this._ui._context.window.dom.location.href=t,this.updateActualValues()},an.prototype.pushState=function(t,e,i){var n=this._ui,o=n._context.window.dom;o.location.hostname?(o.history.pushState(t,e,i),this.updateActualValues()):(n._context.document.title=e,this._ui.state=t)},rn.createLocation=function(t){return new an(t)},rn.Location=an,rn),k.video.html5.backend=(sn={},(cn=function(t){var e=t._context.createElement("video");e.dom.preload="metadata",this.element=e,this.ui=t,this.setEventListeners(),t.element.remove(),t.element=e,t.parent.element.append(t.element),this._xhr=new XMLHttpRequest,this._xhr.addEventListener("load",this.parseManifest.bind(this))}).prototype.setEventListeners=function(){var t=this.element,e=t.dom,i=this.ui;t.on("play",function(){i.waiting=!1,i.paused=e.paused}.bind(i)),t.on("pause",function(){i.paused=e.paused}.bind(i)),t.on("ended",function(){i.finished()}.bind(i)),t.on("seeked",function(){log("seeked"),i.seeking=!1,i.waiting=!1}.bind(i)),t.on("canplay",function(){log("canplay",e.readyState),i.ready=e.readyState}.bind(i)),t.on("seeking",function(){log("seeking"),i.seeking=!0,i.waiting=!0}.bind(i)),t.on("waiting",function(){log("waiting"),i.waiting=!0}.bind(i)),t.on("stalled",function(){log("Was stalled",e.networkState),i.stalled=!0}.bind(i)),t.on("emptied",function(){log("Was emptied",e.networkState)}.bind(i)),t.on("volumechange",function(){i.muted=e.muted}.bind(i)),t.on("canplaythrough",function(){log("ready to play"),i.paused=e.paused}.bind(i)),t.on("error",function(){if(log("Player error occurred",e.error,"src",i.source),e.error&&i.source)switch(i.error(e.error),log("player.error",e.error),e.error.code){case 1:log("MEDIA_ERR_ABORTED error occurred");break;case 2:log("MEDIA_ERR_NETWORK error occurred");break;case 3:log("MEDIA_ERR_DECODE error occurred");break;case 4:log("MEDIA_ERR_SRC_NOT_SUPPORTED error occurred");break;default:log("UNDEFINED error occurred")}}.bind(i)),t.on("timeupdate",function(){i.waiting=!1,i.stalled=!1,i.seeking||(i.progress=e.currentTime)}.bind(i)),t.on("durationchange",function(){var t=e.duration;log("Duration",t),i.duration=isFinite(t)?t:0}.bind(i)),t.on("progress",function(){var t=e.buffered.length-1;i.waiting=!1,0<=t&&(i.buffered=e.buffered.end(t)-e.buffered.start(t))}.bind(i)),this.setOption("autoplay",i.autoPlay)},cn.prototype.parseManifest=function(t){var e=t.target.responseText.split("\n"),i=this.ui.source,n=i.substring(0,i.lastIndexOf("/")+1),o=0;this._videoTracks=[{name:"auto",url:this.ui.source,id:o}],this._totalTracks={},this._audioTracksInfo=[];for(var r=0;r<e.length-1;++r){var a=e[r],s=e[r+1];if(0==a.indexOf("#EXT-X-STREAM-INF")){for(var c=a.split(","),l={url:0===s.indexOf("http")?s:n+s},h=0;h<c.length;++h)if(1<(f=c[h].split("=")).length)switch(f[0].trim().toLowerCase()){case"bandwidth":l.bandwidth=f[1].trim();break;case"audio":l.audio=f[1].trim().replace(/"/g,"");break;case"resolution":var d=f[1].split("x");l.width=d[0],l.height=d[1]}var p=l.width+"x"+l.height;this._totalTracks[p]||(this._totalTracks[p]=[]),this._totalTracks[p].push(l)}else if(0==a.indexOf("#EXT-X-MEDIA:TYPE=AUDIO")){c=a.split(",");var u={};for(h=0;h<c.length;++h){var f;if(1<(f=c[h].split("=")).length)switch(f[0].trim().toLowerCase()){case"group-id":u.id=f[1].trim().replace(/"/g,"");break;case"name":u.label=f[1].trim().replace(/"/g,"");break;case"language":u.language=f[1].trim().replace(/"/g,"");break;case"uri":u.url=f[1].trim()}}this._audioTracksInfo.push(u)}}for(var r in this._totalTracks){var g=this._totalTracks[r][0];g.id=++o,this._videoTracks.push(g)}},cn.prototype.getFileExtension=function(t){if(!t)return"";var e=t.toLowerCase(),i=t.indexOf("?");0<=i&&(e=e.substring(0,i));var n=e.lastIndexOf(".");return e.substring(n,e.length)},cn.prototype.setSource=function(t){this.ui.ready=!1,this._extension=this.getFileExtension(t),t&&this._xhr&&(".m3u8"===this._extension||".m3u"===this._extension)&&(this._xhr.open("GET",t),this._xhr.send());var e=t;this.ui.startPosition&&(e+="#t="+this.ui.startPosition),this.element.dom.src=e},cn.prototype.play=function(){this.element.dom.play()},cn.prototype.pause=function(){this.element.dom.pause()},cn.prototype.stop=function(){this.pause()},cn.prototype.seek=function(t){this.element.dom.currentTime+=t},cn.prototype.seekTo=function(t){this.element.dom.currentTime=t},cn.prototype.setVolume=function(t){this.element.dom.volume=t},cn.prototype.setMute=function(t){this.element.dom.muted=t},cn.prototype.setLoop=function(t){this.element.dom.loop=t},cn.prototype.setOption=function(t,e){"autoplay"===t?e?this.element.dom.setAttribute("autoplay",""):this.element.dom.removeAttribute("autoplay"):this.element.dom.setAttribute(t,e)},cn.prototype.setRect=function(t,e,i,n){},cn.prototype.setVisibility=function(t){log("VISIBILITY LOGIC MISSING HERE, visible:",t)},cn.prototype.setupDrm=function(t,e,i,n){log("Not implemented")},cn.prototype.getAudioTracks=function(){return log("Not implemented"),[]},cn.prototype.getVideoTracks=function(){return this._videoTracks||[]},cn.prototype.getAudioTracks=function(){for(var t=this.element.dom.audioTracks,e=[],i=0;i<t.length;++i){var n=t[i],o=this._audioTracksInfo[i];e.push({id:i,name:n.label?n.label:o.name,language:n.language?n.language:o.language})}return log("getAudioTracks",e),e},cn.prototype.setAudioTrack=function(t){var e=this.element.dom.audioTracks;if(t<0||t>=e.length)log("Where is no track",t);else{log("Set audio track",e[t]);for(var i=0;i<e.length;++i)e[i].enabled=i===t}},cn.prototype.setVideoTrack=function(t){if(!this._videoTracks||this._videoTracks.length<=0)log("There is no available video track",this._videoTracks);else if(t<0||t>=this._videoTracks.length)log("Track with id",t,"not found");else{this.ui.waiting=!0;var e=this.ui.progress;log("Set video",this._videoTracks[t]),this.element.dom.src=this._videoTracks[t].url,this.seekTo(e)}},cn.prototype.setVideoTrack=function(t){if(!this._videoTracks||this._videoTracks.length<=0)log("There is no available video track",this._videoTracks);else if(t<0||t>=this._videoTracks.length)log("Track with id",t,"not found");else{this.ui.waiting=!0;var e=this.ui.progress;log("Set video",this._videoTracks[t]),this.element.dom.src=this._videoTracks[t].url,this.seekTo(e)}},cn.prototype.setBackgroundColor=function(t){var e=k.core.Color;this.element.dom.style.backgroundColor=new e(t).rgba()},sn.createPlayer=function(t){return new cn(t)},sn.probeUrl=function(t){return 50},sn.Player=cn,sn),k.web.device=(hn=function(t){var e=t._context;if($manifest$system$fingerprint){var i=new r.fingerprint.fingerprint.Fingerprint;e.backend.fingerprint(e,i),t.deviceId=i.finalize(),log("deviceId",t.deviceId)}else{var n=e.system.os+"_"+e.system.browser;n=n.replace(/\s/g,""),t.deviceId=n+"_"+Math.random().toString(36).substr(2,9)}},(ln={}).createDevice=function(t){return new hn(t)},ln.Device=hn,ln),k.controls.pure.format={currency:function(t,e,i){var n="\\d(?=(\\d{"+(i||3)+"})+"+(0<e?"\\.":"$")+")";return t.toFixed(Math.max(0,~~e)).replace(new RegExp(n,"g"),"$&,")},format:function(){var t=[].slice.call(arguments),e=t.shift();return t.reduce(function(t,e){return t.replace("%s",e)},e)}},t}(),l10n={},context=qml._context=new qml.core.Context(null,!1,{id:"qml-context-app",l10n:l10n,nativeContext:null});context.init(),context.start(new qml.src.UiApp(context)),context.run();