{"version":3,"sources":["webpack://2sic-bootstrap-content-templates/./src/ts/get-script.ts","webpack://2sic-bootstrap-content-templates/./src/ts/google-maps/google-maps.ts","webpack://2sic-bootstrap-content-templates/./src/ts/google-maps/maps-jquery.ts","webpack://2sic-bootstrap-content-templates/./src/ts/jquery-fade-in.ts","webpack://2sic-bootstrap-content-templates/./src/ts/mail-obfuscator.ts","webpack://2sic-bootstrap-content-templates/./src/ts/youtube-preview.ts","webpack://2sic-bootstrap-content-templates/webpack/bootstrap","webpack://2sic-bootstrap-content-templates/./src/ts/index.ts"],"names":["source","callback","script","document","createElement","prior","getElementsByTagName","async","onload","onreadystatechange","_","isAbort","readyState","test","undefined","setTimeout","src","parentNode","insertBefore","debug","winAny","window","globalCallbackName","isLoading","load","apiKey","this","loadPromise","$","Deferred","thisInCallback","resolve","configureMap","getScript","domId","icon","zoom","lat","lng","info","warn","toGoogleMap","position","mapTypeId","infoWindowHtml","showInfoWindow","showKeyWarnings","googleMapsElem","length","each","i","elem","hasClass","addClass","append","GoogleMapsTurnOn","mapsLoadedPromise","console","log","fn","options","mapElement","get","promise","then","settings","extend","mapOptions","mapTypeControl","center","zoomControl","scaleControl","scrollwheel","google","maps","MapTypeId","map","Map","marker","Marker","infoWindow","InfoWindow","content","event","addListener","open","addListenerOnce","jQueryProto","__proto__","fadeIn","not","$this","maddr","attr","linktext","after","hide","youtubeElem","off","on","iframeId","data","iframeElem","youtubeUrl","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","appContent","activateYouTubeInline","showEncryptedMails","monkeyPatchjQueryFade"],"mappings":"yEACA,qBAA0BA,EAAgBC,GACxC,IAAIC,EAASC,SAASC,cAAc,UAChCC,EAAQF,SAASG,qBAAqB,UAAU,GACnDJ,EAAeK,MAAQ,EAEvBL,EAAeM,OAAUN,EAAeO,mBAAqB,SAAUC,EAAQC,IACzEA,IAAaT,EAAeU,YAAc,kBAAkBC,KAAMX,EAAeU,eAChFV,EAAOM,OAAUN,E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E,6BAEK,GAAtBqE,EAAYjD,QAGbiD,EAAYhD,MAAK,WAGfrB,EAAEF,MAAMwE,IAAI,SAASC,GAAG,SAAS,WAC/B,IAAIC,EAAWxE,EAAEF,MAAM2E,KAAK,WACxBC,EAAa1E,EAAE,IAAMwE,GACrBG,EAAaD,EAAWD,KAAK,eACjCC,EAAWT,KAAK,MAAOU,GACvB3E,EAAEF,MAAM2B,SAAS,iBCbrBmD,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqB5F,IAAjB6F,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,IAOV,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,Q,ICrBf,EACA,EACA,EACA,EAGMxF,EANN,SACA,SACA,SACA,SAGMA,EAAUC,QACT0F,WAAa3F,EAAO2F,YAAc,GACzC3F,EAAO2F,WAAWrC,KAAOtD,EAAO2F,WAAWrC,MAAQ,IAAI,EAAAnB,iBACvDnC,EAAO2F,WAAWC,sBAAwB5F,EAAO2F,WAAWC,uBAAyB,EAAAA,sBACrF5F,EAAO2F,WAAWE,mBAAqB7F,EAAO2F,WAAWE,oBAAsB,EAAAA,mBAI/ErF,EAAE,EAAAsF,wB","file":"scripts.min.js","sourcesContent":["// https://stackoverflow.com/a/28002292/6834738\r\nexport function getScript(source: string, callback: any) {\r\n var script = document.createElement('script');\r\n var prior = document.getElementsByTagName('script')[0];\r\n (script as any).async = 1;\r\n\r\n (script as any).onload = (script as any).onreadystatechange = function( _: any, isAbort: any ) {\r\n if(isAbort || !(script as any).readyState || /loaded|complete/.test((script as any).readyState) ) {\r\n script.onload = (script as any).onreadystatechange = null;\r\n script = undefined;\r\n\r\n if(!isAbort && callback) setTimeout(callback, 0);\r\n }\r\n };\r\n\r\n script.src = source;\r\n prior.parentNode.insertBefore(script, prior);\r\n}\r\n","import { getScript } from '../get-script';\r\nimport { MapDefinition } from './map-definition';\r\nimport { registerToGoogleMap as registerJQueryToGoogleMap } from './maps-jquery';\r\n\r\nconst debug = false;\r\nconst winAny = window as any;\r\nconst globalCallbackName = 'appContentGoogleMapsCallback';\r\n\r\n/**\r\n * Class to load GoogleMaps and activate the jQuery.toGoogleMap(...) function. \r\n * When done, it will publish another method which can be called by all parts wanting to register a map using turnOn\r\n */\r\nexport class GoogleMapsTurnOn {\r\n\r\n /** \r\n * This is the signature of turnOn once it's initialized. \r\n * It doesn't exist at first and will be provided when everything is ready.\r\n */\r\n configureMap: (data: MapDefinition) => void;\r\n\r\n /** Status to track if loading already started (prevent multiple runs) */\r\n isLoading = false;\r\n\r\n /** Load Google Maps and prepare for use */\r\n load(apiKey: string) {\r\n if(debug) console.log('activate', apiKey);\r\n if(!apiKey) return; // check api key exists\r\n if(this.isLoading) return; // Prevent multiple inits in case this is triggered again\r\n this.isLoading = true;\r\n \r\n // This promise will be triggered indirectly when Google Maps has loaded. It's used in the toGoogleMaps\r\n const loadPromise = $.Deferred();\r\n registerJQueryToGoogleMap(loadPromise, debug);\r\n \r\n // Callback which google-maps will trigger automatically when loaded\r\n // we must be sure to not define this twice, as otherwise a second instance would overwrite an initialized one\r\n const thisInCallback = this;\r\n if(!winAny[globalCallbackName]) winAny[globalCallbackName] = function() {\r\n if(debug) console.log('googleMapLoadCallback');\r\n\r\n // Resolve promise so the jQuery toGoogleMap can start working\r\n loadPromise.resolve(true);\r\n \r\n // Now Activate the turnOnMap command so this can be used from outside\r\n thisInCallback.configureMap = configureMap; \r\n };\r\n\r\n // Load the Google Maps scripts - will trigger the callback (see above)\r\n getScript(`//maps.google.com/maps/api/js?key=${apiKey}&sensor=true&callback=${globalCallbackName}`, null);\r\n }\r\n}\r\n\r\n\r\n\r\nfunction configureMap({domId, icon, zoom, lat, lng, info, warn } : MapDefinition) {\r\n if(debug) console.log('build map', arguments);\r\n\r\n ($('#' + domId) as any).toGoogleMap({\r\n position: {\r\n lat: lat,\r\n lng: lng\r\n },\r\n zoom: zoom,\r\n mapTypeId: \"ROADMAP\",\r\n infoWindowHtml: info,\r\n showInfoWindow: false,\r\n icon: icon\r\n });\r\n\r\n if(warn) showKeyWarnings();\r\n};\r\n\r\nfunction showKeyWarnings() {\r\n const googleMapsElem = $('.co-google-map-container');\r\n\r\n // check if it's the original key, which shouldn't be used in live sites\r\n // do not turn this off, it's important!\r\n // to disable the warning, replace the API key as explained on //github.com/2sic/2sxc-content-bootstrap3/wiki/google-maps-api-key\r\n if(googleMapsElem.length != 0)\r\n googleMapsElem.each(function(i, elem) {\r\n if (!$(elem).hasClass('has-warning')) {\r\n $(elem).addClass('has-warning');\r\n $(elem).append('
Warning: This map uses a demo API-Key, which will cause problems on live web sites. Change the GoogleApiKey using these instructions
');\r\n }\r\n });\r\n}","// This will be attached to window once google is loaded\r\ndeclare const google : any;\r\n\r\n// the init-code\r\nexport function registerToGoogleMap(mapsLoadedPromise: JQuery.Deferred