Page Builder by SiteOrigin - Version 2.11.6

Version Description

  • 01 December 2020 =
  • New: Page Builder Layout CSS Output Location setting that controls where PB outputs its CSS. Located at Settings > Page Builder > Layout.
  • SEO: Improved content analysis process for slower servers and connections.
  • SEO: Excluded <iframe>, <script>, <link>, <style> from content analysis due to word count inflation.
  • Developer: Added wp-color-picker as an editor dependency.
  • Developer: Introduced a new Ajax Response filter siteorigin_panels_layouts_result.
  • Developer: Standardized SO Layout Block variables to avoid conflicts with other blocks.
Download this release

Release Info

Developer SiteOrigin
Plugin Icon 128x128 Page Builder by SiteOrigin
Version 2.11.6
Comparing to
See all releases

Code changes from version 2.11.5 to 2.11.6

compat/js/siteorigin-panels-layout-block.js CHANGED
@@ -48,29 +48,10 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
48
 
49
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
50
 
51
- var _lodash = lodash,
52
- isEqual = _lodash.isEqual,
53
- debounce = _lodash.debounce,
54
- isEmpty = _lodash.isEmpty,
55
- isFunction = _lodash.isFunction;
56
- var registerBlockType = wp.blocks.registerBlockType;
57
- var _wp$element = wp.element,
58
- Component = _wp$element.Component,
59
- Fragment = _wp$element.Fragment,
60
- RawHTML = _wp$element.RawHTML,
61
- createRef = _wp$element.createRef;
62
- var BlockControls = wp.editor.BlockControls;
63
- var _wp$components = wp.components,
64
- Toolbar = _wp$components.Toolbar,
65
- IconButton = _wp$components.IconButton,
66
- Spinner = _wp$components.Spinner;
67
- var _window = window,
68
- soPanelsBlockEditorAdmin = _window.soPanelsBlockEditorAdmin;
69
-
70
  var SiteOriginPanelsLayoutBlock =
71
  /*#__PURE__*/
72
- function (_Component) {
73
- _inherits(SiteOriginPanelsLayoutBlock, _Component);
74
 
75
  var _super = _createSuper(SiteOriginPanelsLayoutBlock);
76
 
@@ -80,15 +61,15 @@ function (_Component) {
80
  _classCallCheck(this, SiteOriginPanelsLayoutBlock);
81
 
82
  _this = _super.call(this, props);
83
- var editMode = soPanelsBlockEditorAdmin.defaultMode === 'edit' || isEmpty(props.panelsData);
84
  _this.state = {
85
  editing: editMode,
86
  loadingPreview: !editMode,
87
  previewHtml: '',
88
  previewInitialized: !editMode
89
  };
90
- _this.panelsContainer = createRef();
91
- _this.previewContainer = createRef();
92
  _this.panelsInitialized = false;
93
  return _this;
94
  }
@@ -102,7 +83,7 @@ function (_Component) {
102
  this.setupPanels();
103
  } else if (!this.state.editing && !this.previewInitialized) {
104
  this.fetchPreview(this.props);
105
- this.fetchPreview = debounce(this.fetchPreview, 500);
106
  }
107
  }
