File Manager

Current Directory: /home/astoriaah/www/media/com_widgetkit/js
Viewing File: /home/astoriaah/www/media/com_widgetkit/js/admin.js
"use strict";!function(e,t){function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=n(e),s=n(t);function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var i="object"==typeof global&&global&&global.Object===Object&&global,a="object"==typeof self&&self&&self.Object===Object&&self,o=i||a||Function("return this")(),l=o.Symbol,d=Object.prototype,c=d.hasOwnProperty,p=d.toString,f=l?l.toStringTag:void 0;var g=Object.prototype.toString;var m="[object Null]",h="[object Undefined]",v=l?l.toStringTag:void 0;function w(e){return null==e?void 0===e?h:m:v&&v in Object(e)?function(e){var t=c.call(e,f),n=e[f];try{var i=!(e[f]=void 0)}catch(e){}var a=p.call(e);return i&&(t?e[f]=n:delete e[f]),a}(e):(t=e,g.call(t));var t}var y="[object Symbol]";var k=/\s/;var b=/^\s+/;function x(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&k.test(e.charAt(t)););return t}(e)+1).replace(b,""):e}function $(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var j=NaN,E=/^[-+]0x[0-9a-f]+$/i,T=/^0b[01]+$/i,C=/^0o[0-7]+$/i,_=parseInt;function O(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||null!=(n=t)&&"object"==typeof n&&w(t)==y)return j;var t,n;if($(e)){var i="function"==typeof e.valueOf?e.valueOf():e;e=$(i)?i+"":i}if("string"!=typeof e)return 0===e?e:+e;e=x(e);var a=T.test(e);return a||C.test(e)?_(e.slice(2),a?2:8):E.test(e)?j:+e}var S=function(){return o.Date.now()},A="Expected a function",M=Math.max,V=Math.min;function q(i,a,e){var o,r,l,d,c,u,s=0,p=!1,f=!1,t=!0;if("function"!=typeof i)throw new TypeError(A);function g(e){var t=o,n=r;return o=r=void 0,s=e,d=i.apply(n,t)}function m(e){var t=e-u;return void 0===u||a<=t||t<0||f&&l<=e-s}function h(){var e,t,n=S();if(m(n))return v(n);c=setTimeout(h,(t=a-((e=n)-u),f?V(t,l-(e-s)):t))}function v(e){return c=void 0,t&&o?g(e):(o=r=void 0,d)}function n(){var e,t=S(),n=m(t);if(o=arguments,r=this,u=t,n){if(void 0===c)return s=e=u,c=setTimeout(h,a),p?g(e):d;if(f)return clearTimeout(c),c=setTimeout(h,a),g(u)}return void 0===c&&(c=setTimeout(h,a)),d}return a=O(a)||0,$(e)&&(p=!!e.leading,l=(f="maxWait"in e)?M(O(e.maxWait)||0,a):l,t="trailing"in e?!!e.trailing:t),n.cancel=function(){void 0!==c&&clearTimeout(c),o=u=r=c=void(s=0)},n.flush=function(){return void 0===c?d:v(S())},n}var I="Expected a function";function L(e){u.default.extend(this,{tag:"",attrs:{},type:"single",content:""},e)}function P(e){var t=u.default.Deferred(),n=document.createElement("script");return n.onload=t.resolve,n.onerror=t.reject,n.src=e,document.head.appendChild(n),t.promise()}u.default.extend(L,{parse:function(e,t){var n,i=this.regexp(e).exec(t),a={tag:e};return i&&(n=i[4]?"self-closing":i[6]?"closed":"single",a={tag:i[2],attrs:this.attrs(i[3]),type:n,content:i[5]}),new L(a)},attrs:function(e){var t,n=/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*'([^']*)'(?:\s|$)|(\w+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/g,i={};for(e=e.replace(/[\u00a0\u200b]/g," ");t=n.exec(e);)t[1]?i[t[1].toLowerCase()]=t[2]:t[3]?i[t[3].toLowerCase()]=t[4]:!t[5]||"true"!==t[6]&&"1"!==t[6]?!t[5]||"false"!==t[6]&&"0"!==t[6]?t[5]?i[t[5].toLowerCase()]=t[6]:t[7]?i[t[7]]=!0:t[8]&&(i[t[8]]=!0):i[t[5].toLowerCase()]=!1:i[t[5].toLowerCase()]=!0;return i},regexp:function(e){return new RegExp("\\[(\\[?)("+e+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}}),u.default.extend(L.prototype,{string:function(){var n="["+this.tag;return u.default.each(this.attrs,function(e,t){"boolean"==typeof t?n+=" "+e+"="+(t?1:0):""!==t&&(n+=" "+e+'="'+t+'"')}),"single"===this.type?n+"]":"self-closing"===this.type?n+" /]":(n+="]",this.content&&(n+=this.content),n+"[/"+this.tag+"]")}}),s.default.module("widgetkit",["Application","ngResource","ngTouch","Fields"]).value("name","widgetkit").value("UIkit",window.UIkit).factory("Content",["$resource","Application",function(e,t){return e(t.url("/content/:id"),{},{query:{method:"GET",responseType:"json"},save:{method:"POST",responseType:"json"}})}]).filter("supported",["Application",function(i){return function(e,n){return n?e.filter(function(e){var t=i.config.types[e.type];return n.item.filter(function(e){if(-1!==t.item.indexOf(e))return!0}).length===n.item.length}):e}}]).filter("ucwords",["Application",function(){return function(e){return e.replace(/([-_])/g," ").replace(/^([a-z\u00E0-\u00FC])|\s+([a-z\u00E0-\u00FC])/g,function(e){return e.toUpperCase()})}}]).service("mediaInfo",["Application","$q",function(d,c){return function(e,t){var n,i,a={url:e=e||"",type:"",src:e&&!e.match(/^(https?:)?\//)?d.baseUrl()+"/"+e:e,provider:null,image:d.config.images.placeholder,width:null,height:null};if(e.match(/\.(jpe?g|png|gif|svg)$/i)?(a.type="image",a.image=a.src):e.match(/\.(mp3|ogg|wav)$/)?(a.type="audio",a.image=d.config.images.audio):e.match(/\.(mp4|ogv|webm)$/)?(a.type="video",a.image=d.config.images.video):(n=/(\/\/.*?)vimeo\.[a-z]+\/(?:\w*\/)*(\d+)/i.exec(e))?(a.provider="vimeo",a.type="iframe",a.src="//player.vimeo.com/video/"+n[2],a.image=d.config.images.iframe):((n=/(\/\/.*?youtube\.[a-z]+)\/watch\?v=([^&]+)(.*)/i.exec(e))||(n=/(\/\/.*?youtu\.be)\/([^?]+)(.*)/i.exec(e)))&&(a.provider="youtube",a.type="iframe",a.src="//www.youtube.com/embed/"+n[2]+n[3].replace(/^&/,"?"),a.image="//img.youtube.com/vi/"+n[2]+"/hqdefault.jpg"),t)switch(i=c.defer(),a.type){case"image":var o=new Image;o.onerror=function(){i.resolve(a)},o.onload=function(){a.width=o.width,a.height=o.height,i.resolve(a)},o.src=a.src;break;case"video":var r=s.default.element('<video style="position:fixed;visibility:hidden;top:-10000px;"></video>').attr("src",a.src).appendTo("body"),l=setInterval(function(){r[0].videoWidth&&(clearInterval(l),a.width=r[0].videoWidth,a.height=r[0].videoHeight,r.remove(),i.resolve(a))},20);break;case"iframe":"vimeo"===a.provider&&u.default.ajax({type:"GET",url:"//vimeo.com/api/oembed.json?url="+encodeURI(a.url),jsonp:"callback",dataType:"jsonp",success:function(e){a.width=e.width,a.height=e.height,i.resolve(a)}}).fail(function(){i.resolve(a)}),"youtube"===a.provider&&u.default.ajax({type:"GET",url:"//query.yahooapis.com/v1/public/yql",data:{q:"select * from json where url ='http://www.youtube.com/oembed?url="+encodeURI(a.url)+"'",format:"json"},dataType:"jsonp",success:function(e){if(e&&e.query&&e.query.results&&e.query.results.json){var t=u.default(e.query.results.json.html);a.width=t.attr("width"),a.height=t.attr("height")}i.resolve(a)}}).fail(function(){i.resolve(a)});break;default:i.resolve(a)}return t?i.promise:a}}]).factory("httpInterceptor",["$q","$rootElement","UIkit",function(n,i,a){return{responseError:function(e){var t;return t=e.data&&e.data.message?e.data.message:e.statusText,a.notification({message:t,status:"danger",container:i}),n.reject(e)}}}]).config(["$httpProvider","$sceProvider",function(e,t){e.interceptors.push("httpInterceptor"),t.enabled(!1)}]),function(){function o(o,e,t,n,i){var a,r,l=this,d=window.localStorage||{};l.viewmode=d["wk.content.viewmode"]||"list",l.include="",a=o,(r=(r=l)||a).widgets=[],a.data&&a.data.widgets&&(a.search=c["widgetkit.widgets.filter"]?JSON.parse(c["widgetkit.widgets.filter"]):{name:"",data:{_widget:{name:""}}},a.$watch("search",function(){c["widgetkit.widgets.filter"]=JSON.stringify(angular.copy(a.search))},!0),r.widgets.push({name:"",label:Translator?Translator.trans("All"):"All"}),Object.keys(a.data.widgets).sort().forEach(function(e){r.widgets.push(a.data.widgets[e])})),l.previewContent=function(e){return o.$emit("wk.preview.content",e).preview||o.data.types[e.type].icon},l.createContent=function(e){o.content=e||{name:"",type:null,data:{_widget:{}}},o.widget=null,l.setView("contentConfig")},l.editContent=function(e,t){var n=null,i=o.data.widgets,a=(e=angular.copy(e)).data._widget;e.id||(angular.extend(e.data,o.data.types[e.type].data),e.id="new"),i[a.name]?((n=angular.copy(i[a.name])).data=a.data=angular.extend({},n.settings,a.data),o.content=e,o.widget=n,l.setView("contentEdit",t)):l.createContent(e)},l.saveContent=function(){return"new"===o.content.id&&delete o.content.id,n.save({id:o.content.id},{content:o.content},function(e){l.editContent(o.data.content[e.id]=e),t.notification({message:e.name+" saved.",status:"success",container:i})})},l.copyContent=function(e){return(e=angular.copy(e)).id="",e.name+=" (copy)",n.save({id:e.id},{content:e},function(e){(o.data.content[e.id]=e).data._widget=angular.isArray(e.data._widget)?{}:e.data._widget,t.notification({message:e.name+" copied.",status:"success",container:i})})},l.deleteContent=function(e){confirm("Are you sure?")&&n.delete({id:e.id},function(){delete o.data.content[e.id]})},l.getWidget=function(e){return o.data.widgets[e.data._widget.name]},l.selectWidget=function(e){var t=o.content.data;t._widget.name!==e.name&&(t._widget.name=e.name,t._widget.data={})},l.setView=function(e,t){l.view=e,t&&(l.include=t),o.$emit("wk.change.view",e)},l.setViewMode=function(e){l.viewmode=d["wk.content.viewmode"]=e},l.setView("content")}var c;angular.module("widgetkit").controller("contentCtrl",["$scope","$rootElement","Application","UIkit","Content",function(t,e,n,i,a){t.loaded=!1,t.data=angular.extend({content:a.query(function(e){angular.forEach(e,function(e,t){"$"!==t[0]&&(e.data=angular.extend({_widget:{}},e.data),e.data._widget=angular.isArray(e.data._widget)?{}:e.data._widget)}),t.loaded=!0})},n.config),this.name="contentCtrl",o.call(this,t,n,i,a,e)}]).controller("pickerCtrl",["$scope","$rootElement","Application","UIkit","Content",function(t,e,n,i,a){t.loaded=!1,t.data=angular.extend({content:a.query(function(e){angular.forEach(e,function(e,t){"$"!==t[0]&&(e.data=angular.extend({_widget:{}},e.data),e.data._widget=angular.isArray(e.data._widget)?{}:e.data._widget)}),t.loaded=!0})},n.config),this.name="pickerCtrl",this.update=function(e){var t,n;null!=(t=window.parent)&&t.postMessage({message:"selectWidget",widget:{id:e.id,name:e.name}}),null==(n=window.parent)||null!=n.selectWidget&&n.selectWidget({id:e.id,name:e.name})},o.call(this,t,n,i,a,e)}]);try{var e="__test__";(c=window.sessionStorage||{})[e]=1,delete c[e]}catch(e){c={}}}(),s.default.module("widgetkit").directive("mediaPreview",["mediaInfo",function(t){return{restrict:"E",scope:{src:"@"},controller:["$scope",function(e){this.type=function(){return e.media=t(e.src),e.media.type},this.cleanUrl=function(e){return"string"==typeof e&&(e=e.replace("autoplay=1","autoplay=0")),e}}],controllerAs:"vm",template:'<div ng-switch="vm.type()">\n <audio ng-switch-when="audio" ng-src="{{ media.src }}" controls="true"></audio>\n <video ng-switch-when="video" ng-src="{{ media.src }}" controls="true"></video>\n <iframe ng-switch-when="iframe" ng-src="{{ vm.cleanUrl(media.src) }}" frameborder="0" width="1920" height="1080" allowfullscreen uk-responsive></iframe>\n <img ng-switch-default ng-src="{{ media.src }}">\n </div>'}}]).directive("autofocus",["$timeout",function(n){return{restrict:"A",link:function(e,t){n(function(){t[0].focus()})}}}]),s.default.module("Fields",[]).directive("fieldMedia",["mediaPicker","mediaInfo",function(e,n){var i={};return{scope:{media:"=",options:"=?",title:"=?"},restrict:"E",controller:["$scope",function(t){this.selectMedia=function(){e.select().then(function(e){t.media=e.url,t.height=e.height,t.width=e.width,t.title||(t.title=String(e.title).replace(/([-_])/g," ").replace(/^([a-z\u00E0-\u00FC])|\s+([a-z\u00E0-\u00FC])/g,function(e){return e.toUpperCase()}))})},this.selectPoster=function(){e.select().then(function(e){t.options||(t.options={}),t.options.poster=e.url})},this.isVideo=function(e){return!(!e||!(e.match(/\.(mp4|ogv|webm)$/)||e.match(/(\/\/.*?)vimeo\.[a-z]+\/(?:\w*\/)*(\d+)/i)||e.match(/(\/\/.*?youtube\.[a-z]+)\/watch\?v=([^&]+)(.*)/i)||e.match(/(\/\/.*?youtu\.be)\/([^?]+)(.*)/i)))},t.$watch("media",function(e){if(void 0===e&&(t.media=""),t.options&&!s.default.isArray(t.options)||(t.options={}),i[t.media])return t.options.width=i[t.media].width,void(t.options.height=i[t.media].height);n(t.media,!0).then(function(e){t.height="",t.width="",0<Object.keys(i).length&&t.options.iframe&&!i[t.media]&&(t.options.iframe.width="",t.options.iframe.height=""),e.type&&(t.options.width=e.width,t.options.height=e.height,t.options.type=e.type,i[t.media]=e)})},!0),t.$watch("options.iframe",function(){t.options.iframe&&(t.options.width=t.options.iframe.width,t.options.height=t.options.iframe.height)},!0)}],controllerAs:"vm",template:'<div>\n <div class="uk-grid-small" uk-grid>\n <div class="uk-width-expand">\n <div class="uk-position-relative">\n <span class="uk-form-icon" uk-icon="image"></span><input class="uk-input" ng-model="media">\n </div>\n </div>\n <div class="uk-width-auto">\n <button class="uk-button uk-button-default" ng-click="vm.selectMedia()">Select</button>\n </div>\n </div>\n <div class="uk-grid uk-margin-top">\n <div class="uk-width-1-2@s">\n <div class="uk-inline-clip">\n <media-preview src="{{ media }}"></media-preview>\n <div class="uk-grid uk-grid-small uk-child-width-auto uk-margin-top" ng-show="options.type === \'iframe\'">\n <div><input class="uk-input uk-form-width-medium" type="text" ng-model="options.iframe.width" placeholder="Width"></div>\n <div><input class="uk-input uk-form-width-medium" type="text" ng-model="options.iframe.height" placeholder="Height"></div>\n </div>\n </div>\n </div>\n <div class="uk-width-1-2@s" ng-show="vm.isVideo(media)">\n <div class="uk-margin-bottom" ng-show="options.poster"><media-preview src="{{ options.poster }}"></media-preview></div>\n <a class="uk-button uk-button-default uk-margin-small-right" ng-click="vm.selectPoster()">Select Poster</button>\n <a class="uk-button uk-button-text" ng-show="options.poster" ng-click="(options.poster = \'\')">Reset</a>\n </div>\n </div>\n </div>'}}]).directive("fieldHtmleditor",["$timeout",function(o){var t;return{restrict:"EA",require:"?ngModel",link:function(n,e,i,a){(function(){if(!t){var e=window.widgetkit.config;t=u.default.Deferred(),P(e.assetsBase+"/lib/codemirror/codemirror.js").then(function(){return t.resolve()})}return t.promise()})().then(function(){var t=u.default("<textarea></textarea>");e.after(t).hide(),o(function(){setTimeout(function(){var e=CodeMirror.fromTextArea(t[0],r({autoCloseBrackets:!0,autoCloseTags:!0,autofocus:!1,dragDrop:!1,indentUnit:4,indentWithTabs:!1,lineNumbers:!0,lineWrapping:!0,matchBrackets:!0,matchTags:!0,tabSize:4,viewportMargin:2,smartIndent:!1},n.$eval(i.options)));e.on("change",function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError(I);return $(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),q(e,t,{leading:i,maxWait:t,trailing:a})}(function(){a.$setViewValue(e.getValue()),n.$root.$$phase||n.$apply()},50)),a.$render=function(){e.setValue(a.$viewValue||""),e.refresh()},a.$render()})})})}}}]).directive("fieldLocation",[function(){var i;function t(){var e,t,n;return i=i||u.default.when((e="https://cdn.jsdelivr.net/npm/leaflet@1.7.1/dist/leaflet.css",t=u.default.Deferred(),(n=document.createElement("link")).href=e,n.type="text/css",n.rel="stylesheet",n.onload=t.resolve,n.onerror=t.reject,document.head.appendChild(n),t.promise()),P("https://cdn.jsdelivr.net/npm/leaflet@1.7.1/dist/leaflet.js"),P("https://cdn.jsdelivr.net/npm/places.js@1.19.0"))}return{restrict:"EA",require:"?ngModel",replace:!0,template:'<div>\n <div class="uk-grid-small uk-child-width-1-2" uk-grid>\n <div>\n <input class="uk-input" type="text" placeholder="{{ lat.toFixed(4) + \',\' + lng.toFixed(4) }}">\n </div>\n <div>\n <input class="uk-input" type="text" placeholder="Custom marker: URL or #000" ng-model="marker">\n </div>\n </div>\n <div class="uk-margin js-map" style="min-height: 300px; z-index: 0">Loading map…</div>\n </div>',link:function(l,d,e,c){t().then(function(){var e=d[0],t=window,n=t.L,i=t.places,a=n.map(e.querySelector(".js-map")),o=new n.marker(["53.5503","10.0006"],{draggable:!0}),r=i({container:e.querySelector("input")});n.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://osm.org/copyright">OpenStreetMap</a>'}).addTo(a),o.on("dragend",function(){var e=o.getLatLng(),t=e.lat,n=e.lng;l.lat=t,l.lng=n,l.$apply()}),r.on("change",function(e){var t=e.suggestion.latlng,n=t.lat,i=t.lng;l.lat=n,l.lng=i,l.$apply(),r.close()}),a.addLayer(o),l.$watchGroup(["lat","lng","marker"],function(e){var t=e[0],n=e[1],i=e[2];c.$setViewValue({lat:t,lng:n,marker:i}),r.setVal(""),a.setView([t,n],13),o.setLatLng([t,n]).update()},!0),c.$render=function(){var e=c.$viewValue||{lat:53.5503,lng:10.0006,marker:""},t=e.lat,n=e.lng,i=e.marker;l.lat=t,l.lng=n,l.marker=i},c.$render(),l.$apply(),d.on("$destroy",function(){a.off(),r.destroy()})})}}}]).directive("fieldPathpicker",["mediaPicker",function(e){return{scope:{path:"="},restrict:"E",controller:["$scope",function(t){this.selectPath=function(){e.select({allowedFiletypes:/\.*$/i}).then(function(e){t.path=e.url})},t.$watch("path",function(e){t.path=e},!0)}],controllerAs:"vm",template:'<div>\n <div class="uk-flex">\n <div class="uk-inline uk-flex-1 uk-margin-small-right">\n <span class="uk-form-icon" uk-icon="link"></span><input class="uk-input" ng-model="path">\n </div>\n <button class="uk-button uk-button-default" ng-click="vm.selectPath()">Select</button>\n </div>\n </div>'}}]).directive("fieldDate",[function(){return{restrict:"E",require:"?ngModel",scope:{date:"@"},template:'<div class="uk-inline uk-width-1-1">\n <input class="uk-input" type="datetime-local" ng-model="date">\n </div>',link:function(e,t,n,i){e.$watch("date",function(e){return i.$setViewValue(e)}),i.$render=function(){e.date=new Date(i.$viewValue)},i.$render()}}}]).factory("Fields",function(){var n={text:{label:"Text",template:function(e,t){var n=s.default.element('<input class="uk-input" type="text" ng-model="'+e+'">').attr(t.attributes||{});return t&&t.icon&&(n=n.wrap('<div class="uk-inline uk-width-1-1"></div>').before('<span class="uk-form-icon" uk-icon="'+t.icon+'"></span>').parent()),n}},textarea:{label:"Textarea",template:function(e,t){return s.default.element('<textarea id="wk-content" class="uk-textarea" ng-model="'+e+'" rows="10"></textarea>').attr(t.attributes||{})}},editor:{label:"Editor",template:function(e){var t=window.tinyMCE&&window.WK_SYSTEM_EDITOR?"wysiwygeditor":"htmleditor";return s.default.element("<field-"+t+' ng-model="'+e+'" rows="10"></field-'+t+">")}},htmleditor:{label:"HTML Editor",template:function(e){var t="htmleditor";return s.default.element("<field-"+t+' ng-model="'+e+'" rows="10"></field-'+t+">")}},tags:{label:"Tags",template:function(e,t){return s.default.element('<div class="uk-inline uk-width-1-1"><span class="uk-form-icon" uk-icon="tag"></span><input class="uk-input" type="text" ng-list ng-model="'+e+'" placeholder="tag, tag, ..."></div><div>').find("input").attr(t.attributes||{}).parent()}},boolean:{label:"Boolean",template:function(e,t){return s.default.element('<input class="uk-checkbox" type="checkbox" ng-model="'+e+'">').attr(t.attributes||{})}},media:{label:"Media",template:function(e){return'<field-media media="'+e+'"></field-media>'}},pathpicker:{label:"Pathpicker",template:function(e){return'<field-pathpicker path="'+e+'"></field-pathpicker>'}},location:{label:"Location",template:function(e){return'<field-location ng-model="'+e+'"></field-location>'}},date:{label:"Date",template:function(e){return'<field-date ng-model="'+e+'"></field-date>'}}};return{register:function(e,t){n[e]=s.default.extend({label:e,assets:[],template:function(){}},t)},exists:function(e){return!!n[e]},get:function(e){return n[e]},fields:function(){var t=[];return Object.keys(n).forEach(function(e){t.push({name:e,label:n[e].label})}),t}}}).directive("field",["$timeout","$compile","Fields",function(e,r,l){return{require:"?ngModel",restrict:"E",link:function(i,a,o){e(function(){var e=s.default.extend({},JSON.parse(o.options||"{}")),t=o.type||"text";if(l.exists(t)){var n=l.get(t).template(o.ngModel,e);n.then?n.then(function(e){r(a.html(e).contents())(i)}):r(a.html(n).contents())(i)}else r(a.html(l.get("text").template(o.ngModel)).contents())(i)})}}}]),u.default(function(){u.default.extend(window.widgetkit,{shortcode:L})})}(jQuery,angular);