Compare commits

...

7 commits

Author SHA1 Message Date
8c49971cb9 update 2023-10-11 18:19:22 +00:00
bfc8b7df76 update 2023-10-06 21:29:45 +00:00
50bafe0609 Revert "fix: delete GTM"
This reverts commit ca34852e27.
2023-09-16 01:41:46 +00:00
ca34852e27 fix: delete GTM
loads broken scripts
2023-09-06 16:13:32 +00:00
42212d450d fix: not load GIFs in mobile
it's actually slower than loading the videos
2023-08-28 12:59:46 +00:00
1b535560b2 chore: format main.js 2023-08-28 12:54:53 +00:00
09c7539380 fix: remove twitter APIs
not actually used
2023-08-28 11:48:31 +00:00
23 changed files with 31 additions and 82 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

BIN
assets/images/favicon.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/images/starling-logo.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -1 +1 @@
define("example",["queue"],function(e){function n(){this.name="Example"}return n});
define("example",["queue"],function(e){return function(){this.name="Example"}});

View file

@ -1 +1 @@
define("social",["jquery"],function(t){var e={};return e.facebook={share:function(t){var t=t||window.location.href,e=window.open("https://www.facebook.com/sharer/sharer.php?u="+t,"popupwindow","scrollbars=yes,width=800,height=400");e.focus()},feed:function(){FB.ui({method:"feed",name:"",link:"",picture:"",caption:"",description:""},function(t){t&&t.post_id})}},e.twitter={share:function(t){twttr.ready(function(t){t.events.bind("tweet",function(t){})});var e=window.open("https://twitter.com/intent/tweet?text="+t,"popupwindow","scrollbars=yes,width=800,height=400");e.focus()}},e});
define("social",["jquery"],function(e){return{}});

File diff suppressed because one or more lines are too long

6
assets/js/lib/d3.js vendored

File diff suppressed because one or more lines are too long