108
  }, {
@@ -121,7 +102,7 @@ function (_Component) {
121
  this.setupPanels();
122
  } else if (this.state.loadingPreview) {
123
  this.fetchPreview(this.props);
124
- this.fetchPreview = debounce(this.fetchPreview, 500);
125
  } else if (!this.state.previewInitialized) {
126
  jQuery(document).trigger('panels_setup_preview');
127
  this.setState({
@@ -138,8 +119,8 @@ function (_Component) {
138
  var config = {
139
  editorType: 'standalone',
140
  loadLiveEditor: false,
141
- postId: soPanelsBlockEditorAdmin.postId,
142
- liveEditorPreview: soPanelsBlockEditorAdmin.liveEditor
143
  };
144
  var builderModel = new panels.model.builder();
145
  this.builderView = new panels.view.builder({
@@ -150,14 +131,14 @@ function (_Component) {
150
  var panelsData = JSON.parse(JSON.stringify(jQuery.extend({}, this.props.panelsData))); // Disable block selection while dragging rows or widgets.
151
 
152
  var rowOrWidgetMouseDown = function rowOrWidgetMouseDown() {
153
- if (isFunction(_this2.props.onRowOrWidgetMouseDown)) {
154
  _this2.props.onRowOrWidgetMouseDown();
155
  }
156
 
157
  var rowOrWidgetMouseUp = function rowOrWidgetMouseUp() {
158
  jQuery(document).off('mouseup', rowOrWidgetMouseUp);
159
 
160
- if (isFunction(_this2.props.onRowOrWidgetMouseUp)) {
161
  _this2.props.onRowOrWidgetMouseUp();
162
  }
163
  };
@@ -186,10 +167,10 @@ function (_Component) {
186
  this.builderView.on('content_change', function () {
187
  var newPanelsData = _this2.builderView.getData();
188
 
189
- _this2.panelsDataChanged = !isEqual(panelsData, newPanelsData);
190
 
191
  if (_this2.panelsDataChanged) {
192
- if (_this2.props.onContentChange && isFunction(_this2.props.onContentChange)) {
193
  _this2.props.onContentChange(newPanelsData);
194
  }
195
 
@@ -221,7 +202,7 @@ function (_Component) {
221
  previewInitialized: false
222
  });
223
  var fetchRequest = this.currentFetchRequest = jQuery.post({
224
- url: soPanelsBlockEditorAdmin.previewUrl,
225
  data: {
226
  action: 'so_panels_layout_block_preview',
227
  panelsData: JSON.stringify(props.panelsData)
@@ -263,7 +244,7 @@ function (_Component) {
263
  };
264
 
265
  if (this.state.editing) {
266
- return React.createElement(Fragment, null, React.createElement(BlockControls, null, React.createElement(Toolbar, null, React.createElement(IconButton, {
267
  icon: "visibility",
268
  className: "components-icon-button components-toolbar__control",
269
  label: wp.i18n.__('Preview layout.', 'siteorigin-panels'),
@@ -275,7 +256,7 @@ function (_Component) {
275
  }));
276
  } else {
277
  var loadingPreview = this.state.loadingPreview;
278
- return React.createElement(Fragment, null, React.createElement(BlockControls, null, React.createElement(Toolbar, null, React.createElement(IconButton, {
279
  icon: "edit",
280
  className: "components-icon-button components-toolbar__control",
281
  label: wp.i18n.__('Edit layout.', 'siteorigin-panels'),
@@ -285,21 +266,21 @@ function (_Component) {
285
  className: "so-panels-block-layout-preview-container"
286
  }, loadingPreview ? React.createElement("div", {
287
  className: "so-panels-spinner-container"
288
- }, React.createElement("span", null, React.createElement(Spinner, null))) : React.createElement("div", {
289
  className: "so-panels-raw-html-container",
290
  ref: this.previewContainer
291
- }, React.createElement(RawHTML, null, this.state.previewHtml))));
292
  }
293
  }
294
  }]);
295
 
296
  return SiteOriginPanelsLayoutBlock;
297
- }(Component);
298
 
299
  var hasLayoutCategory = wp.blocks.getCategories().some(function (category) {
300
  return category.slug === 'layout';
301
  });
302
- registerBlockType('siteorigin-panels/layout-block', {
303
  title: wp.i18n.__('SiteOrigin Layout', 'siteorigin-panels'),
304
  description: wp.i18n.__("Build a layout using SiteOrigin's Page Builder.", 'siteorigin-panels'),
305
  icon: function icon() {
@@ -326,7 +307,7 @@ registerBlockType('siteorigin-panels/layout-block', {
326
  toggleSelection = _ref.toggleSelection;
327
 
328
  var onLayoutBlockContentChange = function onLayoutBlockContentChange(newPanelsData) {
329
- if (!_.isEmpty(newPanelsData.widgets)) {
330
  // Send panelsData to server for sanitization.
331
  wp.data.dispatch('core/editor').lockPostSaving();
332
  jQuery.post(panelsOptions.ajaxurl, {
@@ -367,12 +348,12 @@ registerBlockType('siteorigin-panels/layout-block', {
367
  },
368
  save: function save(_ref2) {
369
  var attributes = _ref2.attributes;
370
- return attributes.hasOwnProperty('contentPreview') ? React.createElement(RawHTML, null, attributes.contentPreview) : null;
371
  }
372
  });
373
 
374
  (function (jQuery) {
375
- if (soPanelsBlockEditorAdmin.showAddButton) {
376
  jQuery(function () {
377
  setTimeout(function () {
378
  var editorDispatch = wp.data.dispatch('core/editor');
48
 
49
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  var SiteOriginPanelsLayoutBlock =
52
  /*#__PURE__*/
53
+ function (_wp$element$Component) {
54
+ _inherits(SiteOriginPanelsLayoutBlock, _wp$element$Component);
55
 
56
  var _super = _createSuper(SiteOriginPanelsLayoutBlock);
57
 
61
  _classCallCheck(this, SiteOriginPanelsLayoutBlock);
62
 
63
  _this = _super.call(this, props);
64
+ var editMode = window.soPanelsBlockEditorAdmin.defaultMode === 'edit' || lodash.isEmpty(props.panelsData);
65
  _this.state = {
66
  editing: editMode,
67
  loadingPreview: !editMode,
68
  previewHtml: '',
69
  previewInitialized: !editMode
70
  };
71
+ _this.panelsContainer = wp.element.createRef();
72
+ _this.previewContainer = wp.element.createRef();
73
  _this.panelsInitialized = false;
74
  return _this;
75
  }
83
  this.setupPanels();
84
  } else if (!this.state.editing && !this.previewInitialized) {
85
  this.fetchPreview(this.props);
86
+ this.fetchPreview = lodash.debounce(this.fetchPreview, 500);
87
  }
88
  }
89
  }, {
102
  this.setupPanels();
103
  } else if (this.state.loadingPreview) {
104
  this.fetchPreview(this.props);
105
+ this.fetchPreview = lodash.debounce(this.fetchPreview, 500);
106
  } else if (!this.state.previewInitialized) {
107
  jQuery(document).trigger('panels_setup_preview');
108
  this.setState({
119
  var config = {
120
  editorType: 'standalone',
121
  loadLiveEditor: false,
122
+ postId: window.soPanelsBlockEditorAdmin.postId,
123
+ liveEditorPreview: window.soPanelsBlockEditorAdmin.liveEditor
124
  };
125
  var builderModel = new panels.model.builder();
126
  this.builderView = new panels.view.builder({
131
  var panelsData = JSON.parse(JSON.stringify(jQuery.extend({}, this.props.panelsData))); // Disable block selection while dragging rows or widgets.
132
 
133
  var rowOrWidgetMouseDown = function rowOrWidgetMouseDown() {
134
+ if (lodash.isFunction(_this2.props.onRowOrWidgetMouseDown)) {
135
  _this2.props.onRowOrWidgetMouseDown();
136
  }
137
 
138
  var rowOrWidgetMouseUp = function rowOrWidgetMouseUp() {
139
  jQuery(document).off('mouseup', rowOrWidgetMouseUp);
140
 
141
+ if (lodash.isFunction(_this2.props.onRowOrWidgetMouseUp)) {
142
  _this2.props.onRowOrWidgetMouseUp();
143
  }
144
  };
167
  this.builderView.on('content_change', function () {
168
  var newPanelsData = _this2.builderView.getData();
169
 
170
+ _this2.panelsDataChanged = !lodash.isEqual(panelsData, newPanelsData);
171
 
172
  if (_this2.panelsDataChanged) {
173
+ if (_this2.props.onContentChange && lodash.isFunction(_this2.props.onContentChange)) {
174
  _this2.props.onContentChange(newPanelsData);
175
  }
176
 
202
  previewInitialized: false
203
  });
204
  var fetchRequest = this.currentFetchRequest = jQuery.post({
205
+ url: window.soPanelsBlockEditorAdmin.previewUrl,
206
  data: {
207
  action: 'so_panels_layout_block_preview',
208
  panelsData: JSON.stringify(props.panelsData)
244
  };
245
 
246
  if (this.state.editing) {
247
+ return React.createElement(wp.element.Fragment, null, React.createElement(wp.editor.BlockControls, null, React.createElement(wp.components.Toolbar, null, React.createElement(wp.components.IconButton, {
248
  icon: "visibility",
249
  className: "components-icon-button components-toolbar__control",
250
  label: wp.i18n.__('Preview layout.', 'siteorigin-panels'),
256
  }));
257
  } else {
258
  var loadingPreview = this.state.loadingPreview;
259
+ return React.createElement(wp.element.Fragment, null, React.createElement(wp.editor.BlockControls, null, React.createElement(wp.components.Toolbar, null, React.createElement(wp.components.IconButton, {
260
  icon: "edit",
261
  className: "components-icon-button components-toolbar__control",
262
  label: wp.i18n.__('Edit layout.', 'siteorigin-panels'),
266
  className: "so-panels-block-layout-preview-container"
267
  }, loadingPreview ? React.createElement("div", {
268
  className: "so-panels-spinner-container"
269
+ }, React.createElement("span", null, React.createElement(wp.components.Spinner, null))) : React.createElement("div", {
270
  className: "so-panels-raw-html-container",
271
  ref: this.previewContainer
272
+ }, React.createElement(wp.element.RawHTML, null, this.state.previewHtml))));
273
  }
274
  }
275
  }]);
276
 
277
  return SiteOriginPanelsLayoutBlock;
278
+ }(wp.element.Component);
279
 
280
  var hasLayoutCategory = wp.blocks.getCategories().some(function (category) {
281
  return category.slug === 'layout';
282
  });
283
+ wp.blocks.registerBlockType('siteorigin-panels/layout-block', {
284
  title: wp.i18n.__('SiteOrigin Layout', 'siteorigin-panels'),
285
  description: wp.i18n.__("Build a layout using SiteOrigin's Page Builder.", 'siteorigin-panels'),
286
  icon: function icon() {
307
  toggleSelection = _ref.toggleSelection;
308
 
309
  var onLayoutBlockContentChange = function onLayoutBlockContentChange(newPanelsData) {
310
+ if (!lodash.isEmpty(newPanelsData.widgets)) {
311
  // Send panelsData to server for sanitization.
312
  wp.data.dispatch('core/editor').lockPostSaving();
313
  jQuery.post(panelsOptions.ajaxurl, {
348
  },
349
  save: function save(_ref2) {
350
  var attributes = _ref2.attributes;
351
+ return attributes.hasOwnProperty('contentPreview') ? React.createElement(wp.element.RawHTML, null, attributes.contentPreview) : null;
352
  }
353
  });
354
 
355
  (function (jQuery) {
356
+ if (window.soPanelsBlockEditorAdmin.showAddButton) {
357
  jQuery(function () {
358
  setTimeout(function () {
359
  var editorDispatch = wp.data.dispatch('core/editor');
compat/js/siteorigin-panels-layout-block.min.js CHANGED
@@ -1 +1 @@
1
- "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,i=_getPrototypeOf(e);if(t()){var o=_getPrototypeOf(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _lodash=lodash,isEqual=_lodash.isEqual,debounce=_lodash.debounce,isEmpty=_lodash.isEmpty,isFunction=_lodash.isFunction,registerBlockType=wp.blocks.registerBlockType,_wp$element=wp.element,Component=_wp$element.Component,Fragment=_wp$element.Fragment,RawHTML=_wp$element.RawHTML,createRef=_wp$element.createRef,BlockControls=wp.editor.BlockControls,_wp$components=wp.components,Toolbar=_wp$components.Toolbar,IconButton=_wp$components.IconButton,Spinner=_wp$components.Spinner,_window=window,soPanelsBlockEditorAdmin=_window.soPanelsBlockEditorAdmin,SiteOriginPanelsLayoutBlock=function(e){_inherits(n,Component);var t=_createSuper(n);function n(e){var i;_classCallCheck(this,n),i=t.call(this,e);var o="edit"===soPanelsBlockEditorAdmin.defaultMode||isEmpty(e.panelsData);return i.state={editing:o,loadingPreview:!o,previewHtml:"",previewInitialized:!o},i.panelsContainer=createRef(),i.previewContainer=createRef(),i.panelsInitialized=!1,i}return _createClass(n,[{key:"componentDidMount",value:function(){this.isStillMounted=!0,this.state.editing?this.setupPanels():this.state.editing||this.previewInitialized||(this.fetchPreview(this.props),this.fetchPreview=debounce(this.fetchPreview,500))}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1,this.builderView&&this.builderView.off("content_change")}},{key:"componentDidUpdate",value:function(e){this.state.editing&&!this.panelsInitialized?this.setupPanels():this.state.loadingPreview?(this.fetchPreview(this.props),this.fetchPreview=debounce(this.fetchPreview,500)):this.state.previewInitialized||(jQuery(document).trigger("panels_setup_preview"),this.setState({previewInitialized:!0}))}},{key:"setupPanels",value:function(){var e=this,t=jQuery(this.panelsContainer.current),n={editorType:"standalone",loadLiveEditor:!1,postId:soPanelsBlockEditorAdmin.postId,liveEditorPreview:soPanelsBlockEditorAdmin.liveEditor},i=new panels.model.builder;this.builderView=new panels.view.builder({model:i,config:n});var o=JSON.parse(JSON.stringify(jQuery.extend({},this.props.panelsData))),r=function(){isFunction(e.props.onRowOrWidgetMouseDown)&&e.props.onRowOrWidgetMouseDown();jQuery(document).on("mouseup",(function t(){jQuery(document).off("mouseup",t),isFunction(e.props.onRowOrWidgetMouseUp)&&e.props.onRowOrWidgetMouseUp()}))};this.builderView.on("row_added",(function(){e.builderView.$(".so-row-move").off("mousedown",r),e.builderView.$(".so-row-move").on("mousedown",r),e.builderView.$(".so-widget").off("mousedown",r),e.builderView.$(".so-widget").on("mousedown",r)})),this.builderView.on("widget_added",(function(){e.builderView.$(".so-widget").off("mousedown",r),e.builderView.$(".so-widget").on("mousedown",r)})),this.builderView.render().attach({container:t}).setData(o),this.builderView.trigger("builder_resize"),this.builderView.on("content_change",(function(){var t=e.builderView.getData();e.panelsDataChanged=!isEqual(o,t),e.panelsDataChanged&&(e.props.onContentChange&&isFunction(e.props.onContentChange)&&e.props.onContentChange(t),e.setState({loadingPreview:!0,previewHtml:""}))})),jQuery(document).trigger("panels_setup",this.builderView),void 0===window.soPanelsBuilderView&&(window.soPanelsBuilderView=[]),window.soPanelsBuilderView.push(this.builderView),this.panelsInitialized=!0}},{key:"fetchPreview",value:function(e){var t=this;if(this.isStillMounted){this.setState({previewInitialized:!1});var n=this.currentFetchRequest=jQuery.post({url:soPanelsBlockEditorAdmin.previewUrl,data:{action:"so_panels_layout_block_preview",panelsData:JSON.stringify(e.panelsData)}}).then((function(e){t.isStillMounted&&n===t.currentFetchRequest&&e&&t.setState({previewHtml:e,loadingPreview:!1,previewInitialized:!1})}));return n}}},{key:"render",value:function(){var e=this,t=this.props.panelsData;if(this.state.editing)return React.createElement(Fragment,null,React.createElement(BlockControls,null,React.createElement(Toolbar,null,React.createElement(IconButton,{icon:"visibility",className:"components-icon-button components-toolbar__control",label:wp.i18n.__("Preview layout.","siteorigin-panels"),onClick:function(){t&&e.setState({editing:!1,loadingPreview:!e.state.previewHtml,previewInitialized:!1})}}))),React.createElement("div",{key:"layout-block",className:"siteorigin-panels-layout-block-container",ref:this.panelsContainer}));var n=this.state.loadingPreview;return React.createElement(Fragment,null,React.createElement(BlockControls,null,React.createElement(Toolbar,null,React.createElement(IconButton,{icon:"edit",className:"components-icon-button components-toolbar__control",label:wp.i18n.__("Edit layout.","siteorigin-panels"),onClick:function(){e.panelsInitialized=!1,e.setState({editing:!0})}}))),React.createElement("div",{key:"preview",className:"so-panels-block-layout-preview-container"},n?React.createElement("div",{className:"so-panels-spinner-container"},React.createElement("span",null,React.createElement(Spinner,null))):React.createElement("div",{className:"so-panels-raw-html-container",ref:this.previewContainer},React.createElement(RawHTML,null,this.state.previewHtml))))}}]),n}(),hasLayoutCategory=wp.blocks.getCategories().some((function(e){return"layout"===e.slug}));registerBlockType("siteorigin-panels/layout-block",{title:wp.i18n.__("SiteOrigin Layout","siteorigin-panels"),description:wp.i18n.__("Build a layout using SiteOrigin's Page Builder.","siteorigin-panels"),icon:function(){return React.createElement("span",{className:"siteorigin-panels-block-icon"})},category:hasLayoutCategory?"layout":"design",keywords:["page builder","column,grid","panel"],supports:{html:!1},attributes:{panelsData:{type:"object"},contentPreview:{type:"string"}},edit:function(e){var t=e.attributes,n=e.setAttributes,i=e.toggleSelection;return React.createElement(SiteOriginPanelsLayoutBlock,{panelsData:t.panelsData,onContentChange:function(e){_.isEmpty(e.widgets)||(wp.data.dispatch("core/editor").lockPostSaving(),jQuery.post(panelsOptions.ajaxurl,{action:"so_panels_builder_content_json",panels_data:JSON.stringify(e),post_id:wp.data.select("core/editor").getCurrentPostId()},(function(e){var t={};""!==e.sanitized_panels_data&&(t.panelsData=e.sanitized_panels_data),""!==e.preview&&(t.contentPreview=e.preview),n(t),wp.data.dispatch("core/editor").unlockPostSaving()})))},onRowOrWidgetMouseDown:function(){i(!1)},onRowOrWidgetMouseUp:function(){i(!0)}})},save:function(e){var t=e.attributes;return t.hasOwnProperty("contentPreview")?React.createElement(RawHTML,null,t.contentPreview):null}}),function(e){soPanelsBlockEditorAdmin.showAddButton&&e((function(){setTimeout((function(){var t=wp.data.dispatch("core/editor"),n=wp.data.select("core/editor"),i=e("#siteorigin-panels-add-layout-block-button").html(),o=e(i).insertAfter(".editor-writing-flow > div:first, .block-editor-writing-flow > div:not([tabindex])");o.on("click",(function(){var e=wp.blocks.createBlock("siteorigin-panels/layout-block",{});if(n.isEditedPostEmpty()){var i=n.getBlocks();i.length?t.replaceBlock(i[0].clientId,e):t.insertBlock(e)}else t.insertBlock(e)}));var r=function(){wp.data.select("core/editor").isEditedPostEmpty()?o.show():o.hide()};wp.data.subscribe(r),r()}),100)}))}(jQuery),jQuery(document).on("click",".block-editor-post-preview__button-resize",(function(e){jQuery(this).hasClass("has-icon")||jQuery(window).trigger("resize")}));
1
+ "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,i=_getPrototypeOf(e);if(t()){var o=_getPrototypeOf(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var SiteOriginPanelsLayoutBlock=function(e){_inherits(n,wp.element.Component);var t=_createSuper(n);function n(e){var i;_classCallCheck(this,n),i=t.call(this,e);var o="edit"===window.soPanelsBlockEditorAdmin.defaultMode||lodash.isEmpty(e.panelsData);return i.state={editing:o,loadingPreview:!o,previewHtml:"",previewInitialized:!o},i.panelsContainer=wp.element.createRef(),i.previewContainer=wp.element.createRef(),i.panelsInitialized=!1,i}return _createClass(n,[{key:"componentDidMount",value:function(){this.isStillMounted=!0,this.state.editing?this.setupPanels():this.state.editing||this.previewInitialized||(this.fetchPreview(this.props),this.fetchPreview=lodash.debounce(this.fetchPreview,500))}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1,this.builderView&&this.builderView.off("content_change")}},{key:"componentDidUpdate",value:function(e){this.state.editing&&!this.panelsInitialized?this.setupPanels():this.state.loadingPreview?(this.fetchPreview(this.props),this.fetchPreview=lodash.debounce(this.fetchPreview,500)):this.state.previewInitialized||(jQuery(document).trigger("panels_setup_preview"),this.setState({previewInitialized:!0}))}},{key:"setupPanels",value:function(){var e=this,t=jQuery(this.panelsContainer.current),n={editorType:"standalone",loadLiveEditor:!1,postId:window.soPanelsBlockEditorAdmin.postId,liveEditorPreview:window.soPanelsBlockEditorAdmin.liveEditor},i=new panels.model.builder;this.builderView=new panels.view.builder({model:i,config:n});var o=JSON.parse(JSON.stringify(jQuery.extend({},this.props.panelsData))),r=function(){lodash.isFunction(e.props.onRowOrWidgetMouseDown)&&e.props.onRowOrWidgetMouseDown();jQuery(document).on("mouseup",(function t(){jQuery(document).off("mouseup",t),lodash.isFunction(e.props.onRowOrWidgetMouseUp)&&e.props.onRowOrWidgetMouseUp()}))};this.builderView.on("row_added",(function(){e.builderView.$(".so-row-move").off("mousedown",r),e.builderView.$(".so-row-move").on("mousedown",r),e.builderView.$(".so-widget").off("mousedown",r),e.builderView.$(".so-widget").on("mousedown",r)})),this.builderView.on("widget_added",(function(){e.builderView.$(".so-widget").off("mousedown",r),e.builderView.$(".so-widget").on("mousedown",r)})),this.builderView.render().attach({container:t}).setData(o),this.builderView.trigger("builder_resize"),this.builderView.on("content_change",(function(){var t=e.builderView.getData();e.panelsDataChanged=!lodash.isEqual(o,t),e.panelsDataChanged&&(e.props.onContentChange&&lodash.isFunction(e.props.onContentChange)&&e.props.onContentChange(t),e.setState({loadingPreview:!0,previewHtml:""}))})),jQuery(document).trigger("panels_setup",this.builderView),void 0===window.soPanelsBuilderView&&(window.soPanelsBuilderView=[]),window.soPanelsBuilderView.push(this.builderView),this.panelsInitialized=!0}},{key:"fetchPreview",value:function(e){var t=this;if(this.isStillMounted){this.setState({previewInitialized:!1});var n=this.currentFetchRequest=jQuery.post({url:window.soPanelsBlockEditorAdmin.previewUrl,data:{action:"so_panels_layout_block_preview",panelsData:JSON.stringify(e.panelsData)}}).then((function(e){t.isStillMounted&&n===t.currentFetchRequest&&e&&t.setState({previewHtml:e,loadingPreview:!1,previewInitialized:!1})}));return n}}},{key:"render",value:function(){var e=this,t=this.props.panelsData;if(this.state.editing)return React.createElement(wp.element.Fragment,null,React.createElement(wp.editor.BlockControls,null,React.createElement(wp.components.Toolbar,null,React.createElement(wp.components.IconButton,{icon:"visibility",className:"components-icon-button components-toolbar__control",label:wp.i18n.__("Preview layout.","siteorigin-panels"),onClick:function(){t&&e.setState({editing:!1,loadingPreview:!e.state.previewHtml,previewInitialized:!1})}}))),React.createElement("div",{key:"layout-block",className:"siteorigin-panels-layout-block-container",ref:this.panelsContainer}));var n=this.state.loadingPreview;return React.createElement(wp.element.Fragment,null,React.createElement(wp.editor.BlockControls,null,React.createElement(wp.components.Toolbar,null,React.createElement(wp.components.IconButton,{icon:"edit",className:"components-icon-button components-toolbar__control",label:wp.i18n.__("Edit layout.","siteorigin-panels"),onClick:function(){e.panelsInitialized=!1,e.setState({editing:!0})}}))),React.createElement("div",{key:"preview",className:"so-panels-block-layout-preview-container"},n?React.createElement("div",{className:"so-panels-spinner-container"},React.createElement("span",null,React.createElement(wp.components.Spinner,null))):React.createElement("div",{className:"so-panels-raw-html-container",ref:this.previewContainer},React.createElement(wp.element.RawHTML,null,this.state.previewHtml))))}}]),n}(),hasLayoutCategory=wp.blocks.getCategories().some((function(e){return"layout"===e.slug}));wp.blocks.registerBlockType("siteorigin-panels/layout-block",{title:wp.i18n.__("SiteOrigin Layout","siteorigin-panels"),description:wp.i18n.__("Build a layout using SiteOrigin's Page Builder.","siteorigin-panels"),icon:function(){return React.createElement("span",{className:"siteorigin-panels-block-icon"})},category:hasLayoutCategory?"layout":"design",keywords:["page builder","column,grid","panel"],supports:{html:!1},attributes:{panelsData:{type:"object"},contentPreview:{type:"string"}},edit:function(e){var t=e.attributes,n=e.setAttributes,i=e.toggleSelection;return React.createElement(SiteOriginPanelsLayoutBlock,{panelsData:t.panelsData,onContentChange:function(e){lodash.isEmpty(e.widgets)||(wp.data.dispatch("core/editor").lockPostSaving(),jQuery.post(panelsOptions.ajaxurl,{action:"so_panels_builder_content_json",panels_data:JSON.stringify(e),post_id:wp.data.select("core/editor").getCurrentPostId()},(function(e){var t={};""!==e.sanitized_panels_data&&(t.panelsData=e.sanitized_panels_data),""!==e.preview&&(t.contentPreview=e.preview),n(t),wp.data.dispatch("core/editor").unlockPostSaving()})))},onRowOrWidgetMouseDown:function(){i(!1)},onRowOrWidgetMouseUp:function(){i(!0)}})},save:function(e){var t=e.attributes;return t.hasOwnProperty("contentPreview")?React.createElement(wp.element.RawHTML,null,t.contentPreview):null}}),function(e){window.soPanelsBlockEditorAdmin.showAddButton&&e((function(){setTimeout((function(){var t=wp.data.dispatch("core/editor"),n=wp.data.select("core/editor"),i=e("#siteorigin-panels-add-layout-block-button").html(),o=e(i).insertAfter(".editor-writing-flow > div:first, .block-editor-writing-flow > div:not([tabindex])");o.on("click",(function(){var e=wp.blocks.createBlock("siteorigin-panels/layout-block",{});if(n.isEditedPostEmpty()){var i=n.getBlocks();i.length?t.replaceBlock(i[0].clientId,e):t.insertBlock(e)}else t.insertBlock(e)}));var r=function(){wp.data.select("core/editor").isEditedPostEmpty()?o.show():o.hide()};wp.data.subscribe(r),r()}),100)}))}(jQuery),jQuery(document).on("click",".block-editor-post-preview__button-resize",(function(e){jQuery(this).hasClass("has-icon")||jQuery(window).trigger("resize")}));
inc/admin-layouts.php CHANGED
@@ -308,7 +308,7 @@ class SiteOrigin_Panels_Admin_Layouts {
308
  $return['title'] .= __( ' - Results For:', 'siteorigin-panels' ) . ' <em>' . esc_html( $search ) . '</em>';
309
  }
310
 
311
- echo json_encode( $return );
312
 
313
  wp_die();
314
  }
308
  $return['title'] .= __( ' - Results For:', 'siteorigin-panels' ) . ' <em>' . esc_html( $search ) . '</em>';
309
  }
310
 
311
+ echo json_encode( apply_filters( 'siteorigin_panels_layouts_result', $return, $type ) );
312
 
313
  wp_die();
314
  }
inc/admin.php CHANGED
@@ -299,6 +299,7 @@ class SiteOrigin_Panels_Admin {
299
  'jquery-ui-resizable',
300
  'jquery-ui-sortable',
301
  'jquery-ui-draggable',
 
302
  'underscore',
303
  'backbone',
304
  'plupload',
@@ -1047,6 +1048,17 @@ class SiteOrigin_Panels_Admin {
1047
  return $is_js_widget;
1048
  }
1049
 
 
 
 
 
 
 
 
 
 
 
 
1050
  ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1051
  // ADMIN AJAX ACTIONS
1052
  ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1128,12 +1140,7 @@ class SiteOrigin_Panels_Admin {
1128
  SiteOrigin_Panels_Post_Content_Filters::remove_filters();
1129
  unset( $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] );
1130
 
1131
- $GLOBALS[ 'SITEORIGIN_PANELS_PREVIEW_RENDER' ] = true;
1132
- $return['preview'] = SiteOrigin_Panels::renderer()->render( intval( $_POST['post_id'] ), false, $panels_data );
1133
- if ( function_exists( 'wp_targeted_link_rel' ) ) {
1134
- $return['preview'] = wp_targeted_link_rel( $return['preview'] );
1135
- }
1136
- unset( $GLOBALS[ 'SITEORIGIN_PANELS_PREVIEW_RENDER' ] );
1137
 
1138
  echo json_encode( $return );
1139
 
299
  'jquery-ui-resizable',
300
  'jquery-ui-sortable',
301
  'jquery-ui-draggable',
302
+ 'wp-color-picker',
303
  'underscore',
304
  'backbone',
305
  'plupload',
1048
  return $is_js_widget;
1049
  }
1050
 
1051
+ function generate_panels_preview( $post_id, $panels_data ) {
1052
+ $GLOBALS[ 'SITEORIGIN_PANELS_PREVIEW_RENDER' ] = true;
1053
+ $return = SiteOrigin_Panels::renderer()->render( intval( $post_id ), false, $panels_data );
1054
+ if ( function_exists( 'wp_targeted_link_rel' ) ) {
1055
+ $return = wp_targeted_link_rel( $return );
1056
+ }
1057
+ unset( $GLOBALS[ 'SITEORIGIN_PANELS_PREVIEW_RENDER' ] );
1058
+
1059
+ return $return;
1060
+ }
1061
+
1062
  ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1063
  // ADMIN AJAX ACTIONS
1064
  ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1140
  SiteOrigin_Panels_Post_Content_Filters::remove_filters();
1141
  unset( $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] );
1142
 
1143
+ $return['preview'] = $this->generate_panels_preview( intval( $_POST['post_id'] ), $panels_data );
 
 
 
 
 
1144
 
1145
  echo json_encode( $return );
1146
 
inc/renderer.php CHANGED
@@ -25,8 +25,16 @@ class SiteOrigin_Panels_Renderer {
25
  if ( is_null( $this->inline_css ) ) {
26
  // Initialize the inline CSS array and add actions to handle printing.
27
  $this->inline_css = array();
28
- add_action( 'wp_head', array( $this, 'print_inline_css' ), 12 );
29
- add_action( 'wp_footer', array( $this, 'print_inline_css' ) );
 
 
 
 
 
 
 
 
30
  }
31
 
32
  $this->inline_css[ $post_id ] = $css;
25
  if ( is_null( $this->inline_css ) ) {
26
  // Initialize the inline CSS array and add actions to handle printing.
27
  $this->inline_css = array();
28
+
29
+ $output_css = siteorigin_panels_setting( 'output-css-header');
30
+ if ( is_admin() || SiteOrigin_Panels_Admin::is_block_editor() || $output_css == 'auto' ) {
31
+ add_action( 'wp_head', array( $this, 'print_inline_css' ), 12 );
32
+ add_action( 'wp_footer', array( $this, 'print_inline_css' ) );
33
+ } else if ( $output_css == 'header' ) {
34
+ add_action( 'wp_head', array( $this, 'print_inline_css' ), 12 );
35
+ } else {
36
+ add_action( 'wp_footer', array( $this, 'print_inline_css' ) );
37
+ }
38
  }
39
 
40
  $this->inline_css[ $post_id ] = $css;
inc/settings.php CHANGED
@@ -144,6 +144,7 @@ class SiteOrigin_Panels_Settings {
144
  $defaults['margin-bottom-last-row'] = false;
145
  $defaults['margin-sides'] = 30;
146
  $defaults['full-width-container'] = 'body';
 
147
 
148
  // Content fields
149
  $defaults['copy-content'] = true;
@@ -446,6 +447,16 @@ class SiteOrigin_Panels_Settings {
446
  'keywords' => 'full width, container, stretch',
447
  );
448
 
 
 
 
 
 
 
 
 
 
 
449
  // The content fields
450
 
451
  $fields['content'] = array(
144
  $defaults['margin-bottom-last-row'] = false;
145
  $defaults['margin-sides'] = 30;
146
  $defaults['full-width-container'] = 'body';
147
+ $defaults['output-css-header'] = 'auto';
148
 
149
  // Content fields
150
  $defaults['copy-content'] = true;
447
  'keywords' => 'full width, container, stretch',
448
  );
449
 
450
+ $fields['layout']['fields']['output-css-header'] = array(
451
+ 'type' => 'select',
452
+ 'options' => array(
453
+ 'auto' => __( 'Automatic', 'siteorigin-panels' ),
454
+ 'header' => __( 'Header', 'siteorigin-panels' ),
455
+ 'footer' => __( 'Footer', 'siteorigin-panels' ),
456
+ ),
457
+ 'label' => __( 'Page Builder Layout CSS Output Location', 'siteorigin-panels' ),
458
+ );
459
+
460
  // The content fields
461
 
462
  $fields['content'] = array(
js/seo-compat.js CHANGED
@@ -42,8 +42,8 @@ jQuery(function($){
42
  return data;
43
  }
44
 
45
- // Remove style tags created by Widgets Bundle
46
- $data.find( 'style' ).remove();
47
 
48
  $data.find( "*") .not( whitelist ).each( function() {
49
  var content = $( this ).contents();
42
  return data;
43
  }
44
 
45
+ // Remove elements that have no content analysis value.
46
+ $data.find( 'iframe, script, style, link' ).remove();
47
 
48
  $data.find( "*") .not( whitelist ).each( function() {
49
  var content = $( this ).contents();
js/seo-compat.min.js CHANGED
@@ -1 +1 @@
1
- jQuery((function(t){var i=function(){"undefined"!=typeof YoastSEO&&(YoastSEO.app.registerPlugin("SiteOriginSeoCompat",{status:"ready"}),YoastSEO.app.registerModification("content",this.contentModification,"SiteOriginSeoCompat",5)),"undefined"!=typeof rankMathEditor&&wp.hooks.addFilter("rank_math_content","SiteOriginSeoCompat",this.contentModification)};i.prototype.contentModification=function(i){var e=t(".block-editor-page").length&&void 0!==window.soPanelsBuilderView;if(t("#so-panels-panels.attached-to-editor").is(":visible")||e){var n=["p","a","img","caption","br","blockquote","cite","em","strong","i","b","q","h1","h2","h3","h4","h5","h6","ul","ol","li","table","tr","th","td"].join(","),o=function(i){var e=t(i);return 0===e.find(".so-panel.widget").length?i:(e.find("style").remove(),e.find("*").not(n).each((function(){var i=t(this).contents();t(this).replaceWith(i)})),e.html())};if(Array.isArray(window.soPanelsBuilderView)){i=null,window.soPanelsBuilderView.forEach((function(t){i+=o(t.contentPreview)}))}else i=o(window.soPanelsBuilderView.contentPreview)}return i},"undefined"!=typeof rankMathEditor?new i:t(window).on("YoastSEO:ready",(function(){new i}))}));
1
+ jQuery((function(i){var t=function(){"undefined"!=typeof YoastSEO&&(YoastSEO.app.registerPlugin("SiteOriginSeoCompat",{status:"ready"}),YoastSEO.app.registerModification("content",this.contentModification,"SiteOriginSeoCompat",5)),"undefined"!=typeof rankMathEditor&&wp.hooks.addFilter("rank_math_content","SiteOriginSeoCompat",this.contentModification)};t.prototype.contentModification=function(t){var e=i(".block-editor-page").length&&void 0!==window.soPanelsBuilderView;if(i("#so-panels-panels.attached-to-editor").is(":visible")||e){var n=["p","a","img","caption","br","blockquote","cite","em","strong","i","b","q","h1","h2","h3","h4","h5","h6","ul","ol","li","table","tr","th","td"].join(","),o=function(t){var e=i(t);return 0===e.find(".so-panel.widget").length?t:(e.find("iframe, script, style, link").remove(),e.find("*").not(n).each((function(){var t=i(this).contents();i(this).replaceWith(t)})),e.html())};if(Array.isArray(window.soPanelsBuilderView)){t=null,window.soPanelsBuilderView.forEach((function(i){t+=o(i.contentPreview)}))}else t=o(window.soPanelsBuilderView.contentPreview)}return t},"undefined"!=typeof rankMathEditor?new t:i(window).on("YoastSEO:ready",(function(){new t}))}));
js/siteorigin-panels.js CHANGED
@@ -4020,6 +4020,13 @@ module.exports = Backbone.View.extend( {
4020
  prebuilt: new panels.dialog.prebuilt()
4021
  };
4022
 
 
 
 
 
 
 
 
4023
  // Set the builder for each dialog and render it.
4024
  _.each( this.dialogs, function ( p, i, d ) {
4025
  d[ i ].setBuilder( builder );
4020
  prebuilt: new panels.dialog.prebuilt()
4021
  };
4022
 
4023
+
4024
+ // Check if we have preview markup available.
4025
+ $panelsMetabox = $( '#siteorigin-panels-metabox' );
4026
+ if ( $panelsMetabox.length ) {
4027
+ this.contentPreview = $.parseHTML( $panelsMetabox.data( 'preview-markup' ) );
4028
+ }
4029
+
4030
  // Set the builder for each dialog and render it.
4031
  _.each( this.dialogs, function ( p, i, d ) {
4032
  d[ i ].setBuilder( builder );
js/siteorigin-panels.min.js CHANGED
@@ -5,4 +5,4 @@
5
  * @copyright Greg Priday 2013 - 2016 - <https://siteorigin.com/>
6
  * @license GPL 3.0 http://www.gnu.org/licenses/gpl.html
7
  */
8
- var s={};window.panels=s,window.siteoriginPanels=s,s.helpers={},s.helpers.clipboard=e("./helpers/clipboard"),s.helpers.utils=e("./helpers/utils"),s.helpers.editor=e("./helpers/editor"),s.helpers.serialize=e("./helpers/serialize"),s.helpers.pageScroll=e("./helpers/page-scroll"),s.model={},s.model.widget=e("./model/widget"),s.model.cell=e("./model/cell"),s.model.row=e("./model/row"),s.model.builder=e("./model/builder"),s.model.historyEntry=e("./model/history-entry"),s.collection={},s.collection.widgets=e("./collection/widgets"),s.collection.cells=e("./collection/cells"),s.collection.rows=e("./collection/rows"),s.collection.historyEntries=e("./collection/history-entries"),s.view={},s.view.widget=e("./view/widget"),s.view.cell=e("./view/cell"),s.view.row=e("./view/row"),s.view.builder=e("./view/builder"),s.view.dialog=e("./view/dialog"),s.view.styles=e("./view/styles"),s.view.liveEditor=e("./view/live-editor"),s.dialog={},s.dialog.builder=e("./dialog/builder"),s.dialog.widgets=e("./dialog/widgets"),s.dialog.widget=e("./dialog/widget"),s.dialog.prebuilt=e("./dialog/prebuilt"),s.dialog.row=e("./dialog/row"),s.dialog.history=e("./dialog/history"),s.utils={},s.utils.menu=e("./utils/menu"),jQuery.fn.soPanelsSetupBuilderWidget=e("./jquery/setup-builder-widget"),jQuery((function(e){var t,i,s,l,o=e("#siteorigin-panels-metabox");if(s=e("form#post"),o.length&&s.length)t=o,i=o.find(".siteorigin-panels-data-field"),l={editorType:"tinyMCE",postId:e("#post_ID").val(),editorId:"#content",builderType:o.data("builder-type"),builderSupports:o.data("builder-supports"),loadOnAttach:panelsOptions.loadOnAttach&&1==e("#auto_draft").val(),loadLiveEditor:1==o.data("live-editor"),liveEditorPreview:t.data("preview-url")};else if(e(".siteorigin-panels-builder-form").length){var n=e(".siteorigin-panels-builder-form");t=n.find(".siteorigin-panels-builder-container"),i=n.find('input[name="panels_data"]'),s=n,l={editorType:"standalone",postId:n.data("post-id"),editorId:"#post_content",builderType:n.data("type"),builderSupports:n.data("builder-supports"),loadLiveEditor:!1,liveEditorPreview:n.data("preview-url")}}if(!_.isUndefined(t)){var a=window.siteoriginPanels,r=new a.model.builder,d=new a.view.builder({model:r,config:l});e(document).trigger("before_panels_setup",d),d.render().attach({container:t}).setDataField(i).attachToEditor(),s.submit((function(){r.refreshPanelsData()})),t.removeClass("so-panels-loading"),e(document).trigger("panels_setup",d,window.panels),window.soPanelsBuilderView=d}e(document).on("widget-added",(function(t,i){e(i).find(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})),e("body").hasClass("wp-customizer")||e((function(){e(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})),e(window).on("keyup",(function(t){27===t.which&&e(".so-panels-dialog-wrapper, .so-panels-live-editor").filter(":visible").last().find(".so-title-bar .so-close, .live-editor-close").click()}))}))},{"./collection/cells":1,"./collection/history-entries":2,"./collection/rows":3,"./collection/widgets":4,"./dialog/builder":5,"./dialog/history":6,"./dialog/prebuilt":7,"./dialog/row":8,"./dialog/widget":9,"./dialog/widgets":10,"./helpers/clipboard":11,"./helpers/editor":12,"./helpers/page-scroll":13,"./helpers/serialize":14,"./helpers/utils":15,"./jquery/setup-builder-widget":16,"./model/builder":18,"./model/cell":19,"./model/history-entry":20,"./model/row":21,"./model/widget":22,"./utils/menu":23,"./view/builder":24,"./view/cell":25,"./view/dialog":26,"./view/live-editor":27,"./view/row":28,"./view/styles":29,"./view/widget":30}],18:[function(e,t,i){t.exports=Backbone.Model.extend({layoutPosition:{BEFORE:"before",AFTER:"after",REPLACE:"replace"},rows:{},defaults:{data:{widgets:[],grids:[],grid_cells:[]}},initialize:function(){this.set("rows",new panels.collection.rows)},addRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var s=new panels.collection.cells(t);e=_.extend({collection:this.get("rows"),cells:s},e);var l=new panels.model.row(e);return l.builder=this,this.get("rows").add(l,i),l},loadPanelsData:function(e,t){try{t===this.layoutPosition.BEFORE?e=this.concatPanelsData(e,this.getPanelsData()):t===this.layoutPosition.AFTER&&(e=this.concatPanelsData(this.getPanelsData(),e)),this.emptyRows(),this.set("data",JSON.parse(JSON.stringify(e)),{silent:!0});var i,s=[];if(_.isUndefined(e.grid_cells))return void this.trigger("load_panels_data");for(var l=0;l<e.grid_cells.length;l++)i=parseInt(e.grid_cells[l].grid),_.isUndefined(s[i])&&(s[i]=[]),s[i].push(e.grid_cells[l]);var o=this;if(_.each(s,(function(t,i){var s={};_.isUndefined(e.grids[i].style)||(s.style=e.grids[i].style),_.isUndefined(e.grids[i].ratio)||(s.ratio=e.grids[i].ratio),_.isUndefined(e.grids[i].ratio_direction)||(s.ratio_direction=e.grids[i].ratio_direction),_.isUndefined(e.grids[i].color_label)||(s.color_label=e.grids[i].color_label),_.isUndefined(e.grids[i].label)||(s.label=e.grids[i].label),o.addRow(s,t,{noAnimate:!0})})),_.isUndefined(e.widgets))return;_.each(e.widgets,(function(e){var t=null;_.isUndefined(e.panels_info)?(t=e.info,delete e.info):(t=e.panels_info,delete e.panels_info);var i=o.get("rows").at(parseInt(t.grid)).get("cells").at(parseInt(t.cell)),s=new panels.model.widget({class:t.class,values:e});_.isUndefined(t.style)||s.set("style",t.style),_.isUndefined(t.read_only)||s.set("read_only",t.read_only),_.isUndefined(t.widget_id)?s.set("widget_id",panels.helpers.utils.generateUUID()):s.set("widget_id",t.widget_id),_.isUndefined(t.label)||s.set("label",t.label),s.cell=i,i.get("widgets").add(s,{noAnimate:!0})})),this.trigger("load_panels_data")}catch(e){console.log("Error loading data: "+e.message)}},concatPanelsData:function(e,t){if(_.isUndefined(t)||_.isUndefined(t.grids)||_.isEmpty(t.grids)||_.isUndefined(t.grid_cells)||_.isEmpty(t.grid_cells))return e;if(_.isUndefined(e)||_.isUndefined(e.grids)||_.isEmpty(e.grids))return t;var i,s=e.grids.length,l=_.isUndefined(e.widgets)?0:e.widgets.length,o={grids:[],grid_cells:[],widgets:[]};for(o.grids=e.grids.concat(t.grids),_.isUndefined(e.grid_cells)||(o.grid_cells=e.grid_cells.slice()),_.isUndefined(e.widgets)||(o.widgets=e.widgets.slice()),i=0;i<t.grid_cells.length;i++){var n=t.grid_cells[i];n.grid=parseInt(n.grid)+s,o.grid_cells.push(n)}if(!_.isUndefined(t.widgets))for(i=0;i<t.widgets.length;i++){var a=t.widgets[i];a.panels_info.grid=parseInt(a.panels_info.grid)+s,a.panels_info.id=parseInt(a.panels_info.id)+l,o.widgets.push(a)}return o},getPanelsData:function(){var e={widgets:[],grids:[],grid_cells:[]},t=0;return this.get("rows").each((function(i,s){i.get("cells").each((function(i,l){i.get("widgets").each((function(i,o){var n={class:i.get("class"),raw:i.get("raw"),grid:s,cell:l,id:t++,widget_id:i.get("widget_id"),style:i.get("style"),label:i.get("label")};_.isEmpty(n.widget_id)&&(n.widget_id=panels.helpers.utils.generateUUID());var a=_.extend(_.clone(i.get("values")),{panels_info:n});e.widgets.push(a)})),e.grid_cells.push({grid:s,index:l,weight:i.get("weight"),style:i.get("style")})})),e.grids.push({cells:i.get("cells").length,style:i.get("style"),ratio:i.get("ratio"),ratio_direction:i.get("ratio_direction"),color_label:i.get("color_label"),label:i.get("label")})})),e},refreshPanelsData:function(e){e=_.extend({silent:!1},e);var t=this.get("data"),i=this.getPanelsData();this.set("data",i,{silent:!0}),e.silent||JSON.stringify(i)===JSON.stringify(t)||(this.trigger("change"),this.trigger("change:data"),this.trigger("refresh_panels_data",i,e))},emptyRows:function(){return _.invoke(this.get("rows").toArray(),"destroy"),this.get("rows").reset(),this},isValidLayoutPosition:function(e){return e===this.layoutPosition.BEFORE||e===this.layoutPosition.AFTER||e===this.layoutPosition.REPLACE},getPanelsDataFromHtml:function(e,t){var i,s=this,l=jQuery('<div id="wrapper">'+e+"</div>");if(l.find(".panel-layout .panel-grid").length){var o={grids:[],grid_cells:[],widgets:[]},n=new RegExp(panelsOptions.siteoriginWidgetRegex,"i"),a=(i=document.createElement("div"),function(e){return e&&"string"==typeof e&&(e=(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"")).replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),i.innerHTML=e,e=i.textContent,i.textContent=""),e}),r=function(e){var t,i=e.find("div");if(!i.length)return e.html();for(t=0;t<i.length-1&&jQuery.trim(i.eq(t).text())==jQuery.trim(i.eq(t+1).text());t++);var s=i.eq(t).find(".widget-title:header"),l="";return s.length&&(l=s.html(),s.remove()),{title:l,text:i.eq(t).html()}},d=l.find(".panel-layout").eq(0),h=function(e,t){return jQuery(t).closest(".panel-layout").is(d)};return l.find("> .panel-layout > .panel-grid").filter(h).each((function(e,i){var l=jQuery(i),d=l.find(".panel-grid-cell").filter(h);o.grids.push({cells:d.length,style:l.data("style"),ratio:l.data("ratio"),ratio_direction:l.data("ratio-direction"),color_label:l.data("color-label"),label:l.data("label")}),d.each((function(i,l){var d=jQuery(l),c=d.find(".so-panel").filter(h);o.grid_cells.push({grid:e,weight:_.isUndefined(d.data("weight"))?1:parseFloat(d.data("weight")),style:d.data("style")}),c.each((function(l,d){var h=jQuery(d),c=h.find(".panel-widget-style").length?h.find(".panel-widget-style").html():h.html(),u={grid:e,cell:i,style:h.data("style"),raw:!1,label:h.data("label")};c=c.trim();var p=n.exec(c);if(!_.isNull(p)&&""===c.replace(n,"").trim()){try{var g=/class="(.*?)"/.exec(p[3]),f=jQuery(p[5]),w=JSON.parse(a(f.val())).instance;u.class=g[1].replace(/\\\\+/g,"\\"),u.raw=!1,w.panels_info=u,o.widgets.push(w)}catch(e){u.class=t,o.widgets.push(_.extend(r(h),{filter:"1",type:"visual",panels_info:u}))}return!0}return-1!==c.indexOf("panel-layout")&&jQuery("<div>"+c+"</div>").find(".panel-layout .panel-grid").length?(u.class="SiteOrigin_Panels_Widgets_Layout",o.widgets.push({panels_data:s.getPanelsDataFromHtml(c,t),panels_info:u}),!0):(u.class=t,o.widgets.push(_.extend(r(h),{filter:"1",type:"visual",panels_info:u})),!0)}))}))})),l.find(".panel-layout").remove(),l.find("style[data-panels-style-for-post]").remove(),l.html().replace(/^\s+|\s+$/gm,"").length&&(o.grids.push({cells:1,style:{}}),o.grid_cells.push({grid:o.grids.length-1,weight:1}),o.widgets.push({filter:"1",text:l.html().replace(/^\s+|\s+$/gm,""),title:"",type:"visual",panels_info:{class:t,raw:!1,grid:o.grids.length-1,cell:0}})),o}return{grid_cells:[{grid:0,weight:1}],grids:[{cells:1}],widgets:[{filter:"1",text:e,title:"",type:"visual",panels_info:{class:t,raw:!1,grid:0,cell:0}}]}}})},{}],19:[function(e,t,i){t.exports=Backbone.Model.extend({widgets:{},row:null,defaults:{weight:0,style:{}},indexes:null,initialize:function(){this.set("widgets",new panels.collection.widgets),this.on("destroy",this.onDestroy,this)},onDestroy:function(){_.invoke(this.get("widgets").toArray(),"destroy"),this.get("widgets").reset()},clone:function(e,t){_.isUndefined(e)&&(e=this.row),t=_.extend({cloneWidgets:!0},t);var i=new this.constructor(this.attributes);return i.set("collection",e.get("cells"),{silent:!0}),i.row=e,t.cloneWidgets&&this.get("widgets").each((function(e){i.get("widgets").add(e.clone(i,t),{silent:!0})})),i}})},{}],20:[function(e,t,i){t.exports=Backbone.Model.extend({defaults:{text:"",data:"",time:null,count:1}})},{}],21:[function(e,t,i){t.exports=Backbone.Model.extend({builder:null,defaults:{style:{}},indexes:null,initialize:function(){_.isEmpty(this.get("cells"))?this.set("cells",new panels.collection.cells):this.get("cells").each(function(e){e.row=this}.bind(this)),this.on("destroy",this.onDestroy,this)},setCells:function(e){var t=this.get("cells")||new panels.collection.cells,i=[];t.each((function(s,l){var o=e.at(l);if(o)s.set("weight",o.get("weight"));else{for(var n=t.at(e.length-1),a=s.get("widgets").models.slice(),r=0;r<a.length;r++)a[r].moveToCell(n,{silent:!1});i.push(s)}})),_.each(i,(function(e){t.remove(e)})),e.length>t.length&&_.each(e.slice(t.length,e.length),function(e){e.set({collection:t}),e.row=this,t.add(e)}.bind(this)),this.reweightCells()},reweightCells:function(){var e=0,t=this.get("cells");t.each((function(t){e+=t.get("weight")})),t.each((function(t){t.set("weight",t.get("weight")/e)})),this.trigger("reweight_cells")},onDestroy:function(){_.invoke(this.get("cells").toArray(),"destroy"),this.get("cells").reset()},clone:function(e){_.isUndefined(e)&&(e=this.builder);var t=new this.constructor(this.attributes);t.set("collection",e.get("rows"),{silent:!0}),t.builder=e;var i=new panels.collection.cells;return this.get("cells").each((function(e){i.add(e.clone(t),{silent:!0})})),t.set("cells",i),t}})},{}],22:[function(e,t,i){t.exports=Backbone.Model.extend({cell:null,defaults:{class:null,missing:!1,values:{},raw:!1,style:{},read_only:!1,widget_id:""},indexes:null,initialize:function(){var e=this.get("class");!_.isUndefined(panelsOptions.widgets[e])&&panelsOptions.widgets[e].installed||this.set("missing",!0)},getWidgetField:function(e){return _.isUndefined(panelsOptions.widgets[this.get("class")])?"title"===e||"description"===e?panelsOptions.loc.missing_widget[e]:"":this.has("label")&&!_.isEmpty(this.get("label"))?this.get("label"):panelsOptions.widgets[this.get("class")][e]},moveToCell:function(e,t,i){return t=_.extend({silent:!0},t),this.cell=e,this.collection.remove(this,t),e.get("widgets").add(this,_.extend({at:i},t)),this.trigger("move_to_cell",e,i),this},setValues:function(e){var t=!1;JSON.stringify(e)!==JSON.stringify(this.get("values"))&&(t=!0),this.set("values",e,{silent:!0}),t&&(this.trigger("change",this),this.trigger("change:values"))},clone:function(e,t){_.isUndefined(e)&&(e=this.cell);var i=new this.constructor(this.attributes),s=JSON.parse(JSON.stringify(this.get("values"))),l=function(e){return _.each(e,(function(t,i){_.isString(i)&&"_"===i[0]?delete e[i]:_.isObject(e[i])&&l(e[i])})),e};return s=l(s),"SiteOrigin_Panels_Widgets_Layout"===this.get("class")&&(s.builder_id=Math.random().toString(36).substr(2)),i.set("widget_id",""),i.set("values",s,{silent:!0}),i.set("collection",e.get("widgets"),{silent:!0}),i.cell=e,i.isDuplicate=!0,i},getTitle:function(){var e=panelsOptions.widgets[this.get("class")];if(_.isUndefined(e))return this.get("class").replace(/_/g," ");if(!_.isUndefined(e.panels_title)&&!1===e.panels_title)return panelsOptions.widgets[this.get("class")].description;var t=this.get("values"),i=["title","text"];for(var s in t)"_"!==s.charAt(0)&&"so_sidebar_emulator_id"!==s&&"option_name"!==s&&t.hasOwnProperty(s)&&i.push(s);for(var l in i=_.uniq(i))if(!_.isUndefined(t[i[l]])&&_.isString(t[i[l]])&&""!==t[i[l]]&&"on"!==t[i[l]]&&"true"!==t[i[l]]&&"false"!==t[i[l]]&&"_"!==i[l][0]&&!jQuery.isNumeric(t[i[l]])){var o=t[i[l]],n=(o=o.replace(/<\/?[^>]+(>|$)/g,"")).split(" ");return(n=n.slice(0,20)).join(" ")}return this.getWidgetField("description")}})},{}],23:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({wrapperTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu").html())),sectionTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu-section").html())),contexts:[],active:!1,events:{"keyup .so-search-wrapper input":"searchKeyUp"},initialize:function(){this.listenContextMenu(),this.render(),this.attach()},listenContextMenu:function(){var e=this;l(window).on("contextmenu",(function(t){return e.active&&!e.isOverEl(e.$el,t)?(e.closeMenu(),e.active=!1,t.preventDefault(),!1):!!e.active||(e.active=!1,e.trigger("activate_context",t,e),void(e.active&&(t.preventDefault(),e.openMenu({left:t.pageX,top:t.pageY}))))}))},render:function(){this.setElement(this.wrapperTemplate())},attach:function(){this.$el.appendTo("body")},openMenu:function(e){this.trigger("open_menu"),l(window).on("keyup",{menu:this},this.keyboardListen),l(window).on("click",{menu:this},this.clickOutsideListen),this.$el.css("max-height",l(window).height()-20),e.left+this.$el.outerWidth()+10>=l(window).width()&&(e.left=l(window).width()-this.$el.outerWidth()-10),e.left<=0&&(e.left=10),e.top+this.$el.outerHeight()-l(window).scrollTop()+10>=l(window).height()&&(e.top=l(window).height()+l(window).scrollTop()-this.$el.outerHeight()-10),e.left<=0&&(e.left=10),this.$el.css({left:e.left+1,top:e.top+1}).show(),this.$(".so-search-wrapper input").focus()},closeMenu:function(){this.trigger("close_menu"),l(window).off("keyup",this.keyboardListen),l(window).off("click",this.clickOutsideListen),this.active=!1,this.$el.empty().hide()},keyboardListen:function(e){var t=e.data.menu;switch(e.which){case 27:t.closeMenu()}},clickOutsideListen:function(e){var t=e.data.menu;3!==e.which&&t.$el.is(":visible")&&!t.isOverEl(t.$el,e)&&t.closeMenu()},addSection:function(e,t,i,s){var o=this;t=_.extend({display:5,defaultDisplay:!1,search:!0,sectionTitle:"",searchPlaceholder:"",titleKey:"title"},t);var n=l(this.sectionTemplate({settings:t,items:i})).attr("id","panels-menu-section-"+e);this.$el.append(n),n.find(".so-item:not(.so-confirm)").click((function(){var e=l(this);s(e.data("key")),o.closeMenu()})),n.find(".so-item.so-confirm").click((function(){var e=l(this);if(e.hasClass("so-confirming"))return s(e.data("key")),void o.closeMenu();e.data("original-text",e.html()).addClass("so-confirming").html('<span class="dashicons dashicons-yes"></span> '+panelsOptions.loc.dropdown_confirm),setTimeout((function(){e.removeClass("so-confirming"),e.html(e.data("original-text"))}),2500)})),n.data("settings",t).find(".so-search-wrapper input").trigger("keyup"),this.active=!0},hasSection:function(e){return this.$el.find("#panels-menu-section-"+e).length>0},searchKeyUp:function(e){var t=l(e.currentTarget),i=t.closest(".so-section"),s=i.data("settings");if(38===e.which||40===e.which){var o=i.find("ul li:visible"),n=o.filter(".so-active").eq(0);if(n.length){o.removeClass("so-active");var a=o.index(n);38===e.which?n=a-1<0?o.last():o.eq(a-1):40===e.which&&(n=a+1>=o.length?o.first():o.eq(a+1))}else 38===e.which?n=o.last():40===e.which&&(n=o.first());return n.addClass("so-active"),!1}if(13===e.which)return 1===i.find("ul li:visible").length?(i.find("ul li:visible").trigger("click"),!1):(i.find("ul li.so-active:visible").trigger("click"),!1);if(""===t.val())if(s.defaultDisplay){i.find(".so-item").hide();for(var r=0;r<s.defaultDisplay.length;r++)i.find('.so-item[data-key="'+s.defaultDisplay[r]+'"]').show()}else i.find(".so-item").show();else i.find(".so-item").hide().each((function(){var e=l(this);-1!==e.html().toLowerCase().indexOf(t.val().toLowerCase())&&e.show()}));i.find(".so-item:visible:gt("+(s.display-1)+")").hide(),0===i.find(".so-item:visible").length&&""!==t.val()?i.find(".so-no-results").show():i.find(".so-no-results").hide()},isOverEl:function(e,t){var i=[[e.offset().left,e.offset().top],[e.offset().left+e.outerWidth(),e.offset().top+e.outerHeight()]];return t.pageX>=i[0][0]&&t.pageX<=i[1][0]&&t.pageY>=i[0][1]&&t.pageY<=i[1][1]}})},{}],24:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({config:{},template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder").html())),dialogs:{},rowsSortable:null,dataField:!1,currentData:"",contentPreview:"",attachedToEditor:!1,attachedVisible:!1,liveEditor:void 0,menu:!1,activeCell:null,events:{"click .so-tool-button.so-widget-add":"displayAddWidgetDialog","click .so-tool-button.so-row-add":"displayAddRowDialog","click .so-tool-button.so-prebuilt-add":"displayAddPrebuiltDialog","click .so-tool-button.so-history":"displayHistoryDialog","click .so-tool-button.so-live-editor":"displayLiveEditor"},rows:null,initialize:function(e){var t=this;return this.config=_.extend({loadLiveEditor:!1,builderSupports:{}},e.config),this.config.builderSupports=_.extend({addRow:!0,editRow:!0,deleteRow:!0,moveRow:!0,addWidget:!0,editWidget:!0,deleteWidget:!0,moveWidget:!0,prebuilt:!0,history:!0,liveEditor:!0,revertToEditor:!0},this.config.builderSupports),e.config.loadLiveEditor&&this.on("builder_live_editor_added",(function(){this.displayLiveEditor()})),this.dialogs={widgets:new s.dialog.widgets,row:new s.dialog.row,prebuilt:new s.dialog.prebuilt},_.each(this.dialogs,(function(e,i,s){s[i].setBuilder(t)})),this.dialogs.row.setRowDialogType("create"),this.listenTo(this.model.get("rows"),"add",this.onAddRow),l(window).resize((function(e){e.target===window&&t.trigger("builder_resize")})),this.listenTo(this.model,"change:data load_panels_data",this.storeModelData),this.listenTo(this.model,"change:data load_panels_data",this.toggleWelcomeDisplay),this.on("builder_attached_to_editor",this.handleContentChange,this),this.on("content_change",this.handleContentChange,this),this.on("display_builder",this.handleDisplayBuilder,this),this.on("hide_builder",this.handleHideBuilder,this),this.on("builder_rendered builder_resize",this.handleBuilderSizing,this),this.on("display_builder",this.wrapEditorExpandAdjust,this),this.menu=new s.utils.menu({}),this.listenTo(this.menu,"activate_context",this.activateContextMenu),this.config.loadOnAttach&&this.on("builder_attached_to_editor",(function(){this.displayAttachedBuilder({confirm:!1})}),this),this},render:function(){return this.setElement(this.template()),this.$el.attr("id","siteorigin-panels-builder-"+this.cid).addClass("so-builder-container"),this.trigger("builder_rendered"),this},attach:function(e){(e=_.extend({container:!1,dialog:!1},e)).dialog?(this.dialog=new s.dialog.builder,this.dialog.builder=this):(this.$el.appendTo(e.container),this.metabox=e.container.closest(".postbox"),this.initSortable(),this.trigger("attached_to_container",e.container)),this.trigger("builder_attached"),this.supports("liveEditor")&&this.addLiveEditor(),this.supports("history")&&this.addHistoryBrowser();var t=this.$(".so-builder-toolbar"),i=this.$(".so-panels-welcome-message"),l=panelsOptions.loc.welcomeMessage,o=[];this.supports("addWidget")?o.push(l.addWidgetButton):t.find(".so-widget-add").hide(),this.supports("addRow")?o.push(l.addRowButton):t.find(".so-row-add").hide(),this.supports("prebuilt")?o.push(l.addPrebuiltButton):t.find(".so-prebuilt-add").hide();var n="";3===o.length?n=l.threeEnabled:2===o.length?n=l.twoEnabled:1===o.length?n=l.oneEnabled:0===o.length&&(n=l.addingDisabled);var a=_.template(s.helpers.utils.processTemplate(n))({items:o})+" "+l.docsMessage;return i.find(".so-message-wrapper").html(a),this},attachToEditor:function(){if("tinyMCE"!==this.config.editorType)return this;this.attachedToEditor=!0;var e=this.metabox,t=this;l("#wp-content-wrap .wp-editor-tabs").find(".wp-switch-editor").click((function(e){e.preventDefault(),l("#wp-content-editor-container").show(),l("#wp-content-wrap").removeClass("panels-active"),l("#content-resize-handle").show(),t.trigger("hide_builder")})).end().append(l('<button type="button" id="content-panels" class="hide-if-no-js wp-switch-editor switch-panels">'+e.find("h2.hndle").html()+"</button>").click((function(e){t.displayAttachedBuilder({confirm:!0})&&e.preventDefault()}))),this.supports("revertToEditor")&&e.find(".so-switch-to-standard").click((function(i){i.preventDefault(),confirm(panelsOptions.loc.confirm_stop_builder)&&(t.addHistoryEntry("back_to_editor"),t.model.loadPanelsData(!1),l("#wp-content-wrap").show(),e.hide(),l(window).resize(),t.attachedVisible=!1,t.trigger("hide_builder"))})).show(),e.insertAfter("#wp-content-wrap").hide().addClass("attached-to-editor");var i=this.model.get("data");_.isEmpty(i.widgets)&&_.isEmpty(i.grids)&&this.supports("revertToEditor")||this.displayAttachedBuilder({confirm:!1});var s=function(){var e=t.$(".so-builder-toolbar");if(t.$el.hasClass("so-display-narrow"))return e.css({top:0,left:0,width:"100%",position:"absolute"}),void t.$el.css("padding-top",e.outerHeight());var i=l(window).scrollTop()-t.$el.offset().top;"fixed"===l("#wpadminbar").css("position")&&(i+=l("#wpadminbar").outerHeight());var s=0,o=t.$el.outerHeight()-e.outerHeight()+20;i>s&&i<o?"fixed"!==e.css("position")&&e.css({top:l("#wpadminbar").outerHeight(),left:t.$el.offset().left,width:t.$el.outerWidth(),position:"fixed"}):e.css({top:Math.min(Math.max(i,0),t.$el.outerHeight()-e.outerHeight()+20),left:0,width:"100%",position:"absolute"}),t.$el.css("padding-top",e.outerHeight())};return this.on("builder_resize",s,this),l(document).scroll(s),s(),this.trigger("builder_attached_to_editor"),this},displayAttachedBuilder:function(e){if((e=_.extend({confirm:!0},e)).confirm){var t="undefined"!=typeof tinyMCE&&tinyMCE.get("content");if(""!==(t&&_.isFunction(t.getContent)?t.getContent():l("textarea#content").val())&&!confirm(panelsOptions.loc.confirm_use_builder))return!1}return l("#wp-content-wrap").hide(),l("#editor-expand-toggle").on("change.editor-expand",(function(){l(this).prop("checked")||l("#wp-content-wrap").hide()})),this.metabox.show().find("> .inside").show(),l(window).resize(),l(document).scroll(),this.attachedVisible=!0,this.trigger("display_builder"),!0},initSortable:function(){if(!this.supports("moveRow"))return this;var e=this,t=e.$el.attr("id");return this.rowsSortable=this.$(".so-rows-container").sortable({appendTo:"#wpwrap",items:".so-row-container",handle:".so-row-move",connectWith:"#"+t+".so-rows-container,.block-editor .so-rows-container",axis:"y",tolerance:"pointer",scroll:!1,remove:function(t,i){e.model.get("rows").remove(l(i.item).data("view").model,{silent:!0}),e.model.refreshPanelsData()},receive:function(t,i){e.model.get("rows").add(l(i.item).data("view").model,{silent:!0,at:l(i.item).index()}),e.model.refreshPanelsData()},stop:function(t,i){var s=l(i.item),o=s.data("view"),n=e.model.get("rows");n.get(o.model)&&(e.addHistoryEntry("row_moved"),n.remove(o.model,{silent:!0}),n.add(o.model,{silent:!0,at:s.index()}),o.trigger("move",s.index()),e.model.refreshPanelsData())}}),this},refreshSortable:function(){_.isNull(this.rowsSortable)||this.rowsSortable.sortable("refresh")},setDataField:function(e,t){if(t=_.extend({load:!0},t),this.dataField=e,this.dataField.data("builder",this),t.load&&""!==e.val()){var i=this.dataField.val();try{i=JSON.parse(i)}catch(e){console.log("Failed to parse Page Builder layout data from supplied data field."),i={}}this.setData(i)}return this},setData:function(e){this.model.loadPanelsData(e),this.currentData=e,this.toggleWelcomeDisplay()},getData:function(){return this.model.get("data")},storeModelData:function(){var e=JSON.stringify(this.model.get("data"));l(this.dataField).val()!==e&&(l(this.dataField).val(e),l(this.dataField).trigger("change"),this.trigger("content_change"))},onAddRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.row({model:e});l.builder=this,l.render(),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".so-rows-container")):l.$el.insertAfter(this.$(".so-rows-container .so-row-container").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),l.resize(),this.trigger("row_added")},displayAddWidgetDialog:function(){this.dialogs.widgets.openDialog()},displayAddRowDialog:function(){var e=new s.model.row,t=new s.collection.cells([{weight:.5},{weight:.5}]);t.each((function(t){t.row=e})),e.set("cells",t),e.builder=this.model,this.dialogs.row.setRowModel(e),this.dialogs.row.openDialog()},displayAddPrebuiltDialog:function(){this.dialogs.prebuilt.openDialog()},displayHistoryDialog:function(){this.dialogs.history.openDialog()},pasteRowHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.addHistoryEntry("row_pasted"),e.builder=this.model,this.model.get("rows").add(e,{at:this.model.get("rows").indexOf(this.model)+1}),this.model.refreshPanelsData())},getActiveCell:function(e){if(e=_.extend({createCell:!0},e),!this.model.get("rows").length){if(!e.createCell)return null;this.model.addRow({},[{weight:1}],{noAnimate:!0})}var t=this.activeCell;return _.isEmpty(t)||-1===this.model.get("rows").indexOf(t.model.row)?this.model.get("rows").last().get("cells").first():t.model},addLiveEditor:function(){return _.isEmpty(this.config.liveEditorPreview)?this:(this.liveEditor=new s.view.liveEditor({builder:this,previewUrl:this.config.liveEditorPreview}),this.liveEditor.hasPreviewUrl()&&this.$(".so-builder-toolbar .so-live-editor").show(),this.trigger("builder_live_editor_added"),this)},displayLiveEditor:function(){_.isUndefined(this.liveEditor)||this.liveEditor.open()},addHistoryBrowser:function(){if(_.isEmpty(this.config.liveEditorPreview))return this;this.dialogs.history=new s.dialog.history,this.dialogs.history.builder=this,this.dialogs.history.entries.builder=this.model,this.dialogs.history.setRevertEntry(this.model),this.$(".so-builder-toolbar .so-history").show()},addHistoryEntry:function(e,t){_.isUndefined(t)&&(t=null),_.isUndefined(this.dialogs.history)||this.dialogs.history.entries.addEntry(e,t)},supports:function(e){return"rowAction"===e?this.supports("addRow")||this.supports("editRow")||this.supports("deleteRow"):"widgetAction"===e?this.supports("addWidget")||this.supports("editWidget")||this.supports("deleteWidget"):!_.isUndefined(this.config.builderSupports[e])&&this.config.builderSupports[e]},handleContentChange:function(){if(panelsOptions.copy_content&&(s.helpers.editor.isBlockEditor()||s.helpers.editor.isClassicEditor(this))){var e=this.model.getPanelsData();_.isEmpty(e.widgets)||l.post(panelsOptions.ajaxurl,{action:"so_panels_builder_content_json",panels_data:JSON.stringify(e),post_id:this.config.postId},function(e){this.contentPreview&&""!==e.post_content&&this.updateEditorContent(e.post_content),""!==e.preview&&(this.contentPreview=e.preview)}.bind(this))}},updateEditorContent:function(e){if("tinyMCE"!==this.config.editorType||"undefined"==typeof tinyMCE||_.isNull(tinyMCE.get("content"))){l(this.config.editorId).val(e).trigger("change").trigger("keyup")}else{var t=tinyMCE.get("content");t.setContent(e),t.fire("change"),t.fire("keyup")}this.triggerSeoChange()},triggerSeoChange:function(){"undefined"==typeof YoastSEO||_.isNull(YoastSEO)||_.isNull(YoastSEO.app.refresh)||YoastSEO.app.refresh(),"undefined"==typeof rankMathEditor||_.isNull(rankMathEditor)||_.isNull(rankMathEditor.refresh)||rankMathEditor.refresh("content")},handleDisplayBuilder:function(){var e="undefined"!=typeof tinyMCE&&tinyMCE.get("content"),t=e&&_.isFunction(e.getContent)?e.getContent():l("textarea#content").val();if((_.isEmpty(this.model.get("data"))||_.isEmpty(this.model.get("data").widgets)&&_.isEmpty(this.model.get("data").grids))&&""!==t){var i=panelsOptions.text_widget;if(_.isEmpty(i))return;this.model.loadPanelsData(this.model.getPanelsDataFromHtml(t,i)),this.model.trigger("change"),this.model.trigger("change:data")}l("#post-status-info").addClass("for-siteorigin-panels")},handleHideBuilder:function(){l("#post-status-info").show().removeClass("for-siteorigin-panels")},wrapEditorExpandAdjust:function(){try{for(var e,t=(l.hasData(window)&&l._data(window)).events.scroll,i=0;i<t.length;i++)if("editor-expand"===t[i].namespace){e=t[i],l(window).unbind("scroll",e.handler),l(window).bind("scroll",function(t){this.attachedVisible||e.handler(t)}.bind(this));break}}catch(e){return}},handleBuilderSizing:function(){var e=this.$el.width();return e?(e<575?this.$el.addClass("so-display-narrow"):this.$el.removeClass("so-display-narrow"),this):this},setDialogParents:function(e,t){_.each(this.dialogs,(function(i,s,l){l[s].setParent(e,t)})),this.on("add_dialog",(function(i){i.setParent(e,t)}),this)},toggleWelcomeDisplay:function(){this.model.get("rows").isEmpty()?this.$(".so-panels-welcome-message").show():this.$(".so-panels-welcome-message").hide()},activateContextMenu:function(e,t){if(l.contains(this.$el.get(0),e.target)){var i=l([]).add(this.$(".so-panels-welcome-message:visible")).add(this.$(".so-rows-container > .so-row-container")).add(this.$(".so-cells > .cell")).add(this.$(".cell-wrapper > .so-widget")).filter((function(i){return t.isOverEl(l(this),e)})),s=i.last().data("view");void 0!==s&&void 0!==s.buildContextualMenu?s.buildContextualMenu(e,t):i.last().hasClass("so-panels-welcome-message")&&this.buildContextualMenu(e,t)}},buildContextualMenu:function(e,t){var i={};this.supports("addRow")&&(i.add_row={title:panelsOptions.loc.contextual.add_row}),s.helpers.clipboard.canCopyPaste()&&s.helpers.clipboard.isModel("row-model")&&this.supports("addRow")&&(i.paste_row={title:panelsOptions.loc.contextual.row_paste}),_.isEmpty(i)||t.addSection("builder-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},i,function(e){switch(e){case"add_row":this.displayAddRowDialog();break;case"paste_row":this.pasteRowHandler()}}.bind(this))}})},{}],25:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-cell").html())),events:{"click .cell-wrapper":"handleCellClick"},row:null,widgetSortable:null,initialize:function(){this.listenTo(this.model.get("widgets"),"add",this.onAddWidget)},render:function(){var e={weight:this.model.get("weight"),totalWeight:this.row.model.get("cells").totalWeight()};this.setElement(this.template(e)),this.$el.data("view",this);var t=this;return this.model.get("widgets").each((function(e){var i=new s.view.widget({model:e});i.cell=t,i.render(),i.$el.appendTo(t.$(".widgets-container"))})),this.initSortable(),this.initResizable(),this},initSortable:function(){if(!this.row.builder.supports("moveWidget"))return this;var e=this,t=e.row.builder,i=t.$el.attr("id"),s=t.model;return this.widgetSortable=this.$(".widgets-container").sortable({placeholder:"so-widget-sortable-highlight",connectWith:"#"+i+" .so-cells .cell .widgets-container,.block-editor .so-cells .cell .widgets-container",tolerance:"pointer",scroll:!1,over:function(t,i){e.row.builder.trigger("widget_sortable_move")},remove:function(t,i){e.model.get("widgets").remove(l(i.item).data("view").model,{silent:!0}),s.refreshPanelsData()},receive:function(t,i){var o=l(i.item).data("view");o.cell=e;var n=o.model;n.cell=e.model,e.model.get("widgets").add(n,{silent:!0,at:l(i.item).index()}),s.refreshPanelsData()},stop:function(t,i){var o=l(i.item),n=o.data("view"),a=o.closest(".cell").data("view");e.model.get("widgets").get(n.model)&&(e.row.builder.addHistoryEntry("widget_moved"),n.model.moveToCell(a.model,{},o.index()),n.cell=a,s.refreshPanelsData())},helper:function(e,t){var i=t.clone().css({width:t.outerWidth(),"z-index":1e4,position:"fixed"}).addClass("widget-being-dragged").appendTo("body");return t.outerWidth()>720&&i.animate({"margin-left":e.pageX-t.offset().left-240,width:480},"fast"),i}}),this},refreshSortable:function(){_.isNull(this.widgetSortable)||this.widgetSortable.sortable("refresh")},initResizable:function(){if(!this.row.builder.supports("editRow"))return this;var e,t=this.$(".resize-handle").css("position","absolute"),i=this.row.$el,s=this;return t.draggable({axis:"x",containment:i,start:function(t,i){if(e=s.$el.prev().data("view"),!_.isUndefined(e)){var o=s.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:s.$el.outerWidth(),left:5,height:s.$el.outerHeight()});o.find(".resize-handle").remove();var n=e.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:e.$el.outerWidth(),right:5,height:e.$el.outerHeight()});n.find(".resize-handle").remove(),l(this).data({newCellClone:o,prevCellClone:n})}},drag:function(i,o){var n=s.row.$el.width()+10,a=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,r=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;l(this).data("newCellClone").css("width",n*a).find(".preview-cell-weight").html(Math.round(1e3*a)/10),l(this).data("prevCellClone").css("width",n*r).find(".preview-cell-weight").html(Math.round(1e3*r)/10)},stop:function(i,o){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove();var n=s.row.$el.width()+10,a=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,r=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;a>.02&&r>.02&&(s.row.builder.addHistoryEntry("cell_resized"),s.model.set("weight",a),e.model.set("weight",r),s.row.resize()),o.helper.css("left",-t.outerWidth()/2),s.row.builder.model.refreshPanelsData()}}),this},onAddWidget:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.widget({model:e});l.cell=this,_.isUndefined(e.isDuplicate)&&(e.isDuplicate=!1),l.render({loadForm:e.isDuplicate}),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".widgets-container")):l.$el.insertAfter(this.$(".widgets-container .so-widget").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),this.row.resize(),this.row.builder.trigger("widget_added",l)},handleCellClick:function(e){this.row.builder.$el.find(".so-cells .cell").removeClass("cell-selected"),this.row.builder.activeCell!==this||this.model.get("widgets").length?(this.$el.addClass("cell-selected"),this.row.builder.activeCell=this):this.row.builder.activeCell=null},pasteHandler:function(){var e=s.helpers.clipboard.getModel("widget-model");!_.isEmpty(e)&&e instanceof s.model.widget&&(this.row.builder.addHistoryEntry("widget_pasted"),e.cell=this.model,this.model.get("widgets").add(e),this.row.builder.model.refreshPanelsData())},buildContextualMenu:function(e,t){var i=this;t.hasSection("add-widget-below")||t.addSection("add-widget-cell",{sectionTitle:panelsOptions.loc.contextual.add_widget_cell,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,(function(e){i.row.builder.trigger("before_user_adds_widget"),i.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=i.model,t.cell.get("widgets").add(t),i.row.builder.model.refreshPanelsData(),i.row.builder.trigger("after_user_adds_widget",t)}));var l={};this.row.builder.supports("addWidget")&&s.helpers.clipboard.isModel("widget-model")&&(l.paste={title:panelsOptions.loc.contextual.cell_paste_widget}),_.isEmpty(l)||t.addSection("cell-actions",{sectionTitle:panelsOptions.loc.contextual.cell_actions,search:!1},l,function(e){switch(e){case"paste":this.pasteHandler()}this.row.builder.model.refreshPanelsData()}.bind(this)),this.row.buildContextualMenu(e,t)}})},{}],26:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({dialogTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog").html())),dialogTabTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-tab").html())),tabbed:!1,rendered:!1,builder:!1,className:"so-panels-dialog-wrapper",dialogClass:"",dialogIcon:"",parentDialog:!1,dialogOpen:!1,editableLabel:!1,events:{"click .so-close":"closeDialog","click .so-nav.so-previous":"navToPrevious","click .so-nav.so-next":"navToNext"},initialize:function(){this.once("open_dialog",this.render),this.once("open_dialog",this.attach),this.once("open_dialog",this.setDialogClass),this.trigger("initialize_dialog",this),_.isUndefined(this.initializeDialog)||this.initializeDialog(),_.bindAll(this,"initSidebars","hasSidebar","onResize","toggleLeftSideBar","toggleRightSideBar")},getNextDialog:function(){return null},getPrevDialog:function(){return null},setDialogClass:function(){""!==this.dialogClass&&this.$(".so-panels-dialog").addClass(this.dialogClass)},setBuilder:function(e){return this.builder=e,e.trigger("add_dialog",this,this.builder),this},attach:function(){return this.$el.appendTo("body"),this},parseDialogContent:function(e,t){t=_.extend({cid:this.cid},t);var i=l(_.template(s.helpers.utils.processTemplate(e))(t)),o={title:i.find(".title").html(),buttons:i.find(".buttons").html(),content:i.find(".content").html()};return i.has(".left-sidebar")&&(o.left_sidebar=i.find(".left-sidebar").html()),i.has(".right-sidebar")&&(o.right_sidebar=i.find(".right-sidebar").html()),o},renderDialog:function(e){if(e=_.extend({editableLabel:this.editableLabel,dialogIcon:this.dialogIcon},e),this.$el.html(this.dialogTemplate(e)).hide(),this.$el.data("view",this),this.$el.addClass("so-panels-dialog-wrapper"),!1!==this.parentDialog){var t=l('<h3 class="so-parent-link"></h3>').html(this.parentDialog.text+'<div class="so-separator"></div>');t.click(function(e){e.preventDefault(),this.closeDialog(),this.parentDialog.dialog.openDialog()}.bind(this)),this.$(".so-title-bar .so-title").before(t)}return this.$(".so-title-bar .so-title-editable").length&&this.initEditableLabel(),setTimeout(this.initSidebars,1),this},initSidebars:function(){var e=this.$(".so-show-left-sidebar").hide(),t=this.$(".so-show-right-sidebar").hide(),i=this.hasSidebar("left"),s=this.hasSidebar("right");(i||s)&&(l(window).on("resize",this.onResize),i&&(e.show(),e.on("click",this.toggleLeftSideBar)),s&&(t.show(),t.on("click",this.toggleRightSideBar))),this.onResize()},initTabs:function(){var e=this.$(".so-sidebar-tabs li a");if(0===e.length)return this;var t=this;return e.click((function(e){e.preventDefault();var i=l(this);t.$(".so-sidebar-tabs li").removeClass("tab-active"),t.$(".so-content .so-content-tabs > *").hide(),i.parent().addClass("tab-active");var s=i.attr("href");if(!_.isUndefined(s)&&"#"===s.charAt(0)){var o=s.split("#")[1];t.$(".so-content .so-content-tabs .tab-"+o).show()}t.trigger("tab_click",i)})),this.$(".so-sidebar-tabs li a").first().click(),this},initToolbar:function(){this.$(".so-toolbar .so-buttons .so-toolbar-button").click(function(e){e.preventDefault(),this.trigger("button_click",l(e.currentTarget))}.bind(this)),this.$(".so-toolbar .so-buttons .so-dropdown-button").click(function(e){e.preventDefault();var t=l(e.currentTarget).siblings(".so-dropdown-links-wrapper");t.is(".hidden")?t.removeClass("hidden"):t.addClass("hidden")}.bind(this)),l("html").click(function(e){this.$(".so-dropdown-links-wrapper").not(".hidden").each((function(t,i){var s=l(i),o=l(e.target);0!==o.length&&(o.is(".so-needs-confirm")&&!o.is(".so-confirmed")||o.is(".so-dropdown-button"))||s.addClass("hidden")}))}.bind(this))},initEditableLabel:function(){var e=this.$(".so-title-bar .so-title-editable");e.keypress((function(t){var i="keypress"===t.type&&13===t.keyCode;if(i){var s=l(":tabbable"),o=s.index(e);s.eq(o+1).focus(),window.getSelection().removeAllRanges()}return!i})).blur(function(){var t=e.text().replace(/^\s+|\s+$/gm,"");t!==e.data("original-value").replace(/^\s+|\s+$/gm,"")&&(e.text(t),this.trigger("edit_label",t))}.bind(this)),e.focus((function(){e.data("original-value",e.text()),s.helpers.utils.selectElementContents(this)}))},setupDialog:function(){this.openDialog(),this.closeDialog()},refreshDialogNav:function(){this.$(".so-title-bar .so-nav").show().removeClass("so-disabled");var e=this.getNextDialog(),t=this.$(".so-title-bar .so-next"),i=this.getPrevDialog(),s=this.$(".so-title-bar .so-previous");null===e?t.hide():!1===e&&t.addClass("so-disabled"),null===i?s.hide():!1===i&&s.addClass("so-disabled")},openDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("open_dialog"),this.dialogOpen=!0,this.refreshDialogNav(),s.helpers.pageScroll.lock(),this.onResize(),this.$el.show(),e.silent||(this.trigger("open_dialog_complete"),this.builder.trigger("open_dialog",this),l(document).trigger("open_dialog",this))},closeDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("close_dialog"),this.dialogOpen=!1,this.$el.hide(),s.helpers.pageScroll.unlock(),e.silent||(this.trigger("close_dialog_complete"),this.builder.trigger("close_dialog",this))},navToPrevious:function(){this.closeDialog();var e=this.getPrevDialog();null!==e&&!1!==e&&e.openDialog()},navToNext:function(){this.closeDialog();var e=this.getNextDialog();null!==e&&!1!==e&&e.openDialog()},getFormValues:function(e){_.isUndefined(e)&&(e=".so-content");var t,i=this.$(e),s={};return i.find("[name]").each((function(){var e=l(this);try{var i=/([A-Za-z_]+)\[(.*)\]/.exec(e.attr("name"));if(_.isEmpty(i))return!0;_.isUndefined(i[2])?t=e.attr("name"):(t=i[2].split("][")).unshift(i[1]),t=t.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e}));var o=s,n=null,a=!!_.isString(e.attr("type"))&&e.attr("type").toLowerCase();if("checkbox"===a)n=e.is(":checked")?""===e.val()||e.val():null;else if("radio"===a){if(!e.is(":checked"))return;n=e.val()}else if("SELECT"===e.prop("tagName")){var r=e.find("option:selected");1===r.length?n=e.find("option:selected").val():r.length>1&&(n=_.map(e.find("option:selected"),(function(e,t){return l(e).val()})))}else n=e.val();if(!_.isUndefined(e.data("panels-filter")))switch(e.data("panels-filter")){case"json_parse":try{n=JSON.parse(n)}catch(e){n=""}}if(null!==n)for(var d=0;d<t.length;d++)d===t.length-1?""===t[d]?o.push(n):o[t[d]]=n:(_.isUndefined(o[t[d]])&&(""===t[d+1]?o[t[d]]=[]:o[t[d]]={}),o=o[t[d]])}catch(t){console.log("Field ["+e.attr("name")+"] could not be processed and was skipped - "+t.message)}})),s},setStatusMessage:function(e,t,i){var s=i?'<span class="dashicons dashicons-warning"></span>'+e:e;this.$(".so-toolbar .so-status").html(s),!_.isUndefined(t)&&t?this.$(".so-toolbar .so-status").addClass("so-panels-loading"):this.$(".so-toolbar .so-status").removeClass("so-panels-loading")},setParent:function(e,t){this.parentDialog={text:e,dialog:t}},onResize:function(){var e=window.matchMedia("(max-width: 980px)");["left","right"].forEach(function(t){var i=this.$(".so-"+t+"-sidebar"),s=this.$(".so-show-"+t+"-sidebar");this.hasSidebar(t)?(s.hide(),e.matches?(s.show(),s.closest(".so-title-bar").addClass("so-has-"+t+"-button"),i.hide(),i.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-"+t+"-sidebar")):(s.hide(),s.closest(".so-title-bar").removeClass("so-has-"+t+"-button"),i.show(),i.closest(".so-panels-dialog").addClass("so-panels-dialog-has-"+t+"-sidebar"))):(i.hide(),s.hide())}.bind(this))},hasSidebar:function(e){return this.$(".so-"+e+"-sidebar").children().length>0},toggleLeftSideBar:function(){this.toggleSidebar("left")},toggleRightSideBar:function(){this.toggleSidebar("right")},toggleSidebar:function(e){var t=this.$(".so-"+e+"-sidebar");t.is(":visible")?t.hide():t.show()}})},{}],27:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-live-editor").html())),previewScrollTop:0,loadTimes:[],previewFrameId:1,previewUrl:null,previewIframe:null,events:{"click .live-editor-close":"close","click .live-editor-save":"closeAndSave","click .live-editor-collapse":"collapse","click .live-editor-mode":"mobileToggle"},initialize:function(e){e=_.extend({builder:!1,previewUrl:!1},e),_.isEmpty(e.previewUrl)&&(e.previewUrl=panelsOptions.ajaxurl+"&action=so_panels_live_editor_preview"),this.builder=e.builder,this.previewUrl=e.previewUrl,this.listenTo(this.builder.model,"refresh_panels_data",this.handleRefreshData),this.listenTo(this.builder.model,"load_panels_data",this.handleLoadData)},render:function(){if(this.setElement(this.template()),this.$el.hide(),l("#submitdiv #save-post").length>0){var e=this.$el.find(".live-editor-save");e.text(e.data("save"))}var t=!1;l(document).mousedown((function(){t=!0})).mouseup((function(){t=!1}));var i=this;return this.$el.on("mouseenter",".so-widget-wrapper",(function(){var e=l(this).data("live-editor-preview-widget");t||void 0===e||!e.length||i.$(".so-preview-overlay").is(":visible")||(i.highlightElement(e),i.scrollToElement(e))})),this.$el.on("mouseleave",".so-widget-wrapper",function(){this.resetHighlights()}.bind(this)),this.listenTo(this.builder,"open_dialog",(function(){this.resetHighlights()})),this},attach:function(){this.$el.appendTo("body")},open:function(){if(""===this.$el.html()&&this.render(),0===this.$el.closest("body").length&&this.attach(),s.helpers.pageScroll.lock(),this.$el.is(":visible"))return this;if(this.$el.show(),this.refreshPreview(this.builder.model.getPanelsData()),this.originalContainer=this.builder.$el.parent(),this.builder.$el.appendTo(this.$(".so-live-editor-builder")),this.builder.$(".so-tool-button.so-live-editor").hide(),this.builder.trigger("builder_resize"),"auto-draft"===l("#original_post_status").val()&&!this.autoSaved){var e=this;wp.autosave&&(""===l('#title[name="post_title"]').val()&&l('#title[name="post_title"]').val(panelsOptions.loc.draft).trigger("keydown"),l(document).one("heartbeat-tick.autosave",(function(){e.autoSaved=!0,e.refreshPreview(e.builder.model.getPanelsData())})),wp.autosave.server.triggerSave())}},close:function(){if(!this.$el.is(":visible"))return this;this.$el.hide(),s.helpers.pageScroll.unlock(),this.builder.$el.appendTo(this.originalContainer),this.builder.$(".so-tool-button.so-live-editor").show(),this.builder.trigger("builder_resize")},closeAndSave:function(){this.close(),l('#submitdiv input[type="submit"][name="save"]').click()},collapse:function(){this.$el.toggleClass("so-collapsed")},highlightElement:function(e){_.isUndefined(this.resetHighlightTimeout)||clearTimeout(this.resetHighlightTimeout),this.previewIframe.contents().find("body").find(".panel-grid .panel-grid-cell .so-panel").filter((function(){return 0===l(this).parents(".so-panel").length})).not(e).addClass("so-panels-faded"),e.removeClass("so-panels-faded").addClass("so-panels-highlighted")},resetHighlights:function(){var e=this.previewIframe.contents().find("body");this.resetHighlightTimeout=setTimeout((function(){e.find(".panel-grid .panel-grid-cell .so-panel").removeClass("so-panels-faded so-panels-highlighted")}),100)},scrollToElement:function(e){this.$(".so-preview iframe")[0].contentWindow.liveEditorScrollTo(e)},handleRefreshData:function(e){if(!this.$el.is(":visible"))return this;this.refreshPreview(e)},handleLoadData:function(){if(!this.$el.is(":visible"))return this;this.refreshPreview(this.builder.model.getPanelsData())},refreshPreview:function(e){var t=this.loadTimes.length?_.reduce(this.loadTimes,(function(e,t){return e+t}),0)/this.loadTimes.length:1e3;_.isNull(this.previewIframe)||this.$(".so-preview-overlay").is(":visible")||(this.previewScrollTop=this.previewIframe.contents().scrollTop()),this.$(".so-preview-overlay").show(),this.$(".so-preview-overlay .so-loading-bar").clearQueue().css("width","0%").animate({width:"100%"},parseInt(t)+100),this.postToIframe({live_editor_panels_data:JSON.stringify(e),live_editor_post_ID:this.builder.config.postId},this.previewUrl,this.$(".so-preview")),this.previewIframe.data("load-start",(new Date).getTime())},postToIframe:function(e,t,i){_.isNull(this.previewIframe)||this.previewIframe.remove();var s="siteorigin-panels-live-preview-"+this.previewFrameId;this.previewIframe=l('<iframe src="'+t+'" />').attr({id:s,name:s}).appendTo(i),this.setupPreviewFrame(this.previewIframe);var o=l('<form id="soPostToPreviewFrame" method="post" />').attr({id:s,target:this.previewIframe.attr("id"),action:t}).appendTo("body");return l.each(e,(function(e,t){l('<input type="hidden" />').attr({name:e,value:t}).appendTo(o)})),o.submit().remove(),this.previewFrameId++,this.previewIframe},setupPreviewFrame:function(e){var t=this;e.data("iframeready",!1).on("iframeready",(function(){var e=l(this),i=e.contents();if(!e.data("iframeready")){e.data("iframeready",!0),void 0!==e.data("load-start")&&(t.loadTimes.unshift((new Date).getTime()-e.data("load-start")),_.isEmpty(t.loadTimes)||(t.loadTimes=t.loadTimes.slice(0,4))),l(".live-editor-mode.so-active").length&&(l(".so-panels-live-editor .so-preview iframe").css("transition","none"),t.mobileToggle()),setTimeout((function(){i.scrollTop(t.previewScrollTop),t.$(".so-preview-overlay").hide(),l(".so-panels-live-editor .so-preview iframe").css("transition","all .2s ease")}),100);var s=i.find("#pl-"+t.builder.config.postId);s.find(".panel-grid .panel-grid-cell .so-panel").filter((function(){return l(this).closest(".panel-layout").is(s)})).each((function(e,i){var s=l(i),o=t.$(".so-live-editor-builder .so-widget-wrapper").eq(s.data("index"));o.data("live-editor-preview-widget",s),s.css({cursor:"pointer"}).mouseenter((function(){o.parent().addClass("so-hovered"),t.highlightElement(s)})).mouseleave((function(){o.parent().removeClass("so-hovered"),t.resetHighlights()})).click((function(e){e.preventDefault(),o.find(".title h4").click()}))})),i.find("a").css({"pointer-events":"none"}).click((function(e){e.preventDefault()}))}})).on("load",(function(){var e=l(this);e.data("iframeready")||e.trigger("iframeready")}))},hasPreviewUrl:function(){return""!==this.$("form.live-editor-form").attr("action")},mobileToggle:function(e){var t=l(void 0!==e?e.currentTarget:".live-editor-mode.so-active");this.$(".live-editor-mode").not(t).removeClass("so-active"),t.addClass("so-active"),this.$el.removeClass("live-editor-desktop-mode live-editor-tablet-mode live-editor-mobile-mode").addClass("live-editor-"+t.data("mode")+"-mode").find("iframe").css("width",t.data("width"))}})},{}],28:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-row").html())),events:{"click .so-row-settings":"editSettingsHandler","click .so-row-duplicate":"duplicateHandler","click .so-row-delete":"confirmedDeleteHandler","click .so-row-color":"rowColorChangeHandler"},builder:null,dialog:null,initialize:function(){var e=this.model.get("cells");this.listenTo(e,"add",this.handleCellAdd),this.listenTo(e,"remove",this.handleCellRemove),this.listenTo(this.model,"reweight_cells",this.resize),this.listenTo(this.model,"destroy",this.onModelDestroy);var t=this;e.each((function(e){t.listenTo(e.get("widgets"),"add",t.resize)})),e.on("add",(function(e){t.listenTo(e.get("widgets"),"add",t.resize)}),this),this.listenTo(this.model,"change:label",this.onLabelChange)},render:function(){var e=this.model.has("color_label")?this.model.get("color_label"):1,t=this.model.has("label")?this.model.get("label"):"";this.setElement(this.template({rowColorLabel:e,rowLabel:t})),this.$el.data("view",this);var i=this;return this.model.get("cells").each((function(e){var t=new s.view.cell({model:e});t.row=i,t.render(),t.$el.appendTo(i.$(".so-cells"))})),this.builder.supports("rowAction")?(this.builder.supports("editRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-settings").parent().remove(),this.$el.addClass("so-row-no-edit")),this.builder.supports("addRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-duplicate").parent().remove(),this.$el.addClass("so-row-no-duplicate")),this.builder.supports("deleteRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-delete").parent().remove(),this.$el.addClass("so-row-no-delete"))):(this.$(".so-row-toolbar .so-dropdown-wrapper").remove(),this.$el.addClass("so-row-no-actions")),this.builder.supports("moveRow")||(this.$(".so-row-toolbar .so-row-move").remove(),this.$el.addClass("so-row-no-move")),l.trim(this.$(".so-row-toolbar").html()).length||this.$(".so-row-toolbar").remove(),this.listenTo(this.builder,"widget_sortable_move",this.resize),this.listenTo(this.builder,"builder_resize",this.resize),this.resize(),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},resize:function(e){if(this.$el.is(":visible")){this.$(".so-cells .cell-wrapper").css("min-height",0),this.$(".so-cells .resize-handle").css("height",0);var t=0;this.$(".so-cells .cell").each((function(){t=Math.max(t,l(this).height()),l(this).css("width",100*l(this).data("view").model.get("weight")+"%")})),this.$(".so-cells .cell-wrapper").css("min-height",Math.max(t,63)),this.$(".so-cells .resize-handle").css("height",this.$(".so-cells .cell-wrapper").outerHeight())}},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){this.builder.addHistoryEntry("row_deleted");var e=this;this.$el.fadeOut("normal",(function(){e.model.destroy(),e.builder.model.refreshPanelsData()}))},onLabelChange:function(e,t){0==this.$(".so-row-label").length?this.$(".so-row-toolbar").prepend('<h3 class="so-row-label">'+t+"</h3>"):this.$(".so-row-label").text(t)},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},pasteHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.builder.addHistoryEntry("row_pasted"),e.builder=this.builder.model,this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData())},confirmedDeleteHandler:function(e){var t=l(e.target);if(t.hasClass("dashicons")&&(t=t.parent()),t.hasClass("so-confirmed"))this.visualDestroyModel();else{var i=t.html();t.addClass("so-confirmed").html('<span class="dashicons dashicons-yes"></span>'+panelsOptions.loc.dropdown_confirm),setTimeout((function(){t.removeClass("so-confirmed").html(i)}),2500)}},editSettingsHandler:function(){if(this.builder.supports("editRow"))return null===this.dialog&&(this.dialog=new s.dialog.row,this.dialog.setBuilder(this.builder).setRowModel(this.model),this.dialog.rowView=this),this.dialog.openDialog(),this},deleteHandler:function(){return this.model.destroy(),this},rowColorChangeHandler:function(e){this.$(".so-row-color").removeClass("so-row-color-selected");var t=l(e.target),i=t.data("color-label"),s=this.model.has("color_label")?this.model.get("color_label"):1;t.addClass("so-row-color-selected"),this.$el.removeClass("so-row-color-"+s),this.$el.addClass("so-row-color-"+i),this.model.set("color_label",i)},handleCellAdd:function(e){var t=new s.view.cell({model:e});t.row=this,t.render(),t.$el.appendTo(this.$(".so-cells"))},handleCellRemove:function(e){this.$(".so-cells > .cell").each((function(){var t=l(this).data("view");_.isUndefined(t)||t.model.cid===e.cid&&t.remove()}))},buildContextualMenu:function(e,t){for(var i=[],l=1;l<5;l++)i.push({title:l+" "+panelsOptions.loc.contextual.column});this.builder.supports("addRow")&&t.addSection("add-row",{sectionTitle:panelsOptions.loc.contextual.add_row,search:!1},i,function(e){this.builder.addHistoryEntry("row_added");for(var t=Number(e)+1,i=[],l=0;l<t;l++)i.push({weight:100/t});var o=new s.model.row({collection:this.collection}),n=new s.collection.cells(i);n.each((function(e){e.row=o})),o.setCells(n),o.builder=this.builder.model,this.builder.model.get("rows").add(o,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()}.bind(this));var o={};this.builder.supports("editRow")&&(o.edit={title:panelsOptions.loc.contextual.row_edit}),s.helpers.clipboard.canCopyPaste()&&(o.copy={title:panelsOptions.loc.contextual.row_copy},this.builder.supports("addRow")&&s.helpers.clipboard.isModel("row-model")&&(o.paste={title:panelsOptions.loc.contextual.row_paste})),this.builder.supports("addRow")&&(o.duplicate={title:panelsOptions.loc.contextual.row_duplicate}),this.builder.supports("deleteRow")&&(o.delete={title:panelsOptions.loc.contextual.row_delete,confirm:!0}),_.isEmpty(o)||t.addSection("row-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},o,function(e){switch(e){case"edit":this.editSettingsHandler();break;case"copy":this.copyHandler();break;case"paste":this.pasteHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this))}})},{}],29:[function(e,t,i){window.panels;var s=jQuery;t.exports=Backbone.View.extend({stylesLoaded:!1,initialize:function(){},render:function(e,t,i){if(!_.isUndefined(e)){i=_.extend({builderType:"",dialog:null},i),this.$el.addClass("so-visual-styles so-"+e+"-styles so-panels-loading");var l={builderType:i.builderType};return"cell"===e&&(l.index=i.index),s.post(panelsOptions.ajaxurl,{action:"so_panels_style_form",type:e,style:this.model.get("style"),args:JSON.stringify(l),postId:t},null,"html").done(function(e){this.$el.html(e),this.setupFields(),this.stylesLoaded=!0,this.trigger("styles_loaded",!_.isEmpty(e)),_.isNull(i.dialog)||i.dialog.trigger("styles_loaded",!_.isEmpty(e))}.bind(this)).fail(function(e){var t;t=e&&e.responseText?e.responseText:panelsOptions.forms.loadingFailed,this.$el.html(t)}.bind(this)).always(function(){this.$el.removeClass("so-panels-loading")}.bind(this)),this}},attach:function(e){e.append(this.$el)},detach:function(){this.$el.detach()},setupFields:function(){this.$(".style-section-wrapper").each((function(){var e=s(this);e.find(".style-section-head").click((function(t){t.preventDefault(),e.find(".style-section-fields").slideToggle("fast")}))})),_.isUndefined(s.fn.wpColorPicker)||(_.isObject(panelsOptions.wpColorPickerOptions.palettes)&&!s.isArray(panelsOptions.wpColorPickerOptions.palettes)&&(panelsOptions.wpColorPickerOptions.palettes=s.map(panelsOptions.wpColorPickerOptions.palettes,(function(e){return e}))),this.$(".so-wp-color-field").wpColorPicker(panelsOptions.wpColorPickerOptions)),this.$(".style-field-image").each((function(){var e=null,t=s(this);t.find(".so-image-selector").click((function(i){i.preventDefault(),null===e&&(e=wp.media({title:"choose",library:{type:"image"},button:{text:"Done",close:!0}})).on("select",(function(){var i=e.state().get("selection").first().attributes,s=i.url;if(!_.isUndefined(i.sizes))try{s=i.sizes.thumbnail.url}catch(e){s=i.sizes.full.url}t.find(".current-image").css("background-image","url("+s+")"),t.find(".so-image-selector > input").val(i.id),t.find(".remove-image").removeClass("hidden")})),e.open()})),t.find(".remove-image").click((function(e){e.preventDefault(),t.find(".current-image").css("background-image","none"),t.find(".so-image-selector > input").val(""),t.find(".remove-image").addClass("hidden")}))})),this.$(".style-field-measurement").each((function(){var e=s(this),t=e.find('input[type="text"]'),i=e.find("select"),l=e.find('input[type="hidden"]');t.focus((function(){s(this).select()}));!function(e){if(""!==e){var o=/(?:([0-9\.,\-]+)(.*))+/,n=l.val().split(" "),a=[];for(var r in n){var d=o.exec(n[r]);_.isNull(d)||_.isUndefined(d[1])||_.isUndefined(d[2])||(a.push(d[1]),i.val(d[2]))}1===t.length?t.val(a.join(" ")):(1===a.length?a=[a[0],a[0],a[0],a[0]]:2===a.length?a=[a[0],a[1],a[0],a[1]]:3===a.length&&(a=[a[0],a[1],a[2],a[1]]),t.each((function(e,t){s(t).val(a[e])})))}}(l.val());var o=function(e){if(1===t.length){var o=t.val().split(" ").filter((function(e){return""!==e})).map((function(e){return e+i.val()})).join(" ");l.val(o)}else{var n=s(e.target),a=[],r=[],d=[];t.each((function(e,t){var i=""!==s(t).val()?parseFloat(s(t).val()):null;a.push(i),null===i?r.push(e):d.push(e)})),3===r.length&&d[0]===t.index(n)&&(t.val(n.val()),a=[n.val(),n.val(),n.val(),n.val()]),JSON.stringify(a)===JSON.stringify([null,null,null,null])?l.val(""):l.val(a.map((function(e){return(null===e?0:e)+i.val()})).join(" "))}};t.change(o),i.change(o)}))}})},{}],30:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-widget").html())),cell:null,dialog:null,events:{"click .widget-edit":"editHandler","touchend .widget-edit":"editHandler","click .title h4":"editHandler","touchend .title h4":"editHandler","click .actions .widget-duplicate":"duplicateHandler","click .actions .widget-delete":"deleteHandler"},initialize:function(){this.listenTo(this.model,"destroy",this.onModelDestroy),this.listenTo(this.model,"change:values",this.onModelChange),this.listenTo(this.model,"change:label",this.onLabelChange)},render:function(e){if(e=_.extend({loadForm:!1},e),this.setElement(this.template({title:this.model.getWidgetField("title"),description:this.model.getTitle(),widget_class:this.model.attributes.class})),this.$el.data("view",this),this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")||(this.$(".actions .widget-edit").remove(),this.$el.addClass("so-widget-no-edit")),this.cell.row.builder.supports("addWidget")||(this.$(".actions .widget-duplicate").remove(),this.$el.addClass("so-widget-no-duplicate")),this.cell.row.builder.supports("deleteWidget")||(this.$(".actions .widget-delete").remove(),this.$el.addClass("so-widget-no-delete")),this.cell.row.builder.supports("moveWidget")||this.$el.addClass("so-widget-no-move"),l.trim(this.$(".actions").html()).length||this.$(".actions").remove(),this.model.get("read_only")&&this.$el.addClass("so-widget-read-only"),0===_.size(this.model.get("values"))||e.loadForm){var t=this.getEditDialog();t.once("form_loaded",t.saveWidget,t),t.setupDialog()}return this.listenTo(this.cell.row.builder,"after_user_adds_widget",this.afterUserAddsWidgetHandler),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},getEditDialog:function(){return null===this.dialog&&(this.dialog=new s.dialog.widget({model:this.model}),this.dialog.setBuilder(this.cell.row.builder),this.dialog.widgetView=this),this.dialog},editHandler:function(){return!this.cell.row.builder.supports("editWidget")||this.model.get("read_only")?this:(this.getEditDialog().openDialog(),this)},duplicateHandler:function(){this.cell.row.builder.addHistoryEntry("widget_duplicated");var e=this.model.clone(this.model.cell);return this.cell.model.get("widgets").add(e,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},deleteHandler:function(){return this.visualDestroyModel(),this},onModelChange:function(){this.$(".description").html(this.model.getTitle())},onLabelChange:function(e){this.$(".title > h4").text(e.getWidgetField("title"))},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){return this.cell.row.builder.addHistoryEntry("widget_deleted"),this.$el.fadeOut("fast",function(){this.cell.row.resize(),this.model.destroy(),this.cell.row.builder.model.refreshPanelsData(),this.remove()}.bind(this)),this},buildContextualMenu:function(e,t){this.cell.row.builder.supports("addWidget")&&t.addSection("add-widget-below",{sectionTitle:panelsOptions.loc.contextual.add_widget_below,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,function(e){this.cell.row.builder.trigger("before_user_adds_widget"),this.cell.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=this.cell.model,this.cell.model.get("widgets").add(t,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this.cell.row.builder.trigger("after_user_adds_widget",t)}.bind(this));var i={};this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")&&(i.edit={title:panelsOptions.loc.contextual.widget_edit}),s.helpers.clipboard.canCopyPaste()&&(i.copy={title:panelsOptions.loc.contextual.widget_copy}),this.cell.row.builder.supports("addWidget")&&(i.duplicate={title:panelsOptions.loc.contextual.widget_duplicate}),this.cell.row.builder.supports("deleteWidget")&&(i.delete={title:panelsOptions.loc.contextual.widget_delete,confirm:!0}),_.isEmpty(i)||t.addSection("widget-actions",{sectionTitle:panelsOptions.loc.contextual.widget_actions,search:!1},i,function(e){switch(e){case"edit":this.editHandler();break;case"copy":this.copyHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this)),this.cell.buildContextualMenu(e,t)},afterUserAddsWidgetHandler:function(e){this.model===e&&panelsOptions.instant_open&&setTimeout(this.editHandler.bind(this),350)}})},{}],31:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.customHtmlWidgets,o=s("<div></div>"),n=t.find(".widget-content:first");n.before(o);var a=new l.CustomHtmlWidgetControl({el:o,syncContainer:n});return a.initializeEditor(),a.editor.codemirror.refresh(),a}};t.exports=l},{}],32:[function(e,t,i){var s=e("./custom-html-widget"),l=e("./media-widget"),o=e("./text-widget"),n={CUSTOM_HTML:"custom_html",MEDIA_AUDIO:"media_audio",MEDIA_GALLERY:"media_gallery",MEDIA_IMAGE:"media_image",MEDIA_VIDEO:"media_video",TEXT:"text",addWidget:function(e,t){var i,n=e.find("> .id_base").val();switch(n){case this.CUSTOM_HTML:i=s;break;case this.MEDIA_AUDIO:case this.MEDIA_GALLERY:case this.MEDIA_IMAGE:case this.MEDIA_VIDEO:i=l;break;case this.TEXT:i=o}i.addWidget(n,e,t)}};t.exports=n},{"./custom-html-widget":31,"./media-widget":33,"./text-widget":34}],33:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.mediaWidgets,o=l.controlConstructors[e];if(o){var n=l.modelConstructors[e]||l.MediaWidgetModel,a=t.find("> .widget-content"),r=s('<div class="media-widget-control"></div>');a.before(r);var d={};a.find(".media-widget-instance-property").each((function(){var e=s(this);d[e.data("property")]=e.val()})),d.widget_id=i;var h=new o({el:r,syncContainer:a,model:new n(d)});return h.render(),h}}};t.exports=l},{}],34:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.textWidgets,o={},n=t.find(".visual");if(n.length>0){if(!n.val())return null;var a=s("<div></div>"),r=t.find(".widget-content:first");r.before(a),o={el:a,syncContainer:r}}else o={el:t};var d=new l.TextWidgetControl(o),h=wp.oldEditor?wp.oldEditor:wp.editor;return h&&h.hasOwnProperty("autop")&&(wp.editor.autop=h.autop,wp.editor.removep=h.removep,wp.editor.initialize=h.initialize),d.initializeEditor(),d}};t.exports=l},{}]},{},[17]);
5
  * @copyright Greg Priday 2013 - 2016 - <https://siteorigin.com/>
6
  * @license GPL 3.0 http://www.gnu.org/licenses/gpl.html
7
  */
8
+ var s={};window.panels=s,window.siteoriginPanels=s,s.helpers={},s.helpers.clipboard=e("./helpers/clipboard"),s.helpers.utils=e("./helpers/utils"),s.helpers.editor=e("./helpers/editor"),s.helpers.serialize=e("./helpers/serialize"),s.helpers.pageScroll=e("./helpers/page-scroll"),s.model={},s.model.widget=e("./model/widget"),s.model.cell=e("./model/cell"),s.model.row=e("./model/row"),s.model.builder=e("./model/builder"),s.model.historyEntry=e("./model/history-entry"),s.collection={},s.collection.widgets=e("./collection/widgets"),s.collection.cells=e("./collection/cells"),s.collection.rows=e("./collection/rows"),s.collection.historyEntries=e("./collection/history-entries"),s.view={},s.view.widget=e("./view/widget"),s.view.cell=e("./view/cell"),s.view.row=e("./view/row"),s.view.builder=e("./view/builder"),s.view.dialog=e("./view/dialog"),s.view.styles=e("./view/styles"),s.view.liveEditor=e("./view/live-editor"),s.dialog={},s.dialog.builder=e("./dialog/builder"),s.dialog.widgets=e("./dialog/widgets"),s.dialog.widget=e("./dialog/widget"),s.dialog.prebuilt=e("./dialog/prebuilt"),s.dialog.row=e("./dialog/row"),s.dialog.history=e("./dialog/history"),s.utils={},s.utils.menu=e("./utils/menu"),jQuery.fn.soPanelsSetupBuilderWidget=e("./jquery/setup-builder-widget"),jQuery((function(e){var t,i,s,l,o=e("#siteorigin-panels-metabox");if(s=e("form#post"),o.length&&s.length)t=o,i=o.find(".siteorigin-panels-data-field"),l={editorType:"tinyMCE",postId:e("#post_ID").val(),editorId:"#content",builderType:o.data("builder-type"),builderSupports:o.data("builder-supports"),loadOnAttach:panelsOptions.loadOnAttach&&1==e("#auto_draft").val(),loadLiveEditor:1==o.data("live-editor"),liveEditorPreview:t.data("preview-url")};else if(e(".siteorigin-panels-builder-form").length){var n=e(".siteorigin-panels-builder-form");t=n.find(".siteorigin-panels-builder-container"),i=n.find('input[name="panels_data"]'),s=n,l={editorType:"standalone",postId:n.data("post-id"),editorId:"#post_content",builderType:n.data("type"),builderSupports:n.data("builder-supports"),loadLiveEditor:!1,liveEditorPreview:n.data("preview-url")}}if(!_.isUndefined(t)){var a=window.siteoriginPanels,r=new a.model.builder,d=new a.view.builder({model:r,config:l});e(document).trigger("before_panels_setup",d),d.render().attach({container:t}).setDataField(i).attachToEditor(),s.submit((function(){r.refreshPanelsData()})),t.removeClass("so-panels-loading"),e(document).trigger("panels_setup",d,window.panels),window.soPanelsBuilderView=d}e(document).on("widget-added",(function(t,i){e(i).find(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})),e("body").hasClass("wp-customizer")||e((function(){e(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})),e(window).on("keyup",(function(t){27===t.which&&e(".so-panels-dialog-wrapper, .so-panels-live-editor").filter(":visible").last().find(".so-title-bar .so-close, .live-editor-close").click()}))}))},{"./collection/cells":1,"./collection/history-entries":2,"./collection/rows":3,"./collection/widgets":4,"./dialog/builder":5,"./dialog/history":6,"./dialog/prebuilt":7,"./dialog/row":8,"./dialog/widget":9,"./dialog/widgets":10,"./helpers/clipboard":11,"./helpers/editor":12,"./helpers/page-scroll":13,"./helpers/serialize":14,"./helpers/utils":15,"./jquery/setup-builder-widget":16,"./model/builder":18,"./model/cell":19,"./model/history-entry":20,"./model/row":21,"./model/widget":22,"./utils/menu":23,"./view/builder":24,"./view/cell":25,"./view/dialog":26,"./view/live-editor":27,"./view/row":28,"./view/styles":29,"./view/widget":30}],18:[function(e,t,i){t.exports=Backbone.Model.extend({layoutPosition:{BEFORE:"before",AFTER:"after",REPLACE:"replace"},rows:{},defaults:{data:{widgets:[],grids:[],grid_cells:[]}},initialize:function(){this.set("rows",new panels.collection.rows)},addRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var s=new panels.collection.cells(t);e=_.extend({collection:this.get("rows"),cells:s},e);var l=new panels.model.row(e);return l.builder=this,this.get("rows").add(l,i),l},loadPanelsData:function(e,t){try{t===this.layoutPosition.BEFORE?e=this.concatPanelsData(e,this.getPanelsData()):t===this.layoutPosition.AFTER&&(e=this.concatPanelsData(this.getPanelsData(),e)),this.emptyRows(),this.set("data",JSON.parse(JSON.stringify(e)),{silent:!0});var i,s=[];if(_.isUndefined(e.grid_cells))return void this.trigger("load_panels_data");for(var l=0;l<e.grid_cells.length;l++)i=parseInt(e.grid_cells[l].grid),_.isUndefined(s[i])&&(s[i]=[]),s[i].push(e.grid_cells[l]);var o=this;if(_.each(s,(function(t,i){var s={};_.isUndefined(e.grids[i].style)||(s.style=e.grids[i].style),_.isUndefined(e.grids[i].ratio)||(s.ratio=e.grids[i].ratio),_.isUndefined(e.grids[i].ratio_direction)||(s.ratio_direction=e.grids[i].ratio_direction),_.isUndefined(e.grids[i].color_label)||(s.color_label=e.grids[i].color_label),_.isUndefined(e.grids[i].label)||(s.label=e.grids[i].label),o.addRow(s,t,{noAnimate:!0})})),_.isUndefined(e.widgets))return;_.each(e.widgets,(function(e){var t=null;_.isUndefined(e.panels_info)?(t=e.info,delete e.info):(t=e.panels_info,delete e.panels_info);var i=o.get("rows").at(parseInt(t.grid)).get("cells").at(parseInt(t.cell)),s=new panels.model.widget({class:t.class,values:e});_.isUndefined(t.style)||s.set("style",t.style),_.isUndefined(t.read_only)||s.set("read_only",t.read_only),_.isUndefined(t.widget_id)?s.set("widget_id",panels.helpers.utils.generateUUID()):s.set("widget_id",t.widget_id),_.isUndefined(t.label)||s.set("label",t.label),s.cell=i,i.get("widgets").add(s,{noAnimate:!0})})),this.trigger("load_panels_data")}catch(e){console.log("Error loading data: "+e.message)}},concatPanelsData:function(e,t){if(_.isUndefined(t)||_.isUndefined(t.grids)||_.isEmpty(t.grids)||_.isUndefined(t.grid_cells)||_.isEmpty(t.grid_cells))return e;if(_.isUndefined(e)||_.isUndefined(e.grids)||_.isEmpty(e.grids))return t;var i,s=e.grids.length,l=_.isUndefined(e.widgets)?0:e.widgets.length,o={grids:[],grid_cells:[],widgets:[]};for(o.grids=e.grids.concat(t.grids),_.isUndefined(e.grid_cells)||(o.grid_cells=e.grid_cells.slice()),_.isUndefined(e.widgets)||(o.widgets=e.widgets.slice()),i=0;i<t.grid_cells.length;i++){var n=t.grid_cells[i];n.grid=parseInt(n.grid)+s,o.grid_cells.push(n)}if(!_.isUndefined(t.widgets))for(i=0;i<t.widgets.length;i++){var a=t.widgets[i];a.panels_info.grid=parseInt(a.panels_info.grid)+s,a.panels_info.id=parseInt(a.panels_info.id)+l,o.widgets.push(a)}return o},getPanelsData:function(){var e={widgets:[],grids:[],grid_cells:[]},t=0;return this.get("rows").each((function(i,s){i.get("cells").each((function(i,l){i.get("widgets").each((function(i,o){var n={class:i.get("class"),raw:i.get("raw"),grid:s,cell:l,id:t++,widget_id:i.get("widget_id"),style:i.get("style"),label:i.get("label")};_.isEmpty(n.widget_id)&&(n.widget_id=panels.helpers.utils.generateUUID());var a=_.extend(_.clone(i.get("values")),{panels_info:n});e.widgets.push(a)})),e.grid_cells.push({grid:s,index:l,weight:i.get("weight"),style:i.get("style")})})),e.grids.push({cells:i.get("cells").length,style:i.get("style"),ratio:i.get("ratio"),ratio_direction:i.get("ratio_direction"),color_label:i.get("color_label"),label:i.get("label")})})),e},refreshPanelsData:function(e){e=_.extend({silent:!1},e);var t=this.get("data"),i=this.getPanelsData();this.set("data",i,{silent:!0}),e.silent||JSON.stringify(i)===JSON.stringify(t)||(this.trigger("change"),this.trigger("change:data"),this.trigger("refresh_panels_data",i,e))},emptyRows:function(){return _.invoke(this.get("rows").toArray(),"destroy"),this.get("rows").reset(),this},isValidLayoutPosition:function(e){return e===this.layoutPosition.BEFORE||e===this.layoutPosition.AFTER||e===this.layoutPosition.REPLACE},getPanelsDataFromHtml:function(e,t){var i,s=this,l=jQuery('<div id="wrapper">'+e+"</div>");if(l.find(".panel-layout .panel-grid").length){var o={grids:[],grid_cells:[],widgets:[]},n=new RegExp(panelsOptions.siteoriginWidgetRegex,"i"),a=(i=document.createElement("div"),function(e){return e&&"string"==typeof e&&(e=(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"")).replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),i.innerHTML=e,e=i.textContent,i.textContent=""),e}),r=function(e){var t,i=e.find("div");if(!i.length)return e.html();for(t=0;t<i.length-1&&jQuery.trim(i.eq(t).text())==jQuery.trim(i.eq(t+1).text());t++);var s=i.eq(t).find(".widget-title:header"),l="";return s.length&&(l=s.html(),s.remove()),{title:l,text:i.eq(t).html()}},d=l.find(".panel-layout").eq(0),h=function(e,t){return jQuery(t).closest(".panel-layout").is(d)};return l.find("> .panel-layout > .panel-grid").filter(h).each((function(e,i){var l=jQuery(i),d=l.find(".panel-grid-cell").filter(h);o.grids.push({cells:d.length,style:l.data("style"),ratio:l.data("ratio"),ratio_direction:l.data("ratio-direction"),color_label:l.data("color-label"),label:l.data("label")}),d.each((function(i,l){var d=jQuery(l),c=d.find(".so-panel").filter(h);o.grid_cells.push({grid:e,weight:_.isUndefined(d.data("weight"))?1:parseFloat(d.data("weight")),style:d.data("style")}),c.each((function(l,d){var h=jQuery(d),c=h.find(".panel-widget-style").length?h.find(".panel-widget-style").html():h.html(),u={grid:e,cell:i,style:h.data("style"),raw:!1,label:h.data("label")};c=c.trim();var p=n.exec(c);if(!_.isNull(p)&&""===c.replace(n,"").trim()){try{var g=/class="(.*?)"/.exec(p[3]),f=jQuery(p[5]),w=JSON.parse(a(f.val())).instance;u.class=g[1].replace(/\\\\+/g,"\\"),u.raw=!1,w.panels_info=u,o.widgets.push(w)}catch(e){u.class=t,o.widgets.push(_.extend(r(h),{filter:"1",type:"visual",panels_info:u}))}return!0}return-1!==c.indexOf("panel-layout")&&jQuery("<div>"+c+"</div>").find(".panel-layout .panel-grid").length?(u.class="SiteOrigin_Panels_Widgets_Layout",o.widgets.push({panels_data:s.getPanelsDataFromHtml(c,t),panels_info:u}),!0):(u.class=t,o.widgets.push(_.extend(r(h),{filter:"1",type:"visual",panels_info:u})),!0)}))}))})),l.find(".panel-layout").remove(),l.find("style[data-panels-style-for-post]").remove(),l.html().replace(/^\s+|\s+$/gm,"").length&&(o.grids.push({cells:1,style:{}}),o.grid_cells.push({grid:o.grids.length-1,weight:1}),o.widgets.push({filter:"1",text:l.html().replace(/^\s+|\s+$/gm,""),title:"",type:"visual",panels_info:{class:t,raw:!1,grid:o.grids.length-1,cell:0}})),o}return{grid_cells:[{grid:0,weight:1}],grids:[{cells:1}],widgets:[{filter:"1",text:e,title:"",type:"visual",panels_info:{class:t,raw:!1,grid:0,cell:0}}]}}})},{}],19:[function(e,t,i){t.exports=Backbone.Model.extend({widgets:{},row:null,defaults:{weight:0,style:{}},indexes:null,initialize:function(){this.set("widgets",new panels.collection.widgets),this.on("destroy",this.onDestroy,this)},onDestroy:function(){_.invoke(this.get("widgets").toArray(),"destroy"),this.get("widgets").reset()},clone:function(e,t){_.isUndefined(e)&&(e=this.row),t=_.extend({cloneWidgets:!0},t);var i=new this.constructor(this.attributes);return i.set("collection",e.get("cells"),{silent:!0}),i.row=e,t.cloneWidgets&&this.get("widgets").each((function(e){i.get("widgets").add(e.clone(i,t),{silent:!0})})),i}})},{}],20:[function(e,t,i){t.exports=Backbone.Model.extend({defaults:{text:"",data:"",time:null,count:1}})},{}],21:[function(e,t,i){t.exports=Backbone.Model.extend({builder:null,defaults:{style:{}},indexes:null,initialize:function(){_.isEmpty(this.get("cells"))?this.set("cells",new panels.collection.cells):this.get("cells").each(function(e){e.row=this}.bind(this)),this.on("destroy",this.onDestroy,this)},setCells:function(e){var t=this.get("cells")||new panels.collection.cells,i=[];t.each((function(s,l){var o=e.at(l);if(o)s.set("weight",o.get("weight"));else{for(var n=t.at(e.length-1),a=s.get("widgets").models.slice(),r=0;r<a.length;r++)a[r].moveToCell(n,{silent:!1});i.push(s)}})),_.each(i,(function(e){t.remove(e)})),e.length>t.length&&_.each(e.slice(t.length,e.length),function(e){e.set({collection:t}),e.row=this,t.add(e)}.bind(this)),this.reweightCells()},reweightCells:function(){var e=0,t=this.get("cells");t.each((function(t){e+=t.get("weight")})),t.each((function(t){t.set("weight",t.get("weight")/e)})),this.trigger("reweight_cells")},onDestroy:function(){_.invoke(this.get("cells").toArray(),"destroy"),this.get("cells").reset()},clone:function(e){_.isUndefined(e)&&(e=this.builder);var t=new this.constructor(this.attributes);t.set("collection",e.get("rows"),{silent:!0}),t.builder=e;var i=new panels.collection.cells;return this.get("cells").each((function(e){i.add(e.clone(t),{silent:!0})})),t.set("cells",i),t}})},{}],22:[function(e,t,i){t.exports=Backbone.Model.extend({cell:null,defaults:{class:null,missing:!1,values:{},raw:!1,style:{},read_only:!1,widget_id:""},indexes:null,initialize:function(){var e=this.get("class");!_.isUndefined(panelsOptions.widgets[e])&&panelsOptions.widgets[e].installed||this.set("missing",!0)},getWidgetField:function(e){return _.isUndefined(panelsOptions.widgets[this.get("class")])?"title"===e||"description"===e?panelsOptions.loc.missing_widget[e]:"":this.has("label")&&!_.isEmpty(this.get("label"))?this.get("label"):panelsOptions.widgets[this.get("class")][e]},moveToCell:function(e,t,i){return t=_.extend({silent:!0},t),this.cell=e,this.collection.remove(this,t),e.get("widgets").add(this,_.extend({at:i},t)),this.trigger("move_to_cell",e,i),this},setValues:function(e){var t=!1;JSON.stringify(e)!==JSON.stringify(this.get("values"))&&(t=!0),this.set("values",e,{silent:!0}),t&&(this.trigger("change",this),this.trigger("change:values"))},clone:function(e,t){_.isUndefined(e)&&(e=this.cell);var i=new this.constructor(this.attributes),s=JSON.parse(JSON.stringify(this.get("values"))),l=function(e){return _.each(e,(function(t,i){_.isString(i)&&"_"===i[0]?delete e[i]:_.isObject(e[i])&&l(e[i])})),e};return s=l(s),"SiteOrigin_Panels_Widgets_Layout"===this.get("class")&&(s.builder_id=Math.random().toString(36).substr(2)),i.set("widget_id",""),i.set("values",s,{silent:!0}),i.set("collection",e.get("widgets"),{silent:!0}),i.cell=e,i.isDuplicate=!0,i},getTitle:function(){var e=panelsOptions.widgets[this.get("class")];if(_.isUndefined(e))return this.get("class").replace(/_/g," ");if(!_.isUndefined(e.panels_title)&&!1===e.panels_title)return panelsOptions.widgets[this.get("class")].description;var t=this.get("values"),i=["title","text"];for(var s in t)"_"!==s.charAt(0)&&"so_sidebar_emulator_id"!==s&&"option_name"!==s&&t.hasOwnProperty(s)&&i.push(s);for(var l in i=_.uniq(i))if(!_.isUndefined(t[i[l]])&&_.isString(t[i[l]])&&""!==t[i[l]]&&"on"!==t[i[l]]&&"true"!==t[i[l]]&&"false"!==t[i[l]]&&"_"!==i[l][0]&&!jQuery.isNumeric(t[i[l]])){var o=t[i[l]],n=(o=o.replace(/<\/?[^>]+(>|$)/g,"")).split(" ");return(n=n.slice(0,20)).join(" ")}return this.getWidgetField("description")}})},{}],23:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({wrapperTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu").html())),sectionTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu-section").html())),contexts:[],active:!1,events:{"keyup .so-search-wrapper input":"searchKeyUp"},initialize:function(){this.listenContextMenu(),this.render(),this.attach()},listenContextMenu:function(){var e=this;l(window).on("contextmenu",(function(t){return e.active&&!e.isOverEl(e.$el,t)?(e.closeMenu(),e.active=!1,t.preventDefault(),!1):!!e.active||(e.active=!1,e.trigger("activate_context",t,e),void(e.active&&(t.preventDefault(),e.openMenu({left:t.pageX,top:t.pageY}))))}))},render:function(){this.setElement(this.wrapperTemplate())},attach:function(){this.$el.appendTo("body")},openMenu:function(e){this.trigger("open_menu"),l(window).on("keyup",{menu:this},this.keyboardListen),l(window).on("click",{menu:this},this.clickOutsideListen),this.$el.css("max-height",l(window).height()-20),e.left+this.$el.outerWidth()+10>=l(window).width()&&(e.left=l(window).width()-this.$el.outerWidth()-10),e.left<=0&&(e.left=10),e.top+this.$el.outerHeight()-l(window).scrollTop()+10>=l(window).height()&&(e.top=l(window).height()+l(window).scrollTop()-this.$el.outerHeight()-10),e.left<=0&&(e.left=10),this.$el.css({left:e.left+1,top:e.top+1}).show(),this.$(".so-search-wrapper input").focus()},closeMenu:function(){this.trigger("close_menu"),l(window).off("keyup",this.keyboardListen),l(window).off("click",this.clickOutsideListen),this.active=!1,this.$el.empty().hide()},keyboardListen:function(e){var t=e.data.menu;switch(e.which){case 27:t.closeMenu()}},clickOutsideListen:function(e){var t=e.data.menu;3!==e.which&&t.$el.is(":visible")&&!t.isOverEl(t.$el,e)&&t.closeMenu()},addSection:function(e,t,i,s){var o=this;t=_.extend({display:5,defaultDisplay:!1,search:!0,sectionTitle:"",searchPlaceholder:"",titleKey:"title"},t);var n=l(this.sectionTemplate({settings:t,items:i})).attr("id","panels-menu-section-"+e);this.$el.append(n),n.find(".so-item:not(.so-confirm)").click((function(){var e=l(this);s(e.data("key")),o.closeMenu()})),n.find(".so-item.so-confirm").click((function(){var e=l(this);if(e.hasClass("so-confirming"))return s(e.data("key")),void o.closeMenu();e.data("original-text",e.html()).addClass("so-confirming").html('<span class="dashicons dashicons-yes"></span> '+panelsOptions.loc.dropdown_confirm),setTimeout((function(){e.removeClass("so-confirming"),e.html(e.data("original-text"))}),2500)})),n.data("settings",t).find(".so-search-wrapper input").trigger("keyup"),this.active=!0},hasSection:function(e){return this.$el.find("#panels-menu-section-"+e).length>0},searchKeyUp:function(e){var t=l(e.currentTarget),i=t.closest(".so-section"),s=i.data("settings");if(38===e.which||40===e.which){var o=i.find("ul li:visible"),n=o.filter(".so-active").eq(0);if(n.length){o.removeClass("so-active");var a=o.index(n);38===e.which?n=a-1<0?o.last():o.eq(a-1):40===e.which&&(n=a+1>=o.length?o.first():o.eq(a+1))}else 38===e.which?n=o.last():40===e.which&&(n=o.first());return n.addClass("so-active"),!1}if(13===e.which)return 1===i.find("ul li:visible").length?(i.find("ul li:visible").trigger("click"),!1):(i.find("ul li.so-active:visible").trigger("click"),!1);if(""===t.val())if(s.defaultDisplay){i.find(".so-item").hide();for(var r=0;r<s.defaultDisplay.length;r++)i.find('.so-item[data-key="'+s.defaultDisplay[r]+'"]').show()}else i.find(".so-item").show();else i.find(".so-item").hide().each((function(){var e=l(this);-1!==e.html().toLowerCase().indexOf(t.val().toLowerCase())&&e.show()}));i.find(".so-item:visible:gt("+(s.display-1)+")").hide(),0===i.find(".so-item:visible").length&&""!==t.val()?i.find(".so-no-results").show():i.find(".so-no-results").hide()},isOverEl:function(e,t){var i=[[e.offset().left,e.offset().top],[e.offset().left+e.outerWidth(),e.offset().top+e.outerHeight()]];return t.pageX>=i[0][0]&&t.pageX<=i[1][0]&&t.pageY>=i[0][1]&&t.pageY<=i[1][1]}})},{}],24:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({config:{},template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder").html())),dialogs:{},rowsSortable:null,dataField:!1,currentData:"",contentPreview:"",attachedToEditor:!1,attachedVisible:!1,liveEditor:void 0,menu:!1,activeCell:null,events:{"click .so-tool-button.so-widget-add":"displayAddWidgetDialog","click .so-tool-button.so-row-add":"displayAddRowDialog","click .so-tool-button.so-prebuilt-add":"displayAddPrebuiltDialog","click .so-tool-button.so-history":"displayHistoryDialog","click .so-tool-button.so-live-editor":"displayLiveEditor"},rows:null,initialize:function(e){var t=this;return this.config=_.extend({loadLiveEditor:!1,builderSupports:{}},e.config),this.config.builderSupports=_.extend({addRow:!0,editRow:!0,deleteRow:!0,moveRow:!0,addWidget:!0,editWidget:!0,deleteWidget:!0,moveWidget:!0,prebuilt:!0,history:!0,liveEditor:!0,revertToEditor:!0},this.config.builderSupports),e.config.loadLiveEditor&&this.on("builder_live_editor_added",(function(){this.displayLiveEditor()})),this.dialogs={widgets:new s.dialog.widgets,row:new s.dialog.row,prebuilt:new s.dialog.prebuilt},$panelsMetabox=l("#siteorigin-panels-metabox"),$panelsMetabox.length&&(this.contentPreview=l.parseHTML($panelsMetabox.data("preview-markup"))),_.each(this.dialogs,(function(e,i,s){s[i].setBuilder(t)})),this.dialogs.row.setRowDialogType("create"),this.listenTo(this.model.get("rows"),"add",this.onAddRow),l(window).resize((function(e){e.target===window&&t.trigger("builder_resize")})),this.listenTo(this.model,"change:data load_panels_data",this.storeModelData),this.listenTo(this.model,"change:data load_panels_data",this.toggleWelcomeDisplay),this.on("builder_attached_to_editor",this.handleContentChange,this),this.on("content_change",this.handleContentChange,this),this.on("display_builder",this.handleDisplayBuilder,this),this.on("hide_builder",this.handleHideBuilder,this),this.on("builder_rendered builder_resize",this.handleBuilderSizing,this),this.on("display_builder",this.wrapEditorExpandAdjust,this),this.menu=new s.utils.menu({}),this.listenTo(this.menu,"activate_context",this.activateContextMenu),this.config.loadOnAttach&&this.on("builder_attached_to_editor",(function(){this.displayAttachedBuilder({confirm:!1})}),this),this},render:function(){return this.setElement(this.template()),this.$el.attr("id","siteorigin-panels-builder-"+this.cid).addClass("so-builder-container"),this.trigger("builder_rendered"),this},attach:function(e){(e=_.extend({container:!1,dialog:!1},e)).dialog?(this.dialog=new s.dialog.builder,this.dialog.builder=this):(this.$el.appendTo(e.container),this.metabox=e.container.closest(".postbox"),this.initSortable(),this.trigger("attached_to_container",e.container)),this.trigger("builder_attached"),this.supports("liveEditor")&&this.addLiveEditor(),this.supports("history")&&this.addHistoryBrowser();var t=this.$(".so-builder-toolbar"),i=this.$(".so-panels-welcome-message"),l=panelsOptions.loc.welcomeMessage,o=[];this.supports("addWidget")?o.push(l.addWidgetButton):t.find(".so-widget-add").hide(),this.supports("addRow")?o.push(l.addRowButton):t.find(".so-row-add").hide(),this.supports("prebuilt")?o.push(l.addPrebuiltButton):t.find(".so-prebuilt-add").hide();var n="";3===o.length?n=l.threeEnabled:2===o.length?n=l.twoEnabled:1===o.length?n=l.oneEnabled:0===o.length&&(n=l.addingDisabled);var a=_.template(s.helpers.utils.processTemplate(n))({items:o})+" "+l.docsMessage;return i.find(".so-message-wrapper").html(a),this},attachToEditor:function(){if("tinyMCE"!==this.config.editorType)return this;this.attachedToEditor=!0;var e=this.metabox,t=this;l("#wp-content-wrap .wp-editor-tabs").find(".wp-switch-editor").click((function(e){e.preventDefault(),l("#wp-content-editor-container").show(),l("#wp-content-wrap").removeClass("panels-active"),l("#content-resize-handle").show(),t.trigger("hide_builder")})).end().append(l('<button type="button" id="content-panels" class="hide-if-no-js wp-switch-editor switch-panels">'+e.find("h2.hndle").html()+"</button>").click((function(e){t.displayAttachedBuilder({confirm:!0})&&e.preventDefault()}))),this.supports("revertToEditor")&&e.find(".so-switch-to-standard").click((function(i){i.preventDefault(),confirm(panelsOptions.loc.confirm_stop_builder)&&(t.addHistoryEntry("back_to_editor"),t.model.loadPanelsData(!1),l("#wp-content-wrap").show(),e.hide(),l(window).resize(),t.attachedVisible=!1,t.trigger("hide_builder"))})).show(),e.insertAfter("#wp-content-wrap").hide().addClass("attached-to-editor");var i=this.model.get("data");_.isEmpty(i.widgets)&&_.isEmpty(i.grids)&&this.supports("revertToEditor")||this.displayAttachedBuilder({confirm:!1});var s=function(){var e=t.$(".so-builder-toolbar");if(t.$el.hasClass("so-display-narrow"))return e.css({top:0,left:0,width:"100%",position:"absolute"}),void t.$el.css("padding-top",e.outerHeight());var i=l(window).scrollTop()-t.$el.offset().top;"fixed"===l("#wpadminbar").css("position")&&(i+=l("#wpadminbar").outerHeight());var s=0,o=t.$el.outerHeight()-e.outerHeight()+20;i>s&&i<o?"fixed"!==e.css("position")&&e.css({top:l("#wpadminbar").outerHeight(),left:t.$el.offset().left,width:t.$el.outerWidth(),position:"fixed"}):e.css({top:Math.min(Math.max(i,0),t.$el.outerHeight()-e.outerHeight()+20),left:0,width:"100%",position:"absolute"}),t.$el.css("padding-top",e.outerHeight())};return this.on("builder_resize",s,this),l(document).scroll(s),s(),this.trigger("builder_attached_to_editor"),this},displayAttachedBuilder:function(e){if((e=_.extend({confirm:!0},e)).confirm){var t="undefined"!=typeof tinyMCE&&tinyMCE.get("content");if(""!==(t&&_.isFunction(t.getContent)?t.getContent():l("textarea#content").val())&&!confirm(panelsOptions.loc.confirm_use_builder))return!1}return l("#wp-content-wrap").hide(),l("#editor-expand-toggle").on("change.editor-expand",(function(){l(this).prop("checked")||l("#wp-content-wrap").hide()})),this.metabox.show().find("> .inside").show(),l(window).resize(),l(document).scroll(),this.attachedVisible=!0,this.trigger("display_builder"),!0},initSortable:function(){if(!this.supports("moveRow"))return this;var e=this,t=e.$el.attr("id");return this.rowsSortable=this.$(".so-rows-container").sortable({appendTo:"#wpwrap",items:".so-row-container",handle:".so-row-move",connectWith:"#"+t+".so-rows-container,.block-editor .so-rows-container",axis:"y",tolerance:"pointer",scroll:!1,remove:function(t,i){e.model.get("rows").remove(l(i.item).data("view").model,{silent:!0}),e.model.refreshPanelsData()},receive:function(t,i){e.model.get("rows").add(l(i.item).data("view").model,{silent:!0,at:l(i.item).index()}),e.model.refreshPanelsData()},stop:function(t,i){var s=l(i.item),o=s.data("view"),n=e.model.get("rows");n.get(o.model)&&(e.addHistoryEntry("row_moved"),n.remove(o.model,{silent:!0}),n.add(o.model,{silent:!0,at:s.index()}),o.trigger("move",s.index()),e.model.refreshPanelsData())}}),this},refreshSortable:function(){_.isNull(this.rowsSortable)||this.rowsSortable.sortable("refresh")},setDataField:function(e,t){if(t=_.extend({load:!0},t),this.dataField=e,this.dataField.data("builder",this),t.load&&""!==e.val()){var i=this.dataField.val();try{i=JSON.parse(i)}catch(e){console.log("Failed to parse Page Builder layout data from supplied data field."),i={}}this.setData(i)}return this},setData:function(e){this.model.loadPanelsData(e),this.currentData=e,this.toggleWelcomeDisplay()},getData:function(){return this.model.get("data")},storeModelData:function(){var e=JSON.stringify(this.model.get("data"));l(this.dataField).val()!==e&&(l(this.dataField).val(e),l(this.dataField).trigger("change"),this.trigger("content_change"))},onAddRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.row({model:e});l.builder=this,l.render(),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".so-rows-container")):l.$el.insertAfter(this.$(".so-rows-container .so-row-container").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),l.resize(),this.trigger("row_added")},displayAddWidgetDialog:function(){this.dialogs.widgets.openDialog()},displayAddRowDialog:function(){var e=new s.model.row,t=new s.collection.cells([{weight:.5},{weight:.5}]);t.each((function(t){t.row=e})),e.set("cells",t),e.builder=this.model,this.dialogs.row.setRowModel(e),this.dialogs.row.openDialog()},displayAddPrebuiltDialog:function(){this.dialogs.prebuilt.openDialog()},displayHistoryDialog:function(){this.dialogs.history.openDialog()},pasteRowHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.addHistoryEntry("row_pasted"),e.builder=this.model,this.model.get("rows").add(e,{at:this.model.get("rows").indexOf(this.model)+1}),this.model.refreshPanelsData())},getActiveCell:function(e){if(e=_.extend({createCell:!0},e),!this.model.get("rows").length){if(!e.createCell)return null;this.model.addRow({},[{weight:1}],{noAnimate:!0})}var t=this.activeCell;return _.isEmpty(t)||-1===this.model.get("rows").indexOf(t.model.row)?this.model.get("rows").last().get("cells").first():t.model},addLiveEditor:function(){return _.isEmpty(this.config.liveEditorPreview)?this:(this.liveEditor=new s.view.liveEditor({builder:this,previewUrl:this.config.liveEditorPreview}),this.liveEditor.hasPreviewUrl()&&this.$(".so-builder-toolbar .so-live-editor").show(),this.trigger("builder_live_editor_added"),this)},displayLiveEditor:function(){_.isUndefined(this.liveEditor)||this.liveEditor.open()},addHistoryBrowser:function(){if(_.isEmpty(this.config.liveEditorPreview))return this;this.dialogs.history=new s.dialog.history,this.dialogs.history.builder=this,this.dialogs.history.entries.builder=this.model,this.dialogs.history.setRevertEntry(this.model),this.$(".so-builder-toolbar .so-history").show()},addHistoryEntry:function(e,t){_.isUndefined(t)&&(t=null),_.isUndefined(this.dialogs.history)||this.dialogs.history.entries.addEntry(e,t)},supports:function(e){return"rowAction"===e?this.supports("addRow")||this.supports("editRow")||this.supports("deleteRow"):"widgetAction"===e?this.supports("addWidget")||this.supports("editWidget")||this.supports("deleteWidget"):!_.isUndefined(this.config.builderSupports[e])&&this.config.builderSupports[e]},handleContentChange:function(){if(panelsOptions.copy_content&&(s.helpers.editor.isBlockEditor()||s.helpers.editor.isClassicEditor(this))){var e=this.model.getPanelsData();_.isEmpty(e.widgets)||l.post(panelsOptions.ajaxurl,{action:"so_panels_builder_content_json",panels_data:JSON.stringify(e),post_id:this.config.postId},function(e){this.contentPreview&&""!==e.post_content&&this.updateEditorContent(e.post_content),""!==e.preview&&(this.contentPreview=e.preview)}.bind(this))}},updateEditorContent:function(e){if("tinyMCE"!==this.config.editorType||"undefined"==typeof tinyMCE||_.isNull(tinyMCE.get("content"))){l(this.config.editorId).val(e).trigger("change").trigger("keyup")}else{var t=tinyMCE.get("content");t.setContent(e),t.fire("change"),t.fire("keyup")}this.triggerSeoChange()},triggerSeoChange:function(){"undefined"==typeof YoastSEO||_.isNull(YoastSEO)||_.isNull(YoastSEO.app.refresh)||YoastSEO.app.refresh(),"undefined"==typeof rankMathEditor||_.isNull(rankMathEditor)||_.isNull(rankMathEditor.refresh)||rankMathEditor.refresh("content")},handleDisplayBuilder:function(){var e="undefined"!=typeof tinyMCE&&tinyMCE.get("content"),t=e&&_.isFunction(e.getContent)?e.getContent():l("textarea#content").val();if((_.isEmpty(this.model.get("data"))||_.isEmpty(this.model.get("data").widgets)&&_.isEmpty(this.model.get("data").grids))&&""!==t){var i=panelsOptions.text_widget;if(_.isEmpty(i))return;this.model.loadPanelsData(this.model.getPanelsDataFromHtml(t,i)),this.model.trigger("change"),this.model.trigger("change:data")}l("#post-status-info").addClass("for-siteorigin-panels")},handleHideBuilder:function(){l("#post-status-info").show().removeClass("for-siteorigin-panels")},wrapEditorExpandAdjust:function(){try{for(var e,t=(l.hasData(window)&&l._data(window)).events.scroll,i=0;i<t.length;i++)if("editor-expand"===t[i].namespace){e=t[i],l(window).unbind("scroll",e.handler),l(window).bind("scroll",function(t){this.attachedVisible||e.handler(t)}.bind(this));break}}catch(e){return}},handleBuilderSizing:function(){var e=this.$el.width();return e?(e<575?this.$el.addClass("so-display-narrow"):this.$el.removeClass("so-display-narrow"),this):this},setDialogParents:function(e,t){_.each(this.dialogs,(function(i,s,l){l[s].setParent(e,t)})),this.on("add_dialog",(function(i){i.setParent(e,t)}),this)},toggleWelcomeDisplay:function(){this.model.get("rows").isEmpty()?this.$(".so-panels-welcome-message").show():this.$(".so-panels-welcome-message").hide()},activateContextMenu:function(e,t){if(l.contains(this.$el.get(0),e.target)){var i=l([]).add(this.$(".so-panels-welcome-message:visible")).add(this.$(".so-rows-container > .so-row-container")).add(this.$(".so-cells > .cell")).add(this.$(".cell-wrapper > .so-widget")).filter((function(i){return t.isOverEl(l(this),e)})),s=i.last().data("view");void 0!==s&&void 0!==s.buildContextualMenu?s.buildContextualMenu(e,t):i.last().hasClass("so-panels-welcome-message")&&this.buildContextualMenu(e,t)}},buildContextualMenu:function(e,t){var i={};this.supports("addRow")&&(i.add_row={title:panelsOptions.loc.contextual.add_row}),s.helpers.clipboard.canCopyPaste()&&s.helpers.clipboard.isModel("row-model")&&this.supports("addRow")&&(i.paste_row={title:panelsOptions.loc.contextual.row_paste}),_.isEmpty(i)||t.addSection("builder-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},i,function(e){switch(e){case"add_row":this.displayAddRowDialog();break;case"paste_row":this.pasteRowHandler()}}.bind(this))}})},{}],25:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-cell").html())),events:{"click .cell-wrapper":"handleCellClick"},row:null,widgetSortable:null,initialize:function(){this.listenTo(this.model.get("widgets"),"add",this.onAddWidget)},render:function(){var e={weight:this.model.get("weight"),totalWeight:this.row.model.get("cells").totalWeight()};this.setElement(this.template(e)),this.$el.data("view",this);var t=this;return this.model.get("widgets").each((function(e){var i=new s.view.widget({model:e});i.cell=t,i.render(),i.$el.appendTo(t.$(".widgets-container"))})),this.initSortable(),this.initResizable(),this},initSortable:function(){if(!this.row.builder.supports("moveWidget"))return this;var e=this,t=e.row.builder,i=t.$el.attr("id"),s=t.model;return this.widgetSortable=this.$(".widgets-container").sortable({placeholder:"so-widget-sortable-highlight",connectWith:"#"+i+" .so-cells .cell .widgets-container,.block-editor .so-cells .cell .widgets-container",tolerance:"pointer",scroll:!1,over:function(t,i){e.row.builder.trigger("widget_sortable_move")},remove:function(t,i){e.model.get("widgets").remove(l(i.item).data("view").model,{silent:!0}),s.refreshPanelsData()},receive:function(t,i){var o=l(i.item).data("view");o.cell=e;var n=o.model;n.cell=e.model,e.model.get("widgets").add(n,{silent:!0,at:l(i.item).index()}),s.refreshPanelsData()},stop:function(t,i){var o=l(i.item),n=o.data("view"),a=o.closest(".cell").data("view");e.model.get("widgets").get(n.model)&&(e.row.builder.addHistoryEntry("widget_moved"),n.model.moveToCell(a.model,{},o.index()),n.cell=a,s.refreshPanelsData())},helper:function(e,t){var i=t.clone().css({width:t.outerWidth(),"z-index":1e4,position:"fixed"}).addClass("widget-being-dragged").appendTo("body");return t.outerWidth()>720&&i.animate({"margin-left":e.pageX-t.offset().left-240,width:480},"fast"),i}}),this},refreshSortable:function(){_.isNull(this.widgetSortable)||this.widgetSortable.sortable("refresh")},initResizable:function(){if(!this.row.builder.supports("editRow"))return this;var e,t=this.$(".resize-handle").css("position","absolute"),i=this.row.$el,s=this;return t.draggable({axis:"x",containment:i,start:function(t,i){if(e=s.$el.prev().data("view"),!_.isUndefined(e)){var o=s.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:s.$el.outerWidth(),left:5,height:s.$el.outerHeight()});o.find(".resize-handle").remove();var n=e.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:e.$el.outerWidth(),right:5,height:e.$el.outerHeight()});n.find(".resize-handle").remove(),l(this).data({newCellClone:o,prevCellClone:n})}},drag:function(i,o){var n=s.row.$el.width()+10,a=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,r=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;l(this).data("newCellClone").css("width",n*a).find(".preview-cell-weight").html(Math.round(1e3*a)/10),l(this).data("prevCellClone").css("width",n*r).find(".preview-cell-weight").html(Math.round(1e3*r)/10)},stop:function(i,o){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove();var n=s.row.$el.width()+10,a=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,r=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;a>.02&&r>.02&&(s.row.builder.addHistoryEntry("cell_resized"),s.model.set("weight",a),e.model.set("weight",r),s.row.resize()),o.helper.css("left",-t.outerWidth()/2),s.row.builder.model.refreshPanelsData()}}),this},onAddWidget:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.widget({model:e});l.cell=this,_.isUndefined(e.isDuplicate)&&(e.isDuplicate=!1),l.render({loadForm:e.isDuplicate}),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".widgets-container")):l.$el.insertAfter(this.$(".widgets-container .so-widget").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),this.row.resize(),this.row.builder.trigger("widget_added",l)},handleCellClick:function(e){this.row.builder.$el.find(".so-cells .cell").removeClass("cell-selected"),this.row.builder.activeCell!==this||this.model.get("widgets").length?(this.$el.addClass("cell-selected"),this.row.builder.activeCell=this):this.row.builder.activeCell=null},pasteHandler:function(){var e=s.helpers.clipboard.getModel("widget-model");!_.isEmpty(e)&&e instanceof s.model.widget&&(this.row.builder.addHistoryEntry("widget_pasted"),e.cell=this.model,this.model.get("widgets").add(e),this.row.builder.model.refreshPanelsData())},buildContextualMenu:function(e,t){var i=this;t.hasSection("add-widget-below")||t.addSection("add-widget-cell",{sectionTitle:panelsOptions.loc.contextual.add_widget_cell,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,(function(e){i.row.builder.trigger("before_user_adds_widget"),i.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=i.model,t.cell.get("widgets").add(t),i.row.builder.model.refreshPanelsData(),i.row.builder.trigger("after_user_adds_widget",t)}));var l={};this.row.builder.supports("addWidget")&&s.helpers.clipboard.isModel("widget-model")&&(l.paste={title:panelsOptions.loc.contextual.cell_paste_widget}),_.isEmpty(l)||t.addSection("cell-actions",{sectionTitle:panelsOptions.loc.contextual.cell_actions,search:!1},l,function(e){switch(e){case"paste":this.pasteHandler()}this.row.builder.model.refreshPanelsData()}.bind(this)),this.row.buildContextualMenu(e,t)}})},{}],26:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({dialogTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog").html())),dialogTabTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-tab").html())),tabbed:!1,rendered:!1,builder:!1,className:"so-panels-dialog-wrapper",dialogClass:"",dialogIcon:"",parentDialog:!1,dialogOpen:!1,editableLabel:!1,events:{"click .so-close":"closeDialog","click .so-nav.so-previous":"navToPrevious","click .so-nav.so-next":"navToNext"},initialize:function(){this.once("open_dialog",this.render),this.once("open_dialog",this.attach),this.once("open_dialog",this.setDialogClass),this.trigger("initialize_dialog",this),_.isUndefined(this.initializeDialog)||this.initializeDialog(),_.bindAll(this,"initSidebars","hasSidebar","onResize","toggleLeftSideBar","toggleRightSideBar")},getNextDialog:function(){return null},getPrevDialog:function(){return null},setDialogClass:function(){""!==this.dialogClass&&this.$(".so-panels-dialog").addClass(this.dialogClass)},setBuilder:function(e){return this.builder=e,e.trigger("add_dialog",this,this.builder),this},attach:function(){return this.$el.appendTo("body"),this},parseDialogContent:function(e,t){t=_.extend({cid:this.cid},t);var i=l(_.template(s.helpers.utils.processTemplate(e))(t)),o={title:i.find(".title").html(),buttons:i.find(".buttons").html(),content:i.find(".content").html()};return i.has(".left-sidebar")&&(o.left_sidebar=i.find(".left-sidebar").html()),i.has(".right-sidebar")&&(o.right_sidebar=i.find(".right-sidebar").html()),o},renderDialog:function(e){if(e=_.extend({editableLabel:this.editableLabel,dialogIcon:this.dialogIcon},e),this.$el.html(this.dialogTemplate(e)).hide(),this.$el.data("view",this),this.$el.addClass("so-panels-dialog-wrapper"),!1!==this.parentDialog){var t=l('<h3 class="so-parent-link"></h3>').html(this.parentDialog.text+'<div class="so-separator"></div>');t.click(function(e){e.preventDefault(),this.closeDialog(),this.parentDialog.dialog.openDialog()}.bind(this)),this.$(".so-title-bar .so-title").before(t)}return this.$(".so-title-bar .so-title-editable").length&&this.initEditableLabel(),setTimeout(this.initSidebars,1),this},initSidebars:function(){var e=this.$(".so-show-left-sidebar").hide(),t=this.$(".so-show-right-sidebar").hide(),i=this.hasSidebar("left"),s=this.hasSidebar("right");(i||s)&&(l(window).on("resize",this.onResize),i&&(e.show(),e.on("click",this.toggleLeftSideBar)),s&&(t.show(),t.on("click",this.toggleRightSideBar))),this.onResize()},initTabs:function(){var e=this.$(".so-sidebar-tabs li a");if(0===e.length)return this;var t=this;return e.click((function(e){e.preventDefault();var i=l(this);t.$(".so-sidebar-tabs li").removeClass("tab-active"),t.$(".so-content .so-content-tabs > *").hide(),i.parent().addClass("tab-active");var s=i.attr("href");if(!_.isUndefined(s)&&"#"===s.charAt(0)){var o=s.split("#")[1];t.$(".so-content .so-content-tabs .tab-"+o).show()}t.trigger("tab_click",i)})),this.$(".so-sidebar-tabs li a").first().click(),this},initToolbar:function(){this.$(".so-toolbar .so-buttons .so-toolbar-button").click(function(e){e.preventDefault(),this.trigger("button_click",l(e.currentTarget))}.bind(this)),this.$(".so-toolbar .so-buttons .so-dropdown-button").click(function(e){e.preventDefault();var t=l(e.currentTarget).siblings(".so-dropdown-links-wrapper");t.is(".hidden")?t.removeClass("hidden"):t.addClass("hidden")}.bind(this)),l("html").click(function(e){this.$(".so-dropdown-links-wrapper").not(".hidden").each((function(t,i){var s=l(i),o=l(e.target);0!==o.length&&(o.is(".so-needs-confirm")&&!o.is(".so-confirmed")||o.is(".so-dropdown-button"))||s.addClass("hidden")}))}.bind(this))},initEditableLabel:function(){var e=this.$(".so-title-bar .so-title-editable");e.keypress((function(t){var i="keypress"===t.type&&13===t.keyCode;if(i){var s=l(":tabbable"),o=s.index(e);s.eq(o+1).focus(),window.getSelection().removeAllRanges()}return!i})).blur(function(){var t=e.text().replace(/^\s+|\s+$/gm,"");t!==e.data("original-value").replace(/^\s+|\s+$/gm,"")&&(e.text(t),this.trigger("edit_label",t))}.bind(this)),e.focus((function(){e.data("original-value",e.text()),s.helpers.utils.selectElementContents(this)}))},setupDialog:function(){this.openDialog(),this.closeDialog()},refreshDialogNav:function(){this.$(".so-title-bar .so-nav").show().removeClass("so-disabled");var e=this.getNextDialog(),t=this.$(".so-title-bar .so-next"),i=this.getPrevDialog(),s=this.$(".so-title-bar .so-previous");null===e?t.hide():!1===e&&t.addClass("so-disabled"),null===i?s.hide():!1===i&&s.addClass("so-disabled")},openDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("open_dialog"),this.dialogOpen=!0,this.refreshDialogNav(),s.helpers.pageScroll.lock(),this.onResize(),this.$el.show(),e.silent||(this.trigger("open_dialog_complete"),this.builder.trigger("open_dialog",this),l(document).trigger("open_dialog",this))},closeDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("close_dialog"),this.dialogOpen=!1,this.$el.hide(),s.helpers.pageScroll.unlock(),e.silent||(this.trigger("close_dialog_complete"),this.builder.trigger("close_dialog",this))},navToPrevious:function(){this.closeDialog();var e=this.getPrevDialog();null!==e&&!1!==e&&e.openDialog()},navToNext:function(){this.closeDialog();var e=this.getNextDialog();null!==e&&!1!==e&&e.openDialog()},getFormValues:function(e){_.isUndefined(e)&&(e=".so-content");var t,i=this.$(e),s={};return i.find("[name]").each((function(){var e=l(this);try{var i=/([A-Za-z_]+)\[(.*)\]/.exec(e.attr("name"));if(_.isEmpty(i))return!0;_.isUndefined(i[2])?t=e.attr("name"):(t=i[2].split("][")).unshift(i[1]),t=t.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e}));var o=s,n=null,a=!!_.isString(e.attr("type"))&&e.attr("type").toLowerCase();if("checkbox"===a)n=e.is(":checked")?""===e.val()||e.val():null;else if("radio"===a){if(!e.is(":checked"))return;n=e.val()}else if("SELECT"===e.prop("tagName")){var r=e.find("option:selected");1===r.length?n=e.find("option:selected").val():r.length>1&&(n=_.map(e.find("option:selected"),(function(e,t){return l(e).val()})))}else n=e.val();if(!_.isUndefined(e.data("panels-filter")))switch(e.data("panels-filter")){case"json_parse":try{n=JSON.parse(n)}catch(e){n=""}}if(null!==n)for(var d=0;d<t.length;d++)d===t.length-1?""===t[d]?o.push(n):o[t[d]]=n:(_.isUndefined(o[t[d]])&&(""===t[d+1]?o[t[d]]=[]:o[t[d]]={}),o=o[t[d]])}catch(t){console.log("Field ["+e.attr("name")+"] could not be processed and was skipped - "+t.message)}})),s},setStatusMessage:function(e,t,i){var s=i?'<span class="dashicons dashicons-warning"></span>'+e:e;this.$(".so-toolbar .so-status").html(s),!_.isUndefined(t)&&t?this.$(".so-toolbar .so-status").addClass("so-panels-loading"):this.$(".so-toolbar .so-status").removeClass("so-panels-loading")},setParent:function(e,t){this.parentDialog={text:e,dialog:t}},onResize:function(){var e=window.matchMedia("(max-width: 980px)");["left","right"].forEach(function(t){var i=this.$(".so-"+t+"-sidebar"),s=this.$(".so-show-"+t+"-sidebar");this.hasSidebar(t)?(s.hide(),e.matches?(s.show(),s.closest(".so-title-bar").addClass("so-has-"+t+"-button"),i.hide(),i.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-"+t+"-sidebar")):(s.hide(),s.closest(".so-title-bar").removeClass("so-has-"+t+"-button"),i.show(),i.closest(".so-panels-dialog").addClass("so-panels-dialog-has-"+t+"-sidebar"))):(i.hide(),s.hide())}.bind(this))},hasSidebar:function(e){return this.$(".so-"+e+"-sidebar").children().length>0},toggleLeftSideBar:function(){this.toggleSidebar("left")},toggleRightSideBar:function(){this.toggleSidebar("right")},toggleSidebar:function(e){var t=this.$(".so-"+e+"-sidebar");t.is(":visible")?t.hide():t.show()}})},{}],27:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-live-editor").html())),previewScrollTop:0,loadTimes:[],previewFrameId:1,previewUrl:null,previewIframe:null,events:{"click .live-editor-close":"close","click .live-editor-save":"closeAndSave","click .live-editor-collapse":"collapse","click .live-editor-mode":"mobileToggle"},initialize:function(e){e=_.extend({builder:!1,previewUrl:!1},e),_.isEmpty(e.previewUrl)&&(e.previewUrl=panelsOptions.ajaxurl+"&action=so_panels_live_editor_preview"),this.builder=e.builder,this.previewUrl=e.previewUrl,this.listenTo(this.builder.model,"refresh_panels_data",this.handleRefreshData),this.listenTo(this.builder.model,"load_panels_data",this.handleLoadData)},render:function(){if(this.setElement(this.template()),this.$el.hide(),l("#submitdiv #save-post").length>0){var e=this.$el.find(".live-editor-save");e.text(e.data("save"))}var t=!1;l(document).mousedown((function(){t=!0})).mouseup((function(){t=!1}));var i=this;return this.$el.on("mouseenter",".so-widget-wrapper",(function(){var e=l(this).data("live-editor-preview-widget");t||void 0===e||!e.length||i.$(".so-preview-overlay").is(":visible")||(i.highlightElement(e),i.scrollToElement(e))})),this.$el.on("mouseleave",".so-widget-wrapper",function(){this.resetHighlights()}.bind(this)),this.listenTo(this.builder,"open_dialog",(function(){this.resetHighlights()})),this},attach:function(){this.$el.appendTo("body")},open:function(){if(""===this.$el.html()&&this.render(),0===this.$el.closest("body").length&&this.attach(),s.helpers.pageScroll.lock(),this.$el.is(":visible"))return this;if(this.$el.show(),this.refreshPreview(this.builder.model.getPanelsData()),this.originalContainer=this.builder.$el.parent(),this.builder.$el.appendTo(this.$(".so-live-editor-builder")),this.builder.$(".so-tool-button.so-live-editor").hide(),this.builder.trigger("builder_resize"),"auto-draft"===l("#original_post_status").val()&&!this.autoSaved){var e=this;wp.autosave&&(""===l('#title[name="post_title"]').val()&&l('#title[name="post_title"]').val(panelsOptions.loc.draft).trigger("keydown"),l(document).one("heartbeat-tick.autosave",(function(){e.autoSaved=!0,e.refreshPreview(e.builder.model.getPanelsData())})),wp.autosave.server.triggerSave())}},close:function(){if(!this.$el.is(":visible"))return this;this.$el.hide(),s.helpers.pageScroll.unlock(),this.builder.$el.appendTo(this.originalContainer),this.builder.$(".so-tool-button.so-live-editor").show(),this.builder.trigger("builder_resize")},closeAndSave:function(){this.close(),l('#submitdiv input[type="submit"][name="save"]').click()},collapse:function(){this.$el.toggleClass("so-collapsed")},highlightElement:function(e){_.isUndefined(this.resetHighlightTimeout)||clearTimeout(this.resetHighlightTimeout),this.previewIframe.contents().find("body").find(".panel-grid .panel-grid-cell .so-panel").filter((function(){return 0===l(this).parents(".so-panel").length})).not(e).addClass("so-panels-faded"),e.removeClass("so-panels-faded").addClass("so-panels-highlighted")},resetHighlights:function(){var e=this.previewIframe.contents().find("body");this.resetHighlightTimeout=setTimeout((function(){e.find(".panel-grid .panel-grid-cell .so-panel").removeClass("so-panels-faded so-panels-highlighted")}),100)},scrollToElement:function(e){this.$(".so-preview iframe")[0].contentWindow.liveEditorScrollTo(e)},handleRefreshData:function(e){if(!this.$el.is(":visible"))return this;this.refreshPreview(e)},handleLoadData:function(){if(!this.$el.is(":visible"))return this;this.refreshPreview(this.builder.model.getPanelsData())},refreshPreview:function(e){var t=this.loadTimes.length?_.reduce(this.loadTimes,(function(e,t){return e+t}),0)/this.loadTimes.length:1e3;_.isNull(this.previewIframe)||this.$(".so-preview-overlay").is(":visible")||(this.previewScrollTop=this.previewIframe.contents().scrollTop()),this.$(".so-preview-overlay").show(),this.$(".so-preview-overlay .so-loading-bar").clearQueue().css("width","0%").animate({width:"100%"},parseInt(t)+100),this.postToIframe({live_editor_panels_data:JSON.stringify(e),live_editor_post_ID:this.builder.config.postId},this.previewUrl,this.$(".so-preview")),this.previewIframe.data("load-start",(new Date).getTime())},postToIframe:function(e,t,i){_.isNull(this.previewIframe)||this.previewIframe.remove();var s="siteorigin-panels-live-preview-"+this.previewFrameId;this.previewIframe=l('<iframe src="'+t+'" />').attr({id:s,name:s}).appendTo(i),this.setupPreviewFrame(this.previewIframe);var o=l('<form id="soPostToPreviewFrame" method="post" />').attr({id:s,target:this.previewIframe.attr("id"),action:t}).appendTo("body");return l.each(e,(function(e,t){l('<input type="hidden" />').attr({name:e,value:t}).appendTo(o)})),o.submit().remove(),this.previewFrameId++,this.previewIframe},setupPreviewFrame:function(e){var t=this;e.data("iframeready",!1).on("iframeready",(function(){var e=l(this),i=e.contents();if(!e.data("iframeready")){e.data("iframeready",!0),void 0!==e.data("load-start")&&(t.loadTimes.unshift((new Date).getTime()-e.data("load-start")),_.isEmpty(t.loadTimes)||(t.loadTimes=t.loadTimes.slice(0,4))),l(".live-editor-mode.so-active").length&&(l(".so-panels-live-editor .so-preview iframe").css("transition","none"),t.mobileToggle()),setTimeout((function(){i.scrollTop(t.previewScrollTop),t.$(".so-preview-overlay").hide(),l(".so-panels-live-editor .so-preview iframe").css("transition","all .2s ease")}),100);var s=i.find("#pl-"+t.builder.config.postId);s.find(".panel-grid .panel-grid-cell .so-panel").filter((function(){return l(this).closest(".panel-layout").is(s)})).each((function(e,i){var s=l(i),o=t.$(".so-live-editor-builder .so-widget-wrapper").eq(s.data("index"));o.data("live-editor-preview-widget",s),s.css({cursor:"pointer"}).mouseenter((function(){o.parent().addClass("so-hovered"),t.highlightElement(s)})).mouseleave((function(){o.parent().removeClass("so-hovered"),t.resetHighlights()})).click((function(e){e.preventDefault(),o.find(".title h4").click()}))})),i.find("a").css({"pointer-events":"none"}).click((function(e){e.preventDefault()}))}})).on("load",(function(){var e=l(this);e.data("iframeready")||e.trigger("iframeready")}))},hasPreviewUrl:function(){return""!==this.$("form.live-editor-form").attr("action")},mobileToggle:function(e){var t=l(void 0!==e?e.currentTarget:".live-editor-mode.so-active");this.$(".live-editor-mode").not(t).removeClass("so-active"),t.addClass("so-active"),this.$el.removeClass("live-editor-desktop-mode live-editor-tablet-mode live-editor-mobile-mode").addClass("live-editor-"+t.data("mode")+"-mode").find("iframe").css("width",t.data("width"))}})},{}],28:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-row").html())),events:{"click .so-row-settings":"editSettingsHandler","click .so-row-duplicate":"duplicateHandler","click .so-row-delete":"confirmedDeleteHandler","click .so-row-color":"rowColorChangeHandler"},builder:null,dialog:null,initialize:function(){var e=this.model.get("cells");this.listenTo(e,"add",this.handleCellAdd),this.listenTo(e,"remove",this.handleCellRemove),this.listenTo(this.model,"reweight_cells",this.resize),this.listenTo(this.model,"destroy",this.onModelDestroy);var t=this;e.each((function(e){t.listenTo(e.get("widgets"),"add",t.resize)})),e.on("add",(function(e){t.listenTo(e.get("widgets"),"add",t.resize)}),this),this.listenTo(this.model,"change:label",this.onLabelChange)},render:function(){var e=this.model.has("color_label")?this.model.get("color_label"):1,t=this.model.has("label")?this.model.get("label"):"";this.setElement(this.template({rowColorLabel:e,rowLabel:t})),this.$el.data("view",this);var i=this;return this.model.get("cells").each((function(e){var t=new s.view.cell({model:e});t.row=i,t.render(),t.$el.appendTo(i.$(".so-cells"))})),this.builder.supports("rowAction")?(this.builder.supports("editRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-settings").parent().remove(),this.$el.addClass("so-row-no-edit")),this.builder.supports("addRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-duplicate").parent().remove(),this.$el.addClass("so-row-no-duplicate")),this.builder.supports("deleteRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-delete").parent().remove(),this.$el.addClass("so-row-no-delete"))):(this.$(".so-row-toolbar .so-dropdown-wrapper").remove(),this.$el.addClass("so-row-no-actions")),this.builder.supports("moveRow")||(this.$(".so-row-toolbar .so-row-move").remove(),this.$el.addClass("so-row-no-move")),l.trim(this.$(".so-row-toolbar").html()).length||this.$(".so-row-toolbar").remove(),this.listenTo(this.builder,"widget_sortable_move",this.resize),this.listenTo(this.builder,"builder_resize",this.resize),this.resize(),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},resize:function(e){if(this.$el.is(":visible")){this.$(".so-cells .cell-wrapper").css("min-height",0),this.$(".so-cells .resize-handle").css("height",0);var t=0;this.$(".so-cells .cell").each((function(){t=Math.max(t,l(this).height()),l(this).css("width",100*l(this).data("view").model.get("weight")+"%")})),this.$(".so-cells .cell-wrapper").css("min-height",Math.max(t,63)),this.$(".so-cells .resize-handle").css("height",this.$(".so-cells .cell-wrapper").outerHeight())}},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){this.builder.addHistoryEntry("row_deleted");var e=this;this.$el.fadeOut("normal",(function(){e.model.destroy(),e.builder.model.refreshPanelsData()}))},onLabelChange:function(e,t){0==this.$(".so-row-label").length?this.$(".so-row-toolbar").prepend('<h3 class="so-row-label">'+t+"</h3>"):this.$(".so-row-label").text(t)},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},pasteHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.builder.addHistoryEntry("row_pasted"),e.builder=this.builder.model,this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData())},confirmedDeleteHandler:function(e){var t=l(e.target);if(t.hasClass("dashicons")&&(t=t.parent()),t.hasClass("so-confirmed"))this.visualDestroyModel();else{var i=t.html();t.addClass("so-confirmed").html('<span class="dashicons dashicons-yes"></span>'+panelsOptions.loc.dropdown_confirm),setTimeout((function(){t.removeClass("so-confirmed").html(i)}),2500)}},editSettingsHandler:function(){if(this.builder.supports("editRow"))return null===this.dialog&&(this.dialog=new s.dialog.row,this.dialog.setBuilder(this.builder).setRowModel(this.model),this.dialog.rowView=this),this.dialog.openDialog(),this},deleteHandler:function(){return this.model.destroy(),this},rowColorChangeHandler:function(e){this.$(".so-row-color").removeClass("so-row-color-selected");var t=l(e.target),i=t.data("color-label"),s=this.model.has("color_label")?this.model.get("color_label"):1;t.addClass("so-row-color-selected"),this.$el.removeClass("so-row-color-"+s),this.$el.addClass("so-row-color-"+i),this.model.set("color_label",i)},handleCellAdd:function(e){var t=new s.view.cell({model:e});t.row=this,t.render(),t.$el.appendTo(this.$(".so-cells"))},handleCellRemove:function(e){this.$(".so-cells > .cell").each((function(){var t=l(this).data("view");_.isUndefined(t)||t.model.cid===e.cid&&t.remove()}))},buildContextualMenu:function(e,t){for(var i=[],l=1;l<5;l++)i.push({title:l+" "+panelsOptions.loc.contextual.column});this.builder.supports("addRow")&&t.addSection("add-row",{sectionTitle:panelsOptions.loc.contextual.add_row,search:!1},i,function(e){this.builder.addHistoryEntry("row_added");for(var t=Number(e)+1,i=[],l=0;l<t;l++)i.push({weight:100/t});var o=new s.model.row({collection:this.collection}),n=new s.collection.cells(i);n.each((function(e){e.row=o})),o.setCells(n),o.builder=this.builder.model,this.builder.model.get("rows").add(o,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()}.bind(this));var o={};this.builder.supports("editRow")&&(o.edit={title:panelsOptions.loc.contextual.row_edit}),s.helpers.clipboard.canCopyPaste()&&(o.copy={title:panelsOptions.loc.contextual.row_copy},this.builder.supports("addRow")&&s.helpers.clipboard.isModel("row-model")&&(o.paste={title:panelsOptions.loc.contextual.row_paste})),this.builder.supports("addRow")&&(o.duplicate={title:panelsOptions.loc.contextual.row_duplicate}),this.builder.supports("deleteRow")&&(o.delete={title:panelsOptions.loc.contextual.row_delete,confirm:!0}),_.isEmpty(o)||t.addSection("row-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},o,function(e){switch(e){case"edit":this.editSettingsHandler();break;case"copy":this.copyHandler();break;case"paste":this.pasteHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this))}})},{}],29:[function(e,t,i){window.panels;var s=jQuery;t.exports=Backbone.View.extend({stylesLoaded:!1,initialize:function(){},render:function(e,t,i){if(!_.isUndefined(e)){i=_.extend({builderType:"",dialog:null},i),this.$el.addClass("so-visual-styles so-"+e+"-styles so-panels-loading");var l={builderType:i.builderType};return"cell"===e&&(l.index=i.index),s.post(panelsOptions.ajaxurl,{action:"so_panels_style_form",type:e,style:this.model.get("style"),args:JSON.stringify(l),postId:t},null,"html").done(function(e){this.$el.html(e),this.setupFields(),this.stylesLoaded=!0,this.trigger("styles_loaded",!_.isEmpty(e)),_.isNull(i.dialog)||i.dialog.trigger("styles_loaded",!_.isEmpty(e))}.bind(this)).fail(function(e){var t;t=e&&e.responseText?e.responseText:panelsOptions.forms.loadingFailed,this.$el.html(t)}.bind(this)).always(function(){this.$el.removeClass("so-panels-loading")}.bind(this)),this}},attach:function(e){e.append(this.$el)},detach:function(){this.$el.detach()},setupFields:function(){this.$(".style-section-wrapper").each((function(){var e=s(this);e.find(".style-section-head").click((function(t){t.preventDefault(),e.find(".style-section-fields").slideToggle("fast")}))})),_.isUndefined(s.fn.wpColorPicker)||(_.isObject(panelsOptions.wpColorPickerOptions.palettes)&&!s.isArray(panelsOptions.wpColorPickerOptions.palettes)&&(panelsOptions.wpColorPickerOptions.palettes=s.map(panelsOptions.wpColorPickerOptions.palettes,(function(e){return e}))),this.$(".so-wp-color-field").wpColorPicker(panelsOptions.wpColorPickerOptions)),this.$(".style-field-image").each((function(){var e=null,t=s(this);t.find(".so-image-selector").click((function(i){i.preventDefault(),null===e&&(e=wp.media({title:"choose",library:{type:"image"},button:{text:"Done",close:!0}})).on("select",(function(){var i=e.state().get("selection").first().attributes,s=i.url;if(!_.isUndefined(i.sizes))try{s=i.sizes.thumbnail.url}catch(e){s=i.sizes.full.url}t.find(".current-image").css("background-image","url("+s+")"),t.find(".so-image-selector > input").val(i.id),t.find(".remove-image").removeClass("hidden")})),e.open()})),t.find(".remove-image").click((function(e){e.preventDefault(),t.find(".current-image").css("background-image","none"),t.find(".so-image-selector > input").val(""),t.find(".remove-image").addClass("hidden")}))})),this.$(".style-field-measurement").each((function(){var e=s(this),t=e.find('input[type="text"]'),i=e.find("select"),l=e.find('input[type="hidden"]');t.focus((function(){s(this).select()}));!function(e){if(""!==e){var o=/(?:([0-9\.,\-]+)(.*))+/,n=l.val().split(" "),a=[];for(var r in n){var d=o.exec(n[r]);_.isNull(d)||_.isUndefined(d[1])||_.isUndefined(d[2])||(a.push(d[1]),i.val(d[2]))}1===t.length?t.val(a.join(" ")):(1===a.length?a=[a[0],a[0],a[0],a[0]]:2===a.length?a=[a[0],a[1],a[0],a[1]]:3===a.length&&(a=[a[0],a[1],a[2],a[1]]),t.each((function(e,t){s(t).val(a[e])})))}}(l.val());var o=function(e){if(1===t.length){var o=t.val().split(" ").filter((function(e){return""!==e})).map((function(e){return e+i.val()})).join(" ");l.val(o)}else{var n=s(e.target),a=[],r=[],d=[];t.each((function(e,t){var i=""!==s(t).val()?parseFloat(s(t).val()):null;a.push(i),null===i?r.push(e):d.push(e)})),3===r.length&&d[0]===t.index(n)&&(t.val(n.val()),a=[n.val(),n.val(),n.val(),n.val()]),JSON.stringify(a)===JSON.stringify([null,null,null,null])?l.val(""):l.val(a.map((function(e){return(null===e?0:e)+i.val()})).join(" "))}};t.change(o),i.change(o)}))}})},{}],30:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-widget").html())),cell:null,dialog:null,events:{"click .widget-edit":"editHandler","touchend .widget-edit":"editHandler","click .title h4":"editHandler","touchend .title h4":"editHandler","click .actions .widget-duplicate":"duplicateHandler","click .actions .widget-delete":"deleteHandler"},initialize:function(){this.listenTo(this.model,"destroy",this.onModelDestroy),this.listenTo(this.model,"change:values",this.onModelChange),this.listenTo(this.model,"change:label",this.onLabelChange)},render:function(e){if(e=_.extend({loadForm:!1},e),this.setElement(this.template({title:this.model.getWidgetField("title"),description:this.model.getTitle(),widget_class:this.model.attributes.class})),this.$el.data("view",this),this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")||(this.$(".actions .widget-edit").remove(),this.$el.addClass("so-widget-no-edit")),this.cell.row.builder.supports("addWidget")||(this.$(".actions .widget-duplicate").remove(),this.$el.addClass("so-widget-no-duplicate")),this.cell.row.builder.supports("deleteWidget")||(this.$(".actions .widget-delete").remove(),this.$el.addClass("so-widget-no-delete")),this.cell.row.builder.supports("moveWidget")||this.$el.addClass("so-widget-no-move"),l.trim(this.$(".actions").html()).length||this.$(".actions").remove(),this.model.get("read_only")&&this.$el.addClass("so-widget-read-only"),0===_.size(this.model.get("values"))||e.loadForm){var t=this.getEditDialog();t.once("form_loaded",t.saveWidget,t),t.setupDialog()}return this.listenTo(this.cell.row.builder,"after_user_adds_widget",this.afterUserAddsWidgetHandler),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},getEditDialog:function(){return null===this.dialog&&(this.dialog=new s.dialog.widget({model:this.model}),this.dialog.setBuilder(this.cell.row.builder),this.dialog.widgetView=this),this.dialog},editHandler:function(){return!this.cell.row.builder.supports("editWidget")||this.model.get("read_only")?this:(this.getEditDialog().openDialog(),this)},duplicateHandler:function(){this.cell.row.builder.addHistoryEntry("widget_duplicated");var e=this.model.clone(this.model.cell);return this.cell.model.get("widgets").add(e,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},deleteHandler:function(){return this.visualDestroyModel(),this},onModelChange:function(){this.$(".description").html(this.model.getTitle())},onLabelChange:function(e){this.$(".title > h4").text(e.getWidgetField("title"))},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){return this.cell.row.builder.addHistoryEntry("widget_deleted"),this.$el.fadeOut("fast",function(){this.cell.row.resize(),this.model.destroy(),this.cell.row.builder.model.refreshPanelsData(),this.remove()}.bind(this)),this},buildContextualMenu:function(e,t){this.cell.row.builder.supports("addWidget")&&t.addSection("add-widget-below",{sectionTitle:panelsOptions.loc.contextual.add_widget_below,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,function(e){this.cell.row.builder.trigger("before_user_adds_widget"),this.cell.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=this.cell.model,this.cell.model.get("widgets").add(t,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this.cell.row.builder.trigger("after_user_adds_widget",t)}.bind(this));var i={};this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")&&(i.edit={title:panelsOptions.loc.contextual.widget_edit}),s.helpers.clipboard.canCopyPaste()&&(i.copy={title:panelsOptions.loc.contextual.widget_copy}),this.cell.row.builder.supports("addWidget")&&(i.duplicate={title:panelsOptions.loc.contextual.widget_duplicate}),this.cell.row.builder.supports("deleteWidget")&&(i.delete={title:panelsOptions.loc.contextual.widget_delete,confirm:!0}),_.isEmpty(i)||t.addSection("widget-actions",{sectionTitle:panelsOptions.loc.contextual.widget_actions,search:!1},i,function(e){switch(e){case"edit":this.editHandler();break;case"copy":this.copyHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this)),this.cell.buildContextualMenu(e,t)},afterUserAddsWidgetHandler:function(e){this.model===e&&panelsOptions.instant_open&&setTimeout(this.editHandler.bind(this),350)}})},{}],31:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.customHtmlWidgets,o=s("<div></div>"),n=t.find(".widget-content:first");n.before(o);var a=new l.CustomHtmlWidgetControl({el:o,syncContainer:n});return a.initializeEditor(),a.editor.codemirror.refresh(),a}};t.exports=l},{}],32:[function(e,t,i){var s=e("./custom-html-widget"),l=e("./media-widget"),o=e("./text-widget"),n={CUSTOM_HTML:"custom_html",MEDIA_AUDIO:"media_audio",MEDIA_GALLERY:"media_gallery",MEDIA_IMAGE:"media_image",MEDIA_VIDEO:"media_video",TEXT:"text",addWidget:function(e,t){var i,n=e.find("> .id_base").val();switch(n){case this.CUSTOM_HTML:i=s;break;case this.MEDIA_AUDIO:case this.MEDIA_GALLERY:case this.MEDIA_IMAGE:case this.MEDIA_VIDEO:i=l;break;case this.TEXT:i=o}i.addWidget(n,e,t)}};t.exports=n},{"./custom-html-widget":31,"./media-widget":33,"./text-widget":34}],33:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.mediaWidgets,o=l.controlConstructors[e];if(o){var n=l.modelConstructors[e]||l.MediaWidgetModel,a=t.find("> .widget-content"),r=s('<div class="media-widget-control"></div>');a.before(r);var d={};a.find(".media-widget-instance-property").each((function(){var e=s(this);d[e.data("property")]=e.val()})),d.widget_id=i;var h=new o({el:r,syncContainer:a,model:new n(d)});return h.render(),h}}};t.exports=l},{}],34:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.textWidgets,o={},n=t.find(".visual");if(n.length>0){if(!n.val())return null;var a=s("<div></div>"),r=t.find(".widget-content:first");r.before(a),o={el:a,syncContainer:r}}else o={el:t};var d=new l.TextWidgetControl(o),h=wp.oldEditor?wp.oldEditor:wp.editor;return h&&h.hasOwnProperty("autop")&&(wp.editor.autop=h.autop,wp.editor.removep=h.removep,wp.editor.initialize=h.initialize),d.initializeEditor(),d}};t.exports=l},{}]},{},[17]);
lang/siteorigin-panels.pot CHANGED
@@ -141,7 +141,7 @@ msgstr ""
141
  msgid "WordPress Widgets"
142
  msgstr ""
143
 
144
- #: inc/admin-widget-dialog.php:185, inc/settings.php:358
145
  msgid "Recommended Widgets"
146
  msgstr ""
147
 
@@ -157,367 +157,367 @@ msgstr ""
157
  msgid "Addons"
158
  msgstr ""
159
 
160
- #: inc/admin.php:179, inc/admin.php:591, inc/admin.php:1246, inc/admin.php:1251, inc/settings.php:201, tpl/js-templates.php:197
161
  msgid "Page Builder"
162
  msgstr ""
163
 
164
- #: inc/admin.php:331
165
  msgid "All Widgets"
166
  msgstr ""
167
 
168
- #: inc/admin.php:358
169
  msgid "Missing Widget"
170
  msgstr ""
171
 
172
- #: inc/admin.php:359
173
  msgid "Page Builder doesn't know about this widget."
174
  msgstr ""
175
 
176
  #. translators: Number of seconds since
177
- #: inc/admin.php:363
178
  msgid "%d seconds"
179
  msgstr ""
180
 
181
  #. translators: Number of minutes since
182
- #: inc/admin.php:365
183
  msgid "%d minutes"
184
  msgstr ""
185
 
186
  #. translators: Number of hours since
187
- #: inc/admin.php:367
188
  msgid "%d hours"
189
  msgstr ""
190
 
191
  #. translators: A single second since
192
- #: inc/admin.php:370
193
  msgid "%d second"
194
  msgstr ""
195
 
196
  #. translators: A single minute since
197
- #: inc/admin.php:372
198
  msgid "%d minute"
199
  msgstr ""
200
 
201
  #. translators: A single hour since
202
- #: inc/admin.php:374
203
  msgid "%d hour"
204
  msgstr ""
205
 
206
  #. translators: Time ago - eg. "1 minute before".
207
- #: inc/admin.php:377
208
  msgid "%s before"
209
  msgstr ""
210
 
211
- #: inc/admin.php:378
212
  msgid "Now"
213
  msgstr ""
214
 
215
- #: inc/admin.php:382
216
  msgid "Current"
217
  msgstr ""
218
 
219
- #: inc/admin.php:383
220
  msgid "Original"
221
  msgstr ""
222
 
223
- #: inc/admin.php:384
224
  msgid "Version restored"
225
  msgstr ""
226
 
227
- #: inc/admin.php:385
228
  msgid "Converted to editor"
229
  msgstr ""
230
 
231
  #. translators: Message displayed in the history when a widget is deleted
232
- #: inc/admin.php:389
233
  msgid "Widget deleted"
234
  msgstr ""
235
 
236
  #. translators: Message displayed in the history when a widget is added
237
- #: inc/admin.php:391
238
  msgid "Widget added"
239
  msgstr ""
240
 
241
  #. translators: Message displayed in the history when a widget is edited
242
- #: inc/admin.php:393
243
  msgid "Widget edited"
244
  msgstr ""
245
 
246
  #. translators: Message displayed in the history when a widget is duplicated
247
- #: inc/admin.php:395
248
  msgid "Widget duplicated"
249
  msgstr ""
250
 
251
  #. translators: Message displayed in the history when a widget position is changed
252
- #: inc/admin.php:397
253
  msgid "Widget moved"
254
  msgstr ""
255
 
256
  #. translators: Message displayed in the history when a row is deleted
257
- #: inc/admin.php:401
258
  msgid "Row deleted"
259
  msgstr ""
260
 
261
  #. translators: Message displayed in the history when a row is added
262
- #: inc/admin.php:403
263
  msgid "Row added"
264
  msgstr ""
265
 
266
  #. translators: Message displayed in the history when a row is edited
267
- #: inc/admin.php:405
268
  msgid "Row edited"
269
  msgstr ""
270
 
271
  #. translators: Message displayed in the history when a row position is changed
272
- #: inc/admin.php:407
273
  msgid "Row moved"
274
  msgstr ""
275
 
276
  #. translators: Message displayed in the history when a row is duplicated
277
- #: inc/admin.php:409
278
  msgid "Row duplicated"
279
  msgstr ""
280
 
281
  #. translators: Message displayed in the history when a row is pasted
282
- #: inc/admin.php:411
283
  msgid "Row pasted"
284
  msgstr ""
285
 
286
- #: inc/admin.php:414
287
  msgid "Cell resized"
288
  msgstr ""
289
 
290
- #: inc/admin.php:417
291
  msgid "Prebuilt layout loaded"
292
  msgstr ""
293
 
294
- #: inc/admin.php:421
295
  msgid "Loading prebuilt layout"
296
  msgstr ""
297
 
298
- #: inc/admin.php:422
299
  msgid "Would you like to copy this editor's existing content to Page Builder?"
300
  msgstr ""
301
 
302
- #: inc/admin.php:423
303
  msgid "Would you like to clear your Page Builder content and revert to using the standard visual editor?"
304
  msgstr ""
305
 
306
  #. translators: This is the title for a widget called "Layout Builder"
307
- #: inc/admin.php:425
308
  msgid "Layout Builder Widget"
309
  msgstr ""
310
 
311
  #. translators: A standard confirmation message
312
- #: inc/admin.php:427, tpl/js-templates.php:97, tpl/js-templates.php:422
313
  msgid "Are you sure?"
314
  msgstr ""
315
 
316
  #. translators: When a layout file is ready to be inserted. %s is the filename.
317
- #: inc/admin.php:429
318
  msgid "%s is ready to insert."
319
  msgstr ""
320
 
321
- #: inc/admin.php:433
322
  msgid "Add Widget Below"
323
  msgstr ""
324
 
325
- #: inc/admin.php:434
326
  msgid "Add Widget to Cell"
327
  msgstr ""
328
 
329
- #: inc/admin.php:435, tpl/js-templates.php:224
330
  msgid "Search Widgets"
331
  msgstr ""
332
 
333
- #: inc/admin.php:437, tpl/js-templates.php:17, tpl/js-templates.php:19
334
  msgid "Add Row"
335
  msgstr ""
336
 
337
- #: inc/admin.php:438
338
  msgid "Column"
339
  msgstr ""
340
 
341
- #: inc/admin.php:440
342
  msgid "Cell Actions"
343
  msgstr ""
344
 
345
- #: inc/admin.php:441
346
  msgid "Paste Widget"
347
  msgstr ""
348
 
349
- #: inc/admin.php:443
350
  msgid "Widget Actions"
351
  msgstr ""
352
 
353
- #: inc/admin.php:444
354
  msgid "Edit Widget"
355
  msgstr ""
356
 
357
- #: inc/admin.php:445
358
  msgid "Duplicate Widget"
359
  msgstr ""
360
 
361
- #: inc/admin.php:446
362
  msgid "Delete Widget"
363
  msgstr ""
364
 
365
- #: inc/admin.php:447
366
  msgid "Copy Widget"
367
  msgstr ""
368
 
369
- #: inc/admin.php:448
370
  msgid "Paste Widget Below"
371
  msgstr ""
372
 
373
- #: inc/admin.php:450
374
  msgid "Row Actions"
375
  msgstr ""
376
 
377
- #: inc/admin.php:451, tpl/js-templates.php:95
378
  msgid "Edit Row"
379
  msgstr ""
380
 
381
- #: inc/admin.php:452, tpl/js-templates.php:96
382
  msgid "Duplicate Row"
383
  msgstr ""
384
 
385
- #: inc/admin.php:453, tpl/js-templates.php:97
386
  msgid "Delete Row"
387
  msgstr ""
388
 
389
- #: inc/admin.php:454
390
  msgid "Copy Row"
391
  msgstr ""
392
 
393
- #: inc/admin.php:455
394
  msgid "Paste Row"
395
  msgstr ""
396
 
397
- #: inc/admin.php:457
398
  msgid "Draft"
399
  msgstr ""
400
 
401
- #: inc/admin.php:458
402
  msgid "Untitled"
403
  msgstr ""
404
 
405
- #: inc/admin.php:460
406
  msgid "New Row"
407
  msgstr ""
408
 
409
- #: inc/admin.php:461, inc/admin.php:469, inc/styles.php:193, tpl/js-templates.php:62
410
  msgid "Row"
411
  msgstr ""
412
 
413
- #: inc/admin.php:464
414
  msgid "Hmmm... Adding layout elements is not enabled. Please check if Page Builder has been configured to allow adding elements."
415
  msgstr ""
416
 
417
- #: inc/admin.php:465
418
  msgid "Add a {{%= items[0] %}} to get started."
419
  msgstr ""
420
 
421
- #: inc/admin.php:466
422
  msgid "Add a {{%= items[0] %}} or {{%= items[1] %}} to get started."
423
  msgstr ""
424
 
425
- #: inc/admin.php:467
426
  msgid "Add a {{%= items[0] %}}, {{%= items[1] %}} or {{%= items[2] %}} to get started."
427
  msgstr ""
428
 
429
- #: inc/admin.php:468, inc/styles.php:345, tpl/js-templates.php:61
430
  msgid "Widget"
431
  msgstr ""
432
 
433
- #: inc/admin.php:470, tpl/js-templates.php:63
434
  msgid "Prebuilt Layout"
435
  msgstr ""
436
 
437
- #: inc/admin.php:472
438
  msgid "Read our %s if you need help."
439
  msgstr ""
440
 
441
- #: inc/admin.php:473, tpl/js-templates.php:64
442
  msgid "documentation"
443
  msgstr ""
444
 
445
- #: inc/admin.php:482
446
  msgid "Page Builder layouts"
447
  msgstr ""
448
 
449
- #: inc/admin.php:483
450
  msgid "Error uploading or importing file."
451
  msgstr ""
452
 
453
- #: inc/admin.php:490
454
  msgid "Unknown error. Failed to load the form. Please check your internet connection, contact your web site administrator, or try again later."
455
  msgstr ""
456
 
457
  #. translators: This is the default name given to a user's home page
458
- #: inc/admin.php:674, inc/home.php:26
459
  msgid "Home Page"
460
  msgstr ""
461
 
462
- #: inc/admin.php:775
463
  msgid "Untitled Widget"
464
  msgstr ""
465
 
466
- #: inc/admin.php:955
467
  msgid "You need to install 1{%1$s} to use the widget 2{%2$s}."
468
  msgstr ""
469
 
470
- #: inc/admin.php:961
471
  msgid "Save and reload this page to start using the widget after you've installed it."
472
  msgstr ""
473
 
474
- #: inc/admin.php:977
475
  msgid "The widget 1{%1$s} is not available. Please try locate and install the missing plugin. Post on the 2{support forums} if you need help."
476
  msgstr ""
477
 
478
- #: inc/admin.php:1149, inc/styles-admin.php:23
479
  msgid "The supplied nonce is invalid."
480
  msgstr ""
481
 
482
- #: inc/admin.php:1150, inc/styles-admin.php:24
483
  msgid "Invalid nonce."
484
  msgstr ""
485
 
486
- #: inc/admin.php:1156
487
  msgid "Please specify the type of widget form to be rendered."
488
  msgstr ""
489
 
490
- #: inc/admin.php:1157
491
  msgid "Missing widget type."
492
  msgstr ""
493
 
494
- #: inc/admin.php:1264
495
  msgid "%s Widget"
496
  msgid_plural "%s Widgets"
497
  msgstr[0] ""
498
  msgstr[1] ""
499
 
500
- #: inc/admin.php:1307
501
  msgid "Get a lightbox addon for SiteOrigin widgets"
502
  msgstr ""
503
 
504
- #: inc/admin.php:1311
505
  msgid "Get the row, cell and widget animations addon"
506
  msgstr ""
507
 
508
- #: inc/admin.php:1315
509
  msgid "Get premium email support for SiteOrigin Page Builder"
510
  msgstr ""
511
 
512
- #: inc/admin.php:1500
513
  msgid "Toggle editor selection menu"
514
  msgstr ""
515
 
516
- #: inc/admin.php:1501, inc/admin.php:1548, inc/settings.php:201, settings/tpl/settings.php:9
517
  msgid "SiteOrigin Page Builder"
518
  msgstr ""
519
 
520
- #: inc/admin.php:1502
521
  msgid "Block Editor"
522
  msgstr ""
523
 
@@ -529,267 +529,283 @@ msgstr ""
529
  msgid "Page Builder Content"
530
  msgstr ""
531
 
532
- #: inc/settings.php:228
533
  msgid "Page Builder Settings"
534
  msgstr ""
535
 
536
- #: inc/settings.php:244
537
  msgid "General"
538
  msgstr ""
539
 
540
- #: inc/settings.php:250
541
  msgid "Post Types"
542
  msgstr ""
543
 
544
- #: inc/settings.php:252
545
  msgid "The post types on which to use Page Builder."
546
  msgstr ""
547
 
548
- #: inc/settings.php:257
549
  msgid "Use Classic Editor for New Posts"
550
  msgstr ""
551
 
552
- #: inc/settings.php:258
553
  msgid "New posts of the above Post Types will be created using the Classic Editor."
554
  msgstr ""
555
 
556
- #: inc/settings.php:263
557
  msgid "Live Editor Quick Link"
558
  msgstr ""
559
 
560
- #: inc/settings.php:264
561
  msgid "Display a Live Editor button in the admin bar."
562
  msgstr ""
563
 
564
- #: inc/settings.php:269
565
  msgid "Display Post State"
566
  msgstr ""
567
 
568
- #: inc/settings.php:271
569
  msgid "Display a %sSiteOrigin Page Builder%s post state in the admin lists of posts/pages to indicate Page Builder is active."
570
  msgstr ""
571
 
572
- #: inc/settings.php:279
573
  msgid "Display Widget Count"
574
  msgstr ""
575
 
576
- #: inc/settings.php:280
577
  msgid "Display a widget count in the admin lists of posts/pages where you're using Page Builder."
578
  msgstr ""
579
 
580
- #: inc/settings.php:285
581
  msgid "Limit Parallax Motion"
582
  msgstr ""
583
 
584
- #: inc/settings.php:286
585
  msgid "How many pixels of scrolling result in a single pixel of parallax motion. 0 means automatic. Lower values give more noticeable effect."
586
  msgstr ""
587
 
588
- #: inc/settings.php:291
589
  msgid "Disable Parallax On Mobile"
590
  msgstr ""
591
 
592
- #: inc/settings.php:292
593
  msgid "Disable row/widget background parallax when the browser is smaller than the mobile width."
594
  msgstr ""
595
 
596
- #: inc/settings.php:297
597
  msgid "Sidebars Emulator"
598
  msgstr ""
599
 
600
- #: inc/settings.php:298
601
  msgid "Page Builder will create an emulated sidebar, that contains all widgets in the page."
602
  msgstr ""
603
 
604
- #: inc/settings.php:303
605
  msgid "Upgrade Teaser"
606
  msgstr ""
607
 
608
- #: inc/settings.php:305
609
  msgid "Display the %sSiteOrigin Premium%s upgrade teaser in the Page Builder toolbar."
610
  msgstr ""
611
 
612
- #: inc/settings.php:313
613
  msgid "Default To Page Builder Interface"
614
  msgstr ""
615
 
616
- #: inc/settings.php:315
617
  msgid "New Classic Editor posts/pages that you create will start with the Page Builder loaded. The %s\"Use Classic Editor for new posts\"%s setting must be enabled."
618
  msgstr ""
619
 
620
- #: inc/settings.php:322
621
  msgid "Layout Block Default Mode"
622
  msgstr ""
623
 
624
- #: inc/settings.php:325, tpl/js-templates.php:141
625
  msgid "Edit"
626
  msgstr ""
627
 
628
- #: inc/settings.php:326
629
  msgid "Preview"
630
  msgstr ""
631
 
632
- #: inc/settings.php:328
633
  msgid "Whether to display layout blocks in edit mode or preview mode in the block editor."
634
  msgstr ""
635
 
636
- #: inc/settings.php:334
637
  msgid "Widgets"
638
  msgstr ""
639
 
640
- #: inc/settings.php:340
641
  msgid "Widget Title HTML"
642
  msgstr ""
643
 
644
- #: inc/settings.php:341
645
  msgid "The HTML used for widget titles. {{title}} is replaced with the widget title."
646
  msgstr ""
647
 
648
- #: inc/settings.php:346
649
  msgid "Add Widget Class"
650
  msgstr ""
651
 
652
- #: inc/settings.php:347
653
  msgid "Add the widget class to Page Builder widgets. Disable this if you're experiencing conflicts."
654
  msgstr ""
655
 
656
- #: inc/settings.php:352
657
  msgid "Legacy Bundled Widgets"
658
  msgstr ""
659
 
660
- #: inc/settings.php:353
661
  msgid "Load legacy widgets from Page Builder 1."
662
  msgstr ""
663
 
664
- #: inc/settings.php:359
665
  msgid "Display recommend widgets in Page Builder add widget dialog."
666
  msgstr ""
667
 
668
- #: inc/settings.php:364
669
  msgid "Instant Open Widgets"
670
  msgstr ""
671
 
672
- #: inc/settings.php:365
673
  msgid "Open a widget form as soon as its added to a page."
674
  msgstr ""
675
 
676
- #: inc/settings.php:371, inc/styles-admin.php:88
677
  msgid "Layout"
678
  msgstr ""
679
 
680
- #: inc/settings.php:379
681
  msgid "Responsive Layout"
682
  msgstr ""
683
 
684
- #: inc/settings.php:380
685
  msgid "Collapse widgets, rows and columns on mobile devices."
686
  msgstr ""
687
 
688
- #: inc/settings.php:385
689
  msgid "Use Tablet Layout"
690
  msgstr ""
691
 
692
- #: inc/settings.php:386
693
  msgid "Collapses columns differently on tablet devices."
694
  msgstr ""
695
 
696
- #: inc/settings.php:392
697
  msgid "Detect older browsers"
698
  msgstr ""
699
 
700
- #: inc/settings.php:393
701
  msgid "Never"
702
  msgstr ""
703
 
704
- #: inc/settings.php:394
705
  msgid "Always"
706
  msgstr ""
707
 
708
- #: inc/settings.php:396
709
  msgid "Use Legacy Layout Engine"
710
  msgstr ""
711
 
712
- #: inc/settings.php:397
713
  msgid "The CSS and HTML uses floats instead of flexbox for compatibility with very old browsers."
714
  msgstr ""
715
 
716
- #: inc/settings.php:403
717
  msgid "Tablet Width"
718
  msgstr ""
719
 
720
- #: inc/settings.php:404
721
  msgid "Device width, in pixels, to collapse into a tablet view ."
722
  msgstr ""
723
 
724
- #: inc/settings.php:410
725
  msgid "Mobile Width"
726
  msgstr ""
727
 
728
- #: inc/settings.php:411
729
  msgid "Device width, in pixels, to collapse into a mobile view ."
730
  msgstr ""
731
 
732
- #: inc/settings.php:417
733
  msgid "Row/Widget Bottom Margin"
734
  msgstr ""
735
 
736
- #: inc/settings.php:418
737
  msgid "Default margin below rows and widgets."
738
  msgstr ""
739
 
740
- #: inc/settings.php:424
741
  msgid "Row Mobile Bottom Margin"
742
  msgstr ""
743
 
744
- #: inc/settings.php:425
745
  msgid "The default margin below rows on mobile."
746
  msgstr ""
747
 
748
- #: inc/settings.php:430
749
  msgid "Last Row With Margin"
750
  msgstr ""
751
 
752
- #: inc/settings.php:431
753
  msgid "Allow margin in last row."
754
  msgstr ""
755
 
756
- #: inc/settings.php:437
757
  msgid "Row Gutter"
758
  msgstr ""
759
 
760
- #: inc/settings.php:438
761
  msgid "Default spacing between columns in each row."
762
  msgstr ""
763
 
764
- #: inc/settings.php:444
765
  msgid "Full Width Container"
766
  msgstr ""
767
 
768
- #: inc/settings.php:445
769
  msgid "The container used for the full width layout."
770
  msgstr ""
771
 
772
- #: inc/settings.php:452
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
773
  msgid "Content"
774
  msgstr ""
775
 
776
- #: inc/settings.php:458
777
  msgid "Copy Content"
778
  msgstr ""
779
 
780
- #: inc/settings.php:459
781
  msgid "Copy content from Page Builder to post content."
782
  msgstr ""
783
 
784
- #: inc/settings.php:464
785
  msgid "Copy Styles"
786
  msgstr ""
787
 
788
- #: inc/settings.php:465
789
  msgid "Include styles into your Post Content. This keeps page layouts, even when Page Builder is deactivated."
790
  msgstr ""
791
 
792
- #: inc/settings.php:518, inc/styles-admin.php:273
793
  msgid "Enabled"
794
  msgstr ""
795
 
141
  msgid "WordPress Widgets"
142
  msgstr ""
143
 
144
+ #: inc/admin-widget-dialog.php:185, inc/settings.php:359
145
  msgid "Recommended Widgets"
146
  msgstr ""
147
 
157
  msgid "Addons"
158
  msgstr ""
159
 
160
+ #: inc/admin.php:179, inc/admin.php:592, inc/admin.php:1253, inc/admin.php:1258, inc/settings.php:202, tpl/js-templates.php:197
161
  msgid "Page Builder"
162
  msgstr ""
163
 
164
+ #: inc/admin.php:332
165
  msgid "All Widgets"
166
  msgstr ""
167
 
168
+ #: inc/admin.php:359
169
  msgid "Missing Widget"
170
  msgstr ""
171
 
172
+ #: inc/admin.php:360
173
  msgid "Page Builder doesn't know about this widget."
174
  msgstr ""
175
 
176
  #. translators: Number of seconds since
177
+ #: inc/admin.php:364
178
  msgid "%d seconds"
179
  msgstr ""
180
 
181
  #. translators: Number of minutes since
182
+ #: inc/admin.php:366
183
  msgid "%d minutes"
184
  msgstr ""
185
 
186
  #. translators: Number of hours since
187
+ #: inc/admin.php:368
188
  msgid "%d hours"
189
  msgstr ""
190
 
191
  #. translators: A single second since
192
+ #: inc/admin.php:371
193
  msgid "%d second"
194
  msgstr ""
195
 
196
  #. translators: A single minute since
197
+ #: inc/admin.php:373
198
  msgid "%d minute"
199
  msgstr ""
200
 
201
  #. translators: A single hour since
202
+ #: inc/admin.php:375
203
  msgid "%d hour"
204
  msgstr ""
205
 
206
  #. translators: Time ago - eg. "1 minute before".
207
+ #: inc/admin.php:378
208
  msgid "%s before"
209
  msgstr ""
210
 
211
+ #: inc/admin.php:379
212
  msgid "Now"
213
  msgstr ""
214
 
215
+ #: inc/admin.php:383
216
  msgid "Current"
217
  msgstr ""
218
 
219
+ #: inc/admin.php:384
220
  msgid "Original"
221
  msgstr ""
222
 
223
+ #: inc/admin.php:385
224
  msgid "Version restored"
225
  msgstr ""
226
 
227
+ #: inc/admin.php:386
228
  msgid "Converted to editor"
229
  msgstr ""
230
 
231
  #. translators: Message displayed in the history when a widget is deleted
232
+ #: inc/admin.php:390
233
  msgid "Widget deleted"
234
  msgstr ""
235
 
236
  #. translators: Message displayed in the history when a widget is added
237
+ #: inc/admin.php:392
238
  msgid "Widget added"
239
  msgstr ""
240
 
241
  #. translators: Message displayed in the history when a widget is edited
242
+ #: inc/admin.php:394
243
  msgid "Widget edited"
244
  msgstr ""
245
 
246
  #. translators: Message displayed in the history when a widget is duplicated
247
+ #: inc/admin.php:396
248
  msgid "Widget duplicated"
249
  msgstr ""
250
 
251
  #. translators: Message displayed in the history when a widget position is changed
252
+ #: inc/admin.php:398
253
  msgid "Widget moved"
254
  msgstr ""
255
 
256
  #. translators: Message displayed in the history when a row is deleted
257
+ #: inc/admin.php:402
258
  msgid "Row deleted"
259
  msgstr ""
260
 
261
  #. translators: Message displayed in the history when a row is added
262
+ #: inc/admin.php:404
263
  msgid "Row added"
264
  msgstr ""
265
 
266
  #. translators: Message displayed in the history when a row is edited
267
+ #: inc/admin.php:406
268
  msgid "Row edited"
269
  msgstr ""
270
 
271
  #. translators: Message displayed in the history when a row position is changed
272
+ #: inc/admin.php:408
273
  msgid "Row moved"
274
  msgstr ""
275
 
276
  #. translators: Message displayed in the history when a row is duplicated
277
+ #: inc/admin.php:410
278
  msgid "Row duplicated"
279
  msgstr ""
280
 
281
  #. translators: Message displayed in the history when a row is pasted
282
+ #: inc/admin.php:412
283
  msgid "Row pasted"
284
  msgstr ""
285
 
286
+ #: inc/admin.php:415
287
  msgid "Cell resized"
288
  msgstr ""
289
 
290
+ #: inc/admin.php:418
291
  msgid "Prebuilt layout loaded"
292
  msgstr ""
293
 
294
+ #: inc/admin.php:422
295
  msgid "Loading prebuilt layout"
296
  msgstr ""
297
 
298
+ #: inc/admin.php:423
299
  msgid "Would you like to copy this editor's existing content to Page Builder?"
300
  msgstr ""
301
 
302
+ #: inc/admin.php:424
303
  msgid "Would you like to clear your Page Builder content and revert to using the standard visual editor?"
304
  msgstr ""
305
 
306
  #. translators: This is the title for a widget called "Layout Builder"
307
+ #: inc/admin.php:426
308
  msgid "Layout Builder Widget"
309
  msgstr ""
310
 
311
  #. translators: A standard confirmation message
312
+ #: inc/admin.php:428, tpl/js-templates.php:97, tpl/js-templates.php:422
313
  msgid "Are you sure?"
314
  msgstr ""
315
 
316
  #. translators: When a layout file is ready to be inserted. %s is the filename.
317
+ #: inc/admin.php:430
318
  msgid "%s is ready to insert."
319
  msgstr ""
320
 
321
+ #: inc/admin.php:434
322
  msgid "Add Widget Below"
323
  msgstr ""
324
 
325
+ #: inc/admin.php:435
326
  msgid "Add Widget to Cell"
327
  msgstr ""
328
 
329
+ #: inc/admin.php:436, tpl/js-templates.php:224
330
  msgid "Search Widgets"
331
  msgstr ""
332
 
333
+ #: inc/admin.php:438, tpl/js-templates.php:17, tpl/js-templates.php:19
334
  msgid "Add Row"
335
  msgstr ""
336
 
337
+ #: inc/admin.php:439
338
  msgid "Column"
339
  msgstr ""
340
 
341
+ #: inc/admin.php:441
342
  msgid "Cell Actions"
343
  msgstr ""
344
 
345
+ #: inc/admin.php:442
346
  msgid "Paste Widget"
347
  msgstr ""
348
 
349
+ #: inc/admin.php:444
350
  msgid "Widget Actions"
351
  msgstr ""
352
 
353
+ #: inc/admin.php:445
354
  msgid "Edit Widget"
355
  msgstr ""
356
 
357
+ #: inc/admin.php:446
358
  msgid "Duplicate Widget"
359
  msgstr ""
360
 
361
+ #: inc/admin.php:447
362
  msgid "Delete Widget"
363
  msgstr ""
364
 
365
+ #: inc/admin.php:448
366
  msgid "Copy Widget"
367
  msgstr ""
368
 
369
+ #: inc/admin.php:449
370
  msgid "Paste Widget Below"
371
  msgstr ""
372
 
373
+ #: inc/admin.php:451
374
  msgid "Row Actions"
375
  msgstr ""
376
 
377
+ #: inc/admin.php:452, tpl/js-templates.php:95
378
  msgid "Edit Row"
379
  msgstr ""
380
 
381
+ #: inc/admin.php:453, tpl/js-templates.php:96
382
  msgid "Duplicate Row"
383
  msgstr ""
384
 
385
+ #: inc/admin.php:454, tpl/js-templates.php:97
386
  msgid "Delete Row"
387
  msgstr ""
388
 
389
+ #: inc/admin.php:455
390
  msgid "Copy Row"
391
  msgstr ""
392
 
393
+ #: inc/admin.php:456
394
  msgid "Paste Row"
395
  msgstr ""
396
 
397
+ #: inc/admin.php:458
398
  msgid "Draft"
399
  msgstr ""
400
 
401
+ #: inc/admin.php:459
402
  msgid "Untitled"
403
  msgstr ""
404
 
405
+ #: inc/admin.php:461
406
  msgid "New Row"
407
  msgstr ""
408
 
409
+ #: inc/admin.php:462, inc/admin.php:470, inc/styles.php:193, tpl/js-templates.php:62
410
  msgid "Row"
411
  msgstr ""
412
 
413
+ #: inc/admin.php:465
414
  msgid "Hmmm... Adding layout elements is not enabled. Please check if Page Builder has been configured to allow adding elements."
415
  msgstr ""
416
 
417
+ #: inc/admin.php:466
418
  msgid "Add a {{%= items[0] %}} to get started."
419
  msgstr ""
420
 
421
+ #: inc/admin.php:467
422
  msgid "Add a {{%= items[0] %}} or {{%= items[1] %}} to get started."
423
  msgstr ""
424
 
425
+ #: inc/admin.php:468
426
  msgid "Add a {{%= items[0] %}}, {{%= items[1] %}} or {{%= items[2] %}} to get started."
427
  msgstr ""
428
 
429
+ #: inc/admin.php:469, inc/styles.php:345, tpl/js-templates.php:61
430
  msgid "Widget"
431
  msgstr ""
432
 
433
+ #: inc/admin.php:471, tpl/js-templates.php:63
434
  msgid "Prebuilt Layout"
435
  msgstr ""
436
 
437
+ #: inc/admin.php:473
438
  msgid "Read our %s if you need help."
439
  msgstr ""
440
 
441
+ #: inc/admin.php:474, tpl/js-templates.php:64
442
  msgid "documentation"
443
  msgstr ""
444
 
445
+ #: inc/admin.php:483
446
  msgid "Page Builder layouts"
447
  msgstr ""
448
 
449
+ #: inc/admin.php:484
450
  msgid "Error uploading or importing file."
451
  msgstr ""
452
 
453
+ #: inc/admin.php:491
454
  msgid "Unknown error. Failed to load the form. Please check your internet connection, contact your web site administrator, or try again later."
455
  msgstr ""
456
 
457
  #. translators: This is the default name given to a user's home page
458
+ #: inc/admin.php:675, inc/home.php:26
459
  msgid "Home Page"
460
  msgstr ""
461
 
462
+ #: inc/admin.php:776
463
  msgid "Untitled Widget"
464
  msgstr ""
465
 
466
+ #: inc/admin.php:956
467
  msgid "You need to install 1{%1$s} to use the widget 2{%2$s}."
468
  msgstr ""
469
 
470
+ #: inc/admin.php:962
471
  msgid "Save and reload this page to start using the widget after you've installed it."
472
  msgstr ""
473
 
474
+ #: inc/admin.php:978
475
  msgid "The widget 1{%1$s} is not available. Please try locate and install the missing plugin. Post on the 2{support forums} if you need help."
476
  msgstr ""
477
 
478
+ #: inc/admin.php:1156, inc/styles-admin.php:23
479
  msgid "The supplied nonce is invalid."
480
  msgstr ""
481
 
482
+ #: inc/admin.php:1157, inc/styles-admin.php:24
483
  msgid "Invalid nonce."
484
  msgstr ""
485
 
486
+ #: inc/admin.php:1163
487
  msgid "Please specify the type of widget form to be rendered."
488
  msgstr ""
489
 
490
+ #: inc/admin.php:1164
491
  msgid "Missing widget type."
492
  msgstr ""
493
 
494
+ #: inc/admin.php:1271
495
  msgid "%s Widget"
496
  msgid_plural "%s Widgets"
497
  msgstr[0] ""
498
  msgstr[1] ""
499
 
500
+ #: inc/admin.php:1314
501
  msgid "Get a lightbox addon for SiteOrigin widgets"
502
  msgstr ""
503
 
504
+ #: inc/admin.php:1318
505
  msgid "Get the row, cell and widget animations addon"
506
  msgstr ""
507
 
508
+ #: inc/admin.php:1322
509
  msgid "Get premium email support for SiteOrigin Page Builder"
510
  msgstr ""
511
 
512
+ #: inc/admin.php:1507
513
  msgid "Toggle editor selection menu"
514
  msgstr ""
515
 
516
+ #: inc/admin.php:1508, inc/admin.php:1555, inc/settings.php:202, settings/tpl/settings.php:9
517
  msgid "SiteOrigin Page Builder"
518
  msgstr ""
519
 
520
+ #: inc/admin.php:1509
521
  msgid "Block Editor"
522
  msgstr ""
523
 
529
  msgid "Page Builder Content"
530
  msgstr ""
531
 
532
+ #: inc/settings.php:229
533
  msgid "Page Builder Settings"
534
  msgstr ""
535
 
536
+ #: inc/settings.php:245
537
  msgid "General"
538
  msgstr ""
539
 
540
+ #: inc/settings.php:251
541
  msgid "Post Types"
542
  msgstr ""
543
 
544
+ #: inc/settings.php:253
545
  msgid "The post types on which to use Page Builder."
546
  msgstr ""
547
 
548
+ #: inc/settings.php:258
549
  msgid "Use Classic Editor for New Posts"
550
  msgstr ""
551
 
552
+ #: inc/settings.php:259
553
  msgid "New posts of the above Post Types will be created using the Classic Editor."
554
  msgstr ""
555
 
556
+ #: inc/settings.php:264
557
  msgid "Live Editor Quick Link"
558
  msgstr ""
559
 
560
+ #: inc/settings.php:265
561
  msgid "Display a Live Editor button in the admin bar."
562
  msgstr ""
563
 
564
+ #: inc/settings.php:270
565
  msgid "Display Post State"
566
  msgstr ""
567
 
568
+ #: inc/settings.php:272
569
  msgid "Display a %sSiteOrigin Page Builder%s post state in the admin lists of posts/pages to indicate Page Builder is active."
570
  msgstr ""
571
 
572
+ #: inc/settings.php:280
573
  msgid "Display Widget Count"
574
  msgstr ""
575
 
576
+ #: inc/settings.php:281
577
  msgid "Display a widget count in the admin lists of posts/pages where you're using Page Builder."
578
  msgstr ""
579
 
580
+ #: inc/settings.php:286
581
  msgid "Limit Parallax Motion"
582
  msgstr ""
583
 
584
+ #: inc/settings.php:287
585
  msgid "How many pixels of scrolling result in a single pixel of parallax motion. 0 means automatic. Lower values give more noticeable effect."
586
  msgstr ""
587
 
588
+ #: inc/settings.php:292
589
  msgid "Disable Parallax On Mobile"
590
  msgstr ""
591
 
592
+ #: inc/settings.php:293
593
  msgid "Disable row/widget background parallax when the browser is smaller than the mobile width."
594
  msgstr ""
595
 
596
+ #: inc/settings.php:298
597
  msgid "Sidebars Emulator"
598
  msgstr ""
599
 
600
+ #: inc/settings.php:299
601
  msgid "Page Builder will create an emulated sidebar, that contains all widgets in the page."
602
  msgstr ""
603
 
604
+ #: inc/settings.php:304
605
  msgid "Upgrade Teaser"
606
  msgstr ""
607
 
608
+ #: inc/settings.php:306
609
  msgid "Display the %sSiteOrigin Premium%s upgrade teaser in the Page Builder toolbar."
610
  msgstr ""
611
 
612
+ #: inc/settings.php:314
613
  msgid "Default To Page Builder Interface"
614
  msgstr ""
615
 
616
+ #: inc/settings.php:316
617
  msgid "New Classic Editor posts/pages that you create will start with the Page Builder loaded. The %s\"Use Classic Editor for new posts\"%s setting must be enabled."
618
  msgstr ""
619
 
620
+ #: inc/settings.php:323
621
  msgid "Layout Block Default Mode"
622
  msgstr ""
623
 
624
+ #: inc/settings.php:326, tpl/js-templates.php:141
625
  msgid "Edit"
626
  msgstr ""
627
 
628
+ #: inc/settings.php:327
629
  msgid "Preview"
630
  msgstr ""
631
 
632
+ #: inc/settings.php:329
633
  msgid "Whether to display layout blocks in edit mode or preview mode in the block editor."
634
  msgstr ""
635
 
636
+ #: inc/settings.php:335
637
  msgid "Widgets"
638
  msgstr ""
639
 
640
+ #: inc/settings.php:341
641
  msgid "Widget Title HTML"
642
  msgstr ""
643
 
644
+ #: inc/settings.php:342
645
  msgid "The HTML used for widget titles. {{title}} is replaced with the widget title."
646
  msgstr ""
647
 
648
+ #: inc/settings.php:347
649
  msgid "Add Widget Class"
650
  msgstr ""
651
 
652
+ #: inc/settings.php:348
653
  msgid "Add the widget class to Page Builder widgets. Disable this if you're experiencing conflicts."
654
  msgstr ""
655
 
656
+ #: inc/settings.php:353
657
  msgid "Legacy Bundled Widgets"
658
  msgstr ""
659
 
660
+ #: inc/settings.php:354
661
  msgid "Load legacy widgets from Page Builder 1."
662
  msgstr ""
663
 
664
+ #: inc/settings.php:360
665
  msgid "Display recommend widgets in Page Builder add widget dialog."
666
  msgstr ""
667
 
668
+ #: inc/settings.php:365
669
  msgid "Instant Open Widgets"
670
  msgstr ""
671
 
672
+ #: inc/settings.php:366
673
  msgid "Open a widget form as soon as its added to a page."
674
  msgstr ""
675
 
676
+ #: inc/settings.php:372, inc/styles-admin.php:88
677
  msgid "Layout"
678
  msgstr ""
679
 
680
+ #: inc/settings.php:380
681
  msgid "Responsive Layout"
682
  msgstr ""
683
 
684
+ #: inc/settings.php:381
685
  msgid "Collapse widgets, rows and columns on mobile devices."
686
  msgstr ""
687
 
688
+ #: inc/settings.php:386
689
  msgid "Use Tablet Layout"
690
  msgstr ""
691
 
692
+ #: inc/settings.php:387
693
  msgid "Collapses columns differently on tablet devices."
694
  msgstr ""
695
 
696
+ #: inc/settings.php:393
697
  msgid "Detect older browsers"
698
  msgstr ""
699
 
700
+ #: inc/settings.php:394
701
  msgid "Never"
702
  msgstr ""
703
 
704
+ #: inc/settings.php:395
705
  msgid "Always"
706
  msgstr ""
707
 
708
+ #: inc/settings.php:397
709
  msgid "Use Legacy Layout Engine"
710
  msgstr ""
711
 
712
+ #: inc/settings.php:398
713
  msgid "The CSS and HTML uses floats instead of flexbox for compatibility with very old browsers."
714
  msgstr ""
715
 
716
+ #: inc/settings.php:404
717
  msgid "Tablet Width"
718
  msgstr ""
719
 
720
+ #: inc/settings.php:405
721
  msgid "Device width, in pixels, to collapse into a tablet view ."
722
  msgstr ""
723
 
724
+ #: inc/settings.php:411
725
  msgid "Mobile Width"
726
  msgstr ""
727
 
728
+ #: inc/settings.php:412
729
  msgid "Device width, in pixels, to collapse into a mobile view ."
730
  msgstr ""
731
 
732
+ #: inc/settings.php:418
733
  msgid "Row/Widget Bottom Margin"
734
  msgstr ""
735
 
736
+ #: inc/settings.php:419
737
  msgid "Default margin below rows and widgets."
738
  msgstr ""
739
 
740
+ #: inc/settings.php:425
741
  msgid "Row Mobile Bottom Margin"
742
  msgstr ""
743
 
744
+ #: inc/settings.php:426
745
  msgid "The default margin below rows on mobile."
746
  msgstr ""
747
 
748
+ #: inc/settings.php:431
749
  msgid "Last Row With Margin"
750
  msgstr ""
751
 
752
+ #: inc/settings.php:432
753
  msgid "Allow margin in last row."
754
  msgstr ""
755
 
756
+ #: inc/settings.php:438
757
  msgid "Row Gutter"
758
  msgstr ""
759
 
760
+ #: inc/settings.php:439
761
  msgid "Default spacing between columns in each row."
762
  msgstr ""
763
 
764
+ #: inc/settings.php:445
765
  msgid "Full Width Container"
766
  msgstr ""
767
 
768
+ #: inc/settings.php:446
769
  msgid "The container used for the full width layout."
770
  msgstr ""
771
 
772
+ #: inc/settings.php:453
773
+ msgid "Automatic"
774
+ msgstr ""
775
+
776
+ #: inc/settings.php:454
777
+ msgid "Header"
778
+ msgstr ""
779
+
780
+ #: inc/settings.php:455
781
+ msgid "Footer"
782
+ msgstr ""
783
+
784
+ #: inc/settings.php:457
785
+ msgid "Page Builder Layout CSS Output Location"
786
+ msgstr ""
787
+
788
+ #: inc/settings.php:463
789
  msgid "Content"
790
  msgstr ""
791
 
792
+ #: inc/settings.php:469
793
  msgid "Copy Content"
794
  msgstr ""
795
 
796
+ #: inc/settings.php:470
797
  msgid "Copy content from Page Builder to post content."
798
  msgstr ""
799
 
800
+ #: inc/settings.php:475
801
  msgid "Copy Styles"
802
  msgstr ""
803
 
804
+ #: inc/settings.php:476
805
  msgid "Include styles into your Post Content. This keeps page layouts, even when Page Builder is deactivated."
806
  msgstr ""
807
 
808
+ #: inc/settings.php:529, inc/styles-admin.php:273
809
  msgid "Enabled"
810
  msgstr ""
811
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Tags: page builder, responsive, widget, widgets, builder, page, admin, gallery,
3
  Requires at least: 4.7
4
  Tested up to: 5.5
5
  Requires PHP: 5.6.20
6
- Stable tag: 2.11.5
7
- Build time: 2020-09-30T21:30:54+02:00
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
  Donate link: https://siteorigin.com/downloads/premium/
@@ -97,6 +97,14 @@ We've tried to ensure that Page Builder is compatible with most plugin widgets.
97
 
98
  == Changelog ==
99
 
 
 
 
 
 
 
 
 
100
  = 2.11.5 - 30 September 2020 =
101
  * Updated build scripts.
102
 
3
  Requires at least: 4.7
4
  Tested up to: 5.5
5
  Requires PHP: 5.6.20
6
+ Stable tag: 2.11.6
7
+ Build time: 2020-12-01T20:33:35+02:00
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
  Donate link: https://siteorigin.com/downloads/premium/
97
 
98
  == Changelog ==
99
 
100
+ = 2.11.6 - 01 December 2020 =
101
+ * New: `Page Builder Layout CSS Output Location` setting that controls where PB outputs its CSS. Located at `Settings > Page Builder > Layout`.
102
+ * SEO: Improved content analysis process for slower servers and connections.
103
+ * SEO: Excluded `<iframe>, <script>, <link>, <style>` from content analysis due to word count inflation.
104
+ * Developer: Added `wp-color-picker` as an editor dependency.
105
+ * Developer: Introduced a new Ajax Response filter `siteorigin_panels_layouts_result`.
106
+ * Developer: Standardized SO Layout Block variables to avoid conflicts with other blocks.
107
+
108
  = 2.11.5 - 30 September 2020 =
109
  * Updated build scripts.
110
 
siteorigin-panels.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Page Builder by SiteOrigin
4
  Plugin URI: https://siteorigin.com/page-builder/
5
  Description: A drag and drop, responsive page builder that simplifies building your website.
6
- Version: 2.11.5
7
  Author: SiteOrigin
8
  Author URI: https://siteorigin.com
9
  License: GPL3
@@ -11,7 +11,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
11
  Donate link: http://siteorigin.com/page-builder/#donate
12
  */
13
 
14
- define( 'SITEORIGIN_PANELS_VERSION', '2.11.5' );
15
  if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
16
  define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
17
  }
3
  Plugin Name: Page Builder by SiteOrigin
4
  Plugin URI: https://siteorigin.com/page-builder/
5
  Description: A drag and drop, responsive page builder that simplifies building your website.
6
+ Version: 2.11.6
7
  Author: SiteOrigin
8
  Author URI: https://siteorigin.com
9
  License: GPL3
11
  Donate link: http://siteorigin.com/page-builder/#donate
12
  */
13
 
14
+ define( 'SITEORIGIN_PANELS_VERSION', '2.11.6' );
15
  if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
16
  define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
17
  }
tpl/metabox-panels.php CHANGED
@@ -3,11 +3,13 @@ global $post;
3
  $builder_id = uniqid();
4
  $builder_type = apply_filters( 'siteorigin_panels_post_builder_type', 'editor_attached', $post, $panels_data );
5
  $builder_supports = apply_filters( 'siteorigin_panels_builder_supports', array(), $post, $panels_data );
 
6
  ?>
7
 
8
  <div id="siteorigin-panels-metabox"
9
  data-builder-type="<?php echo esc_attr( $builder_type ) ?>"
10
  data-preview-url="<?php echo SiteOrigin_Panels::preview_url() ?>"
 
11
  data-builder-supports="<?php echo esc_attr( json_encode( $builder_supports ) ) ?>"
12
  <?php if( !empty( $_GET['so_live_editor'] ) ) echo 'data-live-editor="1"' ?>
13
  >
3
  $builder_id = uniqid();
4
  $builder_type = apply_filters( 'siteorigin_panels_post_builder_type', 'editor_attached', $post, $panels_data );
5
  $builder_supports = apply_filters( 'siteorigin_panels_builder_supports', array(), $post, $panels_data );
6
+ $preview = SiteOrigin_Panels_Admin::single()->generate_panels_preview( $post->ID, $panels_data );
7
  ?>
8
 
9
  <div id="siteorigin-panels-metabox"
10
  data-builder-type="<?php echo esc_attr( $builder_type ) ?>"
11
  data-preview-url="<?php echo SiteOrigin_Panels::preview_url() ?>"
12
+ data-preview-markup="<?php echo esc_attr( json_encode( $preview ) ); ?>"
13
  data-builder-supports="<?php echo esc_attr( json_encode( $builder_supports ) ) ?>"
14
  <?php if( !empty( $_GET['so_live_editor'] ) ) echo 'data-live-editor="1"' ?>
15
  >