/* >>> file start: js/jquery/jquery.lj.repostbutton.js */ LJ.UI.registerTemplate('templates-CleanHtml-PaidRepost', "{{if !$data.owner}}+{{html $data.cost}}{{else $data.budget}}{{html $data.budget}}{{/if}}{{html $data.count}} ", 'JQuery.stat'); LJ.UI.registerTemplate('templates-CleanHtml-Repost', "{{if !$data.owner}}+{{html $data.cost}}{{else $data.budget}}{{html $data.budget}}{{/if}}{{html $data.count}} ", 'JQuery.stat'); LJ.UI.registerTemplate('templates-CleanHtml-reposted', "{{if $data.content}} {{each ($value.users || $data.users)}}{{if !((!$index) && !($value.dropComma || $data.dropComma))}}, {{/if}}{{html ($value.user || $data.user)}}{{/each}} {{else}}
{{html LJ.mltext(\'repost.popup.head\')}}
{{html LJ.mltext(\'repost.popup.footer\')}}
{{/if}} ", 'JQuery.stat'); !function(t){return t}(),function(t){"use strict";t.widget("lj.repostbutton",t.lj.basicWidget,{options:{classNames:{active:"repost-button-active",inactive:"repost-button-inactive",popupLoad:"b-reposted-popup-load",popupNomore:"b-reposted-popup-footer-hide",repostError:"repost-error"},selectors:{counterParent:".lj-button-c",button:".lj-button-b",counter:".lj-like-item-count",buttonLink:".lj-button-link",popupContent:".b-reposted-popup-content",popupFooter:".b-reposted-popup-footer",popupMore:".b-reposted-popup-footer > a"},templates:{popup:"templates-CleanHtml-reposted"},url:"",reposted:!1,cost:0,budget:0,paid:!1},_create:function(){this.options.classNames={active:"b-flatrepost-reposted",inactive:"b-flatrepost-disabled",popupLoad:"b-reposted-popup-load",popupNomore:"b-reposted-popup-footer-hide",repostError:"repost-error"},this.options.selectors={counterParent:".b-flatrepost-counter",button:".b-flatrepost-name",counter:".b-flatrepost-counter",buttonLink:".b-flatrepost-name",popupContent:".b-reposted-popup-content",popupFooter:".b-reposted-popup-footer",popupMore:".b-reposted-popup-footer > a"},t.lj.basicWidget.prototype._create.apply(this),this.options.url||console.warn(this.widgetName,": no url in options, initialization won't continue"),this._journal=LJ.get("currentJournal"),this._count=null,this._remote=LJ.get("remoteUser"),this._reposted=this.options.reposted,this._el("buttonLink"),this._href=this.element.find(this._s("button")).data("href"),this._href=LJ.Util.Journal.parseLink(this._href)||{},this._canRepost()||(this.element.addClass(this._cl("inactive")),this._buttonLink.removeAttr("title"),this._lock()),this._popup=null,this._popupContent=null,this._popupLocked=!1,this._lastUser=null,this._el("counterParent"),this._el("counter"),Number(this._counter.html())||this._hideCounter(),this._bindControls()},_hideCounter:function(){this._counterParent.addClass("empty")},_showCounter:function(){this._counterParent.removeClass("empty")},_bindControls:function(){var e=this;this.element.on("click",this._s("button"),this._onUpdateButton.bind(this)),this._counterParent.one("click",function(){Number(e._counter.html())&&(e._popup=e._tmpl("popup"),e._el("popupFooter",e._popup),e._popupContent=e._popup.find(e._s("popupContent")),e._popup.bubble({showOn:"click",align:"side",alwaysShowUnderTarget:!0,target:e._counterParent}).on("bubblehide",function(){e._lastUser=null,e._popupContent.empty(),e._popupFooter.removeClass(e._cl("popupNomore"))}).on("bubbleshow",function(){e._loadRepostedList()}).on("click",e._s("popupMore"),e._loadRepostedList.bind(e)),Function.defer(function(){e._popup.bubble("show")}))}),t.lj.basicWidget.prototype._bindControls.apply(e)},_loadRepostedList:function(t){var e=this;t&&t.preventDefault(),this._popupLocked||(this._popupLocked=!0,this._popupContent.addClass(this._cl("popupLoad")),LJ.Api.call("repost.get_list",{url:this.options.url,last:this._lastUser},function(t){e._popupContent.removeClass(e._cl("popupLoad")),e._popupLocked=!1,t.error?e._handleAnswer(t):(e._render(t.users,t.nomore,t.count),e._lastUser=t.last)}))},_render:function(t,e,o){var s=this;t.length>0&&s._tmpl("popup",{content:!0,dropComma:!!s._lastUser,users:t}).appendTo(s._popupContent),this._updateCounter(o),e&&s._popupFooter.addClass(s._cl("popupNomore"))},_onUpdateButton:function(t){this.locked()||this.toggleRepost(),t.preventDefault()},_handleAnswer:function(t){if(t.hasOwnProperty("delete")&&(t.message&&this._showMessage(t.message),this.paid!==Boolean(t.paid)||this.paid&&this.cost!==t.cost))return void this.element.replaceWith(LJ.Social.renderRepostButton(this.options.url,t));if(t.error){if(t.error.message&&this._showMessage(t.error.message),t.error.data)return void this.element.replaceWith(LJ.Social.renderRepostButton(this.options.url,t.error.data))}else this._updateButton(!this._reposted);!t.hasOwnProperty("count")&&t.hasOwnProperty("delete")&&(t.count=this._count-1),this._updateCounter(t.count),this._unlock()},_showMessage:function(e){var o=t("
",{"class":this._cl("repostError"),text:e}).bubble({target:this.element,align:"center",hide:function(){o.remove()}}).bubble("show")},_updateButton:function(t){this._reposted=t,this.element.toggleClass(this._cl("active"),this._reposted)},_updateCounter:function(t){"undefined"!=typeof t&&(this._count=Number(t),this._counter.html(this._count)),Number(this._counter.html())?this._showCounter():this._hideCounter()},_canRepost:function(){return LJ.get("preview")?!1:this._remote?LJ.get("remote_is_identity")?!1:this._remote===this._href.journal?!1:!0:!1},toggleRepost:function(){var t=this,e={url:this.options.url};this._canRepost()&&(null===this._count&&(this._count=parseInt(this._el("counter").html(),10)||0),this._lock(),this._reposted?LJ.Api.call("repost.delete",e,function(e){e.error||e.reposted||t._journal!==t._remote||location.href.match(/\/(friends|times|feed)\b/)?t._handleAnswer(e):location.reload()}):(e.timezone=LJ.Util.Date.timezone(),this.options.paid&&(e.cost=this.options.cost),LJ.Api.call("repost.create",e,this._handleAnswer.bind(this))))}})}(jQuery); /* <<< file end: js/jquery/jquery.lj.repostbutton.js */ //# map link was there [jquery.lj.repostbutton.js.map] /* >>> file start: js/threeposts.js */ !function(t){return t}(),function(t){"use strict";t(function(){function e(){var t=3,e={7:4,8:4,9:3};return t=e[v]>0?e[v]:v}function i(){var t=1;if(M>H)return t=1;if(v>=2){t=Math.floor(H/M),t>v&&(t=v);var e=v%t;if(e>0)if(v%(t-1)===0)t--;else if(v%(t+1)===0)t++;else if(1===e){var i=H/(t+1);i>=E&&t++}}return t}function n(){H=u.width(),b=O>H?i():e(),s(H/b)}function s(t){var e=[150,300,330,400,500,600,800],i=["xxs","xs","s","m","l","xl","xxl"];e.forEach(function(n){t>n&&(F=i[e.indexOf(n)])})}function r(){u.find("."+w).removeClass(w),"xs"===F&&z.each(function(){var e=t(this).find("."+_),i=e.get(0).getClientRects().length;2>i&&t(this).addClass(w)})}function o(t){return p.get(t).scrollHeight}function a(){if(0===C&&g.height()>0){p.height("auto");var t=p.map(o),e=Math.max.apply(Math,t);p.height(e)}}function h(){H=u.width();var t=[400,600,800,1e3,1200,1400],e=["xs","s","m","l","xl","xxl"];t.forEach(function(i){H>i&&(j=e[t.indexOf(i)])}),n(),f()}function f(){var t=c+"--size-"+j,e=c+"--items-in-row-"+b,i=c+"--item-size-"+F,n=l+"\n"+t+"\n"+e+"\n"+i;u.attr("class",n),u.attr("data-item-layout",F),x.hide(),d.show(),a(),r()}var c="threeposts",u=t("."+c),l=u.attr("class"),x=t(".placeholder-threeposts"),d=t(".threeposts__items"),m="threeposts__item",p=t("."+m),g=t(p.get(0)),v=p.length,_="threeposts__title-inner",w="threeposts__item--short-title",y="threeposts__item--pic",z=t("."+y),C=z.length,M=235,E=200,O=1200,b=3,j="xxs",F="xxs",H=u.width();h(),t(window).resize(LJ.Function.debounce(h,50))})}(jQuery); /* <<< file end: js/threeposts.js */ //# map link was there [threeposts.js.map] /* >>> file start: js/jquery/jquery.lj.ljcut.js */ !function(t){return t}(),function(t){"use strict";var e=[];t.widget("lj.ljcut",t.lj.basicWidget,{options:{journalid:null,ditemid:null,cutid:null,placeholders:0,sticky:!1,selectors:{expand:".ljcut-link-expand",collapse:".ljcut-link-collapse",collapseLink:".ljcut-pseudolink-collapse",stickyLink:".b-sticky-cut-link"},classNames:{preloader:"ljcut-link-expanding",expanded:"ljcut-expanded","sticky-cut-visible":"b-sticky-cut-visible",cut:".b-sticky-cut"}},_create:function(){t.lj.basicWidget.prototype._create.apply(this),this._window=t(window),this.cut=t(this._cl("cut")),this._stickyCollapseHandler=this._collapse.bind(this),this.content=null,this._isMac=/Mac/.test(navigator.userAgent),this._isOpera=/Opera/.test(navigator.userAgent),this._collapseNode=t('{close}'.supplant({close:this._ml("collapse")})),this._bindControls(),this._id=e.length,e[this._id]=!1},_bindControls:function(){var e=!1,i=[this._s("expand"),this._s("collapse")].join(", ");t.lj.basicWidget.prototype._bindControls.apply(this),this.element.on("click",this._s("expand"),this._expand.bind(this)),this.element.on("click",this._s("collapse"),this._collapse.bind(this)),this.element.on("touchstart",i,function(){e=!0}),this.element.on("touchmove",i,function(){e=!1}),this.element.on("touchend",i,function(i){e&&(t(i.target).trigger("click"),i.preventDefault())}),t(document).on("keydown",this._shortcuts.bind(this)),this._window.on("scroll",this._scrolling.bind(this))},_shortcuts:function(t){var e=this._isMac&&this._isOpera?t.metaKey:t.ctrlKey,i=t.altKey;if(e&&i){switch(t.which){case 61:case 187:this.expand();break;case 173:case 31:case 109:case 189:this.collapse()}t.preventDefault()}},_togglePreloader:function(t){this.element.toggleClass(this._cl("preloader"),t)},_toggleContent:function(e,i){var s,n=this;!this.locked()&&this.content&&(this._lock(),"function"!=typeof i&&(i=t.noop),this.element.toggleClass(n._cl("expanded"),e),e?this._showContent(i):(s=this.element.offset().top-30,this.element.is(":screenable")?this._hideContent(i):t("body,html").animate({scrollTop:s},300,function(){setTimeout(n._hideContent.bind(n,i),50)})))},_showContent:function(t){var e=this;this.content.show(50,function(){e._trigger("show",null,e),t(),e._unlock()})},_hideContent:function(t){var e=this;this.content.slideUp(50,function(){e._trigger("hide",null,e),t(),e._unlock()})},_requestContent:function(e){var i=this;this._lock(),this._togglePreloader(!0),LJ.Api.call("event.get_lj_cut",e,function(e){i.content=t("
",{html:e.text}).hide(),i.content.find("a:not([target])").attr("target","_self"),i.element.after(i.content),i._unlock(),i._togglePreloader(!1),i._toggleContent(!0,i._addHandlers.bind(i)),e.counter_image_url&&LJ.Stat.addCounter(e.counter_image_url)})},_addHandlers:function(){this.content.ljLikes(),LJ.Event.trigger("social:widgets:parse")},expand:function(){this.locked()||(this.content?this._toggleContent(!0):this._requestContent({journalid:this.options.journalid,ditemid:this.options.ditemid,cutid:this.options.cutid,placeholders:this.options.placeholders}))},collapse:function(){this.locked()||(this._toggleContent(!1),this._toggleStickyClass(!1))},_expand:function(t){return t.metaKey||t.ctrlKey?!0:(t.preventDefault(),void this.expand())},_collapse:function(t){return t.metaKey||t.ctrlKey?!0:(t.preventDefault(),e[this._id]=!1,void this.collapse())},_scrolling:function(){this._updateStickyCutState()},_updateStickyCutState:function(){var i,s,n,o,l,c,a;this._isExpanded()&&this.options.sticky&&this.content&&(i=this._window.height(),s=t(document).scrollTop(),n=this.content.height(),o=this.content.offset().top,l=o+n,a=this.element.find(this._s("collapse")),c=s>o&&l-i>s,e[this._id]=c,this._toggleStickyClass(c))},_toggleStickyClass:function(i){this.cut.toggleClass(this._cl("sticky-cut-visible"),e.indexOf(!0)>-1),i?t(document).on("click",this._s("stickyLink"),this._stickyCollapseHandler):t(document).off("click",this._s("stickyLink"),this._stickyCollapseHandler)},_addBottomCollapser:function(){return!this._bottomCloser&&this.options.sticky&&(this._bottomCloser=this._collapseNode.appendTo(this.content),this._bottomCloser.find(this._s("collapseLink")).on("click",this._bottomCloserClickHandler.bind(this))),this._bottomCloser},_bottomCloserClickHandler:function(){event.preventDefault(),this.collapse()},_isExpanded:function(){return this.element.hasClass(this._cl("expanded"))},_isCollapsed:function(){return!this._isExpanded()}})}(jQuery); /* <<< file end: js/jquery/jquery.lj.ljcut.js */ //# map link was there [jquery.lj.ljcut.js.map] /* >>> file start: js/core/string.js */ !function(t){return t}(),function(){"use strict";LJ.define("LJ.String"),LJ.String.pad=function(t,n,r){if(t=t.toString(),"undefined"==typeof n)throw new Error("You should provide padding string length");if("undefined"==typeof r)throw new Error("You should provide padding symbol");if(t.length>=n)return t;for(;t.length":">",'"':""","'":"'"};return t.replace(/([<>&\"\'])/g,function(t,r){return n[r]?n[r]:r})}}(); /* <<< file end: js/core/string.js */ //# map link was there [string.js.map] /* >>> file start: js/core/angular/activity.js */ !function(){"use strict";function t(t,n){function c(){return u}function e(t){u=t}function i(){n.cancel(o),e(!0),o=n(e.bind(this,!1),9e5)}var u,o;return i(),t.on("click touchstart touchend keydown mousemove mousewheel",LJ.Function.debounce(i,100,!0)),{isActive:c}}angular.module("LJ.Activity",[]),angular.module("LJ.Activity").factory("Activity",t),t.$inject=["$document","$timeout"]}(); /* <<< file end: js/core/angular/activity.js */ //# map link was there [activity.js.map] /* >>> file start: js/core/angular/api.js */ //!= require js/core/angular/messages.js //= require js/core/angular/activity.js !function(){"use strict";function e(e,n,t,r,a,c){function i(e,n){return"undefined"==typeof n?e:e+angular.toJson(s(n))}function s(e){var n;return angular.isObject(e)?(n={},Object.keys(e).sort().forEach(function(t){n[t]=s(e[t])}),n):e}function o(e,n){f.remove(i(e,n))}function u(n,s,o,u){var g,l,p=r.defer(),d={cache:!1,silent:!1,meta:!1},m=!1;return c.isActive()?(angular.isObject(s)&&null!==s||(s={}),angular.isObject(o)&&(u=o,o=null),u=angular.extend(d,u||{}),l=i(n,s),u.cache&&(g=f.get(l),g&&(m=!0)),m||(g=p.promise,LJ.Api.call(n,s,function(n){e(function(){n.error?p.reject(n.error):p.resolve(n),t.$apply()},0)}),u.cache&&f.put(l,g)),LJ.Event.trigger("api:request:change",n,!0),g.then(function(){LJ.Event.trigger("api:request:change",n,!1)}),u.silent||g.then(function(e){var n={};"undefined"!=typeof e.message&&(angular.isString(e.message)?(n.body=e.message,n.type="success"):(n.body=e.message.content,n.type="success"),a.add(n))},function(e){"undefined"!=typeof e.message&&1!==e.code&&a.error({body:e.message})}),u.meta&&(g=g.then(function(e){return{response:e,fromCache:m}})),angular.isFunction(o)&&g.then(o),g):(p.reject(),p.promise)}var g={call:u,invalidate:o},f=n("LJApiPromises");return g}angular.module("LJ.Api",["LJ.Messages","LJ.Activity"]).factory("Api",e),e.$inject=["$timeout","$cacheFactory","$rootScope","$q","Messages","Activity"]}(); /* <<< file end: js/core/angular/api.js */ //# map link was there [api.js.map] /* >>> file start: js/lib/jquery-ui/jquery.ui.position.min.js */ !function(t,e){t.ui=t.ui||{};var o=/left|center|right/,i=/top|center|bottom/,n="center",s={},f=t.fn.position,l=t.fn.offset;t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var l,r,a,h=t(e.of),c=h[0],p=(e.collision||"flip").split(" "),u=e.offset?e.offset.split(" "):[0,0];return 9===c.nodeType?(l=h.width(),r=h.height(),a={top:0,left:0}):c.setTimeout?(l=h.width(),r=h.height(),a={top:h.scrollTop(),left:h.scrollLeft()}):c.preventDefault?(e.at="left top",l=r=0,a={top:e.of.pageY,left:e.of.pageX}):(l=h.outerWidth(),r=h.outerHeight(),a=h.offset()),t.each(["my","at"],function(){var t=(e[this]||"").split(" ");1===t.length&&(t=o.test(t[0])?t.concat([n]):i.test(t[0])?[n].concat(t):[n,n]),t[0]=o.test(t[0])?t[0]:n,t[1]=i.test(t[1])?t[1]:n,e[this]=t}),1===p.length&&(p[1]=p[0]),u[0]=parseInt(u[0],10)||0,1===u.length&&(u[1]=u[0]),u[1]=parseInt(u[1],10)||0,"right"===e.at[0]?a.left+=l:e.at[0]===n&&(a.left+=l/2),"bottom"===e.at[1]?a.top+=r:e.at[1]===n&&(a.top+=r/2),a.left+=u[0],a.top+=u[1],this.each(function(){var o,i=t(this),f=i.outerWidth(),h=i.outerHeight(),c=parseInt(t.curCSS(this,"marginLeft",!0))||0,g=parseInt(t.curCSS(this,"marginTop",!0))||0,d=f+c+(parseInt(t.curCSS(this,"marginRight",!0))||0),m=h+g+(parseInt(t.curCSS(this,"marginBottom",!0))||0),y=t.extend({},a);"right"===e.my[0]?y.left-=f:e.my[0]===n&&(y.left-=f/2),"bottom"===e.my[1]?y.top-=h:e.my[1]===n&&(y.top-=h/2),s.fractions||(y.left=Math.round(y.left),y.top=Math.round(y.top)),o={left:y.left-c,top:y.top-g},t.each(["left","top"],function(i,n){t.ui.position[p[i]]&&t.ui.position[p[i]][n](y,{targetWidth:l,targetHeight:r,elemWidth:f,elemHeight:h,collisionPosition:o,collisionWidth:d,collisionHeight:m,offset:u,my:e.my,at:e.at})}),t.fn.bgiframe&&i.bgiframe(),i.offset(t.extend(y,{using:e.using}))})},t.ui.position={fit:{left:function(e,o){var i=t(window),n=o.collisionPosition.left+o.collisionWidth-i.width()-i.scrollLeft();e.left=n>0?e.left-n:Math.max(e.left-o.collisionPosition.left,e.left)},top:function(e,o){var i=t(window),n=o.collisionPosition.top+o.collisionHeight-i.height()-i.scrollTop();e.top=n>0?e.top-n:Math.max(e.top-o.collisionPosition.top,e.top)}},flip:{left:function(e,o){if(o.at[0]!==n){var i=t(window),s=o.collisionPosition.left+o.collisionWidth-i.width()-i.scrollLeft(),f="left"===o.my[0]?-o.elemWidth:"right"===o.my[0]?o.elemWidth:0,l="left"===o.at[0]?o.targetWidth:-o.targetWidth,r=-2*o.offset[0];e.left+=o.collisionPosition.left<0?f+l+r:s>0?f+l+r:0}},top:function(e,o){if(o.at[1]!==n){var i=t(window),s=o.collisionPosition.top+o.collisionHeight-i.height()-i.scrollTop(),f="top"===o.my[1]?-o.elemHeight:"bottom"===o.my[1]?o.elemHeight:0,l="top"===o.at[1]?o.targetHeight:-o.targetHeight,r=-2*o.offset[1];e.top+=o.collisionPosition.top<0?f+l+r:s>0?f+l+r:0}}}},t.offset.setOffset||(t.offset.setOffset=function(e,o){/static/.test(t.curCSS(e,"position"))&&(e.style.position="relative");var i=t(e),n=i.offset(),s=parseInt(t.curCSS(e,"top",!0),10)||0,f=parseInt(t.curCSS(e,"left",!0),10)||0,l={top:o.top-n.top+s,left:o.left-n.left+f};"using"in o?o.using.call(e,l):i.css(l)},t.fn.offset=function(e){var o=this[0];return o&&o.ownerDocument?e?t.isFunction(e)?this.each(function(o){t(this).offset(e.call(this,o,t(this).offset()))}):this.each(function(){t.offset.setOffset(this,e)}):l.call(this):null}),t.curCSS||(t.curCSS=t.css),function(){var e,o,i,n,f,l=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(l?"div":"body"),i={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},l&&t.extend(i,{position:"absolute",left:"-1000px",top:"-1000px"});for(var a in i)e.style[a]=i[a];e.appendChild(r),o=l||document.documentElement,o.insertBefore(e,o.firstChild),r.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",n=t(r).offset(function(t,e){return e}).offset(),e.innerHTML="",o.removeChild(e),f=n.top+n.left+(l?2e3:0),s.fractions=f>21&&22>f}()}(jQuery); /* <<< file end: js/lib/jquery-ui/jquery.ui.position.min.js */ //# map link was there [jquery.ui.position.min.js.map] /* >>> file start: js/lib/jquery-ui/jquery.ui.autocomplete.min.js */ !function(e,t){var i=0;e.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var t,i=this,n=this.element[0].ownerDocument;this.isMultiLine=this.element.is("textarea"),this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(n){if(!i.options.disabled&&!i.element.propAttr("readOnly")){t=!1;var s=e.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:i._move("previousPage",n);break;case s.PAGE_DOWN:i._move("nextPage",n);break;case s.UP:i._keyEvent("previous",n);break;case s.DOWN:i._keyEvent("next",n);break;case s.ENTER:case s.NUMPAD_ENTER:i.menu.active&&(t=!0,n.preventDefault());case s.TAB:if(!i.menu.active)return;i.menu.select(n);break;case s.ESCAPE:i.element.val(i.term),i.close(n);break;default:clearTimeout(i.searching),i.searching=setTimeout(function(){i.term!=i.element.val()&&(i.selectedItem=null,i.search(null,n))},i.options.delay)}}}).bind("keypress.autocomplete",function(e){t&&(t=!1,e.preventDefault())}).bind("focus.autocomplete",function(){i.options.disabled||(i.selectedItem=null,i.previous=i.element.val())}).bind("blur.autocomplete",function(e){i.options.disabled||(clearTimeout(i.searching),i.closing=setTimeout(function(){i.close(e),i._change(e)},150))}),this._initSource(),this.menu=e("
    ").addClass("ui-autocomplete").appendTo(e(this.options.appendTo||"body",n)[0]).mousedown(function(t){var n=i.menu.element[0];e(t.target).closest(".ui-menu-item").length||setTimeout(function(){e(document).one("mousedown",function(t){t.target!==i.element[0]&&t.target!==n&&!e.ui.contains(n,t.target)&&i.close()})},1),setTimeout(function(){clearTimeout(i.closing)},13)}).menu({focus:function(e,t){var n=t.item.data("item.autocomplete");!1!==i._trigger("focus",e,{item:n})&&/^key/.test(e.originalEvent.type)&&i.element.val(n.value)},selected:function(e,t){var s=t.item.data("item.autocomplete"),o=i.previous;i.element[0]!==n.activeElement&&(i.element.focus(),i.previous=o,setTimeout(function(){i.previous=o,i.selectedItem=s},1)),!1!==i._trigger("select",e,{item:s})&&i.element.val(s.value),i.term=i.element.val(),i.close(e),i.selectedItem=s},blur:function(e,t){i.menu.element.is(":visible")&&i.element.val()!==i.term&&i.element.val(i.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),e.fn.bgiframe&&this.menu.element.bgiframe(),i.beforeunloadHandler=function(){i.element.removeAttr("autocomplete")},e(window).bind("beforeunload",i.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),e(window).unbind("beforeunload",this.beforeunloadHandler),e.Widget.prototype.destroy.call(this)},_setOption:function(t,i){e.Widget.prototype._setOption.apply(this,arguments),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(e(i||"body",this.element[0].ownerDocument)[0]),"disabled"===t&&i&&this.xhr&&this.xhr.abort()},_initSource:function(){var t,i,n=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,n){n(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,s){n.xhr&&n.xhr.abort(),n.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e,t){s(e)},error:function(){s([])}})}):this.source=this.options.source},search:function(e,t){return e=null!=e?e:this.element.val(),this.term=this.element.val(),e.length").data("item.autocomplete",i).append(e("").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.first()&&/^previous/.test(e)||this.menu.last()&&/^next/.test(e)?(this.element.val(this.term),void this.menu.deactivate()):void this.menu[e](t):void this.search(null,t)},widget:function(){return this.menu.element},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return n.test(e.label||e.value||e)})}})}(jQuery),function(e){e.widget("ui.menu",{_create:function(){var t=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(i){e(i.target).closest(".ui-menu-item a").length&&(i.preventDefault(),t.select(i))}),this.refresh()},refresh:function(){var t=this,i=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");i.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(i){t.activate(i,e(this).parent())}).mouseleave(function(){t.deactivate()})},activate:function(e,t){if(this.deactivate(),this.hasScroll()){var i=t.offset().top-this.element.offset().top,n=this.element.scrollTop(),s=this.element.height();0>i?this.element.scrollTop(n+i):i>=s&&this.element.scrollTop(n+i-s+t.height())}this.active=t.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",e,{item:t})},deactivate:function(){this.active&&(this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null)},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,t,i){if(!this.active)return void this.activate(i,this.element.children(t));var n=this.active[e+"All"](".ui-menu-item").eq(0);n.length?this.activate(i,n):this.activate(i,this.element.children(t))},nextPage:function(t){if(this.hasScroll()){if(!this.active||this.last())return void this.activate(t,this.element.children(".ui-menu-item:first"));var i=this.active.offset().top,n=this.element.height(),s=this.element.children(".ui-menu-item").filter(function(){var t=e(this).offset().top-i-n+e(this).height();return 10>t&&t>-10});s.length||(s=this.element.children(".ui-menu-item:last")),this.activate(t,s)}else this.activate(t,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(t){if(this.hasScroll()){if(!this.active||this.first())return void this.activate(t,this.element.children(".ui-menu-item:last"));var i=this.active.offset().top,n=this.element.height(),s=this.element.children(".ui-menu-item").filter(function(){var t=e(this).offset().top-i+n-e(this).height();return 10>t&&t>-10});s.length||(s=this.element.children(".ui-menu-item:first")),this.activate(t,s)}else this.activate(t,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()>> file start: js/core/angular/autocomplete.js */ //= require js/lib/jquery-ui/jquery.ui.position.min.js //= require js/lib/jquery-ui/jquery.ui.autocomplete.min.js angular.module("LJ.Autocomplete",[]).directive("ljAutocomplete",["$parse",function(e){return{restrict:"A",link:function(t,o,l){function n(e,t){var n,c,i,r,f,d=e.term,v=LJ.DOM.getSelection(o).start,A=d.slice(0,v),j=d.slice(v);return j.length&&","!==j.charAt(0)?void t():(A=A.trim(),c=A.lastIndexOf(","),-1===c?(r=A,p=[]):(r=A.slice(c+1).trim(),p=A.slice(0,c).split(/\,\s*/)),j.length?(j=j.slice(1).trim(),s=j.split(/\,\s*/),""===s[s.length-1]&&s.pop()):s=[],n=p.concat(s),r.length>> file start: js/core/angular/ref.js */ !function(e){return e}(),function(){"use strict";angular.module("LJ.Ref",[]).factory("Ref",function(){function e(e,n){return f[e]?void console.error("Ref element with id `%s` has been registered before.",e):void(f[e]=n)}function n(e){f[e]&&delete f[e]}function o(e){var n=f[e];return n||console.error("Ref `%s` not found.",e),n}function r(e,n){"undefined"==typeof n&&(n={});var r=o(e),f=angular.element("html, body");if(!r)return void console.error("Could not scroll to the ref `%s` that has not been already defined.",e);var l=r.offset().top;n.onlyUp&&angular.element(window).scrollTop()<=l||(!n.onlyOutOfScreen||t(r))&&(n.toParent&&(f=r.parent(),l=0),f.animate({scrollTop:l}))}function t(e){var n=angular.element(window),o=n.scrollTop(),r=o+n.height(),t=e.offset().top;return t>r-100||o>t}var f={};return{add:e,remove:n,get:o,scrollTo:r}}).directive("ljRef",["Ref",function(e){return{restrict:"A",scope:!0,link:function(n,o,r){var t=r.ljRef;e.add(t,o),n.$on("$destroy",function(){e.remove(t)})}}}])}(); /* <<< file end: js/core/angular/ref.js */ //# map link was there [ref.js.map] /* >>> file start: js/core/angular/bubble.js */ //= require js/core/angular/ref.js Site.page.template['Widgets/ljBubble.tmpl'] = '\n
    \n
    \n \n \n \n \n \n \n \n
    \n \n
    \n
    \n
    \n'; Site.page.template['angular/confirm.bubble.ng.tmpl'] = '
    \n
    \n {{ bubble.options.header }}\n
    \n
    \n
    \n \n \n
    \n
    \n'; //= require_ml confirm.bubble.yes //= require_ml confirm.bubble.no !function(){"use strict";function e(e,o,t,n,r){return{scope:!0,link:function(i,l,a){function u(){var e=i.arrow.vertical,o=i.arrow.horizontal;i.visibility="hidden",$.keepInitialWidth&&!$.widthSaved&&($.widthSaved=!0,C.width(C.width())),f(),d()&&(i.arrow.vertical="b"===e?c("alwaysTop")?"b":"t":c("alwaysBottom")?"t":"b"),p()&&(i.arrow.horizontal="l"===o?c("alwaysRight")?"l":"r":c("alwaysLeft")?"r":"l"),i.arrow.horizontal!==o||i.arrow.vertical!==e?n(s):i.visibility="visible"}function s(){return f(),p()&&!c("aside")&&i.arrow.horizontal?(i.arrow.horizontal="",void s()):void(i.visibility="visible")}function c(e){return i.bubble.options[e]||$[e]}function f(){var o=e.node||l,t=o.offset().left+Math.floor(o.outerWidth()/2),n=i.bubble.options.forceX||0,r=i.bubble.options.forceY||0;c("aside")?(i.position.x="r"===i.arrow.horizontal?o.offset().left-C.outerWidth()-B.outerWidth()+n:o.offset().left+o.outerWidth()+B.outerWidth()+n,i.position.y=o.offset().top-B.position().top+(o.outerHeight()-B.outerHeight())/2+r):(i.position.x=i.arrow.horizontal?t-B.position().left-Math.floor(B.outerWidth()/2)-2+n:t-C.outerWidth()/2-Math.floor(B.outerWidth()/4)-2+n,i.position.y="t"===i.arrow.vertical?o.offset().top+o.outerHeight()+B.outerHeight()+r:o.offset().top-B.outerHeight()-C.outerHeight()+r)}function b(){i.position.x=-9999}function d(){var e=L.scrollTop();return i.position.ye+L.outerHeight()}function p(){var e=L.scrollLeft();return i.position.xe+L.outerWidth()}function h(o){o.preventDefault(),e.current!==$.name&&n(function(){e.open($.name)})}function v(){m(),x&&(y=n(e.close,x))}function m(){n.cancel(y)}function w(){m(),e.close()}function g(){i.show&&n(W)}var y,$=o(a.ljBubble)(i),z=$.name,C=t(r.get("ljBubble.tmpl"))(i),W=LJ.Function.throttle(u,50),B=C.find(".i-popup-arr"),L=angular.element(window),j=$.eventType||"click",x=Number($.autoClose||0);i.show=!1,e._register(z,$),i.template=$.template||z+".html",i.bubble={name:z,close:e.close,options:e.options(z)},i.clear=function(){i.arrow={vertical:$.arrowInitialVertical||"t",horizontal:$.arrowInitialHorizontal||"l"}},i.position={x:-9999,y:-9999},i.visibility="hidden",i.arrowClass=function(){var e=i.bubble.options,o=i.arrow.vertical,t=i.arrow.horizontal;return e.aside||$.aside?"i-popup-arr"+t+o:"i-popup-arr"+o+t},i.$watch(function(){return e.current},function(e){b(),n(function(){i.show=e===z,e&&i.show&&(i.clear(),n(W))})},!0),$.disableClick||l.on(j,h),$.disableResizeListener||L.on("resize",g),$.recalculateOnOrientationChange&&L.on("orientationchange",function(){g(),L.on("resize",g),n(function(){L.off("resize",g)},1e3)}),$.recalculateOnScroll&&L.on("scroll",g),$.closeOnScroll&&L.on("scroll",w),angular.element("body").append(C),l.on("mouseleave",v),C.on("mouseenter",m),C.on("mouseleave",v),i.clear(),i.$on("$destroy",function(){l.off(j,h),L.off("resize",g),L.off("scroll",g),L.off("scroll",e.close),l.off("mouseleave",v),C.off("mouseenter",m),C.off("mouseleave",v),e._unregister(z),C.remove()})}}}function o(e,o,t,n,r,i){var l={},a={},u="p-openpopup";return l.current=null,l.node=null,l.register=function(){function t(t,l){var a,u,s;return t&&t.name&&t.template?(a=t.name,t.disableClick=!0,r[a]?(r[a].count+=1,n.bind(null,a)):(u=angular.element("
    ").attr("lj-bubble",angular.toJson(t)),s="undefined"==typeof l,s&&(l=e.$new(!0)),u.appendTo("body"),o(u)(l),r[a]={count:1,node:u,scope:l,isScopeCreated:s},n.bind(null,a))):void i.error("Incorrect bubble options. You should provide name and template.",t)}function n(e){var o=r[e];o&&(o.count-=1,0===o.count&&(o.isScopeCreated||o.scope.$destroy(),o.node.remove(),delete r[e]))}var r={};return t}(),l.exists=function(e){return a.hasOwnProperty(e)},l._register=function(e,o){var t;if(a.hasOwnProperty(e))throw"Warning: bubble with name "+e+" has been registered before!";t=angular.isDefined(o)?angular.copy(o):{},t=angular.extend({closeControl:!0},t),a[e]=Object.create(t)},l._unregister=function(e){delete a[e],l.current===e&&(l.current=null)},l.confirm=function(e){function o(){r.scrollBy(0,1),r.scrollBy(0,-1)}var t=LJ.ml("confirm.bubble.yes"),i=LJ.ml("confirm.bubble.no"),a={closeControl:!1,confirm:e.confirm,header:e.header,text:e.text,yes:e.yes||t,no:e.no||i};l.open(e.id,a),n(o),n(o,100),n(o,200),n(o,300)},l.open=function(o,n,r){return a.hasOwnProperty(o)?(n instanceof jQuery&&(r=n,n={}),angular.isString(n)&&(r=t.get(n),n={}),angular.isObject(n)&&l.options(o,n),r instanceof jQuery&&(l.node=r),angular.isString(r)&&(l.node=t.get(r)),l.current=o,e.$broadcast("bubble:open",o,n,r),e.$broadcast("bubble:open:"+o,o,n,r),void angular.element("body").addClass(u)):void i.error("Bubble `"+o+"` can't be opened, it has not been registered yet.")},l.close=function(){var o,t=l.current,n=a[t];e.$broadcast("bubble:close",t,n,l.node),e.$broadcast("bubble:close:"+t,t,n,l.node);for(o in n)n.hasOwnProperty(o)&&delete n[o];l.current=null,l.node=null,angular.element("body").removeClass(u)},l.options=function(e,o){return"undefined"==typeof o||o===a[e]?a[e]:void angular.copy(o,a[e])},l}angular.module("LJ.Bubble",["LJ.Templates","LJ.Directives","LJ.Ref"]),angular.module("LJ.Bubble").factory("Bubble",o).directive("ljBubble",e),e.$inject=["Bubble","$parse","$compile","$timeout","$templateCache"],o.$inject=["$rootScope","$compile","Ref","$timeout","$window","$log"]}(); /* <<< file end: js/core/angular/bubble.js */ //# map link was there [bubble.js.map] /* >>> file start: js/core/angular/options.js */ function _typeof(n){return n&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n}angular.module("LJ.Options",[]).factory("Options",[function(){return{create:function(n){function e(e,t){"undefined"==typeof t?angular.extend(n,e):n[e]=t}function t(e){return n[e]}function o(){return n}if("undefined"==typeof n&&(n={}),"object"!==("undefined"==typeof n?"undefined":_typeof(n)))throw new TypeError("Options should be an object.");return{set:e,get:t,raw:o}}}}]); /* <<< file end: js/core/angular/options.js */ //# map link was there [options.js.map] /* >>> file start: js/core/angular/users.js */ //= require js/core/angular/api.js //= require js/core/angular/options.js !function(e){return e}(),function(){"use strict";angular.module("Users",["LJ.Api","LJ.Options"]).factory("Relations",["$q","$timeout","UsersCache",function(e,n,r){function t(t,i,u){var a=e.defer(),s={addFriend:{is_invite_sent:!0},removeFriend:{is_friend:!1},subscribe:{is_subscribedon:!0},unsubscribe:{is_subscribedon:!1},join:{is_invite_sent:!0},leave:{is_member:!1},setBan:{is_banned:!0},setUnban:{is_banned:!1}},o={addFriend:{is_invite_sent:!1},removeFriend:{is_friend:!0},subscribe:{is_subscribedon:!1},unsubscribe:{is_subscribedon:!0},join:{is_invite_sent:!1},leave:{is_member:!0},setBan:{is_banned:!1},setUnban:{is_banned:!0}},c=angular.copy(r.get(t)||{});return angular.isUndefined(u)&&(u={}),u.wait||r.update(t,s[i]||{}),LJ.Event.trigger("relations.change",{username:t,action:i,callback:function(e){n(function(){if(e.error)return u.wait||r.update(t,angular.extend(o[i],c)),void a.reject(e.error.message);var n=LJ.Object.pick(e,"is_banned","is_friend","is_member","is_subscriber","is_subscribedon","is_friend_of","is_invite_sent");r.update(t,n),a.resolve(e)})}}),a.promise}function i(e,n,i){var u=t(e,n?"subscribe":"unsubscribe",i);return n||u.then(function(){r.update(e,{filtermask:0})}),u}function u(e,n,r){return t(e,n?"addFriend":"removeFriend",r)}function a(e,n,r){return t(e,n?"join":"leave",r)}function s(e,n,r){return t(e,n?"setBan":"setUnban",r)}function o(e,n,r){return t(e,n?"banEverywhere":"unbanEverywhere",r)}return{toggleFriend:u,toggleSubscription:i,toggleMember:a,toggleBan:s,toggleBanEverywhere:o}}]).factory("Mask",function(){function e(e){return e>>>0}var n={};return n.change=function(n,r){var t=r.add,i=r.remove;return angular.isDefined(t)&&(angular.isArray(t)||(t=[t]),n=t.reduce(function(n,r){return e(n|Math.pow(2,r))},n)),angular.isDefined(i)&&(angular.isArray(i)||(i=[i]),n=i.reduce(function(n,r){var t=Math.pow(2,32)-1-Math.pow(2,r);return e(n&t)},n)),n},n.check=function(e,n){var r=Math.pow(2,n);return Boolean(e&r)},n}).factory("UsersCache",["$q","$cacheFactory","Options",function(e,n,r){function t(e){if(!angular.isUndefined(e)){var n=l.get(f.get("journal"))||{},r=e;return angular.isArray(e)||(e=[e]),e.forEach(function(e){if(e&&angular.isObject(e)&&!angular.isUndefined(e.username)){var r=n[e.username];n[e.username]=r?angular.extend(r,e):e}}),l.put(f.get("journal"),n),r}}function i(e){var n=l.get(f.get("journal"));return Boolean(n[e])}function u(e){var n;if(angular.isString(e))return n=l.get(f.get("journal")),n&&n[e]?n[e]:null;if(angular.isFunction(e))return s(e);if(angular.isUndefined(e))return s();throw new TypeError("Incorrect argument passed.")}function a(e){var n=l.get(f.get("journal"));return n||angular.isObject(n)?Object.keys(n).reduce(function(r,t){return String(n[t].id)===String(e)?n[t]:r},null):null}function s(e){var n,r=l.get(f.get("journal")),t=[];for(n in r)if(r.hasOwnProperty(n)){if(e&&!e(r[n]))continue;t.push(r[n])}return t}function o(e,n){var r=u(e)||{username:e};return angular.extend(r,n),t(r),r}var c,l=n("users"),f=r.create({journal:LJ.get("remoteUser")});return c={add:t,update:o,set:f.set,get:u,getById:a,exists:i}}]).factory("Users",["$q","$timeout","Api","Mask","UsersCache","Options",function(e,n,r,t,i,u){function a(e){return k[C.get("type")][e]}function s(e){return"subscriptions"===C.get("type")?Boolean(e.is_subscribedon):!0}function o(e,n){return angular.isUndefined(n)?e[c()]||1:void(e[c()]=n)}function c(){return"subscriptions"===C.get("type")?"filtermask":"groupmask"}function l(e,n,t){return r.call("user.get",{target:e,fields:n},t).then(function(e){var n=e.user;return i.add(n),n})}function f(e,n,t){return r.call("user.get",{targetid:e,fields:n},t).then(function(e){var n=e.user;return i.add(n),n})}function d(e,n){return r.call("relations.list_friends",{journal:C.get("journal"),fields:e},n).then(_("is_friend"))}function g(e){return r.call("groups.list_users",{journal:C.get("journal"),fields:e}).then(function(e){return i.add(e.users),e})}function p(e){return r.call("relations.list_subscriptions",{journal:C.get("journal"),fields:e}).then(_("is_subscribedon"))}function b(e){return r.call("relations.list_banned",{journal:C.get("journal"),fields:e}).then(_("is_banned"))}function _(e){return function(n){var r=n.users;return r.forEach(LJ.Function.set(e,!0)),i.add(r),r}}function v(e){return r.call("relations."+e+"_count").then(function(e){return e.count})}function h(n){return angular.isArray(n)||(n=[n]),0===n.length?e.reject("You should provide users to sync."):r.call(a("update"),{users:n,journal:C.get("journal")}).then(function(e){return i.add(e.users),e})}function m(e,n){var r=i.get(e);return r?t.check(o(r),n):!1}function j(e){return e.filter(i.exists).map(i.get).filter(s)}function y(e){var n=(e.filter||"").toLowerCase(),r=i.get(function(r){return s(r)&&t.check(o(r),e.id)?n&&-1===r.display_username.toLowerCase().indexOf(n)?!1:!0:!1});return e.limit&&(r=r.slice(0,e.limit)),r}function U(e){var n=(e.filter||"").toLowerCase(),r=i.get(function(r){return s(r)?t.check(o(r),e.id)?!1:n&&-1===r.display_username.toLowerCase().indexOf(n)?!1:!0:!1});return e.limit&&(r=r.slice(0,e.limit)),r}function w(e,n){angular.isArray(n)||(n=[n]);var r;return r="subscriptions"===C.get("type")?j(n):n.map(function(e){return i.get(e)||{username:e}}),r.forEach(function(n){o(n,t.change(o(n),{add:e}))}),h(r)}function L(e,n,r){angular.isArray(n)||(n=[n]);var i=j(n);return i.forEach(function(n){o(n,t.change(o(n),{remove:e}))}),r&&r.silent?void 0:h(i)}function E(e,n){return i.update(e,{alias:n}),r.call("user.alias_set",{target:e,alias:n})}function F(e){return function(n,r){return n[e].toLowerCase().localeCompare(r[e].toLowerCase())}}function O(){var e,n=C.get("journal");C.set.apply(null,arguments),e=C.get("journal"),e!==n&&i.set("journal",e)}var k={friends:{read:"relations.list_friends",readOne:"relations.get_friend",update:"groups.update_users"},subscriptions:{read:"relations.list_subscriptions",readOne:"relations.get_subscription",update:"filters.update_users"}},C=u.create({type:"friends",journal:LJ.get("remoteUser")});return{USERHEAD_FIELDS:{alias:1,journal_url:1,profile_url:1,userhead_url:1,is_invisible:1,journaltype:1},set:O,get:C.get,Cache:i,fetchUser:l,fetchUserById:f,fetchBanned:b,fetchFriends:d,fetchGroupUsers:g,fetchSubscriptions:p,fetchCount:v,sync:h,alias:E,isUserInGroup:m,getExisting:j,fromGroup:y,outOfGroup:U,addToGroup:w,removeFromGroup:L,comparator:F}}])}(); /* <<< file end: js/core/angular/users.js */ //# map link was there [users.js.map] /* >>> file start: js/lib/textinputs_jquery.js */ function _typeof(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}!function(e){function t(e,t){var n=_typeof(e[t]);return"function"===n||!("object"!=n||!e[t])||"unknown"==n}function n(e,t){return _typeof(e[t])!=g}function o(e,t){return!("object"!=_typeof(e[t])||!e[t])}function r(e){window.console&&window.console.log&&window.console.log("RangyInputs not supported in your browser. Reason: "+e)}function a(e,t,n){return 0>t&&(t+=e.value.length),("undefined"==typeof n?"undefined":_typeof(n))==g&&(n=t),0>n&&(n+=e.value.length),{start:t,end:n}}function c(e,t,n){return{start:t,end:n,length:n-t,text:e.value.slice(t,n)}}function l(){return o(document,"body")?document.body:document.getElementsByTagName("body")[0]}var i,s,u,d,f,v,p,m,y,g="undefined";e(document).ready(function(){function h(e,t){return function(){var n=this.jquery?this[0]:this,o=n.nodeName.toLowerCase();if(1==n.nodeType&&("textarea"==o||"input"==o&&"text"==n.type)){var r=[n].concat(Array.prototype.slice.call(arguments)),a=e.apply(this,r);if(!t)return a}return t?this:void 0}}var x=document.createElement("textarea");if(l().appendChild(x),n(x,"selectionStart")&&n(x,"selectionEnd"))i=function(e){var t=e.selectionStart,n=e.selectionEnd;return c(e,t,n)},s=function(e,t,n){var o=a(e,t,n);e.selectionStart=o.start,e.selectionEnd=o.end},y=function(e,t){t?e.selectionEnd=e.selectionStart:e.selectionStart=e.selectionEnd};else{if(!(t(x,"createTextRange")&&o(document,"selection")&&t(document.selection,"createRange")))return l().removeChild(x),void r("No means of finding text input caret position");i=function(e){var t,n,o,r,a=0,l=0,i=document.selection.createRange();return i&&i.parentElement()==e&&(o=e.value.length,t=e.value.replace(/\r\n/g,"\n"),n=e.createTextRange(),n.moveToBookmark(i.getBookmark()),r=e.createTextRange(),r.collapse(!1),n.compareEndPoints("StartToEnd",r)>-1?a=l=o:(a=-n.moveStart("character",-o),a+=t.slice(0,a).split("\n").length-1,n.compareEndPoints("EndToEnd",r)>-1?l=o:(l=-n.moveEnd("character",-o),l+=t.slice(0,l).split("\n").length-1))),c(e,a,l)};var E=function(e,t){return t-(e.value.slice(0,t).split("\r\n").length-1)};s=function(e,t,n){var o=a(e,t,n),r=e.createTextRange(),c=E(e,o.start);r.collapse(!0),o.start==o.end?r.move("character",c):(r.moveEnd("character",E(e,o.end)),r.moveStart("character",c)),r.select()},y=function(e,t){var n=document.selection.createRange();n.collapse(t),n.select()}}l().removeChild(x),d=function(e,t,n,o){var r;t!=n&&(r=e.value,e.value=r.slice(0,t)+r.slice(n)),o&&s(e,t,t)},u=function(e){var t=i(e);d(e,t.start,t.end,!0)},m=function(e){var t,n=i(e);return n.start!=n.end&&(t=e.value,e.value=t.slice(0,n.start)+t.slice(n.end)),s(e,n.start,n.start),n.text};var S=function(e,t,n,o){var r=t+n.length;switch(o="string"==typeof o?o.toLowerCase():""){case"collapsetostart":s(e,t,t);break;case"collapsetoend":s(e,r,r);break;case"select":s(e,t,r)}};f=function(e,t,n,o){var r=e.value;e.value=r.slice(0,n)+t+r.slice(n),"boolean"==typeof o&&(o=o?"collapseToEnd":""),S(e,n,t,o)},v=function(e,t,n){var o=i(e),r=e.value;e.value=r.slice(0,o.start)+t+r.slice(o.end),S(e,o.start,t,n||"collapseToEnd")},p=function(e,t,n,o){("undefined"==typeof n?"undefined":_typeof(n))==g&&(n=t);var r=i(e),a=e.value;e.value=a.slice(0,r.start)+t+r.text+n+a.slice(r.end);var c=r.start+t.length;S(e,c,r.text,o||"select")},e.fn.extend({getSelection:h(i,!1),setSelection:h(s,!0),collapseSelection:h(y,!0),deleteSelectedText:h(u,!0),deleteText:h(d,!0),extractSelectedText:h(m,!1),insertText:h(f,!0),replaceSelectedText:h(v,!0),surroundSelectedText:h(p,!0)})})}(jQuery); /* <<< file end: js/lib/textinputs_jquery.js */ //# map link was there [textinputs_jquery.js.map] /* >>> file start: js/core/angular/ljTour.js */ //= require js/core/angular/bubble.js //= require js/core/angular/api.js //= require js/core/angular/ref.js Site.page.template['angular/bubbletour.ng.tmpl'] = '
    \n
    \n \n \n /\n \n \n
    \n
    \n \n
    \n
    \n
      \n
    • \n \n
    • \n
    \n
      \n
    • \n \n
    • \n
    • \n \n
    • \n
    • \n \n
    • \n
    \n
    \n
    \n'; LJ.injectStyle('/* >>> file start: stc/tour/ljtour.css */\n.b-bubble-tour{z-index:5001}.b-bubble-tour .b-popup-inner{padding:0}.b-helptour{width:350px}.b-helptour-header{margin:0 0 .3em;padding:10px 16px 0}.b-helptour-footer:after,.b-helptour-header:after{display:table;width:100%;clear:both;content:\"\"}.b-helptour-stage-title{margin-right:10px}.b-helptour P:first-child{margin:0 0 .3em}.b-helptour-content{margin:10px 0 .6em;padding:0 16px}.b-helptour-content P{margin:.3em 0}.b-helptour-content LI,.b-helptour-content UL{margin:0;padding:0;list-style:none}.b-helptour-footer{padding:6px 15px;border-radius:0 0 5px 5px;background-color:#DAE3E6}.b-helptour-controls{margin:0;padding:0}.b-helptour-state{float:left}.b-helptour-step{float:right}.b-helptour-control{display:inline;margin-right:4px;cursor:pointer}.b-helptour-control-done:after{display:inline-block;content:\"\";width:14px;height:12px;background-image:url(/img/icons/unit_v3.png?v=42878);background-repeat:no-repeat;background-position:0 -223px}.b-helptour-control-done A{padding-left:8px}.b-helptour-control-done A:link,.b-helptour-control-done A:visited,.b-helptour-control-next A:link,.b-helptour-control-prev A:link{color:#00A3D9}.b-helptour-control-skip A:link,.b-helptour-control-skip A:visited{color:#7A9199}.b-helptour-control A{font-size:13px}.b-helptour-control A:active,.b-helptour-control A:focus,.b-helptour-control A:hover{color:#0086b3}.p-ljtour .b-lenta .l-flatslide-container{position:static}.p-ljtour .l-flatslide-menu-controls{position:absolute;top:auto!important}.p-ljtour.p-openpopup .w-cs{overflow:visible}@media all and (max-width:650px){.p-ljtour.p-openpopup .b-fader{display:none!important}.b-bubble-tour{display:none}}\n/* <<< file end: stc/tour/ljtour.css */\n\n/*# sourceMappingURL=ljtour.css.map */\n'); //= require_ml tour.steps.prev //= require_ml tour.steps.next //= require_ml tour.steps.skip //= require_ml tour.steps.done !function(e){return e}(),function(e){"use strict";angular.module("LJ.Tour",["LJ.Bubble","LJ.Templates","LJ.Directives","LJ.Api"]).factory("Tour",["Api",function(e){var t={};return t.queue={},t.checkAvailable=function(){var n=Object.keys(t.queue);return e.call("tour.is_available",{tours:n}).then(function(e){n.forEach(function(n){0===e.states[n]&&delete t.queue[n]})})},t.setDone=function(t){return e.call("tour.set_done",{tour:t})},t}]).directive("ljTour",["$timeout","$document","Bubble","Ref","Tour",function(t,n,r,u,o){return{scope:!0,link:function(i){function c(){e("body").find("[data-tour]").each(function(){var t=e(this),n=angular.extend({element:t},t.data());Array.isArray(O[n.tour])||(O[n.tour]=[]),O[n.tour].push(n)})}function a(){var e=Object.keys(O)[0],t=O[e];i.current=t.filter(function(e){return b(e)&&v(e)}).sort(function(e,t){return(e.tourStep||1)>t.tourStep}),i.current.forEach(function(e){u.add(e.tour+e.tourStep,e.element)}),delete O[e],m(i.current[0])?f():l()}function l(){Object.keys(O).length&&a()}function s(){r.close(),S.fadeOut(),angular.element("body").removeClass("p-ljtour").off("ljsale-load",y),o.setDone(i.step.tour),S.off("click",s),i.current=null,i.step=null,l()}function f(){return angular.element("body").addClass("p-ljtour").on("ljsale-load",function(e){e.originalEvent.data.slot&&y()}),S.is(":visible")?void t(f,300):(d(),S.on("click",s).fadeIn(),void(i.current=i.current.filter(function(e){return g(e.element)})))}function d(){var e=i.current.indexOf(i.step);e0&&(i.step=i.current[--e],i.index=++e,h())}function b(e){return e.hasOwnProperty("tourOwner")?LJ.get("remote.username")===LJ.get("journal.username"):!0}function v(e){return e.hasOwnProperty("tourSkipIf")?e.tourSkipIf.split(",").every(function(e){return e=e.trim(),"!"===e.charAt(0)?LJ.get(e.slice(1)):!LJ.get(e)}):!0}function g(e){return e.is(":visible")&&0!==e.css("opacity")&&"hidden"!==e.css("visibility")}function m(e){return e?e.hasOwnProperty("tourStartPage")?new RegExp(e.tourStartPage,"i").test(location.pathname):1===e.tourStep:!1}function y(){angular.element(window).trigger("resize"),k()}function h(){if(i.step){if(!i.step.element.is(":visible"))return d();r.current&&r.close(),t(function(){var e=r.options("tour")||{};r.open("tour",angular.extend(e,i.step.tourBubble),i.step.element),k()}),LJ.Event.once("visual_editor_ready",function(){t(y)})}}function k(){u.scrollTo(i.step.tour+i.step.tourStep,{onlyOutOfScreen:!0})}function J(e){if(i.current&&i.current.length){switch(e.which){case 27:s();break;case 37:p();break;case 39:d()}i.$apply()}}var L,O=o.queue,S=angular.element(document.querySelector(".b-fader")),w=!1;L=r.register({name:"tour",template:"bubbletour.ng.tmpl",closeControl:!1},i),!LJ.Flags.isEnabled("friendsfeed_tour")||LJ.Support.isMobile()||w||(w=!0,t(function(){c(),o.checkAvailable().then(l)})),i.next=d,i.prev=p,i.end=s,n.on("keydown",J),i.$on("$destroy",function(){n.off("keydown",J),L()})}}}])}(jQuery); /* <<< file end: js/core/angular/ljTour.js */ //# map link was there [ljTour.js.map] /* >>> file start: js/editor/editor.js */ //= require js/lib/textinputs_jquery.js //= require js/core/angular/ljTour.js !function(e){"use strict";angular.module("Editor",["LJ.Tour"]).factory("Editor",function(){var t={};return t.getSelectedText=function(){var t=e("#body");return t.getSelection().text},t.htmlMode=function(){return e("#body").is(":visible")},t.insertContent=function(n,r,o,i){var l,c=e("#body");if(LJ.Event.trigger("contentInsert"),t.htmlMode()){var u=r.split("{caret}");c.surroundSelectedText(u[0],u.length>1?u[u.length-1]||"":"").trigger("input"),l=c.getSelection(),3===u.length&&0===l.length&&c.replaceSelectedText(u[1],"collapseToEnd").setSelection(l.start+u[1].length+u[u.length-1].length)}else{if("color"===n)return LJ.Event.trigger("selectedColor",o);LJ.Event.trigger(n+"_response",o||r,i)}},t}).controller("EditorCtrl",["$scope","Editor","Bubble","$timeout",function(e,t,n,r){var o={bold:"{caret}",italic:"{caret}",underline:"{caret}",strikethrough:"{caret}"};e.formattingAction=function(e,n){e.preventDefault(),o[n]&&t.insertContent(n,o[n])},e.userClick=function(e,o){var i=t.getSelectedText(),l=/^[A-Za-z0-9_\-]+$/;e.preventDefault(),l.test(i)?t.insertContent(o,''):r(function(){n.open("user")})}}])}(jQuery); /* <<< file end: js/editor/editor.js */ //# map link was there [editor.js.map] /* >>> file start: js/editor/media.js */ //= require_ml media.ramblerkassa.title LJ.define("LJ.Media"),LJ.Media.parse=function(e){"use strict";function t(t,i){this.provider=t,e.extend(this,i),this._cache={}}function i(e,t){var i,r;for(i in a)if(a.hasOwnProperty(i)&&(r=a[i].parse(e,t)))return r;return null}function r(t,r){r=e.extend({thumbnail:!0},r||{});try{var a,n=e(t).first();if(n&&"iframe"===n.prop("tagName").toLowerCase()&&(a=n&&n.attr("src")))return i(a,r)}catch(o){return i(t,r)}}t.prototype.parse=function(t,i){var r,a=this,n=this.params(t,i);if(n)return r=[],r.push("string"==typeof this.embed?this.toPromise(this.embed.supplant(n)):this.embed(n)),i.thumbnail&&this.thumbnail&&r.push("string"==typeof this.thumbnail?this.toPromise(this.thumbnail.supplant(n)):this.thumbnail(n)),e.when.apply(e,r).then(function(e,t){return{link:a.link.supplant(n),embed:e,thumb:t,site:a.provider}})},t.prototype.cache=function(e,t){return"undefined"==typeof t?this._cache[e]:void(this._cache[e]=t)},t.prototype.toPromise=function(t){var i=e.Deferred();return i.resolve(t),i.promise()};var a={ljVideo:new t("ljVideo",{link:"http://vc.videos.livejournal.com/index/player?player=new&record_id={storageid}",embed:function(e){return''.supplant(e)},thumbnail:function(e){return e.screenshot||this.cache(e.storageid)},params:function(t,i){var r=/.*livejournal\.com\/.*\?[\w=&]*record_id=(\d+).*$/,a=("string"==typeof t?t:i.url).match(r);return i.screenshot&&this.cache(i.storageid,i.screenshot),a&&e.extend(i,{storageid:a[1]})}}),coub:new t("coub",{link:"//coub.com/embed/{id}?muted=false&autostart=false&originalSize=false",embed:' ',thumbnail:function(e){var t=this.cache(e.id);return t?this.toPromise(t):this.toPromise(null)},params:function(e){var t=/\/\/[w\.]*coub\.com\/embed\/(\w+)/,i=e.match(t);return i&&{id:i[1]}}}),youtube:new t("youtube",{link:"http://youtube.com/watch?v={id}",thumbnail:"http://img.youtube.com/vi/{id}/0.jpg",embed:'',params:function(e){var t=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\??v?=?))([^#\&\?]*).*/,i=e.match(t);return i&&-1===i[0].indexOf("youtu")?null:i&&{id:i[7]}}}),vimeo:new t("vimeo",{link:"http://vimeo.com/{id}",embed:'',params:function(e){var t=/^(https?:\/\/)?(www\.)?(player\.)?vimeo.com\/(video\/|channels\/\w+\/)?(\d+)*/,i=e.match(t);return i&&{id:i[5]}},thumbnail:function(t){var i=this,r=this.cache(t.id);return r?this.toPromise(r):e.ajax({url:"http://vimeo.com/api/v2/video/"+t.id+".json",dataType:"jsonp"}).then(function(e){if(e&&e[0]){var r=e[0].thumbnail_large;if(r)return i.cache(t.id,r),r}else console.error("Data error",e)})}}),vine:new t("vine",{link:"http://vine.co/v/{id}",embed:'',params:function(e){var t=/vine.co\/v\/([^\/]*)/,i=e.match(t);return i&&{id:i[1]}}}),instagram:new t("instagram",{link:"http://instagram.com/p/{id}/",embed:'',params:function(e){var t=/.*(?:instagram\.\w*|instagr\.am)\/p\/([^\/]+).*/,i=e.match(t);return i&&{id:i[1]}}}),gist:new t("gist",{link:"https://gist.github.com/{id}",embed:'',params:function(e){var t=/.*(?:gist\.github\.com\/)([^\/]+\/{1}[^\/]+)\/{0,1}$/,i=e.match(t);return i&&{id:i[1]}}}),rutube:new t("rutube",{link:"http://rutube.ru/video/{id}/",embed:'',params:function(e){var t=/^.*rutube.ru\/video(\/embed\/|\/private\/|\/)(\w{32}).*/,i=e.match(t);return i&&{id:i[2]}},thumbnail:function(t){var i=this,r=this.cache(t.id);return r?this.toPromise(r):e.ajax({url:"http://rutube.ru/api/video/"+t.id+"/?format=jsonp",dataType:"jsonp"}).done(function(e){if(e&&e.thumbnail_url){var r=e.thumbnail_url;if(r)return i.cache(t.id,r),r}else console.error("Data error",e)})}}),twitter:new t("twitter",{link:"https://twitter.com/{username}/status/{id}",params:function(e){var t=/^.*twitter.com\/(\w*)\/status\/(\w*).*/,i=e.match(t);return i&&{id:i[2],username:i[1]}},embed:function(t){var i=this,r=this.cache(t.id);return r?this.toPromise(r):e.ajax({url:"https://api.twitter.com/1/statuses/oembed.json?id={id}".supplant({id:t.id}),dataType:"jsonp"}).then(function(e){var r=e.html.replace(/)<[^<]*)*<\/script>/gi,"");return i.cache(t.id,r),r})}}),facebook:new t("facebook",{link:"{link}",params:function(e){var t=/(^.*facebook.com\/.*)/,i=e.match(t);return i&&{link:i[1]}},embed:function n(t){var i=this,n=void 0,r=/(^.*facebook.com\/)(\d*)(\/.*)/,a=t.link.match(r),o=t.link.match(/video\.php/),s=e.Deferred(),u=a&&a[2],m=this.cache(t.link),c=void 0;return n=o?'':'
    ',m?this.toPromise(m):(u?LJ.Social.load("facebook").then(function(){FB.api(u,function(e){var a=t.link.replace(r,"$1"+e.username+"$3");c=n.supplant({link:a}),i.cache(t.link,c),s.resolve(c)})}):(c=n.supplant({link:t.link}),this.cache(t.link,c),s.resolve(c)),s.promise())}}),ramblerKassa:new t("ramblerKassa",{link:"https://kassa.rambler.ru/movie/{id}",embed:'',params:function(e){var t=/kassa\.rambler\.ru\/movie\/(\d+)$/,i=e.match(t);return i&&{id:i[1]}}})};return r}(jQuery); /* <<< file end: js/editor/media.js */ //# map link was there [media.js.map] /* >>> file start: js/core/angular/pills.js */ !function(i){return i}(),function(){"use strict";angular.module("LJ.Pills",[]).factory("Pills",function(){var i={};return{group:function(n,t){return"undefined"==typeof t?i[n]:void(i[n]=t)}}}).directive("ljPillsGroup",["Pills",function(i){return{restrict:"A",link:function(n,t,l){var r=l.ljPillsGroupActive||"b-menu-item-active";n.$watch(function(){return i.group(l.ljPillsGroup)},function(i){t.find("[data-pill]").removeClass(r).filter('[data-pill="'+i+'"]').addClass(r)})}}}])}(); /* <<< file end: js/core/angular/pills.js */ //# map link was there [pills.js.map] /* >>> file start: js/core/angular/authHelper.js */ !function(e){return e}(),function(){"use strict";angular.module("LJ.AuthHelper",[]).factory("AuthHelper",["$q","$interval",function(e,n){function t(t){var u,i=window.open(t,"Auth helper","height=450,width=650"),l=0;return o=e.defer(),u=n(function(){var e;l++,i.closed&&(e=LJ.Cookie.get("_Auth_token"),"undefined"!=typeof e?o.resolve(e):o.reject(),LJ.Cookie.setGlobal("_Auth_token",null),n.cancel(u)),l>r&&n.cancel(u)},200),o.promise}var o,r=1500;return{open:t}}])}(); /* <<< file end: js/core/angular/authHelper.js */ //# map link was there [authHelper.js.map] /* >>> file start: js/core/angular/adult.js */ Site.page.template['angular/adult.ng.tmpl'] = '\n\n'; //= require_ml flatmedia.adult.content //= require_ml flatmedia.adult.content.default //= require_ml flatmedia.adult.content.explicit //= require_ml flatmedia.adult.content.none !function(t){return t}(),function(){"use strict";angular.module("LJ.Adult",[]).directive("ljAdult",[function(){return{scope:{model:"=ljAdult"},templateUrl:"adult.ng.tmpl",controllerAs:"adult",controller:["$scope","$element","$attrs",function(t,l,e){this.categories=[{title:LJ.ml("flatmedia.adult.content.none"),value:!1},{title:LJ.ml("flatmedia.adult.content.explicit"),value:!0}],e.hasOwnProperty("ljAdultNotStrict")&&this.categories.unshift({title:LJ.ml("flatmedia.adult.content.default"),value:""})}]}}])}(); /* <<< file end: js/core/angular/adult.js */ //# map link was there [adult.js.map] /* >>> file start: js/lib/plupload/plupload-2.1.2.full.min.js */ function _typeof(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}!function(e,t){"use strict";function n(e,t){for(var n,i=[],o=0;o0&&n(r,function(n,r){n!==i&&(e(t[r])===e(n)&&~a(e(n),["array","object"])?p(t[r],n):t[r]=n)})}),t},n=function h(e,t){var h,n,i,r;if(e){try{h=e.length}catch(o){h=r}if(h===r){for(n in e)if(e.hasOwnProperty(n)&&t(e[n],n)===!1)return}else for(i=0;h>i;i++)if(t(e[i],i)===!1)return}},i=function(t){var n;if(!t||"object"!==e(t))return!0;for(n in t)return!1;return!0},r=function g(t,n){function i(o){"function"===e(t[o])&&t[o](function(e){++on;n++)if(t[n]===e)return n}return-1},s=function(t,n){var i=[];"array"!==e(t)&&(t=[t]),"array"!==e(n)&&(n=[n]);for(var r in t)-1===a(t[r],n)&&i.push(t[r]);return i.length?i:!1},u=function(e,t){var i=[];return n(e,function(e){-1!==a(e,t)&&i.push(e)}),i.length?i:null},c=function(e){var t,n=[];for(t=0;tn;n++)i+=Math.floor(65535*Math.random()).toString(32);return(t||"o_")+i+(e++).toString(32)}}(),d=function(e){return e?String.prototype.trim?String.prototype.trim.call(e):e.toString().replace(/^\s*/,"").replace(/\s*$/,""):e},f=function(e){if("string"!=typeof e)return e;var t,n={t:1099511627776,g:1073741824,m:1048576,k:1024};return e=/^([0-9]+)([mgk]?)$/.exec(e.toLowerCase().replace(/[^0-9mkg]/g,"")),t=e[2],e=+e[1],n.hasOwnProperty(t)&&(e*=n[t]),e};return{guid:l,typeOf:e,extend:t,each:n,isEmptyObj:i,inSeries:r,inParallel:o,inArray:a,arrayDiff:s,arrayIntersect:u,toArray:c,trim:d,parseSizeStr:f}}),i(u,[s],function(e){var t={};return{addI18n:function(n){return e.extend(t,n)},translate:function(e){return t[e]||e},_:function(e){return this.translate(e)},sprintf:function(t){var n=[].slice.call(arguments,1);return t.replace(/%[a-z]/g,function(){var t=n.shift();return"undefined"!==e.typeOf(t)?t:""})}}}),i(c,[s,u],function(e,t){var n="application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mp3 mpga mpega mp2,audio/x-wav,wav,audio/x-m4a,m4a,audio/ogg,oga ogg,audio/aiff,aiff aif,audio/flac,flac,audio/aac,aac,audio/ac3,ac3,audio/x-ms-wma,wma,image/bmp,bmp,image/gif,gif,image/jpeg,jpg jpeg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe m2v,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gpp 3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,video/ogg,ogv,video/x-matroska,mkv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe",i={mimes:{},extensions:{},addMimeType:function(e){var t,n,i,r=e.split(/,/);for(t=0;ti;i++)if(e[i]!=t[i]){if(e[i]=u(e[i]),t[i]=u(t[i]),e[i]t[i]){o=1;break}}if(!n)return o;switch(n){case">":case"gt":return o>0;case">=":case"ge":return o>=0;case"<=":case"le":return 0>=o;case"==":case"=":case"eq":return 0===o;case"<>":case"!=":case"ne":return 0!==o;case"":case"<":case"lt":return 0>o;default:return null}}var n=function(e){var t="",n="?",i="function",r="undefined",o="object",a="major",s="name",u="version",c={has:function(e,t){return-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()}},l={rgx:function(){for(var t,n,a,s,u,c,l,d=0,f=arguments;d0?2==u.length?t[u[0]]=_typeof(u[1])==i?u[1].call(this,l):u[1]:3==u.length?t[u[0]]=_typeof(u[1])!==i||u[1].exec&&u[1].test?l?l.replace(u[1],u[2]):e:l?u[1].call(this,l,u[2]):e:4==u.length&&(t[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):e):t[u]=l?l:e;break}if(c)break}return t},str:function(t,i){for(var r in i)if(_typeof(i[r])===o&&i[r].length>0){for(var a=0;a=9)},use_data_uri_of:function(e){return t.use_data_uri&&33e3>e||t.use_data_uri_over32kb()},use_fileinput:function(){var e=document.createElement("input");return e.setAttribute("type","file"),!e.disabled}};return function(n){var i=[].slice.call(arguments);return i.shift(),"function"===e.typeOf(t[n])?t[n].apply(this,i):!!t[n]}}(),r={can:i,browser:n.browser.name,version:parseFloat(n.browser.major),os:n.os.name,osVersion:n.os.version,verComp:t,swf_url:"../flash/Moxie.swf",xap_url:"../silverlight/Moxie.xap",global_event_dispatcher:"moxie.core.EventTarget.instance.dispatchEvent"};return r.OS=r.os,r}),i(d,[l],function(e){var t=function(e){return"string"!=typeof e?e:document.getElementById(e)},n=function u(e,t){if(!e.className)return!1;var u=new RegExp("(^|\\s+)"+t+"(\\s+|$)");return u.test(e.className)},i=function(e,t){n(e,t)||(e.className=e.className?e.className.replace(/\s+$/,"")+" "+t:t)},r=function(e,t){if(e.className){var n=new RegExp("(^|\\s+)"+t+"(\\s+|$)");e.className=e.className.replace(n,function(e,t,n){return" "===t&&" "===n?" ":""})}},o=function(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null)[t]:void 0},a=function c(t,n){function i(e){var t,n,i=0,r=0;return e&&(n=e.getBoundingClientRect(),t="CSS1Compat"===u.compatMode?u.documentElement:u.body,i=n.left+t.scrollLeft,r=n.top+t.scrollTop),{x:i,y:r}}var c,r,o,a=0,s=0,u=document;if(t=t,n=n||u.body,t&&t.getBoundingClientRect&&"IE"===e.browser&&(!u.documentMode||u.documentMode<8))return r=i(t),o=i(n),{x:r.x-o.x,y:r.y-o.y};for(c=t;c&&c!=n&&c.nodeType;)a+=c.offsetLeft||0,s+=c.offsetTop||0,c=c.offsetParent;for(c=t.parentNode;c&&c!=n&&c.nodeType;)a-=c.scrollLeft||0,s-=c.scrollTop||0,c=c.parentNode;return{x:a,y:s}},s=function(e){return{w:e.offsetWidth||e.clientWidth,h:e.offsetHeight||e.clientHeight}};return{get:t,hasClass:n,addClass:i,removeClass:r,getStyle:o,getPos:a,getSize:s}}),i(f,[s],function(e){function t(e,t){var n;for(n in e)if(e[n]===t)return n;return null}return{RuntimeError:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": RuntimeError "+this.code}var i={NOT_INIT_ERR:1,NOT_SUPPORTED_ERR:9,JS_ERR:4};return e.extend(n,i),n.prototype=Error.prototype,n}(),OperationNotAllowedException:function(){function t(e){this.code=e,this.name="OperationNotAllowedException"}return e.extend(t,{NOT_ALLOWED_ERR:1}),t.prototype=Error.prototype,t}(),ImageError:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": ImageError "+this.code}var i={WRONG_FORMAT:1,MAX_RESOLUTION_ERR:2};return e.extend(n,i),n.prototype=Error.prototype,n}(),FileException:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": FileException "+this.code}var i={NOT_FOUND_ERR:1,SECURITY_ERR:2,ABORT_ERR:3,NOT_READABLE_ERR:4,ENCODING_ERR:5,NO_MODIFICATION_ALLOWED_ERR:6,INVALID_STATE_ERR:7,SYNTAX_ERR:8};return e.extend(n,i),n.prototype=Error.prototype,n}(),DOMException:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": DOMException "+this.code}var i={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};return e.extend(n,i),n.prototype=Error.prototype,n}(),EventException:function(){function t(e){this.code=e,this.name="EventException"}return e.extend(t,{UNSPECIFIED_EVENT_TYPE_ERR:0}),t.prototype=Error.prototype,t}()}}),i(p,[f,s],function(e,t){function n(){var n={};t.extend(this,{uid:null,init:function(){this.uid||(this.uid=t.guid("uid_"))},addEventListener:function(e,i,r,o){var a,s=this;return e=t.trim(e),/\s/.test(e)?void t.each(e.split(/\s+/),function(e){s.addEventListener(e,i,r,o)}):(e=e.toLowerCase(),r=parseInt(r,10)||0,a=n[this.uid]&&n[this.uid][e]||[],a.push({fn:i,priority:r,scope:o||this}),n[this.uid]||(n[this.uid]={}),void(n[this.uid][e]=a))},hasEventListener:function(e){return e?!(!n[this.uid]||!n[this.uid][e]):!!n[this.uid]},removeEventListener:function(e,i){e=e.toLowerCase();var r,o=n[this.uid]&&n[this.uid][e];if(o){if(i){for(r=o.length-1;r>=0;r--)if(o[r].fn===i){o.splice(r,1);break}}else o=[];o.length||(delete n[this.uid][e],t.isEmptyObj(n[this.uid])&&delete n[this.uid])}},removeAllEventListeners:function(){n[this.uid]&&delete n[this.uid]},dispatchEvent:function(i){var r,o,a,s,u,c={},l=!0;if("string"!==t.typeOf(i)){if(s=i,"string"!==t.typeOf(s.type))throw new e.EventException(e.EventException.UNSPECIFIED_EVENT_TYPE_ERR);i=s.type,s.total!==u&&s.loaded!==u&&(c.total=s.total,c.loaded=s.loaded),c.async=s.async||!1}if(-1!==i.indexOf("::")?!function(e){r=e[0],i=e[1]}(i.split("::")):r=this.uid,i=i.toLowerCase(),o=n[r]&&n[r][i]){o.sort(function(e,t){return t.priority-e.priority}),a=[].slice.call(arguments),a.shift(),c.type=i,a.unshift(c);var d=[];t.each(o,function(e){a[0].target=e.scope,d.push(c.async?function(t){setTimeout(function(){t(e.fn.apply(e.scope,a)===!1)},1)}:function(t){t(e.fn.apply(e.scope,a)===!1)})}),d.length&&t.inSeries(d,function(e){l=!e})}return l},bind:function(){this.addEventListener.apply(this,arguments)},unbind:function(){this.removeEventListener.apply(this,arguments)},unbindAll:function(){this.removeAllEventListeners.apply(this,arguments)},trigger:function(){return this.dispatchEvent.apply(this,arguments)},convertEventPropsToHandlers:function(e){var n;"array"!==t.typeOf(e)&&(e=[e]);for(var i=0;i>16&255,r=l>>8&255,o=255&l,g[p++]=64==u?String.fromCharCode(i):64==c?String.fromCharCode(i,r):String.fromCharCode(i,r,o);while(f>18&63,u=d>>12&63,c=d>>6&63,l=63&d,g[p++]=r.charAt(s)+r.charAt(u)+r.charAt(c)+r.charAt(l);while(fa;a++)o+=String.fromCharCode(r[a]);return o}}t.call(this),e.extend(this,{uid:e.guid("uid_"),readAsBinaryString:function(e){return i.call(this,"readAsBinaryString",e)},readAsDataURL:function(e){return i.call(this,"readAsDataURL",e)},readAsText:function(e){return i.call(this,"readAsText",e)}})}}),i(S,[f,s,v],function(e,t,n){function i(){var e,i=[];t.extend(this,{append:function(r,o){var a=this,s=t.typeOf(o);o instanceof n?e={name:r,value:o}:"array"===s?(r+="[]",t.each(o,function(e){a.append(r,e)})):"object"===s?t.each(o,function(e,t){a.append(r+"["+t+"]",e)}):"null"===s||"undefined"===s||"number"===s&&isNaN(o)?a.append(r,"false"):i.push({name:r,value:o.toString()})},hasBlob:function(){return!!this.getBlob()},getBlob:function(){return e&&e.value||null},getBlobName:function(){return e&&e.name||null},each:function(n){t.each(i,function(e){n(e.value,e.name)}),e&&n(e.value,e.name)},destroy:function(){e=null,i=[]}})}return i}),i(T,[s,f,p,h,R,g,E,v,x,S,l,c],function(e,t,n,i,r,o,a,s,u,c,l,d){function f(){this.uid=e.guid("uid_")}function p(){function n(e,t){return T.hasOwnProperty(e)?1===arguments.length?l.can("define_property")?T[e]:S[e]:void(l.can("define_property")?T[e]=t:S[e]=t):void 0}function u(t){function i(){R&&(R.destroy(),R=null),s.dispatchEvent("loadend"),s=null}function r(r){R.bind("LoadStart",function(e){n("readyState",p.LOADING),s.dispatchEvent("readystatechange"),s.dispatchEvent(e),M&&s.upload.dispatchEvent(e)}),R.bind("Progress",function(e){n("readyState")!==p.LOADING&&(n("readyState",p.LOADING),s.dispatchEvent("readystatechange")),s.dispatchEvent(e)}),R.bind("UploadProgress",function(e){M&&s.upload.dispatchEvent({type:"progress",lengthComputable:!1,total:e.total,loaded:e.loaded})}),R.bind("Load",function(t){n("readyState",p.DONE),n("status",Number(r.exec.call(R,"XMLHttpRequest","getStatus")||0)),n("statusText",h[n("status")]||""),n("response",r.exec.call(R,"XMLHttpRequest","getResponse",n("responseType"))),~e.inArray(n("responseType"),["text",""])?n("responseText",n("response")):"document"===n("responseType")&&n("responseXML",n("response")),k=r.exec.call(R,"XMLHttpRequest","getAllResponseHeaders"),s.dispatchEvent("readystatechange"),n("status")>0?(M&&s.upload.dispatchEvent(t),s.dispatchEvent(t)):(F=!0,s.dispatchEvent("error")),i()}),R.bind("Abort",function(e){s.dispatchEvent(e),i()}),R.bind("Error",function(e){F=!0,n("readyState",p.DONE),s.dispatchEvent("readystatechange"),C=!0,s.dispatchEvent(e),i()}),r.exec.call(R,"XMLHttpRequest","send",{url:v,method:_,async:A,user:y,password:w,headers:O,mimeType:D,encoding:I,responseType:s.responseType,withCredentials:s.withCredentials,options:U},t)}var s=this;E=(new Date).getTime(),R=new a,"string"==typeof U.required_caps&&(U.required_caps=o.parseCaps(U.required_caps)),U.required_caps=e.extend({},U.required_caps,{return_response_type:s.responseType}),t instanceof c&&(U.required_caps.send_multipart=!0),P||(U.required_caps.do_cors=!0),U.ruid?r(R.connectRuntime(U)):(R.bind("RuntimeInit",function(e,t){r(t)}),R.bind("RuntimeError",function(e,t){s.dispatchEvent("RuntimeError",t)}),R.connectRuntime(U))}function m(){n("responseText",""),n("responseXML",null),n("response",null),n("status",0),n("statusText",""),E=b=null}var v,_,y,w,E,b,R,x,S=this,T={timeout:0,readyState:p.UNSENT,withCredentials:!1,status:0,statusText:"",responseType:"",responseXML:null,responseText:null,response:null},A=!0,O={},I=null,D=null,N=!1,L=!1,M=!1,C=!1,F=!1,P=!1,z=null,H=null,U={},k="";e.extend(this,T,{uid:e.guid("uid_"),upload:new f,open:function(o,a,s,u,c){var l;if(!o||!a)throw new t.DOMException(t.DOMException.SYNTAX_ERR);if(/[\u0100-\uffff]/.test(o)||i.utf8_encode(o)!==o)throw new t.DOMException(t.DOMException.SYNTAX_ERR);if(~e.inArray(o.toUpperCase(),["CONNECT","DELETE","GET","HEAD","OPTIONS","POST","PUT","TRACE","TRACK"])&&(_=o.toUpperCase()),~e.inArray(_,["CONNECT","TRACE","TRACK"]))throw new t.DOMException(t.DOMException.SECURITY_ERR);if(a=i.utf8_encode(a),l=r.parseUrl(a),P=r.hasSameOrigin(l),v=r.resolveUrl(a),(u||c)&&!P)throw new t.DOMException(t.DOMException.INVALID_ACCESS_ERR);if(y=u||l.user,w=c||l.pass,A=s||!0,A===!1&&(n("timeout")||n("withCredentials")||""!==n("responseType")))throw new t.DOMException(t.DOMException.INVALID_ACCESS_ERR);N=!A,L=!1,O={},m.call(this),n("readyState",p.OPENED),this.convertEventPropsToHandlers(["readystatechange"]),this.dispatchEvent("readystatechange")},setRequestHeader:function(r,o){var a=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];if(n("readyState")!==p.OPENED||L)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(/[\u0100-\uffff]/.test(r)||i.utf8_encode(r)!==r)throw new t.DOMException(t.DOMException.SYNTAX_ERR);return r=e.trim(r).toLowerCase(),~e.inArray(r,a)||/^(proxy\-|sec\-)/.test(r)?!1:(O[r]?O[r]+=", "+o:O[r]=o,!0)},getAllResponseHeaders:function(){return k||""},getResponseHeader:function(t){return t=t.toLowerCase(),F||~e.inArray(t,["set-cookie","set-cookie2"])?null:k&&""!==k&&(x||(x={},e.each(k.split(/\r\n/),function(t){var n=t.split(/:\s+/);2===n.length&&(n[0]=e.trim(n[0]),x[n[0].toLowerCase()]={header:n[0],value:e.trim(n[1])})})),x.hasOwnProperty(t))?x[t].header+": "+x[t].value:null},overrideMimeType:function(i){var r,o;if(~e.inArray(n("readyState"),[p.LOADING,p.DONE]))throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(i=e.trim(i.toLowerCase()),/;/.test(i)&&(r=i.match(/^([^;]+)(?:;\scharset\=)?(.*)$/))&&(i=r[1],r[2]&&(o=r[2])),!d.mimes[i])throw new t.DOMException(t.DOMException.SYNTAX_ERR);z=i,H=o},send:function(n,r){if(U="string"===e.typeOf(r)?{ruid:r}:r?r:{},this.convertEventPropsToHandlers(g),this.upload.convertEventPropsToHandlers(g),this.readyState!==p.OPENED||L)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(n instanceof s)U.ruid=n.ruid,D=n.type||"application/octet-stream";else if(n instanceof c){if(n.hasBlob()){var o=n.getBlob();U.ruid=o.ruid,D=o.type||"application/octet-stream"}}else"string"==typeof n&&(I="UTF-8",D="text/plain;charset=UTF-8",n=i.utf8_encode(n));this.withCredentials||(this.withCredentials=U.required_caps&&U.required_caps.send_browser_cookies&&!P),M=!N&&this.upload.hasEventListener(),F=!1,C=!n,N||(L=!0),u.call(this,n)},abort:function(){if(F=!0,N=!1,~e.inArray(n("readyState"),[p.UNSENT,p.OPENED,p.DONE]))n("readyState",p.UNSENT);else{if(n("readyState",p.DONE),L=!1,!R)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);R.getRuntime().exec.call(R,"XMLHttpRequest","abort",C),C=!0}},destroy:function(){R&&("function"===e.typeOf(R.destroy)&&R.destroy(),R=null),this.unbindAll(),this.upload&&(this.upload.unbindAll(),this.upload=null)}})}var h={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Reserved",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",426:"Upgrade Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",510:"Not Extended"};f.prototype=n.instance;var g=["loadstart","progress","abort","error","load","timeout","loadend"];return p.UNSENT=0,p.OPENED=1,p.HEADERS_RECEIVED=2,p.LOADING=3,p.DONE=4,p.prototype=n.instance,p}),i(A,[s,h,m,p],function(e,t,n,i){function r(){function i(){l=d=0,c=this.result=null}function o(t,n){var i=this;u=n,i.bind("TransportingProgress",function(t){d=t.loaded,l>d&&-1===e.inArray(i.state,[r.IDLE,r.DONE])&&a.call(i)},999),i.bind("TransportingComplete",function(){d=l,i.state=r.DONE,c=null,i.result=u.exec.call(i,"Transporter","getAsBlob",t||"")},999),i.state=r.BUSY,i.trigger("TransportingStarted"),a.call(i)}function a(){var e,n=this,i=l-d;f>i&&(f=i),e=t.btoa(c.substr(d,f)),u.exec.call(n,"Transporter","receive",e,l)}var s,u,c,l,d,f;n.call(this),e.extend(this,{uid:e.guid("uid_"),state:r.IDLE,result:null,transport:function(t,n,r){var a=this;if(r=e.extend({chunk_size:204798},r),(s=r.chunk_size%3)&&(r.chunk_size+=3-s),f=r.chunk_size,i.call(this),c=t,l=t.length,"string"===e.typeOf(r)||r.ruid)o.call(a,n,this.connectRuntime(r));else{var u=function d(e,t){a.unbind("RuntimeInit",d),o.call(a,n,t)};this.bind("RuntimeInit",u),this.connectRuntime(r)}},abort:function(){var e=this;e.state=r.IDLE,u&&(u.exec.call(e,"Transporter","clear"),e.trigger("TransportingAborted")),i.call(e)},destroy:function(){this.unbindAll(),u=null,this.disconnectRuntime(),i.call(this)}})}return r.IDLE=0,r.BUSY=1,r.DONE=2,r.prototype=i.instance,r}),i(O,[s,d,f,x,T,g,m,A,l,p,v,_,h],function(e,t,n,i,r,o,a,s,u,c,l,d,f){function p(){function i(e){e||(e=this.getRuntime().exec.call(this,"Image","getInfo")),this.size=e.size,this.width=e.width,this.height=e.height,this.type=e.type,this.meta=e.meta,""===this.name&&(this.name=e.name)}function c(t){var i=e.typeOf(t);try{if(t instanceof p){if(!t.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);g.apply(this,arguments)}else if(t instanceof l){if(!~e.inArray(t.type,["image/jpeg","image/png"]))throw new n.ImageError(n.ImageError.WRONG_FORMAT);m.apply(this,arguments)}else if(-1!==e.inArray(i,["blob","file"]))c.call(this,new d(null,t),arguments[1]);else if("string"===i)/^data:[^;]*;base64,/.test(t)?c.call(this,new l(null,{data:t}),arguments[1]):v.apply(this,arguments);else{if("node"!==i||"img"!==t.nodeName.toLowerCase())throw new n.DOMException(n.DOMException.TYPE_MISMATCH_ERR);c.call(this,t.src,arguments[1])}}catch(r){this.trigger("error",r.code)}}function g(t,n){var i=this.connectRuntime(t.ruid);this.ruid=i.uid,i.exec.call(this,"Image","loadFromImage",t,"undefined"===e.typeOf(n)?!0:n)}function m(t,n){function i(e){r.ruid=e.uid,e.exec.call(r,"Image","loadFromBlob",t)}var r=this;r.name=t.name||"",t.isDetached()?(this.bind("RuntimeInit",function(e,t){i(t)}),n&&"string"==typeof n.required_caps&&(n.required_caps=o.parseCaps(n.required_caps)),this.connectRuntime(e.extend({required_caps:{access_image_binary:!0,resize_image:!0}},n))):i(this.connectRuntime(t.ruid))}function v(e,t){var n,i=this;n=new r,n.open("get",e),n.responseType="blob",n.onprogress=function(e){i.trigger(e)},n.onload=function(){m.call(i,n.response,!0)},n.onerror=function(e){i.trigger(e)},n.onloadend=function(){n.destroy()},n.bind("RuntimeError",function(e,t){i.trigger("RuntimeError",t)}),n.send(null,t)}a.call(this),e.extend(this,{uid:e.guid("uid_"),ruid:null,name:"",size:0,width:0,height:0,type:"",meta:{},clone:function(){this.load.apply(this,arguments)},load:function(){this.bind("Load Resize",function(){i.call(this)},999),this.convertEventPropsToHandlers(h),c.apply(this,arguments)},downsize:function(t){var i={width:this.width,height:this.height,crop:!1,preserveHeaders:!0};t="object"==("undefined"==typeof t?"undefined":_typeof(t))?e.extend(i,t):e.extend(i,{width:arguments[0],height:arguments[1],crop:arguments[2],preserveHeaders:arguments[3]});try{if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);if(this.width>p.MAX_RESIZE_WIDTH||this.height>p.MAX_RESIZE_HEIGHT)throw new n.ImageError(n.ImageError.MAX_RESOLUTION_ERR);this.getRuntime().exec.call(this,"Image","downsize",t.width,t.height,t.crop,t.preserveHeaders)}catch(r){this.trigger("error",r.code)}},crop:function(e,t,n){this.downsize(e,t,!0,n)},getAsCanvas:function(){if(!u.can("create_canvas"))throw new n.RuntimeError(n.RuntimeError.NOT_SUPPORTED_ERR);var e=this.connectRuntime(this.ruid);return e.exec.call(this,"Image","getAsCanvas")},getAsBlob:function(e,t){if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);return e||(e="image/jpeg"),"image/jpeg"!==e||t||(t=90),this.getRuntime().exec.call(this,"Image","getAsBlob",e,t)},getAsDataURL:function(e,t){if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);return this.getRuntime().exec.call(this,"Image","getAsDataURL",e,t)},getAsBinaryString:function(e,t){var n=this.getAsDataURL(e,t);return f.atob(n.substring(n.indexOf("base64,")+7))},embed:function(i){function r(){if(u.can("create_canvas")){var t=o.getAsCanvas();if(t)return i.appendChild(t),t=null,o.destroy(),void h.trigger("embedded")}var r=o.getAsDataURL(a,c);if(!r)throw new n.ImageError(n.ImageError.WRONG_FORMAT);if(u.can("use_data_uri_of",r.length))i.innerHTML='',o.destroy(),h.trigger("embedded");else{var l=new s;l.bind("TransportingComplete",function(){d=h.connectRuntime(this.result.ruid),h.bind("Embedded",function(){e.extend(d.getShimContainer().style,{top:"0px",left:"0px",width:o.width+"px",height:o.height+"px"}),d=null},999),d.exec.call(h,"ImageView","display",this.result.uid,m,v),o.destroy()}),l.transport(f.atob(r.substring(r.indexOf("base64,")+7)),a,e.extend({},g,{required_caps:{display_media:!0},runtime_order:"flash,silverlight",container:i}))}}var o,a,c,l,d,h=this,g=arguments[1]||{},m=this.width,v=this.height;try{if(!(i=t.get(i)))throw new n.DOMException(n.DOMException.INVALID_NODE_TYPE_ERR);if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);if(this.width>p.MAX_RESIZE_WIDTH||this.height>p.MAX_RESIZE_HEIGHT)throw new n.ImageError(n.ImageError.MAX_RESOLUTION_ERR);if(a=g.type||this.type||"image/jpeg",c=g.quality||90,l="undefined"!==e.typeOf(g.crop)?g.crop:!1,g.width)m=g.width,v=g.height||m;else{var _=t.getSize(i);_.w&&_.h&&(m=_.w,v=_.h)}return o=new p,o.bind("Resize",function(){r.call(h)}),o.bind("Load",function(){o.downsize(m,v,l,!1)}),o.clone(this,!1),o}catch(y){this.trigger("error",y.code)}},destroy:function(){this.ruid&&(this.getRuntime().exec.call(this,"Image","destroy"),this.disconnectRuntime()),this.unbindAll()}})}var h=["progress","load","error","resize","embedded"];return p.MAX_RESIZE_WIDTH=6500,p.MAX_RESIZE_HEIGHT=6500,p.prototype=c.instance,p}),i(I,[s,f,g,l],function(e,t,n,i){function r(t){var r=this,s=n.capTest,u=n.capTrue,c=e.extend({access_binary:s(window.FileReader||window.File&&window.File.getAsDataURL),access_image_binary:function(){return r.can("access_binary")&&!!a.Image},display_media:s(i.can("create_canvas")||i.can("use_data_uri_over32kb")),do_cors:s(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),drag_and_drop:s(function(){var e=document.createElement("div");return("draggable"in e||"ondragstart"in e&&"ondrop"in e)&&("IE"!==i.browser||i.version>9)}()),filter_by_extension:s(function(){return"Chrome"===i.browser&&i.version>=28||"IE"===i.browser&&i.version>=10}()),return_response_headers:u,return_response_type:function(e){return"json"===e&&window.JSON?!0:i.can("return_response_type",e)},return_status_code:u,report_upload_progress:s(window.XMLHttpRequest&&(new XMLHttpRequest).upload),resize_image:function(){return r.can("access_binary")&&i.can("create_canvas")},select_file:function(){return i.can("use_fileinput")&&window.File},select_folder:function(){return r.can("select_file")&&"Chrome"===i.browser&&i.version>=21},select_multiple:function(){return!(!r.can("select_file")||"Safari"===i.browser&&"Windows"===i.os||"iOS"===i.os&&i.verComp(i.osVersion,"7.0.4","<"))},send_binary_string:s(window.XMLHttpRequest&&((new XMLHttpRequest).sendAsBinary||window.Uint8Array&&window.ArrayBuffer)),send_custom_headers:s(window.XMLHttpRequest),send_multipart:function(){return!!(window.XMLHttpRequest&&(new XMLHttpRequest).upload&&window.FormData)||r.can("send_binary_string")},slice_blob:s(window.File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice)),stream_upload:function(){return r.can("slice_blob")&&r.can("send_multipart")},summon_file_dialog:s(function(){return"Firefox"===i.browser&&i.version>=4||"Opera"===i.browser&&i.version>=12||"IE"===i.browser&&i.version>=10||!!~e.inArray(i.browser,["Chrome","Safari"])}()),upload_filesize:u},arguments[2]);n.call(this,t,arguments[1]||o,c),e.extend(this,{init:function(){this.trigger("Init")},destroy:function(e){return function(){e.call(r),e=r=null}}(this.destroy)}),e.extend(this.getShim(),a)}var o="html5",a={};return n.addConstructor(o,r),a}),i(D,[I,v],function(e,t){function n(){function e(e,t,n){var i;if(!window.File.prototype.slice)return(i=window.File.prototype.webkitSlice||window.File.prototype.mozSlice)?i.call(e,t,n):null;try{return e.slice(),e.slice(t,n)}catch(r){return e.slice(t,n-t)}}this.slice=function(){return new t(this.getRuntime().uid,e.apply(this,arguments))}}return e.Blob=n}),i(N,[s],function(e){function t(){this.returnValue=!1}function n(){this.cancelBubble=!0}var i={},r="moxie_"+e.guid(),o=function(o,a,s,u){var c,l;a=a.toLowerCase(),o.addEventListener?(c=s,o.addEventListener(a,c,!1)):o.attachEvent&&(c=function(){var e=window.event;e.target||(e.target=e.srcElement),e.preventDefault=t,e.stopPropagation=n,s(e)},o.attachEvent("on"+a,c)),o[r]||(o[r]=e.guid()),i.hasOwnProperty(o[r])||(i[o[r]]={}),l=i[o[r]],l.hasOwnProperty(a)||(l[a]=[]),l[a].push({func:c,orig:s,key:u})},a=function u(t,n,o){var u,a;if(n=n.toLowerCase(),t[r]&&i[t[r]]&&i[t[r]][n]){u=i[t[r]][n];for(var s=u.length-1;s>=0&&(u[s].orig!==o&&u[s].key!==o||(t.removeEventListener?t.removeEventListener(n,u[s].func,!1):t.detachEvent&&t.detachEvent("on"+n,u[s].func),u[s].orig=null,u[s].func=null,u.splice(s,1),o===a));s--);if(u.length||delete i[t[r]][n],e.isEmptyObj(i[t[r]])){delete i[t[r]];try{delete t[r]}catch(c){t[r]=a}}}},s=function(t,n){t&&t[r]&&e.each(i[t[r]],function(e,i){a(t,i,n)})};return{addEvent:o,removeEvent:a,removeAllEvents:s}}),i(L,[I,s,d,N,c,l],function(e,t,n,i,r,o){function a(){var e,a=[];t.extend(this,{init:function(s){var u,c,l,d,f,p,h=this,g=h.getRuntime();e=s,a=[],l=e.accept.mimes||r.extList2mimes(e.accept,g.can("filter_by_extension")),c=g.getShimContainer(),c.innerHTML='",u=n.get(g.uid),t.extend(u.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),d=n.get(e.browse_button),g.can("summon_file_dialog")&&("static"===n.getStyle(d,"position")&&(d.style.position="relative"),f=parseInt(n.getStyle(d,"z-index"),10)||1,d.style.zIndex=f,c.style.zIndex=f-1,i.addEvent(d,"click",function(e){var t=n.get(g.uid);t&&!t.disabled&&t.click(),e.preventDefault()},h.uid)),p=g.can("summon_file_dialog")?d:c,i.addEvent(p,"mouseover",function(){h.trigger("mouseenter")},h.uid),i.addEvent(p,"mouseout",function(){h.trigger("mouseleave")},h.uid),i.addEvent(p,"mousedown",function(){h.trigger("mousedown")},h.uid),i.addEvent(n.get(e.container),"mouseup",function(){h.trigger("mouseup")},h.uid),u.onchange=function m(){if(a=[],e.directory?t.each(this.files,function(e){"."!==e.name&&a.push(e)}):a=[].slice.call(this.files),"IE"!==o.browser&&"IEMobile"!==o.browser)this.value="";else{var n=this.cloneNode(!0);this.parentNode.replaceChild(n,this),n.onchange=m}h.trigger("change")},h.trigger({type:"ready",async:!0}),c=null},getFiles:function(){return a},disable:function(e){var t,i=this.getRuntime();(t=n.get(i.uid))&&(t.disabled=!!e)},destroy:function(){var t=this.getRuntime(),r=t.getShim(),o=t.getShimContainer();i.removeAllEvents(o,this.uid),i.removeAllEvents(e&&n.get(e.container),this.uid),i.removeAllEvents(e&&n.get(e.browse_button),this.uid),o&&(o.innerHTML=""),r.removeInstance(this.uid),a=e=o=r=null}})}return e.FileInput=a}),i(M,[I,s,d,N,c],function(e,t,n,i,r){function o(){function e(e){if(!e.dataTransfer||!e.dataTransfer.types)return!1;var n=t.toArray(e.dataTransfer.types||[]);return-1!==t.inArray("Files",n)||-1!==t.inArray("public.file-url",n)||-1!==t.inArray("application/x-moz-file",n)}function o(e){for(var n=[],i=0;i=4&&u.version<7,h="Android Browser"===u.browser,g=!1;if(p=n.url.replace(/^.+?\/([\w\-\.]+)$/,"$1").toLowerCase(),f=c(),f.open(n.method,n.url,n.async,n.user,n.password),r instanceof o)r.isDetached()&&(g=!0),r=r.getSource();else if(r instanceof a){if(r.hasBlob())if(r.getBlob().isDetached())r=d.call(s,r),g=!0;else if((l||h)&&"blob"===t.typeOf(r.getBlob().getSource())&&window.FileReader)return void e.call(s,n,r);if(r instanceof a){var m=new window.FormData;r.each(function(e,t){e instanceof o?m.append(t,e.getSource()):m.append(t,e)}),r=m}}f.upload?(n.withCredentials&&(f.withCredentials=!0),f.addEventListener("load",function(e){s.trigger(e)}),f.addEventListener("error",function(e){s.trigger(e)}),f.addEventListener("progress",function(e){s.trigger(e)}),f.upload.addEventListener("progress",function(e){s.trigger({type:"UploadProgress",loaded:e.loaded,total:e.total})})):f.onreadystatechange=function(){switch(f.readyState){case 1:break;case 2:break;case 3:var e,t;try{i.hasSameOrigin(n.url)&&(e=f.getResponseHeader("Content-Length")||0),f.responseText&&(t=f.responseText.length)}catch(r){e=t=0}s.trigger({type:"progress",lengthComputable:!!e,total:parseInt(e,10),loaded:t});break;case 4:f.onreadystatechange=function(){},s.trigger(0===f.status?"error":"load")}},t.isEmptyObj(n.headers)||t.each(n.headers,function(e,t){f.setRequestHeader(t,e)}),""!==n.responseType&&"responseType"in f&&(f.responseType="json"!==n.responseType||u.can("return_response_type","json")?n.responseType:"text"),g?f.sendAsBinary?f.sendAsBinary(r):!function(){for(var e=new Uint8Array(r.length),t=0;tn;n++)a|=r.charCodeAt(e+n)<r;r++)a+=String.fromCharCode(t>>Math.abs(s+8*r)&255);n(a,e,i)}var r,o=!1;return{II:function(e){return e===t?o:void(o=e)},init:function(e){o=!1,r=e},SEGMENT:function(e,t,i){switch(arguments.length){case 1:return r.substr(e,r.length-e-1);case 2:return r.substr(e,t);case 3:n(i,e,t);break;default:return r}},BYTE:function(t){return e(t,1)},SHORT:function(t){return e(t,2)},LONG:function(n,r){return r===t?e(n,4):void i(n,r,4)},SLONG:function(t){var n=e(t,4);return n>2147483647?n-4294967296:n},STRING:function(t,n){var i="";for(n+=t;n>t;t++)i+=String.fromCharCode(e(t,1));return i}}}}),i(z,[P],function(e){return function t(n){var i,r,o,a=[],s=0;if(i=new e,i.init(n),65496===i.SHORT(0)){for(r=2;r<=n.length;)if(o=i.SHORT(r),o>=65488&&65495>=o)r+=2;else{if(65498===o||65497===o)break;s=i.SHORT(r+2)+2,o>=65505&&65519>=o&&a.push({hex:o,name:"APP"+(15&o),start:r,length:s,segment:i.SEGMENT(r,s)}),r+=s}return i.init(null),{headers:a,restore:function(e){var t,n;for(i.init(e),r=65504==i.SHORT(2)?4+i.SHORT(4):2,n=0,t=a.length;t>n;n++)i.SEGMENT(r,0,a[n].segment),r+=a[n].length;return e=i.SEGMENT(),i.init(null),e},strip:function(e){var n,r,o;for(r=new t(e),n=r.headers,r.purge(),i.init(e),o=n.length;o--;)i.SEGMENT(n[o].start,n[o].length,"");return e=i.SEGMENT(),i.init(null),e},get:function(e){for(var t=[],n=0,i=a.length;i>n;n++)a[n].name===e.toUpperCase()&&t.push(a[n].segment);return t},set:function(e,t){var n,i,r,o=[];for("string"==typeof t?o.push(t):o=t,n=i=0,r=a.length;r>n&&(a[n].name===e.toUpperCase()&&(a[n].segment=o[i],a[n].length=o[i].length,i++),!(i>=o.length));n++);},purge:function(){a=[],i.init(null),i=null}}}}}),i(H,[s,P],function(e,n){return function i(){function i(e,n){var i,r,o,s,u,d,f,p,h=a.SHORT(e),g=[],m={};for(i=0;h>i;i++)if(f=d=e+12*i+2,o=n[a.SHORT(f)],o!==t){switch(s=a.SHORT(f+=2),u=a.LONG(f+=2),f+=4,g=[],s){case 1:case 7:for(u>4&&(f=a.LONG(f)+l.tiffHeader),r=0;u>r;r++)g[r]=a.BYTE(f+r);break;case 2:u>4&&(f=a.LONG(f)+l.tiffHeader),m[o]=a.STRING(f,u-1);continue;case 3:for(u>2&&(f=a.LONG(f)+l.tiffHeader),r=0;u>r;r++)g[r]=a.SHORT(f+2*r);break;case 4:for(u>1&&(f=a.LONG(f)+l.tiffHeader),r=0;u>r;r++)g[r]=a.LONG(f+4*r);break;case 5:for(f=a.LONG(f)+l.tiffHeader,r=0;u>r;r++)g[r]=a.LONG(f+4*r)/a.LONG(f+4*r+4);break;case 9:for(f=a.LONG(f)+l.tiffHeader,r=0;u>r;r++)g[r]=a.SLONG(f+4*r);break;case 10:for(f=a.LONG(f)+l.tiffHeader,r=0;u>r;r++)g[r]=a.SLONG(f+4*r)/a.SLONG(f+4*r+4);break;default:continue}p=1==u?g[0]:g,m[o]=c.hasOwnProperty(o)&&"object"!=("undefined"==typeof p?"undefined":_typeof(p))?c[o][p]:p}return m}function r(){var e=l.tiffHeader;return a.II(18761==a.SHORT(e)),42!==a.SHORT(e+=2)?!1:(l.IFD0=l.tiffHeader+a.LONG(e+=2),u=i(l.IFD0,s.tiff),"ExifIFDPointer"in u&&(l.exifIFD=l.tiffHeader+u.ExifIFDPointer,delete u.ExifIFDPointer),"GPSInfoIFDPointer"in u&&(l.gpsIFD=l.tiffHeader+u.GPSInfoIFDPointer,delete u.GPSInfoIFDPointer),!0)}function o(e,t,n){var i,r,o,u=0;if("string"==typeof t){var c=s[e.toLowerCase()];for(var d in c)if(c[d]===t){t=d;break}}i=l[e.toLowerCase()+"IFD"],r=a.SHORT(i);for(var f=0;r>f;f++)if(o=i+12*f+2,a.SHORT(o)==t){u=o+8;break}return u?(a.LONG(u,n),!0):!1}var a,s,u,c,l={}; return a=new n,s={tiff:{274:"Orientation",270:"ImageDescription",271:"Make",272:"Model",305:"Software",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"}},c={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire.",1:"Flash fired.",5:"Strobe return light not detected.",7:"Strobe return light detected.",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}},{init:function(e){return l={tiffHeader:10},e!==t&&e.length?(a.init(e),65505===a.SHORT(0)&&"EXIF\x00"===a.STRING(4,5).toUpperCase()?r():!1):!1},TIFF:function(){return u},EXIF:function(){var t;if(t=i(l.exifIFD,s.exif),t.ExifVersion&&"array"===e.typeOf(t.ExifVersion)){for(var n=0,r="";n=65472&&65475>=e)return n+=5,{height:c.SHORT(n),width:c.SHORT(n+=2)};t=c.SHORT(n+=2),n+=t-2}return null}function s(){d&&l&&c&&(d.purge(),l.purge(),c.init(null),u=f=l=d=c=null)}var u,c,l,d,f,p;if(u=o,c=new i,c.init(u),65496!==c.SHORT(0))throw new t.ImageError(t.ImageError.WRONG_FORMAT);l=new n(o),d=new r,p=!!d.init(l.get("app1")[0]),f=a.call(this),e.extend(this,{type:"image/jpeg",size:u.length,width:f&&f.width||0,height:f&&f.height||0,setExif:function(t,n){return p?("object"===e.typeOf(t)?e.each(t,function(e,t){d.setExif(t,e)}):d.setExif(t,n),void l.set("app1",d.getBinary())):!1},writeHeaders:function(){return arguments.length?l.restore(arguments[0]):u=l.restore(u)},stripHeaders:function(e){return l.strip(e)},purge:function(){s.call(this)}}),p&&(this.meta={tiff:d.TIFF(),exif:d.EXIF(),gps:d.GPS()})}return o}),i(k,[f,s,P],function(e,t,n){function i(i){function r(){var e,t;return e=a.call(this,8),"IHDR"==e.type?(t=e.start,{width:u.LONG(t),height:u.LONG(t+=4)}):null}function o(){u&&(u.init(null),s=d=c=l=u=null)}function a(e){var t,n,i,r;return t=u.LONG(e),n=u.STRING(e+=4,4),i=e+=4,r=u.LONG(e+t),{length:t,type:n,start:i,CRC:r}}var s,u,c,l,d;s=i,u=new n,u.init(s),function(){var t=0,n=0,i=[35152,20039,3338,6666];for(n=0;nm;){for(var v=m+f>a?a-m:f,_=0;o>_;){var y=_+f>o?o-_:f;h.clearRect(0,0,f,f),h.drawImage(e,-_,-m);var w=_*s/o+c<<0,E=Math.ceil(y*s/o),b=m*u/a/g+l<<0,R=Math.ceil(v*u/a/g);d.drawImage(p,0,0,y,v,w,b,E,R),_+=f}m+=f}p=h=null}function t(e){var t=e.naturalWidth,n=e.naturalHeight;if(t*n>1048576){var i=document.createElement("canvas");i.width=i.height=1;var r=i.getContext("2d");return r.drawImage(e,-t+1,0),0===r.getImageData(0,0,1,1).data[3]}return!1}function n(e,t,n){var i=document.createElement("canvas");i.width=1,i.height=n;var r=i.getContext("2d");r.drawImage(e,0,0);for(var o=r.getImageData(0,0,1,n).data,a=0,s=n,u=n;u>a;){var c=o[4*(u-1)+3];0===c?s=u:a=u,u=s+a>>1}i=null;var l=u/n;return 0===l?1:l}return{isSubsampled:t,renderTo:e}}),i(G,[I,s,f,h,_,q,B,c,l],function(e,t,n,i,r,o,a,s,u){function c(){function e(){if(!y&&!v)throw new n.ImageError(n.DOMException.INVALID_STATE_ERR);return y||v}function c(e){return i.atob(e.substring(e.indexOf("base64,")+7))}function l(e,t){return"data:"+(t||"")+";base64,"+i.btoa(e)}function d(e){var t=this;v=new Image,v.onerror=function(){m.call(this),t.trigger("error",n.ImageError.WRONG_FORMAT)},v.onload=function(){t.trigger("load")},v.src=/^data:[^;]*;base64,/.test(e)?e:l(e,E.type)}function f(e,t){var i,r=this;return window.FileReader?(i=new FileReader,i.onload=function(){t(this.result)},i.onerror=function(){r.trigger("error",n.ImageError.WRONG_FORMAT)},void i.readAsDataURL(e)):t(e.getAsDataURL())}function p(n,i,r,o){var a,s,u,c,l,d=this,f=0,p=0;if(x=o,l=this.meta&&this.meta.tiff&&this.meta.tiff.Orientation||1,-1!==t.inArray(l,[5,6,7,8])){var m=n;n=i,i=m}return s=e(),r?(n=Math.min(n,s.width),i=Math.min(i,s.height),a=Math.max(n/s.width,i/s.height)):a=Math.min(n/s.width,i/s.height),a>1&&!r&&o?void this.trigger("Resize"):(y||(y=document.createElement("canvas")),u=Math.round(s.width*a),c=Math.round(s.height*a),r?(y.width=n,y.height=i,u>n&&(f=Math.round((u-n)/2)),c>i&&(p=Math.round((c-i)/2))):(y.width=u,y.height=c),x||g(y.width,y.height,l),h.call(this,s,y,-f,-p,u,c),this.width=y.width,this.height=y.height,R=!0,void d.trigger("Resize"))}function h(e,t,n,i,r,o){if("iOS"===u.OS)a.renderTo(e,t,{width:r,height:o,x:n,y:i});else{var s=t.getContext("2d");s.drawImage(e,n,i,r,o)}}function g(e,t,n){switch(n){case 5:case 6:case 7:case 8:y.width=t,y.height=e;break;default:y.width=e,y.height=t}var i=y.getContext("2d");switch(n){case 2:i.translate(e,0),i.scale(-1,1);break;case 3:i.translate(e,t),i.rotate(Math.PI);break;case 4:i.translate(0,t),i.scale(1,-1);break;case 5:i.rotate(.5*Math.PI),i.scale(1,-1);break;case 6:i.rotate(.5*Math.PI),i.translate(0,-t);break;case 7:i.rotate(.5*Math.PI),i.translate(e,-t),i.scale(-1,1);break;case 8:i.rotate(-.5*Math.PI),i.translate(-e,0)}}function m(){_&&(_.purge(),_=null),w=v=y=E=null,R=!1}var v,_,y,w,E,b=this,R=!1,x=!0;t.extend(this,{loadFromBlob:function(e){var t=this,i=t.getRuntime(),r=arguments.length>1?arguments[1]:!0;if(!i.can("access_binary"))throw new n.RuntimeError(n.RuntimeError.NOT_SUPPORTED_ERR);return E=e,e.isDetached()?(w=e.getSource(),void d.call(this,w)):void f.call(this,e.getSource(),function(e){r&&(w=c(e)),d.call(t,e)})},loadFromImage:function(e,t){this.meta=e.meta,E=new r(null,{name:e.name,size:e.size,type:e.type}),d.call(this,t?w=e.getAsBinaryString():e.getAsDataURL())},getInfo:function(){var t,n=this.getRuntime();return!_&&w&&n.can("access_image_binary")&&(_=new o(w)),t={width:e().width||0,height:e().height||0,type:E.type||s.getFileMime(E.name),size:w&&w.length||E.size||0,name:E.name||"",meta:_&&_.meta||this.meta||{}}},downsize:function(){p.apply(this,arguments)},getAsCanvas:function(){return y&&(y.id=this.uid+"_canvas"),y},getAsBlob:function(e,t){return e!==this.type&&p.call(this,this.width,this.height,!1),new r(null,{name:E.name||"",type:e,data:b.getAsBinaryString.call(this,e,t)})},getAsDataURL:function(e){var t=arguments[1]||90;if(!R)return v.src;if("image/jpeg"!==e)return y.toDataURL("image/png");try{return y.toDataURL("image/jpeg",t/100)}catch(n){return y.toDataURL("image/jpeg")}},getAsBinaryString:function(e,t){if(!R)return w||(w=c(b.getAsDataURL(e,t))),w;if("image/jpeg"!==e)w=c(b.getAsDataURL(e,t));else{var n;t||(t=90);try{n=y.toDataURL("image/jpeg",t/100)}catch(i){n=y.toDataURL("image/jpeg")}w=c(n),_&&(w=_.stripHeaders(w),x&&(_.meta&&_.meta.exif&&_.setExif({PixelXDimension:this.width,PixelYDimension:this.height}),w=_.writeHeaders(w)),_.purge(),_=null)}return R=!1,w},destroy:function(){b=null,m.call(this),this.getRuntime().getShim().removeInstance(this.uid)}})}return e.Image=c}),i(j,[s,l,d,f,g],function(e,t,n,i,r){function o(){var e;try{e=navigator.plugins["Shockwave Flash"],e=e.description}catch(t){try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(n){e="0.0"}}return e=e.match(/\d+/g),parseFloat(e[0]+"."+e[1])}function a(a){var c,l=this;a=e.extend({swf_url:t.swf_url},a),r.call(this,a,s,{access_binary:function(e){return e&&"browser"===l.mode},access_image_binary:function(e){return e&&"browser"===l.mode},display_media:r.capTrue,do_cors:r.capTrue,drag_and_drop:!1,report_upload_progress:function(){return"client"===l.mode},resize_image:r.capTrue,return_response_headers:!1,return_response_type:function(t){return"json"===t&&window.JSON?!0:!e.arrayDiff(t,["","text","document"])||"browser"===l.mode},return_status_code:function(t){return"browser"===l.mode||!e.arrayDiff(t,[200,404])},select_file:r.capTrue,select_multiple:r.capTrue,send_binary_string:function(e){return e&&"browser"===l.mode},send_browser_cookies:function(e){return e&&"browser"===l.mode},send_custom_headers:function(e){return e&&"browser"===l.mode},send_multipart:r.capTrue,slice_blob:function(e){return e&&"browser"===l.mode},stream_upload:function(e){return e&&"browser"===l.mode},summon_file_dialog:!1,upload_filesize:function(t){return e.parseSizeStr(t)<=2097152||"client"===l.mode},use_http_method:function(t){return!e.arrayDiff(t,["GET","POST"])}},{access_binary:function(e){return e?"browser":"client"},access_image_binary:function(e){return e?"browser":"client"},report_upload_progress:function(e){return e?"browser":"client"},return_response_type:function(t){return e.arrayDiff(t,["","text","json","document"])?"browser":["client","browser"]},return_status_code:function(t){return e.arrayDiff(t,[200,404])?"browser":["client","browser"]},send_binary_string:function(e){return e?"browser":"client"},send_browser_cookies:function(e){return e?"browser":"client"},send_custom_headers:function(e){return e?"browser":"client"},stream_upload:function(e){return e?"client":"browser"},upload_filesize:function(t){return e.parseSizeStr(t)>=2097152?"client":"browser"}},"client"),o()<10&&(this.mode=!1),e.extend(this,{getShim:function(){return n.get(this.uid)},shimExec:function(e,t){var n=[].slice.call(arguments,2);return l.getShim().exec(this.uid,e,t,n)},init:function(){var n,r,o;o=this.getShimContainer(),e.extend(o.style,{position:"absolute",top:"-8px",left:"-8px",width:"9px",height:"9px",overflow:"hidden"}),n='',"IE"===t.browser?(r=document.createElement("div"),o.appendChild(r),r.outerHTML=n,r=o=null):o.innerHTML=n,c=setTimeout(function(){l&&!l.initialized&&l.trigger("Error",new i.RuntimeError(i.RuntimeError.NOT_INIT_ERR))},5e3)},destroy:function(e){return function(){e.call(l),clearTimeout(c),a=c=e=l=null}}(this.destroy)},u)}var s="flash",u={};return r.addConstructor(s,a),u}),i(X,[j,v],function(e,t){var n={slice:function(e,n,i,r){var o=this.getRuntime();return 0>n?n=Math.max(e.size+n,0):n>0&&(n=Math.min(n,e.size)),0>i?i=Math.max(e.size+i,0):i>0&&(i=Math.min(i,e.size)),e=o.shimExec.call(this,"Blob","slice",n,i,r||""),e&&(e=new t(o.uid,e)),e}};return e.Blob=n}),i(V,[j],function(e){var t={init:function(e){this.getRuntime().shimExec.call(this,"FileInput","init",{name:e.name,accept:e.accept,multiple:e.multiple}),this.trigger("ready")}};return e.FileInput=t}),i(W,[j,h],function(e,t){function n(e,n){switch(n){case"readAsText":return t.atob(e,"utf8");case"readAsBinaryString":return t.atob(e);case"readAsDataURL":return e}return null}var i="",r={read:function(e,t){var r=this,o=r.getRuntime();return"readAsDataURL"===e&&(i="data:"+(t.type||"")+";base64,"),r.bind("Progress",function(t,r){r&&(i+=n(r,e))}),o.shimExec.call(this,"FileReader","readAsBase64",t.uid)},getResult:function(){return i},destroy:function(){i=null}};return e.FileReader=r}),i(Y,[j,h],function(e,t){function n(e,n){switch(n){case"readAsText":return t.atob(e,"utf8");case"readAsBinaryString":return t.atob(e);case"readAsDataURL":return e}return null}var i={read:function(e,t){var i,r=this.getRuntime();return(i=r.shimExec.call(this,"FileReaderSync","readAsBase64",t.uid))?("readAsDataURL"===e&&(i="data:"+(t.type||"")+";base64,"+i),n(i,e,t.type)):null}};return e.FileReaderSync=i}),i($,[j,s,v,_,x,S,A],function(e,t,n,i,r,o,a){var s={send:function(e,i){function r(){e.transport=l.mode,l.shimExec.call(c,"XMLHttpRequest","send",e,i)}function s(e,t){l.shimExec.call(c,"XMLHttpRequest","appendBlob",e,t.uid),i=null,r()}function u(e,t){var n=new a;n.bind("TransportingComplete",function(){t(this.result)}),n.transport(e.getSource(),e.type,{ruid:l.uid})}var c=this,l=c.getRuntime();if(t.isEmptyObj(e.headers)||t.each(e.headers,function(e,t){l.shimExec.call(c,"XMLHttpRequest","setRequestHeader",t,e.toString())}),i instanceof o){var d;if(i.each(function(e,t){e instanceof n?d=t:l.shimExec.call(c,"XMLHttpRequest","append",t,e)}),i.hasBlob()){var f=i.getBlob();f.isDetached()?u(f,function(e){f.destroy(),s(d,e)}):s(d,f)}else i=null,r()}else i instanceof n?i.isDetached()?u(i,function(e){i.destroy(),i=e.uid,r()}):(i=i.uid,r()):r()},getResponse:function(e){var n,o,a=this.getRuntime();if(o=a.shimExec.call(this,"XMLHttpRequest","getResponseAsBlob")){if(o=new i(a.uid,o),"blob"===e)return o;try{if(n=new r,~t.inArray(e,["","text"]))return n.readAsText(o);if("json"===e&&window.JSON)return JSON.parse(n.readAsText(o))}finally{o.destroy()}}return null},abort:function(e){var t=this.getRuntime();t.shimExec.call(this,"XMLHttpRequest","abort"),this.dispatchEvent("readystatechange"),this.dispatchEvent("abort")}};return e.XMLHttpRequest=s}),i(J,[j,v],function(e,t){var n={getAsBlob:function(e){var n=this.getRuntime(),i=n.shimExec.call(this,"Transporter","getAsBlob",e);return i?new t(n.uid,i):null}};return e.Transporter=n}),i(Z,[j,s,A,v,x],function(e,t,n,i,r){var o={loadFromBlob:function(e){function t(e){r.shimExec.call(i,"Image","loadFromBlob",e.uid),i=r=null}var i=this,r=i.getRuntime();if(e.isDetached()){var o=new n;o.bind("TransportingComplete",function(){t(o.result.getSource())}),o.transport(e.getSource(),e.type,{ruid:r.uid})}else t(e.getSource())},loadFromImage:function(e){var t=this.getRuntime();return t.shimExec.call(this,"Image","loadFromImage",e.uid)},getAsBlob:function(e,t){var n=this.getRuntime(),r=n.shimExec.call(this,"Image","getAsBlob",e,t);return r?new i(n.uid,r):null},getAsDataURL:function(){var e,t=this.getRuntime(),n=t.Image.getAsBlob.apply(this,arguments);return n?(e=new r,e.readAsDataURL(n)):null}};return e.Image=o}),i(Q,[s,l,d,f,g],function(e,t,n,i,r){function o(e){var t,n,i,r,o,a=!1,s=null,u=0;try{try{s=new ActiveXObject("AgControl.AgControl"),s.IsVersionSupported(e)&&(a=!0),s=null}catch(c){var l=navigator.plugins["Silverlight Plug-In"];if(l){for(t=l.description,"1.0.30226.2"===t&&(t="2.0.30226.2"),n=t.split(".");n.length>3;)n.pop();for(;n.length<4;)n.push(0);for(i=e.split(".");i.length>4;)i.pop();do r=parseInt(i[u],10),o=parseInt(n[u],10),u++;while(u=r&&!isNaN(r)&&(a=!0)}}}catch(d){a=!1}return a}function a(a){var c,l=this;a=e.extend({xap_url:t.xap_url},a),r.call(this,a,s,{access_binary:r.capTrue,access_image_binary:r.capTrue,display_media:r.capTrue,do_cors:r.capTrue,drag_and_drop:!1,report_upload_progress:r.capTrue,resize_image:r.capTrue,return_response_headers:function(e){return e&&"client"===l.mode},return_response_type:function(e){return"json"!==e?!0:!!window.JSON},return_status_code:function(t){return"client"===l.mode||!e.arrayDiff(t,[200,404])},select_file:r.capTrue,select_multiple:r.capTrue,send_binary_string:r.capTrue,send_browser_cookies:function(e){return e&&"browser"===l.mode},send_custom_headers:function(e){return e&&"client"===l.mode},send_multipart:r.capTrue,slice_blob:r.capTrue,stream_upload:!0,summon_file_dialog:!1,upload_filesize:r.capTrue,use_http_method:function(t){return"client"===l.mode||!e.arrayDiff(t,["GET","POST"])}},{return_response_headers:function(e){return e?"client":"browser"},return_status_code:function(t){return e.arrayDiff(t,[200,404])?"client":["client","browser"]},send_browser_cookies:function(e){return e?"browser":"client"},send_custom_headers:function(e){return e?"client":"browser"},use_http_method:function(t){return e.arrayDiff(t,["GET","POST"])?"client":["client","browser"]}}),o("2.0.31005.0")&&"Opera"!==t.browser||(this.mode=!1),e.extend(this,{getShim:function(){return n.get(this.uid).content.Moxie},shimExec:function(e,t){var n=[].slice.call(arguments,2);return l.getShim().exec(this.uid,e,t,n)},init:function(){var e;e=this.getShimContainer(),e.innerHTML='',c=setTimeout(function(){l&&!l.initialized&&l.trigger("Error",new i.RuntimeError(i.RuntimeError.NOT_INIT_ERR))},"Windows"!==t.OS?1e4:5e3)},destroy:function(e){return function(){e.call(l),clearTimeout(c),a=c=e=l=null}}(this.destroy)},u)}var s="silverlight",u={};return r.addConstructor(s,a),u}),i(K,[Q,s,X],function(e,t,n){return e.Blob=t.extend({},n)}),i(ee,[Q],function(e){var t={init:function(e){function t(e){for(var t="",n=0;nn;n++)t=s.keys[n],a=s[t],a&&(/^(\d|[1-9]\d+)$/.test(a)?a=parseInt(a,10):/^\d*\.\d+$/.test(a)&&(a=parseFloat(a)),i.meta[e][t]=a)}),i.width=parseInt(r.width,10),i.height=parseInt(r.height,10),i.size=parseInt(r.size,10),i.type=r.type,i.name=r.name,i}})}),i(se,[s,f,g,l],function(e,t,n,i){function r(t){var r=this,s=n.capTest,u=n.capTrue;n.call(this,t,o,{access_binary:s(window.FileReader||window.File&&File.getAsDataURL),access_image_binary:!1,display_media:s(a.Image&&(i.can("create_canvas")||i.can("use_data_uri_over32kb"))),do_cors:!1,drag_and_drop:!1,filter_by_extension:s(function(){return"Chrome"===i.browser&&i.version>=28||"IE"===i.browser&&i.version>=10}()),resize_image:function(){return a.Image&&r.can("access_binary")&&i.can("create_canvas")},report_upload_progress:!1,return_response_headers:!1,return_response_type:function(t){return"json"===t&&window.JSON?!0:!!~e.inArray(t,["text","document",""])},return_status_code:function(t){return!e.arrayDiff(t,[200,404])},select_file:function(){return i.can("use_fileinput")},select_multiple:!1,send_binary_string:!1,send_custom_headers:!1,send_multipart:!0,slice_blob:!1,stream_upload:function(){return r.can("select_file")},summon_file_dialog:s(function(){return"Firefox"===i.browser&&i.version>=4||"Opera"===i.browser&&i.version>=12||!!~e.inArray(i.browser,["Chrome","Safari"])}()),upload_filesize:u,use_http_method:function(t){return!e.arrayDiff(t,["GET","POST"])}}),e.extend(this,{init:function(){this.trigger("Init")},destroy:function(e){return function(){e.call(r),e=r=null}}(this.destroy)}),e.extend(this.getShim(),a)}var o="html4",a={};return n.addConstructor(o,r),a}),i(ue,[se,s,d,N,c,l],function(e,t,n,i,r,o){function a(){function e(){var r,l,d,f,p,h,g=this,m=g.getRuntime();h=t.guid("uid_"),r=m.getShimContainer(),a&&(d=n.get(a+"_form"),d&&t.extend(d.style,{top:"100%"})),f=document.createElement("form"),f.setAttribute("id",h+"_form"),f.setAttribute("method","post"),f.setAttribute("enctype","multipart/form-data"),f.setAttribute("encoding","multipart/form-data"),t.extend(f.style,{overflow:"hidden",position:"absolute",top:0,left:0,width:"100%",height:"100%"}),p=document.createElement("input"),p.setAttribute("id",h),p.setAttribute("type","file"),p.setAttribute("name",s.name||"Filedata"),p.setAttribute("accept",c.join(",")),t.extend(p.style,{fontSize:"999px",opacity:0}),f.appendChild(p),r.appendChild(f),t.extend(p.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),"IE"===o.browser&&o.version<10&&t.extend(p.style,{filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"}),p.onchange=function(){var t;this.value&&(t=this.files?this.files[0]:{name:this.value},u=[t],this.onchange=function(){},e.call(g),g.bind("change",function i(){var e,t=n.get(h),r=n.get(h+"_form");g.unbind("change",i),g.files.length&&t&&r&&(e=g.files[0],t.setAttribute("id",e.uid),r.setAttribute("id",e.uid+"_form"),r.setAttribute("target",e.uid+"_iframe")),t=r=null},998),p=f=null,g.trigger("change"))},m.can("summon_file_dialog")&&(l=n.get(s.browse_button),i.removeEvent(l,"click",g.uid),i.addEvent(l,"click",function(e){p&&!p.disabled&&p.click(),e.preventDefault()},g.uid)),a=h,r=d=l=null}var a,s,u=[],c=[];t.extend(this,{init:function(t){var o,a=this,u=a.getRuntime();s=t,c=t.accept.mimes||r.extList2mimes(t.accept,u.can("filter_by_extension")),o=u.getShimContainer(),function(){var e,r,s;e=n.get(t.browse_button),u.can("summon_file_dialog")&&("static"===n.getStyle(e,"position")&&(e.style.position="relative"),r=parseInt(n.getStyle(e,"z-index"),10)||1,e.style.zIndex=r,o.style.zIndex=r-1),s=u.can("summon_file_dialog")?e:o,i.addEvent(s,"mouseover",function(){a.trigger("mouseenter")},a.uid),i.addEvent(s,"mouseout",function(){a.trigger("mouseleave")},a.uid),i.addEvent(s,"mousedown",function(){a.trigger("mousedown")},a.uid),i.addEvent(n.get(t.container),"mouseup",function(){a.trigger("mouseup")},a.uid),e=null}(),e.call(this),o=null,a.trigger({type:"ready",async:!0})},getFiles:function(){return u},disable:function(e){var t;(t=n.get(a))&&(t.disabled=!!e)},destroy:function(){var e=this.getRuntime(),t=e.getShim(),r=e.getShimContainer();i.removeAllEvents(r,this.uid),i.removeAllEvents(s&&n.get(s.container),this.uid),i.removeAllEvents(s&&n.get(s.browse_button),this.uid),r&&(r.innerHTML=""),t.removeInstance(this.uid),a=u=c=s=r=t=null}})}return e.FileInput=a}),i(ce,[se,C],function(e,t){return e.FileReader=t}),i(le,[se,s,d,R,f,N,v,S],function(e,t,n,i,r,o,a,s){function u(){function e(e){var t,i,r,a,s=this,u=!1;if(l){if(t=l.id.replace(/_iframe$/,""),i=n.get(t+"_form")){for(r=i.getElementsByTagName("input"),a=r.length;a--;)switch(r[a].getAttribute("type")){case"hidden":r[a].parentNode.removeChild(r[a]);break;case"file":u=!0}r=[],u||i.parentNode.removeChild(i),i=null}setTimeout(function(){o.removeEvent(l,"load",s.uid),l.parentNode&&l.parentNode.removeChild(l);var t=s.getRuntime().getShimContainer();t.children.length||t.parentNode.removeChild(t),t=l=null,e()},1)}}var u,c,l;t.extend(this,{send:function(d,f){function p(){var n=y.getShimContainer()||document.body,r=document.createElement("div");r.innerHTML='',l=r.firstChild,n.appendChild(l),o.addEvent(l,"load",function(){var n;try{n=l.contentWindow.document||l.contentDocument||window.frames[l.id].document,/^4(0[0-9]|1[0-7]|2[2346])\s/.test(n.title)?u=n.title.replace(/^(\d+).*$/,"$1"):(u=200,c=t.trim(n.body.innerHTML),_.trigger({type:"progress",loaded:c.length,total:c.length}),v&&_.trigger({type:"uploadprogress",loaded:v.size||1025,total:v.size||1025}))}catch(r){if(!i.hasSameOrigin(d.url))return void e.call(_,function(){_.trigger("error")});u=404}e.call(_,function(){_.trigger("load")})},_.uid)}var h,g,m,v,_=this,y=_.getRuntime();if(u=c=null,f instanceof s&&f.hasBlob()){if(v=f.getBlob(),h=v.uid,m=n.get(h),g=n.get(h+"_form"),!g)throw new r.DOMException(r.DOMException.NOT_FOUND_ERR)}else h=t.guid("uid_"),g=document.createElement("form"),g.setAttribute("id",h+"_form"),g.setAttribute("method",d.method),g.setAttribute("enctype","multipart/form-data"),g.setAttribute("encoding","multipart/form-data"),g.setAttribute("target",h+"_iframe"),y.getShimContainer().appendChild(g);f instanceof s&&f.each(function(e,n){if(e instanceof a)m&&m.setAttribute("name",n);else{var i=document.createElement("input");t.extend(i,{type:"hidden",name:n,value:e}),m?g.insertBefore(i,m):g.appendChild(i)}}),g.setAttribute("action",d.url),p(),g.submit(),_.trigger("loadstart")},getStatus:function(){return u},getResponse:function(e){if("json"===e&&"string"===t.typeOf(c)&&window.JSON)try{return JSON.parse(c.replace(/^\s*]*>/,"").replace(/<\/pre>\s*$/,""))}catch(n){return null}return c},abort:function(){var t=this;l&&l.contentWindow&&(l.contentWindow.stop?l.contentWindow.stop():l.contentWindow.document.execCommand?l.contentWindow.document.execCommand("Stop"):l.src="about:blank"),e.call(this,function(){t.dispatchEvent("abort")})}})}return e.XMLHttpRequest=u}),i(de,[se,G],function(e,t){return e.Image=t}),o([s,u,c,l,d,f,p,h,g,m,v,_,y,w,E,b,R,x,S,T,A,O,N])}(this),function(e){return e}(),function(e){"use strict";var t={},n=e.moxie.core.utils.Basic.inArray;return function i(e){var r,o;for(r in e)o=_typeof(e[r]),"object"!==o||~n(r,["Exceptions","Env","Mime"])?"function"===o&&(t[r]=e[r]):i(e[r])}(e.moxie),t.Env=e.moxie.core.utils.Env,t.Mime=e.moxie.core.utils.Mime,t.Exceptions=e.moxie.core.Exceptions,e.mOxie=t,e.o||(e.o=t),t}(this),function(e){return e}(),function(e,t,n){function i(e){function t(e,t,n){var r={chunks:"slice_blob",jpgresize:"send_binary_string",pngresize:"send_binary_string",progress:"report_upload_progress",multi_selection:"select_multiple",dragdrop:"drag_and_drop",drop_element:"drag_and_drop",headers:"send_custom_headers",urlstream_upload:"send_binary_string",canSendBinary:"send_binary",triggerDialog:"summon_file_dialog"};r[e]?i[r[e]]=t:n||(i[e]=t)}var n=e.required_features,i={};return"string"==typeof n?a.each(n.split(/\s*,\s*/),function(e){t(e,!0)}):"object"==("undefined"==typeof n?"undefined":_typeof(n))?a.each(n,function(e,n){t(n,e)}):n===!0&&(e.chunk_size>0&&(i.slice_blob=!0),(e.resize.enabled||!e.multipart)&&(i.send_binary_string=!0),a.each(e,function(e,n){t(n,!!e,!0)})),i}var r=e.setTimeout,o={},a={VERSION:"2.1.2",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,FILE_DUPLICATE_ERROR:-602,IMAGE_FORMAT_ERROR:-700,MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:t.mimes,ua:t.ua,typeOf:t.typeOf,extend:t.extend,guid:t.guid,get:function(e){var n,i=[];"array"!==t.typeOf(e)&&(e=[e]);for(var r=e.length;r--;)n=t.get(e[r]),n&&i.push(n);return i.length?i:null},each:t.each,getPos:t.getPos,getSize:t.getSize,xmlEncode:function(e){var t={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},n=/[<>&\"\']/g;return e?(""+e).replace(n,function(e){return t[e]?"&"+t[e]+";":e}):e},toArray:t.toArray,inArray:t.inArray,addI18n:t.addI18n,translate:t.translate,isEmptyObj:t.isEmptyObj,hasClass:t.hasClass,addClass:t.addClass,removeClass:t.removeClass,getStyle:t.getStyle,addEvent:t.addEvent,removeEvent:t.removeEvent,removeAllEvents:t.removeAllEvents,cleanName:function(e){var t,n;for(n=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"],t=0;t0?"&":"?")+n),e},formatSize:function(e){function t(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}if(e===n||/\D/.test(e))return a.translate("N/A");var i=Math.pow(1024,4);return e>i?t(e/i,1)+" "+a.translate("tb"):e>(i/=1024)?t(e/i,1)+" "+a.translate("gb"):e>(i/=1024)?t(e/i,1)+" "+a.translate("mb"):e>1024?Math.round(e/1024)+" "+a.translate("kb"):e+" "+a.translate("b")},parseSize:t.parseSizeStr,predictRuntime:function(e,n){var i,r;return i=new a.Uploader(e),r=t.Runtime.thatCan(i.getOption().required_features,n||e.runtimes),i.destroy(),r},addFileFilter:function(e,t){o[e]=t}};a.addFileFilter("mime_types",function(e,t,n){e.length&&!e.regexp.test(t.name)?(this.trigger("Error",{code:a.FILE_EXTENSION_ERROR, message:a.translate("File extension error."),file:t}),n(!1)):n(!0)}),a.addFileFilter("max_file_size",function(e,t,n){var i;e=a.parseSize(e),t.size!==i&&e&&t.size>e?(this.trigger("Error",{code:a.FILE_SIZE_ERROR,message:a.translate("File size error."),file:t}),n(!1)):n(!0)}),a.addFileFilter("prevent_duplicates",function(e,t,n){if(e)for(var i=this.files.length;i--;)if(t.name===this.files[i].name&&t.size===this.files[i].size)return this.trigger("Error",{code:a.FILE_DUPLICATE_ERROR,message:a.translate("Duplicate file error."),file:t}),void n(!1);n(!0)}),a.Uploader=function(e){function s(){var e,t,n=0;if(this.state==a.STARTED){for(t=0;t0?Math.ceil(e.loaded/e.size*100):100,c()}function c(){var e,t;for(T.reset(),e=0;e0?Math.ceil(T.uploaded/I.length*100):0:(T.bytesPerSec=Math.ceil(T.loaded/((+new Date-S||1)/1e3)),T.percent=T.size>0?Math.ceil(T.loaded/T.size*100):0)}function l(){var e=N[0]||L[0];return e?e.getRuntime().uid:!1}function d(e,n){if(e.ruid){var i=t.Runtime.getInfo(e.ruid);if(i)return i.can(n)}return!1}function f(){this.bind("FilesAdded FilesRemoved",function(e){e.trigger("QueueChanged"),e.refresh()}),this.bind("CancelUpload",w),this.bind("BeforeUpload",m),this.bind("UploadFile",v),this.bind("UploadProgress",_),this.bind("StateChanged",y),this.bind("QueueChanged",c),this.bind("Error",b),this.bind("FileUploaded",E),this.bind("Destroy",R)}function p(e,n){var i=this,r=0,o=[],s={runtime_order:e.runtimes,required_caps:e.required_features,preferred_caps:D,swf_url:e.flash_swf_url,xap_url:e.silverlight_xap_url};a.each(e.runtimes.split(/\s*,\s*/),function(t){e[t]&&(s[t]=e[t])}),e.browse_button&&a.each(e.browse_button,function(n){o.push(function(o){var u=new t.FileInput(a.extend({},s,{accept:e.filters.mime_types,name:e.file_data_name,multiple:e.multi_selection,container:e.container,browse_button:n}));u.onready=function(){var e=t.Runtime.getInfo(this.ruid);t.extend(i.features,{chunks:e.can("slice_blob"),multipart:e.can("send_multipart"),multi_selection:e.can("select_multiple")}),r++,N.push(this),o()},u.onchange=function(){i.addFile(this.files)},u.bind("mouseenter mouseleave mousedown mouseup",function(i){M||(e.browse_button_hover&&("mouseenter"===i.type?t.addClass(n,e.browse_button_hover):"mouseleave"===i.type&&t.removeClass(n,e.browse_button_hover)),e.browse_button_active&&("mousedown"===i.type?t.addClass(n,e.browse_button_active):"mouseup"===i.type&&t.removeClass(n,e.browse_button_active)))}),u.bind("mousedown",function(){i.trigger("Browse")}),u.bind("error runtimeerror",function(){u=null,o()}),u.init()})}),e.drop_element&&a.each(e.drop_element,function(e){o.push(function(n){var o=new t.FileDrop(a.extend({},s,{drop_zone:e}));o.onready=function(){var e=t.Runtime.getInfo(this.ruid);i.features.dragdrop=e.can("drag_and_drop"),r++,L.push(this),n()},o.ondrop=function(){i.addFile(this.files)},o.bind("error runtimeerror",function(){o=null,n()}),o.init()})}),t.inSeries(o,function(){"function"==typeof n&&n(r)})}function h(e,i,r){var o=new t.Image;try{o.onload=function(){return i.width>this.width&&i.height>this.height&&i.quality===n&&i.preserve_headers&&!i.crop?(this.destroy(),r(e)):void o.downsize(i.width,i.height,i.crop,i.preserve_headers)},o.onresize=function(){r(this.getAsBlob(e.type,i.quality)),this.destroy()},o.onerror=function(){r(e)},o.load(e)}catch(a){r(e)}}function g(e,n,r){function o(e,t,n){var i=x[e];switch(e){case"max_file_size":"max_file_size"===e&&(x.max_file_size=x.filters.max_file_size=t);break;case"chunk_size":(t=a.parseSize(t))&&(x[e]=t,x.send_file_name=!0);break;case"multipart":x[e]=t,t||(x.send_file_name=!0);break;case"unique_names":x[e]=t,t&&(x.send_file_name=!0);break;case"filters":"array"===a.typeOf(t)&&(t={mime_types:t}),n?a.extend(x.filters,t):x.filters=t,t.mime_types&&(x.filters.mime_types.regexp=function(e){var t=[];return a.each(e,function(e){a.each(e.extensions.split(/,/),function(e){/^\s*\*\s*$/.test(e)?t.push("\\.*"):t.push("\\."+e.replace(new RegExp("["+"/^$.*+?|()[]{}\\".replace(/./g,"\\$&")+"]","g"),"\\$&"))})}),new RegExp("("+t.join("|")+")$","i")}(x.filters.mime_types));break;case"resize":n?a.extend(x.resize,t,{enabled:!0}):x.resize=t;break;case"prevent_duplicates":x.prevent_duplicates=x.filters.prevent_duplicates=!!t;break;case"browse_button":case"drop_element":t=a.get(t);case"container":case"runtimes":case"multi_selection":case"flash_swf_url":case"silverlight_xap_url":x[e]=t,n||(u=!0);break;default:x[e]=t}n||s.trigger("OptionChanged",e,t,i)}var s=this,u=!1;"object"==("undefined"==typeof e?"undefined":_typeof(e))?a.each(e,function(e,t){o(t,e,r)}):o(e,n,r),r?(x.required_features=i(a.extend({},x)),D=i(a.extend({},x,{required_features:!0}))):u&&(s.trigger("Destroy"),p.call(s,x,function(e){e?(s.runtime=t.Runtime.getInfo(l()).type,s.trigger("Init",{runtime:s.runtime}),s.trigger("PostInit")):s.trigger("Error",{code:a.INIT_ERROR,message:a.translate("Init error.")})}))}function m(e,t){if(e.settings.unique_names){var n=t.name.match(/\.([^.]+)$/),i="part";n&&(i=n[1]),t.target_name=t.id+"."+i}}function v(e,n){function i(){l-- >0?r(o,1e3):(n.loaded=p,e.trigger("Error",{code:a.HTTP_ERROR,message:a.translate("HTTP Error."),file:n,response:A.responseText,status:A.status,responseHeaders:A.getAllResponseHeaders()}))}function o(){var d,h,g,m={};n.status===a.UPLOADING&&e.state!==a.STOPPED&&(e.settings.send_file_name&&(m.name=n.target_name||n.name),c&&f.chunks&&s.size>c?(g=Math.min(c,s.size-p),d=s.slice(p,p+g)):(g=s.size,d=s),c&&f.chunks&&(e.settings.send_chunk_number?(m.chunk=Math.ceil(p/c),m.chunks=Math.ceil(s.size/c)):(m.offset=p,m.total=s.size)),A=new t.XMLHttpRequest,A.upload&&(A.upload.onprogress=function(t){n.loaded=Math.min(n.size,p+t.loaded),e.trigger("UploadProgress",n)}),A.onload=function(){return A.status>=400?void i():(l=e.settings.max_retries,g=s.size?(n.size!=n.origSize&&(s.destroy(),s=null),e.trigger("UploadProgress",n),n.status=a.DONE,e.trigger("FileUploaded",n,{response:A.responseText,status:A.status,responseHeaders:A.getAllResponseHeaders()})):r(o,1),void 0)},A.onerror=function(){i()},A.onloadend=function(){this.destroy(),A=null},e.settings.multipart&&f.multipart?(A.open("post",u,!0),a.each(e.settings.headers,function(e,t){A.setRequestHeader(t,e)}),h=new t.FormData,a.each(a.extend(m,e.settings.multipart_params),function(e,t){h.append(t,e)}),h.append(e.settings.file_data_name,d),A.send(h,{runtime_order:e.settings.runtimes,required_caps:e.settings.required_features,preferred_caps:D,swf_url:e.settings.flash_swf_url,xap_url:e.settings.silverlight_xap_url})):(u=a.buildUrl(e.settings.url,a.extend(m,e.settings.multipart_params)),A.open("post",u,!0),A.setRequestHeader("Content-Type","application/octet-stream"),a.each(e.settings.headers,function(e,t){A.setRequestHeader(t,e)}),A.send(d,{runtime_order:e.settings.runtimes,required_caps:e.settings.required_features,preferred_caps:D,swf_url:e.settings.flash_swf_url,xap_url:e.settings.silverlight_xap_url})))}var s,u=e.settings.url,c=e.settings.chunk_size,l=e.settings.max_retries,f=e.features,p=0;n.loaded&&(p=n.loaded=c?c*Math.floor(n.loaded/c):0),s=n.getSource(),e.settings.resize.enabled&&d(s,"send_binary_string")&&~t.inArray(s.type,["image/jpeg","image/png"])?h.call(this,s,e.settings.resize,function(e){s=e,n.size=e.size,o()}):o()}function _(e,t){u(t)}function y(e){if(e.state==a.STARTED)S=+new Date;else if(e.state==a.STOPPED)for(var t=e.files.length-1;t>=0;t--)e.files[t].status==a.UPLOADING&&(e.files[t].status=a.QUEUED,c())}function w(){A&&A.abort()}function E(e){c(),r(function(){s.call(e)},1)}function b(e,t){t.code===a.INIT_ERROR?e.destroy():t.file&&(t.file.status=a.FAILED,u(t.file),e.state==a.STARTED&&(e.trigger("CancelUpload"),r(function(){s.call(e)},1)))}function R(e){e.stop(),a.each(I,function(e){e.destroy()}),I=[],N.length&&(a.each(N,function(e){e.destroy()}),N=[]),L.length&&(a.each(L,function(e){e.destroy()}),L=[]),D={},M=!1,S=A=null,T.reset()}var x,S,T,A,O=a.guid(),I=[],D={},N=[],L=[],M=!1;x={runtimes:t.Runtime.order,max_retries:0,chunk_size:0,multipart:!0,multi_selection:!0,file_data_name:"file",flash_swf_url:"js/Moxie.swf",silverlight_xap_url:"js/Moxie.xap",filters:{mime_types:[],prevent_duplicates:!1,max_file_size:0},resize:{enabled:!1,preserve_headers:!0,crop:!1},send_file_name:!0,send_chunk_number:!0},g.call(this,e,null,!0),T=new a.QueueProgress,a.extend(this,{id:O,uid:O,state:a.STOPPED,features:{},runtime:null,files:I,settings:x,total:T,init:function(){var e=this;return"function"==typeof x.preinit?x.preinit(e):a.each(x.preinit,function(t,n){e.bind(n,t)}),f.call(this),x.browse_button&&x.url?void p.call(this,x,function(n){"function"==typeof x.init?x.init(e):a.each(x.init,function(t,n){e.bind(n,t)}),n?(e.runtime=t.Runtime.getInfo(l()).type,e.trigger("Init",{runtime:e.runtime}),e.trigger("PostInit")):e.trigger("Error",{code:a.INIT_ERROR,message:a.translate("Init error.")})}):void this.trigger("Error",{code:a.INIT_ERROR,message:a.translate("Init error.")})},setOption:function(e,t){g.call(this,e,t,!this.runtime)},getOption:function(e){return e?x[e]:x},refresh:function(){N.length&&a.each(N,function(e){e.trigger("Refresh")}),this.trigger("Refresh")},start:function(){this.state!=a.STARTED&&(this.state=a.STARTED,this.trigger("StateChanged"),s.call(this))},stop:function(){this.state!=a.STOPPED&&(this.state=a.STOPPED,this.trigger("StateChanged"),this.trigger("CancelUpload"))},disableBrowse:function(){M=arguments[0]!==n?arguments[0]:!0,N.length&&a.each(N,function(e){e.disable(M)}),this.trigger("DisableBrowse",M)},getFile:function(e){var t;for(t=I.length-1;t>=0;t--)if(I[t].id===e)return I[t]},addFile:function(e,n){function i(e,n){var i=[];t.each(c.settings.filters,function(t,n){o[n]&&i.push(function(i){o[n].call(c,t,e,function(e){i(!e)})})}),t.inSeries(i,n)}function s(e){var o=t.typeOf(e);if(e instanceof t.File){if(!e.ruid&&!e.isDetached()){if(!u)return!1;e.ruid=u,e.connectRuntime(u)}s(new a.File(e))}else e instanceof t.Blob?(s(e.getSource()),e.destroy()):e instanceof a.File?(n&&(e.name=n),d.push(function(t){i(e,function(n){n||(I.push(e),f.push(e),c.trigger("FileFiltered",e)),r(t,1)})})):-1!==t.inArray(o,["file","blob"])?s(new t.File(null,e)):"node"===o&&"filelist"===t.typeOf(e.files)?t.each(e.files,s):"array"===o&&(n=null,t.each(e,s))}var u,c=this,d=[],f=[];u=l(),s(e),d.length&&t.inSeries(d,function(){f.length&&c.trigger("FilesAdded",f)})},removeFile:function(e){for(var t="string"==typeof e?e:e.id,n=I.length-1;n>=0;n--)if(I[n].id===t)return this.splice(n,1)[0]},splice:function(e,t){var i=I.splice(e===n?0:e,t===n?I.length:t),r=!1;return this.state==a.STARTED&&(a.each(i,function(e){return e.status===a.UPLOADING?(r=!0,!1):void 0}),r&&this.stop()),this.trigger("FilesRemoved",i),a.each(i,function(e){e.destroy()}),r&&this.start(),i},bind:function(e,t,n){var i=this;a.Uploader.prototype.bind.call(this,e,function(){var e=[].slice.call(arguments);return e.splice(0,1,i),t.apply(this,e)},0,n)},destroy:function(){this.trigger("Destroy"),x=T=null,this.unbindAll()}})},a.Uploader.prototype=t.EventTarget.instance,a.File=function(){function e(e){a.extend(this,{id:a.guid(),name:e.name||e.fileName,type:e.type||"",size:e.size||e.fileSize,origSize:e.size||e.fileSize,loaded:0,percent:0,status:a.QUEUED,lastModifiedDate:e.lastModifiedDate||(new Date).toLocaleString(),getNative:function(){var e=this.getSource().getSource();return-1!==t.inArray(t.typeOf(e),["blob","file"])?e:null},getSource:function(){return n[this.id]?n[this.id]:null},destroy:function(){var e=this.getSource();e&&(e.destroy(),delete n[this.id])}}),n[this.id]=e}var n={};return e}(),a.QueueProgress=function(){var e=this;e.size=0,e.loaded=0,e.uploaded=0,e.failed=0,e.queued=0,e.percent=0,e.bytesPerSec=0,e.reset=function(){e.size=e.loaded=e.uploaded=e.failed=e.queued=e.percent=e.bytesPerSec=0}},e.plupload=a}(window,mOxie); /* <<< file end: js/lib/plupload/plupload-2.1.2.full.min.js */ //# map link was there [plupload-2.1.2.full.min.js.map] /* >>> file start: js/core/angular/plupload.js */ //= require js/lib/plupload/plupload-2.1.2.full.min.js !function(){"use strict";angular.module("angular-plupload",[]).provider("pluploadOption",function(){var l={flash_swf_url:LJ.get("siteroot")+"/js/lib/plupload/Moxie.cdn.swf",runtimes:"html5,flash",max_file_size:"10mb",multipart:!0,filters:[{title:"Image files",extensions:"jpg,jpeg,gif,png"}],chunk_size:0};return{setOptions:function(e){angular.extend(l,e)},$get:function(){return l}}}).directive("plupload",["$timeout","pluploadOption",function(l,e){function a(l){return l.charAt(0).toLowerCase()+l.slice(1)}return{scope:{url:"=plupload",options:"=pluploadOptions",callbacks:"=pluploadCallbacks",disbled:"=pluploadDisableOnUpload"},link:function(l,o){var n=e;n.url=l.url,angular.extend(n,l.options);var i=l.disbled,t=new plupload.Uploader(n);if(l.callbacks){var p=["Init","PostInit","OptionChanged","Refresh","StateChanged","UploadFile","BeforeUpload","QueueChanged","UploadProgress","FilesRemoved","FileFiltered","FilesAdded","FileUploaded","ChunkUploaded","UploadComplete","Error","Destroy"];angular.forEach(p,function(e){var o=l.callbacks[a(e)]||angular.noop;t.bind(e,function(){o.apply(null,arguments),l.$$phase||l.$root.$$phase||l.$apply()})})}t.init(),i&&t.bind("BeforeUpload",function(){t.addFile=angular.noop})}}}])}(); /* <<< file end: js/core/angular/plupload.js */ //# map link was there [plupload.js.map] /* >>> file start: js/core/angular/checked.js */ angular.module("LJ.Checked",[]).factory("checkedGroup",[function(){function e(){this._models={}}function t(t){return r[t]?r[t]:(r[t]=new e,r[t])}var r={};return e.prototype.reset=function(e){var t,r=this.models();for(t in r)r.hasOwnProperty(t)&&delete r[t];return angular.isObject(e)&&angular.extend(r,e),this},e.prototype.length=function(){return Object.keys(this.models()).length},e.prototype.count=function(){var e,t=this.models(),r=0;for(e in t)t.hasOwnProperty(e)&&t[e]&&(r+=1);return r},e.prototype.models=function(){return this._models},e.prototype.toggle=function(e,t){var r=this.models(),n="undefined"!=typeof t;Array.isArray(e)||(e=[e]),e.forEach(function(e){r[e]=n?t:!Boolean(r[e])})},e.prototype.isChecked=function(e){return Boolean(this.models()[e])},e.prototype.isAllChecked=function(e){var t=this.models();return"undefined"==typeof e?this.count()===this.length():(Array.isArray(e)||(e=[e]),e.every(function(e){return t[e]}))},e.prototype.isNoneChecked=function(e){var t=this.models();return"undefined"==typeof e?0===this.count():(Array.isArray(e)||(e=[e]),e.every(function(e){return!t[e]}))},e.prototype.getChecked=function(e){var t,r=this.models(),n=[];for(t in r)r.hasOwnProperty(t)&&r[t]&&n.push(t);return"undefined"!=typeof e&&(Array.isArray(e)||(e=[e]),e=e.map(String),n=n.filter(function(t){return-1!==e.indexOf(t)})),n},t}]); /* <<< file end: js/core/angular/checked.js */ //# map link was there [checked.js.map] /* >>> file start: js/core/angular/privacy.js */ //= require js/core/angular/api.js //= require js/core/angular/checked.js Site.page.template['angular/privacy.ng.tmpl'] = ' \n\n \n \n\n
      \n
    • \n \n
    • \n
    \n\n
    \n'; //= require_ml flatmedia.security //= require_ml admin.writers_block.answer.private //= require_ml admin.writers_block.answer.public //= require_ml admin.writers_block.answer.custom //= require_ml admin.writers_block.answer.friends //= require_ml admin.writers_block.answer.default //= require_ml admin.writers_block.answer.members //= require_ml admin.writers_block.answer.maintainers !function(e){return e}(),function(){"use strict";angular.module("LJ.Privacy",["LJ.Templates","LJ.Api","LJ.Checked"]).factory("Privacy",["Api",function(e){function t(t){return e.call("user.get_privacy_list",t,{cache:!0}).then(function(e){return e.list})}function n(t){return t=t||{},e.call("groups.list",t,{cache:!0}).then(function(e){return e.groups})}return{getGroups:n,getPrivacyList:t}}]).directive("ljPrivacy",["$timeout","Privacy","checkedGroup",function(e,t,n){return{scope:{model:"=ljPrivacy",scope:"=ljPrivacyScope",user:"=ljPrivacyUser",tab:"=ljPrivacyTabindex",init:"=ljPrivacyInit"},templateUrl:"privacy.ng.tmpl",controllerAs:"privacy",controller:["$scope","$attrs",function(r,c){function i(){r.$watchCollection(function(){return a.getChecked()},function(e){r.model.groupids=e.map(Number)})}function o(){l&&(u.selected=a.models(),t.getPrivacyList({scope:r.scope,user:r.user}).then(function(e){if(u.all=[],e.forEach(function(e){u.all.push({title:LJ.ml("admin.writers_block.answer."+e),value:e})}),c.hasOwnProperty("ljPrivacyDeafult")&&u.all.unshift({title:LJ.ml("admin.writers_block.answer.default"),value:""}),!r.communityChanged)var t=u.all.find(function(e){return e.value===r.model.privacy});t||(r.model.privacy=u.all[0].value)}),t.getGroups({journal:r.user}).then(function(e){u.groups=e,a.toggle(r.model.groupids,!0),i()}))}var u=this,a=n("custom"),l=!0;c.hasOwnProperty("ljPrivacyInit")&&r.$watch("init",function(t){l=t,e(o)}),r.$watch("user",o),r.$watchCollection("model.groupids",function(){a.toggle(r.model.groupids,!0)}),r.$on("privacy:customGroups:reset",function(){a.reset()}),LJ.Event.on("community:change",function(){r.needStateRestore?r.needStateRestore=!1:r.communityChanged=!0}),LJ.Event.on("state_restore",function(){r.needStateRestore=!0})}]}}])}(); /* <<< file end: js/core/angular/privacy.js */ //# map link was there [privacy.js.map] /* >>> file start: js/video/video.js */ var _extends=Object.assign||function(e){for(var r=1;r>> file start: js/video/selectAlbum.js */ //= require js/video/video.js Site.page.template['angular/video/selectVideoAlbum.ng.tmpl'] = '
    \n\n
    \n \n \n \n \n
    \n\n
    \n \n \n \n
    \n
    \n'; //= require_ml flatmedia.album.create.new //= require_ml flatmedia.album.name //= require_ml flatmedia.button.back //= require_ml flatmedia.or //= require_ml flatmedia.select.album !function(e){return e}(),function(){"use strict";angular.module("Video.SelectAlbum",["LJ.Templates","Video.Service"]).directive("selectVideoAlbum",["Video",function(e){return{templateUrl:"selectVideoAlbum.ng.tmpl",controllerAs:"directive",scope:{album:"=selectVideoAlbum",allowNonSelected:"=?allowNonSelected"},controller:["$scope","$attrs","Video",function(e,t,l){function n(){var l=t.allowNonSelected;return"string"==typeof l&&0===l.length?!0:e.allowNonSelected}function u(e){var t=[];return n()&&t.push(l.defaults.NON_SELECTED_ALBUM),t.concat(e?e:l.getAlbums())}var o=this,i=this.state={init:!1,create:!1};this.newAlbum={name:""},this.init=function(){i.init=!0,o.albums=angular.copy(l.getAlbums()),e.album.id?this.selectedAlbumId=e.album.id:0!==o.albums.length&&(this.selectedAlbumId=o.albums[0].id),e.$watch(function(){return o.selectedAlbumId+o.newAlbum.name+i.create},function(){e.album=i.create?o.newAlbum:l.getAlbumById(o.selectedAlbumId)}),e.$watchCollection(l.getAlbums,function(e){o.albums=u(e),0===e.length&&(i.create=!0)}),"undefined"!=typeof t.allowNonSelected&&e.$watch("allowNonSelected",function(){o.albums=u()})},this.toggle=function(e){i.create=e,this.newAlbum.name=""}}],link:function(t,l,n,u){if("undefined"==typeof t.album)throw new TypeError("You should provide album object");e.fetchAlbums().then(function(){u.init()})}}}])}(); /* <<< file end: js/video/selectAlbum.js */ //# map link was there [selectAlbum.js.map] /* >>> file start: js/video/uploader.js */ //= require js/core/angular/api.js //= require js/core/angular/adult.js //= require js/core/angular/plupload.js //= require js/core/angular/privacy.js //= require js/video/video.js //= require js/video/selectAlbum.js Site.page.template['angular/video/uploaderVideo.ng.tmpl'] = '\n \n \n \n
    \n\n
    \n \n
    \n\n
    \n \n
    \n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n \n \n
    \n\n
    \n\n
    \n \n \n \n
    \n\n\n\n
    \n \n
    \n'; //= require_ml flatmedia.button.cancel //= require_ml flatmedia.name //= require_ml flatmedia.upload.video //= require_ml videouploader.upload.dragOrClick //= require_ml videouploader.upload.selectedFile //= require_ml photouploader.upload.initFail !function(e){return e}(),function(){"use strict";angular.module("Video.Uploader",["LJ.Templates","LJ.Api","LJ.Adult","LJ.Privacy","LJ.Messages","angular-plupload","Video.SelectAlbum","Video.Service"]).directive("ljVideoUploader",["$timeout",function(e){return{templateUrl:"uploaderVideo.ng.tmpl",scope:{albumId:"=ljVideoUploader",callback:"&ljVideoUploaderCallback",cancelUpload:"&ljVideoUploaderCancel"},controllerAs:"directive",controller:["$scope","$q","$rootScope","$element","$attrs","Video","Messages",function(o,t,l,n,i,a,d){function r(){return{name:a.defaults.ALBUM_NAME,privacy:a.defaults.RECORD_PRIVACY,album:a.getAlbumById(o.albumId)||{},adult_content:a.defaults.RECORD_ADULT}}var u,s=this,c=this.state={init:!1,error:!1,uploadInProgress:!1,uploadDone:!1,fileAdded:!1};this.isUploadAllowed=function(){return u&&0!==u.trim().length&&0!==this.model.name.trim().length&&(this.model.album.id||0!==this.model.album.name.trim().length)&&!this.state.uploadInProgress},this.init=function(){c.init=!0,this.model=r()},this.upload=function(){s.state.uploadInProgress=!0,this.beforeUpload().then(function(e){var t=s.uploader.files;LJ.Event.trigger("video:upload:start"),t[0].name=e.name,s.file.id=e.id,s.uploader.settings.url=e.upload_link,s.uploader.start(),LJ.Event.once("video:upload:done",function(){o.callback({record:e})})})},this.cancel=function(){LJ.Event.trigger("video:upload:cancel"),s.state.uploadInProgress=!1,"function"==typeof o.cancelUpload&&o.cancelUpload()},this.beforeUpload=function(){var e=angular.copy(s.model),o=t.defer(),l=o.promise;return"undefined"==typeof e.album.id?l=a.createAlbum({name:e.album.name}):o.resolve(e.album),delete e.album,l.then(function(o){var t=s.uploader.files[0],l=angular.extend(e,{name:s.model.name.trim(),size:t.size});return e.albumid=o.id,a.createRecord(l).then(function(e){return e})})},this.uploadUrl="/sampleUrl",this.uploadOptions={drop_element:"upload-panel-video",browse_button:"pickfiles-video",multi_selection:!1,filters:{max_file_size:"10240mb",mime_types:[{title:"Video files",extensions:"avi,mp4,mov,3gp,wmv,mkv,webm"}]},multipart:!0,file_data_name:"media"},this.uploadCallbacks={init:function(e){s.uploader=e},filesAdded:function(o,t){e(function(){s.state.uploadDone=!1,s.file=angular.copy(t[0]),o.splice(0,o.files.length-1),u=s.model.name=t[0].name})},uploadProgress:function(e,o){s.file.percent=o.percent},uploadComplete:function(){s.state.error||(s.state.uploadInProgress=!1,s.state.uploadDone=!0,LJ.Event.trigger("video:upload:done"))},error:function(o,t){return s.state.uploadInProgress=!1,s.state.error=!0,t.code===window.plupload.INIT_ERROR?void(s.state.init=!1):(t.code===window.plupload.HTTP_ERROR&&s.file&&a.removeRecords([s.file.id]),void e(function(){d.error({body:t.message})}))}},LJ.Event.on("Uploader:filesAdded:video",function(o){e(function(){s.file=angular.copy(o[0])})})}],link:function(o,t,l,n){e(function(){n.init()})}}}])}(); /* <<< file end: js/video/uploader.js */ //# map link was there [uploader.js.map] /* >>> file start: js/video/editor.js */ //= require js/editor/editor.js //= require js/editor/media.js //= require js/core/string.js //!= require js/core/angular/messages.js //= require js/core/angular/api.js //= require js/core/angular/pills.js //= require js/core/angular/authHelper.js //= require js/video/uploader.js //= require js/video/video.js LJ.injectStyle('/* >>> file start: stc/photouploader.css */\n.b-photouploader-item-upload-start .b-photouploader-panel-controls,.b-photouploader-item-upload-start .b-photouploader-panel-pictures,.flatmedia-create-field{display:none}.b-photouploader-panel-dropbox,.b-photouploader-panel-instalogin,.upload__box,.upload__item_pic{text-align:center}.flatpopup-loading .flatpopup__body:after,.flatpopup-loading-state:before{z-index:1;top:0;left:0;opacity:.6;background:#FFF;right:0;bottom:0}.b-photouploader{width:480px}.b-photouploader-items{margin:0}.b-photouploader-item{margin:0;padding:1em 0 0}.b-photouploader-item-noalbums{padding:1em 0;text-align:center}.b-photouploader-item-noalbums:not(.ng-hide)+.b-photouploader-item-instagram{padding-top:0}.b-photouploader-item-upload-start .b-photouploader-panel-upload{margin-bottom:0}.b-photouploader-item-upload-uploaded .b-photouploader-panel-pictures{margin-bottom:15px;overflow:auto;max-height:250px}.flatpopup-create-state .flatmedia-create-field,.flatpopup-loading .flatpopup__preloader,.flatpopup-success-state .flatpopup__msg-success,.flatpopup-warning-state .flatpopup__msg-warning{display:block}.flatpopup-loading .flatpopup__body:after{display:block;position:absolute}.flatpopup-create-state .flatmedia-edit-field{display:none}.flatpopup-loading-state{position:relative;width:100%;min-height:34px}.flatpopup-loading-state:after,.flatpopup-loading-state:before{display:block;position:absolute;content:\"\"}.flatpopup-loading-state:after{z-index:2;top:50%;left:50%;width:34px;height:34px;margin-top:-17px;margin-left:-17px;background:url(/img/preloader/preloader-disc-blue-white.gif?v=39255) 50% 50% no-repeat}.upload__box,.upload__box-label{border:4px dashed #DAE3E6;background:#FFF}.upload__item,.upload__item_remove{background-color:#FFF;cursor:pointer}.flatpopup-delete-btn{display:none}.flatpopup-edit-state .flatpopup-delete-btn{display:inline-block}.flatpopup SELECT,.flatpopup-label+SELECT{max-width:160px;margin:0 5px 0 0;font-size:14px;vertical-align:middle}.flatpopup-label{color:#004359}.b-ljform-field .flatpopup-label{margin-right:6px}.upload__box{overflow:hidden;position:relative;min-height:49px}.upload__box-label{display:block;margin:-5px;padding:15px;cursor:pointer}.upload__input{position:absolute!important;top:0;right:0;width:100%;height:50px;margin:0;padding:0;border:0;opacity:0;filter:alpha(opacity=0);zoom:1;font-size:10000px;cursor:pointer}.upload__items{position:relative;margin:25px 0 19px;padding:0;list-style:none}.upload__item{display:inline-block;position:relative;width:144px;height:144px;margin:0 20px 30px;padding:22px;box-shadow:0 7px 22px -9px #999;box-sizing:border-box}.upload__item_pic{display:block;width:100px;height:100px;background-position:0 0;background-repeat:no-repeat;background-size:cover}.upload__item_remove{display:inline-block;position:absolute;top:-11px;right:-11px;width:20px;height:20px;border:2px solid #cf0011;border-radius:50%;box-shadow:0 3px 5px -3px #000}.upload__item_remove .svgicon{position:absolute;top:50%;left:50%;width:12px;height:12px;margin-top:-6px;margin-left:-6px}.upload-bar{opacity:0;position:relative;height:6px;margin:0 0 10px;border-radius:6px;background-color:#CCC}.upload-bar__inner{position:absolute;left:0;top:0;height:6px;border-radius:6px;background-color:#09C}.upload-bar__inner:after{content:\"\";z-index:1;position:absolute;overflow:hidden;top:0;left:0;bottom:0;right:0;background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(.25,rgba(255,255,255,.2)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.2)),color-stop(.75,rgba(255,255,255,.2)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);background-size:50px 50px;-webkit-animation:move 2s linear infinite;animation:move 2s linear infinite}@-webkit-keyframes move{0%{background-position:0 0}100%{background-position:50px 50px}}@keyframes move{0%{background-position:0 0}100%{background-position:50px 50px}}.flatpopup-uploading .upload-bar{opacity:1}.flatpopup-uploading .upload-bar,.flatpopup-uploading .upload-bar__inner{-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:.3s;transition-duration:.3s}.flatpopup-uploading-complete .upload-bar{opacity:0;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-duration:.3s;transition-duration:.3s}.flatpopup__msg-text{display:none;margin:1em 0}.b-photouploader-byurl:after,.b-photouploader-instahead:after,.b-photouploader-panel:after{display:table;border-collapse:collapse;clear:both}.flatpopup-action-link{white-space:nowrap;border:0;background-color:transparent;color:#00A3D9}.b-flatbutton+.flatpopup-action-link{margin-left:4px;font:14px/1 ProximaNovaSemibold,Tahoma,Arial,sans-serif;font:.875em/1 normal normal ProximaNovaSemibold,Tahoma,Arial,sans-serif;text-transform:uppercase}.flatpopup-aside-link{float:right}.b-photouploader-panel{margin:0}.b-photouploader-panel:after{content:\"\"}.b-photouploader-panel-upload{margin:0 0 15px}.b-photouploader-panel-albums,.b-photouploader-panel-pictures{margin:0}.b-photouploader-panel-url{margin:0 0 15px}.b-photouploader-panel-dropbox-intro{width:75%;margin:0 auto 1em;line-height:1.4}.b-photouploader-panel-instalogin-intro{width:70%;margin:0 auto 1em;text-align:left;line-height:1.4}.b-photouploader-byurl{margin:0 0 0 110px;padding:0}.b-photouploader-byurl:after{content:\"\"}.b-photouploader-byurl-picture{position:relative;left:-110px;float:left;width:100px;max-height:100px;margin:0 -100px 0 0;padding:0;box-shadow:0 0 10px #BBB;background:#FFF}.b-photouploader-byurl-image{max-width:100px;max-height:100px;margin:0;vertical-align:top}.b-photouploader-byurl-sub{display:block;margin:0;padding:10px;font-size:86%;color:#999}.b-photouploader-byurl-form{margin:0 0 1em}.b-photouploader-byurl-label{display:block;margin:0 0 .5em}.b-photouploader-byurl-br{display:none}.b-photouploader-byurl-src{margin:0;width:370px}.b-photouploader-byurl-link{margin:0;width:250px}.b-photouploader-byurl-note{display:block;margin:.5em 0 0;font-size:86%;font-style:normal;color:#666}.b-photouploader-albumsettings-separator{display:none}.b-photouploader-panel-controls{margin:0 -15px;padding:15px;border-top:1px solid #FFF;box-shadow:0 -1px 0 #CCC}.b-photouploader-panel-controls .b-photouploader-albumselector{float:left;width:70%}.b-photouploader-albumselector-item{margin:0 0 .5em}.b-photouploader-albumselector-input{width:280px}.b-photouploader-panel-controls .b-photouploader-albumsettings{float:left}.b-photouploader-albumsettings-select{margin:0 1em 0 0}.b-photouploader-panel-controls .b-photouploader-urlsettings{margin:0 0 1em}.b-photouploader-urlsettings-label{margin:0 .5em 0 0}.b-photouploader-panel-controls .b-photouploader-instasettings{float:left;width:75%}.b-photouploader-instasettings-label{margin:0 1em 0 0}.b-photouploader-instasettings-annex{display:block;margin:0 0 0 1.7em;color:#999}.b-photouploader-panel-controls .b-flatbutton,.b-photouploader-panel-controls .b-ljbutton{float:right}.b-photouploader-panel-controls .b-ljbutton{display:inline-block}.b-photouploader-panel-controls .b-flatbutton,.s-schemius .b-photouploader-panel-controls .b-ljbutton{display:none}.s-schemius .b-photouploader-panel-controls .b-flatbutton{display:inline-block}.b-photouploader-uploader{margin:0;padding:25px 15px;border:1px solid #BBB;border-radius:5px;text-align:center;line-height:2;color:#666}.drag-and-drop .b-photouploader-uploader{box-shadow:inset 0 0 15px #526283;border:2px dashed #999;border-radius:0;background:#FFF}.b-photouploader-uploader-drop{display:none;margin:0;padding:0;color:#666}.b-photouploader-uploader-drop STRONG{font-size:1.5em;font-weight:400;color:#666}.b-photouploader-uploader-nodrop{margin:0}.b-photouploader-uploader-nodrop STRONG{font-size:1.5em;font-weight:400;color:#666}.drag-and-drop .b-photouploader-uploader-drop{display:block}.drag-and-drop .b-photouploader-uploader-nodrop{display:none}.b-photouploader-uploader-input{color:#666}.b-photouploader-uploader-list{width:40%;margin:5px auto;padding:0;list-style-type:decimal;text-align:left;line-height:1.2}.b-photouploader-uploader-list-item{margin:0 0 .5em;padding:0}.b-photouploader-pictures{margin:0;padding:0;list-style:none}.b-photouploader-pictures-item{position:relative;display:inline-block;width:142px;margin:0 5px 5px 0;padding:10px;vertical-align:top}.b-photouploader-pictures-pic{display:table-cell;width:132px;height:132px;margin:0;padding:5px;vertical-align:middle;box-shadow:0 5px 10px #CCC;background:#FFF;text-align:center}.b-photouploader-pictures-img{max-width:132px;max-height:132px;vertical-align:top}.b-photouploader-pictures-remove{display:none;overflow:hidden;position:absolute;top:0;right:0;z-index:1;width:21px;height:21px;background:url(/img/icons/remove.png?v=37651) no-repeat;font:0/0 a;cursor:pointer}.b-photouploader-pictures-title{display:none;overflow:hidden;margin:0;padding:5px 5px 0;white-space:nowrap;text-overflow:ellipsis;text-align:center;font-size:90%;font-weight:400}.b-photouploader-pictures-item.selected{border-radius:3px;box-shadow:inset 0 0 4px #444;background:#2C5188;background:-webkit-linear-gradient(top,#2C5188 0,#2E8FED 100%) #2C5188;background:linear-gradient(to bottom,#2C5188 0,#2E8FED 100%) #2C5188;color:#FFF}.b-photouploader-pictures-item.selected .b-photouploader-pictures-pic{box-shadow:0 2px 4px #666}.b-photouploader-pictures-item.selected .b-photouploader-pictures-title{color:#FFF}.b-photouploader-pictures-withremove .b-photouploader-pictures-remove,.b-photouploader-pictures-withtitle .b-photouploader-pictures-title{display:block}.b-photouploader-pictures-withmove .b-photouploader-pictures-pic{cursor:move}.b-photouploader-nav{position:absolute;top:0;left:0;z-index:2;width:100%;margin:0;padding:10px 0 25px;list-style:none;background:-webkit-linear-gradient(top,rgba(247,249,250,1) 0,rgba(247,249,250,0) 100%);background:linear-gradient(to bottom,rgba(247,249,250,1) 0,rgba(247,249,250,0) 100%)}.b-photouploader-nav-item{display:inline;margin:0;padding:0}.b-photouploader-nav-item:before{content:\"/\"}.b-photouploader-nav-item:first-child:before{content:\"\"}.b-photouploader-nav-item A:link,.b-photouploader-nav-item A:visited{border-bottom:1px dotted;text-decoration:none;color:#0051B7!important}.b-photouploader-nav-item A:active,.b-photouploader-nav-item A:hover{border-bottom:1px dotted;text-decoration:none;color:#C00!important}.b-photouploader-nav>SELECT{width:100%}.b-photouploader-albums{position:relative}.b-photouploader-albums-inner{overflow:auto;height:250px;margin:0 -15px;padding:10px 15px 0;background:#F7F9FA}.b-photouploader-albums-withnav .b-photouploader-albums-inner{padding-top:40px}.b-photouploader-albums-loading .b-photouploader-albums-inner:after{content:\" \";position:absolute;bottom:0;left:50%;width:30px;height:30px;margin:0 0 0 -15px;padding:0;background:url(/img/preloader/preloader-blue-blue.gif?v=16423) no-repeat;font:0/0 a}.b-photouploader-albums-select{max-width:200px}.b-photouploader-search{margin:0 -15px 1px;padding:0 15px 15px;border-bottom:1px solid #CCC;box-shadow:0 1px 0 #FFF}.b-photouploader-search-input{width:100%;box-sizing:border-box}.b-photouploader-subhead{margin:0 0 .5em;font-weight:700;font-size:1em}.b-photouploader-subhead-annex{font-weight:400}.b-photouploader-subtext{margin:0 0 1em;font-size:1em;line-height:1.4}.b-photouploader-instahead,.b-photouploader-logout{margin:0}.b-photouploader .b-photouploader-logout:link,.b-photouploader .b-photouploader-logout:visited{border-bottom:1px dotted;text-decoration:none;color:#0051B7!important}.b-photouploader .b-photouploader-logout:active,.b-photouploader .b-photouploader-logout:hover{text-decoration:none;color:#C00!important}.b-photouploader-instahead--center{text-align:center}.b-photouploader-instahead:after{content:\"\"}.b-photouploader-instahead .b-photouploader-subhead{float:left}.b-photouploader-instahead:not(.b-photouploader-instahead--center) .b-photouploader-logout{float:right}.b-photouploader-instagram-signup:link{display:inline-block;position:relative;margin:0 0 1px;padding:.5em 1.75em .5em 1em;border:1px solid #CCC;border-right:.25em solid #00558D;border-radius:.25em;background:#F8F8F8;text-shadow:1px 1px #FFF;text-decoration:none;font-size:1.5em;color:#333}:root *>.b-photouploader-instagram-signup:after,:root *>.b-photouploader-instagram-signup:before{content:\' \';display:block;position:absolute}.b-photouploader-instagram-signup:before{top:0;right:0;width:.25em;height:100%;background:#FBB03B;border-left:.25em solid #D4145A;border-right:.25em solid #00A99D}.b-photouploader-instagram-signup:after{width:100%;height:100%;top:0;left:0;border-radius:.25em;padding-left:.25em;box-shadow:inset 1px 1px 0 rgba(255,255,255,.5),inset -1px -1px 0 rgba(0,0,0,.1);background:-webkit-linear-gradient(top,rgba(255,255,255,.35) 0,rgba(255,255,255,.2) 49%,rgba(255,255,255,0) 50%,rgba(0,0,0,.1) 100%);background:linear-gradient(to bottom,rgba(255,255,255,.35) 0,rgba(255,255,255,.2) 49%,rgba(255,255,255,0) 50%,rgba(0,0,0,.1) 100%)}.b-photouploader-instagram-signup,.b-photouploader-instagram-signup:before{-webkit-transition:.1s ease-in;-moz-transition:.1s ease-in;-o-transition:.1s ease-in;transition:.1s ease-in}.b-photouploader-instagram-signup:focus,.b-photouploader-instagram-signup:hover{background:#FFF}.b-photouploader-instagram-signup:hover{border-right:.25em solid #09C}.b-photouploader-instagram-signup:hover:before{background:#FC6;border-left:.25em solid #F06;border-right:.25em solid #0CC}.b-photouploader-instagram-signup:hover:after{background:-webkit-linear-gradient(top,rgba(255,255,255,.25) 0,rgba(255,255,255,.1) 49%,rgba(255,255,255,0) 50%,rgba(0,0,0,.05) 100%);background:linear-gradient(to bottom,rgba(255,255,255,.25) 0,rgba(255,255,255,.1) 49%,rgba(255,255,255,0) 50%,rgba(0,0,0,.05) 100%)}.b-photouploader-instagram-signup:active{margin:1px 0 0}.b-popup .b-photouploader-instagram-signup:active,.b-popup .b-photouploader-instagram-signup:hover,.b-popup .b-photouploader-instagram-signup:link,.b-popup .b-photouploader-instagram-signup:visited{border:1px solid #CCC;border-right:.25em solid #00558D;text-decoration:none}@media all and (max-width:650px){.b-photouploader{width:auto}.b-photouploader-albumsettings-separator{display:block}.b-photouploader-byurl{margin-left:0}.b-photouploader-byurl-picture{left:auto;float:none;width:100%;max-width:380px;margin:0 auto 20px;text-align:center}.b-photouploader-byurl-link,.b-photouploader-byurl-src{width:100%}}\n/* <<< file end: stc/photouploader.css */\n\n/*# sourceMappingURL=photouploader.css.map */\n'); LJ.injectStyle('/* >>> file start: stc/menu_v2.css */\n.b-menu,.b-menu-item-link{position:relative;padding:0;margin:0}.b-menu{list-style:none}.b-menu:after{content:\"\";display:table;border-collapse:collapse;clear:both}.b-menu-item{display:block;font-family:ProximaNovaSemibold,Helvetica,sans-serif;text-transform:uppercase}.b-menu-item .b-menu-item-link:not(.b-menu-item-link-external):link,.b-menu-item .b-menu-item-link:not(.b-menu-item-link-external):visited{color:#7A9199}.b-menu-item .b-menu-item-link:not(.b-menu-item-link-external):active,.b-menu-item .b-menu-item-link:not(.b-menu-item-link-external):hover{color:#242F33}.b-menu-item-disabled{opacity:.5;color:#7A9199}.b-menu-item-disabled .b-menu-item-link{pointer-events:none}.b-menu-item-active{color:#242F33}.b-menu-hrz .b-menu-item{display:inline-block}.b-menu-pills{margin:0;font-size:.8125rem}.b-menu-pills .b-menu-item-link{display:inline-block;padding:10px 13px}.b-menu-pills .b-menu-item-active,.b-menu-pills.b-menu-hrz .b-menu-item-active{padding:0}.b-menu-pills .b-menu-item-link:link,.b-menu-pills .b-menu-item-link:visited{color:#7A9199}.b-menu-pills .b-menu-item-link:active,.b-menu-pills .b-menu-item-link:hover{color:#00A3D9}.b-menu-pills .b-menu-item-active .b-menu-item-link{background:#DAE3E6;cursor:default}.b-menu-pills .b-menu-item-active .b-menu-item-link:active,.b-menu-pills .b-menu-item-active .b-menu-item-link:hover{color:#7A9199}.b-menu-pills.b-menu-hrz{margin:0}.b-menu-tabs{overflow:hidden;margin:0;padding:0}.b-menu-tabs:before{content:\" \";position:absolute;bottom:0;left:0;right:0;height:0;border-bottom:1px solid #dae3e6}.b-menu-tabs .b-menu-item{position:relative;display:inline-block;margin:0;padding:1em 1.5em;text-align:center;border:1px solid transparent;border-bottom:none;vertical-align:top;white-space:nowrap;text-transform:uppercase;letter-spacing:.05em;font-size:13px}.b-menu-tabs .b-menu-item-active{padding:1em 2em;border-color:#dae3e6;border-radius:2px 2px 0 0;background:#FFF}.b-menu-tabs .b-menu-item-active .b-menu-item-link{display:inline;margin:0;padding:0;border-radius:0;box-shadow:none;background:0 0;color:#242F33}.b-menu-tabs-min .b-menu-item{padding:.4em .7em}@media screen and (max-width:1260px){.b-menu-tabs:not(.b-menu-little)::before{content:none}.b-menu-tabs:not(.b-menu-little) .b-menu-item-active{border:1px solid #DAE3E6}}@media screen and (max-width:1050px){.b-menu-tabs .b-menu-item{padding:1em}.b-menu-tabs-min .b-menu-item{padding:.4em .7em}}@media screen and (max-width:880px){.b-menu-tabs .b-menu-item:last-child{margin-bottom:10px}.b-menu-tabs .b-menu-item-active{border-bottom:1px solid #DAE3E6}}@media print{.b-menu{display:none}}\n/* <<< file end: stc/menu_v2.css */\n\n/*# sourceMappingURL=menu_v2.css.map */\n'); Site.page.template['angular/video.ng.tmpl'] = '\n\n\n\n \n \n \n \n \n \n \n \n\n\n \n
    \n\n\n\n \n \n \n
    \n\n
    \n\n\n\n \n \n\n \n \n\n \n\n
    \n \n \n \n \n \n \n
    \n\n \n \n \n \n \n \n \n\n
    \n \n\n \n\n \n \n \n \n \n \n \n\n \n\n\n \n
    \n\n \n
    \n\n \n\n \n
    \n\n
    \n \n \n \n
    \n \n \n \n \n\n \n\n\n\n\n'; //= require_ml videouploader.embed.title //= require_ml videouploader.upload.title //= require_ml videouploader.byUrl.title //= require_ml videouploader.album.title //= require_ml videouploader.album.select //= require_ml videouploader.album.insert //= require_ml videouploader.noalbum //= require_ml tour.video_update_tour.tip //= require_ml talk.video //= require_ml talk.video.paste //= require_ml talk.video.insert !function(e){return e}(),function(){"use strict";function e(e,t,r,n,o,i,l,s){function u(e){var t=r.defer();return t.resolve(e),t.promise}function d(){var e=LiveJournal.parseGetArgs().video_id,t=LiveJournal.parseGetArgs().record_id;e&&c.records.insertRecords(e.split(","),{user:LiveJournal.parseGetArgs().user}),t&&s.fetchRecordByStorageId(t).then(function(e){c.records.all=[e],c.records.toggleRecord(e),c.insert()})}function a(){angular.element(".cke_button_LJEmbedLink").attr({ljTour:"",dataTour:"video_update_tour",dataStep:"1",dataTourText:"tour.regionalrating.step1.tip"})}var c=this;this.state={canUpload:LJ.get("remote")&&!LJ.get("remote_is_identity"),isOpen:!1},this.bubble=e.bubble,this.isPill=function(e){return i.group("uploadVideo")===e},this.pill=function(e){e=e||LJ.Storage.getItem("videoUploadPill")||"upload",i.group("uploadVideo",e),LJ.Storage.setItem("videoUploadPill",e)},this.albums={init:function(){return s.fetchAlbums({user:LJ.get("remote.username")}).then(function(){s.getAlbums().length&&(c.albums.all=s.getAlbums(),c.albums.current=s.getAlbums()[0])})},mapped:function(e){return c.albums._mappedAlbums||(c.albums._mappedAlbums=s.getAlbums().reduce(function(e,t){return e[t.id]=t,e},{})),e?c.albums._mappedAlbums[e]:c.albums._mappedAlbums[c.albums.current.id]}},this.records={request:function(e){return e=e||{},c.state.canUpload?n.call("video.get_records",e).then(function(e){return e.records?(c.records.all=e.records.slice(),e.records):void 0}):r.reject()},insertRecords:function(e,t){return t=t||{},Array.isArray(e)||(e=[e]),t.ids=e,c.records.request(t).then(function(e){c.records.all=e.map(function(e){return e.selected=!0,e}),c.insert()})},insertUploadedRecord:function(e){c.records.toggleRecord(e),c.records.all=[e],c.insert()},toggleRecord:function(e){e.selected=!e.selected},noneSelected:function(){return 0===(c.records.all||[]).filter(LJ.Function.get("selected")).length}},e.$watch(function(){return c.albums.current},function(e,t){e&&e!==t&&s.fetchRecords(e.id,{user:LJ.get("remote.username")}).then(function(){c.records.all=s.getRecordsByAlbumId(e.id),l.scrollTo("videoUploader",{toParent:!0})})}),c.insert=function(){function r(){try{o.insertContent("video",i.map(LJ.Function.get("embed")).join("\n"),i.map(u),i),e.bubble.close()}catch(n){c.state.isOpen&&t(r)}}if(c.records.all){var n='',i=c.records.all.filter(LJ.Function.get("selected")).map(function(e){return e.thumbnail=e.screenshot,e.embed=n.supplant(e),e.link=e.url,e});r()}},e.$on("bubble:open:video",function(){c.state.canUpload&&c.albums.init(),c.state.isOpen=!0}),e.$on("bubble:close:video",function(){c.state.canUpload&&c.albums.all&&c.records.all&&c.records.all.filter(LJ.Function.get("selected")).map(function(e){delete e.selected}),c.state.isOpen=!1}),LJ.Event.on("video:upload:done",function(){c.bubble.close()}),LJ.get("is_dev_server")?LJ.Event.on("rte_embed_ready",function(){d(),a()}):t(function(){d(),a()})}angular.module("Video.Editor",["LJ.AuthHelper","LJ.Messages","LJ.Pills","LJ.Api","Video.Uploader","Video.Service","Editor"]).controller("VideoEditorCtrl",["$scope","$timeout","$q","Api","Editor","Pills","Ref","Video",e])}(); /* <<< file end: js/video/editor.js */ //# map link was there [editor.js.map] /* >>> file start: js/lib/jquery-ui/jquery.ui.mouse.min.js */ !function(e,t){var s=!1;e(document).mouseup(function(e){s=!1}),e.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(s){return!0===e.data(s.target,t.widgetName+".preventClickEvent")?(e.removeData(s.target,t.widgetName+".preventClickEvent"),s.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!s){this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var o=this,i=1==t.which,u="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return i&&!u&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){o.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return o._mouseMove(e)},this._mouseUpDelegate=function(e){return o._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),s=!0,!0)):!0}},_mouseMove:function(t){return!e.browser.msie||document.documentMode>=9||t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target==this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})}(jQuery); /* <<< file end: js/lib/jquery-ui/jquery.ui.mouse.min.js */ //# map link was there [jquery.ui.mouse.min.js.map] /* >>> file start: js/lib/jquery-ui/jquery.ui.sortable.min.js */ !function(t,e){t.widget("ui.sortable",t.ui.mouse,{widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){t.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget()[i?"addClass":"removeClass"]("ui-sortable-disabled")):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=this;if(this.reverting)return!1;if(this.options.disabled||"static"==this.options.type)return!1;this._refreshItems(e);var r=null,o=this;t(e.target).parents().each(function(){return t.data(this,s.widgetName+"-item")==o?(r=t(this),!1):void 0});if(t.data(e.target,s.widgetName+"-item")==o&&(r=t(e.target)),!r)return!1;if(this.options.handle&&!i){var n=!1;if(t(this.options.handle,r).find("*").andSelf().each(function(){this==e.target&&(n=!0)}),!n)return!1}return this.currentItem=r,this._removeCurrentsFromItems(),!0},_mouseStart:function(e,i,s){var r=this.options,o=this;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&(t("body").css("cursor")&&(this._storedCursor=t("body").css("cursor")),t("body").css("cursor",r.cursor)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(var n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,o._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){if(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll){var i=this.options,s=!1;this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY=0;r--){var o=this.items[r],n=o.item[0],h=this._intersectsWithPointer(o);if(h&&o.instance===this.currentContainer&&n!=this.currentItem[0]&&this.placeholder[1==h?"next":"prev"]()[0]!=n&&!t.ui.contains(this.placeholder[0],n)&&("semi-dynamic"==this.options.type?!t.ui.contains(this.element[0],n):!0)){if(this.direction=1==h?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(o))break;this._rearrange(e,o),this._trigger("change",e,this._uiHash());break}}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,r=s.placeholder.offset();s.reverting=!0,t(this.helper).animate({left:r.left-this.offset.parent.left-s.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:r.top-this.offset.parent.top-s.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){var e=this;if(this.dragging){this._mouseUp({target:null}),"original"==this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("deactivate",null,e._uiHash(this)),this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",null,e._uiHash(this)),this.containers[i].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!=this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,r=s+this.helperProportions.height,o=t.left,n=o+t.width,h=t.top,a=h+t.height,l=this.offset.click.top,c=this.offset.click.left,p=s+l>h&&a>s+l&&e+c>o&&n>e+c;return"pointer"==this.options.tolerance||this.options.forcePointerForContainers||"pointer"!=this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:o0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor==String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i=[],s=[],r=this._connectWith();if(r&&e)for(var o=r.length-1;o>=0;o--)for(var n=t(r[o]),h=n.length-1;h>=0;h--){var a=t.data(n[h],this.widgetName);a&&a!=this&&!a.options.disabled&&s.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a])}s.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var o=s.length-1;o>=0;o--)s[o][0].each(function(){i.push(this)});return t(i)},_removeCurrentsFromItems:function(){for(var t=this.currentItem.find(":data("+this.widgetName+"-item)"),e=0;e=0;o--)for(var n=t(r[o]),h=n.length-1;h>=0;h--){var a=t.data(n[h],this.widgetName);a&&a!=this&&!a.options.disabled&&(s.push([t.isFunction(a.options.items)?a.options.items.call(a.element[0],e,{item:this.currentItem}):t(a.options.items,a.element),a]),this.containers.push(a))}for(var o=s.length-1;o>=0;o--)for(var l=s[o][1],c=s[o][0],h=0,p=c.length;p>h;h++){var f=t(c[h]);f.data(this.widgetName+"-item",l),i.push({item:f,instance:l,width:0,height:0,left:0,top:0})}},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var i=this.items.length-1;i>=0;i--){var s=this.items[i];if(s.instance==this.currentContainer||!this.currentContainer||s.item[0]==this.currentItem[0]){var r=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item;e||(s.width=r.outerWidth(),s.height=r.outerHeight());var o=r.offset();s.left=o.left,s.top=o.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var i=this.containers.length-1;i>=0;i--){var o=this.containers[i].element.offset();this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}return this},_createPlaceholder:function(e){var i=e||this,s=i.options;if(!s.placeholder||s.placeholder.constructor==String){var r=s.placeholder;s.placeholder={element:function(){var e=t(document.createElement(i.currentItem[0].nodeName)).addClass(r||i.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return r||(e.style.visibility="hidden"),e},update:function(t,e){(!r||s.forcePlaceholderSize)&&(e.height()||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}}i.placeholder=t(s.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),s.placeholder.update(i,i.placeholder)},_contactContainers:function(e){for(var i=null,s=null,r=this.containers.length-1;r>=0;r--)if(!t.ui.contains(this.currentItem[0],this.containers[r].element[0]))if(this._intersectsWith(this.containers[r].containerCache)){if(i&&t.ui.contains(this.containers[r].element[0],i.element[0]))continue;i=this.containers[r],s=r}else this.containers[r].containerCache.over&&(this.containers[r]._trigger("out",e,this._uiHash(this)),this.containers[r].containerCache.over=0);if(i)if(1===this.containers.length)this.containers[s]._trigger("over",e,this._uiHash(this)),this.containers[s].containerCache.over=1;else if(this.currentContainer!=this.containers[s]){for(var o=1e4,n=null,h=this.positionAbs[this.containers[s].floating?"left":"top"],a=this.items.length-1;a>=0;a--)if(t.ui.contains(this.containers[s].element[0],this.items[a].item[0])){var l=this.containers[s].floating?this.items[a].item.offset().left:this.items[a].item.offset().top;Math.abs(l-h)0?"down":"up")}if(!n&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[s],n?this._rearrange(e,n,null,!0):this._rearrange(e,null,this.containers[s].element,!0),this._trigger("change",e,this._uiHash()),this.containers[s]._trigger("change",e,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[s]._trigger("over",e,this._uiHash(this)),this.containers[s].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"==i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!=i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(""==s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(""==s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&t.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&t.browser.msie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if("parent"==e.containment&&(e.containment=this.helper[0].parentNode),("document"==e.containment||"window"==e.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"==e.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"==e.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),!/^(document|window|parent)$/.test(e.containment)){var i=t(e.containment)[0],s=t(e.containment).offset(),r="hidden"!=t(i).css("overflow");this.containment=[s.left+(parseInt(t(i).css("borderLeftWidth"),10)||0)+(parseInt(t(i).css("paddingLeft"),10)||0)-this.margins.left,s.top+(parseInt(t(i).css("borderTopWidth"),10)||0)+(parseInt(t(i).css("paddingTop"),10)||0)-this.margins.top,s.left+(r?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(t(i).css("borderLeftWidth"),10)||0)-(parseInt(t(i).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,s.top+(r?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(t(i).css("borderTopWidth"),10)||0)-(parseInt(t(i).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"==e?1:-1,r=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&t.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),o=/(html|body)/i.test(r[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-(t.browser.safari&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*s),left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-(t.browser.safari&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*s)}},_generatePosition:function(e){var i=this.options,s="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&t.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(s[0].tagName);"relative"==this.cssPosition&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var o=e.pageX,n=e.pageY;if(this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.leftthis.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(n=this.containment[3]+this.offset.click.top)),i.grid)){var h=this.originalPageY+Math.round((n-this.originalPageY)/i.grid[1])*i.grid[1];n=this.containment&&(h-this.offset.click.topthis.containment[3])?h-this.offset.click.topthis.containment[2])?a-this.offset.click.left=0;r--)i||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[r])),this.containers[r].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[r])),this.containers[r].containerCache.over=0);if(this._storedCursor&&t("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"==this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!i){this._trigger("beforeStop",e,this._uiHash());for(var r=0;r>> file start: js/lib/angular/ui/sortable.js */ angular.module("ui.sortable",[]).value("uiSortableConfig",{}).directive("uiSortable",["uiSortableConfig","$timeout","$log",function(e,t,n){return{require:"?ngModel",link:function(o,i,l,a){function r(e,t){return t&&"function"==typeof t?function(n,o){e(n,o),t(n,o)}:e}var c,s={},u={receive:null,remove:null,start:null,stop:null,update:null};angular.extend(s,e),a?(o.$watch(l.ngModel+".length",function(){t(function(){i.sortable("refresh")})}),u.start=function(e,t){t.item.sortable={index:t.item.index(),cancel:function(){t.item.sortable._isCanceled=!0},isCanceled:function(){return t.item.sortable._isCanceled},_isCanceled:!1}},u.activate=function(){c=i.contents();var e=i.sortable("option","placeholder");if(e&&e.element&&"function"==typeof e.element){var t=e.element();t.jquery||(t=angular.element(t));var n=i.find('[class="'+t.attr("class")+'"]');c=c.not(n)}},u.update=function(e,t){t.item.sortable.received||(t.item.sortable.dropindex=t.item.index(),t.item.sortable.droptarget=t.item.parent(),i.sortable("cancel")),c.detach(),"clone"===i.sortable("option","helper")&&(c=c.not(c.last())),c.appendTo(i),t.item.sortable.received&&!t.item.sortable.isCanceled()&&o.$apply(function(){a.$modelValue.splice(t.item.sortable.dropindex,0,t.item.sortable.moved)})},u.stop=function(e,t){!t.item.sortable.received&&"dropindex"in t.item.sortable&&!t.item.sortable.isCanceled()?o.$apply(function(){a.$modelValue.splice(t.item.sortable.dropindex,0,a.$modelValue.splice(t.item.sortable.index,1)[0])}):"dropindex"in t.item.sortable&&!t.item.sortable.isCanceled()||"clone"===i.sortable("option","helper")||c.detach().appendTo(i)},u.receive=function(e,t){t.item.sortable.received=!0},u.remove=function(e,t){t.item.sortable.isCanceled()||o.$apply(function(){t.item.sortable.moved=a.$modelValue.splice(t.item.sortable.index,1)[0]})},o.$watch(l.uiSortable,function(e){angular.forEach(e,function(e,t){u[t]&&("stop"===t&&(e=r(e,function(){o.$apply()})),e=r(u[t],e)),i.sortable("option",t,e)})},!0),angular.forEach(u,function(e,t){s[t]=r(e,s[t])})):n.info("ui.sortable: ngModel not provided!",i),i.sortable(s)}}}]); /* <<< file end: js/lib/angular/ui/sortable.js */ //# map link was there [sortable.js.map] /* >>> file start: js/editor/photouploader.js */ //= require js/lib/jquery-ui/jquery.ui.mouse.min.js //= require js/lib/jquery-ui/jquery.ui.sortable.min.js //= require js/lib/angular/ui/sortable.js //= require js/core/string.js //!= require js/core/angular/messages.js //= require js/core/angular/pills.js //= require js/core/angular/plupload.js //= require js/core/angular/authHelper.js //= require js/editor/basicToolbar.js // error: photouploader.css is already included // error: menu_v2.css is already included Site.page.template['angular/photouploader.ng.tmpl'] = '\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n
    \n\n\n\n \n \n\n \n \n
    \n

    \n

    \n \n
      \n \n {{ file.name }} — {{ file.percent }}% ({{ file.formattedSize }})\n\n \n \n
    \n
    \n
    \n \n
    \n
    \n\n \n \n \n \n \n \n \n \n \n\n \n \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n
    \n \n \n \n
    \n\n
    \n \n \n \n
    \n\n\n
    \n \n \n
    \n\n
    \n\n \n \n \n\n \n\n \n\n \n\n \n\n\n\n \n \n\n \n \n\n \n\n
    \n \n \n \n \n \n \n
    \n\n \n \n \n \n \n \n \n\n \n \n\n \n\n \n \n
    \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n\n \n\n\n\n \n \n\n
    \n\n \n \n\n
    \n\n
    \n \n \n
    \n\n
    \n \n
    \n \n
    \n \n
    \n\n
    \n \n
    \n \n
    \n\n
    \n\n \n\n \n \n
    \n \n \n \n
    \n \n \n \n\n \n \n \n\n\n \n\n \n\n \n\n\n\n \n \n \n

    \n \n \n \n\n\n\n \n \n\n \n \n

    \n \n \n\n \n \n\n
    \n

    \n \n \n

    \n\n \n
    \n\n \n \n \n \n \n {{ media.caption.text }}\n \n \n \n \n\n \n\n \n \n
    \n \n \n \n
    \n \n \n \n \n\n \n \n \n\n \n\n\n\n \n\n\n\n\n'; //= require_ml photouploader.paste.correctUrl //= require_ml photouploader.paste.pasteURL //= require_ml photouploader.paste.notice //= require_ml photouploader.paste.link //= require_ml photouploader.paste.size //= require_ml photouploader.paste.insert //= require_ml photouploader.paste.insert //= require_ml photouploader.paste.title //= require_ml photouploader.dropbox.title //= require_ml photouploader.dropbox.choose //= require_ml photouploader.instagram.title //= require_ml photouploader.instagram.intro //= require_ml photouploader.instagram.loginButton //= require_ml photouploader.instagram.select //= require_ml photouploader.instagram.select.help //= require_ml photouploader.instagram.logout //= require_ml photouploader.instagram.asEmbeds //= require_ml photouploader.instagram.asEmbeds.help //= require_ml photouploader.instagram.needTitle //= require_ml photouploader.instagram.needTitle.help //= require_ml photouploader.instagram.nophoto //= require_ml photouploader.instagram.insert //= require_ml photouploader.instagram.insert //= require_ml photouploader.album.your //= require_ml photouploader.album.size //= require_ml photouploader.album.addlink !function(e){"use strict";angular.module("LJ.Photouploader",["ui.sortable","LJ.AuthHelper","LJ.Messages","LJ.Pills","angular-plupload"]).factory("Photouploader",["$timeout",function(t){var o={};if(o.albums=angular.copy(LJ.get("fotki.uploader.albumsData")||[]),o.sizesData=LJ.get("fotki.uploader.sizesData"),o.space=LJ.get("fotki.uploader.availableSpace"),o.albums.forEach(function(e){e.photos=[]}),o.album=o.albums[0],o.hasUploadAbilities=Boolean(LJ.get("remote.username")&&!LJ.get("remote.is_identity")),o.keys={dropbox:"7ye0n6mhwlsdh9u",instagram:"2f36cf1bb0b74b4dbc3bf155321370b4"},o.getUnsortedAlbum=function(){return o.albums[0]},o.fetchAlbum=function(n,a){var r=20;o.hasUploadAbilities&&n.album.album_id&&(n.album.allFetched||e.ajax({url:(LJ.get("photo_prefix")||"")+"/__rpc_fotki_imgs?func=get_photos",dataType:"json",data:{album_id:n.album.album_id,start:n.start||0,required_size:100,count:r}}).then(function(e){var o=e.filter(LJ.Function.get("photo_url"));o.length0?"uploaded":"start"}},t.pills={isActive:function(e){return a.group("photouploader")===e},select:function(e){a.group("photouploader",e),LJ.Storage.setItem("photouploader2_state",e)}},t.paste={url:"",link:"",insertUrl:function(){var e,o=Number(t.ui.size.current.size)||"",n='';e=t.paste.link?''+n+"":n,r.insertContent("photouploader",e,[e]),t.paste.url="",t.paste.link="",t.bubble.close(),LJ.Track.event("Photouploader","Paste","Insert")}},t.albums={current:{photos:[]},list:i.albums,originalLink:!1,noneSelected:function(){return t.hasAlbums()?0===t.albums.current.photos.filter(LJ.Function.get("selected")).length:!0},togglePhoto:function(e){e.selected=!e.selected},insert:function(){if(!t.ui.insertInProgress){t.ui.insertInProgress=!0;var e=t.ui.size.current.size,o=t.albums.current.photos.filter(LJ.Function.get("selected"));"custom"!==e?i.updatePhotos(o,{required_size:e},function(){LJ.Event.trigger("albumInsert",e,o)}):LJ.Event.trigger("albumInsert",e,o)}},loadMore:function(){i.fetchAlbum({album:t.albums.current,start:t.albums.current.photos.length},function(e){i.addPhotos(t.albums.current.album_id,e)})}},t.$watch("albums.current",function(e){e&&e.album_id&&(i.album=e,i.fetchAlbum({album:e},function(t){i.addPhotos(e.album_id,t)}),LJ.Storage.setItem("photouploader_album_id",e.album_id))}),t.instagram={media:[],_token:null,token:function(e){var o=LJ.get("remote.username"),n="instagram_token",a={domain:LJ.get("siteroot").replace(/^https?:\/\/www/,"")};return o&&(n="instagram_token_"+o),"undefined"==typeof e?t.instagram._token||LJ.Cookie.get(n):(t.instagram._token=e,void LJ.Cookie.set(n,e,a))},noneSelected:function(){return 0===this.media.filter(LJ.Function.get("selected")).length},select:function(e){e.selected=!e.selected},insert:function(){var e,n,a=t.instagram.media.filter(LJ.Function.get("selected"));t.instagram.asEmbed?(n=a.map(function(e){return LJ.Media.parse(e.link).then(LJ.Function.get("embed"))}),o.all(n).then(function(e){r.insertContent("video",e.join("\n"),e)})):(e=a.map(function(e){return''.supplant({url:e.images.standard_resolution.url,caption:LJ.String.encodeHTML(e.caption&&e.caption.text||"")})}),r.insertContent("photouploader",e.join("\n"),e),LJ.Track.event("Photouploader","Instagram","Insert")),t.instagram.media.forEach(LJ.Function.set("selected",!1)),t.bubble.close()},login:function(){l.open(["https://instagram.com/oauth/authorize/?client_id=",i.keys.instagram,"&redirect_uri=","http://www.livejournal.com","/auth_helper.html&response_type=token"].join("")).then(function(e){e&&LJ.Event.trigger("instagram_token",e)})},logout:function(){(new Image).src="https://instagram.com/accounts/logout/",t.instagram.token(null),t.instagram.allFetched=!1,t.instagram.media.length=0},loadMore:function(){var o=t.instagram;if(o.token()&&!o.loading&&!o.allFetched){o.loading=!0;var a=["https://api.instagram.com","/v1/users/self/media/recent/?callback=?&access_token=",o.token()];if(o.media.length>0){var r=o.media[o.media.length-1].id;a.push("&max_id="+r)}e.getJSON(a.join("")).then(function(e){n(function(){e.data&&0===e.data.length&&(o.allFetched=!0),Array.prototype.push.apply(o.media,e.data),o.loading=!1})})}}},t.$watch(function(){return t.instagram.token()},t.instagram.loadMore),LJ.Event.on("instagram_token",function(e){n(function(){t.instagram.token(e)})}),t.dropbox={init:function(){window.Dropbox||LJ.injectScript("https://www.dropbox.com/static/api/2/dropins.js").done(function(){window.Dropbox&&(window.Dropbox.appKey=i.keys.dropbox),LJ.Event.trigger("dropbox_loaded",{linkType:"preview",multiselect:!0,extensions:["images"],success:function(e){n(function(){var o=e.map(function(e){return''.supplant({url:e.link.replace("www.dropbox.com","dl.dropboxusercontent.com")})});r.insertContent("photouploader",o.join("\n"),o),t.bubble.close(),LJ.Track.event("Photouploader","Dropbox","Success")})}})})}},t.dropbox.init(),t.uploaderInit=!0,t.pluploadCallbacks={filesAdded:function(e,o){t.upload.inProgress=!0,n(function(){t.upload.files.length=0,Array.prototype.push.apply(t.upload.files,angular.copy(o)),e.start()})},fileUploaded:function(e,o,n){return n=JSON.parse(n.response),"error"===n.status?(t.upload.files.shift(),void t.pluploadCallbacks.uploadError(e,n)):(n.photo_name=-1!==o.name.lastIndexOf(".")?o.name.substr(0,o.name.lastIndexOf(".")):o.name,void s.push(n))},uploadComplete:function(){s.length&&n(function(){var e,o=s[0].album_id;t.upload.inProgress=!1,s.forEach(LJ.Function.set("uploaded",!0)),i.getAlbumById(o)||(e=i.addAlbum({album_id:o,album_title:LJ.ml("fotki.album.default_album_name"),allFetched:!0},{prepend:!0}),t.albums.current=t.upload.album=e),i.addPhotos(o,s,{prepend:!0}),t.upload.files.length=0,s.length=0})},uploadProgress:function(e,o){n(function(){var e=t.upload.files.find(function(e){return e.id===o.id});e&&isFinite(o.percent)&&(e.percent=o.percent)})},uploadError:function(e,o){t.upload.inProgress=!1,o.code===plupload.INIT_ERROR?t.uploaderInit=!1:n(function(){u.error({body:o.message})})}},LJ.Event.on("uploadInsert",function(e,o){n(function(){var n=o.map(function(o){var n='{name}'.supplant({url:o["size_"+e],name:o.photo_name||""});return t.albums.originalLink?''+n+"":n});r.insertContent("photouploader",n.join("\n"),n),t.ui.insertInProgress=!1,o.forEach(LJ.Function.set("uploaded",!1)),t.bubble.close()})}),LJ.Event.on("albumInsert",function(e,o){var n=o.map(function(o){var n='{name}'.supplant({url:o["size_"+e],name:o.photo_title||""});return t.albums.originalLink?''+n+"":n});r.insertContent("photouploader",n.join("\n"),n),t.ui.insertInProgress=!1,t.albums.current.photos.forEach(LJ.Function.set("selected",!1)),t.bubble.close(),LJ.Track.event("Photouploader","Albums","Insert")}))}]).directive("ljWhenScrolled",function(){return function(e,t,o){var n=t[0];t.bind("scroll",function(){n.scrollTop+n.offsetHeight>=n.scrollHeight&&e.$apply(o.ljWhenScrolled)})}})}(jQuery); /* <<< file end: js/editor/photouploader.js */ //# map link was there [photouploader.js.map] /* >>> file start: js/core/array.js */ !function(n){return n}(),function(){"use strict";LJ.define("LJ.Array"),LJ.Array.intersection=function(n,r){var t;return r.length>n.length&&(t=r,r=n,n=t),n.filter(function(n){return-1!==r.indexOf(n)})}}(); /* <<< file end: js/core/array.js */ //# map link was there [array.js.map] /* >>> file start: js/photo/photo.js */ var _extends=Object.assign||function(e){for(var t=1;t=n&&e.indexn?(i.resolve(),i.promise):(o=Object.keys(J).filter(function(e){return J[e].albumid===t}),r=o.find(function(e){var t=J[e];return t.index===n}),r?(i.resolve(J[r]),i.promise):u(t,{offset:n,limit:1}).then(function(e){return e[0]}))}function v(e){return t.call("photo.update_records",e).then(function(e){var t=e.records;return t.forEach(A),t})}function _(e){return t.call("photo.update_record",e).then(function(e){var t=e.record;return A(t),t})}function A(e){var n=p(e.id);t.invalidate("photo.get_records",{albumid:e.albumid,user:E,offset:Math.floor(e.index/20),limit:20}),t.invalidate("photo.get_album",{user:E,id:e.albumid}),t.invalidate("photo.get_albums",{user:E}),n&&(t.invalidate("photo.get_records",{albumid:n.albumid,user:E,offset:Math.floor(n.index/20),limit:20}),t.invalidate("photo.get_album",{user:E,id:n.albumid})),o(e.albumid),x(e)}function R(e,n){return t.call("photo.delete_records",{ids:e}).then(function(){n&&n.notCached||e.forEach(function(e){s(e)})})}function x(e){Array.isArray(e)||(e=[e]),e.forEach(function(e){J[e.id]=e})}var y={NON_SELECTED_ALBUM:{id:-1,name:LJ.ml("flatmedia.select.album.none")},RECORD_ADULT:!1,RECORD_PRIVACY:"public",ALBUM_PRIVACY:"public",ALBUM_NAME:""},L={createRecord:n,fetchAlbums:r,getAlbums:h,fetchAlbum:o,getAlbumById:m,fetchRecords:u,fetchRecordById:i,getRecordById:p,getRecordByIndex:g,getRecordsByAlbumId:b,createAlbum:c,updateAlbum:a,removeAlbum:l,updateRecord:_,updateRecords:v,removeRecords:R,defaults:y},E=LJ.get("journal.username")||LJ.get("remote.username"),O={},J={},z=[];return L}]).factory("PhotoSize",function(){function e(){var e=LJ.Cookie.get("photo_size"),t=e?LJ.Function.get("size",e.toString()):LJ.Function.get("is_default");return n&&(t&&n.filter(t)[0]||n[0])}function t(e){for(var t=n.map(LJ.Function.get("size")),r=0,o=e.length;o>r;r++)t=LJ.Array.intersection(e[r],t);return n.filter(function(e){return-1!==t.indexOf(e.size)})}var n=LJ.get("fotki.uploader.sizesData")||[{is_default:1,text:"Оригинал",size:"original"}];return{list:n,current:e(),insertInProgress:!1,sortableOptions:{helper:"clone"},intersect:t,getDefaultSize:e}}).filter("decodeRecord",[function(){return function(e){function t(e){return"<"===e?"<":">"}return e.name=(e.name||"").replace(/(&(gt|lt);)/g,t),e.description=(e.description||"").replace(/(&(gt|lt);)/g,t),e}}])}(); /* <<< file end: js/photo/photo.js */ //# map link was there [photo.js.map] /* >>> file start: js/photo/selectAlbum.js */ //= require js/photo/photo.js Site.page.template['angular/photo/selectPhotoAlbum.ng.tmpl'] = '
    \n\n
    \n \n \n \n \n
    \n\n
    \n \n \n \n
    \n
    \n'; //= require_ml flatmedia.album.create.new //= require_ml flatmedia.album.name //= require_ml flatmedia.button.back //= require_ml flatmedia.or //= require_ml flatmedia.select.album !function(e){return e}(),function(){"use strict";angular.module("Photo.SelectAlbum",["LJ.Templates","Photo.Service"]).directive("selectPhotoAlbum",["Photo",function(e){return{templateUrl:"selectPhotoAlbum.ng.tmpl",controllerAs:"directive",scope:{album:"=selectPhotoAlbum",allowNonSelected:"=?allowNonSelected",scope:"=selectPhotoAlbumScope"},controller:["$scope","$attrs","Photo",function(e,t,l){function n(){var l=t.allowNonSelected;return"string"==typeof l&&0===l.length?!0:e.allowNonSelected}function o(e){var t=[];return n()&&t.push(l.defaults.NON_SELECTED_ALBUM),t.concat(e?e:l.getAlbums())}var u=this,c=this.state={init:!1,create:!1};this.newAlbum={name:""},this.init=function(){c.init=!0,u.albums=angular.copy(l.getAlbums()),e.album.id?this.selectedAlbumId=e.album.id:0!==u.albums.length&&(this.selectedAlbumId=u.albums[0].id),e.$watch(function(){return u.selectedAlbumId+u.newAlbum.name+c.create},function(){e.album=c.create?u.newAlbum:l.getAlbumById(u.selectedAlbumId)}),e.$watchCollection(l.getAlbums,function(e){u.albums=o(e),0===e.length&&(c.create=!0)}),"undefined"!=typeof t.allowNonSelected&&e.$watch("allowNonSelected",function(){u.albums=o()})},this.toggle=function(e){c.create=e,this.newAlbum.name=""}}],link:function(t,l,n,o){var u={};if("undefined"==typeof t.album)throw new TypeError("You should provide album object");"photo"!==t.scope&&(u={user:LJ.get("remote.username")}),e.fetchAlbums(u).then(function(){o.init()})}}}])}(); /* <<< file end: js/photo/selectAlbum.js */ //# map link was there [selectAlbum.js.map] /* >>> file start: js/photo/uploader.js */ //= require js/core/angular/api.js //= require js/core/angular/plupload.js //!= require js/core/angular/messages.js //= require js/photo/photo.js //= require js/editor/editor.js //= require js/photo/selectAlbum.js Site.page.template['angular/photo/uploaderPhoto.ng.tmpl'] = '\n \n = 2 && directive.modulo() <= 4,\n \'photouploader.upload.filesAdded5\': directive.modulo() === 0 || directive.modulo() >= 5\n }\"\n lj-ml-resolve=\"{ number: directive.files.length }\"\n lj-ml-dynamic=\"directive.uploaded.length || directive.files.length\"\n >\n \n \n\n \n \n \n \n \n \n\n
    \n \n
    \n\n
    \n \n
    \n\n
    \n
    \n
    \n\n
    \n \n \n
    \n\n \n \n \n \n\n \n \n \n \n\n
    \n \n \n
    \n\n\n\n
    \n \n
    \n'; //= require_ml flatmedia.button.cancel //= require_ml flatmedia.name //= require_ml flatmedia.upload.photo //= require_ml photouploader.upload.initFail //= require_ml photouploader.upload.dragOrClick //= require_ml photouploader.upload.filesAdded1 //= require_ml photouploader.upload.filesAdded2-4 //= require_ml photouploader.upload.filesAdded5 //= require_ml photouploader.upload.insert !function(e){return e}(),function(){"use strict";angular.module("Photo.Uploader",["LJ.Templates","LJ.Messages","LJ.Api","angular-plupload","Photo.SelectAlbum","Photo.Service","Editor"]).directive("ljPhotoUploader",["$timeout",function(e){return{templateUrl:"uploaderPhoto.ng.tmpl",scope:{albumId:"=ljPhotoUploader",scope:"@ljPhotoUploaderScope",callback:"&ljPhotoUploaderCallback",cancelUpload:"&ljPhotoUploaderCancel"},controllerAs:"directive",controller:["$scope","$q","$rootScope","$element","$attrs","Photo","Editor","Bubble","Messages","PhotoSize",function(o,t,a,n,r,l,i,p,u,s){function d(){E.model=m(),J("ready")}function c(){function e(e){"function"==typeof o.callback&&o.callback({photo:e}),"photo"===E.scope&&LJ.Event.trigger("upload:photo:back"),U(),J("init")}LJ.Event.trigger("photo:upload:save"),k().then(y).then(e)}function g(){"function"==typeof o.cancelUpload&&o.cancelUpload(),J("cancel"),E.uploaded.map(f),A.length=0,p.close()}function f(e){l.removeRecords([e.id],{notCached:!0}).then(function(){E.uploaded.splice(E.uploaded.indexOf(e),1)})}function m(){return{name:l.defaults.ALBUM_NAME,privacy:l.defaults.RECORD_PRIVACY,album:l.getAlbumById(o.albumId)||{}}}function h(){return A.length&&A.every(function(e){return 0!==e.trim().length})&&(E.model.album.id||0!==E.model.album.name.trim().length)&&!E.state.inProgress}function v(){var e=E.files.length;return 0===e?-1:10>e||e>20?e%10:0}function b(){return E.state.inProgress?void LJ.Event.once("photo:upload:done",b):(J("uploading"),void E.uploader.start())}function P(){E.state.isWaiting||(E.state.isWaiting=!0,LJ.Event.once("photo:upload:save",b))}function y(){var e=E.uploaded.map(function(e,o){return l.updateRecord({id:e.id,albumid:E.model.album.id,privacy:E.model.privacy,groupids:E.model.groupids,name:A[o]})});return t.all(e)}function k(){if("photo"===E.scope&&!E.uploaded.length)return LJ.Event.once("photo:upload:done",c),t.reject();"editor"===E.scope&&J("progress");var e=angular.copy(E.model),o=t.defer(),a=o.promise;return"undefined"==typeof e.album.id?a=l.createAlbum({name:e.album.name}):o.resolve(e.album),delete e.album,a.then(function(e){E.model.album.id=e.id})}function L(e){return J("error"),e.code&&e.code===window.plupload.INIT_ERROR?void(E.state.init=!1):(E.files.pop(),void u.error({body:e.message}))}function J(e){var t={inProgress:!1,uploadInProgress:!1,uploadDone:!1,error:!1,preview:r.hasOwnProperty("ljPhotoUploaderPreview"),selectSize:r.hasOwnProperty("ljPhotoUploaderSize")};switch(E.state=angular.extend({},E.state,t),e){default:case"init":break;case"progress":E.state.inProgress=!0;break;case"cancel":LJ.Event.trigger("photo:upload:cancel");break;case"uploading":LJ.Event.trigger("photo:upload:start"),E.state.inProgress=!0,E.state.uploadInProgress=!0;break;case"uploaded":LJ.Event.trigger("photo:upload:done"),E.state.uploadDone=!0;break;case"ready":E.state.init=!0,o.$apply();break;case"error":E.state.error=!0}}function _(){var e=E.state.selectSize&&E.sizes.current.size,o='{name}',t='{img}';return E.uploaded.map(function(a){var n=o.supplant({url:e?a.url.replace("original",e):a.url,name:a.photo_name||a.name});return E.originalLink?t.supplant({originalLink:a.url,img:n}):n})}function U(){var e=_();i.insertContent("photouploader",e.join("\n"),e),E.uploaded.length=0,p.close()}var E=this,A=[];J(),E.init=d,E.files=[],E.uploaded=[],E.save=c,E.cancel=g,E.remove=f,E.isSaveAllowed=h,E.modulo=v,E.scope=o.scope,E.sizes=s,E.uploadUrl=(LJ.get("photo_prefix")||"")+"/up",E.uploadOptions={drop_element:"upload-panel-photo",browse_button:"pickfiles-photo",multi_selection:!0,filters:{max_file_size:"10mb",mime_types:[{title:"Image files",extensions:"jpg,jpeg,gif,png"}]},multipart:!0,multipart_params:{form_auth:LJ.get("fotki.uploader.guid")||LJ.get("page.guid")},file_data_name:"file"},E.uploadCallbacks={init:function(e){E.uploader=e,e.refresh()},filesAdded:function(o,t){J("init"),E.files.lenght=0,Array.prototype.push.apply(E.files,angular.copy(t)),Array.prototype.push.apply(A,t.map(LJ.Function.get("name"))),e("photo"!==E.scope?b:P)},fileUploaded:function(e,t,a){return a=JSON.parse(a.response),E.files.shift(),o.$apply(),"error"===a.status?void L(a):void(E.state.error||E.uploaded.push(a))},uploadProgress:function(e,o){var t=100/(E.files.length+E.uploaded.length);E.progress=isFinite(t)?Math.floor(t*(E.uploaded.length+o.percent/100)):0},uploadComplete:function(){E.progress=0,J("uploaded")},error:function(e,o){L(o)}}}],link:function(o,t,a,n){e(n.init)}}}])}(); /* <<< file end: js/photo/uploader.js */ //# map link was there [uploader.js.map] /* >>> file start: js/photo/editor.js */ //= require js/editor/editor.js //= require js/editor/photouploader.js //= require js/editor/media.js //= require js/core/string.js //= require js/core/array.js //= require js/core/angular/api.js //= require js/core/angular/pills.js //= require js/core/angular/authHelper.js //= require js/photo/uploader.js //= require js/photo/photo.js // error: photouploader.css is already included // error: menu_v2.css is already included Site.page.template['angular/photo.ng.tmpl'] = '\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n
    \n \n \n
    \n
    \n\n\n \n \n\n \n \n\n \n\n
    \n \n \n \n \n \n \n
    \n\n \n \n \n \n \n \n \n\n \n \n\n \n\n \n \n
    \n \n \n \n
    \n \n \n
    \n \n \n \n \n \n\n \n\n\n \n \n\n
    \n\n \n \n\n
    \n\n
    \n \n \n
    \n\n
    \n \n
    \n \n
    \n \n
    \n\n
    \n \n
    \n \n
    \n\n
    \n\n \n\n \n \n
    \n \n \n \n
    \n \n \n \n \n \n\n \n\n \n\n\n\n \n \n \n

    \n \n \n \n\n\n\n \n \n\n\n\n \n \n\n \n \n

    \n \n \n\n \n \n\n \n \n \n \n \n\n \n \n\n \n \n \n \n \n {{ media.caption.text }}\n \n \n \n \n\n \n\n \n \n
    \n \n \n \n
    \n
    \n \n \n \n
    \n \n \n \n \n \n\n \n\n\n \n\n'; //= require_ml photouploader.embed.title //= require_ml photouploader.upload.title //= require_ml photouploader.upload.addlink //= require_ml photouploader.byUrl.title //= require_ml photouploader.album.title //= require_ml photouploader.album.select //= require_ml photouploader.album.insert //= require_ml fotki.album.edit.empty.photo.title //= require_ml tour.photo_update_tour.tip //= require_ml talk.photo //= require_ml talk.photo.paste //= require_ml talk.photo.insert !function(t){return t}(),function(){"use strict";function t(t,e,o,n,r,i,a,l,u,s,c,p,d){function h(){var t=LiveJournal.parseGetArgs().photo_id,e=LiveJournal.parseGetArgs().albums_id;return t?m(t):e?(L.requestAlbumId=+e,f(L.requestAlbumId)):void 0}function m(t){var e;e=t.split(",").map(function(t){return i.fetchRecordById({id:t})}),e.push(i.fetchAlbums()),o.all(e).then(function(t){t.splice(-1),L.albums.current=b(t.map(n("decodeRecord")))})}function f(t){LJ.Event.on("photo:albums:loaded",function(){var e=L.albums.list.find(function(e){return e.id===t});e.selected=!0,L.albums.current=e})}function g(){L.state.canUpload&&i.fetchAlbums({user:LJ.get("remote.username")}).then(function(){L.albums.list=i.getAlbums(),L.albums.current=L.albums.list[0],LJ.Event.trigger("photo:albums:loaded")})}function b(t){var e={id:"selected",name:LJ.ml("photouploader.album.scrapbookSelected"),photos:t.map(LJ.Function.set("selected",!0))};return L.albums.list.push(e),e}var L=this;L.state={canUpload:LJ.get("remote")&&!LJ.get("remote_is_identity"),insertInProgress:!1,uploadInProgress:!1,isOpen:!1},L.instagram=u,L.paste=s,L.albums=c,L.ui=p,L.hasAlbums=function(){return 0!==c.length},L.isPill=function(t){return r.group("uploadPhoto")===t},L.pill=function(t){t=t||LJ.Storage.getItem("photoUploadPill")||"paste",r.group("uploadPhoto",t),LJ.Storage.setItem("photoUploadPill",t)},t.$watch(function(){return L.state.isOpen},function(t){t===!0&&(l.init(),g())}),t.$watch(function(){return L.instagram.asEmbed},function(t){t&&(L.instagram.needTitle=!1)}),t.$watch(function(){return L.instagram.token()},L.instagram.loadMore),LJ.Event.on("instagram_token",function(t){e(function(){L.instagram.token(t)})}),t.$watch(function(){return L.ui&&L.ui.current},function(t,e){t&&t!==e&&LJ.Cookie.set("photo_size",t.size)}),t.$watch(function(){return L.albums.current},function(t){if(t&&t.id&&/\d/.test(t.id)){if(LJ.get("fotki.insert")&&t.id===L.requestAlbumId){if(!L.cachedRequestPhotos){var e=LJ.get("fotki.insert").map(function(t){return{id:t.photo_id,name:t.photo_title?t.photo_title:LJ.ml("fotki.album.edit.empty.photo.title"),description:t.photo_desc,thumbnail_url:t.photo_url,url:t.photo_orig,available_sizes:t.available_sizes,selected:!0}});L.cachedRequestPhotos=e.map(n("decodeRecord"))}L.albums.current.photos=L.cachedRequestPhotos}else i.fetchRecords(t.id,{offset:0,limit:20,user:LJ.get("remote.username")}).then(function(t){L.albums.current.photos=t.map(n("decodeRecord"))});LJ.Storage.setItem("photouploader_album_id",t.id)}}),t.$on("bubble:open:photouploader",function(){var t=LiveJournal.parseGetArgs().albums_id||LiveJournal.parseGetArgs().photo_id;L.state.isOpen=!0,LJ.get("fotki.insert")||t&&L.state.canUpload?(L.pill("album"),h()):(L.pill(L.state.canUpload?LJ.Storage.getItem("photouploader2_state")||"upload":"paste"),L.isPill("album")&&!L.hasAlbums()&&L.pill("upload"))}),t.$on("bubble:close:photouploader",function(){L.state.isOpen=!1}),LJ.Event.on("photo:upload:start",function(){L.state.uploadInProgress=!0}),LJ.Event.on("upload:photo:cancel",function(){L.state.uploadInProgress=!1}),LJ.Event.on("upload:photo:done",function(){d.close()})}angular.module("Photo.Editor",["LJ.AuthHelper","LJ.Pills","LJ.Api","LJ.Bubble","Photo.Service","Photo.Uploader","LJ.Photouploader","Editor"]).factory("DropboxPhoto",["$timeout","Editor","Bubble","Photouploader",function(t,e,o,n){var r={};return r.init=function(){window.Dropbox||LJ.injectScript("https://www.dropbox.com/static/api/2/dropins.js").done(function(){window.Dropbox&&(window.Dropbox.appKey=n.keys.dropbox),LJ.Event.trigger("dropbox_loaded",{linkType:"preview",multiselect:!0,extensions:["images"],success:function(n){t(function(){var t=n.map(function(t){return''.supplant({url:t.link.replace("www.dropbox.com","dl.dropboxusercontent.com")})});e.insertContent("photouploader",t.join("\n"),t),o.close(),LJ.Track.event("Photouploader","Dropbox","Success")})}})})},r}]).factory("InstagramPhoto",["$timeout","$q","Editor","Bubble","AuthHelper","Photouploader",function(t,e,o,n,r,i){var a={media:[]},l=null;return a.token=function(t){var e=LJ.get("remote.username"),o="instagram_token",n={domain:LJ.get("siteroot").replace(/^https?:\/\/www/,"")};return e&&(o="instagram_token_"+e),"undefined"==typeof t?l||LJ.Cookie.get(o):(l=t,void LJ.Cookie.set(o,t,n))},a.insert=function(){var t,r,i=a.media.filter(LJ.Function.get("selected"));a.asEmbed?(r=i.map(function(t){return LJ.Media.parse(t.link).then(LJ.Function.get("embed"))}),e.all(r).then(function(t){o.insertContent("video",t.join("\n"),t)})):(t=i.map(function(t){var e=LJ.String.encodeHTML(t.caption&&t.caption.text||"");return'
    {title}{caption}
    '.supplant({url:t.images.standard_resolution.url,caption:e,title:a.needTitle?"

    "+e+"

    ":""})}),o.insertContent("photouploader",t.join("\n"),t),LJ.Track.event("Photouploader","Instagram","Insert")),a.media.forEach(LJ.Function.set("selected",!1)),n.close()},a.noneSelected=function(){return 0===a.media.filter(LJ.Function.get("selected")).length},a.select=function(t){t.selected=!t.selected},a.login=function(){r.open(["https://instagram.com/oauth/authorize/?client_id=",i.keys.instagram,"&redirect_uri=","http://www.livejournal.com","/auth_helper.html&response_type=token"].join("")).then(function(t){t&&LJ.Event.trigger("instagram_token",t)})},a.logout=function(){(new Image).src="https://instagram.com/accounts/logout/",a.token(null),a.allFetched=!1,a.media.length=0},a.loadMore=function(){if(a.token()&&!a.loading&&!a.allFetched){a.loading=!0;var e=["https://api.instagram.com","/v1/users/self/media/recent/?callback=?&access_token=",a.token()];if(a.media.length>0){var o=a.media[a.media.length-1].id;e.push("&max_id="+o)}jQuery.getJSON(e.join("")).then(function(e){t(function(){e.data&&0===e.data.length&&(a.allFetched=!0),Array.prototype.push.apply(a.media,e.data),a.loading=!1})})}},a}]).factory("PastePhoto",["Editor","Bubble","PhotoSize",function(t,e,o){var n={url:"",link:""};return n.insertUrl=function(){var r,i=''.supplant({url:n.url,width:Number(o.current.size)?'width="'+o.current.size+'" ':""});r=n.link?''+i+"":i,t.insertContent("photouploader",r,[r]),n.url="",n.link="",e.close(),LJ.Track.event("Photouploader","Paste","Insert")},n}]).factory("AlbumPhoto",["$q","Editor","PhotoSize","Photouploader","Bubble","Photo",function(t,e,o,n,r,i){var a=o.list,l={current:{photos:[]},list:i.getAlbums(),originalLink:!1};return l.noneSelected=function(){return l.list.length&&l.current.photos?0===l.current.photos.filter(LJ.Function.get("selected")).length:!0},l.insert=function(){var t,e;o.insertInProgress||(o.insertInProgress=!0,t=o.current.size,e=l.current.photos.filter(LJ.Function.get("selected")),LJ.Event.trigger("albumInsert",t,e))},l.loadMore=function(e){var o=l.current;return o.photos&&o.photos.length!==o.count&&"selected"!==o.id?i.fetchRecords(o.id,{offset:o.photos.length||0,limit:e||20,user:LJ.get("remote.username")}).then(function(t){Array.prototype.push.apply(o.photos,t)}):t.when(null)},l.togglePhoto=function(t){t.selected=!t.selected,o.list=o.intersect(l.current.photos.filter(LJ.Function.get("selected")).map(LJ.Function.get("available_sizes"))),-1===o.list.indexOf(o.current)&&(o.current=o.list.slice(-2)[0])},LJ.Event.on("albumInsert",function(t,n){var i=n.map(function(e){var o='{description}'.supplant({url:e.url.replace("original",t),name:(e.name||"").encodeHTML(),description:(e.description||e.name).encodeHTML()});return l.originalLink?''+o+"":o});e.insertContent("photouploader",i.join("\n"),i),o.insertInProgress=!1,o.list=a,l.current.photos.forEach(LJ.Function.set("selected",!1)),r.close(),LJ.Track.event("Photouploader","Albums","Insert")}),l}]).controller("PhotoEditorCtrl",["$scope","$timeout","$q","$filter","Pills","Photo","Photouploader","DropboxPhoto","InstagramPhoto","PastePhoto","AlbumPhoto","PhotoSize","Bubble",t]).directive("ljDropboxButton",function(){return function(t,e){LJ.Event.on("dropbox_loaded",function(t){e[0].appendChild(window.Dropbox.createChooseButton(t))})}})}(); /* <<< file end: js/photo/editor.js */ //# map link was there [editor.js.map] /* >>> file start: js/editor/basicToolbar.js */ //= require js/core/string.js //= require js/core/angular/api.js //= require js/core/angular/autocomplete.js //= require js/core/angular/bubble.js //= require js/core/angular/users.js //= require js/editor/editor.js //= require js/editor/media.js //= require js/video/editor.js //= require js/editor/photouploader.js //= require js/photo/editor.js !function(e){return e}(),function(e){"use strict";angular.module("BasicToolbar",["LJ.Api","LJ.Autocomplete","LJ.Bubble","LJ.Photouploader","Photo.Editor","Video.Editor","Editor","Users"]).controller("MediaCtrl",["$scope","Editor",function(t,n){t.media="",t.setHint=function(e){var n=e.target,o=n.getAttribute("href");o&&(t.media=o),e.preventDefault()},t.getMedia=function(t){var n=LJ.Media.parse(t,{thumbnail:!1}),o=e.Deferred();return n?n.then(function(e){e&&e.embed&&(o.resolve(e),LJ.Track.event("Editor","Embed",e.site))}):/^<(embed|iframe|object).*>$/.test(t)?(o.resolve({embed:["",t,""].join("\n")}),LJ.Track.event("Editor","Embed","lj-embed")):(o.resolve({embed:'{caret}{link}{caret}'.supplant({link:t})}),LJ.Track.event("Editor","Embed","link (not parsed)")),o},t.insert=function(){e.when(t.getMedia(t.media)).done(function(e){n.insertContent("video",e.embed,t.media),t.media=""}),t.bubble.close()}}]).controller("LinkCtrl",["$scope","Editor",function(e,t){e.newWindow="undefined"!=typeof LJ.Storage.getItem("newWindow")?LJ.Storage.getItem("newWindow"):!0,e.unlink=function(){LJ.Event.trigger("unlink"),e.bubble.close()},e.saveOption=function(){LJ.Storage.setItem("newWindow",e.newWindow)},e.$on("bubble:open:link",function(){e.link=e.bubble.options.defaultText||"",e.showUnlink=!(!e.bubble.options.rangeNotCollapsed&&!e.bubble.options.editMode),"undefined"!=typeof e.bubble.options.hasTarget?e.newWindow=e.bubble.options.hasTarget:"undefined"!=typeof LJ.Storage.getItem("newWindow")&&(e.newWindow=LJ.Storage.getItem("newWindow"))}),e.insertOrSave=function(n){n.preventDefault(),t.insertContent("link",'{caret}{text}{caret}'.supplant({text:LJ.String.linkify(e.link),target:e.newWindow?' target="_blank"':""}),{url:e.link,target:e.newWindow?"_blank":""}),e.link="",e.bubble.close()}}]).controller("UserCtrl",["$scope","Editor","Api","Users",function(e,t,n,o){e.friends=null,e.$on("bubble:open:user",function(){e.user=e.bubble.options.user||"",LJ.get("remote")&&!e.friends&&o.fetchFriends().then(function(t){e.friends=t.map(LJ.Function.get("username"))}),e.title="undefined"===e.bubble.options.title?"":e.bubble.options.title||"",e.error=!1}),e.$watch("user",function(){e.error=!1}),e.insertOrSave=function(){e.user&&n.call("ljuser.get",{user:e.user,raw:!0},function(n){n.error?e.error=!0:(t.insertContent("user",''.supplant({text:e.user}),n,e.title),e.user="",e.title="",e.bubble.close())})}}])}(jQuery); /* <<< file end: js/editor/basicToolbar.js */ //# map link was there [basicToolbar.js.map] /* >>> file start: js/discovery/directives.js */ //= require js/core/angular/api.js Site.page.template['angular/ljImage.ng.tmpl'] = '\n
    \n \n
    \n
    \n
    \n'; Site.page.template['angular/ljGallery.ng.tmpl'] = '\n \n state.index\n }\"\n >\n \n
    \n \n
    \n
    \n \n
    \n \n \n \n \n \n\n'; Site.page.template['angular/discovery/ljSuggest.ng.tmpl'] = '\n\n \n \n\n \n
      \n \n \n \n \n \n \n \n \n \n
    \n\n\n'; Site.page.template['angular/widgets/authors/posts.ng.tmpl'] = '\n\n\n\n \n
    \n \n \n
    \n\n \n
    \n\n \n
      \n\n \n
    • \n\n \n \n \n \n \n \n \n\n
    • \n\n
    \n\n \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n\n
    \n\n\n\n\n'; LJ.injectStyle('/* >>> file start: stc/lj_gallery.css */\n.b-journalgallery{overflow:hidden;display:block;position:relative;width:100%;margin:0 auto;padding:0 0 70px;font:.8125rem/1.1 ProximaNovaSemibold,Tahoma,Arial,sans-serif}.b-journalgallery-container{position:relative;background:#FFF}.b-journalgallery-picture{position:absolute;width:100%;margin:0;-webkit-transition:.5s cubic-bezier(.25,.25,.75,.75) all;transition:.5s cubic-bezier(.25,.25,.75,.75) all;text-align:center}.b-journalgallery-picture::after{content:\'\';display:inline-block;height:100%;margin:0 0 0 -.05em;vertical-align:middle}.b-journalgallery-preloader.svgpreloader{position:absolute;top:50%;left:50%;margin:-8px 0 0 -8px}.b-journalgallery-wrapper{display:inline-block;vertical-align:middle;max-width:99%;max-width:calc(100% - .3em)}.b-journalgallery-hightpriority .b-journalgallery-wrapper{display:inline}.b-journalgallery-image{position:relative;max-width:100%;margin:0;vertical-align:top;opacity:1;-webkit-transition:.5s cubic-bezier(.25,.25,.75,.75) all;transition:.5s cubic-bezier(.25,.25,.75,.75) all}.b-journalgallery.b-journalgallery-hightpriority .b-journalgallery-picture .b-journalgallery-wrapper .b-journalgallery-image{width:auto;max-height:100%}.b-journalgallery-caption{position:absolute;top:100%;left:0;right:0;height:70px;margin:0;padding:0;border:0;text-align:center;background:#FFF;color:#829399}.b-journalgallery-caption-title{overflow:hidden;position:absolute;top:0;right:40px;left:40px;height:2.2em;margin:0;padding:10px 2px 0}.b-journalgallery-picture-loaded{background-image:none}.b-journalgallery-picture-loaded .b-journalgallery-image{opacity:1}.b-journalgallery-picture-prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);opacity:0}.b-journalgallery-picture-next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);opacity:0}.b-journalgallery-picture-current{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.b-journalgallery-counter{position:absolute;bottom:44px;right:0;margin:0;padding:2px;border:0;text-align:right;color:#829399}.b-journalgallery-nav{position:absolute;top:0;bottom:70px;margin:0;padding:0;border:0;cursor:pointer;font:0/0 a}.b-journalgallery-nav:after,.b-journalgallery-nav:before{content:\" \";position:absolute;top:50%;padding:0}.b-journalgallery-nav:before{width:50px;height:50px;margin:-25px 0 0;border:0;border-radius:3px;background:#839399}.b-journalgallery-nav:hover:before{background:#09C}.b-discoveryarticle .b-journalgallery-nav:hover:before{background:#39BF71}.b-journalgallery-nav:after{width:9px;height:16px;margin:-8px 0 0;background:url(/img/icons/journalgallery.png?v=39648) no-repeat}.b-journalgallery-nav-prev{left:0;width:30%}.b-journalgallery-nav-prev::before{left:20px}.b-journalgallery-nav-prev::after{left:40px}.b-journalgallery-nav-next{right:0;width:70%}.b-journalgallery-nav-next::before{right:20px}.b-journalgallery-nav-next::after{right:40px;background-position:0 -17px}@media all and (max-width:1100px){.b-journalgallery,.b-journalgallery-container,.b-journalgallery-picture{max-height:450px}}@media all and (max-width:1000px){.b-journalgallery,.b-journalgallery-container,.b-journalgallery-picture{max-height:400px}}@media all and (max-width:650px){.b-journalgallery,.b-journalgallery-container,.b-journalgallery-picture{max-height:300px}}@media all and (max-width:480px){.b-journalgallery,.b-journalgallery-container,.b-journalgallery-picture{max-height:200px}.b-journalgallery-nav-prev::before{left:0}.b-journalgallery-nav-prev::after{left:20px}.b-journalgallery-nav-next::before{right:0}.b-journalgallery-nav-next::after{right:20px}}\n/* <<< file end: stc/lj_gallery.css */\n\n/*# sourceMappingURL=lj_gallery.css.map */\n'); angular.module("Discovery.Tags",["LJ.Templates","LJ.Api"]).directive("ljDiscoveryTags",["$compile",function(e){var t=["lj-gallery","[lj-memories]","[lj-lazy]","[lj-share]","[lj-likus]","[lj-cut]","[lj-screenable]","[feed-promo-control]","[lj-remove-repost]"];return{restrict:"A",terminal:!0,link:function(i,n){e(n.find(t.join(",")))(i)}}}]).directive("ljGallery",["$templateCache","$compile",function(e,t){return{restrict:"E",scope:!0,link:function(i,n,l){i.dimensions={maxWidth:l.width+"px",height:l.height||350},i.items=n.find("lj-gallery-item").map(function(){var e=angular.element(this).find("img"),t=angular.element(this).find("a"),i=angular.element(this).find("lj-gallery-item-capture");return{content:i.html(),src:e.attr("src"),href:t.attr("href")}}).toArray(),i.isTall="undefined"!=typeof l.tall,i.next=function(){i.state.index+=1},i.prev=function(){i.state.index-=1},i.state={index:0,total:i.items.length-1},i.isNearby=function(e){return Math.abs(i.state.index-e)<=1},n.html(t(e.get("ljGallery.ng.tmpl"))(i))}}}]).directive("ljSuggest",["Api",function(e){return{templateUrl:"ljSuggest.ng.tmpl",scope:{itemId:"@ljSuggest"},link:function(t){e.call("discovery.suggest",{itemid:t.itemId},{cache:!0}).then(function(e){t.suggest=e.items})}}}]).directive("ljWidgetAuthorsPosts",["Api",function(e){return{templateUrl:"posts.ng.tmpl",scope:{userId:"@ljWidgetAuthorsPosts",itemId:"@ljWidgetAuthorsPostsExclude"},link:function(t){t.state={isLoading:!0},e.call("discovery.author_posts",{itemid:t.itemId,userid:t.userId},{cache:!0}).then(function(e){t.state.isLoading=!1,t.posts=e.items})}}}]); /* <<< file end: js/discovery/directives.js */ //# map link was there [directives.js.map] /* >>> file start: js/core/angular/ljUser.js */ //= require js/core/angular/api.js //= require js/core/angular/users.js Site.page.template['angular/ljUser.ng.tmpl'] = '\n'; !function(){"use strict";function e(e,r,n,t,a,u,s){function c(e){var r=n.defer(),t=s.Cache.get(e);return t&&t.userhead_url?(r.resolve(t),r.promise):s.fetchUser(e,s.USERHEAD_FIELDS,{cache:!0,silent:!0})}function i(e){var r=n.defer(),t=s.Cache.getById(e);return t&&t.userhead_url?(r.resolve(t),r.promise):s.fetchUserById(e,s.USERHEAD_FIELDS,{cache:!0,silent:!0})}function l(r,t){var i=n.defer(),l=e.$new();return c(r).then(function(){var e;l.user=angular.extend({},s.Cache.get(r),t||{}),e=a(d)(l),u(function(){i.resolve(p.empty().append(e).html()),l.$destroy()})}),i.promise}function o(r,t){var c=n.defer(),l=e.$new();return i(r).then(function(){var e;l.user=angular.extend({},s.Cache.getById(r),t||{}),e=a(d)(l),u(function(){c.resolve(p.empty().append(e).html()),l.$destroy()})}),c.promise}var p=angular.element("
    "),d=t.get("ljUser.ng.tmpl");return{prepare:c,prepareById:i,getById:o,get:l}}function r(e,r,n){return{templateUrl:"ljUser.ng.tmpl",replace:!0,scope:!0,compile:function(t,a){var u=e(a.ljUserDynamic),s=e(a.ljUserDynamicOptions);return function(e){var t=s(e);e.$watch(function(){return u(e)},function(a){var u=a;e.user=angular.extend({username:u,display_username:u},t||{}),n.prepare(u).then(function(){e.$watch(function(){return r.Cache.get(u)},function(r){angular.extend(e.user,r)},!0)})})}}}}function n(e,r,n){return{templateUrl:"ljUser.ng.tmpl",replace:!0,scope:!0,compile:function(t,a){return function(t){var u=e(a.ljUserById)(t),s=e(a.ljUserByIdOptions)(t);t.user=angular.extend({username:"user-"+u,display_username:"user-"+u},s||{}),n.prepareById(u).then(function(){t.$watch(function(){return r.Cache.getById(u)},function(e){angular.extend(t.user,e)},!0)})}}}}angular.module("LJ.User",["LJ.Api","LJ.Templates","Users"]),angular.module("LJ.User").factory("ljUser",e).directive("ljUserById",n).directive("ljUserDynamic",r),e.$inject=["$rootScope","Api","$q","$templateCache","$compile","$timeout","Users"],r.$inject=["$parse","Users","ljUser"],n.$inject=["$parse","Users","ljUser"]}(); /* <<< file end: js/core/angular/ljUser.js */ //# map link was there [ljUser.js.map] /* >>> file start: js/widgets/likus.js */ var _extends=Object.assign||function(e){for(var n=1;n\n{{likus.count}}\n\n\n
    \n\n\n'; LJ.injectStyle('/* >>> file start: stc/popup/popup-memories.css */\n.b-addtomemories{width:150px;margin:0;padding:0;text-align:left}.b-addtomemories-head{margin:0 0 .5em;padding:0;font:700 1.13em/1.1 Arial,sans-serif;color:#000}.b-addtomemories-intro{margin:0 0 .3em}.b-addtomemories-items{margin:0;padding:0;list-style:none}.b-addtomemories-item{margin:0;padding:0}.b-addtomemories-label{display:block;margin:0 -5px;padding:5px;cursor:pointer}.b-addtomemories-item:hover .b-addtomemories-label{background:#C8E6FF}.b-addtomemories-footer{margin:1em 0}.b-addtomemories-options{margin:.3em -5px 0;padding:.3em 5px 0;border-top:1px solid #DAE3E6}.b-addtomemories-loading{background:url(/img/preloader/preloader-blue-gray.gif?v=16423) 50% 50% no-repeat}.b-addtomemories-loading .b-addtomemories-footer,.b-addtomemories-loading .b-addtomemories-head,.b-addtomemories-loading .b-addtomemories-intro,.b-addtomemories-loading .b-addtomemories-items,.b-addtomemories-loading .b-addtomemories-options{visibility:hidden}\n/* <<< file end: stc/popup/popup-memories.css */\n\n/*# sourceMappingURL=popup-memories.css.map */\n'); !function(e){angular.module("LJ.Memories",["LJ.Bubble","LJ.Api"]).directive("ljMemories",["$parse","$timeout","Bubble",function(o,t,i){return{scope:{ljMemories:"&"},link:function(o,t){function n(n){n.preventDefault(),r||(r="function"==typeof o.ljMemories?o.ljMemories({element:t}):o.ljMemories),i.open("memories",r,e(t)),o.$apply()}var r;i.exists("memories")||i.register({name:"memories",template:"memories.ng.tmpl",disableClick:!0}),t.on("click",n),o.$on("$destroy",function(){t.off("click",n)})}}}]).controller("MemoriesCtrl",["$scope","Api",function(o,t){var i=o.bubble;o.security=null,o.$watch("removeButton",function(){e(window).trigger("resize")}),o.$on("bubble:open:memories",function(){t.call("memories.get",i.options,function(e){o.security=e.result?e.result.security:null,o.removeButton=Boolean(o.security)})}),o.$on("bubble:close:memories",function(){o.removeButton=!1}),o.siteroot=LJ.get("siteroot"),o.update=function(){t.call("memories.set",{journal:i.options.journal,ditemid:i.options.ditemid,description:i.options.journal+": "+i.options.title.decodeHTML(),security:o.security},function(e){o.security=e,i.close(),o.removeButton=!0})},o.remove=function(){t.call("memories.remove",{journal:i.options.journal,ditemid:i.options.ditemid},function(){o.security=null,i.close(),o.removeButton=!1})},LJ.Event.on("api:request:change",function(e,t){/^memories/.test(e)&&(o.loading=t)})}])}(jQuery); /* <<< file end: js/core/angular/ljMemories.js */ //# map link was there [ljMemories.js.map] /* >>> file start: js/core/angular/share.js */ //= require js/core/angular/bubble.js //= require js/core/string.js Site.page.template['angular/share.ng.tmpl'] = '

    \n\n\n \n \n \n\n'; //= require_ml sharing.popup.title !function(e){return e}(),function(){"use strict";angular.module("LJ.Share",["LJ.Directives","LJ.Templates","LJ.Bubble"]).config(["$compileProvider",function(e){e.aHrefSanitizationWhitelist(/^\s*(https?|viber):/)}]).directive("ljShare",["Bubble",function(e){return{restrict:"A",scope:!0,link:function(r,t,i){function a(){e.open("share",{params:l,services:n},t),r.$evalAsync()}var l=r.$eval(i.ljShare),n=r.$eval(i.ljShareServices),o=r.$eval(i.ljShareServicesExclude);if(n=n?LJ.String.smartSplit(n):LJ.Social.Share.services(),o=o?LJ.String.smartSplit(o):[],o.length&&(n=n.filter(function(e){return-1===o.indexOf(e)})),n.length){var s=e.register({name:"share",template:"share.ng.tmpl",alwaysBottom:l.alwaysBottom,recalculateOnScroll:i.hasOwnProperty("ljShareScrollable")});t.on("click",a),r.$on("$destroy",function(){t.off("click",a),s()})}}}}]).controller("ShareBubbleCtrl",["$scope","Bubble",function(e,r){var t=this;e.$on("bubble:open:share",function(){t.version=LJ.Flags.isEnabled("adaptive_lj_mobile")?"v4":"v3",t.services=e.bubble.options.services.map(function(r){return{name:r,link:LJ.Social.Share.getUrl(r,e.bubble.options.params),title:LJ.Social.Share.getTitle(r)}})}),t.openPopup=function(e,t,i){return LJ.Social.Share.isTab(t)?void r.close("share"):(e.preventDefault(),LJ.Social.Share.openPopup(t,i),void r.close("share"))}}])}(); /* <<< file end: js/core/angular/share.js */ //# map link was there [share.js.map] /* >>> file start: js/lib/jquery.qrcode.min.js */ !function(t){t.fn.qrcode=function(e){function r(t){this.mode=u,this.data=t}function o(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function n(t,e){if(void 0==t.length)throw Error(t.length+"/"+e);for(var r=0;rt||this.moduleCount<=t||0>e||this.moduleCount<=e)throw Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){for(var t=1,t=1;40>t;t++){for(var e=i.getRSBlocks(t,this.errorCorrectLevel),r=new s,o=0,n=0;n=r;r++)if(!(-1>=t+r||this.moduleCount<=t+r))for(var o=-1;7>=o;o++)-1>=e+o||this.moduleCount<=e+o||(this.modules[t+r][e+o]=r>=0&&6>=r&&(0==o||6==o)||o>=0&&6>=o&&(0==r||6==r)||r>=2&&4>=r&&o>=2&&4>=o?!0:!1)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;8>r;r++){this.makeImpl(!0,r);var o=a.getLostPoint(this);(0==r||t>o)&&(t=o,e=r)}return e},createMovieClip:function(t,e,r){for(t=t.createEmptyMovieClip(e,r),this.make(),e=0;e=i;i++)for(var s=-2;2>=s;s++)this.modules[o+i][n+s]=-2==i||2==i||-2==s||2==s||0==i&&0==s?!0:!1}},setupTypeNumber:function(t){for(var e=a.getBCHTypeNumber(this.typeNumber),r=0;18>r;r++){var o=!t&&1==(e>>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=o}for(r=0;18>r;r++)o=!t&&1==(e>>r&1),this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=o},setupTypeInfo:function(t,e){for(var r=a.getBCHTypeInfo(this.errorCorrectLevel<<3|e),o=0;15>o;o++){var n=!t&&1==(r>>o&1);6>o?this.modules[o][8]=n:8>o?this.modules[o+1][8]=n:this.modules[this.moduleCount-15+o][8]=n}for(o=0;15>o;o++)n=!t&&1==(r>>o&1),8>o?this.modules[8][this.moduleCount-o-1]=n:9>o?this.modules[8][15-o-1+1]=n:this.modules[8][15-o-1]=n;this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,o=this.moduleCount-1,n=7,i=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var u=0;2>u;u++)if(null==this.modules[o][s-u]){var h=!1;i>>n&1)),a.getMask(e,o,s-u)&&(h=!h),this.modules[o][s-u]=h,n--,-1==n&&(i++,n=7)}if(o+=r,0>o||this.moduleCount<=o){o-=r,r=-r;break}}}},o.PAD0=236,o.PAD1=17,o.createData=function(t,e,r){for(var e=i.getRSBlocks(t,e),n=new s,u=0;u8*t)throw Error("code length overflow. ("+n.getLengthInBits()+">"+8*t+")");for(n.getLengthInBits()+4<=8*t&&n.put(0,4);0!=n.getLengthInBits()%8;)n.putBit(!1);for(;!(n.getLengthInBits()>=8*t)&&(n.put(o.PAD0,8),!(n.getLengthInBits()>=8*t));)n.put(o.PAD1,8);return o.createBytes(n,e)},o.createBytes=function(t,e){for(var r=0,o=0,i=0,s=Array(e.length),u=Array(e.length),h=0;h=0?l.get(g):0}for(f=h=0;ff;f++)for(h=0;hf;f++)for(h=0;h>>=1;return e},getPatternPosition:function(t){return a.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case 0:return 0==(e+r)%2;case 1:return 0==e%2;case 2:return 0==r%3;case 3:return 0==(e+r)%3;case 4:return 0==(Math.floor(e/2)+Math.floor(r/3))%2;case 5:return 0==e*r%2+e*r%3;case 6:return 0==(e*r%2+e*r%3)%2;case 7:return 0==(e*r%3+(e+r)%2)%2;default:throw Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new n([1],0),r=0;t>r;r++)e=e.multiply(new n([1,h.gexp(r)],0));return e},getLengthInBits:function(t,e){if(e>=1&&10>e)switch(t){case 1:return 10;case 2:return 9;case u:return 8;case 8:return 8;default:throw Error("mode:"+t)}else if(27>e)switch(t){case 1:return 12;case 2:return 11;case u:return 16;case 8:return 10;default:throw Error("mode:"+t)}else{if(!(41>e))throw Error("type:"+e);switch(t){case 1:return 14;case 2:return 13;case u:return 16;case 8:return 12;default:throw Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),r=0,o=0;e>o;o++)for(var n=0;e>n;n++){for(var i=0,s=t.isDark(o,n),u=-1;1>=u;u++)if(!(0>o+u||o+u>=e))for(var a=-1;1>=a;a++)0>n+a||n+a>=e||0==u&&0==a||s==t.isDark(o+u,n+a)&&i++;i>5&&(r+=3+i-5)}for(o=0;e-1>o;o++)for(n=0;e-1>n;n++)i=0,t.isDark(o,n)&&i++,t.isDark(o+1,n)&&i++,t.isDark(o,n+1)&&i++,t.isDark(o+1,n+1)&&i++,(0==i||4==i)&&(r+=3);for(o=0;e>o;o++)for(n=0;e-6>n;n++)t.isDark(o,n)&&!t.isDark(o,n+1)&&t.isDark(o,n+2)&&t.isDark(o,n+3)&&t.isDark(o,n+4)&&!t.isDark(o,n+5)&&t.isDark(o,n+6)&&(r+=40);for(n=0;e>n;n++)for(o=0;e-6>o;o++)t.isDark(o,n)&&!t.isDark(o+1,n)&&t.isDark(o+2,n)&&t.isDark(o+3,n)&&t.isDark(o+4,n)&&!t.isDark(o+5,n)&&t.isDark(o+6,n)&&(r+=40);for(n=i=0;e>n;n++)for(o=0;e>o;o++)t.isDark(o,n)&&i++;return t=Math.abs(100*i/e/e-50)/5,r+10*t}},h={glog:function(t){if(1>t)throw Error("glog("+t+")");return h.LOG_TABLE[t]},gexp:function(t){for(;0>t;)t+=255;for(;t>=256;)t-=255;return h.EXP_TABLE[t]},EXP_TABLE:Array(256),LOG_TABLE:Array(256)},l=0;8>l;l++)h.EXP_TABLE[l]=1<l;l++)h.EXP_TABLE[l]=h.EXP_TABLE[l-4]^h.EXP_TABLE[l-5]^h.EXP_TABLE[l-6]^h.EXP_TABLE[l-8];for(l=0;255>l;l++)h.LOG_TABLE[h.EXP_TABLE[l]]=l;return n.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=Array(this.getLength()+t.getLength()-1),r=0;rthis.getLength()-t.getLength())return this;for(var e=h.glog(this.get(0))-h.glog(t.get(0)),r=Array(this.getLength()),o=0;os;s++)for(var u=r[3*s+0],a=r[3*s+1],h=r[3*s+2],l=0;u>l;l++)n.push(new i(a,h));return n},i.getRsBlockTable=function(t,e){switch(e){case 1:return i.RS_BLOCK_TABLE[4*(t-1)+0];case 0:return i.RS_BLOCK_TABLE[4*(t-1)+1];case 3:return i.RS_BLOCK_TABLE[4*(t-1)+2];case 2:return i.RS_BLOCK_TABLE[4*(t-1)+3]}},s.prototype={get:function(t){return 1==(this.buffer[Math.floor(t/8)]>>>7-t%8&1)},put:function(t,e){for(var r=0;e>r;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},"string"==typeof e&&(e={text:e}),e=t.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,correctLevel:2,background:"#ffffff",foreground:"#000000"},e),this.each(function(){var r;if("canvas"==e.render){r=new o(e.typeNumber,e.correctLevel),r.addData(e.text),r.make();var n=document.createElement("canvas");n.width=e.width,n.height=e.height;for(var i=n.getContext("2d"),s=e.width/r.getModuleCount(),u=e.height/r.getModuleCount(),a=0;a").css("width",e.width+"px").css("height",e.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",e.background),i=e.width/r.getModuleCount(),s=e.height/r.getModuleCount(),u=0;u").css("height",s+"px").appendTo(n),h=0;h").css("width",i+"px").css("background-color",r.isDark(u,h)?e.foreground:e.background).appendTo(a);r=n,jQuery(r).appendTo(this)})}}(jQuery); /* <<< file end: js/lib/jquery.qrcode.min.js */ //# map link was there [jquery.qrcode.min.js.map] /* >>> file start: js/widgets/angular/mediusCardPager.js */ !function(){"use strict";function e(){function e(e,r,n,t){var i="[medius-card-pager-next]",l="[medius-card-pager-list]",a="medius-card-pager-disable-arrow-class",s="[medius-card-pager-prev]";t.list=r.find(l),t.nextEl=r.find(i),t.prevEl=r.find(s),t.nextEl.on("click",t.next),t.prevEl.on("click",t.prev),t.arrowDisableClass=t.nextEl.attr(a)||t.prevEl.attr(a),t.init()}return{scope:!0,restrict:"AE",controller:"mediusCardPagerCtrl",controllerAs:"pager",link:e}}function r(e,r,n){function t(e,r){e&&e.toggleClass(C.arrowDisableClass,!!r)}function i(){c=C.list.children().outerWidth(),v=C.list.width(),p=C.list.children().length,g=c*p,e.$watch(u,t.bind(null,C.nextEl)),e.$watch(d,t.bind(null,C.prevEl))}function l(){if(f||u())return void t(C.nextEl,u());if(!(v>=g)){var e=g-v+h;if(e>v){var r=2*c;E.push(r),h-=r}else E.push(e),h-=e;o(h)}}function a(){f=!1,t(C.nextEl,u()),t(C.prevEl,d())}function s(){if(f||d())return void t(C.prevEl,d());var e=E.pop();h+=e,o(h)}function u(){var e=void 0,n=C.list.children();return w>=n.length?!0:(e=n.last(),e.length?e.offset().left+c<=r.innerWidth:!0)}function d(){return!E.length}function o(e){f=!0,C.list.css({marginLeft:e}),n(a,m),n(a,2*m)}var c=0,f=!1,p=0,g=0,v=0,h=0,E=[],m=800,w=0,C=this;C.init=i,C.next=l,C.prev=s,jQuery(window).resize(LJ.Function.debounce(function(){v=C.list.parent().width(),a()},400))}r.$inject=["$scope","$window","$timeout"],angular.module("Medius.CardPager",[]),angular.module("Medius.CardPager").controller("mediusCardPagerCtrl",r).directive("mediusCardPager",e)}(); /* <<< file end: js/widgets/angular/mediusCardPager.js */ //# map link was there [mediusCardPager.js.map] /* >>> file start: js/widgets/angular/mediusSubscribe.js */ //!= require js/core/angular/messages.js //= require_ml medius.subscribe.banner.title //= require_ml medius.subscribe.banner.text //= require_ml medius.subscribe.button.text //= require_ml medius.subscribe.subscribed //= require_ml medius.footer.newsletter //= require_ml medius.main.subscription.text //= require_ml medius.main.subscription.success //= require_ml medius.main.subscription //= require_ml schemius.medius.subscribetonews //= require_ml schemius.medius.dailynewsletter //= require_ml schemius.medius.youremail //= require_ml schemius.medius.subscribed //= require_ml schemius.medius.unsubscribe Site.page.template['Widgets/Medius/subscribe.tmpl'] = '\n\n
    \n

    \n
    \n

    \n

    \n
    \n
    \n \n
    \n
    \n'; Site.page.template['Widgets/Medius/subscribe137.tmpl'] = '\n\n
    \n
    \n \n \n \n \n \n \n
    \n
    \n'; Site.page.template['Widgets/Medius/schemius_header_subscribe.tmpl'] = '\n <\n\n\n\n\n \n \n \n \n\n \n \n \n \n \n \n \n'; !function(){"use strict";function e(e,i){function s(i){return LJ.get("is_subscribed")?void 0:LJ.get("remote")?e.call("discovery.subscribe",null,{silent:!0}).then(r.hideWidget)["catch"](t):LJ.Util.Action.login(i)}function t(e){var s=e.message;"Access Denied"===s?LJ.Util.Action.login():i.add({type:"error",body:s})}var r=this;r["do"]=s}function i(){function e(e,i,s,t){var r=LJ.get("is_subscribed");return t.widget=i,t.hideWidget=function(e){var i=e.status;"OK"===i&&t.widget.addClass("stories__subscription--hidden")},r||angular.isUndefined(r)?t.hideWidget({status:"OK"}):void 0}return{restrict:"AE",templateUrl:"subscribe.tmpl",controller:"mediusSubscribeCtrl",controllerAs:"subscribe",link:e}}function s(e){function i(i,s,t,r){var u=LJ.get("is_subscribed");return r.widget=s,r.hideWidget=function(i){var s=i.status;"OK"===s&&(r.subscribed=!0,e(function(){r.hide=!0},3e3))},u||angular.isUndefined(u)?r.hideWidget({status:"OK"}):void 0}return{restrict:"AE",templateUrl:"subscribe137.tmpl",controller:"mediusSubscribeCtrl",controllerAs:"subscribe",link:i}}function t(e){function i(e,i,s,t){t.widget=i,t.subscribed=LJ.get("is_subscribed"),t.hideWidget=function(e){var i=e.status;"OK"===i&&(t.subscribed=!0)}}return{restrict:"AE",templateUrl:"schemius_header_subscribe.tmpl",controller:"mediusSubscribeCtrl",controllerAs:"subscribe",link:i}}e.$inject=["Api","Messages"],s.$inject=["$timeout"],t.$inject=["$timeout"],angular.module("Medius.Subscribe",["LJ.Messages","LJ.Api"]),angular.module("Medius.Subscribe").controller("mediusSubscribeCtrl",e).directive("mediusSubscribe",i).directive("mediusSubscribe137",s).directive("mediusSchemiusHeaderSubscribe",t),LJ.Flags.isEnabled("medius_schemius")&&angular.element(window.document).ready(function(){angular.bootstrap(".s-header-menu-subscription",["Medius.Subscribe"])})}(); /* <<< file end: js/widgets/angular/mediusSubscribe.js */ //# map link was there [mediusSubscribe.js.map] /* >>> file start: js/widgets/angular/mediusFooter.js */ !function(){function t(){function t(){u.list=angular.element(s),a=u.list.children().length}function e(){r()||(c++,i(-1*u.columnWidth))}function n(){o()||(c--,i(u.columnWidth))}function i(t){var e=u.list.css("marginLeft");e=Number(e.toString().match(/(-?\d+)/)[1]),u.list.animate({marginLeft:e+t},300)}function r(){return c===a-2}function o(){return!c}var u=this,l=".stories__categories-column",a=0,c=0,s=".stories__categories-list";u.next=e,u.prev=n,u.disableNext=r,u.disablePrev=o,Object.defineProperty(u,"columnWidth",{get:function(){return angular.element(l).width()}}),t()}angular.module("Medius.Footer",[]),angular.module("Medius.Footer").controller("MediusFooterCategoriesCtrl",t)}(); /* <<< file end: js/widgets/angular/mediusFooter.js */ //# map link was there [mediusFooter.js.map] /* >>> file start: js/node_modules/moment/min/moment.min.js */ function _typeof(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}!function(t,e){"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.moment=e()}(this,function(){"use strict";function t(){return Pn.apply(null,arguments)}function e(t){Pn=t}function n(t){return"[object Array]"===Object.prototype.toString.call(t)}function i(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function r(t,e){var n,i=[];for(n=0;n0)for(n in Hn)i=Hn[n],r=e[i],"undefined"!=typeof r&&(t[i]=r);return t}function h(e){f(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),Ln===!1&&(Ln=!0,t.updateOffset(this),Ln=!1)}function m(t){return t instanceof h||null!=t&&null!=t._isAMomentObject}function _(t){return 0>t?Math.ceil(t):Math.floor(t)}function y(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=_(e)),n}function p(t,e,n){var i,r=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),o=0;for(i=0;r>i;i++)(n&&t[i]!==e[i]||!n&&y(t[i])!==y(e[i]))&&o++;return o+s}function g(){}function D(t){return t?t.toLowerCase().replace("_","-"):t}function v(t){for(var e,n,i,r,s=0;s0;){if(i=M(r.slice(0,e).join("-")))return i;if(n&&n.length>=e&&p(r,n,!0)>=e-1)break;e--}s++}return null}function M(t){var e=null;if(!In[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=xn._abbr,require("./locale/"+t),Y(e)}catch(n){}return In[t]}function Y(t,e){var n;return t&&(n="undefined"==typeof e?S(t):w(t,e),n&&(xn=n)),xn._abbr}function w(t,e){return null!==e?(e.abbr=t,In[t]=In[t]||new g,In[t].set(e),Y(t),In[t]):(delete In[t],null)}function S(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return xn;if(!n(t)){if(e=M(t))return e;t=[t]}return v(t)}function k(t,e){var n=t.toLowerCase();An[n]=An[n+"s"]=An[e]=t}function T(t){return"string"==typeof t?An[t]||An[t.toLowerCase()]:void 0}function b(t){var e,n,i={};for(n in t)s(t,n)&&(e=T(n),e&&(i[e]=t[n]));return i}function O(e,n){return function(i){return null!=i?(W(this,e,i),t.updateOffset(this,n),this):U(this,e)}}function U(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function W(t,e,n){return t._d["set"+(t._isUTC?"UTC":"")+e](n)}function C(t,e){var n;if("object"==("undefined"==typeof t?"undefined":_typeof(t)))for(n in t)this.set(n,t[n]);else if(t=T(t),"function"==typeof this[t])return this[t](e);return this}function G(t,e,n){var i=""+Math.abs(t),r=e-i.length,s=t>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}function F(t,e,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),t&&(jn[t]=r),e&&(jn[e[0]]=function(){return G(r.apply(this,arguments),e[1],e[2])}),n&&(jn[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function P(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function x(t){var e,n,i=t.match(zn);for(e=0,n=i.length;n>e;e++)jn[i[e]]?i[e]=jn[i[e]]:i[e]=P(i[e]);return function(r){var s="";for(e=0;n>e;e++)s+=i[e]instanceof Function?i[e].call(r,t):i[e];return s}}function H(t,e){return t.isValid()?(e=L(e,t.localeData()),Zn[e]=Zn[e]||x(e),Zn[e](t)):t.localeData().invalidDate()}function L(t,e){function n(t){return e.longDateFormat(t)||t}var i=5;for(Nn.lastIndex=0;i>=0&&Nn.test(t);)t=t.replace(Nn,n),Nn.lastIndex=0,i-=1;return t}function I(t){return"function"==typeof t&&"[object Function]"===Object.prototype.toString.call(t)}function A(t,e,n){ri[t]=I(e)?e:function(t){return t&&n?n:e}}function z(t,e){return s(ri,t)?ri[t](e._strict,e._locale):new RegExp(N(t))}function N(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(i=function(t,n){n[e]=y(t)}),n=0;ni;i++){if(r=a([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}}function R(t,e){var n;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(n=Math.min(t.date(),V(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t)}function B(e){return null!=e?(R(this,e),t.updateOffset(this,!0),this):U(this,"Month")}function Q(){return V(this.year(),this.month())}function X(t){var e,n=t._a;return n&&-2===d(t).overflow&&(e=n[ai]<0||n[ai]>11?ai:n[ui]<1||n[ui]>V(n[oi],n[ai])?ui:n[di]<0||n[di]>24||24===n[di]&&(0!==n[li]||0!==n[ci]||0!==n[fi])?di:n[li]<0||n[li]>59?li:n[ci]<0||n[ci]>59?ci:n[fi]<0||n[fi]>999?fi:-1,d(t)._overflowDayOfYear&&(oi>e||e>ui)&&(e=ui),d(t).overflow=e),t}function K(e){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function tt(t,e){var n=!0;return o(function(){return n&&(K(t+"\n"+(new Error).stack),n=!1),e.apply(this,arguments)},e)}function et(t,e){_i[t]||(K(e),_i[t]=!0)}function nt(t){var e,n,i=t._i,r=yi.exec(i);if(r){for(d(t).iso=!0,e=0,n=pi.length;n>e;e++)if(pi[e][1].exec(i)){t._f=pi[e][0];break}for(e=0,n=gi.length;n>e;e++)if(gi[e][1].exec(i)){t._f+=(r[6]||" ")+gi[e][0];break}i.match(ei)&&(t._f+="Z"),Mt(t)}else t._isValid=!1}function it(e){var n=Di.exec(e._i);return null!==n?void(e._d=new Date(+n[1])):(nt(e),void(e._isValid===!1&&(delete e._isValid,t.createFromInputFallback(e))))}function rt(t,e,n,i,r,s,o){var a=new Date(t,e,n,i,r,s,o);return 1970>t&&a.setFullYear(t),a}function st(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function ot(t){return at(t)?366:365}function at(t){return t%4===0&&t%100!==0||t%400===0}function ut(){return at(this.year())}function dt(t,e,n){var i,r=n-e,s=n-t.day();return s>r&&(s-=7),r-7>s&&(s+=7),i=Ut(t).add(s,"d"),{week:Math.ceil(i.dayOfYear()/7),year:i.year()}}function lt(t){return dt(t,this._week.dow,this._week.doy).week}function ct(){return this._week.dow}function ft(){return this._week.doy}function ht(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function mt(t){var e=dt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function _t(t,e,n,i,r){var s,o=6+r-i,a=st(t,0,1+o),u=a.getUTCDay();return r>u&&(u+=7),n=null!=n?1*n:r,s=1+o+7*(e-1)-u+n,{year:s>0?t:t-1,dayOfYear:s>0?s:ot(t-1)+s}}function yt(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function pt(t,e,n){return null!=t?t:null!=e?e:n}function gt(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Dt(t){var e,n,i,r,s=[];if(!t._d){for(i=gt(t),t._w&&null==t._a[ui]&&null==t._a[ai]&&vt(t),t._dayOfYear&&(r=pt(t._a[oi],i[oi]),t._dayOfYear>ot(r)&&(d(t)._overflowDayOfYear=!0),n=st(r,0,t._dayOfYear),t._a[ai]=n.getUTCMonth(),t._a[ui]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=s[e]=i[e];for(;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[di]&&0===t._a[li]&&0===t._a[ci]&&0===t._a[fi]&&(t._nextDay=!0,t._a[di]=0),t._d=(t._useUTC?st:rt).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[di]=24)}}function vt(t){var e,n,i,r,s,o,a;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(s=1,o=4,n=pt(e.GG,t._a[oi],dt(Ut(),1,4).year),i=pt(e.W,1),r=pt(e.E,1)):(s=t._locale._week.dow,o=t._locale._week.doy,n=pt(e.gg,t._a[oi],dt(Ut(),s,o).year),i=pt(e.w,1),null!=e.d?(r=e.d,s>r&&++i):r=null!=e.e?e.e+s:s),a=_t(n,i,r,o,s),t._a[oi]=a.year,t._dayOfYear=a.dayOfYear}function Mt(e){if(e._f===t.ISO_8601)return void nt(e);e._a=[],d(e).empty=!0;var n,i,r,s,o,a=""+e._i,u=a.length,l=0;for(r=L(e._f,e._locale).match(zn)||[],n=0;n0&&d(e).unusedInput.push(o),a=a.slice(a.indexOf(i)+i.length),l+=i.length),jn[s]?(i?d(e).empty=!1:d(e).unusedTokens.push(s),E(s,i,e)):e._strict&&!i&&d(e).unusedTokens.push(s);d(e).charsLeftOver=u-l,a.length>0&&d(e).unusedInput.push(a),d(e).bigHour===!0&&e._a[di]<=12&&e._a[di]>0&&(d(e).bigHour=void 0),e._a[di]=Yt(e._locale,e._a[di],e._meridiem),Dt(e),X(e)}function Yt(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(i=t.isPM(n),i&&12>e&&(e+=12),i||12!==e||(e=0),e):e}function wt(t){var e,n,i,r,s;if(0===t._f.length)return d(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;rs)&&(i=s,n=e));o(t,n||e)}function St(t){if(!t._d){var e=b(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],Dt(t)}}function kt(t){var e=new h(X(Tt(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Tt(t){var e=t._i,r=t._f;return t._locale=t._locale||S(t._l),null===e||void 0===r&&""===e?c({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),m(e)?new h(X(e)):(n(r)?wt(t):r?Mt(t):i(e)?t._d=e:bt(t),t))}function bt(e){var s=e._i;void 0===s?e._d=new Date:i(s)?e._d=new Date(+s):"string"==typeof s?it(e):n(s)?(e._a=r(s.slice(0),function(t){return parseInt(t,10)}),Dt(e)):"object"==("undefined"==typeof s?"undefined":_typeof(s))?St(e):"number"==typeof s?e._d=new Date(s):t.createFromInputFallback(e)}function Ot(t,e,n,i,r){var s={};return"boolean"==typeof n&&(i=n,n=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=r,s._l=n,s._i=t,s._f=e,s._strict=i,kt(s)}function Ut(t,e,n,i){return Ot(t,e,n,i,!1)}function Wt(t,e){var i,r;if(1===e.length&&n(e[0])&&(e=e[0]),!e.length)return Ut();for(i=e[0],r=1;rt&&(t=-t,n="-"),n+G(~~(t/60),2)+e+G(~~t%60,2)})}function Ht(t){var e=(t||"").match(ei)||[],n=e[e.length-1]||[],i=(n+"").match(Si)||["-",0,0],r=+(60*i[1])+y(i[2]);return"+"===i[0]?r:-r}function Lt(e,n){var r,s;return n._isUTC?(r=n.clone(),s=(m(e)||i(e)?+e:+Ut(e))-+r,r._d.setTime(+r._d+s),t.updateOffset(r,!1),r):Ut(e).local()}function It(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function At(e,n){var i,r=this._offset||0;return null!=e?("string"==typeof e&&(e=Ht(e)),Math.abs(e)<16&&(e=60*e),!this._isUTC&&n&&(i=It(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),r!==e&&(!n||this._changeInProgress?ee(this,Bt(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?r:It(this)}function zt(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Nt(t){return this.utcOffset(0,t)}function Zt(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(It(this),"m")),this}function jt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ht(this._i)),this}function Et(t){return t=t?Ut(t).utcOffset():0,(this.utcOffset()-t)%60===0}function Vt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function qt(){if("undefined"!=typeof this._isDSTShifted)return this._isDSTShifted;var t={};if(f(t,this),t=Tt(t),t._a){var e=t._isUTC?a(t._a):Ut(t._a);this._isDSTShifted=this.isValid()&&p(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Jt(){return!this._isUTC}function $t(){return this._isUTC}function Rt(){return this._isUTC&&0===this._offset}function Bt(t,e){var n,i,r,o=t,a=null;return Pt(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(o={},e?o[e]=t:o.milliseconds=t):(a=ki.exec(t))?(n="-"===a[1]?-1:1,o={y:0,d:y(a[ui])*n,h:y(a[di])*n,m:y(a[li])*n,s:y(a[ci])*n,ms:y(a[fi])*n}):(a=Ti.exec(t))?(n="-"===a[1]?-1:1,o={y:Qt(a[2],n),M:Qt(a[3],n),d:Qt(a[4],n),h:Qt(a[5],n),m:Qt(a[6],n),s:Qt(a[7],n),w:Qt(a[8],n)}):null==o?o={}:"object"==("undefined"==typeof o?"undefined":_typeof(o))&&("from"in o||"to"in o)&&(r=Kt(Ut(o.from),Ut(o.to)),o={},o.ms=r.milliseconds,o.M=r.months),i=new Ft(o),Pt(t)&&s(t,"_locale")&&(i._locale=t._locale),i}function Qt(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Xt(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Kt(t,e){var n;return e=Lt(e,t),t.isBefore(e)?n=Xt(t,e):(n=Xt(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function te(t,e){return function(n,i){var r,s;return null===i||isNaN(+i)||(et(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),s=n,n=i,i=s),n="string"==typeof n?+n:n,r=Bt(n,i),ee(this,r,t),this}}function ee(e,n,i,r){var s=n._milliseconds,o=n._days,a=n._months;r=null==r?!0:r,s&&e._d.setTime(+e._d+s*i),o&&W(e,"Date",U(e,"Date")+o*i),a&&R(e,U(e,"Month")+a*i),r&&t.updateOffset(e,o||a)}function ne(t,e){var n=t||Ut(),i=Lt(n,this).startOf("day"),r=this.diff(i,"days",!0),s=-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse";return this.format(e&&e[s]||this.localeData().calendar(s,this,Ut(n)))}function ie(){return new h(this)}function re(t,e){var n;return e=T("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=m(t)?t:Ut(t),+this>+t):(n=m(t)?+t:+Ut(t),n<+this.clone().startOf(e))}function se(t,e){var n;return e=T("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=m(t)?t:Ut(t),+t>+this):(n=m(t)?+t:+Ut(t),+this.clone().endOf(e)e-s?(n=t.clone().add(r-1,"months"),i=(e-s)/(s-n)):(n=t.clone().add(r+1,"months"),i=(e-s)/(n-s)),-(r+i)}function le(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ce(){var t=this.clone().utc();return 0e;e++)if(this._weekdaysParse[e]||(n=Ut([2e3,1]).day(e),i="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(i.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function Ne(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=He(t,this.localeData()),this.add(t-e,"d")):e}function Ze(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function je(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function Ee(t,e){F(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Ve(t,e){return e._meridiemParse}function qe(t){return"p"===(t+"").toLowerCase().charAt(0)}function Je(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function $e(t,e){e[fi]=y(1e3*("0."+t))}function Re(){return this._isUTC?"UTC":""}function Be(){return this._isUTC?"Coordinated Universal Time":""}function Qe(t){return Ut(1e3*t)}function Xe(){return Ut.apply(null,arguments).parseZone()}function Ke(t,e,n){var i=this._calendar[t];return"function"==typeof i?i.call(e,n):i}function tn(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function en(){return this._invalidDate}function nn(t){return this._ordinal.replace("%d",t)}function rn(t){return t}function sn(t,e,n,i){var r=this._relativeTime[n];return"function"==typeof r?r(t,e,n,i):r.replace(/%d/i,t)}function on(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)}function an(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function un(t,e,n,i){var r=S(),s=a().set(i,e);return r[n](s,t)}function dn(t,e,n,i,r){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return un(t,e,n,r);var s,o=[];for(s=0;i>s;s++)o[s]=un(t,s,n,r);return o}function ln(t,e){return dn(t,e,"months",12,"month")}function cn(t,e){return dn(t,e,"monthsShort",12,"month")}function fn(t,e){return dn(t,e,"weekdays",7,"day")}function hn(t,e){return dn(t,e,"weekdaysShort",7,"day")}function mn(t,e){return dn(t,e,"weekdaysMin",7,"day")}function _n(){var t=this._data;return this._milliseconds=Ri(this._milliseconds),this._days=Ri(this._days),this._months=Ri(this._months),t.milliseconds=Ri(t.milliseconds),t.seconds=Ri(t.seconds),t.minutes=Ri(t.minutes),t.hours=Ri(t.hours),t.months=Ri(t.months),t.years=Ri(t.years),this}function yn(t,e,n,i){var r=Bt(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function pn(t,e){return yn(this,t,e,1)}function gn(t,e){return yn(this,t,e,-1)}function Dn(t){return 0>t?Math.floor(t):Math.ceil(t)}function vn(){var t,e,n,i,r,s=this._milliseconds,o=this._days,a=this._months,u=this._data;return s>=0&&o>=0&&a>=0||0>=s&&0>=o&&0>=a||(s+=864e5*Dn(Yn(a)+o),o=0,a=0),u.milliseconds=s%1e3,t=_(s/1e3),u.seconds=t%60,e=_(t/60),u.minutes=e%60,n=_(e/60),u.hours=n%24,o+=_(n/24),r=_(Mn(o)),a+=r,o-=Dn(Yn(r)),i=_(a/12),a%=12,u.days=o,u.months=a,u.years=i,this}function Mn(t){return 4800*t/146097}function Yn(t){return 146097*t/4800}function wn(t){var e,n,i=this._milliseconds;if(t=T(t),"month"===t||"year"===t)return e=this._days+i/864e5,n=this._months+Mn(e),"month"===t?n:n/12;switch(e=this._days+Math.round(Yn(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}}function Sn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*y(this._months/12)}function kn(t){return function(){return this.as(t)}}function Tn(t){return t=T(t),this[t+"s"]()}function bn(t){return function(){return this._data[t]}}function On(){return _(this.days()/7)}function Un(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}function Wn(t,e,n){var i=Bt(t).abs(),r=cr(i.as("s")),s=cr(i.as("m")),o=cr(i.as("h")),a=cr(i.as("d")),u=cr(i.as("M")),d=cr(i.as("y")),l=r0,l[4]=n,Un.apply(null,l)}function Cn(t,e){return void 0===fr[t]?!1:void 0===e?fr[t]:(fr[t]=e,!0)}function Gn(t){var e=this.localeData(),n=Wn(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function Fn(){var t,e,n,i=hr(this._milliseconds)/1e3,r=hr(this._days),s=hr(this._months);t=_(i/60),e=_(t/60),i%=60,t%=60,n=_(s/12),s%=12;var o=n,a=s,u=r,d=e,l=t,c=i,f=this.asSeconds();return f?(0>f?"-":"")+"P"+(o?o+"Y":"")+(a?a+"M":"")+(u?u+"D":"")+(d||l||c?"T":"")+(d?d+"H":"")+(l?l+"M":"")+(c?c+"S":""):"P0D"}var Pn,xn,Hn=t.momentProperties=[],Ln=!1,In={},An={},zn=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Nn=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Zn={},jn={},En=/\d/,Vn=/\d\d/,qn=/\d{3}/,Jn=/\d{4}/,$n=/[+-]?\d{6}/,Rn=/\d\d?/,Bn=/\d{1,3}/,Qn=/\d{1,4}/,Xn=/[+-]?\d{1,6}/,Kn=/\d+/,ti=/[+-]?\d+/,ei=/Z|[+-]\d\d:?\d\d/gi,ni=/[+-]?\d+(\.\d{1,3})?/,ii=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,ri={},si={},oi=0,ai=1,ui=2,di=3,li=4,ci=5,fi=6;F("M",["MM",2],"Mo",function(){return this.month()+1}),F("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),F("MMMM",0,0,function(t){return this.localeData().months(this,t)}),k("month","M"),A("M",Rn),A("MM",Rn,Vn),A("MMM",ii),A("MMMM",ii),Z(["M","MM"],function(t,e){e[ai]=y(t)-1}),Z(["MMM","MMMM"],function(t,e,n,i){var r=n._locale.monthsParse(t,i,n._strict);null!=r?e[ai]=r:d(n).invalidMonth=t});var hi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),mi="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),_i={};t.suppressDeprecationWarnings=!1;var yi=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],gi=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Di=/^\/?Date\((\-?\d+)/i;t.createFromInputFallback=tt("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),F(0,["YY",2],0,function(){return this.year()%100}),F(0,["YYYY",4],0,"year"),F(0,["YYYYY",5],0,"year"),F(0,["YYYYYY",6,!0],0,"year"),k("year","y"),A("Y",ti),A("YY",Rn,Vn),A("YYYY",Qn,Jn),A("YYYYY",Xn,$n),A("YYYYYY",Xn,$n),Z(["YYYYY","YYYYYY"],oi),Z("YYYY",function(e,n){n[oi]=2===e.length?t.parseTwoDigitYear(e):y(e)}),Z("YY",function(e,n){n[oi]=t.parseTwoDigitYear(e)}),t.parseTwoDigitYear=function(t){return y(t)+(y(t)>68?1900:2e3)};var vi=O("FullYear",!1);F("w",["ww",2],"wo","week"),F("W",["WW",2],"Wo","isoWeek"),k("week","w"),k("isoWeek","W"),A("w",Rn),A("ww",Rn,Vn),A("W",Rn),A("WW",Rn,Vn),j(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=y(t)});var Mi={dow:0,doy:6};F("DDD",["DDDD",3],"DDDo","dayOfYear"),k("dayOfYear","DDD"),A("DDD",Bn),A("DDDD",qn),Z(["DDD","DDDD"],function(t,e,n){n._dayOfYear=y(t)}),t.ISO_8601=function(){};var Yi=tt("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Ut.apply(null,arguments);return this>t?this:t}),wi=tt("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Ut.apply(null,arguments);return t>this?this:t});xt("Z",":"),xt("ZZ",""),A("Z",ei),A("ZZ",ei),Z(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Ht(t)});var Si=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var ki=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Ti=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Bt.fn=Ft.prototype;var bi=te(1,"add"),Oi=te(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Ui=tt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});F(0,["gg",2],0,function(){return this.weekYear()%100}),F(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ue("gggg","weekYear"),Ue("ggggg","weekYear"),Ue("GGGG","isoWeekYear"),Ue("GGGGG","isoWeekYear"),k("weekYear","gg"),k("isoWeekYear","GG"),A("G",ti),A("g",ti),A("GG",Rn,Vn),A("gg",Rn,Vn),A("GGGG",Qn,Jn),A("gggg",Qn,Jn),A("GGGGG",Xn,$n),A("ggggg",Xn,$n),j(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=y(t)}),j(["gg","GG"],function(e,n,i,r){n[r]=t.parseTwoDigitYear(e)}),F("Q",0,0,"quarter"),k("quarter","Q"),A("Q",En),Z("Q",function(t,e){e[ai]=3*(y(t)-1)}),F("D",["DD",2],"Do","date"),k("date","D"),A("D",Rn),A("DD",Rn,Vn),A("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),Z(["D","DD"],ui),Z("Do",function(t,e){e[ui]=y(t.match(Rn)[0],10)});var Wi=O("Date",!0);F("d",0,"do","day"),F("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),F("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),F("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),F("e",0,0,"weekday"),F("E",0,0,"isoWeekday"),k("day","d"),k("weekday","e"),k("isoWeekday","E"),A("d",Rn),A("e",Rn),A("E",Rn),A("dd",ii),A("ddd",ii),A("dddd",ii),j(["dd","ddd","dddd"],function(t,e,n){var i=n._locale.weekdaysParse(t);null!=i?e.d=i:d(n).invalidWeekday=t}),j(["d","e","E"],function(t,e,n,i){e[i]=y(t)});var Ci="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Gi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Fi="Su_Mo_Tu_We_Th_Fr_Sa".split("_");F("H",["HH",2],0,"hour"),F("h",["hh",2],0,function(){return this.hours()%12||12}),Ee("a",!0),Ee("A",!1),k("hour","h"),A("a",Ve),A("A",Ve),A("H",Rn),A("h",Rn),A("HH",Rn,Vn),A("hh",Rn,Vn),Z(["H","HH"],di),Z(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),Z(["h","hh"],function(t,e,n){e[di]=y(t),d(n).bigHour=!0});var Pi=/[ap]\.?m?\.?/i,xi=O("Hours",!0);F("m",["mm",2],0,"minute"),k("minute","m"),A("m",Rn),A("mm",Rn,Vn),Z(["m","mm"],li);var Hi=O("Minutes",!1);F("s",["ss",2],0,"second"),k("second","s"),A("s",Rn),A("ss",Rn,Vn),Z(["s","ss"],ci);var Li=O("Seconds",!1);F("S",0,0,function(){return~~(this.millisecond()/100)}),F(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),F(0,["SSS",3],0,"millisecond"),F(0,["SSSS",4],0,function(){return 10*this.millisecond()}),F(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),F(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),F(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),F(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),F(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),k("millisecond","ms"),A("S",Bn,En),A("SS",Bn,Vn),A("SSS",Bn,qn);var Ii;for(Ii="SSSS";Ii.length<=9;Ii+="S")A(Ii,Kn);for(Ii="S";Ii.length<=9;Ii+="S")Z(Ii,$e);var Ai=O("Milliseconds",!1);F("z",0,0,"zoneAbbr"),F("zz",0,0,"zoneName");var zi=h.prototype;zi.add=bi,zi.calendar=ne,zi.clone=ie,zi.diff=ue,zi.endOf=ve,zi.format=fe,zi.from=he,zi.fromNow=me,zi.to=_e,zi.toNow=ye,zi.get=C,zi.invalidAt=Oe,zi.isAfter=re,zi.isBefore=se,zi.isBetween=oe,zi.isSame=ae,zi.isValid=Te,zi.lang=Ui,zi.locale=pe,zi.localeData=ge,zi.max=wi,zi.min=Yi,zi.parsingFlags=be,zi.set=C,zi.startOf=De,zi.subtract=Oi,zi.toArray=Se,zi.toObject=ke,zi.toDate=we,zi.toISOString=ce,zi.toJSON=ce,zi.toString=le,zi.unix=Ye,zi.valueOf=Me,zi.year=vi,zi.isLeapYear=ut,zi.weekYear=Ce,zi.isoWeekYear=Ge,zi.quarter=zi.quarters=xe, zi.month=B,zi.daysInMonth=Q,zi.week=zi.weeks=ht,zi.isoWeek=zi.isoWeeks=mt,zi.weeksInYear=Pe,zi.isoWeeksInYear=Fe,zi.date=Wi,zi.day=zi.days=Ne,zi.weekday=Ze,zi.isoWeekday=je,zi.dayOfYear=yt,zi.hour=zi.hours=xi,zi.minute=zi.minutes=Hi,zi.second=zi.seconds=Li,zi.millisecond=zi.milliseconds=Ai,zi.utcOffset=At,zi.utc=Nt,zi.local=Zt,zi.parseZone=jt,zi.hasAlignedHourOffset=Et,zi.isDST=Vt,zi.isDSTShifted=qt,zi.isLocal=Jt,zi.isUtcOffset=$t,zi.isUtc=Rt,zi.isUTC=Rt,zi.zoneAbbr=Re,zi.zoneName=Be,zi.dates=tt("dates accessor is deprecated. Use date instead.",Wi),zi.months=tt("months accessor is deprecated. Use month instead",B),zi.years=tt("years accessor is deprecated. Use year instead",vi),zi.zone=tt("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",zt);var Ni=zi,Zi={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},ji={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Ei="Invalid date",Vi="%d",qi=/\d{1,2}/,Ji={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},$i=g.prototype;$i._calendar=Zi,$i.calendar=Ke,$i._longDateFormat=ji,$i.longDateFormat=tn,$i._invalidDate=Ei,$i.invalidDate=en,$i._ordinal=Vi,$i.ordinal=nn,$i._ordinalParse=qi,$i.preparse=rn,$i.postformat=rn,$i._relativeTime=Ji,$i.relativeTime=sn,$i.pastFuture=on,$i.set=an,$i.months=q,$i._months=hi,$i.monthsShort=J,$i._monthsShort=mi,$i.monthsParse=$,$i.week=lt,$i._week=Mi,$i.firstDayOfYear=ft,$i.firstDayOfWeek=ct,$i.weekdays=Le,$i._weekdays=Ci,$i.weekdaysMin=Ae,$i._weekdaysMin=Fi,$i.weekdaysShort=Ie,$i._weekdaysShort=Gi,$i.weekdaysParse=ze,$i.isPM=qe,$i._meridiemParse=Pi,$i.meridiem=Je,Y("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===y(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),t.lang=tt("moment.lang is deprecated. Use moment.locale instead.",Y),t.langData=tt("moment.langData is deprecated. Use moment.localeData instead.",S);var Ri=Math.abs,Bi=kn("ms"),Qi=kn("s"),Xi=kn("m"),Ki=kn("h"),tr=kn("d"),er=kn("w"),nr=kn("M"),ir=kn("y"),rr=bn("milliseconds"),sr=bn("seconds"),or=bn("minutes"),ar=bn("hours"),ur=bn("days"),dr=bn("months"),lr=bn("years"),cr=Math.round,fr={s:45,m:45,h:22,d:26,M:11},hr=Math.abs,mr=Ft.prototype;mr.abs=_n,mr.add=pn,mr.subtract=gn,mr.as=wn,mr.asMilliseconds=Bi,mr.asSeconds=Qi,mr.asMinutes=Xi,mr.asHours=Ki,mr.asDays=tr,mr.asWeeks=er,mr.asMonths=nr,mr.asYears=ir,mr.valueOf=Sn,mr._bubble=vn,mr.get=Tn,mr.milliseconds=rr,mr.seconds=sr,mr.minutes=or,mr.hours=ar,mr.days=ur,mr.weeks=On,mr.months=dr,mr.years=lr,mr.humanize=Gn,mr.toISOString=Fn,mr.toString=Fn,mr.toJSON=Fn,mr.locale=pe,mr.localeData=ge,mr.toIsoString=tt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Fn),mr.lang=Ui,F("X",0,0,"unix"),F("x",0,0,"valueOf"),A("x",ti),A("X",ni),Z("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),Z("x",function(t,e,n){n._d=new Date(y(t))}),t.version="2.10.6",e(Ut),t.fn=Ni,t.min=Ct,t.max=Gt,t.utc=a,t.unix=Qe,t.months=ln,t.isDate=i,t.locale=Y,t.invalid=c,t.duration=Bt,t.isMoment=m,t.weekdays=fn,t.parseZone=Xe,t.localeData=S,t.isDuration=Pt,t.monthsShort=cn,t.weekdaysMin=mn,t.defineLocale=w,t.weekdaysShort=hn,t.normalizeUnits=T,t.relativeTimeThreshold=Cn;var _r=t;return _r}); /* <<< file end: js/node_modules/moment/min/moment.min.js */ //# map link was there [moment.min.js.map] /* >>> file start: js/node_modules/moment/locale/ru.js */ function _typeof(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?t(require("../moment")):"function"==typeof define&&define.amd?define(["moment"],t):t(e.moment)}(this,function(e){"use strict";function t(e,t){var _=e.split("_");return t%10===1&&t%100!==11?_[0]:t%10>=2&&4>=t%10&&(10>t%100||t%100>=20)?_[1]:_[2]}function _(e,_,n){var i={mm:_?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===n?_?"минута":"минуту":e+" "+t(i[n],+e)}function n(e,t){var _={nominative:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),accusative:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_")},n=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return _[n][e.month()]}function i(e,t){var _={nominative:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),accusative:"янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек".split("_")},n=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return _[n][e.month()]}function d(e,t){var _={nominative:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),accusative:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_")},n=/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/.test(t)?"accusative":"nominative";return _[n][e.day()]}var s=e.defineLocale("ru",{months:n,monthsShort:i,weekdays:d,weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[й|я]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:_,mm:_,h:"час",hh:_,d:"день",dd:_,M:"месяц",MM:_,y:"год",yy:_},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,_){return 4>e?"ночи":12>e?"утра":17>e?"дня":"вечера"},ordinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:7}});return s}); /* <<< file end: js/node_modules/moment/locale/ru.js */ //# map link was there [ru.js.map] /* >>> file start: js/widgets/angular/mediusTimeAgo.js */ //= require js/node_modules/moment/min/moment.min.js //= require js/node_modules/moment/locale/ru.js !function(){function e(){function e(e,i){var t=LJ.get("server_time")-moment().unix(),m=moment.unix(e.timeAgo-t).locale("ru");moment.locale("ru",{relativeTime:{future:"через %s",past:"%s назад",s:"%d с.",m:"%d мин.",mm:"%d мин.",h:"%d ч.",hh:"%d ч.",d:"%d д.",dd:"%d д.",M:"%d м.",MM:"%d м.",y:"%d г.",yy:"%d г."}}),m.isValid()&&(e.timeAgoText=m.fromNow(!0),i.attr("title",m.calendar()))}return{template:"{{timeAgoText}}",scope:{timeAgo:"@mediusTimeAgo"},link:e,restrict:"AE"}}angular.module("Medius.TimeAgo",[]),angular.module("Medius.TimeAgo").directive("mediusTimeAgo",e)}(); /* <<< file end: js/widgets/angular/mediusTimeAgo.js */ //# map link was there [mediusTimeAgo.js.map] /* >>> file start: js/widgets/angular/mediusShareButtons.js */ //= require js/node_modules/moment/min/moment.min.js //= require js/node_modules/moment/locale/ru.js !function(t){"use strict";function e(e,n){function i(t,e){var n={facebook:"fbsharing",vkontakte:"vksharing",odnoklassniki:"oksharing",twitter:"twsharing"};return n[e]?t+"?utm_source="+n[e]+"&utm_medium=social":t}function o(t){var o=t.title,a=t.service,s=t.text,u=t.link;return s=s||"",o=o||e.document.title,u=u||e.location.href,"livejournal"===a?LJ.get("remote")?n.call("repost.create",{url:u,timezone:c}):(LJ.Util.Action.login(),Promise.resolve()):new Promise(function(t){var e=l[a]({title:o,text:s,link:i(u,a)});r(e,{allowScrollbars:"pocket"==a}),t()})}function r(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=n.allowScrollbars,o=void 0===i?!1:i,r=o?1:0;e.open(t,"","left="+(u.width-630)/2+",top="+(u.height-440)/2+",toolbar=0,status=0,scrollbars="+r+",menubar=0,location=0,width=630,height=440")}var l,a={},c=t().format("ZZ");a.share=o;var s=e.encodeURIComponent.bind(e),u=e.screen||{width:1e3,height:1e3};return l={facebook:function(t){var e=t.link;return"http://www.facebook.com/sharer.php?u="+s(e)},livejournal:function(t){var e=t.text,n=t.title,i=t.link;return"http://livejournal.com/update.bml?subject="+s(n)+"&event="+s(''+n+" "+e)},twitter:function(t){var e=t.link,n=t.title;return"http://twitter.com/share?url="+s(e)+"&text="+s(n)},vkontakte:function(t){var e=t.link,n=t.title,i=t.text;return"http://vk.com/share.php?url="+s(e)+"&title="+s(n)+"&description="+s(i)},odnoklassniki:function(t){var e=t.link,n=t.title;return"http://www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1&st.comments="+s(n)+"&st._surl="+s(e)},mailru:function(t){var e=t.link,n=t.title,i=t.text;return"http://connect.mail.ru/share?url="+s(e)+"&title="+s(n)+"&description="+s(i)},pocket:function(t){var e=t.link,n=t.title;return"https://getpocket.com/save?url="+s(e)+"&title="+s(n)},tumblr:function(t){var e=t.link,n=t.title,i=t.text;return"https://www.tumblr.com/widgets/share/tool?canonicalUrl="+s(e)+"&title="+s(n)+"&caption="+s(i)+"&posttype=link"}},a}function n(t,e){var n=this;n.bottomPanel={},n.bottomPanel.visible=!0,t.$on("mediusSharings:bottomInited",function(){e(function(){n.bottomPanel=t.bottomPanelVisible},100)})}function i(t){function e(e,n){n.one("click",function(n){n&&(n.preventDefault(),n.stopPropagation()),t.share(e).then(LJ.Event.emit.bind(LJ.Event,"Sharings:add")).then(function(){var t=LJ.get("entry"),n=t.ditemid,i=t.poster;LJ.Track.event("Medius","Post","Share",e.service,i,n)})})}return{restrict:"AE",scope:{service:"@",text:"@",title:"@",link:"@"},link:e}}function o(t){function e(e,n){function i(){var t=n.position().top+n.height()>o.scrollTop()+l-a;t!==c&&(c=t,e.bottomPanelVisible.visible=!c)}var o=angular.element(t),r=LJ.get("ljlive").is_enabled,l=t.innerHeight;e.bottomPanelVisible={};var a=0,c=void 0;r&&o.width()>650&&(a=50),o.scroll(function(){i(),e.$apply()}),i(),e.$broadcast("mediusSharings:bottomInited")}return{link:e}}function r(){return{controllerAs:"stickyShare",controller:n}}e.$inject=["$window","Api"],i.$inject=["shareService"],angular.module("Medius.ShareButtons",["LJ.Api"]),angular.module("Medius.ShareButtons").factory("shareService",e).controller("ShareCtrl",n).directive("mediusShareButton",i).directive("stickyPanel",r).directive("shareBottomPanel",o),n.$inject=["$scope","$timeout"],o.$inject=["$window"]}(moment); /* <<< file end: js/widgets/angular/mediusShareButtons.js */ //# map link was there [mediusShareButtons.js.map] /* >>> file start: js/widgets/sharings.js */ //!= require js/entry/likes.js Site.page.template['angular/widgets/sharings.ng.tmpl'] = '
    \n \n \n
    \n'; //= require_ml medius.entry.shared !function(){"use strict";function n(n,t,e){function o(n){return new Promise(function(t){return i?t(hashCash):l?void l.push(t):(l=[t],u(n).then(function(n){return l.forEach(function(t){t(n)}),l=[],n}))})}function r(n,t){return LJ.get("remote")?(s!==t&&(s=t,e.call("entry.set_sharings",{count:t,url:n},{silent:!0})),t):t}function u(n){var t=Object.keys(f);return Promise.all(t.map(function(t){return f[t].count(n)})).then(function(n){return n.reduce(function(n,e,o){return n[t[o]]=e,n},{})})["catch"](a(0))}function c(n){return o(n).then(function(n){return Object.values(n).reduce(function(n,t){return n+=t},0)})["catch"](a(0))}function a(n){return function(){return n}}var i,s,l,h=.7,p=encodeURIComponent(n.location.href),f={};return f.facebook={count:function(n){return n=n||p,t.jsonp("https://graph.facebook.com/?id="+encodeURIComponent(n)+"&callback=JSON_CALLBACK").then(function(n){return n=n.data,Number(n.shares)||0})["catch"](a(0))}},f.twitter={count:function(n){return n=n||p,f.facebook.count(n).then(function(n){return Math.ceil(Number(n)*h)})["catch"](a(0))}},f.vkontakte={count:function(e){return e=e||p,t.jsonp("https://vk.com/share.php?act=count&index=1&url="+encodeURIComponent(e)+"&callback=JSON_CALLBACK").then(function(n){})["catch"](a(0)),new Promise(function(t,e){var o;angular.isObject(n.VK)&&(o=n.VK),n.VK={Share:{count:function(e,r){t(r),o&&(n.VK=o)}}}}).then(function(n){return Number(n)||0})}},f.odnoklassniki={count:function(e){return e=e||p,t.jsonp("https://connect.ok.ru/dk?st.cmd=extLike&uid=1&ref="+encodeURIComponent(e)+"&callback=JSON_CALLBACK").then(function(n){})["catch"](a(0)),new Promise(function(t,e){var o;angular.isObject(n.ODKL)&&(o=n.ODKL),n.ODKL={updateCount:function(e,r){t(r),o&&(n.ODKL=o)}}}).then(function(n){return Number(n)||0})["catch"](a(0))}},f.googleplus={count:function(n){return n=n||p,t.post("https://clients6.google.com/rpc",{method:"pos.plusones.get",id:n,params:{nolog:!0,id:n,source:"widget",userId:"@viewer",groupId:"@self"},jsonrpc:"2.0",key:"p",apiVersion:"v1"},{processData:!0,contentType:"application/json"}).then(function(n){return n.results?Number(n.result.metadata.globalCounts.count):0})["catch"](a(0))}},f.mailru={count:function(n){return n=n||p,t.jsonp("https://connect.mail.ru/share_count?url_list="+encodeURIComponent(n)+"&callback=1&func=JSON_CALLBACK").then(function(t){return t=t.data,t[n]?Number(t[n].shares):0})["catch"](a(0))}},f.pinterest={count:function(n){return n=n||p,t.jsonp("https://api.pinterest.com/v1/urls/count.json?url="+encodeURIComponent(n)+"&callback=JSON_CALLBACK").then(function(n){return n=n.data,Number(n.count)||0})["catch"](a(0))}},f.livejournal={count:function(n){var t=n||p;return e.call("repost.get_status",{url:t},{silent:!0}).then(function(n){var t=n.count;return parseInt(t)||0})["catch"](a(0))}},f.linkedin={count:function(n){return n=n||p,t.jsonp("https://www.linkedin.com/countserv/count/share?url="+encodeURIComponent(n)+"&callback=JSON_CALLBACK").then(function(n){return n=n.data,Number(n.count)||0})["catch"](a(0))}},f.tumblr={count:function(n){return n=n||p,t.jsonp("https://api.tumblr.com/v2/share/stats?url="+encodeURIComponent(n)+"&callback=JSON_CALLBACK").then(function(n){return n=n.data,Number(n.response.note_count)||0})["catch"](a(0))}},f.reddit={count:function(n){return n=n||p,t.jsonp("https://www.reddit.com/api/info.json?url="+encodeURIComponent(n)+"&jsonp=JSON_CALLBACK").then(function(n){n=n.data;var t=n.data.children;return 0===t.length?0:Number(t[0].data.score)})["catch"](a(0))}},f.stumbleupon={count:function(n){return n=n||p,t.jsonp("https://query.yahooapis.com/v1/public/yql?q="+encodeURIComponent('select * from html where url="http://www.stumbleupon.com/services/1.01/badge.getinfo?url='+n+'" and xpath="*"')+"&format=json&callback=JSON_CALLBACK").then(function(n){n=n.data;var t=angular.fromJson(n.query.results.html.body);return Number(t.result.views)||0})["catch"](a(0))}},f.pocket={count:function(n){return n=n||p,t.jsonp("https://query.yahooapis.com/v1/public/yql?q="+encodeURIComponent('select * from html where url="https://widgets.getpocket.com/v1/button?count=horizontal&url='+n+'" and xpath="*"')+"&format=json&callback=JSON_CALLBACK").then(function(n){return n=n.data,Number(n.query.results.html.body.div.a.span.em.content)||0})["catch"](a(0))}},f.buffer={count:function(n){return n=n||p,t.jsonp("https://api.bufferapp.com/1/links/shares.json?url="+encodeURIComponent(n)+"&callback=JSON_CALLBACK").then(function(n){return n=n.data,Number(n.shares)||0})["catch"](a(0))}},f.xing={count:function(n){return n=n||p,t.jsonp("https://query.yahooapis.com/v1/public/yql?q="+encodeURIComponent('select * from html where url="https://www.xing-share.com/app/share?op=get_share_button;counter=top;url='+n+'" and xpath="*"')+"&format=json&callback=JSON_CALLBACK").then(function(n){return n=n.data,Number(n.query.results.html.body.div[0].div[0].span.content)||0})["catch"](a(0))}},{total:c,saveSharings:r,service:f}}function t(){function n(n,t){LJ.Flags.isDisabled("medius_sharings")}return{restrict:"AE",link:n,controller:"mediusSharingsCtrl",templateUrl:"sharings.ng.tmpl",controllerAs:"sharings"}}function e(n,t,e,o,r){var u=this;if(!LJ.Flags.isDisabled("medius_sharings")){u.count=0;var c=n.location.href;e.total(c).then(function(n){return o.$apply(function(){return u.count=n}),n}).then(e.saveSharings.bind(e,c)),LJ.Event.on("Sharings:add",function(){return r(function(){return o.$apply(function(){return u.count++})})})}}n.$inject=["$window","$http","Api"],e.$inject=["$window","Api","likesCount","$scope","$timeout"],angular.module("LJ.Sharings",["LJ.Api"]),angular.module("LJ.Sharings").factory("likesCount",n).controller("mediusSharingsCtrl",e).directive("mediusSharings",t)}(); /* <<< file end: js/widgets/sharings.js */ //# map link was there [sharings.js.map] /* >>> file start: js/entry/main.js */ //= require js/core/string.js //= require js/editor/basicToolbar.js //= require js/discovery/directives.js //= require js/widgets/likus.js //= require js/core/angular/ljMemories.js //= require js/core/angular/share.js //= require js/lib/jquery.qrcode.min.js //= require js/widgets/angular/mediusCardPager.js //= require js/widgets/angular/mediusSubscribe.js //= require js/widgets/angular/mediusFooter.js //= require js/widgets/angular/mediusTimeAgo.js //= require js/widgets/angular/mediusShareButtons.js //= require js/widgets/sharings.js //= require js/core/angular/api.js //= require_ml talk.goback.tomain //= require_ml talk.goback.tomedius //= require_ml talk.wrote //= require_ml portal.recent.nosubject Site.page.template['Widgets/Medius/likesItemsPopup.ng.tmpl'] = '
  • \n'; LJ.UI.registerTemplate('templates-Comments-PrevNext', " {{if $data.previous_entry_link || $data.next_entry_link}}
    {{/if}} ", 'JQuery.stat'); !function(e){"use strict";function t(){function e(e,t){var n=t.find(".mdspost-extra-allauthors__button"),r=t.find(".mdspost-extra-follow");n.click(function(){r.removeClass("mdspost-extra-follow--collapsed"),n.hide()})}return{link:e}}function n(e){function t(t,n){var r=LJ.get("siteroot"),i=LJ.get("remote_is_sup");e.document.referrer.match(r)&&e.history.length>1||(n.attr("href",LJ.get("siteroot")),n.find("[go-back-text]").text(LJ.ml("talk.goback.tomain"))),i||(n.attr("href",LJ.get("siteroot")+"/media"),n.find("[go-back-text]").text(LJ.ml("talk.goback.tomedius"))),n.css("display","block")}return{link:t}}function r(){return{scope:!0,link:function(e,t){e.firstCharacterIsPunctuation=/[-−–—+]/.test(t.text()[0])}}}function i(e,t){function n(n,r){function i(){s--,s>0||r.append(e(LJ.UI.template("templates-Comments-PrevNext",l))(n))}var o=LJ.get("entry"),a={journal:o.journal,ditemid:o.ditemid},c={silent:!0},s=2,l={};l.ehtml=function(e){return LJ.String.encodeHTML(e.replace(/&/g,"&"))},[{direction:"previous",apiMethod:"entry.get_itemid_before"},{direction:"next",apiMethod:"entry.get_itemid_after"}].forEach(function(e){t.call(e.apiMethod,a,c).then(function(t){var n=e.direction+"_";l[n+"poster"]=t.poster,l[n+"entry_link"]=t.link,l[n+"entry_subject"]=t.subject,t.is_community&&!l.is_community&&(l.is_community=t.is_community,l.journal_ljuser=t.journal),i()},function(){i()})})}return{link:n}}function o(t){function n(){e("a:not([target])").attr("target","_self")}t(function(){n()}),LJ.Event.on("entry/fixLinks",n)}function a(e,t){e.enabled(!1),t.html5Mode(!0)}function c(){function e(){function e(e,i){function o(o,a){if(e.className===p||i===f||!~l.indexOf(e.nodeName)||m.filter(t(e)).length)return void o();var c=e.appendChild(document.createElement("div"));c.className=p,[].reduce.call(e.childNodes,n,[]).reduce(r,Promise.resolve({reffer:e.firstChild,offset:0,level:i,prev:null})).then(o)["catch"](function(e){a(e)})}return new Promise(o)}function t(e){return function(t){return~e.className.indexOf(t)}}function n(e,t){var n,r=e[e.length-1];return r&&!r.el||(e.push({el:null}),r=e[e.length-1]),(~d.indexOf(t.nodeName)||t.querySelectorAll&&t.querySelectorAll(d).length)&&(r.el=t,n=getComputedStyle(t,null).display),e}function r(e,t){return e.then(function(e){return i(t.el).then(a.bind(null,t.el,e))})}function i(e){var t="IMG"===e.nodeName?[e]:e.querySelectorAll("img");return Promise.all([].map.call(t,o))}function o(e){function t(t){e.complete?t():e.onload=t}return new Promise(t)}function a(t,n){function r(r,u){return l&&n.prev&&t.offsetTop-n.prev.top>s?void u(n.prev.reffer):(l&&i-a>c?n.prev=n.prev?n.prev:{top:n.offset,reffer:n.reffer}:n.prev=null,l&&n.prev&&o-n.prev.top>s?void u(n.prev.reffer):l&&t.offsetTop-n.offset>s?void u(n.reffer):void e(t,n.level+1).then(function(){r({reffer:t.nextSibling,offset:o,prev:n.prev})})["catch"](function(e){u(e)}))}var i=window.innerWidth-2*h.winmarg,o=t.offsetTop+t.offsetHeight,a=t.offsetLeft+t.offsetWidth,c=h.width+h.margin,s=h.height+2*h.margin,l=i<=h.wmax&&i>=h.wmin;return new Promise(r)}function c(e){var t,n,r,i,o=window.innerWidth-2*h.winmarg;t=document.createElement("div"),t.setAttribute("lj-sale","s1_right"),t.setAttribute("lj-sale-hide-cookie","s1_rightbanner_closed"),t.className="ljsale ljsale--empty b-singlepost-postbanner",i=h.post-o>> file start: js/jquery/jquery.calendarEvents.js */ !function(e){var t={};e.fn.calendarEvents=function(n){function a(e,t){return"cache_"+e+t}function s(e,t){var n=this;this.calendar=e,this.events=null,this.options=t,this._ajaxActive=!1,this._currentDate;var s,i=function(t,i){"string"!=typeof e.data("noFetch")&&(clearTimeout(s),n._currentDate=a(t.getFullYear(),t.getMonth()+1),s=setTimeout(function(){n.fetchEvents(t.getFullYear(),t.getMonth()+1,i)},200))};this.calendar.bind("dateChange",function(e){var t=n.calendar[n.options.calendarType]("option","displayedMonth"),a=1===Math.abs(12*(e.date.getFullYear()-t.getFullYear())+(e.date.getMonth()-t.getMonth()));i(e.date,a)}),this.options.fetchOnFirstDisplay&&this.calendar.one("calendarshow",function(e){i(new Date,!0)})}var i={calendarType:"calendar",classNames:{idle:"idle"},fetchOnFirstDisplay:!1};return s.prototype={getEvents:function(e,t,n){var a={};return a[+e]={},a[+e][+t-1]=n,a},fetchEvents:function(n,s,i){i=arguments.length>=3?!!i:!0;var o=this,r=(this.calendar[this.options.calendarType]("option","displayedMonth"),this.calendar[this.options.calendarType]("getElement",i?"month":"year")),c=this.options.classNames.idle,l=!0,h=function(){o._ajaxActive||l||r.removeClass(c)};this.calendar[this.options.calendarType]("getElement","year").removeClass(c),this.calendar[this.options.calendarType]("getElement","month").removeClass(c),r.addClass(c),this._ajaxActive=!0,setTimeout(function(){l=!1,h()},500);var d=a(n,s);processResults=function(e){d===o._currentDate&&(o.events=t[d],o.calendar[o.options.calendarType]("option","events",o.getEvents(o.events.year,o.events.month,o.events.days)),o._ajaxActive=!1,h())},d in t?processResults(t[d]):e.getJSON(LiveJournal.getAjaxUrl("calendar"),{year:n,month:s},function(e){t[d]=e,processResults(e)})}},this.each(function(){new s(e(this),e.extend({},i,n))})}}(jQuery); /* <<< file end: js/jquery/jquery.calendarEvents.js */ //# map link was there [jquery.calendarEvents.js.map] /* >>> file start: js/settings/services/filters/filters.js */ //= require js/core/angular/api.js //= require js/core/angular/options.js //= require js/core/angular/users.js !function(t){return t}(),function(){"use strict";angular.module("GroupsAndFilters.Services.Filters",["LJ.Api","LJ.Options","Users"]).filter("filtersOrder",function(){return function(t){var r=t.slice(0);return r.sort(function(t,r){if(31===t.id)return-1;if(31===r.id)return 1;var e=t.name.toLowerCase(),i=r.name.toLowerCase();return e>i?1:-1}),r}}).factory("FilterGroupFactory",["$q","$timeout","Api","Options","Users",function(t,r,e,i,n){function o(){angular.extend(this,{MAX_COUNT:31,filters:[],key:"filters",rpc:{}},i.create({journal:LJ.get("remoteUser")}))}return o.prototype.toJSON=function(t){var r=angular.copy(t);return delete r.checked,delete r.users,r},o.prototype.nextId=function(){for(var t=null,r=this.filters.map(LJ.Function.get("id")),e=1,i=this.MAX_COUNT;i>e&&null===t;)-1===r.indexOf(e)&&(t=e),e+=1;return t},o.prototype.sync=function(t){var r={};return angular.isArray(t)||(t=[t]),r[this.key]=t.map(this.toJSON),r.journal=this.get("journal"),e.call(this.rpc.update,r)},o.prototype.fetch=function(t){var r=this,i={journal:this.get("journal")};return t=angular.extend(t||{},{cache:!1}),e.call(this.rpc.read,i,t).then(function(t){return r.filters=t[r.key],r.filters})},o.prototype._isNameUniq=function(t){var r=this.filters.map(function(t){return t.name.toLowerCase()});return t=t.toLowerCase(),-1===r.indexOf(t)},o.prototype.create=function(r){var i;return r=r.trim(),0===r.length?t.reject("filters"===this.key?LJ.ml("api.error.filters.filter_name_not_specified"):LJ.ml("api.error.groups.group_name_not_specified")):this._isNameUniq(r)?(i={id:this.nextId(),name:r,users:[],"public":!1,journal:this.get("journal")},this.filters.push(i),e.call(this.rpc.create,i)):t.reject("filters"===this.key?LJ.ml("api.error.filters.filter_already_exist",{name:r}):LJ.ml("api.error.groups.group_already_exist",{name:r}))},o.prototype.remove=function(t){var r=this,i={};return t=Array.isArray(t)?t:[t],i[this.key]=t.map(LJ.Function.get("id")),i.journal=this.get("journal"),t.forEach(function(t){r.filters.splice(r.filters.indexOf(t),1)}),e.call(this.rpc.remove,i)},o.prototype.getCount=function(){return e.call(this.rpc.count,{journal:this.get("journal")}).then(LJ.Function.get("count"))},o.prototype.by=function(t){var r=n.Cache.get(t);return r?this.filters.filter(function(r){return n.isUserInGroup(t,r.id)}):[]},o}]).factory("Filter",["FilterGroupFactory",function(t){function r(){this.rpc={create:"filters.create",read:"filters.list",update:"filters.update",remove:"filters.remove",count:"filters.count"},this.key="filters"}return r.prototype=new t,r.prototype._setPrivacy=function(t,r){return t=Array.isArray(t)?t:[t],t.forEach(LJ.Function.set("public","public"===r)),this.sync(t)},r.prototype["private"]=function(t){return this._setPrivacy(t,"private")},r.prototype["public"]=function(t){return this._setPrivacy(t,"public")},new r}]).factory("Group",["FilterGroupFactory",function(t){function r(){this.rpc={create:"groups.create",read:"groups.list",update:"groups.update",remove:"groups.remove",count:"groups.count"},this.key="groups"}return r.prototype=new t,new r}])}(); /* <<< file end: js/settings/services/filters/filters.js */ //# map link was there [filters.js.map] /* >>> file start: js/settings/directives/filtersFor.js */ //!= require js/core/angular/messages.js LJ.injectStyle('/* >>> file start: stc/widgets/filter-settings.css */\n.b-filterset{max-width:290px;font:14px/1.4 Arial,sans-serif;color:#000}.b-filterset-addnew-input,.b-filterset-list LABEL{display:block;white-space:nowrap;line-height:1.333}.b-filterset B,.b-filterset CODE,.b-filterset DD,.b-filterset DIV,.b-filterset DT,.b-filterset EM,.b-filterset I,.b-filterset KBD,.b-filterset LABEL,.b-filterset LI,.b-filterset P,.b-filterset PRE,.b-filterset SPAN,.b-filterset STRONG,.b-filterset TD,.b-filterset TH{font-size:100%}.b-filterset .i-ljuser-userhead{vertical-align:top!important;margin:1px 0 0!important;border:none!important}.b-filterset .i-ljuser-username:active,.b-filterset .i-ljuser-username:hover,.b-filterset .i-ljuser-username:link,.b-filterset .i-ljuser-username:visited{color:#0051B7!important;text-decoration:none!important;border:none!important}.b-filterset .b-filterset-subtitle,.b-filterset .b-filterset-title{margin:0 1.142em .5em 0!important;color:#222!important}.b-filterset .b-filterset-title{font-weight:700!important}.b-filterset-list{position:relative;z-index:1;overflow:auto;max-height:14em;min-width:220px;margin:0 0 .3em;padding:0;background-attachment:scroll;background-clip:border-box;background-image:-webkit-radial-gradient(50% 0,farthest-side,rgba(0,0,0,.1),transparent),-webkit-radial-gradient(50% 100%,farthest-side,rgba(0,0,0,.1),transparent);background-image:radial-gradient(farthest-side at 50% 0,rgba(0,0,0,.1),transparent),radial-gradient(farthest-side at 50% 100%,rgba(0,0,0,.1),transparent);background-origin:padding-box;background-position:0 0,0 100%;background-repeat:no-repeat;background-size:100% 7px}.b-filterset-list:after,.b-filterset-list:before{position:relative;z-index:-1;display:block;content:\"\";height:14px;margin:0 0 -14px;background:-webkit-linear-gradient(top,#F4F5F6,#F4F5F6 30%,rgba(244,245,246,0));background:linear-gradient(to bottom,#F4F5F6,#F4F5F6 30%,rgba(244,245,246,0))}.b-filterset-list:after{margin:-14px 0 0;background:-webkit-linear-gradient(top,rgba(228,229,233,0),#E4E5E9 70%,#E4E5E9);background:linear-gradient(to bottom,rgba(228,229,233,0),#E4E5E9 70%,#E4E5E9)}.b-filterset-list LI{margin:0;padding:0;list-style-type:none}.b-filterset-list LI.loading{background:url(/img/preloader/preloader-blue-gray.gif?v=16423) 100% 50% no-repeat}.b-filterset-list LABEL{font-size:.857em}.b-filterset-list LABEL:hover{background:#7292BD;color:#FFF}.b-filterset-addnew-input{margin:0 0 .5em;font-size:.857em}.b-filterset-addnew{margin:.5em 0 0}.b-filterset-pseudo{font-size:.857em;color:#0051B7}.b-filterset-submit{text-align:right}.b-filterset-loader:after,.b-filterset-loader:before{display:inline-block;visibility:hidden;content:\'\';width:21px;height:21px;margin:-2px 0 0 4px;background:url(/img/preloader/preloader-blue-gray.gif?v=16423) 50% 50% no-repeat;vertical-align:middle}.b-filterset-loader-after:before,.b-filterset-loader-before:after{display:none}.b-filterset-loading .b-filterset-loader-after:after,.b-filterset-loading .b-filterset-loader-before:before{visibility:visible}\n/* <<< file end: stc/widgets/filter-settings.css */\n\n/*# sourceMappingURL=filter-settings.css.map */\n'); Site.page.template['angular/controlstrip/filters.ng.tmpl'] = '
    \n
      \n
    • \n \n
    • \n\n
    • \n \n
      \n \n \n \n
      \n
    • \n
    \n\n \n \n \n
    \n\n'; !function(e){return e}(),function(){"use strict";function e(e,r,t,n,o,i){function l(){return Array.isArray(e.usernames)?e.usernames:[e.usernames]}e.loading={},e.filters=[],t.fetch({cache:!0}).then(function(r){e.filters=r}),e.model={newFilter:"",showCreateDialog:!1},e.toggleFilter=function(r,t){var o;i.clear(),e.loading[r]=!0,o=t?n.addToGroup(r,l()):n.removeFromGroup(r,l()),o.then(function(){e.loading[r]=!1})},e.isActive=function(e){var r=l().every(function(r){return n.isUserInGroup(r,e)});return r},e.isCountReached=function(){return e.filters.length>=t.MAX_COUNT},e.createFilter=function(){var r=e.model.newFilter.trim();e.resetFilter(),0!==r.length&&(e.model.loading=!0,t.create(r).then(function(r){var t=r.filter;n.addToGroup(t.id,l()).then(function(){e.model.loading=!1})}))},e.resetFilter=function(){e.model.newFilter="",e.model.showCreateDialog=!1},e.$on("bubble:open:controlstrip",e.resetFilter)}angular.module("Filters.List",[]).controller("FiltersForCtrl",["$scope","$q","Filter","Users","Bubble","Messages",e]).controller("GroupsForCtrl",["$scope","$q","Group","Users","Bubble","Messages",e]).directive("filtersFor",[function(){return{controller:"FiltersForCtrl",scope:{usernames:"=filtersFor"},templateUrl:"filters.ng.tmpl",link:function(e){e.isFiltersFor=!0}}}]).directive("groupsFor",[function(){return{controller:"GroupsForCtrl",scope:{usernames:"=groupsFor"},templateUrl:"filters.ng.tmpl",link:function(e){e.isGroupsFor=!0}}}])}(); /* <<< file end: js/settings/directives/filtersFor.js */ //# map link was there [filtersFor.js.map] /* >>> file start: js/relations/menu.js */ //= require js/core/angular/bubble.js //= require js/core/angular/ljUser.js //!= require js/core/angular/messages.js //= require js/settings/services/filters/filters.js //= require js/core/angular/users.js //= require js/settings/directives/filtersFor.js Site.page.template['angular/controlstrip/controlstrip.ng.tmpl'] = '\n\n \n
    \n\n \n
    \n
    \n\n \n
    \n\n \n
    \n
    \n
    \n
    \n \n
    \n
    \n\n \n \n\n
    \n
    \n
    \n \n\n'; !function(e){return e}(),function(e){"use strict";function t(e){LJ.Track.event("Relations","Menu",e)}angular.module("Relations.Menu",["LJ.Templates","LJ.Bubble","LJ.Directives","LJ.User","LJ.Messages","GroupsAndFilters.Services.Filters","Users","Filters.List"]).value("$anchorScroll",null).controller("MenuCtrl",["$scope","Bubble","$timeout","$q","ljUser","Filter","Users","Relations","Messages",function(n,s,r,i,o,u,c,a,l){function b(e,t){var s;switch(t&&d(t),e){case"addFriend":s=a.toggleFriend(h,!0,{wait:!0});break;case"removeFriend":s=a.toggleFriend(h,!1,{wait:!0});break;case"join":s=a.toggleMember(h,!0,{wait:!0});break;case"leave":s=a.toggleMember(h,!1,{wait:!0});break;case"subscribe":s=a.toggleSubscription(h,!0,{wait:!0});break;case"unsubscribe":s=a.toggleSubscription(h,!1,{wait:!0})}return s["finally"](m).then(function(t){return ContextualPopup.currentElement===v.find(".ljuser img").get(0)&&ContextualPopup.hide(),t.error?i.reject(t.error.message):(t.message&&(t.message.body=t.message.content,l.add(t.message)),"undefined"!=typeof t.controlstrip_status&&(n.status=t.controlstrip_status),"subscribe"===e||"addFriend"===e||"join"===e&&t.is_subscribedon?f():void(n.filters=[]))},function(e){l.error({body:e})})}function f(){var e,t=c.Cache.get(h);return t.is_subscribedon?(e=t.filtermask?i.defer().resolve():c.fetchUser(h,{filtermask:1}),i.all({filters:u.fetch({cache:!0}),user:e}).then(function(e){n.filters=e.filters})):i.reject()}function d(e){g&&m(),g=(new Hourglass).setEvent(e).show()}function m(){g&&(g.remove(),g=null)}var g,p,v=e(".w-cs-status"),h=LJ.get("journal.username");c.set({type:"subscriptions"}),n.username=h,n.filters=[],n.status=LJ.get("controlstrip.status"),c.Cache.add(LJ.get("journal")),ContextualPopup.showNote=angular.identity,p=i.defer(),n.mlResolve={promise:p.promise},o.get(h,{noctxpopup:!0}).then(function(e){p.resolve({username:e})}),n.$watch(function(){return c.Cache.get(h)},function(e){n.states=LJ.Object.pick(e,"is_friend","is_member","is_subscribedon","is_invite_sent")},!0),n.toggleLoading=function(e){n.loading=e},LJ.Event.on("relations.change",function(){r(l.clear)}),n.subscribe=function(e){e.preventDefault(),t("subscribe"),b("subscribe",e).then(function(){n.states.is_subscribedon&&(n.mode="subscribe",s.open("controlstrip","unsubscribe"))})},n.unsubscribe=function(e){e.preventDefault(),t("unsubscribe"),b("unsubscribe",e)},n.addFriend=function(e){e.preventDefault(),t("add friend"),b("addFriend",e).then(function(){n.states.is_friend&&(n.mode="add",s.open("controlstrip","removeFriend"))})},n.removeFriend=function(e){e.preventDefault(),t("remove friend"),b("removeFriend",e)},n.watch=function(e){e.preventDefault(),t("subscribe to community"),b("subscribe",e).then(function(){n.states.is_subscribedon&&(n.mode="watch",s.open("controlstrip","unwatch"))})},n.unwatch=function(e){e.preventDefault(),t("unsubscribe from community"),b("unsubscribe",e)},n.join=function(e){e.preventDefault(),t("join community"),b("join",e).then(function(){n.states.is_member&&(n.mode=n.states.is_subscribedon?"joinSubscribed":"join",s.open("controlstrip","leave"))})},n.leave=function(e){e.preventDefault(),t("leave community"),b("leave",e)},n.subscribeAfterJoin=function(){n.toggleLoading(!0),t("subscribe to community (after join)"),b("subscribe").then(function(){n.toggleLoading(!1),n.mode="watch"})}}])}(jQuery); /* <<< file end: js/relations/menu.js */ //# map link was there [menu.js.map] /* >>> file start: js/controlstrip.js */ //= require js/jquery/jquery.calendarEvents.js //= require js/relations/menu.js !function(e){return e}(),function(e){"use strict";function t(){var t,o,n,r;LJ.get("remoteUser")&&(t=e(".s-header .s-header-extra-filter, #lj_controlstrip_new .w-cs-filter-inner"),0!==t.length&&(o=e("#sortByPoster"),n=o.find("[name=poster]"),r=o.find("[type=image]"),t.bubble({target:".s-header .w-cs-filter-icon, #lj_controlstrip_new .w-cs-filter-icon",showOn:"click",closeControl:!0,classNames:{containerAddClass:"b-bubble-filter"}}),n.input(function(){this.value.length?r.css("opacity",1).prop("disabled",!1):r.css("opacity",0).prop("disabled",!0)}),o.on("submit",function(e){n.val().length||e.preventDefault()})))}function o(){e(".s-header input[placeholder], #lj_controlstrip_new input[placeholder]").labeledPlaceholder()}function n(){t(),o(),LJ.Flags.isEnabled("new_friends_and_subscriptions")&&!r&&angular.bootstrap(e("[data-controlstrip]"),["Relations.Menu"]),function(){function t(e){var t=e.split(",").map(Number);return new Date(t[0],t[1],t[2])}var o=e(".s-header .w-cs-i-calendar a, #lj_controlstrip_new .w-cs-i-calendar a"),n=/^\/friends/.test(location.pathname),r=LJ.get("current_journal.url_journal"),l=LJ.get("controlstrip.calendar.earlyDate"),a=LJ.get("controlstrip.calendar.lastDate");o.length&&(o.calendar({showOn:"click",closeControl:!0,bubbleClass:!0,dayRef:r+"/"+(n?"friends/":"")+"%Y/%M/%D",allRefs:n,startMonth:l?t(LJ.get("controlstrip.calendar.earlyDate")):new Date,endMonth:a?t(LJ.get("controlstrip.calendar.lastDate")):new Date,classNames:{container:"w-cs-calendar"},ml:{caption:LJ.ml("web.controlstrip.view.calendar")}}).on("daySelected",function(e){e.preventDefault()}),n||o.calendarEvents({fetchOnFirstDisplay:!0}))}(),e(".b-loginpopup").bubble({target:".i-auth-control",closeControl:!1,showOn:"click"}),e("input.text").labeledPlaceholder(),e("html").trigger("controlstrip-initialized")}var r=Boolean("undefined"!=typeof document.documentMode&&document.documentMode<8);e(function(){return 0!==e(".s-header, #lj_controlstrip_new").length||"xcolibur"===Site.page.scheme?void n():void e.get(LiveJournal.getAjaxUrl("controlstrip"),{user:LJ.get("currentJournal")},function(t){e(".body-content").length?e(t).prependTo(".body-content"):(e("html").removeClass("html-adaptive"),e(t).appendTo(document.body)),n()})}),e(function(){function t(t){var o=e("."+l.showElem+":not("+t+")");e(o).removeClass(l.showElem)}function o(){var t=e("."+l.showElem);t.length>0?e(r.bodyElem).addClass(l.showFader):e(r.bodyElem).removeClass(l.showFader)}function n(){var t=e("."+l.showElem);t.length>0?a.catchBlur=!0:a.catchBlur=!1}var r={bodyElem:e("body"),controls:e(".js--show-elem"),controlsHover:e(".js--show-elem-by-hover"),fader:e(".b-fader")},l={control:"js--show-elem",controlHover:"js--show-elem-by-hover",showElem:"js--is-shown",showFader:"js--show-fader",catchBlur:"js--catch-blur"},a={catchBlur:!1};e(document).on("click",function(){a.catchBlur&&t()}),e(r.controlsHover).hover(function(){var t=e(this).find("."+l.control),o={selector:e(t).data("elem")};e(o.selector).addClass(l.showElem)},function(){var t=e(this).find("."+l.control),o={selector:e(t).data("elem")};e(o.selector).removeClass(l.showElem),e(this).addClass(l.controlHover)}),e(r.controls).on("click",function(r){var a={selector:e(this).data("elem"),isShowFader:e(this).data("fader")||!1,isUseBlur:e(this).data("blur")||!1};t(a.selector),e(a.selector).toggleClass(l.showElem),e(this).parent().hasClass(l.controlHover)&&e(this).parent().removeClass(l.controlHover),a.isShowFader&&o(),a.isUseBlur&&n(),r.stopPropagation(),r.preventDefault()}),e(r.fader).on("click",function(){t(),e(r.bodyElem).removeClass(l.showFader)})})}(jQuery); /* <<< file end: js/controlstrip.js */ //# map link was there [controlstrip.js.map] /* >>> file start: js/lib/jquery.selectric.min.js */ !function(e){"use strict";var t="selectric",s="Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive Above Scroll",o=".sl",i={onChange:function(t){e(t).change()},maxHeight:300,keySearchTimeout:500,arrowButtonMarkup:'',disableOnMobile:!0,openOnHover:!1,expandToItemText:!1,responsive:!1,preventWindowScroll:!0,inheritOriginalWidth:!1,customClass:{prefix:t,postfixes:s,camelCase:!0,overwrite:!0},optionsItemBuilder:"{text}"},n={add:function(e,t,s){this[e]||(this[e]={}),this[e][t]=s},remove:function(e,t){delete this[e][t]}},a={replaceDiacritics:function(e){for(var t="40-46 50-53 54-57 62-70 71-74 61 47 77".replace(/\d+/g,"\\3$&").split(" "),s=t.length;s--;)e=e.toLowerCase().replace(RegExp("["+t[s]+"]","g"),"aeiouncy".charAt(s));return e},format:function(e){var t=arguments;return(""+e).replace(/{(\d+|(\w+))}/g,function(e,s,o){return o&&t[1]?t[1][o]:t[s]})},nextEnabledItem:function(e,t){for(;e[t=(t+1)%e.length].disabled;);return t},previousEnabledItem:function(e,t){for(;e[t=(t>0?t:e.length)-1].disabled;);return t},toDash:function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},triggerCallback:function(s,o){var i=o.element,l=o.options["on"+s];e.isFunction(l)&&l.call(i,i,o),n[s]&&e.each(n[s],function(){this.call(i,i,o)}),e(i).trigger(t+"-"+a.toDash(s),o)}},l=e(document),r=e(window),c=function(n,c){function d(t){if($.options=e.extend(!0,{},i,$.options,t),$.classes={},$.element=n,a.triggerCallback("BeforeInit",$),$.options.disableOnMobile&&L)return void($.disableOnMobile=!0);C(!0);var o=$.options.customClass,l=o.postfixes.split(" "),r=R.width();e.each(s.split(" "),function(e,t){var s=o.prefix+l[e];$.classes[t.toLowerCase()]=o.camelCase?s:a.toDash(s)}),x=e("",{"class":$.classes.input,readonly:L}),k=e("
    ",{"class":$.classes.items,tabindex:-1}),T=e("
    ",{"class":$.classes.scroll}),D=e("
    ",{"class":o.prefix,html:$.options.arrowButtonMarkup}),y=e('

    '),I=R.wrap("

    ").parent().append(D.prepend(y),k,x),A={open:v,close:g,destroy:C,refresh:u,init:d},R.on(A).wrap('
    '),e.extend($,A),$.options.inheritOriginalWidth&&r>0&&I.width(r),p()}function p(){$.items=[];var t=R.children(),s="
      ",i=t.filter(":selected").index();H=S=~i?i:0,(E=t.length)&&(t.each(function(t){var o=e(this),i=o.html(),n=o.prop("disabled"),l=$.options.optionsItemBuilder;$.items[t]={value:o.val(),text:i,slug:a.replaceDiacritics(i),disabled:n},s+=a.format('
    • {2}
    • ',e.trim([t==H?"selected":"",t==E-1?"last":"",n?"disabled":""].join(" ")),e.isFunction(l)?l($.items[t],o,t):a.format(l,$.items[t]))}),k.append(T.html(s+"
    ")),y.html($.items[H].text)),D.add(R).add(I).add(x).off(o),I.prop("class",[$.classes.wrapper,$.options.customClass.overwrite?R.prop("class").replace(/\S+/g,$.options.customClass.prefix+"-$&"):R.prop("class"),$.options.responsive?$.classes.responsive:""].join(" ")),R.prop("disabled")?(I.addClass($.classes.disabled),x.prop("disabled",!0)):(j=!0,I.removeClass($.classes.disabled).on("mouseenter"+o+" mouseleave"+o,function(t){e(this).toggleClass($.classes.hover),$.options.openOnHover&&(clearTimeout($.closeTimer),"mouseleave"==t.type?$.closeTimer=setTimeout(g,500):v())}),D.on("click"+o,function(e){Y?g():v(e)}),x.prop({tabindex:q,disabled:!1}).on("keypress"+o,h).on("keydown"+o,function(e){h(e),clearTimeout($.resetStr),$.resetStr=setTimeout(function(){x.val("")},$.options.keySearchTimeout);var t=e.keyCode||e.which;t>36&&41>t&&b(a[(39>t?"previous":"next")+"EnabledItem"]($.items,S))}).on("focusin"+o,function(e){x.one("blur",function(){x.blur()}),Y||v(e)}).on("oninput"in x[0]?"input":"keyup",function(){x.val().length&&e.each($.items,function(e,t){return RegExp("^"+x.val(),"i").test(t.slug)&&!t.disabled?(b(e),!1):void 0})}),R.prop("tabindex",!1),O=e("li",k.removeAttr("style")).click(function(){return b(e(this).index(),!0),!1})),a.triggerCallback("Init",$)}function u(){a.triggerCallback("Refresh",$),p()}function h(e){var t=e.keyCode||e.which;13==t&&e.preventDefault(),/^(9|13|27)$/.test(t)&&(e.stopPropagation(),b(S,!0))}function f(){var e=k.closest(":visible").children(":hidden"),t=$.options.maxHeight;e.addClass($.classes.tempshow);var s=k.outerWidth(),o=D.outerWidth()-(s-k.width());!$.options.expandToItemText||o>s?W=o:(k.css("overflow","scroll"),I.width(9e4),W=k.width(),k.css("overflow",""),I.width("")),k.width(W).height()>t&&k.height(t),e.removeClass($.classes.tempshow)}function v(s){a.triggerCallback("BeforeOpen",$),s&&(s.preventDefault(),s.stopPropagation()),j&&(f(),e("."+$.classes.hideselect,"."+$.classes.open).children()[t]("close"),Y=!0,B=k.outerHeight(),M=k.height(),x.val("").is(":focus")||x.focus(),l.on("click"+o,g).on("scroll"+o,m),m(),$.options.preventWindowScroll&&l.on("mousewheel"+o+" DOMMouseScroll"+o,"."+$.classes.scroll,function(t){var s=t.originalEvent,o=e(this).scrollTop(),i=0;"detail"in s&&(i=-1*s.detail),"wheelDelta"in s&&(i=s.wheelDelta),"wheelDeltaY"in s&&(i=s.wheelDeltaY),"deltaY"in s&&(i=-1*s.deltaY),(o==this.scrollHeight-M&&0>i||0==o&&i>0)&&t.preventDefault()}),I.addClass($.classes.open),w(S),a.triggerCallback("Open",$))}function m(){f(),I.toggleClass($.classes.above,I.offset().top+I.outerHeight()+B>r.scrollTop()+r.height())}function g(){if(a.triggerCallback("BeforeClose",$),H!=S){a.triggerCallback("BeforeChange",$);var e=$.items[S].text;R.prop("selectedIndex",H=S).data("value",e),y.html(e),a.triggerCallback("Change",$)}l.off(o),I.removeClass($.classes.open),Y=!1,a.triggerCallback("Close",$)}function b(e,t){$.items[e].disabled||(O.removeClass("selected").eq(S=e).addClass("selected"),w(e),t&&g())}function w(e){var t=O.eq(e).outerHeight(),s=O[e].offsetTop,o=T.scrollTop(),i=s+2*t;T.scrollTop(i>o+B?i-B:o>s-t?s-t:o)}function C(e){j&&(k.add(D).add(x).remove(),!e&&R.removeData(t).removeData("value"),R.prop("tabindex",q).off(o).off(A).unwrap().unwrap(),j=!1)}var x,k,T,D,y,I,O,S,H,B,M,W,E,A,$=this,R=e(n),Y=!1,j=!1,L=/android|ip(hone|od|ad)/i.test(navigator.userAgent),q=R.prop("tabindex");d(c)};e.fn[t]=function(s){return this.each(function(){var o=e.data(this,t);o&&!o.disableOnMobile?""+s===s&&o[s]?o[s]():o.init(s):e.data(this,t,new c(this,s))})},e.fn[t].hooks=n}(jQuery); /* <<< file end: js/lib/jquery.selectric.min.js */ //# map link was there [jquery.selectric.min.js.map] /* >>> file start: js/captcha.js */ !function(e){return e}(),function(e){"use strict";function c(){return"undefined"!=typeof _}function a(){var c=e.Deferred();return"keycaptcha"===LJ.Captcha.current?(c.resolve(),c.promise()):(p?c.resolve(p):LJ.Api.call("captcha.get_public_key",{},function(e){p=e.captcha_public,c.resolve(p)}),c.promise())}function t(){return"solve_media_captcha"===LJ.Captcha.current?"https:"===location.protocol?"https://api-secure.solvemedia.com/papi/challenge.ajax":"http://api.solvemedia.com/papi/challenge.ajax":location.protocol+"//www.google.com/recaptcha/api/js/recaptcha_ajax.js"}function n(t,n){var o=e.Deferred();return n=e.extend(d,n||{}),LJ.Captcha.current?e.when(a(),l()).then(function(){c()?_.create(p,t,n):console.error("Something went wrong. Captcha object is not defined.")}):(o.resolve(),o.promise())}function o(){c()&&_.destroy()}function i(){c()&&_.reload.apply(null,arguments)}function r(){return c()?"keycaptcha"===LJ.Captcha.current?null:_.get_challenge():void 0}function s(){return c()?"keycaptcha"===LJ.Captcha.current?e("#"+window.s_s_c_captcha_field_id).val():_.get_response():void 0}LJ.define("LJ.Captcha"),LJ.Captcha={create:n,reload:i,destroy:o,getChallenge:r,getResponse:s,isDefined:c,responseFieldName:LJ.Flags.isEnabled("solve_media_captcha")?"adcopy_response":"recaptcha_response_field",current:["keycaptcha","solve_media_captcha","recaptcha"].filter(LJ.Flags.isEnabled).shift()};var p,_,d={lang:"ru"},l=LJ.Function.once(function(){var c=e.Deferred();return window.ACPuzzleOptions={onload:function(){_=ACPuzzle,c.resolve()}},"keycaptcha"===LJ.Captcha.current?LJ.Api.call("captcha.get_public_key",{},function(a){var t=LJ.get("page.captcha_field_id")||"capcode";window.s_s_c_user_id=a.user_id,window.s_s_c_session_id=a.session_id,window.s_s_c_captcha_field_id=LJ.get("page.captcha_field_id")||"capcode",window.s_s_c_submit_button_id=LJ.get("page.submitbtn_id")||"createpage_create",window.s_s_c_web_server_sign=a.server_sign,window.s_s_c_web_server_sign2=a.server_sign2,e("#"+t).before('").attr("href",t.request.url).html(t.request.url)),void a.setState("done"))})}).on("click",".s-feedback-another",function(t){t.preventDefault(),l.find("input, textarea").each(function(){e(this).val("")}),LJ.Captcha.reload(),a.setState(null)}),n.bubble({target:c,showOn:"click",alwaysShowUnderTarget:!0,arrowWidth:"auto"}).on("click",".s-welcometo-action .b-flatbutton",function(e){e.preventDefault(),t()}).on("click",".s-welcometo-switcher",function(e){return e.preventDefault(),LJ.get("remote")?void LJ.Api.call("settings.set_old_design",{value:1},function(){location.reload()}):(LJ.Cookie.setGlobal("ljold",1,{expires:7}),void location.reload())}),s.on("click",function(t){var r=e(t.target);o&&(r.hasClass("b-fader")||r.hasClass("s-feedback-close"))&&(s.removeClass("p-feedback"),u.val(""),o=!1,a.setState(null),LJ.get("remote")||LJ.Captcha.destroy())})})}(jQuery); /* <<< file end: js/scheme/schemius/feedback.js */ //# map link was there [feedback.js.map] /* >>> file start: js/core/angular/simple-scrollbar.js */ !function(t,e){"use strict";function s(t,s){function i(t){var e=t.pageY-n;n=t.pageY,r(function(){s.el.scrollTop+=e/s.scrollRatio})}function a(){t.classList.remove("ss-grabbed"),e.body.classList.remove("ss-grabbed"),e.removeEventListener("mousemove",i),e.removeEventListener("mouseup",a)}var n;t.addEventListener("mousedown",function(s){return n=s.pageY,t.classList.add("ss-grabbed"),e.body.classList.add("ss-grabbed"),e.addEventListener("mousemove",i),e.addEventListener("mouseup",a),!1})}function i(i){for(this.target=i,this.bar='
    ',this.wrapper=e.createElement("div"),this.wrapper.setAttribute("class","ss-wrapper"),this.el=e.createElement("div"),this.el.setAttribute("class","ss-content"),this.wrapper.appendChild(this.el);this.target.firstChild;)this.el.appendChild(this.target.firstChild);this.target.appendChild(this.wrapper),this.target.insertAdjacentHTML("beforeend",this.bar),this.bar=this.target.lastChild,s(this.bar,this),this.moveBar(),this.el.addEventListener("scroll",this.moveBar.bind(this)),this.el.addEventListener("mouseenter",this.moveBar.bind(this)),this.target.classList.add("ss-container");var r=t.getComputedStyle(i);"0px"===r.height&&"0px"!==r["max-height"]&&(i.style.height=r["max-height"])}angular.module("Scrollbar",[]),angular.module("Scrollbar").constant("SimpleScrollbar",i);var r=t.requestAnimationFrame||t.setImmediate||function(t){return setTimeout(t,0)};i.prototype={moveBar:function(){var t=this.el.scrollHeight,e=this.el.clientHeight,s=this;this.scrollRatio=e/t,r(function(){1===s.scrollRatio?s.bar.classList.add("ss-hidden"):(s.bar.classList.remove("ss-hidden"),s.bar.style.cssText="height:"+100*s.scrollRatio+"%; top:"+s.el.scrollTop/t*100+"%;right:-"+(s.target.clientWidth-s.bar.clientWidth)+"px;")})},setElementHeight:function(t){this.el.style.height=t,this.moveBar()}}}(window,document); /* <<< file end: js/core/angular/simple-scrollbar.js */ //# map link was there [simple-scrollbar.js.map] /* >>> file start: js/notifications/main.js */ Site.page.template['angular/widgets/notifications/notifications.ng.tmpl'] = '\n\n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    '; Site.page.template['angular/widgets/notifications/notificationsIcon.ng.tmpl'] = '\n \n 0}\"\n ng-if=\"enabled\"\n ng-controller=\"NotificationsCountCtrl as count\"\n >{{count.count}}\n
    \n'; //= require js/core/angular/bubble.js //= require js/core/angular/api.js //= require js/core/angular/simple-scrollbar.js //= require_ml notification.centre.title //= require_ml notification.centre.read.all //= require_ml notification.centre.previous !function(n){return n}(),function(){"use strict";function n(n,t,i,o,e){function c(){var t=void 0;return d.length>0?void(t=n.$on("notifications:readPushed",function(){a(),t()})):void a()}function a(){r().then(function(t){g!==t.notifications&&(g=t.notifications,n.$broadcast("notifications:counterUpdated"))})}function r(){return i.call("notifications.getn",{silent:!0})}function u(n){return i.call("notifications.get",{page:n,silent:!0})}function f(){i.call("notifications.release",{id:d,silent:!0}),d=[],n.$broadcast("notifications:readPushed")}function s(t){d.push(t.id),t.unread=!1,g--,n.$broadcast("notifications:counterUpdated"),$()}function l(){i.call("notifications.release_all",{silent:!0}).then(function(t){"ok"===t&&(g=0,n.$broadcast("notifications:counterUpdated"))})}var d=[],p=[],g=0;c(),t(c,e);var $=LJ.Function.debounce(f,o);return{pushRead:s,entries:function(){return p},counter:function(){return g},getNotifications:u,readAll:l}}function t(n,t,i,o){function e(){(LJ.Support.isMobile()||LJ.Support.touch)&&t(c.readPage,1e3)}var c=this,a=0,r=0;c.entries=[],c.counter=o.counter(),c.loading=!1,c.defaultPic=LJ.get("statprefix")+"/img/userpics/userpic-user.png?v=15821",c.getPage=function(t){c.loading=!0,o.getNotifications(a).then(function(i){c.entries=i.notifications,r=i.pages,c.loading=!1,n.$broadcast("notifications:pageLoad:"+t)})},c.read=function(n){n.unread&&o.pushRead(n)},c.readPage=function(){c.part.forEach(c.read)},c.readAll=o.readAll,c.shouldShowMore=function(){return c.entries&&r-1>a},c.nextPage=function(){a++,c.getPage("next"),e(),n.$emit("notifications:nextPage")},n.$on("notifications:counterUpdated",function(){c.counter=o.counter()}),n.$on("bubble:open:notifications",function(){c.getPage("open"),e()}),n.$on("bubble:close:notifications",function(){a=0,c.entries=[]})}function i(n){function t(n,t){var i=LJ.Flags.isEnabled("notification_center_display");n.enabled=i,i&&t.removeClass("notices--hidden")}return{templateUrl:"notificationsIcon.ng.tmpl",link:t}}function o(n,t,i){var o=this;n.$on("notifications:counterUpdated",function(){t(function(){o.count=i.counter()})})}function e(n){function t(t,i){n.register({name:"notifications",template:"notifications.ng.tmpl"}),i.click(function(){t.$apply(function(){n.open("notifications",{alwaysBottom:!0,closeControl:!1},i)})})}return{link:t}}function c(n,t){function i(i,c){var a=c.find(".notices__body-wrapper")[0],r=new t(a);i.$on("notifications:pageLoad:open",function(){n(function(){return o(r,c)})}),i.$on("bubble:close:notifications",function(){n(function(){return e(r)})}),i.$on("notifications:pageLoad:next",function(){n(function(){e(r),o(r,c)})})}function o(n,t){n.setElementHeight(t.height()+"px")}function e(n){n.setElementHeight("100%")}return{link:i}}angular.module("Notifications",["LJ.Bubble","LJ.Api","Scrollbar"]),angular.module("Notifications").constant("READ_PUSH_DELAY",3e3).constant("CHECK_NEW_DELAY",1e4).factory("notificationService",n).directive("ljNotificationsIcon",i).directive("notificationsPanel",e).directive("notificationsContent",c).controller("NotificationCtrl",t).controller("NotificationsCountCtrl",o),n.$inject=["$rootScope","$interval","Api","READ_PUSH_DELAY","CHECK_NEW_DELAY"],t.$inject=["$scope","$timeout","$interval","notificationService"],i.$inject=["notificationService"],o.$inject=["$scope","$timeout","notificationService"],e.$inject=["Bubble"],c.$inject=["$timeout","SimpleScrollbar"]}(); /* <<< file end: js/notifications/main.js */ //# map link was there [main.js.map] /* >>> file start: js/core/angular/expirableLocalStorage.js */ !function(e){return e}(),function(){"use strict";function e(){function e(e){var t=LJ.Storage.getItem(e);return!t||t.expires>> file start: js/facebookMigration/migration.js */ //= require js/core/angular/api.js //= require js/core/angular/expirableLocalStorage.js Site.page.template['Widgets/facebook_migration.tmpl'] = '= 2 && migration.step <= 4,\n \'fbmerge--loading\': migration.loading,\n }\"\n ng-show=\"!migration.hidden\"\n >\n
    \n\n
    \n

    \n \n \n \n \n
    \n
    \n

    \n
    \n
    \n \n \n
    \n
    \n

    \n
    \n
    \n \n

    \n\n \n Confirm your email here\n

    \n\n
    \n\n
    \n

    \n
    \n\n
    \n\n\n\n \n\n
    \n
    \n \n \n \n
    \n
    \n \n \n \n \n \n \n \n \n
    \n
    \n\n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n \n \n \n \n Facebook\n \n \n\n
    \n\n
    \n

    \n \n
    \n
    \n \n
    \n \n \n
    \n \n \n \n \n \n \n
    \n \n \n
    \n \n \n \n
    \n
    \n\n
    \n \n
      \n
    • \n \n
    • \n
    • \n \n
    • \n
    • \n \n
    • \n
    • \n \n
    • \n
    • \n \n
    • \n
    • \n \n
    • \n
    \n \n \n\n \n
    \n\n'; LJ.injectStyle('/* >>> file start: stc/widgets/facebookmigration.css */\n.fbmerge,.fbmerge .fbmerge__status-fb .fbmerge__status__img{-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%)}.fbmerge{min-height:410px;top:50%;transform:translateX(-50%) translateY(-50%);z-index:5000}.fbmerge:not(.fbmerge--need-action) .modal__close::after,.fbmerge:not(.fbmerge--need-action) .modal__close::before{background-color:#FFF}.fbmerge__elem--step1,.fbmerge__elem--step2,.fbmerge__elem--step3,.fbmerge__elem--step4,.fbmerge__elem--step5,.fbmerge__elem--step6{display:none}.fbmerge .fbmerge__title{margin:73px 0 0;width:300px;font-size:28px;line-height:31px}.fbmerge .fbmerge__descr{position:absolute;box-sizing:border-box;top:0;left:0;padding-left:40px;width:50%;min-height:410px;-webkit-transition:opacity ease 1s;transition:opacity ease 1s;color:#FFF;z-index:2}.fbmerge .fbmerge__status{position:absolute;top:0;bottom:0;left:0;width:100%;border-radius:5px;background-color:#1EB2EA;-webkit-transition:width ease .7s;transition:width ease .7s;z-index:1}.fbmerge .fbmerge__status-fb,.fbmerge .fbmerge__status-lj{box-sizing:border-box;position:absolute;border:3px solid #FFF;width:162px;height:162px;bottom:84px;border-radius:50%;overflow:hidden}.fbmerge .fbmerge__status-lj{left:564px;background-color:#FFF;box-shadow:0 0 0 7px #00B1ED inset;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-transition:ease 1s;transition:ease 1s;-webkit-transition-property:border,bottom,left;transition-property:border,bottom,left}.fbmerge .fbmerge__status-lj .fbmerge__status__img{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%) rotate(-45deg);-ms-transform:translateX(-50%) translateY(-50%) rotate(-45deg);transform:translateX(-50%) translateY(-50%) rotate(-45deg);-webkit-transition:all ease .7s;transition:all ease .7s}.fbmerge .fbmerge__status-fb{left:441px;-webkit-transition:all ease .7s;transition:all ease .7s}.fbmerge .fbmerge__status-fb .fbmerge__status__img{position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);width:40px;height:76px;-webkit-transition:all ease .7s;transition:all ease .7s}.fbmerge .fbmerge__sharing{position:absolute;left:40px;bottom:56px;margin:0;padding:0;line-height:0;list-style:none;font-size:0;opacity:0;-webkit-transition:opacity ease 1s;transition:opacity ease 1s;z-index:2}.fbmerge .fbmerge__sharing__item{display:inline-block;vertical-align:middle}.fbmerge .fbmerge__sharing__item+.fbmerge__sharing__item{margin-left:22px}.fbmerge .fbmerge__sharing__text{display:inline-block;width:90px;font-size:16px;line-height:18px;color:#FFF}.fbmerge .fbmerge__sharing__link{position:relative;display:inline-block;width:35px;height:35px;border:1px solid #FFF;border-radius:50%}.fbmerge .fbmerge__sharing__link .fbmerge__sharing__img{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.fbmerge.fbmerge--step5 .fbmerge__sharing,.fbmerge.fbmerge--step6 .fbmerge__sharing{opacity:1}.fbmerge.fbmerge--need-action .fbmerge__status{width:50%;border-radius:5px 0 0 5px}.fbmerge.fbmerge--need-action .fbmerge__status-lj{left:40px;bottom:48px}.fbmerge.fbmerge--need-action .fbmerge__status-fb{width:0;height:0;border-width:0}.fbmerge.fbmerge--need-action .fbmerge__status-fb .fbmerge__status__img{width:0;height:0}.fbmerge.fbmerge--need-action.fbmerge--loading .fbmerge__status{width:100%;border-radius:5px;-webkit-transition-duration:.5s;transition-duration:.5s}.fbmerge .fbmerge__container{position:relative;box-sizing:border-box;min-height:410px;margin:0 0 0 auto;padding:0 50px 0 40px;width:50%;color:#4c4c4c}.fbmerge.fbmerge--step2 .fbmerge__container .fbmerge__container__label:first-child,.fbmerge.fbmerge--step3 .fbmerge__container .fbmerge--step3__text:first-child,.fbmerge.fbmerge--step3 .fbmerge__container .fbmerge__container__label:first-child{padding-top:73px}.fbmerge.fbmerge--step2 .fbmerge__container .fbmerge__container__label,.fbmerge.fbmerge--step3 .fbmerge__container .fbmerge__container__label,.fbmerge.fbmerge--step4 .fbmerge__container .fbmerge__container__small-title{display:block;margin:0;font-size:16px;line-height:18px;font-weight:600;text-transform:uppercase}.fbmerge .fbmerge__container .fbmerge__notice{font-size:10px;line-height:11px;display:block;margin:5px 0 30px}.fbmerge .fbmerge__container .flatbutton{color:#c3d3d9;background-color:transparent}.fbmerge .fbmerge__container .flatbutton--active{border-color:#00b1ed;color:#00b1ed}.fbmerge .fbmerge__input-wrapper{position:relative;margin-bottom:30px}.fbmerge .fbmerge__input-wrapper:last-child{margin-bottom:0}.fbmerge .fbmerge__input-tooltip{position:absolute;top:-15px;right:0;color:#d0021b;font-size:11px;text-align:right;width:140px;display:none}.fbmerge.fbmerge--step1:not(.fbmerge--loading) .fbmerge__elem--step1{display:block}.fbmerge.fbmerge--step1 .fbmerge__title{margin-bottom:60px}.fbmerge.fbmerge--step1 .fbmerge__descr .flatbutton{display:block;margin-bottom:17px;width:174px;border-color:#FFF;color:#FFF}.fbmerge.fbmerge--step1 .fbmerge__descr .flatbutton:focus{background-color:transparent}.fbmerge.fbmerge--step1 .fbmerge__descr .fbmerge--step1__link-wrapper{display:block;width:174px;text-align:center;font-size:10px;line-height:12px;text-transform:uppercase}.fbmerge.fbmerge--step1 .fbmerge__descr .fbmerge--step1__link{color:#fff;font-size:11px;line-height:14px;letter-spacing:0;background-color:transparent;border:0;outline:0;text-transform:uppercase;cursor:pointer}.fbmerge.fbmerge--loading.fbmerge--step1 .fbmerge__status-fb,.fbmerge.fbmerge--loading.fbmerge--step1 .fbmerge__status-lj{width:0;height:0;border-width:0}.fbmerge.fbmerge--step1 .fbmerge__status-lj{-webkit-transition:ease .7s;transition:ease .7s;-webkit-transition-property:border,bottom,left,width,height;transition-property:border,bottom,left,width,height}.fbmerge.fbmerge--step1 .fbmerge__status-fb{-webkit-transition-delay:.3s;transition-delay:.3s}.fbmerge.fbmerge--step2:not(.fbmerge--loading) .fbmerge__elem--step2{display:block}.fbmerge.fbmerge--step2 .fbmerge__status-lj{border-right-color:#008CC1;border-bottom-color:#008CC1;border-left-color:#008CC1}.fbmerge.fbmerge--step2 .fbmerge__container input,.fbmerge.fbmerge--step3 .fbmerge__container input{display:block;border-width:0;border-bottom:1px solid #979797;width:100%;font-size:14px;line-height:17px;font-weight:700;color:#00A2D7;outline:0}.fbmerge.fbmerge--step2 .fbmerge__container .fbmerge__container--error,.fbmerge.fbmerge--step3 .fbmerge__container .fbmerge__container--error{color:#d20922}.fbmerge.fbmerge--step2 .fbmerge__container input+.fbmerge__container__label,.fbmerge.fbmerge--step3 .fbmerge__container input+.fbmerge__container__label{margin-top:25px}.fbmerge.fbmerge--step2 .fbmerge__container .fbmerge__container__label+input,.fbmerge.fbmerge--step3 .fbmerge__container .fbmerge__container__label+input{margin-top:5px}.fbmerge.fbmerge--step2 .fbmerge__container .flatbutton{margin-top:30px;margin-right:10px;min-width:140px}.fbmerge.fbmerge--step2 .fbmerge__container .fbmerge__container__flatbutton-facebook{margin-right:0;background:0 0;color:#4c4c4c;font-size:16px;padding-left:0;padding-top:0}.fbmerge.fbmerge--step2 .fbmerge__container .fbmerge__container__flatbutton-facebook span{width:30px;height:30px;display:inline-block;vertical-align:middle;border:2px solid #00b1ed;border-radius:50%;line-height:32px;box-sizing:border-box;margin-right:5px}.fbmerge__container__flatbutton-facebook .svgicon{height:16px;fill:#00b1ed}.fbmerge.fbmerge--step2 .fbmerge__container .fbmerge--step2__notice{font-size:10px;line-height:11px;display:block;margin-top:15px}.fbmerge.fbmerge--step3:not(.fbmerge--loading) .fbmerge__elem--step3{display:block}.fbmerge.fbmerge--step3 .fbmerge__status-lj{border-bottom-color:#008CC1;border-left-color:#008CC1}.fbmerge.fbmerge--step3 .fbmerge__container .fbmerge--step3__text{margin:0;font-size:14px;line-height:17px;font-weight:700}.fbmerge.fbmerge--step3 .fbmerge__container .flatbutton{min-width:140px;margin-bottom:10px}.fbmerge.fbmerge--step3 .fbmerge__input-wrapper{margin-bottom:0}.fbmerge.fbmerge--step4:not(.fbmerge--loading) .fbmerge__elem--step4{display:block}.fbmerge.fbmerge--step4 .fbmerge__status-lj{border-left-color:#008CC1}.fbmerge.fbmerge--step4 .fbmerge__container .fbmerge__container__small-title{margin-top:49px;width:265px}.fbmerge.fbmerge--step4 .fbmerge__container .flatbutton{display:block;margin-top:21px;width:140px;border-color:#00B1ED;color:#00B1ED}.fbmerge.fbmerge--step4 .fbmerge--step4__options{margin:18px 0 0;padding:0;list-style:none;line-height:40px;font-size:0}.fbmerge.fbmerge--step4 .fbmerge--step4__option{position:relative;padding-left:40px;height:30px}.fbmerge.fbmerge--step4 .fbmerge--step4__option+.fbmerge--step4__option{margin-top:11px}.fbmerge.fbmerge--step4 .fbmerge--step4__option input{display:none}.fbmerge.fbmerge--step4 .fbmerge--step4__option .fbmerge--step4__option-label{display:inline-block;font-size:14px;line-height:15px;max-height:30px;cursor:pointer}.fbmerge.fbmerge--step5:not(.fbmerge--loading) .fbmerge__elem--step5,.fbmerge.fbmerge--step6:not(.fbmerge--loading) .fbmerge__elem--step6{display:block}.fbmerge.fbmerge--step4 .fbmerge--step4__option input+.fbmerge--step4__option-label::before{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);border:2px solid #C3D3D9;width:27px;height:27px;border-radius:50%;background-color:#FFF;vertical-align:middle;content:\'\'}.fbmerge.fbmerge--step4 .fbmerge--step4__option input:checked+.fbmerge--step4__option-label::before{border-color:#00B1ED;background-image:url(\'data:image/svg+xml;charset=UTF-8, %3Csvg%20width%3D%2214px%22%20height%3D%2210px%22%20viewBox%3D%220%200%2014%2010%22%20version%3D%221.1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%3E%3Cg%20id%3D%22Group-2%22%20transform%3D%22translate%28-469.000000%2C%20-152.000000%29%22%20fill%3D%22none%22%20stroke-width%3D%222%22%3E%3Cpolyline%20points%3D%22471%20156.648053%20474.882762%20160%20480.961931%20154%22%20stroke%3D%22%2300B2ED%22%3E%3C/polyline%3E%3C/g%3E%3C/svg%3E\');background-position:50% 50%;background-repeat:no-repeat}.fbmerge.fbmerge--step4 .fbmerge--step4__option+.fbmerge--step4__option:last-child{margin-top:30px}.fbmerge.fbmerge--step5 .fbmerge__status-fb{background-color:#FFF;box-shadow:0 0 0 7px #00B1ED inset}.modal.fbmerge.fbmerge--step5 .fbmerge__status-fb .fbmerge__status__img path{fill:#00B1ED}.fbmerge.fbmerge--step5 .fbmerge__descr .fbmerge--step5__text{margin:13px 0 0;font-size:16px;line-height:18px}.fbmerge.fbmerge--step6 .fbmerge__status-fb{display:none}.fbmerge.fbmerge--step6 .fbmerge__status-lj{left:465px;bottom:60px;width:224px;height:224px;box-shadow:0 0 0 8px #00B1ED inset,0 0 0 11px #fff inset,0 0 0 21px #00B1ED inset;-webkit-transition:ease .5s;transition:ease .5s;-webkit-transition-property:left,bottom,width,height;transition-property:left,bottom,width,height}.fbmerge.fbmerge--step6 .fbmerge__status-lj .fbmerge__status__img{width:100px;height:100px;-webkit-transition:ease .5s;transition:ease .5s;-webkit-transition-property:width,height,top,left;transition-property:width,height,top,left}@media (max-width:850px){.fbmerge{width:660px}.fbmerge .fbmerge__status-fb{left:320px}.fbmerge .fbmerge__status-lj{left:441px}.fbmerge .fbmerge__title{margin:36px 0 0;width:253px}.fbmerge .fbmerge__sharing__item{margin-right:15px}.fbmerge .fbmerge__sharing__item:last-child{margin-right:0}.fbmerge .fbmerge__sharing__item+.fbmerge__sharing__item{margin-left:0}.fbmerge.fbmerge--step6 .fbmerge__status-lj{left:400px}}@media (max-width:767px){.fbmerge .fbmerge__status-lj,.fbmerge.fbmerge--need-action .fbmerge__status,.fbmerge__status-fb{display:none}.fbmerge{width:320px;height:auto;min-height:1px;padding-bottom:30px;top:70px;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);overflow:hidden}.fbmerge .fbmerge__descr{width:100%;position:relative;background-color:#00b1ed;height:auto;min-height:1px;padding:20px}.fbmerge .fbmerge__title{width:auto;margin:0;font-size:23px;line-height:28px}.fbmerge .fbmerge__sharing{position:relative;left:auto;bottom:auto;padding:0 20px}.fbmerge .fbmerge__sharing__text{width:auto}.fbmerge .fbmerge__container{width:100%;height:auto;min-height:1px;margin:0;padding:20px 20px 0}.fbmerge .fbmerge__container .fbmerge__notice{margin:5px 0 10px}.fbmerge .modal__close{-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7);top:10px;right:10px;z-index:100}.fbmerge .modal__close::after,.fbmerge .modal__close::before{background-color:#fff}.fbmerge__elem--step1{text-align:center}.fbmerge.fbmerge--step1 .fbmerge__title{text-align:left;margin-top:25px}.fbmerge.fbmerge--step1 .fbmerge__descr .fbmerge--step1__link-wrapper,.fbmerge.fbmerge--step1 .fbmerge__descr .flatbutton{display:inline-block}.fbmerge.fbmerge--step2 .fbmerge__container .fbmerge__container__flatbutton-facebook{padding:0}.fbmerge.fbmerge--step2 .fbmerge__container .flatbutton{display:block;margin:30px auto 0}.fbmerge.fbmerge--step2 .fbmerge__container .flatbutton:last-child{padding:0;margin-top:15px}.fbmerge.fbmerge--step3 .fbmerge__container .flatbutton{display:block;margin:25px auto 15px;max-width:150px}.fbmerge.fbmerge--step4 .fbmerge__container .flatbutton{margin:25px auto 0}.fbmerge.fbmerge--step4 .fbmerge__container .fbmerge__container__small-title{margin-top:30px}.fbmerge.fbmerge--step2 .fbmerge__container .fbmerge__container__label:first-child,.fbmerge.fbmerge--step3 .fbmerge__container .fbmerge--step3__text:first-child,.fbmerge.fbmerge--step3 .fbmerge__container .fbmerge__container__label:first-child{padding-top:20px}.fbmerge.fbmerge--step2 .fbmerge__sharing,.fbmerge.fbmerge--step3 .fbmerge__sharing,.fbmerge.fbmerge--step4 .fbmerge__sharing{display:none}}\n/* <<< file end: stc/widgets/facebookmigration.css */\n\n/*# sourceMappingURL=facebookmigration.css.map */\n'); //= require_ml fbmerging.step1.description.title //= require_ml fbmerging.step1.description.agreement //= require_ml fbmerging.step1.description.refusing //= require_ml fbmerging.step2.description.title //= require_ml fbmerging.step3.description.title //= require_ml fbmerging.step3.description.title2 //= require_ml fbmerging.step4.description.title //= require_ml fbmerging.step5.description.title //= require_ml fbmerging.step5.description.text //= require_ml fbmerging.step6.description.title //= require_ml fbmerging.sharing.title //= require_ml fbmerging.step2.form.login //= require_ml fbmerging.step2.form.password //= require_ml fbmerging.step2.form.entry //= require_ml /login.bml.connect.facebook //= require_ml fbmerging.step2.form.notice //= require_ml fbmerging.step3.form.text //= require_ml fbmerging.step3.form.allow //= require_ml fbmerging.step2.form.login //= require_ml fbmerging.step3.form.mail //= require_ml fbmerging.step3.form.convert_but //= require_ml fbmerging.step3.form.user_password //= require_ml fbmerging.step4.form.title //= require_ml fbmerging.step4.form.week //= require_ml fbmerging.step4.form.mounth //= require_ml fbmerging.step4.form.halfyear //= require_ml fbmerging.step4.form.all //= require_ml fbmerging.step4.form.nothing //= require_ml fbmerging.step4.form.autoimport //= require_ml fbmerging.step4.form.save //= require_ml createaccount.tip.username //= require_ml createaccount.tip.email //= require_ml createaccount.error.username.inuse //= require_ml createaccount.error.password.digits_only !function(o){return o}(),function(){"use strict";function o(o,e,n,i,t,a){var r=this,c=Math.floor(Date.now()/1e3);r.hidden=!1,r.step=3,r.addr=o.addr,r.login=o.user,r.mail=o.mail,r.gender=o.gender,r.needEmailConfirm=o.needEmailConfirm,r.loginLink=o.loginLink,r.facebookLink=o.facebookLink,r.fbLoginTitle=LJ.ml("/login.bml.connect.facebook"),r.autoImport=!0,r.week=c-604800,r.month=c-2592e3,r.halfYear=c-15552e3,r.period=r.month,r.hide=function(){r.hidden=!0,i.set(t,1,a)},r.importStep=function(){r.loading=!0,e(function(){r.step++,r.loading=!1},700)},r.setPeriod=function(){r.loading=!0,e(function(){r.step++,r.loading=!1},1e3)},r.convertIdentity=function(o){o.preventDefault(),r.loading=!0,e(function(){r.step++,r.loading=!1},1e3)}}function e(e,n,i,t){function a(o,a){return i.get(t)?void a.remove():void a.html(e(n.get("facebook_migration.tmpl"))(o))}return{scope:{step:"=facebookMigrationStep",addr:"@facebookMigrationAddr",user:"@facebookMigrationUser",mail:"@facebookMigrationMail",gender:"@facebookMigrationGender",needEmailConfirm:"=facebookMigrationNeedEmailConfirm",loginLink:"@facebookMigrationLoginLink",facebookLink:"@facebookMigrationFacebookLink"},controllerAs:"migration",controller:o,link:a}}angular.module("Migration.Facebook",["LJ.Api","LJ.Storage"]),angular.module("Migration.Facebook").constant("MIGRATION_STORAGE_NAME","facebookMigrationStatus").constant("MIGRATION_STORAGE_PERIOD",18e4).directive("facebookMigration",e).controller("migrationController",o),o.$inject=["$scope","$timeout","Api","expirableLocalStorage","MIGRATION_STORAGE_NAME","MIGRATION_STORAGE_PERIOD"],e.$inject=["$compile","$templateCache","expirableLocalStorage","MIGRATION_STORAGE_NAME"],angular.element(document).ready(function(){angular.bootstrap("[facebook-migration]",["Migration.Facebook"])})}(); /* <<< file end: js/facebookMigration/migration.js */ //# map link was there [migration.js.map] /* >>> file start: js/scheme/schemius.js */ //= require js/lib/jquery.selectric.min.js //= require js/captcha.js //= require js/scheme/schemius/feedback.js //= require js/notifications/main.js //= require js/facebookMigration/migration.js !function(e){return e}(),function(e){"use strict";function s(){function s(e){return!!(e.ctrlKey||e.metaKey&&LJ.Support.isMac)}function o(e){e&&(e.stopPropagation(),e.preventDefault()),x.removeClass(I),x.removeClass(v),d.removeClass(I),d.removeClass(v)}function n(s){s&&(s.preventDefault(),s.stopPropagation()),u(),LJ.Event.trigger("Messages:closeByMenus"),d.addClass(v),x.addClass(I),setTimeout(function(){e("#user").focus()},300)}function t(){d.hasClass(v)?o():n()}function a(e){e&&LJ.Api.call("lang.set",{lang:e},function(){location.reload()})}function i(s){g.toggleClass(y,s),s?e(".b-loginform-click-trap").removeClass("active"):(e(".b-loginform-click-trap").addClass("active"),e(".b-loginform").removeClass("openid-auth-state"))}var l,r,c,u,d,p,m,h,g,f,v,b,C,w,k,j,L,y,J=LJ.Flags.isEnabled("medius_schemius"),x=e(document.body),S=e(".s-header"),A=e(J?".js-header-search-input":".s-inline-search-input"),_=e(J?".js-header-search-button":".s-do-item-search-btn"),D="p-show-search",T=!1,I="p-loginform",E=e(J?".js-header-nav-lang":".s-nav-item-lang"),M="s-nav-item-lang-open",O=function(e){s(e)||(S.toggleClass(D),S.hasClass(D)&&(T=!0,setTimeout(function(){A.focus()},500)))};LJ&&LJ.Util&&LJ.Util.Action&&(LJ.Util.Action.login=n),_.on("click",O),A.on("click",function(){T=!0}),x.on("click",function(){T||(S.removeClass(D),E.removeClass(M)),T=!1}),x.on("gesturestart",function(s){(e("html").hasClass("p-nav-common-menu-open")||e("html").hasClass("p-nav-user-menu-open"))&&s.preventDefault()}),navigator.userAgent.match(/Trident/)&&navigator.userAgent.match(/rv[ :]11/)&&e("html").addClass("html-ie11"),navigator.appVersion.match(/MSIE\s10/)&&e("html").addClass("html-ie10"),d=e("html"),d.addClass(LJ.Support.isMobile()?"html-mobile":"html-desktop"),~navigator.userAgent.toLowerCase().indexOf("android")?d.addClass("html-android"):~navigator.userAgent.toLowerCase().indexOf("iphone")||~navigator.userAgent.toLowerCase().indexOf("ipad")?d.addClass("html-ios"):~navigator.userAgent.toLowerCase().indexOf("windows phone")&&d.addClass("html-wphone"),e("[data-lang]").on("click",function(){a(e(this).data("lang"))}),E.on("click",function(e){s(e)||(e.preventDefault(),E.toggleClass(M),T=E.hasClass(M))}),e(".s-lang-select").selectric({customClass:{prefix:"b-selectus",postfixes:"Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive Above Scroll",camelCase:!1,overwrite:!1}}).on("change",function(){a(e(this).val())}),e(".selectricus").selectric({customClass:{prefix:"b-selectus",postfixes:"Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive Above Scroll",camelCase:!1,overwrite:!1}}),e(".buy-promo__selectus").selectric({customClass:{prefix:"b-selectus",postfixes:"Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive Above Scroll",camelCase:!1,overwrite:!1}}),e(".b-message-mobile-close").one("click",function(){e(".b-message-mobile").hide()}),w=e(J?".js-header-nav-drop-master":".s-drop-master"),k=J?"s-header-nav-drop--open":"s-drop-open",j=LJ.Support.isMobile(),L=!1,j||(C=e(":lj-bubble"),w.on("mouseenter",function(){var s=e(this),o=300;L&&(clearTimeout(b),o=0),b=setTimeout(function(){w.removeClass(k),s.addClass(k),L=!0,C.bubble("hide")},o)}).on("mouseleave",function(){var s=e(this);return L?void(b=setTimeout(function(){s.removeClass(k),L=!1},500)):(clearTimeout(b),void s.removeClass(k))})),j&&(w.on("click",function(s){var o=e(this),n=0!==o.find("li").length,t=e(s.target).closest("span").is(".s-header-extra-menu-item-link-icon");"input"!==s.target.tagName.toLowerCase()&&(o.hasClass(k)||!n||t||s.preventDefault(),o.hasClass(k)||t||(L=!0,w.removeClass(k),s.stopPropagation(),e(":lj-bubble").bubble("hide")),o.toggleClass(k))}),x.on("click",function(s){var o=0===e(s.target).closest(w).length,n=e(s.target).is(".b-popup");n&&(s.stopPropagation(),e(":lj-bubble").bubble("hide")),L&&o&&(L=!1,w.removeClass(k),s.preventDefault())}),LJ.Support.isMobile&&LJ.Support.browser.safari&&x.addClass("iphone"),e(".l-flatslide-menu-active, .l-flatslide-menu-expander").click(function(s){s.preventDefault(),e(this).closest(".l-flatslide-menu").toggleClass("l-flatslide-menu-expanded")}),e(".s-header-search, .s-header-item-search__form").removeAttr("target")),d=e("html"),p=e(".s-body"),m=e(J?".js-header-menu-button":".s-nav-control-common"),h=e(J?".js-header-login":".s-nav-control-user, .s-nav-control-login"),f="p-nav-common-menu-open",v="p-nav-user-menu-open",m.on("click",function(){LJ.Event.trigger("Messages:closeByMenus"),d.toggleClass(f),o()}),h.on("click",t),u=function(){d.removeClass(f),d.removeClass(v)},p.on("click",function(){u(),o()}),e(".s-header-menu-head__drop").click(function(){var s=e(this).closest(".s-header-menu-drop"),o=s.find(".s-header-menu-list-sub"),n="s-header-menu-drop--open";if(s.is("."+n))o.css("max-height","");else{var t=o.children().toArray().reduce(function(s,o){return s+e(o).height()},0);o.css("max-height",t)}s.toggleClass(n)}),e(J?".js-header-login":".s-nav-item-login").on("click",n),e(".b-loginform-close").on("click",o),e(document).on("keyup",function(e){"Escape"!==e.key&&27!==e.keyCode||o(e)}),e(".b-fader").on("click",o),g=e(".b-loginform-body > .b-loginform-field"),y="active",J?e(".lj-openid-auth-button").on("click",function(s){s.preventDefault(),i(!1),e(".b-loginform").addClass("openid-auth-state")}):e(".lj-openid-auth-button").on("click",function(s){s.preventDefault(),e(".b-loginform").toggleClass("openid-auth-state"),e(".b-loginform").hasClass("openid-auth-state")?e("#openid").focus():e("#user").focus()}),J&&(e(".js-login-close").on("click",function(e){i(!1),o(e)}),e(".b-loginform-click-trap").on("click",function(){return i(!0)}),e(".b-loginform-toggle-link").on("click",function(){return i(!1)}),LJ.Flags.isEnabled("notification_center")&&angular.bootstrap(J?".js-header-notifications":".mds-do",["Notifications"])),LJ.Event.on("userpic.changed",function(s){e(".s-userpic").css("backgroundImage","url("+s+")")}),!LJ.Flags.isEnabled("ljwelcomevideo")||j||LJ.get("remote")||LJ.Cookie.get("welcome_ljvideo")||0!==LJ.get("remote_is_sup")||e(".appwidget-login").length||LJ.injectScript("http://www.youtube.com/player_api").then(function(){function s(e){0!==e.data&&2!==e.data||n.addClass("s-ljvideo-end"),1===e.data&&n.removeClass("s-ljvideo-end")}var o,n=e(".s-ljvideo");x.addClass("p-ljvideo"),window.onYouTubePlayerAPIReady=function(){o=new window.YT.Player("s-ljvideo-player",{width:"640",height:"360",videoId:"wq0YmQ4xIeU",playerVars:{rel:0},events:{onStateChange:s}})},e(".b-fader, .s-ljvideo-close").on("click",function(){x.hasClass("p-ljvideo")&&(x.removeClass("p-ljvideo"),o.destroy(),LJ.Cookie.setGlobal("welcome_ljvideo",1,{expires:14}))})}),c=e(".s-header .i-supus-new, .s-header-messages-count"),LJ.Event.on("message:count:change",function(e){e>0?(c.html(e),c.removeClass("s-header-messages-count-empty")):c.addClass("s-header-messages-count-empty")}),r=e(".flatquestion-nojs-friendsgroups"),l=e(".flatquestion-popup-field-showanswer"),e(".flatquestion-popup-select").on("change",function(){"custom"===e(this).val()?r.show():r.hide(),"public"===e(this).val()?l.show():l.hide()})}e(function(){0===e(".s-header").length?e("html").on("controlstrip-initialized",s):s()})}(jQuery); /* <<< file end: js/scheme/schemius.js */ //# map link was there [schemius.js.map] /* >>> file start: js/jquery/jquery.lj.journalPromoStrip.js */ !function(o,e){"use strict";o.widget("lj.journalPromoStrip",o.lj.basicWidget,{options:{selectors:{popupInfo:".journalpromo-popup-content-info",popupDelete:".journalpromo-popup-content-delete",button:"#journalpromo-popup-btn",iconClose:".b-journalpromo-actions-close",options:".b-journalpromo-header-options",promoItem:".b-journalpromo-item",iconDelete:".b-journalpromo-actions-delete",info:".journalpromo-popup-info-action",spinner:".journalpromo-popup-spinner",error:".journalpromo-popup-info-error",errorContent:".journalpromo-popup-info-error-content",ban:"#journalpromo-user-ban"},classNames:{iconInfo:".journalpromo-info-icon",iconDelete:".b-journalpromo-actions-delete",noPromo:"b-journalpromo-item-nopromotion"},template:"
    {subject} {ljuser}
    {body}
    "},_create:function(){var e=this;o.lj.basicWidget.prototype._create.apply(this),this._el("spinner"),this._el("info"),this._el("button"),this._el("iconClose"),this._el("error"),e._el("promoItem"),this._el("iconDelete"),this._el("popupDelete"),this._el("errorContent"),this._el("iconDelete")[0]&&(this._deleteBubble=this._popupDelete.bubble({target:this._cl("iconDelete"),showOn:"click"})),this._el("popupInfo").bubble({target:this._cl("iconInfo"),showOn:"hover",closeControl:!1,showDelay:500}),this._bindControls()},_toggleSpinner:function(o){this._spinner.toggle(o),this._info.toggle(!o)},_toggleError:function(o,e){this._error.toggle(o),this._info.toggle(!o),e&&this._errorContent.text(e)},_updateBlock:function(o){o.object[0].object_url?this._promoItem.html(this.options.template.supplant({rules_link:o.object[0].object_url,subject:o.object[0].subject,body:o.object[0].body,ljuser:o.object[0].ljuser_display})):this._promoItem.html(''+o.object[0].body+"").addClass(this._cl("noPromo"))},_closeClick:function(){var o=this;return"#__debug"===location.hash?this._debug():(o._toggleSpinner(!0),void LJ.Api.call("journalpromo.admin_cancel",{object_url:o.options.url,user:Site.currentJournal,get_slot:1,ban_user:document.getElementById("journalpromo-user-ban").checked},function(e){if(o._toggleSpinner(!1),console.dir(e),e.error&&e.error.data&&e.error.data.entry)return o._updated=e.error.data.entry[0],o._toggleError(!0,e.error.message),void console.error(e.error.message);if(!e.error&&e.entry){var t=e.entry[0];if(!t||!t.object||!t.object[0])return void console.error("Wrong data",e);o._updateBlock(t),o._iconDelete.hide()}o._deleteBubble.bubble("hide")}))},_disableClick:function(){var o=this;LJ.Api.call("journalpromo.disable_promo_announce",{journal:LJ.get("currentJournal")},function(e){e.error||o.element.slideUp("fast")})},_bindControls:function(){var e=this;o.lj.basicWidget.prototype._bindControls.apply(this),this._button.on("click",this._closeClick.bind(this)),this._iconClose.on("click",this._disableClick.bind(this)),this._deleteBubble&&this._deleteBubble.bind("bubblehide",function(o){e._toggleError(!1),e._updated&&(e._updateBlock(e._updated),e._iconDelete.hide())})},_debug:function(){var o=this;o._toggleSpinner(!0),setTimeout(function(){o._toggleSpinner(!1),o._toggleError(!0,"Sample error")},1e3)}})}(jQuery,window); /* <<< file end: js/jquery/jquery.lj.journalPromoStrip.js */ //# map link was there [jquery.lj.journalPromoStrip.js.map] /* >>> file start: js/jquery/jquery.lj.inlineCalendar.js */ function _typeof(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}!function(t){function e(t,e){e=e||!1;var a=t.getDate().toString();1===a.length&&(a="0"+a),e&&(a="");var n=t.getMonth().toString();return 1===n.length&&(n="0"+n),parseInt(t.getFullYear().toString()+n+a,10)}function a(t,a){return e(a,!0)>=e(t[0],!0)&&e(a,!0)<=e(t[1],!0)}function n(a,n,i){this.initialize=function(t){this.tbody=this.catchTableStructure(t)},this.modelChanged=function(e,n,s){var o=i.longMonth?i.ml.monthNamesLong:i.ml.monthNamesShort;this.tbody.detach(),this.fillDates(e,n);for(var r in s)s.hasOwnProperty(r)&&a[r][s[r]?"removeClass":"addClass"](this.disabledStyle(r));var l=i.monthRef?t("",{href:LJ.Util.Date.format(e,i.monthRef),text:o[e.getMonth()]+(i.monthWithYear?" "+e.getFullYear():"")}):o[e.getMonth()],h=i.yearRef?t("",{href:LJ.Util.Date.format(e,i.yearRef),text:e.getFullYear()}):e.getFullYear();a.monthLabel.empty().append(l),a.yearLabel.empty().append(h),this.tbody.appendTo(a.table)},this.catchTableStructure=function(e){var n=a.tbody[0];a.daysCells=[],a.daysSpans=[];for(var i,s,o,r=n.rows.length,l=6-r,h="",d=0;7>d;++d)h+="";for(h+="";l-- >0;)t(h).hide().appendTo(a.tbody);for(r=6,a.lastRow=jQuery(n.rows[n.rows.length-1]),e=new Date(e),i=0;r>i;++i)for(s=0,o=n.rows[i].cells.length;o>s;++s){var c=jQuery(n.rows[i].cells[s]),u=c.children(),p=u.text().trim();p&&(e.setDate(p),c.data("isActive",!0),c.data("day",e)),a.daysCells.push(c),a.daysSpans.push(u)}return jQuery(n)},this.fillDates=function(t,e){function n(t){var a=t.getFullYear(),n=t.getMonth(),i=t.getDate();return e&&e[a]&&e[a][n]&&e[a][n][i]}var s=new Date(t);s.setDate(1);var o;o=i.startAtSunday?s.getDay():0===s.getDay()?6:s.getDay()-1,s.setDate(1-o);for(var r=0,l=a.daysCells.length;l>r;++r){var h=a.daysCells[r],d=a.daysSpans[r];this.formDayString(s,h,d,n(s),this.isActiveDate(s,t)),s.setDate(s.getDate()+1)}s.setDate(s.getDate()-1),s.getDate()<7?a.lastRow.css("display",""):a.lastRow.css("display","none")},this.isActiveDate=function(t,a){var n=!0;return n=a.getFullYear()===t.getFullYear()&&a.getMonth()===t.getMonth(),n&&(i.activeFrom||i.activeUntil)&&(n=i.activeFrom&&e(i.activeFrom)<=e(t)||i.activeUntil&&e(i.activeUntil)>=e(t)),n},this.formDayString=function(a,s,o,r,l){a=new Date(a);var h=e(a)===e(i.currentDate);if(s.data("day",a),s.data("isActive",l),s.data("hasEvents",r),s[h?"addClass":"removeClass"](n.current),s.removeClass(n.cellHover),l)if(r||i.allRefs){var d=!0;i.allRefs&&"object"===_typeof(i.allRefs)&&(i.allRefs.from&&ai.allRefs.to&&(d=!1)),d?(s.removeClass(n.inactive),o.html(t("",{html:a.getDate(),href:LJ.Util.Date.format(a,i.dayRef),target:"_self"}))):(s.removeClass(n.inactive),o.html(a.getDate()))}else s.removeClass(n.inactive),o.html(a.getDate());else s.addClass(n.inactive),o.html(a.getDate())},this.disabledStyle=function(t){return"prevMonth"===t||"prevYear"===t?n.prevDisabled:n.nextDisabled}}var i={dayRef:"/%Y/%M/%D",monthRef:"",yearRef:"",allRefs:!1,currentDate:new Date,activeUntil:null,activeFrom:null,startMonth:new Date(1900,0,1),endMonth:new Date(2050,0,1),startAtSunday:"0"===LJ.ml("date.format.offset")||!1,dateFormat:"%Y-%M-%D",defaultTitle:"Calendar",longMonth:!1,events:null,displayedMonth:null,dateChange:null,selectors:{table:"table",title:"h5",tbody:"tbody",month:".cal-nav-month",year:".cal-nav-year",monthSelect:".cal-nav-month-select",yearSelect:".cal-nav-year-select",prevMonth:".cal-nav-month .cal-nav-prev",nextMonth:".cal-nav-month .cal-nav-next",prevYear:".cal-nav-year .cal-nav-prev",nextYear:".cal-nav-year .cal-nav-next",monthLabel:".cal-nav-month .cal-month",yearLabel:".cal-nav-year .cal-year"},classNames:{container:"",inactive:"other",future:"other",current:"current",weekend:"weekend",nextDisabled:"cal-nav-next-dis",prevDisabled:"cal-nav-prev-dis",cellHover:"hover",longMonth:"sidebar-cal-longmonth"},mlPrefix:{monthNamesShort:["monthNames","date.month.{name}.short"],monthNamesLong:["monthNames","date.month.{name}.long"],dayNamesShort:["dayNames","date.day.{name}.short"]},ml:{monthNames:["january","february","march","april","may","june","july","august","september","october","november","december"],dayNames:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],caption:"Calendar"}},s={options:{},_create:function(){this._preInit(),this._initialize(),this._postInit()},_preInit:function(){var e=t[this.namespace][this.widgetName].getDefaults();this.options=jQuery.extend(!0,{},e,this.options),this._prepareMLVars()},_prepareMLVars:function(){var t,e=function(t,e){return LJ.ml(t.supplant({name:e}))};for(var a in this.options.mlPrefix)this.options.mlPrefix.hasOwnProperty(a)&&(t=this.options.mlPrefix[a],this.options.ml[a]=this.options.ml[t[0]].map(e.bind(null,t[1])))},_initialize:function(){this.options.displayedMonth||(this.options.displayedMonth=new Date(this.options.currentDate)),this._events=this.options.events,this._hideTimer=null,this._nodes=this._nodes||{container:this.element,root:this.element},this._invalidateTimer=null,this.element.hasClass(this.options.classNames.longMonth)&&(this.options.longMonth=!0),this._bindNodes(),this.options.startMonth.setDate(1),this._view=new(this._getView())(this._nodes,this.options.classNames,this.options),this._view.initialize(this.options.currentDate),this._nodes.table.hasClass("monday")&&this._setOption("startAtSunday",!1),this._nodes.monthSelect.val(this.options.displayedMonth.getMonth()),this._nodes.yearSelect.val(this.options.displayedMonth.getFullYear()),this._bindEvents()},_postInit:function(){},_getView:function(){return n},_bindNodes:function(){for(var t in this.options.selectors)!this.options.selectors.hasOwnProperty(t)||t in this._nodes||(this._nodes[t]=this._nodes.container.find(this.options.selectors[t]));var e=LJ.Util.Date.parse(this._nodes.table.attr("data-date"),this.options.dateFormat);e&&(this.options.displayedMonth=e)},destroy:function(){t.Widget.prototype.destroy.apply(this,arguments)},_bindEvents:function(){var e=this,a=this._getSwitcherStates(this.options.currentDate),n=function(t){return function(a){a.preventDefault(),a.stopPropagation();var n=e._getSwitcherStates(e.options.currentDate);n[t]&&e["_"+t]()}};for(var i in a)a.hasOwnProperty(i)&&this._nodes[i].click(n(i));this._nodes.monthSelect.change(function(){var t=new Date(e.options.currentDate);t.setMonth(this.value),e._setOption("currentDate",t)}),this._nodes.yearSelect.change(function(){var t=new Date(e.options.currentDate);t.setFullYear(this.value),e._setOption("currentDate",t)}),this._nodes.tbody.delegate("td","click",function(a){e._cellSelectedEvent(t(this),a)})},_switchMonth:function(t){var e=jQuery.Event("dateChange");e.moveForward=t>0,e.switchType=12===Math.abs(t)?"year":1===Math.abs(t)?"month":null,e.date=new Date(this.options.displayedMonth.getFullYear(),this.options.displayedMonth.getMonth()+t,1),this._nodes.root.trigger(e),this._setOption("displayedMonth",e.date)},_prevMonth:function(){this._switchMonth(-1)},_nextMonth:function(){this._switchMonth(1)},_prevYear:function(){this._switchMonth(-12)},_nextYear:function(){this._switchMonth(12)},_cellSelectedEvent:function(t,e){(!t.data("isActive")||this._cellSelected(t.data("day")))&&(e.stopPropagation(),e.preventDefault())},_cellSelected:function(t){var e=jQuery.Event("daySelected");return this._nodes.root.trigger(e,[t,LJ.Util.Date.format(t,this.options.dateFormat)]),e.isDefaultPrevented()||this._setOption("currentDate",t),!e.isDefaultPrevented()},_fitDate:function(t){t=new Date(t);var n=[this.options.startMonth,this.options.endMonth];return a(n,t)||(t=e(t,!0)>> file start: js/jquery/jquery.lj.calendar.js */ //= require js/jquery/jquery.lj.inlineCalendar.js !function(e,t){var n,s={showOn:"click",closeControl:!0,showCellHovers:!1,hoverDelay:400,align:"center",events:null,displayedMonth:null,bubbleClass:!1,selectors:{tmpl:".appwidget-calendar .calendar"},classNames:{showCellHovers:"all-days",popup:"b-bubble-calendar"},templates:{calendar:''}},a={options:{},_initialize:function(){n||(n=this._buildDOM()),this._nodes={container:n.clone(),root:this.element},e.lj.inlineCalendar.prototype._initialize.apply(this),this._invalidateDisplay()},_bindNodes:function(){e.lj.inlineCalendar.prototype._bindNodes.apply(this);var t=this;this._nodes.container.bubble({classNames:{containerAddClass:this.options.bubbleClass?this.options.classNames.popup:""},target:this._nodes.root,align:this.options.align,closeControl:this.options.closeControl,showOn:this.options.showOn,closeOnContentClick:!1}).bind("bubbleshow",function(e){t._nodes.container.bubble("setPreventHide",!0),setTimeout(function(){t._nodes.container.bubble("setPreventHide",!1)},300),t._trigger("show")}).bind("bubblehide",function(e){t._trigger("hide")}).addClass(this.options.classNames.container),this.options.input?this._nodes.input=this.options.input:this._nodes.root.is("[type=text]")?this._nodes.input=this._nodes.root:this._nodes.input=e(),this._nodes.input.mask&&this._nodes.input.mask("?dddd-dd-dd",{placeholder:" "}),this._nodes.input.input(this._parseInputValue.bind(this));var n=LJ.Util.Date.parse(this._nodes.input.val(),this.options.dateFormat);n&&(this.options.currentDate=n),this.options.showCellHovers&&this._nodes.table.addClass(this.options.classNames.showCellHovers)},destroy:function(){this._nodes.container.bubble("destroy"),e.lj.inlineCalendar.prototype.destroy.apply(this)},_buildDOM:function(){var e=this.options.ml.dayNamesShort.map(function(e){return{day:e}}),t=0,n=6,s=function(e,t){for(var n=[];e--;)n.push(t);return n};this.options.startAtSunday||(e[7]=e[0],e.shift(),t=5);for(var a=[],i=[],l=this.options.endMonth.getFullYear(),o=this.options.startMonth.getFullYear();l>=o;)a.push({year:l--});i=this.options.ml.monthNamesLong.map(function(e){return{month:e}});var d={caption:this.options.ml.caption,days:e,months:i,years:a,cells:s(42,{}),weekend1:t,weekend2:n};return-1!==this.options.templates.calendar.indexOf(" ")?jQuery.tmpl(this.options.templates.calendar,d):LJ.UI.template(this.options.templates.calendar,d)},_parseInputValue:function(){var e=LJ.Util.Date.parse(this._nodes.input.val(),this.options.dateFormat);e&&this._cellSelected(e)},_cellSelectedEvent:function(n,s){var a=this;e.lj.inlineCalendar.prototype._cellSelectedEvent.call(this,n,s),a.options.showCellHovers&&n.data("isActive")&&a._nodes.container.bubble("hide"),"a"==s.target.tagName.toLowerCase()&&(t.location.href=s.target.href)},_invalidateDisplay:function(){this._view.modelChanged(this.options.displayedMonth,this._events,this._getSwitcherStates())},_setOption:function(t,n){switch(e.lj.inlineCalendar.prototype._setOption.call(this,t,n),t){case"currentDate":this._nodes.input.val(LJ.Util.Date.format(this.options.currentDate,this.options.dateFormat))}}};e.widget("lj.calendar",e.lj.inlineCalendar,a),jQuery.extend(e.lj.calendar,{getDefaults:function(){return jQuery.extend(!0,{},e.lj.inlineCalendar.getDefaults(),s)},setDefaults:function(e){e&&jQuery.extend(s,e)}})}(jQuery,window); /* <<< file end: js/jquery/jquery.lj.calendar.js */ //# map link was there [jquery.lj.calendar.js.map] /* >>> file start: js/jquery/jquery.mask.js */ !function(t){var e=(t.browser.msie?"paste":"input")+".mask",n=void 0!=window.orientation;t.mask={definitions:{d:"[0-9]",w:"[A-Za-z]","*":"[A-Za-z0-9а-яА-Я]"}},t.fn.extend({unmask:function(){return this.trigger("unmask")},mask:function(a,r){if(!a&&this.length>0){var i=t(this[0]),o=i.data("tests");return t.map(i.data("buffer"),function(t,e){return o[e]?t:null}).join("")}r=t.extend({placeholder:"_",completed:null},r);var u=t.mask.definitions,o=[],l=a.length,f=null,s=a.length;return t.each(a.split(""),function(t,e){"?"==e?(s--,l=t):u[e]?(o.push(new RegExp(u[e])),null==f&&(f=o.length-1)):o.push(null)}),this.each(function(){function i(t){for(;++t<=s&&!o[t];);return t}function c(t){for(;!o[t]&&--t>=0;);for(var e=t;s>e;e++)if(o[e]){g[e]=r.placeholder;var n=i(e);if(!(s>n&&o[e].test(g[n])))break;g[e]=g[n]}k(),b.caret(Math.max(f,t))}function d(t){for(var e=t,n=r.placeholder;s>e;e++)if(o[e]){var a=i(e),u=g[e];if(g[e]=n,!(s>a&&o[a].test(u)))break;n=u}}function h(e){var a=t(this).caret(),r=e.keyCode;return y=16>r||r>16&&32>r||r>32&&41>r,a.start-a.end==0||y&&8!=r&&46!=r||m(a.start,a.end),8==r||46==r||n&&127==r?(c(a.start+(46==r?0:-1)),!1):27==r?(b.val(w),b.caret(0,p()),!1):void 0}function v(e){if(y)return y=!1,8==e.keyCode?!1:null;e=e||window.event;var n=e.charCode||e.keyCode||e.which,a=t(this).caret();if(e.ctrlKey||e.altKey||e.metaKey)return!0;if(n>=32&&125>=n||n>186){var u=i(a.start-1);if(s>u){var l=String.fromCharCode(n);if(o[u].test(l)){d(u),g[u]=l,k();var a=i(u);t(this).caret(a),r.completed&&a==s&&r.completed.call(b)}}}return!1}function m(t,e){for(var n=t;e>n&&s>n;n++)o[n]&&(g[n]=r.placeholder)}function k(){return b.val(g.join("")).val()}function p(t){for(var e=b.val(),n=-1,a=0,i=0;s>a;a++)if(o[a]){for(g[a]=r.placeholder;i++e.length)break}else g[a]==e.charAt(i)&&a!=l&&(i++,n=a);return!t&&l>n+1?(b.val(""),m(0,s)):(t||n+1>=l)&&(k(),t||b.val(b.val().substring(0,n+1))),l?a:f}var b=t(this),g=t.map(a.split(""),function(t,e){return"?"!=t?u[t]?r.placeholder:t:void 0}),y=!1,w=b.val();b.data("buffer",g).data("tests",o),b.attr("readonly")||b.one("unmask",function(){b.unbind(".mask").removeData("buffer").removeData("tests")}).bind("focus.mask",function(){w=b.val();var t=p();k(),setTimeout(function(){t==a.length?b.caret(0,t):b.caret(t)},0)}).bind("blur.mask",function(){p(),b.val()!=w&&b.change()}).bind("keydown.mask",h).bind("keypress.mask",v).bind(e,function(){setTimeout(function(){b.caret(p(!0))},0)}),p()})}})}(jQuery); /* <<< file end: js/jquery/jquery.mask.js */ //# map link was there [jquery.mask.js.map] /* >>> file start: js/scheme/medius.js */ //= require js/widgets/angular/mediusSubscribe.js //= require js/core/angular/api.js !function(){"use strict";angular.element(document).ready(function(){if(0!==angular.element(".mdsfooter").length){var e=angular.element(".mdsfooter").find("[medius-subscribe]");angular.bootstrap(e,["Medius.Subscribe"])}})}(); /* <<< file end: js/scheme/medius.js */ //# map link was there [medius.js.map] /* >>> file start: js/core/angular/radioGroup.js */ !function(t){return t}(),function(){"use strict";function t(){function t(){this._models={}}function o(o){return e[o]?e[o]:(e[o]=new t,e[o])}var e={};return t.prototype.models=function(){return this._models},t.prototype.reset=function(){var t,o=this._models;for(t in o)o.hasOwnProperty(t)&&o[t]&&(this._models[t]=!1);return this},t.prototype.set=function(t,o){return o?this.reset()._models[t]=!0:this._models[t]=!1,this},t.prototype.on=function(t){return this.set(t,!0)},t.prototype.off=function(t){return"undefined"==typeof t?this.reset():this.set(t,!1),this},t.prototype.toggle=function(t){this._models[t]?this.off(t):this.on(t)},o}angular.module("LJ.RadioGroup",[]),angular.module("LJ.RadioGroup").factory("radioGroup",t)}(); /* <<< file end: js/core/angular/radioGroup.js */ //# map link was there [radioGroup.js.map] /* >>> file start: js/node_modules/angular-sanitize/angular-sanitize.js */ !function(e,t,r){"use strict";function n(){this.$get=["$$sanitizeUri",function(e){return function(t){var r=[];return i(t,l(r,function(t,r){return!/^unsafe/.test(e(t,r))})),r.join("")}}]}function a(e){var r=[],n=l(r,t.noop);return n.chars(e),r.join("")}function s(e){var t,r={},n=e.split(",");for(t=0;t=0&&w[s]!=n;s--);if(s>=0){for(a=w.length-1;a>=s;a--)r.end&&r.end(w[a]);w.length=s}}"string"!=typeof e&&(e=null===e||"undefined"==typeof e?"":""+e);var s,i,c,l,w=[],x=e;for(w.last=function(){return w[w.length-1]};e;){if(l="",i=!0,w.last()&&D[w.last()]?(e=e.replace(new RegExp("(.*)<\\s*\\/\\s*"+w.last()+"[^>]*>","i"),function(e,t){return t=t.replace(b,"$1").replace(v,"$1"),r.chars&&r.chars(o(t)),""}),a("",w.last())):(0===e.indexOf("",s)===s&&(r.comment&&r.comment(e.substring(4,s)),e=e.substring(s+3),i=!1)):m.test(e)?(c=e.match(m),c&&(e=e.replace(c[0],""),i=!1)):d.test(e)?(c=e.match(f),c&&(e=e.substring(c[0].length),c[0].replace(f,a),i=!1)):g.test(e)&&(c=e.match(p),c?(c[4]&&(e=e.substring(c[0].length),c[0].replace(p,n)),i=!1):(l+="<",e=e.substring(1))),i&&(s=e.indexOf("<"),l+=0>s?e:e.substring(0,s),e=0>s?"":e.substring(s),r.chars&&r.chars(o(l)))),e==x)throw u("badparse","The sanitizer was unable to parse the following block of html: {0}",e);x=e}a()}function o(e){if(!e)return"";var t=S.exec(e),r=t[1],n=t[3],a=t[2];return a&&(T.innerHTML=a.replace(//g,">")}function l(e,r){var n=!1,a=t.bind(e,e.push);return{start:function(e,s,i){e=t.lowercase(e),!n&&D[e]&&(n=e),n||E[e]!==!0||(a("<"),a(e),t.forEach(s,function(n,s){var i=t.lowercase(s),o="img"===e&&"src"===i||"background"===i;O[i]!==!0||F[i]===!0&&!r(n,o)||(a(" "),a(s),a('="'),a(c(n)),a('"'))}),a(i?"/>":">"))},end:function(e){e=t.lowercase(e),n||E[e]!==!0||(a("")),e==n&&(n=!1)},chars:function(e){n||a(c(e))}}}var u=t.$$minErr("$sanitize"),p=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,f=/^<\/\s*([\w:-]+)[^>]*>/,h=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,g=/^/g,m=/]*?)>/i,v=//g,w=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,x=/([^\#-~| |!])/g,$=s("area,br,col,hr,img,wbr"),z=s("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),y=s("rp,rt"),k=t.extend({},y,z),C=t.extend({},z,s("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),A=t.extend({},y,s("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),D=s("script,style"),E=t.extend({},$,C,A,k),F=s("background,cite,href,longdesc,src,usemap"),O=t.extend({},F,s("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width")),T=document.createElement("pre"),S=/^(\s*)([\s\S]*?)(\s*)$/;t.module("ngSanitize",[]).provider("$sanitize",n),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var r=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"]/,n=/^mailto:/;return function(s,i){function o(e){e&&h.push(a(e))}function c(e,r){h.push("'),o(r),h.push("")}if(!s)return s;for(var l,u,p,f=s,h=[];l=f.match(r);)u=l[0],l[2]==l[3]&&(u="mailto:"+u),p=l.index,o(f.substr(0,p)),c(u,l[0].replace(n,"")),f=f.substring(p+l[0].length);return o(f),e(h.join(""))}}])}(window,window.angular); /* <<< file end: js/node_modules/angular-sanitize/angular-sanitize.js */ //# map link was there [angular-sanitize.js.map] /* >>> file start: js/widgets/discoverytimes.js */ //= require js/core/angular/radioGroup.js //= require js/node_modules/angular-sanitize/angular-sanitize.js //= require js/core/angular/api.js //= require js/core/angular/users.js //= require js/core/angular/ljUser.js !function(){"use strict";function e(){var e=angular.element(".b-discoverytimes-wrapper[lj-discovery-times]");e.injector()||angular.bootstrap(e,["LJ.DiscoveryTimes"])}function i(){function e(e,i){i.removeAttr("lj-discovery-times")}return{scope:!0,link:e,controller:n,controllerAs:"times"}}function n(e,i,n,t,o,m){function r(){f+=1,f>=d.items.length&&(f=0),l.on(d.items[f].itemid)}function s(){0!==d.items.length&&(r(),c=i(r,a),e.$on("$destroy",i.cancel.bind(i,c)))}var c,d=this,u=LJ.Flags.isEnabled("medius_ui")?m:o,l=n("active"),a=5e3,f=-1;d.items=[],d.active=l.reset().models(),d.isRecommend=!1,d.showRecommend=!1,d.showRandom=!1,d.close=function(){},d.recommend=function(){u.setRecommend().then(function(){d.isRecommend=u.isRecommend})},u.getRecommend().then(function(){d.showRecommend=u.showRecommend,d.showRandom=!d.showRecommend,d.isRecommend=u.isRecommend}),u.getFeed().then(function(e){d.items=e.items.filter(Boolean),t.Cache.add(d.items.map(LJ.Function.get("user")))}).then(s)}function t(e){function i(){return m.limit=m.itemshow,m.is_published=!0,e.call("medius.get_public_items",m).then(n)}function n(e){return e.items=e.items.filter(function(e){return e.author}).map(function(e){return e.itemid=e.jitem_id,e.url=e.link,e.subject=e.title,e}),e}function t(){return s.showRecommend?e.call("discovery.is_recommend",r).then(function(e){"ok"===e.status&&(s.isRecommend=e.is_recommend)}):Promise.resolve()}function o(){return s.showRecommend?e.call("discovery.recommend",r).then(function(e){"ok"===e.status&&(s.isRecommend=!0)}):Promise.resolve()}var m={itemshow:10},r={entry:Boolean(LJ.get("entry")),remoteid:LJ.get("remote.id"),journalid:LJ.get("journal.id"),publicEntry:LJ.get("entry.is_public"),ditemid:LJ.get("entry.ditemid")},s={getFeed:i,isRecomend:!1,getRecommend:t,setRecommend:o,showRecommend:!1};return s}function o(e){function i(){return e.call("discovery.get_feed",o)}function n(){return r.showRecommend?e.call("discovery.is_recommend",m).then(function(e){"ok"===e.status&&(r.isRecommend=e.is_recommend)}):Promise.resolve()}function t(){return r.showRecommend?e.call("discovery.recommend",m).then(function(e){"ok"===e.status&&(r.isRecommend=!0)}):Promise.resolve()}var o={itemshow:10},m={entry:Boolean(LJ.get("entry")),remoteid:LJ.get("remote.id"),journalid:LJ.get("journal.id"),publicEntry:LJ.get("entry.is_public"),ditemid:LJ.get("entry.ditemid")},r={getFeed:i,isRecomend:!1,getRecommend:n,setRecommend:t,showRecommend:m.entry&&m.journalid&&m.remoteid&&m.publicEntry&&m.journalid!==m.remoteid};return r}t.$inject=["Api"],o.$inject=["Api"],n.$inject=["$scope","$interval","radioGroup","Users","DiscoveryTimesService","MediusTimesService"],angular.element("body").ready(e),angular.module("LJ.DiscoveryTimes",["ngSanitize","LJ.Directives","LJ.RadioGroup","LJ.Api","LJ.User","Users"]),angular.module("LJ.DiscoveryTimes").directive("ljDiscoveryTimes",i).factory("MediusTimesService",t).factory("DiscoveryTimesService",o)}(); /* <<< file end: js/widgets/discoverytimes.js */ //# map link was there [discoverytimes.js.map]