1
assets/js/lib/howler-2.2.4.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
define("makeVideoPlayableInline",[],function(){var e=function(){"use strict";function e(e,n,r,i){function t(r){d=n(t,i),e(r-(a||r)),a=r}var d,a;return{start:function(){d||t(0)},stop:function(){r(d),d=null,a=0}}}function n(n){return e(n,requestAnimationFrame,cancelAnimationFrame)}function r(e,n,r,i){function t(n){Boolean(e[r])===Boolean(i)&&n.stopImmediatePropagation(),delete e[r]}return e.addEventListener(n,t,!1),t}function i(e,n,r,i){function t(){return r[n]}function d(e){r[n]=e}i&&d(e[n]),Object.defineProperty(e,n,{get:t,set:d})}function t(e,n,r){r.addEventListener(n,function(){return e.dispatchEvent(new Event(n))})}function d(e,n){Promise.resolve().then(function(){e.dispatchEvent(new Event(n))})}function a(e){var n=new Audio;return t(e,"play",n),t(e,"playing",n),t(e,"pause",n),n.crossOrigin=e.crossOrigin,n.src=e.src||e.currentSrc||"data:",n}function o(e,n,r){(m||0)+200<Date.now()&&(e[b]=!0,m=Date.now()),r||(e.currentTime=n),A[++k%3]=100*n|0}function u(e){return e.driver.currentTime>=e.video.duration}function s(e){var n=this;n.video.readyState>=n.video.HAVE_FUTURE_DATA?(n.hasAudio||(n.driver.currentTime=n.video.currentTime+e*n.video.playbackRate/1e3,n.video.loop&&u(n)&&(n.driver.currentTime=0)),o(n.video,n.driver.currentTime)):n.video.networkState!==n.video.NETWORK_IDLE||n.video.buffered.length||n.video.load(),n.video.ended&&(delete n.video[b],n.video.pause(!0))}function c(){var e=this,n=e[h];return e.webkitDisplayingFullscreen?void e[E]():("data:"!==n.driver.src&&n.driver.src!==e.src&&(o(e,0,!0),n.driver.src=e.src),void(e.paused&&(n.paused=!1,e.buffered.length||e.load(),n.driver.play(),n.updater.start(),n.hasAudio||(d(e,"play"),n.video.readyState>=n.video.HAVE_ENOUGH_DATA&&d(e,"playing")))))}function v(e){var n=this,r=n[h];r.driver.pause(),r.updater.stop(),n.webkitDisplayingFullscreen&&n[T](),r.paused&&!e||(r.paused=!0,r.hasAudio||d(n,"pause"),n.ended&&(n[b]=!0,d(n,"ended")))}function p(e,r){var i=e[h]={};i.paused=!0,i.hasAudio=r,i.video=e,i.updater=n(s.bind(i)),r?i.driver=a(e):(e.addEventListener("canplay",function(){e.paused||d(e,"playing")}),i.driver={src:e.src||e.currentSrc||"data:",muted:!0,paused:!0,pause:function(){i.driver.paused=!0},play:function(){i.driver.paused=!1,u(i)&&o(e,0)},get ended(){return u(i)}}),e.addEventListener("emptied",function(){var n=!i.driver.src||"data:"===i.driver.src;i.driver.src&&i.driver.src!==e.src&&(o(e,0,!0),i.driver.src=e.src,n?i.driver.play():i.updater.stop())},!1),e.addEventListener("webkitbeginfullscreen",function(){e.paused?r&&!i.driver.buffered.length&&i.driver.load():(e.pause(),e[E]())}),r&&(e.addEventListener("webkitendfullscreen",function(){i.driver.currentTime=e.currentTime}),e.addEventListener("seeking",function(){A.indexOf(100*e.currentTime|0)<0&&(i.driver.currentTime=e.currentTime)}))}function l(e){var n=e[h];e[E]=e.play,e[T]=e.pause,e.play=c,e.pause=v,i(e,"paused",n.driver),i(e,"muted",n.driver,!0),i(e,"playbackRate",n.driver,!0),i(e,"ended",n.driver),i(e,"loop",n.driver,!0),r(e,"seeking"),r(e,"seeked"),r(e,"timeupdate",b,!1),r(e,"ended",b,!1)}function f(e,n,r){void 0===n&&(n=!0),void 0===r&&(r=!0),r&&!g||e[h]||(p(e,n),l(e),e.classList.add("IIV"),!n&&e.autoplay&&e.play(),/iPhone|iPod|iPad/.test(navigator.platform)||console.warn("iphone-inline-video is not guaranteed to work in emulated environments"))}var m,y="undefined"==typeof Symbol?function(e){return"@"+(e||"@")+Math.random()}:Symbol,g=/iPhone|iPod/i.test(navigator.userAgent)&&!matchMedia("(-webkit-video-playable-inline)").matches,h=y(),b=y(),E=y("nativeplay"),T=y("nativepause"),A=[],k=0;return f.isWhitelisted=g,f}();return e});
define("makeVideoPlayableInline",[],function(){return function(){"use strict";function t(r,e,i,n){function t(e){Boolean(r[i])===Boolean(n)&&e.stopImmediatePropagation(),delete r[i]}r.addEventListener(e,t,!1)}function d(e,r,i,n){function t(e){i[r]=e}n&&t(e[r]),Object.defineProperty(e,r,{get:function(){return i[r]},set:t})}function p(e,r,i){i.addEventListener(r,function(){return e.dispatchEvent(new Event(r))})}function l(e,r){Promise.resolve().then(function(){e.dispatchEvent(new Event(r))})}function f(e,r,i){(n||0)+200<Date.now()&&(e[g]=!0,n=Date.now()),i||(e.currentTime=r),b[++v%3]=100*r|0}function m(e){return e.driver.currentTime>=e.video.duration}function a(){var e=this,r=e[y];return e.webkitDisplayingFullscreen?void e[h]():("data:"!==r.driver.src&&r.driver.src!==e.src&&(f(e,0,!0),r.driver.src=e.src),void(e.paused&&(r.paused=!1,e.buffered.length||e.load(),r.driver.play(),r.updater.start(),r.hasAudio||(l(e,"play"),r.video.readyState>=r.video.HAVE_ENOUGH_DATA&&l(e,"playing")))))}function o(e){var r=this,i=r[y];i.driver.pause(),i.updater.stop(),r.webkitDisplayingFullscreen&&r[c](),i.paused&&!e||(i.paused=!0,i.hasAudio||l(r,"pause"),r.ended&&(r[g]=!0,l(r,"ended")))}function u(r,e){var i,n,t,d,a,o,u,s,c=r[y]={};function v(e){u=d(v,o),t(e-(s||e)),s=e}c.paused=!0,c.hasAudio=e,c.video=r,c.updater=(n=function(e){var r=this;r.video.readyState>=r.video.HAVE_FUTURE_DATA?(r.hasAudio||(r.driver.currentTime=r.video.currentTime+e*r.video.playbackRate/1e3,r.video.loop&&m(r)&&(r.driver.currentTime=0)),f(r.video,r.driver.currentTime)):r.video.networkState!==r.video.NETWORK_IDLE||r.video.buffered.length||r.video.load(),r.video.ended&&(delete r.video[g],r.video.pause(!0))}.bind(c),t=n,d=requestAnimationFrame,a=cancelAnimationFrame,{start:function(){u||v(0)},stop:function(){a(u),u=null,s=0}}),e?c.driver=(n=r,i=new Audio,p(n,"play",i),p(n,"playing",i),p(n,"pause",i),i.crossOrigin=n.crossOrigin,i.src=n.src||n.currentSrc||"data:",i):(r.addEventListener("canplay",function(){r.paused||l(r,"playing")}),c.driver={src:r.src||r.currentSrc||"data:",muted:!0,paused:!0,pause:function(){c.driver.paused=!0},play:function(){c.driver.paused=!1,m(c)&&f(r,0)},get ended(){return m(c)}}),r.addEventListener("emptied",function(){var e=!c.driver.src||"data:"===c.driver.src;c.driver.src&&c.driver.src!==r.src&&(f(r,0,!0),c.driver.src=r.src,e?c.driver.play():c.updater.stop())},!1),r.addEventListener("webkitbeginfullscreen",function(){r.paused?e&&!c.driver.buffered.length&&c.driver.load():(r.pause(),r[h]())}),e&&(r.addEventListener("webkitendfullscreen",function(){c.driver.currentTime=r.currentTime}),r.addEventListener("seeking",function(){b.indexOf(100*r.currentTime|0)<0&&(c.driver.currentTime=r.currentTime)}))}function e(e,r,i){var n;void 0===r&&(r=!0),(i=void 0===i?!0:i)&&!s||e[y]||(u(e,r),n=(i=e)[y],i[h]=i.play,i[c]=i.pause,i.play=a,i.pause=o,d(i,"paused",n.driver),d(i,"muted",n.driver,!0),d(i,"playbackRate",n.driver,!0),d(i,"ended",n.driver),d(i,"loop",n.driver,!0),t(i,"seeking"),t(i,"seeked"),t(i,"timeupdate",g,!1),t(i,"ended",g,!1),e.classList.add("IIV"),!r&&e.autoplay&&e.play(),/iPhone|iPod|iPad/.test(navigator.platform))||console.warn("iphone-inline-video is not guaranteed to work in emulated environments")}var n,r="undefined"==typeof Symbol?function(e){return"@"+(e||"@")+Math.random()}:Symbol,s=/iPhone|iPod/i.test(navigator.userAgent)&&!matchMedia("(-webkit-video-playable-inline)").matches,y=r(),g=r(),h=r("nativeplay"),c=r("nativepause"),b=[],v=0;return e.isWhitelisted=s,e}()});

