/home/techb158/dev.aleamaralawal.com/wp-content/plugins/gravityforms/js
Edit: /home/techb158/dev.aleamaralawal.com/wp-content/plugins/gravityforms/js/shortcode-ui.min.js (10910B)
var GformShortcodeUI;(u=>{var n=window.gform_admin_config.i18n,r=window.GformShortcodeUI={models:{},collections:{},views:{},utils:{},strings:{}};r.models.ShortcodeAttribute=Backbone.Model.extend({defaults:{attr:"",label:"",type:"",section:"",description:"",default:"",value:""}}),r.models.ShortcodeAttributes=Backbone.Collection.extend({model:r.models.ShortcodeAttribute,clone:function(){return new this.constructor(_.map(this.models,function(e){return e.clone()}))}}),r.models.Shortcode=Backbone.Model.extend({defaults:{label:"",shortcode_tag:"",action_tag:"",attrs:r.models.ShortcodeAttributes},set:function(e,t){return void 0===e.attrs||e.attrs instanceof r.models.ShortcodeAttributes||(_.each(e.attrs,function(e){null!=e.default&&(e.value=e.default)}),e.attrs=new r.models.ShortcodeAttributes(e.attrs)),Backbone.Model.prototype.set.call(this,e,t)},toJSON:function(e){return void 0!==(e=Backbone.Model.prototype.toJSON.call(this,e)).attrs&&e.attrs instanceof r.models.ShortcodeAttributes&&(e.attrs=e.attrs.toJSON()),e},clone:function(){var e=Backbone.Model.prototype.clone.call(this);return e.set("attrs",e.get("attrs").clone()),e},formatShortcode:function(){var e,r,i=[];return this.get("attrs").each(function(e){var t=e.get("value"),o=e.get("type"),n=e.get("default");(!t||t.length<1)&&"checkbox"!=o||"checkbox"==o&&"true"!=n&&!t||("content"===e.get("attr")?r=e.get("value"):i.push(e.get("attr")+'="'+t+'"'))}),e="[{{ shortcode }} {{ attributes }}]",r&&0
')}}),r.views.editAttributeField=Backbone.View.extend({tagName:"div",initialize:function(e){this.parent=e.parent},events:{'keyup input[type="text"]':"updateValue","keyup textarea":"updateValue","change select":"updateValue","change #gf-shortcode-attr-action":"updateAction","change input[type=checkbox]":"updateCheckbox","change input[type=radio]":"updateValue","change input[type=email]":"updateValue","change input[type=number]":"updateValue","change input[type=date]":"updateValue","change input[type=url]":"updateValue"},render:function(){return this.template=wp.media.template("gf-shortcode-ui-field-"+this.model.get("type")),this.$el.html(this.template(this.model.toJSON()))},updateValue:function(e){e=u(e.target);this.model.set("value",e.val())},updateCheckbox:function(e){e=u(e.target).prop("checked");this.model.set("value",e)},updateAction:function(e){var e=u(e.target).val(),t=(this.model.set("value",e),this.parent.model),e=r.shortcodes.findWhere({shortcode_tag:"gravityform",action_tag:e}),n=t.get("attrs"),t=(e.get("attrs").each(function(e){var t=e.get("attr"),o=n.findWhere({attr:t});void 0!==o&&t==o.get("attr")&&(t=o.get("value"),e.set("value",String(t)))}),u(this.parent.el).empty(),this.parent.options.viewMode);this.parent.dispose(),this.parent.model.set(e),(GformShortcodeUI=new r.views.editShortcodeForm({model:e,viewMode:t})).render()}}),r.utils.shortcodeViewConstructor={initialize:function(e){this.shortcodeModel=this.getShortcodeModel(this.shortcode)},getShortcodeModel:function(t){var e=void 0!==t.attrs.named.action?t.attrs.named.action:"",e=r.shortcodes.findWhere({action_tag:e});if(e)return(e=e.clone()).get("attrs").each(function(e){e.get("attr")in t.attrs.named&&e.set("value",t.attrs.named[e.get("attr")]),"content"===e.get("attr")&&"content"in t&&e.set("value",t.content)}),e},getContent:function(){return this.content||this.fetch(),this.content},fetch:function(){var e,t=this;this.fetching||(this.fetching=!0,e=this.shortcodeModel.get("attrs").findWhere({attr:"id"}).get("value"),e={action:"gf_do_shortcode",post_id:u("#post_ID").val(),form_id:e,shortcode:this.shortcodeModel.formatShortcode(),nonce:gfShortcodeUIData.previewNonce},u.post(ajaxurl,e).done(function(e){t.content=e}).fail(function(){t.content='