varChannel=function(){"use strict";functiona(a,b,c,d){functionf(b){for(varc=0;c<b.length;c++)if(b[c].win===a)return!0;return!1}varg=!1;if("*"===b){for(varhine)if(e.hasOwnProperty(h)&&"*"!==h&&"object"==typeofe[h][c]&&(g=f(e[h][c])))break}elsee["*"]&&e["*"][c]&&(g=f(e["*"][c])),!g&&e[b]&&e[b][c]&&(g=f(e[b][c]));if(g)throw"A channel is already bound to the same window which overlaps with origin '"+b+"' and has scope '"+c+"'";"object"!=typeofe[b]&&(e[b]={}),"object"!=typeofe[b][c]&&(e[b][c]=[]),e[b][c].push({win:a,handler:d})}functionb(a,b,c){for(vard=e[b][c],f=0;f<d.length;f++)d[f].win===a&&d.splice(f,1);0===e[b][c].length&&deletee[b][c]}functionc(a){returnArray.isArray?Array.isArray(a):-1!=a.constructor.toString().indexOf("Array")}vard=Math.floor(1000001*Math.random()),e={},f={},g=function(a){try{varb=JSON.parse(a.data);if("object"!=typeofb||null===b)throw"malformed"}catch(a){return}varc,d,g,h=a.source,i=a.origin;if("string"==typeofb.method){varj=b.method.split("::");2==j.length?(c=j[0],g=j[1]):g=b.method}if("undefined"!=typeofb.id&&(d=b.id),"string"==typeofg){vark=!1;if(e[i]&&e[i][c])for(varl=0;l<e[i][c].length;l++)if(e[i][c][l].win===h){e[i][c][l].handler(i,g,b),k=!0;break}if(!k&&e["*"]&&e["*"][c])for(varl=0;l<e["*"][c].length;l++)if(e["*"][c][l].win===h){e["*"][c][l].handler(i,g,b);break}}else"undefined"!=typeofd&&f[d]&&f[d](i,g,b)};returnwindow.addEventListener?window.addEventListener("message",g,!1):window.attachEvent&&window.attachEvent("onmessage",g),{build:function(e){varg=function(a){if(e.debugOutput&&window.console&&window.console.log){try{"string"!=typeofa&&(a=JSON.stringify(a))}catch(b){}console.log("["+j+"] "+a)}};if(!window.postMessage)throw"jschannel cannot run this browser, no postMessage";if(!window.JSON||!window.JSON.stringify||!window.JSON.parse)throw"jschannel cannot run this browser, no JSON parsing/serialization";if("object"!=typeofe)throw"Channel build invoked without a proper object argument";if(!e.window||!e.window.postMessage)throw"Channel.build() called without a valid window argument";if(window===e.window)throw"target window is same as present window -- not allowed";varh=!1;if("string"==typeofe.origin){vari;"*"===e.origin?h=!0:null!==(i=e.origin.match(/^https?:\/\/(?:[-a-zA-Z0-9_\.])+(?::\d+)?/))&&(e.origin=i[0].toLowerCase(),h=!0)}if(!h)throw"Channel.build() called with an invalid origin";if("undefined"!=typeofe.scope){if("string"!=typeofe.scope)throw"scope, when specified, must be a string";if(e.scope.split("::").length>1)throw"scope may not contain double colons: '::'"}varj=function(){for(vara="",b="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",c=0;5>c;c++)a+=b.charAt(Math.floor(Math.random()*b.length));returna}(),k={},l={},m={},n=!1,o=[],p=function(a,b,c){vard=!1,e=!1;return{origin:b,invoke:function(b,d){if(!m[a])throw"attempting to invoke a callback of a nonexistent transaction: "+a;for(vare=!1,f=0;f<c.length;f++)if(b===c[f]){e=!0;break}if(!e)throw"request supports no such callback '"+b+"'";t({id:a,callback:b,params:d})},error:function(b,c){if(e=!0,!m[a])throw"error called for nonexistent message: "+a;deletem[a],t({id:a,error:b,message:c})},complete:function(b){if(e=!0,!m[a])throw"complete called for nonexistent message: "+a;deletem[a],t({id:a,result:b})},delayReturn:function(a){return"boolean"==typeofa&&(d=a===!0),d},completed:function(){returne}}},q=function(a,b,c){returnwindow.setTimeout(function(){if(l[a]){vard="timeout ("+b+"ms) exceeded on method '"+c+"'";l[a].error("timeout_error",d),deletel[a],deletef[a]}},b)},r=function(a,b,d){if("function"==typeofe.gotMessageObserver)try{e.gotMessageObserver(a,d)}catch(h){g("gotMessageObserver() raised an exception: "+h.toString())}if(d.id&&b){if(k[b]){vari=p(d.id,a,d.callbacks?d.callbacks:[]);m[d.id]={};try{if(d.callbacks&&c(d.callbacks)&&d.callbacks.length>0)for(varj=0;j<d.callbacks.length;j++){for(varn=d.callbacks[j],o=d.params,q=n.split("/"),r=0;r<q.length-1;r++){vars=q[r];"object"!=typeofo[s]&&(o[s]={}),o=o[s]}o[q[q.length-1]]=function(){vara=n;returnfunction(b){returni.invoke(a,b)}}()}vart=k[b](i,d.params);i.delayReturn()||i.completed()||i.complete(t)}catch(h){varu="runtime_error",v=null;if("string"==typeofh?v=h:"object"==typeofh&&(h&&c(h)&&2==h.length?(u=h[0],v=h[1]):"string"==typeofh.error&&(u=h.error,h.message?"string"==typeofh.message?v=h.message:h=h.message:v="")),null===v)try{v=JSON.stringify(h),"undefined"==typeofv&&(v=h.toString())}catch(w){v=h.toString()}i.error(u,v)}}}elsed.id&&d.callback?l[d.id]&&l[d.id].callbacks&&l[d.id].callbacks[d.callback]?l[d.id].callbacks[d.callback](d.params):g("ignoring invalid callback, id:"+d.id+" ("+d.callback+")"):d.id?l[d.id]?(d.error?l[d.id].error(d.error,d.message):void0!==d.result?l[d.id].success(d.result):l[d.id].success(),deletel[d.id],deletef[d.id]):g("ignoring invalid response: "+d.id):b&&k[b]&&k[b]({origin:a},d.params)};a(e.window,e.origin,"string"==typeofe.scope?e.scope:"",r);vars=function(a){return"string"==typeofe.scope&&e.scope.length&&(a=[e.scope,a].join("::")),a},t=function(a,b){if(!a)throw"postMessage called with null message";varc=n?"post ":"queue ";if(g(c+" message: "+JSON.stringify(a)),b||n){if("function"==typeofe.postMessageObserver)try{e.postMessageObserver(e.origin,a)}catch(d){g("postMessageObserver() raised an exception: "+d.toString())}e.window.postMessage(JSON.stringify(a),e.origin)}elseo.push(a)},u=function(a,b){if(g("ready msg received"),n)throw"received ready message while in ready state. help!";for(j+="ping"===b?"-R":"-L",v.unbind("__ready"),n=!0,g("ready msg accepted."),"ping"===b&&v.notify({method:"__ready",params:"pong"});o.length;)t(o.pop());"function"==typeofe.onReady&&e.onReady(v)},v={unbind:function(a){if(k[a]){if(!deletek[a])throw"can't delete method: "+a;return!0}return!1},bind:function(a,b){if(!a||"string"!=typeofa)throw"'method' argument to bind must be string";if(!b||"function"!=typeofb)throw"callback missing from bind params";if(k[a])throw"method '"+a+"' is already bound!";returnk[a]=b,this},call:function(a){if(!a)throw"missing arguments to call function";if(!a.method||"string"!=typeofa.method)throw"'method' argument to call must be string";if(!a.success||"function"!=typeofa.success)throw"'success' callback missing from call";varb={},c=[],e=function(a,d){if("object"==typeofd)for(varfind)if(d.hasOwnProperty(f)){varg=a+(a.length?"/":"")+f;"function"==typeofd[f]?(b[g]=d[f],c.push(g),deleted[f]):"object"==typeofd[f]&&e(g,d[f])}};e("",a.params);varg={id:d,method:s(a.method),params:a.params};c.length&&(g.callbacks=c),a.timeout&&q(d,a.timeout,s(a.method)),l[d]={callbacks:b,error:a.error,success:a.success},f[d]=r,d++,t(g)},notify:function(a){if(!a)throw"missing arguments to notify function";if(!a.method||"string"!=typeofa.method)throw"'method' argument to notify must be string";t({method:s(a.method),params:a.params})},destroy:function(){b(e.window,e.origin,"string"==typeofe.scope?e.scope:""),window.removeEventListener?window.removeEventListener("message",r,!1):window.detachEvent&&window.detachEvent("onmessage",r),n=!1,k={},m={},l={},e.origin=null,o=[],g("channel destroyed"),j=""}};returnv.bind("__ready",u),setTimeout(function(){t({method:s("__ready"),params:"ping"},!0)},0),v}}}();!function(a){"use strict";varb=a.prototype,c=b.parseFromString;try{if((newa).parseFromString("","text/html"))return}catch(d){}b.parseFromString=function(a,b){vard,e,f,g;return/^\s*text\/html\s*(?:;|$)/i.test(b)?(e=document.implementation.createHTMLDocument(""),f=e.documentElement,f.innerHTML=a,g=f.firstElementChild,1===f.childElementCount&&"html"===g.localName.toLowerCase()&&e.replaceChild(g,f),d=e):d=c.apply(this,arguments),d}}(DOMParser),"function"!=typeofdocument.contains&&(Document.prototype.contains=function(a){returna===this||a.parentNode===this?!0:this.documentElement.contains(a)}),function(a,b,c,d,e,f,g,h,i,j,k){"use strict";functionl(a){varb=newh;returnnewc.Promise(function(c,d){b.addEventListener("load",function(a){c(a.target.result)}),b.addEventListener("error",d),b.readAsDataURL(a)},function(){b.abort()})}functionm(a,b,d,e,f){functiong(){void0!==k&&"function"==typeofk.cancel&&k.cancel()}functionh(){void0!==j&&a.removeEventListener(b,j,d),g()}functioni(i,l){varm;j=function(a){f&&(a.stopPropagation(),a.preventDefault()),g();try{m=e(a)}catch(b){m=c.reject(b)}k=m,(newc.Queue).push(function(){returnm}).push(void0,function(a){ainstanceofc.CancellationError||(h(),l(a))})},a.addEventListener(b,j,d)}varj,k;returnvoid0===f&&(f=!0),newc.Promise(i,h)}functionn(a){functionb(b,c){functiond(){try{0===e.readyState?c(e):4===e.readyState&&(e.status<200||e.status>=300||!/^text\/html[;]?/.test(e.getResponseHeader("Content-Type")||"")?c(e):b(e))}catch(a){c(a)}}e=newXMLHttpRequest,e.open("GET",a),e.onreadystatechange=d,e.setRequestHeader("Accept","text/html"),e.withCredentials=!0,e.send()}functiond(){void0!==e&&e.readyState!==e.DONE&&e.abort()}vare;returnnewc.Promise(b,d)}functiono(a){varb=a.indexOf("#");returnb>0&&(a=a.substring(0,b)),a}functionp(c){vard,e,f,g,h,i;if(O)returnconsole.info("-- Error dropped, as page is unloaded"),voidconsole.info(c);for(P.push(c),P.push(newError("stopping renderJS")),e=a.getElementsByTagName("body")[0];e.firstChild;)e.removeChild(e.firstChild);for(f=a.createElement("section"),g=a.createElement("h1"),g.textContent="Unhandled Error",f.appendChild(g),g=a.createElement("p"),g.textContent="Please report this error to the support team",f.appendChild(g),g=a.createElement("p"),g.textContent="Location: ",h=a.createElement("a"),h.href=h.textContent=b.location.toString(),g.appendChild(h),f.appendChild(g),g=a.createElement("p"),g.textContent="User-agent: "+j.userAgent,f.appendChild(g),g=a.createElement("p"),g.textContent="Date: "+newDate(Date.now()).toISOString(),f.appendChild(g),e.appendChild(f),d=0;d<P.length;d+=1){if(i=P[d],iinstanceofk&&(i={string:i.toString(),message:i.message,type:i.type,target:i.target},void0!==i.target&&P.splice(d+1,0,i.target)),iinstanceofXMLHttpRequest&&(i={message:i.toString(),readyState:i.readyState,status:i.status,statusText:i.statusText,response:i.response,responseUrl:i.responseUrl,response_headers:i.getAllResponseHeaders()}),i.constructor===Array||i.constructor===String||i.constructor===Object)try{i=JSON.stringify(i)}catch(l){}f=a.createElement("section"),g=a.createElement("h2"),g.textContent=i.message||i,f.appendChild(g),void0!==i.fileName&&(g=a.createElement("p"),g.textContent="File: "+i.fileName+": "+i.lineNumber,f.appendChild(g)),void0!==i.stack&&(g=a.createElement("pre"),g.textContent="Stack: "+i.stack,f.appendChild(g)),e.appendChild(f)}console.error(c.stack),console.error(c)}functionq(a){if(this.name="resolved",void0!==a&&"string"!=typeofa)thrownewTypeError("You must pass a string.");this.message=a||"Default Message"}functionr(){returnthisinstanceofr?void0:newr}functions(a){void0!==a.__monitor&&a.__monitor.cancel(),a.__monitor=newI,a.__job_dict={},a.__job_list=[],a.__job_triggered=!1,a.__monitor.fail(function(b){returnbinstanceofc.CancellationError?void0:a.aq_reportServiceError(b)}).fail(function(a){returnp(a)})}functiont(a){a.__sub_gadget_dict={},s(a)}functionu(a){varb,d,e,f,g,h=a.element.querySelectorAll("[data-gadget-url]"),i=[];for(g=0;g<h.length;g+=1)b=h[g],d=b.getAttribute("data-gadget-scope"),e=b.getAttribute("data-gadget-url"),f=b.getAttribute("data-gadget-sandbox"),null!==e&&i.push(a.declareGadget(e,{element:b,scope:d||void0,sandbox:f||void0}));returnc.all(i)}functionv(a,b,d,e){varf=(newc.Queue).push(function(){returnd.apply(a,e)});a.__job_dict.hasOwnProperty(b)&&a.__job_dict[b].cancel(),a.__job_dict[b]=f,a.__monitor.monitor((newc.Queue).push(function(){returnf}).push(void0,function(a){if(!(ainstanceofc.CancellationError))throwa}))}functionw(a){a.__monitor.monitor((newc.Queue).push(function(){varb,c=a.constructor.__service_list,d=a.__job_list;for(b=0;b<c.length;b+=1)a.__monitor.monitor(c[b].apply(a));for(b=0;b<d.length;b+=1)v(a,d[b][0],d[b][1],d[b][2]);a.__job_list=[],a.__job_triggered=!0}))}functionx(a,b,d){vare,f,g=this;for(eing.__sub_gadget_dict)g.__sub_gadget_dict.hasOwnProperty(e)&&g.__sub_gadget_dict[e]===a&&(f=e);return(newc.Queue).push(function(){vara=g.__acquired_method_dict||{};if(a.hasOwnProperty(b))returna[b].apply(g,[d,f]);thrownewH.AcquisitionError("aq_dynamic is not defined")}).push(void0,function(a){if(ainstanceofH.AcquisitionError)returng.__aq_parent(b,d);throwa})}functiony(a,b){a.__aq_parent=function(c,d){returnx.apply(b,[a,c,d])}}functionz(){returnthisinstanceofz?voidr.call(this):newz}functionA(b,d,e){functionf(a,b){returnfunction(){returna(b)}}varg;returnvoid0===d.element&&(d.element=a.createElement("div")),(newc.Queue).push(function(){returnH.declareGadgetKlass(b)}).push(function(a){varb,f=a.__template_element.body.childNodes;for(F=a,g=newa,g.element=d.element,g.state={},b=0;b<f.length;b+=1)g.element.appendChild(f[b].cloneNode(!0));returny(g,e),c.all([g.getRequiredJSList(),g.getRequiredCSSList()])}).push(function(a){varb,d=newc.Queue;for(b=0;b<a[0].length;b+=1)d.push(f(H.declareJS,a[0][b]));for(b=0;b<a[1].length;b+=1)d.push(f(H.declareCSS,a[1][b]));returnd}).push(function(){returng})}functionB(){returnthisinstanceofB?voidr.call(this):newB}functionC(b,d,f){varg,h,i=c.defer();if(void0===d.element)thrownewError("DOM element is required to create Iframe Gadget "+b);if(!a.contains(d.element))thrownewError("The parent element is not attached to the DOM for "+b);returng=newB,y(g,f),h=a.createElement("iframe"),h.setAttribute("src",b),g.__path=b,g.element=d.element,g.state={},d.element.appendChild(h),g.__chan=e.build({window:h.contentWindow,origin:"*",scope:"renderJS"}),g.__chan.bind("declareMethod",function(a,b){returng[b]=function(){vara=arguments,d=newc.Promise(function(c,d){g.__chan.call({method:"methodCall",params:[b,Array.prototype.slice.call(a,0)],success:function(a){c(a)},error:function(a){d(a)}})});return(newc.Queue).push(function(){returnd})},"OK"}),g.__chan.bind("ready",function(a){returni.resolve(g),"OK"}),g.__chan.bind("failed",function(a,b){returni.reject(b),"OK"}),g.__chan.bind("acquire",function(a,b){g.__aq_parent.apply(g,b).then(function(b){a.complete(b)}).fail(function(b){a.error(b.toString())}),a.delayReturn(!0)}),c.any([i.promise,(newc.Queue).push(function(){returnc.timeout(5e3)}).push(void0,function(){thrownewError("Timeout while loading: "+b)})])}functionD(a,b,e){return(newc.Queue).push(function(){returnn(a)}).push(function(b){varc,e=(newd).parseFromString(b.responseText,"text/html"),f=e.createElement("base");returnf.href=a,e.head.insertBefore(f,e.head.firstChild),c=newi([e.documentElement.outerHTML],{type:"text/html;charset=UTF-8"}),l(c)}).push(function(a){returnC(a,b,e)})}functionE(){vard,h,i,j,k,l,m,n,q=o(b.location.href),t=newc.Queue,u=0,v=!1,x=[],A=!1,B=!1;if(J.hasOwnProperty(q))thrownewError("bootstrap should not be called twice");G=newc.Promise(function(o,t){functionC(){varb,e,i=H.parseGadgetHTMLDocument(a,q);for(eini)i.hasOwnProperty(e)&&(d.prototype["__"+e]=i[e]);for(d.__template_element=a.createElement("div"),h.element=a.body,h.state={},b=0;b<h.element.childNodes.length;b+=1)d.__template_element.appendChild(h.element.childNodes[b].cloneNode(!0));c.all([h.getRequiredJSList(),h.getRequiredCSSList()]).then(function(a){varb,c=a[0],d=a[1];for(b=0;b<c.length;b+=1)K[c[b]]=null;for(b=0;b<d.length;b+=1)L[d[b]]=null;F=void0}).then(function(){varb=a.querySelector("body"),c=newf(function(b){varc,d,e,f,h,i;b.forEach(function(b){if("childList"===b.type){for(e=b.removedNodes.length,c=0;e>c;c+=1)if(h=b.removedNodes[c],h.nodeType===g.ELEMENT_NODE)for(h.hasAttribute("data-gadget-url")&&void0!==h._gadget&&s(h._gadget),i=h.querySelectorAll("[data-gadget-url]"),f=i.length,d=0;f>d;d+=1)h=i[d],void0!==h._gadget&&s(h._gadget);for(e=b.addedNodes.length,c=0;e>c;c+=1)if(h=b.addedNodes[c],h.nodeType===g.ELEMENT_NODE)for(h.hasAttribute("data-gadget-url")&&void0!==h._gadget&&a.contains(h)&&w(h._gadget),i=h.querySelectorAll("[data-gadget-url]"),f=i.length,d=0;f>d;d+=1)h=i[d],a.contains(h)&&void0!==h._gadget&&w(h._gadget)}})}),d={childList:!0,subtree:!0,attributes:!1,characterData:!1};returnc.observe(b,d),h}).then(o,function(a){throwt(a),console.error(a),a})}m=newr,m.__acquired_method_dict={reportServiceError:function(a){p(a[0])}},m.__aq_parent=function(a){thrownewH.AcquisitionError("No gadget provides "+a)},b.self===b.top?(d=function(){r.call(this)},d.declareMethod=r.declareMethod,d.declareJob=r.declareJob,d.declareAcquiredMethod=r.declareAcquiredMethod,d.allowPublicAcquisition=r.allowPublicAcquisition,d.__ready_list=r.__ready_list.slice(),d.ready=r.ready,d.setState=r.setState,d.onStateChange=r.onStateChange,d.__service_list=r.__service_list.slice(),d.declareService=r.declareService,d.onEvent=r.onEvent,d.prototype=newr,d.prototype.constructor=d,d.prototype.__path=q,J[q]=d,h=newJ[q],y(h,m)):(d=z,d.__ready_list=r.__ready_list.slice(),d.__service_list=r.__service_list.slice(),d.prototype.__path=q,h=newz,y(h,m),i=e.build({window:b.parent,origin:"*",scope:"renderJS",onReady:function(){vara;for(l=!1,h.__aq_parent=d.prototype.__aq_parent=function(a,b,d){returnnewc.Promise(function(c,e){i.call({method:"acquire",params:[a,b],success:function(a){c(a)},error:function(a){e(a)},timeout:d})})},k=function(a){u+=1,i.call({method:"declareMethod",params:a,success:function(){u-=1,j()},error:function(){u-=1}})},a=0;a<x.length;a+=1)k(x[a]);returnx=[],A?voidi.notify({method:"failed",params:n}):(B=!0,j(),voidi.bind("methodCall",function(a,b){h[b[0]].apply(h,b[1]).then(function(b){a.complete(b)}).fail(function(b){a.error(b.toString())}),a.delayReturn(!0)}))}}),j=function(){0===u&&v===!0&&i.notify({method:"ready"})},k=function(a){x.push(a)},k("getInterfaceList"),k("getRequiredCSSList"),k("getRequiredJSList"),k("getPath"),k("getTitle"),d.declareMethod=function(a,b){varc=r.declareMethod.apply(this,[a,b]);returnk(a),c},d.declareService=r.declareService,d.declareJob=r.declareJob,d.onEvent=r.onEvent,d.declareAcquiredMethod=r.declareAcquiredMethod,d.allowPublicAcquisition=r.allowPublicAcquisition,l=!0),d.prototype.__acquired_method_dict={},F=d,a.addEventListener("DOMContentLoaded",C,!1)}),t.push(function(){returnG}).push(function(a){functionb(){returna}functionc(a){returnfunction(b){returna.call(b,b)}}vare;for(d.ready(function(a){returnw(a)}),t.push(b),e=0;e<d.__ready_list.length;e+=1)t.push(c(d.__ready_list[e])).push(b)}),b.self===b.top?t.fail(function(a){throwp(a),a}):t.then(function(){v=!0,B&&j()}).fail(function(a){throwl?(A=!0,n=a.toString(),p(a)):i.notify({method:"failed",params:a.toString()}),a})}varF,G,H,I,J={},K={},L={},M=0,N=newRegExp("^(?:[a-z]+:)?//|data:","i"),O=!1,P=[];b.addEventListener("error",function(a){P.push(a)}),b.addEventListener("beforeunload",function(){O=!0}),q.prototype=newError,q.prototype.constructor=q,I=function(){functiona(){vara,b=h.length;for(a=0;b>a;a+=1)h[a].cancel();h=[]}varb,d,e,f,g=this,h=[];returnthisinstanceofI?(b=newc.Promise(function(b,c,h){d=function(b){returnf?void0:(g.isRejected=!0,g.rejectedReason=b,f=!0,a(),c(b))},e=h},a),g.cancel=function(){f||(f=!0,b.cancel(),b.fail(function(a){g.isRejected=!0,g.rejectedReason=a}))},g.then=function(){returnb.then.apply(b,arguments)},g.fail=function(){returnb.fail.apply(b,arguments)},void(g.monitor=function(a){if(f)thrownewq;varb=(newc.Queue).push(function(){returna}).push(function(a){varb,c,d=h.length,e=[];for(c=0;d>c;c+=1)b=h[c],b.isFulfilled||b.isRejected||e.push(b);h=e},function(b){throwbinstanceofc.CancellationError&&(a.isFulfilled&&a.isRejected||a.cancel()),d(b),b},function(a){returne(a),a});returnh.push(b),this})):newI},I.prototype=Object.create(c.Promise.prototype),I.prototype.constructor=I,r.prototype.__title="",r.prototype.__interface_list=[],r.prototype.__path="",r.prototype.__html="",r.prototype.__required_css_list=[],r.prototype.__required_js_list=[],r.__ready_list=[t,u],r.ready=function(a){returnthis.__ready_list.push(a),this},r.setState=function(a){varb=JSON.stringify(a);returnthis.ready(function(){this.state=JSON.parse(b)})},r.onStateChange=function(a){returnthis.prototype.__state_change_callback=a,this},r.__service_list=[],r.declareService=function(a){returnthis.__service_list.push(a),this},r.onEvent=function(a,b,c,d){returnthis.__service_list.push(function(){returnm(this.element,a,c,b.bind(this),d)}),this},r.declareJob=function(a,b){returnthis.prototype[a]=function(){varc=this,d=arguments;c.__job_triggered?v(c,a,b,d):c.__job_list.push([a,b,d])},this},r.declareMethod=function(a,b){returnthis.prototype[a]=function(){vara=this,d=arguments;return(newc.Queue).push(function(){returnb.apply(a,d)})},this},r.declareMethod("getInterfaceList",function(){returnthis.__interface_list}).declareMethod("getRequiredCSSList",function(){returnthis.__required_css_list}).declareMethod("getRequiredJSList",function(){returnthis.__required_js_list}).declareMethod("getPath",function(){returnthis.__path}).declareMethod("getTitle",function(){returnthis.__title}).declareMethod("getElement",function(){if(void0===this.element)thrownewError("No element defined");returnthis.element}).declareMethod("changeState",function(a){varb,d,e=!1,f=this.hasOwnProperty("__modification_dict"),g=this;f?(d=this.__modification_dict,e=!0):(d={},this.__modification_dict=d);for(bina)a.hasOwnProperty(b)&&a[b]!==this.state[b]&&(this.state[b]=a[b],d[b]=a[b],e=!0);returne&&void0!==this.__state_change_callback?(newc.Queue).push(function(){returng.__state_change_callback(d)}).push(function(a){returndeleteg.__modification_dict,a}):void0}),r.declareAcquiredMethod=function(a,b){returnthis.prototype[a]=function(){vara=Array.prototype.slice.call(arguments,0),d=this;return(newc.Queue).push(function(){returnd.__aq_parent(b,a)})},this},r.declareAcquiredMethod("aq_reportServiceError","reportServiceError"),r.allowPublicAcquisition=function(a,b){returnthis.prototype.__acquired_method_dict[a]=b,this},z.__ready_list=r.__ready_list.slice(),z.__service_list=r.__service_list.slice(),z.ready=r.ready,z.setState=r.setState,z.onStateChange=r.onStateChange,z.declareService=r.declareService,z.onEvent=r.onEvent,z.prototype=newr,z.prototype.constructor=z,B.__ready_list=r.__ready_list.slice(),B.ready=r.ready,B.setState=r.setState,B.onStateChange=r.onStateChange,B.__service_list=r.__service_list.slice(),B.declareService=r.declareService,B.onEvent=r.onEvent,B.prototype=newr,B.prototype.constructor=B,r.declareMethod("declareGadget",function(b,d){vare,f,g=this,h=G;returnvoid0===d&&(d={}),void0===d.sandbox&&(d.sandbox="public"),b=H.getAbsoluteURL(b,this.__path),G=(newc.Queue).push(function(){returnh}).push(void0,function(){}).push(function(){vara;if("public"===d.sandbox)a=A;elseif("iframe"===d.sandbox)a=C;else{if("dataurl"!==d.sandbox)thrownewError("Unsupported sandbox options '"+d.sandbox+"'");a=D}returna(b,d,g)}).push(function(a){returnF=void0,a}).push(void0,function(a){throwF=void0,a}),f=G.then(function(a){returna}),e=(newc.Queue).push(function(){returnf}).push(function(c){functionf(){returnc}functionh(a){returnfunction(b){returna.call(b,b)}}vari,j;for(i=0;i<c.constructor.__ready_list.length;i+=1)e.push(h(c.constructor.__ready_list[i])),e.push(f);if(j=d.scope,void0===j)for(j="RJS_"+M,M+=1;g.__sub_gadget_dict.hasOwnProperty(j);)j="RJS_"+M,M+=1;returng.__sub_gadget_dict[j]=c,c.element.setAttribute("data-gadget-scope",j),c.element.setAttribute("data-gadget-url",b),c.element.setAttribute("data-gadget-sandbox",d.sandbox),c.element._gadget=c,a.contains(c.element)&&e.push(w),e.push(f),c})}).declareMethod("getDeclaredGadget",function(a){if(!this.__sub_gadget_dict.hasOwnProperty(a))thrownewError("Gadget scope '"+a+"' is not known.");returnthis.__sub_gadget_dict[a]}).declareMethod("dropGadget",function(a){if(!this.__sub_gadget_dict.hasOwnProperty(a))thrownewError("Gadget scope '"+a+"' is not known.");deletethis.__sub_gadget_dict[a]}),H=function(a){varc;if(a===b&&(c=F),void0===c)thrownewError("Unknown selector '"+a+"'");returnc},H.AcquisitionError=function(a){if(this.name="AcquisitionError",void0!==a&&"string"!=typeofa)thrownewTypeError("You must pass a string.");this.message=a||"Acquisition failed"},H.AcquisitionError.prototype=newError,H.AcquisitionError.prototype.constructor=H.AcquisitionError,H.getAbsoluteURL=function(a,b){varc,e,f,g="<!doctype><html><head></head></html>";returna&&b&&!N.test(a)?(c=(newd).parseFromString(g,"text/html"),e=c.createElement("base"),f=c.createElement("link"),c.head.appendChild(e),c.head.appendChild(f),e.href=b,f.href=a,f.href):a},H.declareJS=function(b){vard;returnd=K.hasOwnProperty(b)?c.resolve():newc.Promise(function(c,d){vare;e=a.createElement("script"),e.type="text/javascript",e.src=b,e.onload=function(){K[b]=null,c()},e.onerror=function(a){d(a)},a.head.appendChild(e)})},H.declareCSS=function(b){vard;returnd=L.hasOwnProperty(b)?c.resolve():newc.Promise(function(c,d){vare;e=a.createElement("link"),e.rel="stylesheet",e.type="text/css",e.href=b,e.onload=function(){L[b]=null,c()},e.onerror=function(a){d(a)},a.head.appendChild(e)})},H.declareGadgetKlass=function(a){functionb(b){varc,e,f;if(!J.hasOwnProperty(a)){c=function(){r.call(this)},c.__ready_list=r.__ready_list.slice(),c.__service_list=r.__service_list.slice(),c.declareMethod=r.declareMethod,c.declareJob=r.declareJob,c.declareAcquiredMethod=r.declareAcquiredMethod,c.allowPublicAcquisition=r.allowPublicAcquisition,c.ready=r.ready,c.setState=r.setState,c.onStateChange=r.onStateChange,c.declareService=r.declareService,c.onEvent=r.onEvent,c.prototype=newr,c.prototype.constructor=c,c.prototype.__path=a,c.prototype.__acquired_method_dict={},c.__template_element=(newd).parseFromString(b.responseText,"text/html"),f=H.parseGadgetHTMLDocument(c.__template_element,a);for(einf)f.hasOwnProperty(e)&&(c.prototype["__"+e]=f[e]);J[a]=c}returnJ[a]}vare;returne=J.hasOwnProperty(a)?c.resolve(J[a]):(newc.Queue).push(function(){returnn(a)}).push(function(a){returnb(a)})},H.clearGadgetKlassList=function(){J={},K={},L={}},H.parseGadgetHTMLDocument=function(a,b){varc,d,e={title:"",interface_list:[],required_css_list:[],required_js_list:[]};if(!b||!N.test(b))thrownewError("The url should be absolute: "+b);if(9!==a.nodeType)thrownewError("The first parameter should be an HTMLDocument");if(e.title=a.title,null!==a.head)for(c=0;c<a.head.children.length;c+=1)d=a.head.children[c],null!==d.href&&("stylesheet"===d.rel?e.required_css_list.push(H.getAbsoluteURL(d.getAttribute("href"),b)):"SCRIPT"!==d.nodeName||"text/javascript"!==d.type&&d.type?"http://www.renderjs.org/rel/interface"===d.rel&&e.interface_list.push(H.getAbsoluteURL(d.getAttribute("href"),b)):e.required_js_list.push(H.getAbsoluteURL(d.getAttribute("src"),b)));returne},b.rJS=b.renderJS=H,b.__RenderJSGadget=r,b.__RenderJSEmbeddedGadget=z,b.__RenderJSIframeGadget=B,E()}(document,window,RSVP,DOMParser,Channel,MutationObserver,Node,FileReader,Blob,navigator,Event);
varChannel=function(){"use strict";functiona(a,b,c,d){functionf(b){for(varc=0;c<b.length;c++)if(b[c].win===a)return!0;return!1}varg=!1;if("*"===b){for(varhine)if(e.hasOwnProperty(h)&&"*"!==h&&"object"==typeofe[h][c]&&(g=f(e[h][c])))break}elsee["*"]&&e["*"][c]&&(g=f(e["*"][c])),!g&&e[b]&&e[b][c]&&(g=f(e[b][c]));if(g)throw"A channel is already bound to the same window which overlaps with origin '"+b+"' and has scope '"+c+"'";"object"!=typeofe[b]&&(e[b]={}),"object"!=typeofe[b][c]&&(e[b][c]=[]),e[b][c].push({win:a,handler:d})}functionb(a,b,c){for(vard=e[b][c],f=0;f<d.length;f++)d[f].win===a&&d.splice(f,1);0===e[b][c].length&&deletee[b][c]}functionc(a){returnArray.isArray?Array.isArray(a):-1!=a.constructor.toString().indexOf("Array")}vard=Math.floor(1000001*Math.random()),e={},f={},g=function(a){try{varb=JSON.parse(a.data);if("object"!=typeofb||null===b)throw"malformed"}catch(a){return}varc,d,g,h=a.source,i=a.origin;if("string"==typeofb.method){varj=b.method.split("::");2==j.length?(c=j[0],g=j[1]):g=b.method}if("undefined"!=typeofb.id&&(d=b.id),"string"==typeofg){vark=!1;if(e[i]&&e[i][c])for(varl=0;l<e[i][c].length;l++)if(e[i][c][l].win===h){e[i][c][l].handler(i,g,b),k=!0;break}if(!k&&e["*"]&&e["*"][c])for(varl=0;l<e["*"][c].length;l++)if(e["*"][c][l].win===h){e["*"][c][l].handler(i,g,b);break}}else"undefined"!=typeofd&&f[d]&&f[d](i,g,b)};returnwindow.addEventListener?window.addEventListener("message",g,!1):window.attachEvent&&window.attachEvent("onmessage",g),{build:function(e){varg=function(a){if(e.debugOutput&&window.console&&window.console.log){try{"string"!=typeofa&&(a=JSON.stringify(a))}catch(b){}console.log("["+j+"] "+a)}};if(!window.postMessage)throw"jschannel cannot run this browser, no postMessage";if(!window.JSON||!window.JSON.stringify||!window.JSON.parse)throw"jschannel cannot run this browser, no JSON parsing/serialization";if("object"!=typeofe)throw"Channel build invoked without a proper object argument";if(!e.window||!e.window.postMessage)throw"Channel.build() called without a valid window argument";if(window===e.window)throw"target window is same as present window -- not allowed";varh=!1;if("string"==typeofe.origin){vari;"*"===e.origin?h=!0:null!==(i=e.origin.match(/^https?:\/\/(?:[-a-zA-Z0-9_\.])+(?::\d+)?/))&&(e.origin=i[0].toLowerCase(),h=!0)}if(!h)throw"Channel.build() called with an invalid origin";if("undefined"!=typeofe.scope){if("string"!=typeofe.scope)throw"scope, when specified, must be a string";if(e.scope.split("::").length>1)throw"scope may not contain double colons: '::'"}varj=function(){for(vara="",b="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",c=0;5>c;c++)a+=b.charAt(Math.floor(Math.random()*b.length));returna}(),k={},l={},m={},n=!1,o=[],p=function(a,b,c){vard=!1,e=!1;return{origin:b,invoke:function(b,d){if(!m[a])throw"attempting to invoke a callback of a nonexistent transaction: "+a;for(vare=!1,f=0;f<c.length;f++)if(b===c[f]){e=!0;break}if(!e)throw"request supports no such callback '"+b+"'";t({id:a,callback:b,params:d})},error:function(b,c){if(e=!0,!m[a])throw"error called for nonexistent message: "+a;deletem[a],t({id:a,error:b,message:c})},complete:function(b){if(e=!0,!m[a])throw"complete called for nonexistent message: "+a;deletem[a],t({id:a,result:b})},delayReturn:function(a){return"boolean"==typeofa&&(d=a===!0),d},completed:function(){returne}}},q=function(a,b,c){returnwindow.setTimeout(function(){if(l[a]){vard="timeout ("+b+"ms) exceeded on method '"+c+"'";l[a].error("timeout_error",d),deletel[a],deletef[a]}},b)},r=function(a,b,d){if("function"==typeofe.gotMessageObserver)try{e.gotMessageObserver(a,d)}catch(h){g("gotMessageObserver() raised an exception: "+h.toString())}if(d.id&&b){if(k[b]){vari=p(d.id,a,d.callbacks?d.callbacks:[]);m[d.id]={};try{if(d.callbacks&&c(d.callbacks)&&d.callbacks.length>0)for(varj=0;j<d.callbacks.length;j++){for(varn=d.callbacks[j],o=d.params,q=n.split("/"),r=0;r<q.length-1;r++){vars=q[r];"object"!=typeofo[s]&&(o[s]={}),o=o[s]}o[q[q.length-1]]=function(){vara=n;returnfunction(b){returni.invoke(a,b)}}()}vart=k[b](i,d.params);i.delayReturn()||i.completed()||i.complete(t)}catch(h){varu="runtime_error",v=null;if("string"==typeofh?v=h:"object"==typeofh&&(h&&c(h)&&2==h.length?(u=h[0],v=h[1]):"string"==typeofh.error&&(u=h.error,h.message?"string"==typeofh.message?v=h.message:h=h.message:v="")),null===v)try{v=JSON.stringify(h),"undefined"==typeofv&&(v=h.toString())}catch(w){v=h.toString()}i.error(u,v)}}}elsed.id&&d.callback?l[d.id]&&l[d.id].callbacks&&l[d.id].callbacks[d.callback]?l[d.id].callbacks[d.callback](d.params):g("ignoring invalid callback, id:"+d.id+" ("+d.callback+")"):d.id?l[d.id]?(d.error?l[d.id].error(d.error,d.message):void0!==d.result?l[d.id].success(d.result):l[d.id].success(),deletel[d.id],deletef[d.id]):g("ignoring invalid response: "+d.id):b&&k[b]&&k[b]({origin:a},d.params)};a(e.window,e.origin,"string"==typeofe.scope?e.scope:"",r);vars=function(a){return"string"==typeofe.scope&&e.scope.length&&(a=[e.scope,a].join("::")),a},t=function(a,b){if(!a)throw"postMessage called with null message";varc=n?"post ":"queue ";if(g(c+" message: "+JSON.stringify(a)),b||n){if("function"==typeofe.postMessageObserver)try{e.postMessageObserver(e.origin,a)}catch(d){g("postMessageObserver() raised an exception: "+d.toString())}e.window.postMessage(JSON.stringify(a),e.origin)}elseo.push(a)},u=function(a,b){if(g("ready msg received"),n)throw"received ready message while in ready state. help!";for(j+="ping"===b?"-R":"-L",v.unbind("__ready"),n=!0,g("ready msg accepted."),"ping"===b&&v.notify({method:"__ready",params:"pong"});o.length;)t(o.pop());"function"==typeofe.onReady&&e.onReady(v)},v={unbind:function(a){if(k[a]){if(!deletek[a])throw"can't delete method: "+a;return!0}return!1},bind:function(a,b){if(!a||"string"!=typeofa)throw"'method' argument to bind must be string";if(!b||"function"!=typeofb)throw"callback missing from bind params";if(k[a])throw"method '"+a+"' is already bound!";returnk[a]=b,this},call:function(a){if(!a)throw"missing arguments to call function";if(!a.method||"string"!=typeofa.method)throw"'method' argument to call must be string";if(!a.success||"function"!=typeofa.success)throw"'success' callback missing from call";varb={},c=[],e=function(a,d){if("object"==typeofd)for(varfind)if(d.hasOwnProperty(f)){varg=a+(a.length?"/":"")+f;"function"==typeofd[f]?(b[g]=d[f],c.push(g),deleted[f]):"object"==typeofd[f]&&e(g,d[f])}};e("",a.params);varg={id:d,method:s(a.method),params:a.params};c.length&&(g.callbacks=c),a.timeout&&q(d,a.timeout,s(a.method)),l[d]={callbacks:b,error:a.error,success:a.success},f[d]=r,d++,t(g)},notify:function(a){if(!a)throw"missing arguments to notify function";if(!a.method||"string"!=typeofa.method)throw"'method' argument to notify must be string";t({method:s(a.method),params:a.params})},destroy:function(){b(e.window,e.origin,"string"==typeofe.scope?e.scope:""),window.removeEventListener?window.removeEventListener("message",r,!1):window.detachEvent&&window.detachEvent("onmessage",r),n=!1,k={},m={},l={},e.origin=null,o=[],g("channel destroyed"),j=""}};returnv.bind("__ready",u),setTimeout(function(){t({method:s("__ready"),params:"ping"},!0)},0),v}}}();!function(a){"use strict";varb=a.prototype,c=b.parseFromString;try{if((newa).parseFromString("","text/html"))return}catch(d){}b.parseFromString=function(a,b){vard,e,f,g;return/^\s*text\/html\s*(?:;|$)/i.test(b)?(e=document.implementation.createHTMLDocument(""),f=e.documentElement,f.innerHTML=a,g=f.firstElementChild,1===f.childElementCount&&"html"===g.localName.toLowerCase()&&e.replaceChild(g,f),d=e):d=c.apply(this,arguments),d}}(DOMParser),"function"!=typeofdocument.contains&&(Document.prototype.contains=function(a){returna===this||a.parentNode===this?!0:this.documentElement.contains(a)}),function(a,b,c,d,e,f,g,h,i,j,k){"use strict";functionl(a){varb=newh;returnnewc.Promise(function(c,d){b.addEventListener("load",function(a){c(a.target.result)}),b.addEventListener("error",d),b.readAsDataURL(a)},function(){b.abort()})}functionm(a,b,d,e,f){functiong(){void0!==k&&"function"==typeofk.cancel&&k.cancel()}functionh(){void0!==j&&a.removeEventListener(b,j,d),g()}functioni(i,l){varm;j=function(a){f&&(a.stopPropagation(),a.preventDefault()),g();try{m=e(a)}catch(b){m=c.reject(b)}k=m,(newc.Queue).push(function(){returnm}).push(void0,function(a){ainstanceofc.CancellationError||(h(),l(a))})},a.addEventListener(b,j,d)}varj,k;returnvoid0===f&&(f=!0),newc.Promise(i,h)}functionn(a){functionb(b,c){functiond(){try{0===e.readyState?c(e):4===e.readyState&&(e.status<200||e.status>=300||!/^text\/html[;]?/.test(e.getResponseHeader("Content-Type")||"")?c(e):b(e))}catch(a){c(a)}}e=newXMLHttpRequest,e.open("GET",a),e.onreadystatechange=d,e.setRequestHeader("Accept","text/html"),e.withCredentials=!0,e.send()}functiond(){void0!==e&&e.readyState!==e.DONE&&e.abort()}vare;returnnewc.Promise(b,d)}functiono(a){varb=a.indexOf("#");returnb>0&&(a=a.substring(0,b)),a}functionp(c){vard,e,f,g,h,i;if(O)returnconsole.info("-- Error dropped, as page is unloaded"),voidconsole.info(c);for(P.push(c),P.push(newError("stopping renderJS")),e=a.getElementsByTagName("body")[0];e.firstChild;)e.removeChild(e.firstChild);for(f=a.createElement("section"),g=a.createElement("h1"),g.textContent="Unhandled Error",f.appendChild(g),g=a.createElement("p"),g.textContent="Please report this error to the support team",f.appendChild(g),g=a.createElement("p"),g.textContent="Location: ",h=a.createElement("a"),h.href=h.textContent=b.location.toString(),g.appendChild(h),f.appendChild(g),g=a.createElement("p"),g.textContent="User-agent: "+j.userAgent,f.appendChild(g),g=a.createElement("p"),g.textContent="Date: "+newDate(Date.now()).toISOString(),f.appendChild(g),e.appendChild(f),d=0;d<P.length;d+=1){if(i=P[d],iinstanceofk&&(i={string:i.toString(),message:i.message,type:i.type,target:i.target},void0!==i.target&&P.splice(d+1,0,i.target)),iinstanceofXMLHttpRequest&&(i={message:i.toString(),readyState:i.readyState,status:i.status,statusText:i.statusText,response:i.response,responseUrl:i.responseUrl,response_headers:i.getAllResponseHeaders()}),i.constructor===Array||i.constructor===String||i.constructor===Object)try{i=JSON.stringify(i)}catch(l){}f=a.createElement("section"),g=a.createElement("h2"),g.textContent=i.message||i,f.appendChild(g),void0!==i.fileName&&(g=a.createElement("p"),g.textContent="File: "+i.fileName+": "+i.lineNumber,f.appendChild(g)),void0!==i.stack&&(g=a.createElement("pre"),g.textContent="Stack: "+i.stack,f.appendChild(g)),e.appendChild(f)}console.error(c.stack),console.error(c)}functionq(a){if(this.name="resolved",void0!==a&&"string"!=typeofa)thrownewTypeError("You must pass a string.");this.message=a||"Default Message"}functionr(){returnthisinstanceofr?void0:newr}functions(a){void0!==a.__monitor&&a.__monitor.cancel(),a.__monitor=newI,a.__job_dict={},a.__job_list=[],a.__job_triggered=!1,a.__monitor.fail(function(b){returnbinstanceofc.CancellationError?void0:a.aq_reportServiceError(b)}).fail(function(a){returnp(a)})}functiont(a){a.__sub_gadget_dict={},s(a)}functionu(a){varb,d,e,f,g,h=a.element.querySelectorAll("[data-gadget-url]"),i=[];for(g=0;g<h.length;g+=1)b=h[g],d=b.getAttribute("data-gadget-scope"),e=b.getAttribute("data-gadget-url"),f=b.getAttribute("data-gadget-sandbox"),null!==e&&i.push(a.declareGadget(e,{element:b,scope:d||void0,sandbox:f||void0}));returnc.all(i)}functionv(a,b,d,e){varf=(newc.Queue).push(function(){returnd.apply(a,e)});a.__job_dict.hasOwnProperty(b)&&a.__job_dict[b].cancel(),a.__job_dict[b]=f,a.__monitor.monitor((newc.Queue).push(function(){returnf}).push(void0,function(a){if(!(ainstanceofc.CancellationError))throwa}))}functionw(a){a.__monitor.monitor((newc.Queue).push(function(){varb,c=a.constructor.__service_list,d=a.__job_list;for(b=0;b<c.length;b+=1)a.__monitor.monitor(c[b].apply(a));for(b=0;b<d.length;b+=1)v(a,d[b][0],d[b][1],d[b][2]);a.__job_list=[],a.__job_triggered=!0}))}functionx(a,b,d){vare,f,g=this;for(eing.__sub_gadget_dict)g.__sub_gadget_dict.hasOwnProperty(e)&&g.__sub_gadget_dict[e]===a&&(f=e);return(newc.Queue).push(function(){vara=g.__acquired_method_dict||{};if(a.hasOwnProperty(b))returna[b].apply(g,[d,f]);thrownewH.AcquisitionError("aq_dynamic is not defined")}).push(void0,function(a){if(ainstanceofH.AcquisitionError)returng.__aq_parent(b,d);throwa})}functiony(a,b){a.__aq_parent=function(c,d){returnx.apply(b,[a,c,d])}}functionz(){returnthisinstanceofz?voidr.call(this):newz}functionA(b,d,e){functionf(a,b){returnfunction(){returna(b)}}varg;returnvoid0===d.element&&(d.element=a.createElement("div")),(newc.Queue).push(function(){returnH.declareGadgetKlass(b)}).push(function(a){varb,f=a.__template_element.body.childNodes;for(F=a,g=newa,g.element=d.element,g.state={},b=0;b<f.length;b+=1)g.element.appendChild(f[b].cloneNode(!0));returny(g,e),c.all([g.getRequiredJSList(),g.getRequiredCSSList()])}).push(function(a){varb,d=newc.Queue;for(b=0;b<a[0].length;b+=1)d.push(f(H.declareJS,a[0][b]));for(b=0;b<a[1].length;b+=1)d.push(f(H.declareCSS,a[1][b]));returnd}).push(function(){returng})}functionB(){returnthisinstanceofB?voidr.call(this):newB}functionC(b,d,f){varg,h,i=c.defer();if(void0===d.element)thrownewError("DOM element is required to create Iframe Gadget "+b);if(!a.contains(d.element))thrownewError("The parent element is not attached to the DOM for "+b);returng=newB,y(g,f),h=a.createElement("iframe"),h.setAttribute("src",b),g.__path=b,g.element=d.element,g.state={},d.element.appendChild(h),g.__chan=e.build({window:h.contentWindow,origin:"*",scope:"renderJS"}),g.__chan.bind("declareMethod",function(a,b){returng[b]=function(){vara=arguments,d=newc.Promise(function(c,d){g.__chan.call({method:"methodCall",params:[b,Array.prototype.slice.call(a,0)],success:function(a){c(a)},error:function(a){d(a)}})});return(newc.Queue).push(function(){returnd})},"OK"}),g.__chan.bind("ready",function(a){returni.resolve(g),"OK"}),g.__chan.bind("failed",function(a,b){returni.reject(b),"OK"}),g.__chan.bind("acquire",function(a,b){g.__aq_parent.apply(g,b).then(function(b){a.complete(b)}).fail(function(b){a.error(b.toString())}),a.delayReturn(!0)}),c.any([i.promise,(newc.Queue).push(function(){returnc.timeout(5e3)}).push(void0,function(){thrownewError("Timeout while loading: "+b)})])}functionD(a,b,e){return(newc.Queue).push(function(){returnn(a)}).push(function(b){varc,e=(newd).parseFromString(b.responseText,"text/html"),f=e.createElement("base");returnf.href=a,e.head.insertBefore(f,e.head.firstChild),c=newi([e.documentElement.outerHTML],{type:"text/html;charset=UTF-8"}),l(c)}).push(function(a){returnC(a,b,e)})}functionE(){vard,h,i,j,k,l,m,n,q=o(b.location.href),t=newc.Queue,u=0,v=!1,x=[],A=!1,B=!1;if(J.hasOwnProperty(q))thrownewError("bootstrap should not be called twice");G=newc.Promise(function(o,t){functionC(){varb,e,i=H.parseGadgetHTMLDocument(a,q);for(eini)i.hasOwnProperty(e)&&(d.prototype["__"+e]=i[e]);for(d.__template_element=a.createElement("div"),h.element=a.body,h.state={},b=0;b<h.element.childNodes.length;b+=1)d.__template_element.appendChild(h.element.childNodes[b].cloneNode(!0));c.all([h.getRequiredJSList(),h.getRequiredCSSList()]).then(function(a){varb,c=a[0],d=a[1];for(b=0;b<c.length;b+=1)K[c[b]]=null;for(b=0;b<d.length;b+=1)L[d[b]]=null;F=void0}).then(function(){varb=a.querySelector("body"),c=newf(function(b){varc,d,e,f,h,i;b.forEach(function(b){if("childList"===b.type){for(e=b.removedNodes.length,c=0;e>c;c+=1)if(h=b.removedNodes[c],h.nodeType===g.ELEMENT_NODE)for(h.hasAttribute("data-gadget-url")&&void0!==h._gadget&&s(h._gadget),i=h.querySelectorAll("[data-gadget-url]"),f=i.length,d=0;f>d;d+=1)h=i[d],void0!==h._gadget&&s(h._gadget);for(e=b.addedNodes.length,c=0;e>c;c+=1)if(h=b.addedNodes[c],h.nodeType===g.ELEMENT_NODE)for(h.hasAttribute("data-gadget-url")&&void0!==h._gadget&&a.contains(h)&&w(h._gadget),i=h.querySelectorAll("[data-gadget-url]"),f=i.length,d=0;f>d;d+=1)h=i[d],a.contains(h)&&void0!==h._gadget&&w(h._gadget)}})}),d={childList:!0,subtree:!0,attributes:!1,characterData:!1};returnc.observe(b,d),h}).then(o,function(a){throwt(a),console.error(a),a})}m=newr,m.__acquired_method_dict={reportServiceError:function(a){p(a[0])}},m.__aq_parent=function(a){thrownewH.AcquisitionError("No gadget provides "+a)},b.self===b.top?(d=function(){r.call(this)},d.declareMethod=r.declareMethod,d.declareJob=r.declareJob,d.declareAcquiredMethod=r.declareAcquiredMethod,d.allowPublicAcquisition=r.allowPublicAcquisition,d.__ready_list=r.__ready_list.slice(),d.ready=r.ready,d.setState=r.setState,d.onStateChange=r.onStateChange,d.__service_list=r.__service_list.slice(),d.declareService=r.declareService,d.onEvent=r.onEvent,d.prototype=newr,d.prototype.constructor=d,d.prototype.__path=q,J[q]=d,h=newJ[q],y(h,m)):(d=z,d.__ready_list=r.__ready_list.slice(),d.__service_list=r.__service_list.slice(),d.prototype.__path=q,h=newz,y(h,m),i=e.build({window:b.parent,origin:"*",scope:"renderJS",onReady:function(){vara;for(l=!1,h.__aq_parent=d.prototype.__aq_parent=function(a,b,d){returnnewc.Promise(function(c,e){i.call({method:"acquire",params:[a,b],success:function(a){c(a)},error:function(a){e(a)},timeout:d})})},k=function(a){u+=1,i.call({method:"declareMethod",params:a,success:function(){u-=1,j()},error:function(){u-=1}})},a=0;a<x.length;a+=1)k(x[a]);returnx=[],A?voidi.notify({method:"failed",params:n}):(B=!0,j(),voidi.bind("methodCall",function(a,b){h[b[0]].apply(h,b[1]).then(function(b){a.complete(b)}).fail(function(b){a.error(b.toString())}),a.delayReturn(!0)}))}}),j=function(){0===u&&v===!0&&i.notify({method:"ready"})},k=function(a){x.push(a)},k("getInterfaceList"),k("getRequiredCSSList"),k("getRequiredJSList"),k("getPath"),k("getTitle"),d.declareMethod=function(a,b){varc=r.declareMethod.apply(this,[a,b]);returnk(a),c},d.declareService=r.declareService,d.declareJob=r.declareJob,d.onEvent=r.onEvent,d.declareAcquiredMethod=r.declareAcquiredMethod,d.allowPublicAcquisition=r.allowPublicAcquisition,l=!0),d.prototype.__acquired_method_dict={},F=d,a.addEventListener("DOMContentLoaded",C,!1)}),t.push(function(){returnG}).push(function(a){functionb(){returna}functionc(a){returnfunction(b){returna.call(b,b)}}vare;for(d.ready(function(a){returnw(a)}),t.push(b),e=0;e<d.__ready_list.length;e+=1)t.push(c(d.__ready_list[e])).push(b)}),b.self===b.top?t.fail(function(a){throwp(a),a}):t.then(function(){v=!0,B&&j()}).fail(function(a){throwl?(A=!0,n=a.toString(),p(a)):i.notify({method:"failed",params:a.toString()}),a})}varF,G,H,I,J={},K={},L={},M=0,N=newRegExp("^(?:[a-z]+:)?//|data:","i"),O=!1,P=[];b.addEventListener("error",function(a){P.push(a)}),b.addEventListener("beforeunload",function(){O=!0}),q.prototype=newError,q.prototype.constructor=q,I=function(){functiona(){vara,b=h.length;for(a=0;b>a;a+=1)h[a].cancel();h=[]}varb,d,e,f,g=this,h=[];returnthisinstanceofI?(b=newc.Promise(function(b,c,h){d=function(b){returnf?void0:(g.isRejected=!0,g.rejectedReason=b,f=!0,a(),c(b))},e=h},a),g.cancel=function(){f||(f=!0,b.cancel(),b.fail(function(a){g.isRejected=!0,g.rejectedReason=a}))},g.then=function(){returnb.then.apply(b,arguments)},g.fail=function(){returnb.fail.apply(b,arguments)},void(g.monitor=function(a){if(f)thrownewq;varb=(newc.Queue).push(function(){returna}).push(function(a){varb,c,d=h.length,e=[];for(c=0;d>c;c+=1)b=h[c],b.isFulfilled||b.isRejected||e.push(b);h=e},function(b){throwbinstanceofc.CancellationError&&(a.isFulfilled&&a.isRejected||a.cancel()),d(b),b},function(a){returne(a),a});returnh.push(b),this})):newI},I.prototype=Object.create(c.Promise.prototype),I.prototype.constructor=I,r.prototype.__title="",r.prototype.__interface_list=[],r.prototype.__path="",r.prototype.__html="",r.prototype.__required_css_list=[],r.prototype.__required_js_list=[],r.__ready_list=[t,u],r.ready=function(a){returnthis.__ready_list.push(a),this},r.setState=function(a){varb=JSON.stringify(a);returnthis.prototype.__json_state=b,this.ready(function(){this.state=JSON.parse(b)})},r.onStateChange=function(a){returnthis.prototype.__state_change_callback=a,this},r.__service_list=[],r.declareService=function(a){returnthis.__service_list.push(a),this},r.onEvent=function(a,b,c,d){returnthis.__service_list.push(function(){returnm(this.element,a,c,b.bind(this),d)}),this},r.declareJob=function(a,b){returnthis.prototype[a]=function(){varc=this,d=arguments;c.__job_triggered?v(c,a,b,d):c.__job_list.push([a,b,d])},this},r.declareMethod=function(a,b){returnthis.prototype[a]=function(){vara=this,d=arguments;return(newc.Queue).push(function(){returnb.apply(a,d)})},this},r.declareMethod("getInterfaceList",function(){returnthis.__interface_list}).declareMethod("getRequiredCSSList",function(){returnthis.__required_css_list}).declareMethod("getRequiredJSList",function(){returnthis.__required_js_list}).declareMethod("getPath",function(){returnthis.__path}).declareMethod("getTitle",function(){returnthis.__title}).declareMethod("getElement",function(){if(void0===this.element)thrownewError("No element defined");returnthis.element}).declareMethod("changeState",function(a){varb,d=!1,e={},f=this;for(bina)a[b]!==this.state[b]&&(this.state[b]=a[b],e[b]=a[b],d=!0);returnd&&void0!==this.__state_change_callback?(newc.Queue).push(function(){returnf.__state_change_callback(e)}).push(void0,function(a){throwvoid0!==f.__json_state?f.state=JSON.parse(f.__json_state):f.state={},a}):void0}),r.declareAcquiredMethod=function(a,b){returnthis.prototype[a]=function(){vara=Array.prototype.slice.call(arguments,0),d=this;return(newc.Queue).push(function(){returnd.__aq_parent(b,a)})},this},r.declareAcquiredMethod("aq_reportServiceError","reportServiceError"),r.allowPublicAcquisition=function(a,b){returnthis.prototype.__acquired_method_dict[a]=b,this},z.__ready_list=r.__ready_list.slice(),z.__service_list=r.__service_list.slice(),z.ready=r.ready,z.setState=r.setState,z.onStateChange=r.onStateChange,z.declareService=r.declareService,z.onEvent=r.onEvent,z.prototype=newr,z.prototype.constructor=z,B.__ready_list=r.__ready_list.slice(),B.ready=r.ready,B.setState=r.setState,B.onStateChange=r.onStateChange,B.__service_list=r.__service_list.slice(),B.declareService=r.declareService,B.onEvent=r.onEvent,B.prototype=newr,B.prototype.constructor=B,r.declareMethod("declareGadget",function(b,d){vare,f,g=this,h=G;returnvoid0===d&&(d={}),void0===d.sandbox&&(d.sandbox="public"),b=H.getAbsoluteURL(b,this.__path),G=(newc.Queue).push(function(){returnh}).push(void0,function(){}).push(function(){vara;if("public"===d.sandbox)a=A;elseif("iframe"===d.sandbox)a=C;else{if("dataurl"!==d.sandbox)thrownewError("Unsupported sandbox options '"+d.sandbox+"'");a=D}returna(b,d,g)}).push(function(a){returnF=void0,a}).push(void0,function(a){throwF=void0,a}),f=G.then(function(a){returna}),e=(newc.Queue).push(function(){returnf}).push(function(c){functionf(){returnc}functionh(a){returnfunction(b){returna.call(b,b)}}vari,j;for(i=0;i<c.constructor.__ready_list.length;i+=1)e.push(h(c.constructor.__ready_list[i])),e.push(f);if(j=d.scope,void0===j)for(j="RJS_"+M,M+=1;g.__sub_gadget_dict.hasOwnProperty(j);)j="RJS_"+M,M+=1;returng.__sub_gadget_dict[j]=c,c.element.setAttribute("data-gadget-scope",j),c.element.setAttribute("data-gadget-url",b),c.element.setAttribute("data-gadget-sandbox",d.sandbox),c.element._gadget=c,a.contains(c.element)&&e.push(w),e.push(f),c})}).declareMethod("getDeclaredGadget",function(a){if(!this.__sub_gadget_dict.hasOwnProperty(a))thrownewError("Gadget scope '"+a+"' is not known.");returnthis.__sub_gadget_dict[a]}).declareMethod("dropGadget",function(a){if(!this.__sub_gadget_dict.hasOwnProperty(a))thrownewError("Gadget scope '"+a+"' is not known.");deletethis.__sub_gadget_dict[a]}),H=function(a){varc;if(a===b&&(c=F),void0===c)thrownewError("Unknown selector '"+a+"'");returnc},H.AcquisitionError=function(a){if(this.name="AcquisitionError",void0!==a&&"string"!=typeofa)thrownewTypeError("You must pass a string.");this.message=a||"Acquisition failed"},H.AcquisitionError.prototype=newError,H.AcquisitionError.prototype.constructor=H.AcquisitionError,H.getAbsoluteURL=function(a,b){varc,e,f,g="<!doctype><html><head></head></html>";returna&&b&&!N.test(a)?(c=(newd).parseFromString(g,"text/html"),e=c.createElement("base"),f=c.createElement("link"),c.head.appendChild(e),c.head.appendChild(f),e.href=b,f.href=a,f.href):a},H.declareJS=function(b){vard;returnd=K.hasOwnProperty(b)?c.resolve():newc.Promise(function(c,d){vare;e=a.createElement("script"),e.type="text/javascript",e.src=b,e.onload=function(){K[b]=null,c()},e.onerror=function(a){d(a)},a.head.appendChild(e)})},H.declareCSS=function(b){vard;returnd=L.hasOwnProperty(b)?c.resolve():newc.Promise(function(c,d){vare;e=a.createElement("link"),e.rel="stylesheet",e.type="text/css",e.href=b,e.onload=function(){L[b]=null,c()},e.onerror=function(a){d(a)},a.head.appendChild(e)})},H.declareGadgetKlass=function(a){functionb(b){varc,e,f;if(!J.hasOwnProperty(a)){c=function(){r.call(this)},c.__ready_list=r.__ready_list.slice(),c.__service_list=r.__service_list.slice(),c.declareMethod=r.declareMethod,c.declareJob=r.declareJob,c.declareAcquiredMethod=r.declareAcquiredMethod,c.allowPublicAcquisition=r.allowPublicAcquisition,c.ready=r.ready,c.setState=r.setState,c.onStateChange=r.onStateChange,c.declareService=r.declareService,c.onEvent=r.onEvent,c.prototype=newr,c.prototype.constructor=c,c.prototype.__path=a,c.prototype.__acquired_method_dict={},c.__template_element=(newd).parseFromString(b.responseText,"text/html"),f=H.parseGadgetHTMLDocument(c.__template_element,a);for(einf)f.hasOwnProperty(e)&&(c.prototype["__"+e]=f[e]);J[a]=c}returnJ[a]}vare;returne=J.hasOwnProperty(a)?c.resolve(J[a]):(newc.Queue).push(function(){returnn(a)}).push(function(a){returnb(a)})},H.clearGadgetKlassList=function(){J={},K={},L={}},H.parseGadgetHTMLDocument=function(a,b){varc,d,e={title:"",interface_list:[],required_css_list:[],required_js_list:[]};if(!b||!N.test(b))thrownewError("The url should be absolute: "+b);if(9!==a.nodeType)thrownewError("The first parameter should be an HTMLDocument");if(e.title=a.title,null!==a.head)for(c=0;c<a.head.children.length;c+=1)d=a.head.children[c],null!==d.href&&("stylesheet"===d.rel?e.required_css_list.push(H.getAbsoluteURL(d.getAttribute("href"),b)):"SCRIPT"!==d.nodeName||"text/javascript"!==d.type&&d.type?"http://www.renderjs.org/rel/interface"===d.rel&&e.interface_list.push(H.getAbsoluteURL(d.getAttribute("href"),b)):e.required_js_list.push(H.getAbsoluteURL(d.getAttribute("src"),b)));returne},b.rJS=b.renderJS=H,b.__RenderJSGadget=r,b.__RenderJSEmbeddedGadget=z,b.__RenderJSIframeGadget=B,E()}(document,window,RSVP,DOMParser,Channel,MutationObserver,Node,FileReader,Blob,navigator,Event);
varChannel=function(){"use strict";functiona(a,b,c,d){functionf(b){for(varc=0;c<b.length;c++)if(b[c].win===a)return!0;return!1}varg=!1;if("*"===b){for(varhine)if(e.hasOwnProperty(h)&&"*"!==h&&"object"==typeofe[h][c]&&(g=f(e[h][c])))break}elsee["*"]&&e["*"][c]&&(g=f(e["*"][c])),!g&&e[b]&&e[b][c]&&(g=f(e[b][c]));if(g)throw"A channel is already bound to the same window which overlaps with origin '"+b+"' and has scope '"+c+"'";"object"!=typeofe[b]&&(e[b]={}),"object"!=typeofe[b][c]&&(e[b][c]=[]),e[b][c].push({win:a,handler:d})}functionb(a,b,c){for(vard=e[b][c],f=0;f<d.length;f++)d[f].win===a&&d.splice(f,1);0===e[b][c].length&&deletee[b][c]}functionc(a){returnArray.isArray?Array.isArray(a):-1!=a.constructor.toString().indexOf("Array")}vard=Math.floor(1000001*Math.random()),e={},f={},g=function(a){try{varb=JSON.parse(a.data);if("object"!=typeofb||null===b)throw"malformed"}catch(a){return}varc,d,g,h=a.source,i=a.origin;if("string"==typeofb.method){varj=b.method.split("::");2==j.length?(c=j[0],g=j[1]):g=b.method}if("undefined"!=typeofb.id&&(d=b.id),"string"==typeofg){vark=!1;if(e[i]&&e[i][c])for(varl=0;l<e[i][c].length;l++)if(e[i][c][l].win===h){e[i][c][l].handler(i,g,b),k=!0;break}if(!k&&e["*"]&&e["*"][c])for(varl=0;l<e["*"][c].length;l++)if(e["*"][c][l].win===h){e["*"][c][l].handler(i,g,b);break}}else"undefined"!=typeofd&&f[d]&&f[d](i,g,b)};returnwindow.addEventListener?window.addEventListener("message",g,!1):window.attachEvent&&window.attachEvent("onmessage",g),{build:function(e){varg=function(a){if(e.debugOutput&&window.console&&window.console.log){try{"string"!=typeofa&&(a=JSON.stringify(a))}catch(b){}console.log("["+j+"] "+a)}};if(!window.postMessage)throw"jschannel cannot run this browser, no postMessage";if(!window.JSON||!window.JSON.stringify||!window.JSON.parse)throw"jschannel cannot run this browser, no JSON parsing/serialization";if("object"!=typeofe)throw"Channel build invoked without a proper object argument";if(!e.window||!e.window.postMessage)throw"Channel.build() called without a valid window argument";if(window===e.window)throw"target window is same as present window -- not allowed";varh=!1;if("string"==typeofe.origin){vari;"*"===e.origin?h=!0:null!==(i=e.origin.match(/^https?:\/\/(?:[-a-zA-Z0-9_\.])+(?::\d+)?/))&&(e.origin=i[0].toLowerCase(),h=!0)}if(!h)throw"Channel.build() called with an invalid origin";if("undefined"!=typeofe.scope){if("string"!=typeofe.scope)throw"scope, when specified, must be a string";if(e.scope.split("::").length>1)throw"scope may not contain double colons: '::'"}varj=function(){for(vara="",b="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",c=0;5>c;c++)a+=b.charAt(Math.floor(Math.random()*b.length));returna}(),k={},l={},m={},n=!1,o=[],p=function(a,b,c){vard=!1,e=!1;return{origin:b,invoke:function(b,d){if(!m[a])throw"attempting to invoke a callback of a nonexistent transaction: "+a;for(vare=!1,f=0;f<c.length;f++)if(b===c[f]){e=!0;break}if(!e)throw"request supports no such callback '"+b+"'";t({id:a,callback:b,params:d})},error:function(b,c){if(e=!0,!m[a])throw"error called for nonexistent message: "+a;deletem[a],t({id:a,error:b,message:c})},complete:function(b){if(e=!0,!m[a])throw"complete called for nonexistent message: "+a;deletem[a],t({id:a,result:b})},delayReturn:function(a){return"boolean"==typeofa&&(d=a===!0),d},completed:function(){returne}}},q=function(a,b,c){returnwindow.setTimeout(function(){if(l[a]){vard="timeout ("+b+"ms) exceeded on method '"+c+"'";l[a].error("timeout_error",d),deletel[a],deletef[a]}},b)},r=function(a,b,d){if("function"==typeofe.gotMessageObserver)try{e.gotMessageObserver(a,d)}catch(h){g("gotMessageObserver() raised an exception: "+h.toString())}if(d.id&&b){if(k[b]){vari=p(d.id,a,d.callbacks?d.callbacks:[]);m[d.id]={};try{if(d.callbacks&&c(d.callbacks)&&d.callbacks.length>0)for(varj=0;j<d.callbacks.length;j++){for(varn=d.callbacks[j],o=d.params,q=n.split("/"),r=0;r<q.length-1;r++){vars=q[r];"object"!=typeofo[s]&&(o[s]={}),o=o[s]}o[q[q.length-1]]=function(){vara=n;returnfunction(b){returni.invoke(a,b)}}()}vart=k[b](i,d.params);i.delayReturn()||i.completed()||i.complete(t)}catch(h){varu="runtime_error",v=null;if("string"==typeofh?v=h:"object"==typeofh&&(h&&c(h)&&2==h.length?(u=h[0],v=h[1]):"string"==typeofh.error&&(u=h.error,h.message?"string"==typeofh.message?v=h.message:h=h.message:v="")),null===v)try{v=JSON.stringify(h),"undefined"==typeofv&&(v=h.toString())}catch(w){v=h.toString()}i.error(u,v)}}}elsed.id&&d.callback?l[d.id]&&l[d.id].callbacks&&l[d.id].callbacks[d.callback]?l[d.id].callbacks[d.callback](d.params):g("ignoring invalid callback, id:"+d.id+" ("+d.callback+")"):d.id?l[d.id]?(d.error?l[d.id].error(d.error,d.message):void0!==d.result?l[d.id].success(d.result):l[d.id].success(),deletel[d.id],deletef[d.id]):g("ignoring invalid response: "+d.id):b&&k[b]&&k[b]({origin:a},d.params)};a(e.window,e.origin,"string"==typeofe.scope?e.scope:"",r);vars=function(a){return"string"==typeofe.scope&&e.scope.length&&(a=[e.scope,a].join("::")),a},t=function(a,b){if(!a)throw"postMessage called with null message";varc=n?"post ":"queue ";if(g(c+" message: "+JSON.stringify(a)),b||n){if("function"==typeofe.postMessageObserver)try{e.postMessageObserver(e.origin,a)}catch(d){g("postMessageObserver() raised an exception: "+d.toString())}e.window.postMessage(JSON.stringify(a),e.origin)}elseo.push(a)},u=function(a,b){if(g("ready msg received"),n)throw"received ready message while in ready state. help!";for(j+="ping"===b?"-R":"-L",v.unbind("__ready"),n=!0,g("ready msg accepted."),"ping"===b&&v.notify({method:"__ready",params:"pong"});o.length;)t(o.pop());"function"==typeofe.onReady&&e.onReady(v)},v={unbind:function(a){if(k[a]){if(!deletek[a])throw"can't delete method: "+a;return!0}return!1},bind:function(a,b){if(!a||"string"!=typeofa)throw"'method' argument to bind must be string";if(!b||"function"!=typeofb)throw"callback missing from bind params";if(k[a])throw"method '"+a+"' is already bound!";returnk[a]=b,this},call:function(a){if(!a)throw"missing arguments to call function";if(!a.method||"string"!=typeofa.method)throw"'method' argument to call must be string";if(!a.success||"function"!=typeofa.success)throw"'success' callback missing from call";varb={},c=[],e=function(a,d){if("object"==typeofd)for(varfind)if(d.hasOwnProperty(f)){varg=a+(a.length?"/":"")+f;"function"==typeofd[f]?(b[g]=d[f],c.push(g),deleted[f]):"object"==typeofd[f]&&e(g,d[f])}};e("",a.params);varg={id:d,method:s(a.method),params:a.params};c.length&&(g.callbacks=c),a.timeout&&q(d,a.timeout,s(a.method)),l[d]={callbacks:b,error:a.error,success:a.success},f[d]=r,d++,t(g)},notify:function(a){if(!a)throw"missing arguments to notify function";if(!a.method||"string"!=typeofa.method)throw"'method' argument to notify must be string";t({method:s(a.method),params:a.params})},destroy:function(){b(e.window,e.origin,"string"==typeofe.scope?e.scope:""),window.removeEventListener?window.removeEventListener("message",r,!1):window.detachEvent&&window.detachEvent("onmessage",r),n=!1,k={},m={},l={},e.origin=null,o=[],g("channel destroyed"),j=""}};returnv.bind("__ready",u),setTimeout(function(){t({method:s("__ready"),params:"ping"},!0)},0),v}}}();!function(a){"use strict";varb=a.prototype,c=b.parseFromString;try{if((newa).parseFromString("","text/html"))return}catch(d){}b.parseFromString=function(a,b){vard,e,f,g;return/^\s*text\/html\s*(?:;|$)/i.test(b)?(e=document.implementation.createHTMLDocument(""),f=e.documentElement,f.innerHTML=a,g=f.firstElementChild,1===f.childElementCount&&"html"===g.localName.toLowerCase()&&e.replaceChild(g,f),d=e):d=c.apply(this,arguments),d}}(DOMParser),"function"!=typeofdocument.contains&&(Document.prototype.contains=function(a){returna===this||a.parentNode===this?!0:this.documentElement.contains(a)}),function(a,b,c,d,e,f,g,h,i,j,k){"use strict";functionl(a){varb=newh;returnnewc.Promise(function(c,d){b.addEventListener("load",function(a){c(a.target.result)}),b.addEventListener("error",d),b.readAsDataURL(a)},function(){b.abort()})}functionm(a,b,d,e,f){functiong(){void0!==k&&"function"==typeofk.cancel&&k.cancel()}functionh(){void0!==j&&a.removeEventListener(b,j,d),g()}functioni(i,l){varm;j=function(a){f&&(a.stopPropagation(),a.preventDefault()),g();try{m=e(a)}catch(b){m=c.reject(b)}k=m,(newc.Queue).push(function(){returnm}).push(void0,function(a){ainstanceofc.CancellationError||(h(),l(a))})},a.addEventListener(b,j,d)}varj,k;returnvoid0===f&&(f=!0),newc.Promise(i,h)}functionn(a){functionb(b,c){functiond(){try{0===e.readyState?c(e):4===e.readyState&&(e.status<200||e.status>=300||!/^text\/html[;]?/.test(e.getResponseHeader("Content-Type")||"")?c(e):b(e))}catch(a){c(a)}}e=newXMLHttpRequest,e.open("GET",a),e.onreadystatechange=d,e.setRequestHeader("Accept","text/html"),e.withCredentials=!0,e.send()}functiond(){void0!==e&&e.readyState!==e.DONE&&e.abort()}vare;returnnewc.Promise(b,d)}functiono(a){varb=a.indexOf("#");returnb>0&&(a=a.substring(0,b)),a}functionp(c){vard,e,f,g,h,i;if(O)returnconsole.info("-- Error dropped, as page is unloaded"),voidconsole.info(c);for(P.push(c),P.push(newError("stopping renderJS")),e=a.getElementsByTagName("body")[0];e.firstChild;)e.removeChild(e.firstChild);for(f=a.createElement("section"),g=a.createElement("h1"),g.textContent="Unhandled Error",f.appendChild(g),g=a.createElement("p"),g.textContent="Please report this error to the support team",f.appendChild(g),g=a.createElement("p"),g.textContent="Location: ",h=a.createElement("a"),h.href=h.textContent=b.location.toString(),g.appendChild(h),f.appendChild(g),g=a.createElement("p"),g.textContent="User-agent: "+j.userAgent,f.appendChild(g),g=a.createElement("p"),g.textContent="Date: "+newDate(Date.now()).toISOString(),f.appendChild(g),e.appendChild(f),d=0;d<P.length;d+=1){if(i=P[d],iinstanceofk&&(i={string:i.toString(),message:i.message,type:i.type,target:i.target},void0!==i.target&&P.splice(d+1,0,i.target)),iinstanceofXMLHttpRequest&&(i={message:i.toString(),readyState:i.readyState,status:i.status,statusText:i.statusText,response:i.response,responseUrl:i.responseUrl,response_headers:i.getAllResponseHeaders()}),i.constructor===Array||i.constructor===String||i.constructor===Object)try{i=JSON.stringify(i)}catch(l){}f=a.createElement("section"),g=a.createElement("h2"),g.textContent=i.message||i,f.appendChild(g),void0!==i.fileName&&(g=a.createElement("p"),g.textContent="File: "+i.fileName+": "+i.lineNumber,f.appendChild(g)),void0!==i.stack&&(g=a.createElement("pre"),g.textContent="Stack: "+i.stack,f.appendChild(g)),e.appendChild(f)}console.error(c.stack),console.error(c)}functionq(a){if(this.name="resolved",void0!==a&&"string"!=typeofa)thrownewTypeError("You must pass a string.");this.message=a||"Default Message"}functionr(){returnthisinstanceofr?void0:newr}functions(a){void0!==a.__monitor&&a.__monitor.cancel(),a.__monitor=newI,a.__job_dict={},a.__job_list=[],a.__job_triggered=!1,a.__monitor.fail(function(b){returnbinstanceofc.CancellationError?void0:a.aq_reportServiceError(b)}).fail(function(a){returnp(a)})}functiont(a){a.__sub_gadget_dict={},s(a)}functionu(a){varb,d,e,f,g,h=a.element.querySelectorAll("[data-gadget-url]"),i=[];for(g=0;g<h.length;g+=1)b=h[g],d=b.getAttribute("data-gadget-scope"),e=b.getAttribute("data-gadget-url"),f=b.getAttribute("data-gadget-sandbox"),null!==e&&i.push(a.declareGadget(e,{element:b,scope:d||void0,sandbox:f||void0}));returnc.all(i)}functionv(a,b,d,e){varf=(newc.Queue).push(function(){returnd.apply(a,e)});a.__job_dict.hasOwnProperty(b)&&a.__job_dict[b].cancel(),a.__job_dict[b]=f,a.__monitor.monitor((newc.Queue).push(function(){returnf}).push(void0,function(a){if(!(ainstanceofc.CancellationError))throwa}))}functionw(a){a.__monitor.monitor((newc.Queue).push(function(){varb,c=a.constructor.__service_list,d=a.__job_list;for(b=0;b<c.length;b+=1)a.__monitor.monitor(c[b].apply(a));for(b=0;b<d.length;b+=1)v(a,d[b][0],d[b][1],d[b][2]);a.__job_list=[],a.__job_triggered=!0}))}functionx(a,b,d){vare,f,g=this;for(eing.__sub_gadget_dict)g.__sub_gadget_dict.hasOwnProperty(e)&&g.__sub_gadget_dict[e]===a&&(f=e);return(newc.Queue).push(function(){vara=g.__acquired_method_dict||{};if(a.hasOwnProperty(b))returna[b].apply(g,[d,f]);thrownewH.AcquisitionError("aq_dynamic is not defined")}).push(void0,function(a){if(ainstanceofH.AcquisitionError)returng.__aq_parent(b,d);throwa})}functiony(a,b){a.__aq_parent=function(c,d){returnx.apply(b,[a,c,d])}}functionz(){returnthisinstanceofz?voidr.call(this):newz}functionA(b,d,e){functionf(a,b){returnfunction(){returna(b)}}varg;returnvoid0===d.element&&(d.element=a.createElement("div")),(newc.Queue).push(function(){returnH.declareGadgetKlass(b)}).push(function(a){varb,f=a.__template_element.body.childNodes;for(F=a,g=newa,g.element=d.element,g.state={},b=0;b<f.length;b+=1)g.element.appendChild(f[b].cloneNode(!0));returny(g,e),c.all([g.getRequiredJSList(),g.getRequiredCSSList()])}).push(function(a){varb,d=newc.Queue;for(b=0;b<a[0].length;b+=1)d.push(f(H.declareJS,a[0][b]));for(b=0;b<a[1].length;b+=1)d.push(f(H.declareCSS,a[1][b]));returnd}).push(function(){returng})}functionB(){returnthisinstanceofB?voidr.call(this):newB}functionC(b,d,f){varg,h,i=c.defer();if(void0===d.element)thrownewError("DOM element is required to create Iframe Gadget "+b);if(!a.contains(d.element))thrownewError("The parent element is not attached to the DOM for "+b);returng=newB,y(g,f),h=a.createElement("iframe"),h.setAttribute("src",b),g.__path=b,g.element=d.element,g.state={},d.element.appendChild(h),g.__chan=e.build({window:h.contentWindow,origin:"*",scope:"renderJS"}),g.__chan.bind("declareMethod",function(a,b){returng[b]=function(){vara=arguments,d=newc.Promise(function(c,d){g.__chan.call({method:"methodCall",params:[b,Array.prototype.slice.call(a,0)],success:function(a){c(a)},error:function(a){d(a)}})});return(newc.Queue).push(function(){returnd})},"OK"}),g.__chan.bind("ready",function(a){returni.resolve(g),"OK"}),g.__chan.bind("failed",function(a,b){returni.reject(b),"OK"}),g.__chan.bind("acquire",function(a,b){g.__aq_parent.apply(g,b).then(function(b){a.complete(b)}).fail(function(b){a.error(b.toString())}),a.delayReturn(!0)}),c.any([i.promise,(newc.Queue).push(function(){returnc.timeout(5e3)}).push(void0,function(){thrownewError("Timeout while loading: "+b)})])}functionD(a,b,e){return(newc.Queue).push(function(){returnn(a)}).push(function(b){varc,e=(newd).parseFromString(b.responseText,"text/html"),f=e.createElement("base");returnf.href=a,e.head.insertBefore(f,e.head.firstChild),c=newi([e.documentElement.outerHTML],{type:"text/html;charset=UTF-8"}),l(c)}).push(function(a){returnC(a,b,e)})}functionE(){vard,h,i,j,k,l,m,n,q=o(b.location.href),t=newc.Queue,u=0,v=!1,x=[],A=!1,B=!1;if(J.hasOwnProperty(q))thrownewError("bootstrap should not be called twice");G=newc.Promise(function(o,t){functionC(){varb,e,i=H.parseGadgetHTMLDocument(a,q);for(eini)i.hasOwnProperty(e)&&(d.prototype["__"+e]=i[e]);for(d.__template_element=a.createElement("div"),h.element=a.body,h.state={},b=0;b<h.element.childNodes.length;b+=1)d.__template_element.appendChild(h.element.childNodes[b].cloneNode(!0));c.all([h.getRequiredJSList(),h.getRequiredCSSList()]).then(function(a){varb,c=a[0],d=a[1];for(b=0;b<c.length;b+=1)K[c[b]]=null;for(b=0;b<d.length;b+=1)L[d[b]]=null;F=void0}).then(function(){varb=a.querySelector("body"),c=newf(function(b){varc,d,e,f,h,i;b.forEach(function(b){if("childList"===b.type){for(e=b.removedNodes.length,c=0;e>c;c+=1)if(h=b.removedNodes[c],h.nodeType===g.ELEMENT_NODE)for(h.hasAttribute("data-gadget-url")&&void0!==h._gadget&&s(h._gadget),i=h.querySelectorAll("[data-gadget-url]"),f=i.length,d=0;f>d;d+=1)h=i[d],void0!==h._gadget&&s(h._gadget);for(e=b.addedNodes.length,c=0;e>c;c+=1)if(h=b.addedNodes[c],h.nodeType===g.ELEMENT_NODE)for(h.hasAttribute("data-gadget-url")&&void0!==h._gadget&&a.contains(h)&&w(h._gadget),i=h.querySelectorAll("[data-gadget-url]"),f=i.length,d=0;f>d;d+=1)h=i[d],a.contains(h)&&void0!==h._gadget&&w(h._gadget)}})}),d={childList:!0,subtree:!0,attributes:!1,characterData:!1};returnc.observe(b,d),h}).then(o,function(a){throwt(a),console.error(a),a})}m=newr,m.__acquired_method_dict={reportServiceError:function(a){p(a[0])}},m.__aq_parent=function(a){thrownewH.AcquisitionError("No gadget provides "+a)},b.self===b.top?(d=function(){r.call(this)},d.declareMethod=r.declareMethod,d.declareJob=r.declareJob,d.declareAcquiredMethod=r.declareAcquiredMethod,d.allowPublicAcquisition=r.allowPublicAcquisition,d.__ready_list=r.__ready_list.slice(),d.ready=r.ready,d.setState=r.setState,d.onStateChange=r.onStateChange,d.__service_list=r.__service_list.slice(),d.declareService=r.declareService,d.onEvent=r.onEvent,d.prototype=newr,d.prototype.constructor=d,d.prototype.__path=q,J[q]=d,h=newJ[q],y(h,m)):(d=z,d.__ready_list=r.__ready_list.slice(),d.__service_list=r.__service_list.slice(),d.prototype.__path=q,h=newz,y(h,m),i=e.build({window:b.parent,origin:"*",scope:"renderJS",onReady:function(){vara;for(l=!1,h.__aq_parent=d.prototype.__aq_parent=function(a,b,d){returnnewc.Promise(function(c,e){i.call({method:"acquire",params:[a,b],success:function(a){c(a)},error:function(a){e(a)},timeout:d})})},k=function(a){u+=1,i.call({method:"declareMethod",params:a,success:function(){u-=1,j()},error:function(){u-=1}})},a=0;a<x.length;a+=1)k(x[a]);returnx=[],A?voidi.notify({method:"failed",params:n}):(B=!0,j(),voidi.bind("methodCall",function(a,b){h[b[0]].apply(h,b[1]).then(function(b){a.complete(b)}).fail(function(b){a.error(b.toString())}),a.delayReturn(!0)}))}}),j=function(){0===u&&v===!0&&i.notify({method:"ready"})},k=function(a){x.push(a)},k("getInterfaceList"),k("getRequiredCSSList"),k("getRequiredJSList"),k("getPath"),k("getTitle"),d.declareMethod=function(a,b){varc=r.declareMethod.apply(this,[a,b]);returnk(a),c},d.declareService=r.declareService,d.declareJob=r.declareJob,d.onEvent=r.onEvent,d.declareAcquiredMethod=r.declareAcquiredMethod,d.allowPublicAcquisition=r.allowPublicAcquisition,l=!0),d.prototype.__acquired_method_dict={},F=d,a.addEventListener("DOMContentLoaded",C,!1)}),t.push(function(){returnG}).push(function(a){functionb(){returna}functionc(a){returnfunction(b){returna.call(b,b)}}vare;for(d.ready(function(a){returnw(a)}),t.push(b),e=0;e<d.__ready_list.length;e+=1)t.push(c(d.__ready_list[e])).push(b)}),b.self===b.top?t.fail(function(a){throwp(a),a}):t.then(function(){v=!0,B&&j()}).fail(function(a){throwl?(A=!0,n=a.toString(),p(a)):i.notify({method:"failed",params:a.toString()}),a})}varF,G,H,I,J={},K={},L={},M=0,N=newRegExp("^(?:[a-z]+:)?//|data:","i"),O=!1,P=[];b.addEventListener("error",function(a){P.push(a)}),b.addEventListener("beforeunload",function(){O=!0}),q.prototype=newError,q.prototype.constructor=q,I=function(){functiona(){vara,b=h.length;for(a=0;b>a;a+=1)h[a].cancel();h=[]}varb,d,e,f,g=this,h=[];returnthisinstanceofI?(b=newc.Promise(function(b,c,h){d=function(b){returnf?void0:(g.isRejected=!0,g.rejectedReason=b,f=!0,a(),c(b))},e=h},a),g.cancel=function(){f||(f=!0,b.cancel(),b.fail(function(a){g.isRejected=!0,g.rejectedReason=a}))},g.then=function(){returnb.then.apply(b,arguments)},g.fail=function(){returnb.fail.apply(b,arguments)},void(g.monitor=function(a){if(f)thrownewq;varb=(newc.Queue).push(function(){returna}).push(function(a){varb,c,d=h.length,e=[];for(c=0;d>c;c+=1)b=h[c],b.isFulfilled||b.isRejected||e.push(b);h=e},function(b){throwbinstanceofc.CancellationError&&(a.isFulfilled&&a.isRejected||a.cancel()),d(b),b},function(a){returne(a),a});returnh.push(b),this})):newI},I.prototype=Object.create(c.Promise.prototype),I.prototype.constructor=I,r.prototype.__title="",r.prototype.__interface_list=[],r.prototype.__path="",r.prototype.__html="",r.prototype.__required_css_list=[],r.prototype.__required_js_list=[],r.__ready_list=[t,u],r.ready=function(a){returnthis.__ready_list.push(a),this},r.setState=function(a){varb=JSON.stringify(a);returnthis.ready(function(){this.state=JSON.parse(b)})},r.onStateChange=function(a){returnthis.prototype.__state_change_callback=a,this},r.__service_list=[],r.declareService=function(a){returnthis.__service_list.push(a),this},r.onEvent=function(a,b,c,d){returnthis.__service_list.push(function(){returnm(this.element,a,c,b.bind(this),d)}),this},r.declareJob=function(a,b){returnthis.prototype[a]=function(){varc=this,d=arguments;c.__job_triggered?v(c,a,b,d):c.__job_list.push([a,b,d])},this},r.declareMethod=function(a,b){returnthis.prototype[a]=function(){vara=this,d=arguments;return(newc.Queue).push(function(){returnb.apply(a,d)})},this},r.declareMethod("getInterfaceList",function(){returnthis.__interface_list}).declareMethod("getRequiredCSSList",function(){returnthis.__required_css_list}).declareMethod("getRequiredJSList",function(){returnthis.__required_js_list}).declareMethod("getPath",function(){returnthis.__path}).declareMethod("getTitle",function(){returnthis.__title}).declareMethod("getElement",function(){if(void0===this.element)thrownewError("No element defined");returnthis.element}).declareMethod("changeState",function(a){varb,d,e=!1,f=this.hasOwnProperty("__modification_dict"),g=this;f?(d=this.__modification_dict,e=!0):(d={},this.__modification_dict=d);for(bina)a.hasOwnProperty(b)&&a[b]!==this.state[b]&&(this.state[b]=a[b],d[b]=a[b],e=!0);returne&&void0!==this.__state_change_callback?(newc.Queue).push(function(){returng.__state_change_callback(d)}).push(function(a){returndeleteg.__modification_dict,a}):void0}),r.declareAcquiredMethod=function(a,b){returnthis.prototype[a]=function(){vara=Array.prototype.slice.call(arguments,0),d=this;return(newc.Queue).push(function(){returnd.__aq_parent(b,a)})},this},r.declareAcquiredMethod("aq_reportServiceError","reportServiceError"),r.allowPublicAcquisition=function(a,b){returnthis.prototype.__acquired_method_dict[a]=b,this},z.__ready_list=r.__ready_list.slice(),z.__service_list=r.__service_list.slice(),z.ready=r.ready,z.setState=r.setState,z.onStateChange=r.onStateChange,z.declareService=r.declareService,z.onEvent=r.onEvent,z.prototype=newr,z.prototype.constructor=z,B.__ready_list=r.__ready_list.slice(),B.ready=r.ready,B.setState=r.setState,B.onStateChange=r.onStateChange,B.__service_list=r.__service_list.slice(),B.declareService=r.declareService,B.onEvent=r.onEvent,B.prototype=newr,B.prototype.constructor=B,r.declareMethod("declareGadget",function(b,d){vare,f,g=this,h=G;returnvoid0===d&&(d={}),void0===d.sandbox&&(d.sandbox="public"),b=H.getAbsoluteURL(b,this.__path),G=(newc.Queue).push(function(){returnh}).push(void0,function(){}).push(function(){vara;if("public"===d.sandbox)a=A;elseif("iframe"===d.sandbox)a=C;else{if("dataurl"!==d.sandbox)thrownewError("Unsupported sandbox options '"+d.sandbox+"'");a=D}returna(b,d,g)}).push(function(a){returnF=void0,a}).push(void0,function(a){throwF=void0,a}),f=G.then(function(a){returna}),e=(newc.Queue).push(function(){returnf}).push(function(c){functionf(){returnc}functionh(a){returnfunction(b){returna.call(b,b)}}vari,j;for(i=0;i<c.constructor.__ready_list.length;i+=1)e.push(h(c.constructor.__ready_list[i])),e.push(f);if(j=d.scope,void0===j)for(j="RJS_"+M,M+=1;g.__sub_gadget_dict.hasOwnProperty(j);)j="RJS_"+M,M+=1;returng.__sub_gadget_dict[j]=c,c.element.setAttribute("data-gadget-scope",j),c.element.setAttribute("data-gadget-url",b),c.element.setAttribute("data-gadget-sandbox",d.sandbox),c.element._gadget=c,a.contains(c.element)&&e.push(w),e.push(f),c})}).declareMethod("getDeclaredGadget",function(a){if(!this.__sub_gadget_dict.hasOwnProperty(a))thrownewError("Gadget scope '"+a+"' is not known.");returnthis.__sub_gadget_dict[a]}).declareMethod("dropGadget",function(a){if(!this.__sub_gadget_dict.hasOwnProperty(a))thrownewError("Gadget scope '"+a+"' is not known.");deletethis.__sub_gadget_dict[a]}),H=function(a){varc;if(a===b&&(c=F),void0===c)thrownewError("Unknown selector '"+a+"'");returnc},H.AcquisitionError=function(a){if(this.name="AcquisitionError",void0!==a&&"string"!=typeofa)thrownewTypeError("You must pass a string.");this.message=a||"Acquisition failed"},H.AcquisitionError.prototype=newError,H.AcquisitionError.prototype.constructor=H.AcquisitionError,H.getAbsoluteURL=function(a,b){varc,e,f,g="<!doctype><html><head></head></html>";returna&&b&&!N.test(a)?(c=(newd).parseFromString(g,"text/html"),e=c.createElement("base"),f=c.createElement("link"),c.head.appendChild(e),c.head.appendChild(f),e.href=b,f.href=a,f.href):a},H.declareJS=function(b){vard;returnd=K.hasOwnProperty(b)?c.resolve():newc.Promise(function(c,d){vare;e=a.createElement("script"),e.type="text/javascript",e.src=b,e.onload=function(){K[b]=null,c()},e.onerror=function(a){d(a)},a.head.appendChild(e)})},H.declareCSS=function(b){vard;returnd=L.hasOwnProperty(b)?c.resolve():newc.Promise(function(c,d){vare;e=a.createElement("link"),e.rel="stylesheet",e.type="text/css",e.href=b,e.onload=function(){L[b]=null,c()},e.onerror=function(a){d(a)},a.head.appendChild(e)})},H.declareGadgetKlass=function(a){functionb(b){varc,e,f;if(!J.hasOwnProperty(a)){c=function(){r.call(this)},c.__ready_list=r.__ready_list.slice(),c.__service_list=r.__service_list.slice(),c.declareMethod=r.declareMethod,c.declareJob=r.declareJob,c.declareAcquiredMethod=r.declareAcquiredMethod,c.allowPublicAcquisition=r.allowPublicAcquisition,c.ready=r.ready,c.setState=r.setState,c.onStateChange=r.onStateChange,c.declareService=r.declareService,c.onEvent=r.onEvent,c.prototype=newr,c.prototype.constructor=c,c.prototype.__path=a,c.prototype.__acquired_method_dict={},c.__template_element=(newd).parseFromString(b.responseText,"text/html"),f=H.parseGadgetHTMLDocument(c.__template_element,a);for(einf)f.hasOwnProperty(e)&&(c.prototype["__"+e]=f[e]);J[a]=c}returnJ[a]}vare;returne=J.hasOwnProperty(a)?c.resolve(J[a]):(newc.Queue).push(function(){returnn(a)}).push(function(a){returnb(a)})},H.clearGadgetKlassList=function(){J={},K={},L={}},H.parseGadgetHTMLDocument=function(a,b){varc,d,e={title:"",interface_list:[],required_css_list:[],required_js_list:[]};if(!b||!N.test(b))thrownewError("The url should be absolute: "+b);if(9!==a.nodeType)thrownewError("The first parameter should be an HTMLDocument");if(e.title=a.title,null!==a.head)for(c=0;c<a.head.children.length;c+=1)d=a.head.children[c],null!==d.href&&("stylesheet"===d.rel?e.required_css_list.push(H.getAbsoluteURL(d.getAttribute("href"),b)):"SCRIPT"!==d.nodeName||"text/javascript"!==d.type&&d.type?"http://www.renderjs.org/rel/interface"===d.rel&&e.interface_list.push(H.getAbsoluteURL(d.getAttribute("href"),b)):e.required_js_list.push(H.getAbsoluteURL(d.getAttribute("src"),b)));returne},b.rJS=b.renderJS=H,b.__RenderJSGadget=r,b.__RenderJSEmbeddedGadget=z,b.__RenderJSIframeGadget=B,E()}(document,window,RSVP,DOMParser,Channel,MutationObserver,Node,FileReader,Blob,navigator,Event);