View file

@ -1 +1 @@
!function(n,e){function t(e){var t,r=n("<div></div>").css({width:"100%"});return e.append(r),t=e.width()-r.width(),r.remove(),t}function r(o,i){var a=o.getBoundingClientRect(),s=a.top,c=a.bottom,u=a.left,l=a.right,d=n.extend({tolerance:0,viewport:e},i),f=!1,p=d.viewport.jquery?d.viewport:n(d.viewport);p.length||(console.warn("isInViewport: The viewport selector you have provided matches no element on page."),console.warn("isInViewport: Defaulting to viewport as window"),p=n(e));var w=p.height(),h=p.width(),v=p[0].toString();if(p[0]!==e&&"[object Window]"!==v&&"[object DOMWindow]"!==v){var g=p[0].getBoundingClientRect();s-=g.top,c-=g.top,u-=g.left,l-=g.left,r.scrollBarWidth=r.scrollBarWidth||t(p),h-=r.scrollBarWidth}return d.tolerance=~~Math.round(parseFloat(d.tolerance)),d.tolerance<0&&(d.tolerance=w+d.tolerance),l<=0||u>=h?f:f=d.tolerance?s<=d.tolerance&&c>=d.tolerance:c>0&&s<=w}String.prototype.hasOwnProperty("trim")||(String.prototype.trim=function(){return this.replace(/^\s*(.*?)\s*$/,"$1")});var o=function(e){if(1===arguments.length&&"function"==typeof e&&(e=[e]),!(e instanceof Array))throw new SyntaxError("isInViewport: Argument(s) passed to .do/.run should be a function or an array of functions");for(var t=0;t<e.length;t++)if("function"==typeof e[t])for(var r=0;r<this.length;r++)e[t].call(n(this[r]));else console.warn("isInViewport: Argument(s) passed to .do/.run should be a function or an array of functions"),console.warn("isInViewport: Ignoring non-function values in array and moving on");return this};n.fn.do=function(n){return console.warn("isInViewport: .do is deprecated as it causes issues in IE and some browsers since it's a reserved word. Use $.fn.run instead i.e., $(el).run(fn)."),o(n)},n.fn.run=o;var i=function(e){if(e){var t=e.split(",");return 1===t.length&&isNaN(t[0])&&(t[1]=t[0],t[0]=void 0),{tolerance:t[0]?t[0].trim():void 0,viewport:t[1]?n(t[1].trim()):void 0}}return{}};n.extend(n.expr[":"],{"in-viewport":n.expr.createPseudo?n.expr.createPseudo(function(n){return function(e){return r(e,i(n))}}):function(n,e,t){return r(n,i(t[3]))}}),n.fn.isInViewport=function(n){return this.filter(function(e,t){return r(t,n)})}}(jQuery,window);
!function(u,l){String.prototype.hasOwnProperty("trim")||(String.prototype.trim=function(){return this.replace(/^\s*(.*?)\s*$/,"$1")});function n(e){if(!((e=1===arguments.length&&"function"==typeof e?[e]:e)instanceof Array))throw new SyntaxError("isInViewport: Argument(s) passed to .do/.run should be a function or an array of functions");for(var n=0;n<e.length;n++)if("function"!=typeof e[n])console.warn("isInViewport: Argument(s) passed to .do/.run should be a function or an array of functions"),console.warn("isInViewport: Ignoring non-function values in array and moving on");else for(var t=0;t<this.length;t++)e[n].call(u(this[t]));return this}function d(e,n){var e=e.getBoundingClientRect(),t=e.top,o=e.bottom,r=e.left,e=e.right,n=u.extend({tolerance:0,viewport:l},n),i=n.viewport.jquery?n.viewport:u(n.viewport),s=(i.length||(console.warn("isInViewport: The viewport selector you have provided matches no element on page."),console.warn("isInViewport: Defaulting to viewport as window"),i=u(l)),i.height()),a=i.width(),c=i[0].toString();return i[0]!==l&&"[object Window]"!==c&&"[object DOMWindow]"!==c&&(t-=(c=i[0].getBoundingClientRect()).top,o-=c.top,r-=c.left,e-=c.left,a-=d.scrollBarWidth=d.scrollBarWidth||(c=i,i=u("<div></div>").css({width:"100%"}),c.append(i),c=c.width()-i.width(),i.remove(),c)),n.tolerance=~~Math.round(parseFloat(n.tolerance)),n.tolerance<0&&(n.tolerance=s+n.tolerance),!(e<=0||a<=r)&&(n.tolerance?t<=n.tolerance&&o>=n.tolerance:0<o&&t<=s)}u.fn.do=function(e){return console.warn("isInViewport: .do is deprecated as it causes issues in IE and some browsers since it's a reserved word. Use $.fn.run instead i.e., $(el).run(fn)."),n(e)},u.fn.run=n;function o(e){return e?(1===(e=e.split(",")).length&&isNaN(e[0])&&(e[1]=e[0],e[0]=void 0),{tolerance:e[0]?e[0].trim():void 0,viewport:e[1]?u(e[1].trim()):void 0}):{}}u.extend(u.expr[":"],{"in-viewport":u.expr.createPseudo?u.expr.createPseudo(function(n){return function(e){return d(e,o(n))}}):function(e,n,t){return d(e,o(t[3]))}}),u.fn.isInViewport=function(t){return this.filter(function(e,n){return d(n,t)})}}(jQuery,window);

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
!function(t){"use strict";t.jscroll={defaults:{debug:!1,autoTrigger:!0,autoTriggerUntil:!1,loadingHtml:"<small>Loading...</small>",loadingFunction:!1,padding:0,nextSelector:"a:last",contentSelector:"",pagingSelector:"",callback:!1}};var n=function(n,e){var l=n.data("jscroll"),o="function"==typeof e?{callback:e}:e,r=t.extend({},t.jscroll.defaults,o,l||{}),i="visible"===n.css("overflow-y"),c=n.find(r.nextSelector).first(),a=t(window),s=t("body"),d=i?a:n,f=t.trim(c.attr("href")+" "+r.contentSelector),g=function(){var n=t(r.loadingHtml).filter("img").attr("src");if(n){var e=new Image;e.src=n}},u=function(){n.find(".jscroll-inner").length||n.contents().wrapAll('<div class="jscroll-inner" />')},p=function(t){var n;r.pagingSelector?t.closest(r.pagingSelector).hide():(n=t.parent().not(".jscroll-inner,.jscroll-added").addClass("jscroll-next-parent").hide(),n.length||t.wrap('<div class="jscroll-next-parent" />').parent().hide())},j=function(){return d.unbind(".jscroll").removeData("jscroll").find(".jscroll-inner").children().unwrap().filter(".jscroll-added").children().unwrap()},h=function(){if(n.is(":visible")){u();var t=n.find("div.jscroll-inner").first(),e=n.data("jscroll"),l=parseInt(n.css("borderTopWidth"),10),o=isNaN(l)?0:l,c=parseInt(n.css("paddingTop"),10)+o,a=i?d.scrollTop():n.offset().top,s=t.length?t.offset().top:0,f=Math.ceil(a-s+d.height()+c);if(!e.waiting&&f+r.padding>=t.outerHeight())return w("info","jScroll:",t.outerHeight()-f,"from bottom. Loading next request..."),m()}},v=function(t){return t=t||n.data("jscroll"),t&&t.nextHref?(b(),!0):(w("warn","jScroll: nextSelector not found - destroying"),j(),!1)},b=function(){var e=n.find(r.nextSelector).first();if(e.length)if(r.autoTrigger&&(r.autoTriggerUntil===!1||r.autoTriggerUntil>0)){p(e);var l=s.height()-n.offset().top,o=n.height()<l?n.height():l,i=n.offset().top-a.scrollTop()>0?a.height()-(n.offset().top-t(window).scrollTop()):a.height();o<=i&&h(),d.unbind(".jscroll").bind("scroll.jscroll",function(){return h()}),r.autoTriggerUntil>0&&r.autoTriggerUntil--}else d.unbind(".jscroll"),e.bind("click.jscroll",function(){return p(e),m(),!1})},m=function(){var e=n.find("div.jscroll-inner").first(),l=n.data("jscroll");return l.waiting=!0,e.append('<div class="jscroll-added" />').children(".jscroll-added").last().html('<div class="jscroll-loading" id="jscroll-loading">'+r.loadingHtml+"</div>").promise().done(function(){r.loadingFunction&&r.loadingFunction()}),n.animate({scrollTop:e.outerHeight()},0,function(){e.find("div.jscroll-added").last().load(l.nextHref,function(e,o){if("error"===o)return j();var i=t(this).find(r.nextSelector).first();l.waiting=!1,l.nextHref=!!i.attr("href")&&t.trim(i.attr("href")+" "+r.contentSelector),t(".jscroll-next-parent",n).remove(),v(),r.callback&&r.callback.call(this),w("dir",l)})})},w=function(t){if(r.debug&&"object"==typeof console&&("object"==typeof t||"function"==typeof console[t]))if("object"==typeof t){var n=[];for(var e in t)"function"==typeof console[e]?(n=t[e].length?t[e]:[t[e]],console[e].apply(console,n)):console.log.apply(console,n)}else console[t].apply(console,Array.prototype.slice.call(arguments,1))};return n.data("jscroll",t.extend({},l,{initialized:!0,waiting:!1,nextHref:f})),u(),g(),b(),t.extend(n.jscroll,{destroy:j}),n};t.fn.jscroll=function(e){return this.each(function(){var l,o=t(this),r=o.data("jscroll");r&&r.initialized||(l=new n(o,e))})}}(jQuery);
!function(h){"use strict";h.jscroll={defaults:{debug:!1,autoTrigger:!0,autoTriggerUntil:!1,loadingHtml:"<small>Loading...</small>",loadingFunction:!1,padding:0,nextSelector:"a:last",contentSelector:"",pagingSelector:"",callback:!1}};function l(r,t){function e(t){i.pagingSelector?t.closest(i.pagingSelector).hide():t.parent().not(".jscroll-inner,.jscroll-added").addClass("jscroll-next-parent").hide().length||t.wrap('<div class="jscroll-next-parent" />').parent().hide()}function l(){if(r.is(":visible")){f();var t=r.find("div.jscroll-inner").first(),n=r.data("jscroll"),e=parseInt(r.css("borderTopWidth"),10),e=isNaN(e)?0:e,e=parseInt(r.css("paddingTop"),10)+e,l=c?d.scrollTop():r.offset().top,o=t.length?t.offset().top:0,l=Math.ceil(l-o+d.height()+e);if(!n.waiting&&l+i.padding>=t.outerHeight())return j("info","jScroll:",t.outerHeight()-l,"from bottom. Loading next request..."),p()}}function n(){var t,n=r.find(i.nextSelector).first();n.length&&(i.autoTrigger&&(!1===i.autoTriggerUntil||0<i.autoTriggerUntil)?(e(n),t=s.height()-r.offset().top,(r.height()<t?r.height():t)<=(0<r.offset().top-a.scrollTop()?a.height()-(r.offset().top-h(window).scrollTop()):a.height())&&l(),d.unbind(".jscroll").bind("scroll.jscroll",l),0<i.autoTriggerUntil&&i.autoTriggerUntil--):(d.unbind(".jscroll"),n.bind("click.jscroll",function(){return e(n),p(),!1})))}var o=r.data("jscroll"),i=h.extend({},h.jscroll.defaults,"function"==typeof t?{callback:t}:t,o||{}),c="visible"===r.css("overflow-y"),t=r.find(i.nextSelector).first(),a=h(window),s=h("body"),d=c?a:r,t=h.trim(t.attr("href")+" "+i.contentSelector),f=function(){r.find(".jscroll-inner").length||r.contents().wrapAll('<div class="jscroll-inner" />')},g=function(){return d.unbind(".jscroll").removeData("jscroll").find(".jscroll-inner").children().unwrap().filter(".jscroll-added").children().unwrap()},u=function(t){return(t=t||r.data("jscroll"))&&t.nextHref?(n(),!0):(j("warn","jScroll: nextSelector not found - destroying"),g(),!1)},p=function(){var t=r.find("div.jscroll-inner").first(),e=r.data("jscroll");return e.waiting=!0,t.append('<div class="jscroll-added" />').children(".jscroll-added").last().html('<div class="jscroll-loading" id="jscroll-loading">'+i.loadingHtml+"</div>").promise().done(function(){i.loadingFunction&&i.loadingFunction()}),r.animate({scrollTop:t.outerHeight()},0,function(){t.find("div.jscroll-added").last().load(e.nextHref,function(t,n){if("error"===n)return g();n=h(this).find(i.nextSelector).first();e.waiting=!1,e.nextHref=!!n.attr("href")&&h.trim(n.attr("href")+" "+i.contentSelector),h(".jscroll-next-parent",r).remove(),u(),i.callback&&i.callback.call(this),j("dir",e)})})},j=function(t){if(i.debug&&"object"==typeof console&&("object"==typeof t||"function"==typeof console[t]))if("object"==typeof t){var n,e=[];for(n in t)("function"==typeof console[n]?(e=t[n].length?t[n]:[t[n]],console[n]):console.log).apply(console,e)}else console[t].apply(console,Array.prototype.slice.call(arguments,1))};return r.data("jscroll",h.extend({},o,{initialized:!0,waiting:!1,nextHref:t})),f(),(o=h(i.loadingHtml).filter("img").attr("src"))&&((new Image).src=o),n(),h.extend(r.jscroll,{destroy:g}),r}h.fn.jscroll=function(e){return this.each(function(){var t=h(this),n=t.data("jscroll");n&&n.initialized||l(t,e)})}}(jQuery);

