1;(function( root ) { 2 3/** 4 * Application global object. 5 * @namespace joms 6 */ 7if ( typeof root.joms !== 'object' ) { 8 root.joms = {}; 9} 10 11/** 12 * Debug flag. 13 * @name joms.DEBUG 14 * @const {boolean} 15 */ 16root.joms.DEBUG = false; // @@release@@root.joms.DEBUG = false;@@ 17 18/** 19 * Application logger. 20 * @function joms.log 21 * @param {mixed} data 22 */ 23root.joms.log = root.joms.info = root.joms.warn = function( data ) { 24 if ( root.joms.DEBUG && root.console && root.console.log ) { // @@release@@@@ 25 root.console.log( 'JOMS: ', data ); // @@release@@@@ 26 } // @@release@@@@ 27}; 28 29// Temporary variables to reserve some current application libraries in case of override. 30root.joms_cache_$LAB = root.$LAB; 31root.joms_cache_Hammer = root.Hammer; 32 33})( this ); 34 35/*! LAB.js v2.0.3 | (c) Kyle Simpson | MIT license */ 36(function(o){var K=o.$LAB,y="UseLocalXHR",z="AlwaysPreserveOrder",u="AllowDuplicates",A="CacheBust",B="BasePath",C=/^[^?#]*\//.exec(location.href)[0],D=/^\w+\:\/\/\/?[^\/]+/.exec(C)[0],i=document.head||document.getElementsByTagName("head"),L=(o.opera&&Object.prototype.toString.call(o.opera)=="[object Opera]")||("MozAppearance"in document.documentElement.style),q=document.createElement("script"),E=typeof q.preload=="boolean",r=E||(q.readyState&&q.readyState=="uninitialized"),F=!r&&q.async===true,M=!r&&!F&&!L;function G(a){return Object.prototype.toString.call(a)=="[object Function]"}function H(a){return Object.prototype.toString.call(a)=="[object Array]"}function N(a,c){var b=/^\w+\:\/\//;if(/^\/\/\/?/.test(a)){a=location.protocol+a}else if(!b.test(a)&&a.charAt(0)!="/"){a=(c||"")+a}return b.test(a)?a:((a.charAt(0)=="/"?D:C)+a)}function s(a,c){for(var b in a){if(a.hasOwnProperty(b)){c[b]=a[b]}}return c}function O(a){var c=false;for(var b=0;b<a.scripts.length;b++){if(a.scripts[b].ready&&a.scripts[b].exec_trigger){c=true;a.scripts[b].exec_trigger();a.scripts[b].exec_trigger=null}}return c}function t(a,c,b,d){a.onload=a.onreadystatechange=function(){if((a.readyState&&a.readyState!="complete"&&a.readyState!="loaded")||c[b])return;a.onload=a.onreadystatechange=null;d()}}function I(a){a.ready=a.finished=true;for(var c=0;c<a.finished_listeners.length;c++){a.finished_listeners[c]()}a.ready_listeners=[];a.finished_listeners=[]}function P(d,f,e,g,h){setTimeout(function(){var a,c=f.real_src,b;if("item"in i){if(!i[0]){setTimeout(arguments.callee,25);return}i=i[0]}a=document.createElement("script");if(f.type)a.type=f.type;if(f.charset)a.charset=f.charset;if(h){if(r){e.elem=a;if(E){a.preload=true;a.onpreload=g}else{a.onreadystatechange=function(){if(a.readyState=="loaded")g()}}a.src=c}else if(h&&c.indexOf(D)==0&&d[y]){b=new XMLHttpRequest();b.onreadystatechange=function(){if(b.readyState==4){b.onreadystatechange=function(){};e.text=b.responseText+"\n//@ sourceURL="+c;g()}};b.open("GET",c);b.send()}else{a.type="text/cache-script";t(a,e,"ready",function(){i.removeChild(a);g()});a.src=c;i.insertBefore(a,i.firstChild)}}else if(F){a.async=false;t(a,e,"finished",g);a.src=c;i.insertBefore(a,i.firstChild)}else{t(a,e,"finished",g);a.src=c;i.insertBefore(a,i.firstChild)}},0)}function J(){var l={},Q=r||M,n=[],p={},m;l[y]=true;l[z]=false;l[u]=false;l[A]=false;l[B]="";function R(a,c,b){var d;function f(){if(d!=null){d=null;I(b)}}if(p[c.src].finished)return;if(!a[u])p[c.src].finished=true;d=b.elem||document.createElement("script");if(c.type)d.type=c.type;if(c.charset)d.charset=c.charset;t(d,b,"finished",f);if(b.elem){b.elem=null}else if(b.text){d.onload=d.onreadystatechange=null;d.text=b.text}else{d.src=c.real_src}i.insertBefore(d,i.firstChild);if(b.text){f()}}function S(c,b,d,f){var e,g,h=function(){b.ready_cb(b,function(){R(c,b,e)})},j=function(){b.finished_cb(b,d)};b.src=N(b.src,c[B]);b.real_src=b.src+(c[A]?((/\?.*$/.test(b.src)?"&_":"?_")+~~(Math.random()*1E9)+"="):"");if(!p[b.src])p[b.src]={items:[],finished:false};g=p[b.src].items;if(c[u]||g.length==0){e=g[g.length]={ready:false,finished:false,ready_listeners:[h],finished_listeners:[j]};P(c,b,e,((f)?function(){e.ready=true;for(var a=0;a<e.ready_listeners.length;a++){e.ready_listeners[a]()}e.ready_listeners=[]}:function(){I(e)}),f)}else{e=g[0];if(e.finished){j()}else{e.finished_listeners.push(j)}}}function v(){var e,g=s(l,{}),h=[],j=0,w=false,k;function T(a,c){a.ready=true;a.exec_trigger=c;x()}function U(a,c){a.ready=a.finished=true;a.exec_trigger=null;for(var b=0;b<c.scripts.length;b++){if(!c.scripts[b].finished)return}c.finished=true;x()}function x(){while(j<h.length){if(G(h[j])){try{h[j++]()}catch(err){}continue}else if(!h[j].finished){if(O(h[j]))continue;break}j++}if(j==h.length){w=false;k=false}}function V(){if(!k||!k.scripts){h.push(k={scripts:[],finished:true})}}e={script:function(){for(var f=0;f<arguments.length;f++){(function(a,c){var b;if(!H(a)){c=[a]}for(var d=0;d<c.length;d++){V();a=c[d];if(G(a))a=a();if(!a)continue;if(H(a)){b=[].slice.call(a);b.unshift(d,1);[].splice.apply(c,b);d--;continue}
36if(typeof a=="string")a={src:a};a=s(a,{ready:false,ready_cb:T,finished:false,finished_cb:U});k.finished=false;k.scripts.push(a);S(g,a,k,(Q&&w));w=true;if(g[z])e.wait()}})(arguments[f],arguments[f])}return e},wait:function(){if(arguments.length>0){for(var a=0;a<arguments.length;a++){h.push(arguments[a])}k=h[h.length-1]}else k=false;x();return e}};return{script:e.script,wait:e.wait,setOptions:function(a){s(a,g);return e}}}m={setGlobalDefaults:function(a){s(a,l);return m},setOptions:function(){return v().setOptions.apply(null,arguments)},script:function(){return v().script.apply(null,arguments)},wait:function(){return v().wait.apply(null,arguments)},queueScript:function(){n[n.length]={type:"script",args:[].slice.call(arguments)};return m},queueWait:function(){n[n.length]={type:"wait",args:[].slice.call(arguments)};return m},runQueue:function(){var a=m,c=n.length,b=c,d;for(;--b>=0;){d=n.shift();a=a[d.type].apply(null,d.args)}return a},noConflict:function(){o.$LAB=K;return m},sandbox:function(){return J()}};return m}o.$LAB=J();(function(a,c,b){if(document.readyState==null&&document[a]){document.readyState="loading";document[a](c,b=function(){document.removeEventListener(c,b,false);document.readyState="complete"},false)}})("addEventListener","DOMContentLoaded")})(this); 37 38;(function( root, undef ) { 39 40/** 41 * Cache $LAB.js instance. 42 * @type {object} joms.$LAB - Local copy of $LAB.js. 43 */ 44root.joms.$LAB = root.$LAB; 45root.$LAB = root.joms_cache_$LAB; 46delete root.joms_cache_$LAB; 47 48/** 49 * Cache jQuery instance. 50 * @type {object} joms.jQuery 51 */ 52root.joms.jQuery = undef; 53 54/** 55 * Cache Hammer.js instance. 56 * @type {object} joms.Hammer 57 */ 58root.joms.Hammer = undef; 59 60/** 61 * Cache Underscore.js instance. 62 * @type {object} joms._ 63 */ 64root.joms._ = undef; 65 66/** 67 * Cache Backbone.js instance. 68 * @type {object} joms.Backbone 69 */ 70root.joms.Backbone = undef; 71 72/** 73 * Attach additional ajax response. 74 * @function joms.onAjaxReponse 75 * @param {function} 76 */ 77root.joms.onAjaxReponse = function( id, callback ) { 78 if ( !root.joms._onAjaxReponseQueue ) root.joms._onAjaxReponseQueue = []; 79 if ( !root.joms._onAjaxReponseQueue[ id ] ) root.joms._onAjaxReponseQueue[ id ] = []; 80 root.joms._onAjaxReponseQueue[ id ].push( callback ); 81}; 82 83/** 84 * Attach function to trigger when application is starting. 85 * @function joms.onStart 86 * @param {function} 87 */ 88root.joms.onStart = function( fn ) { 89 if ( root.joms._onStartQueue === undef ) root.joms._onStartQueue = []; 90 if ( root.joms._onStartStarted ) fn( root.joms.jQuery ); 91 else root.joms._onStartQueue.push( fn ); 92}; 93 94/** 95 * Triggers start application. 96 * @function joms.start 97 */ 98root.joms.start = function() { 99 if ( root.joms_queue && root.joms_queue.length ) { 100 if ( root.joms._onStartQueue === undef ) root.joms._onStartQueue = []; 101 root.joms._onStartQueue = root.joms_queue.concat( root.joms._onStartQueue ); 102 root.joms_queue = []; 103 } 104 105 if ( root.joms._onStartQueue !== undef ) { 106 while ( root.joms._onStartQueue.length ) { 107 try { 108 ( root.joms._onStartQueue.shift() )( root.joms.jQuery ); 109 } catch (e) {} 110 } 111 } 112 113 root.joms._onStartStarted = true; 114}; 115 116/** 117 * Fix some ui quirks which cannot be handled with PHP or CSS. 118 * @todo Should be moved elsewhere instead of in loader.js 119 * @function joms.fixUI 120 */ 121root.joms.fixUI = function() { 122 123 // Remove empty module wrappers. 124 var tabbed = document.getElementsByClassName('joms-module__wrapper'), 125 stacked = document.getElementsByClassName('joms-module__wrapper--stacked'), 126 sidebar, main, mobile, cname, i; 127 128 for ( i = tabbed.length - 1; i >= 0; i-- ) { 129 if ( ! tabbed[i].innerHTML.match(/joms-tab__content|joms-js--app-new/) ) { 130 tabbed[i].parentNode.removeChild( tabbed[i] ); 131 } 132 } 133 134 for ( i = stacked.length - 1; i >= 0; i-- ) { 135 if ( ! stacked[i].innerHTML.match(/joms-module--stacked|joms-js--app-new/) ) { 136 stacked[i].parentNode.removeChild( stacked[i] ); 137 } 138 } 139 140 // Remove sidebar if no modules there. 141 sidebar = document.getElementsByClassName('joms-sidebar')[0]; 142 if ( sidebar && ( ! sidebar.innerHTML.match(/joms-module|app-position/) ) ) { 143 main = document.getElementsByClassName('joms-main')[0]; 144 sidebar.parentNode.removeChild( sidebar ); 145 if ( main ) { 146 main.className += ' joms-main--full'; 147 } 148 } 149
150 // Assumes non-touchable for non-mobile browsers. 151 mobile = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i; 152 if ( !mobile.test( navigator.userAgent ) ) { 153 cname = document.documentElement.className || ''; 154 document.documentElement.className = cname + (cname.length ? ' ' : '') + 'joms-no-touch'; 155 } 156 157 // Needs to add wrapper to .joms-select. 158 joms.onStart(function( $ ) { 159 $(function() { 160 $('.joms-select').each(function() { 161 var el = $(this), 162 multiple; 163 164 if ( !el.parent('.joms-select--wrapper').length ) { 165 multiple = el.attr('size') || el.attr('multiple'); 166 el.wrap( '<div class="joms-select--wrapper' + (multiple ? ' joms-select--expand' : '') + '"></div>' ); 167 } 168 }); 169 }); 170 171 if (location.href.includes("oauth_verifier") && location.href.includes("twitterlogin")){joms.api.fbcUpdate();} 172 else if (location.href.includes("linkedincode")) {joms.api.fbcUpdate();} 173 else if (location.href.includes("googleid")) {joms.api.fbcUpdate();} 174 }); 175}; 176 177root.joms.ie = !!navigator.userAgent.match(/Trident.*rv\:11\./); // joms only support ie 11 178 179var getOptions = root.Joomla && root.Joomla.getOptions, 180 DATA; 181 182// Retrieve all data and language translations. 183DATA = getOptions && getOptions( 'com_community' ) || (root.joms_data || {}); 184 185// Deprecated! 186root.joms_lang = DATA.translations || {}; 187 188// Data getter. 189root.joms.getData = function( key ) { 190 return DATA[ key ]; 191} 192 193root.joms.getLayout = function( key ) { 194 var layouts = DATA.layouts || {}; 195 return layouts[key]; 196} 197 198// FROM THIS POINT BELOW IS A JOMSOCIAL JAVASCRIPT LOADING SEQUENCE! 199 200// Path mapper. 201var path_source = 'source/js/', 202 path_release = 'release/js/', 203 path_vendors = 'vendors/', 204 path_jquery = path_vendors + 'jquery.min.js', 205 path_require = path_vendors + 'require.min.js', 206 path_bundle = 'bundle.js'; 207 208// Loading sequence. 209function load() { 210 var isdev = root.joms.DEBUG, 211 relpath = root.joms_assets_url || '', 212 relpath_bundle = relpath + ( isdev ? path_source : path_release ) + path_bundle; 213 214 root.joms.$LAB 215 // Load jQuery. 216 .script(function() { return root.jQuery ? null : ( relpath + path_jquery ); }) 217 .wait(function() { root.joms_init_toolkit(); }) 218 .wait( postLoad ) 219 // Load RequireJS on development environment. 220 .script(function() { return isdev ? ( relpath + path_require ) : null; }) 221 .wait(function() { isdev && require.config({ baseUrl: relpath + path_source }); }) 222 // Load bundled script. 223 .script( relpath_bundle ) 224 225 // Load legacy scripts. 226 .wait(function() { 227 root.joms_init_postbox(); 228 root.joms.misc.view.fixSVG(); 229 230 }); 231} 232 233// Post-loading initialization. 234function postLoad() { 235 root.joms.jQuery = root.jQuery; 236 root.joms.loadCSS = root.loadCSS; 237 238 root.joms.Hammer = root.Hammer; 239 root.Hammer = root.joms_cache_Hammer; 240 delete root.joms_cache_Hammer; 241 242 root.joms._ = root._; // .noConflict(); 243 root.joms.Backbone = root.Backbone.noConflict(); 244 root.joms.Backbone.$ = root.joms.jQuery; 245} 246 247// EXECUTE LOADING SEQUENCE! 248 249document.addEventListener("DOMContentLoaded", function() { 250 if ( root.joms_assets_url ) { 251 load(); 252 253 } else { 254 root.joms.warn( 'Variable `joms_assets_url` is not defined.' ); 255 } 256}); 257 258})( this ); 259 260joms || (joms = {}); 261joms.map = { 262 263 // callback queue 264 queue: [], 265 266 // google map proxy 267 execute: function( callback ) { 268 269 if(this.type == "openstreetmap"){ 270 this.executeOpenStreetmap(callback); 271 }else{ 272 this.executeGoogle(callback); 273 } 274 275 }, 276 277 executeGoogle: function(callback){ 278 if ( window.google && window.google.maps && window.google.maps.places ) { 279 callback(); 280 return; 281 } 282 283 if ( joms.map.loading ) { 284 joms.map.queue.push( callback ); 285 return; 286 } 287 288 joms.map.loading = true; 289 joms.map.queue.push( callback ); 290 joms.map.loadScript(); 291 }, 292 293 executeOpenStreetmap: function(callback){ 294 if ( window.L && window.L.map) { 295 callback(); 296 return; 297 } 298 299 if ( joms.map.loading ) { 300 joms.map.queue.push( callback ); 301 return; 302 } 303 304 joms.map.loading = true; 305 joms.map.queue.push( callback ); 306 joms.map.loadScriptOpenstreet(); 307 }, 308 309 // google map library loader
310 loadScript: function() { 311 if(this.type == "openstreetmap"){ 312 this.executeOpenStreetmap(); 313 }else{ 314 this.loadScriptGoogle(); 315 } 316 }, 317 318 loadScriptGoogle: function(){ 319 320 var script = document.createElement('script'); 321 script.type = 'text/javascript'; 322 script.src = '//maps.googleapis.com/maps/api/js?libraries=places&key='+joms_gmap_key+'&sensor=false&callback=joms.map.loadScriptCallback'; 323 document.body.appendChild(script); 324 325 }, 326 327 loadScriptOpenstreet: function(){ 328 var r ; 329 r = false; 330 var script = document.createElement("script"); 331 script.type = "text/javascript"; 332 script.src = "https://unpkg.com/[email protected]/dist/leaflet.js"; 333 334 document.body.appendChild(script); 335 336 script.onload = script.onreadystatechange = function() { 337 338 if (!r && (!this.readyState || this.readyState == 'complete')) { 339 r = true; 340 joms.map.loadScriptCallback(); 341 } 342 }; 343 344 //script = document.createElement("script"); 345 //script.type = "text/javascript"; 346 //script.src = "https://unpkg.com/[email protected]/dist/leaflet.markercluster-src.js"; 347 348 //document.body.appendChild(script); 349 var script2 = document.createElement("script"); 350 if(typeof openstreetmap == "undefined"){ 351 script2 = document.createElement( 'script' ); 352 script2.type = 'text/javascript'; 353 script2.src = joms.ASSETS_URL+'source/js/utils/openstreet.js'; 354 355 document.body.appendChild( script2 ); 356 } 357 jQuery("<link>") 358 .appendTo("head") 359 .attr({ 360 type: "text/css", 361 rel: "stylesheet", 362 href: "https://unpkg.com/[email protected]/dist/leaflet.css" 363 }); 364 jQuery("<link>") 365 .appendTo("head") 366 .attr({ 367 type: "text/css", 368 rel: "stylesheet", 369 href: "https://unpkg.com/[email protected]/dist/MarkerCluster.css" 370 }); 371 jQuery("<link>") 372 .appendTo("head") 373 .attr({ 374 type: "text/css", 375 rel: "stylesheet", 376 href: "https://unpkg.com/[email protected]/dist/MarkerCluster.Default.css" 377 }); 378 379 380 }, 381 382 // callback for google map library loader 383 loadScriptCallback: function() { 384 if ( joms.map.queue && joms.map.queue.length ) 385 while ( joms.map.queue.length ) 386 ( joms.map.queue.shift() )(); 387 388 joms.map.loading = false; 389 } 390 391}; 392
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.