View file

@ -1 +1 @@
!function(e,t,o,n){function a(e,t){return e[t]===n?y[t]:e[t]}function i(){var e=t.pageYOffset;return e===n?m.scrollTop:e}function r(e,t){var o=y["on"+e];o&&(z(o)?o.call(t[0]):(o.addClass&&t.addClass(o.addClass),o.removeClass&&t.removeClass(o.removeClass))),t.trigger("lazy"+e,[t]),d()}function l(t){r(t.type,e(this).off(h,l))}function s(o){if(I.length){o=o||y.forceLoad,T=1/0;var n,a,s=i(),c=t.innerHeight||m.clientHeight,d=t.innerWidth||m.clientWidth;for(n=0,a=I.length;n<a;n++){var f,u=I[n],v=u[0],p=u[A],C=!1,w=o||b(v,g)<0;if(e.contains(m,v)){if(o||!p.visibleOnly||v.offsetWidth||v.offsetHeight){if(!w){var E=v.getBoundingClientRect(),B=p.edgeX,L=p.edgeY;f=E.top+s-L-c,w=f<=s&&E.bottom>-L&&E.left<=d+B&&E.right>-B}if(w){u.on(h,l),r("show",u);var X=p.srcAttr,k=z(X)?X(u):v.getAttribute(X);k&&(v.src=k),C=!0}else f<T&&(T=f)}}else C=!0;C&&(b(v,g,0),I.splice(n--,1),a--)}a||r("complete",e(m))}}function c(){B>1?(B=1,s(),setTimeout(c,y.throttle)):B=0}function d(e){I.length&&(e&&"scroll"===e.type&&e.currentTarget===t&&T>=i()||(B||setTimeout(c,0),B=2))}function f(){w.lazyLoadXT()}function u(){s(!0)}var A="lazyLoadXT",g="lazied",h="load error",v="lazy-hidden",m=o.documentElement||o.body,p=t.onscroll===n||!!t.operamini||!m.getBoundingClientRect,y={autoInit:!0,selector:"img[data-src]",blankImage:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",throttle:99,forceLoad:p,loadEvent:"pageshow",updateEvent:"load orientationchange resize scroll touchmove focus",forceEvent:"lazyloadall",oninit:{removeClass:"lazy"},onshow:{addClass:v},onload:{removeClass:v,addClass:"lazy-loaded"},onerror:{removeClass:v},checkDuplicates:!0},C={srcAttr:"data-src",edgeX:0,edgeY:0,visibleOnly:!0},w=e(t),z=e.isFunction,E=e.extend,b=e.data||function(t,o){return e(t).data(o)},I=[],T=0,B=0;e[A]=E(y,C,e[A]),e.fn[A]=function(o){o=o||{};var n,i=a(o,"blankImage"),l=a(o,"checkDuplicates"),s=a(o,"scrollContainer"),c=a(o,"show"),f={};e(s).on("scroll",d);for(n in C)f[n]=a(o,n);return this.each(function(n,a){if(a===t)e(y.selector).lazyLoadXT(o);else{var s=l&&b(a,g),u=e(a).data(g,c?-1:1);if(s)return void d();i&&"IMG"===a.tagName&&!a.src&&(a.src=i),u[A]=E({},f),r("init",u),I.push(u),d()}})},e(o).ready(function(){r("start",w),w.on(y.updateEvent,d).on(y.forceEvent,u),e(o).on(y.updateEvent,d),y.autoInit&&(w.on(y.loadEvent,f),f())})}(window.jQuery||window.Zepto||window.$,window,document);
!function(h,v,e,o){var m="lazyLoadXT",p="lazied",y="load error",t="lazy-hidden",C=e.documentElement||e.body,w={autoInit:!0,selector:"img[data-src]",blankImage:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",throttle:99,forceLoad:v.onscroll===o||!!v.operamini||!C.getBoundingClientRect,loadEvent:"pageshow",updateEvent:"load orientationchange resize scroll touchmove focus",forceEvent:"lazyloadall",oninit:{removeClass:"lazy"},onshow:{addClass:t},onload:{removeClass:t,addClass:"lazy-loaded"},onerror:{removeClass:t},checkDuplicates:!0},n={srcAttr:"data-src",edgeX:0,edgeY:0,visibleOnly:!0},a=h(v),z=h.isFunction,c=h.extend,E=h.data||function(e,t){return h(e).data(t)},b=[],I=0,i=0;function d(e,t){return(e[t]===o?w:e)[t]}function T(){var e=v.pageYOffset;return e===o?C.scrollTop:e}function B(e,t){var o=w["on"+e];o&&(z(o)?o.call(t[0]):(o.addClass&&t.addClass(o.addClass),o.removeClass&&t.removeClass(o.removeClass))),t.trigger("lazy"+e,[t]),u()}function L(e){B(e.type,h(this).off(y,L))}function l(e){if(b.length){e=e||w.forceLoad,I=1/0;for(var t=T(),o=v.innerHeight||C.clientHeight,n=v.innerWidth||C.clientWidth,a=0,i=b.length;a<i;a++){var l,r,s,c,d=b[a],u=d[0],f=d[m],A=!1,g=e||E(u,p)<0;h.contains(C,u)?(e||!f.visibleOnly||u.offsetWidth||u.offsetHeight)&&(g||(c=u.getBoundingClientRect(),l=f.edgeX,s=f.edgeY,g=(r=c.top+t-s-o)<=t&&c.bottom>-s&&c.left<=n+l&&c.right>-l),g?(d.on(y,L),B("show",d),s=f.srcAttr,(c=z(s)?s(d):u.getAttribute(s))&&(u.src=c),A=!0):r<I&&(I=r)):A=!0,A&&(E(u,p,0),b.splice(a--,1),i--)}i||B("complete",h(C))}}function r(){1<i?(i=1,l(),setTimeout(r,w.throttle)):i=0}function u(e){!b.length||e&&"scroll"===e.type&&e.currentTarget===v&&I>=T()||(i||setTimeout(r,0),i=2)}function s(){a.lazyLoadXT()}function f(){l(!0)}h[m]=c(w,n,h[m]),h.fn[m]=function(a){var e,i=d(a=a||{},"blankImage"),l=d(a,"checkDuplicates"),t=d(a,"scrollContainer"),r=d(a,"show"),s={};for(e in h(t).on("scroll",u),n)s[e]=d(a,e);return this.each(function(e,t){var o,n;t===v?h(w.selector).lazyLoadXT(a):(o=l&&E(t,p),n=h(t).data(p,r?-1:1),o||(i&&"IMG"===t.tagName&&!t.src&&(t.src=i),n[m]=c({},s),B("init",n),b.push(n)),u())})},h(e).ready(function(){B("start",a),a.on(w.updateEvent,u).on(w.forceEvent,f),h(e).on(w.updateEvent,u),w.autoInit&&(a.on(w.loadEvent,s),s())})}(window.jQuery||window.Zepto||window.$,window,document);

View file

@ -1 +1 @@
!function(){function n(n){function e(){for(;r=a<c.length&&p<n;){var u=a++,e=c[u],o=t.call(e,1);o.push(l(u)),++p,e[0].apply(null,o)}}function l(n){return function(u,t){--p,null==s&&(null!=u?(s=u,a=d=NaN,o()):(c[n]=t,--d?r||e():o()))}}function o(){null!=s?h(s):f?h(s,c):h.apply(null,[s].concat(c))}var i,r,f,c=[],a=0,p=0,d=0,s=null,h=u;return n||(n=1/0),i={defer:function(){return s||(c.push(arguments),++d,e()),i},await:function(n){return h=n,f=!1,d||o(),i},awaitAll:function(n){return h=n,f=!0,d||o(),i}}}function u(){}var t=[].slice;n.version="1.0.7","function"==typeof define&&define.amd?define(function(){return n}):"object"==typeof module&&module.exports?module.exports=n:this.queue=n}();
!function(){var s=[].slice;function n(e){var u,l,t,o=[],i=0,r=0,f=0,c=null,a=h;function p(){for(;l=i<o.length&&r<e;){var n=i++,u=o[n],t=s.call(u,1);t.push(function(t){return function(n,u){--r,null==c&&(null!=n?(c=n,i=f=NaN,d()):(o[t]=u,--f?l||p():d()))}}(n)),++r,u[0].apply(null,t)}}function d(){null!=c?a(c):t?a(c,o):a.apply(null,[c].concat(o))}return e=e||1/0,u={defer:function(){return c||(o.push(arguments),++f,p()),u},await:function(n){return a=n,t=!1,f||d(),u},awaitAll:function(n){return a=n,t=!0,f||d(),u}}}function h(){}n.version="1.0.7","function"==typeof define&&define.amd?define(function(){return n}):"object"==typeof module&&module.exports?module.exports=n:this.queue=n}();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
requirejs.config({baseUrl:"/assets/js",paths:{queue:"lib/queue",jquery:"lib/jquery",d3:"lib/d3",underscore:"lib/underscore",scrollMonitor:"lib/scrollMonitor",remodal:"lib/remodal",makeVideoPlayableInline:"lib/inline-video",zoomer:"components/zoomer",social:"components/social"},shim:{"lib/jquery.jscroll":["jquery"]}}),require(["jquery","underscore","queue","zoomer","scrollMonitor","makeVideoPlayableInline","remodal","social"],function(e,o,a,t,i,r,n,s){function l(o){var o=o||{top:0,bottom:0};e(g).each(function(a,t){var r=i.create(t,o);r.fullyEnterViewport(function(o){var a=e(r.watchItem).find(".ambient-audio-controller"),t=(a.find(".ambient-audio-controller__state"),a.find("audio")),i=t[0];a.addClass("pulse"),setTimeout(function(){a.removeClass("pulse")},1e3),0==i.paused?t.animate({volume:0},1e3,"swing",function(){i.pause()}):(i.play(),t.animate({volume:.5},1e3))}),r.exitViewport(function(o){var a=e(r.watchItem).find(".ambient-audio-controller"),t=(a.find(".ambient-audio-controller__state"),a.find("audio")),i=t[0];t.animate({volume:0},1e3,"swing",function(){i.pause()})})})}function c(){var e=(a(1),["broll-coffee","broll-syria-st-view-from-jabal","person-abbas","broll-abbas-shophelpers","broll-syria-st-hole","person-zaynab-portrait","broll-jabal-view-from-tabbaneh-lc","person-ahmad-CU","person-samir","broll-syria-st-median-west-lc","broll-syria-st-tanks","person-ahmad-MED","portrait-top-left","portrait-top-middle","portrait-top-right","portrait-bottom-left","portrait-bottom-middle","portrait-bottom-right","person-hana-2","broll-syria-st-army-truck-lc","broll-syria-st-chickens","person-nisrine-2","person-nisrine-family","broll-shot-window","person-alaa-mohanna","broll-syria-st-business"]);e.forEach(function(e){u(e)})}function u(o,a){var t="http://icrc-syria-st-staging.s3-website-us-west-1.amazonaws.com/assets/videos/"+o+".gif",i=new Image;i.src=t,console.log("loadGif",o),i.onload=function(){console.log("Image ready",o);var t=e('video.video-cinemagraph[poster*="'+o+'"]');if(t.length){var i=t.attr("poster").replace(".jpg",".gif");t.replaceWith('<img src="'+i+'" class="video-cinemagraph"/>')}var r=e('video.video-cinemagraph-cover[poster*="'+o+'"]');if(r.length){var i=r.attr("poster").replace(".jpg",".gif");r.replaceWith('<img src="'+i+'" class="video-cinemagraph-cover"/>')}a&&a(null,o)}}function d(e,o){e.muted?(e.muted=!1,o.removeClass("on off").addClass("on")):(e.muted=!0,o.removeClass("on off").addClass("off"))}function m(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry/.test(navigator.userAgent)}function f(){return p()}function p(){return m()&&!b()}function b(){return navigator.userAgent.match(/(iPad|iPhone);.*CPU.*OS [8|9|10]_\d/i)&&navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("CriOS")==-1||navigator.userAgent.indexOf("Twitter")>-1}var h=document.querySelectorAll(".ambient-audio-controller"),v=e(h),g=document.querySelectorAll(".panel-audio"),y=(e(g),document.querySelectorAll(".video-cinemagraph")),w=e(y),C=e("#share-facebook"),q=e("#share-twitter");document.addEventListener("DOMContentLoaded",function(e){console.log("isMobile, isLegacyMobile, isModernMobile",m(),f(),b())}),C.on("click",function(){s.facebook.share()}),q.on("click",function(){var o=e(this),a=o.data("share-text");s.twitter.share(a)}),e(".video-cinemagraph-cover").each(function(e,o){r(this)}),e(y).each(function(e,o){if(m())o.setAttribute("autoplay",""),r(this);else{var a=i.create(o);a.enterViewport(function(e){a.watchItem.play()}),a.exitViewport(function(e){a.watchItem.paused||a.watchItem.pause()})}}),m()||l(),m()||v.on("click",function(o){var a=e(this).find("audio")[0],t=e(this).find(".ambient-audio-controller__state");d(a,t)}),m&&(v.removeAttr("loop"),v.on("click",function(o){var a=e(this).find("audio"),t=a[0],i=e(this).find(".ambient-audio-controller__state");t.paused?(i.removeClass("on off").addClass("on"),t.play(),a.animate({volume:.5},1e3)):(i.removeClass("on off").addClass("off"),a.animate({volume:0},1e3,"swing",function(){t.pause()}))})),m()&&w.on("touchstart",function(o){var a=e(this)[0];a.paused&&a.play()}),t(),m()&&c()});
requirejs.config({baseUrl:"/assets/js",paths:{queue:"lib/queue",jquery:"lib/jquery",d3:"lib/d3",howler:"lib/howler-2.2.4.min",underscore:"lib/underscore",scrollMonitor:"lib/scrollMonitor",remodal:"lib/remodal",makeVideoPlayableInline:"lib/inline-video",zoomer:"components/zoomer",social:"components/social"},shim:{"lib/jquery.jscroll":["jquery"]}}),require(["jquery","underscore","queue","zoomer","scrollMonitor","makeVideoPlayableInline","remodal","social","howler"],function(l,e,o,a,u,n,t,i,{Howl:s}){var c=document.querySelectorAll(".ambient-audio-controller"),c=(l(c),document.querySelectorAll(".panel-audio")),r=(l(c),document.querySelectorAll(".video-cinemagraph")),d=l(r);document.addEventListener("DOMContentLoaded",function(e){console.log("isMobile, isLegacyMobile, isModernMobile",m(),m()&&!p(),p())}),l(".video-cinemagraph-cover").each(function(e,o){n(this)}),l(r).each(function(e,o){var a;m()?(o.setAttribute("autoplay",""),n(this)):((a=u.create(o)).enterViewport(function(e){a.watchItem.play()}),a.exitViewport(function(e){a.watchItem.paused||a.watchItem.pause()}))});{var f=void 0;f=f||{top:0,bottom:0};let r=[];l(c).each(function(e,o){var a=l(o).find(".ambient-audio-controller"),n=a.find(".ambient-audio-controller__state");const t=new s({src:[a.attr("data-audio-ogg"),a.attr("data-audio-mp3")],loop:!1}),i=(r.push(t),()=>{t.fade(t.volume(),0,1e3),t.once("fade",()=>t.pause())});m()?a.on("click",function(){t.playing()?(n.removeClass("on off").addClass("off"),i()):(n.removeClass("on off").addClass("on"),t.fade(t.volume(),.5,1e3),t.play())}):((o=u.create(o,f)).fullyEnterViewport(function(){a.addClass("pulse"),setTimeout(function(){a.removeClass("pulse")},1e3),.5!==t.volume()&&t.fade(0,.5,1e3),t.play()}),o.exitViewport(function(){i()}),a.on("click",function(){var e,o;e=t,o=n,e.playing()?e._muted?(e.mute(!1),e.fade(e.volume(),.5,400),o.removeClass("on off").addClass("on")):(e.fade(e.volume(),0,400),e.once("fade",()=>e.mute(!0)),o.removeClass("on off").addClass("off")):e.play()}))})}function m(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry/.test(navigator.userAgent)}function p(){return navigator.userAgent.match(/(iPad|iPhone);.*CPU.*OS [8|9|10]_\d/i)&&-1<navigator.userAgent.indexOf("Safari")&&-1==navigator.userAgent.indexOf("CriOS")||-1<navigator.userAgent.indexOf("Twitter")}m()&&d.on("touchstart",function(e){var o=l(this)[0];o.paused&&o.play()}),a()});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long