| 1 |
(()=>{var e,t,n,o,i={1973(e,t,n){e=n.nmd(e),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,o){"string"==typeof e?(2==arguments.length&&(o=n),t.modules[e]||(t.payloads[e]=o,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n,o,i=function(e,t,n){if("string"==typeof t){var o=r(e,t);if(null!=o)return n&&n(),o}else if("[object Array]"===Object.prototype.toString.call(t)){for(var i=[],a=0,l=t.length;a<l;++a){var c=r(e,t[a]);if(null==c&&s.original)return;i.push(c)}return n&&n.apply(null,i)||!0}},s=function(e,t){var n=i("",e,t);return null==n&&s.original?s.original.apply(this,arguments):n},a=function(e,t){if(-1!==t.indexOf("!")){var n=t.split("!");return a(e,n[0])+"!"+a(e,n[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&o!=t;){var o=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},r=function(e,n){n=a(e,n);var o=t.modules[n];if(!o){if("function"==typeof(o=t.payloads[n])){var s={},r={id:n,uri:"",exports:s,packaged:!0};s=o((function(e,t){return i(n,e,t)}),s,r)||r.exports,t.modules[n]=s,delete t.payloads[n]}o=t.modules[n]=s||o}return o};o=e,(n="ace")&&(e[n]||(e[n]={}),o=e[n]),o.define&&o.define.packaged||(t.original=o.define,o.define=t,o.define.packaged=!0),o.require&&o.require.packaged||(s.original=o.require,o.require=s,o.require.packaged=!0)}(),ace.define("ace/lib/es6-shim",["require","exports","module"],(function(e,t,n){function o(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||o(String.prototype,"startsWith",(function(e,t){return t=t||0,this.lastIndexOf(e,t)===t})),String.prototype.endsWith||o(String.prototype,"endsWith",(function(e,t){var n=this;(void 0===t||t>n.length)&&(t=n.length),t-=e.length;var o=n.indexOf(e,t);return-1!==o&&o===t})),String.prototype.repeat||o(String.prototype,"repeat",(function(e){for(var t="",n=this;e>0;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t})),String.prototype.includes||o(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var o=arguments[n];null!=o&&Object.keys(o).forEach((function(e){t[e]=o[e]}))}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map((function(t){return e[t]}))}),Array.prototype.find||o(Array.prototype,"find",(function(e){for(var t=this.length,n=arguments[1],o=0;o<t;o++){var i=this[o];if(e.call(n,i,o,this))return i}})),Array.prototype.findIndex||o(Array.prototype,"findIndex",(function(e){for(var t=this.length,n=arguments[1],o=0;o<t;o++){var i=this[o];if(e.call(n,i,o,this))return o}})),Array.prototype.includes||o(Array.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Array.prototype.fill||o(Array.prototype,"fill",(function(e){for(var t=this,n=t.length>>>0,o=0|arguments[1],i=o<0?Math.max(n+o,0):Math.min(o,n),s=arguments[2],a=void 0===s?n:0|s,r=a<0?Math.max(n+a,0):Math.min(a,n);i<r;)t[i]=e,i++;return t})),Array.of||o(Array,"of",(function(){return Array.prototype.slice.call(arguments)}))})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],(function(e,t,n){"use strict";e("./es6-shim")})),ace.define("ace/lib/deep_copy",["require","exports","module"],(function(e,t,n){t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var o=0;o<t.length;o++)n[o]=e(t[o]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var o in n={},t)n[o]=e(t[o]);return n}})),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],(function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var o=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(o,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,o=e.length;n<o;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,(function(e){n.push({offset:arguments[arguments.length-2],length:e.length})})),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},o=function(e){return o.cancel(),t=setTimeout(n,e||0),o};return o.schedule=o,o.call=function(){return this.cancel(),e(),o},o.cancel=function(){return clearTimeout(t),t=null,o},o.isPending=function(){return t},o},t.delayedCall=function(e,t){var n=null,o=function(){n=null,e()},i=function(e){null==n&&(n=setTimeout(o,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(o,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(e){return!1}return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var o="object"==typeof navigator?navigator:{},i=(/mac|win|linux/i.exec(o.platform)||["other"])[0].toLowerCase(),s=o.userAgent||"",a=o.appName||"";t.isWin="win"==i,t.isMac="mac"==i,t.isLinux="linux"==i,t.isIE="Microsoft Internet Explorer"==a||a.indexOf("MSAppHost")>=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=s.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,t.isSafari=parseFloat(s.split(" Safari/")[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(s.split(" Edge/")[1])||void 0,t.isAIR=s.indexOf("AdobeAIR")>=0,t.isAndroid=s.indexOf("Android")>=0,t.isChromeOS=s.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var o,i=e("./useragent");t.buildDom=function e(t,n,o){if("string"==typeof t&&t){var i=document.createTextNode(t);return n&&n.appendChild(i),i}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var s=[],a=0;a<t.length;a++){var r=e(t[a],n,o);r&&s.push(r)}return s}var l=document.createElement(t[0]),c=t[1],d=1;for(c&&"object"==typeof c&&!Array.isArray(c)&&(d=2),a=d;a<t.length;a++)e(t[a],l,o);return 2==d&&Object.keys(c).forEach((function(e){var t=c[e];"class"===e?l.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?l[e]=t:"ref"===e?o&&(o[t]=l):"style"===e?"string"==typeof t&&(l.style.cssText=t):null!=t&&l.setAttribute(e,t)})),n&&n.appendChild(l),l},t.getDocumentHead=function(e){return e||(e=document), |
| 2 |
e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var o=n.indexOf(t);if(-1==o)break;n.splice(o,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),o=!0;;){var i=n.indexOf(t);if(-1==i)break;o=!1,n.splice(i,1)}return o&&n.push(t),e.className=n.join(" "),o},t.setCssClass=function(e,n,o){o?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,o=0;if(n=(t=t||document).querySelectorAll("style"))for(;o<n.length;)if(n[o++].id===e)return!0},t.removeElementById=function(e,t){(t=t||document).getElementById(e)&&t.getElementById(e).remove()};var s=[];function a(){var e=s;s=null,e&&e.forEach((function(e){r(e[0],e[1])}))}function r(e,n,i){if("undefined"!=typeof document){if(s)if(i)a();else if(!1===i)return s.push([e,n]);if(!o){var r=i;i&&i.getRootNode&&(r=i.getRootNode())&&r!=i||(r=document);var l=r.ownerDocument||r;if(n&&t.hasCssString(n,r))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var c=t.createElement("style");c.appendChild(l.createTextNode(e)),n&&(c.id=n),r==l&&(r=t.getDocumentHead(l)),r.insertBefore(c,r.firstChild)}}}if(t.useStrictCSP=function(e){o=e,0==e?a():s||(s=[])},t.importCssString=r,t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var o=t.createElement("ace_outer"),i=o.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",o.appendChild(n);var s=e&&e.documentElement||document&&document.documentElement;if(!s)return 0;s.appendChild(o);var a=n.offsetWidth;i.overflow="scroll";var r=n.offsetWidth;return a===r&&(r=o.clientWidth),s.removeChild(o),a-r},t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!i.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,i.isChromeOS&&(t.HI_DPI=!1),"undefined"!=typeof document){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),i.isEdge||void 0===l.style.animationName||(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var o=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=o.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){!n&&i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(i=i.onload=i.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){"use strict";var o={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};o._emit=o._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],o=this._defaultHandlers[e];if(n.length||o){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var a=0;a<n.length&&(n[a](t,this),!t.propagationStopped);a++);return o&&!t.defaultPrevented?o(t,this):void 0}},o._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var o=0;o<n.length;o++)n[o](t,this)}},o.once=function(e,t){var n=this;if(this.on(e,(function o(){n.off(e,o),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},o.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var o=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(o);var s=i.indexOf(t);-1!=s&&i.splice(s,1)}n[e]=t},o.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var o=n._disabled_[e];if(n[e]==t)o&&this.setDefaultHandler(e,o.pop());else if(o){var i=o.indexOf(t);-1!=i&&o.splice(i,1)}}},o.on=o.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[e];return o||(o=this._eventRegistry[e]=[]),-1==o.indexOf(t)&&o[n?"unshift":"push"](t),t},o.off=o.removeListener=o.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var o=n.indexOf(t);-1!==o&&n.splice(o,1)}},o.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=o})),ace.define("ace/lib/report_error",["require","exports","module"],(function(e,t,n){t.reportError=function(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout((function(){throw n}))}})),ace.define("ace/lib/default_english_messages",["require","exports","module"],(function(e,t,n){t.defaultEnglishMessages={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code", |
| 3 |
"gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"}})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],(function(e,t,n){var o,i,s=e("./oop"),a=e("./event_emitter").EventEmitter,r=e("./report_error").reportError,l=e("./default_english_messages").defaultEnglishMessages,c={setOptions:function(e){Object.keys(e).forEach((function(t){this.setOption(t,e[t])}),this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(t=e,e=Object.keys(t));else{var n=this.$options;e=Object.keys(n).filter((function(e){return!n[e].hidden}))}return e.forEach((function(e){t[e]=this.getOption(e)}),this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return d('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:d('misspelled option "'+e+'"')}};function d(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}var u=function(){function e(){this.$defaultOptions={},o=l,i="dollarSigns"}return e.prototype.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach((function(t){var o=n[t];"string"==typeof o&&(o={forwardTo:o}),o.name||(o.name=t),e.$options[o.name]=o,"initialValue"in o&&(e["$"+o.name]=o.initialValue)})),s.implement(e,c),this},e.prototype.resetOptions=function(e){Object.keys(e.$options).forEach((function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)}))},e.prototype.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var o=this.$defaultOptions[e]||(this.$defaultOptions[e]={});o[t]&&(o.forwardTo?this.setDefaultValue(o.forwardTo,t,n):o[t].value=n)},e.prototype.setDefaultValues=function(e,t){Object.keys(t).forEach((function(n){this.setDefaultValue(e,n,t[n])}),this)},e.prototype.setMessages=function(e,t){o=e,t&&t.placeholders&&(i=t.placeholders)},e.prototype.nls=function(e,t,n){o[e]||(d("No message found for the key '"+e+"' in messages with id "+o.$id+", trying to find a translation for the default string '"+t+"'."),o[t]||d("No message found for the default string '"+t+"' in the provided messages. Falling back to the default English message."));var s=o[e]||o[t]||t;return n&&("dollarSigns"===i&&(s=s.replace(/\$(\$|[\d]+)/g,(function(e,t){return"$"==t?"$":n[t]}))),"curlyBrackets"===i&&(s=s.replace(/\{([^\}]+)\}/g,(function(e,t){return n[t]})))),s},e}();u.prototype.warn=d,u.prototype.reportError=r,s.implement(u.prototype,a),t.AppConfig=u})),ace.define("ace/theme/textmate-css",["require","exports","module"],(function(e,t,n){n.exports='.ace-tm .ace_gutter {\n background: #f0f0f0;\n color: #333;\n}\n\n.ace-tm .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-tm {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-tm .ace_cursor {\n color: black;\n}\n \n.ace-tm .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'})),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("./textmate-css"),t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],(function(e,t,n){var o=e("./lib/lang"),i=e("./lib/net"),s=e("./lib/dom"),a=e("./lib/app_config").AppConfig;n.exports=t=new a;var r,l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};t.get=function(e){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return l[e]},t.set=function(e,t){if(l.hasOwnProperty(e))l[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e) |
| 4 |
;"useStrictCSP"==e&&s.useStrictCSP(t)},t.all=function(){return o.copyObject(l)},t.$modes={},t.moduleUrl=function(e,t){if(l.$moduleUrls[e])return l.$moduleUrls[e];var n=e.split("/"),o="snippets"==(t=t||n[n.length-2]||"")?"/":"-",i=n[n.length-1];if("worker"==t&&"-"==o){var s=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");i=i.replace(s,"")}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var a=l[t+"Path"];return null==a?a=l.basePath:"/"==o&&(t=o=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+o+i+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.setLoader=function(e){r=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(n,o){var s;if(Array.isArray(n))var a=n[0],l=n[1];else"string"==typeof n&&(l=n);var d=function(n){if(n&&!t.$loading[l])return o&&o(n);if(t.$loading[l]||(t.$loading[l]=[]),t.$loading[l].push(o),!(t.$loading[l].length>1)){var s=function(){!function(t,n){"ace/theme/textmate"===t||"./theme/textmate"===t?n(0,e("./theme/textmate")):r?r(t,n):console.error("loader is not configured")}(l,(function(e,n){n&&(t.$loaded[l]=n),t._emit("load.module",{name:l,module:n});var o=t.$loading[l];t.$loading[l]=null,o.forEach((function(e){e&&e(n)}))}))};if(!t.get("packaged"))return s();i.loadScript(t.moduleUrl(l,a),s),c()}};if(t.dynamicModules[l])t.dynamicModules[l]().then((function(e){e.default?d(e.default):d(e)}));else{try{s=this.$require(l)}catch(e){}d(s||t.$loaded[l])}},t.$require=function(e){if("function"==typeof n.require)return n.require(e)},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n};var c=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};t.version="1.39.1"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,o){"use strict";e("./lib/fixoldbrowsers");var i=e("./config");i.setLoader((function(t,n){e([t],(function(e){n(null,e)}))}));var s=function(){return this||"undefined"!=typeof window&&window}();function a(t){if(s&&s.document){i.set("packaged",t||e.packaged||o.packaged||s.define&&n.amdD.packaged);var a={},r="",l=document.currentScript||document._currentScript,c=l&&l.ownerDocument||document;l&&l.src&&(r=l.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var d,u=c.getElementsByTagName("script"),p=0;p<u.length;p++){var h=u[p],g=h.src||h.getAttribute("src");if(g){for(var m=h.attributes,b=0,f=m.length;b<f;b++){var x=m[b];0===x.name.indexOf("data-ace-")&&(a[(d=x.name.replace(/^data-ace-/,""),d.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=x.value)}var y=g.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);y&&(r=y[1])}}for(var v in r&&(a.base=a.base||r,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base,a)void 0!==a[v]&&i.set(v,a[v])}}o.exports=function(t){i.init=a,i.$require=e,t.require=e,t.define=n.amdD},a(!0)})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var o=function(){function e(e,t,n,o){this.start={row:e,column:t},this.end={row:n,column:o}}return e.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},e.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,n=e.end,o=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(o.row,o.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(o.row,o.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var o={row:n+1,column:0};else this.end.row<t&&(o={row:t,column:0});if(this.start.row>n)var i={row:n+1,column:0};else this.start.row<t&&(i={row:t,column:0});return e.fromPoints(i||this.start,o||this.end)},e.prototype.extend=function(t,n){var o=this.compare(t,n);if(0==o)return this;if(-1==o)var i={row:t,column:n};else var s={row:t,column:n};return e.fromPoints(i||this.start,s||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return 0==this.end.column?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),o=t.documentToScreenPosition(this.end);return new e(n.row,n.column,o.row,o.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();o.fromPoints=function(e,t){return new o(e.row,e.column,t.row,t.column)},o.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=o})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";for(var o=e("./oop"),i={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},s={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},a=0;a<10;a++)s["Digit"+a]=48+a,s["Numpad"+a]=96+a,i.PRINTABLE_KEYS[48+a]=""+a, |
| 5 |
i.FUNCTION_KEYS[96+a]="Numpad"+a;for(a=65;a<91;a++){var r=String.fromCharCode(a+32);s["Key"+r.toUpperCase()]=a,i.PRINTABLE_KEYS[a]=r}for(a=1;a<13;a++)s["F"+a]=111+a,i.FUNCTION_KEYS[111+a]="F"+a;var l={Shift:16,Control:17,Alt:18,Meta:224};for(var c in l)s[c]=s[c+"Left"]=s[c+"Right"]=l[c];for(var d in t.$codeToKeyCode=s,i.PRINTABLE_KEYS[173]="-",i.FUNCTION_KEYS){var u=i.FUNCTION_KEYS[d].toLowerCase();i[u]=parseInt(d,10)}for(var d in i.PRINTABLE_KEYS)u=i.PRINTABLE_KEYS[d].toLowerCase(),i[u]=parseInt(d,10);o.mixin(i,i.MODIFIER_KEYS),o.mixin(i,i.PRINTABLE_KEYS),o.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)i.KEY_MODS[t]=e.filter((function(e){return t&i.KEY_MODS[e]})).join("-")+"-"}(),i.KEY_MODS[0]="",i.KEY_MODS[-1]="input-",o.mixin(t,i),t.default=t,t.keyCodeToString=function(e){var t=i[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var o,i=e("./keys"),s=e("./useragent"),a=null,r=0;function l(){return null==o&&function(){o=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){return o={passive:!1},!0}})}catch(e){}}(),o}function c(e,t,n){this.elem=e,this.type=t,this.callback=n}c.prototype.destroy=function(){u(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var d=t.addListener=function(e,t,n,o){e.addEventListener(t,n,l()),o&&o.$toDestroy.push(new c(e,t,n))},u=t.removeListener=function(e,t,n){e.removeEventListener(t,n,l())};function p(e){return(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}function h(){a=Object.create(null)}if(t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||s.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var o=e&&e.ownerDocument||document;function i(e){t&&t(e),n&&n(e),u(o,"mousemove",t),u(o,"mouseup",i),u(o,"dragstart",i)}return d(o,"mousemove",t),d(o,"mouseup",i),d(o,"dragstart",i),i},t.addMouseWheelListener=function(e,t,n){d(e,"wheel",(function(e){var n=e.deltaX||0,o=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.15*n,e.wheelY=.15*o;break;case e.DOM_DELTA_LINE:e.wheelX=15*n,e.wheelY=15*o;break;case e.DOM_DELTA_PAGE:e.wheelX=150*n,e.wheelY=150*o}t(e)}),n)},t.addMultiMouseDownListener=function(e,n,o,i,a){var r,l,c,u=0,p={2:"dblclick",3:"tripleclick",4:"quadclick"};function h(e){if(0!==t.getButton(e)?u=0:e.detail>1?++u>4&&(u=1):u=1,s.isIE){var a=Math.abs(e.clientX-r)>5||Math.abs(e.clientY-l)>5;c&&!a||(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[u-1]||600),1==u&&(r=e.clientX,l=e.clientY)}if(e._clicks=u,o[i]("mousedown",e),u>4)u=0;else if(u>1)return o[i](p[u],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){d(e,"mousedown",h,a)}))},t.getModifierString=function(e){return i.KEY_MODS[p(e)]},t.addCommandKeyListener=function(e,n,o){var l=null;d(e,"keydown",(function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=function(e,t,n){var o=p(t);if(!n&&t.code&&(n=i.$codeToKeyCode[t.code]||n),!s.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(o|=8),a.altGr){if(!(3&~o))return;a.altGr=0}if(18===n||17===n){var l=t.location;17===n&&1===l?1==a[n]&&(r=t.timeStamp):18===n&&3===o&&2===l&&t.timeStamp-r<50&&(a.altGr=!0)}}if(n in i.MODIFIER_KEYS&&(n=-1),o||13!==n||3!==t.location||(e(t,o,-n),!t.defaultPrevented)){if(s.isChromeOS&&8&o){if(e(t,o,n),t.defaultPrevented)return;o&=-9}return!!(o||n in i.FUNCTION_KEYS||n in i.PRINTABLE_KEYS)&&e(t,o,n)}}(n,e,e.keyCode);return l=e.defaultPrevented,t}),o),d(e,"keypress",(function(e){l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),l=null)}),o),d(e,"keyup",(function(e){a[e.keyCode]=null}),o),a||(h(),d(window,"focus",h))},"object"==typeof window&&window.postMessage&&!s.isOldIE){var g=1;t.nextTick=function(e,n){n=n||window;var o="zero-timeout-message-"+g++,i=function(s){s.data==o&&(t.stopPropagation(s),u(n,"message",i),e())};d(n,"message",i),n.postMessage(o,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,n){"use strict";var o;n.exports={lineMode:!1,pasteCancelled:function(){return!!(o&&o>Date.now()-50)||(o=!1)},cancel:function(){o=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var o,i=e("../lib/event"),s=e("../config").nls,a=e("../lib/useragent"),r=e("../lib/dom"),l=e("../lib/lang"),c=e("../clipboard"),d=a.isChrome<18,u=a.isIE,p=a.isChrome>63,h=400,g=e("../lib/keys"),m=g.KEY_MODS,b=a.isIOS,f=b?/\s/:/\n/,x=a.isMobile;o=function(e,t){var n=r.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck","false"),n.style.opacity="0",e.insertBefore(n,e.firstChild);var o=!1,y=!1,v=!1,k=!1,w="";x||(n.style.fontSize="1px");var _=!1,C=!1,j="",$=0,S=0,T=0,M=Number.MAX_SAFE_INTEGER,N=Number.MIN_SAFE_INTEGER,L=0;try{var E=document.activeElement===n}catch(e){}this.setNumberOfExtraLines=function(e){M=Number.MAX_SAFE_INTEGER,N=Number.MIN_SAFE_INTEGER,L=e<0?0:e},this.setAriaLabel=function(){var e="";if(t.$textInputAriaLabel&&(e+="".concat(t.$textInputAriaLabel,", ")),t.session){var o=t.session.selection.cursor.row;e+=s("text-input.aria-label","Cursor at row $0",[o+1])}n.setAttribute("aria-label",e)},this.setAriaOptions=function(e){e.activeDescendant?(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-autocomplete",e.inline?"both":"list"),n.setAttribute("aria-activedescendant",e.activeDescendant)):(n.setAttribute("aria-haspopup","false"),n.setAttribute("aria-autocomplete","both"),n.removeAttribute("aria-activedescendant")),e.role&&n.setAttribute("role",e.role),e.setLabel&&(n.setAttribute("aria-roledescription",s("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),i.addListener(n,"blur",(function(e){C||(t.onBlur(e),E=!1)}),t),i.addListener(n,"focus",(function(e){if(!C){if(E=!0,a.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),a.isEdge?setTimeout(A):A()}}),t),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:t.renderer.enableKeyboardAccessibility}),w||p||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var o=0!=n.getBoundingClientRect().top}catch(e){return}var i=[];if(o)for(var s=n.parentElement;s&&1==s.nodeType;)i.push(s),s.setAttribute("ace_nocontext","true"),s=!s.parentElement&&s.getRootNode?s.getRootNode().host:s.parentElement;n.focus({preventScroll:!0}),o&&i.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return E},t.on("beforeEndOperation",(function(){var e=t.curOp,o=e&&e.command&&e.command.name;if("insertstring"!=o){ |
| 6 |
var i=o&&(e.docChanged||e.selectionChanged);v&&i&&(j=n.value="",G()),A()}})),t.on("changeSelection",this.setAriaLabel);var P=function(e,n){for(var o=n,i=1;i<=e-M&&i<2*L+1;i++)o+=t.session.getLine(e-i).length+1;return o},A=b?function(e){if(E&&(!o||e)&&!k){e||(e="");var i="\n ab"+e+"cde fg\n";i!=n.value&&(n.value=j=i);var s=4+(e.length||(t.selection.isEmpty()?0:1));4==$&&S==s||n.setSelectionRange(4,s),$=4,S=s}}:function(){if(!v&&!k&&(E||I)){v=!0;var e=0,o=0,i="";if(t.session){var s=t.selection,a=s.getRange(),r=s.cursor.row;r===N+1?N=(M=N+1)+2*L:r===M-1?M=(N=M-1)-2*L:(r<M-1||r>N+1)&&(M=r>L?r-L:0,N=r>L?r+L:2*L);for(var l=[],c=M;c<=N;c++)l.push(t.session.getLine(c));if(i=l.join("\n"),e=P(a.start.row,a.start.column),o=P(a.end.row,a.end.column),a.start.row<M){var d=t.session.getLine(M-1);e=a.start.row<M-1?0:e,o+=d.length+1,i=d+"\n"+i}else if(a.end.row>N){var u=t.session.getLine(N+1);o=a.end.row>N+1?u.length:a.end.column,o+=i.length+1,i=i+"\n"+u}else x&&r>0&&(i="\n"+i,o+=1,e+=1);i.length>h&&(e<h&&o<h?i=i.slice(0,h):(i="\n",e==o?e=o=0:(e=0,o=1)));var p=i+"\n\n";p!=j&&(n.value=j=p,$=S=p.length)}if(I&&($=n.selectionStart,S=n.selectionEnd),S!=o||$!=e||n.selectionEnd!=S)try{n.setSelectionRange(e,o),$=e,S=o}catch(e){}v=!1}};this.resetSelection=A,E&&t.onFocus();var B=null;this.setInputHandler=function(e){B=e},this.getInputHandler=function(){return B};var I=!1,O=function(e,o){if(I&&(I=!1),y)return A(),e&&t.onPaste(e),y=!1,"";for(var i=n.selectionStart,s=n.selectionEnd,r=$,l=j.length-S,c=e,d=e.length-i,u=e.length-s,p=0;r>0&&j[p]==e[p];)p++,r--;for(c=c.slice(p),p=1;l>0&&j.length-p>$-1&&j[j.length-p]==e[e.length-p];)p++,l--;d-=p-1,u-=p-1;var h=c.length-p+1;if(h<0&&(r=-h,h=0),c=c.slice(0,h),!(o||c||d||r||l||u))return"";k=!0;var g=!1;return a.isAndroid&&". "==c&&(c=" ",g=!0),c&&!r&&!l&&!d&&!u||_?t.onTextInput(c):t.onTextInput(c,{extendLeft:r,extendRight:l,restoreStart:d,restoreEnd:u}),k=!1,j=e,$=i,S=s,T=u,g?"\n":c},R=function(e){if(v)return U();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var o=n.value,i=O(o,!0);(o.length>500||f.test(i)||x&&$<1&&$==S)&&A()},z=function(e,t,n){var o=e.clipboardData||window.clipboardData;if(o&&!d){var i=u||n?"Text":"text/plain";try{return t?!1!==o.setData(i,t):o.getData(i)}catch(e){if(!n)return z(e,t,!0)}}},D=function(e,s){var a=t.getCopyText();if(!a)return i.preventDefault(e);z(e,a)?(b&&(A(a),o=a,setTimeout((function(){o=!1}),10)),s?t.onCut():t.onCopy(),i.preventDefault(e)):(o=!0,n.value=a,n.select(),setTimeout((function(){o=!1,A(),s?t.onCut():t.onCopy()})))},F=function(e){D(e,!0)},H=function(e){D(e,!1)},W=function(e){var o=z(e);c.pasteCancelled()||("string"==typeof o?(o&&t.onPaste(o,e),a.isIE&&setTimeout(A),i.preventDefault(e)):(n.value="",y=!0))};i.addCommandKeyListener(n,(function(e,n,o){if(!v)return t.onCommandKey(e,n,o)}),t),i.addListener(n,"select",(function(e){v||(o?o=!1:function(e){return 0===e.selectionStart&&e.selectionEnd>=j.length&&e.value===j&&j&&e.selectionEnd!==S}(n)?(t.selectAll(),A()):x&&n.selectionStart!=$&&A())}),t),i.addListener(n,"input",R,t),i.addListener(n,"cut",F,t),i.addListener(n,"copy",H,t),i.addListener(n,"paste",W,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(e,"keydown",(function(e){if((!a.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:H(e);break;case 86:W(e);break;case 88:F(e)}}),t);var U=function(){if(v&&t.onCompositionUpdate&&!t.$readOnly){if(_)return V();if(v.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;O(e),v.markerRange&&(v.context&&(v.markerRange.start.column=v.selectionStart=v.context.compositionStartOffset),v.markerRange.end.column=v.markerRange.start.column+S-v.selectionStart+T)}}},G=function(e){t.onCompositionEnd&&!t.$readOnly&&(v=!1,t.onCompositionEnd(),t.off("mousedown",V),e&&R())};function V(){C=!0,n.blur(),n.focus(),C=!1}var q,Y=l.delayedCall(U,50).schedule.bind(null,null);function K(){clearTimeout(q),q=setTimeout((function(){w&&(n.style.cssText=w,w=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}i.addListener(n,"compositionstart",(function(e){if(!v&&t.onCompositionStart&&!t.$readOnly&&(v={},!_)){e.data&&(v.useTextareaForIME=!1),setTimeout(U,0),t._signal("compositionStart"),t.on("mousedown",V);var o=t.getSelectionRange();o.end.row=o.start.row,o.end.column=o.start.column,v.markerRange=o,v.selectionStart=$,t.onCompositionStart(v),v.useTextareaForIME?(j=n.value="",$=0,S=0):(n.msGetInputContext&&(v.context=n.msGetInputContext()),n.getInputContext&&(v.context=n.getInputContext()))}}),t),i.addListener(n,"compositionupdate",U,t),i.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.length<n.selectionStart&&(v||(j=n.value),$=S=-1,A()),Y()}),t),i.addListener(n,"keydown",Y,t),i.addListener(n,"compositionend",G,t),this.getElement=function(){return n},this.setCommandMode=function(e){_=e,n.readOnly=!1},this.setReadOnly=function(e){_||(n.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){I=!0,A(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,o){w||(w=n.style.cssText),n.style.cssText=(o?"z-index:100000;":"")+(a.isIE?"opacity:0.1;":"")+"text-indent: -"+($+S)*t.renderer.characterWidth*.5+"px;";var s=t.container.getBoundingClientRect(),l=r.computedStyle(t.container),c=s.top+(parseInt(l.borderTopWidth)||0),d=s.left+(parseInt(l.borderLeftWidth)||0),u=s.bottom-c-n.clientHeight-2,p=function(e){r.translate(n,e.clientX-d-2,Math.min(e.clientY-c-2,u))};p(e),"mousedown"==e.type&&(t.renderer.$isMousePressed=!0,clearTimeout(q),a.isWin&&i.capture(t.container,p,K))},this.onContextMenuClose=K;var Q=function(e){t.textInput.onContextMenu(e),K()};i.addListener(n,"mouseup",Q,t),i.addListener(n,"mousedown",(function(e){e.preventDefault(),K()}),t),i.addListener(t.renderer.scroller,"contextmenu",Q,t),i.addListener(n,"contextmenu",Q,t),b&&function(e,t,n){var i=null,s=!1;n.addEventListener("keydown",(function(e){i&&clearTimeout(i),s=!0}),!0),n.addEventListener("keyup",(function(e){i=setTimeout((function(){s=!1}),100)}),!0);var a=function(e){if(document.activeElement===n&&!(s||v||t.$mouseHandler.isMousePressed||o)){var i=n.selectionStart,a=n.selectionEnd,r=null,l=0;if(0==i?r=g.up:1==i?r=g.home:a>S&&"\n"==j[a]?r=g.end:i<$&&" "==j[i-1]?(r=g.left,l=m.option):i<$||i==$&&S!=$&&i==a?r=g.left:a>S&&j.slice(0,a).split("\n").length>2?r=g.down:a>S&&" "==j[a-1]?(r=g.right,l=m.option):(a>S||a==S&&S!=$&&i==a)&&(r=g.right),i!==a&&(l|=m.shift),r){if(!t.onCommandKey({},l,r)&&t.commands){r=g.keyCodeToString(r);var c=t.commands.findKeyCommand(l,r);c&&t.execCommand(c)}$=i,S=a,A("")}}};document.addEventListener("selectionchange",a),t.on("destroy",(function(){document.removeEventListener("selectionchange",a)}))}(0,t,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}},t.TextInput=o,t.$setUserAgentForTests=function(e,t){x=e,b=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var o=e("../lib/useragent"),i=function(){function e(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}return e.prototype.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var i=this.editor,s=e.getButton() |
| 7 |
;return 0!==s?((i.getSelectionRange().isEmpty()||1==s)&&i.selection.moveToPosition(n),void(2==s&&(i.textInput.onContextMenu(e.domEvent),o.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||i.isFocused()||(i.focus(),!this.$focusTimeout||this.$clickSelection||i.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},e.prototype.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},e.prototype.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(n);if(-1==o)e=this.$clickSelection.end;else if(1==o)e=this.$clickSelection.start;else{var i=s(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,n=this.editor,o=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](o.row,o.column);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(i.start),r=this.$clickSelection.comparePoint(i.end);if(-1==a&&r<=0)t=this.$clickSelection.end,i.end.row==o.row&&i.end.column==o.column||(o=i.start);else if(1==r&&a>=0)t=this.$clickSelection.start,i.start.row==o.row&&i.start.column==o.column||(o=i.end);else if(-1==a&&1==r)o=i.end,t=i.start;else{var l=s(this.$clickSelection,o);o=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(o),n.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e,t,n,o,i=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,o=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(o-t,2))),s=Date.now();(i>0||s-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,o=n.session.getBracketRange(t);o?(o.isEmpty()&&(o.start.column--,o.end.column++),this.setState("select")):(o=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=o,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var o=n.getSelectionRange();o.isMultiLine()&&o.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(o.start.row),this.$clickSelection.end=n.selection.getLineRange(o.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},e.prototype.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,o=e.domEvent.timeStamp,i=o-n.t,s=i?e.wheelX/i:n.vx,a=i?e.wheelY/i:n.vy;i<550&&(s=(s+n.vx)/2,a=(a+n.vy)/2);var r=Math.abs(s/a),l=!1;return r>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),r<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l?n.allowed=o:o-n.allowed<550&&(Math.abs(s)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=o):n.allowed=0),n.t=o,n.vx=s,n.vy=a,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},e}();function s(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}i.prototype.selectEnd=i.prototype.selectByLinesEnd,i.prototype.selectAllEnd=i.prototype.selectByLinesEnd,i.prototype.selectByWordsEnd=i.prototype.selectByLinesEnd,t.DefaultHandlers=i})),ace.define("ace/lib/scroll",["require","exports","module"],(function(e,t,n){t.preventParentScroll=function(e){e.stopPropagation();var t=e.currentTarget;t.scrollHeight>t.clientHeight||e.preventDefault()}})),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],(function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=e("./lib/dom"),r=(e("./lib/event"),e("./range").Range),l=e("./lib/scroll").preventParentScroll,c="ace_tooltip",d=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=a.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},e.prototype.setClassName=function(e){a.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.$element.className=c+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},e.prototype.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},e.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),u=new(function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);-1!==t&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,n,o;this.popups.sort((function(e,t){return t.priority-e.priority}));var i=[];try{for(var a=s(this.popups),r=a.next();!r.done;r=a.next()){var l=r.value,c=!0;try{for(var d=(n=void 0,s(i)),u=d.next();!u.done;u=d.next()){var p=u.value;if(this.doPopupsOverlap(p,l)){c=!1;break}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}c?i.push(l):l.hide()}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var n=e.getElement().getBoundingClientRect(),o=t.getElement().getBoundingClientRect();return n.left<o.right&&n.right>o.left&&n.top<o.bottom&&n.bottom>o.top},e}());t.popupManager=u,t.Tooltip=d;var p=function(e){function t(t){void 0===t&&(t=document.body);var n=e.call(this,t)||this;n.timeout=void 0,n.lastT=0, |
| 8 |
n.idleTime=350,n.lastEvent=void 0,n.onMouseOut=n.onMouseOut.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.waitForHover=n.waitForHover.bind(n),n.hide=n.hide.bind(n);var o=n.getElement();return o.style.whiteSpace="pre-wrap",o.style.pointerEvents="auto",o.addEventListener("mouseout",n.onMouseOut),o.tabIndex=-1,o.addEventListener("blur",function(){o.contains(document.activeElement)||this.hide()}.bind(n)),o.addEventListener("wheel",l),n}return i(t,e),t.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide),e.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var n=t.$mouseHandler.isMousePressed;if(this.isOpen){var o=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(o.row,o.column)&&!n&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||n||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;this.idleTime-e>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-e):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},t.prototype.isOutsideOfText=function(e){var t=e.editor,n=e.getDocumentPosition(),o=t.session.getLine(n.row);if(n.column==o.length){var i=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),s=t.session.documentToScreenPosition(n.row,n.column);if(s.column!=i.column||s.row!=i.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,n,o){if(!(o&&o!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement())){var i=e.renderer;this.isOpen||(u.addPopup(this),this.$registerCloseEvents(),this.setTheme(i.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=r.fromPoints(t.start,t.end);var s=i.textToScreenCoordinates(t.start.row,t.start.column),a=i.scroller.getBoundingClientRect();s.pageX<a.left&&(s.pageX=a.left);var l=this.getElement();l.innerHTML="",l.appendChild(n),l.style.maxHeight="",l.style.display="block";var c=l.clientHeight,d=l.clientWidth,p=window.innerHeight-s.pageY-i.lineHeight,h=!0;s.pageY-c<0&&s.pageY<p&&(h=!1),l.style.maxHeight=(h?s.pageY:p)-10+"px",l.style.top=h?"":s.pageY+i.lineHeight+"px",l.style.bottom=h?window.innerHeight-s.pageY+"px":"",l.style.left=Math.min(s.pageX,window.innerWidth-d-10)+"px"}},t.prototype.addMarker=function(e,t){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=t,this.marker=t&&t.addMarker(e,"ace_highlight-marker","text")},t.prototype.hide=function(e){(e||document.activeElement!=this.getElement())&&(e&&e.target&&("keydown"!=e.type||e.ctrlKey||e.metaKey)&&this.$element.contains(e.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,u.removePopup(this))))},t.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},t.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},t.prototype.onMouseOut=function(e){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&e.relatedTarget&&!this.getElement().contains(e.relatedTarget)&&(e&&e.currentTarget.contains(e.relatedTarget)||e.relatedTarget.classList.contains("ace_content")||this.hide())},t}(d);t.HoverTooltip=p})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],(function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=e("../lib/dom"),r=e("../lib/event"),l=e("../tooltip").Tooltip,c=e("../config").nls;t.GUTTER_TOOLTIP_LEFT_OFFSET=5,t.GUTTER_TOOLTIP_TOP_OFFSET=3,t.GutterHandler=function(e){var t,n,o=e.editor,i=o.renderer.$gutterLayer,s=new d(o,!0);function l(e){e&&"keydown"===e.type&&(e.ctrlKey||e.metaKey)||(!e||"mouseout"!==e.type||e.relatedTarget&&!s.getElement().contains(e.relatedTarget))&&(t&&(t=clearTimeout(t)),s.isOpen&&(s.hideTooltip(),o.off("mousewheel",l),o.off("changeSession",l),window.removeEventListener("keydown",l,!0)))}function c(e){s.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(o.isFocused()&&0==t.getButton()&&"foldWidgets"!=i.getRegion(t)){var n=t.getDocumentPosition().row,s=o.session.selection;if(t.getShiftKey())s.selectTo(n,0);else{if(2==t.domEvent.detail)return o.selectAll(),t.preventDefault();e.$clickSelection=o.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(r){var d=r.domEvent.target||r.domEvent.srcElement;if(a.hasCssClass(d,"ace_fold-widget"))return l();s.isOpen&&e.$tooltipFollowsMouse&&c(r),n=r,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed&&function(){var t=n.getDocumentPosition().row;if(t==o.session.getLength()){var a=o.renderer.pixelToScreenCoordinates(0,n.y).row,r=n.$pos;if(a>o.session.documentToScreenRow(r.row,r.column))return l()}if(s.showTooltip(t),s.isOpen)if(o.on("mousewheel",l),o.on("changeSession",l),window.addEventListener("keydown",l,!0),e.$tooltipFollowsMouse)c(n);else{var d=n.getGutterRow(),u=i.$lines.get(d);if(u){var p=u.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),h=s.getElement().style;h.left=p.right-5+"px",h.top=p.bottom-3+"px"}else c(n)}}()}),50))})),r.addListener(o.renderer.$gutter,"mouseout",(function(e){n=null,s.isOpen&&(t=setTimeout((function(){t=null,l(e)}),50))}),o)};var d=function(e){function t(t,n){void 0===n&&(n=!1);var o=e.call(this,t.container)||this;o.editor=t,o.visibleTooltipRow;var i=o.getElement();return i.setAttribute("role","tooltip"),i.style.pointerEvents="auto",n&&(o.onMouseOut=o.onMouseOut.bind(o),i.addEventListener("mouseout",o.onMouseOut)),o}return i(t,e),t.prototype.onMouseOut=function(e){this.isOpen&&e.relatedTarget&&!this.getElement().contains(e.relatedTarget)&&(e&&e.currentTarget.contains(e.relatedTarget)||this.hideTooltip())},t.prototype.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),s=this.getHeight();(e+=15)+i>n&&(e-=e+i-n),(t+=15)+s>o&&(t-=20+s),l.prototype.setPosition.call(this,e,t)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:c("gutter-tooltip.aria-label.error.singular","error"),plural:c("gutter-tooltip.aria-label.error.plural","errors")},security:{ |
| 9 |
singular:c("gutter-tooltip.aria-label.security.singular","security finding"),plural:c("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:c("gutter-tooltip.aria-label.warning.singular","warning"),plural:c("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:c("gutter-tooltip.aria-label.info.singular","information message"),plural:c("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:c("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:c("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var n,o,i=this.editor.renderer.$gutterLayer,s=i.$annotations[e];o=s?{displayText:Array.from(s.displayText),type:Array.from(s.type)}:{displayText:[],type:[]};var r=i.session.getFoldLine(e);if(r&&i.$showFoldedAnnotations){for(var l,c={error:[],security:[],warning:[],info:[],hint:[]},d={error:1,security:2,warning:3,info:4,hint:5},u=e+1;u<=r.end.row;u++)if(i.$annotations[u])for(var p=0;p<i.$annotations[u].text.length;p++){var h=i.$annotations[u].type[p];c[h].push(i.$annotations[u].text[p]),(!l||d[h]<d[l])&&(l=h)}if(["error","security","warning"].includes(l)){var g="".concat(t.annotationsToSummaryString(c)," in folded code.");o.displayText.push(g),o.type.push(l+"_fold")}}if(0===o.displayText.length)return this.hideTooltip();var m={error:[],security:[],warning:[],info:[],hint:[]},b=i.$useSvgGutterIcons?"ace_icon_svg":"ace_icon";for(u=0;u<o.displayText.length;u++){var f=a.createElement("span"),x=a.createElement("span");(n=x.classList).add.apply(n,["ace_".concat(o.type[u]),b]),x.setAttribute("aria-label","".concat(t.annotationLabels[o.type[u].replace("_fold","")].singular)),x.setAttribute("role","img"),x.appendChild(a.createTextNode(" ")),f.appendChild(x),f.appendChild(a.createTextNode(o.displayText[u])),f.appendChild(a.createElement("br")),m[o.type[u].replace("_fold","")].push(f)}var y=this.getElement();a.removeChildren(y),m.error.forEach((function(e){return y.appendChild(e)})),m.security.forEach((function(e){return y.appendChild(e)})),m.warning.forEach((function(e){return y.appendChild(e)})),m.info.forEach((function(e){return y.appendChild(e)})),m.hint.forEach((function(e){return y.appendChild(e)})),y.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=e,this.editor._signal("showGutterTooltip",this)},t.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},t.annotationsToSummaryString=function(e){var n,o,i=[];try{for(var a=s(["error","security","warning","info","hint"]),r=a.next();!r.done;r=a.next()){var l=r.value;if(e[l].length){var c=1===e[l].length?t.annotationLabels[l].singular:t.annotationLabels[l].plural;i.push("".concat(e[l].length," ").concat(c))}}}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i.join(", ")},t}(l);t.GutterTooltip=d})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var o=e("../lib/event"),i=e("../lib/useragent"),s=function(){function e(e,t){this.speed,this.wheelX,this.wheelY,this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return e.prototype.stopPropagation=function(){o.stopPropagation(this.domEvent),this.propagationStopped=!0},e.prototype.preventDefault=function(){o.preventDefault(this.domEvent),this.defaultPrevented=!0},e.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},e.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},e.prototype.getGutterRow=function(){var e=this.getDocumentPosition().row;return this.editor.session.documentToScreenRow(e,0)-this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0)},e.prototype.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},e.prototype.getButton=function(){return o.getButton(this.domEvent)},e.prototype.getShiftKey=function(){return this.domEvent.shiftKey},e.prototype.getAccelKey=function(){return i.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},e}();t.MouseEvent=s})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var o=e("../lib/dom"),i=e("../lib/event"),s=e("../lib/useragent");function a(e){var t=e.editor,n=o.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var a,l,c,d,u,p,h,g,m,b,f,x=t.container,y=0;function v(){var e=p;(function(e,n){var o=Date.now(),i=!n||e.row!=n.row,s=!n||e.column!=n.column;!b||i||s?(t.moveCursorToPosition(e),b=o,f={x:l,y:c}):r(f.x,f.y,l,c)>5?b=null:o-b>=200&&(t.renderer.scrollCursorIntoView(),b=null)})(p=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var o=Date.now(),i=t.renderer.layerConfig.lineHeight,s=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),r={x:{left:l-a.left,right:a.right-l},y:{top:c-a.top,bottom:a.bottom-c}},d=Math.min(r.x.left,r.x.right),u=Math.min(r.y.top,r.y.bottom),p={row:e.row,column:e.column};d/s<=2&&(p.column+=r.x.left<r.x.right?-3:2),u/i<=1&&(p.row+=r.y.top<r.y.bottom?-1:1);var h=e.row!=p.row,g=e.column!=p.column,b=!n||e.row!=n.row;h||g&&!b?m?o-m>=200&&t.renderer.scrollCursorIntoView(p):m=o:m=null}(p,e)}function k(){u=t.selection.toOrientedRange(),a=t.session.addMarker(u,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(d),v(),d=setInterval(v,20),y=0,i.addListener(document,"mousemove",C)}function w(){clearInterval(d),t.session.removeMarker(a),a=null,t.selection.fromOrientedRange(u),t.isFocused()&&!g&&t.$resetCursorStyle(),u=null,p=null,y=0,m=null,b=null,i.removeListener(document,"mousemove",C)}this.onDragStart=function(e){if(this.cancelDrag||!x.draggable){var o=this;return setTimeout((function(){o.startSelect(),o.captureMouse(e)}),0),e.preventDefault()}u=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),i.setDragImage&&i.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),i.clearData(),i.setData("Text",t.session.getTextRange()),g=!0,this.setState("drag")},this.onDragEnd=function(e){if(x.draggable=!1,g=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;h||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&j(e.dataTransfer))return l=e.clientX,c=e.clientY,a||k(),y++,e.dataTransfer.dropEffect=h=$(e),i.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&j(e.dataTransfer))return l=e.clientX,c=e.clientY,a||(k(),y++),null!==_&&(_=null),e.dataTransfer.dropEffect=h=$(e),i.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&a)return w(),h=null,i.preventDefault(e)},this.onDrop=function(e){if(p){var n=e.dataTransfer;if(g)switch(h){case"move":u=u.contains(p.row,p.column)?{start:p,end:p}:t.moveText(u,p);break;case"copy":u=t.moveText(u,p,!0)}else{var o=n.getData("Text");u={start:p,end:t.session.insert(p,o)},t.focus(), |
| 10 |
h=null}return w(),i.preventDefault(e)}},i.addListener(x,"dragstart",this.onDragStart.bind(e),t),i.addListener(x,"dragend",this.onDragEnd.bind(e),t),i.addListener(x,"dragenter",this.onDragEnter.bind(e),t),i.addListener(x,"dragover",this.onDragOver.bind(e),t),i.addListener(x,"dragleave",this.onDragLeave.bind(e),t),i.addListener(x,"drop",this.onDrop.bind(e),t);var _=null;function C(){null==_&&(_=setTimeout((function(){null!=_&&a&&w()}),20))}function j(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function $(e){var t=["copy","copymove","all","uninitialized"],n=s.isMac?e.altKey:e.ctrlKey,o="uninitialized";try{o=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var i="none";return n&&t.indexOf(o)>=0?i="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(o)>=0?i="move":t.indexOf(o)>=0&&(i="copy"),i}}function r(e,t,n,o){return Math.sqrt(Math.pow(n-e,2)+Math.pow(o-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=s.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;s.isIE&&"dragReady"==this.state&&r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop(),"dragWait"===this.state&&r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),o=e.getButton();if(1===(e.domEvent.detail||1)&&0===o&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var i=e.domEvent.target||e.domEvent.srcElement;"unselectable"in i&&(i.unselectable="on"),t.getDragDelay()?(s.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(a.prototype),t.DragdropHandler=a})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var o=e("./mouse_event").MouseEvent,i=e("../lib/event"),s=e("../lib/dom");t.addTouchListeners=function(e,t){var n,a,r,l,c,d,u,p,h,g="scroll",m=0,b=0,f=0,x=0;function y(){if(t.getOption("enableMobileMenu")){h||(r=window.navigator&&window.navigator.clipboard,l=!1,c=function(e){return t.commands.canExecute(e,t)},d=function(e){var n,o,i=e.target.getAttribute("action");if("more"==i||!l)return l=!l,n=t.getCopyText(),o=t.session.getUndoManager().hasUndo(),void h.replaceChild(s.buildDom(l?["span",!n&&c("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],n&&c("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],n&&c("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],r&&c("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],o&&c("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],c("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],c("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),h.firstChild);"paste"==i?r.readText().then((function(e){t.execCommand(i,e)})):i&&("cut"!=i&&"copy"!=i||(r?r.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(i)),h.firstChild.style.display="none",l=!1,"openCommandPalette"!=i&&t.focus()},h=s.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){g="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),d(e)},onclick:d},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container));var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),o=t.renderer.textToScreenCoordinates(0,0).pageX,i=t.renderer.scrollLeft,a=t.container.getBoundingClientRect();h.style.top=n.pageY-a.top-3+"px",n.pageX-a.left<a.width-70?(h.style.left="",h.style.right="10px"):(h.style.right="",h.style.left=o+i-a.left+"px"),h.style.display="",h.firstChild.style.display="none",t.on("input",v)}else h&&v();var r,l,c,d}function v(e){h&&(h.style.display="none"),t.off("input",v)}function k(){c=null,clearTimeout(c);var e=t.selection.getRange(),n=e.contains(u.row,u.column);!e.isEmpty()&&n||(t.selection.moveToPosition(u),t.selection.selectWord()),g="wait",y()}i.addListener(e,"contextmenu",(function(e){p&&t.textInput.getElement().focus()}),t),i.addListener(e,"touchstart",(function(e){var i=e.touches;if(c||i.length>1)return clearTimeout(c),c=null,r=-1,void(g="zoom");p=t.$mouseHandler.isMousePressed=!0;var s=t.renderer.layerConfig.lineHeight,d=t.renderer.layerConfig.lineHeight,h=e.timeStamp;l=h;var y=i[0],v=y.clientX,w=y.clientY;Math.abs(n-v)+Math.abs(a-w)>s&&(r=-1),n=e.clientX=v,a=e.clientY=w,f=x=0;var _=new o(e,t);if(u=_.getDocumentPosition(),h-r<500&&1==i.length&&!m)b++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(u);var e=b>=2?t.selection.getLineRange(u.row):t.session.getBracketRange(u);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),g="wait"}();else{b=0;var C=t.selection.cursor,j=t.selection.isEmpty()?C:t.selection.anchor,$=t.renderer.$cursorLayer.getPixelPosition(C,!0),S=t.renderer.$cursorLayer.getPixelPosition(j,!0),T=t.renderer.scroller.getBoundingClientRect(),M=t.renderer.layerConfig.offset,N=t.renderer.scrollLeft,L=function(e,t){return(e/=d)*e+(t=t/s-.75)*t};if(e.clientX<T.left)return void(g="zoom");var E=L(e.clientX-T.left-$.left+N,e.clientY-T.top-$.top+M),P=L(e.clientX-T.left-S.left+N,e.clientY-T.top-S.top+M);E<3.5&&P<3.5&&(g=E>P?"cursor":"anchor"),g=P<3.5?"anchor":E<3.5?"cursor":"scroll",c=setTimeout(k,450)}r=h}),t),i.addListener(e,"touchend",(function(e){p=t.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),"zoom"==g?(g="",m=0):c?(t.selection.moveToPosition(u),m=0,y()):"scroll"==g?(m+=60,d=setInterval((function(){m--<=0&&(clearInterval(d),d=null),Math.abs(f)<.01&&(f=0),Math.abs(x)<.01&&(x=0),m<20&&(f*=.9),m<20&&(x*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*f,10*x),e==t.session.getScrollTop()&&(m=0)}),10),v()):y(),clearTimeout(c),c=null}),t),i.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var i=e.touches;if(!(i.length>1||"zoom"==g)){var s=i[0],r=n-s.clientX,d=a-s.clientY;if("wait"==g){if(!(r*r+d*d>4))return e.preventDefault();g="cursor"}n=s.clientX,a=s.clientY,e.clientX=s.clientX,e.clientY=s.clientY;var u=e.timeStamp,p=u-l;if(l=u,"scroll"==g){var h=new o(e,t);h.speed=1,h.wheelX=r,h.wheelY=d,10*Math.abs(r)<Math.abs(d)&&(r=0),10*Math.abs(d)<Math.abs(r)&&(d=0),0!=p&&(f=r/p,x=d/p),t._emit("mousewheel",h),h.propagationStopped||(f=x=0)}else{var m=new o(e,t).getDocumentPosition();"cursor"==g?t.selection.moveCursorToPosition(m):"anchor"==g&&t.selection.setSelectionAnchor(m.row,m.column),t.renderer.scrollCursorIntoView(m),e.preventDefault()}}}),t)}})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],(function(e,t,n){"use strict" |
| 11 |
;var o=e("../lib/event"),i=e("../lib/useragent"),s=e("./default_handlers").DefaultHandlers,a=e("./default_gutter_handler").GutterHandler,r=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,d=e("../config"),u=function(){function e(e){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var t=this;this.editor=e,new s(this),new a(this),new l(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus(),setTimeout((function(){e.isFocused()||e.focus()}))},r=e.renderer.getMouseEventTarget();o.addListener(r,"click",this.onMouseEvent.bind(this,"click"),e),o.addListener(r,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),o.addMultiMouseDownListener([r,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),o.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e);var d=e.renderer.$gutter;o.addListener(d,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),o.addListener(d,"click",this.onMouseEvent.bind(this,"gutterclick"),e),o.addListener(d,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),o.addListener(d,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),o.addListener(r,"mousedown",n,e),o.addListener(d,"mousedown",n,e),i.isIE&&e.renderer.scrollBarV&&(o.addListener(e.renderer.scrollBarV.element,"mousedown",n,e),o.addListener(e.renderer.scrollBarH.element,"mousedown",n,e)),e.on("mousemove",(function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var o=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),s=e.renderer;!i.isEmpty()&&i.insideStart(o.row,o.column)?s.setCursorStyle("default"):s.setCursorStyle("")}}),e)}return e.prototype.onMouseEvent=function(e,t){this.editor.session&&this.editor._emit(e,new r(t,this.editor))},e.prototype.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new r(t,this.editor))},e.prototype.onMouseWheel=function(e,t){var n=new r(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},e.prototype.setState=function(e){this.state=e},e.prototype.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor,s=this.editor.renderer;s.$isMousePressed=!0;var a=this,l=function(e){if(e){if(i.isWebKit&&!e.which&&a.releaseMouse)return a.releaseMouse();a.x=e.clientX,a.y=e.clientY,t&&t(e),a.mouseEvent=new r(e,a.editor),a.$mouseMoved=!0}},c=function(e){n.off("beforeEndOperation",u),clearInterval(p),n.session&&d(),a[a.state+"End"]&&a[a.state+"End"](e),a.state="",a.isMousePressed=s.$isMousePressed=!1,s.$keepTextAreaAtCursor&&s.$moveTextAreaToCursor(),a.$onCaptureMouseMove=a.releaseMouse=null,e&&a.onMouseEvent("mouseup",e),n.endOperation()},d=function(){a[a.state]&&a[a.state](),a.$mouseMoved=!1};if(i.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout((function(){c(e)}));var u=function(e){a.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(a[a.state+"End"]&&a[a.state+"End"](),a.state="",a.releaseMouse())};n.on("beforeEndOperation",u),n.startOperation({command:{name:"mouse"}}),a.$onCaptureMouseMove=l,a.releaseMouse=o.capture(this.editor.container,l,c);var p=setInterval(d,20)},e.prototype.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&o.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();u.prototype.releaseMouse=null,d.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=u})),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var o=e("../lib/dom");t.FoldHandler=function(e){e.on("click",(function(t){var n=t.getDocumentPosition(),i=e.session,s=i.getFoldAt(n.row,n.column,1);s&&(t.getAccelKey()?i.removeFold(s):i.expandFold(s),t.stop());var a=t.domEvent&&t.domEvent.target;a&&o.hasCssClass(a,"ace_inline_button")&&o.hasCssClass(a,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),e.renderer.scrollCursorIntoView())})),e.on("gutterclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,o=e.session;o.foldWidgets&&o.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}})),e.on("gutterdblclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,o=e.session,i=o.getParentFoldRangeData(n,!0),s=i.range||i.firstRange;if(s){n=s.start.row;var a=o.getFoldAt(n,o.getLine(n).length,1);a?o.removeFold(a):(o.addFold("...",s),e.renderer.scrollCursorIntoView({row:s.start.row,column:0}))}t.stop()}}))}})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(e,t,n){"use strict";var o=e("../lib/keys"),i=e("../lib/event"),s=function(){function e(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)}return e.prototype.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},e.prototype.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},e.prototype.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},e.prototype.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},e.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},e.prototype.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map((function(n){return n.getStatusText&&n.getStatusText(t,e)||""})).filter(Boolean).join(" ")},e.prototype.$callKeyboardHandlers=function(e,t,n,o){for(var s,a=!1,r=this.$editor.commands,l=this.$handlers.length;l--&&!((s=this.$handlers[l].handleKeyboard(this.$data,e,t,n,o))&&s.command&&((a="null"==s.command||r.exec(s.command,this.$editor,s.args,o))&&o&&-1!=e&&1!=s.passEvent&&1!=s.command.passEvent&&i.stopEvent(o),a)););return a||-1!=e||(s={command:"insertstring"},a=r.exec("insertstring",this.$editor,t)),a&&this.$editor._signal&&this.$editor._signal("keyboardActivity",s),a},e.prototype.onCommandKey=function(e,t,n){var i=o.keyCodeToString(n);return this.$callKeyboardHandlers(t,i,n,e)},e.prototype.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)},e}();t.KeyBinding=s})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(e,t,n){"use strict" |
| 12 |
;var o=0,i=0,s=!1,a=!1,r=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],d=11,u=18,p=[u,u,u,u,u,u,u,u,u,6,5,6,8,5,u,u,u,u,u,u,u,u,u,u,u,u,u,u,5,5,5,6,8,4,4,d,d,d,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,u,u,u,u,u,u,5,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,9,4,d,d,d,d,4,4,4,4,0,4,4,u,4,4,d,d,2,2,4,0,4,4,4,2,0,4,4,4,4,4],h=[8,8,8,8,8,8,8,8,8,8,8,u,u,u,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,d,d,d,d,d,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8];function g(e,t,n){if(!(i<e))if(1!=e||1!=o||a)for(var s,r,l,c,d=n.length,u=0;u<d;){if(t[u]>=e){for(s=u+1;s<d&&t[s]>=e;)s++;for(r=u,l=s-1;r<l;r++,l--)c=n[r],n[r]=n[l],n[l]=c;u=s}u++}else n.reverse()}function m(e,t,n,i){var l,c,p,h,g=t[i];switch(g){case 0:case 1:s=!1;case 4:case 3:return g;case 2:return s?3:2;case 7:return s=!0,1;case 8:return 4;case 9:return i<1||i+1>=t.length||2!=(l=n[i-1])&&3!=l||2!=(c=t[i+1])&&3!=c?4:(s&&(c=3),c==l?c:4);case 10:return 2==(l=i>0?n[i-1]:5)&&i+1<t.length&&2==t[i+1]?2:4;case d:if(i>0&&2==n[i-1])return 2;if(s)return 4;for(h=i+1,p=t.length;h<p&&t[h]==d;)h++;return h<p&&2==t[h]?2:4;case 12:for(p=t.length,h=i+1;h<p&&12==t[h];)h++;if(h<p){var m=e[i],b=m>=1425&&m<=2303||64286==m;if(l=t[h],b&&(1==l||7==l))return 1}return i<1||5==(l=t[i-1])?4:n[i-1];case 5:return s=!1,a=!0,o;case 6:return r=!0,4;case 13:case 14:case 16:case 17:case 15:s=!1;case u:return 4}}function b(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:p[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?d:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?h[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,d){if(e.length<2)return{};var p=e.split(""),h=new Array(p.length),f=new Array(p.length),x=[];o=d?1:0,function(e,t,n,d){var u=o?c:l,p=null,h=null,g=null,f=0,x=null,y=-1,v=null,k=null,w=[];if(!d)for(v=0,d=[];v<n;v++)d[v]=b(e[v]);for(i=o,s=!1,a=!1,r=!1,k=0;k<n;k++){if(p=f,w[k]=h=m(e,d,w,k),x=240&(f=u[p][h]),f&=15,t[k]=g=u[f][5],x>0)if(16==x){for(v=y;v<k;v++)t[v]=1;y=-1}else y=-1;if(u[f][6])-1==y&&(y=k);else if(y>-1){for(v=y;v<k;v++)t[v]=g;y=-1}5==d[k]&&(t[k]=0),i|=g}if(r)for(v=0;v<n;v++)if(6==d[v]){t[v]=o;for(var _=v-1;_>=0&&8==d[_];_--)t[_]=o}}(p,x,p.length,n);for(var y=0;y<h.length;h[y]=y,y++);for(g(2,x,h),g(1,x,h),y=0;y<h.length-1;y++)3===n[y]?x[y]=t.AN:1===x[y]&&(n[y]>7&&n[y]<13||4===n[y]||n[y]===u)?x[y]=t.ON_R:y>0&&"ل"===p[y-1]&&/\u0622|\u0623|\u0625|\u0627/.test(p[y])&&(x[y-1]=x[y]=t.R_H,y++);for(p[p.length-1]===t.DOT&&(x[p.length-1]=t.B),""===p[0]&&(x[0]=t.RLE),y=0;y<h.length;y++)f[y]=x[h[y]];return{logicalFromVisual:h,bidiLevels:f}},t.hasBidiCharacters=function(e,t){for(var n=!1,o=0;o<e.length;o++)t[o]=b(e.charAt(o)),n||1!=t[o]&&7!=t[o]&&3!=t[o]||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],(function(e,t,n){"use strict";var o=e("./lib/bidiutil"),i=e("./lib/lang"),s=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function e(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=o,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=s.test(e.getValue())}return e.prototype.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},e.prototype.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&s.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},e.prototype.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,o=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===o;)o=n,e++;else e=this.currentRow;return e},e.prototype.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[e];s&&(void 0===t&&(t=this.getSplitIndex()),t>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[o.L],this.line=t<s.length?this.line.substring(s[t-1],s[t]):this.line.substring(s[s.length-1])):this.line=this.line.substring(0,s[t]),t==s.length&&(this.line+=this.showInvisibles?n:o.DOT))}else this.line+=this.showInvisibles?n:o.DOT;var a,r=this.session,l=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(e,t){return"\t"===e||r.isFullWidth(e.charCodeAt(0))?(a="\t"===e?r.getScreenTabSize(t+l):2,l+=a-1,i.stringRepeat(o.DOT,a)):e})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==o.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},e.prototype.updateBidiMap=function(){var e=[];o.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=o.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},e.prototype.markAsDirty=function(){this.currentRow=null},e.prototype.updateCharacterWidths=function(e){if(this.characterWidth!==e.$characterSize.width){this.fontMetrics=e;var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("ה");this.charWidths[o.L]=this.charWidths[o.EN]=this.charWidths[o.ON_R]=t,this.charWidths[o.R]=this.charWidths[o.AN]=n,this.charWidths[o.R_H]=.45*n,this.charWidths[o.B]=this.charWidths[o.RLE]=0,this.currentRow=null}},e.prototype.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},e.prototype.setEolChar=function(e){this.EOL=e},e.prototype.setContentWidth=function(e){this.contentWidth=e},e.prototype.isRtlLine=function(e){return!!this.$isRtl||(null!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},e.prototype.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),o=e.selection.getSelectionAnchor().row;o<=n.row;o++)t||e.session.getLine(o).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(o).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:o},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(o,0,1)},e.prototype.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=e>t?this.session.getOverwrite()?e:e-1:t,i=o.getVisualFromLogicalIdx(n,this.bidiMap),s=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&e<=t&&s[i]%2!=0&&i++;for(var r=0;r<i;r++)a+=this.charWidths[s[r]];return!this.session.getOverwrite()&&e>t&&s[i]%2==0&&(a+=this.charWidths[s[i]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},e.prototype.getSelections=function(e,t){var n,o=this.bidiMap,i=o.bidiLevels,s=[],a=0,r=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,d=!1,u=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var p,h=0;h<i.length;h++)p=o.logicalFromVisual[h],n=i[h],(c=p>=r&&p<l)&&!d?u=a:!c&&d&&s.push({left:u,width:a-u |
| 13 |
}),a+=this.charWidths[n],d=c;if(c&&h===i.length&&s.push({left:u,width:a-u}),this.isRtlDir)for(var g=0;g<s.length;g++)s[g].left+=this.rtlLineOffset;return s},e.prototype.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,n=(e=Math.max(e,0),0),o=0,i=this.bidiMap.bidiLevels,s=this.charWidths[i[o]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e>n+s/2;){if(n+=s,o===i.length-1){s=0;break}s=this.charWidths[i[++o]]}return o>0&&i[o-1]%2!=0&&i[o]%2==0?(e<n&&o--,t=this.bidiMap.logicalFromVisual[o]):o>0&&i[o-1]%2==0&&i[o]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===i.length-1&&0===s&&i[o-1]%2==0||!this.isRtlDir&&0===o&&i[o]%2!=0?t=1+this.bidiMap.logicalFromVisual[o]:(o>0&&i[o-1]%2!=0&&0!==s&&o--,t=this.bidiMap.logicalFromVisual[o]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent},e}();t.BidiHandler=a})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,r=function(){function e(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(e,t){var n=t?e.end:e.start,o=t?e.start:e.end;this.$setSelection(n.row,n.column,o.row,o.column)},e.prototype.$setSelection=function(e,t,n,o){if(!this.$silent){var i=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,o),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||s)&&this._emit("changeSelection")}},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},e.prototype.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var n,o="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(o);return i?(o=i.start.row,n=i.end.row):n=o,!0===t?new a(o,0,n,this.session.getLine(n).length):new a(o,0,n+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(e,t,n){var o=e.column,i=e.column+t;return n<0&&(o=e.column-t,i=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(o,i).split(" ").length-1==t},e.prototype.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();t=this.lead,this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},e.prototype.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),o=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,o.row,o.column).match(/^\s*/);i[0].length==t||this.session.$useEmacsStyleLineStart||(o.column+=i[0].length),this.moveCursorToPosition(o)},e.prototype.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var o=n.search(/\s+$/);o>0&&(t.column=o)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),o=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);if(i)this.moveCursorTo(i.end.row,i.end.column);else{if(this.session.nonTokenRe.exec(o)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(o)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},e.prototype.moveCursorLongWordLeft=function(){ |
| 14 |
var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var o=this.session.getFoldStringAt(t,n,-1);null==o&&(o=this.doc.getLine(t).substring(0,n));var s=i.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(s)&&(n-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(s)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},e.prototype.$shortWordEndIndex=function(e){var t,n=0,o=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&o.test(t);)n++;if(n<1)for(i.lastIndex=0;(t=e[n])&&!i.test(t);)if(i.lastIndex=0,n++,o.test(t)){if(n>2){n--;break}for(;(t=e[n])&&o.test(t);)n++;if(n>2)break}}return i.lastIndex=0,n},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),o=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var s=this.doc.getLength();do{e++,o=this.doc.getLine(e)}while(e<s&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),t=0}var a=this.$shortWordEndIndex(o);this.moveCursorTo(e,t+a)},e.prototype.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var o=this.session.getLine(t).substring(0,n);if(0===n){do{t--,o=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(o));n=o.length,/\s+$/.test(o)||(o="")}var s=i.stringReverse(o),a=this.$shortWordEndIndex(s);return this.moveCursorTo(t,n-a)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(e,t){var n,o=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(o.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(o.column),o.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=o.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?o.column=this.$desiredColumn:this.$desiredColumn=o.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];e<0?e-=i.rowsAbove||0:e>0&&(e+=i.rowCount-(i.rowsAbove||0))}var s=this.session.screenToDocumentPosition(o.row+e,o.column,n);0!==e&&0===t&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+t,0===t)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,n){var o=this.session.getFoldAt(e,t,1);o&&(e=o.start.row,t=o.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(e,t,n){var o=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(o.row,o.column,n)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return a.fromPoints(t,n)}catch(e){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},e.prototype.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},e.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0},e}();r.prototype.setSelectionAnchor=r.prototype.setAnchor,r.prototype.getSelectionAnchor=r.prototype.getAnchor,r.prototype.setSelectionRange=r.prototype.setRange,o.implement(r.prototype,s),t.Selection=r})),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],(function(e,t,n){"use strict";var o=e("./lib/report_error").reportError,i=2e3,s=function(){function e(e){for(var t in this.splitRegex,this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],o=[],i=0,s=this.matchMappings[t]={defaultToken:"text"},a="g",r=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(s.defaultToken=c.defaultToken),c.caseInsensitive&&-1===a.indexOf("i")&&(a+="i"),c.unicode&&-1===a.indexOf("u")&&(a+="u"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var d=c.regex,u=new RegExp("(?:("+d+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==u?c.token=c.token[0]:u-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:u-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=u>1?this.$applyToken:c.token),u>1&&(/\\\d/.test(c.regex)?d=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+i+1)})):(u=1,d=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||r.push(c)),s[i]=l,i+=u,o.push(d),c.onMatch||(c.onMatch=null)}}o.length||(s[0]=0,o.push("$")),r.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)}),this),this.regExps[t]=new RegExp("("+o.join(")|(")+")|($)",a)}}return e.prototype.$setMaxTokenCount=function(e){i=0|e},e.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var o=[],i=0,s=n.length;i<s;i++)t[i]&&(o[o.length]={type:n[i],value:t[i]});return o},e.prototype.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],o=this.tokenArray,i=0,s=o.length;i<s;i++)t[i+1]&&(n[n.length]={type:o[i],value:t[i+1]});return n},e.prototype.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,(function(e,t){return t?"(?:":e}))},e.prototype.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,o=!1,i={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(e,t,s,a,r,l){return o?o="]"!=r:r?o=!0:a?(n==i.stack&&(i.end=l+1,i.stack=-1),n--):s&&(n++,1!=s.length&&(i.stack=n,i.start=l)),e})),null!=i.end&&/^\)*$/.test(e.substr(i.end))&&(e=e.substring(0,i.start)+e.substr(i.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},e.prototype.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var n=t.slice(0);"#tmp"===(t=n[0])&&(n.shift(),t=n.shift())}else n=[];var o=t||"start",s=this.states[o];s||(o="start",s=this.states[o]);var a=this.matchMappings[o],r=this.regExps[o] |
| 15 |
;r.lastIndex=0;for(var l,c=[],d=0,u=0,p={type:null,value:""};l=r.exec(e);){var h=a.defaultToken,g=null,m=l[0],b=r.lastIndex;if(b-m.length>d){var f=e.substring(d,b-m.length);p.type==h?p.value+=f:(p.type&&c.push(p),p={type:h,value:f})}for(var x=0;x<l.length-2;x++)if(void 0!==l[x+1]){h=(g=s[a[x]]).onMatch?g.onMatch(m,o,n,e):g.token,g.next&&(o="string"==typeof g.next?g.next:g.next(o,n),(s=this.states[o])||(this.reportError("state doesn't exist",o),o="start",s=this.states[o]),a=this.matchMappings[o],d=b,(r=this.regExps[o]).lastIndex=b),g.consumeLineEnd&&(d=b);break}if(m)if("string"==typeof h)g&&!1===g.merge||p.type!==h?(p.type&&c.push(p),p={type:h,value:m}):p.value+=m;else if(h)for(p.type&&c.push(p),p={type:null,value:""},x=0;x<h.length;x++)c.push(h[x]);if(d==e.length)break;if(d=b,u++>i){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});d<e.length;)p.type&&c.push(p),p={value:e.substring(d,d+=500),type:"overflow"};o="start",n=[];break}}return p.type&&c.push(p),n.length>1&&n[0]!==o&&n.unshift("#tmp",o),{tokens:c,state:n.length?n:o}},e}();s.prototype.reportError=o,t.Tokenizer=s})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],(function(e,t,n){"use strict";var o,i=e("../lib/deep_copy").deepCopy;(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var o=e[n],i=0;i<o.length;i++){var s=o[i];(s.next||s.onMatch)&&("string"==typeof s.next&&0!==s.next.indexOf(t)&&(s.next=t+s.next),s.nextState&&0!==s.nextState.indexOf(t)&&(s.nextState=t+s.nextState))}this.$rules[t+n]=o}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,o,s){var a="function"==typeof e?(new e).getRules():e;if(o)for(var r=0;r<o.length;r++)o[r]=t+o[r];else for(var l in o=[],a)o.push(t+l);if(this.addRules(a,t),n){var c=Array.prototype[s?"push":"unshift"];for(r=0;r<o.length;r++)c.apply(this.$rules[o[r]],i(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var n=0,o=this.$rules;Object.keys(o).forEach((function i(s){var a=o[s];a.processed=!0;for(var r=0;r<a.length;r++){var l=a[r],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var d=l.next||l.push;if(d&&Array.isArray(d)){var u=l.stateName;u||("string"!=typeof(u=l.token)&&(u=u[0]||""),o[u]&&(u+=n++)),o[u]=d,l.next=u,i(u)}else"pop"==d&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var p in l.rules)o[p]?o[p].push&&o[p].push.apply(o[p],l.rules[p]):o[p]=l.rules[p];var h="string"==typeof l?l:l.include;if(h&&("$self"===h&&(h="start"),c=Array.isArray(h)?h.map((function(e){return o[e]})):o[h]),c){var g=[r,1].concat(c);l.noEscape&&(g=g.filter((function(e){return!e.next}))),a.splice.apply(a,g),r--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}),this)},this.createKeywordMapper=function(e,t,n,o){var i=Object.create(null);return this.$keywordList=[],Object.keys(e).forEach((function(t){for(var s=e[t].split(o||"|"),a=s.length;a--;){var r=s[a];this.$keywordList.push(r),n&&(r=r.toLowerCase()),i[r]=t}}),this),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call((o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}}).prototype),t.TextHighlightRules=o})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(e,t,n){"use strict";var o;(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call((o=function(){this.$behaviours={}}).prototype),t.Behaviour=o})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=e("./range").Range,i=function(){function e(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var o=e.getTokenAt(t,n);this.$tokenIndex=o?o.index:-1}return e.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},e.prototype.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row},e.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new o(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=i})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var o,i,s=e("../../lib/oop"),a=e("../behaviour").Behaviour,r=e("../../token_iterator").TokenIterator,l=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],d=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},p={'"':'"',"'":"'"},h=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return o=u[t];o=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(e,t,n,o){var i=e.end.row-e.start.row;return{text:n+t+o,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}};(i=function(e){e=e||{},this.add("braces","insertion",(function(t,n,s,a,r){var c=s.getCursorPosition(),d=a.doc.getLine(c.row);if("{"==r){h(s);var u=s.getSelectionRange(),p=a.doc.getTextRange(u),m=a.getTokenAt(c.row,c.column);if(""!==p&&"{"!==p&&s.getWrapBehavioursEnabled())return g(u,p,"{","}");if(m&&/(?:string)\.quasi|\.xml/.test(m.type)){if([/tag\-(?:open|name)/,/attribute\-name/].some((function(e){return e.test(m.type)}))||/(string)\.quasi/.test(m.type)&&"$"!==m.value[c.column-m.start-1])return;return i.recordAutoInsert(s,a,"}"),{text:"{}",selection:[1,1]}}if(i.isSaneInsertion(s,a))return/[\]\}\)]/.test(d[c.column])||s.inMultiSelectMode||e.braces?(i.recordAutoInsert(s,a,"}"),{text:"{}",selection:[1,1]}):(i.recordMaybeInsert(s,a,"{"),{text:"{",selection:[1,1]})}else if("}"==r){if(h(s),"}"==d.substring(c.column,c.column+1)&&null!==a.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&i.isAutoInsertedClosing(c,d,r))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{ |
| 16 |
if("\n"==r||"\r\n"==r){h(s);var b="";if(i.isMaybeInsertedClosing(c,d)&&(b=l.stringRepeat("}",o.maybeInsertedBrackets),i.clearMaybeInsertedClosing()),"}"===d.substring(c.column,c.column+1)){var f=a.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!f)return null;var x=this.$getIndent(a.getLine(f.row))}else{if(!b)return void i.clearMaybeInsertedClosing();x=this.$getIndent(d)}var y=x+a.getTabString();return{text:"\n"+y+"\n"+x+b,selection:[1,y.length,1,y.length]}}i.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,i,s){var a=i.doc.getTextRange(s);if(!s.isMultiLine()&&"{"==a){if(h(n),"}"==i.doc.getLine(s.start.row).substring(s.end.column,s.end.column+1))return s.end.column++,s;o.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,n,o,s){if("("==s){h(n);var a=n.getSelectionRange(),r=o.doc.getTextRange(a);if(""!==r&&n.getWrapBehavioursEnabled())return g(a,r,"(",")");if(i.isSaneInsertion(n,o))return i.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==s){h(n);var l=n.getCursorPosition(),c=o.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1)&&null!==o.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&i.isAutoInsertedClosing(l,c,s))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&"("==s&&(h(n),")"==o.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i})),this.add("brackets","insertion",(function(e,t,n,o,s){if("["==s){h(n);var a=n.getSelectionRange(),r=o.doc.getTextRange(a);if(""!==r&&n.getWrapBehavioursEnabled())return g(a,r,"[","]");if(i.isSaneInsertion(n,o))return i.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==s){h(n);var l=n.getCursorPosition(),c=o.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1)&&null!==o.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&i.isAutoInsertedClosing(l,c,s))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&"["==s&&(h(n),"]"==o.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i})),this.add("string_dquotes","insertion",(function(e,t,n,o,i){var s=o.$mode.$quotes||p;if(1==i.length&&s[i]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(i))return;h(n);var a=i,r=n.getSelectionRange(),l=o.doc.getTextRange(r);if(!(""===l||1==l.length&&s[l])&&n.getWrapBehavioursEnabled())return g(r,l,a,a);if(!l){var c=n.getCursorPosition(),d=o.doc.getLine(c.row),u=d.substring(c.column-1,c.column),m=d.substring(c.column,c.column+1),b=o.getTokenAt(c.row,c.column),f=o.getTokenAt(c.row,c.column+1);if("\\"==u&&b&&/escape/.test(b.type))return null;var x,y=b&&/string|escape/.test(b.type),v=!f||/string|escape/.test(f.type);if(m==a)(x=y!==v)&&/string\.end/.test(f.type)&&(x=!1);else{if(y&&!v)return null;if(y&&v)return null;var k=o.$mode.tokenRe;k.lastIndex=0;var w=k.test(u);k.lastIndex=0;var _=k.test(m),C=o.$mode.$pairQuotesAfter;if(!(C&&C[a]&&C[a].test(u))&&w||_)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var j=d[c.column-2];if(u==a&&(j==a||k.test(j)))return null;x=!0}return{text:x?a+a:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,o,i){var s=o.$mode.$quotes||p,a=o.doc.getTextRange(i);if(!i.isMultiLine()&&s.hasOwnProperty(a)&&(h(n),o.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==a))return i.end.column++,i})),!1!==e.closeDocComment&&this.add("doc comment end","insertion",(function(e,t,n,o,i){if("doc-start"===e&&("\n"===i||"\r\n"===i)&&n.selection.isEmpty()){var s=n.getCursorPosition();if(0===s.column)return;for(var a=o.doc.getLine(s.row),r=o.doc.getLine(s.row+1),l=o.getTokens(s.row),c=0,d=0;d<l.length;d++){c+=l[d].value.length;var u=l[d];if(c>=s.column){if(c===s.column){if(!/\.doc/.test(u.type))return;if(/\*\//.test(u.value)){var p=l[d+1];if(!p||!/\.doc/.test(p.type))return}}var h=s.column-(c-u.value.length),g=u.value.indexOf("*/"),m=u.value.indexOf("/**",g>-1?g+2:0);if(-1!==m&&h>m&&h<m+3)return;if(-1!==g&&-1!==m&&h>=g&&h<=m||!/\.doc/.test(u.type))return;break}}var b=this.$getIndent(a);if(/\s*\*/.test(r))return/^\s*\*/.test(a)?{text:i+b+"* ",selection:[1,2+b.length,1,2+b.length]}:{text:i+b+" * ",selection:[1,3+b.length,1,3+b.length]};if(/\/\*\*/.test(a.substring(0,s.column)))return{text:i+b+" * "+i+" "+b+"*/",selection:[1,4+b.length,1,4+b.length]}}}))}).isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new r(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var i=new r(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",c))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",d)},i.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},i.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),s=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,s,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=i.row,o.autoInsertedLineEnd=n+s.substr(i.column),o.autoInsertedBrackets++},i.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),s=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,s)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=i.row,o.maybeInsertedLineStart=s.substr(0,i.column)+n,o.maybeInsertedLineEnd=s.substr(i.column),o.maybeInsertedBrackets++},i.isAutoInsertedClosing=function(e,t,n){return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},i.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},i.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},i.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},s.inherits(i,a),t.CstyleBehaviour=i})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict" |
| 17 |
;for(var o=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],i=0,s=[],a=0;a<o.length;a+=2)s.push(i+=o[a]),o[a+1]&&s.push(45,i+=o[a+1]);t.wordChars=String.fromCharCode.apply(null,s)})),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var o,i=e("../config"),s=e("../tokenizer").Tokenizer,a=e("./text_highlight_rules").TextHighlightRules,r=e("./behaviour/cstyle").CstyleBehaviour,l=e("../unicode"),c=e("../lib/lang"),d=e("../token_iterator").TokenIterator,u=e("../range").Range;(function(){this.$defaultBehaviour=new r,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new s(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,o){var i=t.doc,s=!0,a=!0,r=1/0,l=t.getTabSize(),d=!1;if(this.lineCommentStart){Array.isArray(this.lineCommentStart)?(m=this.lineCommentStart.map(c.escapeRegExp).join("|"),h=this.lineCommentStart[0]):(m=c.escapeRegExp(this.lineCommentStart),h=this.lineCommentStart),m=new RegExp("^(\\s*)(?:"+m+") ?"),d=t.getUseSoftTabs(),x=function(e,t){var n=e.match(m);if(n){var o=n[1].length,s=n[0].length;p(e,o,s)||" "!=n[0][s-1]||s--,i.removeInLine(t,o,s)}};var u=h+" ",p=(f=function(e,t){s&&!/\S/.test(e)||(p(e,r,r)?i.insertInLine({row:t,column:r},u):i.insertInLine({row:t,column:r},h))},y=function(e,t){return m.test(e)},function(e,t,n){for(var o=0;t--&&" "==e.charAt(t);)o++;if(o%l!=0)return!1;for(o=0;" "==e.charAt(n++);)o++;return l>2?o%l!=l-1:o%l==0})}else{if(!this.blockComment)return!1;var h=this.blockComment.start,g=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+c.escapeRegExp(h)+")"),b=new RegExp("(?:"+c.escapeRegExp(g)+")\\s*$"),f=function(e,t){y(e,t)||s&&!/\S/.test(e)||(i.insertInLine({row:t,column:e.length},g),i.insertInLine({row:t,column:r},h))},x=function(e,t){var n;(n=e.match(b))&&i.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(m))&&i.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(m.test(e))return!0;for(var o=t.getTokens(n),i=0;i<o.length;i++)if("comment"===o[i].type)return!0}}function v(e){for(var t=n;t<=o;t++)e(i.getLine(t),t)}var k=1/0;v((function(e,t){var n=e.search(/\S/);-1!==n?(n<r&&(r=n),a&&!y(e,t)&&(a=!1)):k>e.length&&(k=e.length)})),r==1/0&&(r=k,s=!1,a=!1),d&&r%l!=0&&(r=Math.floor(r/l)*l),v(a?x:f)},this.toggleBlockComment=function(e,t,n,o){var i=this.blockComment;if(i){!i.start&&i[0]&&(i=i[0]);var s,a,r=(m=new d(t,o.row,o.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(r&&/comment/.test(r.type)){for(var c,p;r&&/comment/.test(r.type);){if(-1!=(b=r.value.indexOf(i.start))){var h=m.getCurrentTokenRow(),g=m.getCurrentTokenColumn()+b;c=new u(h,g,h,g+i.start.length);break}r=m.stepBackward()}var m;for(r=(m=new d(t,o.row,o.column)).getCurrentToken();r&&/comment/.test(r.type);){var b;if(-1!=(b=r.value.indexOf(i.end))){h=m.getCurrentTokenRow(),g=m.getCurrentTokenColumn()+b,p=new u(h,g,h,g+i.end.length);break}r=m.stepForward()}p&&t.remove(p),c&&(t.remove(c),s=c.start.row,a=-i.start.length)}else a=i.start.length,s=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);l.start.row==s&&(l.start.column+=a),l.end.row==s&&(l.end.column+=a),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],o=n.prototype.$id,s=i.$modes[o];s||(i.$modes[o]=s=new n),i.$modes[t]||(i.$modes[t]=s),this.$embeds.push(t),this.$modes[t]=s}var a=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],r=function(e){var t,n,o;o=(t=l)[n=a[e]],t[a[e]]=function(){return this.$delegator(n,arguments,o)}},l=this;for(t=0;t<a.length;t++)r(t)},this.$delegator=function(e,t,n){var o=t[0]||"start";if("string"!=typeof o){if(Array.isArray(o[2])){var i=o[2][o[2].length-1];if(a=this.$modes[i])return a[e].apply(a,[o[1]].concat([].slice.call(t,1)))}o=o[0]||"start"}for(var s=0;s<this.$embeds.length;s++)if(this.$modes[this.$embeds[s]]){var a,r=o.split(this.$embeds[s]);if(!r[0]&&r[1])return t[0]=r[1],(a=this.$modes[this.$embeds[s]])[e].apply(a,t)}var l=n.apply(this,t);return n?l:void 0},this.transformAction=function(e,t,n,o,i){if(this.$behaviour){var s=this.$behaviour.getBehaviours();for(var a in s)if(s[a][t]){var r=s[a][t].apply(this,arguments);if(r)return r}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var o in t)for(var i=t[o],s=0,a=i.length;s<a;s++)if("string"==typeof i[s].token)/keyword|support|storage/.test(i[s].token)&&n.push(i[s].regex);else if("object"==typeof i[s].token)for(var r=0,l=i[s].token.length;r<l;r++)/keyword|support|storage/.test(i[s].token[r])&&(o=i[s].regex.match(/\(.+?\)/g)[r],n.push(o.substr(1,o.length-2)));this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,o){return(this.$keywordList||this.$createKeywordList()).map((function(e){return{name:e,value:e,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}).call((o=function(){this.HighlightRules=a}).prototype),t.Mode=o})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var o=e("./lib/dom"),i=function(){function e(e){this.session=e,this.session.widgetManager=this, |
| 18 |
this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return e.prototype.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},e.prototype.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},e.prototype.$onChangeEditor=function(e){this.attach(e.editor)},e.prototype.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},e.prototype.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},e.prototype.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var o=e.data,i=o.start.row,s=o.end.row,a="add"==e.action,r=i+1;r<s;r++)n[r]&&(n[r].hidden=a);n[s]&&(a?n[i]?n[s].hidden=a:n[i]=n[s]:(n[i]==n[s]&&(n[i]=void 0),n[s].hidden=a))}},e.prototype.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,o=e.end.row-n;if(0===o);else if("remove"==e.action){var i=t.splice(n+1,o);!t[n]&&i[i.length-1]&&(t[n]=i.pop()),i.forEach((function(e){e&&this.removeLineWidget(e)}),this),this.$updateRows()}else{var s=new Array(o);t[n]&&null!=t[n].column&&e.start.column>t[n].column&&n++,s.unshift(n,0),t.splice.apply(t,s),this.$updateRows()}}},e.prototype.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},e.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},e.prototype.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=o.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=o.createElement("div"),e.el.textContent=e.text),e.el&&(o.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&o.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex="5",t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex="3"),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var i=this.session.lineWidgets;e.row!=n.end.row||i[n.start.row]?e.hidden=!0:i[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},e.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],o=[];n;)o.push(n),n=n.$oldWidget;return o},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var n=this.session._changedWidgets,o=t.layerConfig;if(n&&n.length){for(var i=1/0,s=0;s<n.length;s++){var a=n[s];if(a&&a.el&&a.session==this.session){if(!a._inDocument){if(this.session.lineWidgets[a.row]!=a)continue;a._inDocument=!0,t.container.appendChild(a.el)}a.h=a.el.offsetHeight,a.fixedWidth||(a.w=a.el.offsetWidth,a.screenWidth=Math.ceil(a.w/o.characterWidth));var r=a.h/o.lineHeight;a.coverLine&&(r-=this.session.getRowLineCount(a.row))<0&&(r=0),a.rowCount!=r&&(a.rowCount=r,a.row<i&&(i=a.row))}}i!=1/0&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},e.prototype.renderWidgets=function(e,t){var n=t.layerConfig,o=this.session.lineWidgets;if(o){for(var i=Math.min(this.firstRow,n.firstRow),s=Math.max(this.lastRow,n.lastRow,o.length);i>0&&!o[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=i;a<=s;a++){var r=o[a];if(r&&r.el)if(r.hidden)r.el.style.top=-100-(r.pixelHeight||0)+"px";else{r._inDocument||(r._inDocument=!0,t.container.appendChild(r.el));var l=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;r.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(r.row)),r.el.style.top=l-n.offset+"px";var c=r.coverGutter?0:t.gutterWidth;r.fixedWidth||(c-=t.scrollLeft),r.el.style.left=c+"px",r.fullWidth&&r.screenWidth&&(r.el.style.minWidth=n.width+2*n.padding+"px"),r.fixedWidth?r.el.style.right=t.scrollBar.getWidth()+"px":r.el.style.right=""}}}},e}();t.LineWidgets=i})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var o=t.start.row,i=t.start.column,s=e[o]||"";switch(t.action){case"insert":if(1===t.lines.length)e[o]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var a=[o,1].concat(t.lines);e.splice.apply(e,a),e[o]=s.substring(0,i)+e[o],e[o+t.lines.length-1]+=s.substring(i)}break;case"remove":var r=t.end.column,l=t.end.row;o===l?e[o]=s.substring(0,i)+s.substring(r):e.splice(o,l-o+1,s.substring(0,i)+e[l].substring(r))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=function(){function e(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof t?this.setPosition(t.row,t.column):this.setPosition(t,n)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var t=function(e,t,n){var o="insert"==e.action,i=(o?1:-1)*(e.end.row-e.start.row),s=(o?1:-1)*(e.end.column-e.start.column),r=e.start,l=o?r:e.end;return a(t,r,n)?{row:t.row,column:t.column}:a(l,t,!n)?{row:t.row+i,column:t.column+(t.row==l.row?s:0)}:{row:r.row,column:r.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,n){var o;if(o=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=o.row||this.column!=o.column){var i={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:i,value:o})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={} |
| 19 |
;return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();function a(e,t,n){var o=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&o}s.prototype.$insertRight=!1,o.implement(s.prototype,i),t.Anchor=s})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,r=e("./anchor").Anchor,l=function(){function e(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new r(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},e.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},e.prototype.getLine=function(e){return this.$lines[e]||""},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},e.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),o=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:o,action:"insert",lines:[t]},!0),this.clonePos(o)},e.prototype.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var o=this.getLine(e);return null==t&&(t=o.length),{row:e,column:t=Math.min(Math.max(t,0),o.length)}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},e.prototype.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),o={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:o,action:"insert",lines:t}),this.clonePos(o)},e.prototype.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},e.prototype.removeInLine=function(e,t,n){var o=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:o,end:i,action:"remove",lines:this.getLinesForRange({start:o,end:i})},!0),this.clonePos(o)},e.prototype.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,o=t<this.getLength()-1,i=n?e-1:e,s=n?this.getLine(i).length:0,r=o?t+1:t,l=o?0:this.getLine(r).length,c=new a(i,s,r,l),d=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),d},e.prototype.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},e.prototype.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},e.prototype.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},e.prototype.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,o=n.length-t+1,i=e.start.row,s=e.start.column,a=0,r=0;a<o;a=r){r+=t-1;var l=n.slice(a,r);l.push(""),this.applyDelta({start:this.pos(i+a,s),end:this.pos(i+r,s=0),action:e.action,lines:l},!0)}e.lines=n.slice(a),e.start.row=i+a,e.start.column=s,this.applyDelta(e,!0)},e.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},e.prototype.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,i=t||0,s=n.length;i<s;i++)if((e-=n[i].length+o)<0)return{row:i,column:e+n[i].length+o};return{row:s-1,column:e+n[s-1].length+o}},e.prototype.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length),a=t||0;a<s;++a)i+=n[a].length+o;return i+e.column},e.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},e}();l.prototype.$autoNewLine="",l.prototype.$newLineMode="auto",o.implement(l.prototype,s),t.Document=l})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=function(){function e(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,o=-1,i=n.doc,s=t;n.lines[t];)t++;var a=i.getLength(),r=0;for(n.running=!1;t<a;){n.$tokenizeRow(t),o=t;do{t++}while(n.lines[t]);if(++r%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==o&&(o=t),s<=o&&n.fireUpdateEvent(s,o)}}}return e.prototype.setTokenizer=function(e){ |
| 20 |
this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},e.prototype.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},e.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},e.prototype.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var o=Array(n+1);o.unshift(t,1),this.lines.splice.apply(this.lines,o),this.states.splice.apply(this.states,o)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],o=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=o.state+""?(this.states[e]=o.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=o.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();o.implement(s.prototype,i),t.BackgroundTokenizer=s})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],(function(e,t,n){"use strict";var o=e("./lib/lang"),i=e("./range").Range,s=function(){function e(e,t,n){void 0===n&&(n="text"),this.setRegexp(e),this.clazz=t,this.type=n,this.docLen=0}return e.prototype.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},e.prototype.update=function(e,t,n,s){if(this.regExp){for(var a=s.firstRow,r=s.lastRow,l={},c=n.$editor.$search,d=c.$isMultilineSearch(n.$editor.getLastSearchOptions()),u=a;u<=r;u++){var p=this.cache[u];if(null==p||n.getValue().length!=this.docLen){if(d){p=[];var h=c.$multiLineForward(n,this.regExp,u,r);if(h){var g=h.endRow<=r?h.endRow-1:r;g>u&&(u=g),p.push(new i(h.startRow,h.startCol,h.endRow,h.endCol))}p.length>this.MAX_RANGES&&(p=p.slice(0,this.MAX_RANGES))}else(p=o.getMatchOffsets(n.getLine(u),this.regExp)).length>this.MAX_RANGES&&(p=p.slice(0,this.MAX_RANGES)),p=p.map((function(e){return new i(u,e.offset,u,e.offset+e.length)}));this.cache[u]=p.length?p:""}if(0!==p.length)for(var m=p.length;m--;){var b=p[m].toScreenRange(n),f=b.toString();l[f]||(l[f]=!0,t.drawSingleLineMarker(e,b,this.clazz,s))}}this.docLen=n.getValue().length}},e}();s.prototype.MAX_RANGES=500,t.SearchHighlight=s})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=function(){function e(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return e.prototype.addSession=function(e){this.$session=e},e.prototype.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var o=this.$undoStack.length;o>this.$undoDepth-1&&this.$undoStack.splice(0,o-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,o=n.length;o--;){var i=n[o][0];if(i.id<=e)break;i.id<t&&(i.ignore=!0)}this.lastDeltas=null},e.prototype.getSelection=function(e,t){for(var n=this.selections,o=n.length;o--;){var i=n[o];if(i.rev<e)return t&&(i=n[o+1]),i}},e.prototype.getRevision=function(){return this.$rev},e.prototype.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,o=null,i=0,s=n.length;s--;){var a=n[s][0];if(a.id<t&&!o&&(o=s+1),a.id<=e){i=s+1;break}}return n.slice(i,o)},e.prototype.getChangedRanges=function(e,t){null==t&&(t=this.$rev+1)},e.prototype.getChangedLines=function(e,t){null==t&&(t=this.$rev+1)},e.prototype.undo=function(e,t){this.lastDeltas=null;var n=this.$undoStack;if(function(e,t){for(var n=t;n--;){var o=e[n];if(o&&!o[0].ignore){for(;n<t-1;){var i=d(e[n],e[n+1]);e[n]=i[0],e[n+1]=i[1],n++}return!0}}}(n,n.length)){e||(e=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var o=n.pop(),i=null;return o&&(i=e.undoChanges(o,t),this.$redoStack.push(o),this.$syncRev()),this.$fromUndo=!1,i}},e.prototype.redo=function(e,t){if(this.lastDeltas=null,e||(e=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);!function(e,t){for(var n=0;n<t.length;n++)for(var o=t[n],i=0;i<o.length;i++)m(e,o[i])}(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach((function(e){e[0].id=++this.$maxRev}),this)}var o=this.$redoStack.pop(),i=null;return o&&(i=e.redoChanges(o,t),this.$undoStack.push(o),this.$syncRev()),this.$fromUndo=!1,i},e.prototype.$syncRev=function(){var e=this.$undoStack,t=e[e.length-1],n=t&&t[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},e.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},e.prototype.canUndo=function(){return this.$undoStack.length>0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?r(e):r(this.$undoStack)+"\n---\n"+r(this.$redoStack)},e}();o.prototype.hasUndo=o.prototype.canUndo,o.prototype.hasRedo=o.prototype.canRedo,o.prototype.isClean=o.prototype.isAtBookmark,o.prototype.markClean=o.prototype.bookmark;var i=e("./range").Range,s=i.comparePoints;function a(e){return{row:e.row,column:e.column}}function r(e){if(e=e||this,Array.isArray(e))return e.map(r).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,o="insert"==t.action;if(n&&o)if(s(t.start,e.end)>=0)p(t,e,-1);else{if(!(s(t.start,e.start)<=0))return null;p(e,t,1)}else if(n&&!o)if(s(t.start,e.end)>=0)p(t,e,-1);else{if(!(s(t.end,e.start)<=0))return null;p(e,t,-1)}else if(!n&&o)if(s(t.start,e.start)>=0)p(t,e,1);else{if(!(s(t.start,e.start)<=0))return null;p(e,t,1)}else if(!n&&!o)if(s(t.start,e.start)>=0)p(t,e,1);else{if(!(s(t.end,e.start)<=0))return null;p(e,t,-1)}return[t,e]}function d(e,t){for(var n=e.length;n--;)for(var o=0;o<t.length;o++)if(!c(e[n],t[o])){for(;n<e.length;){for(;o--;)c(t[o],e[n]);o=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}function u(e,t){var n="insert"==e.action,o="insert"==t.action;if(n&&o)s(e.start,t.start)<0?p(t,e,1):p(e,t,1);else if(n&&!o)s(e.start,t.end)>=0?p(e,t,-1):(s(e.start,t.start)<=0||p(e,i.fromPoints(t.start,e.start),-1), |
| 21 |
p(t,e,1));else if(!n&&o)s(t.start,e.end)>=0?p(t,e,-1):(s(t.start,e.start)<=0||p(t,i.fromPoints(e.start,t.start),-1),p(e,t,1));else if(!n&&!o)if(s(t.start,e.end)>=0)p(t,e,-1);else{var a,r;if(!(s(t.end,e.start)<=0))return s(e.start,t.start)<0&&(a=e,e=g(e,t.start)),s(e.end,t.end)>0&&(r=g(e,t.end)),h(t.end,e.start,e.end,-1),r&&!a&&(e.lines=r.lines,e.start=r.start,e.end=r.end,r=e),[t,a,r].filter(Boolean);p(e,t,-1)}return[t,e]}function p(e,t,n){h(e.start,t.start,t.end,n),h(e.end,t.start,t.end,n)}function h(e,t,n,o){e.row==(1==o?t:n).row&&(e.column+=o*(n.column-t.column)),e.row+=o*(n.row-t.row)}function g(e,t){var n=e.lines,o=e.end;e.end=a(t);var i=e.end.row-e.start.row,s=n.splice(i,n.length),r=i?t.column:t.column-e.start.column;return n.push(s[0].substring(0,r)),s[0]=s[0].substr(r),{start:a(t),end:o,lines:s,action:e.action}}function m(e,t){t=function(e){return{start:a(e.start),end:a(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var o=e[n],i=0;i<o.length;i++){var s=u(o[i],t);t=s[0],2!=s.length&&(s[2]?(o.splice(i+1,1,s[1],s[2]),i++):s[1]||(o.splice(i,1),i--))}o.length||e.splice(n,1)}return e}i.comparePoints,t.UndoManager=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=e("../range").Range,i=function(){function e(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new o(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}return e.prototype.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},e.prototype.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,n){var o,i,s=0,a=this.folds,r=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<a.length;l++){if(-1==(i=(o=a[l]).range.compareStart(t,n)))return void e(null,t,n,s,r);if(!e(null,o.start.row,o.start.column,s,r)&&e(o.placeholder,o.start.row,o.start.column,s)||0===i)return;r=!o.sameRow,s=o.end.column}e(null,t,n,s,r)},e.prototype.getNextFoldTo=function(e,t){for(var n,o,i=0;i<this.folds.length;i++){if(-1==(o=(n=this.folds[i]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===o)return{fold:n,kind:"inside"}}return null},e.prototype.addRemoveChars=function(e,t,n){var o,i,s=this.getNextFoldTo(e,t);if(s)if(o=s.fold,"inside"==s.kind&&o.start.column!=t&&o.start.row!=e)window.console&&window.console.log(e,t,o);else if(o.start.row==e){var a=(i=this.folds).indexOf(o);for(0===a&&(this.start.column+=n);a<i.length;a++){if((o=i[a]).start.column+=n,!o.sameRow)return;o.end.column+=n}this.end.column+=n}},e.prototype.split=function(t,n){var o=this.getNextFoldTo(t,n);if(!o||"inside"==o.kind)return null;var i=o.fold,s=this.folds,a=this.foldData,r=s.indexOf(i),l=s[r-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new e(a,s=s.splice(r,s.length-r));return a.splice(a.indexOf(this)+1,0,c),c},e.prototype.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var o=this.foldData;o.splice(o.indexOf(e),1)},e.prototype.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach((function(t){e.push(" "+t.toString())})),e.push("]"),e.join("\n")},e.prototype.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var o=this.folds[n];if((e-=o.start.column-t)<0)return{row:o.start.row,column:o.start.column+e};if((e-=o.placeholder.length)<0)return o.start;t=o.end.column}return{row:this.end.row,column:this.end.column+e}},e}();t.FoldLine=i})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=e("./range").Range.comparePoints,i=function(){function e(){this.ranges=[],this.$bias=1}return e.prototype.pointIndex=function(e,t,n){for(var i=this.ranges,s=n||0;s<i.length;s++){var a=i[s],r=o(e,a.end);if(!(r>0)){var l=o(e,a.start);return 0===r?t&&0!==l?-s-2:s:l>0||0===l&&!t?s:-s-1}}return-s-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var o=this.pointIndex(e.end,t,n);return o<0?o=-o-1:o++,this.ranges.splice(n,o-n,e)},e.prototype.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){for(var e,t=[],n=this.ranges,i=(n=n.sort((function(e,t){return o(e.start,t.start)})))[0],s=1;s<n.length;s++){e=i,i=n[s];var a=o(e.end,i.start);a<0||(0!=a||e.isEmpty()||i.isEmpty())&&(o(e.end,i.end)<0&&(e.end.row=i.end.row,e.end.column=i.end.column),n.splice(s,1),t.push(i),i=e,s--)}return this.ranges=n,t},e.prototype.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var o=this.pointIndex({row:e,column:0});o<0&&(o=-o-1);var i=this.pointIndex({row:t,column:0},o);i<0&&(i=-i-1);for(var s=[],a=o;a<i;a++)s.push(n[a]);return s},e.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},e.prototype.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},e.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},e.prototype.$onChange=function(e){for(var t=e.start,n=e.end,o=t.row,i=n.row,s=this.ranges,a=0,r=s.length;a<r&&!((d=s[a]).end.row>=o);a++);if("insert"==e.action){for(var l=i-o,c=-t.column+n.column;a<r&&!((d=s[a]).start.row>o);a++)if(d.start.row==o&&d.start.column>=t.column&&(d.start.column==t.column&&this.$bias<=0||(d.start.column+=c,d.start.row+=l)),d.end.row==o&&d.end.column>=t.column){if(d.end.column==t.column&&this.$bias<0)continue;d.end.column==t.column&&c>0&&a<r-1&&d.end.column>d.start.column&&d.end.column==s[a+1].start.column&&(d.end.column-=c),d.end.column+=c,d.end.row+=l}}else for(l=o-i,c=t.column-n.column;a<r&&!((d=s[a]).start.row>i);a++)d.end.row<i&&(o<d.end.row||o==d.end.row&&t.column<d.end.column)?(d.end.row=o,d.end.column=t.column):d.end.row==i?d.end.column<=n.column?(l||d.end.column>t.column)&&(d.end.column=t.column,d.end.row=t.row):(d.end.column+=c,d.end.row+=l):d.end.row>i&&(d.end.row+=l),d.start.row<i&&(o<d.start.row||o==d.start.row&&t.column<d.start.column)?(d.start.row=o,d.start.column=t.column):d.start.row==i?d.start.column<=n.column?(l||d.start.column>t.column)&&(d.start.column=t.column,d.start.row=t.row):(d.start.column+=c,d.start.row+=l):d.start.row>i&&(d.start.row+=l);if(0!=l&&a<r)for(;a<r;a++){var d;(d=s[a]).start.row+=l,d.end.row+=l}},e}();i.prototype.comparePoints=o,t.RangeList=i})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],(function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{ |
| 22 |
__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=function(e){function t(t,n){var o=e.call(this)||this;return o.foldLine=null,o.placeholder=n,o.range=t,o.start=t.start,o.end=t.end,o.sameRow=t.start.row==t.end.row,o.subFolds=o.ranges=[],o}return i(t,e),t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach((function(t){t.setFoldLine(e)}))},t.prototype.clone=function(){var e=new t(this.range.clone(),this.placeholder);return this.subFolds.forEach((function(t){e.subFolds.push(t.clone())})),e.collapseChildren=this.collapseChildren,e},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){var t,n;t=e,n=this.start,a(t.start,n),a(t.end,n);for(var o=e.start.row,i=e.start.column,s=0,r=-1;s<this.subFolds.length&&1==(r=this.subFolds[s].range.compare(o,i));s++);var l=this.subFolds[s],c=0;if(0==r){if(l.range.containsRange(e))return l.addSubFold(e);c=1}o=e.range.end.row,i=e.range.end.column;var d=s;for(r=-1;d<this.subFolds.length&&1==(r=this.subFolds[d].range.compare(o,i));d++);0==r&&d++;for(var u=this.subFolds.splice(s,d-s,e),p=0==r?u.length-1:u.length,h=c;h<p;h++)e.addSubFold(u[h]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return function(e,t){r(e.start,t),r(e.end,t)}(e,this.start)},t}(e("../range_list").RangeList);function a(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function r(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}t.Fold=s})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],(function(e,t,n){"use strict";var o=e("../range").Range,i=e("./fold_line").FoldLine,s=e("./fold").Fold,a=e("../token_iterator").TokenIterator,r=e("../mouse/mouse_event").MouseEvent;t.Folding=function(){this.getFoldAt=function(e,t,n){var o=this.getFoldLine(e);if(!o)return null;for(var i=o.folds,s=0;s<i.length;s++){var a=i[s].range;if(a.contains(e,t)){if(1==n&&a.isEnd(e,t)&&!a.isEmpty())continue;if(-1==n&&a.isStart(e,t)&&!a.isEmpty())continue;return i[s]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,o=this.$foldData,i=[];t.column+=1,n.column-=1;for(var s=0;s<o.length;s++){var a=o[s].range.compareRange(e);if(2!=a){if(-2==a)break;for(var r=o[s].folds,l=0;l<r.length;l++){var c=r[l];if(-2==(a=c.range.compareRange(e)))break;if(2!=a){if(42==a)break;i.push(c)}}}}return t.column-=1,n.column+=1,i},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach((function(e){t=t.concat(this.getFoldsInRange(e))}),this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var o=0;o<t[n].folds.length;o++)e.push(t[n].folds[o]);return e},this.getFoldStringAt=function(e,t,n,o){if(!(o=o||this.getFoldLine(e)))return null;for(var i,s,a={end:{column:0}},r=0;r<o.folds.length;r++){var l=(s=o.folds[r]).range.compareEnd(e,t);if(-1==l){i=this.getLine(s.start.row).substring(a.end.column,s.start.column);break}if(0===l)return null;a=s}return i||(i=this.getLine(s.start.row).substring(a.end.column)),-1==n?i.substring(0,t-a.end.column):1==n?i.substring(t-a.end.column):i},this.getFoldLine=function(e,t){var n=this.$foldData,o=0;for(t&&(o=n.indexOf(t)),-1==o&&(o=0);o<n.length;o++){var i=n[o];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,o=0;for(t&&(o=n.indexOf(t)),-1==o&&(o=0);o<n.length;o++){var i=n[o];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,o=t-e+1,i=0;i<n.length;i++){var s=n[i],a=s.end.row,r=s.start.row;if(a>=t){r<t&&(r>=e?o-=t-r:o=0);break}a>=e&&(o-=r>=e?a-r:a-e+1)}return o},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,o=this.$foldData,a=!1;e instanceof s?n=e:(n=new s(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var r=n.start.row,l=n.start.column,c=n.end.row,d=n.end.column,u=this.getFoldAt(r,l,1),p=this.getFoldAt(c,d,-1);if(u&&p==u)return u.addSubFold(n);u&&!u.range.isStart(r,l)&&this.removeFold(u),p&&!p.range.isEnd(c,d)&&this.removeFold(p);var h=this.getFoldsInRange(n.range);h.length>0&&(this.removeFolds(h),n.collapseChildren||h.forEach((function(e){n.addSubFold(e)})));for(var g=0;g<o.length;g++){var m=o[g];if(c==m.start.row){m.addFold(n),a=!0;break}if(r==m.end.row){if(m.addFold(n),a=!0,!n.sameRow){var b=o[g+1];if(b&&b.start.row==c){m.merge(b);break}}break}if(c<=m.start.row)break}return a||(m=this.$addFoldLine(new i(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(m.start.row,m.start.row):this.$updateRowLengthCache(m.start.row,m.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach((function(e){this.addFold(e)}),this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,o=t.end.row,i=this.$foldData,s=t.folds;if(1==s.length)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))s.pop(),t.end.row=s[s.length-1].end.row,t.end.column=s[s.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))s.shift(),t.start.row=s[0].start.row,t.start.column=s[0].start.column;else if(e.sameRow)s.splice(s.indexOf(e),1);else{var a=t.split(e.start.row,e.start.column);(s=a.folds).shift(),a.start.row=s[0].start.row,a.start.column=s[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,o):this.$updateRowLengthCache(n,o)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach((function(e){this.removeFold(e)}),this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach((function(t){e.restoreRange(t),this.addFold(t)}),this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,i;if(null==e)n=new o(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new o(e,0,e,this.getLine(e).length);else if("row"in e)n=o.fromPoints(e,e);else{if(Array.isArray(e))return i=[],e.forEach((function(e){i=i.concat(this.unfold(e))}),this),i;n=e}for(var s=i=this.getFoldsInRangeList(n);1==i.length&&o.comparePoints(i[0].start,n.start)<0&&o.comparePoints(i[0].end,n.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(i):this.expandFolds(i),s.length)return s},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,o,i){null==o&&(o=e.start.row),null==i&&(i=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var s=this.doc,a="";return e.walk((function(e,t,n,r){if(!(t<o)){if(t==o){if(n<i)return;r=Math.max(i,r)}a+=null!=e?e:s.getLine(t).substring(r,n)}}),t,n),a},this.getDisplayLine=function(e,t,n,o){var i,s=this.getFoldLine(e);return s?this.getFoldDisplayLine(s,e,t,n,o):(i=this.doc.getLine(e)).substring(o||0,t||i.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map((function(t){var n=t.folds.map((function(e){return e.clone()}));return new i(e,n)}))},this.toggleFold=function(e){var t,n,o=this.selection.getRange();if(o.isEmpty()){var i=o.start |
| 23 |
;if(t=this.getFoldAt(i.row,i.column))return void this.expandFold(t);(n=this.findMatchingBracket(i))?1==o.comparePoint(n)?o.end=n:(o.start=n,o.start.column++,o.end.column--):(n=this.findMatchingBracket({row:i.row,column:i.column+1}))?(1==o.comparePoint(n)?o.end=n:o.start=n,o.start.column++):o=this.getCommentFoldRange(i.row,i.column)||o}else{var s=this.getFoldsInRange(o);if(e&&s.length)return void this.expandFolds(s);1==s.length&&(t=s[0])}if(t||(t=this.getFoldAt(o.start.row,o.start.column)),t&&t.range.toString()==o.toString())this.expandFold(t);else{var a="...";if(!o.isMultiLine()){if((a=this.getTextRange(o)).length<4)return;a=a.trim().substring(0,2)+".."}this.addFold(a,o)}},this.getCommentFoldRange=function(e,t,n){var i=new a(this,e,t),s=i.getCurrentToken(),r=s&&s.type;if(s&&/^comment|string/.test(r)){"comment"==(r=r.match(/comment|string/)[0])&&(r+="|doc-start|\\.doc");var l=new RegExp(r),c=new o;if(1!=n){do{s=i.stepBackward()}while(s&&l.test(s.type));s=i.stepForward()}c.start.row=i.getCurrentTokenRow(),c.start.column=i.getCurrentTokenColumn()+s.value.length,i=new a(this,e,t);var d=this.getState(i.$row);if(-1!=n){var u=-1;do{if(s=i.stepForward(),-1==u){var p=this.getState(i.$row);d.toString()!==p.toString()&&(u=i.$row)}else if(i.$row>u)break}while(s&&l.test(s.type));s=i.stepBackward()}else s=i.getCurrentToken();return c.end.row=i.getCurrentTokenRow(),c.end.column=i.getCurrentTokenColumn(),c}},this.foldAll=function(e,t,n,o){null==n&&(n=1e5);var i=this.foldWidgets;if(i){t=t||this.getLength();for(var s=e=e||0;s<t;s++)if(null==i[s]&&(i[s]=this.getFoldWidget(s)),"start"==i[s]&&(!o||o(s))){var a=this.getFoldWidgetRange(s);a&&a.isMultiLine()&&a.end.row<=t&&a.start.row>=e&&(s=a.end.row,a.collapseChildren=n,this.addFold("...",a))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),o=0;o<n.length;o++){var i=n[o];if("text"!=i.type||!/^\s+$/.test(i.value))return!!/comment/.test(i.type)}}))},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var o,i=e-1;i>=0;){var s=n[i];if(null==s&&(s=n[i]=this.getFoldWidget(i)),"start"==s){var a=this.getFoldWidgetRange(i);if(o||(o=a),a&&a.end.row>=e)break}i--}return{range:-1!==i&&a,firstRange:o}},this.onFoldWidgetClick=function(e,t){t instanceof r&&(t=t.domEvent);var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var o=t.target||t.srcElement;o&&/ace_fold-widget/.test(o.className)&&(o.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),o=this.getLine(e),i="end"===n?-1:1,s=this.getFoldAt(e,-1===i?0:o.length,i);if(s)return t.children||t.all?this.removeFold(s):this.expandFold(s),s;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(s=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(s.range))return this.removeFold(s),s;if(t.siblings){var r=this.getParentFoldRangeData(e);if(r.range)var l=r.range.start.row+1,c=r.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=a?a.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var o=this.getParentFoldRangeData(t,!0);if(n=o.range||o.firstRange){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var o=Array(n+1);o.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var o=e("../token_iterator").TokenIterator,i=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var o=n.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],e):this.$findOpeningBracket(o[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),o=!0,s=n.charAt(e.column-1),a=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(a||(s=n.charAt(e.column),e={row:e.row,column:e.column+1},a=s&&s.match(/([\(\[\{])|([\)\]\}])/),o=!1),!a)return null;if(a[1]){if(!(r=this.$findClosingBracket(a[1],e)))return null;t=i.fromPoints(e,r),o||(t.end.column++,t.start.column--),t.cursor=t.end}else{var r;if(!(r=this.$findOpeningBracket(a[2],e)))return null;t=i.fromPoints(r,e),o||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),o=/([\(\[\{])|([\)\]\}])/,s=!t&&n.charAt(e.column-1),a=s&&s.match(o);if(a||(s=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},a=s&&s.match(o)),!a)return null;var r=new i(e.row,e.column-1,e.row,e.column),l=a[1]?this.$findClosingBracket(a[1],e):this.$findOpeningBracket(a[2],e);return l?[r,new i(l.row,l.column,l.row,l.column+1)]:[r]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],s=1,a=new o(this,t.row,t.column),r=a.getCurrentToken();if(r||(r=a.stepForward()),r){n||(n=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=t.column-a.getCurrentTokenColumn()-2,c=r.value;;){for(;l>=0;){var d=c.charAt(l);if(d==i){if(0==(s-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else d==e&&(s+=1);l-=1}do{r=a.stepBackward()}while(r&&!n.test(r.type));if(null==r)break;l=(c=r.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],s=1,a=new o(this,t.row,t.column),r=a.getCurrentToken();if(r||(r=a.stepForward()),r){n||(n=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=t.column-a.getCurrentTokenColumn();;){for(var c=r.value,d=c.length;l<d;){var u=c.charAt(l);if(u==i){if(0==(s-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else u==e&&(s+=1);l+=1}do{r=a.stepForward()}while(r&&!n.test(r.type));if(null==r)break;l=0}return null}},this.getMatchingTags=function(e){var t=new o(this,e.row,e.column),n=this.$findTagName(t);if(n)return"<"===t.stepBackward().value?this.$findClosingTag(t,n):this.$findOpeningTag(t,n)}, |
| 24 |
this.$findTagName=function(e){var t=e.getCurrentToken(),n=!1,o=!1;if(t&&-1===t.type.indexOf("tag-name"))do{(t=o?e.stepBackward():e.stepForward())&&("/>"===t.value?o=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,o=t.value,s=t.value,a=0,r=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(-1!==(n=t).type.indexOf("tag-close")&&!c){var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(t=e.stepForward())if(">"!==t.value||c||(d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),c=!0),-1!==t.type.indexOf("tag-name")){if(s===(o=t.value))if("<"===n.value)a++;else if("</"===n.value&&--a<0){e.stepBackward();var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2);t=e.stepForward();var p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),!t||">"!==t.value)return;var h=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else s===o&&"/>"===t.value&&--a<0&&(h=p=u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),d=new i(l.end.row,l.end.column,l.end.row,l.end.column+1))}while(t&&a>=0);if(r&&d&&u&&h&&l&&p)return{openTag:new i(r.start.row,r.start.column,d.end.row,d.end.column),closeTag:new i(u.start.row,u.start.column,h.end.row,h.end.column),openTagName:l,closeTagName:p}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),o=t.value,s=0,a=e.getCurrentTokenRow(),r=e.getCurrentTokenColumn(),l=r+2,c=new i(a,r,a,l);e.stepForward();var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),t&&">"===t.value){var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,a=e.getCurrentTokenRow(),l=(r=e.getCurrentTokenColumn())+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(o===t.value)if("<"===n.value){if(++s>0){var p=new i(a,r,a,l),h=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var g=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else"</"===n.value&&s--}else if("/>"===t.value){for(var m=0,b=n;b;){if(-1!==b.type.indexOf("tag-name")&&b.value===o){s--;break}if("<"===b.value)break;b=e.stepBackward(),m++}for(var f=0;f<m;f++)e.stepForward()}}while(n&&s<=0);return h&&g&&c&&u&&p&&d?{openTag:new i(h.start.row,h.start.column,g.end.row,g.end.column),closeTag:new i(c.start.row,c.start.column,u.end.row,u.end.column),openTagName:p,closeTagName:d}:void 0}}}})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./lib/lang"),s=e("./bidihandler").BidiHandler,a=e("./config"),r=e("./lib/event_emitter").EventEmitter,l=e("./selection").Selection,c=e("./mode/text").Mode,d=e("./range").Range,u=e("./line_widgets").LineWidgets,p=e("./document").Document,h=e("./background_tokenizer").BackgroundTokenizer,g=e("./search_highlight").SearchHighlight,m=e("./undomanager").UndoManager,b=function(){function e(t,n){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++e.$uid,this.$foldData.toString=function(){return this.join("\n")},this.bgTokenizer=new h((new c).getTokenizer(),this);var o=this;this.bgTokenizer.on("update",(function(e){o._signal("tokenizerUpdate",e)})),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof t&&t.getLine||(t=new p(t)),this.setDocument(t),this.selection=new l(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new s(this),a.resetOptions(this),this.setMode(n),a._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return e.prototype.$initOperationListeners=function(){var e=this;this.curOp=null,this.on("change",(function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.docChanged=!0}),!0),this.on("changeSelection",(function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.selectionChanged=!0}),!0),this.$operationResetTimer=i.delayedCall(this.endOperation.bind(this,!0))},e.prototype.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(e={}),this.$operationResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",e)},e.prototype.endOperation=function(e){if(this.curOp){if(e&&!1===e.returnValue)return this.curOp=null,void this._signal("endOperation",e);if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;var t=this.selection.toJSON();this.curOp.selectionAfter=t,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(t),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",e)}},e.prototype.setDocument=function(e){this.doc&&this.doc.off("change",this.$onChange),this.doc=e,e.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},e.prototype.getDocument=function(){return this.doc},Object.defineProperty(e.prototype,"widgetManager",{get:function(){var e=new u(this);return this.widgetManager=e,this.$editor&&e.attach(this.$editor),e},set:function(e){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:e})},enumerable:!1,configurable:!0}),e.prototype.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},e.prototype.$getRowCacheIndex=function(e,t){for(var n=0,o=e.length-1;n<=o;){var i=n+o>>1,s=e[i];if(t>s)n=i+1;else{if(!(t<s))return i;o=i-1}}return n-1},e.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},e.prototype.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},e.prototype.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},e.prototype.onSelectionChange=function(){this._signal("changeSelection")},e.prototype.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0), |
| 25 |
this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},e.fromJSON=function(t){"string"==typeof t&&(t=JSON.parse(t));var n=new m;n.$undoStack=t.history.undo,n.$redoStack=t.history.redo,n.mark=t.history.mark,n.$rev=t.history.rev;var o=new e(t.value);return t.folds.forEach((function(e){o.addFold("...",d.fromPoints(e.start,e.end))})),o.setAnnotations(t.annotations),o.setBreakpoints(t.breakpoints),o.setMode(t.mode),o.setScrollLeft(t.scrollLeft),o.setScrollTop(t.scrollTop),o.setUndoManager(n),o.selection.fromJSON(t.selection),o},e.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map((function(e){return e.range})),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},e.prototype.toString=function(){return this.doc.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.getState=function(e){return this.bgTokenizer.getState(e)},e.prototype.getTokens=function(e){return this.bgTokenizer.getTokens(e)},e.prototype.getTokenAt=function(e,t){var n,o=this.bgTokenizer.getTokens(e),i=0;if(null==t){var s=o.length-1;i=this.getLine(e).length}else for(s=0;s<o.length&&!((i+=o[s].value.length)>=t);s++);return(n=o[s])?(n.index=s,n.start=i-n.value.length,n):null},e.prototype.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):"\t"},e.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption("tabSize",e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},e.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},e.prototype.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},e.prototype.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},e.prototype.addMarker=function(e,t,n,o){var i=this.$markerId++,s={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!o,id:i};return o?(this.$frontMarkers[i]=s,this._signal("changeFrontMarker")):(this.$backMarkers[i]=s,this._signal("changeBackMarker")),i},e.prototype.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},e.prototype.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},e.prototype.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},e.prototype.highlight=function(e){if(!this.$searchHighlight){var t=new g(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},e.prototype.highlightLines=function(e,t,n,o){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var i=new d(e,0,t,1/0);return i.id=this.addMarker(i,n,"fullLine",o),i},e.prototype.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},e.prototype.getAnnotations=function(){return this.$annotations||[]},e.prototype.clearAnnotations=function(){this.setAnnotations([])},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},e.prototype.getWordRange=function(e,t){var n=this.getLine(e),o=!1;if(t>0&&(o=!!n.charAt(t-1).match(this.tokenRe)),o||(o=!!n.charAt(t).match(this.tokenRe)),o)var i=this.tokenRe;else i=/^\s+$/.test(n.slice(t-1,t+1))?/\s/:this.nonTokenRe;var s=t;if(s>0){do{s--}while(s>=0&&n.charAt(s).match(i));s++}for(var a=t;a<n.length&&n.charAt(a).match(i);)a++;return new d(e,s,e,a)},e.prototype.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),o=this.getLine(n.end.row);o.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},e.prototype.setNewLineMode=function(e){this.doc.setNewLineMode(e)},e.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},e.prototype.setUseWorker=function(e){this.setOption("useWorker",e)},e.prototype.getUseWorker=function(){return this.$useWorker},e.prototype.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},e.prototype.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,o=n.path}else o=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[o]&&!n)return this.$onChangeMode(this.$modes[o]),void(t&&t());this.$modeId=o,a.loadModule(["mode",o],function(e){if(!this.destroyed){if(this.$modeId!==o)return t&&t();this.$modes[o]&&!n?this.$onChangeMode(this.$modes[o]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[o]=e,e.$id=o),this.$onChangeMode(e)),t&&t()}}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},e.prototype.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){var n=this.$mode;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var o=e.getTokenizer();if(void 0!==o.on){var i=this.onReloadTokenizer.bind(this);o.on("update",i)}this.bgTokenizer.setTokenizer(o),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:e}))}},e.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},e.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){a.warn("Could not load worker",e),this.$worker=null}},e.prototype.getMode=function(){return this.$mode},e.prototype.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},e.prototype.getScrollTop=function(){return this.$scrollTop},e.prototype.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},e.prototype.getScrollLeft=function(){ |
| 26 |
return this.$scrollLeft},e.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},e.prototype.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach((function(t){t&&t.screenWidth>e&&(e=t.screenWidth)})),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,o=0,i=0,s=this.$foldData[i],a=s?s.start.row:1/0,r=t.length,l=0;l<r;l++){if(l>a){if((l=s.end.row+1)>=r)break;a=(s=this.$foldData[i++])?s.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>o&&(o=n[l])}this.screenWidth=o}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var o=e[n];"insert"==o.action||"remove"==o.action?this.doc.revertDelta(o):o.folds&&this.addFolds(o.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},e.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var o=e[n];"insert"!=o.action&&"remove"!=o.action||this.doc.$safeApplyDelta(o)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},e.prototype.setUndoSelect=function(e){this.$undoSelect=e},e.prototype.$getUndoSelection=function(e,t){function n(e){return t?"insert"!==e.action:"insert"===e.action}for(var o,i,s=0;s<e.length;s++){var a=e[s];a.start&&(o?n(a)?(i=a.start,-1==o.compare(i.row,i.column)&&o.setStart(i),i=a.end,1==o.compare(i.row,i.column)&&o.setEnd(i)):(i=a.start,-1==o.compare(i.row,i.column)&&(o=d.fromPoints(a.start,a.start))):o=n(a)?d.fromPoints(a.start,a.end):d.fromPoints(a.start,a.start))}return o},e.prototype.replace=function(e,t){return this.doc.replace(e,t)},e.prototype.moveText=function(e,t,n){var o=this.getTextRange(e),i=this.getFoldsInRange(e),s=d.fromPoints(t,t);if(!n){this.remove(e);var a=e.start.row-e.end.row;(c=a?-e.end.column:e.start.column-e.end.column)&&(s.start.row==e.end.row&&s.start.column>e.end.column&&(s.start.column+=c),s.end.row==e.end.row&&s.end.column>e.end.column&&(s.end.column+=c)),a&&s.start.row>=e.end.row&&(s.start.row+=a,s.end.row+=a)}if(s.end=this.insert(s.start,o),i.length){var r=e.start,l=s.start,c=(a=l.row-r.row,l.column-r.column);this.addFolds(i.map((function(e){return(e=e.clone()).start.row==r.row&&(e.start.column+=c),e.end.row==r.row&&(e.end.column+=c),e.start.row+=a,e.end.row+=a,e})))}return s},e.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var o=e;o<=t;o++)this.doc.insertInLine({row:o,column:0},n)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new d(0,0,0,0),o=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var s=this.getLine(i);n.start.row=i,n.end.row=i;for(var a=0;a<o&&" "==s.charAt(a);++a);a<o&&"\t"==s.charAt(a)?(n.start.column=a,n.end.column=a+1):(n.start.column=0,n.end.column=a),this.remove(n)}},e.prototype.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((i=this.getRowFoldStart(e+n))<0)return 0;var o=i-e}else if(n>0){var i;if((i=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;o=i-t}else e=this.$clipRowToDocument(e),o=(t=this.$clipRowToDocument(t))-e+1;var s=new d(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(s).map((function(e){return(e=e.clone()).start.row+=o,e.end.row+=o,e})),r=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+o,r),a.length&&this.addFolds(a),o},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},e.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var o=this.$constrainWrapLimit(e,n.min,n.max);return o!=this.$wrapLimit&&o>1&&(this.$wrapLimit=o,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},e.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,o=e.start,i=e.end,s=o.row,a=i.row,r=a-s,l=null;if(this.$updating=!0,0!=r)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(s,r);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var d=0;if(m=this.getFoldLine(i.row)){m.addRemoveChars(i.row,i.column,o.column-i.column),m.shiftRow(-r);var u=this.getFoldLine(s);u&&u!==m&&(u.merge(m),m=u),d=c.indexOf(m)+1}for(;d<c.length;d++)(m=c[d]).start.row>=i.row&&m.shiftRow(-r);a=s}else{var p=Array(r);p.unshift(s,0);var h=t?this.$wrapData:this.$rowLengthCache;if(h.splice.apply(h,p),c=this.$foldData,d=0,m=this.getFoldLine(s)){var g=m.range.compareInside(o.row,o.column);0==g?(m=m.split(o.row,o.column))&&(m.shiftRow(r),m.addRemoveChars(a,0,i.column-o.column)):-1==g&&(m.addRemoveChars(s,0,i.column-o.column),m.shiftRow(r)),d=c.indexOf(m)+1}for(;d<c.length;d++){var m;(m=c[d]).start.row>=s&&m.shiftRow(r)}}else r=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),r=-r),(m=this.getFoldLine(s))&&m.addRemoveChars(s,o.column,r);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(s,a):this.$updateRowLengthCache(s,a),l},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){ |
| 27 |
var n,o,i=this.doc.getAllLines(),s=this.getTabSize(),a=this.$wrapData,r=this.$wrapLimit,l=e;for(t=Math.min(t,i.length-1);l<=t;)(o=this.getFoldLine(l,o))?(n=[],o.walk(function(e,t,o,s){var a;if(null!=e){(a=this.$getDisplayTokens(e,n.length))[0]=y;for(var r=1;r<a.length;r++)a[r]=v}else a=this.$getDisplayTokens(i[t].substring(s,o),n.length);n=n.concat(a)}.bind(this),o.end.row,i[o.end.row].length+1),a[o.start.row]=this.$computeWrapSplits(n,r,s),l=o.end.row+1):(n=this.$getDisplayTokens(i[l]),a[l]=this.$computeWrapSplits(n,r,s),l++)},e.prototype.$computeWrapSplits=function(e,t,n){if(0==e.length)return[];var o=[],i=e.length,s=0,a=0,r=this.$wrapAsCode,l=this.$indentedSoftWrap,c=t<=Math.max(2*n,8)||!1===l?0:Math.floor(t/2);function d(t){for(var i=t-s,d=s;d<t;d++){var p=e[d];12!==p&&2!==p||(i-=1)}o.length||(u=function(){var t=0;if(0===c)return t;if(l)for(var o=0;o<e.length;o++){var i=e[o];if(i==w)t+=1;else{if(i!=_){if(i==C)continue;break}t+=n}}return r&&!1!==l&&(t+=n),Math.min(t,c)}(),o.indent=u),a+=i,o.push(a),s=t}for(var u=0;i-s>t-u;){var p=s+t-u;if(e[p-1]>=w&&e[p]>=w)d(p);else if(e[p]!=y&&e[p]!=v){for(var h=Math.max(p-(t-(t>>2)),s-1);p>h&&e[p]<y;)p--;if(r){for(;p>h&&e[p]<y;)p--;for(;p>h&&e[p]==k;)p--}else for(;p>h&&e[p]<w;)p--;p>h?d(++p):(e[p=s+t]==x&&p--,d(p-u))}else{for(;p!=s-1&&e[p]!=y;p--);if(p>s){d(p);continue}for(p=s+t;p<e.length&&e[p]==v;p++);if(p==e.length)break;d(p)}}return o},e.prototype.$getDisplayTokens=function(e,t){var n,o=[];t=t||0;for(var i=0;i<e.length;i++){var s=e.charCodeAt(i);if(9==s){n=this.getScreenTabSize(o.length+t),o.push(_);for(var a=1;a<n;a++)o.push(C)}else 32==s?o.push(w):s>39&&s<48||s>57&&s<64?o.push(k):s>=4352&&j(s)?o.push(f,x):o.push(f)}return o},e.prototype.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var o,i;for(null==t&&(t=1/0),n=n||0,i=0;i<e.length&&(9==(o=e.charCodeAt(i))?n+=this.getScreenTabSize(n):o>=4352&&j(o)?n+=2:n+=1,!(n>t));i++);return[n,i]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},e.prototype.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},e.prototype.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},e.prototype.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},e.prototype.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},e.prototype.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},e.prototype.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},e.prototype.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},e.prototype.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},e.prototype.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var o,i,s=0,a=0,r=0,l=0,c=this.$screenRowCache,d=this.$getRowCacheIndex(c,e),u=c.length;if(u&&d>=0){r=c[d],s=this.$docRowCache[d];var p=e>c[u-1]}else p=!u;for(var h=this.getLength()-1,g=this.getNextFoldLine(s),m=g?g.start.row:1/0;r<=e&&!(r+(l=this.getRowLength(s))>e||s>=h);)r+=l,++s>m&&(s=g.end.row+1,m=(g=this.getNextFoldLine(s,g))?g.start.row:1/0),p&&(this.$docRowCache.push(s),this.$screenRowCache.push(r));if(g&&g.start.row<=s)o=this.getFoldDisplayLine(g),s=g.start.row;else{if(r+l<=e||s>h)return{row:h,column:this.getLine(h).length};o=this.getLine(s),g=null}var b=0,f=Math.floor(e-r);if(this.$useWrapMode){var x=this.$wrapData[s];x&&(i=x[f],f>0&&x.length&&(b=x.indent,a=x[f-1]||x[x.length-1],o=o.substring(a)))}return void 0!==n&&this.$bidiHandler.isBidiRow(r+f,s,f)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(o,t-b)[1],this.$useWrapMode&&a>=i&&(a=i-1),g?g.idxToPosition(a):{row:s,column:a}},e.prototype.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var o,i=0,s=null;(o=this.getFoldAt(e,t,1))&&(e=o.start.row,t=o.start.column);var a,r=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),d=l.length;if(d&&c>=0){r=l[c],i=this.$screenRowCache[c];var u=e>l[d-1]}else u=!d;for(var p=this.getNextFoldLine(r),h=p?p.start.row:1/0;r<e;){if(r>=h){if((a=p.end.row+1)>e)break;h=(p=this.getNextFoldLine(a,p))?p.start.row:1/0}else a=r+1;i+=this.getRowLength(r),r=a,u&&(this.$docRowCache.push(r),this.$screenRowCache.push(i))}var g="";p&&r>=h?(g=this.getFoldDisplayLine(p,e,t),s=p.start.row):(g=this.getLine(e).substring(0,t),s=e);var m=0;if(this.$useWrapMode){var b=this.$wrapData[s];if(b){for(var f=0;g.length>=b[f];)i++,f++;g=g.substring(b[f-1]||0,g.length),m=f>0?b.indent:0}}return this.lineWidgets&&this.lineWidgets[r]&&this.lineWidgets[r].rowsAbove&&(i+=this.lineWidgets[r].rowsAbove),{row:i,column:m+this.$getStringScreenWidth(g)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,o=0,i=(r=0,(t=this.$foldData[r++])?t.start.row:1/0);o<n;){var s=this.$wrapData[o];e+=s?s.length+1:1,++o>i&&(o=t.end.row+1,i=(t=this.$foldData[r++])?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,r=0;r<a.length;r++)e-=(t=a[r]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},e.prototype.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,o){if(0===n)return[0,0];var i,s;for(n||(n=1/0),o=o||0,s=0;s<t.length&&!((o+="\t"===(i=t.charAt(s))?this.getScreenTabSize(o):e.getCharacterWidth(i))>n);s++);return[o,s]})},e.prototype.getPrecedingCharacter=function(){var e=this.selection.getCursor();return 0===e.column?0===e.row?"":this.doc.getNewLineCharacter():this.getLine(e.row)[e.column-1]},e.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},e}();b.$uid=0,b.prototype.$modes=a.$modes,b.prototype.getValue=b.prototype.toString,b.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},b.prototype.$overwrite=!1,b.prototype.$mode=null,b.prototype.$modeId=null,b.prototype.$scrollTop=0,b.prototype.$scrollLeft=0,b.prototype.$wrapLimit=80,b.prototype.$useWrapMode=!1,b.prototype.$wrapLimitRange={min:null,max:null},b.prototype.lineWidgets=null,b.prototype.isFullWidth=j,o.implement(b.prototype,r);var f=1,x=2,y=3,v=4,k=9,w=10,_=11,C=12;function j(e){ |
| 28 |
return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}e("./edit_session/folding").Folding.call(b.prototype),e("./edit_session/bracket_match").BracketMatch.call(b.prototype),a.defineOptions(b.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=b})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var o=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,a=function(){function e(){this.$options={}}return e.prototype.set=function(e){return i.mixin(this.$options,e),this},e.prototype.getOptions=function(){return o.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var o=null;return n.forEach((function(e,n,i,a){return o=new s(e,n,i,a),!(n==a&&t.start&&t.start.start&&0!=t.skipCurrent&&o.isEqual(t.start)&&(o=null,1))})),o},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),a=[],r=t.re;if(t.$isMultiLine){var l,c=r.length,d=i.length-c;e:for(var u=r.offset||0;u<=d;u++){for(var p=0;p<c;p++)if(-1==i[u+p].search(r[p]))continue e;var h=i[u],g=i[u+c-1],m=h.length-h.match(r[0])[0].length,b=g.match(r[c-1])[0].length;l&&l.end.row===u&&l.end.column>m||(a.push(l=new s(u,m,u+c-1,b)),c>2&&(u=u+c-2))}}else for(var f,x=0;x<i.length;x++)if(this.$isMultilineSearch(t)){var y=i.length-1;if(f=this.$multiLineForward(e,r,x,y)){var v=f.endRow<=y?f.endRow-1:y;v>x&&(x=v),a.push(new s(f.startRow,f.startCol,f.endRow,f.endCol))}}else for(f=o.getMatchOffsets(i[x],r),p=0;p<f.length;p++){var k=f[p];a.push(new s(x,k.offset,x,k.offset+k.length))}if(n){var w=n.start.column,_=n.end.column;for(x=0,p=a.length-1;x<p&&a[x].start.column<w&&0==a[x].start.row;)x++;for(var C=n.end.row-n.start.row;x<p&&a[p].end.column>_&&a[p].end.row==C;)p--;for(a=a.slice(x,p+1),x=0,p=a.length;x<p;x++)a[x].start.row+=n.start.row,a[x].end.row+=n.start.row}return a},e.prototype.parseReplaceString=function(e){for(var t="",n=0,o=e.length;n<o;n++){var i=e.charCodeAt(n);if(92!==i){if(36===i){if(++n>=o){t+="$";break}var s=e.charCodeAt(n);if(36===s){t+="$$";continue}if(48===s||38===s){t+="$&";continue}if(49<=s&&s<=57){t+="$"+e[n];continue}}t+=e[n]}else{if(++n>=o){t+="\\";break}switch(e.charCodeAt(n)){case 92:t+="\\";break;case 110:t+="\n";break;case 116:t+="\t"}}}return t||e},e.prototype.replace=function(e,t){var n=this.$options,o=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(o){var i=this.$isMultilineSearch(n);i&&(e=e.replace(/\r\n|\r|\n/g,"\n"));var s=o.exec(e);if(!s||!i&&s[0].length!=e.length)return null;if(t=n.regExp?this.parseReplaceString(t):t.replace(/\$/g,"$$$$"),t=e.replace(o,t),n.preserveCase){t=t.split("");for(var a=Math.min(e.length,e.length);a--;){var r=e[a];r&&r.toLowerCase()!=r?t[a]=t[a].toUpperCase():t[a]=t[a].toLowerCase()}t=t.join("")}return t}},e.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=o.escapeRegExp(n));var i=e.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),e.$supportsUnicodeFlag=!0,i+="u"}catch(t){e.$supportsUnicodeFlag=!1}if(e.wholeWord&&(n=function(e,t){var n=o.supportsLookbehind();function i(e,o){return void 0===o&&(o=!0),(n&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(e)||t.regExp?n&&t.$supportsUnicodeFlag?o?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var s=Array.from(e),a=s[0],r=s[s.length-1];return i(a)+e+i(r,!1)}(n,e)),e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var s=new RegExp(n,i)}catch(e){s=!1}return e.re=s},e.prototype.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),o=[],i=0;i<n.length;i++)try{o.push(new RegExp(n[i],t))}catch(e){return!1}return o},e.prototype.$isMultilineSearch=function(e){return e.re&&/\\r\\n|\\r|\\n/.test(e.re.source)&&e.regExp&&!e.$isMultiLine},e.prototype.$multiLineForward=function(e,t,n,o){for(var i,s=l(e,n),a=n;a<=o;){for(var r=0;r<s&&!(a>o);r++){var c=e.getLine(a++);i=null==i?c:i+"\n"+c}var d=t.exec(i);if(t.lastIndex=0,d){var u=i.slice(0,d.index).split("\n"),p=d[0].split("\n"),h=n+u.length-1,g=u[u.length-1].length;return{startRow:h,startCol:g,endRow:h+p.length-1,endCol:1==p.length?g+p[0].length:p[p.length-1].length}}}return null},e.prototype.$multiLineBackward=function(e,t,n,o,i){for(var s,a=l(e,o),c=e.getLine(o).length-n,d=o;d>=i;){for(var u=0;u<a&&d>=i;u++){var p=e.getLine(d--);s=null==s?p:p+"\n"+s}var h=r(s,t,c);if(h){var g=s.slice(0,h.index).split("\n"),m=h[0].split("\n"),b=d+g.length,f=g[g.length-1].length;return{startRow:b,startCol:f,endRow:b+m.length-1,endCol:1==m.length?f+m[0].length:m[m.length-1].length}}}return null},e.prototype.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=this.$isMultilineSearch(t),s=this.$multiLineForward,a=this.$multiLineBackward,r=1==t.backwards,l=0!=t.skipCurrent,c=n.unicode,d=t.range,u=t.start;u||(u=d?d[r?"end":"start"]:e.selection.getRange()),u.start&&(u=u[l!=r?"end":"start"]);var p=d?d.start.row:0,h=d?d.end.row:e.getLength()-1;if(r)var g=function(e){var n=u.row;if(!b(n,u.column,e)){for(n--;n>=p;n--)if(b(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=h,p=u.row;n>=p;n--)if(b(n,Number.MAX_VALUE,e))return}};else g=function(e){var n=u.row;if(!b(n,u.column,e)){for(n+=1;n<=h;n++)if(b(n,0,e))return;if(0!=t.wrap)for(n=p,h=u.row;n<=h;n++)if(b(n,0,e))return}};if(t.$isMultiLine)var m=n.length,b=function(t,o,i){var s=r?t-m+1:t;if(!(s<0||s+m>e.getLength())){var a=e.getLine(s),l=a.search(n[0]);if(!(!r&&l<o||-1===l)){for(var c=1;c<m;c++)if(-1==(a=e.getLine(s+c)).search(n[c]))return;var d=a.match(n[m-1])[0].length;if(!(r&&d>o))return!!i(s,l,s+m-1,d)||void 0}} |
| 29 |
};else b=r?function(t,s,r){if(i){var l=a(e,n,s,t,p);if(!l)return!1;if(r(l.startRow,l.startCol,l.endRow,l.endCol))return!0}else{var d,u=e.getLine(t),h=[],g=0;for(n.lastIndex=0;d=n.exec(u);){var m=d[0].length;if(g=d.index,!m){if(g>=u.length)break;n.lastIndex=g+=o.skipEmptyMatch(u,g,c)}if(d.index+m>s)break;h.push(d.index,m)}for(var b=h.length-1;b>=0;b-=2){var f=h[b-1];if(r(t,f,t,f+(m=h[b])))return!0}}}:function(t,a,r){if(n.lastIndex=a,i){var l=s(e,n,t,h);if(l){var d=l.endRow<=h?l.endRow-1:h;d>t&&(t=d)}if(!l)return!1;if(r(l.startRow,l.startCol,l.endRow,l.endCol))return!0}else for(var u,p,g=e.getLine(t);p=n.exec(g);){var m=p[0].length;if(r(t,u=p.index,t,u+m))return!0;if(!m&&(n.lastIndex=u+=o.skipEmptyMatch(g,u,c),u>=g.length))return!1}};return{forEach:g}},e}();function r(e,t,n){for(var o=null,i=0;i<=e.length;){t.lastIndex=i;var s=t.exec(e);if(!s)break;var a=s.index+s[0].length;if(a>e.length-n)break;(!o||a>o.index+o[0].length)&&(o=s),i=s.index+1}return o}function l(e,t){var n={row:t,column:0},o=e.doc.positionToIndex(n)+5e3;return e.doc.indexToPosition(o).row+1}t.Search=a})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=e("../lib/keys"),a=e("../lib/useragent"),r=s.KEY_MODS,l=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,n){this.platform=t||(a.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=n},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var o=this.commandKeyBinding;for(var i in o){var s=o[i];if(s==e)delete o[i];else if(Array.isArray(s)){var a=s.indexOf(e);-1!=a&&(s.splice(a,1),1==s.length&&(o[i]=s[0]))}}},e.prototype.bindKey=function(e,t,n){if("object"==typeof e&&e&&(null==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var o="";if(-1!=e.indexOf(" ")){var i=e.split(/\s+/);e=i.pop(),i.forEach((function(e){var t=this.parseKeys(e),n=r[t.hashId]+t.key;o+=(o?" ":"")+n,this._addCommandToBinding(o,"chainKeys")}),this),o+=" "}var s=this.parseKeys(e),a=r[s.hashId]+s.key;this._addCommandToBinding(o+a,t,n)}),this)},e.prototype._addCommandToBinding=function(e,t,n){var o,i=this.commandKeyBinding;if(t)if(!i[e]||this.$singleCommand)i[e]=t;else{Array.isArray(i[e])?-1!=(o=i[e].indexOf(t))&&i[e].splice(o,1):i[e]=[i[e]],"number"!=typeof n&&(n=c(t));var s=i[e];for(o=0;o<s.length&&!(c(s[o])>n);o++);s.splice(o,0,t)}else delete i[e]},e.prototype.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},e.prototype.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),o=s[n];if(s.FUNCTION_KEYS[o])n=s.FUNCTION_KEYS[o].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var i=0,a=t.length;a--;){var r=s.KEY_MODS[t[a]];if(null==r)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;i|=r}return{key:n,hashId:i}},e.prototype.findKeyCommand=function(e,t){var n=r[e]+t;return this.commandKeyBinding[n]},e.prototype.handleKeyboard=function(e,t,n,o){if(!(o<0)){var i=r[t]+n,s=this.commandKeyBinding[i];return e.$keyChain&&(e.$keyChain+=" "+i,s=this.commandKeyBinding[e.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||o>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-i.length-1)),{command:s}):(e.$keyChain=e.$keyChain||i,{command:"null"})}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}();function c(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var d=function(e){function t(t,n){var o=e.call(this,t,n)||this;return o.$singleCommand=!0,o}return i(t,e),t}(l);d.call=function(e,t,n){l.prototype.$init.call(e,t,n,!0)},l.call=function(e,t,n){l.prototype.$init.call(e,t,n,!1)},t.HashHandler=d,t.MultiHashHandler=l})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=e("../lib/oop"),a=e("../keyboard/hash_handler").MultiHashHandler,r=e("../lib/event_emitter").EventEmitter,l=function(e){function t(t,n){var o=e.call(this,n,t)||this;return o.byName=o.commands,o.setDefaultHandler("exec",(function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)})),o}return i(t,e),t.prototype.exec=function(e,t,n){if(Array.isArray(e)){for(var o=e.length;o--;)if(this.exec(e[o],t,n))return!0;return!1}"string"==typeof e&&(e=this.commands[e]);var i={editor:t,command:e,args:n};return this.canExecute(e,t)?(i.returnValue=this._emit("exec",i),this._signal("afterExec",i),!1!==i.returnValue):(this._signal("commandUnavailable",i),!1)},t.prototype.canExecute=function(e,t){return"string"==typeof e&&(e=this.commands[e]),!(!e||t&&t.$readOnly&&!e.readOnly||0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))},t.prototype.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},t.prototype.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))},t}(a);s.implement(l.prototype,r),t.CommandManager=l})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var o=e("../lib/lang"),i=e("../config"),s=e("../range").Range;function a(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",(function(t){t.init(e), |
| 30 |
e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(e){i.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(e){i.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down", |
| 31 |
bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(o.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters", |
| 32 |
bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(n.row).length,r=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=i.row+1;c++){var d=o.stringTrimLeft(o.stringTrimRight(e.session.doc.getLine(c)));0!==d.length&&(d=" "+d),l+=d}i.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new s(n.row,0,i.row+2,0),l),r>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+r)):(a=e.session.doc.getLine(n.row).length>a?a+1:a,e.selection.moveCursorTo(n.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,o=e.selection.rangeList.ranges,i=[];o.length<1&&(o=[e.selection.getRange()]);for(var a=0;a<o.length;a++)a==o.length-1&&(o[a].end.row===t&&o[a].end.column===n||i.push(new s(o[a].end.row,o[a].end.column,t,n))),0===a?0===o[a].start.row&&0===o[a].start.column||i.push(new s(0,0,o[a].start.row,o[a].start.column)):i.push(new s(o[a-1].end.row,o[a-1].end.column,o[a].start.row,o[a].start.column));for(e.exitMultiSelectMode(),e.clearSelection(),a=0;a<i.length;a++)e.selection.addRange(i[a],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(e){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),e.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var r=1;r<9;r++)t.commands.push({name:"foldToLevel"+r,description:"Fold To Level "+r,level:r,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})})),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],(function(e,t,n){"use strict";var o=e("../lib/keys"),i=e("../mouse/default_gutter_handler").GutterTooltip,s=function(){function e(e){this.editor=e,this.gutterLayer=e.renderer.$gutterLayer,this.element=e.renderer.$gutter,this.lines=e.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new i(this.editor)}return e.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},e.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},e.prototype.$onGutterKeyDown=function(e){if(this.annotationTooltip.isOpen)return e.preventDefault(),void(e.keyCode===o.escape&&this.annotationTooltip.hideTooltip());if(e.target===this.element){if(e.keyCode!=o.enter)return;e.preventDefault();var t=this.editor.getCursorPosition().row;return this.editor.isRowVisible(t)||this.editor.scrollToLine(t,!0,!0),void setTimeout(function(){var e=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldWidget(e),n=this.$findNearestAnnotation(e);if(null!==t||null!==n)return null===t&&null!==n?(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex)):null!==t&&null===n?(this.activeRowIndex=t,this.activeLane="fold",void this.$focusFoldWidget(this.activeRowIndex)):Math.abs(n-e)<Math.abs(t-e)?(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex)):(this.activeRowIndex=t,this.activeLane="fold",void this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10)}this.$handleGutterKeyboardInteraction(e),setTimeout(function(){this.editor._signal("gutterkeydown",new a(e,this))}.bind(this),10)},e.prototype.$handleGutterKeyboardInteraction=function(e){if(e.keyCode!==o.tab){if(e.keyCode===o.escape)return e.preventDefault(),this.$blurGutter(),this.element.focus(),void(this.lane=null);if(e.keyCode!==o.up)if(e.keyCode!==o.down){if(e.keyCode===o.left)return e.preventDefault(),void this.$switchLane("annotation");if(e.keyCode===o.right)return e.preventDefault(),void this.$switchLane("fold");if(e.keyCode!==o.enter&&e.keyCode!==o.space);else switch(e.preventDefault(),this.activeLane){case"fold":if("start"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]){var t=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),e),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==t&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(t),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}if("end"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)])break;return;case"annotation":var n=this.lines.cells[this.activeRowIndex].element.childNodes[2].getBoundingClientRect(),i=this.annotationTooltip.getElement().style;i.left=n.right+"px",i.top=n.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex))}}else switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown()}else switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp()}}else e.preventDefault()},e.prototype.$blurGutter=function(){if(null!==this.activeRowIndex)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex)}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},e.prototype.$isFoldWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n="none"!==this.$getFoldWidget(e).style.display;return t&&n},e.prototype.$isAnnotationVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n="none"!==this.$getAnnotation(e).style.display;return t&&n}, |
| 33 |
e.prototype.$getFoldWidget=function(e){return this.lines.get(e).element.childNodes[1]},e.prototype.$getAnnotation=function(e){return this.lines.get(e).element.childNodes[2]},e.prototype.$findNearestFoldWidget=function(e){if(this.$isFoldWidgetVisible(e))return e;for(var t=0;e-t>0||e+t<this.lines.getLength()-1;){if(e-++t>=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;e-t>0||e+t<this.lines.getLength()-1;){if(e-++t>=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},e.prototype.$focusFoldWidget=function(e){if(null!=e){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$focusAnnotation=function(e){if(null!=e){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isFoldWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,void this.$focusFoldWidget(this.activeRowIndex)},e.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(e++,this.$isFoldWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,void this.$focusFoldWidget(this.activeRowIndex)},e.prototype.$moveAnnotationUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(e++,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$switchLane=function(e){switch(e){case"annotation":if("annotation"===this.activeLane)break;var t=this.$findNearestAnnotation(this.activeRowIndex);if(null==t)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if("fold"===this.activeLane)break;var n=this.$findNearestFoldWidget(this.activeRowIndex);if(null==n)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$focusFoldWidget(this.activeRowIndex)}},e.prototype.$rowIndexToRow=function(e){var t=this.lines.get(e);return t?t.row:null},e.prototype.$rowToRowIndex=function(e){for(var t=0;t<this.lines.getLength();t++)if(this.lines.get(t).row==e)return t;return null},e}();t.GutterKeyboardHandler=s;var a=function(){function e(e,t){this.gutterKeyboardHandler=t,this.domEvent=e}return e.prototype.getKey=function(){return o.keyCodeToString(this.domEvent.keyCode)},e.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},e.prototype.isInAnnotationLane=function(){return"annotation"===this.gutterKeyboardHandler.activeLane},e.prototype.isInFoldLane=function(){return"fold"===this.gutterKeyboardHandler.activeLane},e}();t.GutterKeyboardEvent=a})),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=e("./lib/oop"),s=e("./lib/dom"),a=e("./lib/lang"),r=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,d=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,p=e("./edit_session").EditSession,h=e("./search").Search,g=e("./range").Range,m=e("./lib/event_emitter").EventEmitter,b=e("./commands/command_manager").CommandManager,f=e("./commands/default_commands").commands,x=e("./config"),y=e("./token_iterator").TokenIterator,v=e("./keyboard/gutter_handler").GutterKeyboardHandler,k=e("./config").nls,w=e("./clipboard"),_=e("./lib/keys"),C=e("./lib/event"),j=e("./tooltip").HoverTooltip,$=function(){function e(t,n,o){this.session,this.$toDestroy=[];var i=t.getContainerElement();this.container=i,this.renderer=t,this.id="editor"+ ++e.$uid,this.commands=new b(r.isMac?"mac":"win",f),"object"==typeof document&&(this.textInput=new l(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new d(this)),this.keyBinding=new u(this),this.$search=(new h).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(n||o&&o.session||new p("")),x.resetOptions(this),o&&this.setOptions(o),x._signal("editor",this)}return e.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},e.prototype.startOperation=function(e){this.session.startOperation(e)},e.prototype.endOperation=function(e){this.session.endOperation(e)},e.prototype.onStartOperation=function(e){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,e||(this.previousCommand=null)},e.prototype.onEndOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue)return void(this.curOp=null);if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var o=this.selection.getRange(),i=this.renderer.layerConfig;(o.start.row>=i.lastRow||o.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,o=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var i=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),o=o&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else o=o&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(o=!1),o?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},e.prototype.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this |
| 34 |
;x.loadModule(["keybinding",e],(function(o){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(o&&o.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),t&&(t.$editor=null),e&&e._signal("changeEditor",{editor:this}),e&&(e.$editor=this),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e){this.renderer.setStyle(e)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption("fontSize")||s.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption("fontSize",e)},e.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=e.getCursorPosition(),o=e.getKeyboardHandler(),i=o&&o.$getDirectionForHighlight&&o.$getDirectionForHighlight(e),s=t.getMatchingBracketRanges(n,i);if(!s){var a=new y(t,n.row,n.column).getCurrentToken();if(a&&/\b(?:tag-open|tag-name)/.test(a.type)){var r=t.getMatchingTags(n);r&&(s=[r.openTagName.isEmpty()?r.openTag:r.openTagName,r.closeTagName.isEmpty()?r.closeTag:r.closeTagName])}}if(!s&&t.$mode.getMatching&&(s=t.$mode.getMatching(e.session)),s){var l="ace_bracket";Array.isArray(s)?1==s.length&&(l="ace_error_bracket"):s=[s],2==s.length&&(0==g.comparePoints(s[0].end,s[1].start)?s=[g.fromPoints(s[0].start,s[1].end)]:0==g.comparePoints(s[0].start,s[1].end)&&(s=[g.fromPoints(s[1].start,s[0].end)])),t.$bracketHighlight={ranges:s,markerIds:s.map((function(e){return t.addMarker(e,l,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()},e.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},e.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},e.prototype.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new g(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n |
| 35 |
}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},e.prototype.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),o=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",o)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,o=t.end.column,i=e.getLine(t.start.row),s=i.substring(n,o);if(!(s.length>5e3)&&/[\w\d]/.test(s)){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s}),r=i.substring(n-1,o+1);if(a.test(r))return a}}},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var o=this.selection.getAllRanges(),i=0;i<o.length;i++){var s=o[i];i&&o[i-1].start.row==s.start.row||(e+=this.session.getLine(s.start.row)+t)}}var a={text:e};return this._signal("copy",a),w.lineMode=!!n&&a.text,a.text},e.prototype.onCopy=function(){this.commands.exec("copy",this)},e.prototype.onCut=function(){this.commands.exec("cut",this)},e.prototype.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},e.prototype.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text,n=t===w.lineMode,o=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?o.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(n)this.selection.rangeList.ranges.forEach((function(e){o.insert({row:e.start.row,column:0},t)}));else{var i=t.split(/\r\n|\r|\n/),s=this.selection.rangeList.ranges,a=!(2!=i.length||i[0]&&i[1]);if(i.length!=s.length||a)return this.commands.exec("insertstring",this,t);for(var r=s.length;r--;){var l=s[r];l.isEmpty()||o.remove(l),o.insert(l.start,i[r])}}},e.prototype.execCommand=function(e,t){return this.commands.exec(e,this,t)},e.prototype.insert=function(e,t){var n=this.session,o=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var s=o.transformAction(n.getState(i.row),"insertion",this,n,e);s&&(e!==s.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=s.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty())this.session.getOverwrite()&&-1==e.indexOf("\n")&&((a=g.fromPoints(i,i)).end.column+=e.length,this.session.remove(a));else{var a=this.getSelectionRange();i=this.session.remove(a),this.clearSelection()}if("\n"==e||"\r\n"==e){var r=n.getLine(i.row);if(i.column>r.search(/\S|$/)){var l=r.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+l)}}this.clearSelection();var c=i.column,d=n.getState(i.row),u=(r=n.getLine(i.row),o.checkOutdent(d,r,e));if(n.insert(i,e),s&&s.selection&&(2==s.selection.length?this.selection.setSelectionRange(new g(i.row,c+s.selection[0],i.row,c+s.selection[1])):this.selection.setSelectionRange(new g(i.row+s.selection[0],s.selection[1],i.row+s.selection[2],s.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var p=o.getNextLineIndent(d,r.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},p)}u&&o.autoOutdent(d,n,i.row)}},e.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),n=this.selection.isEmpty()?[new g(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),o="",i="",s="",a=e.getTabString(),r=0;r<n.length;r++)for(var l=n[r].start.row,c=n[r].end.row,d=l;d<=c;d++){d>0&&(o=e.getState(d-1),i=e.getLine(d-1),s=t.getNextLineIndent(o,i,a));var u=e.getLine(d),p=t.$getIndent(u);if(s!==p){if(p.length>0){var h=new g(d,0,d,p.length);e.remove(h)}s.length>0&&e.insert({row:d,column:0},s)}t.autoOutdent(o,e,d)}},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},e.prototype.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},e.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},e.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},e.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},e.prototype.getDragDelay=function(){return this.getOption("dragDelay")},e.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},e.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},e.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},e.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption("readOnly",e)}, |
| 36 |
e.prototype.getReadOnly=function(){return this.getOption("readOnly")},e.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},e.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},e.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},e.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,o=n.getState(t.start.row),i=n.getMode().transformAction(o,"deletion",this,n,t);if(0===t.end.column){var s=n.getTextRange(t);if("\n"==s[s.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,o,i=this.session.getLine(e.row);t<i.length?(n=i.charAt(t)+i.charAt(t-1),o=new g(e.row,t-1,e.row,t+1)):(n=i.charAt(t-1)+i.charAt(t-2),o=new g(e.row,t-2,e.row,t)),this.session.replace(o,n),this.session.selection.moveToPosition(o.end)}}},e.prototype.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},e.prototype.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},e.prototype.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n))return d=this.$getSelectedRows(),void e.indentRows(d.first,d.last,"\t")}var o=e.getLine(t.start.row),i=t.start,s=e.getTabSize(),r=e.documentToScreenColumn(i.row,i.column);if(this.session.getUseSoftTabs())var l=s-r%s,c=a.stringRepeat(" ",l);else{for(l=r%s;" "==o[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var d=this.$getSelectedRows();e.indentRows(d.first,d.last,"\t")},e.prototype.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},e.prototype.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},e.prototype.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],o=e.first;o<=e.last;o++)n.push(t.getLine(o));n.sort((function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0}));var i=new g(0,0,0,0);for(o=e.first;o<=e.last;o++){var s=t.getLine(o);i.start.row=o,i.end.row=o,i.end.column=s.length,t.replace(i,n[o-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},e.prototype.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var o=this.session.getLine(e);n.lastIndex<t;){var i=n.exec(o);if(i.index<=t&&i.index+i[0].length>=t)return{value:i[0],start:i.index,end:i.index+i[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,o=new g(t,n-1,t,n),i=this.session.getTextRange(o);if(!isNaN(parseFloat(i))&&isFinite(i)){var s=this.getNumberAt(t,n);if(s){var a=s.value.indexOf(".")>=0?s.start+s.value.indexOf(".")+1:s.end,r=s.start+s.value.length-a,l=parseFloat(s.value);l*=Math.pow(10,r),a!==s.end&&n<a?e*=Math.pow(10,s.end-n-1):e*=Math.pow(10,s.end-n),l+=e;var c=(l/=Math.pow(10,r)).toFixed(r),d=new g(t,s.start,t,s.end);this.session.replace(d,c),this.moveCursorTo(t,Math.max(s.start+1,n+c.length-s.value.length))}}else this.toggleWord()},e.prototype.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),o=this.selection.getWordRange().start.column,i=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),s=t-o-1;s<0&&(s=0);var r=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&i.forEach((function(t,i){l=r+t.length,s>=r&&s<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,r+o),c.selection.selectTo(e,l+o)),r=l}));for(var d,u=this.$toggleWordPairs,p=0;p<u.length;p++)for(var h=u[p],g=0;g<=1;g++){var m=+!g,b=n.match(new RegExp("^\\s?_?("+a.escapeRegExp(h[g])+")\\s?$","i"));b&&n.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(b[1])+")($|\\s)","g"))&&(d=n.replace(new RegExp(a.escapeRegExp(h[g]),"i"),(function(e){var t=h[m];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+h[m].charAt(0).toUpperCase()+t.substr(1)),t})),this.insert(d),d="")}},e.prototype.findLinkAt=function(e,t){var n,i,s=this.session.getLine(e).split(/((?:https?|ftp):\/\/[\S]+)/),a=t;a<0&&(a=0);var r,l=0,c=0;try{for(var d=o(s),u=d.next();!u.done;u=d.next()){var p=u.value;if(c=l+p.length,a>=l&&a<=c&&p.match(/((?:https?|ftp):\/\/[\S]+)/)){r=p.replace(/[\s:.,'";}\]]+$/,"");break}l=c}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return r},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),o=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var s=o?n.start:n.end,a=t.insert(s,t.getTextRange(n));n.start=s,n.end=a,e.setSelectionRange(n,o)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){ |
| 37 |
this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var n,o,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var s=i.toOrientedRange();n=this.$getSelectedRows(s),o=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(o=0),s.moveBy(o,0),i.fromOrientedRange(s)}else{var a=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var r=0,l=0,c=a.length,d=0;d<c;d++){var u=d;a[d].moveBy(r,0);for(var p=(n=this.$getSelectedRows(a[d])).first,h=n.last;++d<c;){l&&a[d].moveBy(l,0);var g=this.$getSelectedRows(a[d]);if(t&&g.first!=h)break;if(!t&&g.first>h+1)break;h=g.last}for(d--,r=this.session.$moveLines(p,h,t?0:e),t&&-1==e&&(u=d+1);u<=d;)a[u].moveBy(r,0),u++;t||(r=0),l+=r}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var n=this.renderer,o=this.renderer.layerConfig,i=e*Math.floor(o.height/o.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(i,0)})):!1===t&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection());var s=n.scrollTop;n.scrollBy(0,i*o.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(s)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,n,o){this.renderer.scrollToLine(e,t,n,o)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),o=new y(this.session,n.row,n.column),i=o.getCurrentToken(),s=0;i&&-1!==i.type.indexOf("tag-name")&&(i=o.stepBackward());var a=i||o.stepForward();if(a){var r,l,c=!1,d={},u=n.column-a.start,p={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(a.value.match(/[{}()\[\]]/g)){for(;u<a.value.length&&!c;u++)if(p[a.value[u]])switch(l=p[a.value[u]]+"."+a.type.replace("rparen","lparen"),isNaN(d[l])&&(d[l]=0),a.value[u]){case"(":case"[":case"{":d[l]++;break;case")":case"]":case"}":d[l]--,-1===d[l]&&(r="bracket",c=!0)}}else-1!==a.type.indexOf("tag-name")&&(isNaN(d[a.value])&&(d[a.value]=0),"<"===i.value&&s>1?d[a.value]++:"</"===i.value&&d[a.value]--,-1===d[a.value]&&(r="tag",c=!0));c||(i=a,s++,a=o.stepForward(),u=0)}while(a&&!c);if(r){var h,m;if("bracket"===r)(h=this.session.getBracketRange(n))||(m=(h=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn()+u-1,o.getCurrentTokenRow(),o.getCurrentTokenColumn()+u-1)).start,(t||m.row===n.row&&Math.abs(m.column-n.column)<2)&&(h=this.session.getBracketRange(m)));else if("tag"===r){if(!a||-1===a.type.indexOf("tag-name"))return;if(0===(h=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn()-2,o.getCurrentTokenRow(),o.getCurrentTokenColumn()-2)).compare(n.row,n.column)){var b=this.session.getMatchingTags(n);b&&(b.openTag.contains(n.row,n.column)?m=(h=b.closeTag).start:(h=b.openTag,m=b.closeTag.start.row===n.row&&b.closeTag.start.column===n.column?h.end:h.start))}m=m||h.start}(m=h&&h.cursor||m)&&(e?h&&t?this.selection.setRange(h):h&&h.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(m.row,m.column):this.selection.moveTo(m.row,m.column))}}},e.prototype.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},e.prototype.navigateTo=function(e,t){this.selection.moveTo(e,t)},e.prototype.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},e.prototype.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},e.prototype.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},e.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},e.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},e.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},e.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},e.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},e.prototype.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),o=0;return n?(this.$tryReplace(n,e)&&(o=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),o):o},e.prototype.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),o=0;if(!n.length)return o;var i=this.getSelectionRange();this.selection.moveTo(0,0);for(var s=n.length-1;s>=0;--s)this.$tryReplace(n[s],e)&&o++;return this.selection.setSelectionRange(i),o},e.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&i.mixin(t,e);var o=this.selection.getRange() |
| 38 |
;null==t.needle&&((e=this.session.getTextRange(o)||this.$search.$options.needle)||(o=this.session.getWordRange(o.start.row,o.start.column),e=this.session.getTextRange(o)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:o});var s=this.$search.find(this.session);return t.preventScroll?s:s?(this.revealRange(s,n),s):(t.backwards?o.start=o.end:o.end=o.start,void this.selection.setRange(o))},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,o=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var s=this.on("changeSelection",(function(){o=!0})),a=this.renderer.on("beforeRender",(function(){o&&(t=n.renderer.container.getBoundingClientRect())})),r=this.renderer.on("afterRender",(function(){if(o&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,s=e.$cursorLayer.$pixelPos,a=e.layerConfig,r=s.top-a.offset;null!=(o=s.top>=0&&r+t.top<0||!(s.top<a.height&&s.top+t.top+a.lineHeight>window.innerHeight)&&null)&&(i.style.top=r+"px",i.style.left=s.left+"px",i.style.height=a.lineHeight+"px",i.scrollIntoView(o)),o=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",s),this.renderer.off("afterRender",r),this.renderer.off("beforeRender",a))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,s.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},e.prototype.prompt=function(e,t,n){var o=this;x.loadModule("ace/ext/prompt",(function(i){i.prompt(o,e,t,n)}))},e}();$.$uid=0,$.prototype.curOp=null,$.prototype.prevOp={},$.prototype.$mergeableCommands=["backspace","del","insertstring"],$.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],i.implement($.prototype,m),x.defineOptions($.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){var t=this;this.textInput.setReadOnly(e),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(e){var n=!1;if(e&&"keydown"==e.type){if(!(n=e&&e.key&&1==e.key.length&&!e.ctrlKey&&!e.metaKey))return}else e&&"exec"!==e.type&&(n=!0);if(n){t.hoverTooltip||(t.hoverTooltip=new j);var o=s.createElement("div");o.textContent=k("editor.tooltip.disable-editing","Editing is disabled"),t.hoverTooltip.isOpen||t.hoverTooltip.showForRange(t,t.getSelectionRange(),o)}else t.hoverTooltip&&t.hoverTooltip.isOpen&&t.hoverTooltip.hide()});var n=this.textInput.getElement();e?(C.addListener(n,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(C.removeListener(n,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?S.attach(this):S.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?S.attach(this):S.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),s.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),s.addCssClass(this.container,"ace_hasPlaceholder");var t=s.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t,n={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},o=function(e){if(e.target==this.renderer.scroller&&e.keyCode===_.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}};e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(r.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",k("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",k("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",o.bind(this)),this.commands.addCommand(n),this.renderer.$gutter.setAttribute("tabindex",0), |
| 39 |
this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",k("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",k("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),t||(t=new v(this)),t.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",o.bind(this)),this.commands.removeCommand(n),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),t&&t.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:""},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var S={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=$})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var o=e("../lib/dom"),i=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){o.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,n){var o=t.firstRowScreen*t.lineHeight,i=Math.floor(o/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-i*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=o.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},e.prototype.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=o.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},e.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},e.prototype.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},e.prototype.createCell=function(e,t,n,i){var s=this.cellCache.pop();if(!s){var a=o.createElement("div");i&&i(a),this.element.appendChild(a),s={element:a,text:"",row:e}}return s.row=e,s},e}();t.Lines=i})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],(function(e,t,n){"use strict";var o=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/lang"),a=e("../lib/event_emitter").EventEmitter,r=e("./lines").Lines,l=e("../config").nls,c=function(){function e(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new r(this.element),this.$lines.$offsetCoefficient=1}return e.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},e.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},e.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],o=n.row,i=this.$annotations[o];i||(i=this.$annotations[o]={text:[],type:[],displayText:[]});var a=n.text,r=n.text,l=n.type;a=a?s.escapeHTML(a):n.html||"",r=r||n.html||"",-1===i.text.indexOf(a)&&(i.text.push(a),i.type.push(l),i.displayText.push(r));var c=n.className;c?i.className=c:"error"===l?i.className=" ace_error":"security"!==l||/\bace_error\b/.test(i.className)?"warning"!==l||/\bace_(error|security)\b/.test(i.className)?"info"!==l||i.className?"hint"!==l||i.className||(i.className=" ace_hint"):i.className=" ace_info":i.className=" ace_warning":i.className=" ace_security"}},e.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var o=new Array(n+1);o.unshift(t,1),this.$annotations.splice.apply(this.$annotations,o)}}},e.prototype.update=function(e){this.config=e;var t=this.session,n=e.firstRow,o=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=o,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var i=t.getNextFoldLine(n),s=i?i.start.row:1/0,a=null,r=-1,l=n;;){ |
| 40 |
if(l>s&&(l=i.end.row+1,s=(i=t.getNextFoldLine(l,i))?i.start.row:1/0),l>o){for(;this.$lines.getLength()>r+1;)this.$lines.pop();break}(a=this.$lines.get(++r))?a.row=l:(a=this.$lines.createCell(l,e,this.session,d),this.$lines.push(a)),this.$renderCell(a,e,i,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,o=t.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(i=t.getLength()+o-1);var s=n?n.getWidth(t,i,e):i.toString().length*e.characterWidth,a=this.$padding||this.$computePadding();(s+=a.left+a.right)===this.gutterWidth||isNaN(s)||(this.gutterWidth=s,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",s))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<t.length;n++){var o=t[n];if(o.row>=this.$cursorRow){if(o.row>this.$cursorRow){var i=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&i&&i.start.row==t[n-1].row))break;o=t[n-1]}o.element.className="ace_gutter-active-line "+o.element.className,this.$cursorCell=o;break}}}}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),o=this.oldLastRow;if(this.oldLastRow=n,!t||o<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(o>n)for(i=this.session.getFoldedRowCount(n+1,o);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>o&&this.$lines.push(this.$renderLines(e,o+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){for(var o=[],i=t,s=this.session.getNextFoldLine(i),a=s?s.start.row:1/0;i>a&&(i=s.end.row+1,a=(s=this.session.getNextFoldLine(i,s))?s.start.row:1/0),!(i>n);){var r=this.$lines.createCell(i,e,this.session,d);this.$renderCell(r,e,s,i),o.push(r),i++}return o},e.prototype.$renderCell=function(e,t,n,i){var s=e.element,a=this.session,r=s.childNodes[0],c=s.childNodes[1],d=s.childNodes[2],u=d.firstChild,p=a.$firstLineNumber,h=a.$breakpoints,g=a.$decorations,m=a.gutterRenderer||this.$renderer,b=this.$showFoldWidgets&&a.foldWidgets,f=n?n.start.row:Number.MAX_VALUE,x=t.lineHeight+"px",y=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",v=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",k=(m?m.getText(a,i):i+p).toString();if(this.$highlightGutterLine&&(i==this.$cursorRow||n&&i<this.$cursorRow&&i>=f&&this.$cursorRow<=n.end.row)&&(y+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),h[i]&&(y+=h[i]),g[i]&&(y+=g[i]),this.$annotations[i]&&i!==f&&(y+=this.$annotations[i].className),b){var w=b[i];null==w&&(w=b[i]=a.getFoldWidget(i))}if(w){var _="ace_fold-widget ace_"+w,C="start"==w&&i==f&&i<n.end.row;if(C){_+=" ace_closed";for(var j="",$=!1,S=i+1;S<=n.end.row;S++)if(this.$annotations[S]){if(" ace_error"===this.$annotations[S].className){$=!0,j=" ace_error_fold";break}" ace_security"===this.$annotations[S].className?($=!0,j=" ace_security_fold"):" ace_warning"===this.$annotations[S].className&&" ace_security_fold"!==j&&($=!0,j=" ace_warning_fold")}y+=j}else _+=" ace_open";c.className!=_&&(c.className=_),o.setStyle(c.style,"height",x),o.setStyle(c.style,"display","inline-block"),c.setAttribute("role","button"),c.setAttribute("tabindex","-1");var T=a.getFoldWidgetRange(i);T?c.setAttribute("aria-label",l("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[T.start.row+1,T.end.row+1])):n?c.setAttribute("aria-label",l("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[n.start.row+1,n.end.row+1])):c.setAttribute("aria-label",l("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[i+1])),C?(c.setAttribute("aria-expanded","false"),c.setAttribute("title",l("gutter.code-folding.closed.title","Unfold code"))):(c.setAttribute("aria-expanded","true"),c.setAttribute("title",l("gutter.code-folding.open.title","Fold code")))}else c&&(o.setStyle(c.style,"display","none"),c.setAttribute("tabindex","0"),c.removeAttribute("role"),c.removeAttribute("aria-label"));if($&&this.$showFoldedAnnotations){switch(d.className="ace_gutter_annotation",u.className=v,u.className+=j,o.setStyle(u.style,"height",x),o.setStyle(d.style,"display","block"),o.setStyle(d.style,"height",x),j){case" ace_error_fold":M=l("gutter.annotation.aria-label.error","Error, read annotations row $0",[k]);break;case" ace_security_fold":M=l("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[k]);break;case" ace_warning_fold":M=l("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[k])}d.setAttribute("aria-label",M),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")}else if(this.$annotations[i]){var M;switch(d.className="ace_gutter_annotation",u.className=v,this.$useSvgGutterIcons?u.className+=this.$annotations[i].className:s.classList.add(this.$annotations[i].className.replace(" ","")),o.setStyle(u.style,"height",x),o.setStyle(d.style,"display","block"),o.setStyle(d.style,"height",x),this.$annotations[i].className){case" ace_error":M=l("gutter.annotation.aria-label.error","Error, read annotations row $0",[k]);break;case" ace_security":M=l("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[k]);break;case" ace_warning":M=l("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[k]);break;case" ace_info":M=l("gutter.annotation.aria-label.info","Info, read annotations row $0",[k]);break;case" ace_hint":M=l("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[k])}d.setAttribute("aria-label",M),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")}else o.setStyle(d.style,"display","none"),d.removeAttribute("aria-label"),d.removeAttribute("role"),d.setAttribute("tabindex","0");return k!==r.data&&(r.data=k),s.className!=y&&(s.className=y),o.setStyle(e.element.style,"height",this.$lines.computeLineHeight(i,t,a)+"px"),o.setStyle(e.element.style,"top",this.$lines.computeLineTop(i,t,a)+"px"),e.text=k,"none"===d.style.display&&"none"===c.style.display?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},e.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},e.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},e.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},e.prototype.setShowFoldWidgets=function(e){e?o.addCssClass(this.element,"ace_folding-enabled"):o.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},e.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},e.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=o.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1, |
| 41 |
this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},e.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0},e}();function d(e){var t=document.createTextNode("");e.appendChild(t);var n=o.createElement("span");e.appendChild(n);var i=o.createElement("span");e.appendChild(i);var s=o.createElement("span");return i.appendChild(s),e}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer="",c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,i.implement(c.prototype,a),t.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var o=e("../range").Range,i=e("../lib/dom"),s=function(){function e(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},e.prototype.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var o=this.markers[n];if(o.range){var i=o.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),o.renderer){var s=this.$getTop(i.start.row,e),a=this.$padding+i.start.column*e.characterWidth;o.renderer(t,i,a,s,e)}else"fullLine"==o.type?this.drawFullLineMarker(t,i,o.clazz,e):"screenLine"==o.type?this.drawScreenLineMarker(t,i,o.clazz,e):i.isMultiLine()?"text"==o.type?this.drawTextMarker(t,i,o.clazz,e):this.drawMultiLineMarker(t,i,o.clazz,e):this.drawSingleLineMarker(t,i,o.clazz+" ace_start ace_br15",e)}else o.update(t,this,this.session,e)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},e.prototype.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},e.prototype.drawTextMarker=function(e,t,n,i,s){for(var a=this.session,r=t.start.row,l=t.end.row,c=r,d=0,u=0,p=a.getScreenLastRowColumn(c),h=new o(c,t.start.column,c,u);c<=l;c++)h.start.row=h.end.row=c,h.start.column=c==r?t.start.column:a.getRowWrapIndent(c),h.end.column=p,d=u,u=p,p=c+1<l?a.getScreenLastRowColumn(c+1):c==l?0:t.end.column,this.drawSingleLineMarker(e,h,n+(c==r?" ace_start":"")+" ace_br"+((c==r||c==r+1&&t.start.column?1:0)|(d<u?2:0)|(u>p?4:0)|(c==l?8:0)),i,c==l?0:1,s)},e.prototype.drawMultiLineMarker=function(e,t,n,o,i){var s=this.$padding,a=o.lineHeight,r=this.$getTop(t.start.row,o),l=s+t.start.column*o.characterWidth;if(i=i||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",o,null,i)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:"+s+"px;top:"+r+"px;left:"+l+"px;"+(i||"")),this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",o,null,i)}else{r=this.$getTop(t.end.row,o);var d=t.end.column*o.characterWidth;this.elt(n+" ace_br12","height:"+a+"px;width:"+d+"px;top:"+r+"px;left:"+s+"px;"+(i||""))}if(!((a=(t.end.row-t.start.row-1)*o.lineHeight)<=0)){r=this.$getTop(t.start.row+1,o);var u=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(u?" ace_br"+u:""),"height:"+a+"px;right:"+s+"px;top:"+r+"px;left:"+s+"px;"+(i||""))}},e.prototype.drawSingleLineMarker=function(e,t,n,o,i,s){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,o,i,s);var a=o.lineHeight,r=(t.end.column+(i||0)-t.start.column)*o.characterWidth,l=this.$getTop(t.start.row,o),c=this.$padding+t.start.column*o.characterWidth;this.elt(n,"height:"+a+"px;width:"+r+"px;top:"+l+"px;left:"+c+"px;"+(s||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,o,i,s){var a=o.lineHeight,r=this.$getTop(t.start.row,o),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+a+"px;width:"+(e.width+(i||0))+"px;top:"+r+"px;left:"+(l+e.left)+"px;"+(s||""))}),this)},e.prototype.drawFullLineMarker=function(e,t,n,o,i){var s=this.$getTop(t.start.row,o),a=o.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,o)-s),this.elt(n,"height:"+a+"px;top:"+s+"px;left:0;right:0;"+(i||""))},e.prototype.drawScreenLineMarker=function(e,t,n,o,i){var s=this.$getTop(t.start.row,o),a=o.lineHeight;this.elt(n,"height:"+a+"px;top:"+s+"px;left:0;right:0;"+(i||""))},e}();s.prototype.$padding=0,t.Marker=s})),ace.define("ace/layer/text_util",["require","exports","module"],(function(e,t,n){var o=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return o.has(e)}})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),a=e("./lines").Lines,r=e("../lib/event_emitter").EventEmitter,l=e("../config").nls,c=e("./text_util").isTextToken,d=function(){function e(e){this.dom=i,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++)this.showTabs?((o=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",o.textContent=s.stringRepeat(this.TAB_CHAR,n),t.push(o)):t.push(this.dom.createTextNode(s.stringRepeat(" ",n),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var o,i="ace_indent-guide",a=this.showSpaces?" ace_invisible ace_invisible_space":"",r=this.showSpaces?s.stringRepeat(this.SPACE_CHAR,this.tabSize):s.stringRepeat(" ",this.tabSize),l=this.showTabs?" ace_invisible ace_invisible_tab":"",c=this.showTabs?s.stringRepeat(this.TAB_CHAR,this.tabSize):r;(o=this.dom.createElement("span")).className=i+a,o.textContent=r,this.$tabStrings[" "]=o, |
| 42 |
(o=this.dom.createElement("span")).className=i+l,o.textContent=c,this.$tabStrings["\t"]=o}},e.prototype.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var o=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),s=this.element.childNodes,a=0,r=e.firstRow;r<o;r++){if(l=this.session.getFoldLine(r)){if(l.containsRow(o)){o=l.start.row;break}r=l.end.row}a++}for(var l,c=!1,d=(r=o,(l=this.session.getNextFoldLine(r))?l.start.row:1/0);r>d&&(r=l.end.row+1,d=(l=this.session.getNextFoldLine(r,l))?l.start.row:1/0),!(r>i);){var u=s[a++];if(u){this.dom.removeChildren(u),this.$renderLine(u,r,r==d&&l),c&&(u.style.top=this.$lines.computeLineTop(r,e,this.session)+"px");var p=e.lineHeight*this.session.getRowLength(r)+"px";u.style.height!=p&&(c=!0,u.style.height=p)}r++}if(c)for(;a<this.$lines.cells.length;){var h=this.$lines.cells[a++];h.element.style.top=this.$lines.computeLineTop(h.row,e,this.session)+"px"}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,o=t?t.lastRow:-1;if(!t||o<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(t.lastRow>e.lastRow)for(i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,n){for(var o=[],s=t,a=this.session.getNextFoldLine(s),r=a?a.start.row:1/0;s>r&&(s=a.end.row+1,r=(a=this.session.getNextFoldLine(s,a))?a.start.row:1/0),!(s>n);){var l=this.$lines.createCell(s,e,this.session),c=l.element;this.dom.removeChildren(c),i.setStyle(c.style,"height",this.$lines.computeLineHeight(s,e,this.session)+"px"),i.setStyle(c.style,"top",this.$lines.computeLineTop(s,e,this.session)+"px"),this.$renderLine(c,s,s==r&&a),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",o.push(l),s++}return o},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,o=this.$lines;o.getLength();)o.pop();o.push(this.$renderLinesFragment(e,t,n))},e.prototype.$renderToken=function(e,t,n,o){for(var i,a=this,r=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,d=this.dom.createFragment(this.element),u=0;i=r.exec(o);){var p=i[1],h=i[2],g=i[3],m=i[4],b=i[5];if(a.showSpaces||!h){var f=u!=i.index?o.slice(u,i.index):"";if(u=i.index+i[0].length,f&&d.appendChild(this.dom.createTextNode(f,this.element)),p){var x=a.session.getScreenTabSize(t+i.index);d.appendChild(a.$tabStrings[x].cloneNode(!0)),t+=x-1}else h?a.showSpaces?((v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",v.textContent=s.stringRepeat(a.SPACE_CHAR,h.length),d.appendChild(v)):d.appendChild(this.dom.createTextNode(h,this.element)):g?((v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",v.textContent=s.stringRepeat(a.SPACE_CHAR,g.length),d.appendChild(v)):m?(t+=1,(v=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",v.className=a.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",v.textContent=a.showSpaces?a.SPACE_CHAR:m,d.appendChild(v)):b&&(t+=1,(v=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",v.className="ace_cjk",v.textContent=b,d.appendChild(v))}}if(d.appendChild(this.dom.createTextNode(u?o.slice(u):o,this.element)),c(n.type))e.appendChild(d);else{var y="ace_"+n.type.replace(/\./g," ace_"),v=this.dom.createElement("span");"fold"==n.type&&(v.style.width=n.value.length*this.config.characterWidth+"px",v.setAttribute("title",l("inline-fold.closed.title","Unfold code"))),v.className=y,v.appendChild(d),e.appendChild(v)}return t+o.length},e.prototype.renderIndentGuide=function(e,t,n){var o=t.search(this.$indentGuideRe);if(o<=0||o>=n)return t;if(" "==t[0]){for(var i=(o-=o%this.tabSize)/this.tabSize,s=0;s<i;s++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(o)}if("\t"==t[0]){for(s=0;s<o;s++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(o)}return this.$highlightIndentGuide(),t},e.prototype.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,o=Math.floor(n/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:o,start:t.row},this.session.$bracketHighlight)for(var i=this.session.$bracketHighlight.ranges,s=0;s<i.length;s++)if(t.row!==i[s].start.row){this.$highlightIndentGuideMarker.end=i[s].start.row+1,t.row>i[s].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length)for(this.$highlightIndentGuideMarker.dir=1,s=t.row+1;s<e.length;s++){var a=e[s],r=/^\s*/.exec(a)[0].length;if(""!==a&&(this.$highlightIndentGuideMarker.end=s,r<=n))break}this.$renderHighlightIndentGuide()}}},e.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),t=0;t<e.length;t++)e[t].classList.remove("ace_indent-guide-active")},e.prototype.$setIndentGuideActive=function(e,t){if(""!==this.session.doc.getLine(e.row)){var n=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group")){if(!(e.element.childNodes.length>0))return;n=e.element.childNodes[0]}var o=n.childNodes;if(o){var i=o[t-1];i&&i.classList&&i.classList.contains("ace_indent-guide")&&i.classList.add("ace_indent-guide-active")}}},e.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(0!==t)if(1===this.$highlightIndentGuideMarker.dir)for(var n=0;n<e.length;n++){var o=e[n];if(this.$highlightIndentGuideMarker.end&&o.row>=this.$highlightIndentGuideMarker.start+1){if(o.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(o,t)}}else for(n=e.length-1;n>=0;n--)if(o=e[n],this.$highlightIndentGuideMarker.end&&o.row<this.$highlightIndentGuideMarker.start){if(o.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(o,t)}}},e.prototype.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},e.prototype.$renderWrappedLine=function(e,t,n){var o=0,i=0,a=n[0],r=0,l=this.$createLineElement();e.appendChild(l);for(var c=0;c<t.length;c++){var d=t[c],u=d.value;if(0==c&&this.displayIndentGuides){if(o=u.length,!(u=this.renderIndentGuide(l,u,a)))continue;o-=u.length}if(o+u.length<a)r=this.$renderToken(l,r,d,u),o+=u.length;else{ |
| 43 |
for(;o+u.length>=a;)r=this.$renderToken(l,r,d,u.substring(0,a-o)),u=u.substring(a-o),o=a,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(s.stringRepeat(" ",n.indent),this.element)),r=0,a=n[++i]||Number.MAX_VALUE;0!=u.length&&(o+=u.length,r=this.$renderToken(l,r,d,u))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,r,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){for(var n=0,o=0;o<t.length;o++){var i=t[o],s=i.value;if(0!=o||!this.displayIndentGuides||(s=this.renderIndentGuide(e,s))){if(n+s.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,s);n=this.$renderToken(e,n,i,s)}}},e.prototype.$renderOverflowMessage=function(e,t,n,o,i){n&&this.$renderToken(e,t,n,o.slice(0,this.MAX_LINE_LENGTH-t));var s=this.dom.createElement("span");s.className="ace_inline_button ace_keyword ace_toggle_wrap",s.textContent=i?"<hide>":"<click to see more...>",e.appendChild(s)},e.prototype.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var o=this.$getFoldLineTokens(t,n);else o=this.session.getTokens(t);var i=e;if(o.length){var s=this.session.getRowSplitData(t);s&&s.length?(this.$renderWrappedLine(e,o,s),i=e.lastChild):(i=e,this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i)),this.$renderSimpleLine(i,o))}else this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i));if(this.showEOL&&i){n&&(t=n.end.row);var a=this.dom.createElement("span");a.className="ace_invisible ace_invisible_eol",a.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,i.appendChild(a)}},e.prototype.$getFoldLineTokens=function(e,t){var n=this.session,o=[],i=n.getTokens(e);return t.walk((function(e,t,s,a,r){null!=e?o.push({type:"fold",value:e}):(r&&(i=n.getTokens(t)),i.length&&function(e,t,n){for(var i=0,s=0;s+e[i].value.length<t;)if(s+=e[i].value.length,++i==e.length)return;for(s!=t&&((a=e[i].value.substring(t-s)).length>n-t&&(a=a.substring(0,n-t)),o.push({type:e[i].type,value:a}),s=t+a.length,i+=1);s<n&&i<e.length;){var a;(a=e[i].value).length+s>n?o.push({type:e[i].type,value:a.substring(0,n-s)}):o.push(e[i]),s+=a.length,i+=1}}(i,a,s))}),t.end.row,this.session.getLine(t.end.row).length),o},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();d.prototype.EOF_CHAR="¶",d.prototype.EOL_CHAR_LF="¬",d.prototype.EOL_CHAR_CRLF="¤",d.prototype.EOL_CHAR=d.prototype.EOL_CHAR_LF,d.prototype.TAB_CHAR="—",d.prototype.SPACE_CHAR="·",d.prototype.$padding=0,d.prototype.MAX_LINE_LENGTH=1e4,d.prototype.showInvisibles=!1,d.prototype.showSpaces=!1,d.prototype.showTabs=!1,d.prototype.showEOL=!1,d.prototype.displayIndentGuides=!0,d.prototype.$highlightIndentGuides=!0,d.prototype.$tabStrings=[],d.prototype.destroy={},d.prototype.onChangeTabSize=d.prototype.$computeTabString,o.implement(d.prototype,r),t.Text=d})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var o=e("../lib/dom"),i=function(){function e(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),o.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)o.setStyle(t[n].style,"opacity",e?"":"0")},e.prototype.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&o.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,o.removeCssClass(this.element,"ace_animate-blinking")},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,o.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=o.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,o.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,o.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,o.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&o.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),o.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.top<t.maxHeight},e.prototype.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,i=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]),n=0;for(var s=t.length;n<s;n++){var a=this.getPixelPosition(t[n].cursor,!0);if(!((a.top>e.height+e.offset||a.top<0)&&n>1)){var r=this.cursors[i++]||this.addCursor(),l=r.style;this.drawCursor?this.drawCursor(r,a,e,t[n],this.session):this.isCursorInView(a,e)?(o.setStyle(l,"display","block"),o.translate(r,a.left,a.top),o.setStyle(l,"width",Math.round(e.characterWidth)+"px"),o.setStyle(l,"height",e.lineHeight+"px")):o.setStyle(l,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=a,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?o.addCssClass(this.element,"ace_overwrite-cursors"):o.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();i.prototype.$padding=0,i.prototype.drawCursor=null,t.Cursor=i})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=e("./lib/oop"),a=e("./lib/dom"),r=e("./lib/event"),l=e("./lib/event_emitter").EventEmitter,c=32768,d=function(){function e(e,t){this.element=a.createElement("div"), |
| 44 |
this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=a.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,r.addListener(this.element,"scroll",this.onScroll.bind(this)),r.addListener(this.element,"mousedown",r.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();s.implement(d.prototype,l);var u=function(e){function t(t,n){var o=e.call(this,t,"-v")||this;return o.scrollTop=0,o.scrollHeight=0,n.$scrollbarWidth=o.width=a.scrollbarWidth(t.ownerDocument),o.inner.style.width=o.element.style.width=(o.width||15)+5+"px",o.$minWidth=0,o}return i(t,e),t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+"px"},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>c?(this.coeff=c/e,e=c):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(d);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var p=function(e){function t(t,n){var o=e.call(this,t,"-h")||this;return o.scrollLeft=0,o.height=n.$scrollbarWidth,o.inner.style.height=o.element.style.height=(o.height||15)+5+"px",o}return i(t,e),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+"px"},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(d);t.ScrollBar=u,t.ScrollBarV=u,t.ScrollBarH=p,t.VScrollBar=u,t.HScrollBar=p})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=e("./lib/oop"),a=e("./lib/dom"),r=e("./lib/event"),l=e("./lib/event_emitter").EventEmitter;a.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var c=function(){function e(e,t){this.element=a.createElement("div"),this.element.className="ace_sb"+t,this.inner=a.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,r.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();s.implement(c.prototype,l);var d=function(e){function t(t,n){var o=e.call(this,t,"-v")||this;return o.scrollTop=0,o.scrollHeight=0,o.parent=t,o.width=o.VScrollWidth,o.renderer=n,o.inner.style.width=o.element.style.width=(o.width||15)+"px",o.$minWidth=0,o}return i(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===r.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,o=t.clientY,i=t.clientY,s=this.thumbTop;r.capture(this.inner,(function(e){o=e.clientY}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==o){var e=n.scrollTopFromThumbTop(s+o-i);e!==n.scrollTop&&n._emit("scroll",{data:e})}}),20);return r.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),r.preventDefault(t)}},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t|=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(c);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var u=function(e){function t(t,n){var o=e.call(this,t,"-h")||this;return o.scrollLeft=0,o.scrollWidth=0,o.height=o.HScrollHeight,o.inner.style.height=o.element.style.height=(o.height||12)+"px",o.renderer=n,o}return i(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===r.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,o=t.clientX,i=t.clientX,s=this.thumbLeft;r.capture(this.inner,(function(e){o=e.clientX}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==o){var e=n.scrollLeftFromThumbLeft(s+o-i);e!==n.scrollLeft&&n._emit("scroll",{data:e})}}),20);return r.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),r.preventDefault(t)}},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t|=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth, |
| 45 |
this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(c);u.prototype.setInnerWidth=u.prototype.setScrollWidth,t.ScrollBar=d,t.ScrollBarV=d,t.ScrollBarH=u,t.VScrollBar=d,t.HScrollBar=u})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var o=e("./lib/event"),i=function(){function e(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(o.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(o.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=i})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var o=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),a=e("../lib/event"),r=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c=512,d="function"==typeof ResizeObserver,u=200,p=function(){function e(e){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=s.stringRepeat("X",c),this.$characterSize={width:0,height:0},d?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",r.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},e.prototype.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=a.onIdle((function t(){e.checkForSizeChanges(),a.onIdle(t,500)}),500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},e.prototype.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},e.prototype.$measureCharWidth=function(e){return this.$main.textContent=s.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return e&&e.parentElement?(Number(window.getComputedStyle(e).zoom)||1)*this.$getZoom(e.parentElement):1},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=i.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},e.prototype.transformCoordinates=function(e,t){function n(e,t,n){var o=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/o,(+e[1]*n[0]-e[0]*n[1])/o]}function o(e,t){return[e[0]-t[0],e[1]-t[1]]}function i(e,t){return[e[0]+t[0],e[1]+t[1]]}function s(e,t){return[e*t[0],e*t[1]]}function a(e){var t=e.getBoundingClientRect();return[t.left,t.top]}e&&(e=s(1/this.$getZoom(this.el),e)),this.els||this.$initTransformMeasureNodes();var r=a(this.els[0]),l=a(this.els[1]),c=a(this.els[2]),d=a(this.els[3]),p=n(o(d,l),o(d,c),o(i(l,c),i(d,r))),h=s(1+p[0],o(l,r)),g=s(1+p[1],o(c,r));if(t){var m=t,b=p[0]*m[0]/u+p[1]*m[1]/u+1,f=i(s(m[0],h),s(m[1],g));return i(s(1/b/u,f),r)}var x=o(e,r),y=n(o(h,s(p[0],x)),o(g,s(p[1],x)),x);return s(u,y)},e}();p.prototype.$characterSize={width:0,height:0},o.implement(p.prototype,l),t.FontMetrics=p})),ace.define("ace/css/editor-css",["require","exports","module"],(function(e,t,n){ |
| 46 |
n.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n.ace_invisible {\n font-variant-ligatures: none;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(33em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "↩";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}' |
| 47 |
})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var o=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/event_emitter").EventEmitter,a=function(){function e(e,t){this.canvas=o.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)}return e.prototype.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;e&&(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,(e.lastRow+1)*this.lineHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight);var n=this.canvas.getContext("2d"),o=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),o){var i={info:1,warning:2,error:3};o.forEach((function(e){e.priority=i[e.type]||null})),o=o.sort((function(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:0}));for(var s=this.renderer.session.$foldData,a=0;a<o.length;a++){var r=o[a].row,l=this.compensateFoldRows(r,s),c=Math.round((r-l)*this.lineHeight*this.heightRatio),d=Math.round((r-l)*this.lineHeight*this.heightRatio),u=Math.round(((r-l)*this.lineHeight+this.lineHeight)*this.heightRatio);if(u-d<this.minDecorationHeight){var p=(d+u)/2|0;p<this.halfMinDecorationHeight?p=this.halfMinDecorationHeight:p+this.halfMinDecorationHeight>this.canvasHeight&&(p=this.canvasHeight-this.halfMinDecorationHeight),d=Math.round(p-this.halfMinDecorationHeight),u=Math.round(p+this.halfMinDecorationHeight)}n.fillStyle=t[o[a].type]||null,n.fillRect(0,c,this.canvasWidth,u-d)}}var h=this.renderer.session.selection.getCursor();h&&(l=this.compensateFoldRows(h.row,s),c=Math.round((h.row-l)*this.lineHeight*this.heightRatio),n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,c,this.canvasWidth,2))},e.prototype.compensateFoldRows=function(e,t){var n=0;if(t&&t.length>0)for(var o=0;o<t.length;o++)e>t[o].start.row&&e<t[o].end.row?n+=e-t[o].start.row:e>=t[o].end.row&&(n+=t[o].end.row-t[o].start.row);return n},e}();i.implement(a.prototype,s),t.Decorator=a})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/lang"),a=e("./config"),r=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,d=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,p=e("./scrollbar").VScrollBar,h=e("./scrollbar_custom").HScrollBar,g=e("./scrollbar_custom").VScrollBar,m=e("./renderloop").RenderLoop,b=e("./layer/font_metrics").FontMetrics,f=e("./lib/event_emitter").EventEmitter,x=e("./css/editor-css"),y=e("./layer/decorators").Decorator,v=e("./lib/useragent"),k=e("./layer/text_util").isTextToken;i.importCssString(x,"ace_editor.css",!1);var w=function(){function e(e,t){var n=this;this.container=e||i.createElement("div"),i.addCssClass(this.container,"ace_editor"),i.HI_DPI&&i.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==a.get("useStrictCSP")&&a.set("useStrictCSP",!1),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new r(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var o=this.$textLayer=new c(this.content);this.canvas=o.element,this.$markerFront=new l(this.content),this.$cursorLayer=new d(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new b(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!v.isIOS,this.$loop=new m(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return e.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),i.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},e.prototype.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},e.prototype.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},e.prototype.onChangeTabSize=function(){ |
| 48 |
this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,n,o){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;o||(o=i.clientHeight||i.scrollHeight),!o&&this.$maxLines&&this.lineHeight>1&&(i.style.height&&"0px"!=i.style.height||(i.style.height="1px",o=i.clientHeight||i.scrollHeight)),n||(n=i.clientWidth||i.scrollWidth);var s=this.$updateCachedSize(e,t,n,o);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!n&&!o)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},e.prototype.$updateCachedSize=function(e,t,n,o){o-=this.$extraHeight||0;var s=0,a=this.$size,r={width:a.width,height:a.height,scrollerHeight:a.scrollerHeight,scrollerWidth:a.scrollerWidth};if(o&&(e||a.height!=o)&&(a.height=o,s|=this.CHANGE_SIZE,a.scrollerHeight=a.height,this.$horizScroll&&(a.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(a.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",s|=this.CHANGE_SCROLL),n&&(e||a.width!=n)){s|=this.CHANGE_SIZE,a.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,i.setStyle(this.scrollBarH.element.style,"left",t+"px"),i.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),a.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),i.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";i.setStyle(this.scrollBarH.element.style,"right",l),i.setStyle(this.scroller.style,"right",l),i.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(a.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(s|=this.CHANGE_FULL)}return a.$dirty=!n||!o,s&&this._signal("resize",r),s},e.prototype.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},e.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},e.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},e.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},e.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},e.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},e.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},e.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},e.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},e.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},e.prototype.getShowGutter=function(){return this.getOption("showGutter")},e.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var o=this.layerConfig,s=n.top,a=n.left;s-=o.offset;var r=t&&t.useTextareaForIME||v.isMobile?this.lineHeight:1;if(s<0||s>o.height-r)i.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-r;if(t)if(t.useTextareaForIME){var d=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(d)[0]}else s+=this.lineHeight+2;else s+=this.lineHeight;(a-=this.scrollLeft)>this.$size.scrollerWidth-l&&(a=this.$size.scrollerWidth-l),a+=this.gutterWidth+this.margin.left,i.setStyle(e,"height",r+"px"),i.setStyle(e,"width",l+"px"),i.translate(this.textarea,Math.min(a,this.$size.scrollerWidth-l),Math.min(s,c))}}}else i.translate(this.textarea,-100,0)}},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},e.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},e.prototype.setScrollMargin=function(e,t,n,o){var i=this.scrollMargin;i.top=0|e,i.bottom=0|t,i.right=0|o,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},e.prototype.setMargin=function(e,t,n,o){var i=this.margin;i.top=0|e,i.bottom=0|t,i.right=0|o,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},e.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight |
| 49 |
;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var o=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;o>0&&(this.scrollTop=o,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),i.translate(this.content,-this.scrollLeft,-n.offset);var s=n.width+2*this.$padding+"px",a=n.minHeight+"px";i.setStyle(this.content.style,"width",s),i.setStyle(this.content.style,"height",a)}if(e&this.CHANGE_H_SCROLL&&(i.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},e.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var o=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||o!=this.$vScroll){o!=this.$vScroll&&(this.$vScroll=o,this.scrollBarV.setVisible(o));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,o=this.session.getScreenLength()*this.lineHeight,i=this.$getLongestLine(),s=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-i-2*this.$padding<0),a=this.$horizScroll!==s;a&&(this.$horizScroll=s,this.scrollBarH.setVisible(s));var r=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),n=t.height<=2*this.lineHeight);var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;o+=c;var d=this.scrollMargin;this.session.setScrollTop(Math.max(-d.top,Math.min(this.scrollTop,o-t.scrollerHeight+d.bottom))),this.session.setScrollLeft(Math.max(-d.left,Math.min(this.scrollLeft,i+2*this.$padding-t.scrollerWidth+d.right)));var u=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-o+c<0||this.scrollTop>d.top),p=r!==u;p&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var h,g,m=this.scrollTop%this.lineHeight,b=Math.ceil(l/this.lineHeight)-1,f=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),x=f+b,y=this.lineHeight;f=e.screenToDocumentRow(f,0);var v=e.getFoldLine(f);v&&(f=v.start.row),h=e.documentToScreenRow(f,0),g=e.getRowLength(f)*y,x=Math.min(e.screenToDocumentRow(x,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(x)*y+g,m=this.scrollTop-h*y;var k=0;return(this.layerConfig.width!=i||a)&&(k=this.CHANGE_H_SCROLL),(a||p)&&(k|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),p&&(i=this.$getLongestLine())),this.layerConfig={width:i,padding:this.$padding,firstRow:f,firstRowScreen:h,lastRow:x,lineHeight:y,characterWidth:this.characterWidth,minHeight:l,maxHeight:o,offset:m,gutterOffset:y?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(i-this.$padding),k},e.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)}},e.prototype.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},e.prototype.showCursor=function(){this.$cursorLayer.showCursor()}, |
| 50 |
e.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},e.prototype.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var o=this.$cursorLayer.getPixelPosition(e),i=o.left,s=o.top,a=n&&n.top||0,r=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+a>s?(t&&l+a>s+this.lineHeight&&(s-=t*this.$size.scrollerHeight),0===s&&(s=-this.scrollMargin.top),this.session.setScrollTop(s)):l+this.$size.scrollerHeight-r<s+this.lineHeight&&(t&&l+this.$size.scrollerHeight-r<s-this.lineHeight&&(s+=t*this.$size.scrollerHeight),this.session.setScrollTop(s+this.lineHeight+r-this.$size.scrollerHeight));var c=this.scrollLeft,d=2*this.layerConfig.characterWidth;i-d<c?((i-=d)<this.$padding+d&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):(i+=d,c+this.$size.scrollerWidth<i+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&i-c<this.characterWidth&&this.session.setScrollLeft(0))}},e.prototype.getScrollTop=function(){return this.session.getScrollTop()},e.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},e.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},e.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},e.prototype.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},e.prototype.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),o=this.$size.scrollerHeight-this.lineHeight,i=n.top-o*(t||0);return this.session.setScrollTop(i),i},e.prototype.$calcSteps=function(e,t){var n,o,i=0,s=this.STEPS,a=[];for(i=0;i<s;++i)a.push((n=i/this.STEPS,o=e,(t-e)*(Math.pow(n-1,3)+1)+o));return a},e.prototype.scrollToLine=function(e,t,n,o){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(i-=this.$size.scrollerHeight/2);var s=this.scrollTop;this.session.setScrollTop(i),!1!==n&&this.animateScrolling(s,o)},e.prototype.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var o=this;if(e!=n){if(this.$scrollAnimation){var i=this.$scrollAnimation.steps;if(i.length&&(e=i[0])==n)return}var s=o.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:s},clearInterval(this.$timer),o.session.setScrollTop(s.shift()),o.session.$scrollTop=n,this.$timer=setInterval((function(){if(!o.$stopAnimation)return o.session?void(s.length?(o.session.setScrollTop(s.shift()),o.session.$scrollTop=n):null!=n?(o.session.$scrollTop=-1,o.session.setScrollTop(n),n=null):a()):clearInterval(o.$timer);a()}),10)}}function a(){o.$timer=clearInterval(o.$timer),o.$scrollAnimation=null,o.$stopAnimation=!1,t&&t()}},e.prototype.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},e.prototype.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},e.prototype.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(e)},e.prototype.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},e.prototype.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},e.prototype.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var o=this.$fontMetrics.transformCoordinates([e,t]);e=o[1]-this.gutterWidth-this.margin.left,t=o[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,s=i/this.characterWidth,a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),r=this.$blockCursor?Math.floor(s):Math.round(s);return{row:a,column:r,side:s-r>0?1:-1,offsetX:i}},e.prototype.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var o=this.$fontMetrics.transformCoordinates([e,t]);e=o[1]-this.gutterWidth-this.margin.left,t=o[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,s=i/this.characterWidth,a=this.$blockCursor?Math.floor(s):Math.round(s),r=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(r,Math.max(a,0),i)},e.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),o=this.session.documentToScreenPosition(e,t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,e)?this.session.$bidiHandler.getPosLeft(o.column):Math.round(o.column*this.characterWidth)),s=o.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+s-this.scrollTop}},e.prototype.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),i.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},e.prototype.setGhostText=function(e,t){var n=this.session.selection.cursor,o=t||{row:n.row,column:n.column};this.removeGhostText();var s=this.$calculateWrappedTextChunks(e,o);this.addToken(s[0].text,"ghost_text",o.row,o.column),this.$ghostText={text:e,position:{row:o.row,column:o.column}};var a=i.createElement("div");if(s.length>1){var r,l=this.hideTokensAfterPosition(o.row,o.column);s.slice(1).forEach((function(e){var t=i.createElement("div"),n=i.createElement("span");n.className="ace_ghost_text",e.wrapped&&(t.className="ghost_text_line_wrapped"),0===e.text.length&&(e.text=" "),n.appendChild(i.createTextNode(e.text)),t.appendChild(n),a.appendChild(t),r=t})),l.forEach((function(e){var t=i.createElement("span");k(e.type)||(t.className="ace_"+e.type.replace(/\./g," ace_")),t.appendChild(i.createTextNode(e.value)),r.appendChild(t)})),this.$ghostTextWidget={el:a,row:o.row,column:o.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var c=this.$cursorLayer.getPixelPosition(o,!0),d=this.container.getBoundingClientRect().height,u=s.length*this.lineHeight;if(u<d-c.top)return;u<d?this.scrollBy(0,(s.length-1)*this.lineHeight):this.scrollToRow(o.row)}},e.prototype.$calculateWrappedTextChunks=function(e,t){var n=this.$size.scrollerWidth-2*this.$padding,o=Math.floor(n/this.characterWidth)-2;o=o<=0?60:o;for(var i=e.split(/\r?\n/),s=[],a=0;a<i.length;a++){var r=this.session.$getDisplayTokens(i[a],t.column),l=this.session.$computeWrapSplits(r,o,this.session.$tabSize);if(l.length>0){var c=0;l.push(i[a].length);for(var d=0;d<l.length;d++){var u=i[a].slice(c,l[d]);s.push({text:u,wrapped:!0}),c=l[d]}}else s.push({text:i[a],wrapped:!1})}return s},e.prototype.removeGhostText=function(){ |
| 51 |
if(this.$ghostText){var e=this.$ghostText.position;this.removeExtraToken(e.row,e.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},e.prototype.addToken=function(e,t,n,o){var i=this.session;i.bgTokenizer.lines[n]=null;var s={type:t,value:e},a=i.getTokens(n);if(null!=o&&a.length)for(var r=0,l=0;l<a.length;l++){var c=a[l];if(o<=(r+=c.value.length)){var d=c.value.length-(r-o),u=c.value.slice(0,d),p=c.value.slice(d);a.splice(l,1,{type:c.type,value:u},s,{type:c.type,value:p});break}}else a.push(s);this.updateLines(n,n)},e.prototype.hideTokensAfterPosition=function(e,t){for(var n=this.session.getTokens(e),o=0,i=!1,s=[],a=0;a<n.length;a++){var r=n[a];o+=r.value.length,"ghost_text"!==r.type&&(i?(s.push({type:r.type,value:r.value}),r.type="hidden_token"):o===t&&(i=!0))}return this.updateLines(e,e),s},e.prototype.removeExtraToken=function(e,t){this.session.bgTokenizer.lines[e]=null,this.updateLines(e,e)},e.prototype.setTheme=function(e,t){var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)s(e);else{var o=e||this.$options.theme.initialValue;a.loadModule(["theme",o],s)}function s(o){if(n.$themeId!=e)return t&&t();if(!o||!o.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");o.$id&&(n.$themeId=o.$id),i.importCssString(o.cssText,o.cssClass,n.container),n.theme&&i.removeCssClass(n.container,n.theme.cssClass);var s="padding"in o?o.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&s!=n.$padding&&n.setPadding(s),n.$theme=o.cssClass,n.theme=o,i.addCssClass(n.container,o.cssClass),i.setCssClass(n.container,"ace_dark",o.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:o}),t&&t(),v.isSafari&&n.scroller&&(n.scroller.style.background="red",n.scroller.style.background="")}},e.prototype.getTheme=function(){return this.$themeId},e.prototype.setStyle=function(e,t){i.setCssClass(this.container,e,!1!==t)},e.prototype.unsetStyle=function(e){i.removeCssClass(this.container,e)},e.prototype.setCursorStyle=function(e){i.setStyle(this.scroller.style,"cursor",e)},e.prototype.setMouseCursor=function(e){i.setStyle(this.scroller.style,"cursor",e)},e.prototype.attachToShadowRoot=function(){i.importCssString(x,"ace_editor.css",this.container)},e.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},e.prototype.$updateCustomScrollbar=function(e){var t=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,!0===e?(this.scrollBarV=new g(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)})),this.$scrollDecorator=new y(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new p(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)})))},e.prototype.$addResizeObserver=function(){if(window.ResizeObserver&&!this.$resizeObserver){var e=this;this.$resizeTimer=s.delayedCall((function(){e.destroyed||e.onResize()}),50),this.$resizeObserver=new window.ResizeObserver((function(t){var n=t[0].contentRect.width,o=t[0].contentRect.height;Math.abs(e.$size.width-n)>1||Math.abs(e.$size.height-o)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container)}},e}();w.prototype.CHANGE_CURSOR=1,w.prototype.CHANGE_MARKER=2,w.prototype.CHANGE_GUTTER=4,w.prototype.CHANGE_SCROLL=8,w.prototype.CHANGE_LINES=16,w.prototype.CHANGE_TEXT=32,w.prototype.CHANGE_SIZE=64,w.prototype.CHANGE_MARKER_BACK=128,w.prototype.CHANGE_MARKER_FRONT=256,w.prototype.CHANGE_FULL=512,w.prototype.CHANGE_H_SCROLL=1024,w.prototype.$changes=0,w.prototype.$padding=null,w.prototype.$frozen=!1,w.prototype.STEPS=8,o.implement(w.prototype,f),a.defineOptions(w.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!v.isMobile&&!v.isIE}}),t.VirtualRenderer=w})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("../lib/net"),s=e("../lib/event_emitter").EventEmitter,a=e("../config");function r(e){ |
| 52 |
if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+i.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){o.implement(this,s),this.$createWorkerFromOldConfig=function(t,n,o,i,s){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)i=i||a.moduleUrl(n,"worker");else{var l=this.$normalizePath;i=i||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=r(i),s&&this.send("importScripts",s),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:o}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return i.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var o=this.callbackId++;this.callbacks[o]=n,t.push(o)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype),t.UIWorkerClient=function(e,t,n){var o=null,i=!1,r=Object.create(s),c=[],d=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),o&&(i?setTimeout(u):u())}});d.setEmitSync=function(e){i=e};var u=function(){var e=c.shift();e.command?o[e.command].apply(o,e.args):e.event&&r._signal(e.event,e.data)};return r.postMessage=function(e){d.onMessage({data:e})},r.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},r.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],(function(e){for(o=new e[n](r);c.length;)u()})),d},t.WorkerClient=l,t.createWorker=r})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var o=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop"),a=function(){function e(e,t,n,o,i,s){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=o,this.$onCursorChange=function(){setTimeout((function(){a.onCursorChange()}))},this.$pos=n;var r=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=r.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new o(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var o=t.createAnchor(n.row,n.column);o.$insertRight=!0,o.detach(),e.others.push(o)})),n.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new o(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},e.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},e.prototype.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,i=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,s=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var r={row:(l=this.others[a]).row,column:l.column+s};this.doc.insertMergedLines(r,e.lines)}else if("remove"===e.action)for(a=this.others.length-1;a>=0;a--){var l;r={row:(l=this.others[a]).row,column:l.column+s},this.doc.remove(new o(r.row,r.column,r.row,r.column-n))}this.$updating=!1,this.updateMarkers()}},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new o(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)}},e.prototype.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},e.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},e.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},e}();s.implement(a.prototype,i),t.PlaceHolder=a})),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var o=e("../lib/event"),i=e("../lib/useragent");function s(e,t){return e.row==t.row&&e.column==t.column}t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,a=t.shiftKey,r=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(r&&i.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(r||n||l){if(0===c){ |
| 53 |
var d,u=e.editor,p=u.selection,h=u.inMultiSelectMode,g=e.getDocumentPosition(),m=p.getCursor(),b=e.inSelection()||p.isEmpty()&&s(g,m),f=e.x,x=e.y,y=u.session,v=u.renderer.pixelToScreenCoordinates(f,x),k=v;if(u.$mouseHandler.$enableJumpToDef)r&&n||l&&n?d=a?"block":"add":n&&u.$blockSelectEnabled&&(d="block");else if(l&&!n){if(d="add",!h&&a)return}else n&&u.$blockSelectEnabled&&(d="block");if(d&&i.isMac&&t.ctrlKey&&u.$mouseHandler.cancelContextMenu(),"add"==d){if(!h&&b)return;if(!h){var w=p.toOrientedRange();u.addSelectionMarker(w)}var _=p.rangeList.rangeAtPoint(g);u.inVirtualSelectionMode=!0,a&&(_=null,w=p.ranges[0]||w,u.removeSelectionMarker(w)),u.once("mouseup",(function(){var e=p.toOrientedRange();_&&e.isEmpty()&&s(_.cursor,e.cursor)?p.substractPoint(e.cursor):(a?p.substractPoint(w.cursor):w&&(u.removeSelectionMarker(w),p.addRange(w)),p.addRange(e)),u.inVirtualSelectionMode=!1}))}else if("block"==d){var C;e.stop(),u.inVirtualSelectionMode=!0;var j=[],$=function(){var e=u.renderer.pixelToScreenCoordinates(f,x),t=y.screenToDocumentPosition(e.row,e.column,e.offsetX);s(k,e)&&s(t,p.lead)||(k=e,u.selection.moveToPosition(t),u.renderer.scrollCursorIntoView(),u.removeSelectionMarkers(j),j=p.rectangularRangeBlock(k,v),u.$mouseHandler.$clickSelection&&1==j.length&&j[0].isEmpty()&&(j[0]=u.$mouseHandler.$clickSelection.clone()),j.forEach(u.addSelectionMarker,u),u.updateSelectionMarkers())};h&&!l?p.toSingleRange():!h&&l&&(C=p.toOrientedRange(),u.addSelectionMarker(C)),a?v=y.documentToScreenPosition(p.lead):p.moveToPosition(g),k={row:-1,column:-1};var S=$;o.capture(u.container,(function(e){f=e.clientX,x=e.clientY}),(function(e){$(),clearInterval(T),u.removeSelectionMarkers(j),j.length||(j=[p.toOrientedRange()]),C&&(u.removeSelectionMarker(C),p.toSingleRange(C));for(var t=0;t<j.length;t++)p.addRange(j[t]);u.inVirtualSelectionMode=!1,u.$mouseHandler.$clickSelection=null}));var T=setInterval((function(){S()}),20);return e.preventDefault()}}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}})),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],(function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(e){e.multiSelect.rangeCount>1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var o=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new o(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var o=e("./range_list").RangeList,i=e("./range").Range,s=e("./selection").Selection,a=e("./mouse/multi_select_handler").onMouseDown,r=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var d=new(0,e("./search").Search),u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var o=this.rangeList.add(e);return this.$onAddRange(e),o.length&&this.$onRemoveRange(o),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var o=this.ranges.indexOf(e[n]);this.ranges.splice(o,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new o,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n<e.length;n++){var o=e[n],s=o.start.row,a=o.end.row;if(s===a)t.push(o.clone());else{for(t.push(new i(s,o.start.column,s,this.session.getLine(s).length));++s<a;)t.push(this.getLineRange(s,!0));t.push(new i(a,0,a,o.end.column))}0!=n||this.isBackwards()||(t=t.reverse())}for(this.toSingleRange(),n=t.length;n--;)this.addRange(t[n])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}, |
| 54 |
this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var o=this.session.documentToScreenPosition(this.cursor),s=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(o,s).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var o=[],s=e.column<t.column;if(s)var a=e.column,r=t.column,l=e.offsetX,c=t.offsetX;else a=t.column,r=e.column,l=t.offsetX,c=e.offsetX;var d,u,p,h=e.row<t.row;if(h)var g=e.row,m=t.row;else g=t.row,m=e.row;a<0&&(a=0),g<0&&(g=0),g==m&&(n=!0);for(var b=g;b<=m;b++){var f=i.fromPoints(this.session.screenToDocumentPosition(b,a,l),this.session.screenToDocumentPosition(b,r,c));if(f.isEmpty()){if(d&&(p=d,(u=f.end).row==p.row&&u.column==p.column))break;d=f.end}f.cursor=s?f.start:f.end,o.push(f)}if(h&&o.reverse(),!n){for(var x=o.length-1;o[x].isEmpty()&&x>0;)x--;if(x>0)for(var y=0;o[y].isEmpty();)y++;for(var v=x;v>=y;v--)o[v].isEmpty()&&o.splice(v,1)}return o}}.call(s.prototype);var p=e("./editor").Editor;function h(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",a),e.commands.addCommands(c.defaultCommands),function(e){if(e.textInput){var t=e.textInput.getElement(),n=!1;r.addListener(t,"keydown",(function(t){var i=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&i?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&o()}),e),r.addListener(t,"keyup",o,e),r.addListener(t,"blur",o,e)}function o(t){n&&(e.renderer.setMouseCursor(""),n=!1)}}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var o=e[n];if(o.marker){this.session.removeMarker(o.marker);var i=t.indexOf(o);-1!=i&&t.splice(i,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?o=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?o=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),o=t.exec(n,e.args||{})):o=t.multiSelectAction(n,e.args||{});else{var o=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return o}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var o,i=n&&n.keepOrder,a=1==n||n&&n.$byLines,r=this.session,l=this.selection,c=l.rangeList,d=(i?l:c).ranges;if(!d.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=l._eventRegistry;l._eventRegistry={};var p=new s(r);this.inVirtualSelectionMode=!0;for(var h=d.length;h--;){if(a)for(;h>0&&d[h].start.row==d[h-1].end.row;)h--;p.fromOrientedRange(d[h]),p.index=h,this.selection=r.selection=p;var g=e.exec?e.exec(this,t||{}):e(this,t||{});o||void 0===g||(o=g),p.toOrientedRange(d[h])}p.detach(),this.selection=r.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),o}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],o=0;o<t.length;o++)n.push(this.session.getTextRange(t[o]));var i=this.session.getDocument().getNewLineCharacter();(e=n.join(i)).length==(n.length-1)*i.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var o=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;o.row!=t.row||this.session.$clipPositionToDocument(o.row,o.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(e,t,n){if((t=t||{}).needle=e||t.needle,null==t.needle){var o=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(o)}this.$search.set(t);var i=this.$search.findAll(this.session);if(!i.length)return 0;var s=this.multiSelect;n||s.toSingleRange(i[0]);for(var a=i.length;a--;)s.addRange(i[a],!0);return o&&s.rangeList.rangeAtPoint(o.start)&&s.addRange(o,!0),i.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),o=n.cursor==n.end,s=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(s.column=this.selection.$desiredColumn);var a,r=this.session.screenToDocumentPosition(s.row+e,s.column);if(n.isEmpty())c=r;else var l=this.session.documentToScreenPosition(o?n.end:n.start),c=this.session.screenToDocumentPosition(l.row+e,l.column);if(o?(a=i.fromPoints(r,c)).cursor=a.start:(a=i.fromPoints(c,r)).cursor=a.end,a.desiredColumn=s.column,this.selection.inMultiSelectMode){if(t)var d=n.cursor}else this.selection.addRange(n);this.selection.addRange(a),d&&this.selection.substractPoint(d)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,o=n.ranges,i=o.length;i--;)if((r=o[i]).isEmpty()){var s=t.getWordRange(r.start.row,r.start.column);r.start.row=s.start.row,r.start.column=s.start.column,r.end.row=s.end.row,r.end.column=s.end.column}n.mergeOverlappingRanges();var a=[];for(i=o.length;i--;){var r=o[i];a.unshift(t.getTextRange(r))}for(e<0?a.unshift(a.pop()):a.push(a.shift()),i=o.length;i--;){var l=(r=o[i]).clone();t.replace(r,a[i]),r.start.row=l.start.row,r.start.column=l.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var o=this.session,i=o.multiSelect.toOrientedRange();if(!i.isEmpty()||((i=o.getWordRange(i.start.row,i.start.column)).cursor=-1==e?i.start:i.end, |
| 55 |
this.multiSelect.addRange(i),!n)){var s=o.getTextRange(i),a=function(e,t,n){return d.$options.wrap=!0,d.$options.needle=t,d.$options.backwards=-1==n,d.find(e)}(o,s,e);a&&(a.cursor=-1==e?a.start:a.end,this.session.unfold(a),this.multiSelect.addRange(a),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(i.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,o=-1,s=n.filter((function(e){if(e.cursor.row==o)return!0;o=e.cursor.row}));if(n.length&&s.length!=n.length-1){s.forEach((function(e){t.substractPoint(e.cursor)}));var a=0,r=1/0,c=n.map((function(t){var n=t.cursor,o=e.getLine(n.row).substr(n.column).search(/\S/g);return-1==o&&(o=0),n.column>a&&(a=n.column),o<r&&(r=o),o}));n.forEach((function(t,n){var o=t.cursor,s=a-o.column,d=c[n]-r;s>d?e.insert(o,l.stringRepeat(" ",s-d)):e.remove(new i(o.row,o.column,o.row,o.column-s+d)),t.start.column=t.end.column=a,t.start.row=t.end.row=o.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var d=this.selection.getRange(),u=d.start.row,p=d.end.row,h=u==p;if(h){var g,m=this.session.getLength();do{g=this.session.getLine(p)}while(/[=:]/.test(g)&&++p<m);do{g=this.session.getLine(u)}while(/[=:]/.test(g)&&--u>0);u<0&&(u=0),p>=m&&(p=m-1)}var b=this.session.removeFullLines(u,p);b=this.$reAlignText(b,h),this.session.insert({row:u,column:0},b.join("\n")+"\n"),h||(d.start.column=0,d.end.column=b[b.length-1].length),this.selection.setRange(d)}},this.$reAlignText=function(e,t){var n,o,i,s=!0,a=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,o=t[2].length,i=t[3].length,t):(n+o+i!=t[1].length+t[2].length+t[3].length&&(a=!1),n!=t[1].length&&(s=!1),n>t[1].length&&(n=t[1].length),o<t[2].length&&(o=t[2].length),i>t[3].length&&(i=t[3].length),t):[e]})).map(t?c:s?a?function(e){return e[2]?r(n+o-e[2].length)+e[2]+r(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?r(n)+e[2]+r(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function r(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?r(n)+e[2]+r(o-e[2].length+i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(p.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=h,e("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function(e){h(this),e?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);return this.foldingStartMarker.test(o)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,s=e.getLine(t),a=s.search(i);if(-1!=a){for(var r=n||s.length,l=e.getLength(),c=t,d=t;++t<l;){var u=e.getLine(t).search(i);if(-1!=u){if(u<=a){var p=e.getTokenAt(t,0);if(!p||"string"!==p.type)break}d=t}}if(d>c){var h=e.getLine(d).length;return new o(c,r,d,h)}}},this.openingBracketBlock=function(e,t,n,i,s){var a={row:n,column:i+1},r=e.$findClosingBracket(t,a,s);if(r){var l=e.foldWidgets[r.row];return null==l&&(l=e.getFoldWidget(r.row)),"start"==l&&r.row>a.row&&(r.row--,r.column=e.getLine(r.row).length),o.fromPoints(a,r)}},this.closingBracketBlock=function(e,t,n,i,s){var a={row:n,column:i},r=e.$findOpeningBracket(t,a);if(r)return r.column++,a.column--,o.fromPoints(r,a)}}).call(i.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],(function(e,t,n){"use strict";var o=e("../lib/dom"),i=e("../range").Range,s=e("../config").nls;t.showErrorMarker=function(e,t){var n=e.session,a=e.getCursorPosition(),r=a.row,l=n.widgetManager.getWidgetsAtRow(r).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():r-=t;var c,d=function(e,t,n){var o=e.getAnnotations().sort(i.comparePoints);if(o.length){var s=function(e,t,n){for(var o=0,i=e.length-1;o<=i;){var s=o+i>>1,a=n(t,e[s]);if(a>0)o=s+1;else{if(!(a<0))return s;i=s-1}}return-(o+1)}(o,{row:t,column:-1},i.comparePoints);s<0&&(s=-s-1),s>=o.length?s=n>0?0:o.length-1:0===s&&n<0&&(s=o.length-1);var a=o[s];if(a&&n){if(a.row===t){do{a=o[s+=n]}while(a&&a.row===t);if(!a)return o.slice()}var r=[];t=a.row;do{r[n<0?"unshift":"push"](a),a=o[s+=n]}while(a&&a.row==t);return r.length&&r}}}(n,r,t);if(d){var u=d[0];a.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,a.row=u.row,c=e.renderer.$gutterLayer.$annotations[a.row]}else{if(l)return;c={displayText:[s("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var p={row:a.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},h=p.el.appendChild(o.createElement("div")),g=p.el.appendChild(o.createElement("div"));g.className="error_widget_arrow "+c.className;var m=e.renderer.$cursorLayer.getPixelPosition(a).left;g.style.left=m+e.renderer.gutterWidth-5+"px",p.el.className="error_widget_wrapper",h.className="error_widget "+c.className,c.displayText.forEach((function(e,t){h.appendChild(o.createTextNode(e)),t<c.displayText.length-1&&h.appendChild(o.createElement("br"))})),h.appendChild(o.createElement("div"));var b=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return p.destroy(),{command:"null"}};p.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(b),n.widgetManager.removeLineWidget(p),e.off("changeSelection",p.destroy),e.off("changeSession",p.destroy),e.off("mouseup",p.destroy),e.off("change",p.destroy))},e.keyBinding.addKeyboardHandler(b),e.on("changeSelection",p.destroy),e.on("changeSession",p.destroy),e.on("mouseup",p.destroy),e.on("change",p.destroy),e.session.widgetManager.addLineWidget(p),p.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:p.el.offsetHeight})}, |
| 56 |
o.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],(function(e,t,n){"use strict";e("./loader_build")(t);var o=e("./lib/dom"),i=e("./range").Range,s=e("./editor").Editor,a=e("./edit_session").EditSession,r=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var i=e;if(!(e=document.getElementById(i)))throw new Error("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var r=e;a=r.value,e=o.createElement("pre"),r.parentNode.replaceChild(e,r)}else e&&(a=e.textContent,e.innerHTML="");var c=t.createEditSession(a),d=new s(new l(e),c,n),u={document:c,editor:d,onResize:d.resize.bind(d,null)};return r&&(u.textarea=r),d.on("destroy",(function(){u.editor.container.env=null})),d.container.env=d.env=u,d},t.createEditSession=function(e,t){var n=new a(e,t);return n.setUndoManager(new r),n},t.Range=i,t.Editor=s,t.EditSession=a,t.UndoManager=r,t.VirtualRenderer=l;var c=t.config.version;t.version=c})),ace.require(["ace/ace"],(function(t){t&&(t.config.init(!0),t.define=ace.define);var n=function(){return this}();for(var o in n||"undefined"==typeof window||(n=window),n||"undefined"==typeof self||(n=self),n.ace||(n.ace=t),t)t.hasOwnProperty(o)&&(n.ace[o]=t[o]);n.ace.default=n.ace,e&&(e.exports=n.ace)}))},44(e,t,n){e=n.nmd(e),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(e,t,n){"use strict";var o=e("./lib/dom"),i=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,a=e("./lib/lang"),r=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,d=e("./tokenizer").Tokenizer,u=e("./clipboard"),p={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var o=e.session.getTextRange();return n?o.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):o},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return u.getText&&u.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:h.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:h.bind(null,{year:"2-digit"}),CURRENT_MONTH:h.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:h.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:h.bind(null,{month:"short"}),CURRENT_DATE:h.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:h.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:h.bind(null,{weekday:"short"}),CURRENT_HOUR:h.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:h.bind(null,{minute:"2-digit"}),CURRENT_SECOND:h.bind(null,{second:"2-digit"})};function h(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}p.SELECTED_TEXT=p.SELECTION;var g=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=p}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var o={regex:"/("+n("/")+"+)/",onMatch:function(e,t,n){var o=n[0];return o.fmtString=!0,o.guard=e.slice(1,-1),o.flag="",""},next:"formatString"};return e.$tokenizer=new d({start:[{regex:/\\./,onMatch:function(e,t,n){var o=e[1];return("}"==o&&n.length||-1!="`$\\".indexOf(o))&&(e=o),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,o){var i=t(e.substr(1));return o.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(e,t,n){var o=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}}));return n[0].choices=o,[o[0]]},next:"start"},o,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var o=e[1];return"}"==o&&n.length||-1!="`$\\".indexOf(o)?e=o:"n"==o?e="\n":"t"==o?e="\t":-1!="ulULE".indexOf(o)&&(e={changeCase:o,local:o>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var o=n.shift();return o&&(o.flag=e.slice(1,-1)),this.next=o&&o.tabstopId?"start":"",[o||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var o={text:e.slice(2)};return n.unshift(o),[o]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var o=n.shift();return this.next=o&&o.tabstopId?"start":"",[o||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},o,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""), |
| 57 |
!this.variables.hasOwnProperty(t))return"";var o=this.variables[t];return"function"==typeof o&&(o=this.variables[t](e,t,n)),o??""},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var o=t.flag||"",i=t.guard;i=new RegExp(i,o.replace(/[^gim]/g,""));var s="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,a=this,r=e.replace(i,(function(){var e=a.variables.__;a.variables.__=[].slice.call(arguments);for(var t=a.resolveVariables(s,n),o="E",i=0;i<t.length;i++){var r=t[i];if("object"==typeof r)if(t[i]="",r.changeCase&&r.local){var l=t[i+1];l&&"string"==typeof l&&("u"==r.changeCase?t[i]=l[0].toUpperCase():t[i]=l[0].toLowerCase(),t[i+1]=l.substr(1))}else r.changeCase&&(o=r.changeCase);else"U"==o?t[i]=r.toUpperCase():"L"==o&&(t[i]=r.toLowerCase())}return a.variables.__=e,t.join("")}));return r},e.prototype.tmFormatFunction=function(e,t,n){return"upcase"==t.formatFunction?e.toUpperCase():"downcase"==t.formatFunction?e.toLowerCase():e},e.prototype.resolveVariables=function(e,t){for(var n=[],o="",i=!0,s=0;s<e.length;s++){var a=e[s];if("string"!=typeof a){if(a){if(i=!1,a.fmtString){var r=e.indexOf(a,s+1);-1==r&&(r=e.length),a.fmt=e.slice(s+1,r),s=r}if(a.text){var l=this.getVariableValue(t,a.text,o)+"";a.fmtString&&(l=this.tmStrFormat(l,a,t)),a.formatFunction&&(l=this.tmFormatFunction(l,a,t)),l&&!a.ifEnd?(n.push(l),c(a)):!l&&a.ifEnd&&c(a.ifEnd)}else a.elseEnd?c(a.elseEnd):(null!=a.tabstopId||null!=a.changeCase)&&n.push(a)}}else n.push(a),"\n"==a?(i=!0,o=""):i&&(o=/^\t*/.exec(a)[0],i=/\S/.test(a))}function c(t){var n=e.indexOf(t,s+1);-1!=n&&(s=n)}return n},e.prototype.getDisplayTextForSnippet=function(e,t){return m.call(this,e,t).text},e.prototype.insertSnippetForSelection=function(e,t,n){void 0===n&&(n={});var o=m.call(this,e,t,n),i=e.getSelectionRange(),s=e.session.replace(i,o.text),a=new b(e),r=e.inVirtualSelectionMode&&e.selection.index;a.addTabstops(o.tabstops,i.start,s,r)},e.prototype.insertSnippet=function(e,t,n){void 0===n&&(n={});var o=this;if(e.inVirtualSelectionMode)return o.insertSnippetForSelection(e,t,n);e.forEachSelection((function(){o.insertSnippetForSelection(e,t,n)}),null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},e.prototype.$getScope=function(e){var t=e.session.$mode.$id||"";if("html"===(t=t.split("/").pop())||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var n=e.getCursorPosition(),o=e.session.getState(n.row);"object"==typeof o&&(o=o[0]),o.substring&&("js-"==o.substring(0,3)?t="javascript":"css-"==o.substring(0,4)?t="css":"php-"==o.substring(0,4)&&(t="php"))}return t},e.prototype.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],o=this.snippetMap;return o[t]&&o[t].includeScopes&&n.push.apply(n,o[t].includeScopes),n.push("_"),n},e.prototype.expandWithTab=function(e,t){var n=this,o=e.forEachSelection((function(){return n.expandSnippetForSelection(e,t)}),null,{keepOrder:!0});return o&&e.tabstopManager&&e.tabstopManager.tabNext(),o},e.prototype.expandSnippetForSelection=function(e,t){var n,o=e.getCursorPosition(),i=e.session.getLine(o.row),s=i.substring(0,o.column),a=i.substr(o.column),r=this.snippetMap;return this.getActiveScopes(e).some((function(e){var t=r[e];return t&&(n=this.findMatchingSnippet(t,s,a)),!!n}),this),!!n&&(t&&t.dryRun||(e.session.doc.removeInLine(o.row,o.column-n.replaceBefore.length,o.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(e,n.content),this.variables.M__=this.variables.T__=null),!0)},e.prototype.findMatchingSnippet=function(e,t,n){for(var o=e.length;o--;){var i=e[o];if((!i.startRe||i.startRe.test(t))&&(!i.endRe||i.endRe.test(n))&&(i.startRe||i.endRe))return i.matchBefore=i.startRe?i.startRe.exec(t):[""],i.matchAfter=i.endRe?i.endRe.exec(n):[""],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:"",i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(n)[0]:"",i}},e.prototype.register=function(e,t){var n=this.snippetMap,o=this.snippetNameMap,i=this;function s(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function r(e,t,n){return e=s(e),t=s(t),n?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)}function l(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],o[t]={});var s=o[t];if(e.name){var l=s[e.name];l&&i.unregister(l),s[e.name]=e}n[t].push(e),e.prefix&&(e.tabTrigger=e.prefix),!e.content&&e.body&&(e.content=Array.isArray(e.body)?e.body.join("\n"):e.body),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=a.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=r(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger),e.endRe=r(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger))}e||(e=[]),Array.isArray(e)?e.forEach(l):Object.keys(e).forEach((function(t){l(e[t])})),this._signal("registerSnippets",{scope:t})},e.prototype.unregister=function(e,t){var n=this.snippetMap,o=this.snippetNameMap;function i(e){var i=o[e.scope||t];if(i&&i[e.name]){delete i[e.name];var s=n[e.scope||t],a=s&&s.indexOf(e);a>=0&&s.splice(a,1)}}e.content?i(e):Array.isArray(e)&&e.forEach(i)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],o={},i=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=i.exec(e);){if(t[1])try{o=JSON.parse(t[1]),n.push(o)}catch(e){}if(t[4])o.content=t[4].replace(/^\t/gm,""),n.push(o),o={};else{var s=t[2],a=t[3];if("regex"==s){var r=/\/((?:[^\/\\]|\\.)*)|$/g;o.guard=r.exec(a)[1],o.trigger=r.exec(a)[1],o.endTrigger=r.exec(a)[1],o.endGuard=r.exec(a)[1]}else"snippet"==s?(o.tabTrigger=a.match(/^\S*/)[0],o.name||(o.name=a)):s&&(o[s]=a)}}return n},e.prototype.getSnippetByName=function(e,t){var n,o=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var i=o[t];return i&&(n=i[e]),!!n}),this),n},e}();i.implement(g.prototype,s);var m=function(e,t,n){void 0===n&&(n={});var o=e.getCursorPosition(),i=e.session.getLine(o.row),s=e.session.getTabString(),a=i.match(/^\s*/)[0];o.column<a.length&&(a=a.slice(0,o.column)),t=t.replace(/\r/g,"");var r=this.tokenizeTmSnippet(t);r=(r=this.resolveVariables(r,e)).map((function(e){return"\n"!=e||n.excludeExtraIndent?"string"==typeof e?e.replace(/\t/g,s):e:e+a}));var l=[];r.forEach((function(e,t){if("object"==typeof e){var n=e.tabstopId,o=l[n];if(o||((o=l[n]=[]).index=n,o.value="",o.parents={}),-1===o.indexOf(e)){e.choices&&!o.choices&&(o.choices=e.choices),o.push(e);var i=r.indexOf(e,t+1);if(-1!==i){var s=r.slice(t+1,i);s.some((function(e){return"object"==typeof e}))&&!o.value?o.value=s:!s.length||o.value&&"string"==typeof o.value||(o.value=s.join(""))}}}})),l.forEach((function(e){e.length=0}));var c={};function d(e){for(var t=[],n=0;n<e.length;n++){var o=e[n];if("object"==typeof o){if(c[o.tabstopId])continue;o=t[e.lastIndexOf(o,n-1)]||{tabstopId:o.tabstopId}}t[n]=o}return t}for(var u=0;u<r.length;u++){var p=r[u];if("object"==typeof p){var h=p.tabstopId,g=l[h],m=r.indexOf(p,u+1);if(c[h])c[h]===p&&(delete c[h],Object.keys(c).forEach((function(e){g.parents[e]=!0})));else{c[h]=p;var b=g.value;"string"!=typeof b?b=d(b):p.fmt&&(b=this.tmStrFormat(b,p,e)),r.splice.apply(r,[u+1,Math.max(0,m-u)].concat(b,p)),-1===g.indexOf(p)&&g.push(p)}}}var f=0,x=0,y="";return r.forEach((function(e){if("string"==typeof e){var t=e.split("\n");t.length>1?(x=t[t.length-1].length,f+=t.length-1):x+=e.length,y+=e}else e&&(e.start?e.end={row:f,column:x}:e.start={row:f,column:x})})),{text:y,tabstops:l,tokens:r}},b=function(){function e(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=a.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e, |
| 58 |
this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop||{},o=n.parents||{},i=this.tabstops.slice(),s=0;s<i.length;s++){var a=i[s],r=a==n||o[a.index];if(a.rangeList.$bias=r?0:1,"remove"==e.action&&a!==n){var l=a.parents&&a.parents[n.index],c=a.rangeList.pointIndex(e.start,l);c=c<0?-c-1:c+1;var d=a.rangeList.pointIndex(e.end,l);d=d<0?-d-1:d-1;for(var u=a.rangeList.ranges.slice(c,d),p=0;p<u.length;p++)this.removeRange(u[p])}a.rangeList.$onChange(e)}var h=this.session;this.$inChange||!t||1!=h.getLength()||h.getValue()||this.detach()},e.prototype.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges&&e.firstNonLinked){this.$inChange=!0;for(var n=this.session,o=n.getTextRange(e.firstNonLinked),i=0;i<e.length;i++){var s=e[i];if(s.linked){var a=s.original,r=t.snippetManager.tmStrFormat(o,a,this.editor);n.replace(s,r)}}this.$inChange=!1}},e.prototype.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},e.prototype.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),o=0;o<this.ranges.length;o++)if(!this.ranges[o].linked){var i=this.ranges[o].contains(e.row,e.column),s=n||this.ranges[o].contains(t.row,t.column);if(i&&s)return}this.detach()}},e.prototype.onChangeSession=function(){this.detach()},e.prototype.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);(n=Math.min(Math.max(n,1),t))==t&&(n=0),this.selectTabstop(n),this.updateTabstopMarkers(),0===n&&this.detach()},e.prototype.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,(t=this.tabstops[this.index])&&t.length){this.selectedTabstop=t;var n=t.firstNonLinked||t;if(t.choices&&(n.cursor=n.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(n);else{var o=this.editor.multiSelect;o.toSingleRange(n);for(var i=0;i<t.length;i++)t.hasLinkedRanges&&t[i].linked||o.addRange(t[i].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},e.prototype.addTabstops=function(e,t,n){var o=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var i=r.fromPoints(n,n);x(i.start,t),x(i.end,t),e[0]=[i],e[0].index=0}var s=[this.index+1,0],a=this.ranges,c=this.snippetId=(this.snippetId||0)+1;e.forEach((function(e,n){var i=this.$openTabstops[n]||e;i.snippetId=c;for(var d=0;d<e.length;d++){var u=e[d],p=r.fromPoints(u.start,u.end||u.start);f(p.start,t),f(p.end,t),p.original=u,p.tabstop=i,a.push(p),i!=e?i.unshift(p):i[d]=p,u.fmtString||i.firstNonLinked&&o?(p.linked=!0,i.hasLinkedRanges=!0):i.firstNonLinked||(i.firstNonLinked=p)}i.firstNonLinked||(i.hasLinkedRanges=!1),i===e&&(s.push(i),this.$openTabstops[n]=i),this.addTabstopMarkers(i),i.rangeList=i.rangeList||new l,i.rangeList.$bias=0,i.rangeList.addList(i)}),this),s.length>2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var e=this.selectedTabstop.snippetId;0===this.selectedTabstop.index&&e--,this.tabstops.forEach((function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)}),this)}},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();b.prototype.keyboardHandler=new c,b.prototype.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var f=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},x=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};o.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new g;var y=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(y.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],(function(e,t,n){"use strict";var o=e("../virtual_renderer").VirtualRenderer,i=e("../editor").Editor,s=e("../range").Range,a=e("../lib/event"),r=e("../lib/lang"),l=e("../lib/dom"),c=e("../config").nls,d=e("./../lib/useragent"),u=function(e){return"suggest-aria-id:".concat(e)},p=d.isSafari?"menu":"listbox",h=d.isSafari?"menuitem":"option",g=d.isSafari?"aria-current":"aria-selected",m=function(e){var t=new o(e);t.$maxLines=4;var n=new i(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n} |
| 59 |
;l.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),t.AcePopup=function(e){var t=l.createElement("div"),n=m(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.renderer.$textLayer.element.setAttribute("role",p),n.renderer.$textLayer.element.setAttribute("aria-roledescription",c("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),n.renderer.$textLayer.element.setAttribute("aria-label",c("autocomplete.popup.aria-label","Autocomplete suggestions")),n.renderer.textarea.setAttribute("aria-hidden","true"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var o,i=function(){};n.focus=i,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=i,n.renderer.$cursorLayer.element.style.opacity="0",n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",(function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),b.start.row=b.end.row=t.row,e.stop()}));var d=new s(-1,0,-1,1/0),b=new s(-1,0,-1,1/0);b.id=n.session.addMarker(b,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?d.id&&(n.session.removeMarker(d.id),d.id=null):d.id=n.session.addMarker(d,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",(function(e){if(o){if(o.x!=e.x||o.y!=e.y){(o=e).scrollTop=n.renderer.scrollTop,n.isMouseOver=!0;var t=o.getDocumentPosition().row;d.start.row!=t&&(d.id||n.setRow(t),x(t))}}else o=e})),n.renderer.on("beforeRender",(function(){if(o&&-1!=d.start.row){o.$pos=null;var e=o.getDocumentPosition().row;d.id||n.setRow(e),x(e,!0)}})),n.renderer.on("afterRender",(function(){for(var e=n.renderer.$textLayer,t=e.config.firstRow,o=e.config.lastRow;t<=o;t++){var i=e.element.childNodes[t-e.config.firstRow];i.setAttribute("role",h),i.setAttribute("aria-roledescription",c("autocomplete.popup.item.aria-roledescription","item")),i.setAttribute("aria-setsize",n.data.length),i.setAttribute("aria-describedby","doc-tooltip"),i.setAttribute("aria-posinset",t+1);var s=n.getData(t);if(s){var a="".concat(s.caption||s.value).concat(s.meta?", ".concat(s.meta):"");i.setAttribute("aria-label",a)}i.querySelectorAll(".ace_completion-highlight").forEach((function(e){e.setAttribute("role","mark")}))}})),n.renderer.on("afterRender",(function(){var e=n.getRow(),t=n.renderer.$textLayer,o=t.element.childNodes[e-t.config.firstRow],i=document.activeElement;if(o!==n.selectedNode&&n.selectedNode&&(l.removeCssClass(n.selectedNode,"ace_selected"),n.selectedNode.removeAttribute(g),n.selectedNode.removeAttribute("id")),i.removeAttribute("aria-activedescendant"),n.selectedNode=o,o){var s=u(e);l.addCssClass(o,"ace_selected"),o.id=s,t.element.setAttribute("aria-activedescendant",s),i.setAttribute("aria-activedescendant",s),o.setAttribute(g,"true")}}));var f=function(){x(-1)},x=function(e,t){e!==d.start.row&&(d.start.row=d.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return d.start.row},a.addListener(n.container,"mouseout",(function(){n.isMouseOver=!1,f()})),n.on("hide",f),n.on("changeSelection",f),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var y=n.session.bgTokenizer;return y.$tokenizeRow=function(e){var t=n.data[e],o=[];if(!t)return o;"string"==typeof t&&(t={value:t});var i=t.caption||t.value||t.name;function s(e,n){e&&o.push({type:(t.className||"")+(n||""),value:e})}for(var a=i.toLowerCase(),r=(n.filterText||"").toLowerCase(),l=0,c=0,d=0;d<=r.length;d++)if(d!=c&&(t.matchMask&1<<d||d==r.length)){var u=r.slice(c,d);c=d;var p=a.indexOf(u,l);if(-1==p)continue;s(i.slice(l,p),""),l=p+u.length,s(i.slice(p,l),"completion-highlight")}return s(i.slice(l,i.length),""),o.push({type:"completion-spacer",value:" "}),t.meta&&o.push({type:"completion-meta",value:t.meta}),t.message&&o.push({type:"completion-message",value:t.message}),o},y.$updateOnChange=i,y.start=i,n.session.$computeWidth=function(){return this.screenWidth=0},n.isOpen=!1,n.isTopdown=!1,n.autoSelect=!0,n.filterText="",n.isMouseOver=!1,n.data=[],n.setData=function(e,t){n.filterText=t||"",n.setValue(r.stringRepeat("\n",e.length),-1),n.data=e||[],n.setRow(0)},n.getData=function(e){return n.data[e]},n.getRow=function(){return b.start.row},n.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,e)),b.start.row!=e&&(n.selection.clearSelection(),b.start.row=b.end.row=e||0,n.session._emit("changeBackMarker"),n.moveCursorTo(e||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",(function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()})),n.hide=function(){this.container.style.display="none",n.anchorPos=null,n.anchor=null,n.isOpen&&(n.isOpen=!1,this._signal("hide"))},n.tryShow=function(e,t,i,s){if(!s&&n.isOpen&&n.anchorPos&&n.anchor&&n.anchorPos.top===e.top&&n.anchorPos.left===e.left&&n.anchor===i)return!0;var a=this.container,r=this.renderer.scrollBar.width||10,l=window.innerHeight-r,c=window.innerWidth-r,d=this.renderer,u=d.$maxLines*t*1.4,p={top:0,bottom:0,left:0},h=l-e.top-3*this.$borderSize-t,g=e.top-3*this.$borderSize;i||(i=g<=h||h>=u?"bottom":"top"),"top"===i?(p.bottom=e.top-this.$borderSize,p.top=p.bottom-u):"bottom"===i&&(p.top=e.top+t+this.$borderSize,p.bottom=p.top+u);var m=p.top>=0&&p.bottom<=l;if(!s&&!m)return!1;d.$maxPixelHeight=m?null:"top"===i?g:h,"top"===i?(a.style.top="",a.style.bottom=l+r-p.bottom+"px", |
| 60 |
n.isTopdown=!1):(a.style.top=p.top+"px",a.style.bottom="",n.isTopdown=!0),a.style.display="";var b=e.left;return b+a.offsetWidth>c&&(b=c-a.offsetWidth),a.style.left=b+"px",a.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),o=null),n.anchorPos=e,n.anchor=i,!0},n.show=function(e,t,n){this.tryShow(e,t,n?"bottom":void 0,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n},t.$singleLineEditor=m,t.getAriaId=u})),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],(function(e,t,n){"use strict";var o=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){for(var o="doc-tooltip ",i=0;i<this._lines.length;i++)o+="ace-inline-screenreader-line-".concat(i," ");n.setAttribute("aria-describedby",o)}}.bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=e.split(/\r\n|\r|\n/);var t=this.createCodeBlock();this.screenReaderDiv.appendChild(t)},e.prototype.destroy=function(){this.screenReaderDiv.remove()},e.prototype.createCodeBlock=function(){var e=document.createElement("pre");e.setAttribute("id","ace-inline-screenreader");for(var t=0;t<this._lines.length;t++){var n=document.createElement("code");n.setAttribute("id","ace-inline-screenreader-line-".concat(t));var o=document.createTextNode(this._lines[t]);n.appendChild(o),e.appendChild(n)}return e},e}();t.AceInlineScreenReader=o})),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],(function(e,t,n){"use strict";var o=e("../snippets").snippetManager,i=e("./inline_screenreader").AceInlineScreenReader,s=function(){function e(){this.editor=null}return e.prototype.show=function(e,t,n){if(n=n||"",e&&this.editor&&this.editor!==e&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!e||!t)return!1;this.inlineScreenReader||(this.inlineScreenReader=new i(e));var s=t.snippet?o.getDisplayTextForSnippet(e,t.snippet):t.value;return!(t.hideInlinePreview||!s||!s.startsWith(n)||(this.editor=e,this.inlineScreenReader.setScreenReaderContent(s),""===(s=s.slice(n.length))?e.removeGhostText():e.setGhostText(s),0))},e.prototype.isOpen=function(){return!!this.editor&&!!this.editor.renderer.$ghostText},e.prototype.hide=function(){return!!this.editor&&(this.editor.removeGhostText(),!0)},e.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},e}();t.AceInline=s})),ace.define("ace/autocomplete/util",["require","exports","module"],(function(e,t,n){"use strict";t.parForEach=function(e,t,n){var o=0,i=e.length;0===i&&n();for(var s=0;s<i;s++)t(e[s],(function(e,t){++o===i&&n(e,t)}))};var o=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||o;for(var i=[],s=t-1;s>=0&&n.test(e[s]);s--)i.push(e[s]);return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||o;for(var i=[],s=t;s<e.length&&n.test(e[s]);s++)i.push(e[s]);return i},t.getCompletionPrefix=function(e){var t,n=e.getCursorPosition(),o=e.session.getLine(n.row);return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!t&&e&&(t=this.retrievePrecedingIdentifier(o,n.column,e))}.bind(this))}.bind(this)),t||this.retrievePrecedingIdentifier(o,n.column)},t.triggerAutocomplete=function(e,t){return t=t??e.session.getPrecedingCharacter(),e.completers.some((function(e){if(e.triggerCharacters&&Array.isArray(e.triggerCharacters))return e.triggerCharacters.includes(t)}))}})),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],(function(e,t,n){"use strict";var o=e("./keyboard/hash_handler").HashHandler,i=e("./autocomplete/popup").AcePopup,s=e("./autocomplete/inline").AceInline,a=e("./autocomplete/popup").getAriaId,r=e("./autocomplete/util"),l=e("./lib/lang"),c=e("./lib/dom"),d=e("./snippets").snippetManager,u=e("./config"),p=e("./lib/event"),h=e("./lib/scroll").preventParentScroll,g=function(e,t){t.completer&&t.completer.destroy()},m=function(){function e(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new o,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=l.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=l.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=l.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=l.delayedCall(function(){this.stickySelection=!0}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=l.delayedCall(function(){var t=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!t||0===this.editor.completers.length||(this.completions=new f(e.completionsForLoading),this.openPopup(this.editor,t.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}.bind(this),this.stickySelectionDelay)}return Object.defineProperty(e,"completionsForLoading",{get:function(){return[{caption:u.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),e.prototype.$init=function(){return this.popup=new i(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),p.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},e.prototype.$initInline=function(){if(this.inlineEnabled&&!this.inlineRenderer)return this.inlineRenderer=new s,this.inlineRenderer},e.prototype.getPopup=function(){return this.popup||this.$init()},e.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},e.prototype.$seen=function(e){!this.hasSeen.has(e)&&e&&e.completer&&e.completer.onSeen&&"function"==typeof e.completer.onSeen&&(e.completer.onSeen(this.editor,e),this.hasSeen.add(e))},e.prototype.$onPopupChange=function(e){if(this.inlineRenderer&&this.inlineEnabled){var t=e?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(t),this.popup.isMouseOver&&this.setSelectOnHover)return void this.tooltipTimer.call(null,null);this.popupTimer.schedule(),this.tooltipTimer.schedule() |
| 61 |
}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},e.prototype.$updateGhostText=function(e){var t=this.base.row,n=this.base.column,o=this.editor.getCursorPosition().column,i=this.editor.session.getLine(t).slice(n,o);this.inlineRenderer.show(this.editor,e,i)?this.$seen(e):this.inlineRenderer.hide()},e.prototype.$onPopupRender=function(){var e=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);!n||e&&!n.hideInlinePreview||this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach((function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})})),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,o=t.$cursorLayer.getPixelPosition(this.base,!0);o.left-=this.popup.getTextLeftOffset();var i=e.container.getBoundingClientRect();o.top+=i.top-t.layerConfig.offset,o.left+=i.left-e.renderer.scrollLeft,o.left+=t.gutterWidth;var s={top:o.top,left:o.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(s.top+=t.$ghostTextWidget.el.offsetHeight);var a=e.container.getBoundingClientRect().bottom-n,r=a<s.top?{top:a,left:s.left}:s;this.popup.tryShow(r,n,"bottom")||this.popup.tryShow(o,n,"top")||this.popup.show(o,n)},e.prototype.openPopup=function(e,t,n){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var o,i=this.popup.getRow(),s=this.popup.data[i];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:a(this.popup.getRow()),inline:this.inlineEnabled}),e.keyBinding.addKeyboardHandler(this.keyboardHandler),this.stickySelection&&(o=this.popup.data.indexOf(s)),o&&-1!==o||(o=0),this.popup.setRow(this.autoSelect?o:-1),o===i&&s!==this.completions.filtered[o]&&this.$onPopupChange();var r=this.inlineRenderer&&this.inlineEnabled;if(o===i&&r){var l=this.popup.getData(this.popup.getRow());this.$updateGhostText(l)}n||(this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},e.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},e.prototype.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},e.prototype.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),o=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),i=this.popup&&this.popup.container;t==n||t.parentNode==i||o||t==this.tooltipNode||e.relatedTarget==n||this.detach()},e.prototype.mousedownListener=function(e){this.detach()},e.prototype.mousewheelListener=function(e){this.popup&&!this.popup.isMouseOver&&this.detach()},e.prototype.mouseOutListener=function(e){this.popup.isOpen&&this.$updatePopupPosition()},e.prototype.goTo=function(e){this.popup.goTo(e)},e.prototype.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(""===e.value)return this.detach();var n=this.completions,o=this.getCompletionProvider().insertMatch(this.editor,e,n.filterText,t);return this.completions==n&&this.detach(),o},e.prototype.showPopup=function(e,t){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,t)},e.prototype.getCompletionProvider=function(e){return this.completionProvider||(this.completionProvider=new b(e)),this.completionProvider},e.prototype.gatherCompletions=function(e,t){return this.getCompletionProvider().gatherCompletions(e,t)},e.prototype.updateCompletions=function(t,n){if(t&&this.base&&this.completions){var o=this.editor.getCursorPosition();if((s=this.editor.session.getTextRange({start:this.base,end:o}))==this.completions.filterText)return;return this.completions.setFilter(s),this.completions.filtered.length&&(1!=this.completions.filtered.length||this.completions.filtered[0].value!=s||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,s,t):this.detach()}if(n&&n.matches)return o=this.editor.getSelectionRange().start,this.base=this.editor.session.doc.createAnchor(o.row,o.column),this.base.$insertRight=!0,this.completions=new f(n.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",t);var i=this.editor.getSession(),s=(o=this.editor.getCursorPosition(),r.getCompletionPrefix(this.editor));this.base=i.doc.createAnchor(o.row,o.column-s.length),this.base.$insertRight=!0;var a={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:s,pos:o}).provideCompletions(this.editor,a,function(n,o,i){var s=o.filtered,a=r.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),i){if(!s.length){var l=!this.autoShown&&this.emptyMessage;if("function"==typeof l&&(l=this.emptyMessage(a)),l){var c=[{caption:l,value:""}];return this.completions=new f(c),this.openPopup(this.editor,a,t),this.popup.renderer.setStyle("ace_loading",!1),void this.popup.renderer.setStyle("ace_empty-message",!0)}return this.detach()}if(1==s.length&&s[0].value==a&&!s[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&1==s.length)return this.insertMatch(s[0])}this.completions=!i&&this.showLoadingState?new f(e.completionsForLoading.concat(s),o.filterText):o,this.openPopup(this.editor,a,t),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!i)}.bind(this)),!this.showLoadingState||this.autoShown||this.popup&&this.popup.isOpen||this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},e.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},e.prototype.updateDocTooltip=function(){ |
| 62 |
var e=this.popup,t=this.completions&&this.completions.filtered,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),o=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var i=this.editor.completers.length,s=0;s<i;s++){var a=this.editor.completers[s];if(a.getDocTooltip&&n.completerId===a.id){o=a.getDocTooltip(n);break}}if(o||"string"==typeof n||(o=n),"string"==typeof o&&(o={docText:o}),!o||!o.docHTML&&!o.docText)return this.hideDocTooltip();this.showDocTooltip(o)},e.prototype.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=c.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",h));var t=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(t.isDark?"ace_dark ":"")+(t.cssClass||"");var n=this.tooltipNode;e.docHTML?n.innerHTML=e.docHTML:e.docText&&(n.textContent=e.docText),n.parentNode||this.popup.container.appendChild(this.tooltipNode);var o=this.popup,i=o.container.getBoundingClientRect(),s=400,a=300,r=o.renderer.scrollBar.width||10,l=i.left,d=window.innerWidth-i.right-r,u=o.isTopdown?i.top:window.innerHeight-r-i.bottom,p=[Math.min(d/s,1),Math.min(l/s,1),Math.min(u/a*.9)],g=Math.max.apply(Math,p),m=n.style;m.display="block",g==p[0]?(m.left=i.right+1+"px",m.right="",m.maxWidth=s*g+"px",m.top=i.top+"px",m.bottom="",m.maxHeight=Math.min(window.innerHeight-r-i.top,a)+"px"):g==p[1]?(m.right=window.innerWidth-i.left+"px",m.left="",m.maxWidth=s*g+"px",m.top=i.top+"px",m.bottom="",m.maxHeight=Math.min(window.innerHeight-r-i.top,a)+"px"):g==p[2]&&(m.left=window.innerWidth-i.left+"px",m.maxWidth=Math.min(s,window.innerWidth)+"px",o.isTopdown?(m.top=i.bottom+"px",m.left=i.left+"px",m.right="",m.bottom="",m.maxHeight=Math.min(window.innerHeight-r-i.bottom,a)+"px"):(m.top=o.container.offsetTop-n.offsetHeight+"px",m.left=i.left+"px",m.right="",m.bottom="",m.maxHeight=Math.min(o.container.offsetTop,a)+"px"))},e.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},e.prototype.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if("A"==t.nodeName&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}},e.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var e=this.popup.container;e&&e.parentNode&&e.parentNode.removeChild(e)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",g),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},e.for=function(t){return t.completer instanceof e||(t.completer&&(t.completer.destroy(),t.completer=null),u.get("sharedPopups")?(e.$sharedInstance||(e.$sharedInstance=new e),t.completer=e.$sharedInstance):(t.completer=new e,t.once("destroy",g))),t.completer},e}();m.prototype.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},Backspace:function(e){e.execCommand("backspace"),!r.getCompletionPrefix(e)&&e.completer&&e.completer.detach()},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},m.startCommand={name:"startAutocomplete",exec:function(e,t){var n=m.for(e);n.autoInsert=!1,n.autoSelect=!0,n.autoShown=!1,n.showPopup(e,t),n.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var b=function(){function e(e){this.initialPosition=e,this.active=!0}return e.prototype.insertByIndex=function(e,t,n){return!(!this.completions||!this.completions.filtered)&&this.insertMatch(e,this.completions.filtered[t],n)},e.prototype.insertMatch=function(e,t,n){if(!t)return!1;if(e.startOperation({command:{name:"insertMatch"}}),t.completer&&t.completer.insertMatch)t.completer.insertMatch(e,t);else{if(!this.completions)return!1;var o=this.completions.filterText.length,i=0;if(t.range&&t.range.start.row===t.range.end.row&&(o-=this.initialPosition.prefix.length,o+=this.initialPosition.pos.column-t.range.start.column,i+=t.range.end.column-this.initialPosition.pos.column),o||i){var s;s=e.selection.getAllRanges?e.selection.getAllRanges():[e.getSelectionRange()];for(var a,r=0;a=s[r];r++)a.start.column-=o,a.end.column+=i,e.session.remove(a)}t.snippet?d.insertSnippet(e,t.snippet):this.$insertString(e,t),t.completer&&t.completer.onInsert&&"function"==typeof t.completer.onInsert&&t.completer.onInsert(e,t),t.command&&"startAutocomplete"===t.command&&e.execCommand(t.command)}return e.endOperation(),!0},e.prototype.$insertString=function(e,t){var n=t.value||t;e.execCommand("insertstring",n)},e.prototype.gatherCompletions=function(e,t){var n=e.getSession(),o=e.getCursorPosition(),i=r.getCompletionPrefix(e),s=[];this.completers=e.completers;var a=e.completers.length;return e.completers.forEach((function(l,c){l.getCompletions(e,n,o,i,(function(n,o){l.hideInlinePreview&&(o=o.map((function(e){return Object.assign(e,{hideInlinePreview:l.hideInlinePreview})}))),!n&&o&&(s=s.concat(o)),t(null,{prefix:r.getCompletionPrefix(e),matches:s,finished:0==--a})}))})),!0},e.prototype.provideCompletions=function(e,t,n){var o=function(e){var o=e.prefix,i=e.matches;this.completions=new f(i),t.exactMatch&&(this.completions.exactMatch=!0),t.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(o),(e.finished||this.completions.filtered.length)&&n(null,this.completions,e.finished)}.bind(this),i=!0,s=null;if(this.gatherCompletions(e,function(e,t){this.active&&(e&&(n(e,[],!0),this.detach()),0===t.prefix.indexOf(t.prefix)&&(i?s=t:o(t)))}.bind(this)),i=!1,s){var a=s;s=null,o(a)}},e.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach((function(e){"function"==typeof e.cancel&&e.cancel()}))},e}(),f=function(){function e(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1,this.ignoreCaption=!1}return e.prototype.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var n=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)})),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],o=t.toUpperCase(),i=t.toLowerCase();e:for(var s,a=0;s=e[a];a++)if(s.skipFilter)s.$score=s.score,n.push(s);else{var r=!this.ignoreCaption&&s.caption||s.value||s.snippet;if(r){var l,c,d=-1,u=0,p=0;if(this.exactMatch){if(t!==r.substr(0,t.length))continue e}else{var h=r.toLowerCase().indexOf(i);if(h>-1)p=h;else for(var g=0;g<t.length;g++){var m=r.indexOf(i[g],d+1),b=r.indexOf(o[g],d+1);if((l=m>=0&&(b<0||m<b)?m:b)<0)continue e;(c=l-d-1)>0&&(-1===d&&(p+=10),p+=c,u|=1<<g),d=l}}s.matchMask=u,s.exactMatch=p?0:1,s.$score=(s.score||0)-p,n.push(s)}}return n},e}();t.Autocomplete=m,t.CompletionProvider=b,t.FilteredList=f})),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],(function(e,t,n){var o=e("../range").Range,i=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,n,s,a){var r=function(e,t){ |
| 63 |
var n=function(e,t){return e.getTextRange(o.fromPoints({row:0,column:0},t)).split(i).length-1}(e,t),s=e.getValue().split(i),a=Object.create(null),r=s[n];return s.forEach((function(e,t){if(e&&e!==r){var o=Math.abs(n-t),i=s.length-o;a[e]?a[e]=Math.max(i,a[e]):a[e]=i}})),a}(t,n);a(null,Object.keys(r).map((function(e){return{caption:e,value:e,score:r[e],meta:"local"}})))}})),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],(function(e,t,n){"use strict";var o=e("../snippets").snippetManager,i=e("../autocomplete").Autocomplete,s=e("../config"),a=e("../lib/lang"),r=e("../autocomplete/util"),l=e("../autocomplete/text_completer"),c={getCompletions:function(e,t,n,o,i){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,o,i);var s=e.session.getState(n.row),a=t.$mode.getCompletions(s,t,n,o);i(null,a=a.map((function(e){return e.completerId=c.id,e})))},id:"keywordCompleter"},d={getCompletions:function(e,t,n,i,s){var a=[],r=t.getTokenAt(n.row,n.column);r&&r.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?a.push("html-tag"):a=o.getActiveScopes(e);var l=o.snippetMap,c=[];a.forEach((function(e){for(var t=l[e]||[],n=t.length;n--;){var o=t[n],i=o.name||o.tabTrigger;i&&c.push({caption:i,snippet:o.content,meta:o.tabTrigger&&!o.name?o.tabTrigger+"⇥ ":"snippet",completerId:d.id})}}),this),s(null,c)},getDocTooltip:function(e){var t,n;e.snippet&&!e.docHTML&&(e.docHTML=["<b>",a.escapeHTML(e.caption),"</b>","<hr></hr>",a.escapeHTML((t=e.snippet,n={},t.replace(/\${(\d+)(:(.*?))?}/g,(function(e,t,o,i){return n[t]=i||""})).replace(/\$(\d+?)/g,(function(e,t){return n[t]}))))].join(""))},id:"snippetCompleter"},u=[d,l,c];t.setCompleters=function(e){u.length=0,e&&u.push.apply(u,e)},t.addCompleter=function(e){u.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=d;var p,h={name:"expandSnippet",exec:function(e){return o.expandWithTab(e)},bindKey:"Tab"},g=function(e,t){m(t.session.$mode)},m=function(e){"string"==typeof e&&(e=s.$modes[e]),e&&(o.files||(o.files={}),b(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(m))},b=function(e,t){t&&e&&!o.files[e]&&(o.files[e]={},s.loadModule(t,(function(t){t&&(o.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=o.parseSnippetFile(t.snippetText)),o.register(t.snippets||[],t.scope),t.includeScopes&&(o.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){m("ace/mode/"+e)}))))})))},f=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!r.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&!n){p=e;var o=e.editor.$liveAutocompletionDelay;o?x.delay(o):y(e)}},x=a.delayedCall((function(){y(p)}),0),y=function(e){var t=e.editor,n=r.getCompletionPrefix(t),o=e.args,s=r.triggerAutocomplete(t,o);if(n&&n.length>=t.$liveAutocompletionThreshold||s){var a=i.for(t);a.autoShown=!0,a.showPopup(t)}},v=e("../editor").Editor;e("../config").defineOptions(v.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.on("afterExec",f)):this.commands.off("afterExec",f)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(h),this.on("changeMode",g),g(0,this)):(this.commands.removeCommand(h),this.off("changeMode",g))},value:!1}})})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))},5336(e,t,n){e=n.nmd(e),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],(function(e,t,n){"use strict";var o,i=e("./lib/oop"),s=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),a=e("./editor").Editor,r=e("./virtual_renderer").VirtualRenderer,l=e("./edit_session").EditSession;(function(){i.implement(this,s),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new a(new r(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<e;)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<e;)this.$createEditor(),this.$splits++}else for(;this.$splits>e;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new l(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;n=null==t?this.$cEditor:this.$editors[t];var o=this.$editors.some((function(t){return t.session===e}));return o&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var o=t/this.$splits,i=0;i<this.$splits;i++)(e=this.$editors[i]).container.style.width=o+"px",e.container.style.top="0px",e.container.style.left=i*o+"px",e.container.style.height=n+"px",e.resize();else{var s=n/this.$splits;for(i=0;i<this.$splits;i++)(e=this.$editors[i]).container.style.width=t+"px",e.container.style.top=i*s+"px",e.container.style.left="0px",e.container.style.height=s+"px",e.resize()}}}).call((o=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))}).prototype),t.Split=o})),ace.define("ace/ext/split",["require","exports","module","ace/split"],(function(e,t,n){"use strict";n.exports=e("../split")})),ace.require(["ace/ext/split"],(function(t){e&&(e.exports=t)}))},997(e,t,n){e=n.nmd(e),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=(e("../lib/lang"), |
| 64 |
e("./text_highlight_rules").TextHighlightRules),s=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",r=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",l=t.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",c=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",d=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",u=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",h=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":r,"support.type":s,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:d},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{ |
| 65 |
token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+d+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:u},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};o.inherits(h,i),t.CssHighlightRules=h})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,s=e.findMatchingBracket({row:t,column:i});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new o(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i})),ace.define("ace/mode/css_completions",["require","exports","module"],(function(e,t,n){"use strict";var o={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"==typeof e[t]){var n=t.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()}));o.hasOwnProperty(n)||(o[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,o){if(this.completionsDefined||this.defineCompletions(),"ruleset"===e||"ace/mode/scss"==t.$mode.$id){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,o)):this.getPropertyCompletions(e,t,n,o,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){return s=s||!1,Object.keys(o).map((function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}}))},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),a=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!a)return[];var r=[];return a in o&&"object"==typeof o[a]&&(r=Object.keys(o[a])),r.map((function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}}))}}).call(i.prototype),t.CssCompletions=i})),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],(function(e,t,n){"use strict";var o=e("../../lib/oop"),i=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),s=e("../../token_iterator").TokenIterator,a=function(){this.inherit(i),this.add("colon","insertion",(function(e,t,n,o,i){if(":"===i&&n.selection.isEmpty()){var a=n.getCursorPosition(),r=new s(o,a.row,a.column),l=r.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=r.stepBackward()),l&&"support.type"===l.type){var c=o.doc.getLine(a.row);if(":"===c.substring(a.column,a.column+1))return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(c.substring(a.column)))return{text:":;",selection:[1,1]}}}})),this.add("colon","deletion",(function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&":"===a){var r=n.getCursorPosition(),l=new s(o,r.row,r.column),c=l.getCurrentToken() |
| 66 |
;if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&"support.type"===c.type&&";"===o.doc.getLine(i.start.row).substring(i.end.column,i.end.column+1))return i.end.column++,i}})),this.add("semicolon","insertion",(function(e,t,n,o,i){if(";"===i&&n.selection.isEmpty()){var s=n.getCursorPosition();if(";"===o.doc.getLine(s.row).substring(s.column,s.column+1))return{text:"",selection:[1,1]}}})),this.add("!important","insertion",(function(e,t,n,o,i){if("!"===i&&n.selection.isEmpty()){var s=n.getCursorPosition(),a=o.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(a.substring(s.column)))return{text:"!important",selection:[10,10]}}}))};o.inherits(a,i),t.CssBehaviour=a})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var o=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(o)?"start":i},this.getFoldWidgetRange=function(e,t,n,o){var i,s=e.getLine(n);if(this.startRegionRe.test(s))return this.getCommentRegionBlock(e,s,n);if(i=s.match(this.foldingStartMarker)){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var r=e.getCommentFoldRange(n,a+i[0].length,1);return r&&!r.isMultiLine()&&(o?r=this.getSectionRange(e,n):"all"!=t&&(r=null)),r}return"markbegin"!==t&&(i=s.match(this.foldingStopMarker))?(a=i.index+i[0].length,i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)):void 0},this.getSectionRange=function(e,t){for(var n=e.getLine(t),o=n.search(/\S/),s=t,a=n.length,r=t+=1,l=e.getLength();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(o>c)break;var d=this.getFoldWidgetRange(e,"all",t);if(d){if(d.start.row<=s)break;if(d.isMultiLine())t=d.end.row;else if(o==c)break}r=t}}return new i(s,a,r,e.getLine(r).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),s=e.getLength(),a=n,r=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<s;){t=e.getLine(n);var c=r.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>a)return new i(a,o,n,t.length)}}.call(a.prototype)})),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,r=e("../worker/worker_client").WorkerClient,l=e("./css_completions").CssCompletions,c=e("./behaviour/css").CssBehaviour,d=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.$outdent=new a,this.$behaviour=new c,this.$completer=new l,this.foldingRules=new d};o.inherits(u,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;return i.length&&"comment"==i[i.length-1].type||t.match(/^.*\{\s*$/)&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){var t=new r(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(u.prototype),t.Mode=u})),ace.require(["ace/mode/css"],(function(t){e&&(e.exports=t)}))},3222(e,t,n){e=n.nmd(e),ace.define("ace/snippets/css.snippets",["require","exports","module"],(function(e,t,n){ |
| 67 |
n.exports="snippet .\n\t${1} {\n\t\t${2}\n\t}\nsnippet !\n\t !important\nsnippet bdi:m+\n\t-moz-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:m\n\t-moz-border-image: ${1};\nsnippet bdrz:m\n\t-moz-border-radius: ${1};\nsnippet bxsh:m+\n\t-moz-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh:m\n\t-moz-box-shadow: ${1};\nsnippet bdi:w+\n\t-webkit-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:w\n\t-webkit-border-image: ${1};\nsnippet bdrz:w\n\t-webkit-border-radius: ${1};\nsnippet bxsh:w+\n\t-webkit-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh:w\n\t-webkit-box-shadow: ${1};\nsnippet @f\n\t@font-face {\n\t\tfont-family: ${1};\n\t\tsrc: url(${2});\n\t}\nsnippet @i\n\t@import url(${1});\nsnippet @m\n\t@media ${1:print} {\n\t\t${2}\n\t}\nsnippet bg+\n\tbackground: #${1:FFF} url(${2}) ${3:0} ${4:0} ${5:no-repeat};\nsnippet bga\n\tbackground-attachment: ${1};\nsnippet bga:f\n\tbackground-attachment: fixed;\nsnippet bga:s\n\tbackground-attachment: scroll;\nsnippet bgbk\n\tbackground-break: ${1};\nsnippet bgbk:bb\n\tbackground-break: bounding-box;\nsnippet bgbk:c\n\tbackground-break: continuous;\nsnippet bgbk:eb\n\tbackground-break: each-box;\nsnippet bgcp\n\tbackground-clip: ${1};\nsnippet bgcp:bb\n\tbackground-clip: border-box;\nsnippet bgcp:cb\n\tbackground-clip: content-box;\nsnippet bgcp:nc\n\tbackground-clip: no-clip;\nsnippet bgcp:pb\n\tbackground-clip: padding-box;\nsnippet bgc\n\tbackground-color: #${1:FFF};\nsnippet bgc:t\n\tbackground-color: transparent;\nsnippet bgi\n\tbackground-image: url(${1});\nsnippet bgi:n\n\tbackground-image: none;\nsnippet bgo\n\tbackground-origin: ${1};\nsnippet bgo:bb\n\tbackground-origin: border-box;\nsnippet bgo:cb\n\tbackground-origin: content-box;\nsnippet bgo:pb\n\tbackground-origin: padding-box;\nsnippet bgpx\n\tbackground-position-x: ${1};\nsnippet bgpy\n\tbackground-position-y: ${1};\nsnippet bgp\n\tbackground-position: ${1:0} ${2:0};\nsnippet bgr\n\tbackground-repeat: ${1};\nsnippet bgr:n\n\tbackground-repeat: no-repeat;\nsnippet bgr:x\n\tbackground-repeat: repeat-x;\nsnippet bgr:y\n\tbackground-repeat: repeat-y;\nsnippet bgr:r\n\tbackground-repeat: repeat;\nsnippet bgz\n\tbackground-size: ${1};\nsnippet bgz:a\n\tbackground-size: auto;\nsnippet bgz:ct\n\tbackground-size: contain;\nsnippet bgz:cv\n\tbackground-size: cover;\nsnippet bg\n\tbackground: ${1};\nsnippet bg:ie\n\tfilter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1}',sizingMethod='${2:crop}');\nsnippet bg:n\n\tbackground: none;\nsnippet bd+\n\tborder: ${1:1px} ${2:solid} #${3:000};\nsnippet bdb+\n\tborder-bottom: ${1:1px} ${2:solid} #${3:000};\nsnippet bdbc\n\tborder-bottom-color: #${1:000};\nsnippet bdbi\n\tborder-bottom-image: url(${1});\nsnippet bdbi:n\n\tborder-bottom-image: none;\nsnippet bdbli\n\tborder-bottom-left-image: url(${1});\nsnippet bdbli:c\n\tborder-bottom-left-image: continue;\nsnippet bdbli:n\n\tborder-bottom-left-image: none;\nsnippet bdblrz\n\tborder-bottom-left-radius: ${1};\nsnippet bdbri\n\tborder-bottom-right-image: url(${1});\nsnippet bdbri:c\n\tborder-bottom-right-image: continue;\nsnippet bdbri:n\n\tborder-bottom-right-image: none;\nsnippet bdbrrz\n\tborder-bottom-right-radius: ${1};\nsnippet bdbs\n\tborder-bottom-style: ${1};\nsnippet bdbs:n\n\tborder-bottom-style: none;\nsnippet bdbw\n\tborder-bottom-width: ${1};\nsnippet bdb\n\tborder-bottom: ${1};\nsnippet bdb:n\n\tborder-bottom: none;\nsnippet bdbk\n\tborder-break: ${1};\nsnippet bdbk:c\n\tborder-break: close;\nsnippet bdcl\n\tborder-collapse: ${1};\nsnippet bdcl:c\n\tborder-collapse: collapse;\nsnippet bdcl:s\n\tborder-collapse: separate;\nsnippet bdc\n\tborder-color: #${1:000};\nsnippet bdci\n\tborder-corner-image: url(${1});\nsnippet bdci:c\n\tborder-corner-image: continue;\nsnippet bdci:n\n\tborder-corner-image: none;\nsnippet bdf\n\tborder-fit: ${1};\nsnippet bdf:c\n\tborder-fit: clip;\nsnippet bdf:of\n\tborder-fit: overwrite;\nsnippet bdf:ow\n\tborder-fit: overwrite;\nsnippet bdf:r\n\tborder-fit: repeat;\nsnippet bdf:sc\n\tborder-fit: scale;\nsnippet bdf:sp\n\tborder-fit: space;\nsnippet bdf:st\n\tborder-fit: stretch;\nsnippet bdi\n\tborder-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:n\n\tborder-image: none;\nsnippet bdl+\n\tborder-left: ${1:1px} ${2:solid} #${3:000};\nsnippet bdlc\n\tborder-left-color: #${1:000};\nsnippet bdli\n\tborder-left-image: url(${1});\nsnippet bdli:n\n\tborder-left-image: none;\nsnippet bdls\n\tborder-left-style: ${1};\nsnippet bdls:n\n\tborder-left-style: none;\nsnippet bdlw\n\tborder-left-width: ${1};\nsnippet bdl\n\tborder-left: ${1};\nsnippet bdl:n\n\tborder-left: none;\nsnippet bdlt\n\tborder-length: ${1};\nsnippet bdlt:a\n\tborder-length: auto;\nsnippet bdrz\n\tborder-radius: ${1};\nsnippet bdr+\n\tborder-right: ${1:1px} ${2:solid} #${3:000};\nsnippet bdrc\n\tborder-right-color: #${1:000};\nsnippet bdri\n\tborder-right-image: url(${1});\nsnippet bdri:n\n\tborder-right-image: none;\nsnippet bdrs\n\tborder-right-style: ${1};\nsnippet bdrs:n\n\tborder-right-style: none;\nsnippet bdrw\n\tborder-right-width: ${1};\nsnippet bdr\n\tborder-right: ${1};\nsnippet bdr:n\n\tborder-right: none;\nsnippet bdsp\n\tborder-spacing: ${1};\nsnippet bds\n\tborder-style: ${1};\nsnippet bds:ds\n\tborder-style: dashed;\nsnippet bds:dtds\n\tborder-style: dot-dash;\nsnippet bds:dtdtds\n\tborder-style: dot-dot-dash;\nsnippet bds:dt\n\tborder-style: dotted;\nsnippet bds:db\n\tborder-style: double;\nsnippet bds:g\n\tborder-style: groove;\nsnippet bds:h\n\tborder-style: hidden;\nsnippet bds:i\n\tborder-style: inset;\nsnippet bds:n\n\tborder-style: none;\nsnippet bds:o\n\tborder-style: outset;\nsnippet bds:r\n\tborder-style: ridge;\nsnippet bds:s\n\tborder-style: solid;\nsnippet bds:w\n\tborder-style: wave;\nsnippet bdt+\n\tborder-top: ${1:1px} ${2:solid} #${3:000};\nsnippet bdtc\n\tborder-top-color: #${1:000};\nsnippet bdti\n\tborder-top-image: url(${1});\nsnippet bdti:n\n\tborder-top-image: none;\nsnippet bdtli\n\tborder-top-left-image: url(${1});\nsnippet bdtli:c\n\tborder-corner-image: continue;\nsnippet bdtli:n\n\tborder-corner-image: none;\nsnippet bdtlrz\n\tborder-top-left-radius: ${1};\nsnippet bdtri\n\tborder-top-right-image: url(${1});\nsnippet bdtri:c\n\tborder-top-right-image: continue;\nsnippet bdtri:n\n\tborder-top-right-image: none;\nsnippet bdtrrz\n\tborder-top-right-radius: ${1};\nsnippet bdts\n\tborder-top-style: ${1};\nsnippet bdts:n\n\tborder-top-style: none;\nsnippet bdtw\n\tborder-top-width: ${1};\nsnippet bdt\n\tborder-top: ${1};\nsnippet bdt:n\n\tborder-top: none;\nsnippet bdw\n\tborder-width: ${1};\nsnippet bd\n\tborder: ${1};\nsnippet bd:n\n\tborder: none;\nsnippet b\n\tbottom: ${1};\nsnippet b:a\n\tbottom: auto;\nsnippet bxsh+\n\tbox-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh\n\tbox-shadow: ${1};\nsnippet bxsh:n\n\tbox-shadow: none;\nsnippet bxz\n\tbox-sizing: ${1};\nsnippet bxz:bb\n\tbox-sizing: border-box;\nsnippet bxz:cb\n\tbox-sizing: content-box;\nsnippet cps\n\tcaption-side: ${1};\nsnippet cps:b\n\tcaption-side: bottom;\nsnippet cps:t\n\tcaption-side: top;\nsnippet cl\n\tclear: ${1};\nsnippet cl:b\n\tclear: both;\nsnippet cl:l\n\tclear: left;\nsnippet cl:n\n\tclear: none;\nsnippet cl:r\n\tclear: right;\nsnippet cp\n\tclip: ${1};\nsnippet cp:a\n\tclip: auto;\nsnippet cp:r\n\tclip: rect(${1:0} ${2:0} ${3:0} ${4:0});\nsnippet c\n\tcolor: #${1:000};\nsnippet ct\n\tcontent: ${1};\nsnippet ct:a\n\tcontent: attr(${1});\nsnippet ct:cq\n\tcontent: close-quote;\nsnippet ct:c\n\tcontent: counter(${1});\nsnippet ct:cs\n\tcontent: counters(${1});\nsnippet ct:ncq\n\tcontent: no-close-quote;\nsnippet ct:noq\n\tcontent: no-open-quote;\nsnippet ct:n\n\tcontent: normal;\nsnippet ct:oq\n\tcontent: open-quote;\nsnippet coi\n\tcounter-increment: ${1};\nsnippet cor\n\tcounter-reset: ${1};\nsnippet cur\n\tcursor: ${1};\nsnippet cur:a\n\tcursor: auto;\nsnippet cur:c\n\tcursor: crosshair;\nsnippet cur:d\n\tcursor: default;\nsnippet cur:ha\n\tcursor: hand;\nsnippet cur:he\n\tcursor: help;\nsnippet cur:m\n\tcursor: move;\nsnippet cur:p\n\tcursor: pointer;\nsnippet cur:t\n\tcursor: text;\nsnippet d\n\tdisplay: ${1};\nsnippet d:mib\n\tdisplay: -moz-inline-box;\nsnippet d:mis\n\tdisplay: -moz-inline-stack;\nsnippet d:b\n\tdisplay: block;\nsnippet d:cp\n\tdisplay: compact;\nsnippet d:ib\n\tdisplay: inline-block;\nsnippet d:itb\n\tdisplay: inline-table;\nsnippet d:i\n\tdisplay: inline;\nsnippet d:li\n\tdisplay: list-item;\nsnippet d:n\n\tdisplay: none;\nsnippet d:ri\n\tdisplay: run-in;\nsnippet d:tbcp\n\tdisplay: table-caption;\nsnippet d:tbc\n\tdisplay: table-cell;\nsnippet d:tbclg\n\tdisplay: table-column-group;\nsnippet d:tbcl\n\tdisplay: table-column;\nsnippet d:tbfg\n\tdisplay: table-footer-group;\nsnippet d:tbhg\n\tdisplay: table-header-group;\nsnippet d:tbrg\n\tdisplay: table-row-group;\nsnippet d:tbr\n\tdisplay: table-row;\nsnippet d:tb\n\tdisplay: table;\nsnippet ec\n\tempty-cells: ${1};\nsnippet ec:h\n\tempty-cells: hide;\nsnippet ec:s\n\tempty-cells: show;\nsnippet exp\n\texpression()\nsnippet fl\n\tfloat: ${1};\nsnippet fl:l\n\tfloat: left;\nsnippet fl:n\n\tfloat: none;\nsnippet fl:r\n\tfloat: right;\nsnippet f+\n\tfont: ${1:1em} ${2:Arial},${3:sans-serif};\nsnippet fef\n\tfont-effect: ${1};\nsnippet fef:eb\n\tfont-effect: emboss;\nsnippet fef:eg\n\tfont-effect: engrave;\nsnippet fef:n\n\tfont-effect: none;\nsnippet fef:o\n\tfont-effect: outline;\nsnippet femp\n\tfont-emphasize-position: ${1};\nsnippet femp:a\n\tfont-emphasize-position: after;\nsnippet femp:b\n\tfont-emphasize-position: before;\nsnippet fems\n\tfont-emphasize-style: ${1};\nsnippet fems:ac\n\tfont-emphasize-style: accent;\nsnippet fems:c\n\tfont-emphasize-style: circle;\nsnippet fems:ds\n\tfont-emphasize-style: disc;\nsnippet fems:dt\n\tfont-emphasize-style: dot;\nsnippet fems:n\n\tfont-emphasize-style: none;\nsnippet fem\n\tfont-emphasize: ${1};\nsnippet ff\n\tfont-family: ${1};\nsnippet ff:c\n\tfont-family: ${1:'Monotype Corsiva','Comic Sans MS'},cursive;\nsnippet ff:f\n\tfont-family: ${1:Capitals,Impact},fantasy;\nsnippet ff:m\n\tfont-family: ${1:Monaco,'Courier New'},monospace;\nsnippet ff:ss\n\tfont-family: ${1:Helvetica,Arial},sans-serif;\nsnippet ff:s\n\tfont-family: ${1:Georgia,'Times New Roman'},serif;\nsnippet fza\n\tfont-size-adjust: ${1};\nsnippet fza:n\n\tfont-size-adjust: none;\nsnippet fz\n\tfont-size: ${1};\nsnippet fsm\n\tfont-smooth: ${1};\nsnippet fsm:aw\n\tfont-smooth: always;\nsnippet fsm:a\n\tfont-smooth: auto;\nsnippet fsm:n\n\tfont-smooth: never;\nsnippet fst\n\tfont-stretch: ${1};\nsnippet fst:c\n\tfont-stretch: condensed;\nsnippet fst:e\n\tfont-stretch: expanded;\nsnippet fst:ec\n\tfont-stretch: extra-condensed;\nsnippet fst:ee\n\tfont-stretch: extra-expanded;\nsnippet fst:n\n\tfont-stretch: normal;\nsnippet fst:sc\n\tfont-stretch: semi-condensed;\nsnippet fst:se\n\tfont-stretch: semi-expanded;\nsnippet fst:uc\n\tfont-stretch: ultra-condensed;\nsnippet fst:ue\n\tfont-stretch: ultra-expanded;\nsnippet fs\n\tfont-style: ${1};\nsnippet fs:i\n\tfont-style: italic;\nsnippet fs:n\n\tfont-style: normal;\nsnippet fs:o\n\tfont-style: oblique;\nsnippet fv\n\tfont-variant: ${1};\nsnippet fv:n\n\tfont-variant: normal;\nsnippet fv:sc\n\tfont-variant: small-caps;\nsnippet fw\n\tfont-weight: ${1};\nsnippet fw:b\n\tfont-weight: bold;\nsnippet fw:br\n\tfont-weight: bolder;\nsnippet fw:lr\n\tfont-weight: lighter;\nsnippet fw:n\n\tfont-weight: normal;\nsnippet f\n\tfont: ${1};\nsnippet h\n\theight: ${1};\nsnippet h:a\n\theight: auto;\nsnippet l\n\tleft: ${1};\nsnippet l:a\n\tleft: auto;\nsnippet lts\n\tletter-spacing: ${1};\nsnippet lh\n\tline-height: ${1};\nsnippet lisi\n\tlist-style-image: url(${1});\nsnippet lisi:n\n\tlist-style-image: none;\nsnippet lisp\n\tlist-style-position: ${1};\nsnippet lisp:i\n\tlist-style-position: inside;\nsnippet lisp:o\n\tlist-style-position: outside;\nsnippet list\n\tlist-style-type: ${1};\nsnippet list:c\n\tlist-style-type: circle;\nsnippet list:dclz\n\tlist-style-type: decimal-leading-zero;\nsnippet list:dc\n\tlist-style-type: decimal;\nsnippet list:d\n\tlist-style-type: disc;\nsnippet list:lr\n\tlist-style-type: lower-roman;\nsnippet list:n\n\tlist-style-type: none;\nsnippet list:s\n\tlist-style-type: square;\nsnippet list:ur\n\tlist-style-type: upper-roman;\nsnippet lis\n\tlist-style: ${1};\nsnippet lis:n\n\tlist-style: none;\nsnippet mb\n\tmargin-bottom: ${1};\nsnippet mb:a\n\tmargin-bottom: auto;\nsnippet ml\n\tmargin-left: ${1};\nsnippet ml:a\n\tmargin-left: auto;\nsnippet mr\n\tmargin-right: ${1};\nsnippet mr:a\n\tmargin-right: auto;\nsnippet mt\n\tmargin-top: ${1};\nsnippet mt:a\n\tmargin-top: auto;\nsnippet m\n\tmargin: ${1};\nsnippet m:4\n\tmargin: ${1:0} ${2:0} ${3:0} ${4:0};\nsnippet m:3\n\tmargin: ${1:0} ${2:0} ${3:0};\nsnippet m:2\n\tmargin: ${1:0} ${2:0};\nsnippet m:0\n\tmargin: 0;\nsnippet m:a\n\tmargin: auto;\nsnippet mah\n\tmax-height: ${1};\nsnippet mah:n\n\tmax-height: none;\nsnippet maw\n\tmax-width: ${1};\nsnippet maw:n\n\tmax-width: none;\nsnippet mih\n\tmin-height: ${1};\nsnippet miw\n\tmin-width: ${1};\nsnippet op\n\topacity: ${1};\nsnippet op:ie\n\tfilter: progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100});\nsnippet op:ms\n\t-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100})';\nsnippet orp\n\torphans: ${1};\nsnippet o+\n\toutline: ${1:1px} ${2:solid} #${3:000};\nsnippet oc\n\toutline-color: ${1:#000};\nsnippet oc:i\n\toutline-color: invert;\nsnippet oo\n\toutline-offset: ${1};\nsnippet os\n\toutline-style: ${1};\nsnippet ow\n\toutline-width: ${1};\nsnippet o\n\toutline: ${1};\nsnippet o:n\n\toutline: none;\nsnippet ovs\n\toverflow-style: ${1};\nsnippet ovs:a\n\toverflow-style: auto;\nsnippet ovs:mq\n\toverflow-style: marquee;\nsnippet ovs:mv\n\toverflow-style: move;\nsnippet ovs:p\n\toverflow-style: panner;\nsnippet ovs:s\n\toverflow-style: scrollbar;\nsnippet ovx\n\toverflow-x: ${1};\nsnippet ovx:a\n\toverflow-x: auto;\nsnippet ovx:h\n\toverflow-x: hidden;\nsnippet ovx:s\n\toverflow-x: scroll;\nsnippet ovx:v\n\toverflow-x: visible;\nsnippet ovy\n\toverflow-y: ${1};\nsnippet ovy:a\n\toverflow-y: auto;\nsnippet ovy:h\n\toverflow-y: hidden;\nsnippet ovy:s\n\toverflow-y: scroll;\nsnippet ovy:v\n\toverflow-y: visible;\nsnippet ov\n\toverflow: ${1};\nsnippet ov:a\n\toverflow: auto;\nsnippet ov:h\n\toverflow: hidden;\nsnippet ov:s\n\toverflow: scroll;\nsnippet ov:v\n\toverflow: visible;\nsnippet pb\n\tpadding-bottom: ${1};\nsnippet pl\n\tpadding-left: ${1};\nsnippet pr\n\tpadding-right: ${1};\nsnippet pt\n\tpadding-top: ${1};\nsnippet p\n\tpadding: ${1};\nsnippet p:4\n\tpadding: ${1:0} ${2:0} ${3:0} ${4:0};\nsnippet p:3\n\tpadding: ${1:0} ${2:0} ${3:0};\nsnippet p:2\n\tpadding: ${1:0} ${2:0};\nsnippet p:0\n\tpadding: 0;\nsnippet pgba\n\tpage-break-after: ${1};\nsnippet pgba:aw\n\tpage-break-after: always;\nsnippet pgba:a\n\tpage-break-after: auto;\nsnippet pgba:l\n\tpage-break-after: left;\nsnippet pgba:r\n\tpage-break-after: right;\nsnippet pgbb\n\tpage-break-before: ${1};\nsnippet pgbb:aw\n\tpage-break-before: always;\nsnippet pgbb:a\n\tpage-break-before: auto;\nsnippet pgbb:l\n\tpage-break-before: left;\nsnippet pgbb:r\n\tpage-break-before: right;\nsnippet pgbi\n\tpage-break-inside: ${1};\nsnippet pgbi:a\n\tpage-break-inside: auto;\nsnippet pgbi:av\n\tpage-break-inside: avoid;\nsnippet pos\n\tposition: ${1};\nsnippet pos:a\n\tposition: absolute;\nsnippet pos:f\n\tposition: fixed;\nsnippet pos:r\n\tposition: relative;\nsnippet pos:s\n\tposition: static;\nsnippet q\n\tquotes: ${1};\nsnippet q:en\n\tquotes: '\\201C' '\\201D' '\\2018' '\\2019';\nsnippet q:n\n\tquotes: none;\nsnippet q:ru\n\tquotes: '\\00AB' '\\00BB' '\\201E' '\\201C';\nsnippet rz\n\tresize: ${1};\nsnippet rz:b\n\tresize: both;\nsnippet rz:h\n\tresize: horizontal;\nsnippet rz:n\n\tresize: none;\nsnippet rz:v\n\tresize: vertical;\nsnippet r\n\tright: ${1};\nsnippet r:a\n\tright: auto;\nsnippet tbl\n\ttable-layout: ${1};\nsnippet tbl:a\n\ttable-layout: auto;\nsnippet tbl:f\n\ttable-layout: fixed;\nsnippet tal\n\ttext-align-last: ${1};\nsnippet tal:a\n\ttext-align-last: auto;\nsnippet tal:c\n\ttext-align-last: center;\nsnippet tal:l\n\ttext-align-last: left;\nsnippet tal:r\n\ttext-align-last: right;\nsnippet ta\n\ttext-align: ${1};\nsnippet ta:c\n\ttext-align: center;\nsnippet ta:l\n\ttext-align: left;\nsnippet ta:r\n\ttext-align: right;\nsnippet td\n\ttext-decoration: ${1};\nsnippet td:l\n\ttext-decoration: line-through;\nsnippet td:n\n\ttext-decoration: none;\nsnippet td:o\n\ttext-decoration: overline;\nsnippet td:u\n\ttext-decoration: underline;\nsnippet te\n\ttext-emphasis: ${1};\nsnippet te:ac\n\ttext-emphasis: accent;\nsnippet te:a\n\ttext-emphasis: after;\nsnippet te:b\n\ttext-emphasis: before;\nsnippet te:c\n\ttext-emphasis: circle;\nsnippet te:ds\n\ttext-emphasis: disc;\nsnippet te:dt\n\ttext-emphasis: dot;\nsnippet te:n\n\ttext-emphasis: none;\nsnippet th\n\ttext-height: ${1};\nsnippet th:a\n\ttext-height: auto;\nsnippet th:f\n\ttext-height: font-size;\nsnippet th:m\n\ttext-height: max-size;\nsnippet th:t\n\ttext-height: text-size;\nsnippet ti\n\ttext-indent: ${1};\nsnippet ti:-\n\ttext-indent: -9999px;\nsnippet tj\n\ttext-justify: ${1};\nsnippet tj:a\n\ttext-justify: auto;\nsnippet tj:d\n\ttext-justify: distribute;\nsnippet tj:ic\n\ttext-justify: inter-cluster;\nsnippet tj:ii\n\ttext-justify: inter-ideograph;\nsnippet tj:iw\n\ttext-justify: inter-word;\nsnippet tj:k\n\ttext-justify: kashida;\nsnippet tj:t\n\ttext-justify: tibetan;\nsnippet to+\n\ttext-outline: ${1:0} ${2:0} #${3:000};\nsnippet to\n\ttext-outline: ${1};\nsnippet to:n\n\ttext-outline: none;\nsnippet tr\n\ttext-replace: ${1};\nsnippet tr:n\n\ttext-replace: none;\nsnippet tsh+\n\ttext-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet tsh\n\ttext-shadow: ${1};\nsnippet tsh:n\n\ttext-shadow: none;\nsnippet tt\n\ttext-transform: ${1};\nsnippet tt:c\n\ttext-transform: capitalize;\nsnippet tt:l\n\ttext-transform: lowercase;\nsnippet tt:n\n\ttext-transform: none;\nsnippet tt:u\n\ttext-transform: uppercase;\nsnippet tw\n\ttext-wrap: ${1};\nsnippet tw:no\n\ttext-wrap: none;\nsnippet tw:n\n\ttext-wrap: normal;\nsnippet tw:s\n\ttext-wrap: suppress;\nsnippet tw:u\n\ttext-wrap: unrestricted;\nsnippet t\n\ttop: ${1};\nsnippet t:a\n\ttop: auto;\nsnippet va\n\tvertical-align: ${1};\nsnippet va:bl\n\tvertical-align: baseline;\nsnippet va:b\n\tvertical-align: bottom;\nsnippet va:m\n\tvertical-align: middle;\nsnippet va:sub\n\tvertical-align: sub;\nsnippet va:sup\n\tvertical-align: super;\nsnippet va:tb\n\tvertical-align: text-bottom;\nsnippet va:tt\n\tvertical-align: text-top;\nsnippet va:t\n\tvertical-align: top;\nsnippet v\n\tvisibility: ${1};\nsnippet v:c\n\tvisibility: collapse;\nsnippet v:h\n\tvisibility: hidden;\nsnippet v:v\n\tvisibility: visible;\nsnippet whsc\n\twhite-space-collapse: ${1};\nsnippet whsc:ba\n\twhite-space-collapse: break-all;\nsnippet whsc:bs\n\twhite-space-collapse: break-strict;\nsnippet whsc:k\n\twhite-space-collapse: keep-all;\nsnippet whsc:l\n\twhite-space-collapse: loose;\nsnippet whsc:n\n\twhite-space-collapse: normal;\nsnippet whs\n\twhite-space: ${1};\nsnippet whs:n\n\twhite-space: normal;\nsnippet whs:nw\n\twhite-space: nowrap;\nsnippet whs:pl\n\twhite-space: pre-line;\nsnippet whs:pw\n\twhite-space: pre-wrap;\nsnippet whs:p\n\twhite-space: pre;\nsnippet wid\n\twidows: ${1};\nsnippet w\n\twidth: ${1};\nsnippet w:a\n\twidth: auto;\nsnippet wob\n\tword-break: ${1};\nsnippet wob:ba\n\tword-break: break-all;\nsnippet wob:bs\n\tword-break: break-strict;\nsnippet wob:k\n\tword-break: keep-all;\nsnippet wob:l\n\tword-break: loose;\nsnippet wob:n\n\tword-break: normal;\nsnippet wos\n\tword-spacing: ${1};\nsnippet wow\n\tword-wrap: ${1};\nsnippet wow:no\n\tword-wrap: none;\nsnippet wow:n\n\tword-wrap: normal;\nsnippet wow:s\n\tword-wrap: suppress;\nsnippet wow:u\n\tword-wrap: unrestricted;\nsnippet z\n\tz-index: ${1};\nsnippet z:a\n\tz-index: auto;\nsnippet zoo\n\tzoom: 1;\n" |
| 68 |
})),ace.define("ace/snippets/css",["require","exports","module","ace/snippets/css.snippets"],(function(e,t,n){"use strict";t.snippetText=e("./css.snippets"),t.scope="css"})),ace.require(["ace/snippets/css"],(function(t){e&&(e.exports=t)}))},6704(e,t,n){e=n.nmd(e),ace.define("ace/snippets/html.snippets",["require","exports","module"],(function(e,t,n){ |
| 69 |
n.exports='# Some useful Unicode entities\n# Non-Breaking Space\nsnippet nbs\n\t \n# ←\nsnippet left\n\t←\n# →\nsnippet right\n\t→\n# ↑\nsnippet up\n\t↑\n# ↓\nsnippet down\n\t↓\n# ↩\nsnippet return\n\t↩\n# ⇤\nsnippet backtab\n\t⇤\n# ⇥\nsnippet tab\n\t⇥\n# ⇧\nsnippet shift\n\t⇧\n# ⌃\nsnippet ctrl\n\t⌃\n# ⌅\nsnippet enter\n\t⌅\n# ⌘\nsnippet cmd\n\t⌘\n# ⌥\nsnippet option\n\t⌥\n# ⌦\nsnippet delete\n\t⌦\n# ⌫\nsnippet backspace\n\t⌫\n# ⎋\nsnippet esc\n\t⎋\n# Generic Doctype\nsnippet doctype HTML 4.01 Strict\n\t<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n\t"http://www.w3.org/TR/html4/strict.dtd">\nsnippet doctype HTML 4.01 Transitional\n\t<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n\t"http://www.w3.org/TR/html4/loose.dtd">\nsnippet doctype HTML 5\n\t<!DOCTYPE HTML>\nsnippet doctype XHTML 1.0 Frameset\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n\t"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\nsnippet doctype XHTML 1.0 Strict\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n\t"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\nsnippet doctype XHTML 1.0 Transitional\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n\t"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\nsnippet doctype XHTML 1.1\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\n\t"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n# HTML Doctype 4.01 Strict\nsnippet docts\n\t<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n\t"http://www.w3.org/TR/html4/strict.dtd">\n# HTML Doctype 4.01 Transitional\nsnippet doct\n\t<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n\t"http://www.w3.org/TR/html4/loose.dtd">\n# HTML Doctype 5\nsnippet doct5\n\t<!DOCTYPE html>\n# XHTML Doctype 1.0 Frameset\nsnippet docxf\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"\n\t"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">\n# XHTML Doctype 1.0 Strict\nsnippet docxs\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n\t"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n# XHTML Doctype 1.0 Transitional\nsnippet docxt\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n\t"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n# XHTML Doctype 1.1\nsnippet docx\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\n\t"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n# html5shiv\nsnippet html5shiv\n\t\x3c!--[if lte IE 8]>\n\t\t<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"><\/script>\n\t<![endif]--\x3e\nsnippet html5printshiv\n\t\x3c!--[if lte IE 8]>\n\t\t<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"><\/script>\n\t<![endif]--\x3e\n# Attributes\nsnippet attr\n\t${1:attribute}="${2:property}"\nsnippet attr+\n\t${1:attribute}="${2:property}" attr+${3}\nsnippet .\n\tclass="${1}"${2}\nsnippet #\n\tid="${1}"${2}\nsnippet alt\n\talt="${1}"${2}\nsnippet charset\n\tcharset="${1:utf-8}"${2}\nsnippet data\n\tdata-${1}="${2:$1}"${3}\nsnippet for\n\tfor="${1}"${2}\nsnippet height\n\theight="${1}"${2}\nsnippet href\n\thref="${1:#}"${2}\nsnippet lang\n\tlang="${1:en}"${2}\nsnippet media\n\tmedia="${1}"${2}\nsnippet name\n\tname="${1}"${2}\nsnippet rel\n\trel="${1}"${2}\nsnippet scope\n\tscope="${1:row}"${2}\nsnippet src\n\tsrc="${1}"${2}\nsnippet title=\n\ttitle="${1}"${2}\nsnippet type\n\ttype="${1}"${2}\nsnippet value\n\tvalue="${1}"${2}\nsnippet width\n\twidth="${1}"${2}\n# Elements\nsnippet a\n\t<a href="${1:#}">${2:$1}</a>\nsnippet a.\n\t<a class="${1}" href="${2:#}">${3:$1}</a>\nsnippet a#\n\t<a id="${1}" href="${2:#}">${3:$1}</a>\nsnippet a:ext\n\t<a href="http://${1:example.com}">${2:$1}</a>\nsnippet a:mail\n\t<a href="mailto:${1:[email protected]}?subject=${2:feedback}">${3:email me}</a>\nsnippet abbr\n\t<abbr title="${1}">${2}</abbr>\nsnippet address\n\t<address>\n\t\t${1}\n\t</address>\nsnippet area\n\t<area shape="${1:rect}" coords="${2}" href="${3}" alt="${4}" />\nsnippet area+\n\t<area shape="${1:rect}" coords="${2}" href="${3}" alt="${4}" />\n\tarea+${5}\nsnippet area:c\n\t<area shape="circle" coords="${1}" href="${2}" alt="${3}" />\nsnippet area:d\n\t<area shape="default" coords="${1}" href="${2}" alt="${3}" />\nsnippet area:p\n\t<area shape="poly" coords="${1}" href="${2}" alt="${3}" />\nsnippet area:r\n\t<area shape="rect" coords="${1}" href="${2}" alt="${3}" />\nsnippet article\n\t<article>\n\t\t${1}\n\t</article>\nsnippet article.\n\t<article class="${1}">\n\t\t${2}\n\t</article>\nsnippet article#\n\t<article id="${1}">\n\t\t${2}\n\t</article>\nsnippet aside\n\t<aside>\n\t\t${1}\n\t</aside>\nsnippet aside.\n\t<aside class="${1}">\n\t\t${2}\n\t</aside>\nsnippet aside#\n\t<aside id="${1}">\n\t\t${2}\n\t</aside>\nsnippet audio\n\t<audio src="${1}>${2}</audio>\nsnippet b\n\t<b>${1}</b>\nsnippet base\n\t<base href="${1}" target="${2}" />\nsnippet bdi\n\t<bdi>${1}</bdo>\nsnippet bdo\n\t<bdo dir="${1}">${2}</bdo>\nsnippet bdo:l\n\t<bdo dir="ltr">${1}</bdo>\nsnippet bdo:r\n\t<bdo dir="rtl">${1}</bdo>\nsnippet blockquote\n\t<blockquote>\n\t\t${1}\n\t</blockquote>\nsnippet body\n\t<body>\n\t\t${1}\n\t</body>\nsnippet br\n\t<br />${1}\nsnippet button\n\t<button type="${1:submit}">${2}</button>\nsnippet button.\n\t<button class="${1:button}" type="${2:submit}">${3}</button>\nsnippet button#\n\t<button id="${1}" type="${2:submit}">${3}</button>\nsnippet button:s\n\t<button type="submit">${1}</button>\nsnippet button:r\n\t<button type="reset">${1}</button>\nsnippet canvas\n\t<canvas id="${1:canvas}"></canvas>\nsnippet caption\n\t<caption>${1}</caption>\nsnippet cite\n\t<cite>${1}</cite>\nsnippet code\n\t<code>${1}</code>\nsnippet col\n\t<col />${1}\nsnippet col+\n\t<col />\n\tcol+${1}\nsnippet colgroup\n\t<colgroup>\n\t\t${1}\n\t</colgroup>\nsnippet colgroup+\n\t<colgroup>\n\t\t<col />\n\t\tcol+${1}\n\t</colgroup>\nsnippet command\n\t<command type="command" label="${1}" icon="${2}" />\nsnippet command:c\n\t<command type="checkbox" label="${1}" icon="${2}" />\nsnippet command:r\n\t<command type="radio" radiogroup="${1}" label="${2}" icon="${3}" />\nsnippet datagrid\n\t<datagrid>\n\t\t${1}\n\t</datagrid>\nsnippet datalist\n\t<datalist>\n\t\t${1}\n\t</datalist>\nsnippet datatemplate\n\t<datatemplate>\n\t\t${1}\n\t</datatemplate>\nsnippet dd\n\t<dd>${1}</dd>\nsnippet dd.\n\t<dd class="${1}">${2}</dd>\nsnippet dd#\n\t<dd id="${1}">${2}</dd>\nsnippet del\n\t<del>${1}</del>\nsnippet details\n\t<details>${1}</details>\nsnippet dfn\n\t<dfn>${1}</dfn>\nsnippet dialog\n\t<dialog>\n\t\t${1}\n\t</dialog>\nsnippet div\n\t<div>\n\t\t${1}\n\t</div>\nsnippet div.\n\t<div class="${1}">\n\t\t${2}\n\t</div>\nsnippet div#\n\t<div id="${1}">\n\t\t${2}\n\t</div>\nsnippet dl\n\t<dl>\n\t\t${1}\n\t</dl>\nsnippet dl.\n\t<dl class="${1}">\n\t\t${2}\n\t</dl>\nsnippet dl#\n\t<dl id="${1}">\n\t\t${2}\n\t</dl>\nsnippet dl+\n\t<dl>\n\t\t<dt>${1}</dt>\n\t\t<dd>${2}</dd>\n\t\tdt+${3}\n\t</dl>\nsnippet dt\n\t<dt>${1}</dt>\nsnippet dt.\n\t<dt class="${1}">${2}</dt>\nsnippet dt#\n\t<dt id="${1}">${2}</dt>\nsnippet dt+\n\t<dt>${1}</dt>\n\t<dd>${2}</dd>\n\tdt+${3}\nsnippet em\n\t<em>${1}</em>\nsnippet embed\n\t<embed src=${1} type="${2} />\nsnippet fieldset\n\t<fieldset>\n\t\t${1}\n\t</fieldset>\nsnippet fieldset.\n\t<fieldset class="${1}">\n\t\t${2}\n\t</fieldset>\nsnippet fieldset#\n\t<fieldset id="${1}">\n\t\t${2}\n\t</fieldset>\nsnippet fieldset+\n\t<fieldset>\n\t\t<legend><span>${1}</span></legend>\n\t\t${2}\n\t</fieldset>\n\tfieldset+${3}\nsnippet figcaption\n\t<figcaption>${1}</figcaption>\nsnippet figure\n\t<figure>${1}</figure>\nsnippet footer\n\t<footer>\n\t\t${1}\n\t</footer>\nsnippet footer.\n\t<footer class="${1}">\n\t\t${2}\n\t</footer>\nsnippet footer#\n\t<footer id="${1}">\n\t\t${2}\n\t</footer>\nsnippet form\n\t<form action="${1}" method="${2:get}" accept-charset="utf-8">\n\t\t${3}\n\t</form>\nsnippet form.\n\t<form class="${1}" action="${2}" method="${3:get}" accept-charset="utf-8">\n\t\t${4}\n\t</form>\nsnippet form#\n\t<form id="${1}" action="${2}" method="${3:get}" accept-charset="utf-8">\n\t\t${4}\n\t</form>\nsnippet h1\n\t<h1>${1}</h1>\nsnippet h1.\n\t<h1 class="${1}">${2}</h1>\nsnippet h1#\n\t<h1 id="${1}">${2}</h1>\nsnippet h2\n\t<h2>${1}</h2>\nsnippet h2.\n\t<h2 class="${1}">${2}</h2>\nsnippet h2#\n\t<h2 id="${1}">${2}</h2>\nsnippet h3\n\t<h3>${1}</h3>\nsnippet h3.\n\t<h3 class="${1}">${2}</h3>\nsnippet h3#\n\t<h3 id="${1}">${2}</h3>\nsnippet h4\n\t<h4>${1}</h4>\nsnippet h4.\n\t<h4 class="${1}">${2}</h4>\nsnippet h4#\n\t<h4 id="${1}">${2}</h4>\nsnippet h5\n\t<h5>${1}</h5>\nsnippet h5.\n\t<h5 class="${1}">${2}</h5>\nsnippet h5#\n\t<h5 id="${1}">${2}</h5>\nsnippet h6\n\t<h6>${1}</h6>\nsnippet h6.\n\t<h6 class="${1}">${2}</h6>\nsnippet h6#\n\t<h6 id="${1}">${2}</h6>\nsnippet head\n\t<head>\n\t\t<meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\n\t\t<title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\n\t\t${2}\n\t</head>\nsnippet header\n\t<header>\n\t\t${1}\n\t</header>\nsnippet header.\n\t<header class="${1}">\n\t\t${2}\n\t</header>\nsnippet header#\n\t<header id="${1}">\n\t\t${2}\n\t</header>\nsnippet hgroup\n\t<hgroup>\n\t\t${1}\n\t</hgroup>\nsnippet hgroup.\n\t<hgroup class="${1}>\n\t\t${2}\n\t</hgroup>\nsnippet hr\n\t<hr />${1}\nsnippet html\n\t<html>\n\t${1}\n\t</html>\nsnippet xhtml\n\t<html xmlns="http://www.w3.org/1999/xhtml">\n\t${1}\n\t</html>\nsnippet html5\n\t<!DOCTYPE html>\n\t<html>\n\t\t<head>\n\t\t\t<meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\t\t\t<title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\n\t\t\t${2:meta}\n\t\t</head>\n\t\t<body>\n\t\t\t${3:body}\n\t\t</body>\n\t</html>\nsnippet xhtml5\n\t<!DOCTYPE html>\n\t<html xmlns="http://www.w3.org/1999/xhtml">\n\t\t<head>\n\t\t\t<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />\n\t\t\t<title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\n\t\t\t${2:meta}\n\t\t</head>\n\t\t<body>\n\t\t\t${3:body}\n\t\t</body>\n\t</html>\nsnippet i\n\t<i>${1}</i>\nsnippet iframe\n\t<iframe src="${1}" frameborder="0"></iframe>${2}\nsnippet iframe.\n\t<iframe class="${1}" src="${2}" frameborder="0"></iframe>${3}\nsnippet iframe#\n\t<iframe id="${1}" src="${2}" frameborder="0"></iframe>${3}\nsnippet img\n\t<img src="${1}" alt="${2}" />${3}\nsnippet img.\n\t<img class="${1}" src="${2}" alt="${3}" />${4}\nsnippet img#\n\t<img id="${1}" src="${2}" alt="${3}" />${4}\nsnippet input\n\t<input type="${1:text/submit/hidden/button/image}" name="${2}" id="${3:$2}" value="${4}" />${5}\nsnippet input.\n\t<input class="${1}" type="${2:text/submit/hidden/button/image}" name="${3}" id="${4:$3}" value="${5}" />${6}\nsnippet input:text\n\t<input type="text" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:submit\n\t<input type="submit" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:hidden\n\t<input type="hidden" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:button\n\t<input type="button" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:image\n\t<input type="image" name="${1}" id="${2:$1}" src="${3}" alt="${4}" />${5}\nsnippet input:checkbox\n\t<input type="checkbox" name="${1}" id="${2:$1}" />${3}\nsnippet input:radio\n\t<input type="radio" name="${1}" id="${2:$1}" />${3}\nsnippet input:color\n\t<input type="color" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:date\n\t<input type="date" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:datetime\n\t<input type="datetime" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:datetime-local\n\t<input type="datetime-local" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:email\n\t<input type="email" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:file\n\t<input type="file" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:month\n\t<input type="month" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:number\n\t<input type="number" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:password\n\t<input type="password" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:range\n\t<input type="range" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:reset\n\t<input type="reset" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:search\n\t<input type="search" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:time\n\t<input type="time" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:url\n\t<input type="url" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:week\n\t<input type="week" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet ins\n\t<ins>${1}</ins>\nsnippet kbd\n\t<kbd>${1}</kbd>\nsnippet keygen\n\t<keygen>${1}</keygen>\nsnippet label\n\t<label for="${2:$1}">${1}</label>\nsnippet label:i\n\t<label for="${2:$1}">${1}</label>\n\t<input type="${3:text/submit/hidden/button}" name="${4:$2}" id="${5:$2}" value="${6}" />${7}\nsnippet label:s\n\t<label for="${2:$1}">${1}</label>\n\t<select name="${3:$2}" id="${4:$2}">\n\t\t<option value="${5}">${6:$5}</option>\n\t</select>\nsnippet legend\n\t<legend>${1}</legend>\nsnippet legend+\n\t<legend><span>${1}</span></legend>\nsnippet li\n\t<li>${1}</li>\nsnippet li.\n\t<li class="${1}">${2}</li>\nsnippet li+\n\t<li>${1}</li>\n\tli+${2}\nsnippet lia\n\t<li><a href="${2:#}">${1}</a></li>\nsnippet lia+\n\t<li><a href="${2:#}">${1}</a></li>\n\tlia+${3}\nsnippet link\n\t<link rel="${1}" href="${2}" title="${3}" type="${4}" />${5}\nsnippet link:atom\n\t<link rel="alternate" href="${1:atom.xml}" title="Atom" type="application/atom+xml" />${2}\nsnippet link:css\n\t<link rel="stylesheet" href="${2:style.css}" type="text/css" media="${3:all}" />${4}\nsnippet link:favicon\n\t<link rel="shortcut icon" href="${1:favicon.ico}" type="image/x-icon" />${2}\nsnippet link:rss\n\t<link rel="alternate" href="${1:rss.xml}" title="RSS" type="application/atom+xml" />${2}\nsnippet link:touch\n\t<link rel="apple-touch-icon" href="${1:favicon.png}" />${2}\nsnippet map\n\t<map name="${1}">\n\t\t${2}\n\t</map>\nsnippet map.\n\t<map class="${1}" name="${2}">\n\t\t${3}\n\t</map>\nsnippet map#\n\t<map name="${1}" id="${2:$1}>\n\t\t${3}\n\t</map>\nsnippet map+\n\t<map name="${1}">\n\t\t<area shape="${2}" coords="${3}" href="${4}" alt="${5}" />${6}\n\t</map>${7}\nsnippet mark\n\t<mark>${1}</mark>\nsnippet menu\n\t<menu>\n\t\t${1}\n\t</menu>\nsnippet menu:c\n\t<menu type="context">\n\t\t${1}\n\t</menu>\nsnippet menu:t\n\t<menu type="toolbar">\n\t\t${1}\n\t</menu>\nsnippet meta\n\t<meta http-equiv="${1}" content="${2}" />${3}\nsnippet meta:compat\n\t<meta http-equiv="X-UA-Compatible" content="IE=${1:7,8,edge}" />${3}\nsnippet meta:refresh\n\t<meta http-equiv="refresh" content="text/html;charset=UTF-8" />${3}\nsnippet meta:utf\n\t<meta http-equiv="content-type" content="text/html;charset=UTF-8" />${3}\nsnippet meter\n\t<meter>${1}</meter>\nsnippet nav\n\t<nav>\n\t\t${1}\n\t</nav>\nsnippet nav.\n\t<nav class="${1}">\n\t\t${2}\n\t</nav>\nsnippet nav#\n\t<nav id="${1}">\n\t\t${2}\n\t</nav>\nsnippet noscript\n\t<noscript>\n\t\t${1}\n\t</noscript>\nsnippet object\n\t<object data="${1}" type="${2}">\n\t\t${3}\n\t</object>${4}\n# Embed QT Movie\nsnippet movie\n\t<object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"\n\t codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n\t\t<param name="src" value="$1" />\n\t\t<param name="controller" value="$4" />\n\t\t<param name="autoplay" value="$5" />\n\t\t<embed src="${1:movie.mov}"\n\t\t\twidth="${2:320}" height="${3:240}"\n\t\t\tcontroller="${4:true}" autoplay="${5:true}"\n\t\t\tscale="tofit" cache="true"\n\t\t\tpluginspage="http://www.apple.com/quicktime/download/" />\n\t</object>${6}\nsnippet ol\n\t<ol>\n\t\t${1}\n\t</ol>\nsnippet ol.\n\t<ol class="${1}>\n\t\t${2}\n\t</ol>\nsnippet ol#\n\t<ol id="${1}>\n\t\t${2}\n\t</ol>\nsnippet ol+\n\t<ol>\n\t\t<li>${1}</li>\n\t\tli+${2}\n\t</ol>\nsnippet opt\n\t<option value="${1}">${2:$1}</option>\nsnippet opt+\n\t<option value="${1}">${2:$1}</option>\n\topt+${3}\nsnippet optt\n\t<option>${1}</option>\nsnippet optgroup\n\t<optgroup>\n\t\t<option value="${1}">${2:$1}</option>\n\t\topt+${3}\n\t</optgroup>\nsnippet output\n\t<output>${1}</output>\nsnippet p\n\t<p>${1}</p>\nsnippet param\n\t<param name="${1}" value="${2}" />${3}\nsnippet pre\n\t<pre>\n\t\t${1}\n\t</pre>\nsnippet progress\n\t<progress>${1}</progress>\nsnippet q\n\t<q>${1}</q>\nsnippet rp\n\t<rp>${1}</rp>\nsnippet rt\n\t<rt>${1}</rt>\nsnippet ruby\n\t<ruby>\n\t\t<rp><rt>${1}</rt></rp>\n\t</ruby>\nsnippet s\n\t<s>${1}</s>\nsnippet samp\n\t<samp>\n\t\t${1}\n\t</samp>\nsnippet script\n\t<script type="text/javascript" charset="utf-8">\n\t\t${1}\n\t<\/script>\nsnippet scriptsrc\n\t<script src="${1}.js" type="text/javascript" charset="utf-8"><\/script>\nsnippet newscript\n\t<script type="application/javascript" charset="utf-8">\n\t\t${1}\n\t<\/script>\nsnippet newscriptsrc\n\t<script src="${1}.js" type="application/javascript" charset="utf-8"><\/script>\nsnippet section\n\t<section>\n\t\t${1}\n\t</section>\nsnippet section.\n\t<section class="${1}">\n\t\t${2}\n\t</section>\nsnippet section#\n\t<section id="${1}">\n\t\t${2}\n\t</section>\nsnippet select\n\t<select name="${1}" id="${2:$1}">\n\t\t${3}\n\t</select>\nsnippet select.\n\t<select name="${1}" id="${2:$1}" class="${3}>\n\t\t${4}\n\t</select>\nsnippet select+\n\t<select name="${1}" id="${2:$1}">\n\t\t<option value="${3}">${4:$3}</option>\n\t\topt+${5}\n\t</select>\nsnippet small\n\t<small>${1}</small>\nsnippet source\n\t<source src="${1}" type="${2}" media="${3}" />\nsnippet span\n\t<span>${1}</span>\nsnippet strong\n\t<strong>${1}</strong>\nsnippet style\n\t<style type="text/css" media="${1:all}">\n\t\t${2}\n\t</style>\nsnippet sub\n\t<sub>${1}</sub>\nsnippet summary\n\t<summary>\n\t\t${1}\n\t</summary>\nsnippet sup\n\t<sup>${1}</sup>\nsnippet table\n\t<table border="${1:0}">\n\t\t${2}\n\t</table>\nsnippet table.\n\t<table class="${1}" border="${2:0}">\n\t\t${3}\n\t</table>\nsnippet table#\n\t<table id="${1}" border="${2:0}">\n\t\t${3}\n\t</table>\nsnippet tbody\n\t<tbody>\n\t\t${1}\n\t</tbody>\nsnippet td\n\t<td>${1}</td>\nsnippet td.\n\t<td class="${1}">${2}</td>\nsnippet td#\n\t<td id="${1}">${2}</td>\nsnippet td+\n\t<td>${1}</td>\n\ttd+${2}\nsnippet textarea\n\t<textarea name="${1}" id=${2:$1} rows="${3:8}" cols="${4:40}">${5}</textarea>${6}\nsnippet tfoot\n\t<tfoot>\n\t\t${1}\n\t</tfoot>\nsnippet th\n\t<th>${1}</th>\nsnippet th.\n\t<th class="${1}">${2}</th>\nsnippet th#\n\t<th id="${1}">${2}</th>\nsnippet th+\n\t<th>${1}</th>\n\tth+${2}\nsnippet thead\n\t<thead>\n\t\t${1}\n\t</thead>\nsnippet time\n\t<time datetime="${1}" pubdate="${2:$1}>${3:$1}</time>\nsnippet title\n\t<title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\nsnippet tr\n\t<tr>\n\t\t${1}\n\t</tr>\nsnippet tr+\n\t<tr>\n\t\t<td>${1}</td>\n\t\ttd+${2}\n\t</tr>\nsnippet track\n\t<track src="${1}" srclang="${2}" label="${3}" default="${4:default}>${5}</track>${6}\nsnippet ul\n\t<ul>\n\t\t${1}\n\t</ul>\nsnippet ul.\n\t<ul class="${1}">\n\t\t${2}\n\t</ul>\nsnippet ul#\n\t<ul id="${1}">\n\t\t${2}\n\t</ul>\nsnippet ul+\n\t<ul>\n\t\t<li>${1}</li>\n\t\tli+${2}\n\t</ul>\nsnippet var\n\t<var>${1}</var>\nsnippet video\n\t<video src="${1}" height="${2}" width="${3}" preload="${5:none}" autoplay="${6:autoplay}">${7}</video>${8}\nsnippet wbr\n\t<wbr />${1}\n' |
| 70 |
})),ace.define("ace/snippets/html",["require","exports","module","ace/snippets/html.snippets"],(function(e,t,n){"use strict";t.snippetText=e("./html.snippets"),t.scope="html"})),ace.require(["ace/snippets/html"],(function(t){e&&(e.exports=t)}))},4144(e,t,n){e=n.nmd(e),ace.define("ace/theme/monokai-css",["require","exports","module"],(function(e,t,n){n.exports=".ace-monokai .ace_gutter {\n background: #2F3129;\n color: #8F908A\n}\n\n.ace-monokai .ace_print-margin {\n width: 1px;\n background: #555651\n}\n\n.ace-monokai {\n background-color: #272822;\n color: #F8F8F2\n}\n\n.ace-monokai .ace_cursor {\n color: #F8F8F0\n}\n\n.ace-monokai .ace_marker-layer .ace_selection {\n background: #49483E\n}\n\n.ace-monokai.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #272822;\n}\n\n.ace-monokai .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-monokai .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #49483E\n}\n\n.ace-monokai .ace_marker-layer .ace_active-line {\n background: #202020\n}\n\n.ace-monokai .ace_gutter-active-line {\n background-color: #272727\n}\n\n.ace-monokai .ace_marker-layer .ace_selected-word {\n border: 1px solid #49483E\n}\n\n.ace-monokai .ace_invisible {\n color: #52524d\n}\n\n.ace-monokai .ace_entity.ace_name.ace_tag,\n.ace-monokai .ace_keyword,\n.ace-monokai .ace_meta.ace_tag,\n.ace-monokai .ace_storage {\n color: #F92672\n}\n\n.ace-monokai .ace_punctuation,\n.ace-monokai .ace_punctuation.ace_tag {\n color: #fff\n}\n\n.ace-monokai .ace_constant.ace_character,\n.ace-monokai .ace_constant.ace_language,\n.ace-monokai .ace_constant.ace_numeric,\n.ace-monokai .ace_constant.ace_other {\n color: #AE81FF\n}\n\n.ace-monokai .ace_invalid {\n color: #F8F8F0;\n background-color: #F92672\n}\n\n.ace-monokai .ace_invalid.ace_deprecated {\n color: #F8F8F0;\n background-color: #AE81FF\n}\n\n.ace-monokai .ace_support.ace_constant,\n.ace-monokai .ace_support.ace_function {\n color: #66D9EF\n}\n\n.ace-monokai .ace_fold {\n background-color: #A6E22E;\n border-color: #F8F8F2\n}\n\n.ace-monokai .ace_storage.ace_type,\n.ace-monokai .ace_support.ace_class,\n.ace-monokai .ace_support.ace_type {\n font-style: italic;\n color: #66D9EF\n}\n\n.ace-monokai .ace_entity.ace_name.ace_function,\n.ace-monokai .ace_entity.ace_other,\n.ace-monokai .ace_entity.ace_other.ace_attribute-name,\n.ace-monokai .ace_variable {\n color: #A6E22E\n}\n\n.ace-monokai .ace_variable.ace_parameter {\n font-style: italic;\n color: #FD971F\n}\n\n.ace-monokai .ace_string {\n color: #E6DB74\n}\n\n.ace-monokai .ace_comment {\n color: #75715E\n}\n\n.ace-monokai .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-monokai .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"})),ace.define("ace/theme/monokai",["require","exports","module","ace/theme/monokai-css","ace/lib/dom"],(function(e,t,n){t.isDark=!0,t.cssClass="ace-monokai",t.cssText=e("./monokai-css"),e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.require(["ace/theme/monokai"],(function(t){e&&(e.exports=t)}))},2972(){!function(e){if(!(void 0!==e.window&&e.document||e.require&&e.define)){e.console||(e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console),e.window=e,e.ace=e,e.onerror=function(e,t,n,o,i){postMessage({type:"error",data:{message:e,data:i&&i.data,file:t,line:n,col:o,stack:i&&i.stack}})},e.normalizeModule=function(t,n){if(-1!==n.indexOf("!")){var o=n.split("!");return e.normalizeModule(t,o[0])+"!"+e.normalizeModule(t,o[1])}if("."==n.charAt(0)){var i=t.split("/").slice(0,-1).join("/");for(n=(i?i+"/":"")+n;-1!==n.indexOf(".")&&s!=n;){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(t,n){if(n||(n=t,t=null),!n.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");n=e.normalizeModule(t,n);var o=e.require.modules[n];if(o)return o.initialized||(o.initialized=!0,o.exports=o.factory().exports),o.exports;if(!e.require.tlns)return console.log("unable to load "+n);var i=function(e,t){for(var n=e,o="";n;){var i=t[n];if("string"==typeof i)return i+o;if(i)return i.location.replace(/\/*$/,"/")+(o||i.main||i.name);if(!1===i)return"";var s=n.lastIndexOf("/");if(-1===s)break;o=n.substr(s)+o,n=n.slice(0,s)}return e}(n,e.require.tlns);return".js"!=i.slice(-3)&&(i+=".js"),e.require.id=n,e.require.modules[n]={},importScripts(i),e.require(t,n)},e.require.modules={},e.require.tlns={},e.define=function(t,n,o){if(2==arguments.length?(o=n,"string"!=typeof t&&(n=t,t=e.require.id)):1==arguments.length&&(o=t,n=[],t=e.require.id),"function"==typeof o){n.length||(n=["require","exports","module"]);var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=o.apply(this,n.slice(0,o.length).map((function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}})));return t&&(e.exports=t),e}}}else e.require.modules[t]={exports:o,initialized:!0}},e.define.amd={},e.require.tlns={},e.initBaseUrls=function(e){for(var t in e)this.require.tlns[t]=e[t]},e.initSender=function(){var t=e.require("ace/lib/event_emitter").EventEmitter,n=e.require("ace/lib/oop"),o=function(){};return function(){n.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(o.prototype),new o};var t=e.main=null,n=e.sender=null;e.onmessage=function(o){var i=o.data;if(i.event&&n)n._signal(i.event,i.data);else if(i.command)if(t[i.command])t[i.command].apply(t,i.args);else{if(!e[i.command])throw new Error("Unknown command:"+i.command);e[i.command].apply(e,i.args)}else if(i.init){e.initBaseUrls(i.tlns),n=e.sender=e.initSender();var s=this.require(i.module)[i.classname];t=e.main=new s(n)}}}}(this),ace.define("ace/lib/oop",[],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/deep_copy",[],(function(e,t,n){t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var o=0;o<t.length;o++)n[o]=e(t[o]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var o in n={},t)n[o]=e(t[o]);return n}})),ace.define("ace/lib/lang",[],(function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var o=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(o,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,o=e.length;n<o;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,(function(e){ |
| 71 |
n.push({offset:arguments[arguments.length-2],length:e.length})})),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},o=function(e){return o.cancel(),t=setTimeout(n,e||0),o};return o.schedule=o,o.call=function(){return this.cancel(),e(),o},o.cancel=function(){return clearTimeout(t),t=null,o},o.isPending=function(){return t},o},t.delayedCall=function(e,t){var n=null,o=function(){n=null,e()},i=function(e){null==n&&(n=setTimeout(o,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(o,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(e){return!1}return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}})),ace.define("ace/apply_delta",[],(function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var o=t.start.row,i=t.start.column,s=e[o]||"";switch(t.action){case"insert":if(1===t.lines.length)e[o]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var a=[o,1].concat(t.lines);e.splice.apply(e,a),e[o]=s.substring(0,i)+e[o],e[o+t.lines.length-1]+=s.substring(i)}break;case"remove":var r=t.end.column,l=t.end.row;o===l?e[o]=s.substring(0,i)+s.substring(r):e.splice(o,l-o+1,s.substring(0,i)+e[l].substring(r))}}})),ace.define("ace/lib/event_emitter",[],(function(e,t,n){"use strict";var o={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};o._emit=o._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],o=this._defaultHandlers[e];if(n.length||o){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var a=0;a<n.length&&(n[a](t,this),!t.propagationStopped);a++);return o&&!t.defaultPrevented?o(t,this):void 0}},o._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var o=0;o<n.length;o++)n[o](t,this)}},o.once=function(e,t){var n=this;if(this.on(e,(function o(){n.off(e,o),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},o.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var o=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(o);var s=i.indexOf(t);-1!=s&&i.splice(s,1)}n[e]=t},o.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var o=n._disabled_[e];if(n[e]==t)o&&this.setDefaultHandler(e,o.pop());else if(o){var i=o.indexOf(t);-1!=i&&o.splice(i,1)}}},o.on=o.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[e];return o||(o=this._eventRegistry[e]=[]),-1==o.indexOf(t)&&o[n?"unshift":"push"](t),t},o.off=o.removeListener=o.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var o=n.indexOf(t);-1!==o&&n.splice(o,1)}},o.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=o})),ace.define("ace/range",[],(function(e,t,n){"use strict";var o=function(){function e(e,t,n,o){this.start={row:e,column:t},this.end={row:n,column:o}}return e.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},e.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,n=e.end,o=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(o.row,o.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(o.row,o.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var o={row:n+1,column:0};else this.end.row<t&&(o={row:t,column:0});if(this.start.row>n)var i={row:n+1,column:0};else this.start.row<t&&(i={row:t,column:0});return e.fromPoints(i||this.start,o||this.end)},e.prototype.extend=function(t,n){var o=this.compare(t,n);if(0==o)return this;if(-1==o)var i={row:t,column:n};else var s={row:t,column:n};return e.fromPoints(i||this.start,s||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return 0==this.end.column?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),o=t.documentToScreenPosition(this.end);return new e(n.row,n.column,o.row,o.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();o.fromPoints=function(e,t){return new o(e.row,e.column,t.row,t.column)},o.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=o})),ace.define("ace/anchor",[],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=function(){function e(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof t?this.setPosition(t.row,t.column):this.setPosition(t,n)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var t=function(e,t,n){var o="insert"==e.action,i=(o?1:-1)*(e.end.row-e.start.row),s=(o?1:-1)*(e.end.column-e.start.column),r=e.start,l=o?r:e.end;return a(t,r,n)?{row:t.row,column:t.column}:a(l,t,!n)?{row:t.row+i,column:t.column+(t.row==l.row?s:0)}:{row:r.row,column:r.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,n){var o;if(o=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=o.row||this.column!=o.column){var i={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:i,value:o})}}, |
| 72 |
e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();function a(e,t,n){var o=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&o}s.prototype.$insertRight=!1,o.implement(s.prototype,i),t.Anchor=s})),ace.define("ace/document",[],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,r=e("./anchor").Anchor,l=function(){function e(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new r(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},e.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},e.prototype.getLine=function(e){return this.$lines[e]||""},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},e.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),o=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:o,action:"insert",lines:[t]},!0),this.clonePos(o)},e.prototype.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var o=this.getLine(e);return null==t&&(t=o.length),{row:e,column:t=Math.min(Math.max(t,0),o.length)}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},e.prototype.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),o={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:o,action:"insert",lines:t}),this.clonePos(o)},e.prototype.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},e.prototype.removeInLine=function(e,t,n){var o=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:o,end:i,action:"remove",lines:this.getLinesForRange({start:o,end:i})},!0),this.clonePos(o)},e.prototype.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,o=t<this.getLength()-1,i=n?e-1:e,s=n?this.getLine(i).length:0,r=o?t+1:t,l=o?0:this.getLine(r).length,c=new a(i,s,r,l),d=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),d},e.prototype.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},e.prototype.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},e.prototype.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},e.prototype.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,o=n.length-t+1,i=e.start.row,s=e.start.column,a=0,r=0;a<o;a=r){r+=t-1;var l=n.slice(a,r);l.push(""),this.applyDelta({start:this.pos(i+a,s),end:this.pos(i+r,s=0),action:e.action,lines:l},!0)}e.lines=n.slice(a),e.start.row=i+a,e.start.column=s,this.applyDelta(e,!0)},e.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},e.prototype.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,i=t||0,s=n.length;i<s;i++)if((e-=n[i].length+o)<0)return{row:i,column:e+n[i].length+o};return{row:s-1,column:e+n[s-1].length+o}},e.prototype.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length),a=t||0;a<s;++a)i+=n[a].length+o;return i+e.column},e.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},e}();l.prototype.$autoNewLine="",l.prototype.$newLineMode="auto",o.implement(l.prototype,s),t.Document=l})),ace.define("ace/worker/mirror",[],(function(e,t,n){"use strict";var o=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new o(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",(function(e){var o=e.data;if(o[0].start)t.applyDeltas(o);else for(var i=0;i<o.length;i+=2){var a,r;if(("insert"==(a=Array.isArray(o[i+1])?{action:"insert",start:o[i],lines:o[i+1]}:{action:"remove",start:o[i],end:o[i+1]}).action?a.start:a.end).row>=t.$lines.length)throw(r=new Error("Invalid delta")).data={ |
| 73 |
path:s.$path,linesLength:t.$lines.length,start:a.start,end:a.end},r;t.applyDelta(a,!0)}if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()}))};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)})),ace.define("ace/mode/css/csslint",[],(function(e,t,n){var o=function(){var e=e||{},t=function(){var e;return e=function t(n,o,i){function s(r,l){if(!o[r]){if(!n[r]){var c="function"==typeof e&&e;if(!l&&c)return c(r,!0);if(a)return a(r,!0);var d=new Error("Cannot find module '"+r+"'");throw d.code="MODULE_NOT_FOUND",d}var u=o[r]={exports:{}};n[r][0].call(u.exports,(function(e){return s(n[r][1][e]||e)}),u,u.exports,t,n,o,i)}return o[r].exports}for(var a="function"==typeof e&&e,r=0;r<i.length;r++)s(i[r]);return s}({1:[function(e,t,n){"use strict";t.exports={__proto__:null,aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",currentColor:"The value of the 'color' property.",activeborder:"Active window border.",activecaption:"Active window caption.",appworkspace:"Background color of multiple document interface.",background:"Desktop background.",buttonface:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonhighlight:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonshadow:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttontext:"Text on push buttons.",captiontext:"Text in caption, size box, and scrollbar arrow box.",graytext:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",greytext:"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.",highlight:"Item(s) selected in a control.",highlighttext:"Text of item(s) selected in a control.",inactiveborder:"Inactive window border.",inactivecaption:"Inactive window caption.",inactivecaptiontext:"Color of text in an inactive caption.",infobackground:"Background color for tooltip controls.",infotext:"Text color for tooltip controls.",menu:"Menu background.",menutext:"Text in menus.",scrollbar:"Scroll bar gray area.",threeddarkshadow:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedface:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedhighlight:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedlightshadow:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedshadow:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",window:"Window background.",windowframe:"Window frame.",windowtext:"Text in windows."}},{}],2:[function(e,t,n){"use strict";t.exports=s;var o=e("../util/SyntaxUnit"),i=e("./Parser");function s(e,t,n){o.call(this,e,t,n,i.COMBINATOR_TYPE),this.type="unknown",/^\s+$/.test(e)?this.type="descendant":">"===e?this.type="child":"+"===e?this.type="adjacent-sibling":"~"===e&&(this.type="sibling")}s.prototype=new o,s.prototype.constructor=s},{"../util/SyntaxUnit":26,"./Parser":6}],3:[function(e,t,n){"use strict";t.exports=s;var o=e("../util/StringReader"),i=e("../util/SyntaxError");function s(e,t){this.match=function(t){var n;return t.mark(),(n=e(t))?t.drop():t.restore(),n},this.toString="function"==typeof t?t:function(){return t}}s.prec={MOD:5,SEQ:4,ANDAND:3,OROR:2,ALT:1},s.parse=function(e){var t,n,a,r,l,c,d,u,p;if(t=new o(e),n=function(e){var n=t.readMatch(e);if(null===n)throw new i("Expected "+e,t.getLine(),t.getCol());return n},a=function(){for(var e=[r()];null!==t.readMatch(" | ");)e.push(r());return 1===e.length?e[0]:s.alt.apply(s,e)},r=function(){for(var e=[l()];null!==t.readMatch(" || ");)e.push(l());return 1===e.length?e[0]:s.oror.apply(s,e)},l=function(){for(var e=[c()];null!==t.readMatch(" && ");)e.push(c());return 1===e.length?e[0]:s.andand.apply(s,e)},c=function(){for(var e=[d()];null!==t.readMatch(/^ (?![&|\]])/);)e.push(d());return 1===e.length?e[0]:s.seq.apply(s,e)},d=function(){var e=u();if(null!==t.readMatch("?"))return e.question();if(null!==t.readMatch("*"))return e.star();if(null!==t.readMatch("+"))return e.plus();if(null!==t.readMatch("#"))return e.hash();if(null!==t.readMatch(/^\{\s*/)){var o=n(/^\d+/);n(/^\s*,\s*/);var i=n(/^\d+/);return n(/^\s*\}/), |
| 74 |
e.braces(Number(o),Number(i))}return e},u=function(){if(null!==t.readMatch("[ ")){var e=a();return n(" ]"),e}return s.fromType(n(/^[^ ?*+#{]+/))},p=a(),!t.eof())throw new i("Expected end of string",t.getLine(),t.getCol());return p},s.cast=function(e){return e instanceof s?e:s.parse(e)},s.fromType=function(t){var n=e("./ValidationTypes");return new s((function(e){return e.hasNext()&&n.isType(e,t)}),t)},s.seq=function(){var e=Array.prototype.slice.call(arguments).map(s.cast);return 1===e.length?e[0]:new s((function(t){var n,o=!0;for(n=0;o&&n<e.length;n++)o=e[n].match(t);return o}),(function(t){var n=s.prec.SEQ,o=e.map((function(e){return e.toString(n)})).join(" ");return t>n&&(o="[ "+o+" ]"),o}))},s.alt=function(){var e=Array.prototype.slice.call(arguments).map(s.cast);return 1===e.length?e[0]:new s((function(t){var n,o=!1;for(n=0;!o&&n<e.length;n++)o=e[n].match(t);return o}),(function(t){var n=s.prec.ALT,o=e.map((function(e){return e.toString(n)})).join(" | ");return t>n&&(o="[ "+o+" ]"),o}))},s.many=function(t){var n=Array.prototype.slice.call(arguments,1).reduce((function(t,n){if(n.expand){var o=e("./ValidationTypes");t.push.apply(t,o.complex[n.expand].options)}else t.push(s.cast(n));return t}),[]);!0===t&&(t=n.map((function(){return!0})));var o=new s((function(e){var o=[],i=0,s=0,a=function(r){for(var l=0;l<n.length;l++)if(!o[l])if(e.mark(),n[l].match(e)){if(o[l]=!0,a(r+(!1===t||t[l]?1:0)))return e.drop(),!0;e.restore(),o[l]=!1}else e.drop();return function(e){return 0===s?(i=Math.max(e,i),e===n.length):e===i}(r)};if(a(0)||(s++,a(0)),!1===t)return i>0;for(var r=0;r<n.length;r++)if(t[r]&&!o[r])return!1;return!0}),(function(e){var o=!1===t?s.prec.OROR:s.prec.ANDAND,i=n.map((function(e,n){return!1===t||t[n]?e.toString(o):e.toString(s.prec.MOD)+"?"})).join(!1===t?" || ":" && ");return e>o&&(i="[ "+i+" ]"),i}));return o.options=n,o},s.andand=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(!0),s.many.apply(s,e)},s.oror=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(!1),s.many.apply(s,e)},s.prototype={constructor:s,match:function(){throw new Error("unimplemented")},toString:function(){throw new Error("unimplemented")},func:function(){return this.match.bind(this)},then:function(e){return s.seq(this,e)},or:function(e){return s.alt(this,e)},andand:function(e){return s.many(!0,this,e)},oror:function(e){return s.many(!1,this,e)},star:function(){return this.braces(0,1/0,"*")},plus:function(){return this.braces(1,1/0,"+")},question:function(){return this.braces(0,1,"?")},hash:function(){return this.braces(1,1/0,"#",s.cast(","))},braces:function(e,t,n,o){var i=this,a=o?o.then(this):this;return n||(n="{"+e+","+t+"}"),new s((function(n){var s;for(s=0;s<t&&(s>0&&o?a.match(n):i.match(n));s++);return s>=e}),(function(){return i.toString(s.prec.MOD)+n}))}}},{"../util/StringReader":24,"../util/SyntaxError":25,"./ValidationTypes":21}],4:[function(e,t,n){"use strict";t.exports=s;var o=e("../util/SyntaxUnit"),i=e("./Parser");function s(e,t){o.call(this,"("+e+(null!==t?":"+t:"")+")",e.startLine,e.startCol,i.MEDIA_FEATURE_TYPE),this.name=e,this.value=t}s.prototype=new o,s.prototype.constructor=s},{"../util/SyntaxUnit":26,"./Parser":6}],5:[function(e,t,n){"use strict";t.exports=s;var o=e("../util/SyntaxUnit"),i=e("./Parser");function s(e,t,n,s,a){o.call(this,(e?e+" ":"")+(t||"")+(t&&n.length>0?" and ":"")+n.join(" and "),s,a,i.MEDIA_QUERY_TYPE),this.modifier=e,this.mediaType=t,this.features=n}s.prototype=new o,s.prototype.constructor=s},{"../util/SyntaxUnit":26,"./Parser":6}],6:[function(e,t,n){"use strict";t.exports=x;var o=e("../util/EventTarget"),i=e("../util/SyntaxError"),s=e("../util/SyntaxUnit"),a=e("./Combinator"),r=e("./MediaFeature"),l=e("./MediaQuery"),c=e("./PropertyName"),d=e("./PropertyValue"),u=e("./PropertyValuePart"),p=e("./Selector"),h=e("./SelectorPart"),g=e("./SelectorSubPart"),m=e("./TokenStream"),b=e("./Tokens"),f=e("./Validation");function x(e){o.call(this),this.options=e||{},this._tokenStream=null}x.DEFAULT_TYPE=0,x.COMBINATOR_TYPE=1,x.MEDIA_FEATURE_TYPE=2,x.MEDIA_QUERY_TYPE=3,x.PROPERTY_NAME_TYPE=4,x.PROPERTY_VALUE_TYPE=5,x.PROPERTY_VALUE_PART_TYPE=6,x.SELECTOR_TYPE=7,x.SELECTOR_PART_TYPE=8,x.SELECTOR_SUB_PART_TYPE=9,x.prototype=function(){var e,t=new o,n={__proto__:null,constructor:x,DEFAULT_TYPE:0,COMBINATOR_TYPE:1,MEDIA_FEATURE_TYPE:2,MEDIA_QUERY_TYPE:3,PROPERTY_NAME_TYPE:4,PROPERTY_VALUE_TYPE:5,PROPERTY_VALUE_PART_TYPE:6,SELECTOR_TYPE:7,SELECTOR_PART_TYPE:8,SELECTOR_SUB_PART_TYPE:9,_stylesheet:function(){var e,t,n,o=this._tokenStream;for(this.fire("startstylesheet"),this._charset(),this._skipCruft();o.peek()===b.IMPORT_SYM;)this._import(),this._skipCruft();for(;o.peek()===b.NAMESPACE_SYM;)this._namespace(),this._skipCruft();for(n=o.peek();n>b.EOF;){try{switch(n){case b.MEDIA_SYM:this._media(),this._skipCruft();break;case b.PAGE_SYM:this._page(),this._skipCruft();break;case b.FONT_FACE_SYM:this._font_face(),this._skipCruft();break;case b.KEYFRAMES_SYM:this._keyframes(),this._skipCruft();break;case b.VIEWPORT_SYM:this._viewport(),this._skipCruft();break;case b.DOCUMENT_SYM:this._document(),this._skipCruft();break;case b.SUPPORTS_SYM:this._supports(),this._skipCruft();break;case b.UNKNOWN_SYM:if(o.get(),this.options.strict)throw new i("Unknown @ rule.",o.LT(0).startLine,o.LT(0).startCol);for(this.fire({type:"error",error:null,message:"Unknown @ rule: "+o.LT(0).value+".",line:o.LT(0).startLine,col:o.LT(0).startCol}),e=0;o.advance([b.LBRACE,b.RBRACE])===b.LBRACE;)e++;for(;e;)o.advance([b.RBRACE]),e--;break;case b.S:this._readWhitespace();break;default:if(!this._ruleset())switch(n){case b.CHARSET_SYM:throw t=o.LT(1),this._charset(!1),new i("@charset not allowed here.",t.startLine,t.startCol);case b.IMPORT_SYM:throw t=o.LT(1),this._import(!1),new i("@import not allowed here.",t.startLine,t.startCol);case b.NAMESPACE_SYM:throw t=o.LT(1),this._namespace(!1),new i("@namespace not allowed here.",t.startLine,t.startCol);default:o.get(),this._unexpectedToken(o.token())}}}catch(e){if(!(e instanceof i)||this.options.strict)throw e;this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col})}n=o.peek()}n!==b.EOF&&this._unexpectedToken(o.token()),this.fire("endstylesheet")},_charset:function(e){var t,n,o,i=this._tokenStream;i.match(b.CHARSET_SYM)&&(n=i.token().startLine,o=i.token().startCol,this._readWhitespace(),i.mustMatch(b.STRING),t=i.token().value,this._readWhitespace(),i.mustMatch(b.SEMICOLON),!1!==e&&this.fire({type:"charset",charset:t,line:n,col:o}))},_import:function(e){var t,n,o,i=this._tokenStream;i.mustMatch(b.IMPORT_SYM),n=i.token(),this._readWhitespace(),i.mustMatch([b.STRING,b.URI]),t=i.token().value.replace(/^(?:url\()?["']?([^"']+?)["']?\)?$/,"$1"),this._readWhitespace(),o=this._media_query_list(),i.mustMatch(b.SEMICOLON),this._readWhitespace(),!1!==e&&this.fire({type:"import",uri:t,media:o,line:n.startLine,col:n.startCol})},_namespace:function(e){var t,n,o,i,s=this._tokenStream;s.mustMatch(b.NAMESPACE_SYM),t=s.token().startLine,n=s.token().startCol,this._readWhitespace(),s.match(b.IDENT)&&(o=s.token().value,this._readWhitespace()),s.mustMatch([b.STRING,b.URI]),i=s.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1"),this._readWhitespace(),s.mustMatch(b.SEMICOLON),this._readWhitespace(),!1!==e&&this.fire({type:"namespace",prefix:o,uri:i,line:t,col:n})},_supports:function(e){var t,n,o=this._tokenStream;if(o.match(b.SUPPORTS_SYM)){for(t=o.token().startLine,n=o.token().startCol,this._readWhitespace(),this._supports_condition(),this._readWhitespace(),o.mustMatch(b.LBRACE),this._readWhitespace(),!1!==e&&this.fire({type:"startsupports",line:t,col:n});this._ruleset(););o.mustMatch(b.RBRACE),this._readWhitespace(),this.fire({type:"endsupports",line:t,col:n})}},_supports_condition:function(){var e,t=this._tokenStream;if(t.match(b.IDENT))"not"===(e=t.token().value.toLowerCase())?(t.mustMatch(b.S), |
| 75 |
this._supports_condition_in_parens()):t.unget();else for(this._supports_condition_in_parens(),this._readWhitespace();t.peek()===b.IDENT;)"and"!==(e=t.LT(1).value.toLowerCase())&&"or"!==e||(t.mustMatch(b.IDENT),this._readWhitespace(),this._supports_condition_in_parens(),this._readWhitespace())},_supports_condition_in_parens:function(){var e=this._tokenStream;e.match(b.LPAREN)?(this._readWhitespace(),e.match(b.IDENT)?"not"===e.token().value.toLowerCase()?(this._readWhitespace(),this._supports_condition(),this._readWhitespace(),e.mustMatch(b.RPAREN)):(e.unget(),this._supports_declaration_condition(!1)):(this._supports_condition(),this._readWhitespace(),e.mustMatch(b.RPAREN))):this._supports_declaration_condition()},_supports_declaration_condition:function(e){var t=this._tokenStream;!1!==e&&t.mustMatch(b.LPAREN),this._readWhitespace(),this._declaration(),t.mustMatch(b.RPAREN)},_media:function(){var e,t,n,o=this._tokenStream;for(o.mustMatch(b.MEDIA_SYM),e=o.token().startLine,t=o.token().startCol,this._readWhitespace(),n=this._media_query_list(),o.mustMatch(b.LBRACE),this._readWhitespace(),this.fire({type:"startmedia",media:n,line:e,col:t});;)if(o.peek()===b.PAGE_SYM)this._page();else if(o.peek()===b.FONT_FACE_SYM)this._font_face();else if(o.peek()===b.VIEWPORT_SYM)this._viewport();else if(o.peek()===b.DOCUMENT_SYM)this._document();else if(o.peek()===b.SUPPORTS_SYM)this._supports();else if(o.peek()===b.MEDIA_SYM)this._media();else if(!this._ruleset())break;o.mustMatch(b.RBRACE),this._readWhitespace(),this.fire({type:"endmedia",media:n,line:e,col:t})},_media_query_list:function(){var e=this._tokenStream,t=[];for(this._readWhitespace(),e.peek()!==b.IDENT&&e.peek()!==b.LPAREN||t.push(this._media_query());e.match(b.COMMA);)this._readWhitespace(),t.push(this._media_query());return t},_media_query:function(){var e=this._tokenStream,t=null,n=null,o=null,i=[];if(e.match(b.IDENT)&&("only"!==(n=e.token().value.toLowerCase())&&"not"!==n?(e.unget(),n=null):o=e.token()),this._readWhitespace(),e.peek()===b.IDENT?(t=this._media_type(),null===o&&(o=e.token())):e.peek()===b.LPAREN&&(null===o&&(o=e.LT(1)),i.push(this._media_expression())),null===t&&0===i.length)return null;for(this._readWhitespace();e.match(b.IDENT);)"and"!==e.token().value.toLowerCase()&&this._unexpectedToken(e.token()),this._readWhitespace(),i.push(this._media_expression());return new l(n,t,i,o.startLine,o.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var e,t,n=this._tokenStream,o=null;return n.mustMatch(b.LPAREN),this._readWhitespace(),e=this._media_feature(),this._readWhitespace(),n.match(b.COLON)&&(this._readWhitespace(),t=n.LT(1),o=this._expression()),n.mustMatch(b.RPAREN),this._readWhitespace(),new r(e,o?new s(o,t.startLine,t.startCol):null)},_media_feature:function(){var e=this._tokenStream;return this._readWhitespace(),e.mustMatch(b.IDENT),s.fromToken(e.token())},_page:function(){var e,t,n=this._tokenStream,o=null,i=null;n.mustMatch(b.PAGE_SYM),e=n.token().startLine,t=n.token().startCol,this._readWhitespace(),n.match(b.IDENT)&&"auto"===(o=n.token().value).toLowerCase()&&this._unexpectedToken(n.token()),n.peek()===b.COLON&&(i=this._pseudo_page()),this._readWhitespace(),this.fire({type:"startpage",id:o,pseudo:i,line:e,col:t}),this._readDeclarations(!0,!0),this.fire({type:"endpage",id:o,pseudo:i,line:e,col:t})},_margin:function(){var e,t,n=this._tokenStream,o=this._margin_sym();return!!o&&(e=n.token().startLine,t=n.token().startCol,this.fire({type:"startpagemargin",margin:o,line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endpagemargin",margin:o,line:e,col:t}),!0)},_margin_sym:function(){var e=this._tokenStream;return e.match([b.TOPLEFTCORNER_SYM,b.TOPLEFT_SYM,b.TOPCENTER_SYM,b.TOPRIGHT_SYM,b.TOPRIGHTCORNER_SYM,b.BOTTOMLEFTCORNER_SYM,b.BOTTOMLEFT_SYM,b.BOTTOMCENTER_SYM,b.BOTTOMRIGHT_SYM,b.BOTTOMRIGHTCORNER_SYM,b.LEFTTOP_SYM,b.LEFTMIDDLE_SYM,b.LEFTBOTTOM_SYM,b.RIGHTTOP_SYM,b.RIGHTMIDDLE_SYM,b.RIGHTBOTTOM_SYM])?s.fromToken(e.token()):null},_pseudo_page:function(){var e=this._tokenStream;return e.mustMatch(b.COLON),e.mustMatch(b.IDENT),e.token().value},_font_face:function(){var e,t,n=this._tokenStream;n.mustMatch(b.FONT_FACE_SYM),e=n.token().startLine,t=n.token().startCol,this._readWhitespace(),this.fire({type:"startfontface",line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endfontface",line:e,col:t})},_viewport:function(){var e,t,n=this._tokenStream;n.mustMatch(b.VIEWPORT_SYM),e=n.token().startLine,t=n.token().startCol,this._readWhitespace(),this.fire({type:"startviewport",line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endviewport",line:e,col:t})},_document:function(){var e,t=this._tokenStream,n=[],o="";for(t.mustMatch(b.DOCUMENT_SYM),e=t.token(),/^@-([^-]+)-/.test(e.value)&&(o=RegExp.$1),this._readWhitespace(),n.push(this._document_function());t.match(b.COMMA);)this._readWhitespace(),n.push(this._document_function());t.mustMatch(b.LBRACE),this._readWhitespace(),this.fire({type:"startdocument",functions:n,prefix:o,line:e.startLine,col:e.startCol});for(var i=!0;i;)switch(t.peek()){case b.PAGE_SYM:this._page();break;case b.FONT_FACE_SYM:this._font_face();break;case b.VIEWPORT_SYM:this._viewport();break;case b.MEDIA_SYM:this._media();break;case b.KEYFRAMES_SYM:this._keyframes();break;case b.DOCUMENT_SYM:this._document();break;default:i=Boolean(this._ruleset())}t.mustMatch(b.RBRACE),e=t.token(),this._readWhitespace(),this.fire({type:"enddocument",functions:n,prefix:o,line:e.startLine,col:e.startCol})},_document_function:function(){var e,t=this._tokenStream;return t.match(b.URI)?(e=t.token().value,this._readWhitespace()):e=this._function(),e},_operator:function(e){var t=this._tokenStream,n=null;return(t.match([b.SLASH,b.COMMA])||e&&t.match([b.PLUS,b.STAR,b.MINUS]))&&(n=t.token(),this._readWhitespace()),n?u.fromToken(n):null},_combinator:function(){var e,t=this._tokenStream,n=null;return t.match([b.PLUS,b.GREATER,b.TILDE])&&(e=t.token(),n=new a(e.value,e.startLine,e.startCol),this._readWhitespace()),n},_unary_operator:function(){var e=this._tokenStream;return e.match([b.MINUS,b.PLUS])?e.token().value:null},_property:function(){var e,t,n,o=this._tokenStream,i=null,s=null,a="";if(o.peek()===b.STAR&&this.options.starHack&&(o.get(),s=(e=o.token()).value,t=e.startLine,n=e.startCol),o.peek()===b.MINUS&&(o.get(),a=(e=o.token()).value,t=e.startLine,n=e.startCol),o.match(b.IDENT))"_"===(a+=(e=o.token()).value).charAt(0)&&this.options.underscoreHack&&(s="_",a=a.substring(1)),i=new c(a,s,t||e.startLine,n||e.startCol),this._readWhitespace();else{var r=o.peek();r!==b.EOF&&r!==b.RBRACE&&this._unexpectedToken(o.LT(1))}return i},_ruleset:function(){var e,t=this._tokenStream;try{e=this._selectors_group()}catch(e){if(!(e instanceof i)||this.options.strict)throw e;if(this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),t.advance([b.RBRACE])!==b.RBRACE)throw e;return!0}return e&&(this.fire({type:"startrule",selectors:e,line:e[0].line,col:e[0].col}),this._readDeclarations(!0),this.fire({type:"endrule",selectors:e,line:e[0].line,col:e[0].col})),e},_selectors_group:function(){var e,t=this._tokenStream,n=[];if(null!==(e=this._selector()))for(n.push(e);t.match(b.COMMA);)this._readWhitespace(),null!==(e=this._selector())?n.push(e):this._unexpectedToken(t.LT(1));return n.length?n:null},_selector:function(){var e=this._tokenStream,t=[],n=null,o=null,i=null;if(null===(n=this._simple_selector_sequence()))return null;for(t.push(n);;)if(null!==(o=this._combinator()))t.push(o),null===(n=this._simple_selector_sequence())?this._unexpectedToken(e.LT(1)):t.push(n);else{if(!this._readWhitespace())break;i=new a(e.token().value,e.token().startLine,e.token().startCol),o=this._combinator(),null===(n=this._simple_selector_sequence())?null!==o&&this._unexpectedToken(e.LT(1)):(null!==o?t.push(o):t.push(i),t.push(n))}return new p(t,t[0].line,t[0].col)},_simple_selector_sequence:function(){var e,t,n=this._tokenStream,o=null,i=[],s="",a=[function(){ |
| 76 |
return n.match(b.HASH)?new g(n.token().value,"id",n.token().startLine,n.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],r=0,l=a.length,c=null;for(e=n.LT(1).startLine,t=n.LT(1).startCol,(o=this._type_selector())||(o=this._universal()),null!==o&&(s+=o);n.peek()!==b.S;){for(;r<l&&null===c;)c=a[r++].call(this);if(null===c){if(""===s)return null;break}r=0,i.push(c),s+=c.toString(),c=null}return""!==s?new h(o,i,s,e,t):null},_type_selector:function(){var e=this._tokenStream,t=this._namespace_prefix(),n=this._element_name();return n?(t&&(n.text=t+n.text,n.col-=t.length),n):(t&&(e.unget(),t.length>1&&e.unget()),null)},_class:function(){var e,t=this._tokenStream;return t.match(b.DOT)?(t.mustMatch(b.IDENT),e=t.token(),new g("."+e.value,"class",e.startLine,e.startCol-1)):null},_element_name:function(){var e,t=this._tokenStream;return t.match(b.IDENT)?(e=t.token(),new g(e.value,"elementName",e.startLine,e.startCol)):null},_namespace_prefix:function(){var e=this._tokenStream,t="";return e.LA(1)!==b.PIPE&&e.LA(2)!==b.PIPE||(e.match([b.IDENT,b.STAR])&&(t+=e.token().value),e.mustMatch(b.PIPE),t+="|"),t.length?t:null},_universal:function(){var e,t=this._tokenStream,n="";return(e=this._namespace_prefix())&&(n+=e),t.match(b.STAR)&&(n+="*"),n.length?n:null},_attrib:function(){var e,t,n=this._tokenStream,o=null;return n.match(b.LBRACKET)?(o=(t=n.token()).value,o+=this._readWhitespace(),(e=this._namespace_prefix())&&(o+=e),n.mustMatch(b.IDENT),o+=n.token().value,o+=this._readWhitespace(),n.match([b.PREFIXMATCH,b.SUFFIXMATCH,b.SUBSTRINGMATCH,b.EQUALS,b.INCLUDES,b.DASHMATCH])&&(o+=n.token().value,o+=this._readWhitespace(),n.mustMatch([b.IDENT,b.STRING]),o+=n.token().value,o+=this._readWhitespace()),n.mustMatch(b.RBRACKET),new g(o+"]","attribute",t.startLine,t.startCol)):null},_pseudo:function(){var e,t,n=this._tokenStream,o=null,s=":";if(n.match(b.COLON)){if(n.match(b.COLON)&&(s+=":"),n.match(b.IDENT)?(o=n.token().value,e=n.token().startLine,t=n.token().startCol-s.length):n.peek()===b.FUNCTION&&(e=n.LT(1).startLine,t=n.LT(1).startCol-s.length,o=this._functional_pseudo()),!o){var a=n.LT(1).startLine,r=n.LT(0).startCol;throw new i("Expected a `FUNCTION` or `IDENT` after colon at line "+a+", col "+r+".",a,r)}o=new g(s+o,"pseudo",e,t)}return o},_functional_pseudo:function(){var e=this._tokenStream,t=null;return e.match(b.FUNCTION)&&(t=e.token().value,t+=this._readWhitespace(),t+=this._expression(),e.mustMatch(b.RPAREN),t+=")"),t},_expression:function(){for(var e=this._tokenStream,t="";e.match([b.PLUS,b.MINUS,b.DIMENSION,b.NUMBER,b.STRING,b.IDENT,b.LENGTH,b.FREQ,b.ANGLE,b.TIME,b.RESOLUTION,b.SLASH]);)t+=e.token().value,t+=this._readWhitespace();return t.length?t:null},_negation:function(){var e,t,n,o=this._tokenStream,i="",s=null;return o.match(b.NOT)&&(i=o.token().value,e=o.token().startLine,t=o.token().startCol,i+=this._readWhitespace(),i+=n=this._negation_arg(),i+=this._readWhitespace(),o.match(b.RPAREN),i+=o.token().value,(s=new g(i,"not",e,t)).args.push(n)),s},_negation_arg:function(){var e,t,n=this._tokenStream,o=[this._type_selector,this._universal,function(){return n.match(b.HASH)?new g(n.token().value,"id",n.token().startLine,n.token().startCol):null},this._class,this._attrib,this._pseudo],i=null,s=0,a=o.length;for(e=n.LT(1).startLine,t=n.LT(1).startCol;s<a&&null===i;)i=o[s].call(this),s++;return null===i&&this._unexpectedToken(n.LT(1)),"elementName"===i.type?new h(i,[],i.toString(),e,t):new h(null,[i],i.toString(),e,t)},_declaration:function(){var e=this._tokenStream,t=null,n=null,o=null,i=null,s="";if(null!==(t=this._property())){e.mustMatch(b.COLON),this._readWhitespace(),(n=this._expr())&&0!==n.length||this._unexpectedToken(e.LT(1)),o=this._prio(),s=t.toString(),(this.options.starHack&&"*"===t.hack||this.options.underscoreHack&&"_"===t.hack)&&(s=t.text);try{this._validateProperty(s,n)}catch(e){i=e}return this.fire({type:"property",property:t,value:n,important:o,line:t.line,col:t.col,invalid:i}),!0}return!1},_prio:function(){var e=this._tokenStream.match(b.IMPORTANT_SYM);return this._readWhitespace(),e},_expr:function(e){var t=[],n=null,o=null;if(null!==(n=this._term(e)))for(t.push(n);(o=this._operator(e))&&t.push(o),null!==(n=this._term(e));)t.push(n);return t.length>0?new d(t,t[0].line,t[0].col):null},_term:function(e){var t,n,o,i,s=this._tokenStream,a=null,r=null,l=null;return null!==(t=this._unary_operator())&&(o=s.token().startLine,i=s.token().startCol),s.peek()===b.IE_FUNCTION&&this.options.ieFilters?(a=this._ie_function(),null===t&&(o=s.token().startLine,i=s.token().startCol)):e&&s.match([b.LPAREN,b.LBRACE,b.LBRACKET])?(r=(n=s.token()).endChar,a=n.value+this._expr(e).text,null===t&&(o=s.token().startLine,i=s.token().startCol),s.mustMatch(b.type(r)),a+=r,this._readWhitespace()):s.match([b.NUMBER,b.PERCENTAGE,b.LENGTH,b.ANGLE,b.TIME,b.FREQ,b.STRING,b.IDENT,b.URI,b.UNICODE_RANGE])?(a=s.token().value,null===t&&(o=s.token().startLine,i=s.token().startCol,l=u.fromToken(s.token())),this._readWhitespace()):null===(n=this._hexcolor())?(null===t&&(o=s.LT(1).startLine,i=s.LT(1).startCol),null===a&&(a=s.LA(3)===b.EQUALS&&this.options.ieFilters?this._ie_function():this._function())):(a=n.value,null===t&&(o=n.startLine,i=n.startCol)),null!==l?l:null!==a?new u(null!==t?t+a:a,o,i):null},_function:function(){var e,t=this._tokenStream,n=null;if(t.match(b.FUNCTION)){if(n=t.token().value,this._readWhitespace(),n+=this._expr(!0),this.options.ieFilters&&t.peek()===b.EQUALS)do{for(this._readWhitespace()&&(n+=t.token().value),t.LA(0)===b.COMMA&&(n+=t.token().value),t.match(b.IDENT),n+=t.token().value,t.match(b.EQUALS),n+=t.token().value,e=t.peek();e!==b.COMMA&&e!==b.S&&e!==b.RPAREN;)t.get(),n+=t.token().value,e=t.peek()}while(t.match([b.COMMA,b.S]));t.match(b.RPAREN),n+=")",this._readWhitespace()}return n},_ie_function:function(){var e,t=this._tokenStream,n=null;if(t.match([b.IE_FUNCTION,b.FUNCTION])){n=t.token().value;do{for(this._readWhitespace()&&(n+=t.token().value),t.LA(0)===b.COMMA&&(n+=t.token().value),t.match(b.IDENT),n+=t.token().value,t.match(b.EQUALS),n+=t.token().value,e=t.peek();e!==b.COMMA&&e!==b.S&&e!==b.RPAREN;)t.get(),n+=t.token().value,e=t.peek()}while(t.match([b.COMMA,b.S]));t.match(b.RPAREN),n+=")",this._readWhitespace()}return n},_hexcolor:function(){var e,t=this._tokenStream,n=null;if(t.match(b.HASH)){if(e=(n=t.token()).value,!/#[a-f0-9]{3,6}/i.test(e))throw new i("Expected a hex color but found '"+e+"' at line "+n.startLine+", col "+n.startCol+".",n.startLine,n.startCol);this._readWhitespace()}return n},_keyframes:function(){var e,t,n,o=this._tokenStream,i="";for(o.mustMatch(b.KEYFRAMES_SYM),e=o.token(),/^@-([^-]+)-/.test(e.value)&&(i=RegExp.$1),this._readWhitespace(),n=this._keyframe_name(),this._readWhitespace(),o.mustMatch(b.LBRACE),this.fire({type:"startkeyframes",name:n,prefix:i,line:e.startLine,col:e.startCol}),this._readWhitespace(),t=o.peek();t===b.IDENT||t===b.PERCENTAGE;)this._keyframe_rule(),this._readWhitespace(),t=o.peek();this.fire({type:"endkeyframes",name:n,prefix:i,line:e.startLine,col:e.startCol}),this._readWhitespace(),o.mustMatch(b.RBRACE),this._readWhitespace()},_keyframe_name:function(){var e=this._tokenStream;return e.mustMatch([b.IDENT,b.STRING]),s.fromToken(e.token())},_keyframe_rule:function(){var e=this._key_list();this.fire({type:"startkeyframerule",keys:e,line:e[0].line,col:e[0].col}),this._readDeclarations(!0),this.fire({type:"endkeyframerule",keys:e,line:e[0].line,col:e[0].col})},_key_list:function(){var e=this._tokenStream,t=[];for(t.push(this._key()),this._readWhitespace();e.match(b.COMMA);)this._readWhitespace(),t.push(this._key()),this._readWhitespace();return t},_key:function(){var e,t=this._tokenStream;if(t.match(b.PERCENTAGE))return s.fromToken(t.token());if(t.match(b.IDENT)){if(e=t.token(),/from|to/i.test(e.value))return s.fromToken(e);t.unget()}this._unexpectedToken(t.LT(1))},_skipCruft:function(){for(;this._tokenStream.match([b.S,b.CDO,b.CDC]););},_readDeclarations:function(e,t){ |
| 77 |
var n,o=this._tokenStream;this._readWhitespace(),e&&o.mustMatch(b.LBRACE),this._readWhitespace();try{for(;;){if(o.match(b.SEMICOLON)||t&&this._margin());else{if(!this._declaration())break;if(!o.match(b.SEMICOLON))break}this._readWhitespace()}o.mustMatch(b.RBRACE),this._readWhitespace()}catch(e){if(!(e instanceof i)||this.options.strict)throw e;if(this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),(n=o.advance([b.SEMICOLON,b.RBRACE]))===b.SEMICOLON)this._readDeclarations(!1,t);else if(n!==b.EOF&&n!==b.RBRACE)throw e}},_readWhitespace:function(){for(var e=this._tokenStream,t="";e.match(b.S);)t+=e.token().value;return t},_unexpectedToken:function(e){throw new i("Unexpected token '"+e.value+"' at line "+e.startLine+", col "+e.startCol+".",e.startLine,e.startCol)},_verifyEnd:function(){this._tokenStream.LA(1)!==b.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(e,t){f.validate(e,t)},parse:function(e){this._tokenStream=new m(e,b),this._stylesheet()},parseStyleSheet:function(e){return this.parse(e)},parseMediaQuery:function(e){this._tokenStream=new m(e,b);var t=this._media_query();return this._verifyEnd(),t},parsePropertyValue:function(e){this._tokenStream=new m(e,b),this._readWhitespace();var t=this._expr();return this._readWhitespace(),this._verifyEnd(),t},parseRule:function(e){this._tokenStream=new m(e,b),this._readWhitespace();var t=this._ruleset();return this._readWhitespace(),this._verifyEnd(),t},parseSelector:function(e){this._tokenStream=new m(e,b),this._readWhitespace();var t=this._selector();return this._readWhitespace(),this._verifyEnd(),t},parseStyleAttribute:function(e){e+="}",this._tokenStream=new m(e,b),this._readDeclarations()}};for(e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t}()},{"../util/EventTarget":23,"../util/SyntaxError":25,"../util/SyntaxUnit":26,"./Combinator":2,"./MediaFeature":4,"./MediaQuery":5,"./PropertyName":8,"./PropertyValue":9,"./PropertyValuePart":11,"./Selector":13,"./SelectorPart":14,"./SelectorSubPart":15,"./TokenStream":17,"./Tokens":18,"./Validation":19}],7:[function(e,t,n){"use strict";t.exports={__proto__:null,"align-items":"flex-start | flex-end | center | baseline | stretch","align-content":"flex-start | flex-end | center | space-between | space-around | stretch","align-self":"auto | flex-start | flex-end | center | baseline | stretch",all:"initial | inherit | unset","-webkit-align-items":"flex-start | flex-end | center | baseline | stretch","-webkit-align-content":"flex-start | flex-end | center | space-between | space-around | stretch","-webkit-align-self":"auto | flex-start | flex-end | center | baseline | stretch","alignment-adjust":"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length>","alignment-baseline":"auto | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",animation:1,"animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"[ none | forwards | backwards | both ]#","animation-iteration-count":"[ <number> | infinite ]#","animation-name":"[ none | <single-animation-name> ]#","animation-play-state":"[ running | paused ]#","animation-timing-function":1,"-moz-animation-delay":"<time>#","-moz-animation-direction":"[ normal | alternate ]#","-moz-animation-duration":"<time>#","-moz-animation-iteration-count":"[ <number> | infinite ]#","-moz-animation-name":"[ none | <single-animation-name> ]#","-moz-animation-play-state":"[ running | paused ]#","-ms-animation-delay":"<time>#","-ms-animation-direction":"[ normal | alternate ]#","-ms-animation-duration":"<time>#","-ms-animation-iteration-count":"[ <number> | infinite ]#","-ms-animation-name":"[ none | <single-animation-name> ]#","-ms-animation-play-state":"[ running | paused ]#","-webkit-animation-delay":"<time>#","-webkit-animation-direction":"[ normal | alternate ]#","-webkit-animation-duration":"<time>#","-webkit-animation-fill-mode":"[ none | forwards | backwards | both ]#","-webkit-animation-iteration-count":"[ <number> | infinite ]#","-webkit-animation-name":"[ none | <single-animation-name> ]#","-webkit-animation-play-state":"[ running | paused ]#","-o-animation-delay":"<time>#","-o-animation-direction":"[ normal | alternate ]#","-o-animation-duration":"<time>#","-o-animation-iteration-count":"[ <number> | infinite ]#","-o-animation-name":"[ none | <single-animation-name> ]#","-o-animation-play-state":"[ running | paused ]#",appearance:"none | auto","-moz-appearance":"none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized","-ms-appearance":"none | icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal","-webkit-appearance":"none | button | button-bevel | caps-lock-indicator | caret | checkbox | default-button | listbox | listitem | media-fullscreen-button | media-mute-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbargripper-horizontal | scrollbargripper-vertical | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical", |
| 78 |
"-o-appearance":"none | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal",azimuth:"<azimuth>","backface-visibility":"visible | hidden",background:1,"background-attachment":"<attachment>#","background-clip":"<box>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","baseline-shift":"baseline | sub | super | <percentage> | <length>",behavior:1,binding:1,bleed:"<length>","bookmark-label":"<content> | <attr> | <string>","bookmark-level":"none | <integer>","bookmark-state":"open | closed","bookmark-target":"none | <uri> | <attr>",border:"<border-width> || <border-style> || <color>","border-bottom":"<border-width> || <border-style> || <color>","border-bottom-color":"<color>","border-bottom-left-radius":"<x-one-radius>","border-bottom-right-radius":"<x-one-radius>","border-bottom-style":"<border-style>","border-bottom-width":"<border-width>","border-collapse":"collapse | separate","border-color":"<color>{1,4}","border-image":1,"border-image-outset":"[ <length> | <number> ]{1,4}","border-image-repeat":"[ stretch | repeat | round | space ]{1,2}","border-image-slice":"<border-image-slice>","border-image-source":"<image> | none","border-image-width":"[ <length> | <percentage> | <number> | auto ]{1,4}","border-left":"<border-width> || <border-style> || <color>","border-left-color":"<color>","border-left-style":"<border-style>","border-left-width":"<border-width>","border-radius":"<border-radius>","border-right":"<border-width> || <border-style> || <color>","border-right-color":"<color>","border-right-style":"<border-style>","border-right-width":"<border-width>","border-spacing":"<length>{1,2}","border-style":"<border-style>{1,4}","border-top":"<border-width> || <border-style> || <color>","border-top-color":"<color>","border-top-left-radius":"<x-one-radius>","border-top-right-radius":"<x-one-radius>","border-top-style":"<border-style>","border-top-width":"<border-width>","border-width":"<border-width>{1,4}",bottom:"<margin-width>","-moz-box-align":"start | end | center | baseline | stretch","-moz-box-decoration-break":"slice | clone","-moz-box-direction":"normal | reverse","-moz-box-flex":"<number>","-moz-box-flex-group":"<integer>","-moz-box-lines":"single | multiple","-moz-box-ordinal-group":"<integer>","-moz-box-orient":"horizontal | vertical | inline-axis | block-axis","-moz-box-pack":"start | end | center | justify","-o-box-decoration-break":"slice | clone","-webkit-box-align":"start | end | center | baseline | stretch","-webkit-box-decoration-break":"slice | clone","-webkit-box-direction":"normal | reverse","-webkit-box-flex":"<number>","-webkit-box-flex-group":"<integer>","-webkit-box-lines":"single | multiple","-webkit-box-ordinal-group":"<integer>","-webkit-box-orient":"horizontal | vertical | inline-axis | block-axis","-webkit-box-pack":"start | end | center | justify","box-decoration-break":"slice | clone","box-shadow":"<box-shadow>","box-sizing":"content-box | border-box","break-after":"auto | always | avoid | left | right | page | column | avoid-page | avoid-column","break-before":"auto | always | avoid | left | right | page | column | avoid-page | avoid-column","break-inside":"auto | avoid | avoid-page | avoid-column","caption-side":"top | bottom",clear:"none | right | left | both",clip:"<shape> | auto","-webkit-clip-path":"<clip-source> | <clip-path> | none","clip-path":"<clip-source> | <clip-path> | none","clip-rule":"nonzero | evenodd",color:"<color>","color-interpolation":"auto | sRGB | linearRGB","color-interpolation-filters":"auto | sRGB | linearRGB","color-profile":1,"color-rendering":"auto | optimizeSpeed | optimizeQuality","column-count":"<integer> | auto","column-fill":"auto | balance","column-gap":"<length> | normal","column-rule":"<border-width> || <border-style> || <color>","column-rule-color":"<color>","column-rule-style":"<border-style>","column-rule-width":"<border-width>","column-span":"none | all","column-width":"<length> | auto",columns:1,content:1,"counter-increment":1,"counter-reset":1,crop:"<shape> | auto",cue:"cue-after | cue-before","cue-after":1,"cue-before":1,cursor:1,direction:"ltr | rtl",display:"inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | grid | inline-grid | run-in | ruby | ruby-base | ruby-text | ruby-base-container | ruby-text-container | contents | none | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | -ms-flexbox | -ms-inline-flexbox | flex | -webkit-flex | inline-flex | -webkit-inline-flex","dominant-baseline":"auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge","drop-initial-after-adjust":"central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>","drop-initial-after-align":"baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical","drop-initial-before-adjust":"before-edge | text-before-edge | central | middle | hanging | mathematical | <percentage> | <length>","drop-initial-before-align":"caps-height | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical","drop-initial-size":"auto | line | <length> | <percentage>","drop-initial-value":"<integer>",elevation:"<angle> | below | level | above | higher | lower","empty-cells":"show | hide","enable-background":1,fill:"<paint>","fill-opacity":"<opacity-value>","fill-rule":"nonzero | evenodd",filter:"<filter-function-list> | none",fit:"fill | hidden | meet | slice","fit-position":1,flex:"<flex>","flex-basis":"<width>","flex-direction":"row | row-reverse | column | column-reverse","flex-flow":"<flex-direction> || <flex-wrap>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap | wrap | wrap-reverse","-webkit-flex":"<flex>","-webkit-flex-basis":"<width>","-webkit-flex-direction":"row | row-reverse | column | column-reverse","-webkit-flex-flow":"<flex-direction> || <flex-wrap>","-webkit-flex-grow":"<number>","-webkit-flex-shrink":"<number>","-webkit-flex-wrap":"nowrap | wrap | wrap-reverse","-ms-flex":"<flex>","-ms-flex-align":"start | end | center | stretch | baseline","-ms-flex-direction":"row | row-reverse | column | column-reverse","-ms-flex-order":"<number>","-ms-flex-pack":"start | end | center | justify | distribute","-ms-flex-wrap":"nowrap | wrap | wrap-reverse",float:"left | right | none","float-offset":1,"flood-color":1,"flood-opacity":"<opacity-value>",font:"<font-shorthand> | caption | icon | menu | message-box | small-caption | status-bar","font-family":"<font-family>","font-feature-settings":"<feature-tag-value> | normal","font-kerning":"auto | normal | none","font-size":"<font-size>","font-size-adjust":"<number> | none","font-stretch":"<font-stretch>","font-style":"<font-style>","font-variant":"<font-variant> | normal | none","font-variant-alternates":"<font-variant-alternates> | normal","font-variant-caps":"<font-variant-caps> | normal","font-variant-east-asian":"<font-variant-east-asian> | normal","font-variant-ligatures":"<font-variant-ligatures> | normal | none", |
| 79 |
"font-variant-numeric":"<font-variant-numeric> | normal","font-variant-position":"normal | sub | super","font-weight":"<font-weight>",gap:"[ <length> | <percentage> ]{1,2}","glyph-orientation-horizontal":"<glyph-angle>","glyph-orientation-vertical":"auto | <glyph-angle>",grid:1,"grid-area":1,"grid-auto-columns":1,"grid-auto-flow":1,"grid-auto-position":1,"grid-auto-rows":1,"grid-cell-stacking":"columns | rows | layer","grid-column":1,"grid-columns":1,"grid-column-align":"start | end | center | stretch","grid-column-sizing":1,"grid-column-start":1,"grid-column-end":1,"grid-column-span":"<integer>","grid-flow":"none | rows | columns","grid-gap":"[ <length> | <percentage> ]{1,2}","grid-layer":"<integer>","grid-row":1,"grid-rows":1,"grid-row-align":"start | end | center | stretch","grid-row-gap":1,"grid-row-start":1,"grid-row-end":1,"grid-row-span":"<integer>","grid-row-sizing":1,"grid-template":1,"grid-template-areas":1,"grid-template-columns":1,"grid-template-rows":1,"hanging-punctuation":1,height:"<margin-width> | <content-sizing>","hyphenate-after":"<integer> | auto","hyphenate-before":"<integer> | auto","hyphenate-character":"<string> | auto","hyphenate-lines":"no-limit | <integer>","hyphenate-resource":1,hyphens:"none | manual | auto",icon:1,"image-orientation":"angle | auto","image-rendering":"auto | optimizeSpeed | optimizeQuality","image-resolution":1,"ime-mode":"auto | normal | active | inactive | disabled","inline-box-align":"last | <integer>","justify-content":"flex-start | flex-end | center | space-between | space-around | space-evenly | stretch","-webkit-justify-content":"flex-start | flex-end | center | space-between | space-around | space-evenly | stretch",kerning:"auto | <length>",left:"<margin-width>","letter-spacing":"<length> | normal","line-height":"<line-height>","line-break":"auto | loose | normal | strict","line-stacking":1,"line-stacking-ruby":"exclude-ruby | include-ruby","line-stacking-shift":"consider-shifts | disregard-shifts","line-stacking-strategy":"inline-line-height | block-line-height | max-height | grid-height","list-style":1,"list-style-image":"<uri> | none","list-style-position":"inside | outside","list-style-type":"disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none",margin:"<margin-width>{1,4}","margin-bottom":"<margin-width>","margin-left":"<margin-width>","margin-right":"<margin-width>","margin-top":"<margin-width>",mark:1,"mark-after":1,"mark-before":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,marks:1,"marquee-direction":1,"marquee-play-count":1,"marquee-speed":1,"marquee-style":1,mask:1,"max-height":"<length> | <percentage> | <content-sizing> | none","max-width":"<length> | <percentage> | <content-sizing> | none","min-height":"<length> | <percentage> | <content-sizing> | contain-floats | -moz-contain-floats | -webkit-contain-floats","min-width":"<length> | <percentage> | <content-sizing> | contain-floats | -moz-contain-floats | -webkit-contain-floats","mix-blend-mode":"<blend-mode>","move-to":1,"nav-down":1,"nav-index":1,"nav-left":1,"nav-right":1,"nav-up":1,"object-fit":"fill | contain | cover | none | scale-down","object-position":"<position>",opacity:"<opacity-value>",order:"<integer>","-webkit-order":"<integer>",orphans:"<integer>",outline:1,"outline-color":"<color> | invert","outline-offset":1,"outline-style":"<border-style>","outline-width":"<border-width>",overflow:"visible | hidden | scroll | auto","overflow-style":1,"overflow-wrap":"normal | break-word","overflow-x":1,"overflow-y":1,padding:"<padding-width>{1,4}","padding-bottom":"<padding-width>","padding-left":"<padding-width>","padding-right":"<padding-width>","padding-top":"<padding-width>",page:1,"page-break-after":"auto | always | avoid | left | right","page-break-before":"auto | always | avoid | left | right","page-break-inside":"auto | avoid","page-policy":1,pause:1,"pause-after":1,"pause-before":1,perspective:1,"perspective-origin":1,phonemes:1,pitch:1,"pitch-range":1,"play-during":1,"pointer-events":"auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all",position:"static | relative | absolute | fixed | sticky | -webkit-sticky","presentation-level":1,"punctuation-trim":1,quotes:1,"rendering-intent":1,resize:1,rest:1,"rest-after":1,"rest-before":1,richness:1,right:"<margin-width>",rotation:1,"rotation-point":1,"ruby-align":1,"ruby-overhang":1,"ruby-position":1,"ruby-span":1,"shape-rendering":"auto | optimizeSpeed | crispEdges | geometricPrecision",size:1,speak:"normal | none | spell-out","speak-header":"once | always","speak-numeral":"digits | continuous","speak-punctuation":"code | none","speech-rate":1,src:1,"stop-color":1,"stop-opacity":"<opacity-value>",stress:1,"string-set":1,stroke:"<paint>","stroke-dasharray":"none | <dasharray>","stroke-dashoffset":"<percentage> | <length>","stroke-linecap":"butt | round | square","stroke-linejoin":"miter | round | bevel","stroke-miterlimit":"<miterlimit>","stroke-opacity":"<opacity-value>","stroke-width":"<percentage> | <length>","table-layout":"auto | fixed","tab-size":"<integer> | <length>",target:1,"target-name":1,"target-new":1,"target-position":1,"text-align":"left | right | center | justify | match-parent | start | end","text-align-last":1,"text-anchor":"start | middle | end","text-decoration":"<text-decoration-line> || <text-decoration-style> || <text-decoration-color>","text-decoration-color":"<text-decoration-color>","text-decoration-line":"<text-decoration-line>","text-decoration-style":"<text-decoration-style>","text-decoration-skip":"none | [ objects || spaces || ink || edges || box-decoration ]","-webkit-text-decoration-skip":"none | [ objects || spaces || ink || edges || box-decoration ]","text-underline-position":"auto | [ under || [ left | right ] ]","text-emphasis":1,"text-height":1,"text-indent":"<length> | <percentage>","text-justify":"auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida","text-outline":1,"text-overflow":1,"text-rendering":"auto | optimizeSpeed | optimizeLegibility | geometricPrecision","text-shadow":1,"text-transform":"capitalize | uppercase | lowercase | none","text-wrap":"normal | none | avoid",top:"<margin-width>","-ms-touch-action":"auto | none | pan-x | pan-y | pan-left | pan-right | pan-up | pan-down | manipulation","touch-action":"auto | none | pan-x | pan-y | pan-left | pan-right | pan-up | pan-down | manipulation",transform:1,"transform-origin":1,"transform-style":1,transition:1,"transition-delay":1,"transition-duration":1,"transition-property":1,"transition-timing-function":1,"unicode-bidi":"normal | embed | isolate | bidi-override | isolate-override | plaintext","user-modify":"read-only | read-write | write-only","user-select":"auto | text | none | contain | all","vertical-align":"auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | <percentage> | <length>",visibility:"visible | hidden | collapse","voice-balance":1,"voice-duration":1,"voice-family":1,"voice-pitch":1,"voice-pitch-range":1,"voice-rate":1,"voice-stress":1,"voice-volume":1,volume:1,"white-space":"normal | pre | nowrap | pre-wrap | pre-line | -pre-wrap | -o-pre-wrap | -moz-pre-wrap | -hp-pre-wrap","white-space-collapse":1,widows:"<integer>",width:"<length> | <percentage> | <content-sizing> | auto","will-change":"<will-change>","word-break":"normal | keep-all | break-all | break-word","word-spacing":"<length> | normal","word-wrap":"normal | break-word","writing-mode":"horizontal-tb | vertical-rl | vertical-lr | lr-tb | rl-tb | tb-rl | bt-rl | tb-lr | bt-lr | lr-bt | rl-bt | lr | rl | tb","z-index":"<integer> | auto",zoom:"<number> | <percentage> | normal"}},{}],8:[function(e,t,n){"use strict";t.exports=s;var o=e("../util/SyntaxUnit"),i=e("./Parser");function s(e,t,n,s){o.call(this,e,n,s,i.PROPERTY_NAME_TYPE),this.hack=t} |
| 80 |
s.prototype=new o,s.prototype.constructor=s,s.prototype.toString=function(){return(this.hack?this.hack:"")+this.text}},{"../util/SyntaxUnit":26,"./Parser":6}],9:[function(e,t,n){"use strict";t.exports=s;var o=e("../util/SyntaxUnit"),i=e("./Parser");function s(e,t,n){o.call(this,e.join(" "),t,n,i.PROPERTY_VALUE_TYPE),this.parts=e}s.prototype=new o,s.prototype.constructor=s},{"../util/SyntaxUnit":26,"./Parser":6}],10:[function(e,t,n){"use strict";function o(e){this._i=0,this._parts=e.parts,this._marks=[],this.value=e}t.exports=o,o.prototype.count=function(){return this._parts.length},o.prototype.isFirst=function(){return 0===this._i},o.prototype.hasNext=function(){return this._i<this._parts.length},o.prototype.mark=function(){this._marks.push(this._i)},o.prototype.peek=function(e){return this.hasNext()?this._parts[this._i+(e||0)]:null},o.prototype.next=function(){return this.hasNext()?this._parts[this._i++]:null},o.prototype.previous=function(){return this._i>0?this._parts[--this._i]:null},o.prototype.restore=function(){this._marks.length&&(this._i=this._marks.pop())},o.prototype.drop=function(){this._marks.pop()}},{}],11:[function(e,t,n){"use strict";t.exports=r;var o=e("../util/SyntaxUnit"),i=e("./Colors"),s=e("./Parser"),a=e("./Tokens");function r(e,t,n,a){var l,c=a||{};if(o.call(this,e,t,n,s.PROPERTY_VALUE_PART_TYPE),this.type="unknown",/^([+-]?[\d.]+)([a-z]+)$/i.test(e))switch(this.type="dimension",this.value=Number(RegExp.$1),this.units=RegExp.$2,this.units.toLowerCase()){case"em":case"rem":case"ex":case"px":case"cm":case"mm":case"in":case"pt":case"pc":case"ch":case"vh":case"vw":case"vmax":case"vmin":this.type="length";break;case"fr":this.type="grid";break;case"deg":case"rad":case"grad":case"turn":this.type="angle";break;case"ms":case"s":this.type="time";break;case"hz":case"khz":this.type="frequency";break;case"dpi":case"dpcm":this.type="resolution"}else/^([+-]?[\d.]+)%$/i.test(e)?(this.type="percentage",this.value=Number(RegExp.$1)):/^([+-]?\d+)$/i.test(e)?(this.type="integer",this.value=Number(RegExp.$1)):/^([+-]?[\d.]+)$/i.test(e)?(this.type="number",this.value=Number(RegExp.$1)):/^#([a-f0-9]{3,6})/i.test(e)?(this.type="color",3===(l=RegExp.$1).length?(this.red=parseInt(l.charAt(0)+l.charAt(0),16),this.green=parseInt(l.charAt(1)+l.charAt(1),16),this.blue=parseInt(l.charAt(2)+l.charAt(2),16)):(this.red=parseInt(l.substring(0,2),16),this.green=parseInt(l.substring(2,4),16),this.blue=parseInt(l.substring(4,6),16))):/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(e)?(this.type="color",this.red=Number(RegExp.$1),this.green=Number(RegExp.$2),this.blue=Number(RegExp.$3)):/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(e)?(this.type="color",this.red=255*Number(RegExp.$1)/100,this.green=255*Number(RegExp.$2)/100,this.blue=255*Number(RegExp.$3)/100):/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/i.test(e)?(this.type="color",this.red=Number(RegExp.$1),this.green=Number(RegExp.$2),this.blue=Number(RegExp.$3),this.alpha=Number(RegExp.$4)):/^rgba\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d.]+)\s*\)/i.test(e)?(this.type="color",this.red=255*Number(RegExp.$1)/100,this.green=255*Number(RegExp.$2)/100,this.blue=255*Number(RegExp.$3)/100,this.alpha=Number(RegExp.$4)):/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(e)?(this.type="color",this.hue=Number(RegExp.$1),this.saturation=Number(RegExp.$2)/100,this.lightness=Number(RegExp.$3)/100):/^hsla\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d.]+)\s*\)/i.test(e)?(this.type="color",this.hue=Number(RegExp.$1),this.saturation=Number(RegExp.$2)/100,this.lightness=Number(RegExp.$3)/100,this.alpha=Number(RegExp.$4)):/^url\(("([^\\"]|\.)*")\)/i.test(e)?(this.type="uri",this.uri=r.parseString(RegExp.$1)):/^([^(]+)\(/i.test(e)?(this.type="function",this.name=RegExp.$1,this.value=e):/^"([^\n\r\f\\"]|\\\r\n|\\[^\r0-9a-f]|\\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)*"/i.test(e)||/^'([^\n\r\f\\']|\\\r\n|\\[^\r0-9a-f]|\\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)*'/i.test(e)?(this.type="string",this.value=r.parseString(e)):i[e.toLowerCase()]?(this.type="color",l=i[e.toLowerCase()].substring(1),this.red=parseInt(l.substring(0,2),16),this.green=parseInt(l.substring(2,4),16),this.blue=parseInt(l.substring(4,6),16)):/^[,/]$/.test(e)?(this.type="operator",this.value=e):/^-?[a-z_\u00A0-\uFFFF][a-z0-9\-_\u00A0-\uFFFF]*$/i.test(e)&&(this.type="identifier",this.value=e);this.wasIdent=Boolean(c.ident)}r.prototype=new o,r.prototype.constructor=r,r.parseString=function(e){return(e=e.slice(1,-1)).replace(/\\(\r\n|[^\r0-9a-f]|[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)/gi,(function(e,t){if(/^(\n|\r\n|\r|\f)$/.test(t))return"";var n=/^[0-9a-f]{1,6}/i.exec(t);if(n){var o=parseInt(n[0],16);return String.fromCodePoint?String.fromCodePoint(o):String.fromCharCode(o)}return t}))},r.serializeString=function(e){return'"'+e.replace(/["\r\n\f]/g,(function(e,t){return'"'===t?"\\"+t:"\\"+(String.codePointAt?String.codePointAt(0):String.charCodeAt(0)).toString(16)+" "}))+'"'},r.fromToken=function(e){return new r(e.value,e.startLine,e.startCol,{ident:e.type===a.IDENT})}},{"../util/SyntaxUnit":26,"./Colors":1,"./Parser":6,"./Tokens":18}],12:[function(e,t,n){"use strict";var o=t.exports={__proto__:null,":first-letter":1,":first-line":1,":before":1,":after":1};o.ELEMENT=1,o.CLASS=2,o.isElement=function(e){return 0===e.indexOf("::")||o[e.toLowerCase()]===o.ELEMENT}},{}],13:[function(e,t,n){"use strict";t.exports=a;var o=e("../util/SyntaxUnit"),i=e("./Parser"),s=e("./Specificity");function a(e,t,n){o.call(this,e.join(" "),t,n,i.SELECTOR_TYPE),this.parts=e,this.specificity=s.calculate(this)}a.prototype=new o,a.prototype.constructor=a},{"../util/SyntaxUnit":26,"./Parser":6,"./Specificity":16}],14:[function(e,t,n){"use strict";t.exports=s;var o=e("../util/SyntaxUnit"),i=e("./Parser");function s(e,t,n,s,a){o.call(this,n,s,a,i.SELECTOR_PART_TYPE),this.elementName=e,this.modifiers=t}s.prototype=new o,s.prototype.constructor=s},{"../util/SyntaxUnit":26,"./Parser":6}],15:[function(e,t,n){"use strict";t.exports=s;var o=e("../util/SyntaxUnit"),i=e("./Parser");function s(e,t,n,s){o.call(this,e,n,s,i.SELECTOR_SUB_PART_TYPE),this.type=t,this.args=[]}s.prototype=new o,s.prototype.constructor=s},{"../util/SyntaxUnit":26,"./Parser":6}],16:[function(e,t,n){"use strict";t.exports=s;var o=e("./Pseudos"),i=e("./SelectorPart");function s(e,t,n,o){this.a=e,this.b=t,this.c=n,this.d=o}s.prototype={constructor:s,compare:function(e){var t,n,o=["a","b","c","d"];for(t=0,n=o.length;t<n;t++){if(this[o[t]]<e[o[t]])return-1;if(this[o[t]]>e[o[t]])return 1}return 0},valueOf:function(){return 1e3*this.a+100*this.b+10*this.c+this.d},toString:function(){return this.a+","+this.b+","+this.c+","+this.d}},s.calculate=function(e){var t,n,a,r=0,l=0,c=0;function d(e){var t,n,i,s,a,u=e.elementName?e.elementName.text:"";for(u&&"*"!==u.charAt(u.length-1)&&c++,t=0,i=e.modifiers.length;t<i;t++)switch((a=e.modifiers[t]).type){case"class":case"attribute":l++;break;case"id":r++;break;case"pseudo":o.isElement(a.text)?c++:l++;break;case"not":for(n=0,s=a.args.length;n<s;n++)d(a.args[n])}}for(t=0,n=e.parts.length;t<n;t++)(a=e.parts[t])instanceof i&&d(a);return new s(0,r,l,c)}},{"./Pseudos":12,"./SelectorPart":14}],17:[function(e,t,n){"use strict";t.exports=f;var o=e("../util/TokenStreamBase"),i=e("./PropertyValuePart"),s=e("./Tokens"),a=/^[0-9a-fA-F]$/,r=/^[\u00A0-\uFFFF]$/,l=/\n|\r\n|\r|\f/,c=/\u0009|\u000a|\u000c|\u000d|\u0020/;function d(e){return null!=e&&a.test(e)}function u(e){return null!=e&&/\d/.test(e)}function p(e){return null!=e&&c.test(e)}function h(e){return null!=e&&l.test(e)}function g(e){return null!=e&&/[a-z_\u00A0-\uFFFF\\]/i.test(e)}function m(e){return null!=e&&(g(e)||/[0-9\-\\]/.test(e))}function b(e){return"string"==typeof e&&(u(e[0])||"."===e[0]&&u(e[1]))}function f(e){o.call(this,e,s)}f.prototype=function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}(new o,{_getToken:function(){var e,t=this._reader,n=null,o=t.getLine(),i=t.getCol() |
| 81 |
;for(e=t.read();e;){switch(e){case"/":n="*"===t.peek()?this.commentToken(e,o,i):this.charToken(e,o,i);break;case"|":case"~":case"^":case"$":case"*":n="="===t.peek()?this.comparisonToken(e,o,i):this.charToken(e,o,i);break;case'"':case"'":n=this.stringToken(e,o,i);break;case"#":n=m(t.peek())?this.hashToken(e,o,i):this.charToken(e,o,i);break;case".":n=u(t.peek())?this.numberToken(e,o,i):this.charToken(e,o,i);break;case"-":if(b(t.peekCount(2))){n=this.numberToken(e,o,i);break}n="->"===t.peekCount(2)?this.htmlCommentEndToken(e,o,i):this._getDefaultToken(e,o,i);break;case"+":n=b(t.peekCount(2))?this.numberToken(e,o,i):this.charToken(e,o,i);break;case"!":n=this.importantToken(e,o,i);break;case"@":n=this.atRuleToken(e,o,i);break;case":":n=this.notToken(e,o,i);break;case"<":n=this.htmlCommentStartToken(e,o,i);break;case"\\":n=/[^\r\n\f]/.test(t.peek())?this.identOrFunctionToken(this.readEscape(e,!0),o,i):this.charToken(e,o,i);break;case"U":case"u":n="+"===t.peek()?this.unicodeRangeToken(e,o,i):this._getDefaultToken(e,o,i);break;default:n=this._getDefaultToken(e,o,i)}break}return n||null!==e||(n=this.createToken(s.EOF,null,o,i)),n},_getDefaultToken:function(e,t,n){var o,i=this._reader;return u(e)?this.numberToken(e,t,n):p(e)?this.whitespaceToken(e,t,n):"string"==typeof(o=e+i.peekCount(1))&&("-"===o[0]&&g(o[1])||g(o[0]))?this.identOrFunctionToken(e,t,n):this.charToken(e,t,n)},createToken:function(e,t,n,o,i){var s=this._reader;return{value:t,type:e,channel:(i=i||{}).channel,endChar:i.endChar,hide:i.hide||!1,startLine:n,startCol:o,endLine:s.getLine(),endCol:s.getCol()}},atRuleToken:function(e,t,n){var o=e,i=this._reader,a=s.CHAR;return i.mark(),o=e+this.readName(),(a=s.type(o.toLowerCase()))!==s.CHAR&&a!==s.UNKNOWN||(o.length>1?a=s.UNKNOWN_SYM:(a=s.CHAR,o=e,i.reset())),this.createToken(a,o,t,n)},charToken:function(e,t,n){var o=s.type(e),i={};return-1===o?o=s.CHAR:i.endChar=s[o].endChar,this.createToken(o,e,t,n,i)},commentToken:function(e,t,n){var o=this.readComment(e);return this.createToken(s.COMMENT,o,t,n)},comparisonToken:function(e,t,n){var o=e+this._reader.read(),i=s.type(o)||s.CHAR;return this.createToken(i,o,t,n)},hashToken:function(e,t,n){var o=this.readName(e);return this.createToken(s.HASH,o,t,n)},htmlCommentStartToken:function(e,t,n){var o=this._reader,i=e;return o.mark(),"\x3c!--"===(i+=o.readCount(3))?this.createToken(s.CDO,i,t,n):(o.reset(),this.charToken(e,t,n))},htmlCommentEndToken:function(e,t,n){var o=this._reader,i=e;return o.mark(),"--\x3e"===(i+=o.readCount(2))?this.createToken(s.CDC,i,t,n):(o.reset(),this.charToken(e,t,n))},identOrFunctionToken:function(e,t,n){var o,i=this._reader,a=this.readName(e),r=s.IDENT;return"("===i.peek()?(a+=i.read(),["url(","url-prefix(","domain("].indexOf(a.toLowerCase())>-1?(i.mark(),null===(o=this.readURI(a))?(i.reset(),r=s.FUNCTION):(r=s.URI,a=o)):r=s.FUNCTION):":"===i.peek()&&"progid"===a.toLowerCase()&&(a+=i.readTo("("),r=s.IE_FUNCTION),this.createToken(r,a,t,n)},importantToken:function(e,t,n){var o,i,a=this._reader,r=e,l=s.CHAR;for(a.mark(),i=a.read();i;){if("/"===i){if("*"!==a.peek())break;if(""===(o=this.readComment(i)))break}else{if(!p(i)){if(/i/i.test(i)){o=a.readCount(8),/mportant/i.test(o)&&(r+=i+o,l=s.IMPORTANT_SYM);break}break}r+=i+this.readWhitespace()}i=a.read()}return l===s.CHAR?(a.reset(),this.charToken(e,t,n)):this.createToken(l,r,t,n)},notToken:function(e,t,n){var o=this._reader,i=e;return o.mark(),":not("===(i+=o.readCount(4)).toLowerCase()?this.createToken(s.NOT,i,t,n):(o.reset(),this.charToken(e,t,n))},numberToken:function(e,t,n){var o,i=this._reader,a=this.readNumber(e),r=s.NUMBER,l=i.peek();return function(e){return null!=e&&(g(e)||/-\\/.test(e))}(l)?(a+=o=this.readName(i.read()),r=/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^fr$|^vmax$|^vmin$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(o)?s.LENGTH:/^deg|^rad$|^grad$|^turn$/i.test(o)?s.ANGLE:/^ms$|^s$/i.test(o)?s.TIME:/^hz$|^khz$/i.test(o)?s.FREQ:/^dpi$|^dpcm$/i.test(o)?s.RESOLUTION:s.DIMENSION):"%"===l&&(a+=i.read(),r=s.PERCENTAGE),this.createToken(r,a,t,n)},stringToken:function(e,t,n){for(var o,i=e,a=e,r=this._reader,l=s.STRING,c=r.read();c;){if(a+=c,"\\"===c){if(null===(c=r.read()))break;if(/[^\r\n\f0-9a-f]/i.test(c))a+=c;else{for(o=0;d(c)&&o<6;o++)a+=c,c=r.read();if("\r"===c&&"\n"===r.peek()&&(a+=c,c=r.read()),!p(c))continue;a+=c}}else{if(c===i)break;if(h(r.peek())){l=s.INVALID;break}}c=r.read()}return null===c&&(l=s.INVALID),this.createToken(l,a,t,n)},unicodeRangeToken:function(e,t,n){var o,i=this._reader,a=e,r=s.CHAR;return"+"===i.peek()&&(i.mark(),a+=i.read(),2===(a+=this.readUnicodeRangePart(!0)).length?i.reset():(r=s.UNICODE_RANGE,-1===a.indexOf("?")&&"-"===i.peek()&&(i.mark(),o=i.read(),1===(o+=this.readUnicodeRangePart(!1)).length?i.reset():a+=o))),this.createToken(r,a,t,n)},whitespaceToken:function(e,t,n){var o=e+this.readWhitespace();return this.createToken(s.S,o,t,n)},readUnicodeRangePart:function(e){for(var t=this._reader,n="",o=t.peek();d(o)&&n.length<6;)t.read(),n+=o,o=t.peek();if(e)for(;"?"===o&&n.length<6;)t.read(),n+=o,o=t.peek();return n},readWhitespace:function(){for(var e=this._reader,t="",n=e.peek();p(n);)e.read(),t+=n,n=e.peek();return t},readNumber:function(e){for(var t=this._reader,n=e,o="."===e,i=t.peek();i;){if(u(i))n+=t.read();else{if("."!==i)break;if(o)break;o=!0,n+=t.read()}i=t.peek()}return n},readString:function(){var e=this.stringToken(this._reader.read(),0,0);return e.type===s.INVALID?null:e.value},readURI:function(e){for(var t=this._reader,n=e,o="",s=t.peek();s&&p(s);)t.read(),s=t.peek();for("'"===s||'"'===s?null!==(o=this.readString())&&(o=i.parseString(o)):o=this.readUnquotedURL(),s=t.peek();s&&p(s);)t.read(),s=t.peek();return null===o||")"!==s?n=null:n+=i.serializeString(o)+t.read(),n},readUnquotedURL:function(e){var t,n=this._reader,o=e||"";for(t=n.peek();t;t=n.peek())if(r.test(t)||/^[-!#$%&*-[\]-~]$/.test(t))o+=t,n.read();else{if("\\"!==t)break;if(!/^[^\r\n\f]$/.test(n.peek(2)))break;o+=this.readEscape(n.read(),!0)}return o},readName:function(e){var t,n=this._reader,o=e||"";for(t=n.peek();t;t=n.peek())if("\\"===t){if(!/^[^\r\n\f]$/.test(n.peek(2)))break;o+=this.readEscape(n.read(),!0)}else{if(!m(t))break;o+=n.read()}return o},readEscape:function(e,t){var n=this._reader,o=e||"",i=0,s=n.peek();if(d(s))do{o+=n.read(),s=n.peek()}while(s&&d(s)&&++i<6);if(1===o.length){if(!/^[^\r\n\f0-9a-f]$/.test(s))throw new Error("Bad escape sequence.");if(n.read(),t)return s}else"\r"===s?(n.read(),"\n"===n.peek()&&(s+=n.read())):/^[ \t\n\f]$/.test(s)?n.read():s="";if(t){var a=parseInt(o.slice(e.length),16);return String.fromCodePoint?String.fromCodePoint(a):String.fromCharCode(a)}return o+s},readComment:function(e){var t=this._reader,n=e||"",o=t.read();if("*"===o){for(;o;){if((n+=o).length>2&&"*"===o&&"/"===t.peek()){n+=t.read();break}o=t.read()}return n}return""}})},{"../util/TokenStreamBase":27,"./PropertyValuePart":11,"./Tokens":18}],18:[function(e,t,n){"use strict";var o=t.exports=[{name:"CDO"},{name:"CDC"},{name:"S",whitespace:!0},{name:"COMMENT",comment:!0,hide:!0,channel:"comment"},{name:"INCLUDES",text:"~="},{name:"DASHMATCH",text:"|="},{name:"PREFIXMATCH",text:"^="},{name:"SUFFIXMATCH",text:"$="},{name:"SUBSTRINGMATCH",text:"*="},{name:"STRING"},{name:"IDENT"},{name:"HASH"},{name:"IMPORT_SYM",text:"@import"},{name:"PAGE_SYM",text:"@page"},{name:"MEDIA_SYM",text:"@media"},{name:"FONT_FACE_SYM",text:"@font-face"},{name:"CHARSET_SYM",text:"@charset"},{name:"NAMESPACE_SYM",text:"@namespace"},{name:"SUPPORTS_SYM",text:"@supports"},{name:"VIEWPORT_SYM",text:["@viewport","@-ms-viewport","@-o-viewport"]},{name:"DOCUMENT_SYM",text:["@document","@-moz-document"]},{name:"UNKNOWN_SYM"},{name:"KEYFRAMES_SYM",text:["@keyframes","@-webkit-keyframes","@-moz-keyframes","@-o-keyframes"]},{name:"IMPORTANT_SYM"},{name:"LENGTH"},{name:"ANGLE"},{name:"TIME"},{name:"FREQ"},{name:"DIMENSION"},{name:"PERCENTAGE"},{name:"NUMBER"},{name:"URI"},{name:"FUNCTION"},{name:"UNICODE_RANGE"},{name:"INVALID"},{name:"PLUS",text:"+"},{name:"GREATER", |
| 82 |
text:">"},{name:"COMMA",text:","},{name:"TILDE",text:"~"},{name:"NOT"},{name:"TOPLEFTCORNER_SYM",text:"@top-left-corner"},{name:"TOPLEFT_SYM",text:"@top-left"},{name:"TOPCENTER_SYM",text:"@top-center"},{name:"TOPRIGHT_SYM",text:"@top-right"},{name:"TOPRIGHTCORNER_SYM",text:"@top-right-corner"},{name:"BOTTOMLEFTCORNER_SYM",text:"@bottom-left-corner"},{name:"BOTTOMLEFT_SYM",text:"@bottom-left"},{name:"BOTTOMCENTER_SYM",text:"@bottom-center"},{name:"BOTTOMRIGHT_SYM",text:"@bottom-right"},{name:"BOTTOMRIGHTCORNER_SYM",text:"@bottom-right-corner"},{name:"LEFTTOP_SYM",text:"@left-top"},{name:"LEFTMIDDLE_SYM",text:"@left-middle"},{name:"LEFTBOTTOM_SYM",text:"@left-bottom"},{name:"RIGHTTOP_SYM",text:"@right-top"},{name:"RIGHTMIDDLE_SYM",text:"@right-middle"},{name:"RIGHTBOTTOM_SYM",text:"@right-bottom"},{name:"RESOLUTION",state:"media"},{name:"IE_FUNCTION"},{name:"CHAR"},{name:"PIPE",text:"|"},{name:"SLASH",text:"/"},{name:"MINUS",text:"-"},{name:"STAR",text:"*"},{name:"LBRACE",endChar:"}",text:"{"},{name:"RBRACE",text:"}"},{name:"LBRACKET",endChar:"]",text:"["},{name:"RBRACKET",text:"]"},{name:"EQUALS",text:"="},{name:"COLON",text:":"},{name:"SEMICOLON",text:";"},{name:"LPAREN",endChar:")",text:"("},{name:"RPAREN",text:")"},{name:"DOT",text:"."}];!function(){var e=[],t=Object.create(null);o.UNKNOWN=-1,o.unshift({name:"EOF"});for(var n=0,i=o.length;n<i;n++)if(e.push(o[n].name),o[o[n].name]=n,o[n].text)if(o[n].text instanceof Array)for(var s=0;s<o[n].text.length;s++)t[o[n].text[s]]=n;else t[o[n].text]=n;o.name=function(t){return e[t]},o.type=function(e){return t[e]||-1}}()},{}],19:[function(e,t,n){"use strict";var o=e("./Matcher"),i=e("./Properties"),s=e("./ValidationTypes"),a=e("./ValidationError"),r=e("./PropertyValueIterator");t.exports={validate:function(e,t){var n,o=e.toString().toLowerCase(),l=new r(t),c=i[o];if(c){if("number"!=typeof c){if(s.isAny(l,"inherit | initial | unset")){if(l.hasNext())throw n=l.next(),new a("Expected end of value but found '"+n+"'.",n.line,n.col);return}this.singleProperty(c,l)}}else if(0!==o.indexOf("-"))throw new a("Unknown property '"+e+"'.",e.line,e.col)},singleProperty:function(e,t){var n,i=t.value;if(!o.parse(e).match(t))throw t.hasNext()&&!t.isFirst()?(n=t.peek(),new a("Expected end of value but found '"+n+"'.",n.line,n.col)):new a("Expected ("+s.describe(e)+") but found '"+i+"'.",i.line,i.col);if(t.hasNext())throw n=t.next(),new a("Expected end of value but found '"+n+"'.",n.line,n.col)}}},{"./Matcher":3,"./Properties":7,"./PropertyValueIterator":10,"./ValidationError":20,"./ValidationTypes":21}],20:[function(e,t,n){"use strict";function o(e,t,n){this.col=n,this.line=t,this.message=e}t.exports=o,o.prototype=new Error},{}],21:[function(e,t,n){"use strict";var o,i,s=t.exports,a=e("./Matcher");o=s,i={isLiteral:function(e,t){var n,o,i=e.text.toString().toLowerCase(),s=t.split(" | "),a=!1;for(n=0,o=s.length;n<o&&!a;n++)"<"===s[n].charAt(0)?a=this.simple[s[n]](e):"()"===s[n].slice(-2)?a="function"===e.type&&e.name===s[n].slice(0,-2):i===s[n].toLowerCase()&&(a=!0);return a},isSimple:function(e){return Boolean(this.simple[e])},isComplex:function(e){return Boolean(this.complex[e])},describe:function(e){return this.complex[e]instanceof a?this.complex[e].toString(0):e},isAny:function(e,t){var n,o,i=t.split(" | "),s=!1;for(n=0,o=i.length;n<o&&!s&&e.hasNext();n++)s=this.isType(e,i[n]);return s},isAnyOfGroup:function(e,t){var n,o,i=t.split(" || "),s=!1;for(n=0,o=i.length;n<o&&!s;n++)s=this.isType(e,i[n]);return!!s&&i[n-1]},isType:function(e,t){var n=e.peek(),o=!1;return"<"!==t.charAt(0)?(o=this.isLiteral(n,t))&&e.next():this.simple[t]?(o=this.simple[t](n))&&e.next():o=this.complex[t]instanceof a?this.complex[t].match(e):this.complex[t](e),o},simple:{__proto__:null,"<absolute-size>":"xx-small | x-small | small | medium | large | x-large | xx-large","<animateable-feature>":"scroll-position | contents | <animateable-feature-name>","<animateable-feature-name>":function(e){return this["<ident>"](e)&&!/^(unset|initial|inherit|will-change|auto|scroll-position|contents)$/i.test(e)},"<angle>":function(e){return"angle"===e.type},"<attachment>":"scroll | fixed | local","<attr>":"attr()","<basic-shape>":"inset() | circle() | ellipse() | polygon()","<bg-image>":"<image> | <gradient> | none","<border-style>":"none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset","<border-width>":"<length> | thin | medium | thick","<box>":"padding-box | border-box | content-box","<clip-source>":"<uri>","<color>":function(e){return"color"===e.type||"transparent"===String(e)||"currentColor"===String(e)},"<color-svg>":function(e){return"color"===e.type},"<content>":"content()","<content-sizing>":"fill-available | -moz-available | -webkit-fill-available | max-content | -moz-max-content | -webkit-max-content | min-content | -moz-min-content | -webkit-min-content | fit-content | -moz-fit-content | -webkit-fit-content","<feature-tag-value>":function(e){return"function"===e.type&&/^[A-Z0-9]{4}$/i.test(e)},"<filter-function>":"blur() | brightness() | contrast() | custom() | drop-shadow() | grayscale() | hue-rotate() | invert() | opacity() | saturate() | sepia()","<flex-basis>":"<width>","<flex-direction>":"row | row-reverse | column | column-reverse","<flex-grow>":"<number>","<flex-shrink>":"<number>","<flex-wrap>":"nowrap | wrap | wrap-reverse","<font-size>":"<absolute-size> | <relative-size> | <length> | <percentage>","<font-stretch>":"normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded","<font-style>":"normal | italic | oblique","<font-variant-caps>":"small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps","<font-variant-css21>":"normal | small-caps","<font-weight>":"normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900","<generic-family>":"serif | sans-serif | cursive | fantasy | monospace","<geometry-box>":"<shape-box> | fill-box | stroke-box | view-box","<glyph-angle>":function(e){return"angle"===e.type&&"deg"===e.units},"<gradient>":function(e){return"function"===e.type&&/^(?:-(?:ms|moz|o|webkit)-)?(?:repeating-)?(?:radial-|linear-)?gradient/i.test(e)},"<icccolor>":"cielab() | cielch() | cielchab() | icc-color() | icc-named-color()","<ident>":function(e){return"identifier"===e.type||e.wasIdent},"<ident-not-generic-family>":function(e){return this["<ident>"](e)&&!this["<generic-family>"](e)},"<image>":"<uri>","<integer>":function(e){return"integer"===e.type},"<length>":function(e){return!("function"!==e.type||!/^(?:-(?:ms|moz|o|webkit)-)?calc/i.test(e))||"length"===e.type||"number"===e.type||"integer"===e.type||"0"===String(e)},"<line>":function(e){return"integer"===e.type},"<line-height>":"<number> | <length> | <percentage> | normal","<margin-width>":"<length> | <percentage> | auto","<miterlimit>":function(e){return this["<number>"](e)&&e.value>=1},"<nonnegative-length-or-percentage>":function(e){return(this["<length>"](e)||this["<percentage>"](e))&&("0"===String(e)||"function"===e.type||e.value>=0)},"<nonnegative-number-or-percentage>":function(e){return(this["<number>"](e)||this["<percentage>"](e))&&("0"===String(e)||"function"===e.type||e.value>=0)},"<number>":function(e){return"number"===e.type||this["<integer>"](e)},"<opacity-value>":function(e){return this["<number>"](e)&&e.value>=0&&e.value<=1},"<padding-width>":"<nonnegative-length-or-percentage>","<percentage>":function(e){return"percentage"===e.type||"0"===String(e)},"<relative-size>":"smaller | larger","<shape>":"rect() | inset-rect()","<shape-box>":"<box> | margin-box","<single-animation-direction>":"normal | reverse | alternate | alternate-reverse","<single-animation-name>":function(e){return this["<ident>"](e)&&/^-?[a-z_][-a-z0-9_]+$/i.test(e)&&!/^(none|unset|initial|inherit)$/i.test(e)},"<string>":function(e){return"string"===e.type},"<time>":function(e){return"time"===e.type},"<uri>":function(e){return"uri"===e.type}, |
| 83 |
"<width>":"<margin-width>"},complex:{__proto__:null,"<azimuth>":"<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards","<bg-position>":"<position>#","<bg-size>":"[ <length> | <percentage> | auto ]{1,2} | cover | contain","<blend-mode>":"normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity","<border-image-slice>":a.many([!0],a.cast("<nonnegative-number-or-percentage>"),a.cast("<nonnegative-number-or-percentage>"),a.cast("<nonnegative-number-or-percentage>"),a.cast("<nonnegative-number-or-percentage>"),"fill"),"<border-radius>":"<nonnegative-length-or-percentage>{1,4} [ / <nonnegative-length-or-percentage>{1,4} ]?","<box-shadow>":"none | <shadow>#","<clip-path>":"<basic-shape> || <geometry-box>","<dasharray>":a.cast("<nonnegative-length-or-percentage>").braces(1,1/0,"#",a.cast(",").question()),"<family-name>":"<string> | <ident-not-generic-family> <ident>*","<filter-function-list>":"[ <filter-function> | <uri> ]+","<flex>":"none | [ <flex-grow> <flex-shrink>? || <flex-basis> ]","<font-family>":"[ <generic-family> | <family-name> ]#","<font-shorthand>":"[ <font-style> || <font-variant-css21> || <font-weight> || <font-stretch> ]? <font-size> [ / <line-height> ]? <font-family>","<font-variant-alternates>":"stylistic() || historical-forms || styleset() || character-variant() || swash() || ornaments() || annotation()","<font-variant-ligatures>":"[ common-ligatures | no-common-ligatures ] || [ discretionary-ligatures | no-discretionary-ligatures ] || [ historical-ligatures | no-historical-ligatures ] || [ contextual | no-contextual ]","<font-variant-numeric>":"[ lining-nums | oldstyle-nums ] || [ proportional-nums | tabular-nums ] || [ diagonal-fractions | stacked-fractions ] || ordinal || slashed-zero","<font-variant-east-asian>":"[ jis78 | jis83 | jis90 | jis04 | simplified | traditional ] || [ full-width | proportional-width ] || ruby","<paint>":"<paint-basic> | <uri> <paint-basic>?","<paint-basic>":"none | currentColor | <color-svg> <icccolor>?","<position>":"[ center | [ left | right ] [ <percentage> | <length> ]? ] && [ center | [ top | bottom ] [ <percentage> | <length> ]? ] | [ left | center | right | <percentage> | <length> ] [ top | center | bottom | <percentage> | <length> ] | [ left | center | right | top | bottom | <percentage> | <length> ]","<repeat-style>":"repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}","<shadow>":a.many([!0],a.cast("<length>").braces(2,4),"inset","<color>"),"<text-decoration-color>":"<color>","<text-decoration-line>":"none | [ underline || overline || line-through || blink ]","<text-decoration-style>":"solid | double | dotted | dashed | wavy","<will-change>":"auto | <animateable-feature>#","<x-one-radius>":"[ <length> | <percentage> ]{1,2}"}},Object.keys(i).forEach((function(e){o[e]=i[e]})),Object.keys(s.simple).forEach((function(e){var t=s.simple[e];"string"==typeof t&&(s.simple[e]=function(e){return s.isLiteral(e,t)})})),Object.keys(s.complex).forEach((function(e){var t=s.complex[e];"string"==typeof t&&(s.complex[e]=a.parse(t))})),s.complex["<font-variant>"]=a.oror({expand:"<font-variant-ligatures>"},{expand:"<font-variant-alternates>"},"<font-variant-caps>",{expand:"<font-variant-numeric>"},{expand:"<font-variant-east-asian>"})},{"./Matcher":3}],22:[function(e,t,n){"use strict";t.exports={Colors:e("./Colors"),Combinator:e("./Combinator"),Parser:e("./Parser"),PropertyName:e("./PropertyName"),PropertyValue:e("./PropertyValue"),PropertyValuePart:e("./PropertyValuePart"),Matcher:e("./Matcher"),MediaFeature:e("./MediaFeature"),MediaQuery:e("./MediaQuery"),Selector:e("./Selector"),SelectorPart:e("./SelectorPart"),SelectorSubPart:e("./SelectorSubPart"),Specificity:e("./Specificity"),TokenStream:e("./TokenStream"),Tokens:e("./Tokens"),ValidationError:e("./ValidationError")}},{"./Colors":1,"./Combinator":2,"./Matcher":3,"./MediaFeature":4,"./MediaQuery":5,"./Parser":6,"./PropertyName":8,"./PropertyValue":9,"./PropertyValuePart":11,"./Selector":13,"./SelectorPart":14,"./SelectorSubPart":15,"./Specificity":16,"./TokenStream":17,"./Tokens":18,"./ValidationError":20}],23:[function(e,t,n){"use strict";function o(){this._listeners=Object.create(null)}t.exports=o,o.prototype={constructor:o,addListener:function(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)},fire:function(e){if("string"==typeof e&&(e={type:e}),void 0!==e.target&&(e.target=this),void 0===e.type)throw new Error("Event object missing 'type' property.");if(this._listeners[e.type])for(var t=this._listeners[e.type].concat(),n=0,o=t.length;n<o;n++)t[n].call(this,e)},removeListener:function(e,t){if(this._listeners[e])for(var n=this._listeners[e],o=0,i=n.length;o<i;o++)if(n[o]===t){n.splice(o,1);break}}}},{}],24:[function(e,t,n){"use strict";function o(e){this._input=e.replace(/(\r\n?|\n)/g,"\n"),this._line=1,this._col=1,this._cursor=0}t.exports=o,o.prototype={constructor:o,getCol:function(){return this._col},getLine:function(){return this._line},eof:function(){return this._cursor===this._input.length},peek:function(e){var t=null;return e=void 0===e?1:e,this._cursor<this._input.length&&(t=this._input.charAt(this._cursor+e-1)),t},read:function(){var e=null;return this._cursor<this._input.length&&("\n"===this._input.charAt(this._cursor)?(this._line++,this._col=1):this._col++,e=this._input.charAt(this._cursor++)),e},mark:function(){this._bookmark={cursor:this._cursor,line:this._line,col:this._col}},reset:function(){this._bookmark&&(this._cursor=this._bookmark.cursor,this._line=this._bookmark.line,this._col=this._bookmark.col,delete this._bookmark)},peekCount:function(e){return e=void 0===e?1:Math.max(e,0),this._input.substring(this._cursor,this._cursor+e)},readTo:function(e){for(var t,n="";n.length<e.length||n.lastIndexOf(e)!==n.length-e.length;){if(!(t=this.read()))throw new Error('Expected "'+e+'" at line '+this._line+", col "+this._col+".");n+=t}return n},readWhile:function(e){for(var t="",n=this.peek();null!==n&&e(n);)t+=this.read(),n=this.peek();return t},readMatch:function(e){var t=this._input.substring(this._cursor),n=null;return"string"==typeof e?t.slice(0,e.length)===e&&(n=this.readCount(e.length)):e instanceof RegExp&&e.test(t)&&(n=this.readCount(RegExp.lastMatch.length)),n},readCount:function(e){for(var t="";e--;)t+=this.read();return t}}},{}],25:[function(e,t,n){"use strict";function o(e,t,n){Error.call(this),this.name=this.constructor.name,this.col=n,this.line=t,this.message=e}t.exports=o,o.prototype=Object.create(Error.prototype),o.prototype.constructor=o},{}],26:[function(e,t,n){"use strict";function o(e,t,n,o){this.col=n,this.line=t,this.text=e,this.type=o}t.exports=o,o.fromToken=function(e){return new o(e.value,e.startLine,e.startCol)},o.prototype={constructor:o,valueOf:function(){return this.toString()},toString:function(){return this.text}}},{}],27:[function(e,t,n){"use strict";t.exports=s;var o=e("./StringReader"),i=e("./SyntaxError");function s(e,t){this._reader=new o(e?e.toString():""),this._token=null,this._tokenData=t,this._lt=[],this._ltIndex=0,this._ltIndexCache=[]}s.createTokenData=function(e){var t=[],n=Object.create(null),o=e.concat([]),i=0,s=o.length+1;for(o.UNKNOWN=-1,o.unshift({name:"EOF"});i<s;i++)t.push(o[i].name),o[o[i].name]=i,o[i].text&&(n[o[i].text]=i);return o.name=function(e){return t[e]},o.type=function(e){return n[e]},o},s.prototype={constructor:s,match:function(e,t){e instanceof Array||(e=[e]);for(var n=this.get(t),o=0,i=e.length;o<i;)if(n===e[o++])return!0;return this.unget(),!1},mustMatch:function(e){var t;if(e instanceof Array||(e=[e]),!this.match.apply(this,arguments))throw t=this.LT(1),new i("Expected "+this._tokenData[e[0]].name+" at line "+t.startLine+", col "+t.startCol+".",t.startLine,t.startCol)},advance:function(e,t){for(;0!==this.LA(0)&&!this.match(e,t);)this.get() |
| 84 |
;return this.LA(0)},get:function(e){var t,n,o=this._tokenData,i=0;if(this._lt.length&&this._ltIndex>=0&&this._ltIndex<this._lt.length){for(i++,this._token=this._lt[this._ltIndex++],n=o[this._token.type];void 0!==n.channel&&e!==n.channel&&this._ltIndex<this._lt.length;)this._token=this._lt[this._ltIndex++],n=o[this._token.type],i++;if((void 0===n.channel||e===n.channel)&&this._ltIndex<=this._lt.length)return this._ltIndexCache.push(i),this._token.type}return(t=this._getToken()).type>-1&&!o[t.type].hide&&(t.channel=o[t.type].channel,this._token=t,this._lt.push(t),this._ltIndexCache.push(this._lt.length-this._ltIndex+i),this._lt.length>5&&this._lt.shift(),this._ltIndexCache.length>5&&this._ltIndexCache.shift(),this._ltIndex=this._lt.length),(n=o[t.type])&&(n.hide||void 0!==n.channel&&e!==n.channel)?this.get(e):t.type},LA:function(e){var t,n=e;if(e>0){if(e>5)throw new Error("Too much lookahead.");for(;n;)t=this.get(),n--;for(;n<e;)this.unget(),n++}else if(e<0){if(!this._lt[this._ltIndex+e])throw new Error("Too much lookbehind.");t=this._lt[this._ltIndex+e].type}else t=this._token.type;return t},LT:function(e){return this.LA(e),this._lt[this._ltIndex+e-1]},peek:function(){return this.LA(1)},token:function(){return this._token},tokenName:function(e){return e<0||e>this._tokenData.length?"UNKNOWN_TOKEN":this._tokenData[e].name},tokenType:function(e){return this._tokenData[e]||-1},unget:function(){if(!this._ltIndexCache.length)throw new Error("Too much lookahead.");this._ltIndex-=this._ltIndexCache.pop(),this._token=this._lt[this._ltIndex-1]}}},{"./StringReader":24,"./SyntaxError":25}],28:[function(e,t,n){"use strict";t.exports={StringReader:e("./StringReader"),SyntaxError:e("./SyntaxError"),SyntaxUnit:e("./SyntaxUnit"),EventTarget:e("./EventTarget"),TokenStreamBase:e("./TokenStreamBase")}},{"./EventTarget":23,"./StringReader":24,"./SyntaxError":25,"./SyntaxUnit":26,"./TokenStreamBase":27}],parserlib:[function(e,t,n){"use strict";t.exports={css:e("./css"),util:e("./util")}},{"./css":22,"./util":28}]},{},[]),e("parserlib")}(),n=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,n,o;try{t=Map}catch(e){t=function(){}}try{n=Set}catch(e){n=function(){}}try{o=Promise}catch(e){o=function(){}}function i(s,r,l,c,d){"object"==typeof r&&(l=r.depth,c=r.prototype,d=r.includeNonEnumerable,r=r.circular);var u=[],p=[],h="undefined"!=typeof Buffer;return void 0===r&&(r=!0),void 0===l&&(l=1/0),function s(l,g){if(null===l)return null;if(0===g)return l;var m,b;if("object"!=typeof l)return l;if(e(l,t))m=new t;else if(e(l,n))m=new n;else if(e(l,o))m=new o((function(e,t){l.then((function(t){e(s(t,g-1))}),(function(e){t(s(e,g-1))}))}));else if(i.__isArray(l))m=[];else if(i.__isRegExp(l))m=new RegExp(l.source,a(l)),l.lastIndex&&(m.lastIndex=l.lastIndex);else if(i.__isDate(l))m=new Date(l.getTime());else{if(h&&Buffer.isBuffer(l))return m=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(m),m;e(l,Error)?m=Object.create(l):void 0===c?(b=Object.getPrototypeOf(l),m=Object.create(b)):(m=Object.create(c),b=c)}if(r){var f=u.indexOf(l);if(-1!=f)return p[f];u.push(l),p.push(m)}for(var x in e(l,t)&&l.forEach((function(e,t){var n=s(t,g-1),o=s(e,g-1);m.set(n,o)})),e(l,n)&&l.forEach((function(e){var t=s(e,g-1);m.add(t)})),l){var y;b&&(y=Object.getOwnPropertyDescriptor(b,x)),y&&null==y.set||(m[x]=s(l[x],g-1))}if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(l);for(x=0;x<v.length;x++){var k=v[x];(!(_=Object.getOwnPropertyDescriptor(l,k))||_.enumerable||d)&&(m[k]=s(l[k],g-1),_.enumerable||Object.defineProperty(m,k,{enumerable:!1}))}}if(d){var w=Object.getOwnPropertyNames(l);for(x=0;x<w.length;x++){var _,C=w[x];(_=Object.getOwnPropertyDescriptor(l,C))&&_.enumerable||(m[C]=s(l[C],g-1),Object.defineProperty(m,C,{enumerable:!1}))}}return m}(s,l)}function s(e){return Object.prototype.toString.call(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return i.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},i.__objToStr=s,i.__isDate=function(e){return"object"==typeof e&&"[object Date]"===s(e)},i.__isArray=function(e){return"object"==typeof e&&"[object Array]"===s(e)},i.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===s(e)},i.__getRegExpFlags=a,i}();"object"==typeof e&&e.exports&&(e.exports=n);var o=function(){"use strict";var e=[],s=[],a=/\/\*\s*csslint([^\*]*)\*\//,r=new t.util.EventTarget;return r.version="1.0.5",r.addRule=function(t){e.push(t),e[t.id]=t},r.clearRules=function(){e=[]},r.getRules=function(){return[].concat(e).sort((function(e,t){return e.id>t.id?1:0}))},r.getRuleset=function(){for(var t={},n=0,o=e.length;n<o;)t[e[n++].id]=1;return t},r.addFormatter=function(e){s[e.id]=e},r.getFormatter=function(e){return s[e]},r.format=function(e,t,n,o){var i=r.getFormatter(n),s=null;return i&&(s=i.startFormat(),s+=i.formatResults(e,t,o||{}),s+=i.endFormat()),s},r.hasFormat=function(e){return s.hasOwnProperty(e)},r.verify=function(s,l){var c,d,u,p=0,h={},g=[],m=new t.css.Parser({starHack:!0,ieFilters:!0,underscoreHack:!0,strict:!1});d=s.replace(/\n\r?/g,"$split$").split("$split$"),o.Util.forEach(d,(function(e,t){var n=e&&e.match(/\/\*[ \t]*csslint[ \t]+allow:[ \t]*([^\*]*)\*\//i),o=n&&n[1],i={};o&&(o.toLowerCase().split(",").forEach((function(e){i[e.trim()]=!0})),Object.keys(i).length>0&&(h[t+1]=i))}));var b=null,f=null;for(p in o.Util.forEach(d,(function(e,t){null===b&&e.match(/\/\*[ \t]*csslint[ \t]+ignore:start[ \t]*\*\//i)&&(b=t),e.match(/\/\*[ \t]*csslint[ \t]+ignore:end[ \t]*\*\//i)&&(f=t),null!==b&&null!==f&&(g.push([b,f]),b=f=null)})),null!==b&&g.push([b,d.length]),l||(l=r.getRuleset()),a.test(s)&&(l=function(e,t){var n,o=e&&e.match(a),i=o&&o[1];return i&&(n={true:2,"":1,false:0,2:2,1:1,0:0},i.toLowerCase().split(",").forEach((function(e){var o=e.split(":"),i=o[0]||"",s=o[1]||"";t[i.trim()]=n[s.trim()]}))),t}(s,l=n(l))),c=new i(d,l,h,g),l.errors=2,l)l.hasOwnProperty(p)&&l[p]&&e[p]&&e[p].init(m,c);try{m.parse(s)}catch(e){c.error("Fatal error, cannot continue: "+e.message,e.line,e.col,{})}return(u={messages:c.messages,stats:c.stats,ruleset:c.ruleset,allow:c.allow,ignore:c.ignore}).messages.sort((function(e,t){return e.rollup&&!t.rollup?1:!e.rollup&&t.rollup?-1:e.line-t.line})),u},r}();function i(e,t,n,o){"use strict";this.messages=[],this.stats=[],this.lines=e,this.ruleset=t,this.allow=n,this.allow||(this.allow={}),this.ignore=o,this.ignore||(this.ignore=[])}return i.prototype={constructor:i,error:function(e,t,n,o){"use strict";this.messages.push({type:"error",line:t,col:n,message:e,evidence:this.lines[t-1],rule:o||{}})},warn:function(e,t,n,o){"use strict";this.report(e,t,n,o)},report:function(e,t,n,o){"use strict";this.allow.hasOwnProperty(t)&&this.allow[t].hasOwnProperty(o.id)||this.isIgnored(t)||this.messages.push({type:2===this.ruleset[o.id]?"error":"warning",line:t,col:n,message:e,evidence:this.lines[t-1],rule:o})},info:function(e,t,n,o){"use strict";this.messages.push({type:"info",line:t,col:n,message:e,evidence:this.lines[t-1],rule:o})},rollupError:function(e,t){"use strict";this.messages.push({type:"error",rollup:!0,message:e,rule:t})},rollupWarn:function(e,t){"use strict";this.messages.push({type:"warning",rollup:!0,message:e,rule:t})},stat:function(e,t){"use strict";this.stats[e]=t},isIgnored:function(e){"use strict";var t=!1;return o.Util.forEach(this.ignore,(function(n){n[0]<=e&&e<=n[1]&&(t=!0)})),t}},o._Reporter=i,o.Util={mix:function(e,t){"use strict";var n;for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return n},indexOf:function(e,t){"use strict";if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},forEach:function(e,t){"use strict";if(e.forEach)return e.forEach(t);for(var n=0,o=e.length;n<o;n++)t(e[n],n,e)}},o.addRule({id:"box-model",name:"Beware of broken box size",desc:"Don't use width or height when using padding or border.", |
| 85 |
url:"https://github.com/CSSLint/csslint/wiki/Beware-of-box-model-size",browsers:"All",init:function(e,t){"use strict";var n,o=this,i={border:1,"border-left":1,"border-right":1,padding:1,"padding-left":1,"padding-right":1},s={border:1,"border-bottom":1,"border-top":1,padding:1,"padding-bottom":1,"padding-top":1},a=!1;function r(){n={},a=!1}function l(){var e,r;if(!a){if(n.height)for(e in s)s.hasOwnProperty(e)&&n[e]&&(r=n[e].value,"padding"===e&&2===r.parts.length&&0===r.parts[0].value||t.report("Using height with "+e+" can sometimes make elements larger than you expect.",n[e].line,n[e].col,o));if(n.width)for(e in i)i.hasOwnProperty(e)&&n[e]&&(r=n[e].value,"padding"===e&&2===r.parts.length&&0===r.parts[1].value||t.report("Using width with "+e+" can sometimes make elements larger than you expect.",n[e].line,n[e].col,o))}}e.addListener("startrule",r),e.addListener("startfontface",r),e.addListener("startpage",r),e.addListener("startpagemargin",r),e.addListener("startkeyframerule",r),e.addListener("startviewport",r),e.addListener("property",(function(e){var t=e.property.text.toLowerCase();s[t]||i[t]?/^0\S*$/.test(e.value)||"border"===t&&"none"===e.value.toString()||(n[t]={line:e.property.line,col:e.property.col,value:e.value}):/^(width|height)/i.test(t)&&/^(length|percentage)/.test(e.value.parts[0].type)?n[t]=1:"box-sizing"===t&&(a=!0)})),e.addListener("endrule",l),e.addListener("endfontface",l),e.addListener("endpage",l),e.addListener("endpagemargin",l),e.addListener("endkeyframerule",l),e.addListener("endviewport",l)}}),o.addRule({id:"bulletproof-font-face",name:"Use the bulletproof @font-face syntax",desc:"Use the bulletproof @font-face syntax to avoid 404's in old IE (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax).",url:"https://github.com/CSSLint/csslint/wiki/Bulletproof-font-face",browsers:"All",init:function(e,t){"use strict";var n,o,i=this,s=!1,a=!0,r=!1;e.addListener("startfontface",(function(){s=!0})),e.addListener("property",(function(e){if(s){var t=e.property.toString().toLowerCase(),i=e.value.toString();if(n=e.line,o=e.col,"src"===t){var l=/^\s?url\(['"].+\.eot\?.*['"]\)\s*format\(['"]embedded-opentype['"]\).*$/i;!i.match(l)&&a?(r=!0,a=!1):i.match(l)&&!a&&(r=!1)}}})),e.addListener("endfontface",(function(){s=!1,r&&t.report("@font-face declaration doesn't follow the fontspring bulletproof syntax.",n,o,i)}))}}),o.addRule({id:"compatible-vendor-prefixes",name:"Require compatible vendor prefixes",desc:"Include all compatible vendor prefixes to reach a wider range of users.",url:"https://github.com/CSSLint/csslint/wiki/Require-compatible-vendor-prefixes",browsers:"All",init:function(e,t){"use strict";var n,i,s,a,r,l,c,d=this,u=!1,p=Array.prototype.push,h=[];for(s in n={animation:"webkit","animation-delay":"webkit","animation-direction":"webkit","animation-duration":"webkit","animation-fill-mode":"webkit","animation-iteration-count":"webkit","animation-name":"webkit","animation-play-state":"webkit","animation-timing-function":"webkit",appearance:"webkit moz","border-end":"webkit moz","border-end-color":"webkit moz","border-end-style":"webkit moz","border-end-width":"webkit moz","border-image":"webkit moz o","border-radius":"webkit","border-start":"webkit moz","border-start-color":"webkit moz","border-start-style":"webkit moz","border-start-width":"webkit moz","box-align":"webkit moz","box-direction":"webkit moz","box-flex":"webkit moz","box-lines":"webkit","box-ordinal-group":"webkit moz","box-orient":"webkit moz","box-pack":"webkit moz","box-sizing":"","box-shadow":"","column-count":"webkit moz ms","column-gap":"webkit moz ms","column-rule":"webkit moz ms","column-rule-color":"webkit moz ms","column-rule-style":"webkit moz ms","column-rule-width":"webkit moz ms","column-width":"webkit moz ms",flex:"webkit ms","flex-basis":"webkit","flex-direction":"webkit ms","flex-flow":"webkit","flex-grow":"webkit","flex-shrink":"webkit",hyphens:"epub moz","line-break":"webkit ms","margin-end":"webkit moz","margin-start":"webkit moz","marquee-speed":"webkit wap","marquee-style":"webkit wap","padding-end":"webkit moz","padding-start":"webkit moz","tab-size":"moz o","text-size-adjust":"webkit ms",transform:"webkit ms","transform-origin":"webkit ms",transition:"","transition-delay":"","transition-duration":"","transition-property":"","transition-timing-function":"","user-modify":"webkit moz","user-select":"webkit moz ms","word-break":"epub ms","writing-mode":"epub ms"})if(n.hasOwnProperty(s)){for(a=[],l=0,c=(r=n[s].split(" ")).length;l<c;l++)a.push("-"+r[l]+"-"+s);n[s]=a,p.apply(h,a)}e.addListener("startrule",(function(){i=[]})),e.addListener("startkeyframes",(function(e){u=e.prefix||!0})),e.addListener("endkeyframes",(function(){u=!1})),e.addListener("property",(function(e){var t=e.property;o.Util.indexOf(h,t.text)>-1&&(u&&"string"==typeof u&&0===t.text.indexOf("-"+u+"-")||i.push(t))})),e.addListener("endrule",(function(){if(i.length){var e,s,a,r,l,c,u,p,h,g,m={};for(e=0,s=i.length;e<s;e++)for(r in a=i[e],n)n.hasOwnProperty(r)&&(l=n[r],o.Util.indexOf(l,a.text)>-1&&(m[r]||(m[r]={full:l.slice(0),actual:[],actualNodes:[]}),-1===o.Util.indexOf(m[r].actual,a.text)&&(m[r].actual.push(a.text),m[r].actualNodes.push(a))));for(r in m)if(m.hasOwnProperty(r)&&(u=(c=m[r]).full,p=c.actual,u.length>p.length))for(e=0,s=u.length;e<s;e++)h=u[e],-1===o.Util.indexOf(p,h)&&(g=1===p.length?p[0]:2===p.length?p.join(" and "):p.join(", "),t.report("The property "+h+" is compatible with "+g+" and should be included as well.",c.actualNodes[0].line,c.actualNodes[0].col,d))}}))}}),o.addRule({id:"display-property-grouping",name:"Require properties appropriate for display",desc:"Certain properties shouldn't be used with certain display property values.",url:"https://github.com/CSSLint/csslint/wiki/Require-properties-appropriate-for-display",browsers:"All",init:function(e,t){"use strict";var n,o=this,i={display:1,float:"none",height:1,width:1,margin:1,"margin-left":1,"margin-right":1,"margin-bottom":1,"margin-top":1,padding:1,"padding-left":1,"padding-right":1,"padding-bottom":1,"padding-top":1,"vertical-align":1};function s(e,s,a){n[e]&&("string"==typeof i[e]&&n[e].value.toLowerCase()===i[e]||t.report(a||e+" can't be used with display: "+s+".",n[e].line,n[e].col,o))}function a(){n={}}function r(){var e=n.display?n.display.value:null;if(e)switch(e){case"inline":s("height",e),s("width",e),s("margin",e),s("margin-top",e),s("margin-bottom",e),s("float",e,"display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");break;case"block":s("vertical-align",e);break;case"inline-block":s("float",e);break;default:0===e.indexOf("table-")&&(s("margin",e),s("margin-left",e),s("margin-right",e),s("margin-top",e),s("margin-bottom",e),s("float",e))}}e.addListener("startrule",a),e.addListener("startfontface",a),e.addListener("startkeyframerule",a),e.addListener("startpagemargin",a),e.addListener("startpage",a),e.addListener("startviewport",a),e.addListener("property",(function(e){var t=e.property.text.toLowerCase();i[t]&&(n[t]={value:e.value.text,line:e.property.line,col:e.property.col})})),e.addListener("endrule",r),e.addListener("endfontface",r),e.addListener("endkeyframerule",r),e.addListener("endpagemargin",r),e.addListener("endpage",r),e.addListener("endviewport",r)}}),o.addRule({id:"duplicate-background-images",name:"Disallow duplicate background images",desc:"Every background-image should be unique. Use a common class for e.g. sprites.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-duplicate-background-images",browsers:"All",init:function(e,t){"use strict";var n=this,o={};e.addListener("property",(function(e){var i,s,a=e.property.text,r=e.value;if(a.match(/background/i))for(i=0, |
| 86 |
s=r.parts.length;i<s;i++)"uri"===r.parts[i].type&&(void 0===o[r.parts[i].uri]?o[r.parts[i].uri]=e:t.report("Background image '"+r.parts[i].uri+"' was used multiple times, first declared at line "+o[r.parts[i].uri].line+", col "+o[r.parts[i].uri].col+".",e.line,e.col,n))}))}}),o.addRule({id:"duplicate-properties",name:"Disallow duplicate properties",desc:"Duplicate properties must appear one after the other.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-duplicate-properties",browsers:"All",init:function(e,t){"use strict";var n,o,i=this;function s(){n={}}e.addListener("startrule",s),e.addListener("startfontface",s),e.addListener("startpage",s),e.addListener("startpagemargin",s),e.addListener("startkeyframerule",s),e.addListener("startviewport",s),e.addListener("property",(function(e){var s=e.property.text.toLowerCase();!n[s]||o===s&&n[s]!==e.value.text||t.report("Duplicate property '"+e.property+"' found.",e.line,e.col,i),n[s]=e.value.text,o=s}))}}),o.addRule({id:"empty-rules",name:"Disallow empty rules",desc:"Rules without any properties specified should be removed.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-empty-rules",browsers:"All",init:function(e,t){"use strict";var n=this,o=0;e.addListener("startrule",(function(){o=0})),e.addListener("property",(function(){o++})),e.addListener("endrule",(function(e){var i=e.selectors;0===o&&t.report("Rule is empty.",i[0].line,i[0].col,n)}))}}),o.addRule({id:"errors",name:"Parsing Errors",desc:"This rule looks for recoverable syntax errors.",browsers:"All",init:function(e,t){"use strict";var n=this;e.addListener("error",(function(e){t.error(e.message,e.line,e.col,n)}))}}),o.addRule({id:"floats",name:"Disallow too many floats",desc:"This rule tests if the float property is used too many times",url:"https://github.com/CSSLint/csslint/wiki/Disallow-too-many-floats",browsers:"All",init:function(e,t){"use strict";var n=this,o=0;e.addListener("property",(function(e){t.isIgnored(e.property.line)||"float"===e.property.text.toLowerCase()&&"none"!==e.value.text.toLowerCase()&&o++})),e.addListener("endstylesheet",(function(){t.stat("floats",o),o>=10&&t.rollupWarn("Too many floats ("+o+"), you're probably using them for layout. Consider using a grid system instead.",n)}))}}),o.addRule({id:"font-faces",name:"Don't use too many web fonts",desc:"Too many different web fonts in the same stylesheet.",url:"https://github.com/CSSLint/csslint/wiki/Don%27t-use-too-many-web-fonts",browsers:"All",init:function(e,t){"use strict";var n=this,o=0;e.addListener("startfontface",(function(e){t.isIgnored(e.line)||o++})),e.addListener("endstylesheet",(function(){o>5&&t.rollupWarn("Too many @font-face declarations ("+o+").",n)}))}}),o.addRule({id:"font-sizes",name:"Disallow too many font sizes",desc:"Checks the number of font-size declarations.",url:"https://github.com/CSSLint/csslint/wiki/Don%27t-use-too-many-font-size-declarations",browsers:"All",init:function(e,t){"use strict";var n=this,o=0;e.addListener("property",(function(e){t.isIgnored(e.property.line)||"font-size"===e.property.toString()&&o++})),e.addListener("endstylesheet",(function(){t.stat("font-sizes",o),o>=10&&t.rollupWarn("Too many font-size declarations ("+o+"), abstraction needed.",n)}))}}),o.addRule({id:"gradients",name:"Require all gradient definitions",desc:"When using a vendor-prefixed gradient, make sure to use them all.",url:"https://github.com/CSSLint/csslint/wiki/Require-all-gradient-definitions",browsers:"All",init:function(e,t){"use strict";var n,o=this;e.addListener("startrule",(function(){n={moz:0,webkit:0,oldWebkit:0,o:0}})),e.addListener("property",(function(e){/\-(moz|o|webkit)(?:\-(?:linear|radial))\-gradient/i.test(e.value)?n[RegExp.$1]=1:/\-webkit\-gradient/i.test(e.value)&&(n.oldWebkit=1)})),e.addListener("endrule",(function(e){var i=[];n.moz||i.push("Firefox 3.6+"),n.webkit||i.push("Webkit (Safari 5+, Chrome)"),n.oldWebkit||i.push("Old Webkit (Safari 4+, Chrome)"),n.o||i.push("Opera 11.1+"),i.length&&i.length<4&&t.report("Missing vendor-prefixed CSS gradients for "+i.join(", ")+".",e.selectors[0].line,e.selectors[0].col,o)}))}}),o.addRule({id:"ids",name:"Disallow IDs in selectors",desc:"Selectors should not contain IDs.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-IDs-in-selectors",browsers:"All",init:function(e,t){"use strict";var n=this;e.addListener("startrule",(function(o){var i,s,a,r,l,c,d=o.selectors;for(r=0;r<d.length;r++){for(i=d[r],a=0,l=0;l<i.parts.length;l++)if((s=i.parts[l]).type===e.SELECTOR_PART_TYPE)for(c=0;c<s.modifiers.length;c++)"id"===s.modifiers[c].type&&a++;1===a?t.report("Don't use IDs in selectors.",i.line,i.col,n):a>1&&t.report(a+" IDs in the selector, really?",i.line,i.col,n)}}))}}),o.addRule({id:"import-ie-limit",name:"@import limit on IE6-IE9",desc:"IE6-9 supports up to 31 @import per stylesheet",browsers:"IE6, IE7, IE8, IE9",init:function(e,t){"use strict";var n=this,o=0;e.addListener("startpage",(function(){o=0})),e.addListener("import",(function(){o++})),e.addListener("endstylesheet",(function(){o>31&&t.rollupError("Too many @import rules ("+o+"). IE6-9 supports up to 31 import per stylesheet.",n)}))}}),o.addRule({id:"import",name:"Disallow @import",desc:"Don't use @import, use <link> instead.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-%40import",browsers:"All",init:function(e,t){"use strict";var n=this;e.addListener("import",(function(e){t.report("@import prevents parallel downloads, use <link> instead.",e.line,e.col,n)}))}}),o.addRule({id:"important",name:"Disallow !important",desc:"Be careful when using !important declaration",url:"https://github.com/CSSLint/csslint/wiki/Disallow-%21important",browsers:"All",init:function(e,t){"use strict";var n=this,o=0;e.addListener("property",(function(e){t.isIgnored(e.line)||!0===e.important&&(o++,t.report("Use of !important",e.line,e.col,n))})),e.addListener("endstylesheet",(function(){t.stat("important",o),o>=10&&t.rollupWarn("Too many !important declarations ("+o+"), try to use less than 10 to avoid specificity issues.",n)}))}}),o.addRule({id:"known-properties",name:"Require use of known properties",desc:"Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.",url:"https://github.com/CSSLint/csslint/wiki/Require-use-of-known-properties",browsers:"All",init:function(e,t){"use strict";var n=this;e.addListener("property",(function(e){e.invalid&&t.report(e.invalid.message,e.line,e.col,n)}))}}),o.addRule({id:"order-alphabetical",name:"Alphabetical order",desc:"Assure properties are in alphabetical order",browsers:"All",init:function(e,t){"use strict";var n,o=this,i=function(){n=[]},s=function(e){n.join(",")!==n.sort().join(",")&&t.report("Rule doesn't have all its properties in alphabetical order.",e.line,e.col,o)};e.addListener("startrule",i),e.addListener("startfontface",i),e.addListener("startpage",i),e.addListener("startpagemargin",i),e.addListener("startkeyframerule",i),e.addListener("startviewport",i),e.addListener("property",(function(e){var t=e.property.text.toLowerCase().replace(/^-.*?-/,"");n.push(t)})),e.addListener("endrule",s),e.addListener("endfontface",s),e.addListener("endpage",s),e.addListener("endpagemargin",s),e.addListener("endkeyframerule",s),e.addListener("endviewport",s)}}),o.addRule({id:"outline-none",name:"Disallow outline: none",desc:"Use of outline: none or outline: 0 should be limited to :focus rules.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-outline%3Anone",browsers:"All",tags:["Accessibility"],init:function(e,t){"use strict";var n,o=this;function i(e){n=e.selectors?{line:e.line,col:e.col,selectors:e.selectors,propCount:0,outline:!1}:null}function s(){n&&n.outline&&(-1===n.selectors.toString().toLowerCase().indexOf(":focus")?t.report("Outlines should only be modified using :focus.",n.line,n.col,o):1===n.propCount&&t.report("Outlines shouldn't be hidden unless other visual changes are made.",n.line,n.col,o))}e.addListener("startrule",i),e.addListener("startfontface",i), |
| 87 |
e.addListener("startpage",i),e.addListener("startpagemargin",i),e.addListener("startkeyframerule",i),e.addListener("startviewport",i),e.addListener("property",(function(e){var t=e.property.text.toLowerCase(),o=e.value;n&&(n.propCount++,"outline"!==t||"none"!==o.toString()&&"0"!==o.toString()||(n.outline=!0))})),e.addListener("endrule",s),e.addListener("endfontface",s),e.addListener("endpage",s),e.addListener("endpagemargin",s),e.addListener("endkeyframerule",s),e.addListener("endviewport",s)}}),o.addRule({id:"overqualified-elements",name:"Disallow overqualified elements",desc:"Don't use classes or IDs with elements (a.foo or a#foo).",url:"https://github.com/CSSLint/csslint/wiki/Disallow-overqualified-elements",browsers:"All",init:function(e,t){"use strict";var n=this,o={};e.addListener("startrule",(function(i){var s,a,r,l,c,d,u=i.selectors;for(l=0;l<u.length;l++)for(s=u[l],c=0;c<s.parts.length;c++)if((a=s.parts[c]).type===e.SELECTOR_PART_TYPE)for(d=0;d<a.modifiers.length;d++)r=a.modifiers[d],a.elementName&&"id"===r.type?t.report("Element ("+a+") is overqualified, just use "+r+" without element name.",a.line,a.col,n):"class"===r.type&&(o[r]||(o[r]=[]),o[r].push({modifier:r,part:a}))})),e.addListener("endstylesheet",(function(){var e;for(e in o)o.hasOwnProperty(e)&&1===o[e].length&&o[e][0].part.elementName&&t.report("Element ("+o[e][0].part+") is overqualified, just use "+o[e][0].modifier+" without element name.",o[e][0].part.line,o[e][0].part.col,n)}))}}),o.addRule({id:"regex-selectors",name:"Disallow selectors that look like regexs",desc:"Selectors that look like regular expressions are slow and should be avoided.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-selectors-that-look-like-regular-expressions",browsers:"All",init:function(e,t){"use strict";var n=this;e.addListener("startrule",(function(o){var i,s,a,r,l,c,d=o.selectors;for(r=0;r<d.length;r++)for(i=d[r],l=0;l<i.parts.length;l++)if((s=i.parts[l]).type===e.SELECTOR_PART_TYPE)for(c=0;c<s.modifiers.length;c++)"attribute"===(a=s.modifiers[c]).type&&/([~\|\^\$\*]=)/.test(a)&&t.report("Attribute selectors with "+RegExp.$1+" are slow!",a.line,a.col,n)}))}}),o.addRule({id:"rules-count",name:"Rules Count",desc:"Track how many rules there are.",browsers:"All",init:function(e,t){"use strict";var n=0;e.addListener("startrule",(function(){n++})),e.addListener("endstylesheet",(function(){t.stat("rule-count",n)}))}}),o.addRule({id:"selector-max-approaching",name:"Warn when approaching the 4095 selector limit for IE",desc:"Will warn when selector count is >= 3800 selectors.",browsers:"IE",init:function(e,t){"use strict";var n=this,o=0;e.addListener("startrule",(function(e){o+=e.selectors.length})),e.addListener("endstylesheet",(function(){o>=3800&&t.report("You have "+o+" selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,n)}))}}),o.addRule({id:"selector-max",name:"Error when past the 4095 selector limit for IE",desc:"Will error when selector count is > 4095.",browsers:"IE",init:function(e,t){"use strict";var n=this,o=0;e.addListener("startrule",(function(e){o+=e.selectors.length})),e.addListener("endstylesheet",(function(){o>4095&&t.report("You have "+o+" selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,n)}))}}),o.addRule({id:"selector-newline",name:"Disallow new-line characters in selectors",desc:"New-line characters in selectors are usually a forgotten comma and not a descendant combinator.",browsers:"All",init:function(e,t){"use strict";var n=this;e.addListener("startrule",(function(e){var o,i,s,a,r,l,c,d,u,p,h,g=e.selectors;for(o=0,i=g.length;o<i;o++)for(a=0,l=(s=g[o]).parts.length;a<l;a++)for(r=a+1;r<l;r++)c=s.parts[a],d=s.parts[r],u=c.type,p=c.line,h=d.line,"descendant"===u&&h>p&&t.report("newline character found in selector (forgot a comma?)",p,g[o].parts[0].col,n)}))}}),o.addRule({id:"shorthand",name:"Require shorthand properties",desc:"Use shorthand properties where possible.",url:"https://github.com/CSSLint/csslint/wiki/Require-shorthand-properties",browsers:"All",init:function(e,t){"use strict";var n,o,i,s,a=this,r={},l={margin:["margin-top","margin-bottom","margin-left","margin-right"],padding:["padding-top","padding-bottom","padding-left","padding-right"]};for(n in l)if(l.hasOwnProperty(n))for(o=0,i=l[n].length;o<i;o++)r[l[n][o]]=n;function c(){s={}}function d(e){var n,o,i,r;for(n in l)if(l.hasOwnProperty(n)){for(r=0,o=0,i=l[n].length;o<i;o++)r+=s[l[n][o]]?1:0;r===l[n].length&&t.report("The properties "+l[n].join(", ")+" can be replaced by "+n+".",e.line,e.col,a)}}e.addListener("startrule",c),e.addListener("startfontface",c),e.addListener("property",(function(e){var t=e.property.toString().toLowerCase();r[t]&&(s[t]=1)})),e.addListener("endrule",d),e.addListener("endfontface",d)}}),o.addRule({id:"star-property-hack",name:"Disallow properties with a star prefix",desc:"Checks for the star property hack (targets IE6/7)",url:"https://github.com/CSSLint/csslint/wiki/Disallow-star-hack",browsers:"All",init:function(e,t){"use strict";var n=this;e.addListener("property",(function(e){"*"===e.property.hack&&t.report("Property with star prefix found.",e.property.line,e.property.col,n)}))}}),o.addRule({id:"text-indent",name:"Disallow negative text-indent",desc:"Checks for text indent less than -99px",url:"https://github.com/CSSLint/csslint/wiki/Disallow-negative-text-indent",browsers:"All",init:function(e,t){"use strict";var n,o,i=this;function s(){n=!1,o="inherit"}function a(){n&&"ltr"!==o&&t.report("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.",n.line,n.col,i)}e.addListener("startrule",s),e.addListener("startfontface",s),e.addListener("property",(function(e){var t=e.property.toString().toLowerCase(),i=e.value;"text-indent"===t&&i.parts[0].value<-99?n=e.property:"direction"===t&&"ltr"===i.toString()&&(o="ltr")})),e.addListener("endrule",a),e.addListener("endfontface",a)}}),o.addRule({id:"underscore-property-hack",name:"Disallow properties with an underscore prefix",desc:"Checks for the underscore property hack (targets IE6)",url:"https://github.com/CSSLint/csslint/wiki/Disallow-underscore-hack",browsers:"All",init:function(e,t){"use strict";var n=this;e.addListener("property",(function(e){"_"===e.property.hack&&t.report("Property with underscore prefix found.",e.property.line,e.property.col,n)}))}}),o.addRule({id:"universal-selector",name:"Disallow universal selector",desc:"The universal selector (*) is known to be slow.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-universal-selector",browsers:"All",init:function(e,t){"use strict";var n=this;e.addListener("startrule",(function(e){var o,i,s,a=e.selectors;for(s=0;s<a.length;s++)"*"===(i=(o=a[s]).parts[o.parts.length-1]).elementName&&t.report(n.desc,i.line,i.col,n)}))}}),o.addRule({id:"unqualified-attributes",name:"Disallow unqualified attribute selectors",desc:"Unqualified attribute selectors are known to be slow.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-unqualified-attribute-selectors",browsers:"All",init:function(e,t){"use strict";var n=this;e.addListener("startrule",(function(o){var i,s,a,r,l,c=o.selectors,d=!1;for(r=0;r<c.length;r++)if((s=(i=c[r]).parts[i.parts.length-1]).type===e.SELECTOR_PART_TYPE){for(l=0;l<s.modifiers.length;l++)if("class"===(a=s.modifiers[l]).type||"id"===a.type){d=!0;break}if(!d)for(l=0;l<s.modifiers.length;l++)"attribute"!==(a=s.modifiers[l]).type||s.elementName&&"*"!==s.elementName||t.report(n.desc,s.line,s.col,n)}}))}}),o.addRule({id:"vendor-prefix",name:"Require standard property with vendor prefix",desc:"When using a vendor-prefixed property, make sure to include the standard one.",url:"https://github.com/CSSLint/csslint/wiki/Require-standard-property-with-vendor-prefix",browsers:"All",init:function(e,t){"use strict";var n,o,i=this,s={"-webkit-border-radius":"border-radius", |
| 88 |
"-webkit-border-top-left-radius":"border-top-left-radius","-webkit-border-top-right-radius":"border-top-right-radius","-webkit-border-bottom-left-radius":"border-bottom-left-radius","-webkit-border-bottom-right-radius":"border-bottom-right-radius","-o-border-radius":"border-radius","-o-border-top-left-radius":"border-top-left-radius","-o-border-top-right-radius":"border-top-right-radius","-o-border-bottom-left-radius":"border-bottom-left-radius","-o-border-bottom-right-radius":"border-bottom-right-radius","-moz-border-radius":"border-radius","-moz-border-radius-topleft":"border-top-left-radius","-moz-border-radius-topright":"border-top-right-radius","-moz-border-radius-bottomleft":"border-bottom-left-radius","-moz-border-radius-bottomright":"border-bottom-right-radius","-moz-column-count":"column-count","-webkit-column-count":"column-count","-moz-column-gap":"column-gap","-webkit-column-gap":"column-gap","-moz-column-rule":"column-rule","-webkit-column-rule":"column-rule","-moz-column-rule-style":"column-rule-style","-webkit-column-rule-style":"column-rule-style","-moz-column-rule-color":"column-rule-color","-webkit-column-rule-color":"column-rule-color","-moz-column-rule-width":"column-rule-width","-webkit-column-rule-width":"column-rule-width","-moz-column-width":"column-width","-webkit-column-width":"column-width","-webkit-column-span":"column-span","-webkit-columns":"columns","-moz-box-shadow":"box-shadow","-webkit-box-shadow":"box-shadow","-moz-transform":"transform","-webkit-transform":"transform","-o-transform":"transform","-ms-transform":"transform","-moz-transform-origin":"transform-origin","-webkit-transform-origin":"transform-origin","-o-transform-origin":"transform-origin","-ms-transform-origin":"transform-origin","-moz-box-sizing":"box-sizing","-webkit-box-sizing":"box-sizing"};function a(){n={},o=1}function r(){var e,o,a,r,l,c=[];for(e in n)s[e]&&c.push({actual:e,needed:s[e]});for(o=0,a=c.length;o<a;o++)r=c[o].needed,l=c[o].actual,n[r]?n[r][0].pos<n[l][0].pos&&t.report("Standard property '"+r+"' should come after vendor-prefixed property '"+l+"'.",n[l][0].name.line,n[l][0].name.col,i):t.report("Missing standard property '"+r+"' to go along with '"+l+"'.",n[l][0].name.line,n[l][0].name.col,i)}e.addListener("startrule",a),e.addListener("startfontface",a),e.addListener("startpage",a),e.addListener("startpagemargin",a),e.addListener("startkeyframerule",a),e.addListener("startviewport",a),e.addListener("property",(function(e){var t=e.property.text.toLowerCase();n[t]||(n[t]=[]),n[t].push({name:e.property,value:e.value,pos:o++})})),e.addListener("endrule",r),e.addListener("endfontface",r),e.addListener("endpage",r),e.addListener("endpagemargin",r),e.addListener("endkeyframerule",r),e.addListener("endviewport",r)}}),o.addRule({id:"zero-units",name:"Disallow units for 0 values",desc:"You don't need to specify units when a value is 0.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-units-for-zero-values",browsers:"All",init:function(e,t){"use strict";var n=this;e.addListener("property",(function(e){for(var o=e.value.parts,i=0,s=o.length;i<s;)!o[i].units&&"percentage"!==o[i].type||0!==o[i].value||"time"===o[i].type||t.report("Values of 0 shouldn't have units specified.",o[i].line,o[i].col,n),i++}))}}),function(){"use strict";var e=function(e){return e&&e.constructor===String?e.replace(/["&><]/g,(function(e){switch(e){case'"':return""";case"&":return"&";case"<":return"<";case">":return">"}})):""};o.addFormatter({id:"checkstyle-xml",name:"Checkstyle XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><checkstyle>'},endFormat:function(){return"</checkstyle>"},readError:function(t,n){return'<file name="'+e(t)+'"><error line="0" column="0" severty="error" message="'+e(n)+'"></error></file>'},formatResults:function(t,n){var i=t.messages,s=[];return i.length>0&&(s.push('<file name="'+n+'">'),o.Util.forEach(i,(function(t){var n;t.rollup||s.push('<error line="'+t.line+'" column="'+t.col+'" severity="'+t.type+'" message="'+e(t.message)+'" source="'+((n=t.rule)&&"name"in n?"net.csslint."+n.name.replace(/\s/g,""):"")+'"/>')})),s.push("</file>")),s.join("")}})}(),o.addFormatter({id:"compact",name:"Compact, 'porcelain' format",startFormat:function(){"use strict";return""},endFormat:function(){"use strict";return""},formatResults:function(e,t,n){"use strict";var i=e.messages,s="";n=n||{};var a=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};return 0===i.length?n.quiet?"":t+": Lint Free!":(o.Util.forEach(i,(function(e){e.rollup?s+=t+": "+a(e.type)+" - "+e.message+" ("+e.rule.id+")\n":s+=t+": line "+e.line+", col "+e.col+", "+a(e.type)+" - "+e.message+" ("+e.rule.id+")\n"})),s)}}),o.addFormatter({id:"csslint-xml",name:"CSSLint XML format",startFormat:function(){"use strict";return'<?xml version="1.0" encoding="utf-8"?><csslint>'},endFormat:function(){"use strict";return"</csslint>"},formatResults:function(e,t){"use strict";var n=e.messages,i=[],s=function(e){return e&&e.constructor===String?e.replace(/"/g,"'").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):""};return n.length>0&&(i.push('<file name="'+t+'">'),o.Util.forEach(n,(function(e){e.rollup?i.push('<issue severity="'+e.type+'" reason="'+s(e.message)+'" evidence="'+s(e.evidence)+'"/>'):i.push('<issue line="'+e.line+'" char="'+e.col+'" severity="'+e.type+'" reason="'+s(e.message)+'" evidence="'+s(e.evidence)+'"/>')})),i.push("</file>")),i.join("")}}),o.addFormatter({id:"json",name:"JSON",startFormat:function(){"use strict";return this.json=[],""},endFormat:function(){"use strict";var e="";return this.json.length>0&&(e=1===this.json.length?JSON.stringify(this.json[0]):JSON.stringify(this.json)),e},formatResults:function(e,t,n){"use strict";return(e.messages.length>0||!n.quiet)&&this.json.push({filename:t,messages:e.messages,stats:e.stats}),""}}),o.addFormatter({id:"junit-xml",name:"JUNIT XML format",startFormat:function(){"use strict";return'<?xml version="1.0" encoding="utf-8"?><testsuites>'},endFormat:function(){"use strict";return"</testsuites>"},formatResults:function(e,t){"use strict";var n=e.messages,o=[],i={error:0,failure:0},s=function(e){return e&&e.constructor===String?e.replace(/"/g,"'").replace(/</g,"<").replace(/>/g,">"):""};return n.length>0&&(n.forEach((function(e){var t,n="warning"===e.type?"error":e.type;e.rollup||(o.push('<testcase time="0" name="'+((t=e.rule)&&"name"in t?"net.csslint."+t.name.replace(/\s/g,""):"")+'">'),o.push("<"+n+' message="'+s(e.message)+'"><![CDATA['+e.line+":"+e.col+":"+s(e.evidence)+"]]></"+n+">"),o.push("</testcase>"),i[n]+=1)})),o.unshift('<testsuite time="0" tests="'+n.length+'" skipped="0" errors="'+i.error+'" failures="'+i.failure+'" package="net.csslint" name="'+t+'">'),o.push("</testsuite>")),o.join("")}}),o.addFormatter({id:"lint-xml",name:"Lint XML format",startFormat:function(){"use strict";return'<?xml version="1.0" encoding="utf-8"?><lint>'},endFormat:function(){"use strict";return"</lint>"},formatResults:function(e,t){"use strict";var n=e.messages,i=[],s=function(e){return e&&e.constructor===String?e.replace(/"/g,"'").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):""};return n.length>0&&(i.push('<file name="'+t+'">'),o.Util.forEach(n,(function(e){if(e.rollup)i.push('<issue severity="'+e.type+'" reason="'+s(e.message)+'" evidence="'+s(e.evidence)+'"/>');else{var t="";e.rule&&e.rule.id&&(t='rule="'+s(e.rule.id)+'" '),i.push("<issue "+t+'line="'+e.line+'" char="'+e.col+'" severity="'+e.type+'" reason="'+s(e.message)+'" evidence="'+s(e.evidence)+'"/>')}})),i.push("</file>")),i.join("")}}),o.addFormatter({id:"text",name:"Plain Text",startFormat:function(){"use strict";return""},endFormat:function(){"use strict";return""},formatResults:function(e,t,n){"use strict";var i=e.messages,s="";if(n=n||{},0===i.length)return n.quiet?"":"\n\ncsslint: No errors in "+t+".";s="\n\ncsslint: There ",1===i.length?s+="is 1 problem":s+="are "+i.length+" problems",s+=" in "+t+"." |
| 89 |
;var a=t.lastIndexOf("/"),r=t;return-1===a&&(a=t.lastIndexOf("\\")),a>-1&&(r=t.substring(a+1)),o.Util.forEach(i,(function(e,t){s=s+"\n\n"+r,e.rollup?(s+="\n"+(t+1)+": "+e.type,s+="\n"+e.message):(s+="\n"+(t+1)+": "+e.type+" at line "+e.line+", col "+e.col,s+="\n"+e.message,s+="\n"+e.evidence)})),s}}),o}();n.exports.CSSLint=o})),ace.define("ace/mode/css_worker",[],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("../lib/lang"),s=e("../worker/mirror").Mirror,a=e("./css/csslint").CSSLint,r=t.Worker=function(e){s.call(this,e),this.setTimeout(400),this.ruleset=null,this.setDisabledRules("ids|order-alphabetical"),this.setInfoRules("adjoining-classes|zero-units|gradients|box-model|import|outline-none|vendor-prefix")};o.inherits(r,s),function(){this.setInfoRules=function(e){"string"==typeof e&&(e=e.split("|")),this.infoRules=i.arrayToMap(e),this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.setDisabledRules=function(e){if(e){"string"==typeof e&&(e=e.split("|"));var t={};a.getRules().forEach((function(e){t[e.id]=!0})),e.forEach((function(e){delete t[e]})),this.ruleset=t}else this.ruleset=null;this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.onUpdate=function(){var e=this.doc.getValue();if(!e)return this.sender.emit("annotate",[]);var t=this.infoRules,n=a.verify(e,this.ruleset);this.sender.emit("annotate",n.messages.map((function(e){return{row:e.line-1,column:e.col-1,text:e.message,type:t[e.rule.id]?"info":e.type,rule:e.rule.name}})))}}.call(r.prototype)}))},9326(){!function(e){if(!(void 0!==e.window&&e.document||e.require&&e.define)){e.console||(e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console),e.window=e,e.ace=e,e.onerror=function(e,t,n,o,i){postMessage({type:"error",data:{message:e,data:i&&i.data,file:t,line:n,col:o,stack:i&&i.stack}})},e.normalizeModule=function(t,n){if(-1!==n.indexOf("!")){var o=n.split("!");return e.normalizeModule(t,o[0])+"!"+e.normalizeModule(t,o[1])}if("."==n.charAt(0)){var i=t.split("/").slice(0,-1).join("/");for(n=(i?i+"/":"")+n;-1!==n.indexOf(".")&&s!=n;){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(t,n){if(n||(n=t,t=null),!n.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");n=e.normalizeModule(t,n);var o=e.require.modules[n];if(o)return o.initialized||(o.initialized=!0,o.exports=o.factory().exports),o.exports;if(!e.require.tlns)return console.log("unable to load "+n);var i=function(e,t){for(var n=e,o="";n;){var i=t[n];if("string"==typeof i)return i+o;if(i)return i.location.replace(/\/*$/,"/")+(o||i.main||i.name);if(!1===i)return"";var s=n.lastIndexOf("/");if(-1===s)break;o=n.substr(s)+o,n=n.slice(0,s)}return e}(n,e.require.tlns);return".js"!=i.slice(-3)&&(i+=".js"),e.require.id=n,e.require.modules[n]={},importScripts(i),e.require(t,n)},e.require.modules={},e.require.tlns={},e.define=function(t,n,o){if(2==arguments.length?(o=n,"string"!=typeof t&&(n=t,t=e.require.id)):1==arguments.length&&(o=t,n=[],t=e.require.id),"function"==typeof o){n.length||(n=["require","exports","module"]);var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=o.apply(this,n.slice(0,o.length).map((function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}})));return t&&(e.exports=t),e}}}else e.require.modules[t]={exports:o,initialized:!0}},e.define.amd={},e.require.tlns={},e.initBaseUrls=function(e){for(var t in e)this.require.tlns[t]=e[t]},e.initSender=function(){var t=e.require("ace/lib/event_emitter").EventEmitter,n=e.require("ace/lib/oop"),o=function(){};return function(){n.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(o.prototype),new o};var t=e.main=null,n=e.sender=null;e.onmessage=function(o){var i=o.data;if(i.event&&n)n._signal(i.event,i.data);else if(i.command)if(t[i.command])t[i.command].apply(t,i.args);else{if(!e[i.command])throw new Error("Unknown command:"+i.command);e[i.command].apply(e,i.args)}else if(i.init){e.initBaseUrls(i.tlns),n=e.sender=e.initSender();var s=this.require(i.module)[i.classname];t=e.main=new s(n)}}}}(this),ace.define("ace/lib/oop",[],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/deep_copy",[],(function(e,t,n){t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var o=0;o<t.length;o++)n[o]=e(t[o]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var o in n={},t)n[o]=e(t[o]);return n}})),ace.define("ace/lib/lang",[],(function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var o=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(o,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,o=e.length;n<o;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,(function(e){n.push({offset:arguments[arguments.length-2],length:e.length})})),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},o=function(e){return o.cancel(),t=setTimeout(n,e||0),o};return o.schedule=o,o.call=function(){return this.cancel(),e(),o},o.cancel=function(){return clearTimeout(t),t=null,o},o.isPending=function(){return t},o},t.delayedCall=function(e,t){var n=null,o=function(){n=null,e()},i=function(e){null==n&&(n=setTimeout(o,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(o,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(e){return!1}return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}})),ace.define("ace/apply_delta",[],(function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var o=t.start.row,i=t.start.column,s=e[o]||"";switch(t.action){case"insert":if(1===t.lines.length)e[o]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var a=[o,1].concat(t.lines);e.splice.apply(e,a),e[o]=s.substring(0,i)+e[o],e[o+t.lines.length-1]+=s.substring(i)}break;case"remove":var r=t.end.column,l=t.end.row;o===l?e[o]=s.substring(0,i)+s.substring(r):e.splice(o,l-o+1,s.substring(0,i)+e[l].substring(r))}}})),ace.define("ace/lib/event_emitter",[],(function(e,t,n){"use strict";var o={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};o._emit=o._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],o=this._defaultHandlers[e];if(n.length||o){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice() |
| 90 |
;for(var a=0;a<n.length&&(n[a](t,this),!t.propagationStopped);a++);return o&&!t.defaultPrevented?o(t,this):void 0}},o._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var o=0;o<n.length;o++)n[o](t,this)}},o.once=function(e,t){var n=this;if(this.on(e,(function o(){n.off(e,o),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},o.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var o=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(o);var s=i.indexOf(t);-1!=s&&i.splice(s,1)}n[e]=t},o.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var o=n._disabled_[e];if(n[e]==t)o&&this.setDefaultHandler(e,o.pop());else if(o){var i=o.indexOf(t);-1!=i&&o.splice(i,1)}}},o.on=o.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[e];return o||(o=this._eventRegistry[e]=[]),-1==o.indexOf(t)&&o[n?"unshift":"push"](t),t},o.off=o.removeListener=o.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var o=n.indexOf(t);-1!==o&&n.splice(o,1)}},o.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=o})),ace.define("ace/range",[],(function(e,t,n){"use strict";var o=function(){function e(e,t,n,o){this.start={row:e,column:t},this.end={row:n,column:o}}return e.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},e.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,n=e.end,o=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(o.row,o.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(o.row,o.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var o={row:n+1,column:0};else this.end.row<t&&(o={row:t,column:0});if(this.start.row>n)var i={row:n+1,column:0};else this.start.row<t&&(i={row:t,column:0});return e.fromPoints(i||this.start,o||this.end)},e.prototype.extend=function(t,n){var o=this.compare(t,n);if(0==o)return this;if(-1==o)var i={row:t,column:n};else var s={row:t,column:n};return e.fromPoints(i||this.start,s||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return 0==this.end.column?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),o=t.documentToScreenPosition(this.end);return new e(n.row,n.column,o.row,o.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();o.fromPoints=function(e,t){return new o(e.row,e.column,t.row,t.column)},o.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=o})),ace.define("ace/anchor",[],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=function(){function e(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof t?this.setPosition(t.row,t.column):this.setPosition(t,n)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var t=function(e,t,n){var o="insert"==e.action,i=(o?1:-1)*(e.end.row-e.start.row),s=(o?1:-1)*(e.end.column-e.start.column),r=e.start,l=o?r:e.end;return a(t,r,n)?{row:t.row,column:t.column}:a(l,t,!n)?{row:t.row+i,column:t.column+(t.row==l.row?s:0)}:{row:r.row,column:r.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,n){var o;if(o=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=o.row||this.column!=o.column){var i={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:i,value:o})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();function a(e,t,n){var o=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&o}s.prototype.$insertRight=!1,o.implement(s.prototype,i),t.Anchor=s})),ace.define("ace/document",[],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,r=e("./anchor").Anchor,l=function(){function e(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new r(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},e.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},e.prototype.getNewLineMode=function(){return this.$newLineMode}, |
| 91 |
e.prototype.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},e.prototype.getLine=function(e){return this.$lines[e]||""},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},e.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),o=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:o,action:"insert",lines:[t]},!0),this.clonePos(o)},e.prototype.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var o=this.getLine(e);return null==t&&(t=o.length),{row:e,column:t=Math.min(Math.max(t,0),o.length)}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},e.prototype.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),o={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:o,action:"insert",lines:t}),this.clonePos(o)},e.prototype.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},e.prototype.removeInLine=function(e,t,n){var o=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:o,end:i,action:"remove",lines:this.getLinesForRange({start:o,end:i})},!0),this.clonePos(o)},e.prototype.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,o=t<this.getLength()-1,i=n?e-1:e,s=n?this.getLine(i).length:0,r=o?t+1:t,l=o?0:this.getLine(r).length,c=new a(i,s,r,l),d=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),d},e.prototype.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},e.prototype.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},e.prototype.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},e.prototype.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,o=n.length-t+1,i=e.start.row,s=e.start.column,a=0,r=0;a<o;a=r){r+=t-1;var l=n.slice(a,r);l.push(""),this.applyDelta({start:this.pos(i+a,s),end:this.pos(i+r,s=0),action:e.action,lines:l},!0)}e.lines=n.slice(a),e.start.row=i+a,e.start.column=s,this.applyDelta(e,!0)},e.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},e.prototype.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,i=t||0,s=n.length;i<s;i++)if((e-=n[i].length+o)<0)return{row:i,column:e+n[i].length+o};return{row:s-1,column:e+n[s-1].length+o}},e.prototype.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length),a=t||0;a<s;++a)i+=n[a].length+o;return i+e.column},e.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},e}();l.prototype.$autoNewLine="",l.prototype.$newLineMode="auto",o.implement(l.prototype,s),t.Document=l})),ace.define("ace/worker/mirror",[],(function(e,t,n){"use strict";var o=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new o(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",(function(e){var o=e.data;if(o[0].start)t.applyDeltas(o);else for(var i=0;i<o.length;i+=2){var a,r;if(("insert"==(a=Array.isArray(o[i+1])?{action:"insert",start:o[i],lines:o[i+1]}:{action:"remove",start:o[i],end:o[i+1]}).action?a.start:a.end).row>=t.$lines.length)throw(r=new Error("Invalid delta")).data={path:s.$path,linesLength:t.$lines.length,start:a.start,end:a.end},r;t.applyDelta(a,!0)}if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()}))};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)})),ace.define("ace/mode/html/saxparser",[],(function(e,t,n){n.exports=function t(n,o,i){function s(r,l){if(!o[r]){if(!n[r]){var c="function"==typeof e&&e;if(!l&&c)return c(r,!0);if(a)return a(r,!0);throw new Error("Cannot find module '"+r+"'")}var d=o[r]={exports:{}};n[r][0].call(d.exports,(function(e){return s(n[r][1][e]||e)}),d,d.exports,t,n,o,i)}return o[r].exports}for(var a="function"==typeof e&&e,r=0;r<i.length;r++)s(i[r]);return s}({1:[function(e,t,n){function o(e){return"http://www.w3.org/1999/xhtml"===e.namespaceURI?"applet"===e.localName||"caption"===e.localName||"marquee"===e.localName||"object"===e.localName||"table"===e.localName||"td"===e.localName||"th"===e.localName:"http://www.w3.org/1998/Math/MathML"===e.namespaceURI?"mi"===e.localName||"mo"===e.localName||"mn"===e.localName||"ms"===e.localName||"mtext"===e.localName||"annotation-xml"===e.localName:"http://www.w3.org/2000/svg"===e.namespaceURI?"foreignObject"===e.localName||"desc"===e.localName||"title"===e.localName:void 0}function i(e){return o(e)||"http://www.w3.org/1999/xhtml"===e.namespaceURI&&"ol"===e.localName||"http://www.w3.org/1999/xhtml"===e.namespaceURI&&"ul"===e.localName}function s(e){ |
| 92 |
return"http://www.w3.org/1999/xhtml"===e.namespaceURI&&"table"===e.localName||"http://www.w3.org/1999/xhtml"===e.namespaceURI&&"html"===e.localName}function a(e){return o(e)||"http://www.w3.org/1999/xhtml"===e.namespaceURI&&"button"===e.localName}function r(e){return!("http://www.w3.org/1999/xhtml"===e.namespaceURI&&"optgroup"===e.localName||"http://www.w3.org/1999/xhtml"===e.namespaceURI&&"option"===e.localName)}function l(){this.elements=[],this.rootNode=null,this.headElement=null,this.bodyElement=null}l.prototype._inScope=function(e,t){for(var n=this.elements.length-1;n>=0;n--){var o=this.elements[n];if(o.localName===e)return!0;if(t(o))return!1}},l.prototype.push=function(e){this.elements.push(e)},l.prototype.pushHtmlElement=function(e){this.rootNode=e.node,this.push(e)},l.prototype.pushHeadElement=function(e){this.headElement=e.node,this.push(e)},l.prototype.pushBodyElement=function(e){this.bodyElement=e.node,this.push(e)},l.prototype.pop=function(){return this.elements.pop()},l.prototype.remove=function(e){this.elements.splice(this.elements.indexOf(e),1)},l.prototype.popUntilPopped=function(e){var t;do{t=this.pop()}while(t.localName!=e)},l.prototype.popUntilTableScopeMarker=function(){for(;!s(this.top);)this.pop()},l.prototype.popUntilTableBodyScopeMarker=function(){for(;!("http://www.w3.org/1999/xhtml"===(e=this.top).namespaceURI&&"tbody"===e.localName||"http://www.w3.org/1999/xhtml"===e.namespaceURI&&"tfoot"===e.localName||"http://www.w3.org/1999/xhtml"===e.namespaceURI&&"thead"===e.localName||"http://www.w3.org/1999/xhtml"===e.namespaceURI&&"html"===e.localName);)this.pop();var e},l.prototype.popUntilTableRowScopeMarker=function(){for(;!("http://www.w3.org/1999/xhtml"===(e=this.top).namespaceURI&&"tr"===e.localName||"http://www.w3.org/1999/xhtml"===e.namespaceURI&&"html"===e.localName);)this.pop();var e},l.prototype.item=function(e){return this.elements[e]},l.prototype.contains=function(e){return-1!==this.elements.indexOf(e)},l.prototype.inScope=function(e){return this._inScope(e,o)},l.prototype.inListItemScope=function(e){return this._inScope(e,i)},l.prototype.inTableScope=function(e){return this._inScope(e,s)},l.prototype.inButtonScope=function(e){return this._inScope(e,a)},l.prototype.inSelectScope=function(e){return this._inScope(e,r)},l.prototype.hasNumberedHeaderElementInScope=function(){for(var e=this.elements.length-1;e>=0;e--){var t=this.elements[e];if(t.isNumberedHeader())return!0;if(o(t))return!1}},l.prototype.furthestBlockForFormattingElement=function(e){for(var t=null,n=this.elements.length-1;n>=0;n--){var o=this.elements[n];if(o.node===e)break;o.isSpecial()&&(t=o)}return t},l.prototype.findIndex=function(e){for(var t=this.elements.length-1;t>=0;t--)if(this.elements[t].localName==e)return t;return-1},l.prototype.remove_openElements_until=function(e){for(var t,n=!1;!n;)n=e(t=this.elements.pop());return t},Object.defineProperty(l.prototype,"top",{get:function(){return this.elements[this.elements.length-1]}}),Object.defineProperty(l.prototype,"length",{get:function(){return this.elements.length}}),n.ElementStack=l},{}],2:[function(e,t,n){var o=e("html5-entities"),i=e("./InputStream").InputStream,s={};function a(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"}function r(e){return e>="0"&&e<="9"}Object.keys(o).forEach((function(e){for(var t=0;t<e.length;t++)s[e.substring(0,t+1)]=!0}));var l={consumeEntity:function(e,t,n){var l,c="",d="",u=e.char();if(u===i.EOF)return!1;if(d+=u,"\t"==u||"\n"==u||"\v"==u||" "==u||"<"==u||"&"==u)return e.unget(d),!1;if(n===u)return e.unget(d),!1;if("#"==u){if((u=e.shift(1))===i.EOF)return t._parseError("expected-numeric-entity-but-got-eof"),e.unget(d),!1;d+=u;var p=10,h=r;if("x"==u||"X"==u){if(p=16,h=a,(u=e.shift(1))===i.EOF)return t._parseError("expected-numeric-entity-but-got-eof"),e.unget(d),!1;d+=u}if(h(u)){for(var g="";u!==i.EOF&&h(u);)g+=u,u=e.char();g=parseInt(g,p);var m=this.replaceEntityNumbers(g);if(m&&(t._parseError("invalid-numeric-entity-replaced"),g=m),g>65535&&g<=1114111){var b=55296+((1047552&(g-=65536))>>10),f=56320+(1023&g);c=String.fromCharCode(b,f)}else c=String.fromCharCode(g);return";"!==u&&(t._parseError("numeric-entity-without-semicolon"),e.unget(u)),c}return e.unget(d),t._parseError("expected-numeric-entity"),!1}if(u>="a"&&u<="z"||u>="A"&&u<="Z"){for(var x="";s[d]&&(o[d]&&(x=d),";"!=u)&&(u=e.char())!==i.EOF;)d+=u;return x?(c=o[x],";"!==u&&n&&((l=u)>="0"&&l<="9"||l>="a"&&l<="z"||l>="A"&&l<="Z"||"="===u)?(e.unget(d),!1):(d.length>x.length&&e.unget(d.substring(x.length)),";"!==u&&t._parseError("named-entity-without-semicolon"),c)):(t._parseError("expected-named-entity"),e.unget(d),!1)}},replaceEntityNumbers:function(e){switch(e){case 0:return 65533;case 19:return 16;case 128:return 8364;case 129:return 129;case 130:return 8218;case 131:return 402;case 132:return 8222;case 133:return 8230;case 134:return 8224;case 135:return 8225;case 136:return 710;case 137:return 8240;case 138:return 352;case 139:return 8249;case 140:return 338;case 141:return 141;case 142:return 381;case 143:return 143;case 144:return 144;case 145:return 8216;case 146:return 8217;case 147:return 8220;case 148:return 8221;case 149:return 8226;case 150:return 8211;case 151:return 8212;case 152:return 732;case 153:return 8482;case 154:return 353;case 155:return 8250;case 156:return 339;case 157:return 157;case 158:return 382;case 159:return 376;default:if(e>=55296&&e<=57343||e>1114111)return 65533;if(e>=1&&e<=8||e>=14&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||11==e||65534==e||131070==e||3145726==e||196607==e||262142==e||262143==e||327678==e||327679==e||393214==e||393215==e||458750==e||458751==e||524286==e||524287==e||589822==e||589823==e||655358==e||655359==e||720894==e||720895==e||786430==e||786431==e||851966==e||851967==e||917502==e||917503==e||983038==e||983039==e||1048574==e||1048575==e||1114110==e||1114111==e)return e}}};n.EntityParser=l},{"./InputStream":3,"html5-entities":12}],3:[function(e,t,n){function o(){this.data="",this.start=0,this.committed=0,this.eof=!1,this.lastLocation={line:0,column:0}}o.EOF=-1,o.DRAIN=-2,o.prototype={slice:function(){if(this.start>=this.data.length){if(!this.eof)throw o.DRAIN;return o.EOF}return this.data.slice(this.start,this.data.length)},char:function(){if(!this.eof&&this.start>=this.data.length-1)throw o.DRAIN;if(this.start>=this.data.length)return o.EOF;var e=this.data[this.start++];return"\r"===e&&(e="\n"),e},advance:function(e){if(this.start+=e,this.start>=this.data.length){if(!this.eof)throw o.DRAIN;return o.EOF}this.committed>this.data.length/2&&(this.lastLocation=this.location(),this.data=this.data.slice(this.committed),this.start=this.start-this.committed,this.committed=0)},matchWhile:function(e){if(this.eof&&this.start>=this.data.length)return"";var t=new RegExp("^"+e+"+").exec(this.slice());if(t){if(!this.eof&&t[0].length==this.data.length-this.start)throw o.DRAIN;return this.advance(t[0].length),t[0]}return""},matchUntil:function(e){var t,n;if((n=this.slice())===o.EOF)return"";if(t=new RegExp(e+(this.eof?"|$":"")).exec(n)){var i=this.data.slice(this.start,this.start+t.index);return this.advance(t.index),i.replace(/\r/g,"\n").replace(/\n{2,}/g,"\n")}throw o.DRAIN},append:function(e){this.data+=e},shift:function(e){if(!this.eof&&this.start+e>=this.data.length)throw o.DRAIN;if(this.eof&&this.start>=this.data.length)return o.EOF;var t=this.data.slice(this.start,this.start+e).toString();return this.advance(Math.min(e,this.data.length-this.start)),t},peek:function(e){if(!this.eof&&this.start+e>=this.data.length)throw o.DRAIN;return this.eof&&this.start>=this.data.length?o.EOF:this.data.slice(this.start,Math.min(this.start+e,this.data.length)).toString()},length:function(){return this.data.length-this.start-1},unget:function(e){e!==o.EOF&&(this.start-=e.length)},undo:function(){this.start=this.committed},commit:function(){this.committed=this.start},location:function(){ |
| 93 |
var e=this.lastLocation.line,t=this.lastLocation.column,n=this.data.slice(0,this.committed),o=n.match(/\n/g);return{line:o?e+o.length:e,column:o?n.length-n.lastIndexOf("\n")-1:t+n.length}}},n.InputStream=o},{}],4:[function(e,t,n){var o={"http://www.w3.org/1999/xhtml":["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],"http://www.w3.org/1998/Math/MathML":["mi","mo","mn","ms","mtext","annotation-xml"],"http://www.w3.org/2000/svg":["foreignObject","desc","title"]};function i(e,t,n,o){this.localName=t,this.namespaceURI=e,this.attributes=n,this.node=o}i.prototype.isSpecial=function(){return this.namespaceURI in o&&o[this.namespaceURI].indexOf(this.localName)>-1},i.prototype.isFosterParenting=function(){return"http://www.w3.org/1999/xhtml"===this.namespaceURI&&("table"===this.localName||"tbody"===this.localName||"tfoot"===this.localName||"thead"===this.localName||"tr"===this.localName)},i.prototype.isNumberedHeader=function(){return"http://www.w3.org/1999/xhtml"===this.namespaceURI&&("h1"===this.localName||"h2"===this.localName||"h3"===this.localName||"h4"===this.localName||"h5"===this.localName||"h6"===this.localName)},i.prototype.isForeign=function(){return"http://www.w3.org/1999/xhtml"!=this.namespaceURI},i.prototype.isHtmlIntegrationPoint=function(){if("http://www.w3.org/1998/Math/MathML"===this.namespaceURI){if("annotation-xml"!==this.localName)return!1;var e=function(e){for(var t=0;t<e.attributes.length;t++)if("encoding"==e.attributes[t].nodeName)return e.attributes[t].nodeValue;return null}(this);return!!e&&("text/html"===(e=e.toLowerCase())||"application/xhtml+xml"===e)}return"http://www.w3.org/2000/svg"===this.namespaceURI&&("foreignObject"===this.localName||"desc"===this.localName||"title"===this.localName)},i.prototype.isMathMLTextIntegrationPoint=function(){return"http://www.w3.org/1998/Math/MathML"===this.namespaceURI&&("mi"===this.localName||"mo"===this.localName||"mn"===this.localName||"ms"===this.localName||"mtext"===this.localName)},n.StackItem=i},{}],5:[function(e,t,n){var o=e("./InputStream").InputStream,i=e("./EntityParser").EntityParser;function s(e){return" "===e||"\n"===e||"\t"===e||"\r"===e||"\f"===e}function a(e){return e>="A"&&e<="Z"||e>="a"&&e<="z"}function r(e){this._tokenHandler=e,this._state=r.DATA,this._inputStream=new o,this._currentToken=null,this._temporaryBuffer="",this._additionalAllowedCharacter=""}r.prototype._parseError=function(e,t){this._tokenHandler.parseError(e,t)},r.prototype._emitToken=function(e){if("StartTag"===e.type)for(var t=1;t<e.data.length;t++)e.data[t].nodeName||e.data.splice(t--,1);else"EndTag"===e.type&&(e.selfClosing&&this._parseError("self-closing-flag-on-end-tag"),0!==e.data.length&&this._parseError("attributes-in-end-tag"));this._tokenHandler.processToken(e),"StartTag"===e.type&&e.selfClosing&&!this._tokenHandler.isSelfClosingFlagAcknowledged()&&this._parseError("non-void-element-with-trailing-solidus",{name:e.name})},r.prototype._emitCurrentToken=function(){this._state=r.DATA,this._emitToken(this._currentToken)},r.prototype._currentAttribute=function(){return this._currentToken.data[this._currentToken.data.length-1]},r.prototype.setState=function(e){this._state=e},r.prototype.tokenize=function(e){r.DATA=n,r.RCDATA=c,r.RAWTEXT=u,r.SCRIPT_DATA=p,r.PLAINTEXT=function(e){var n=e.char();if(n===o.EOF)return t._emitToken({type:"EOF",data:null}),!1;if("\0"===n)t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"�"}),e.commit();else{var i=e.matchUntil("\0");t._emitToken({type:"Characters",data:n+i})}return!0},this._state=r.DATA,this._inputStream.append(e),this._tokenHandler.startTokenization(this),this._inputStream.eof=!0;for(var t=this;this._state.call(this,this._inputStream););function n(e){var n=e.char();if(n===o.EOF)return t._emitToken({type:"EOF",data:null}),!1;if("&"===n)t.setState(l);else if("<"===n)t.setState(I);else if("\0"===n)t._emitToken({type:"Characters",data:n}),e.commit();else{var i=e.matchUntil("&|<|\0");t._emitToken({type:"Characters",data:n+i}),e.commit()}return!0}function l(e){var o=i.consumeEntity(e,t);return t.setState(n),t._emitToken({type:"Characters",data:o||"&"}),!0}function c(e){var n=e.char();if(n===o.EOF)return t._emitToken({type:"EOF",data:null}),!1;if("&"===n)t.setState(d);else if("<"===n)t.setState(h);else if("\0"===n)t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"�"}),e.commit();else{var i=e.matchUntil("&|<|\0");t._emitToken({type:"Characters",data:n+i}),e.commit()}return!0}function d(e){var n=i.consumeEntity(e,t);return t.setState(c),t._emitToken({type:"Characters",data:n||"&"}),!0}function u(e){var n=e.char();if(n===o.EOF)return t._emitToken({type:"EOF",data:null}),!1;if("<"===n)t.setState(b);else if("\0"===n)t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"�"}),e.commit();else{var i=e.matchUntil("<|\0");t._emitToken({type:"Characters",data:n+i})}return!0}function p(e){var n=e.char();if(n===o.EOF)return t._emitToken({type:"EOF",data:null}),!1;if("<"===n)t.setState(y);else if("\0"===n)t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"�"}),e.commit();else{var i=e.matchUntil("<|\0");t._emitToken({type:"Characters",data:n+i})}return!0}function h(e){var n=e.char();return"/"===n?(this._temporaryBuffer="",t.setState(g)):(t._emitToken({type:"Characters",data:"<"}),e.unget(n),t.setState(c)),!0}function g(e){var n=e.char();return a(n)?(this._temporaryBuffer+=n,t.setState(m)):(t._emitToken({type:"Characters",data:"</"}),e.unget(n),t.setState(c)),!0}function m(e){var o=t._currentToken&&t._currentToken.name===this._temporaryBuffer.toLowerCase(),i=e.char();return s(i)&&o?(t._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},t.setState(z)):"/"===i&&o?(t._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},t.setState(Y)):">"===i&&o?(t._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},t._emitCurrentToken(),t.setState(n)):a(i)?(this._temporaryBuffer+=i,e.commit()):(t._emitToken({type:"Characters",data:"</"+this._temporaryBuffer}),e.unget(i),t.setState(c)),!0}function b(e){var n=e.char();return"/"===n?(this._temporaryBuffer="",t.setState(f)):(t._emitToken({type:"Characters",data:"<"}),e.unget(n),t.setState(u)),!0}function f(e){var n=e.char();return a(n)?(this._temporaryBuffer+=n,t.setState(x)):(t._emitToken({type:"Characters",data:"</"}),e.unget(n),t.setState(u)),!0}function x(e){var o=t._currentToken&&t._currentToken.name===this._temporaryBuffer.toLowerCase(),i=e.char();return s(i)&&o?(t._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},t.setState(z)):"/"===i&&o?(t._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},t.setState(Y)):">"===i&&o?(t._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},t._emitCurrentToken(),t.setState(n)):a(i)?(this._temporaryBuffer+=i,e.commit()):(t._emitToken({type:"Characters",data:"</"+this._temporaryBuffer}),e.unget(i),t.setState(u)),!0}function y(e){var n=e.char();return"/"===n?(this._temporaryBuffer="",t.setState(v)):"!"===n?(t._emitToken({type:"Characters",data:"<!"}),t.setState(w)):(t._emitToken({type:"Characters",data:"<"}),e.unget(n),t.setState(p)),!0}function v(e){var n=e.char();return a(n)?(this._temporaryBuffer+=n,t.setState(k)):(t._emitToken({type:"Characters",data:"</"}),e.unget(n),t.setState(p)), |
| 94 |
!0}function k(e){var n=t._currentToken&&t._currentToken.name===this._temporaryBuffer.toLowerCase(),o=e.char();return s(o)&&n?(t._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},t.setState(z)):"/"===o&&n?(t._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},t.setState(Y)):">"===o&&n?(t._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},t._emitCurrentToken()):a(o)?(this._temporaryBuffer+=o,e.commit()):(t._emitToken({type:"Characters",data:"</"+this._temporaryBuffer}),e.unget(o),t.setState(p)),!0}function w(e){var n=e.char();return"-"===n?(t._emitToken({type:"Characters",data:"-"}),t.setState(_)):(e.unget(n),t.setState(p)),!0}function _(e){var n=e.char();return"-"===n?(t._emitToken({type:"Characters",data:"-"}),t.setState($)):(e.unget(n),t.setState(p)),!0}function C(e){var i=e.char();if(i===o.EOF)e.unget(i),t.setState(n);else if("-"===i)t._emitToken({type:"Characters",data:"-"}),t.setState(j);else if("<"===i)t.setState(S);else if("\0"===i)t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"�"}),e.commit();else{var s=e.matchUntil("<|-|\0");t._emitToken({type:"Characters",data:i+s})}return!0}function j(e){var i=e.char();return i===o.EOF?(e.unget(i),t.setState(n)):"-"===i?(t._emitToken({type:"Characters",data:"-"}),t.setState($)):"<"===i?t.setState(S):"\0"===i?(t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"�"}),t.setState(C)):(t._emitToken({type:"Characters",data:i}),t.setState(C)),!0}function $(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-script"),e.unget(i),t.setState(n)):"<"===i?t.setState(S):">"===i?(t._emitToken({type:"Characters",data:">"}),t.setState(p)):"\0"===i?(t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"�"}),t.setState(C)):(t._emitToken({type:"Characters",data:i}),t.setState(C)),!0}function S(e){var n=e.char();return"/"===n?(this._temporaryBuffer="",t.setState(T)):a(n)?(t._emitToken({type:"Characters",data:"<"+n}),this._temporaryBuffer=n,t.setState(N)):(t._emitToken({type:"Characters",data:"<"}),e.unget(n),t.setState(C)),!0}function T(e){var n=e.char();return a(n)?(this._temporaryBuffer=n,t.setState(M)):(t._emitToken({type:"Characters",data:"</"}),e.unget(n),t.setState(C)),!0}function M(e){var o=t._currentToken&&t._currentToken.name===this._temporaryBuffer.toLowerCase(),i=e.char();return s(i)&&o?(t._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},t.setState(z)):"/"===i&&o?(t._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},t.setState(Y)):">"===i&&o?(t._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},t.setState(n),t._emitCurrentToken()):a(i)?(this._temporaryBuffer+=i,e.commit()):(t._emitToken({type:"Characters",data:"</"+this._temporaryBuffer}),e.unget(i),t.setState(C)),!0}function N(e){var n=e.char();return s(n)||"/"===n||">"===n?(t._emitToken({type:"Characters",data:n}),"script"===this._temporaryBuffer.toLowerCase()?t.setState(L):t.setState(C)):a(n)?(t._emitToken({type:"Characters",data:n}),this._temporaryBuffer+=n,e.commit()):(e.unget(n),t.setState(C)),!0}function L(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-script"),e.unget(i),t.setState(n)):"-"===i?(t._emitToken({type:"Characters",data:"-"}),t.setState(E)):"<"===i?(t._emitToken({type:"Characters",data:"<"}),t.setState(A)):"\0"===i?(t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"�"}),e.commit()):(t._emitToken({type:"Characters",data:i}),e.commit()),!0}function E(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-script"),e.unget(i),t.setState(n)):"-"===i?(t._emitToken({type:"Characters",data:"-"}),t.setState(P)):"<"===i?(t._emitToken({type:"Characters",data:"<"}),t.setState(A)):"\0"===i?(t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"�"}),t.setState(L)):(t._emitToken({type:"Characters",data:i}),t.setState(L)),!0}function P(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-script"),e.unget(i),t.setState(n)):"-"===i?(t._emitToken({type:"Characters",data:"-"}),e.commit()):"<"===i?(t._emitToken({type:"Characters",data:"<"}),t.setState(A)):">"===i?(t._emitToken({type:"Characters",data:">"}),t.setState(p)):"\0"===i?(t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"�"}),t.setState(L)):(t._emitToken({type:"Characters",data:i}),t.setState(L)),!0}function A(e){var n=e.char();return"/"===n?(t._emitToken({type:"Characters",data:"/"}),this._temporaryBuffer="",t.setState(B)):(e.unget(n),t.setState(L)),!0}function B(e){var n=e.char();return s(n)||"/"===n||">"===n?(t._emitToken({type:"Characters",data:n}),"script"===this._temporaryBuffer.toLowerCase()?t.setState(C):t.setState(L)):a(n)?(t._emitToken({type:"Characters",data:n}),this._temporaryBuffer+=n,e.commit()):(e.unget(n),t.setState(L)),!0}function I(e){var i=e.char();return i===o.EOF?(t._parseError("bare-less-than-sign-at-eof"),t._emitToken({type:"Characters",data:"<"}),e.unget(i),t.setState(n)):a(i)?(t._currentToken={type:"StartTag",name:i.toLowerCase(),data:[]},t.setState(R)):"!"===i?t.setState(Q):"/"===i?t.setState(O):">"===i?(t._parseError("expected-tag-name-but-got-right-bracket"),t._emitToken({type:"Characters",data:"<>"}),t.setState(n)):"?"===i?(t._parseError("expected-tag-name-but-got-question-mark"),e.unget(i),t.setState(K)):(t._parseError("expected-tag-name"),t._emitToken({type:"Characters",data:"<"}),e.unget(i),t.setState(n)),!0}function O(e){var i=e.char();return i===o.EOF?(t._parseError("expected-closing-tag-but-got-eof"),t._emitToken({type:"Characters",data:"</"}),e.unget(i),t.setState(n)):a(i)?(t._currentToken={type:"EndTag",name:i.toLowerCase(),data:[]},t.setState(R)):">"===i?(t._parseError("expected-closing-tag-but-got-right-bracket"),t.setState(n)):(t._parseError("expected-closing-tag-but-got-char",{data:i}),e.unget(i),t.setState(K)),!0}function R(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-tag-name"),e.unget(i),t.setState(n)):s(i)?t.setState(z):a(i)?t._currentToken.name+=i.toLowerCase():">"===i?t._emitCurrentToken():"/"===i?t.setState(Y):"\0"===i?(t._parseError("invalid-codepoint"),t._currentToken.name+="�"):t._currentToken.name+=i,e.commit(),!0}function z(e){var i=e.char();if(i===o.EOF)t._parseError("expected-attribute-name-but-got-eof"),e.unget(i),t.setState(n);else{if(s(i))return!0;a(i)?(t._currentToken.data.push({nodeName:i.toLowerCase(),nodeValue:""}),t.setState(D)):">"===i?t._emitCurrentToken():"/"===i?t.setState(Y):"'"===i||'"'===i||"="===i||"<"===i?(t._parseError("invalid-character-in-attribute-name"),t._currentToken.data.push({nodeName:i,nodeValue:""}),t.setState(D)):"\0"===i?(t._parseError("invalid-codepoint"),t._currentToken.data.push({nodeName:"�",nodeValue:""})):(t._currentToken.data.push({nodeName:i,nodeValue:""}),t.setState(D))}return!0}function D(e){var i=e.char(),r=!0,l=!1;if(i===o.EOF?(t._parseError("eof-in-attribute-name"),e.unget(i),t.setState(n),l=!0):"="===i?t.setState(H):a(i)?(t._currentAttribute().nodeName+=i.toLowerCase(),r=!1):">"===i?l=!0:s(i)?t.setState(F):"/"===i?t.setState(Y):"'"===i||'"'===i?(t._parseError("invalid-character-in-attribute-name"),t._currentAttribute().nodeName+=i,r=!1):"\0"===i?(t._parseError("invalid-codepoint"),t._currentAttribute().nodeName+="�"):(t._currentAttribute().nodeName+=i,r=!1),r){for(var c=t._currentToken.data,d=c[c.length-1],u=c.length-2;u>=0;u--)if(d.nodeName===c[u].nodeName){t._parseError("duplicate-attribute",{name:d.nodeName}),d.nodeName=null;break}l&&t._emitCurrentToken()}else e.commit();return!0}function F(e){var i=e.char();if(i===o.EOF)t._parseError("expected-end-of-tag-but-got-eof"),e.unget(i),t.setState(n);else{if(s(i))return!0;"="===i?t.setState(H):">"===i?t._emitCurrentToken():a(i)?(t._currentToken.data.push({nodeName:i,nodeValue:""}),t.setState(D)):"/"===i?t.setState(Y):"'"===i||'"'===i||"<"===i?(t._parseError("invalid-character-after-attribute-name"),t._currentToken.data.push({nodeName:i,nodeValue:""}), |
| 95 |
t.setState(D)):"\0"===i?(t._parseError("invalid-codepoint"),t._currentToken.data.push({nodeName:"�",nodeValue:""})):(t._currentToken.data.push({nodeName:i,nodeValue:""}),t.setState(D))}return!0}function H(e){var i=e.char();if(i===o.EOF)t._parseError("expected-attribute-value-but-got-eof"),e.unget(i),t.setState(n);else{if(s(i))return!0;'"'===i?t.setState(W):"&"===i?(t.setState(G),e.unget(i)):"'"===i?t.setState(U):">"===i?(t._parseError("expected-attribute-value-but-got-right-bracket"),t._emitCurrentToken()):"="===i||"<"===i||"`"===i?(t._parseError("unexpected-character-in-unquoted-attribute-value"),t._currentAttribute().nodeValue+=i,t.setState(G)):"\0"===i?(t._parseError("invalid-codepoint"),t._currentAttribute().nodeValue+="�"):(t._currentAttribute().nodeValue+=i,t.setState(G))}return!0}function W(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-attribute-value-double-quote"),e.unget(i),t.setState(n)):'"'===i?t.setState(q):"&"===i?(this._additionalAllowedCharacter='"',t.setState(V)):"\0"===i?(t._parseError("invalid-codepoint"),t._currentAttribute().nodeValue+="�"):(i+=e.matchUntil('[\0"&]'),t._currentAttribute().nodeValue+=i),!0}function U(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-attribute-value-single-quote"),e.unget(i),t.setState(n)):"'"===i?t.setState(q):"&"===i?(this._additionalAllowedCharacter="'",t.setState(V)):"\0"===i?(t._parseError("invalid-codepoint"),t._currentAttribute().nodeValue+="�"):t._currentAttribute().nodeValue+=i+e.matchUntil("\0|['&]"),!0}function G(e){var i=e.char();if(i===o.EOF)t._parseError("eof-after-attribute-value"),e.unget(i),t.setState(n);else if(s(i))t.setState(z);else if("&"===i)this._additionalAllowedCharacter=">",t.setState(V);else if(">"===i)t._emitCurrentToken();else if('"'===i||"'"===i||"="===i||"`"===i||"<"===i)t._parseError("unexpected-character-in-unquoted-attribute-value"),t._currentAttribute().nodeValue+=i,e.commit();else if("\0"===i)t._parseError("invalid-codepoint"),t._currentAttribute().nodeValue+="�";else{var a=e.matchUntil("\0|[\t\n\v\f \r&<>\"'=`]");a===o.EOF&&(t._parseError("eof-in-attribute-value-no-quotes"),t._emitCurrentToken()),e.commit(),t._currentAttribute().nodeValue+=i+a}return!0}function V(e){var n=i.consumeEntity(e,t,this._additionalAllowedCharacter);return this._currentAttribute().nodeValue+=n||"&",'"'===this._additionalAllowedCharacter?t.setState(W):"'"===this._additionalAllowedCharacter?t.setState(U):">"===this._additionalAllowedCharacter&&t.setState(G),!0}function q(e){var i=e.char();return i===o.EOF?(t._parseError("eof-after-attribute-value"),e.unget(i),t.setState(n)):s(i)?t.setState(z):">"===i?(t.setState(n),t._emitCurrentToken()):"/"===i?t.setState(Y):(t._parseError("unexpected-character-after-attribute-value"),e.unget(i),t.setState(z)),!0}function Y(e){var i=e.char();return i===o.EOF?(t._parseError("unexpected-eof-after-solidus-in-tag"),e.unget(i),t.setState(n)):">"===i?(t._currentToken.selfClosing=!0,t.setState(n),t._emitCurrentToken()):(t._parseError("unexpected-character-after-solidus-in-tag"),e.unget(i),t.setState(z)),!0}function K(e){var o=e.matchUntil(">");return o=o.replace(/\u0000/g,"�"),e.char(),t._emitToken({type:"Comment",data:o}),t.setState(n),!0}function Q(e){var n=e.shift(2);if("--"===n)t._currentToken={type:"Comment",data:""},t.setState(X);else{var i=e.shift(5);if(i===o.EOF||n===o.EOF)return t._parseError("expected-dashes-or-doctype"),t.setState(K),e.unget(n),!0;"DOCTYPE"===(n+=i).toUpperCase()?(t._currentToken={type:"Doctype",name:"",publicId:null,systemId:null,forceQuirks:!1},t.setState(ie)):t._tokenHandler.isCdataSectionAllowed()&&"[CDATA["===n?t.setState(Z):(t._parseError("expected-dashes-or-doctype"),e.unget(n),t.setState(K))}return!0}function Z(e){var o=e.matchUntil("]]>");return e.shift(3),o&&t._emitToken({type:"Characters",data:o}),t.setState(n),!0}function X(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-comment"),t._emitToken(t._currentToken),e.unget(i),t.setState(n)):"-"===i?t.setState(J):">"===i?(t._parseError("incorrect-comment"),t._emitToken(t._currentToken),t.setState(n)):"\0"===i?(t._parseError("invalid-codepoint"),t._currentToken.data+="�"):(t._currentToken.data+=i,t.setState(ee)),!0}function J(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-comment"),t._emitToken(t._currentToken),e.unget(i),t.setState(n)):"-"===i?t.setState(ne):">"===i?(t._parseError("incorrect-comment"),t._emitToken(t._currentToken),t.setState(n)):"\0"===i?(t._parseError("invalid-codepoint"),t._currentToken.data+="�"):(t._currentToken.data+="-"+i,t.setState(ee)),!0}function ee(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-comment"),t._emitToken(t._currentToken),e.unget(i),t.setState(n)):"-"===i?t.setState(te):"\0"===i?(t._parseError("invalid-codepoint"),t._currentToken.data+="�"):(t._currentToken.data+=i,e.commit()),!0}function te(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-comment-end-dash"),t._emitToken(t._currentToken),e.unget(i),t.setState(n)):"-"===i?t.setState(ne):"\0"===i?(t._parseError("invalid-codepoint"),t._currentToken.data+="-�",t.setState(ee)):(t._currentToken.data+="-"+i+e.matchUntil("\0|-"),e.char()),!0}function ne(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-comment-double-dash"),t._emitToken(t._currentToken),e.unget(i),t.setState(n)):">"===i?(t._emitToken(t._currentToken),t.setState(n)):"!"===i?(t._parseError("unexpected-bang-after-double-dash-in-comment"),t.setState(oe)):"-"===i?(t._parseError("unexpected-dash-after-double-dash-in-comment"),t._currentToken.data+=i):"\0"===i?(t._parseError("invalid-codepoint"),t._currentToken.data+="--�",t.setState(ee)):(t._parseError("unexpected-char-in-comment"),t._currentToken.data+="--"+i,t.setState(ee)),!0}function oe(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-comment-end-bang-state"),t._emitToken(t._currentToken),e.unget(i),t.setState(n)):">"===i?(t._emitToken(t._currentToken),t.setState(n)):"-"===i?(t._currentToken.data+="--!",t.setState(te)):(t._currentToken.data+="--!"+i,t.setState(ee)),!0}function ie(e){var i=e.char();return i===o.EOF?(t._parseError("expected-doctype-name-but-got-eof"),t._currentToken.forceQuirks=!0,e.unget(i),t.setState(n),t._emitCurrentToken()):(s(i)||(t._parseError("need-space-after-doctype"),e.unget(i)),t.setState(se)),!0}function se(e){var i=e.char();return i===o.EOF?(t._parseError("expected-doctype-name-but-got-eof"),t._currentToken.forceQuirks=!0,e.unget(i),t.setState(n),t._emitCurrentToken()):s(i)||(">"===i?(t._parseError("expected-doctype-name-but-got-right-bracket"),t._currentToken.forceQuirks=!0,t.setState(n),t._emitCurrentToken()):(a(i)&&(i=i.toLowerCase()),t._currentToken.name=i,t.setState(ae))),!0}function ae(e){var i=e.char();return i===o.EOF?(t._currentToken.forceQuirks=!0,e.unget(i),t._parseError("eof-in-doctype-name"),t.setState(n),t._emitCurrentToken()):s(i)?t.setState(re):">"===i?(t.setState(n),t._emitCurrentToken()):(a(i)&&(i=i.toLowerCase()),t._currentToken.name+=i,e.commit()),!0}function re(e){var i=e.char();if(i===o.EOF)t._currentToken.forceQuirks=!0,e.unget(i),t._parseError("eof-in-doctype"),t.setState(n),t._emitCurrentToken();else if(s(i));else if(">"===i)t.setState(n),t._emitCurrentToken();else{if(["p","P"].indexOf(i)>-1){var a=[["u","U"],["b","B"],["l","L"],["i","I"],["c","C"]].every((function(t){return i=e.char(),t.indexOf(i)>-1}));if(a)return t.setState(le),!0}else if(["s","S"].indexOf(i)>-1&&(a=[["y","Y"],["s","S"],["t","T"],["e","E"],["m","M"]].every((function(t){return i=e.char(),t.indexOf(i)>-1}))))return t.setState(ge),!0;e.unget(i),t._currentToken.forceQuirks=!0,i===o.EOF?(t._parseError("eof-in-doctype"),e.unget(i),t.setState(n),t._emitCurrentToken()):(t._parseError("expected-space-or-right-bracket-in-doctype",{data:i}),t.setState(ye))}return!0}function le(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,e.unget(i),t.setState(n), |
| 96 |
t._emitCurrentToken()):s(i)?t.setState(ce):"'"===i||'"'===i?(t._parseError("unexpected-char-in-doctype"),e.unget(i),t.setState(ce)):(e.unget(i),t.setState(ce)),!0}function ce(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,e.unget(i),t.setState(n),t._emitCurrentToken()):s(i)||('"'===i?(t._currentToken.publicId="",t.setState(de)):"'"===i?(t._currentToken.publicId="",t.setState(ue)):">"===i?(t._parseError("unexpected-end-of-doctype"),t._currentToken.forceQuirks=!0,t.setState(n),t._emitCurrentToken()):(t._parseError("unexpected-char-in-doctype"),t._currentToken.forceQuirks=!0,t.setState(ye))),!0}function de(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,e.unget(i),t.setState(n),t._emitCurrentToken()):'"'===i?t.setState(pe):">"===i?(t._parseError("unexpected-end-of-doctype"),t._currentToken.forceQuirks=!0,t.setState(n),t._emitCurrentToken()):t._currentToken.publicId+=i,!0}function ue(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,e.unget(i),t.setState(n),t._emitCurrentToken()):"'"===i?t.setState(pe):">"===i?(t._parseError("unexpected-end-of-doctype"),t._currentToken.forceQuirks=!0,t.setState(n),t._emitCurrentToken()):t._currentToken.publicId+=i,!0}function pe(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),e.unget(i),t.setState(n)):s(i)?t.setState(he):">"===i?(t.setState(n),t._emitCurrentToken()):'"'===i?(t._parseError("unexpected-char-in-doctype"),t._currentToken.systemId="",t.setState(be)):"'"===i?(t._parseError("unexpected-char-in-doctype"),t._currentToken.systemId="",t.setState(fe)):(t._parseError("unexpected-char-in-doctype"),t._currentToken.forceQuirks=!0,t.setState(ye)),!0}function he(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),e.unget(i),t.setState(n)):s(i)||(">"===i?(t._emitCurrentToken(),t.setState(n)):'"'===i?(t._currentToken.systemId="",t.setState(be)):"'"===i?(t._currentToken.systemId="",t.setState(fe)):(t._parseError("unexpected-char-in-doctype"),t._currentToken.forceQuirks=!0,t.setState(ye))),!0}function ge(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),e.unget(i),t.setState(n)):s(i)?t.setState(me):"'"===i||'"'===i?(t._parseError("unexpected-char-in-doctype"),e.unget(i),t.setState(me)):(e.unget(i),t.setState(me)),!0}function me(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),e.unget(i),t.setState(n)):s(i)||('"'===i?(t._currentToken.systemId="",t.setState(be)):"'"===i?(t._currentToken.systemId="",t.setState(fe)):">"===i?(t._parseError("unexpected-end-of-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),t.setState(n)):(t._parseError("unexpected-char-in-doctype"),t._currentToken.forceQuirks=!0,t.setState(ye))),!0}function be(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),e.unget(i),t.setState(n)):'"'===i?t.setState(xe):">"===i?(t._parseError("unexpected-end-of-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),t.setState(n)):t._currentToken.systemId+=i,!0}function fe(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),e.unget(i),t.setState(n)):"'"===i?t.setState(xe):">"===i?(t._parseError("unexpected-end-of-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),t.setState(n)):t._currentToken.systemId+=i,!0}function xe(e){var i=e.char();return i===o.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),e.unget(i),t.setState(n)):s(i)||(">"===i?(t._emitCurrentToken(),t.setState(n)):(t._parseError("unexpected-char-in-doctype"),t.setState(ye))),!0}function ye(e){var i=e.char();return i===o.EOF?(e.unget(i),t._emitCurrentToken(),t.setState(n)):">"===i&&(t._emitCurrentToken(),t.setState(n)),!0}},Object.defineProperty(r.prototype,"lineNumber",{get:function(){return this._inputStream.location().line}}),Object.defineProperty(r.prototype,"columnNumber",{get:function(){return this._inputStream.location().column}}),n.Tokenizer=r},{"./EntityParser":2,"./InputStream":3}],6:[function(e,t,n){var o=e("assert"),i=e("./messages.json"),s=e("./constants"),a=(e("events").EventEmitter,e("./Tokenizer").Tokenizer),r=e("./ElementStack").ElementStack,l=e("./StackItem").StackItem,c={};function d(e){return" "===e||"\n"===e||"\t"===e||"\r"===e||"\f"===e}function u(e){for(var t=0;t<e.length;t++)if(!d(e[t]))return!1;return!0}function p(e){for(var t=0;t<e.length;t++)if(!d(n=e[t])&&"�"!==n)return!1;var n;return!0}function h(e,t){for(var n=0;n<e.attributes.length;n++){var o=e.attributes[n];if(o.nodeName===t)return o}return null}function g(e){this.characters=e,this.current=0,this.end=this.characters.length}function m(){this.tokenizer=null,this.errorHandler=null,this.scriptingEnabled=!1,this.document=null,this.head=null,this.form=null,this.openElements=new r,this.activeFormattingElements=[],this.insertionMode=null,this.insertionModeName="",this.originalInsertionMode="",this.inQuirksMode=!1,this.compatMode="no quirks",this.framesetOk=!0,this.redirectAttachToFosterParent=!1,this.selfClosingFlagAcknowledged=!1,this.context="",this.pendingTableCharacters=[],this.shouldSkipLeadingNewline=!1;var e=this,t=this.insertionModes={};t.base={end_tag_handlers:{"-default":"endTagOther"},start_tag_handlers:{"-default":"startTagOther"},processEOF:function(){e.generateImpliedEndTags(),e.openElements.length>2||2==e.openElements.length&&"body"!=e.openElements.item(1).localName?e.parseError("expected-closing-tag-but-got-eof"):e.context&&e.openElements.length},processComment:function(t){e.insertComment(t,e.currentStackItem().node)},processDoctype:function(t,n,o,i){e.parseError("unexpected-doctype")},processStartTag:function(e,t,n){if(this[this.start_tag_handlers[e]])this[this.start_tag_handlers[e]](e,t,n);else{if(!this[this.start_tag_handlers["-default"]])throw new Error("No handler found for "+e);this[this.start_tag_handlers["-default"]](e,t,n)}},processEndTag:function(e){if(this[this.end_tag_handlers[e]])this[this.end_tag_handlers[e]](e);else{if(!this[this.end_tag_handlers["-default"]])throw new Error("No handler found for "+e);this[this.end_tag_handlers["-default"]](e)}},startTagHtml:function(e,n){t.inBody.startTagHtml(e,n)}},t.initial=Object.create(t.base),t.initial.processEOF=function(){e.parseError("expected-doctype-but-got-eof"),this.anythingElse(),e.insertionMode.processEOF()},t.initial.processComment=function(t){e.insertComment(t,e.document)},t.initial.processDoctype=function(t,n,o,i){function s(e){return 0===n.toLowerCase().indexOf(e)}e.insertDoctype(t||"",n||"",o||""), |
| 97 |
i||"html"!=t||null!=n&&(["+//silmaril//dtd html pro v0r11 19970101//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//as//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html strict//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//ietf//dtd html//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//spyglass//dtd html 2.0 extended//","-//sq//dtd html 2.0 hotmetal + extensions//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//","html"].some(s)||["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"].indexOf(n.toLowerCase())>-1||null==o&&["-//w3c//dtd html 4.01 transitional//","-//w3c//dtd html 4.01 frameset//"].some(s))||null!=o&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"==o.toLowerCase()?(e.compatMode="quirks",e.parseError("quirky-doctype")):null!=n&&(["-//w3c//dtd xhtml 1.0 transitional//","-//w3c//dtd xhtml 1.0 frameset//"].some(s)||null!=o&&["-//w3c//dtd html 4.01 transitional//","-//w3c//dtd html 4.01 frameset//"].indexOf(n.toLowerCase())>-1)?(e.compatMode="limited quirks",e.parseError("almost-standards-doctype")):"-//W3C//DTD HTML 4.0//EN"==n&&(null==o||"http://www.w3.org/TR/REC-html40/strict.dtd"==o)||"-//W3C//DTD HTML 4.01//EN"==n&&(null==o||"http://www.w3.org/TR/html4/strict.dtd"==o)||"-//W3C//DTD XHTML 1.0 Strict//EN"==n&&"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"==o||"-//W3C//DTD XHTML 1.1//EN"==n&&"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"==o||(null!=o&&"about:legacy-compat"!=o||null!=n)&&e.parseError("unknown-doctype"),e.setInsertionMode("beforeHTML")},t.initial.processCharacters=function(t){t.skipLeadingWhitespace(),t.length&&(e.parseError("expected-doctype-but-got-chars"),this.anythingElse(),e.insertionMode.processCharacters(t))},t.initial.processStartTag=function(t,n,o){e.parseError("expected-doctype-but-got-start-tag",{name:t}),this.anythingElse(),e.insertionMode.processStartTag(t,n,o)},t.initial.processEndTag=function(t){e.parseError("expected-doctype-but-got-end-tag",{name:t}),this.anythingElse(),e.insertionMode.processEndTag(t)},t.initial.anythingElse=function(){e.compatMode="quirks",e.setInsertionMode("beforeHTML")},t.beforeHTML=Object.create(t.base),t.beforeHTML.start_tag_handlers={html:"startTagHtml","-default":"startTagOther"},t.beforeHTML.processEOF=function(){this.anythingElse(),e.insertionMode.processEOF()},t.beforeHTML.processComment=function(t){e.insertComment(t,e.document)},t.beforeHTML.processCharacters=function(t){t.skipLeadingWhitespace(),t.length&&(this.anythingElse(),e.insertionMode.processCharacters(t))},t.beforeHTML.startTagHtml=function(t,n,o){e.insertHtmlElement(n),e.setInsertionMode("beforeHead")},t.beforeHTML.startTagOther=function(t,n,o){this.anythingElse(),e.insertionMode.processStartTag(t,n,o)},t.beforeHTML.processEndTag=function(t){this.anythingElse(),e.insertionMode.processEndTag(t)},t.beforeHTML.anythingElse=function(){e.insertHtmlElement(),e.setInsertionMode("beforeHead")},t.afterAfterBody=Object.create(t.base),t.afterAfterBody.start_tag_handlers={html:"startTagHtml","-default":"startTagOther"},t.afterAfterBody.processComment=function(t){e.insertComment(t,e.document)},t.afterAfterBody.processDoctype=function(e){t.inBody.processDoctype(e)},t.afterAfterBody.startTagHtml=function(e,n){t.inBody.startTagHtml(e,n)},t.afterAfterBody.startTagOther=function(t,n,o){e.parseError("unexpected-start-tag",{name:t}),e.setInsertionMode("inBody"),e.insertionMode.processStartTag(t,n,o)},t.afterAfterBody.endTagOther=function(t){e.parseError("unexpected-end-tag",{name:t}),e.setInsertionMode("inBody"),e.insertionMode.processEndTag(t)},t.afterAfterBody.processCharacters=function(n){if(!u(n.characters))return e.parseError("unexpected-char-after-body"),e.setInsertionMode("inBody"),e.insertionMode.processCharacters(n);t.inBody.processCharacters(n)},t.afterBody=Object.create(t.base),t.afterBody.end_tag_handlers={html:"endTagHtml","-default":"endTagOther"},t.afterBody.processComment=function(t){e.insertComment(t,e.openElements.rootNode)},t.afterBody.processCharacters=function(n){if(!u(n.characters))return e.parseError("unexpected-char-after-body"),e.setInsertionMode("inBody"),e.insertionMode.processCharacters(n);t.inBody.processCharacters(n)},t.afterBody.processStartTag=function(t,n,o){e.parseError("unexpected-start-tag-after-body",{name:t}),e.setInsertionMode("inBody"),e.insertionMode.processStartTag(t,n,o)},t.afterBody.endTagHtml=function(t){e.context?e.parseError("end-html-in-innerhtml"):e.setInsertionMode("afterAfterBody")},t.afterBody.endTagOther=function(t){e.parseError("unexpected-end-tag-after-body",{name:t}),e.setInsertionMode("inBody"),e.insertionMode.processEndTag(t)},t.afterFrameset=Object.create(t.base),t.afterFrameset.start_tag_handlers={html:"startTagHtml",noframes:"startTagNoframes","-default":"startTagOther"},t.afterFrameset.end_tag_handlers={html:"endTagHtml","-default":"endTagOther"},t.afterFrameset.processCharacters=function(t){for(var n=t.takeRemaining(),o="",i=0;i<n.length;i++){var s=n[i];d(s)&&(o+=s)}o&&e.insertText(o),o.length<n.length&&e.parseError("expected-eof-but-got-char")},t.afterFrameset.startTagNoframes=function(e,n){t.inHead.processStartTag(e,n)},t.afterFrameset.startTagOther=function(t,n){e.parseError("unexpected-start-tag-after-frameset",{name:t})},t.afterFrameset.endTagHtml=function(t){e.setInsertionMode("afterAfterFrameset")},t.afterFrameset.endTagOther=function(t){e.parseError("unexpected-end-tag-after-frameset",{name:t})},t.beforeHead=Object.create(t.base),t.beforeHead.start_tag_handlers={html:"startTagHtml",head:"startTagHead","-default":"startTagOther"},t.beforeHead.end_tag_handlers={html:"endTagImplyHead",head:"endTagImplyHead",body:"endTagImplyHead",br:"endTagImplyHead","-default":"endTagOther"},t.beforeHead.processEOF=function(){this.startTagHead("head",[]),e.insertionMode.processEOF()},t.beforeHead.processCharacters=function(t){t.skipLeadingWhitespace(),t.length&&(this.startTagHead("head",[]),e.insertionMode.processCharacters(t))},t.beforeHead.startTagHead=function(t,n){e.insertHeadElement(n), |
| 98 |
e.setInsertionMode("inHead")},t.beforeHead.startTagOther=function(t,n,o){this.startTagHead("head",[]),e.insertionMode.processStartTag(t,n,o)},t.beforeHead.endTagImplyHead=function(t){this.startTagHead("head",[]),e.insertionMode.processEndTag(t)},t.beforeHead.endTagOther=function(t){e.parseError("end-tag-after-implied-root",{name:t})},t.inHead=Object.create(t.base),t.inHead.start_tag_handlers={html:"startTagHtml",head:"startTagHead",title:"startTagTitle",script:"startTagScript",style:"startTagNoFramesStyle",noscript:"startTagNoScript",noframes:"startTagNoFramesStyle",base:"startTagBaseBasefontBgsoundLink",basefont:"startTagBaseBasefontBgsoundLink",bgsound:"startTagBaseBasefontBgsoundLink",link:"startTagBaseBasefontBgsoundLink",meta:"startTagMeta","-default":"startTagOther"},t.inHead.end_tag_handlers={head:"endTagHead",html:"endTagHtmlBodyBr",body:"endTagHtmlBodyBr",br:"endTagHtmlBodyBr","-default":"endTagOther"},t.inHead.processEOF=function(){var t=e.currentStackItem().localName;-1!=["title","style","script"].indexOf(t)&&(e.parseError("expected-named-closing-tag-but-got-eof",{name:t}),e.popElement()),this.anythingElse(),e.insertionMode.processEOF()},t.inHead.processCharacters=function(t){var n=t.takeLeadingWhitespace();n&&e.insertText(n),t.length&&(this.anythingElse(),e.insertionMode.processCharacters(t))},t.inHead.startTagHtml=function(e,n){t.inBody.processStartTag(e,n)},t.inHead.startTagHead=function(t,n){e.parseError("two-heads-are-not-better-than-one")},t.inHead.startTagTitle=function(t,n){e.processGenericRCDATAStartTag(t,n)},t.inHead.startTagNoScript=function(t,n){if(e.scriptingEnabled)return e.processGenericRawTextStartTag(t,n);e.insertElement(t,n),e.setInsertionMode("inHeadNoscript")},t.inHead.startTagNoFramesStyle=function(t,n){e.processGenericRawTextStartTag(t,n)},t.inHead.startTagScript=function(t,n){e.insertElement(t,n),e.tokenizer.setState(a.SCRIPT_DATA),e.originalInsertionMode=e.insertionModeName,e.setInsertionMode("text")},t.inHead.startTagBaseBasefontBgsoundLink=function(t,n){e.insertSelfClosingElement(t,n)},t.inHead.startTagMeta=function(t,n){e.insertSelfClosingElement(t,n)},t.inHead.startTagOther=function(t,n,o){this.anythingElse(),e.insertionMode.processStartTag(t,n,o)},t.inHead.endTagHead=function(t){"head"==e.openElements.item(e.openElements.length-1).localName?e.openElements.pop():e.parseError("unexpected-end-tag",{name:"head"}),e.setInsertionMode("afterHead")},t.inHead.endTagHtmlBodyBr=function(t){this.anythingElse(),e.insertionMode.processEndTag(t)},t.inHead.endTagOther=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inHead.anythingElse=function(){this.endTagHead("head")},t.afterHead=Object.create(t.base),t.afterHead.start_tag_handlers={html:"startTagHtml",head:"startTagHead",body:"startTagBody",frameset:"startTagFrameset",base:"startTagFromHead",link:"startTagFromHead",meta:"startTagFromHead",script:"startTagFromHead",style:"startTagFromHead",title:"startTagFromHead","-default":"startTagOther"},t.afterHead.end_tag_handlers={body:"endTagBodyHtmlBr",html:"endTagBodyHtmlBr",br:"endTagBodyHtmlBr","-default":"endTagOther"},t.afterHead.processEOF=function(){this.anythingElse(),e.insertionMode.processEOF()},t.afterHead.processCharacters=function(t){var n=t.takeLeadingWhitespace();n&&e.insertText(n),t.length&&(this.anythingElse(),e.insertionMode.processCharacters(t))},t.afterHead.startTagHtml=function(e,n){t.inBody.processStartTag(e,n)},t.afterHead.startTagBody=function(t,n){e.framesetOk=!1,e.insertBodyElement(n),e.setInsertionMode("inBody")},t.afterHead.startTagFrameset=function(t,n){e.insertElement(t,n),e.setInsertionMode("inFrameset")},t.afterHead.startTagFromHead=function(n,o,i){e.parseError("unexpected-start-tag-out-of-my-head",{name:n}),e.openElements.push(e.head),t.inHead.processStartTag(n,o,i),e.openElements.remove(e.head)},t.afterHead.startTagHead=function(t,n,o){e.parseError("unexpected-start-tag",{name:t})},t.afterHead.startTagOther=function(t,n,o){this.anythingElse(),e.insertionMode.processStartTag(t,n,o)},t.afterHead.endTagBodyHtmlBr=function(t){this.anythingElse(),e.insertionMode.processEndTag(t)},t.afterHead.endTagOther=function(t){e.parseError("unexpected-end-tag",{name:t})},t.afterHead.anythingElse=function(){e.insertBodyElement([]),e.setInsertionMode("inBody"),e.framesetOk=!0},t.inBody=Object.create(t.base),t.inBody.start_tag_handlers={html:"startTagHtml",head:"startTagMisplaced",base:"startTagProcessInHead",basefont:"startTagProcessInHead",bgsound:"startTagProcessInHead",link:"startTagProcessInHead",meta:"startTagProcessInHead",noframes:"startTagProcessInHead",script:"startTagProcessInHead",style:"startTagProcessInHead",title:"startTagProcessInHead",body:"startTagBody",form:"startTagForm",plaintext:"startTagPlaintext",a:"startTagA",button:"startTagButton",xmp:"startTagXmp",table:"startTagTable",hr:"startTagHr",image:"startTagImage",input:"startTagInput",textarea:"startTagTextarea",select:"startTagSelect",isindex:"startTagIsindex",applet:"startTagAppletMarqueeObject",marquee:"startTagAppletMarqueeObject",object:"startTagAppletMarqueeObject",li:"startTagListItem",dd:"startTagListItem",dt:"startTagListItem",address:"startTagCloseP",article:"startTagCloseP",aside:"startTagCloseP",blockquote:"startTagCloseP",center:"startTagCloseP",details:"startTagCloseP",dir:"startTagCloseP",div:"startTagCloseP",dl:"startTagCloseP",fieldset:"startTagCloseP",figcaption:"startTagCloseP",figure:"startTagCloseP",footer:"startTagCloseP",header:"startTagCloseP",hgroup:"startTagCloseP",main:"startTagCloseP",menu:"startTagCloseP",nav:"startTagCloseP",ol:"startTagCloseP",p:"startTagCloseP",section:"startTagCloseP",summary:"startTagCloseP",ul:"startTagCloseP",listing:"startTagPreListing",pre:"startTagPreListing",b:"startTagFormatting",big:"startTagFormatting",code:"startTagFormatting",em:"startTagFormatting",font:"startTagFormatting",i:"startTagFormatting",s:"startTagFormatting",small:"startTagFormatting",strike:"startTagFormatting",strong:"startTagFormatting",tt:"startTagFormatting",u:"startTagFormatting",nobr:"startTagNobr",area:"startTagVoidFormatting",br:"startTagVoidFormatting",embed:"startTagVoidFormatting",img:"startTagVoidFormatting",keygen:"startTagVoidFormatting",wbr:"startTagVoidFormatting",param:"startTagParamSourceTrack",source:"startTagParamSourceTrack",track:"startTagParamSourceTrack",iframe:"startTagIFrame",noembed:"startTagRawText",noscript:"startTagRawText",h1:"startTagHeading",h2:"startTagHeading",h3:"startTagHeading",h4:"startTagHeading",h5:"startTagHeading",h6:"startTagHeading",caption:"startTagMisplaced",col:"startTagMisplaced",colgroup:"startTagMisplaced",frame:"startTagMisplaced",frameset:"startTagFrameset",tbody:"startTagMisplaced",td:"startTagMisplaced",tfoot:"startTagMisplaced",th:"startTagMisplaced",thead:"startTagMisplaced",tr:"startTagMisplaced",option:"startTagOptionOptgroup",optgroup:"startTagOptionOptgroup",math:"startTagMath",svg:"startTagSVG",rt:"startTagRpRt",rp:"startTagRpRt","-default":"startTagOther"},t.inBody.end_tag_handlers={p:"endTagP",body:"endTagBody",html:"endTagHtml",address:"endTagBlock",article:"endTagBlock",aside:"endTagBlock",blockquote:"endTagBlock",button:"endTagBlock",center:"endTagBlock",details:"endTagBlock",dir:"endTagBlock",div:"endTagBlock",dl:"endTagBlock",fieldset:"endTagBlock",figcaption:"endTagBlock",figure:"endTagBlock",footer:"endTagBlock",header:"endTagBlock",hgroup:"endTagBlock",listing:"endTagBlock",main:"endTagBlock",menu:"endTagBlock",nav:"endTagBlock",ol:"endTagBlock",pre:"endTagBlock",section:"endTagBlock",summary:"endTagBlock",ul:"endTagBlock",form:"endTagForm",applet:"endTagAppletMarqueeObject",marquee:"endTagAppletMarqueeObject",object:"endTagAppletMarqueeObject",dd:"endTagListItem",dt:"endTagListItem",li:"endTagListItem",h1:"endTagHeading",h2:"endTagHeading",h3:"endTagHeading",h4:"endTagHeading",h5:"endTagHeading",h6:"endTagHeading",a:"endTagFormatting",b:"endTagFormatting",big:"endTagFormatting",code:"endTagFormatting",em:"endTagFormatting", |
| 99 |
font:"endTagFormatting",i:"endTagFormatting",nobr:"endTagFormatting",s:"endTagFormatting",small:"endTagFormatting",strike:"endTagFormatting",strong:"endTagFormatting",tt:"endTagFormatting",u:"endTagFormatting",br:"endTagBr","-default":"endTagOther"},t.inBody.processCharacters=function(t){e.shouldSkipLeadingNewline&&(e.shouldSkipLeadingNewline=!1,t.skipAtMostOneLeadingNewline()),e.reconstructActiveFormattingElements();var n=t.takeRemaining();(n=n.replace(/\u0000/g,(function(t,n){return e.parseError("invalid-codepoint"),""})))&&(e.insertText(n),e.framesetOk&&!p(n)&&(e.framesetOk=!1))},t.inBody.startTagHtml=function(t,n){e.parseError("non-html-root"),e.addAttributesToElement(e.openElements.rootNode,n)},t.inBody.startTagProcessInHead=function(e,n){t.inHead.processStartTag(e,n)},t.inBody.startTagBody=function(t,n){e.parseError("unexpected-start-tag",{name:"body"}),1==e.openElements.length||"body"!=e.openElements.item(1).localName?o.ok(e.context):(e.framesetOk=!1,e.addAttributesToElement(e.openElements.bodyElement,n))},t.inBody.startTagFrameset=function(t,n){if(e.parseError("unexpected-start-tag",{name:"frameset"}),1==e.openElements.length||"body"!=e.openElements.item(1).localName)o.ok(e.context);else if(e.framesetOk){for(e.detachFromParent(e.openElements.bodyElement);e.openElements.length>1;)e.openElements.pop();e.insertElement(t,n),e.setInsertionMode("inFrameset")}},t.inBody.startTagCloseP=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n)},t.inBody.startTagPreListing=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n),e.framesetOk=!1,e.shouldSkipLeadingNewline=!0},t.inBody.startTagForm=function(t,n){e.form?e.parseError("unexpected-start-tag",{name:t}):(e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n),e.form=e.currentStackItem())},t.inBody.startTagRpRt=function(t,n){e.openElements.inScope("ruby")&&(e.generateImpliedEndTags(),"ruby"!=e.currentStackItem().localName&&e.parseError("unexpected-start-tag",{name:t})),e.insertElement(t,n)},t.inBody.startTagListItem=function(t,n){for(var o={li:["li"],dd:["dd","dt"],dt:["dd","dt"]}[t],i=e.openElements,s=i.length-1;s>=0;s--){var a=i.item(s);if(-1!=o.indexOf(a.localName)){e.insertionMode.processEndTag(a.localName);break}if(a.isSpecial()&&"p"!==a.localName&&"address"!==a.localName&&"div"!==a.localName)break}e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n),e.framesetOk=!1},t.inBody.startTagPlaintext=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n),e.tokenizer.setState(a.PLAINTEXT)},t.inBody.startTagHeading=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.currentStackItem().isNumberedHeader()&&(e.parseError("unexpected-start-tag",{name:t}),e.popElement()),e.insertElement(t,n)},t.inBody.startTagA=function(t,n){var o=e.elementInActiveFormattingElements("a");o&&(e.parseError("unexpected-start-tag-implies-end-tag",{startName:"a",endName:"a"}),e.adoptionAgencyEndTag("a"),e.openElements.contains(o)&&e.openElements.remove(o),e.removeElementFromActiveFormattingElements(o)),e.reconstructActiveFormattingElements(),e.insertFormattingElement(t,n)},t.inBody.startTagFormatting=function(t,n){e.reconstructActiveFormattingElements(),e.insertFormattingElement(t,n)},t.inBody.startTagNobr=function(t,n){e.reconstructActiveFormattingElements(),e.openElements.inScope("nobr")&&(e.parseError("unexpected-start-tag-implies-end-tag",{startName:"nobr",endName:"nobr"}),this.processEndTag("nobr"),e.reconstructActiveFormattingElements()),e.insertFormattingElement(t,n)},t.inBody.startTagButton=function(t,n){e.openElements.inScope("button")?(e.parseError("unexpected-start-tag-implies-end-tag",{startName:"button",endName:"button"}),this.processEndTag("button"),e.insertionMode.processStartTag(t,n)):(e.framesetOk=!1,e.reconstructActiveFormattingElements(),e.insertElement(t,n))},t.inBody.startTagAppletMarqueeObject=function(t,n){e.reconstructActiveFormattingElements(),e.insertElement(t,n),e.activeFormattingElements.push(c),e.framesetOk=!1},t.inBody.endTagAppletMarqueeObject=function(t){e.openElements.inScope(t)?(e.generateImpliedEndTags(),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early",{name:t}),e.openElements.popUntilPopped(t),e.clearActiveFormattingElements()):e.parseError("unexpected-end-tag",{name:t})},t.inBody.startTagXmp=function(t,n){e.openElements.inButtonScope("p")&&this.processEndTag("p"),e.reconstructActiveFormattingElements(),e.processGenericRawTextStartTag(t,n),e.framesetOk=!1},t.inBody.startTagTable=function(t,n){"quirks"!==e.compatMode&&e.openElements.inButtonScope("p")&&this.processEndTag("p"),e.insertElement(t,n),e.setInsertionMode("inTable"),e.framesetOk=!1},t.inBody.startTagVoidFormatting=function(t,n){e.reconstructActiveFormattingElements(),e.insertSelfClosingElement(t,n),e.framesetOk=!1},t.inBody.startTagParamSourceTrack=function(t,n){e.insertSelfClosingElement(t,n)},t.inBody.startTagHr=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertSelfClosingElement(t,n),e.framesetOk=!1},t.inBody.startTagImage=function(t,n){e.parseError("unexpected-start-tag-treated-as",{originalName:"image",newName:"img"}),this.processStartTag("img",n)},t.inBody.startTagInput=function(t,n){var o=e.framesetOk;for(var i in this.startTagVoidFormatting(t,n),n)if("type"==n[i].nodeName){"hidden"==n[i].nodeValue.toLowerCase()&&(e.framesetOk=o);break}},t.inBody.startTagIsindex=function(t,n){if(e.parseError("deprecated-tag",{name:"isindex"}),e.selfClosingFlagAcknowledged=!0,!e.form){var o=[],i=[],s="This is a searchable index. Enter search keywords: ";for(var a in n)switch(n[a].nodeName){case"action":o.push({nodeName:"action",nodeValue:n[a].nodeValue});break;case"prompt":s=n[a].nodeValue;break;case"name":break;default:i.push({nodeName:n[a].nodeName,nodeValue:n[a].nodeValue})}i.push({nodeName:"name",nodeValue:"isindex"}),this.processStartTag("form",o),this.processStartTag("hr"),this.processStartTag("label"),this.processCharacters(new g(s)),this.processStartTag("input",i),this.processEndTag("label"),this.processStartTag("hr"),this.processEndTag("form")}},t.inBody.startTagTextarea=function(t,n){e.insertElement(t,n),e.tokenizer.setState(a.RCDATA),e.originalInsertionMode=e.insertionModeName,e.shouldSkipLeadingNewline=!0,e.framesetOk=!1,e.setInsertionMode("text")},t.inBody.startTagIFrame=function(t,n){e.framesetOk=!1,this.startTagRawText(t,n)},t.inBody.startTagRawText=function(t,n){e.processGenericRawTextStartTag(t,n)},t.inBody.startTagSelect=function(t,n){e.reconstructActiveFormattingElements(),e.insertElement(t,n),e.framesetOk=!1;var o=e.insertionModeName;"inTable"==o||"inCaption"==o||"inColumnGroup"==o||"inTableBody"==o||"inRow"==o||"inCell"==o?e.setInsertionMode("inSelectInTable"):e.setInsertionMode("inSelect")},t.inBody.startTagMisplaced=function(t,n){e.parseError("unexpected-start-tag-ignored",{name:t})},t.inBody.endTagMisplaced=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inBody.endTagBr=function(t){e.parseError("unexpected-end-tag-treated-as",{originalName:"br",newName:"br element"}),e.reconstructActiveFormattingElements(),e.insertElement(t,[]),e.popElement()},t.inBody.startTagOptionOptgroup=function(t,n){"option"==e.currentStackItem().localName&&e.popElement(),e.reconstructActiveFormattingElements(),e.insertElement(t,n)},t.inBody.startTagOther=function(t,n){e.reconstructActiveFormattingElements(),e.insertElement(t,n)},t.inBody.endTagOther=function(t){for(var n,o=e.openElements.length-1;o>0;o--){if((n=e.openElements.item(o)).localName==t){e.generateImpliedEndTags(t),e.currentStackItem().localName!=t&&e.parseError("unexpected-end-tag",{name:t}),e.openElements.remove_openElements_until((function(e){return e===n}));break}if(n.isSpecial()){e.parseError("unexpected-end-tag",{name:t});break}}},t.inBody.startTagMath=function(t,n,o){e.reconstructActiveFormattingElements(),n=e.adjustMathMLAttributes(n),n=e.adjustForeignAttributes(n), |
| 100 |
e.insertForeignElement(t,n,"http://www.w3.org/1998/Math/MathML",o)},t.inBody.startTagSVG=function(t,n,o){e.reconstructActiveFormattingElements(),n=e.adjustSVGAttributes(n),n=e.adjustForeignAttributes(n),e.insertForeignElement(t,n,"http://www.w3.org/2000/svg",o)},t.inBody.endTagP=function(t){e.openElements.inButtonScope("p")?(e.generateImpliedEndTags("p"),"p"!=e.currentStackItem().localName&&e.parseError("unexpected-implied-end-tag",{name:"p"}),e.openElements.popUntilPopped(t)):(e.parseError("unexpected-end-tag",{name:"p"}),this.startTagCloseP("p",[]),this.endTagP("p"))},t.inBody.endTagBody=function(t){e.openElements.inScope("body")?("body"!=e.currentStackItem().localName&&e.parseError("expected-one-end-tag-but-got-another",{expectedName:e.currentStackItem().localName,gotName:t}),e.setInsertionMode("afterBody")):e.parseError("unexpected-end-tag",{name:t})},t.inBody.endTagHtml=function(t){e.openElements.inScope("body")?("body"!=e.currentStackItem().localName&&e.parseError("expected-one-end-tag-but-got-another",{expectedName:e.currentStackItem().localName,gotName:t}),e.setInsertionMode("afterBody"),e.insertionMode.processEndTag(t)):e.parseError("unexpected-end-tag",{name:t})},t.inBody.endTagBlock=function(t){e.openElements.inScope(t)?(e.generateImpliedEndTags(),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early",{name:t}),e.openElements.popUntilPopped(t)):e.parseError("unexpected-end-tag",{name:t})},t.inBody.endTagForm=function(t){var n=e.form;e.form=null,n&&e.openElements.inScope(t)?(e.generateImpliedEndTags(),e.currentStackItem()!=n&&e.parseError("end-tag-too-early-ignored",{name:"form"}),e.openElements.remove(n)):e.parseError("unexpected-end-tag",{name:t})},t.inBody.endTagListItem=function(t){e.openElements.inListItemScope(t)?(e.generateImpliedEndTags(t),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early",{name:t}),e.openElements.popUntilPopped(t)):e.parseError("unexpected-end-tag",{name:t})},t.inBody.endTagHeading=function(t){e.openElements.hasNumberedHeaderElementInScope()?(e.generateImpliedEndTags(),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early",{name:t}),e.openElements.remove_openElements_until((function(e){return e.isNumberedHeader()}))):e.parseError("unexpected-end-tag",{name:t})},t.inBody.endTagFormatting=function(t,n){e.adoptionAgencyEndTag(t)||this.endTagOther(t,n)},t.inCaption=Object.create(t.base),t.inCaption.start_tag_handlers={html:"startTagHtml",caption:"startTagTableElement",col:"startTagTableElement",colgroup:"startTagTableElement",tbody:"startTagTableElement",td:"startTagTableElement",tfoot:"startTagTableElement",thead:"startTagTableElement",tr:"startTagTableElement","-default":"startTagOther"},t.inCaption.end_tag_handlers={caption:"endTagCaption",table:"endTagTable",body:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",tbody:"endTagIgnore",td:"endTagIgnore",tfood:"endTagIgnore",thead:"endTagIgnore",tr:"endTagIgnore","-default":"endTagOther"},t.inCaption.processCharacters=function(e){t.inBody.processCharacters(e)},t.inCaption.startTagTableElement=function(t,n){e.parseError("unexpected-end-tag",{name:t});var o=!e.openElements.inTableScope("caption");e.insertionMode.processEndTag("caption"),o||e.insertionMode.processStartTag(t,n)},t.inCaption.startTagOther=function(e,n,o){t.inBody.processStartTag(e,n,o)},t.inCaption.endTagCaption=function(t){e.openElements.inTableScope("caption")?(e.generateImpliedEndTags(),"caption"!=e.currentStackItem().localName&&e.parseError("expected-one-end-tag-but-got-another",{gotName:"caption",expectedName:e.currentStackItem().localName}),e.openElements.popUntilPopped("caption"),e.clearActiveFormattingElements(),e.setInsertionMode("inTable")):(o.ok(e.context),e.parseError("unexpected-end-tag",{name:t}))},t.inCaption.endTagTable=function(t){e.parseError("unexpected-end-table-in-caption");var n=!e.openElements.inTableScope("caption");e.insertionMode.processEndTag("caption"),n||e.insertionMode.processEndTag(t)},t.inCaption.endTagIgnore=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inCaption.endTagOther=function(e){t.inBody.processEndTag(e)},t.inCell=Object.create(t.base),t.inCell.start_tag_handlers={html:"startTagHtml",caption:"startTagTableOther",col:"startTagTableOther",colgroup:"startTagTableOther",tbody:"startTagTableOther",td:"startTagTableOther",tfoot:"startTagTableOther",th:"startTagTableOther",thead:"startTagTableOther",tr:"startTagTableOther","-default":"startTagOther"},t.inCell.end_tag_handlers={td:"endTagTableCell",th:"endTagTableCell",body:"endTagIgnore",caption:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",table:"endTagImply",tbody:"endTagImply",tfoot:"endTagImply",thead:"endTagImply",tr:"endTagImply","-default":"endTagOther"},t.inCell.processCharacters=function(e){t.inBody.processCharacters(e)},t.inCell.startTagTableOther=function(t,n,o){e.openElements.inTableScope("td")||e.openElements.inTableScope("th")?(this.closeCell(),e.insertionMode.processStartTag(t,n,o)):e.parseError("unexpected-start-tag",{name:t})},t.inCell.startTagOther=function(e,n,o){t.inBody.processStartTag(e,n,o)},t.inCell.endTagTableCell=function(t){e.openElements.inTableScope(t)?(e.generateImpliedEndTags(t),e.currentStackItem().localName!=t.toLowerCase()?(e.parseError("unexpected-cell-end-tag",{name:t}),e.openElements.popUntilPopped(t)):e.popElement(),e.clearActiveFormattingElements(),e.setInsertionMode("inRow")):e.parseError("unexpected-end-tag",{name:t})},t.inCell.endTagIgnore=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inCell.endTagImply=function(t){e.openElements.inTableScope(t)?(this.closeCell(),e.insertionMode.processEndTag(t)):e.parseError("unexpected-end-tag",{name:t})},t.inCell.endTagOther=function(e){t.inBody.processEndTag(e)},t.inCell.closeCell=function(){e.openElements.inTableScope("td")?this.endTagTableCell("td"):e.openElements.inTableScope("th")&&this.endTagTableCell("th")},t.inColumnGroup=Object.create(t.base),t.inColumnGroup.start_tag_handlers={html:"startTagHtml",col:"startTagCol","-default":"startTagOther"},t.inColumnGroup.end_tag_handlers={colgroup:"endTagColgroup",col:"endTagCol","-default":"endTagOther"},t.inColumnGroup.ignoreEndTagColgroup=function(){return"html"==e.currentStackItem().localName},t.inColumnGroup.processCharacters=function(t){var n=t.takeLeadingWhitespace();if(n&&e.insertText(n),t.length){var o=this.ignoreEndTagColgroup();this.endTagColgroup("colgroup"),o||e.insertionMode.processCharacters(t)}},t.inColumnGroup.startTagCol=function(t,n){e.insertSelfClosingElement(t,n)},t.inColumnGroup.startTagOther=function(t,n,o){var i=this.ignoreEndTagColgroup();this.endTagColgroup("colgroup"),i||e.insertionMode.processStartTag(t,n,o)},t.inColumnGroup.endTagColgroup=function(t){this.ignoreEndTagColgroup()?(o.ok(e.context),e.parseError("unexpected-end-tag",{name:t})):(e.popElement(),e.setInsertionMode("inTable"))},t.inColumnGroup.endTagCol=function(t){e.parseError("no-end-tag",{name:"col"})},t.inColumnGroup.endTagOther=function(t){var n=this.ignoreEndTagColgroup();this.endTagColgroup("colgroup"),n||e.insertionMode.processEndTag(t)},t.inForeignContent=Object.create(t.base),t.inForeignContent.processStartTag=function(t,n,o){if(-1!=["b","big","blockquote","body","br","center","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","head","hr","i","img","li","listing","menu","meta","nobr","ol","p","pre","ruby","s","small","span","strong","strike","sub","sup","table","tt","u","ul","var"].indexOf(t)||"font"==t&&n.some((function(e){return["color","face","size"].indexOf(e.nodeName)>=0}))){for(e.parseError("unexpected-html-element-in-foreign-content",{name:t});e.currentStackItem().isForeign()&&!e.currentStackItem().isHtmlIntegrationPoint()&&!e.currentStackItem().isMathMLTextIntegrationPoint();)e.openElements.pop();e.insertionMode.processStartTag(t,n,o)}else"http://www.w3.org/1998/Math/MathML"==e.currentStackItem().namespaceURI&&(n=e.adjustMathMLAttributes(n)), |
| 101 |
"http://www.w3.org/2000/svg"==e.currentStackItem().namespaceURI&&(t=e.adjustSVGTagNameCase(t),n=e.adjustSVGAttributes(n)),n=e.adjustForeignAttributes(n),e.insertForeignElement(t,n,e.currentStackItem().namespaceURI,o)},t.inForeignContent.processEndTag=function(t){var n=e.currentStackItem(),o=e.openElements.length-1;for(n.localName.toLowerCase()!=t&&e.parseError("unexpected-end-tag",{name:t});0!==o;){if(n.localName.toLowerCase()==t){for(;e.openElements.pop()!=n;);break}if(o-=1,!(n=e.openElements.item(o)).isForeign()){e.insertionMode.processEndTag(t);break}}},t.inForeignContent.processCharacters=function(t){var n=t.takeRemaining();n=n.replace(/\u0000/g,(function(t,n){return e.parseError("invalid-codepoint"),"�"})),e.framesetOk&&!p(n)&&(e.framesetOk=!1),e.insertText(n)},t.inHeadNoscript=Object.create(t.base),t.inHeadNoscript.start_tag_handlers={html:"startTagHtml",basefont:"startTagBasefontBgsoundLinkMetaNoframesStyle",bgsound:"startTagBasefontBgsoundLinkMetaNoframesStyle",link:"startTagBasefontBgsoundLinkMetaNoframesStyle",meta:"startTagBasefontBgsoundLinkMetaNoframesStyle",noframes:"startTagBasefontBgsoundLinkMetaNoframesStyle",style:"startTagBasefontBgsoundLinkMetaNoframesStyle",head:"startTagHeadNoscript",noscript:"startTagHeadNoscript","-default":"startTagOther"},t.inHeadNoscript.end_tag_handlers={noscript:"endTagNoscript",br:"endTagBr","-default":"endTagOther"},t.inHeadNoscript.processCharacters=function(t){var n=t.takeLeadingWhitespace();n&&e.insertText(n),t.length&&(e.parseError("unexpected-char-in-frameset"),this.anythingElse(),e.insertionMode.processCharacters(t))},t.inHeadNoscript.processComment=function(e){t.inHead.processComment(e)},t.inHeadNoscript.startTagBasefontBgsoundLinkMetaNoframesStyle=function(e,n){t.inHead.processStartTag(e,n)},t.inHeadNoscript.startTagHeadNoscript=function(t,n){e.parseError("unexpected-start-tag-in-frameset",{name:t})},t.inHeadNoscript.startTagOther=function(t,n){e.parseError("unexpected-start-tag-in-frameset",{name:t}),this.anythingElse(),e.insertionMode.processStartTag(t,n)},t.inHeadNoscript.endTagBr=function(t,n){e.parseError("unexpected-end-tag-in-frameset",{name:t}),this.anythingElse(),e.insertionMode.processEndTag(t,n)},t.inHeadNoscript.endTagNoscript=function(t,n){e.popElement(),e.setInsertionMode("inHead")},t.inHeadNoscript.endTagOther=function(t,n){e.parseError("unexpected-end-tag-in-frameset",{name:t})},t.inHeadNoscript.anythingElse=function(){e.popElement(),e.setInsertionMode("inHead")},t.inFrameset=Object.create(t.base),t.inFrameset.start_tag_handlers={html:"startTagHtml",frameset:"startTagFrameset",frame:"startTagFrame",noframes:"startTagNoframes","-default":"startTagOther"},t.inFrameset.end_tag_handlers={frameset:"endTagFrameset",noframes:"endTagNoframes","-default":"endTagOther"},t.inFrameset.processCharacters=function(t){e.parseError("unexpected-char-in-frameset")},t.inFrameset.startTagFrameset=function(t,n){e.insertElement(t,n)},t.inFrameset.startTagFrame=function(t,n){e.insertSelfClosingElement(t,n)},t.inFrameset.startTagNoframes=function(e,n){t.inBody.processStartTag(e,n)},t.inFrameset.startTagOther=function(t,n){e.parseError("unexpected-start-tag-in-frameset",{name:t})},t.inFrameset.endTagFrameset=function(t,n){"html"==e.currentStackItem().localName?e.parseError("unexpected-frameset-in-frameset-innerhtml"):e.popElement(),e.context||"frameset"==e.currentStackItem().localName||e.setInsertionMode("afterFrameset")},t.inFrameset.endTagNoframes=function(e){t.inBody.processEndTag(e)},t.inFrameset.endTagOther=function(t){e.parseError("unexpected-end-tag-in-frameset",{name:t})},t.inTable=Object.create(t.base),t.inTable.start_tag_handlers={html:"startTagHtml",caption:"startTagCaption",colgroup:"startTagColgroup",col:"startTagCol",table:"startTagTable",tbody:"startTagRowGroup",tfoot:"startTagRowGroup",thead:"startTagRowGroup",td:"startTagImplyTbody",th:"startTagImplyTbody",tr:"startTagImplyTbody",style:"startTagStyleScript",script:"startTagStyleScript",input:"startTagInput",form:"startTagForm","-default":"startTagOther"},t.inTable.end_tag_handlers={table:"endTagTable",body:"endTagIgnore",caption:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",tbody:"endTagIgnore",td:"endTagIgnore",tfoot:"endTagIgnore",th:"endTagIgnore",thead:"endTagIgnore",tr:"endTagIgnore","-default":"endTagOther"},t.inTable.processCharacters=function(n){if(e.currentStackItem().isFosterParenting()){var o=e.insertionModeName;e.setInsertionMode("inTableText"),e.originalInsertionMode=o,e.insertionMode.processCharacters(n)}else e.redirectAttachToFosterParent=!0,t.inBody.processCharacters(n),e.redirectAttachToFosterParent=!1},t.inTable.startTagCaption=function(t,n){e.openElements.popUntilTableScopeMarker(),e.activeFormattingElements.push(c),e.insertElement(t,n),e.setInsertionMode("inCaption")},t.inTable.startTagColgroup=function(t,n){e.openElements.popUntilTableScopeMarker(),e.insertElement(t,n),e.setInsertionMode("inColumnGroup")},t.inTable.startTagCol=function(t,n){this.startTagColgroup("colgroup",[]),e.insertionMode.processStartTag(t,n)},t.inTable.startTagRowGroup=function(t,n){e.openElements.popUntilTableScopeMarker(),e.insertElement(t,n),e.setInsertionMode("inTableBody")},t.inTable.startTagImplyTbody=function(t,n){this.startTagRowGroup("tbody",[]),e.insertionMode.processStartTag(t,n)},t.inTable.startTagTable=function(t,n){e.parseError("unexpected-start-tag-implies-end-tag",{startName:"table",endName:"table"}),e.insertionMode.processEndTag("table"),e.context||e.insertionMode.processStartTag(t,n)},t.inTable.startTagStyleScript=function(e,n){t.inHead.processStartTag(e,n)},t.inTable.startTagInput=function(t,n){for(var o in n)if("type"==n[o].nodeName.toLowerCase()){if("hidden"==n[o].nodeValue.toLowerCase())return e.parseError("unexpected-hidden-input-in-table"),e.insertElement(t,n),void e.openElements.pop();break}this.startTagOther(t,n)},t.inTable.startTagForm=function(t,n){e.parseError("unexpected-form-in-table"),e.form||(e.insertElement(t,n),e.form=e.currentStackItem(),e.openElements.pop())},t.inTable.startTagOther=function(n,o,i){e.parseError("unexpected-start-tag-implies-table-voodoo",{name:n}),e.redirectAttachToFosterParent=!0,t.inBody.processStartTag(n,o,i),e.redirectAttachToFosterParent=!1},t.inTable.endTagTable=function(t){e.openElements.inTableScope(t)?(e.generateImpliedEndTags(),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early-named",{gotName:"table",expectedName:e.currentStackItem().localName}),e.openElements.popUntilPopped("table"),e.resetInsertionMode()):(o.ok(e.context),e.parseError("unexpected-end-tag",{name:t}))},t.inTable.endTagIgnore=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inTable.endTagOther=function(n){e.parseError("unexpected-end-tag-implies-table-voodoo",{name:n}),e.redirectAttachToFosterParent=!0,t.inBody.processEndTag(n),e.redirectAttachToFosterParent=!1},t.inTableText=Object.create(t.base),t.inTableText.flushCharacters=function(){var t=e.pendingTableCharacters.join("");u(t)?e.insertText(t):(e.redirectAttachToFosterParent=!0,e.reconstructActiveFormattingElements(),e.insertText(t),e.framesetOk=!1,e.redirectAttachToFosterParent=!1),e.pendingTableCharacters=[]},t.inTableText.processComment=function(t){this.flushCharacters(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processComment(t)},t.inTableText.processEOF=function(t){this.flushCharacters(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processEOF()},t.inTableText.processCharacters=function(t){var n=t.takeRemaining();(n=n.replace(/\u0000/g,(function(t,n){return e.parseError("invalid-codepoint"),""})))&&e.pendingTableCharacters.push(n)},t.inTableText.processStartTag=function(t,n,o){this.flushCharacters(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processStartTag(t,n,o)},t.inTableText.processEndTag=function(t,n){this.flushCharacters(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processEndTag(t,n)},t.inTableBody=Object.create(t.base), |
| 102 |
t.inTableBody.start_tag_handlers={html:"startTagHtml",tr:"startTagTr",td:"startTagTableCell",th:"startTagTableCell",caption:"startTagTableOther",col:"startTagTableOther",colgroup:"startTagTableOther",tbody:"startTagTableOther",tfoot:"startTagTableOther",thead:"startTagTableOther","-default":"startTagOther"},t.inTableBody.end_tag_handlers={table:"endTagTable",tbody:"endTagTableRowGroup",tfoot:"endTagTableRowGroup",thead:"endTagTableRowGroup",body:"endTagIgnore",caption:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",td:"endTagIgnore",th:"endTagIgnore",tr:"endTagIgnore","-default":"endTagOther"},t.inTableBody.processCharacters=function(e){t.inTable.processCharacters(e)},t.inTableBody.startTagTr=function(t,n){e.openElements.popUntilTableBodyScopeMarker(),e.insertElement(t,n),e.setInsertionMode("inRow")},t.inTableBody.startTagTableCell=function(t,n){e.parseError("unexpected-cell-in-table-body",{name:t}),this.startTagTr("tr",[]),e.insertionMode.processStartTag(t,n)},t.inTableBody.startTagTableOther=function(t,n){e.openElements.inTableScope("tbody")||e.openElements.inTableScope("thead")||e.openElements.inTableScope("tfoot")?(e.openElements.popUntilTableBodyScopeMarker(),this.endTagTableRowGroup(e.currentStackItem().localName),e.insertionMode.processStartTag(t,n)):e.parseError("unexpected-start-tag",{name:t})},t.inTableBody.startTagOther=function(e,n){t.inTable.processStartTag(e,n)},t.inTableBody.endTagTableRowGroup=function(t){e.openElements.inTableScope(t)?(e.openElements.popUntilTableBodyScopeMarker(),e.popElement(),e.setInsertionMode("inTable")):e.parseError("unexpected-end-tag-in-table-body",{name:t})},t.inTableBody.endTagTable=function(t){e.openElements.inTableScope("tbody")||e.openElements.inTableScope("thead")||e.openElements.inTableScope("tfoot")?(e.openElements.popUntilTableBodyScopeMarker(),this.endTagTableRowGroup(e.currentStackItem().localName),e.insertionMode.processEndTag(t)):e.parseError("unexpected-end-tag",{name:t})},t.inTableBody.endTagIgnore=function(t){e.parseError("unexpected-end-tag-in-table-body",{name:t})},t.inTableBody.endTagOther=function(e){t.inTable.processEndTag(e)},t.inSelect=Object.create(t.base),t.inSelect.start_tag_handlers={html:"startTagHtml",option:"startTagOption",optgroup:"startTagOptgroup",select:"startTagSelect",input:"startTagInput",keygen:"startTagInput",textarea:"startTagInput",script:"startTagScript","-default":"startTagOther"},t.inSelect.end_tag_handlers={option:"endTagOption",optgroup:"endTagOptgroup",select:"endTagSelect",caption:"endTagTableElements",table:"endTagTableElements",tbody:"endTagTableElements",tfoot:"endTagTableElements",thead:"endTagTableElements",tr:"endTagTableElements",td:"endTagTableElements",th:"endTagTableElements","-default":"endTagOther"},t.inSelect.processCharacters=function(t){var n=t.takeRemaining();(n=n.replace(/\u0000/g,(function(t,n){return e.parseError("invalid-codepoint"),""})))&&e.insertText(n)},t.inSelect.startTagOption=function(t,n){"option"==e.currentStackItem().localName&&e.popElement(),e.insertElement(t,n)},t.inSelect.startTagOptgroup=function(t,n){"option"==e.currentStackItem().localName&&e.popElement(),"optgroup"==e.currentStackItem().localName&&e.popElement(),e.insertElement(t,n)},t.inSelect.endTagOption=function(t){"option"===e.currentStackItem().localName?e.popElement():e.parseError("unexpected-end-tag-in-select",{name:t})},t.inSelect.endTagOptgroup=function(t){"option"==e.currentStackItem().localName&&"optgroup"==e.openElements.item(e.openElements.length-2).localName&&e.popElement(),"optgroup"==e.currentStackItem().localName?e.popElement():e.parseError("unexpected-end-tag-in-select",{name:"optgroup"})},t.inSelect.startTagSelect=function(t){e.parseError("unexpected-select-in-select"),this.endTagSelect("select")},t.inSelect.endTagSelect=function(t){e.openElements.inTableScope("select")?(e.openElements.popUntilPopped("select"),e.resetInsertionMode()):e.parseError("unexpected-end-tag",{name:t})},t.inSelect.startTagInput=function(t,n){e.parseError("unexpected-input-in-select"),e.openElements.inSelectScope("select")&&(this.endTagSelect("select"),e.insertionMode.processStartTag(t,n))},t.inSelect.startTagScript=function(e,n){t.inHead.processStartTag(e,n)},t.inSelect.endTagTableElements=function(t){e.parseError("unexpected-end-tag-in-select",{name:t}),e.openElements.inTableScope(t)&&(this.endTagSelect("select"),e.insertionMode.processEndTag(t))},t.inSelect.startTagOther=function(t,n){e.parseError("unexpected-start-tag-in-select",{name:t})},t.inSelect.endTagOther=function(t){e.parseError("unexpected-end-tag-in-select",{name:t})},t.inSelectInTable=Object.create(t.base),t.inSelectInTable.start_tag_handlers={caption:"startTagTable",table:"startTagTable",tbody:"startTagTable",tfoot:"startTagTable",thead:"startTagTable",tr:"startTagTable",td:"startTagTable",th:"startTagTable","-default":"startTagOther"},t.inSelectInTable.end_tag_handlers={caption:"endTagTable",table:"endTagTable",tbody:"endTagTable",tfoot:"endTagTable",thead:"endTagTable",tr:"endTagTable",td:"endTagTable",th:"endTagTable","-default":"endTagOther"},t.inSelectInTable.processCharacters=function(e){t.inSelect.processCharacters(e)},t.inSelectInTable.startTagTable=function(t,n){e.parseError("unexpected-table-element-start-tag-in-select-in-table",{name:t}),this.endTagOther("select"),e.insertionMode.processStartTag(t,n)},t.inSelectInTable.startTagOther=function(e,n,o){t.inSelect.processStartTag(e,n,o)},t.inSelectInTable.endTagTable=function(t){e.parseError("unexpected-table-element-end-tag-in-select-in-table",{name:t}),e.openElements.inTableScope(t)&&(this.endTagOther("select"),e.insertionMode.processEndTag(t))},t.inSelectInTable.endTagOther=function(e){t.inSelect.processEndTag(e)},t.inRow=Object.create(t.base),t.inRow.start_tag_handlers={html:"startTagHtml",td:"startTagTableCell",th:"startTagTableCell",caption:"startTagTableOther",col:"startTagTableOther",colgroup:"startTagTableOther",tbody:"startTagTableOther",tfoot:"startTagTableOther",thead:"startTagTableOther",tr:"startTagTableOther","-default":"startTagOther"},t.inRow.end_tag_handlers={tr:"endTagTr",table:"endTagTable",tbody:"endTagTableRowGroup",tfoot:"endTagTableRowGroup",thead:"endTagTableRowGroup",body:"endTagIgnore",caption:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",td:"endTagIgnore",th:"endTagIgnore","-default":"endTagOther"},t.inRow.processCharacters=function(e){t.inTable.processCharacters(e)},t.inRow.startTagTableCell=function(t,n){e.openElements.popUntilTableRowScopeMarker(),e.insertElement(t,n),e.setInsertionMode("inCell"),e.activeFormattingElements.push(c)},t.inRow.startTagTableOther=function(t,n){var o=this.ignoreEndTagTr();this.endTagTr("tr"),o||e.insertionMode.processStartTag(t,n)},t.inRow.startTagOther=function(e,n,o){t.inTable.processStartTag(e,n,o)},t.inRow.endTagTr=function(t){this.ignoreEndTagTr()?(o.ok(e.context),e.parseError("unexpected-end-tag",{name:t})):(e.openElements.popUntilTableRowScopeMarker(),e.popElement(),e.setInsertionMode("inTableBody"))},t.inRow.endTagTable=function(t){var n=this.ignoreEndTagTr();this.endTagTr("tr"),n||e.insertionMode.processEndTag(t)},t.inRow.endTagTableRowGroup=function(t){e.openElements.inTableScope(t)?(this.endTagTr("tr"),e.insertionMode.processEndTag(t)):e.parseError("unexpected-end-tag",{name:t})},t.inRow.endTagIgnore=function(t){e.parseError("unexpected-end-tag-in-table-row",{name:t})},t.inRow.endTagOther=function(e){t.inTable.processEndTag(e)},t.inRow.ignoreEndTagTr=function(){return!e.openElements.inTableScope("tr")},t.afterAfterFrameset=Object.create(t.base),t.afterAfterFrameset.start_tag_handlers={html:"startTagHtml",noframes:"startTagNoFrames","-default":"startTagOther"},t.afterAfterFrameset.processEOF=function(){},t.afterAfterFrameset.processComment=function(t){e.insertComment(t,e.document)},t.afterAfterFrameset.processCharacters=function(t){for(var n=t.takeRemaining(),o="",i=0;i<n.length;i++){var s=n[i];d(s)&&(o+=s)} |
| 103 |
o&&(e.reconstructActiveFormattingElements(),e.insertText(o)),o.length<n.length&&e.parseError("expected-eof-but-got-char")},t.afterAfterFrameset.startTagNoFrames=function(e,n){t.inHead.processStartTag(e,n)},t.afterAfterFrameset.startTagOther=function(t,n,o){e.parseError("expected-eof-but-got-start-tag",{name:t})},t.afterAfterFrameset.processEndTag=function(t,n){e.parseError("expected-eof-but-got-end-tag",{name:t})},t.text=Object.create(t.base),t.text.start_tag_handlers={"-default":"startTagOther"},t.text.end_tag_handlers={script:"endTagScript","-default":"endTagOther"},t.text.processCharacters=function(t){e.shouldSkipLeadingNewline&&(e.shouldSkipLeadingNewline=!1,t.skipAtMostOneLeadingNewline());var n=t.takeRemaining();n&&e.insertText(n)},t.text.processEOF=function(){e.parseError("expected-named-closing-tag-but-got-eof",{name:e.currentStackItem().localName}),e.openElements.pop(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processEOF()},t.text.startTagOther=function(e){throw"Tried to process start tag "+e+" in RCDATA/RAWTEXT mode"},t.text.endTagScript=function(t){var n=e.openElements.pop();o.ok("script"==n.localName),e.setInsertionMode(e.originalInsertionMode)},t.text.endTagOther=function(t){e.openElements.pop(),e.setInsertionMode(e.originalInsertionMode)}}g.prototype.skipAtMostOneLeadingNewline=function(){"\n"===this.characters[this.current]&&this.current++},g.prototype.skipLeadingWhitespace=function(){for(;d(this.characters[this.current]);)if(++this.current==this.end)return},g.prototype.skipLeadingNonWhitespace=function(){for(;!d(this.characters[this.current]);)if(++this.current==this.end)return},g.prototype.takeRemaining=function(){return this.characters.substring(this.current)},g.prototype.takeLeadingWhitespace=function(){var e=this.current;return this.skipLeadingWhitespace(),e===this.current?"":this.characters.substring(e,this.current-e)},Object.defineProperty(g.prototype,"length",{get:function(){return this.end-this.current}}),m.prototype.setInsertionMode=function(e){this.insertionMode=this.insertionModes[e],this.insertionModeName=e},m.prototype.adoptionAgencyEndTag=function(e){var t;function n(e){return e===t}for(var o=0;o++<8;){if(!(t=this.elementInActiveFormattingElements(e))||this.openElements.contains(t)&&!this.openElements.inScope(t.localName))return this.parseError("adoption-agency-1.1",{name:e}),!1;if(!this.openElements.contains(t))return this.parseError("adoption-agency-1.2",{name:e}),this.removeElementFromActiveFormattingElements(t),!0;this.openElements.inScope(t.localName)||this.parseError("adoption-agency-4.4",{name:e}),t!=this.currentStackItem()&&this.parseError("adoption-agency-1.3",{name:e});var i=this.openElements.furthestBlockForFormattingElement(t.node);if(!i)return this.openElements.remove_openElements_until(n),this.removeElementFromActiveFormattingElements(t),!0;for(var s=this.openElements.elements.indexOf(t),a=this.openElements.item(s-1),r=this.activeFormattingElements.indexOf(t),c=i,d=i,u=this.openElements.elements.indexOf(c),p=0;p++<3;)if(u-=1,c=this.openElements.item(u),this.activeFormattingElements.indexOf(c)<0)this.openElements.elements.splice(u,1);else{if(c==t)break;d==i&&(r=this.activeFormattingElements.indexOf(c)+1);var h=this.createElement(c.namespaceURI,c.localName,c.attributes),g=new l(c.namespaceURI,c.localName,c.attributes,h);this.activeFormattingElements[this.activeFormattingElements.indexOf(c)]=g,this.openElements.elements[this.openElements.elements.indexOf(c)]=g,c=g,this.detachFromParent(d.node),this.attachNode(d.node,c.node),d=c}this.detachFromParent(d.node),a.isFosterParenting()?this.insertIntoFosterParent(d.node):this.attachNode(d.node,a.node),h=this.createElement("http://www.w3.org/1999/xhtml",t.localName,t.attributes);var m=new l(t.namespaceURI,t.localName,t.attributes,h);this.reparentChildren(i.node,h),this.attachNode(h,i.node),this.removeElementFromActiveFormattingElements(t),this.activeFormattingElements.splice(Math.min(r,this.activeFormattingElements.length),0,m),this.openElements.remove(t),this.openElements.elements.splice(this.openElements.elements.indexOf(i)+1,0,m)}return!0},m.prototype.start=function(){throw"Not mplemented"},m.prototype.startTokenization=function(e){if(this.tokenizer=e,this.compatMode="no quirks",this.originalInsertionMode="initial",this.framesetOk=!0,this.openElements=new r,this.activeFormattingElements=[],this.start(),this.context){switch(this.context){case"title":case"textarea":this.tokenizer.setState(a.RCDATA);break;case"style":case"xmp":case"iframe":case"noembed":case"noframes":this.tokenizer.setState(a.RAWTEXT);break;case"script":this.tokenizer.setState(a.SCRIPT_DATA);break;case"noscript":this.scriptingEnabled&&this.tokenizer.setState(a.RAWTEXT);break;case"plaintext":this.tokenizer.setState(a.PLAINTEXT)}this.insertHtmlElement(),"head"===this.context?this.insertHeadElement():this.insertBodyElement(),this.resetInsertionMode()}else this.setInsertionMode("initial")},m.prototype.processToken=function(e){this.selfClosingFlagAcknowledged=!1;var t,n=this.openElements.top||null;switch(t=!n||!n.isForeign()||n.isMathMLTextIntegrationPoint()&&("StartTag"==e.type&&!(e.name in{mglyph:0,malignmark:0})||"Characters"===e.type)||"http://www.w3.org/1998/Math/MathML"==n.namespaceURI&&"annotation-xml"==n.localName&&"StartTag"==e.type&&"svg"==e.name||n.isHtmlIntegrationPoint()&&e.type in{StartTag:0,Characters:0}||"EOF"==e.type?this.insertionMode:this.insertionModes.inForeignContent,e.type){case"Characters":var o=new g(e.data);t.processCharacters(o);break;case"Comment":t.processComment(e.data);break;case"StartTag":t.processStartTag(e.name,e.data,e.selfClosing);break;case"EndTag":t.processEndTag(e.name);break;case"Doctype":t.processDoctype(e.name,e.publicId,e.systemId,e.forceQuirks);break;case"EOF":t.processEOF()}},m.prototype.isCdataSectionAllowed=function(){return this.openElements.length>0&&this.currentStackItem().isForeign()},m.prototype.isSelfClosingFlagAcknowledged=function(){return this.selfClosingFlagAcknowledged},m.prototype.createElement=function(e,t,n){throw new Error("Not implemented")},m.prototype.attachNode=function(e,t){throw new Error("Not implemented")},m.prototype.attachNodeToFosterParent=function(e,t,n){throw new Error("Not implemented")},m.prototype.detachFromParent=function(e){throw new Error("Not implemented")},m.prototype.addAttributesToElement=function(e,t){throw new Error("Not implemented")},m.prototype.insertHtmlElement=function(e){var t=this.createElement("http://www.w3.org/1999/xhtml","html",e);return this.attachNode(t,this.document),this.openElements.pushHtmlElement(new l("http://www.w3.org/1999/xhtml","html",e,t)),t},m.prototype.insertHeadElement=function(e){var t=this.createElement("http://www.w3.org/1999/xhtml","head",e);return this.head=new l("http://www.w3.org/1999/xhtml","head",e,t),this.attachNode(t,this.openElements.top.node),this.openElements.pushHeadElement(this.head),t},m.prototype.insertBodyElement=function(e){var t=this.createElement("http://www.w3.org/1999/xhtml","body",e);return this.attachNode(t,this.openElements.top.node),this.openElements.pushBodyElement(new l("http://www.w3.org/1999/xhtml","body",e,t)),t},m.prototype.insertIntoFosterParent=function(e){var t=this.openElements.findIndex("table"),n=this.openElements.item(t).node;if(0===t)return this.attachNode(e,n);this.attachNodeToFosterParent(e,n,this.openElements.item(t-1).node)},m.prototype.insertElement=function(e,t,n,o){n||(n="http://www.w3.org/1999/xhtml");var i=this.createElement(n,e,t);this.shouldFosterParent()?this.insertIntoFosterParent(i):this.attachNode(i,this.openElements.top.node),o||this.openElements.push(new l(n,e,t,i))},m.prototype.insertFormattingElement=function(e,t){this.insertElement(e,t,"http://www.w3.org/1999/xhtml"),this.appendElementToActiveFormattingElements(this.currentStackItem())},m.prototype.insertSelfClosingElement=function(e,t){this.selfClosingFlagAcknowledged=!0,this.insertElement(e,t,"http://www.w3.org/1999/xhtml",!0)}, |
| 104 |
m.prototype.insertForeignElement=function(e,t,n,o){o&&(this.selfClosingFlagAcknowledged=!0),this.insertElement(e,t,n,o)},m.prototype.insertComment=function(e,t){throw new Error("Not implemented")},m.prototype.insertDoctype=function(e,t,n){throw new Error("Not implemented")},m.prototype.insertText=function(e){throw new Error("Not implemented")},m.prototype.currentStackItem=function(){return this.openElements.top},m.prototype.popElement=function(){return this.openElements.pop()},m.prototype.shouldFosterParent=function(){return this.redirectAttachToFosterParent&&this.currentStackItem().isFosterParenting()},m.prototype.generateImpliedEndTags=function(e){var t=this.openElements.top.localName;-1!=["dd","dt","li","option","optgroup","p","rp","rt"].indexOf(t)&&t!=e&&(this.popElement(),this.generateImpliedEndTags(e))},m.prototype.reconstructActiveFormattingElements=function(){if(0!==this.activeFormattingElements.length){var e=this.activeFormattingElements.length-1,t=this.activeFormattingElements[e];if(t!=c&&!this.openElements.contains(t)){for(;t!=c&&!this.openElements.contains(t)&&(e-=1,t=this.activeFormattingElements[e]););for(;;){e+=1,t=this.activeFormattingElements[e],this.insertElement(t.localName,t.attributes);var n=this.currentStackItem();if(this.activeFormattingElements[e]=n,n==this.activeFormattingElements[this.activeFormattingElements.length-1])break}}}},m.prototype.ensureNoahsArkCondition=function(e){if(!(this.activeFormattingElements.length<3)){for(var t=[],n=e.attributes.length,o=this.activeFormattingElements.length-1;o>=0&&(l=this.activeFormattingElements[o])!==c;o--)e.localName===l.localName&&e.namespaceURI===l.namespaceURI&&l.attributes.length==n&&t.push(l);if(!(t.length<3)){var i=[],s=e.attributes;for(o=0;o<s.length;o++){for(var a=s[o],r=0;r<t.length;r++){var l,d=h(l=t[r],a.nodeName);d&&d.nodeValue===a.nodeValue&&i.push(l)}if(i.length<3)return;t=i,i=[]}for(o=2;o<t.length;o++)this.removeElementFromActiveFormattingElements(t[o])}}},m.prototype.appendElementToActiveFormattingElements=function(e){this.ensureNoahsArkCondition(e),this.activeFormattingElements.push(e)},m.prototype.removeElementFromActiveFormattingElements=function(e){var t=this.activeFormattingElements.indexOf(e);t>=0&&this.activeFormattingElements.splice(t,1)},m.prototype.elementInActiveFormattingElements=function(e){for(var t=this.activeFormattingElements,n=t.length-1;n>=0&&t[n]!=c;n--)if(t[n].localName==e)return t[n];return!1},m.prototype.clearActiveFormattingElements=function(){for(;0!==this.activeFormattingElements.length&&this.activeFormattingElements.pop()!=c;);},m.prototype.reparentChildren=function(e,t){throw new Error("Not implemented")},m.prototype.setFragmentContext=function(e){this.context=e},m.prototype.parseError=function(e,t){if(this.errorHandler){var n=function(e,t){return e.replace(new RegExp("{[0-9a-z-]+}","gi"),(function(e){return t[e.slice(1,-1)]||e}))}(i[e],t);this.errorHandler.error(n,this.tokenizer._inputStream.location(),e)}},m.prototype.resetInsertionMode=function(){for(var e=!1,t=null,n=this.openElements.length-1;n>=0;n--){if(t=this.openElements.item(n),0===n&&(o.ok(this.context),e=!0,t=new l("http://www.w3.org/1999/xhtml",this.context,[],null)),"http://www.w3.org/1999/xhtml"===t.namespaceURI){if("select"===t.localName)return this.setInsertionMode("inSelect");if("td"===t.localName||"th"===t.localName)return this.setInsertionMode("inCell");if("tr"===t.localName)return this.setInsertionMode("inRow");if("tbody"===t.localName||"thead"===t.localName||"tfoot"===t.localName)return this.setInsertionMode("inTableBody");if("caption"===t.localName)return this.setInsertionMode("inCaption");if("colgroup"===t.localName)return this.setInsertionMode("inColumnGroup");if("table"===t.localName)return this.setInsertionMode("inTable");if("head"===t.localName)return this.setInsertionMode("inHead");if("body"===t.localName)return this.setInsertionMode("inBody");if("frameset"===t.localName)return this.setInsertionMode("inFrameset");if("html"===t.localName)return this.openElements.headElement?this.setInsertionMode("afterHead"):this.setInsertionMode("beforeHead")}if(e)return this.setInsertionMode("inBody")}},m.prototype.processGenericRCDATAStartTag=function(e,t){this.insertElement(e,t),this.tokenizer.setState(a.RCDATA),this.originalInsertionMode=this.insertionModeName,this.setInsertionMode("text")},m.prototype.processGenericRawTextStartTag=function(e,t){this.insertElement(e,t),this.tokenizer.setState(a.RAWTEXT),this.originalInsertionMode=this.insertionModeName,this.setInsertionMode("text")},m.prototype.adjustMathMLAttributes=function(e){return e.forEach((function(e){e.namespaceURI="http://www.w3.org/1998/Math/MathML",s.MATHMLAttributeMap[e.nodeName]&&(e.nodeName=s.MATHMLAttributeMap[e.nodeName])})),e},m.prototype.adjustSVGTagNameCase=function(e){return s.SVGTagMap[e]||e},m.prototype.adjustSVGAttributes=function(e){return e.forEach((function(e){e.namespaceURI="http://www.w3.org/2000/svg",s.SVGAttributeMap[e.nodeName]&&(e.nodeName=s.SVGAttributeMap[e.nodeName])})),e},m.prototype.adjustForeignAttributes=function(e){for(var t=0;t<e.length;t++){var n=e[t],o=s.ForeignAttributeMap[n.nodeName];o&&(n.nodeName=o.localName,n.prefix=o.prefix,n.namespaceURI=o.namespaceURI)}return e},n.TreeBuilder=m},{"./ElementStack":1,"./StackItem":4,"./Tokenizer":5,"./constants":7,"./messages.json":8,assert:13,events:16}],7:[function(e,t,n){n.SVGTagMap={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},n.MATHMLAttributeMap={definitionurl:"definitionURL"},n.SVGAttributeMap={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",externalresourcesrequired:"externalResourcesRequired",filterres:"filterRes",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX", |
| 105 |
targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},n.ForeignAttributeMap={"xlink:actuate":{prefix:"xlink",localName:"actuate",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:arcrole":{prefix:"xlink",localName:"arcrole",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:href":{prefix:"xlink",localName:"href",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:role":{prefix:"xlink",localName:"role",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:show":{prefix:"xlink",localName:"show",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:title":{prefix:"xlink",localName:"title",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:type":{prefix:"xlink",localName:"title",namespaceURI:"http://www.w3.org/1999/xlink"},"xml:base":{prefix:"xml",localName:"base",namespaceURI:"http://www.w3.org/XML/1998/namespace"},"xml:lang":{prefix:"xml",localName:"lang",namespaceURI:"http://www.w3.org/XML/1998/namespace"},"xml:space":{prefix:"xml",localName:"space",namespaceURI:"http://www.w3.org/XML/1998/namespace"},xmlns:{prefix:null,localName:"xmlns",namespaceURI:"http://www.w3.org/2000/xmlns/"},"xmlns:xlink":{prefix:"xmlns",localName:"xlink",namespaceURI:"http://www.w3.org/2000/xmlns/"}}},{}],8:[function(e,t,n){t.exports={"null-character":"Null character in input stream, replaced with U+FFFD.","invalid-codepoint":"Invalid codepoint in stream","incorrectly-placed-solidus":"Solidus (/) incorrectly placed in tag.","incorrect-cr-newline-entity":"Incorrect CR newline entity, replaced with LF.","illegal-windows-1252-entity":"Entity used with illegal number (windows-1252 reference).","cant-convert-numeric-entity":"Numeric entity couldn't be converted to character (codepoint U+{charAsInt}).","invalid-numeric-entity-replaced":"Numeric entity represents an illegal codepoint. Expanded to the C1 controls range.","numeric-entity-without-semicolon":"Numeric entity didn't end with ';'.","expected-numeric-entity-but-got-eof":"Numeric entity expected. Got end of file instead.","expected-numeric-entity":"Numeric entity expected but none found.","named-entity-without-semicolon":"Named entity didn't end with ';'.","expected-named-entity":"Named entity expected. Got none.","attributes-in-end-tag":"End tag contains unexpected attributes.","self-closing-flag-on-end-tag":"End tag contains unexpected self-closing flag.","bare-less-than-sign-at-eof":"End of file after <.","expected-tag-name-but-got-right-bracket":"Expected tag name. Got '>' instead.","expected-tag-name-but-got-question-mark":"Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)","expected-tag-name":"Expected tag name. Got something else instead.","expected-closing-tag-but-got-right-bracket":"Expected closing tag. Got '>' instead. Ignoring '</>'.","expected-closing-tag-but-got-eof":"Expected closing tag. Unexpected end of file.","expected-closing-tag-but-got-char":"Expected closing tag. Unexpected character '{data}' found.","eof-in-tag-name":"Unexpected end of file in the tag name.","expected-attribute-name-but-got-eof":"Unexpected end of file. Expected attribute name instead.","eof-in-attribute-name":"Unexpected end of file in attribute name.","invalid-character-in-attribute-name":"Invalid character in attribute name.","duplicate-attribute":"Dropped duplicate attribute '{name}' on tag.","expected-end-of-tag-but-got-eof":"Unexpected end of file. Expected = or end of tag.","expected-attribute-value-but-got-eof":"Unexpected end of file. Expected attribute value.","expected-attribute-value-but-got-right-bracket":"Expected attribute value. Got '>' instead.","unexpected-character-in-unquoted-attribute-value":"Unexpected character in unquoted attribute","invalid-character-after-attribute-name":"Unexpected character after attribute name.","unexpected-character-after-attribute-value":"Unexpected character after attribute value.","eof-in-attribute-value-double-quote":'Unexpected end of file in attribute value (").',"eof-in-attribute-value-single-quote":"Unexpected end of file in attribute value (').","eof-in-attribute-value-no-quotes":"Unexpected end of file in attribute value.","eof-after-attribute-value":"Unexpected end of file after attribute value.","unexpected-eof-after-solidus-in-tag":"Unexpected end of file in tag. Expected >.","unexpected-character-after-solidus-in-tag":"Unexpected character after / in tag. Expected >.","expected-dashes-or-doctype":"Expected '--' or 'DOCTYPE'. Not found.","unexpected-bang-after-double-dash-in-comment":"Unexpected ! after -- in comment.","incorrect-comment":"Incorrect comment.","eof-in-comment":"Unexpected end of file in comment.","eof-in-comment-end-dash":"Unexpected end of file in comment (-).","unexpected-dash-after-double-dash-in-comment":"Unexpected '-' after '--' found in comment.","eof-in-comment-double-dash":"Unexpected end of file in comment (--).","eof-in-comment-end-bang-state":"Unexpected end of file in comment.","unexpected-char-in-comment":"Unexpected character in comment found.","need-space-after-doctype":"No space after literal string 'DOCTYPE'.","expected-doctype-name-but-got-right-bracket":"Unexpected > character. Expected DOCTYPE name.","expected-doctype-name-but-got-eof":"Unexpected end of file. Expected DOCTYPE name.","eof-in-doctype-name":"Unexpected end of file in DOCTYPE name.","eof-in-doctype":"Unexpected end of file in DOCTYPE.","expected-space-or-right-bracket-in-doctype":"Expected space or '>'. Got '{data}'.","unexpected-end-of-doctype":"Unexpected end of DOCTYPE.","unexpected-char-in-doctype":"Unexpected character in DOCTYPE.","eof-in-bogus-doctype":"Unexpected end of file in bogus doctype.","eof-in-innerhtml":"Unexpected EOF in inner html mode.","unexpected-doctype":"Unexpected DOCTYPE. Ignored.","non-html-root":"html needs to be the first start tag.","expected-doctype-but-got-eof":"Unexpected End of file. Expected DOCTYPE.","unknown-doctype":"Erroneous DOCTYPE. Expected <!DOCTYPE html>.","quirky-doctype":"Quirky doctype. Expected <!DOCTYPE html>.","almost-standards-doctype":"Almost standards mode doctype. Expected <!DOCTYPE html>.","obsolete-doctype":"Obsolete doctype. Expected <!DOCTYPE html>.","expected-doctype-but-got-chars":"Non-space characters found without seeing a doctype first. Expected e.g. <!DOCTYPE html>.","expected-doctype-but-got-start-tag":"Start tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE html>.","expected-doctype-but-got-end-tag":"End tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE html>.","end-tag-after-implied-root":"Unexpected end tag ({name}) after the (implied) root element.","expected-named-closing-tag-but-got-eof":"Unexpected end of file. Expected end tag ({name}).","two-heads-are-not-better-than-one":"Unexpected start tag head in existing head. Ignored.","unexpected-end-tag":"Unexpected end tag ({name}). Ignored.","unexpected-implied-end-tag":"End tag {name} implied, but there were open elements.","unexpected-start-tag-out-of-my-head":"Unexpected start tag ({name}) that can be in head. Moved.","unexpected-start-tag":"Unexpected start tag ({name}).","missing-end-tag":"Missing end tag ({name}).","missing-end-tags":"Missing end tags ({name}).","unexpected-start-tag-implies-end-tag":"Unexpected start tag ({startName}) implies end tag ({endName}).","unexpected-start-tag-treated-as":"Unexpected start tag ({originalName}). Treated as {newName}.","deprecated-tag":"Unexpected start tag {name}. Don't use it!","unexpected-start-tag-ignored":"Unexpected start tag {name}. Ignored.","expected-one-end-tag-but-got-another":"Unexpected end tag ({gotName}). Missing end tag ({expectedName}).","end-tag-too-early":"End tag ({name}) seen too early. Expected other end tag.","end-tag-too-early-named":"Unexpected end tag ({gotName}). Expected end tag ({expectedName}.","end-tag-too-early-ignored":"End tag ({name}) seen too early. Ignored.", |
| 106 |
"adoption-agency-1.1":"End tag ({name}) violates step 1, paragraph 1 of the adoption agency algorithm.","adoption-agency-1.2":"End tag ({name}) violates step 1, paragraph 2 of the adoption agency algorithm.","adoption-agency-1.3":"End tag ({name}) violates step 1, paragraph 3 of the adoption agency algorithm.","adoption-agency-4.4":"End tag ({name}) violates step 4, paragraph 4 of the adoption agency algorithm.","unexpected-end-tag-treated-as":"Unexpected end tag ({originalName}). Treated as {newName}.","no-end-tag":"This element ({name}) has no end tag.","unexpected-implied-end-tag-in-table":"Unexpected implied end tag ({name}) in the table phase.","unexpected-implied-end-tag-in-table-body":"Unexpected implied end tag ({name}) in the table body phase.","unexpected-char-implies-table-voodoo":"Unexpected non-space characters in table context caused voodoo mode.","unexpected-hidden-input-in-table":"Unexpected input with type hidden in table context.","unexpected-form-in-table":"Unexpected form in table context.","unexpected-start-tag-implies-table-voodoo":"Unexpected start tag ({name}) in table context caused voodoo mode.","unexpected-end-tag-implies-table-voodoo":"Unexpected end tag ({name}) in table context caused voodoo mode.","unexpected-cell-in-table-body":"Unexpected table cell start tag ({name}) in the table body phase.","unexpected-cell-end-tag":"Got table cell end tag ({name}) while required end tags are missing.","unexpected-end-tag-in-table-body":"Unexpected end tag ({name}) in the table body phase. Ignored.","unexpected-implied-end-tag-in-table-row":"Unexpected implied end tag ({name}) in the table row phase.","unexpected-end-tag-in-table-row":"Unexpected end tag ({name}) in the table row phase. Ignored.","unexpected-select-in-select":"Unexpected select start tag in the select phase treated as select end tag.","unexpected-input-in-select":"Unexpected input start tag in the select phase.","unexpected-start-tag-in-select":"Unexpected start tag token ({name}) in the select phase. Ignored.","unexpected-end-tag-in-select":"Unexpected end tag ({name}) in the select phase. Ignored.","unexpected-table-element-start-tag-in-select-in-table":"Unexpected table element start tag ({name}) in the select in table phase.","unexpected-table-element-end-tag-in-select-in-table":"Unexpected table element end tag ({name}) in the select in table phase.","unexpected-char-after-body":"Unexpected non-space characters in the after body phase.","unexpected-start-tag-after-body":"Unexpected start tag token ({name}) in the after body phase.","unexpected-end-tag-after-body":"Unexpected end tag token ({name}) in the after body phase.","unexpected-char-in-frameset":"Unepxected characters in the frameset phase. Characters ignored.","unexpected-start-tag-in-frameset":"Unexpected start tag token ({name}) in the frameset phase. Ignored.","unexpected-frameset-in-frameset-innerhtml":"Unexpected end tag token (frameset in the frameset phase (innerHTML).","unexpected-end-tag-in-frameset":"Unexpected end tag token ({name}) in the frameset phase. Ignored.","unexpected-char-after-frameset":"Unexpected non-space characters in the after frameset phase. Ignored.","unexpected-start-tag-after-frameset":"Unexpected start tag ({name}) in the after frameset phase. Ignored.","unexpected-end-tag-after-frameset":"Unexpected end tag ({name}) in the after frameset phase. Ignored.","expected-eof-but-got-char":"Unexpected non-space characters. Expected end of file.","expected-eof-but-got-start-tag":"Unexpected start tag ({name}). Expected end of file.","expected-eof-but-got-end-tag":"Unexpected end tag ({name}). Expected end of file.","unexpected-end-table-in-caption":"Unexpected end table tag in caption. Generates implied end caption.","end-html-in-innerhtml":"Unexpected html end tag in inner html mode.","eof-in-table":"Unexpected end of file. Expected table content.","eof-in-script":"Unexpected end of file. Expected script content.","non-void-element-with-trailing-solidus":"Trailing solidus not allowed on element {name}.","unexpected-html-element-in-foreign-content":'HTML start tag "{name}" in a foreign namespace context.',"unexpected-start-tag-in-table":"Unexpected {name}. Expected table content."}},{}],9:[function(e,t,n){var o=e("./SAXTreeBuilder").SAXTreeBuilder,i=e("../Tokenizer").Tokenizer,s=e("./TreeParser").TreeParser;function a(){this.contentHandler=null,this._errorHandler=null,this._treeBuilder=new o,this._tokenizer=new i(this._treeBuilder),this._scriptingEnabled=!1}a.prototype.parse=function(e,t){t&&this._treeBuilder.setFragmentContext(t),this._tokenizer.tokenize(e);var n=this._treeBuilder.document;n&&new s(this.contentHandler).parse(n)},a.prototype.parseFragment=function(e,t){this._treeBuilder.setFragmentContext(t),this._tokenizer.tokenize(e);var n=this._treeBuilder.getFragment();n&&new s(this.contentHandler).parse(n)},Object.defineProperty(a.prototype,"scriptingEnabled",{get:function(){return this._scriptingEnabled},set:function(e){this._scriptingEnabled=e,this._treeBuilder.scriptingEnabled=e}}),Object.defineProperty(a.prototype,"errorHandler",{get:function(){return this._errorHandler},set:function(e){this._errorHandler=e,this._treeBuilder.errorHandler=e}}),n.SAXParser=a},{"../Tokenizer":5,"./SAXTreeBuilder":10,"./TreeParser":11}],10:[function(e,t,n){var o=e("util"),i=e("../TreeBuilder").TreeBuilder;function s(){i.call(this)}function a(e,t){for(var n=0;n<e.attributes.length;n++){var o=e.attributes[n];if(o.nodeName===t)return o.nodeValue}}o.inherits(s,i),s.prototype.start=function(e){this.document=new d(this.tokenizer)},s.prototype.end=function(){this.document.endLocator=this.tokenizer},s.prototype.insertDoctype=function(e,t,n){var o=new v(this.tokenizer,e,t,n);o.endLocator=this.tokenizer,this.document.appendChild(o)},s.prototype.createElement=function(e,t,n){return new p(this.tokenizer,e,t,t,n||[])},s.prototype.insertComment=function(e,t){t||(t=this.currentStackItem());var n=new m(this.tokenizer,e);t.appendChild(n)},s.prototype.appendCharacters=function(e,t){var n=new h(this.tokenizer,t);e.appendChild(n)},s.prototype.insertText=function(e){if(this.redirectAttachToFosterParent&&this.openElements.top.isFosterParenting()){var t=this.openElements.findIndex("table"),n=this.openElements.item(t).node;if(0===t)return this.appendCharacters(n,e);var o=new h(this.tokenizer,e),i=n.parentNode;return i?void i.insertBetween(o,n.previousSibling,n):void this.openElements.item(t-1).node.appendChild(o)}this.appendCharacters(this.currentStackItem().node,e)},s.prototype.attachNode=function(e,t){t.appendChild(e)},s.prototype.attachNodeToFosterParent=function(e,t,n){var o=t.parentNode;o?o.insertBetween(e,t.previousSibling,t):n.appendChild(e)},s.prototype.detachFromParent=function(e){e.detach()},s.prototype.reparentChildren=function(e,t){t.appendChildren(e.firstChild)},s.prototype.getFragment=function(){var e=new u;return this.reparentChildren(this.openElements.rootNode,e),e},s.prototype.addAttributesToElement=function(e,t){for(var n=0;n<t.length;n++){var o=t[n];a(e,o.nodeName)||e.attributes.push(o)}};var r={CDATA:1,CHARACTERS:2,COMMENT:3,DOCUMENT:4,DOCUMENT_FRAGMENT:5,DTD:6,ELEMENT:7,ENTITY:8,IGNORABLE_WHITESPACE:9,PROCESSING_INSTRUCTION:10,SKIPPED_ENTITY:11};function l(e){e?(this.columnNumber=e.columnNumber,this.lineNumber=e.lineNumber):(this.columnNumber=-1,this.lineNumber=-1),this.parentNode=null,this.nextSibling=null,this.firstChild=null}function c(e){l.call(this,e),this.lastChild=null,this._endLocator=null}function d(e){c.call(this,e),this.nodeType=r.DOCUMENT}function u(){c.call(this,new Locator),this.nodeType=r.DOCUMENT_FRAGMENT}function p(e,t,n,o,i,s){c.call(this,e),this.uri=t,this.localName=n,this.qName=o,this.attributes=i,this.prefixMappings=s,this.nodeType=r.ELEMENT}function h(e,t){l.call(this,e),this.data=t,this.nodeType=r.CHARACTERS}function g(e,t){l.call(this,e),this.data=t,this.nodeType=r.IGNORABLE_WHITESPACE}function m(e,t){l.call(this,e),this.data=t,this.nodeType=r.COMMENT}function b(e){ |
| 107 |
c.call(this,e),this.nodeType=r.CDATA}function f(e){c.call(this),this.name=e,this.nodeType=r.ENTITY}function x(e){l.call(this),this.name=e,this.nodeType=r.SKIPPED_ENTITY}function y(e,t){l.call(this),this.target=e,this.data=t}function v(e,t,n){c.call(this),this.name=e,this.publicIdentifier=t,this.systemIdentifier=n,this.nodeType=r.DTD}l.prototype.visit=function(e){throw new Error("Not Implemented")},l.prototype.revisit=function(e){},l.prototype.detach=function(){null!==this.parentNode&&(this.parentNode.removeChild(this),this.parentNode=null)},Object.defineProperty(l.prototype,"previousSibling",{get:function(){for(var e=null,t=this.parentNode.firstChild;;){if(this==t)return e;e=t,t=t.nextSibling}}}),c.prototype=Object.create(l.prototype),c.prototype.insertBefore=function(e,t){if(!t)return this.appendChild(e);if(e.detach(),e.parentNode=this,this.firstChild==t)e.nextSibling=t,this.firstChild=e;else{for(var n=this.firstChild,o=this.firstChild.nextSibling;o!=t;)n=o,o=o.nextSibling;n.nextSibling=e,e.nextSibling=o}return e},c.prototype.insertBetween=function(e,t,n){return n?(e.detach(),e.parentNode=this,e.nextSibling=n,t?t.nextSibling=e:firstChild=e,e):this.appendChild(e)},c.prototype.appendChild=function(e){return e.detach(),e.parentNode=this,this.firstChild?this.lastChild.nextSibling=e:this.firstChild=e,this.lastChild=e,e},c.prototype.appendChildren=function(e){var t=e.firstChild;if(t){var n=e;this.firstChild?this.lastChild.nextSibling=t:this.firstChild=t,this.lastChild=n.lastChild;do{t.parentNode=this}while(t=t.nextSibling);n.firstChild=null,n.lastChild=null}},c.prototype.removeChild=function(e){if(this.firstChild==e)this.firstChild=e.nextSibling,this.lastChild==e&&(this.lastChild=null);else{for(var t=this.firstChild,n=this.firstChild.nextSibling;n!=e;)t=n,n=n.nextSibling;t.nextSibling=e.nextSibling,this.lastChild==e&&(this.lastChild=t)}return e.parentNode=null,e},Object.defineProperty(c.prototype,"endLocator",{get:function(){return this._endLocator},set:function(e){this._endLocator={lineNumber:e.lineNumber,columnNumber:e.columnNumber}}}),d.prototype=Object.create(c.prototype),d.prototype.visit=function(e){e.startDocument(this)},d.prototype.revisit=function(e){e.endDocument(this.endLocator)},u.prototype=Object.create(c.prototype),u.prototype.visit=function(e){},p.prototype=Object.create(c.prototype),p.prototype.visit=function(e){if(this.prefixMappings)for(var t in prefixMappings){var n=prefixMappings[t];e.startPrefixMapping(n.getPrefix(),n.getUri(),this)}e.startElement(this.uri,this.localName,this.qName,this.attributes,this)},p.prototype.revisit=function(e){if(e.endElement(this.uri,this.localName,this.qName,this.endLocator),this.prefixMappings)for(var t in prefixMappings){var n=prefixMappings[t];e.endPrefixMapping(n.getPrefix(),this.endLocator)}},h.prototype=Object.create(l.prototype),h.prototype.visit=function(e){e.characters(this.data,0,this.data.length,this)},g.prototype=Object.create(l.prototype),g.prototype.visit=function(e){e.ignorableWhitespace(this.data,0,this.data.length,this)},m.prototype=Object.create(l.prototype),m.prototype.visit=function(e){e.comment(this.data,0,this.data.length,this)},b.prototype=Object.create(c.prototype),b.prototype.visit=function(e){e.startCDATA(this)},b.prototype.revisit=function(e){e.endCDATA(this.endLocator)},f.prototype=Object.create(c.prototype),f.prototype.visit=function(e){e.startEntity(this.name,this)},f.prototype.revisit=function(e){e.endEntity(this.name)},x.prototype=Object.create(l.prototype),x.prototype.visit=function(e){e.skippedEntity(this.name,this)},y.prototype=Object.create(l.prototype),y.prototype.visit=function(e){e.processingInstruction(this.target,this.data,this)},y.prototype.getNodeType=function(){return r.PROCESSING_INSTRUCTION},v.prototype=Object.create(c.prototype),v.prototype.visit=function(e){e.startDTD(this.name,this.publicIdentifier,this.systemIdentifier,this)},v.prototype.revisit=function(e){e.endDTD()},n.SAXTreeBuilder=s},{"../TreeBuilder":6,util:20}],11:[function(e,t,n){function o(e,t){if(this.contentHandler,this.lexicalHandler,this.locatorDelegate,!e)throw new IllegalArgumentException("contentHandler was null.");this.contentHandler=e,this.lexicalHandler=t||new i}function i(){}o.prototype.parse=function(e){this.contentHandler.documentLocator=this;for(var t,n=e;;)if(n.visit(this),t=n.firstChild)n=t;else for(;;){if(n.revisit(this),n==e)return;if(t=n.nextSibling){n=t;break}n=n.parentNode}},o.prototype.characters=function(e,t,n,o){this.locatorDelegate=o,this.contentHandler.characters(e,t,n)},o.prototype.endDocument=function(e){this.locatorDelegate=e,this.contentHandler.endDocument()},o.prototype.endElement=function(e,t,n,o){this.locatorDelegate=o,this.contentHandler.endElement(e,t,n)},o.prototype.endPrefixMapping=function(e,t){this.locatorDelegate=t,this.contentHandler.endPrefixMapping(e)},o.prototype.ignorableWhitespace=function(e,t,n,o){this.locatorDelegate=o,this.contentHandler.ignorableWhitespace(e,t,n)},o.prototype.processingInstruction=function(e,t,n){this.locatorDelegate=n,this.contentHandler.processingInstruction(e,t)},o.prototype.skippedEntity=function(e,t){this.locatorDelegate=t,this.contentHandler.skippedEntity(e)},o.prototype.startDocument=function(e){this.locatorDelegate=e,this.contentHandler.startDocument()},o.prototype.startElement=function(e,t,n,o,i){this.locatorDelegate=i,this.contentHandler.startElement(e,t,n,o)},o.prototype.startPrefixMapping=function(e,t,n){this.locatorDelegate=n,this.contentHandler.startPrefixMapping(e,t)},o.prototype.comment=function(e,t,n,o){this.locatorDelegate=o,this.lexicalHandler.comment(e,t,n)},o.prototype.endCDATA=function(e){this.locatorDelegate=e,this.lexicalHandler.endCDATA()},o.prototype.endDTD=function(e){this.locatorDelegate=e,this.lexicalHandler.endDTD()},o.prototype.endEntity=function(e,t){this.locatorDelegate=t,this.lexicalHandler.endEntity(e)},o.prototype.startCDATA=function(e){this.locatorDelegate=e,this.lexicalHandler.startCDATA()},o.prototype.startDTD=function(e,t,n,o){this.locatorDelegate=o,this.lexicalHandler.startDTD(e,t,n)},o.prototype.startEntity=function(e,t){this.locatorDelegate=t,this.lexicalHandler.startEntity(e)},Object.defineProperty(o.prototype,"columnNumber",{get:function(){return this.locatorDelegate?this.locatorDelegate.columnNumber:-1}}),Object.defineProperty(o.prototype,"lineNumber",{get:function(){return this.locatorDelegate?this.locatorDelegate.lineNumber:-1}}),i.prototype.comment=function(){},i.prototype.endCDATA=function(){},i.prototype.endDTD=function(){},i.prototype.endEntity=function(){},i.prototype.startCDATA=function(){},i.prototype.startDTD=function(){},i.prototype.startEntity=function(){},n.TreeParser=o},{}],12:[function(e,t,n){t.exports={"Aacute;":"Á",Aacute:"Á","aacute;":"á",aacute:"á","Abreve;":"Ă","abreve;":"ă","ac;":"∾","acd;":"∿","acE;":"∾̳","Acirc;":"Â",Acirc:"Â","acirc;":"â",acirc:"â","acute;":"´",acute:"´","Acy;":"А","acy;":"а","AElig;":"Æ",AElig:"Æ","aelig;":"æ",aelig:"æ","af;":"","Afr;":"𝔄","afr;":"𝔞","Agrave;":"À",Agrave:"À","agrave;":"à",agrave:"à","alefsym;":"ℵ","aleph;":"ℵ","Alpha;":"Α","alpha;":"α","Amacr;":"Ā","amacr;":"ā","amalg;":"⨿","amp;":"&",amp:"&","AMP;":"&",AMP:"&","andand;":"⩕","And;":"⩓","and;":"∧","andd;":"⩜","andslope;":"⩘","andv;":"⩚","ang;":"∠","ange;":"⦤","angle;":"∠","angmsdaa;":"⦨","angmsdab;":"⦩","angmsdac;":"⦪","angmsdad;":"⦫","angmsdae;":"⦬","angmsdaf;":"⦭","angmsdag;":"⦮","angmsdah;":"⦯","angmsd;":"∡","angrt;":"∟","angrtvb;":"⊾","angrtvbd;":"⦝","angsph;":"∢","angst;":"Å","angzarr;":"⍼","Aogon;":"Ą","aogon;":"ą","Aopf;":"𝔸","aopf;":"𝕒","apacir;":"⩯","ap;":"≈","apE;":"⩰","ape;":"≊","apid;":"≋","apos;":"'","ApplyFunction;":"","approx;":"≈","approxeq;":"≊","Aring;":"Å",Aring:"Å","aring;":"å",aring:"å","Ascr;":"𝒜","ascr;":"𝒶","Assign;":"≔","ast;":"*","asymp;":"≈","asympeq;":"≍","Atilde;":"Ã",Atilde:"Ã","atilde;":"ã",atilde:"ã","Auml;":"Ä",Auml:"Ä","auml;":"ä",auml:"ä","awconint;":"∳","awint;":"⨑","backcong;":"≌","backepsilon;":"϶","backprime;":"‵","backsim;":"∽", |
| 108 |
"backsimeq;":"⋍","Backslash;":"∖","Barv;":"⫧","barvee;":"⊽","barwed;":"⌅","Barwed;":"⌆","barwedge;":"⌅","bbrk;":"⎵","bbrktbrk;":"⎶","bcong;":"≌","Bcy;":"Б","bcy;":"б","bdquo;":"„","becaus;":"∵","because;":"∵","Because;":"∵","bemptyv;":"⦰","bepsi;":"϶","bernou;":"ℬ","Bernoullis;":"ℬ","Beta;":"Β","beta;":"β","beth;":"ℶ","between;":"≬","Bfr;":"𝔅","bfr;":"𝔟","bigcap;":"⋂","bigcirc;":"◯","bigcup;":"⋃","bigodot;":"⨀","bigoplus;":"⨁","bigotimes;":"⨂","bigsqcup;":"⨆","bigstar;":"★","bigtriangledown;":"▽","bigtriangleup;":"△","biguplus;":"⨄","bigvee;":"⋁","bigwedge;":"⋀","bkarow;":"⤍","blacklozenge;":"⧫","blacksquare;":"▪","blacktriangle;":"▴","blacktriangledown;":"▾","blacktriangleleft;":"◂","blacktriangleright;":"▸","blank;":"␣","blk12;":"▒","blk14;":"░","blk34;":"▓","block;":"█","bne;":"=⃥","bnequiv;":"≡⃥","bNot;":"⫭","bnot;":"⌐","Bopf;":"𝔹","bopf;":"𝕓","bot;":"⊥","bottom;":"⊥","bowtie;":"⋈","boxbox;":"⧉","boxdl;":"┐","boxdL;":"╕","boxDl;":"╖","boxDL;":"╗","boxdr;":"┌","boxdR;":"╒","boxDr;":"╓","boxDR;":"╔","boxh;":"─","boxH;":"═","boxhd;":"┬","boxHd;":"╤","boxhD;":"╥","boxHD;":"╦","boxhu;":"┴","boxHu;":"╧","boxhU;":"╨","boxHU;":"╩","boxminus;":"⊟","boxplus;":"⊞","boxtimes;":"⊠","boxul;":"┘","boxuL;":"╛","boxUl;":"╜","boxUL;":"╝","boxur;":"└","boxuR;":"╘","boxUr;":"╙","boxUR;":"╚","boxv;":"│","boxV;":"║","boxvh;":"┼","boxvH;":"╪","boxVh;":"╫","boxVH;":"╬","boxvl;":"┤","boxvL;":"╡","boxVl;":"╢","boxVL;":"╣","boxvr;":"├","boxvR;":"╞","boxVr;":"╟","boxVR;":"╠","bprime;":"‵","breve;":"˘","Breve;":"˘","brvbar;":"¦",brvbar:"¦","bscr;":"𝒷","Bscr;":"ℬ","bsemi;":"⁏","bsim;":"∽","bsime;":"⋍","bsolb;":"⧅","bsol;":"\\","bsolhsub;":"⟈","bull;":"•","bullet;":"•","bump;":"≎","bumpE;":"⪮","bumpe;":"≏","Bumpeq;":"≎","bumpeq;":"≏","Cacute;":"Ć","cacute;":"ć","capand;":"⩄","capbrcup;":"⩉","capcap;":"⩋","cap;":"∩","Cap;":"⋒","capcup;":"⩇","capdot;":"⩀","CapitalDifferentialD;":"ⅅ","caps;":"∩︀","caret;":"⁁","caron;":"ˇ","Cayleys;":"ℭ","ccaps;":"⩍","Ccaron;":"Č","ccaron;":"č","Ccedil;":"Ç",Ccedil:"Ç","ccedil;":"ç",ccedil:"ç","Ccirc;":"Ĉ","ccirc;":"ĉ","Cconint;":"∰","ccups;":"⩌","ccupssm;":"⩐","Cdot;":"Ċ","cdot;":"ċ","cedil;":"¸",cedil:"¸","Cedilla;":"¸","cemptyv;":"⦲","cent;":"¢",cent:"¢","centerdot;":"·","CenterDot;":"·","cfr;":"𝔠","Cfr;":"ℭ","CHcy;":"Ч","chcy;":"ч","check;":"✓","checkmark;":"✓","Chi;":"Χ","chi;":"χ","circ;":"ˆ","circeq;":"≗","circlearrowleft;":"↺","circlearrowright;":"↻","circledast;":"⊛","circledcirc;":"⊚","circleddash;":"⊝","CircleDot;":"⊙","circledR;":"®","circledS;":"Ⓢ","CircleMinus;":"⊖","CirclePlus;":"⊕","CircleTimes;":"⊗","cir;":"○","cirE;":"⧃","cire;":"≗","cirfnint;":"⨐","cirmid;":"⫯","cirscir;":"⧂","ClockwiseContourIntegral;":"∲","CloseCurlyDoubleQuote;":"”","CloseCurlyQuote;":"’","clubs;":"♣","clubsuit;":"♣","colon;":":","Colon;":"∷","Colone;":"⩴","colone;":"≔","coloneq;":"≔","comma;":",","commat;":"@","comp;":"∁","compfn;":"∘","complement;":"∁","complexes;":"ℂ","cong;":"≅","congdot;":"⩭","Congruent;":"≡","conint;":"∮","Conint;":"∯","ContourIntegral;":"∮","copf;":"𝕔","Copf;":"ℂ","coprod;":"∐","Coproduct;":"∐","copy;":"©",copy:"©","COPY;":"©",COPY:"©","copysr;":"℗","CounterClockwiseContourIntegral;":"∳","crarr;":"↵","cross;":"✗","Cross;":"⨯","Cscr;":"𝒞","cscr;":"𝒸","csub;":"⫏","csube;":"⫑","csup;":"⫐","csupe;":"⫒","ctdot;":"⋯","cudarrl;":"⤸","cudarrr;":"⤵","cuepr;":"⋞","cuesc;":"⋟","cularr;":"↶","cularrp;":"⤽","cupbrcap;":"⩈","cupcap;":"⩆","CupCap;":"≍","cup;":"∪","Cup;":"⋓","cupcup;":"⩊","cupdot;":"⊍","cupor;":"⩅","cups;":"∪︀","curarr;":"↷","curarrm;":"⤼","curlyeqprec;":"⋞","curlyeqsucc;":"⋟","curlyvee;":"⋎","curlywedge;":"⋏","curren;":"¤",curren:"¤","curvearrowleft;":"↶","curvearrowright;":"↷","cuvee;":"⋎","cuwed;":"⋏","cwconint;":"∲","cwint;":"∱","cylcty;":"⌭","dagger;":"†","Dagger;":"‡","daleth;":"ℸ","darr;":"↓","Darr;":"↡","dArr;":"⇓","dash;":"‐","Dashv;":"⫤","dashv;":"⊣","dbkarow;":"⤏","dblac;":"˝","Dcaron;":"Ď","dcaron;":"ď","Dcy;":"Д","dcy;":"д","ddagger;":"‡","ddarr;":"⇊","DD;":"ⅅ","dd;":"ⅆ","DDotrahd;":"⤑","ddotseq;":"⩷","deg;":"°",deg:"°","Del;":"∇","Delta;":"Δ","delta;":"δ","demptyv;":"⦱","dfisht;":"⥿","Dfr;":"𝔇","dfr;":"𝔡","dHar;":"⥥","dharl;":"⇃","dharr;":"⇂","DiacriticalAcute;":"´","DiacriticalDot;":"˙","DiacriticalDoubleAcute;":"˝","DiacriticalGrave;":"`","DiacriticalTilde;":"˜","diam;":"⋄","diamond;":"⋄","Diamond;":"⋄","diamondsuit;":"♦","diams;":"♦","die;":"¨","DifferentialD;":"ⅆ","digamma;":"ϝ","disin;":"⋲","div;":"÷","divide;":"÷",divide:"÷","divideontimes;":"⋇","divonx;":"⋇","DJcy;":"Ђ","djcy;":"ђ","dlcorn;":"⌞","dlcrop;":"⌍","dollar;":"$","Dopf;":"𝔻","dopf;":"𝕕","Dot;":"¨","dot;":"˙","DotDot;":"⃜","doteq;":"≐","doteqdot;":"≑","DotEqual;":"≐","dotminus;":"∸","dotplus;":"∔","dotsquare;":"⊡","doublebarwedge;":"⌆","DoubleContourIntegral;":"∯","DoubleDot;":"¨","DoubleDownArrow;":"⇓","DoubleLeftArrow;":"⇐","DoubleLeftRightArrow;":"⇔","DoubleLeftTee;":"⫤","DoubleLongLeftArrow;":"⟸","DoubleLongLeftRightArrow;":"⟺","DoubleLongRightArrow;":"⟹","DoubleRightArrow;":"⇒","DoubleRightTee;":"⊨","DoubleUpArrow;":"⇑","DoubleUpDownArrow;":"⇕","DoubleVerticalBar;":"∥","DownArrowBar;":"⤓","downarrow;":"↓","DownArrow;":"↓","Downarrow;":"⇓","DownArrowUpArrow;":"⇵","DownBreve;":"̑","downdownarrows;":"⇊","downharpoonleft;":"⇃","downharpoonright;":"⇂","DownLeftRightVector;":"⥐","DownLeftTeeVector;":"⥞","DownLeftVectorBar;":"⥖","DownLeftVector;":"↽","DownRightTeeVector;":"⥟","DownRightVectorBar;":"⥗","DownRightVector;":"⇁","DownTeeArrow;":"↧","DownTee;":"⊤","drbkarow;":"⤐","drcorn;":"⌟","drcrop;":"⌌","Dscr;":"𝒟","dscr;":"𝒹","DScy;":"Ѕ","dscy;":"ѕ","dsol;":"⧶","Dstrok;":"Đ","dstrok;":"đ","dtdot;":"⋱","dtri;":"▿","dtrif;":"▾","duarr;":"⇵","duhar;":"⥯","dwangle;":"⦦","DZcy;":"Џ","dzcy;":"џ","dzigrarr;":"⟿","Eacute;":"É",Eacute:"É","eacute;":"é",eacute:"é","easter;":"⩮","Ecaron;":"Ě","ecaron;":"ě","Ecirc;":"Ê",Ecirc:"Ê","ecirc;":"ê",ecirc:"ê","ecir;":"≖","ecolon;":"≕","Ecy;":"Э","ecy;":"э","eDDot;":"⩷","Edot;":"Ė","edot;":"ė","eDot;":"≑","ee;":"ⅇ","efDot;":"≒","Efr;":"𝔈","efr;":"𝔢","eg;":"⪚","Egrave;":"È",Egrave:"È","egrave;":"è",egrave:"è","egs;":"⪖","egsdot;":"⪘","el;":"⪙","Element;":"∈","elinters;":"⏧","ell;":"ℓ","els;":"⪕","elsdot;":"⪗","Emacr;":"Ē","emacr;":"ē","empty;":"∅","emptyset;":"∅","EmptySmallSquare;":"◻","emptyv;":"∅","EmptyVerySmallSquare;":"▫","emsp13;":" ","emsp14;":" ","emsp;":" ","ENG;":"Ŋ","eng;":"ŋ","ensp;":" ","Eogon;":"Ę","eogon;":"ę","Eopf;":"𝔼","eopf;":"𝕖","epar;":"⋕","eparsl;":"⧣","eplus;":"⩱","epsi;":"ε","Epsilon;":"Ε","epsilon;":"ε","epsiv;":"ϵ","eqcirc;":"≖","eqcolon;":"≕","eqsim;":"≂","eqslantgtr;":"⪖","eqslantless;":"⪕","Equal;":"⩵","equals;":"=","EqualTilde;":"≂","equest;":"≟","Equilibrium;":"⇌","equiv;":"≡","equivDD;":"⩸","eqvparsl;":"⧥","erarr;":"⥱","erDot;":"≓","escr;":"ℯ","Escr;":"ℰ","esdot;":"≐","Esim;":"⩳","esim;":"≂","Eta;":"Η","eta;":"η","ETH;":"Ð",ETH:"Ð","eth;":"ð",eth:"ð","Euml;":"Ë",Euml:"Ë","euml;":"ë",euml:"ë","euro;":"€","excl;":"!","exist;":"∃","Exists;":"∃","expectation;":"ℰ","exponentiale;":"ⅇ","ExponentialE;":"ⅇ","fallingdotseq;":"≒","Fcy;":"Ф","fcy;":"ф","female;":"♀","ffilig;":"ffi","fflig;":"ff","ffllig;":"ffl","Ffr;":"𝔉","ffr;":"𝔣","filig;":"fi","FilledSmallSquare;":"◼","FilledVerySmallSquare;":"▪","fjlig;":"fj","flat;":"♭","fllig;":"fl","fltns;":"▱","fnof;":"ƒ","Fopf;":"𝔽","fopf;":"𝕗","forall;":"∀","ForAll;":"∀","fork;":"⋔","forkv;":"⫙","Fouriertrf;":"ℱ","fpartint;":"⨍","frac12;":"½",frac12:"½","frac13;":"⅓","frac14;":"¼",frac14:"¼","frac15;":"⅕","frac16;":"⅙","frac18;":"⅛","frac23;":"⅔","frac25;":"⅖","frac34;":"¾",frac34:"¾","frac35;":"⅗","frac38;":"⅜","frac45;":"⅘","frac56;":"⅚","frac58;":"⅝","frac78;":"⅞","frasl;":"⁄","frown;":"⌢","fscr;":"𝒻","Fscr;":"ℱ","gacute;":"ǵ","Gamma;":"Γ","gamma;":"γ","Gammad;":"Ϝ","gammad;":"ϝ","gap;":"⪆","Gbreve;":"Ğ","gbreve;":"ğ","Gcedil;":"Ģ","Gcirc;":"Ĝ","gcirc;":"ĝ","Gcy;":"Г","gcy;":"г","Gdot;":"Ġ","gdot;":"ġ","ge;":"≥","gE;":"≧","gEl;":"⪌","gel;":"⋛","geq;":"≥","geqq;":"≧","geqslant;":"⩾","gescc;":"⪩","ges;":"⩾","gesdot;":"⪀","gesdoto;":"⪂", |
| 109 |
"gesdotol;":"⪄","gesl;":"⋛︀","gesles;":"⪔","Gfr;":"𝔊","gfr;":"𝔤","gg;":"≫","Gg;":"⋙","ggg;":"⋙","gimel;":"ℷ","GJcy;":"Ѓ","gjcy;":"ѓ","gla;":"⪥","gl;":"≷","glE;":"⪒","glj;":"⪤","gnap;":"⪊","gnapprox;":"⪊","gne;":"⪈","gnE;":"≩","gneq;":"⪈","gneqq;":"≩","gnsim;":"⋧","Gopf;":"𝔾","gopf;":"𝕘","grave;":"`","GreaterEqual;":"≥","GreaterEqualLess;":"⋛","GreaterFullEqual;":"≧","GreaterGreater;":"⪢","GreaterLess;":"≷","GreaterSlantEqual;":"⩾","GreaterTilde;":"≳","Gscr;":"𝒢","gscr;":"ℊ","gsim;":"≳","gsime;":"⪎","gsiml;":"⪐","gtcc;":"⪧","gtcir;":"⩺","gt;":">",gt:">","GT;":">",GT:">","Gt;":"≫","gtdot;":"⋗","gtlPar;":"⦕","gtquest;":"⩼","gtrapprox;":"⪆","gtrarr;":"⥸","gtrdot;":"⋗","gtreqless;":"⋛","gtreqqless;":"⪌","gtrless;":"≷","gtrsim;":"≳","gvertneqq;":"≩︀","gvnE;":"≩︀","Hacek;":"ˇ","hairsp;":" ","half;":"½","hamilt;":"ℋ","HARDcy;":"Ъ","hardcy;":"ъ","harrcir;":"⥈","harr;":"↔","hArr;":"⇔","harrw;":"↭","Hat;":"^","hbar;":"ℏ","Hcirc;":"Ĥ","hcirc;":"ĥ","hearts;":"♥","heartsuit;":"♥","hellip;":"…","hercon;":"⊹","hfr;":"𝔥","Hfr;":"ℌ","HilbertSpace;":"ℋ","hksearow;":"⤥","hkswarow;":"⤦","hoarr;":"⇿","homtht;":"∻","hookleftarrow;":"↩","hookrightarrow;":"↪","hopf;":"𝕙","Hopf;":"ℍ","horbar;":"―","HorizontalLine;":"─","hscr;":"𝒽","Hscr;":"ℋ","hslash;":"ℏ","Hstrok;":"Ħ","hstrok;":"ħ","HumpDownHump;":"≎","HumpEqual;":"≏","hybull;":"⁃","hyphen;":"‐","Iacute;":"Í",Iacute:"Í","iacute;":"í",iacute:"í","ic;":"","Icirc;":"Î",Icirc:"Î","icirc;":"î",icirc:"î","Icy;":"И","icy;":"и","Idot;":"İ","IEcy;":"Е","iecy;":"е","iexcl;":"¡",iexcl:"¡","iff;":"⇔","ifr;":"𝔦","Ifr;":"ℑ","Igrave;":"Ì",Igrave:"Ì","igrave;":"ì",igrave:"ì","ii;":"ⅈ","iiiint;":"⨌","iiint;":"∭","iinfin;":"⧜","iiota;":"℩","IJlig;":"IJ","ijlig;":"ij","Imacr;":"Ī","imacr;":"ī","image;":"ℑ","ImaginaryI;":"ⅈ","imagline;":"ℐ","imagpart;":"ℑ","imath;":"ı","Im;":"ℑ","imof;":"⊷","imped;":"Ƶ","Implies;":"⇒","incare;":"℅","in;":"∈","infin;":"∞","infintie;":"⧝","inodot;":"ı","intcal;":"⊺","int;":"∫","Int;":"∬","integers;":"ℤ","Integral;":"∫","intercal;":"⊺","Intersection;":"⋂","intlarhk;":"⨗","intprod;":"⨼","InvisibleComma;":"","InvisibleTimes;":"","IOcy;":"Ё","iocy;":"ё","Iogon;":"Į","iogon;":"į","Iopf;":"𝕀","iopf;":"𝕚","Iota;":"Ι","iota;":"ι","iprod;":"⨼","iquest;":"¿",iquest:"¿","iscr;":"𝒾","Iscr;":"ℐ","isin;":"∈","isindot;":"⋵","isinE;":"⋹","isins;":"⋴","isinsv;":"⋳","isinv;":"∈","it;":"","Itilde;":"Ĩ","itilde;":"ĩ","Iukcy;":"І","iukcy;":"і","Iuml;":"Ï",Iuml:"Ï","iuml;":"ï",iuml:"ï","Jcirc;":"Ĵ","jcirc;":"ĵ","Jcy;":"Й","jcy;":"й","Jfr;":"𝔍","jfr;":"𝔧","jmath;":"ȷ","Jopf;":"𝕁","jopf;":"𝕛","Jscr;":"𝒥","jscr;":"𝒿","Jsercy;":"Ј","jsercy;":"ј","Jukcy;":"Є","jukcy;":"є","Kappa;":"Κ","kappa;":"κ","kappav;":"ϰ","Kcedil;":"Ķ","kcedil;":"ķ","Kcy;":"К","kcy;":"к","Kfr;":"𝔎","kfr;":"𝔨","kgreen;":"ĸ","KHcy;":"Х","khcy;":"х","KJcy;":"Ќ","kjcy;":"ќ","Kopf;":"𝕂","kopf;":"𝕜","Kscr;":"𝒦","kscr;":"𝓀","lAarr;":"⇚","Lacute;":"Ĺ","lacute;":"ĺ","laemptyv;":"⦴","lagran;":"ℒ","Lambda;":"Λ","lambda;":"λ","lang;":"⟨","Lang;":"⟪","langd;":"⦑","langle;":"⟨","lap;":"⪅","Laplacetrf;":"ℒ","laquo;":"«",laquo:"«","larrb;":"⇤","larrbfs;":"⤟","larr;":"←","Larr;":"↞","lArr;":"⇐","larrfs;":"⤝","larrhk;":"↩","larrlp;":"↫","larrpl;":"⤹","larrsim;":"⥳","larrtl;":"↢","latail;":"⤙","lAtail;":"⤛","lat;":"⪫","late;":"⪭","lates;":"⪭︀","lbarr;":"⤌","lBarr;":"⤎","lbbrk;":"❲","lbrace;":"{","lbrack;":"[","lbrke;":"⦋","lbrksld;":"⦏","lbrkslu;":"⦍","Lcaron;":"Ľ","lcaron;":"ľ","Lcedil;":"Ļ","lcedil;":"ļ","lceil;":"⌈","lcub;":"{","Lcy;":"Л","lcy;":"л","ldca;":"⤶","ldquo;":"“","ldquor;":"„","ldrdhar;":"⥧","ldrushar;":"⥋","ldsh;":"↲","le;":"≤","lE;":"≦","LeftAngleBracket;":"⟨","LeftArrowBar;":"⇤","leftarrow;":"←","LeftArrow;":"←","Leftarrow;":"⇐","LeftArrowRightArrow;":"⇆","leftarrowtail;":"↢","LeftCeiling;":"⌈","LeftDoubleBracket;":"⟦","LeftDownTeeVector;":"⥡","LeftDownVectorBar;":"⥙","LeftDownVector;":"⇃","LeftFloor;":"⌊","leftharpoondown;":"↽","leftharpoonup;":"↼","leftleftarrows;":"⇇","leftrightarrow;":"↔","LeftRightArrow;":"↔","Leftrightarrow;":"⇔","leftrightarrows;":"⇆","leftrightharpoons;":"⇋","leftrightsquigarrow;":"↭","LeftRightVector;":"⥎","LeftTeeArrow;":"↤","LeftTee;":"⊣","LeftTeeVector;":"⥚","leftthreetimes;":"⋋","LeftTriangleBar;":"⧏","LeftTriangle;":"⊲","LeftTriangleEqual;":"⊴","LeftUpDownVector;":"⥑","LeftUpTeeVector;":"⥠","LeftUpVectorBar;":"⥘","LeftUpVector;":"↿","LeftVectorBar;":"⥒","LeftVector;":"↼","lEg;":"⪋","leg;":"⋚","leq;":"≤","leqq;":"≦","leqslant;":"⩽","lescc;":"⪨","les;":"⩽","lesdot;":"⩿","lesdoto;":"⪁","lesdotor;":"⪃","lesg;":"⋚︀","lesges;":"⪓","lessapprox;":"⪅","lessdot;":"⋖","lesseqgtr;":"⋚","lesseqqgtr;":"⪋","LessEqualGreater;":"⋚","LessFullEqual;":"≦","LessGreater;":"≶","lessgtr;":"≶","LessLess;":"⪡","lesssim;":"≲","LessSlantEqual;":"⩽","LessTilde;":"≲","lfisht;":"⥼","lfloor;":"⌊","Lfr;":"𝔏","lfr;":"𝔩","lg;":"≶","lgE;":"⪑","lHar;":"⥢","lhard;":"↽","lharu;":"↼","lharul;":"⥪","lhblk;":"▄","LJcy;":"Љ","ljcy;":"љ","llarr;":"⇇","ll;":"≪","Ll;":"⋘","llcorner;":"⌞","Lleftarrow;":"⇚","llhard;":"⥫","lltri;":"◺","Lmidot;":"Ŀ","lmidot;":"ŀ","lmoustache;":"⎰","lmoust;":"⎰","lnap;":"⪉","lnapprox;":"⪉","lne;":"⪇","lnE;":"≨","lneq;":"⪇","lneqq;":"≨","lnsim;":"⋦","loang;":"⟬","loarr;":"⇽","lobrk;":"⟦","longleftarrow;":"⟵","LongLeftArrow;":"⟵","Longleftarrow;":"⟸","longleftrightarrow;":"⟷","LongLeftRightArrow;":"⟷","Longleftrightarrow;":"⟺","longmapsto;":"⟼","longrightarrow;":"⟶","LongRightArrow;":"⟶","Longrightarrow;":"⟹","looparrowleft;":"↫","looparrowright;":"↬","lopar;":"⦅","Lopf;":"𝕃","lopf;":"𝕝","loplus;":"⨭","lotimes;":"⨴","lowast;":"∗","lowbar;":"_","LowerLeftArrow;":"↙","LowerRightArrow;":"↘","loz;":"◊","lozenge;":"◊","lozf;":"⧫","lpar;":"(","lparlt;":"⦓","lrarr;":"⇆","lrcorner;":"⌟","lrhar;":"⇋","lrhard;":"⥭","lrm;":"","lrtri;":"⊿","lsaquo;":"‹","lscr;":"𝓁","Lscr;":"ℒ","lsh;":"↰","Lsh;":"↰","lsim;":"≲","lsime;":"⪍","lsimg;":"⪏","lsqb;":"[","lsquo;":"‘","lsquor;":"‚","Lstrok;":"Ł","lstrok;":"ł","ltcc;":"⪦","ltcir;":"⩹","lt;":"<",lt:"<","LT;":"<",LT:"<","Lt;":"≪","ltdot;":"⋖","lthree;":"⋋","ltimes;":"⋉","ltlarr;":"⥶","ltquest;":"⩻","ltri;":"◃","ltrie;":"⊴","ltrif;":"◂","ltrPar;":"⦖","lurdshar;":"⥊","luruhar;":"⥦","lvertneqq;":"≨︀","lvnE;":"≨︀","macr;":"¯",macr:"¯","male;":"♂","malt;":"✠","maltese;":"✠","Map;":"⤅","map;":"↦","mapsto;":"↦","mapstodown;":"↧","mapstoleft;":"↤","mapstoup;":"↥","marker;":"▮","mcomma;":"⨩","Mcy;":"М","mcy;":"м","mdash;":"—","mDDot;":"∺","measuredangle;":"∡","MediumSpace;":" ","Mellintrf;":"ℳ","Mfr;":"𝔐","mfr;":"𝔪","mho;":"℧","micro;":"µ",micro:"µ","midast;":"*","midcir;":"⫰","mid;":"∣","middot;":"·",middot:"·","minusb;":"⊟","minus;":"−","minusd;":"∸","minusdu;":"⨪","MinusPlus;":"∓","mlcp;":"⫛","mldr;":"…","mnplus;":"∓","models;":"⊧","Mopf;":"𝕄","mopf;":"𝕞","mp;":"∓","mscr;":"𝓂","Mscr;":"ℳ","mstpos;":"∾","Mu;":"Μ","mu;":"μ","multimap;":"⊸","mumap;":"⊸","nabla;":"∇","Nacute;":"Ń","nacute;":"ń","nang;":"∠⃒","nap;":"≉","napE;":"⩰̸","napid;":"≋̸","napos;":"ʼn","napprox;":"≉","natural;":"♮","naturals;":"ℕ","natur;":"♮","nbsp;":" ",nbsp:" ","nbump;":"≎̸","nbumpe;":"≏̸","ncap;":"⩃","Ncaron;":"Ň","ncaron;":"ň","Ncedil;":"Ņ","ncedil;":"ņ","ncong;":"≇","ncongdot;":"⩭̸","ncup;":"⩂","Ncy;":"Н","ncy;":"н","ndash;":"–","nearhk;":"⤤","nearr;":"↗","neArr;":"⇗","nearrow;":"↗","ne;":"≠","nedot;":"≐̸","NegativeMediumSpace;":"","NegativeThickSpace;":"","NegativeThinSpace;":"","NegativeVeryThinSpace;":"","nequiv;":"≢","nesear;":"⤨","nesim;":"≂̸","NestedGreaterGreater;":"≫","NestedLessLess;":"≪","NewLine;":"\n","nexist;":"∄","nexists;":"∄","Nfr;":"𝔑","nfr;":"𝔫","ngE;":"≧̸","nge;":"≱","ngeq;":"≱","ngeqq;":"≧̸","ngeqslant;":"⩾̸","nges;":"⩾̸","nGg;":"⋙̸","ngsim;":"≵","nGt;":"≫⃒","ngt;":"≯","ngtr;":"≯","nGtv;":"≫̸","nharr;":"↮","nhArr;":"⇎","nhpar;":"⫲","ni;":"∋","nis;":"⋼","nisd;":"⋺","niv;":"∋","NJcy;":"Њ","njcy;":"њ","nlarr;":"↚","nlArr;":"⇍","nldr;":"‥","nlE;":"≦̸","nle;":"≰","nleftarrow;":"↚","nLeftarrow;":"⇍","nleftrightarrow;":"↮","nLeftrightarrow;":"⇎","nleq;":"≰","nleqq;":"≦̸","nleqslant;":"⩽̸","nles;":"⩽̸", |
| 110 |
"nless;":"≮","nLl;":"⋘̸","nlsim;":"≴","nLt;":"≪⃒","nlt;":"≮","nltri;":"⋪","nltrie;":"⋬","nLtv;":"≪̸","nmid;":"∤","NoBreak;":"","NonBreakingSpace;":" ","nopf;":"𝕟","Nopf;":"ℕ","Not;":"⫬","not;":"¬",not:"¬","NotCongruent;":"≢","NotCupCap;":"≭","NotDoubleVerticalBar;":"∦","NotElement;":"∉","NotEqual;":"≠","NotEqualTilde;":"≂̸","NotExists;":"∄","NotGreater;":"≯","NotGreaterEqual;":"≱","NotGreaterFullEqual;":"≧̸","NotGreaterGreater;":"≫̸","NotGreaterLess;":"≹","NotGreaterSlantEqual;":"⩾̸","NotGreaterTilde;":"≵","NotHumpDownHump;":"≎̸","NotHumpEqual;":"≏̸","notin;":"∉","notindot;":"⋵̸","notinE;":"⋹̸","notinva;":"∉","notinvb;":"⋷","notinvc;":"⋶","NotLeftTriangleBar;":"⧏̸","NotLeftTriangle;":"⋪","NotLeftTriangleEqual;":"⋬","NotLess;":"≮","NotLessEqual;":"≰","NotLessGreater;":"≸","NotLessLess;":"≪̸","NotLessSlantEqual;":"⩽̸","NotLessTilde;":"≴","NotNestedGreaterGreater;":"⪢̸","NotNestedLessLess;":"⪡̸","notni;":"∌","notniva;":"∌","notnivb;":"⋾","notnivc;":"⋽","NotPrecedes;":"⊀","NotPrecedesEqual;":"⪯̸","NotPrecedesSlantEqual;":"⋠","NotReverseElement;":"∌","NotRightTriangleBar;":"⧐̸","NotRightTriangle;":"⋫","NotRightTriangleEqual;":"⋭","NotSquareSubset;":"⊏̸","NotSquareSubsetEqual;":"⋢","NotSquareSuperset;":"⊐̸","NotSquareSupersetEqual;":"⋣","NotSubset;":"⊂⃒","NotSubsetEqual;":"⊈","NotSucceeds;":"⊁","NotSucceedsEqual;":"⪰̸","NotSucceedsSlantEqual;":"⋡","NotSucceedsTilde;":"≿̸","NotSuperset;":"⊃⃒","NotSupersetEqual;":"⊉","NotTilde;":"≁","NotTildeEqual;":"≄","NotTildeFullEqual;":"≇","NotTildeTilde;":"≉","NotVerticalBar;":"∤","nparallel;":"∦","npar;":"∦","nparsl;":"⫽⃥","npart;":"∂̸","npolint;":"⨔","npr;":"⊀","nprcue;":"⋠","nprec;":"⊀","npreceq;":"⪯̸","npre;":"⪯̸","nrarrc;":"⤳̸","nrarr;":"↛","nrArr;":"⇏","nrarrw;":"↝̸","nrightarrow;":"↛","nRightarrow;":"⇏","nrtri;":"⋫","nrtrie;":"⋭","nsc;":"⊁","nsccue;":"⋡","nsce;":"⪰̸","Nscr;":"𝒩","nscr;":"𝓃","nshortmid;":"∤","nshortparallel;":"∦","nsim;":"≁","nsime;":"≄","nsimeq;":"≄","nsmid;":"∤","nspar;":"∦","nsqsube;":"⋢","nsqsupe;":"⋣","nsub;":"⊄","nsubE;":"⫅̸","nsube;":"⊈","nsubset;":"⊂⃒","nsubseteq;":"⊈","nsubseteqq;":"⫅̸","nsucc;":"⊁","nsucceq;":"⪰̸","nsup;":"⊅","nsupE;":"⫆̸","nsupe;":"⊉","nsupset;":"⊃⃒","nsupseteq;":"⊉","nsupseteqq;":"⫆̸","ntgl;":"≹","Ntilde;":"Ñ",Ntilde:"Ñ","ntilde;":"ñ",ntilde:"ñ","ntlg;":"≸","ntriangleleft;":"⋪","ntrianglelefteq;":"⋬","ntriangleright;":"⋫","ntrianglerighteq;":"⋭","Nu;":"Ν","nu;":"ν","num;":"#","numero;":"№","numsp;":" ","nvap;":"≍⃒","nvdash;":"⊬","nvDash;":"⊭","nVdash;":"⊮","nVDash;":"⊯","nvge;":"≥⃒","nvgt;":">⃒","nvHarr;":"⤄","nvinfin;":"⧞","nvlArr;":"⤂","nvle;":"≤⃒","nvlt;":"<⃒","nvltrie;":"⊴⃒","nvrArr;":"⤃","nvrtrie;":"⊵⃒","nvsim;":"∼⃒","nwarhk;":"⤣","nwarr;":"↖","nwArr;":"⇖","nwarrow;":"↖","nwnear;":"⤧","Oacute;":"Ó",Oacute:"Ó","oacute;":"ó",oacute:"ó","oast;":"⊛","Ocirc;":"Ô",Ocirc:"Ô","ocirc;":"ô",ocirc:"ô","ocir;":"⊚","Ocy;":"О","ocy;":"о","odash;":"⊝","Odblac;":"Ő","odblac;":"ő","odiv;":"⨸","odot;":"⊙","odsold;":"⦼","OElig;":"Œ","oelig;":"œ","ofcir;":"⦿","Ofr;":"𝔒","ofr;":"𝔬","ogon;":"˛","Ograve;":"Ò",Ograve:"Ò","ograve;":"ò",ograve:"ò","ogt;":"⧁","ohbar;":"⦵","ohm;":"Ω","oint;":"∮","olarr;":"↺","olcir;":"⦾","olcross;":"⦻","oline;":"‾","olt;":"⧀","Omacr;":"Ō","omacr;":"ō","Omega;":"Ω","omega;":"ω","Omicron;":"Ο","omicron;":"ο","omid;":"⦶","ominus;":"⊖","Oopf;":"𝕆","oopf;":"𝕠","opar;":"⦷","OpenCurlyDoubleQuote;":"“","OpenCurlyQuote;":"‘","operp;":"⦹","oplus;":"⊕","orarr;":"↻","Or;":"⩔","or;":"∨","ord;":"⩝","order;":"ℴ","orderof;":"ℴ","ordf;":"ª",ordf:"ª","ordm;":"º",ordm:"º","origof;":"⊶","oror;":"⩖","orslope;":"⩗","orv;":"⩛","oS;":"Ⓢ","Oscr;":"𝒪","oscr;":"ℴ","Oslash;":"Ø",Oslash:"Ø","oslash;":"ø",oslash:"ø","osol;":"⊘","Otilde;":"Õ",Otilde:"Õ","otilde;":"õ",otilde:"õ","otimesas;":"⨶","Otimes;":"⨷","otimes;":"⊗","Ouml;":"Ö",Ouml:"Ö","ouml;":"ö",ouml:"ö","ovbar;":"⌽","OverBar;":"‾","OverBrace;":"⏞","OverBracket;":"⎴","OverParenthesis;":"⏜","para;":"¶",para:"¶","parallel;":"∥","par;":"∥","parsim;":"⫳","parsl;":"⫽","part;":"∂","PartialD;":"∂","Pcy;":"П","pcy;":"п","percnt;":"%","period;":".","permil;":"‰","perp;":"⊥","pertenk;":"‱","Pfr;":"𝔓","pfr;":"𝔭","Phi;":"Φ","phi;":"φ","phiv;":"ϕ","phmmat;":"ℳ","phone;":"☎","Pi;":"Π","pi;":"π","pitchfork;":"⋔","piv;":"ϖ","planck;":"ℏ","planckh;":"ℎ","plankv;":"ℏ","plusacir;":"⨣","plusb;":"⊞","pluscir;":"⨢","plus;":"+","plusdo;":"∔","plusdu;":"⨥","pluse;":"⩲","PlusMinus;":"±","plusmn;":"±",plusmn:"±","plussim;":"⨦","plustwo;":"⨧","pm;":"±","Poincareplane;":"ℌ","pointint;":"⨕","popf;":"𝕡","Popf;":"ℙ","pound;":"£",pound:"£","prap;":"⪷","Pr;":"⪻","pr;":"≺","prcue;":"≼","precapprox;":"⪷","prec;":"≺","preccurlyeq;":"≼","Precedes;":"≺","PrecedesEqual;":"⪯","PrecedesSlantEqual;":"≼","PrecedesTilde;":"≾","preceq;":"⪯","precnapprox;":"⪹","precneqq;":"⪵","precnsim;":"⋨","pre;":"⪯","prE;":"⪳","precsim;":"≾","prime;":"′","Prime;":"″","primes;":"ℙ","prnap;":"⪹","prnE;":"⪵","prnsim;":"⋨","prod;":"∏","Product;":"∏","profalar;":"⌮","profline;":"⌒","profsurf;":"⌓","prop;":"∝","Proportional;":"∝","Proportion;":"∷","propto;":"∝","prsim;":"≾","prurel;":"⊰","Pscr;":"𝒫","pscr;":"𝓅","Psi;":"Ψ","psi;":"ψ","puncsp;":" ","Qfr;":"𝔔","qfr;":"𝔮","qint;":"⨌","qopf;":"𝕢","Qopf;":"ℚ","qprime;":"⁗","Qscr;":"𝒬","qscr;":"𝓆","quaternions;":"ℍ","quatint;":"⨖","quest;":"?","questeq;":"≟","quot;":'"',quot:'"',"QUOT;":'"',QUOT:'"',"rAarr;":"⇛","race;":"∽̱","Racute;":"Ŕ","racute;":"ŕ","radic;":"√","raemptyv;":"⦳","rang;":"⟩","Rang;":"⟫","rangd;":"⦒","range;":"⦥","rangle;":"⟩","raquo;":"»",raquo:"»","rarrap;":"⥵","rarrb;":"⇥","rarrbfs;":"⤠","rarrc;":"⤳","rarr;":"→","Rarr;":"↠","rArr;":"⇒","rarrfs;":"⤞","rarrhk;":"↪","rarrlp;":"↬","rarrpl;":"⥅","rarrsim;":"⥴","Rarrtl;":"⤖","rarrtl;":"↣","rarrw;":"↝","ratail;":"⤚","rAtail;":"⤜","ratio;":"∶","rationals;":"ℚ","rbarr;":"⤍","rBarr;":"⤏","RBarr;":"⤐","rbbrk;":"❳","rbrace;":"}","rbrack;":"]","rbrke;":"⦌","rbrksld;":"⦎","rbrkslu;":"⦐","Rcaron;":"Ř","rcaron;":"ř","Rcedil;":"Ŗ","rcedil;":"ŗ","rceil;":"⌉","rcub;":"}","Rcy;":"Р","rcy;":"р","rdca;":"⤷","rdldhar;":"⥩","rdquo;":"”","rdquor;":"”","rdsh;":"↳","real;":"ℜ","realine;":"ℛ","realpart;":"ℜ","reals;":"ℝ","Re;":"ℜ","rect;":"▭","reg;":"®",reg:"®","REG;":"®",REG:"®","ReverseElement;":"∋","ReverseEquilibrium;":"⇋","ReverseUpEquilibrium;":"⥯","rfisht;":"⥽","rfloor;":"⌋","rfr;":"𝔯","Rfr;":"ℜ","rHar;":"⥤","rhard;":"⇁","rharu;":"⇀","rharul;":"⥬","Rho;":"Ρ","rho;":"ρ","rhov;":"ϱ","RightAngleBracket;":"⟩","RightArrowBar;":"⇥","rightarrow;":"→","RightArrow;":"→","Rightarrow;":"⇒","RightArrowLeftArrow;":"⇄","rightarrowtail;":"↣","RightCeiling;":"⌉","RightDoubleBracket;":"⟧","RightDownTeeVector;":"⥝","RightDownVectorBar;":"⥕","RightDownVector;":"⇂","RightFloor;":"⌋","rightharpoondown;":"⇁","rightharpoonup;":"⇀","rightleftarrows;":"⇄","rightleftharpoons;":"⇌","rightrightarrows;":"⇉","rightsquigarrow;":"↝","RightTeeArrow;":"↦","RightTee;":"⊢","RightTeeVector;":"⥛","rightthreetimes;":"⋌","RightTriangleBar;":"⧐","RightTriangle;":"⊳","RightTriangleEqual;":"⊵","RightUpDownVector;":"⥏","RightUpTeeVector;":"⥜","RightUpVectorBar;":"⥔","RightUpVector;":"↾","RightVectorBar;":"⥓","RightVector;":"⇀","ring;":"˚","risingdotseq;":"≓","rlarr;":"⇄","rlhar;":"⇌","rlm;":"","rmoustache;":"⎱","rmoust;":"⎱","rnmid;":"⫮","roang;":"⟭","roarr;":"⇾","robrk;":"⟧","ropar;":"⦆","ropf;":"𝕣","Ropf;":"ℝ","roplus;":"⨮","rotimes;":"⨵","RoundImplies;":"⥰","rpar;":")","rpargt;":"⦔","rppolint;":"⨒","rrarr;":"⇉","Rrightarrow;":"⇛","rsaquo;":"›","rscr;":"𝓇","Rscr;":"ℛ","rsh;":"↱","Rsh;":"↱","rsqb;":"]","rsquo;":"’","rsquor;":"’","rthree;":"⋌","rtimes;":"⋊","rtri;":"▹","rtrie;":"⊵","rtrif;":"▸","rtriltri;":"⧎","RuleDelayed;":"⧴","ruluhar;":"⥨","rx;":"℞","Sacute;":"Ś","sacute;":"ś","sbquo;":"‚","scap;":"⪸","Scaron;":"Š","scaron;":"š","Sc;":"⪼","sc;":"≻","sccue;":"≽","sce;":"⪰","scE;":"⪴","Scedil;":"Ş","scedil;":"ş","Scirc;":"Ŝ","scirc;":"ŝ","scnap;":"⪺","scnE;":"⪶","scnsim;":"⋩","scpolint;":"⨓","scsim;":"≿","Scy;":"С","scy;":"с","sdotb;":"⊡","sdot;":"⋅","sdote;":"⩦","searhk;":"⤥","searr;":"↘","seArr;":"⇘","searrow;":"↘", |
| 111 |
"sect;":"§",sect:"§","semi;":";","seswar;":"⤩","setminus;":"∖","setmn;":"∖","sext;":"✶","Sfr;":"𝔖","sfr;":"𝔰","sfrown;":"⌢","sharp;":"♯","SHCHcy;":"Щ","shchcy;":"щ","SHcy;":"Ш","shcy;":"ш","ShortDownArrow;":"↓","ShortLeftArrow;":"←","shortmid;":"∣","shortparallel;":"∥","ShortRightArrow;":"→","ShortUpArrow;":"↑","shy;":"",shy:"","Sigma;":"Σ","sigma;":"σ","sigmaf;":"ς","sigmav;":"ς","sim;":"∼","simdot;":"⩪","sime;":"≃","simeq;":"≃","simg;":"⪞","simgE;":"⪠","siml;":"⪝","simlE;":"⪟","simne;":"≆","simplus;":"⨤","simrarr;":"⥲","slarr;":"←","SmallCircle;":"∘","smallsetminus;":"∖","smashp;":"⨳","smeparsl;":"⧤","smid;":"∣","smile;":"⌣","smt;":"⪪","smte;":"⪬","smtes;":"⪬︀","SOFTcy;":"Ь","softcy;":"ь","solbar;":"⌿","solb;":"⧄","sol;":"/","Sopf;":"𝕊","sopf;":"𝕤","spades;":"♠","spadesuit;":"♠","spar;":"∥","sqcap;":"⊓","sqcaps;":"⊓︀","sqcup;":"⊔","sqcups;":"⊔︀","Sqrt;":"√","sqsub;":"⊏","sqsube;":"⊑","sqsubset;":"⊏","sqsubseteq;":"⊑","sqsup;":"⊐","sqsupe;":"⊒","sqsupset;":"⊐","sqsupseteq;":"⊒","square;":"□","Square;":"□","SquareIntersection;":"⊓","SquareSubset;":"⊏","SquareSubsetEqual;":"⊑","SquareSuperset;":"⊐","SquareSupersetEqual;":"⊒","SquareUnion;":"⊔","squarf;":"▪","squ;":"□","squf;":"▪","srarr;":"→","Sscr;":"𝒮","sscr;":"𝓈","ssetmn;":"∖","ssmile;":"⌣","sstarf;":"⋆","Star;":"⋆","star;":"☆","starf;":"★","straightepsilon;":"ϵ","straightphi;":"ϕ","strns;":"¯","sub;":"⊂","Sub;":"⋐","subdot;":"⪽","subE;":"⫅","sube;":"⊆","subedot;":"⫃","submult;":"⫁","subnE;":"⫋","subne;":"⊊","subplus;":"⪿","subrarr;":"⥹","subset;":"⊂","Subset;":"⋐","subseteq;":"⊆","subseteqq;":"⫅","SubsetEqual;":"⊆","subsetneq;":"⊊","subsetneqq;":"⫋","subsim;":"⫇","subsub;":"⫕","subsup;":"⫓","succapprox;":"⪸","succ;":"≻","succcurlyeq;":"≽","Succeeds;":"≻","SucceedsEqual;":"⪰","SucceedsSlantEqual;":"≽","SucceedsTilde;":"≿","succeq;":"⪰","succnapprox;":"⪺","succneqq;":"⪶","succnsim;":"⋩","succsim;":"≿","SuchThat;":"∋","sum;":"∑","Sum;":"∑","sung;":"♪","sup1;":"¹",sup1:"¹","sup2;":"²",sup2:"²","sup3;":"³",sup3:"³","sup;":"⊃","Sup;":"⋑","supdot;":"⪾","supdsub;":"⫘","supE;":"⫆","supe;":"⊇","supedot;":"⫄","Superset;":"⊃","SupersetEqual;":"⊇","suphsol;":"⟉","suphsub;":"⫗","suplarr;":"⥻","supmult;":"⫂","supnE;":"⫌","supne;":"⊋","supplus;":"⫀","supset;":"⊃","Supset;":"⋑","supseteq;":"⊇","supseteqq;":"⫆","supsetneq;":"⊋","supsetneqq;":"⫌","supsim;":"⫈","supsub;":"⫔","supsup;":"⫖","swarhk;":"⤦","swarr;":"↙","swArr;":"⇙","swarrow;":"↙","swnwar;":"⤪","szlig;":"ß",szlig:"ß","Tab;":"\t","target;":"⌖","Tau;":"Τ","tau;":"τ","tbrk;":"⎴","Tcaron;":"Ť","tcaron;":"ť","Tcedil;":"Ţ","tcedil;":"ţ","Tcy;":"Т","tcy;":"т","tdot;":"⃛","telrec;":"⌕","Tfr;":"𝔗","tfr;":"𝔱","there4;":"∴","therefore;":"∴","Therefore;":"∴","Theta;":"Θ","theta;":"θ","thetasym;":"ϑ","thetav;":"ϑ","thickapprox;":"≈","thicksim;":"∼","ThickSpace;":" ","ThinSpace;":" ","thinsp;":" ","thkap;":"≈","thksim;":"∼","THORN;":"Þ",THORN:"Þ","thorn;":"þ",thorn:"þ","tilde;":"˜","Tilde;":"∼","TildeEqual;":"≃","TildeFullEqual;":"≅","TildeTilde;":"≈","timesbar;":"⨱","timesb;":"⊠","times;":"×",times:"×","timesd;":"⨰","tint;":"∭","toea;":"⤨","topbot;":"⌶","topcir;":"⫱","top;":"⊤","Topf;":"𝕋","topf;":"𝕥","topfork;":"⫚","tosa;":"⤩","tprime;":"‴","trade;":"™","TRADE;":"™","triangle;":"▵","triangledown;":"▿","triangleleft;":"◃","trianglelefteq;":"⊴","triangleq;":"≜","triangleright;":"▹","trianglerighteq;":"⊵","tridot;":"◬","trie;":"≜","triminus;":"⨺","TripleDot;":"⃛","triplus;":"⨹","trisb;":"⧍","tritime;":"⨻","trpezium;":"⏢","Tscr;":"𝒯","tscr;":"𝓉","TScy;":"Ц","tscy;":"ц","TSHcy;":"Ћ","tshcy;":"ћ","Tstrok;":"Ŧ","tstrok;":"ŧ","twixt;":"≬","twoheadleftarrow;":"↞","twoheadrightarrow;":"↠","Uacute;":"Ú",Uacute:"Ú","uacute;":"ú",uacute:"ú","uarr;":"↑","Uarr;":"↟","uArr;":"⇑","Uarrocir;":"⥉","Ubrcy;":"Ў","ubrcy;":"ў","Ubreve;":"Ŭ","ubreve;":"ŭ","Ucirc;":"Û",Ucirc:"Û","ucirc;":"û",ucirc:"û","Ucy;":"У","ucy;":"у","udarr;":"⇅","Udblac;":"Ű","udblac;":"ű","udhar;":"⥮","ufisht;":"⥾","Ufr;":"𝔘","ufr;":"𝔲","Ugrave;":"Ù",Ugrave:"Ù","ugrave;":"ù",ugrave:"ù","uHar;":"⥣","uharl;":"↿","uharr;":"↾","uhblk;":"▀","ulcorn;":"⌜","ulcorner;":"⌜","ulcrop;":"⌏","ultri;":"◸","Umacr;":"Ū","umacr;":"ū","uml;":"¨",uml:"¨","UnderBar;":"_","UnderBrace;":"⏟","UnderBracket;":"⎵","UnderParenthesis;":"⏝","Union;":"⋃","UnionPlus;":"⊎","Uogon;":"Ų","uogon;":"ų","Uopf;":"𝕌","uopf;":"𝕦","UpArrowBar;":"⤒","uparrow;":"↑","UpArrow;":"↑","Uparrow;":"⇑","UpArrowDownArrow;":"⇅","updownarrow;":"↕","UpDownArrow;":"↕","Updownarrow;":"⇕","UpEquilibrium;":"⥮","upharpoonleft;":"↿","upharpoonright;":"↾","uplus;":"⊎","UpperLeftArrow;":"↖","UpperRightArrow;":"↗","upsi;":"υ","Upsi;":"ϒ","upsih;":"ϒ","Upsilon;":"Υ","upsilon;":"υ","UpTeeArrow;":"↥","UpTee;":"⊥","upuparrows;":"⇈","urcorn;":"⌝","urcorner;":"⌝","urcrop;":"⌎","Uring;":"Ů","uring;":"ů","urtri;":"◹","Uscr;":"𝒰","uscr;":"𝓊","utdot;":"⋰","Utilde;":"Ũ","utilde;":"ũ","utri;":"▵","utrif;":"▴","uuarr;":"⇈","Uuml;":"Ü",Uuml:"Ü","uuml;":"ü",uuml:"ü","uwangle;":"⦧","vangrt;":"⦜","varepsilon;":"ϵ","varkappa;":"ϰ","varnothing;":"∅","varphi;":"ϕ","varpi;":"ϖ","varpropto;":"∝","varr;":"↕","vArr;":"⇕","varrho;":"ϱ","varsigma;":"ς","varsubsetneq;":"⊊︀","varsubsetneqq;":"⫋︀","varsupsetneq;":"⊋︀","varsupsetneqq;":"⫌︀","vartheta;":"ϑ","vartriangleleft;":"⊲","vartriangleright;":"⊳","vBar;":"⫨","Vbar;":"⫫","vBarv;":"⫩","Vcy;":"В","vcy;":"в","vdash;":"⊢","vDash;":"⊨","Vdash;":"⊩","VDash;":"⊫","Vdashl;":"⫦","veebar;":"⊻","vee;":"∨","Vee;":"⋁","veeeq;":"≚","vellip;":"⋮","verbar;":"|","Verbar;":"‖","vert;":"|","Vert;":"‖","VerticalBar;":"∣","VerticalLine;":"|","VerticalSeparator;":"❘","VerticalTilde;":"≀","VeryThinSpace;":" ","Vfr;":"𝔙","vfr;":"𝔳","vltri;":"⊲","vnsub;":"⊂⃒","vnsup;":"⊃⃒","Vopf;":"𝕍","vopf;":"𝕧","vprop;":"∝","vrtri;":"⊳","Vscr;":"𝒱","vscr;":"𝓋","vsubnE;":"⫋︀","vsubne;":"⊊︀","vsupnE;":"⫌︀","vsupne;":"⊋︀","Vvdash;":"⊪","vzigzag;":"⦚","Wcirc;":"Ŵ","wcirc;":"ŵ","wedbar;":"⩟","wedge;":"∧","Wedge;":"⋀","wedgeq;":"≙","weierp;":"℘","Wfr;":"𝔚","wfr;":"𝔴","Wopf;":"𝕎","wopf;":"𝕨","wp;":"℘","wr;":"≀","wreath;":"≀","Wscr;":"𝒲","wscr;":"𝓌","xcap;":"⋂","xcirc;":"◯","xcup;":"⋃","xdtri;":"▽","Xfr;":"𝔛","xfr;":"𝔵","xharr;":"⟷","xhArr;":"⟺","Xi;":"Ξ","xi;":"ξ","xlarr;":"⟵","xlArr;":"⟸","xmap;":"⟼","xnis;":"⋻","xodot;":"⨀","Xopf;":"𝕏","xopf;":"𝕩","xoplus;":"⨁","xotime;":"⨂","xrarr;":"⟶","xrArr;":"⟹","Xscr;":"𝒳","xscr;":"𝓍","xsqcup;":"⨆","xuplus;":"⨄","xutri;":"△","xvee;":"⋁","xwedge;":"⋀","Yacute;":"Ý",Yacute:"Ý","yacute;":"ý",yacute:"ý","YAcy;":"Я","yacy;":"я","Ycirc;":"Ŷ","ycirc;":"ŷ","Ycy;":"Ы","ycy;":"ы","yen;":"¥",yen:"¥","Yfr;":"𝔜","yfr;":"𝔶","YIcy;":"Ї","yicy;":"ї","Yopf;":"𝕐","yopf;":"𝕪","Yscr;":"𝒴","yscr;":"𝓎","YUcy;":"Ю","yucy;":"ю","yuml;":"ÿ",yuml:"ÿ","Yuml;":"Ÿ","Zacute;":"Ź","zacute;":"ź","Zcaron;":"Ž","zcaron;":"ž","Zcy;":"З","zcy;":"з","Zdot;":"Ż","zdot;":"ż","zeetrf;":"ℨ","ZeroWidthSpace;":"","Zeta;":"Ζ","zeta;":"ζ","zfr;":"𝔷","Zfr;":"ℨ","ZHcy;":"Ж","zhcy;":"ж","zigrarr;":"⇝","zopf;":"𝕫","Zopf;":"ℤ","Zscr;":"𝒵","zscr;":"𝓏","zwj;":"","zwnj;":""}},{}],13:[function(e,t,n){var o=e("util/"),i=Array.prototype.slice,s=Object.prototype.hasOwnProperty,a=t.exports=d;function r(e,t){return o.isUndefined(t)?""+t:!o.isNumber(t)||!isNaN(t)&&isFinite(t)?o.isFunction(t)||o.isRegExp(t)?t.toString():t:t.toString()}function l(e,t){return o.isString(e)?e.length<t?e:e.slice(0,t):e}function c(e,t,n,o,i){throw new a.AssertionError({message:n,actual:e,expected:t,operator:o,stackStartFunction:i})}function d(e,t){e||c(e,!0,t,"==",a.ok)}function u(e,t){if(e===t)return!0;if(o.isBuffer(e)&&o.isBuffer(t)){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return o.isDate(e)&&o.isDate(t)?e.getTime()===t.getTime():o.isRegExp(e)&&o.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:o.isObject(e)||o.isObject(t)?function(e,t){if(o.isNullOrUndefined(e)||o.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1 |
| 112 |
;if(p(e))return!!p(t)&&u(e=i.call(e),t=i.call(t));try{var n,s,a=m(e),r=m(t)}catch(e){return!1}if(a.length!=r.length)return!1;for(a.sort(),r.sort(),s=a.length-1;s>=0;s--)if(a[s]!=r[s])return!1;for(s=a.length-1;s>=0;s--)if(!u(e[n=a[s]],t[n]))return!1;return!0}(e,t):e==t}function p(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function h(e,t){return!(!e||!t)&&("[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t||!0===t.call({},e))}function g(e,t,n,i){var s;o.isString(n)&&(i=n,n=null);try{t()}catch(e){s=e}if(i=(n&&n.name?" ("+n.name+").":".")+(i?" "+i:"."),e&&!s&&c(s,n,"Missing expected exception"+i),!e&&h(s,n)&&c(s,n,"Got unwanted exception"+i),e&&s&&n&&!h(s,n)||!e&&s)throw s}a.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return l(JSON.stringify(e.actual,r),128)+" "+e.operator+" "+l(JSON.stringify(e.expected,r),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||c;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var o=n.stack,i=t.name,s=o.indexOf("\n"+i);if(s>=0){var a=o.indexOf("\n",s+1);o=o.substring(a+1)}this.stack=o}}},o.inherits(a.AssertionError,Error),a.fail=c,a.ok=d,a.equal=function(e,t,n){e!=t&&c(e,t,n,"==",a.equal)},a.notEqual=function(e,t,n){e==t&&c(e,t,n,"!=",a.notEqual)},a.deepEqual=function(e,t,n){u(e,t)||c(e,t,n,"deepEqual",a.deepEqual)},a.notDeepEqual=function(e,t,n){u(e,t)&&c(e,t,n,"notDeepEqual",a.notDeepEqual)},a.strictEqual=function(e,t,n){e!==t&&c(e,t,n,"===",a.strictEqual)},a.notStrictEqual=function(e,t,n){e===t&&c(e,t,n,"!==",a.notStrictEqual)},a.throws=function(e,t,n){g.apply(this,[!0].concat(i.call(arguments)))},a.doesNotThrow=function(e,t){g.apply(this,[!1].concat(i.call(arguments)))},a.ifError=function(e){if(e)throw e};var m=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}},{"util/":15}],14:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],15:[function(e,t,n){(function(t,o){var i=/%[sdj%]/g;n.format=function(e){if(!f(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(r(arguments[n]));return t.join(" ")}n=1;for(var o=arguments,s=o.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=s)return e;switch(e){case"%s":return String(o[n++]);case"%d":return Number(o[n++]);case"%j":try{return JSON.stringify(o[n++])}catch(e){return"[Circular]"}default:return e}})),l=o[n];n<s;l=o[++n])m(l)||!v(l)?a+=" "+l:a+=" "+r(l);return a},n.deprecate=function(e,i){if(x(o.process))return function(){return n.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var s=!1;return function(){if(!s){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}};var s,a={};function r(e,t){var o={seen:[],stylize:c};return arguments.length>=3&&(o.depth=arguments[2]),arguments.length>=4&&(o.colors=arguments[3]),g(t)?o.showHidden=t:t&&n._extend(o,t),x(o.showHidden)&&(o.showHidden=!1),x(o.depth)&&(o.depth=2),x(o.colors)&&(o.colors=!1),x(o.customInspect)&&(o.customInspect=!0),o.colors&&(o.stylize=l),d(o,e,o.depth)}function l(e,t){var n=r.styles[t];return n?"["+r.colors[n][0]+"m"+e+"["+r.colors[n][1]+"m":e}function c(e,t){return e}function d(e,t,o){if(e.customInspect&&t&&_(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(o,e);return f(i)||(i=d(e,i,o)),i}var s=function(e,t){if(x(t))return e.stylize("undefined","undefined");if(f(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return b(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,t);if(s)return s;var a=Object.keys(t),r=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),w(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return u(t);if(0===a.length){if(_(t)){var l=t.name?": "+t.name:"";return e.stylize("[Function"+l+"]","special")}if(y(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(k(t))return e.stylize(Date.prototype.toString.call(t),"date");if(w(t))return u(t)}var c,v="",C=!1,j=["{","}"];return h(t)&&(C=!0,j=["[","]"]),_(t)&&(v=" [Function"+(t.name?": "+t.name:"")+"]"),y(t)&&(v=" "+RegExp.prototype.toString.call(t)),k(t)&&(v=" "+Date.prototype.toUTCString.call(t)),w(t)&&(v=" "+u(t)),0!==a.length||C&&0!=t.length?o<0?y(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=C?function(e,t,n,o,i){for(var s=[],a=0,r=t.length;a<r;++a)S(t,String(a))?s.push(p(e,t,n,o,String(a),!0)):s.push("");return i.forEach((function(i){i.match(/^\d+$/)||s.push(p(e,t,n,o,i,!0))})),s}(e,t,o,r,a):a.map((function(n){return p(e,t,o,r,n,C)})),e.seen.pop(),function(e,t,n){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,v,j)):j[0]+v+j[1]}function u(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,o,i,s){var a,r,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?r=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(r=e.stylize("[Setter]","special")),S(o,i)||(a="["+i+"]"),r||(e.seen.indexOf(l.value)<0?(r=m(n)?d(e,l.value,null):d(e,l.value,n-1)).indexOf("\n")>-1&&(r=s?r.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+r.split("\n").map((function(e){return" "+e})).join("\n")):r=e.stylize("[Circular]","special")),x(a)){if(s&&i.match(/^\d+$/))return r;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+r}function h(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function b(e){return"number"==typeof e}function f(e){return"string"==typeof e}function x(e){return void 0===e}function y(e){return v(e)&&"[object RegExp]"===C(e)}function v(e){return"object"==typeof e&&null!==e}function k(e){return v(e)&&"[object Date]"===C(e)}function w(e){return v(e)&&("[object Error]"===C(e)||e instanceof Error)}function _(e){return"function"==typeof e}function C(e){return Object.prototype.toString.call(e)}function j(e){return e<10?"0"+e.toString(10):e.toString(10)}n.debuglog=function(e){if(x(s)&&(s=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(s)){var o=t.pid;a[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,o,t)}}else a[e]=function(){};return a[e]},n.inspect=r,r.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},r.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=h,n.isBoolean=g,n.isNull=m,n.isNullOrUndefined=function(e){return null==e},n.isNumber=b,n.isString=f,n.isSymbol=function(e){return"symbol"==typeof e},n.isUndefined=x,n.isRegExp=y,n.isObject=v,n.isDate=k,n.isError=w,n.isFunction=_,n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},n.isBuffer=e("./support/isBuffer");var $=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.log=function(){var e,t |
| 113 |
;console.log("%s - %s",(t=[j((e=new Date).getHours()),j(e.getMinutes()),j(e.getSeconds())].join(":"),[e.getDate(),$[e.getMonth()],t].join(" ")),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!v(t))return e;for(var n=Object.keys(t),o=n.length;o--;)e[n[o]]=t[n[o]];return e}}).call(this,e("/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":14,"/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":18,inherits:17}],16:[function(e,t,n){function o(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0,o.defaultMaxListeners=10,o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},o.prototype.emit=function(e){var t,n,o,r,l,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length))throw(t=arguments[1])instanceof Error?t:TypeError('Uncaught, unspecified "error" event.');if(a(n=this._events[e]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(o=arguments.length,r=new Array(o-1),l=1;l<o;l++)r[l-1]=arguments[l];n.apply(this,r)}else if(s(n)){for(o=arguments.length,r=new Array(o-1),l=1;l<o;l++)r[l-1]=arguments[l];for(o=(c=n.slice()).length,l=0;l<o;l++)c[l].apply(this,r)}return!0},o.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(n=a(this._maxListeners)?o.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),console.trace()),this},o.prototype.on=o.prototype.addListener,o.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var n=!1;function o(){this.removeListener(e,o),n||(n=!0,t.apply(this,arguments))}return o.listener=t,this.on(e,o),this},o.prototype.removeListener=function(e,t){var n,o,a,r;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(n=this._events[e]).length,o=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(n)){for(r=a;r-- >0;)if(n[r]===t||n[r].listener&&n[r].listener===t){o=r;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},o.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[e]))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},o.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},o.listenerCount=function(e,t){return e._events&&e._events[t]?i(e._events[t])?1:e._events[t].length:0}},{}],17:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],18:[function(e,t,n){var o=t.exports={};function i(){}o.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var n=[];return window.addEventListener("message",(function(e){var t=e.source;t!==window&&null!==t||"process-tick"!==e.data||(e.stopPropagation(),n.length>0&&n.shift()())}),!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),o.title="browser",o.browser=!0,o.env={},o.argv=[],o.on=i,o.once=i,o.off=i,o.emit=i,o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")}},{}],19:[function(e,t,n){t.exports=e(14)},{}],20:[function(e,t,n){t.exports=e(15)},{"./support/isBuffer":19,"/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":18,inherits:17}]},{},[9])(9)})),ace.define("ace/mode/html_worker",[],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=(e("../lib/lang"),e("../worker/mirror").Mirror),s=e("./html/saxparser").SAXParser,a={"expected-doctype-but-got-start-tag":"info","expected-doctype-but-got-chars":"info","non-html-root":"info"},r=t.Worker=function(e){i.call(this,e),this.setTimeout(400),this.context=null};o.inherits(r,i),function(){this.setOptions=function(e){this.context=e.context},this.onUpdate=function(){var e=this.doc.getValue();if(e){var t=new s,n=[],o=function(){};t.contentHandler={startDocument:o,endDocument:o,startElement:o,endElement:o,characters:o},t.errorHandler={error:function(e,t,o){n.push({row:t.line,column:t.column,text:e,type:a[o]||"error"})}},t.parse(e,this.context),this.sender.emit("error",n)}}}.call(r.prototype)}))},5042(e){var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,o,i){void 0===i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var s=i;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===o&&(o=!0);var a=o,r=this.diff_commonPrefix(e,n),l=e.substring(0,r);e=e.substring(r),n=n.substring(r),r=this.diff_commonSuffix(e,n);var c=e.substring(e.length-r);e=e.substring(0,e.length-r),n=n.substring(0,n.length-r);var d=this.diff_compute_(e,n,a,s);return l&&d.unshift(new t.Diff(0,l)),c&&d.push(new t.Diff(0,c)),this.diff_cleanupMerge(d),d},t.prototype.diff_compute_=function(e,o,i,s){var a;if(!e)return[new t.Diff(1,o)];if(!o)return[new t.Diff(n,e)];var r=e.length>o.length?e:o,l=e.length>o.length?o:e,c=r.indexOf(l);if(-1!=c)return a=[new t.Diff(1,r.substring(0,c)),new t.Diff(0,l),new t.Diff(1,r.substring(c+l.length))],e.length>o.length&&(a[0][0]=a[2][0]=n),a;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,o)];var d=this.diff_halfMatch_(e,o);if(d){var u=d[0],p=d[1],h=d[2],g=d[3],m=d[4],b=this.diff_main(u,h,i,s),f=this.diff_main(p,g,i,s);return b.concat([new t.Diff(0,m)],f)}return i&&e.length>100&&o.length>100?this.diff_lineMode_(e,o,s):this.diff_bisect_(e,o,s)},t.prototype.diff_lineMode_=function(e,o,i){var s=this.diff_linesToChars_(e,o);e=s.chars1,o=s.chars2;var a=s.lineArray,r=this.diff_main(e,o,!1,i);this.diff_charsToLines_(r,a),this.diff_cleanupSemantic(r),r.push(new t.Diff(0,""));for(var l=0,c=0,d=0,u="",p="";l<r.length;){ |
| 114 |
switch(r[l][0]){case 1:d++,p+=r[l][1];break;case n:c++,u+=r[l][1];break;case 0:if(c>=1&&d>=1){r.splice(l-c-d,c+d),l=l-c-d;for(var h=this.diff_main(u,p,!1,i),g=h.length-1;g>=0;g--)r.splice(l,0,h[g]);l+=h.length}d=0,c=0,u="",p=""}l++}return r.pop(),r},t.prototype.diff_bisect_=function(e,o,i){for(var s=e.length,a=o.length,r=Math.ceil((s+a)/2),l=r,c=2*r,d=new Array(c),u=new Array(c),p=0;p<c;p++)d[p]=-1,u[p]=-1;d[l+1]=0,u[l+1]=0;for(var h=s-a,g=h%2!=0,m=0,b=0,f=0,x=0,y=0;y<r&&!((new Date).getTime()>i);y++){for(var v=-y+m;v<=y-b;v+=2){for(var k=l+v,w=(S=v==-y||v!=y&&d[k-1]<d[k+1]?d[k+1]:d[k-1]+1)-v;S<s&&w<a&&e.charAt(S)==o.charAt(w);)S++,w++;if(d[k]=S,S>s)b+=2;else if(w>a)m+=2;else if(g&&(j=l+h-v)>=0&&j<c&&-1!=u[j]&&S>=(C=s-u[j]))return this.diff_bisectSplit_(e,o,S,w,i)}for(var _=-y+f;_<=y-x;_+=2){for(var C,j=l+_,$=(C=_==-y||_!=y&&u[j-1]<u[j+1]?u[j+1]:u[j-1]+1)-_;C<s&&$<a&&e.charAt(s-C-1)==o.charAt(a-$-1);)C++,$++;if(u[j]=C,C>s)x+=2;else if($>a)f+=2;else if(!g){var S;if((k=l+h-_)>=0&&k<c&&-1!=d[k])if(w=l+(S=d[k])-k,S>=(C=s-C))return this.diff_bisectSplit_(e,o,S,w,i)}}}return[new t.Diff(n,e),new t.Diff(1,o)]},t.prototype.diff_bisectSplit_=function(e,t,n,o,i){var s=e.substring(0,n),a=t.substring(0,o),r=e.substring(n),l=t.substring(o),c=this.diff_main(s,a,!1,i),d=this.diff_main(r,l,!1,i);return c.concat(d)},t.prototype.diff_linesToChars_=function(e,t){var n=[],o={};function i(e){for(var t="",i=0,a=-1,r=n.length;a<e.length-1;){-1==(a=e.indexOf("\n",i))&&(a=e.length-1);var l=e.substring(i,a+1);(o.hasOwnProperty?o.hasOwnProperty(l):void 0!==o[l])?t+=String.fromCharCode(o[l]):(r==s&&(l=e.substring(i),a=e.length),t+=String.fromCharCode(r),o[l]=r,n[r++]=l),i=a+1}return t}n[0]="";var s=4e4,a=i(e);return s=65535,{chars1:a,chars2:i(t),lineArray:n}},t.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var o=e[n][1],i=[],s=0;s<o.length;s++)i[s]=t[o.charCodeAt(s)];e[n][1]=i.join("")}},t.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,o=Math.min(e.length,t.length),i=o,s=0;n<i;)e.substring(s,i)==t.substring(s,i)?s=n=i:o=i,i=Math.floor((o-n)/2+n);return i},t.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,o=Math.min(e.length,t.length),i=o,s=0;n<i;)e.substring(e.length-i,e.length-s)==t.substring(t.length-i,t.length-s)?s=n=i:o=i,i=Math.floor((o-n)/2+n);return i},t.prototype.diff_commonOverlap_=function(e,t){var n=e.length,o=t.length;if(0==n||0==o)return 0;n>o?e=e.substring(n-o):n<o&&(t=t.substring(0,n));var i=Math.min(n,o);if(e==t)return i;for(var s=0,a=1;;){var r=e.substring(i-a),l=t.indexOf(r);if(-1==l)return s;a+=l,0!=l&&e.substring(i-a)!=t.substring(0,a)||(s=a,a++)}},t.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,o=e.length>t.length?t:e;if(n.length<4||2*o.length<n.length)return null;var i=this;function s(e,t,n){for(var o,s,a,r,l=e.substring(n,n+Math.floor(e.length/4)),c=-1,d="";-1!=(c=t.indexOf(l,c+1));){var u=i.diff_commonPrefix(e.substring(n),t.substring(c)),p=i.diff_commonSuffix(e.substring(0,n),t.substring(0,c));d.length<p+u&&(d=t.substring(c-p,c)+t.substring(c,c+u),o=e.substring(0,n-p),s=e.substring(n+u),a=t.substring(0,c-p),r=t.substring(c+u))}return 2*d.length>=e.length?[o,s,a,r,d]:null}var a,r,l,c,d,u=s(n,o,Math.ceil(n.length/4)),p=s(n,o,Math.ceil(n.length/2));return u||p?(a=p?u&&u[4].length>p[4].length?u:p:u,e.length>t.length?(r=a[0],l=a[1],c=a[2],d=a[3]):(c=a[0],d=a[1],r=a[2],l=a[3]),[r,l,c,d,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var o=!1,i=[],s=0,a=null,r=0,l=0,c=0,d=0,u=0;r<e.length;)0==e[r][0]?(i[s++]=r,l=d,c=u,d=0,u=0,a=e[r][1]):(1==e[r][0]?d+=e[r][1].length:u+=e[r][1].length,a&&a.length<=Math.max(l,c)&&a.length<=Math.max(d,u)&&(e.splice(i[s-1],0,new t.Diff(n,a)),e[i[s-1]+1][0]=1,s--,r=--s>0?i[s-1]:-1,l=0,c=0,d=0,u=0,a=null,o=!0)),r++;for(o&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),r=1;r<e.length;){if(e[r-1][0]==n&&1==e[r][0]){var p=e[r-1][1],h=e[r][1],g=this.diff_commonOverlap_(p,h),m=this.diff_commonOverlap_(h,p);g>=m?(g>=p.length/2||g>=h.length/2)&&(e.splice(r,0,new t.Diff(0,h.substring(0,g))),e[r-1][1]=p.substring(0,p.length-g),e[r+1][1]=h.substring(g),r++):(m>=p.length/2||m>=h.length/2)&&(e.splice(r,0,new t.Diff(0,p.substring(0,m))),e[r-1][0]=1,e[r-1][1]=h.substring(0,h.length-m),e[r+1][0]=n,e[r+1][1]=p.substring(m),r++),r++}r++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var o=e.charAt(e.length-1),i=n.charAt(0),s=o.match(t.nonAlphaNumericRegex_),a=i.match(t.nonAlphaNumericRegex_),r=s&&o.match(t.whitespaceRegex_),l=a&&i.match(t.whitespaceRegex_),c=r&&o.match(t.linebreakRegex_),d=l&&i.match(t.linebreakRegex_),u=c&&e.match(t.blanklineEndRegex_),p=d&&n.match(t.blanklineStartRegex_);return u||p?5:c||d?4:s&&!r&&l?3:r||l?2:s||a?1:0}for(var o=1;o<e.length-1;){if(0==e[o-1][0]&&0==e[o+1][0]){var i=e[o-1][1],s=e[o][1],a=e[o+1][1],r=this.diff_commonSuffix(i,s);if(r){var l=s.substring(s.length-r);i=i.substring(0,i.length-r),s=l+s.substring(0,s.length-r),a=l+a}for(var c=i,d=s,u=a,p=n(i,s)+n(s,a);s.charAt(0)===a.charAt(0);){i+=s.charAt(0),s=s.substring(1)+a.charAt(0),a=a.substring(1);var h=n(i,s)+n(s,a);h>=p&&(p=h,c=i,d=s,u=a)}e[o-1][1]!=c&&(c?e[o-1][1]=c:(e.splice(o-1,1),o--),e[o][1]=d,u?e[o+1][1]=u:(e.splice(o+1,1),o--))}o++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var o=!1,i=[],s=0,a=null,r=0,l=!1,c=!1,d=!1,u=!1;r<e.length;)0==e[r][0]?(e[r][1].length<this.Diff_EditCost&&(d||u)?(i[s++]=r,l=d,c=u,a=e[r][1]):(s=0,a=null),d=u=!1):(e[r][0]==n?u=!0:d=!0,a&&(l&&c&&d&&u||a.length<this.Diff_EditCost/2&&l+c+d+u==3)&&(e.splice(i[s-1],0,new t.Diff(n,a)),e[i[s-1]+1][0]=1,s--,a=null,l&&c?(d=u=!0,s=0):(r=--s>0?i[s-1]:-1,d=u=!1),o=!0)),r++;o&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var o,i=0,s=0,a=0,r="",l="";i<e.length;)switch(e[i][0]){case 1:a++,l+=e[i][1],i++;break;case n:s++,r+=e[i][1],i++;break;case 0:s+a>1?(0!==s&&0!==a&&(0!==(o=this.diff_commonPrefix(l,r))&&(i-s-a>0&&0==e[i-s-a-1][0]?e[i-s-a-1][1]+=l.substring(0,o):(e.splice(0,0,new t.Diff(0,l.substring(0,o))),i++),l=l.substring(o),r=r.substring(o)),0!==(o=this.diff_commonSuffix(l,r))&&(e[i][1]=l.substring(l.length-o)+e[i][1],l=l.substring(0,l.length-o),r=r.substring(0,r.length-o))),i-=s+a,e.splice(i,s+a),r.length&&(e.splice(i,0,new t.Diff(n,r)),i++),l.length&&(e.splice(i,0,new t.Diff(1,l)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,s=0,r="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(i=1;i<e.length-1;)0==e[i-1][0]&&0==e[i+1][0]&&(e[i][1].substring(e[i][1].length-e[i-1][1].length)==e[i-1][1]?(e[i][1]=e[i-1][1]+e[i][1].substring(0,e[i][1].length-e[i-1][1].length),e[i+1][1]=e[i-1][1]+e[i+1][1],e.splice(i-1,1),c=!0):e[i][1].substring(0,e[i+1][1].length)==e[i+1][1]&&(e[i-1][1]+=e[i+1][1],e[i][1]=e[i][1].substring(e[i+1][1].length)+e[i+1][1],e.splice(i+1,1),c=!0)),i++;c&&this.diff_cleanupMerge(e)},t.prototype.diff_xIndex=function(e,t){var o,i=0,s=0,a=0,r=0;for(o=0;o<e.length&&(1!==e[o][0]&&(i+=e[o][1].length),e[o][0]!==n&&(s+=e[o][1].length),!(i>t));o++)a=i,r=s;return e.length!=o&&e[o][0]===n?r:r+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],o=/&/g,i=/</g,s=/>/g,a=/\n/g,r=0;r<e.length;r++){var l=e[r][0],c=e[r][1].replace(o,"&").replace(i,"<").replace(s,">").replace(a,"¶<br>");switch(l){case 1:t[r]='<ins style="background:#e6ffe6;">'+c+"</ins>";break;case n:t[r]='<del style="background:#ffe6e6;">'+c+"</del>";break;case 0:t[r]="<span>"+c+"</span>"}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},t.prototype.diff_text2=function(e){ |
| 115 |
for(var t=[],o=0;o<e.length;o++)e[o][0]!==n&&(t[o]=e[o][1]);return t.join("")},t.prototype.diff_levenshtein=function(e){for(var t=0,o=0,i=0,s=0;s<e.length;s++){var a=e[s][0],r=e[s][1];switch(a){case 1:o+=r.length;break;case n:i+=r.length;break;case 0:t+=Math.max(o,i),o=0,i=0}}return t+Math.max(o,i)},t.prototype.diff_toDelta=function(e){for(var t=[],o=0;o<e.length;o++)switch(e[o][0]){case 1:t[o]="+"+encodeURI(e[o][1]);break;case n:t[o]="-"+e[o][1].length;break;case 0:t[o]="="+e[o][1].length}return t.join("\t").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(e,o){for(var i=[],s=0,a=0,r=o.split(/\t/g),l=0;l<r.length;l++){var c=r[l].substring(1);switch(r[l].charAt(0)){case"+":try{i[s++]=new t.Diff(1,decodeURI(c))}catch(e){throw new Error("Illegal escape in diff_fromDelta: "+c)}break;case"-":case"=":var d=parseInt(c,10);if(isNaN(d)||d<0)throw new Error("Invalid number in diff_fromDelta: "+c);var u=e.substring(a,a+=d);"="==r[l].charAt(0)?i[s++]=new t.Diff(0,u):i[s++]=new t.Diff(n,u);break;default:if(r[l])throw new Error("Invalid diff operation in diff_fromDelta: "+r[l])}}if(a!=e.length)throw new Error("Delta length ("+a+") does not equal source text length ("+e.length+").");return i},t.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},t.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var o=this.match_alphabet_(t),i=this;function s(e,o){var s=e/t.length,a=Math.abs(n-o);return i.Match_Distance?s+a/i.Match_Distance:a?1:s}var a=this.Match_Threshold,r=e.indexOf(t,n);-1!=r&&(a=Math.min(s(0,r),a),-1!=(r=e.lastIndexOf(t,n+t.length))&&(a=Math.min(s(0,r),a)));var l,c,d=1<<t.length-1;r=-1;for(var u,p=t.length+e.length,h=0;h<t.length;h++){for(l=0,c=p;l<c;)s(h,n+c)<=a?l=c:p=c,c=Math.floor((p-l)/2+l);p=c;var g=Math.max(1,n-c+1),m=Math.min(n+c,e.length)+t.length,b=Array(m+2);b[m+1]=(1<<h)-1;for(var f=m;f>=g;f--){var x=o[e.charAt(f-1)];if(b[f]=0===h?(b[f+1]<<1|1)&x:(b[f+1]<<1|1)&x|(u[f+1]|u[f])<<1|1|u[f+1],b[f]&d){var y=s(h,f-1);if(y<=a){if(a=y,!((r=f-1)>n))break;g=Math.max(1,2*n-r)}}}if(s(h+1,n)>a)break;u=b}return r},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},t.prototype.patch_addContext_=function(e,n){if(0!=n.length){if(null===e.start2)throw Error("patch not initialized");for(var o=n.substring(e.start2,e.start2+e.length1),i=0;n.indexOf(o)!=n.lastIndexOf(o)&&o.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,o=n.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var s=n.substring(e.start2-i,e.start2);s&&e.diffs.unshift(new t.Diff(0,s));var a=n.substring(e.start2+e.length1,e.start2+e.length1+i);a&&e.diffs.push(new t.Diff(0,a)),e.start1-=s.length,e.start2-=s.length,e.length1+=s.length+a.length,e.length2+=s.length+a.length}},t.prototype.patch_make=function(e,o,i){var s,a;if("string"==typeof e&&"string"==typeof o&&void 0===i)s=e,(a=this.diff_main(s,o,!0)).length>2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===o&&void 0===i)a=e,s=this.diff_text1(a);else if("string"==typeof e&&o&&"object"==typeof o&&void 0===i)s=e,a=o;else{if("string"!=typeof e||"string"!=typeof o||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");s=e,a=i}if(0===a.length)return[];for(var r=[],l=new t.patch_obj,c=0,d=0,u=0,p=s,h=s,g=0;g<a.length;g++){var m=a[g][0],b=a[g][1];switch(c||0===m||(l.start1=d,l.start2=u),m){case 1:l.diffs[c++]=a[g],l.length2+=b.length,h=h.substring(0,u)+b+h.substring(u);break;case n:l.length1+=b.length,l.diffs[c++]=a[g],h=h.substring(0,u)+h.substring(u+b.length);break;case 0:b.length<=2*this.Patch_Margin&&c&&a.length!=g+1?(l.diffs[c++]=a[g],l.length1+=b.length,l.length2+=b.length):b.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,p),r.push(l),l=new t.patch_obj,c=0,p=h,d=u)}1!==m&&(d+=b.length),m!==n&&(u+=b.length)}return c&&(this.patch_addContext_(l,p),r.push(l)),r},t.prototype.patch_deepCopy=function(e){for(var n=[],o=0;o<e.length;o++){var i=e[o],s=new t.patch_obj;s.diffs=[];for(var a=0;a<i.diffs.length;a++)s.diffs[a]=new t.Diff(i.diffs[a][0],i.diffs[a][1]);s.start1=i.start1,s.start2=i.start2,s.length1=i.length1,s.length2=i.length2,n[o]=s}return n},t.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var o=this.patch_addPadding(e);t=o+t+o,this.patch_splitMax(e);for(var i=0,s=[],a=0;a<e.length;a++){var r,l,c=e[a].start2+i,d=this.diff_text1(e[a].diffs),u=-1;if(d.length>this.Match_MaxBits?-1!=(r=this.match_main(t,d.substring(0,this.Match_MaxBits),c))&&(-1==(u=this.match_main(t,d.substring(d.length-this.Match_MaxBits),c+d.length-this.Match_MaxBits))||r>=u)&&(r=-1):r=this.match_main(t,d,c),-1==r)s[a]=!1,i-=e[a].length2-e[a].length1;else if(s[a]=!0,i=r-c,d==(l=-1==u?t.substring(r,r+d.length):t.substring(r,u+this.Match_MaxBits)))t=t.substring(0,r)+this.diff_text2(e[a].diffs)+t.substring(r+d.length);else{var p=this.diff_main(d,l,!1);if(d.length>this.Match_MaxBits&&this.diff_levenshtein(p)/d.length>this.Patch_DeleteThreshold)s[a]=!1;else{this.diff_cleanupSemanticLossless(p);for(var h,g=0,m=0;m<e[a].diffs.length;m++){var b=e[a].diffs[m];0!==b[0]&&(h=this.diff_xIndex(p,g)),1===b[0]?t=t.substring(0,r+h)+b[1]+t.substring(r+h):b[0]===n&&(t=t.substring(0,r+h)+t.substring(r+this.diff_xIndex(p,g+b[1].length))),b[0]!==n&&(g+=b[1].length)}}}}return[t=t.substring(o.length,t.length-o.length),s]},t.prototype.patch_addPadding=function(e){for(var n=this.Patch_Margin,o="",i=1;i<=n;i++)o+=String.fromCharCode(i);for(i=0;i<e.length;i++)e[i].start1+=n,e[i].start2+=n;var s=e[0],a=s.diffs;if(0==a.length||0!=a[0][0])a.unshift(new t.Diff(0,o)),s.start1-=n,s.start2-=n,s.length1+=n,s.length2+=n;else if(n>a[0][1].length){var r=n-a[0][1].length;a[0][1]=o.substring(a[0][1].length)+a[0][1],s.start1-=r,s.start2-=r,s.length1+=r,s.length2+=r}return 0==(a=(s=e[e.length-1]).diffs).length||0!=a[a.length-1][0]?(a.push(new t.Diff(0,o)),s.length1+=n,s.length2+=n):n>a[a.length-1][1].length&&(r=n-a[a.length-1][1].length,a[a.length-1][1]+=o.substring(0,r),s.length1+=r,s.length2+=r),o},t.prototype.patch_splitMax=function(e){for(var o=this.Match_MaxBits,i=0;i<e.length;i++)if(!(e[i].length1<=o)){var s=e[i];e.splice(i--,1);for(var a=s.start1,r=s.start2,l="";0!==s.diffs.length;){var c=new t.patch_obj,d=!0;for(c.start1=a-l.length,c.start2=r-l.length,""!==l&&(c.length1=c.length2=l.length,c.diffs.push(new t.Diff(0,l)));0!==s.diffs.length&&c.length1<o-this.Patch_Margin;){var u=s.diffs[0][0],p=s.diffs[0][1];1===u?(c.length2+=p.length,r+=p.length,c.diffs.push(s.diffs.shift()),d=!1):u===n&&1==c.diffs.length&&0==c.diffs[0][0]&&p.length>2*o?(c.length1+=p.length,a+=p.length,d=!1,c.diffs.push(new t.Diff(u,p)),s.diffs.shift()):(p=p.substring(0,o-c.length1-this.Patch_Margin),c.length1+=p.length,a+=p.length,0===u?(c.length2+=p.length,r+=p.length):d=!1,c.diffs.push(new t.Diff(u,p)),p==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(p.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var h=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);""!==h&&(c.length1+=h.length,c.length2+=h.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=h:c.diffs.push(new t.Diff(0,h))),d||e.splice(++i,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},t.prototype.patch_fromText=function(e){var o=[];if(!e)return o;for(var i=e.split("\n"),s=0,a=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;s<i.length;){var r=i[s].match(a);if(!r)throw new Error("Invalid patch string: "+i[s]);var l=new t.patch_obj;for(o.push(l),l.start1=parseInt(r[1],10),""===r[2]?(l.start1--, |
| 116 |
l.length1=1):"0"==r[2]?l.length1=0:(l.start1--,l.length1=parseInt(r[2],10)),l.start2=parseInt(r[3],10),""===r[4]?(l.start2--,l.length2=1):"0"==r[4]?l.length2=0:(l.start2--,l.length2=parseInt(r[4],10)),s++;s<i.length;){var c=i[s].charAt(0);try{var d=decodeURI(i[s].substring(1))}catch(e){throw new Error("Illegal escape in patch_fromText: "+d)}if("-"==c)l.diffs.push(new t.Diff(n,d));else if("+"==c)l.diffs.push(new t.Diff(1,d));else if(" "==c)l.diffs.push(new t.Diff(0,d));else{if("@"==c)break;if(""!==c)throw new Error('Invalid patch mode "'+c+'" in: '+d)}s++}}return o},(t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0}).prototype.toString=function(){for(var e,t=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],o=0;o<this.diffs.length;o++){switch(this.diffs[o][0]){case 1:e="+";break;case n:e="-";break;case 0:e=" "}t[o+1]=e+encodeURI(this.diffs[o][1])+"\n"}return t.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0},9529(e){var t,n="__lodash_hash_undefined__",o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,s=/^\./,a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,l=/^\[object .+?Constructor\]$/,c="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis,d="object"==typeof self&&self&&self.Object===Object&&self,u=c||d||Function("return this")(),p=Array.prototype,h=Function.prototype,g=Object.prototype,m=u["__core-js_shared__"],b=(t=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"",f=h.toString,x=g.hasOwnProperty,y=g.toString,v=RegExp("^"+f.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=u.Symbol,w=p.splice,_=E(u,"Map"),C=E(Object,"create"),j=k?k.prototype:void 0,$=j?j.toString:void 0;function S(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function N(e,t){for(var n,o,i=e.length;i--;)if((n=e[i][0])===(o=t)||n!=n&&o!=o)return i;return-1}function L(e,t){var n,o,i=e.__data__;return("string"==(o=typeof(n=t))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function E(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!O(e)||b&&b in e)return!1;var t=function(e){var t=O(e)?y.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?v:l;return t.test(function(e){if(null!=e){try{return f.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}S.prototype.clear=function(){this.__data__=C?C(null):{}},S.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},S.prototype.get=function(e){var t=this.__data__;if(C){var o=t[e];return o===n?void 0:o}return x.call(t,e)?t[e]:void 0},S.prototype.has=function(e){var t=this.__data__;return C?void 0!==t[e]:x.call(t,e)},S.prototype.set=function(e,t){return this.__data__[e]=C&&void 0===t?n:t,this},T.prototype.clear=function(){this.__data__=[]},T.prototype.delete=function(e){var t=this.__data__,n=N(t,e);return!(n<0||(n==t.length-1?t.pop():w.call(t,n,1),0))},T.prototype.get=function(e){var t=this.__data__,n=N(t,e);return n<0?void 0:t[n][1]},T.prototype.has=function(e){return N(this.__data__,e)>-1},T.prototype.set=function(e,t){var n=this.__data__,o=N(n,e);return o<0?n.push([e,t]):n[o][1]=t,this},M.prototype.clear=function(){this.__data__={hash:new S,map:new(_||T),string:new S}},M.prototype.delete=function(e){return L(this,e).delete(e)},M.prototype.get=function(e){return L(this,e).get(e)},M.prototype.has=function(e){return L(this,e).has(e)},M.prototype.set=function(e,t){return L(this,e).set(e,t),this};var P=B((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(R(e))return $?$.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return s.test(e)&&n.push(""),e.replace(a,(function(e,t,o,i){n.push(o?i.replace(r,"$1"):t||e)})),n}));function A(e){if("string"==typeof e||R(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var o=arguments,i=t?t.apply(this,o):o[0],s=n.cache;if(s.has(i))return s.get(i);var a=e.apply(this,o);return n.cache=s.set(i,a),a};return n.cache=new(B.Cache||M),n}B.Cache=M;var I=Array.isArray;function O(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function R(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==y.call(e)}e.exports=function(e,t,n){var s=null==e?void 0:function(e,t){var n;t=function(e,t){if(I(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!R(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:I(n=t)?n:P(n);for(var s=0,a=t.length;null!=e&&s<a;)e=e[A(t[s++])];return s&&s==a?e:void 0}(e,t);return void 0===s?n:s}},1097(e,t,n){e=n.nmd(e);var o="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",a="[object Array]",r="[object Boolean]",l="[object Date]",c="[object Error]",d="[object Function]",u="[object Map]",p="[object Number]",h="[object Object]",g="[object Promise]",m="[object RegExp]",b="[object Set]",f="[object String]",x="[object WeakMap]",y="[object ArrayBuffer]",v="[object DataView]",k=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,_={};_["[object Float32Array]"]=_["[object Float64Array]"]=_["[object Int8Array]"]=_["[object Int16Array]"]=_["[object Int32Array]"]=_["[object Uint8Array]"]=_["[object Uint8ClampedArray]"]=_["[object Uint16Array]"]=_["[object Uint32Array]"]=!0,_[s]=_[a]=_[y]=_[r]=_[v]=_[l]=_[c]=_[d]=_[u]=_[p]=_[h]=_[m]=_[b]=_[f]=_[x]=!1;var C="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis,j="object"==typeof self&&self&&self.Object===Object&&self,$=C||j||Function("return this")(),S=t&&!t.nodeType&&t,T=S&&e&&!e.nodeType&&e,M=T&&T.exports===S,N=M&&C.process,L=function(){try{return N&&N.binding&&N.binding("util")}catch(e){}}(),E=L&&L.isTypedArray;function P(e,t){for(var n=-1,o=null==e?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}function A(e){var t=-1,n=Array(e.size);return e.forEach((function(e,o){n[++t]=[o,e]})),n}function B(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var I,O,R,z=Array.prototype,D=Function.prototype,F=Object.prototype,H=$["__core-js_shared__"],W=D.toString,U=F.hasOwnProperty,G=(I=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"",V=F.toString,q=RegExp("^"+W.call(U).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=M?$.Buffer:void 0,K=$.Symbol,Q=$.Uint8Array,Z=F.propertyIsEnumerable,X=z.splice,J=K?K.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=Y?Y.isBuffer:void 0,ne=(O=Object.keys,R=Object,function(e){return O(R(e))}),oe=Te($,"DataView"),ie=Te($,"Map"),se=Te($,"Promise"),ae=Te($,"Set"),re=Te($,"WeakMap"),le=Te(Object,"create"),ce=Ee(oe),de=Ee(ie),ue=Ee(se),pe=Ee(ae),he=Ee(re),ge=K?K.prototype:void 0,me=ge?ge.valueOf:void 0;function be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function fe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function ye(e){var t=-1,n=null==e?0:e.length |
| 117 |
;for(this.__data__=new xe;++t<n;)this.add(e[t])}function ve(e){var t=this.__data__=new fe(e);this.size=t.size}function ke(e,t){for(var n=e.length;n--;)if(Pe(e[n][0],t))return n;return-1}function we(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":J&&J in Object(e)?function(e){var t=U.call(e,J),n=e[J];try{e[J]=void 0;var o=!0}catch(e){}var i=V.call(e);return o&&(t?e[J]=n:delete e[J]),i}(e):function(e){return V.call(e)}(e)}function _e(e){return De(e)&&we(e)==s}function Ce(e,t,n,o,i){return e===t||(null==e||null==t||!De(e)&&!De(t)?e!=e&&t!=t:function(e,t,n,o,i,d){var g=Be(e),x=Be(t),k=g?a:Ne(e),w=x?a:Ne(t),_=(k=k==s?h:k)==h,C=(w=w==s?h:w)==h,j=k==w;if(j&&Ie(e)){if(!Ie(t))return!1;g=!0,_=!1}if(j&&!_)return d||(d=new ve),g||Fe(e)?je(e,t,n,o,i,d):function(e,t,n,o,i,s,a){switch(n){case v:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!s(new Q(e),new Q(t)));case r:case l:case p:return Pe(+e,+t);case c:return e.name==t.name&&e.message==t.message;case m:case f:return e==t+"";case u:var d=A;case b:var h=1&o;if(d||(d=B),e.size!=t.size&&!h)return!1;var g=a.get(e);if(g)return g==t;o|=2,a.set(e,t);var x=je(d(e),d(t),o,i,s,a);return a.delete(e),x;case"[object Symbol]":if(me)return me.call(e)==me.call(t)}return!1}(e,t,k,n,o,i,d);if(!(1&n)){var $=_&&U.call(e,"__wrapped__"),S=C&&U.call(t,"__wrapped__");if($||S){var T=$?e.value():e,M=S?t.value():t;return d||(d=new ve),i(T,M,n,o,d)}}return!!j&&(d||(d=new ve),function(e,t,n,o,i,s){var a=1&n,r=$e(e),l=r.length;if(l!=$e(t).length&&!a)return!1;for(var c=l;c--;){var d=r[c];if(!(a?d in t:U.call(t,d)))return!1}var u=s.get(e);if(u&&s.get(t))return u==t;var p=!0;s.set(e,t),s.set(t,e);for(var h=a;++c<l;){var g=e[d=r[c]],m=t[d];if(o)var b=a?o(m,g,d,t,e,s):o(g,m,d,e,t,s);if(!(void 0===b?g===m||i(g,m,n,o,s):b)){p=!1;break}h||(h="constructor"==d)}if(p&&!h){var f=e.constructor,x=t.constructor;f==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof f&&f instanceof f&&"function"==typeof x&&x instanceof x||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,n,o,i,d))}(e,t,n,o,Ce,i))}function je(e,t,n,o,i,s){var a=1&n,r=e.length,l=t.length;if(r!=l&&!(a&&l>r))return!1;var c=s.get(e);if(c&&s.get(t))return c==t;var d=-1,u=!0,p=2&n?new ye:void 0;for(s.set(e,t),s.set(t,e);++d<r;){var h=e[d],g=t[d];if(o)var m=a?o(g,h,d,t,e,s):o(h,g,d,e,t,s);if(void 0!==m){if(m)continue;u=!1;break}if(p){if(!P(t,(function(e,t){if(a=t,!p.has(a)&&(h===e||i(h,e,n,o,s)))return p.push(t);var a}))){u=!1;break}}else if(h!==g&&!i(h,g,n,o,s)){u=!1;break}}return s.delete(e),s.delete(t),u}function $e(e){return function(e,t,n){var o=t(e);return Be(e)?o:function(e,t){for(var n=-1,o=t.length,i=e.length;++n<o;)e[i+n]=t[n];return e}(o,n(e))}(e,He,Me)}function Se(e,t){var n,o,i=e.__data__;return("string"==(o=typeof(n=t))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Te(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ze(e)||function(e){return!!G&&G in e}(e))&&(Oe(e)?q:k).test(Ee(e))}(n)?n:void 0}be.prototype.clear=function(){this.__data__=le?le(null):{},this.size=0},be.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},be.prototype.get=function(e){var t=this.__data__;if(le){var n=t[e];return n===o?void 0:n}return U.call(t,e)?t[e]:void 0},be.prototype.has=function(e){var t=this.__data__;return le?void 0!==t[e]:U.call(t,e)},be.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=le&&void 0===t?o:t,this},fe.prototype.clear=function(){this.__data__=[],this.size=0},fe.prototype.delete=function(e){var t=this.__data__,n=ke(t,e);return!(n<0||(n==t.length-1?t.pop():X.call(t,n,1),--this.size,0))},fe.prototype.get=function(e){var t=this.__data__,n=ke(t,e);return n<0?void 0:t[n][1]},fe.prototype.has=function(e){return ke(this.__data__,e)>-1},fe.prototype.set=function(e,t){var n=this.__data__,o=ke(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this},xe.prototype.clear=function(){this.size=0,this.__data__={hash:new be,map:new(ie||fe),string:new be}},xe.prototype.delete=function(e){var t=Se(this,e).delete(e);return this.size-=t?1:0,t},xe.prototype.get=function(e){return Se(this,e).get(e)},xe.prototype.has=function(e){return Se(this,e).has(e)},xe.prototype.set=function(e,t){var n=Se(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this},ye.prototype.add=ye.prototype.push=function(e){return this.__data__.set(e,o),this},ye.prototype.has=function(e){return this.__data__.has(e)},ve.prototype.clear=function(){this.__data__=new fe,this.size=0},ve.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ve.prototype.get=function(e){return this.__data__.get(e)},ve.prototype.has=function(e){return this.__data__.has(e)},ve.prototype.set=function(e,t){var n=this.__data__;if(n instanceof fe){var o=n.__data__;if(!ie||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new xe(o)}return n.set(e,t),this.size=n.size,this};var Me=ee?function(e){return null==e?[]:(e=Object(e),function(t){for(var n=-1,o=null==t?0:t.length,i=0,s=[];++n<o;){var a=t[n];r=a,Z.call(e,r)&&(s[i++]=a)}var r;return s}(ee(e)))}:function(){return[]},Ne=we;function Le(e,t){return!!(t=t??i)&&("number"==typeof e||w.test(e))&&e>-1&&e%1==0&&e<t}function Ee(e){if(null!=e){try{return W.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Pe(e,t){return e===t||e!=e&&t!=t}(oe&&Ne(new oe(new ArrayBuffer(1)))!=v||ie&&Ne(new ie)!=u||se&&Ne(se.resolve())!=g||ae&&Ne(new ae)!=b||re&&Ne(new re)!=x)&&(Ne=function(e){var t=we(e),n=t==h?e.constructor:void 0,o=n?Ee(n):"";if(o)switch(o){case ce:return v;case de:return u;case ue:return g;case pe:return b;case he:return x}return t});var Ae=_e(function(){return arguments}())?_e:function(e){return De(e)&&U.call(e,"callee")&&!Z.call(e,"callee")},Be=Array.isArray,Ie=te||function(){return!1};function Oe(e){if(!ze(e))return!1;var t=we(e);return t==d||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Re(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function ze(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function De(e){return null!=e&&"object"==typeof e}var Fe=E?function(e){return function(t){return e(t)}}(E):function(e){return De(e)&&Re(e.length)&&!!_[we(e)]};function He(e){return null!=(t=e)&&Re(t.length)&&!Oe(t)?function(e,t){var n=Be(e),o=!n&&Ae(e),i=!n&&!o&&Ie(e),s=!n&&!o&&!i&&Fe(e),a=n||o||i||s,r=a?function(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}(e.length,String):[],l=r.length;for(var c in e)!t&&!U.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Le(c,l))||r.push(c);return r}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||F))return ne(e);var t,n,o=[];for(var i in Object(e))U.call(e,i)&&"constructor"!=i&&o.push(i);return o}(e);var t}e.exports=function(e,t){return Ce(e,t)}},795(e,t,n){"use strict";var o=n(1212);function i(){}function s(){}s.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,s,a){if(a!==o){var r=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw r.name="Invariant Violation",r}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:i};return n.PropTypes=n,n}},135(e,t,n){e.exports=n(795)()},1212(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3468(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[] |
| 118 |
}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1973),r=n(135),l=n(1609),c=n(1097),d=n(9378),u=(0,d.getAceInstance)(),p=function(e){function t(t){var n=e.call(this,t)||this;return d.editorEvents.forEach((function(e){n[e]=n[e].bind(n)})),n.debounce=d.debounce,n}return i(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,o=t.onBeforeLoad,i=t.onValidate,s=t.mode,a=t.focus,r=t.theme,l=t.fontSize,c=t.lineHeight,p=t.value,h=t.defaultValue,g=t.showGutter,m=t.wrapEnabled,b=t.showPrintMargin,f=t.scrollMargin,x=void 0===f?[0,0,0,0]:f,y=t.keyboardHandler,v=t.onLoad,k=t.commands,w=t.annotations,_=t.markers,C=t.placeholder;this.editor=u.edit(this.refEditor),o&&o(u);for(var j=Object.keys(this.props.editorProps),$=0;$<j.length;$++)this.editor[j[$]]=this.props.editorProps[j[$]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(x[0],x[1],x[2],x[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode("string"==typeof s?"ace/mode/".concat(s):s),r&&""!==r&&this.editor.setTheme("ace/theme/".concat(r)),this.editor.setFontSize("number"==typeof l?"".concat(l,"px"):l),c&&(this.editor.container.style.lineHeight="number"==typeof c?"".concat(c,"px"):"".concat(c),this.editor.renderer.updateFontSize()),this.editor.getSession().setValue(h||p||""),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(g),this.editor.getSession().setUseWrapMode(m),this.editor.setShowPrintMargin(b),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),C&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),i&&this.editor.getSession().on("changeAnnotation",(function(){var t=e.editor.getSession().getAnnotations();e.props.onValidate(t)})),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(w||[]),_&&_.length>0&&this.handleMarkers(_);var S=this.editor.$options;d.editorOptions.forEach((function(t){S.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(t," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))})),this.handleOptions(this.props),Array.isArray(k)&&k.forEach((function(t){"string"==typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),y&&this.editor.setKeyboardHandler("ace/keyboard/"+y),n&&(this.refEditor.className+=" "+n),v&&v(this.editor),this.editor.resize(),a&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,o=0;o<d.editorOptions.length;o++){var i=d.editorOptions[o];n[i]!==t[i]&&this.editor.setOption(i,n[i])}if(n.className!==t.className){var s=this.refEditor.className.trim().split(" ");t.className.trim().split(" ").forEach((function(e){var t=s.indexOf(e);s.splice(t,1)})),this.refEditor.className=" "+n.className+" "+s.join(" ")}var a=this.editor&&null!=n.value&&this.editor.getValue()!==n.value;if(a){this.silent=!0;var r=this.editor.session.selection.toJSON();this.editor.setValue(n.value,n.cursorStart),this.editor.session.selection.fromJSON(r),this.silent=!1}n.placeholder!==t.placeholder&&this.updatePlaceholder(),n.mode!==t.mode&&this.editor.getSession().setMode("string"==typeof n.mode?"ace/mode/".concat(n.mode):n.mode),n.theme!==t.theme&&this.editor.setTheme("ace/theme/"+n.theme),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+n.keyboardHandler):this.editor.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&this.editor.setFontSize("number"==typeof n.fontSize?"".concat(n.fontSize,"px"):n.fontSize),n.lineHeight!==t.lineHeight&&(this.editor.container.style.lineHeight="number"==typeof n.lineHeight?"".concat(n.lineHeight,"px"):n.lineHeight,this.editor.renderer.updateFontSize()),n.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(n.showGutter),c(n.setOptions,t.setOptions)||this.handleOptions(n),!a&&c(n.annotations,t.annotations)||this.editor.getSession().setAnnotations(n.annotations||[]),!c(n.markers,t.markers)&&Array.isArray(n.markers)&&this.handleMarkers(n.markers),c(n.scrollMargin,t.scrollMargin)||this.handleScrollMargins(n.scrollMargin),e.height===this.props.height&&e.width===this.props.width||this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()},t.prototype.handleScrollMargins=function(e){void 0===e&&(e=[0,0,0,0]),this.editor.renderer.setScrollMargin(e[0],e[1],e[2],e[3])},t.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null)},t.prototype.onChange=function(e){if(this.editor&&this.props.onChange&&!this.silent){var t=this.editor.getValue();this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=this.editor.getSelection();this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=this.editor.getSelection();this.props.onCursorChange(t,e)}},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e,this.editor)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e,this.editor)},t.prototype.onCopy=function(e){var t=e.text;this.props.onCopy&&this.props.onCopy(t)},t.prototype.onPaste=function(e){var t=e.text;this.props.onPaste&&this.props.onPaste(t)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e){for(var t=Object.keys(e.setOptions),n=0;n<t.length;n++)this.editor.setOption(t[n],e.setOptions[t[n]])},t.prototype.handleMarkers=function(e){var t=this,n=this.editor.getSession().getMarkers(!0);for(var o in n)n.hasOwnProperty(o)&&this.editor.getSession().removeMarker(n[o].id);for(var o in n=this.editor.getSession().getMarkers(!1))n.hasOwnProperty(o)&&"ace_active-line"!==n[o].clazz&&"ace_selected-word"!==n[o].clazz&&this.editor.getSession().removeMarker(n[o].id);e.forEach((function(e){var n=e.startRow,o=e.startCol,i=e.endRow,s=e.endCol,r=e.className,l=e.type,c=e.inFront,d=void 0!==c&&c,u=new a.Range(n,o,i,s);t.editor.getSession().addMarker(u,r,l,d)}))},t.prototype.updatePlaceholder=function(){var e=this.editor,t=this.props.placeholder,n=!e.session.getValue().length,o=e.renderer.placeholderNode;!n&&o?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):n&&!o?((o=e.renderer.placeholderNode=document.createElement("div")).textContent=t||"",o.className="ace_comment ace_placeholder",o.style.padding="0 9px",o.style.position="absolute",o.style.zIndex="3", |
| 119 |
e.renderer.scroller.appendChild(o)):n&&o&&(o.textContent=t)},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,o=e.height,i=e.style,a=s({width:n,height:o},i);return l.createElement("div",{ref:this.updateRef,id:t,style:a})},t.propTypes={mode:r.oneOfType([r.string,r.object]),focus:r.bool,theme:r.string,name:r.string,className:r.string,height:r.string,width:r.string,fontSize:r.oneOfType([r.number,r.string]),lineHeight:r.oneOfType([r.number,r.string]),showGutter:r.bool,onChange:r.func,onCopy:r.func,onPaste:r.func,onFocus:r.func,onInput:r.func,onBlur:r.func,onScroll:r.func,value:r.string,defaultValue:r.string,onLoad:r.func,onSelectionChange:r.func,onCursorChange:r.func,onBeforeLoad:r.func,onValidate:r.func,minLines:r.number,maxLines:r.number,readOnly:r.bool,highlightActiveLine:r.bool,tabSize:r.number,showPrintMargin:r.bool,cursorStart:r.number,debounceChangePeriod:r.number,editorProps:r.object,setOptions:r.object,style:r.object,scrollMargin:r.array,annotations:r.array,markers:r.array,keyboardHandler:r.string,wrapEnabled:r.bool,enableSnippets:r.bool,enableBasicAutocompletion:r.oneOfType([r.bool,r.array]),enableLiveAutocompletion:r.oneOfType([r.bool,r.array]),navigateToFileEnd:r.bool,commands:r.array,placeholder:r.string},t.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},t}(l.Component);t.default=p},7212(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});Object.defineProperty(t,"__esModule",{value:!0});var s=n(135),a=n(1609),r=n(7911),l=n(5042),c=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.props.value},n.onChange=n.onChange.bind(n),n.diff=n.diff.bind(n),n}return i(t,e),t.prototype.componentDidUpdate=function(){var e=this.props.value;e!==this.state.value&&this.setState({value:e})},t.prototype.onChange=function(e){this.setState({value:e}),this.props.onChange&&this.props.onChange(e)},t.prototype.diff=function(){var e=new l,t=this.state.value[0],n=this.state.value[1];if(0===t.length&&0===n.length)return[];var o=e.diff_main(t,n);e.diff_cleanupSemantic(o);var i=this.generateDiffedLines(o);return this.setCodeMarkers(i)},t.prototype.generateDiffedLines=function(e){var t={left:[],right:[]},n={left:1,right:1};return e.forEach((function(e){var o=e[0],i=e[1],s=i.split("\n").length-1;if(0!==i.length){var a=i[0],r=i[i.length-1],l=0;switch(o){case 0:n.left+=s,n.right+=s;break;case-1:"\n"===a&&(n.left++,s--),0===(l=s)&&t.right.push({startLine:n.right,endLine:n.right}),"\n"===r&&(l-=1),t.left.push({startLine:n.left,endLine:n.left+l}),n.left+=s;break;case 1:"\n"===a&&(n.right++,s--),0===(l=s)&&t.left.push({startLine:n.left,endLine:n.left}),"\n"===r&&(l-=1),t.right.push({startLine:n.right,endLine:n.right+l}),n.right+=s;break;default:throw new Error("Diff type was not defined.")}}})),t},t.prototype.setCodeMarkers=function(e){void 0===e&&(e={left:[],right:[]});for(var t=[],n={left:[],right:[]},o=0;o<e.left.length;o++){var i={startRow:e.left[o].startLine-1,endRow:e.left[o].endLine,type:"text",className:"codeMarker"};n.left.push(i)}for(o=0;o<e.right.length;o++)i={startRow:e.right[o].startLine-1,endRow:e.right[o].endLine,type:"text",className:"codeMarker"},n.right.push(i);return t[0]=n.left,t[1]=n.right,t},t.prototype.render=function(){var e=this.diff();return a.createElement(r.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:e})},t.propTypes={cursorStart:s.number,editorProps:s.object,enableBasicAutocompletion:s.bool,enableLiveAutocompletion:s.bool,focus:s.bool,fontSize:s.number,height:s.string,highlightActiveLine:s.bool,maxLines:s.number,minLines:s.number,mode:s.string,name:s.string,className:s.string,onLoad:s.func,onPaste:s.func,onScroll:s.func,onChange:s.func,orientation:s.string,readOnly:s.bool,scrollMargin:s.array,setOptions:s.object,showGutter:s.bool,showPrintMargin:s.bool,splits:s.number,style:s.object,tabSize:s.number,theme:s.string,value:s.array,width:s.string,wrapEnabled:s.bool},t.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},t}(a.Component);t.default=c},9378(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAceInstance=t.debounce=t.editorEvents=t.editorOptions=void 0,t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"],t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"],t.getAceInstance=function(){var e;return"undefined"==typeof window?(globalThis.window={},e=n(1973),delete globalThis.window):window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=n(1973),e},t.debounce=function(e,t){var n=null;return function(){var o=this,i=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(o,i)}),t)}}},8579(e,t,n){"use strict";var o=n(3468);n(7212).default,n(7911).default,t.Ay=o.default},7911(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(9378),r=(0,a.getAceInstance)(),l=n(1973),c=n(5336),d=n(135),u=n(1609),p=n(1097),h=n(9529),g=function(e){function t(t){ |
| 120 |
var n=e.call(this,t)||this;return a.editorEvents.forEach((function(e){n[e]=n[e].bind(n)})),n.debounce=a.debounce,n}return i(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,o=t.onBeforeLoad,i=t.mode,s=t.focus,l=t.theme,d=t.fontSize,u=t.value,p=t.defaultValue,g=t.cursorStart,m=t.showGutter,b=t.wrapEnabled,f=t.showPrintMargin,x=t.scrollMargin,y=void 0===x?[0,0,0,0]:x,v=t.keyboardHandler,k=t.onLoad,w=t.commands,_=t.annotations,C=t.markers,j=t.splits;this.editor=r.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme("ace/theme/".concat(l)),o&&o(r);var $=Object.keys(this.props.editorProps),S=new c.Split(this.editor.container,"ace/theme/".concat(l),j);this.editor.env.split=S,this.splitEditor=S.getEditor(0),this.split=S,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var T=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),S.forEach((function(t,n){for(var o=0;o<$.length;o++)t[$[o]]=e.props.editorProps[$[o]];var s=h(p,n),c=h(u,n,"");t.session.setUndoManager(new r.UndoManager),t.setTheme("ace/theme/".concat(l)),t.renderer.setScrollMargin(y[0],y[1],y[2],y[3]),t.getSession().setMode("ace/mode/".concat(i)),t.setFontSize(d),t.renderer.setShowGutter(m),t.getSession().setUseWrapMode(b),t.setShowPrintMargin(f),t.on("focus",e.onFocus),t.on("blur",e.onBlur),t.on("input",e.onInput),t.on("copy",e.onCopy),t.on("paste",e.onPaste),t.on("change",e.onChange),t.getSession().selection.on("changeSelection",e.onSelectionChange),t.getSession().selection.on("changeCursor",e.onCursorChange),t.session.on("changeScrollTop",e.onScroll),t.setValue(void 0===s?c:s,g);var x=h(_,n,[]),k=h(C,n,[]);for(t.getSession().setAnnotations(x),k&&k.length>0&&e.handleMarkers(k,t),o=0;o<a.editorOptions.length;o++){var j=a.editorOptions[o];T.hasOwnProperty(j)?t.setOption(j,e.props[j]):e.props[j]&&console.warn("ReaceAce: editor option ".concat(j," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}e.handleOptions(e.props,t),Array.isArray(w)&&w.forEach((function(e){"string"==typeof e.exec?t.commands.bindKey(e.bindKey,e.exec):t.commands.addCommand(e)})),v&&t.setKeyboardHandler("ace/keyboard/"+v)})),n&&(this.refEditor.className+=" "+n),s&&this.splitEditor.focus();var M=this.editor.env.split;M.setOrientation("below"===this.props.orientation?M.BELOW:M.BESIDE),M.resize(!0),k&&k(M)},t.prototype.componentDidUpdate=function(e){var t=this,n=e,o=this.props,i=this.editor.env.split;if(o.splits!==n.splits&&i.setSplits(o.splits),o.orientation!==n.orientation&&i.setOrientation("below"===o.orientation?i.BELOW:i.BESIDE),i.forEach((function(e,i){o.mode!==n.mode&&e.getSession().setMode("ace/mode/"+o.mode),o.keyboardHandler!==n.keyboardHandler&&(o.keyboardHandler?e.setKeyboardHandler("ace/keyboard/"+o.keyboardHandler):e.setKeyboardHandler(null)),o.fontSize!==n.fontSize&&e.setFontSize(o.fontSize),o.wrapEnabled!==n.wrapEnabled&&e.getSession().setUseWrapMode(o.wrapEnabled),o.showPrintMargin!==n.showPrintMargin&&e.setShowPrintMargin(o.showPrintMargin),o.showGutter!==n.showGutter&&e.renderer.setShowGutter(o.showGutter);for(var s=0;s<a.editorOptions.length;s++){var r=a.editorOptions[s];o[r]!==n[r]&&e.setOption(r,o[r])}p(o.setOptions,n.setOptions)||t.handleOptions(o,e);var l=h(o.value,i,"");if(e.getValue()!==l){t.silent=!0;var c=e.session.selection.toJSON();e.setValue(l,o.cursorStart),e.session.selection.fromJSON(c),t.silent=!1}var d=h(o.annotations,i,[]),u=h(n.annotations,i,[]);p(d,u)||e.getSession().setAnnotations(d);var g=h(o.markers,i,[]),m=h(n.markers,i,[]);!p(g,m)&&Array.isArray(g)&&t.handleMarkers(g,e)})),o.className!==n.className){var s=this.refEditor.className.trim().split(" ");n.className.trim().split(" ").forEach((function(e){var t=s.indexOf(e);s.splice(t,1)})),this.refEditor.className=" "+o.className+" "+s.join(" ")}o.theme!==n.theme&&i.setTheme("ace/theme/"+o.theme),o.focus&&!n.focus&&this.splitEditor.focus(),o.height===this.props.height&&o.width===this.props.width||this.editor.resize()},t.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getValue())})),this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getSelection())})),this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getSelection())})),this.props.onCursorChange(t,e)}},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e)},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e)},t.prototype.onCopy=function(e){this.props.onCopy&&this.props.onCopy(e)},t.prototype.onPaste=function(e){this.props.onPaste&&this.props.onPaste(e)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e,t){for(var n=Object.keys(e.setOptions),o=0;o<n.length;o++)t.setOption(n[o],e.setOptions[n[o]])},t.prototype.handleMarkers=function(e,t){var n=t.getSession().getMarkers(!0);for(var o in n)n.hasOwnProperty(o)&&t.getSession().removeMarker(n[o].id);for(var o in n=t.getSession().getMarkers(!1))n.hasOwnProperty(o)&&t.getSession().removeMarker(n[o].id);e.forEach((function(e){var n=e.startRow,o=e.startCol,i=e.endRow,s=e.endCol,a=e.className,r=e.type,c=e.inFront,d=void 0!==c&&c,u=new l.Range(n,o,i,s);t.getSession().addMarker(u,a,r,d)}))},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,o=e.height,i=e.style,a=s({width:n,height:o},i);return u.createElement("div",{ref:this.updateRef,id:t,style:a})},t.propTypes={className:d.string,debounceChangePeriod:d.number,defaultValue:d.arrayOf(d.string),focus:d.bool,fontSize:d.oneOfType([d.number,d.string]),height:d.string,mode:d.string,name:d.string,onBlur:d.func,onChange:d.func,onCopy:d.func,onFocus:d.func,onInput:d.func,onLoad:d.func,onPaste:d.func,onScroll:d.func,orientation:d.string,showGutter:d.bool,splits:d.number,theme:d.string,value:d.arrayOf(d.string),width:d.string,onSelectionChange:d.func,onCursorChange:d.func,onBeforeLoad:d.func,minLines:d.number,maxLines:d.number,readOnly:d.bool,highlightActiveLine:d.bool,tabSize:d.number,showPrintMargin:d.bool,cursorStart:d.number,editorProps:d.object,setOptions:d.object,style:d.object,scrollMargin:d.array,annotations:d.array,markers:d.array,keyboardHandler:d.string,wrapEnabled:d.bool,enableBasicAutocompletion:d.oneOfType([d.bool,d.array]),enableLiveAutocompletion:d.oneOfType([d.bool,d.array]),commands:d.array},t.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},t}(u.Component);t.default=g},6364(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}Object.defineProperty(t,"__esModule",{value:!0});var o={value:"data-value",disabled:"data-disabled",class:"class",type:"type"},i=function(){function e(t){ |
| 121 |
var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._node=t instanceof HTMLElement?t:document.createElement(t),this._config={i18n:o},this._setAttributes(n),n.textContent&&this._setTextContent(n.textContent),this}var t,i;return t=e,(i=[{key:"get",value:function(){return this._node}},{key:"append",value:function(e){return this._node.appendChild(e),this}},{key:"addClass",value:function(e){return this._node.classList.add(e),this}},{key:"removeClass",value:function(e){return this._node.classList.remove(e),this}},{key:"toggleClass",value:function(e){return this._node.classList.toggle(e),this}},{key:"addEventListener",value:function(e,t){return this._node.addEventListener(e,t),this}},{key:"removeEventListener",value:function(e,t){return this._node.removeEventListener(e,t),this}},{key:"setText",value:function(e){return this._setTextContent(e),this}},{key:"getHeight",value:function(){return window.getComputedStyle(this._node).height}},{key:"setTop",value:function(e){return this._node.style.top="".concat(e,"px"),this}},{key:"focus",value:function(){return this._node.focus(),this}},{key:"_setTextContent",value:function(e){this._node.textContent=e}},{key:"_setAttributes",value:function(e){for(var t in e)o[t]&&e[t]&&this._setAttribute(o[t],e[t])}},{key:"_setAttribute",value:function(e,t){this._node.setAttribute(e,t)}}])&&n(t.prototype,i),e}();t.default=i},6708(e,t,n){"use strict";var o,i=(o=n(6364))&&o.__esModule?o:{default:o};function s(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var u={select:"select-pure__select",dropdownShown:"select-pure__select--opened",multiselect:"select-pure__select--multiple",label:"select-pure__label",placeholder:"select-pure__placeholder",dropdown:"select-pure__options",option:"select-pure__option",optionDisabled:"select-pure__option--disabled",autocompleteInput:"select-pure__autocomplete",selectedLabel:"select-pure__selected-label",selectedOption:"select-pure__option--selected",placeholderHidden:"select-pure__placeholder--hidden",optionHidden:"select-pure__option--hidden"},p=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=l(l({},n),{},{classNames:l(l({},u),n.classNames),disabledOptions:[]}),this._state={opened:!1},this._icons=[],this._boundHandleClick=this._handleClick.bind(this),this._boundUnselectOption=this._unselectOption.bind(this),this._boundSortOptions=this._sortOptions.bind(this),this._body=new i.default(document.body),this._create(t),this._config.value&&this._setValue()}var t,n;return t=e,(n=[{key:"value",value:function(){return this._config.value}},{key:"reset",value:function(){this._config.value=this._config.multiple?[]:null,this._setValue()}},{key:"_create",value:function(e){var t="string"==typeof e?document.querySelector(e):e;this._parent=new i.default(t),this._select=new i.default("div",{class:this._config.classNames.select}),this._label=new i.default("span",{class:this._config.classNames.label}),this._optionsWrapper=new i.default("div",{class:this._config.classNames.dropdown}),this._config.multiple&&this._select.addClass(this._config.classNames.multiselect),this._options=this._generateOptions(),this._select.addEventListener("click",this._boundHandleClick),this._select.append(this._label.get()),this._select.append(this._optionsWrapper.get()),this._parent.append(this._select.get()),this._placeholder=new i.default("span",{class:this._config.classNames.placeholder,textContent:this._config.placeholder}),this._select.append(this._placeholder.get())}},{key:"_generateOptions",value:function(){var e=this;return this._config.autocomplete&&(this._autocomplete=new i.default("input",{class:this._config.classNames.autocompleteInput,type:"text"}),this._autocomplete.addEventListener("input",this._boundSortOptions),this._optionsWrapper.append(this._autocomplete.get())),this._config.options.map((function(t){var n=new i.default("div",{class:"".concat(e._config.classNames.option).concat(t.disabled?" "+e._config.classNames.optionDisabled:""),value:t.value,textContent:t.label,disabled:t.disabled});return t.disabled&&e._config.disabledOptions.push(String(t.value)),e._optionsWrapper.append(n.get()),n}))}},{key:"_handleClick",value:function(e){if(e.stopPropagation(),e.target.className!==this._config.classNames.autocompleteInput){if(this._state.opened){var t=this._options.find((function(t){return t.get()===e.target}));return t&&this._setValue(t.get().getAttribute("data-value"),!0),this._select.removeClass(this._config.classNames.dropdownShown),this._body.removeEventListener("click",this._boundHandleClick),this._select.addEventListener("click",this._boundHandleClick),void(this._state.opened=!1)}e.target.className!==this._config.icon&&(this._select.addClass(this._config.classNames.dropdownShown),this._body.addEventListener("click",this._boundHandleClick),this._select.removeEventListener("click",this._boundHandleClick),this._state.opened=!0,this._autocomplete&&this._autocomplete.focus())}}},{key:"_setValue",value:function(e,t,n){var o=this;if(!(this._config.disabledOptions.indexOf(e)>-1)){if(e&&!n&&(this._config.value=this._config.multiple?[].concat(s(this._config.value||[]),[e]):e),e&&n&&(this._config.value=e),this._options.forEach((function(e){e.removeClass(o._config.classNames.selectedOption)})),this._placeholder.removeClass(this._config.classNames.placeholderHidden),this._config.multiple){var i=this._config.value.map((function(e){var t=o._config.options.find((function(t){return t.value===e}));return o._options.find((function(e){return e.get().getAttribute("data-value")===t.value.toString()})).addClass(o._config.classNames.selectedOption),t}));return i.length&&this._placeholder.addClass(this._config.classNames.placeholderHidden),void this._selectOptions(i,t)}var a=this._config.value?this._config.options.find((function(e){return e.value.toString()===o._config.value})):this._config.options[0],r=this._options.find((function(e){return e.get().getAttribute("data-value")===a.value.toString()}));this._config.value?(r.addClass(this._config.classNames.selectedOption),this._placeholder.addClass(this._config.classNames.placeholderHidden),this._selectOption(a,t)):this._label.setText("")}}},{key:"_selectOption",value:function(e,t){this._selectedOption=e, |
| 122 |
this._label.setText(e.label),this._config.onChange&&t&&this._config.onChange(e.value)}},{key:"_selectOptions",value:function(e,t){var n=this;this._label.setText(""),this._icons=e.map((function(e){var t=new i.default("span",{class:n._config.classNames.selectedLabel,textContent:e.label}),o=new i.default(n._config.inlineIcon?n._config.inlineIcon.cloneNode(!0):"i",{class:n._config.icon,value:e.value});return o.addEventListener("click",n._boundUnselectOption),t.append(o.get()),n._label.append(t.get()),o.get()})),t&&this._optionsWrapper.setTop(Number(this._select.getHeight().split("px")[0])+5),this._config.onChange&&t&&this._config.onChange(this._config.value)}},{key:"_unselectOption",value:function(e){var t=s(this._config.value),n=t.indexOf(e.target.getAttribute("data-value"));-1!==n&&t.splice(n,1),this._setValue(t,!0,!0)}},{key:"_sortOptions",value:function(e){var t=this;this._options.forEach((function(n){n.get().textContent.toLowerCase().startsWith(e.target.value.toLowerCase())?n.removeClass(t._config.classNames.optionHidden):n.addClass(t._config.classNames.optionHidden)}))}}])&&d(t.prototype,n),e}();t.A=p},952(e,t,n){e=n.nmd(e),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,o){"string"==typeof e?(2==arguments.length&&(o=n),t.modules[e]||(t.payloads[e]=o,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n,o,i=function(e,t,n){if("string"==typeof t){var o=r(e,t);if(null!=o)return n&&n(),o}else if("[object Array]"===Object.prototype.toString.call(t)){for(var i=[],a=0,l=t.length;a<l;++a){var c=r(e,t[a]);if(null==c&&s.original)return;i.push(c)}return n&&n.apply(null,i)||!0}},s=function(e,t){var n=i("",e,t);return null==n&&s.original?s.original.apply(this,arguments):n},a=function(e,t){if(-1!==t.indexOf("!")){var n=t.split("!");return a(e,n[0])+"!"+a(e,n[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&o!=t;){var o=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},r=function(e,n){n=a(e,n);var o=t.modules[n];if(!o){if("function"==typeof(o=t.payloads[n])){var s={},r={id:n,uri:"",exports:s,packaged:!0};s=o((function(e,t){return i(n,e,t)}),s,r)||r.exports,t.modules[n]=s,delete t.payloads[n]}o=t.modules[n]=s||o}return o};o=e,(n="ace")&&(e[n]||(e[n]={}),o=e[n]),o.define&&o.define.packaged||(t.original=o.define,o.define=t,o.define.packaged=!0),o.require&&o.require.packaged||(s.original=o.require,o.require=s,o.require.packaged=!0)}(),ace.define("ace/lib/es6-shim",["require","exports","module"],(function(e,t,n){function o(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||o(String.prototype,"startsWith",(function(e,t){return t=t||0,this.lastIndexOf(e,t)===t})),String.prototype.endsWith||o(String.prototype,"endsWith",(function(e,t){var n=this;(void 0===t||t>n.length)&&(t=n.length),t-=e.length;var o=n.indexOf(e,t);return-1!==o&&o===t})),String.prototype.repeat||o(String.prototype,"repeat",(function(e){for(var t="",n=this;e>0;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t})),String.prototype.includes||o(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var o=arguments[n];null!=o&&Object.keys(o).forEach((function(e){t[e]=o[e]}))}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map((function(t){return e[t]}))}),Array.prototype.find||o(Array.prototype,"find",(function(e){for(var t=this.length,n=arguments[1],o=0;o<t;o++){var i=this[o];if(e.call(n,i,o,this))return i}})),Array.prototype.findIndex||o(Array.prototype,"findIndex",(function(e){for(var t=this.length,n=arguments[1],o=0;o<t;o++){var i=this[o];if(e.call(n,i,o,this))return o}})),Array.prototype.includes||o(Array.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Array.prototype.fill||o(Array.prototype,"fill",(function(e){for(var t=this,n=t.length>>>0,o=0|arguments[1],i=o<0?Math.max(n+o,0):Math.min(o,n),s=arguments[2],a=void 0===s?n:0|s,r=a<0?Math.max(n+a,0):Math.min(a,n);i<r;)t[i]=e,i++;return t})),Array.of||o(Array,"of",(function(){return Array.prototype.slice.call(arguments)}))})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],(function(e,t,n){"use strict";e("./es6-shim")})),ace.define("ace/lib/deep_copy",["require","exports","module"],(function(e,t,n){t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var o=0;o<t.length;o++)n[o]=e(t[o]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var o in n={},t)n[o]=e(t[o]);return n}})),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],(function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var o=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(o,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,o=e.length;n<o;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,(function(e){n.push({offset:arguments[arguments.length-2],length:e.length})})),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},o=function(e){return o.cancel(),t=setTimeout(n,e||0),o};return o.schedule=o,o.call=function(){return this.cancel(),e(),o},o.cancel=function(){return clearTimeout(t),t=null,o},o.isPending=function(){return t},o},t.delayedCall=function(e,t){var n=null,o=function(){n=null,e()},i=function(e){null==n&&(n=setTimeout(o,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(o,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.sleep=function(e){return new Promise((function(t){setTimeout(t,e)}))},t.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(e){return!1}return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var o="object"==typeof navigator?navigator:{},i=(/mac|win|linux/i.exec(o.platform)||["other"])[0].toLowerCase(),s=o.userAgent||"",a=o.appName||"";t.isWin="win"==i,t.isMac="mac"==i,t.isLinux="linux"==i,t.isIE="Microsoft Internet Explorer"==a||a.indexOf("MSAppHost")>=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=s.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,t.isSafari=parseFloat(s.split(" Safari/")[1])&&!t.isChrome||void 0, |
| 123 |
t.isEdge=parseFloat(s.split(" Edge/")[1])||void 0,t.isAIR=s.indexOf("AdobeAIR")>=0,t.isAndroid=s.indexOf("Android")>=0,t.isChromeOS=s.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var o,i=e("./useragent");t.buildDom=function e(t,n,o){if("string"==typeof t&&t){var i=document.createTextNode(t);return n&&n.appendChild(i),i}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var s=[],a=0;a<t.length;a++){var r=e(t[a],n,o);r&&s.push(r)}return s}var l=document.createElement(t[0]),c=t[1],d=1;for(c&&"object"==typeof c&&!Array.isArray(c)&&(d=2),a=d;a<t.length;a++)e(t[a],l,o);return 2==d&&Object.keys(c).forEach((function(e){var t=c[e];"class"===e?l.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?l[e]=t:"ref"===e?o&&(o[t]=l):"style"===e?"string"==typeof t&&(l.style.cssText=t):null!=t&&l.setAttribute(e,t)})),n&&n.appendChild(l),l},t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var o=n.indexOf(t);if(-1==o)break;n.splice(o,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),o=!0;;){var i=n.indexOf(t);if(-1==i)break;o=!1,n.splice(i,1)}return o&&n.push(t),e.className=n.join(" "),o},t.setCssClass=function(e,n,o){o?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,o=0;if(n=(t=t||document).querySelectorAll("style"))for(;o<n.length;)if(n[o++].id===e)return!0},t.removeElementById=function(e,t){(t=t||document).getElementById(e)&&t.getElementById(e).remove()};var s=[];function a(){var e=s;s=null,e&&e.forEach((function(e){r(e[0],e[1])}))}function r(e,n,i){if("undefined"!=typeof document){if(s)if(i)a();else if(!1===i)return s.push([e,n]);if(!o){var r=i;i&&i.getRootNode&&(r=i.getRootNode())&&r!=i||(r=document);var l=r.ownerDocument||r;if(n&&t.hasCssString(n,r))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var c=t.createElement("style");c.appendChild(l.createTextNode(e)),n&&(c.id=n),r==l&&(r=t.getDocumentHead(l)),r.insertBefore(c,r.firstChild)}}}if(t.useStrictCSP=function(e){o=e,0==e?a():s||(s=[])},t.importCssString=r,t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.$fixPositionBug=function(e){var t=e.getBoundingClientRect();if(e.style.left){var n=parseFloat(e.style.left),o=+t.left;Math.abs(n-o)>1&&(e.style.left=2*n-o+"px")}e.style.right&&(n=parseFloat(e.style.right),o=window.innerWidth-t.right,Math.abs(n-o)>1&&(e.style.right=2*n-o+"px")),e.style.top&&(n=parseFloat(e.style.top),o=+t.top,Math.abs(n-o)>1&&(e.style.top=2*n-o+"px")),e.style.bottom&&(n=parseFloat(e.style.bottom),o=window.innerHeight-t.bottom,Math.abs(n-o)>1&&(e.style.bottom=2*n-o+"px"))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var o=t.createElement("ace_outer"),i=o.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",o.appendChild(n);var s=e&&e.documentElement||document&&document.documentElement;if(!s)return 0;s.appendChild(o);var a=n.offsetWidth;i.overflow="scroll";var r=n.offsetWidth;return a===r&&(r=o.clientWidth),s.removeChild(o),a-r},t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!i.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,i.isChromeOS&&(t.HI_DPI=!1),"undefined"!=typeof document){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),i.isEdge||void 0===l.style.animationName||(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var o=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=o.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){!n&&i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(i=i.onload=i.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){"use strict";var o={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};o._emit=o._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],o=this._defaultHandlers[e];if(n.length||o){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var a=0;a<n.length&&(n[a](t,this),!t.propagationStopped);a++);return o&&!t.defaultPrevented?o(t,this):void 0}},o._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var o=0;o<n.length;o++)n[o](t,this)}},o.once=function(e,t){var n=this;if(this.on(e,(function o(){n.off(e,o),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},o.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var o=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(o);var s=i.indexOf(t);-1!=s&&i.splice(s,1)}n[e]=t},o.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var o=n._disabled_[e];if(n[e]==t)o&&this.setDefaultHandler(e,o.pop());else if(o){var i=o.indexOf(t);-1!=i&&o.splice(i,1)}}},o.on=o.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[e];return o||(o=this._eventRegistry[e]=[]),-1==o.indexOf(t)&&o[n?"unshift":"push"](t),t},o.off=o.removeListener=o.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var o=n.indexOf(t);-1!==o&&n.splice(o,1)}},o.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=o})),ace.define("ace/lib/report_error",["require","exports","module"],(function(e,t,n){t.reportError=function(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout((function(){throw n}))}})), |
| 124 |
ace.define("ace/lib/default_english_messages",["require","exports","module"],(function(e,t,n){t.defaultEnglishMessages={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"}})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],(function(e,t,n){var o,i,s=e("./oop"),a=e("./event_emitter").EventEmitter,r=e("./report_error").reportError,l=e("./default_english_messages").defaultEnglishMessages,c={setOptions:function(e){Object.keys(e).forEach((function(t){this.setOption(t,e[t])}),this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var n=this.$options;e=Object.keys(n).filter((function(e){return!n[e].hidden}))}return e.forEach((function(e){t[e]=this.getOption(e)}),this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return d('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:d('misspelled option "'+e+'"')}};function d(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}var u=function(){function e(){this.$defaultOptions={},o=l,i="dollarSigns"}return e.prototype.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach((function(t){var o=n[t];"string"==typeof o&&(o={forwardTo:o}),o.name||(o.name=t),e.$options[o.name]=o,"initialValue"in o&&(e["$"+o.name]=o.initialValue)})),s.implement(e,c),this},e.prototype.resetOptions=function(e){Object.keys(e.$options).forEach((function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)}))},e.prototype.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var o=this.$defaultOptions[e]||(this.$defaultOptions[e]={});o[t]&&(o.forwardTo?this.setDefaultValue(o.forwardTo,t,n):o[t].value=n)},e.prototype.setDefaultValues=function(e,t){Object.keys(t).forEach((function(n){this.setDefaultValue(e,n,t[n])}),this)},e.prototype.setMessages=function(e,t){o=e,t&&t.placeholders&&(i=t.placeholders)},e.prototype.nls=function(e,t,n){o[e]||(d("No message found for the key '"+e+"' in messages with id "+o.$id+", trying to find a translation for the default string '"+t+"'."),o[t]||d("No message found for the default string '"+t+"' in the provided messages. Falling back to the default English message."));var s=o[e]||o[t]||t;return n&&("dollarSigns"===i&&(s=s.replace(/\$(\$|[\d]+)/g,(function(e,t){return"$"==t?"$":n[t]}))),"curlyBrackets"===i&&(s=s.replace(/\{([^\}]+)\}/g,(function(e,t){return n[t]})))),s},e}();u.prototype.warn=d,u.prototype.reportError=r,s.implement(u.prototype,a),t.AppConfig=u})),ace.define("ace/theme/textmate-css",["require","exports","module"],(function(e,t,n){ |
| 125 |
n.exports='.ace-tm .ace_gutter {\n background: #f0f0f0;\n color: #333;\n}\n\n.ace-tm .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-tm {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-tm .ace_cursor {\n color: black;\n}\n \n.ace-tm .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'})),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("./textmate-css"),t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],(function(e,t,n){var o=e("./lib/lang"),i=e("./lib/net"),s=e("./lib/dom"),a=e("./lib/app_config").AppConfig;n.exports=t=new a;var r,l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};t.get=function(e){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return l[e]},t.set=function(e,t){if(l.hasOwnProperty(e))l[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e);"useStrictCSP"==e&&s.useStrictCSP(t)},t.all=function(){return o.copyObject(l)},t.$modes={},t.moduleUrl=function(e,t){if(l.$moduleUrls[e])return l.$moduleUrls[e];var n=e.split("/"),o="snippets"==(t=t||n[n.length-2]||"")?"/":"-",i=n[n.length-1];if("worker"==t&&"-"==o){var s=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");i=i.replace(s,"")}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var a=l[t+"Path"];return null==a?a=l.basePath:"/"==o&&(t=o=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+o+i+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.setLoader=function(e){r=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(n,o){var s;if(Array.isArray(n))var a=n[0],l=n[1];else"string"==typeof n&&(l=n);var d=function(n){if(n&&!t.$loading[l])return o&&o(n);if(t.$loading[l]||(t.$loading[l]=[]),t.$loading[l].push(o),!(t.$loading[l].length>1)){var s=function(){!function(t,n){"ace/theme/textmate"===t||"./theme/textmate"===t?n(0,e("./theme/textmate")):r?r(t,n):console.error("loader is not configured")}(l,(function(e,n){n&&(t.$loaded[l]=n),t._emit("load.module",{name:l,module:n});var o=t.$loading[l];t.$loading[l]=null,o.forEach((function(e){e&&e(n)}))}))};if(!t.get("packaged"))return s();i.loadScript(t.moduleUrl(l,a),s),c()}};if(t.dynamicModules[l])t.dynamicModules[l]().then((function(e){e.default?d(e.default):d(e)}));else{try{s=this.$require(l)}catch(e){}d(s||t.$loaded[l])}},t.$require=function(e){if("function"==typeof n.require)return n.require(e)},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n};var c=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};t.version="1.44.0"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,o){"use strict";e("./lib/fixoldbrowsers");var i=e("./config");i.setLoader((function(t,n){e([t],(function(e){n(null,e)}))}));var s=function(){return this||"undefined"!=typeof window&&window}();function a(t){if(s&&s.document){i.set("packaged",t||e.packaged||o.packaged||s.define&&n.amdD.packaged);var a={},r="",l=document.currentScript||document._currentScript,c=l&&l.ownerDocument||document;l&&l.src&&(r=l.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var d,u=c.getElementsByTagName("script"),p=0;p<u.length;p++){var h=u[p],g=h.src||h.getAttribute("src");if(g){for(var m=h.attributes,b=0,f=m.length;b<f;b++){var x=m[b];0===x.name.indexOf("data-ace-")&&(a[(d=x.name.replace(/^data-ace-/,""),d.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=x.value)}var y=g.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);y&&(r=y[1])}}for(var v in r&&(a.base=a.base||r,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base,a)void 0!==a[v]&&i.set(v,a[v])}}o.exports=function(t){i.init=a,i.$require=e,t.require=e,t.define=n.amdD},a(!0)})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var o=function(){function e(e,t,n,o){this.start={row:e,column:t},this.end={row:n,column:o}}return e.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},e.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,n=e.end,o=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(o.row,o.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(o.row,o.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)}, |
| 126 |
e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var o={row:n+1,column:0};else this.end.row<t&&(o={row:t,column:0});if(this.start.row>n)var i={row:n+1,column:0};else this.start.row<t&&(i={row:t,column:0});return e.fromPoints(i||this.start,o||this.end)},e.prototype.extend=function(t,n){var o=this.compare(t,n);if(0==o)return this;if(-1==o)var i={row:t,column:n};else var s={row:t,column:n};return e.fromPoints(i||this.start,s||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return 0==this.end.column?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),o=t.documentToScreenPosition(this.end);return new e(n.row,n.column,o.row,o.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();o.fromPoints=function(e,t){return new o(e.row,e.column,t.row,t.column)},o.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=o})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";for(var o=e("./oop"),i={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},s={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},a=0;a<10;a++)s["Digit"+a]=48+a,s["Numpad"+a]=96+a,i.PRINTABLE_KEYS[48+a]=""+a,i.FUNCTION_KEYS[96+a]="Numpad"+a;for(a=65;a<91;a++){var r=String.fromCharCode(a+32);s["Key"+r.toUpperCase()]=a,i.PRINTABLE_KEYS[a]=r}for(a=1;a<13;a++)s["F"+a]=111+a,i.FUNCTION_KEYS[111+a]="F"+a;var l={Shift:16,Control:17,Alt:18,Meta:224};for(var c in l)s[c]=s[c+"Left"]=s[c+"Right"]=l[c];for(var d in t.$codeToKeyCode=s,i.PRINTABLE_KEYS[173]="-",i.FUNCTION_KEYS){var u=i.FUNCTION_KEYS[d].toLowerCase();i[u]=parseInt(d,10)}for(var d in i.PRINTABLE_KEYS)u=i.PRINTABLE_KEYS[d].toLowerCase(),i[u]=parseInt(d,10);o.mixin(i,i.MODIFIER_KEYS),o.mixin(i,i.PRINTABLE_KEYS),o.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)i.KEY_MODS[t]=e.filter((function(e){return t&i.KEY_MODS[e]})).join("-")+"-"}(),i.KEY_MODS[0]="",i.KEY_MODS[-1]="input-",o.mixin(t,i),t.default=t,t.keyCodeToString=function(e){var t=i[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var o,i=e("./keys"),s=e("./useragent"),a=null,r=0;function l(){return null==o&&function(){o=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){return o={passive:!1},!0}})}catch(e){}}(),o}function c(e,t,n){this.elem=e,this.type=t,this.callback=n}c.prototype.destroy=function(){u(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var d=t.addListener=function(e,t,n,o){e.addEventListener(t,n,l()),o&&o.$toDestroy.push(new c(e,t,n))},u=t.removeListener=function(e,t,n){e.removeEventListener(t,n,l())};function p(e){return(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}function h(){a=Object.create(null)}if(t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||s.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var o=e&&e.ownerDocument||document;function i(e){t&&t(e),n&&n(e),u(o,"mousemove",t),u(o,"mouseup",i),u(o,"dragstart",i)}return d(o,"mousemove",t),d(o,"mouseup",i),d(o,"dragstart",i),i},t.addMouseWheelListener=function(e,t,n){d(e,"wheel",(function(e){var n=e.deltaX||0,o=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.15*n,e.wheelY=.15*o;break;case e.DOM_DELTA_LINE:e.wheelX=15*n,e.wheelY=15*o;break;case e.DOM_DELTA_PAGE:e.wheelX=150*n,e.wheelY=150*o}t(e)}),n)},t.addMultiMouseDownListener=function(e,n,o,i,a){var r,l,c,u=0,p={2:"dblclick",3:"tripleclick",4:"quadclick"};function h(e){if(0!==t.getButton(e)?u=0:e.detail>1?++u>4&&(u=1):u=1,s.isIE){var a=Math.abs(e.clientX-r)>5||Math.abs(e.clientY-l)>5;c&&!a||(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[u-1]||600),1==u&&(r=e.clientX,l=e.clientY)}if(e._clicks=u,o[i]("mousedown",e),u>4)u=0;else if(u>1)return o[i](p[u],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){d(e,"mousedown",h,a)}))},t.getModifierString=function(e){return i.KEY_MODS[p(e)]},t.addCommandKeyListener=function(e,n,o){var l=null;d(e,"keydown",(function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=function(e,t,n){var o=p(t);if(!n&&t.code&&(n=i.$codeToKeyCode[t.code]||n),!s.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(o|=8),a.altGr){if(!(3&~o))return;a.altGr=0}if(18===n||17===n){var l=t.location;17===n&&1===l?1==a[n]&&(r=t.timeStamp):18===n&&3===o&&2===l&&t.timeStamp-r<50&&(a.altGr=!0)}}if(n in i.MODIFIER_KEYS&&(n=-1),o||13!==n||3!==t.location||(e(t,o,-n),!t.defaultPrevented)){if(s.isChromeOS&&8&o){if(e(t,o,n),t.defaultPrevented)return;o&=-9}return!!(o||n in i.FUNCTION_KEYS||n in i.PRINTABLE_KEYS)&&e(t,o,n)}}(n,e,e.keyCode);return l=e.defaultPrevented,t}),o),d(e,"keypress",(function(e){ |
| 127 |
l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),l=null)}),o),d(e,"keyup",(function(e){a[e.keyCode]=null}),o),a||(h(),d(window,"focus",h))},"object"==typeof window&&window.postMessage&&!s.isOldIE){var g=1;t.nextTick=function(e,n){n=n||window;var o="zero-timeout-message-"+g++,i=function(s){s.data==o&&(t.stopPropagation(s),u(n,"message",i),e())};d(n,"message",i),n.postMessage(o,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,n){"use strict";var o;n.exports={lineMode:!1,pasteCancelled:function(){return!!(o&&o>Date.now()-50)||(o=!1)},cancel:function(){o=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var o=e("../lib/event"),i=e("../config").nls,s=e("../lib/useragent"),a=e("../lib/dom"),r=e("../lib/lang"),l=e("../clipboard"),c=s.isChrome<18,d=s.isIE,u=s.isChrome>63,p=400,h=e("../lib/keys"),g=h.KEY_MODS,m=s.isIOS,b=m?/\s/:/\n/,f=s.isMobile,x=function(){function e(e,t){var n=this;this.host=t,this.text=a.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",e.insertBefore(this.text,e.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",f||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch(e){}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),o.addListener(this.text,"blur",(function(e){n.ignoreFocusEvents||(t.onBlur(e),n.$isFocused=!1)}),t),o.addListener(this.text,"focus",(function(e){if(!n.ignoreFocusEvents){if(n.$isFocused=!0,s.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),s.isEdge?setTimeout(n.resetSelection.bind(n)):n.resetSelection()}}),t),this.$focusScroll=!1,t.on("beforeEndOperation",(function(){var e=t.curOp,o=e&&e.command&&e.command.name;if("insertstring"!=o){var i=o&&(e.docChanged||e.selectionChanged);n.inComposition&&i&&(n.lastValue=n.text.value="",n.onCompositionEnd()),n.resetSelection()}})),t.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=m?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&t.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,o.addCommandKeyListener(this.text,(function(e,o,i){if(!n.inComposition)return t.onCommandKey(e,o,i)}),t),o.addListener(this.text,"select",this.onSelect.bind(this),t),o.addListener(this.text,"input",this.onInput.bind(this),t),o.addListener(this.text,"cut",this.onCut.bind(this),t),o.addListener(this.text,"copy",this.onCopy.bind(this),t),o.addListener(this.text,"paste",this.onPaste.bind(this),t),"oncut"in this.text&&"oncopy"in this.text&&"onpaste"in this.text||o.addListener(e,"keydown",(function(e){if((!s.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:n.onCopy(e);break;case 86:n.onPaste(e);break;case 88:n.onCut(e)}}),t),this.syncComposition=r.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),o.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),t),o.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),t),o.addListener(this.text,"keyup",this.onKeyup.bind(this),t),o.addListener(this.text,"keydown",this.syncComposition.bind(this),t),o.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),t),this.closeTimeout,o.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),t),o.addListener(this.text,"mousedown",(function(e){e.preventDefault(),n.onContextMenuClose()}),t),o.addListener(t.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),t),o.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),t),m&&this.addIosSelectionHandler(e,t,this.text)}return e.prototype.addIosSelectionHandler=function(e,t,n){var o=this,i=null,s=!1;n.addEventListener("keydown",(function(e){i&&clearTimeout(i),s=!0}),!0),n.addEventListener("keyup",(function(e){i=setTimeout((function(){s=!1}),100)}),!0);var a=function(e){if(document.activeElement===n&&!(s||o.inComposition||t.$mouseHandler.isMousePressed||o.copied)){var i=n.selectionStart,a=n.selectionEnd,r=null,l=0;if(0==i?r=h.up:1==i?r=h.home:a>o.lastSelectionEnd&&"\n"==o.lastValue[a]?r=h.end:i<o.lastSelectionStart&&" "==o.lastValue[i-1]?(r=h.left,l=g.option):i<o.lastSelectionStart||i==o.lastSelectionStart&&o.lastSelectionEnd!=o.lastSelectionStart&&i==a?r=h.left:a>o.lastSelectionEnd&&o.lastValue.slice(0,a).split("\n").length>2?r=h.down:a>o.lastSelectionEnd&&" "==o.lastValue[a-1]?(r=h.right,l=g.option):(a>o.lastSelectionEnd||a==o.lastSelectionEnd&&o.lastSelectionEnd!=o.lastSelectionStart&&i==a)&&(r=h.right),i!==a&&(l|=g.shift),r){if(!t.onCommandKey({},l,r)&&t.commands){r=h.keyCodeToString(r);var c=t.commands.findKeyCommand(l,r);c&&t.execCommand(c)}o.lastSelectionStart=i,o.lastSelectionEnd=a,o.resetSelection("")}}};document.addEventListener("selectionchange",a),t.on("destroy",(function(){document.removeEventListener("selectionchange",a)}))},e.prototype.onContextMenuClose=function(){var e=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout((function(){e.tempStyle&&(e.text.style.cssText=e.tempStyle,e.tempStyle=""),e.host.renderer.$isMousePressed=!1,e.host.renderer.$keepTextAreaAtCursor&&e.host.renderer.$moveTextAreaToCursor()}),0)},e.prototype.$onContextMenu=function(e){this.host.textInput.onContextMenu(e),this.onContextMenuClose()},e.prototype.onKeyup=function(e){27==e.keyCode&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},e.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},e.prototype.onCompositionStart=function(e){if(!this.inComposition&&this.host.onCompositionStart&&!this.host.$readOnly&&(this.inComposition={},!this.commandMode)){e.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var t=this.host.getSelectionRange();t.end.row=t.start.row,t.end.column=t.start.column,this.inComposition.markerRange=t,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},e.prototype.onCompositionUpdate=function(){if(this.inComposition&&this.host.onCompositionUpdate&&!this.host.$readOnly){if(this.commandMode)return this.cancelComposition() |
| 128 |
;if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var e=this.text.value;this.sendText(e),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},e.prototype.onCompositionEnd=function(e){this.host.onCompositionEnd&&!this.host.$readOnly&&(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),e&&this.onInput())},e.prototype.onCut=function(e){this.doCopy(e,!0)},e.prototype.onCopy=function(e){this.doCopy(e,!1)},e.prototype.onPaste=function(e){var t=this.handleClipboardData(e);l.pasteCancelled()||("string"==typeof t?(t&&this.host.onPaste(t,e),s.isIE&&setTimeout(this.resetSelection),o.preventDefault(e)):(this.text.value="",this.pasted=!0))},e.prototype.doCopy=function(e,t){var n=this,i=this.host.getCopyText();if(!i)return o.preventDefault(e);this.handleClipboardData(e,i)?(m&&(this.resetSelection(i),this.copied=i,setTimeout((function(){n.copied=!1}),10)),t?this.host.onCut():this.host.onCopy(),o.preventDefault(e)):(this.copied=!0,this.text.value=i,this.text.select(),setTimeout((function(){n.copied=!1,n.resetSelection(),t?n.host.onCut():n.host.onCopy()})))},e.prototype.handleClipboardData=function(e,t,n){var o=e.clipboardData||window.clipboardData;if(o&&!c){var i=d||n?"Text":"text/plain";try{return t?!1!==o.setData(i,t):o.getData(i)}catch(e){if(!n)return this.handleClipboardData(e,t,!0)}}},e.prototype.onInput=function(e){if(this.inComposition)return this.onCompositionUpdate();if(e&&e.inputType){if("historyUndo"==e.inputType)return this.host.execCommand("undo");if("historyRedo"==e.inputType)return this.host.execCommand("redo")}var t=this.text.value,n=this.sendText(t,!0);(t.length>500||b.test(n)||f&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},e.prototype.sendText=function(e,t){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),e&&this.host.onPaste(e),this.pasted=!1,"";for(var n=this.text.selectionStart,o=this.text.selectionEnd,i=this.lastSelectionStart,a=this.lastValue.length-this.lastSelectionEnd,r=e,l=e.length-n,c=e.length-o,d=0;i>0&&this.lastValue[d]==e[d];)d++,i--;for(r=r.slice(d),d=1;a>0&&this.lastValue.length-d>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-d]==e[e.length-d];)d++,a--;l-=d-1,c-=d-1;var u=r.length-d+1;if(u<0&&(i=-u,u=0),r=r.slice(0,u),!(t||r||l||i||a||c))return"";this.sendingText=!0;var p=!1;return s.isAndroid&&". "==r&&(r=" ",p=!0),r&&!i&&!a&&!l&&!c||this.commandMode?this.host.onTextInput(r):this.host.onTextInput(r,{extendLeft:i,extendRight:a,restoreStart:l,restoreEnd:c}),this.sendingText=!1,this.lastValue=e,this.lastSelectionStart=n,this.lastSelectionEnd=o,this.lastRestoreEnd=c,p?"\n":r},e.prototype.onSelect=function(e){var t,n=this;this.inComposition||(this.copied?this.copied=!1:0===(t=this.text).selectionStart&&t.selectionEnd>=n.lastValue.length&&t.value===n.lastValue&&n.lastValue&&t.selectionEnd!==n.lastSelectionEnd?(this.host.selectAll(),this.resetSelection()):f&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection())},e.prototype.$resetSelectionIOS=function(e){if(this.$isFocused&&(!this.copied||e)&&!this.sendingText){e||(e="");var t="\n ab"+e+"cde fg\n";t!=this.text.value&&(this.text.value=this.lastValue=t);var n=4+(e.length||(this.host.selection.isEmpty()?0:1));4==this.lastSelectionStart&&this.lastSelectionEnd==n||this.text.setSelectionRange(4,n),this.lastSelectionStart=4,this.lastSelectionEnd=n}},e.prototype.$resetSelection=function(){var e=this;if(!this.inComposition&&!this.sendingText&&(this.$isFocused||this.afterContextMenu)){this.inComposition=!0;var t=0,n=0,o="",i=function(t,n){for(var o=n,i=1;i<=t-e.rowStart&&i<2*e.numberOfExtraLines+1;i++)o+=e.host.session.getLine(t-i).length+1;return o};if(this.host.session){var s=this.host.selection,a=s.getRange(),r=s.cursor.row;r===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):r===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(r<this.rowStart-1||r>this.rowEnd+1)&&(this.rowStart=r>this.numberOfExtraLines?r-this.numberOfExtraLines:0,this.rowEnd=r>this.numberOfExtraLines?r+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var l=[],c=this.rowStart;c<=this.rowEnd;c++)l.push(this.host.session.getLine(c));if(o=l.join("\n"),t=i(a.start.row,a.start.column),n=i(a.end.row,a.end.column),a.start.row<this.rowStart){var d=this.host.session.getLine(this.rowStart-1);t=a.start.row<this.rowStart-1?0:t,n+=d.length+1,o=d+"\n"+o}else if(a.end.row>this.rowEnd){var u=this.host.session.getLine(this.rowEnd+1);n=a.end.row>this.rowEnd+1?u.length:a.end.column,n+=o.length+1,o=o+"\n"+u}else f&&r>0&&(o="\n"+o,n+=1,t+=1);o.length>p&&(t<p&&n<p?o=o.slice(0,p):(o="\n",t==n?t=n=0:(t=0,n=1)));var h=o+"\n\n";h!=this.lastValue&&(this.text.value=this.lastValue=h,this.lastSelectionStart=this.lastSelectionEnd=h.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=n||this.lastSelectionStart!=t||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(t,n),this.lastSelectionStart=t,this.lastSelectionEnd=n}catch(e){}this.inComposition=!1}},e.prototype.setHost=function(e){this.host=e},e.prototype.setNumberOfExtraLines=function(e){this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=e<0?0:e},e.prototype.setAriaLabel=function(){var e="";if(this.host.$textInputAriaLabel&&(e+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var t=this.host.session.selection.cursor.row;e+=i("text-input.aria-label","Cursor at row $0",[t+1])}this.text.setAttribute("aria-label",e)},e.prototype.setAriaOptions=function(e){e.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",e.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",e.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),e.role&&this.text.setAttribute("role",e.role),e.setLabel&&(this.text.setAttribute("aria-roledescription",i("text-input.aria-roledescription","editor")),this.setAriaLabel())},e.prototype.focus=function(){var e=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||u||"browser"==this.$focusScroll)return this.text.focus({preventScroll:!0});var t=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var n=0!=this.text.getBoundingClientRect().top}catch(e){return}var o=[];if(n)for(var i=this.text.parentElement;i&&1==i.nodeType;)o.push(i),i.setAttribute("ace_nocontext","true"),i=!i.parentElement&&i.getRootNode?i.getRootNode().host:i.parentElement;this.text.focus({preventScroll:!0}),n&&o.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){e.text.style.position="","0px"==e.text.style.top&&(e.text.style.top=t)}),0)},e.prototype.blur=function(){this.text.blur()},e.prototype.isFocused=function(){return this.$isFocused},e.prototype.setInputHandler=function(e){this.inputHandler=e},e.prototype.getInputHandler=function(){return this.inputHandler},e.prototype.getElement=function(){return this.text},e.prototype.setCommandMode=function(e){this.commandMode=e,this.text.readOnly=!1},e.prototype.setReadOnly=function(e){this.commandMode||(this.text.readOnly=e)},e.prototype.setCopyWithEmptySelection=function(e){},e.prototype.onContextMenu=function(e){this.afterContextMenu=!0,this.resetSelection(), |
| 129 |
this.host._emit("nativecontextmenu",{target:this.host,domEvent:e}),this.moveToMouse(e,!0)},e.prototype.moveToMouse=function(e,t){var n=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(t?"z-index:100000;":"")+(s.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var i=this.host.container.getBoundingClientRect(),r=a.computedStyle(this.host.container),l=i.top+(parseInt(r.borderTopWidth)||0),c=i.left+(parseInt(r.borderLeftWidth)||0),d=i.bottom-l-this.text.clientHeight-2,u=function(e){a.translate(n.text,e.clientX-c-2,Math.min(e.clientY-l-2,d))};u(e),"mousedown"==e.type&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),s.isWin&&o.capture(this.host.container,u,this.onContextMenuClose.bind(this)))},e.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},e}();t.TextInput=x,t.$setUserAgentForTests=function(e,t){f=e,m=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var o=e("../lib/useragent"),i=function(){function e(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}return e.prototype.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var i=this.editor,s=e.getButton();return 0!==s?((i.getSelectionRange().isEmpty()||1==s)&&i.selection.moveToPosition(n),void(2==s&&(i.textInput.onContextMenu(e.domEvent),o.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||i.isFocused()||(i.focus(),!this.$focusTimeout||this.$clickSelection||i.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},e.prototype.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},e.prototype.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(n);if(-1==o)e=this.$clickSelection.end;else if(1==o)e=this.$clickSelection.start;else{var i=s(this.$clickSelection,n,t.session);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,n=this.editor,o=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](o.row,o.column);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(i.start),r=this.$clickSelection.comparePoint(i.end);if(-1==a&&r<=0)t=this.$clickSelection.end,i.end.row==o.row&&i.end.column==o.column||(o=i.start);else if(1==r&&a>=0)t=this.$clickSelection.start,i.start.row==o.row&&i.start.column==o.column||(o=i.end);else if(-1==a&&1==r)o=i.end,t=i.start;else{var l=s(this.$clickSelection,o,n.session);o=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(o),n.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e,t,n,o,i=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,o=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(o-t,2))),s=Date.now();(i>0||s-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,o=n.session.getBracketRange(t);o?(o.isEmpty()&&(o.start.column--,o.end.column++),this.setState("select")):(o=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=o,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var o=n.getSelectionRange();o.isMultiLine()&&o.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(o.start.row),this.$clickSelection.end=n.selection.getLineRange(o.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},e.prototype.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,o=e.domEvent.timeStamp,i=o-n.t,s=i?e.wheelX/i:n.vx,a=i?e.wheelY/i:n.vy;i<550&&(s=(s+n.vx)/2,a=(a+n.vy)/2);var r=Math.abs(s/a),l=!1;return r>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),r<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l?n.allowed=o:o-n.allowed<550&&(Math.abs(s)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=o):n.allowed=0),n.t=o,n.vx=s,n.vy=a,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},e}();function s(e,t,n){if(e.start.row==e.end.row)var o=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)o=2*t.row-e.start.row-e.end.row;else o=3*t.column-2*n.getLine(e.start.row).length;return o<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}i.prototype.selectEnd=i.prototype.selectByLinesEnd,i.prototype.selectAllEnd=i.prototype.selectByLinesEnd,i.prototype.selectByWordsEnd=i.prototype.selectByLinesEnd,t.DefaultHandlers=i})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var o=e("../lib/event"),i=e("../lib/useragent"),s=function(){function e(e,t){this.speed,this.wheelX,this.wheelY,this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return e.prototype.stopPropagation=function(){o.stopPropagation(this.domEvent),this.propagationStopped=!0},e.prototype.preventDefault=function(){o.preventDefault(this.domEvent),this.defaultPrevented=!0},e.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},e.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},e.prototype.getGutterRow=function(){var e=this.getDocumentPosition().row;return this.editor.session.documentToScreenRow(e,0)-this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0)},e.prototype.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},e.prototype.getButton=function(){return o.getButton(this.domEvent)},e.prototype.getShiftKey=function(){return this.domEvent.shiftKey},e.prototype.getAccelKey=function(){return i.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},e}();t.MouseEvent=s})),ace.define("ace/lib/scroll",["require","exports","module"],(function(e,t,n){t.preventParentScroll=function(e){e.stopPropagation() |
| 130 |
;var t=e.currentTarget;t.scrollHeight>t.clientHeight||e.preventDefault()}})),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],(function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=e("./lib/dom"),r=(e("./lib/event"),e("./range").Range),l=e("./lib/scroll").preventParentScroll,c="ace_tooltip",d=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=a.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},e.prototype.setClassName=function(e){a.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.theme&&(this.theme.isDark&&a.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&a.removeCssClass(this.getElement(),this.theme.cssClass)),e.isDark&&a.addCssClass(this.getElement(),"ace_dark"),e.cssClass&&a.addCssClass(this.getElement(),e.cssClass),this.theme={isDark:e.isDark,cssClass:e.cssClass}},e.prototype.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},e.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),u=new(function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);-1!==t&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,n,o;this.popups.sort((function(e,t){return t.priority-e.priority}));var i=[];try{for(var a=s(this.popups),r=a.next();!r.done;r=a.next()){var l=r.value,c=!0;try{for(var d=(n=void 0,s(i)),u=d.next();!u.done;u=d.next()){var p=u.value;if(this.doPopupsOverlap(p,l)){c=!1;break}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}c?i.push(l):l.hide()}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var n=e.getElement().getBoundingClientRect(),o=t.getElement().getBoundingClientRect();return n.left<o.right&&n.right>o.left&&n.top<o.bottom&&n.bottom>o.top},e}());t.popupManager=u,t.Tooltip=d;var p=function(e){function t(t){void 0===t&&(t=document.body);var n=e.call(this,t)||this;n.timeout=void 0,n.lastT=0,n.idleTime=350,n.lastEvent=void 0,n.onMouseOut=n.onMouseOut.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.waitForHover=n.waitForHover.bind(n),n.hide=n.hide.bind(n);var o=n.getElement();return o.style.whiteSpace="pre-wrap",o.style.pointerEvents="auto",o.addEventListener("mouseout",n.onMouseOut),o.tabIndex=-1,o.addEventListener("blur",function(){o.contains(document.activeElement)||this.hide()}.bind(n)),o.addEventListener("wheel",l),n}return i(t,e),t.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide);var t=e.renderer.getMouseEventTarget();t&&"function"==typeof t.removeEventListener&&t.addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide);var t=e.renderer.getMouseEventTarget();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var n=t.$mouseHandler.isMousePressed;if(this.isOpen){var o=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(o.row,o.column)&&!n&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||n||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;this.idleTime-e>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-e):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},t.prototype.isOutsideOfText=function(e){var t=e.editor,n=e.getDocumentPosition(),o=t.session.getLine(n.row);if(n.column==o.length){var i=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),s=t.session.documentToScreenPosition(n.row,n.column);if(s.column!=i.column||s.row!=i.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,n,o){if(!(o&&o!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement())){var i=e.renderer;this.isOpen||(u.addPopup(this),this.$registerCloseEvents(),this.setTheme(i.theme)),this.isOpen=!0,this.range=r.fromPoints(t.start,t.end);var s=i.textToScreenCoordinates(t.start.row,t.start.column),l=i.scroller.getBoundingClientRect();s.pageX<l.left&&(s.pageX=l.left);var c=this.getElement();c.innerHTML="",c.appendChild(n),c.style.maxHeight="",c.style.display="block",this.$setPosition(e,s,!0,t),a.$fixPositionBug(c)}},t.prototype.$setPosition=function(e,t,n,o){n&&this.addMarker(o,e.session);var i=e.renderer,s=this.getElement(),a=s.offsetHeight,r=s.offsetWidth,l=t.pageY,c=t.pageX,d=window.innerHeight-l-i.lineHeight,u=this.$shouldPlaceAbove(a,l,d-10);s.style.maxHeight=(u?l:d)-10+"px",s.style.top=u?"":l+i.lineHeight+"px",s.style.bottom=u?window.innerHeight-l+"px":"",s.style.left=Math.min(c,window.innerWidth-r-10)+"px"},t.prototype.$shouldPlaceAbove=function(e,t,n){return!(t-e<0&&t<n)},t.prototype.addMarker=function(e,t){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=t,this.marker=t&&t.addMarker(e,"ace_highlight-marker","text")},t.prototype.hide=function(e){e&&this.$fromKeyboard&&"keydown"==e.type&&"Escape"==e.code||(e||document.activeElement!=this.getElement())&&(e&&e.target&&("keydown"!=e.type||e.ctrlKey||e.metaKey)&&this.$element.contains(e.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,u.removePopup(this))))},t.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},t.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)}, |
| 131 |
t.prototype.onMouseOut=function(e){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&e.relatedTarget&&!this.getElement().contains(e.relatedTarget)&&(e&&e.currentTarget.contains(e.relatedTarget)||e.relatedTarget.classList.contains("ace_content")||this.hide())},t}(d);t.HoverTooltip=p})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],(function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=e("../lib/dom"),r=e("./mouse_event").MouseEvent,l=e("../tooltip").HoverTooltip,c=e("../config").nls,d=e("../range").Range;t.GutterHandler=function(e){var t=e.editor,n=t.renderer.$gutterLayer;e.$tooltip=new u(t),e.$tooltip.addToEditor(t),e.$tooltip.setDataProvider((function(t,n){var o=t.getDocumentPosition().row;e.$tooltip.showTooltip(o)})),e.editor.setDefaultHandler("guttermousedown",(function(o){if(t.isFocused()&&0==o.getButton()&&"foldWidgets"!=n.getRegion(o)){var i=o.getDocumentPosition().row,s=t.session.selection;if(o.getShiftKey())s.selectTo(i,0);else{if(2==o.domEvent.detail)return t.selectAll(),o.preventDefault();e.$clickSelection=t.selection.getLineRange(i)}return e.setState("selectByLines"),e.captureMouse(o),o.preventDefault()}}))};var u=function(e){function t(n){var o=e.call(this,n.container)||this;o.id="gt"+ ++t.$uid,o.editor=n,o.visibleTooltipRow;var i=o.getElement();return i.setAttribute("role","tooltip"),i.setAttribute("id",o.id),i.style.pointerEvents="auto",o.idleTime=50,o.onDomMouseMove=o.onDomMouseMove.bind(o),o.onDomMouseOut=o.onDomMouseOut.bind(o),o.setClassName("ace_gutter-tooltip"),o}return i(t,e),t.prototype.onDomMouseMove=function(e){var t=new r(e,this.editor);this.onMouseMove(t,this.editor)},t.prototype.onDomMouseOut=function(e){var t=new r(e,this.editor);this.onMouseOut(t)},t.prototype.addToEditor=function(t){var n=t.renderer.$gutter;n.addEventListener("mousemove",this.onDomMouseMove),n.addEventListener("mouseout",this.onDomMouseOut),e.prototype.addToEditor.call(this,t)},t.prototype.removeFromEditor=function(t){var n=t.renderer.$gutter;n.removeEventListener("mousemove",this.onDomMouseMove),n.removeEventListener("mouseout",this.onDomMouseOut),e.prototype.removeFromEditor.call(this,t)},t.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),e.prototype.destroy.call(this)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:c("gutter-tooltip.aria-label.error.singular","error"),plural:c("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:c("gutter-tooltip.aria-label.security.singular","security finding"),plural:c("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:c("gutter-tooltip.aria-label.warning.singular","warning"),plural:c("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:c("gutter-tooltip.aria-label.info.singular","information message"),plural:c("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:c("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:c("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var n,o,i=this.editor.renderer.$gutterLayer,s=i.$annotations[e];o=s?{displayText:Array.from(s.displayText),type:Array.from(s.type)}:{displayText:[],type:[]};var r=i.session.getFoldLine(e);if(r&&i.$showFoldedAnnotations){for(var l,c={error:[],security:[],warning:[],info:[],hint:[]},u={error:1,security:2,warning:3,info:4,hint:5},p=e+1;p<=r.end.row;p++)if(i.$annotations[p])for(var h=0;h<i.$annotations[p].text.length;h++){var g=i.$annotations[p].type[h];c[g].push(i.$annotations[p].text[h]),(!l||u[g]<u[l])&&(l=g)}if(["error","security","warning"].includes(l)){var m="".concat(t.annotationsToSummaryString(c)," in folded code.");o.displayText.push(m),o.type.push(l+"_fold")}}if(0===o.displayText.length)return this.hide();var b={error:[],security:[],warning:[],info:[],hint:[]},f=i.$useSvgGutterIcons?"ace_icon_svg":"ace_icon";for(p=0;p<o.displayText.length;p++){var x=a.createElement("span"),y=a.createElement("span");(n=y.classList).add.apply(n,["ace_".concat(o.type[p]),f]),y.setAttribute("aria-label","".concat(t.annotationLabels[o.type[p].replace("_fold","")].singular)),y.setAttribute("role","img"),y.appendChild(a.createTextNode(" ")),x.appendChild(y),x.appendChild(a.createTextNode(o.displayText[p])),x.appendChild(a.createElement("br")),b[o.type[p].replace("_fold","")].push(x)}var v=a.createElement("span");b.error.forEach((function(e){return v.appendChild(e)})),b.security.forEach((function(e){return v.appendChild(e)})),b.warning.forEach((function(e){return v.appendChild(e)})),b.info.forEach((function(e){return v.appendChild(e)})),b.hint.forEach((function(e){return v.appendChild(e)})),v.setAttribute("aria-live","polite");var k=this.$findLinkedAnnotationNode(e);k&&k.setAttribute("aria-describedby",this.id);var w=d.fromPoints({row:e,column:0},{row:e,column:0});this.showForRange(this.editor,w,v),this.visibleTooltipRow=e,this.editor._signal("showGutterTooltip",this)},t.prototype.$setPosition=function(t,n,o,i){var s=this.$findCellByRow(i.start.row);if(s){var a=s&&s.element,r=a&&a.querySelector(".ace_gutter_annotation");if(r){var l=r.getBoundingClientRect();if(l){var c={pageX:l.right,pageY:l.top};return e.prototype.$setPosition.call(this,t,c,!1,i)}}}},t.prototype.$shouldPlaceAbove=function(e,t,n){return n<e},t.prototype.$findLinkedAnnotationNode=function(e){var t=this.$findCellByRow(e);if(t){var n=t.element;if(n.childNodes.length>2)return n.childNodes[2]}},t.prototype.$findCellByRow=function(e){return this.editor.renderer.$gutterLayer.$lines.cells.find((function(t){return t.row===e}))},t.prototype.hide=function(t){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),null!=this.visibleTooltipRow){var n=this.$findLinkedAnnotationNode(this.visibleTooltipRow);n&&n.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),e.prototype.hide.call(this,t)}},t.annotationsToSummaryString=function(e){var n,o,i=[];try{for(var a=s(["error","security","warning","info","hint"]),r=a.next();!r.done;r=a.next()){var l=r.value;if(e[l].length){var c=1===e[l].length?t.annotationLabels[l].singular:t.annotationLabels[l].plural;i.push("".concat(e[l].length," ").concat(c))}}}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i.join(", ")},t.prototype.isOutsideOfText=function(e){var t=e.editor.renderer.$gutter.getBoundingClientRect();return!(e.clientX>=t.left&&e.clientX<=t.right&&e.clientY>=t.top&&e.clientY<=t.bottom)},t}(l);u.$uid=0,t.GutterTooltip=u})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var o=e("../lib/dom"),i=e("../lib/event"),s=e("../lib/useragent");function a(e){var t=e.editor,n=o.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this), |
| 132 |
t.on("mousedown",this.onMouseDown.bind(e));var a,l,c,d,u,p,h,g,m,b,f,x=t.container,y=0;function v(){var e=p;(function(e,n){var o=Date.now(),i=!n||e.row!=n.row,s=!n||e.column!=n.column;!b||i||s?(t.moveCursorToPosition(e),b=o,f={x:l,y:c}):r(f.x,f.y,l,c)>5?b=null:o-b>=200&&(t.renderer.scrollCursorIntoView(),b=null)})(p=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var o=Date.now(),i=t.renderer.layerConfig.lineHeight,s=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),r={x:{left:l-a.left,right:a.right-l},y:{top:c-a.top,bottom:a.bottom-c}},d=Math.min(r.x.left,r.x.right),u=Math.min(r.y.top,r.y.bottom),p={row:e.row,column:e.column};d/s<=2&&(p.column+=r.x.left<r.x.right?-3:2),u/i<=1&&(p.row+=r.y.top<r.y.bottom?-1:1);var h=e.row!=p.row,g=e.column!=p.column,b=!n||e.row!=n.row;h||g&&!b?m?o-m>=200&&t.renderer.scrollCursorIntoView(p):m=o:m=null}(p,e)}function k(){u=t.selection.toOrientedRange(),a=t.session.addMarker(u,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(d),v(),d=setInterval(v,20),y=0,i.addListener(document,"mousemove",C)}function w(){clearInterval(d),t.session.removeMarker(a),a=null,t.selection.fromOrientedRange(u),t.isFocused()&&!g&&t.$resetCursorStyle(),u=null,p=null,y=0,m=null,b=null,i.removeListener(document,"mousemove",C)}this.onDragStart=function(e){if(this.cancelDrag||!x.draggable){var o=this;return setTimeout((function(){o.startSelect(),o.captureMouse(e)}),0),e.preventDefault()}u=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),i.setDragImage&&i.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),i.clearData(),i.setData("Text",t.session.getTextRange()),g=!0,this.setState("drag")},this.onDragEnd=function(e){if(x.draggable=!1,g=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;h||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&j(e.dataTransfer))return l=e.clientX,c=e.clientY,a||k(),y++,e.dataTransfer.dropEffect=h=$(e),i.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&j(e.dataTransfer))return l=e.clientX,c=e.clientY,a||(k(),y++),null!==_&&(_=null),e.dataTransfer.dropEffect=h=$(e),i.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&a)return w(),h=null,i.preventDefault(e)},this.onDrop=function(e){if(p){var n=e.dataTransfer;if(g)switch(h){case"move":u=u.contains(p.row,p.column)?{start:p,end:p}:t.moveText(u,p);break;case"copy":u=t.moveText(u,p,!0)}else{var o=n.getData("Text");u={start:p,end:t.session.insert(p,o)},t.focus(),h=null}return w(),i.preventDefault(e)}},i.addListener(x,"dragstart",this.onDragStart.bind(e),t),i.addListener(x,"dragend",this.onDragEnd.bind(e),t),i.addListener(x,"dragenter",this.onDragEnter.bind(e),t),i.addListener(x,"dragover",this.onDragOver.bind(e),t),i.addListener(x,"dragleave",this.onDragLeave.bind(e),t),i.addListener(x,"drop",this.onDrop.bind(e),t);var _=null;function C(){null==_&&(_=setTimeout((function(){null!=_&&a&&w()}),20))}function j(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function $(e){var t=["copy","copymove","all","uninitialized"],n=s.isMac?e.altKey:e.ctrlKey,o="uninitialized";try{o=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var i="none";return n&&t.indexOf(o)>=0?i="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(o)>=0?i="move":t.indexOf(o)>=0&&(i="copy"),i}}function r(e,t,n,o){return Math.sqrt(Math.pow(n-e,2)+Math.pow(o-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=s.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;s.isIE&&"dragReady"==this.state&&r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop(),"dragWait"===this.state&&r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),o=e.getButton();if(1===(e.domEvent.detail||1)&&0===o&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var i=e.domEvent.target||e.domEvent.srcElement;"unselectable"in i&&(i.unselectable="on"),t.getDragDelay()?(s.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(a.prototype),t.DragdropHandler=a})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var o=e("./mouse_event").MouseEvent,i=e("../lib/event"),s=e("../lib/dom");t.addTouchListeners=function(e,t){var n,a,r,l,c,d,u,p,h,g="scroll",m=0,b=0,f=0,x=0;function y(){if(t.getOption("enableMobileMenu")){h||(r=window.navigator&&window.navigator.clipboard,l=!1,c=function(e){return t.commands.canExecute(e,t)},d=function(e){var n,o,i=e.target.getAttribute("action");if("more"==i||!l)return l=!l,n=t.getCopyText(),o=t.session.getUndoManager().hasUndo(),void h.replaceChild(s.buildDom(l?["span",!n&&c("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],n&&c("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],n&&c("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],r&&c("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],o&&c("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],c("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],c("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),h.firstChild);"paste"==i?r.readText().then((function(e){t.execCommand(i,e)})):i&&("cut"!=i&&"copy"!=i||(r?r.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(i)),h.firstChild.style.display="none",l=!1,"openCommandPalette"!=i&&t.focus()},(h=s.buildDom(["div",{class:"ace_mobile-menu",onclick:d},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)).addEventListener("touchstart",(function(e){g="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()})),h.addEventListener("touchend",(function(e){e.stopPropagation(),e.preventDefault(),d(e)})));var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),o=t.renderer.textToScreenCoordinates(0,0).pageX,i=t.renderer.scrollLeft,a=t.container.getBoundingClientRect();h.style.top=n.pageY-a.top-3+"px",n.pageX-a.left<a.width-70?(h.style.left="",h.style.right="10px"):(h.style.right="",h.style.left=o+i-a.left+"px"),h.style.display="",h.firstChild.style.display="none",t.on("input",v)}else h&&v();var r,l,c,d}function v(e){h&&(h.style.display="none"),t.off("input",v)}function k(){c=null,clearTimeout(c);var e=t.selection.getRange(),n=e.contains(u.row,u.column);!e.isEmpty()&&n||(t.selection.moveToPosition(u),t.selection.selectWord()),g="wait",y()}i.addListener(e,"contextmenu",(function(e){p&&t.textInput.getElement().focus()}),t),i.addListener(e,"touchstart",(function(e){var i=e.touches;if(c||i.length>1)return clearTimeout(c),c=null, |
| 133 |
r=-1,void(g="zoom");p=t.$mouseHandler.isMousePressed=!0;var s=t.renderer.layerConfig.lineHeight,d=t.renderer.layerConfig.lineHeight,h=e.timeStamp;l=h;var y=i[0],v=y.clientX,w=y.clientY;Math.abs(n-v)+Math.abs(a-w)>s&&(r=-1),n=e.clientX=v,a=e.clientY=w,f=x=0;var _=new o(e,t);if(u=_.getDocumentPosition(),h-r<500&&1==i.length&&!m)b++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(u);var e=b>=2?t.selection.getLineRange(u.row):t.session.getBracketRange(u);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),g="wait"}();else{b=0;var C=t.selection.cursor,j=t.selection.isEmpty()?C:t.selection.anchor,$=t.renderer.$cursorLayer.getPixelPosition(C,!0),S=t.renderer.$cursorLayer.getPixelPosition(j,!0),T=t.renderer.scroller.getBoundingClientRect(),M=t.renderer.layerConfig.offset,N=t.renderer.scrollLeft,L=function(e,t){return(e/=d)*e+(t=t/s-.75)*t};if(e.clientX<T.left)return void(g="zoom");var E=L(e.clientX-T.left-$.left+N,e.clientY-T.top-$.top+M),P=L(e.clientX-T.left-S.left+N,e.clientY-T.top-S.top+M);E<3.5&&P<3.5&&(g=E>P?"cursor":"anchor"),g=P<3.5?"anchor":E<3.5?"cursor":"scroll",c=setTimeout(k,450)}r=h}),t),i.addListener(e,"touchend",(function(e){p=t.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),"zoom"==g?(g="",m=0):c?(t.selection.moveToPosition(u),m=0,y()):"scroll"==g?(m+=60,d=setInterval((function(){m--<=0&&(clearInterval(d),d=null),Math.abs(f)<.01&&(f=0),Math.abs(x)<.01&&(x=0),m<20&&(f*=.9),m<20&&(x*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*f,10*x),e==t.session.getScrollTop()&&(m=0)}),10),v()):y(),clearTimeout(c),c=null}),t),i.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var i=e.touches;if(!(i.length>1||"zoom"==g)){var s=i[0],r=n-s.clientX,d=a-s.clientY;if("wait"==g){if(!(r*r+d*d>4))return e.preventDefault();g="cursor"}n=s.clientX,a=s.clientY,e.clientX=s.clientX,e.clientY=s.clientY;var u=e.timeStamp,p=u-l;if(l=u,"scroll"==g){var h=new o(e,t);h.speed=1,h.wheelX=r,h.wheelY=d,10*Math.abs(r)<Math.abs(d)&&(r=0),10*Math.abs(d)<Math.abs(r)&&(d=0),0!=p&&(f=r/p,x=d/p),t._emit("mousewheel",h),h.propagationStopped||(f=x=0)}else{var m=new o(e,t).getDocumentPosition();"cursor"==g?t.selection.moveCursorToPosition(m):"anchor"==g&&t.selection.setSelectionAnchor(m.row,m.column),t.renderer.scrollCursorIntoView(m),e.preventDefault()}}}),t)}})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],(function(e,t,n){"use strict";var o=e("../lib/event"),i=e("../lib/useragent"),s=e("./default_handlers").DefaultHandlers,a=e("./default_gutter_handler").GutterHandler,r=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,d=e("../config"),u=function(){function e(e){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var t=this;this.editor=e,new s(this),new a(this),new l(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus(),setTimeout((function(){e.isFocused()||e.focus()}))},r=e.renderer.getMouseEventTarget();o.addListener(r,"click",this.onMouseEvent.bind(this,"click"),e),o.addListener(r,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),o.addMultiMouseDownListener([r,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),o.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e);var d=e.renderer.$gutter;o.addListener(d,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),o.addListener(d,"click",this.onMouseEvent.bind(this,"gutterclick"),e),o.addListener(d,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),o.addListener(d,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),o.addListener(r,"mousedown",n,e),o.addListener(d,"mousedown",n,e),i.isIE&&e.renderer.scrollBarV&&(o.addListener(e.renderer.scrollBarV.element,"mousedown",n,e),o.addListener(e.renderer.scrollBarH.element,"mousedown",n,e)),e.on("mousemove",(function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var o=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),s=e.renderer;!i.isEmpty()&&i.insideStart(o.row,o.column)?s.setCursorStyle("default"):s.setCursorStyle("")}}),e)}return e.prototype.onMouseEvent=function(e,t){this.editor.session&&this.editor._emit(e,new r(t,this.editor))},e.prototype.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new r(t,this.editor))},e.prototype.onMouseWheel=function(e,t){var n=new r(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},e.prototype.setState=function(e){this.state=e},e.prototype.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor,s=this.editor.renderer;s.$isMousePressed=!0;var a=this,l=!0,c=function(e){if(e){if(i.isWebKit&&!e.which&&a.releaseMouse)return a.releaseMouse();a.x=e.clientX,a.y=e.clientY,t&&t(e),a.mouseEvent=new r(e,a.editor),a.$mouseMoved=!0}},d=function(e){n.off("beforeEndOperation",h),l=!1,n.session&&u(),a[a.state+"End"]&&a[a.state+"End"](e),a.state="",a.isMousePressed=s.$isMousePressed=!1,s.$keepTextAreaAtCursor&&s.$moveTextAreaToCursor(),a.$onCaptureMouseMove=a.releaseMouse=null,e&&a.onMouseEvent("mouseup",e),n.endOperation()},u=function(){a[a.state]&&a[a.state](),a.$mouseMoved=!1},p=function(){l&&(u(),o.nextFrame(p))};if(i.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout((function(){d(e)}));var h=function(e){a.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(a[a.state+"End"]&&a[a.state+"End"](),a.state="",a.releaseMouse())};n.on("beforeEndOperation",h),n.startOperation({command:{name:"mouse"}}),a.$onCaptureMouseMove=c,a.releaseMouse=o.capture(this.editor.container,c,d),p()},e.prototype.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&o.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},e}();u.prototype.releaseMouse=null,d.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),t.MouseHandler=u})),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var o=e("../lib/dom");t.FoldHandler=function(e){e.on("click",(function(t){var n=t.getDocumentPosition(),i=e.session,s=i.getFoldAt(n.row,n.column,1);s&&(t.getAccelKey()?i.removeFold(s):i.expandFold(s),t.stop());var a=t.domEvent&&t.domEvent.target;a&&o.hasCssClass(a,"ace_inline_button")&&o.hasCssClass(a,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),e.renderer.scrollCursorIntoView())})),e.on("gutterclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,o=e.session;o.foldWidgets&&o.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}})),e.on("gutterdblclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,o=e.session,i=o.getParentFoldRangeData(n,!0),s=i.range||i.firstRange;if(s){n=s.start.row;var a=o.getFoldAt(n,o.getLine(n).length,1);a?o.removeFold(a):(o.addFold("...",s),e.renderer.scrollCursorIntoView({row:s.start.row,column:0}))}t.stop()}}))}})), |
| 134 |
ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(e,t,n){"use strict";var o=e("../lib/keys"),i=e("../lib/event"),s=function(){function e(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)}return e.prototype.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},e.prototype.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},e.prototype.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},e.prototype.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},e.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},e.prototype.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map((function(n){return n.getStatusText&&n.getStatusText(t,e)||""})).filter(Boolean).join(" ")},e.prototype.$callKeyboardHandlers=function(e,t,n,o){for(var s,a=!1,r=this.$editor.commands,l=this.$handlers.length;l--&&!((s=this.$handlers[l].handleKeyboard(this.$data,e,t,n,o))&&s.command&&((a="null"==s.command||r.exec(s.command,this.$editor,s.args,o))&&o&&-1!=e&&1!=s.passEvent&&1!=s.command.passEvent&&i.stopEvent(o),a)););return a||-1!=e||(s={command:"insertstring"},a=r.exec("insertstring",this.$editor,t)),a&&this.$editor._signal&&this.$editor._signal("keyboardActivity",s),a},e.prototype.onCommandKey=function(e,t,n){var i=o.keyCodeToString(n);return this.$callKeyboardHandlers(t,i,n,e)},e.prototype.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)},e}();t.KeyBinding=s})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(e,t,n){"use strict";var o=0,i=0,s=!1,a=!1,r=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],d=11,u=18,p=[u,u,u,u,u,u,u,u,u,6,5,6,8,5,u,u,u,u,u,u,u,u,u,u,u,u,u,u,5,5,5,6,8,4,4,d,d,d,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,u,u,u,u,u,u,5,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,9,4,d,d,d,d,4,4,4,4,0,4,4,u,4,4,d,d,2,2,4,0,4,4,4,2,0,4,4,4,4,4],h=[8,8,8,8,8,8,8,8,8,8,8,u,u,u,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,d,d,d,d,d,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8];function g(e,t,n){if(!(i<e))if(1!=e||1!=o||a)for(var s,r,l,c,d=n.length,u=0;u<d;){if(t[u]>=e){for(s=u+1;s<d&&t[s]>=e;)s++;for(r=u,l=s-1;r<l;r++,l--)c=n[r],n[r]=n[l],n[l]=c;u=s}u++}else n.reverse()}function m(e,t,n,i){var l,c,p,h,g=t[i];switch(g){case 0:case 1:s=!1;case 4:case 3:return g;case 2:return s?3:2;case 7:return s=!0,1;case 8:return 4;case 9:return i<1||i+1>=t.length||2!=(l=n[i-1])&&3!=l||2!=(c=t[i+1])&&3!=c?4:(s&&(c=3),c==l?c:4);case 10:return 2==(l=i>0?n[i-1]:5)&&i+1<t.length&&2==t[i+1]?2:4;case d:if(i>0&&2==n[i-1])return 2;if(s)return 4;for(h=i+1,p=t.length;h<p&&t[h]==d;)h++;return h<p&&2==t[h]?2:4;case 12:for(p=t.length,h=i+1;h<p&&12==t[h];)h++;if(h<p){var m=e[i],b=m>=1425&&m<=2303||64286==m;if(l=t[h],b&&(1==l||7==l))return 1}return i<1||5==(l=t[i-1])?4:n[i-1];case 5:return s=!1,a=!0,o;case 6:return r=!0,4;case 13:case 14:case 16:case 17:case 15:s=!1;case u:return 4}}function b(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:p[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?d:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?h[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,d){if(e.length<2)return{};var p=e.split(""),h=new Array(p.length),f=new Array(p.length),x=[];o=d?1:0,function(e,t,n,d){var u=o?c:l,p=null,h=null,g=null,f=0,x=null,y=-1,v=null,k=null,w=[];if(!d)for(v=0,d=[];v<n;v++)d[v]=b(e[v]);for(i=o,s=!1,a=!1,r=!1,k=0;k<n;k++){if(p=f,w[k]=h=m(e,d,w,k),x=240&(f=u[p][h]),f&=15,t[k]=g=u[f][5],x>0)if(16==x){for(v=y;v<k;v++)t[v]=1;y=-1}else y=-1;if(u[f][6])-1==y&&(y=k);else if(y>-1){for(v=y;v<k;v++)t[v]=g;y=-1}5==d[k]&&(t[k]=0),i|=g}if(r)for(v=0;v<n;v++)if(6==d[v]){t[v]=o;for(var _=v-1;_>=0&&8==d[_];_--)t[_]=o}}(p,x,p.length,n);for(var y=0;y<h.length;h[y]=y,y++);for(g(2,x,h),g(1,x,h),y=0;y<h.length-1;y++)3===n[y]?x[y]=t.AN:1===x[y]&&(n[y]>7&&n[y]<13||4===n[y]||n[y]===u)?x[y]=t.ON_R:y>0&&"ل"===p[y-1]&&/\u0622|\u0623|\u0625|\u0627/.test(p[y])&&(x[y-1]=x[y]=t.R_H,y++);for(p[p.length-1]===t.DOT&&(x[p.length-1]=t.B),""===p[0]&&(x[0]=t.RLE),y=0;y<h.length;y++)f[y]=x[h[y]];return{logicalFromVisual:h,bidiLevels:f}},t.hasBidiCharacters=function(e,t){for(var n=!1,o=0;o<e.length;o++)t[o]=b(e.charAt(o)),n||1!=t[o]&&7!=t[o]&&3!=t[o]||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],(function(e,t,n){"use strict";var o=e("./lib/bidiutil"),i=e("./lib/lang"),s=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function e(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=o,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=s.test(e.getValue())}return e.prototype.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},e.prototype.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&s.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},e.prototype.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,o=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===o;)o=n,e++;else e=this.currentRow;return e},e.prototype.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[e];s&&(void 0===t&&(t=this.getSplitIndex()),t>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[o.L],this.line=t<s.length?this.line.substring(s[t-1],s[t]):this.line.substring(s[s.length-1])):this.line=this.line.substring(0,s[t]),t==s.length&&(this.line+=this.showInvisibles?n:o.DOT))}else this.line+=this.showInvisibles?n:o.DOT;var a,r=this.session,l=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(e,t){return"\t"===e||r.isFullWidth(e.charCodeAt(0))?(a="\t"===e?r.getScreenTabSize(t+l):2,l+=a-1,i.stringRepeat(o.DOT,a)):e})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==o.DOT?this.line.substr(0,this.line.length-1):this.line, |
| 135 |
this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},e.prototype.updateBidiMap=function(){var e=[];o.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=o.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},e.prototype.markAsDirty=function(){this.currentRow=null},e.prototype.updateCharacterWidths=function(e){if(this.characterWidth!==e.$characterSize.width){this.fontMetrics=e;var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("ה");this.charWidths[o.L]=this.charWidths[o.EN]=this.charWidths[o.ON_R]=t,this.charWidths[o.R]=this.charWidths[o.AN]=n,this.charWidths[o.R_H]=.45*n,this.charWidths[o.B]=this.charWidths[o.RLE]=0,this.currentRow=null}},e.prototype.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},e.prototype.setEolChar=function(e){this.EOL=e},e.prototype.setContentWidth=function(e){this.contentWidth=e},e.prototype.isRtlLine=function(e){return!!this.$isRtl||(null!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},e.prototype.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),o=e.selection.getSelectionAnchor().row;o<=n.row;o++)t||e.session.getLine(o).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(o).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:o},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(o,0,1)},e.prototype.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=e>t?this.session.getOverwrite()?e:e-1:t,i=o.getVisualFromLogicalIdx(n,this.bidiMap),s=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&e<=t&&s[i]%2!=0&&i++;for(var r=0;r<i;r++)a+=this.charWidths[s[r]];return!this.session.getOverwrite()&&e>t&&s[i]%2==0&&(a+=this.charWidths[s[i]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},e.prototype.getSelections=function(e,t){var n,o=this.bidiMap,i=o.bidiLevels,s=[],a=0,r=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,d=!1,u=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var p,h=0;h<i.length;h++)p=o.logicalFromVisual[h],n=i[h],(c=p>=r&&p<l)&&!d?u=a:!c&&d&&s.push({left:u,width:a-u}),a+=this.charWidths[n],d=c;if(c&&h===i.length&&s.push({left:u,width:a-u}),this.isRtlDir)for(var g=0;g<s.length;g++)s[g].left+=this.rtlLineOffset;return s},e.prototype.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,n=(e=Math.max(e,0),0),o=0,i=this.bidiMap.bidiLevels,s=this.charWidths[i[o]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e>n+s/2;){if(n+=s,o===i.length-1){s=0;break}s=this.charWidths[i[++o]]}return o>0&&i[o-1]%2!=0&&i[o]%2==0?(e<n&&o--,t=this.bidiMap.logicalFromVisual[o]):o>0&&i[o-1]%2==0&&i[o]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===i.length-1&&0===s&&i[o-1]%2==0||!this.isRtlDir&&0===o&&i[o]%2!=0?t=1+this.bidiMap.logicalFromVisual[o]:(o>0&&i[o-1]%2!=0&&0!==s&&o--,t=this.bidiMap.logicalFromVisual[o]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent},e}();t.BidiHandler=a})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,r=function(){function e(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(e,t){var n=t?e.end:e.start,o=t?e.start:e.end;this.$setSelection(n.row,n.column,o.row,o.column)},e.prototype.$setSelection=function(e,t,n,o){if(!this.$silent){var i=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,o),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||s)&&this._emit("changeSelection")}},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},e.prototype.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var n,o="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(o);return i?(o=i.start.row,n=i.end.row):n=o,!0===t?new a(o,0,n,this.session.getLine(n).length):new a(o,0,n+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(e,t,n){var o=e.column,i=e.column+t;return n<0&&(o=e.column-t,i=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(o,i).split(" ").length-1==t},e.prototype.moveCursorLeft=function(){var e,t=this.lead.getPosition() |
| 136 |
;if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();t=this.lead,this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},e.prototype.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),o=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,o.row,o.column).match(/^\s*/);i[0].length==t||this.session.$useEmacsStyleLineStart||(o.column+=i[0].length),this.moveCursorToPosition(o)},e.prototype.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var o=n.search(/\s+$/);o>0&&(t.column=o)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),o=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);if(i)this.moveCursorTo(i.end.row,i.end.column);else{if(this.session.nonTokenRe.exec(o)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(o)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},e.prototype.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var o=this.session.getFoldStringAt(t,n,-1);null==o&&(o=this.doc.getLine(t).substring(0,n));var s=i.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(s)&&(n-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(s)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},e.prototype.$shortWordEndIndex=function(e){var t,n=0,o=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&o.test(t);)n++;if(n<1)for(i.lastIndex=0;(t=e[n])&&!i.test(t);)if(i.lastIndex=0,n++,o.test(t)){if(n>2){n--;break}for(;(t=e[n])&&o.test(t);)n++;if(n>2)break}}return i.lastIndex=0,n},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),o=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var s=this.doc.getLength();do{e++,o=this.doc.getLine(e)}while(e<s&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),t=0}var a=this.$shortWordEndIndex(o);this.moveCursorTo(e,t+a)},e.prototype.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var o=this.session.getLine(t).substring(0,n);if(0===n){do{t--,o=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(o));n=o.length,/\s+$/.test(o)||(o="")}var s=i.stringReverse(o),a=this.$shortWordEndIndex(s);return this.moveCursorTo(t,n-a)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(e,t){var n,o=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(o.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(o.column),o.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=o.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?o.column=this.$desiredColumn:this.$desiredColumn=o.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];e<0?e-=i.rowsAbove||0:e>0&&(e+=i.rowCount-(i.rowsAbove||0))}var s=this.session.screenToDocumentPosition(o.row+e,o.column,n);0!==e&&0===t&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+t,0===t)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,n){var o=this.session.getFoldAt(e,t,1);o&&(e=o.start.row,t=o.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(e,t,n){var o=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(o.row,o.column,n)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return a.fromPoints(t,n)}catch(e){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},e.prototype.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},e.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0},e}();r.prototype.setSelectionAnchor=r.prototype.setAnchor,r.prototype.getSelectionAnchor=r.prototype.getAnchor,r.prototype.setSelectionRange=r.prototype.setRange,o.implement(r.prototype,s),t.Selection=r})),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],(function(e,t,n){"use strict";var o=e("./lib/report_error").reportError,i=2e3,s=function(){function e(e){for(var t in this.splitRegex,this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],o=[],i=0,s=this.matchMappings[t]={defaultToken:"text"},a="g",r=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(s.defaultToken=c.defaultToken), |
| 137 |
c.caseInsensitive&&-1===a.indexOf("i")&&(a+="i"),c.unicode&&-1===a.indexOf("u")&&(a+="u"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var d=c.regex,u=new RegExp("(?:("+d+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==u?c.token=c.token[0]:u-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:u-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=u>1?this.$applyToken:c.token),u>1&&(/\\\d/.test(c.regex)?d=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+i+1)})):(u=1,d=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||r.push(c)),s[i]=l,i+=u,o.push(d),c.onMatch||(c.onMatch=null)}}o.length||(s[0]=0,o.push("$")),r.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)}),this),this.regExps[t]=new RegExp("("+o.join(")|(")+")|($)",a)}}return e.prototype.$setMaxTokenCount=function(e){i=0|e},e.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var o=[],i=0,s=n.length;i<s;i++)t[i]&&(o[o.length]={type:n[i],value:t[i]});return o},e.prototype.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],o=this.tokenArray,i=0,s=o.length;i<s;i++)t[i+1]&&(n[n.length]={type:o[i],value:t[i+1]});return n},e.prototype.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,(function(e,t){return t?"(?:":e}))},e.prototype.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,o=!1,i={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(e,t,s,a,r,l){return o?o="]"!=r:r?o=!0:a?(n==i.stack&&(i.end=l+1,i.stack=-1),n--):s&&(n++,1!=s.length&&(i.stack=n,i.start=l)),e})),null!=i.end&&/^\)*$/.test(e.substr(i.end))&&(e=e.substring(0,i.start)+e.substr(i.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},e.prototype.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var n=t.slice(0);"#tmp"===(t=n[0])&&(n.shift(),t=n.shift())}else n=[];var o=t||"start",s=this.states[o];s||(o="start",s=this.states[o]);var a=this.matchMappings[o],r=this.regExps[o];r.lastIndex=0;for(var l,c=[],d=0,u=0,p={type:null,value:""};l=r.exec(e);){var h=a.defaultToken,g=null,m=l[0],b=r.lastIndex;if(b-m.length>d){var f=e.substring(d,b-m.length);p.type==h?p.value+=f:(p.type&&c.push(p),p={type:h,value:f})}for(var x=0;x<l.length-2;x++)if(void 0!==l[x+1]){h=(g=s[a[x]]).onMatch?g.onMatch(m,o,n,e):g.token,g.next&&(o="string"==typeof g.next?g.next:g.next(o,n),(s=this.states[o])||(this.reportError("state doesn't exist",o),o="start",s=this.states[o]),a=this.matchMappings[o],d=b,(r=this.regExps[o]).lastIndex=b),g.consumeLineEnd&&(d=b);break}if(m)if("string"==typeof h)g&&!1===g.merge||p.type!==h?(p.type&&c.push(p),p={type:h,value:m}):p.value+=m;else if(h)for(p.type&&c.push(p),p={type:null,value:""},x=0;x<h.length;x++)c.push(h[x]);if(d==e.length)break;if(d=b,u++>i){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});d<e.length;)p.type&&c.push(p),p={value:e.substring(d,d+=500),type:"overflow"};o="start",n=[];break}}return p.type&&c.push(p),n.length>1&&n[0]!==o&&n.unshift("#tmp",o),{tokens:c,state:n.length?n:o}},e}();s.prototype.reportError=o,t.Tokenizer=s})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],(function(e,t,n){"use strict";var o,i=e("../lib/deep_copy").deepCopy;(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var o=e[n],i=0;i<o.length;i++){var s=o[i];(s.next||s.onMatch)&&("string"==typeof s.next&&0!==s.next.indexOf(t)&&(s.next=t+s.next),s.nextState&&0!==s.nextState.indexOf(t)&&(s.nextState=t+s.nextState))}this.$rules[t+n]=o}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,o,s){var a="function"==typeof e?(new e).getRules():e;if(o)for(var r=0;r<o.length;r++)o[r]=t+o[r];else for(var l in o=[],a)o.push(t+l);if(this.addRules(a,t),n){var c=Array.prototype[s?"push":"unshift"];for(r=0;r<o.length;r++)c.apply(this.$rules[o[r]],i(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var n=0,o=this.$rules;Object.keys(o).forEach((function i(s){var a=o[s];a.processed=!0;for(var r=0;r<a.length;r++){var l=a[r],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var d=l.next||l.push;if(d&&Array.isArray(d)){var u=l.stateName;u||("string"!=typeof(u=l.token)&&(u=u[0]||""),o[u]&&(u+=n++)),o[u]=d,l.next=u,i(u)}else"pop"==d&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var p in l.rules)o[p]?o[p].push&&o[p].push.apply(o[p],l.rules[p]):o[p]=l.rules[p];var h="string"==typeof l?l:l.include;if(h&&("$self"===h&&(h="start"),c=Array.isArray(h)?h.map((function(e){return o[e]})):o[h]),c){var g=[r,1].concat(c);l.noEscape&&(g=g.filter((function(e){return!e.next}))),a.splice.apply(a,g),r--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}),this)},this.createKeywordMapper=function(e,t,n,o){var i=Object.create(null);return this.$keywordList=[],Object.keys(e).forEach((function(t){for(var s=e[t].split(o||"|"),a=s.length;a--;){var r=s[a];this.$keywordList.push(r),n&&(r=r.toLowerCase()),i[r]=t}}),this),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call((o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}}).prototype),t.TextHighlightRules=o})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(e,t,n){"use strict";var o;(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call((o=function(){this.$behaviours={}}).prototype),t.Behaviour=o})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=e("./range").Range,i=function(){function e(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var o=e.getTokenAt(t,n);this.$tokenIndex=o?o.index:-1}return e.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},e.prototype.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row}, |
| 138 |
e.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new o(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=i})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var o,i,s=e("../../lib/oop"),a=e("../behaviour").Behaviour,r=e("../../token_iterator").TokenIterator,l=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],d=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},p={'"':'"',"'":"'"},h=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return o=u[t];o=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(e,t,n,o){var i=e.end.row-e.start.row;return{text:n+t+o,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}};(i=function(e){e=e||{},this.add("braces","insertion",(function(t,n,s,a,r){var c=s.getCursorPosition(),d=a.doc.getLine(c.row);if("{"==r){h(s);var u=s.getSelectionRange(),p=a.doc.getTextRange(u),m=a.getTokenAt(c.row,c.column);if(""!==p&&"{"!==p&&s.getWrapBehavioursEnabled())return g(u,p,"{","}");if(m&&/(?:string)\.quasi|\.xml/.test(m.type)){if([/tag\-(?:open|name)/,/attribute\-name/].some((function(e){return e.test(m.type)}))||/(string)\.quasi/.test(m.type)&&"$"!==m.value[c.column-m.start-1])return;return i.recordAutoInsert(s,a,"}"),{text:"{}",selection:[1,1]}}if(i.isSaneInsertion(s,a))return/[\]\}\)]/.test(d[c.column])||s.inMultiSelectMode||e.braces?(i.recordAutoInsert(s,a,"}"),{text:"{}",selection:[1,1]}):(i.recordMaybeInsert(s,a,"{"),{text:"{",selection:[1,1]})}else if("}"==r){if(h(s),"}"==d.substring(c.column,c.column+1)&&null!==a.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&i.isAutoInsertedClosing(c,d,r))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==r||"\r\n"==r){h(s);var b="";if(i.isMaybeInsertedClosing(c,d)&&(b=l.stringRepeat("}",o.maybeInsertedBrackets),i.clearMaybeInsertedClosing()),"}"===d.substring(c.column,c.column+1)){var f=a.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!f)return null;var x=this.$getIndent(a.getLine(f.row))}else{if(!b)return void i.clearMaybeInsertedClosing();x=this.$getIndent(d)}var y=x+a.getTabString();return{text:"\n"+y+"\n"+x+b,selection:[1,y.length,1,y.length]}}i.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,i,s){var a=i.doc.getTextRange(s);if(!s.isMultiLine()&&"{"==a){if(h(n),"}"==i.doc.getLine(s.start.row).substring(s.end.column,s.end.column+1))return s.end.column++,s;o.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,n,o,s){if("("==s){h(n);var a=n.getSelectionRange(),r=o.doc.getTextRange(a);if(""!==r&&n.getWrapBehavioursEnabled())return g(a,r,"(",")");if(i.isSaneInsertion(n,o))return i.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==s){h(n);var l=n.getCursorPosition(),c=o.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1)&&null!==o.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&i.isAutoInsertedClosing(l,c,s))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&"("==s&&(h(n),")"==o.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i})),this.add("brackets","insertion",(function(e,t,n,o,s){if("["==s){h(n);var a=n.getSelectionRange(),r=o.doc.getTextRange(a);if(""!==r&&n.getWrapBehavioursEnabled())return g(a,r,"[","]");if(i.isSaneInsertion(n,o))return i.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==s){h(n);var l=n.getCursorPosition(),c=o.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1)&&null!==o.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&i.isAutoInsertedClosing(l,c,s))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&"["==s&&(h(n),"]"==o.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i})),this.add("string_dquotes","insertion",(function(e,t,n,o,i){var s=o.$mode.$quotes||p;if(1==i.length&&s[i]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(i))return;h(n);var a=i,r=n.getSelectionRange(),l=o.doc.getTextRange(r);if(!(""===l||1==l.length&&s[l])&&n.getWrapBehavioursEnabled())return g(r,l,a,a);if(!l){var c=n.getCursorPosition(),d=o.doc.getLine(c.row),u=d.substring(c.column-1,c.column),m=d.substring(c.column,c.column+1),b=o.getTokenAt(c.row,c.column),f=o.getTokenAt(c.row,c.column+1);if("\\"==u&&b&&/escape/.test(b.type))return null;var x,y=b&&/string|escape/.test(b.type),v=!f||/string|escape/.test(f.type);if(m==a)(x=y!==v)&&/string\.end/.test(f.type)&&(x=!1);else{if(y&&!v)return null;if(y&&v)return null;var k=o.$mode.tokenRe;k.lastIndex=0;var w=k.test(u);k.lastIndex=0;var _=k.test(m),C=o.$mode.$pairQuotesAfter;if(!(C&&C[a]&&C[a].test(u))&&w||_)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var j=d[c.column-2];if(u==a&&(j==a||k.test(j)))return null;x=!0}return{text:x?a+a:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,o,i){var s=o.$mode.$quotes||p,a=o.doc.getTextRange(i);if(!i.isMultiLine()&&s.hasOwnProperty(a)&&(h(n),o.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==a))return i.end.column++,i})),!1!==e.closeDocComment&&this.add("doc comment end","insertion",(function(e,t,n,o,i){if("doc-start"===e&&("\n"===i||"\r\n"===i)&&n.selection.isEmpty()){var s=n.getCursorPosition();if(0===s.column)return;for(var a=o.doc.getLine(s.row),r=o.doc.getLine(s.row+1),l=o.getTokens(s.row),c=0,d=0;d<l.length;d++){c+=l[d].value.length;var u=l[d];if(c>=s.column){if(c===s.column){if(!/\.doc/.test(u.type))return;if(/\*\//.test(u.value)){var p=l[d+1];if(!p||!/\.doc/.test(p.type))return}}var h=s.column-(c-u.value.length),g=u.value.indexOf("*/"),m=u.value.indexOf("/**",g>-1?g+2:0);if(-1!==m&&h>m&&h<m+3)return;if(-1!==g&&-1!==m&&h>=g&&h<=m||!/\.doc/.test(u.type))return;break}}var b=this.$getIndent(a);if(/\s*\*/.test(r))return/^\s*\*/.test(a)?{text:i+b+"* ",selection:[1,2+b.length,1,2+b.length]}:{text:i+b+" * ",selection:[1,3+b.length,1,3+b.length]};if(/\/\*\*/.test(a.substring(0,s.column)))return{text:i+b+" * "+i+" "+b+"*/",selection:[1,4+b.length,1,4+b.length]}}}))}).isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new r(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var i=new r(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",c))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",d)},i.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},i.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),s=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,s,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=i.row,o.autoInsertedLineEnd=n+s.substr(i.column),o.autoInsertedBrackets++},i.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),s=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,s)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=i.row,o.maybeInsertedLineStart=s.substr(0,i.column)+n,o.maybeInsertedLineEnd=s.substr(i.column),o.maybeInsertedBrackets++},i.isAutoInsertedClosing=function(e,t,n){ |
| 139 |
return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},i.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},i.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},i.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},s.inherits(i,a),t.CstyleBehaviour=i})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var o=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],i=0,s=[],a=0;a<o.length;a+=2)s.push(i+=o[a]),o[a+1]&&s.push(45,i+=o[a+1]);t.wordChars=String.fromCharCode.apply(null,s)})),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var o,i=e("../config"),s=e("../tokenizer").Tokenizer,a=e("./text_highlight_rules").TextHighlightRules,r=e("./behaviour/cstyle").CstyleBehaviour,l=e("../unicode"),c=e("../lib/lang"),d=e("../token_iterator").TokenIterator,u=e("../range").Range;(function(){this.$defaultBehaviour=new r,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new s(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,o){var i=t.doc,s=!0,a=!0,r=1/0,l=t.getTabSize(),d=!1;if(this.lineCommentStart){Array.isArray(this.lineCommentStart)?(m=this.lineCommentStart.map(c.escapeRegExp).join("|"),h=this.lineCommentStart[0]):(m=c.escapeRegExp(this.lineCommentStart),h=this.lineCommentStart),m=new RegExp("^(\\s*)(?:"+m+") ?"),d=t.getUseSoftTabs(),x=function(e,t){var n=e.match(m);if(n){var o=n[1].length,s=n[0].length;p(e,o,s)||" "!=n[0][s-1]||s--,i.removeInLine(t,o,s)}};var u=h+" ",p=(f=function(e,t){s&&!/\S/.test(e)||(p(e,r,r)?i.insertInLine({row:t,column:r},u):i.insertInLine({row:t,column:r},h))},y=function(e,t){return m.test(e)},function(e,t,n){for(var o=0;t--&&" "==e.charAt(t);)o++;if(o%l!=0)return!1;for(o=0;" "==e.charAt(n++);)o++;return l>2?o%l!=l-1:o%l==0})}else{if(!this.blockComment)return!1;var h=this.blockComment.start,g=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+c.escapeRegExp(h)+")"),b=new RegExp("(?:"+c.escapeRegExp(g)+")\\s*$"),f=function(e,t){y(e,t)||s&&!/\S/.test(e)||(i.insertInLine({row:t,column:e.length},g),i.insertInLine({row:t,column:r},h))},x=function(e,t){var n;(n=e.match(b))&&i.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(m))&&i.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(m.test(e))return!0;for(var o=t.getTokens(n),i=0;i<o.length;i++)if("comment"===o[i].type)return!0}}function v(e){for(var t=n;t<=o;t++)e(i.getLine(t),t)}var k=1/0;v((function(e,t){var n=e.search(/\S/);-1!==n?(n<r&&(r=n),a&&!y(e,t)&&(a=!1)):k>e.length&&(k=e.length)})),r==1/0&&(r=k,s=!1,a=!1),d&&r%l!=0&&(r=Math.floor(r/l)*l),v(a?x:f)},this.toggleBlockComment=function(e,t,n,o){var i=this.blockComment;if(i){!i.start&&i[0]&&(i=i[0]);var s,a,r=(m=new d(t,o.row,o.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(r&&/comment/.test(r.type)){for(var c,p;r&&/comment/.test(r.type);){if(-1!=(b=r.value.indexOf(i.start))){var h=m.getCurrentTokenRow(),g=m.getCurrentTokenColumn()+b;c=new u(h,g,h,g+i.start.length);break}r=m.stepBackward()}var m;for(r=(m=new d(t,o.row,o.column)).getCurrentToken();r&&/comment/.test(r.type);){var b;if(-1!=(b=r.value.indexOf(i.end))){h=m.getCurrentTokenRow(),g=m.getCurrentTokenColumn()+b,p=new u(h,g,h,g+i.end.length);break}r=m.stepForward()}p&&t.remove(p),c&&(t.remove(c),s=c.start.row,a=-i.start.length)}else a=i.start.length,s=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);l.start.row==s&&(l.start.column+=a),l.end.row==s&&(l.end.column+=a),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],o=n.prototype.$id,s=i.$modes[o];s||(i.$modes[o]=s=new n),i.$modes[t]||(i.$modes[t]=s),this.$embeds.push(t),this.$modes[t]=s}var a=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],r=function(e){var t,n,o;o=(t=l)[n=a[e]],t[a[e]]=function(){return this.$delegator(n,arguments,o)}},l=this;for(t=0;t<a.length;t++)r(t)},this.$delegator=function(e,t,n){var o=t[0]||"start";if("string"!=typeof o){if(Array.isArray(o[2])){var i=o[2][o[2].length-1];if(a=this.$modes[i])return a[e].apply(a,[o[1]].concat([].slice.call(t,1)))}o=o[0]||"start"}for(var s=0;s<this.$embeds.length;s++)if(this.$modes[this.$embeds[s]]){var a,r=o.split(this.$embeds[s]);if(!r[0]&&r[1])return t[0]=r[1],(a=this.$modes[this.$embeds[s]])[e].apply(a,t)}var l=n.apply(this,t);return n?l:void 0},this.transformAction=function(e,t,n,o,i){if(this.$behaviour){var s=this.$behaviour.getBehaviours();for(var a in s)if(s[a][t]){var r=s[a][t].apply(this,arguments);if(r)return r}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var o in t)for(var i=t[o],s=0,a=i.length;s<a;s++)if("string"==typeof i[s].token)/keyword|support|storage/.test(i[s].token)&&n.push(i[s].regex);else if("object"==typeof i[s].token)for(var r=0,l=i[s].token.length;r<l;r++)/keyword|support|storage/.test(i[s].token[r])&&(o=i[s].regex.match(/\(.+?\)/g)[r],n.push(o.substr(1,o.length-2))) |
| 140 |
;this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,o){return(this.$keywordList||this.$createKeywordList()).map((function(e){return{name:e,value:e,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}).call((o=function(){this.HighlightRules=a}).prototype),t.Mode=o})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var o=e("./lib/dom"),i=function(){function e(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return e.prototype.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},e.prototype.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},e.prototype.$onChangeEditor=function(e){this.attach(e.editor)},e.prototype.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},e.prototype.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},e.prototype.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var o=e.data,i=o.start.row,s=o.end.row,a="add"==e.action,r=i+1;r<s;r++)n[r]&&(n[r].hidden=a);n[s]&&(a?n[i]?n[s].hidden=a:n[i]=n[s]:(n[i]==n[s]&&(n[i]=void 0),n[s].hidden=a))}},e.prototype.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,o=e.end.row-n;if(0===o);else if("remove"==e.action){var i=t.splice(n+1,o);!t[n]&&i[i.length-1]&&(t[n]=i.pop()),i.forEach((function(e){e&&this.removeLineWidget(e)}),this),this.$updateRows()}else{var s=new Array(o);t[n]&&null!=t[n].column&&e.start.column>t[n].column&&n++,s.unshift(n,0),t.splice.apply(t,s),this.$updateRows()}}},e.prototype.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},e.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},e.prototype.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=o.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=o.createElement("div"),e.el.textContent=e.text),e.el&&(o.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&o.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex="5",t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex="3"),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var i=this.session.lineWidgets;e.row!=n.end.row||i[n.start.row]?e.hidden=!0:i[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},e.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],o=[];n;)o.push(n),n=n.$oldWidget;return o},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var n=this.session._changedWidgets,o=t.layerConfig;if(n&&n.length){for(var i=1/0,s=0;s<n.length;s++){var a=n[s];if(a&&a.el&&a.session==this.session){if(!a._inDocument){if(this.session.lineWidgets[a.row]!=a)continue;a._inDocument=!0,t.container.appendChild(a.el)}a.h=a.el.offsetHeight,a.fixedWidth||(a.w=a.el.offsetWidth,a.screenWidth=Math.ceil(a.w/o.characterWidth));var r=a.h/o.lineHeight;a.coverLine&&(r-=this.session.getRowLineCount(a.row))<0&&(r=0),a.rowCount!=r&&(a.rowCount=r,a.row<i&&(i=a.row))}}i!=1/0&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},e.prototype.renderWidgets=function(e,t){var n=t.layerConfig,o=this.session.lineWidgets;if(o){for(var i=Math.min(this.firstRow,n.firstRow),s=Math.max(this.lastRow,n.lastRow,o.length);i>0&&!o[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=i;a<=s;a++){var r=o[a];if(r&&r.el)if(r.hidden)r.el.style.top=-100-(r.pixelHeight||0)+"px";else{r._inDocument||(r._inDocument=!0,t.container.appendChild(r.el));var l=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;r.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(r.row)),r.el.style.top=l-n.offset+"px";var c=r.coverGutter?0:t.gutterWidth;r.fixedWidth||(c-=t.scrollLeft),r.el.style.left=c+"px",r.fullWidth&&r.screenWidth&&(r.el.style.minWidth=n.width+2*n.padding+"px"),r.fixedWidth?r.el.style.right=t.scrollBar.getWidth()+"px":r.el.style.right=""}}}},e}();t.LineWidgets=i})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var o=t.start.row,i=t.start.column,s=e[o]||"";switch(t.action){case"insert":if(1===t.lines.length)e[o]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var a=[o,1].concat(t.lines);e.splice.apply(e,a),e[o]=s.substring(0,i)+e[o],e[o+t.lines.length-1]+=s.substring(i)}break;case"remove":var r=t.end.column,l=t.end.row;o===l?e[o]=s.substring(0,i)+s.substring(r):e.splice(o,l-o+1,s.substring(0,i)+e[l].substring(r))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=function(){function e(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof t?this.setPosition(t.row,t.column):this.setPosition(t,n)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var t=function(e,t,n){var o="insert"==e.action,i=(o?1:-1)*(e.end.row-e.start.row),s=(o?1:-1)*(e.end.column-e.start.column),r=e.start,l=o?r:e.end;return a(t,r,n)?{row:t.row,column:t.column}:a(l,t,!n)?{row:t.row+i, |
| 141 |
column:t.column+(t.row==l.row?s:0)}:{row:r.row,column:r.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,n){var o;if(o=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=o.row||this.column!=o.column){var i={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:i,value:o})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();function a(e,t,n){var o=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&o}s.prototype.$insertRight=!1,o.implement(s.prototype,i),t.Anchor=s})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,r=e("./anchor").Anchor,l=function(){function e(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new r(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},e.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},e.prototype.getLine=function(e){return this.$lines[e]||""},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},e.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),o=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:o,action:"insert",lines:[t]},!0),this.clonePos(o)},e.prototype.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var o=this.getLine(e);return null==t&&(t=o.length),{row:e,column:t=Math.min(Math.max(t,0),o.length)}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},e.prototype.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),o={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:o,action:"insert",lines:t}),this.clonePos(o)},e.prototype.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},e.prototype.removeInLine=function(e,t,n){var o=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:o,end:i,action:"remove",lines:this.getLinesForRange({start:o,end:i})},!0),this.clonePos(o)},e.prototype.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,o=t<this.getLength()-1,i=n?e-1:e,s=n?this.getLine(i).length:0,r=o?t+1:t,l=o?0:this.getLine(r).length,c=new a(i,s,r,l),d=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),d},e.prototype.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},e.prototype.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},e.prototype.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},e.prototype.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,o=n.length-t+1,i=e.start.row,s=e.start.column,a=0,r=0;a<o;a=r){r+=t-1;var l=n.slice(a,r);l.push(""),this.applyDelta({start:this.pos(i+a,s),end:this.pos(i+r,s=0),action:e.action,lines:l},!0)}e.lines=n.slice(a),e.start.row=i+a,e.start.column=s,this.applyDelta(e,!0)},e.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},e.prototype.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,i=t||0,s=n.length;i<s;i++)if((e-=n[i].length+o)<0)return{row:i,column:e+n[i].length+o};return{row:s-1,column:e+n[s-1].length+o}},e.prototype.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length),a=t||0;a<s;++a)i+=n[a].length+o;return i+e.column},e.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},e}();l.prototype.$autoNewLine="",l.prototype.$newLineMode="auto",o.implement(l.prototype,s),t.Document=l})), |
| 142 |
ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=function(){function e(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,o=-1,i=n.doc,s=t;n.lines[t];)t++;var a=i.getLength(),r=0;for(n.running=!1;t<a;){n.$tokenizeRow(t),o=t;do{t++}while(n.lines[t]);if(++r%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==o&&(o=t),s<=o&&n.fireUpdateEvent(s,o)}}}return e.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},e.prototype.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},e.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},e.prototype.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var o=Array(n+1);o.unshift(t,1),this.lines.splice.apply(this.lines,o),this.states.splice.apply(this.states,o)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],o=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=o.state+""?(this.states[e]=o.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=o.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();o.implement(s.prototype,i),t.BackgroundTokenizer=s})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],(function(e,t,n){"use strict";var o=e("./lib/lang"),i=e("./range").Range,s=function(){function e(e,t,n){void 0===n&&(n="text"),this.setRegexp(e),this.clazz=t,this.type=n,this.docLen=0}return e.prototype.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},e.prototype.update=function(e,t,n,s){if(this.regExp){for(var a=s.firstRow,r=s.lastRow,l={},c=n.$editor&&n.$editor.$search,d=c&&c.$isMultilineSearch(n.$editor.getLastSearchOptions()),u=a;u<=r;u++){var p=this.cache[u];if(null==p||n.getValue().length!=this.docLen){if(d){p=[];var h=c.$multiLineForward(n,this.regExp,u,r);if(h){var g=h.endRow<=r?h.endRow-1:r;g>u&&(u=g),p.push(new i(h.startRow,h.startCol,h.endRow,h.endCol))}p.length>this.MAX_RANGES&&(p=p.slice(0,this.MAX_RANGES))}else(p=o.getMatchOffsets(n.getLine(u),this.regExp)).length>this.MAX_RANGES&&(p=p.slice(0,this.MAX_RANGES)),p=p.map((function(e){return new i(u,e.offset,u,e.offset+e.length)}));this.cache[u]=p.length?p:""}if(0!==p.length)for(var m=p.length;m--;){var b=p[m].toScreenRange(n),f=b.toString();l[f]||(l[f]=!0,t.drawSingleLineMarker(e,b,this.clazz,s))}}this.docLen=n.getValue().length}},e}();s.prototype.MAX_RANGES=500,t.SearchHighlight=s})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=function(){function e(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return e.prototype.addSession=function(e){this.$session=e},e.prototype.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var o=this.$undoStack.length;o>this.$undoDepth-1&&this.$undoStack.splice(0,o-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,o=n.length;o--;){var i=n[o][0];if(i.id<=e)break;i.id<t&&(i.ignore=!0)}this.lastDeltas=null},e.prototype.getSelection=function(e,t){for(var n=this.selections,o=n.length;o--;){var i=n[o];if(i.rev<e)return t&&(i=n[o+1]),i}},e.prototype.getRevision=function(){return this.$rev},e.prototype.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,o=null,i=0,s=n.length;s--;){var a=n[s][0];if(a.id<t&&!o&&(o=s+1),a.id<=e){i=s+1;break}}return n.slice(i,o)},e.prototype.getChangedRanges=function(e,t){null==t&&(t=this.$rev+1)},e.prototype.getChangedLines=function(e,t){null==t&&(t=this.$rev+1)},e.prototype.undo=function(e,t){this.lastDeltas=null;var n=this.$undoStack;if(function(e,t){for(var n=t;n--;){var o=e[n];if(o&&!o[0].ignore){for(;n<t-1;){var i=d(e[n],e[n+1]);e[n]=i[0],e[n+1]=i[1],n++}return!0}}}(n,n.length)){e||(e=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var o=n.pop(),i=null;return o&&(i=e.undoChanges(o,t),this.$redoStack.push(o),this.$syncRev()),this.$fromUndo=!1,i}},e.prototype.redo=function(e,t){if(this.lastDeltas=null,e||(e=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);!function(e,t){for(var n=0;n<t.length;n++)for(var o=t[n],i=0;i<o.length;i++)m(e,o[i])}(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach((function(e){e[0].id=++this.$maxRev}),this)}var o=this.$redoStack.pop(),i=null;return o&&(i=e.redoChanges(o,t),this.$undoStack.push(o),this.$syncRev()),this.$fromUndo=!1,i},e.prototype.$syncRev=function(){var e=this.$undoStack,t=e[e.length-1],n=t&&t[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},e.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},e.prototype.canUndo=function(){return this.$undoStack.length>0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?r(e):r(this.$undoStack)+"\n---\n"+r(this.$redoStack)},e}();o.prototype.hasUndo=o.prototype.canUndo,o.prototype.hasRedo=o.prototype.canRedo,o.prototype.isClean=o.prototype.isAtBookmark,o.prototype.markClean=o.prototype.bookmark;var i=e("./range").Range,s=i.comparePoints;function a(e){return{row:e.row,column:e.column}}function r(e){if(e=e||this,Array.isArray(e))return e.map(r).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,o="insert"==t.action;if(n&&o)if(s(t.start,e.end)>=0)p(t,e,-1);else{if(!(s(t.start,e.start)<=0))return null;p(e,t,1)}else if(n&&!o)if(s(t.start,e.end)>=0)p(t,e,-1);else{ |
| 143 |
if(!(s(t.end,e.start)<=0))return null;p(e,t,-1)}else if(!n&&o)if(s(t.start,e.start)>=0)p(t,e,1);else{if(!(s(t.start,e.start)<=0))return null;p(e,t,1)}else if(!n&&!o)if(s(t.start,e.start)>=0)p(t,e,1);else{if(!(s(t.end,e.start)<=0))return null;p(e,t,-1)}return[t,e]}function d(e,t){for(var n=e.length;n--;)for(var o=0;o<t.length;o++)if(!c(e[n],t[o])){for(;n<e.length;){for(;o--;)c(t[o],e[n]);o=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}function u(e,t){var n="insert"==e.action,o="insert"==t.action;if(n&&o)s(e.start,t.start)<0?p(t,e,1):p(e,t,1);else if(n&&!o)s(e.start,t.end)>=0?p(e,t,-1):(s(e.start,t.start)<=0||p(e,i.fromPoints(t.start,e.start),-1),p(t,e,1));else if(!n&&o)s(t.start,e.end)>=0?p(t,e,-1):(s(t.start,e.start)<=0||p(t,i.fromPoints(e.start,t.start),-1),p(e,t,1));else if(!n&&!o)if(s(t.start,e.end)>=0)p(t,e,-1);else{var a,r;if(!(s(t.end,e.start)<=0))return s(e.start,t.start)<0&&(a=e,e=g(e,t.start)),s(e.end,t.end)>0&&(r=g(e,t.end)),h(t.end,e.start,e.end,-1),r&&!a&&(e.lines=r.lines,e.start=r.start,e.end=r.end,r=e),[t,a,r].filter(Boolean);p(e,t,-1)}return[t,e]}function p(e,t,n){h(e.start,t.start,t.end,n),h(e.end,t.start,t.end,n)}function h(e,t,n,o){e.row==(1==o?t:n).row&&(e.column+=o*(n.column-t.column)),e.row+=o*(n.row-t.row)}function g(e,t){var n=e.lines,o=e.end;e.end=a(t);var i=e.end.row-e.start.row,s=n.splice(i,n.length),r=i?t.column:t.column-e.start.column;return n.push(s[0].substring(0,r)),s[0]=s[0].substr(r),{start:a(t),end:o,lines:s,action:e.action}}function m(e,t){t=function(e){return{start:a(e.start),end:a(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var o=e[n],i=0;i<o.length;i++){var s=u(o[i],t);t=s[0],2!=s.length&&(s[2]?(o.splice(i+1,1,s[1],s[2]),i++):s[1]||(o.splice(i,1),i--))}o.length||e.splice(n,1)}return e}i.comparePoints,t.UndoManager=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=e("../range").Range,i=function(){function e(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new o(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}return e.prototype.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},e.prototype.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,n){var o,i,s=0,a=this.folds,r=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<a.length;l++){if(-1==(i=(o=a[l]).range.compareStart(t,n)))return void e(null,t,n,s,r);if(!e(null,o.start.row,o.start.column,s,r)&&e(o.placeholder,o.start.row,o.start.column,s)||0===i)return;r=!o.sameRow,s=o.end.column}e(null,t,n,s,r)},e.prototype.getNextFoldTo=function(e,t){for(var n,o,i=0;i<this.folds.length;i++){if(-1==(o=(n=this.folds[i]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===o)return{fold:n,kind:"inside"}}return null},e.prototype.addRemoveChars=function(e,t,n){var o,i,s=this.getNextFoldTo(e,t);if(s)if(o=s.fold,"inside"==s.kind&&o.start.column!=t&&o.start.row!=e)window.console&&window.console.log(e,t,o);else if(o.start.row==e){var a=(i=this.folds).indexOf(o);for(0===a&&(this.start.column+=n);a<i.length;a++){if((o=i[a]).start.column+=n,!o.sameRow)return;o.end.column+=n}this.end.column+=n}},e.prototype.split=function(t,n){var o=this.getNextFoldTo(t,n);if(!o||"inside"==o.kind)return null;var i=o.fold,s=this.folds,a=this.foldData,r=s.indexOf(i),l=s[r-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new e(a,s=s.splice(r,s.length-r));return a.splice(a.indexOf(this)+1,0,c),c},e.prototype.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var o=this.foldData;o.splice(o.indexOf(e),1)},e.prototype.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach((function(t){e.push(" "+t.toString())})),e.push("]"),e.join("\n")},e.prototype.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var o=this.folds[n];if((e-=o.start.column-t)<0)return{row:o.start.row,column:o.start.column+e};if((e-=o.placeholder.length)<0)return o.start;t=o.end.column}return{row:this.end.row,column:this.end.column+e}},e}();t.FoldLine=i})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=e("./range").Range.comparePoints,i=function(){function e(){this.ranges=[],this.$bias=1}return e.prototype.pointIndex=function(e,t,n){for(var i=this.ranges,s=n||0;s<i.length;s++){var a=i[s],r=o(e,a.end);if(!(r>0)){var l=o(e,a.start);return 0===r?t&&0!==l?-s-2:s:l>0||0===l&&!t?s:-s-1}}return-s-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var o=this.pointIndex(e.end,t,n);return o<0?o=-o-1:o++,this.ranges.splice(n,o-n,e)},e.prototype.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){for(var e,t=[],n=this.ranges,i=(n=n.sort((function(e,t){return o(e.start,t.start)})))[0],s=1;s<n.length;s++){e=i,i=n[s];var a=o(e.end,i.start);a<0||(0!=a||e.isEmpty()||i.isEmpty())&&(o(e.end,i.end)<0&&(e.end.row=i.end.row,e.end.column=i.end.column),n.splice(s,1),t.push(i),i=e,s--)}return this.ranges=n,t},e.prototype.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var o=this.pointIndex({row:e,column:0});o<0&&(o=-o-1);var i=this.pointIndex({row:t,column:0},o);i<0&&(i=-i-1);for(var s=[],a=o;a<i;a++)s.push(n[a]);return s},e.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},e.prototype.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},e.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},e.prototype.$onChange=function(e){for(var t=e.start,n=e.end,o=t.row,i=n.row,s=this.ranges,a=0,r=s.length;a<r&&!((d=s[a]).end.row>=o);a++);if("insert"==e.action){for(var l=i-o,c=-t.column+n.column;a<r&&!((d=s[a]).start.row>o);a++)if(d.start.row==o&&d.start.column>=t.column&&(d.start.column==t.column&&this.$bias<=0||(d.start.column+=c,d.start.row+=l)),d.end.row==o&&d.end.column>=t.column){if(d.end.column==t.column&&this.$bias<0)continue;d.end.column==t.column&&c>0&&a<r-1&&d.end.column>d.start.column&&d.end.column==s[a+1].start.column&&(d.end.column-=c),d.end.column+=c,d.end.row+=l}}else for(l=o-i,c=t.column-n.column;a<r&&!((d=s[a]).start.row>i);a++)d.end.row<i&&(o<d.end.row||o==d.end.row&&t.column<d.end.column)?(d.end.row=o, |
| 144 |
d.end.column=t.column):d.end.row==i?d.end.column<=n.column?(l||d.end.column>t.column)&&(d.end.column=t.column,d.end.row=t.row):(d.end.column+=c,d.end.row+=l):d.end.row>i&&(d.end.row+=l),d.start.row<i&&(o<d.start.row||o==d.start.row&&t.column<d.start.column)?(d.start.row=o,d.start.column=t.column):d.start.row==i?d.start.column<=n.column?(l||d.start.column>t.column)&&(d.start.column=t.column,d.start.row=t.row):(d.start.column+=c,d.start.row+=l):d.start.row>i&&(d.start.row+=l);if(0!=l&&a<r)for(;a<r;a++){var d;(d=s[a]).start.row+=l,d.end.row+=l}},e}();i.prototype.comparePoints=o,t.RangeList=i})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],(function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=function(e){function t(t,n){var o=e.call(this)||this;return o.foldLine=null,o.placeholder=n,o.range=t,o.start=t.start,o.end=t.end,o.sameRow=t.start.row==t.end.row,o.subFolds=o.ranges=[],o}return i(t,e),t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach((function(t){t.setFoldLine(e)}))},t.prototype.clone=function(){var e=new t(this.range.clone(),this.placeholder);return this.subFolds.forEach((function(t){e.subFolds.push(t.clone())})),e.collapseChildren=this.collapseChildren,e},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){var t,n;t=e,n=this.start,a(t.start,n),a(t.end,n);for(var o=e.start.row,i=e.start.column,s=0,r=-1;s<this.subFolds.length&&1==(r=this.subFolds[s].range.compare(o,i));s++);var l=this.subFolds[s],c=0;if(0==r){if(l.range.containsRange(e))return l.addSubFold(e);c=1}o=e.range.end.row,i=e.range.end.column;var d=s;for(r=-1;d<this.subFolds.length&&1==(r=this.subFolds[d].range.compare(o,i));d++);0==r&&d++;for(var u=this.subFolds.splice(s,d-s,e),p=0==r?u.length-1:u.length,h=c;h<p;h++)e.addSubFold(u[h]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return function(e,t){r(e.start,t),r(e.end,t)}(e,this.start)},t}(e("../range_list").RangeList);function a(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function r(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}t.Fold=s})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],(function(e,t,n){"use strict";var o=e("../range").Range,i=e("./fold_line").FoldLine,s=e("./fold").Fold,a=e("../token_iterator").TokenIterator,r=e("../mouse/mouse_event").MouseEvent;t.Folding=function(){this.getFoldAt=function(e,t,n){var o=this.getFoldLine(e);if(!o)return null;for(var i=o.folds,s=0;s<i.length;s++){var a=i[s].range;if(a.contains(e,t)){if(1==n&&a.isEnd(e,t)&&!a.isEmpty())continue;if(-1==n&&a.isStart(e,t)&&!a.isEmpty())continue;return i[s]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,o=this.$foldData,i=[];t.column+=1,n.column-=1;for(var s=0;s<o.length;s++){var a=o[s].range.compareRange(e);if(2!=a){if(-2==a)break;for(var r=o[s].folds,l=0;l<r.length;l++){var c=r[l];if(-2==(a=c.range.compareRange(e)))break;if(2!=a){if(42==a)break;i.push(c)}}}}return t.column-=1,n.column+=1,i},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach((function(e){t=t.concat(this.getFoldsInRange(e))}),this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var o=0;o<t[n].folds.length;o++)e.push(t[n].folds[o]);return e},this.getFoldStringAt=function(e,t,n,o){if(!(o=o||this.getFoldLine(e)))return null;for(var i,s,a={end:{column:0}},r=0;r<o.folds.length;r++){var l=(s=o.folds[r]).range.compareEnd(e,t);if(-1==l){i=this.getLine(s.start.row).substring(a.end.column,s.start.column);break}if(0===l)return null;a=s}return i||(i=this.getLine(s.start.row).substring(a.end.column)),-1==n?i.substring(0,t-a.end.column):1==n?i.substring(t-a.end.column):i},this.getFoldLine=function(e,t){var n=this.$foldData,o=0;for(t&&(o=n.indexOf(t)),-1==o&&(o=0);o<n.length;o++){var i=n[o];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,o=0;for(t&&(o=n.indexOf(t)),-1==o&&(o=0);o<n.length;o++){var i=n[o];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,o=t-e+1,i=0;i<n.length;i++){var s=n[i],a=s.end.row,r=s.start.row;if(a>=t){r<t&&(r>=e?o-=t-r:o=0);break}a>=e&&(o-=r>=e?a-r:a-e+1)}return o},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,o=this.$foldData,a=!1;e instanceof s?n=e:(n=new s(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var r=n.start.row,l=n.start.column,c=n.end.row,d=n.end.column,u=this.getFoldAt(r,l,1),p=this.getFoldAt(c,d,-1);if(u&&p==u)return u.addSubFold(n);u&&!u.range.isStart(r,l)&&this.removeFold(u),p&&!p.range.isEnd(c,d)&&this.removeFold(p);var h=this.getFoldsInRange(n.range);h.length>0&&(this.removeFolds(h),n.collapseChildren||h.forEach((function(e){n.addSubFold(e)})));for(var g=0;g<o.length;g++){var m=o[g];if(c==m.start.row){m.addFold(n),a=!0;break}if(r==m.end.row){if(m.addFold(n),a=!0,!n.sameRow){var b=o[g+1];if(b&&b.start.row==c){m.merge(b);break}}break}if(c<=m.start.row)break}return a||(m=this.$addFoldLine(new i(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(m.start.row,m.start.row):this.$updateRowLengthCache(m.start.row,m.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach((function(e){this.addFold(e)}),this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,o=t.end.row,i=this.$foldData,s=t.folds;if(1==s.length)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))s.pop(),t.end.row=s[s.length-1].end.row,t.end.column=s[s.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))s.shift(),t.start.row=s[0].start.row,t.start.column=s[0].start.column;else if(e.sameRow)s.splice(s.indexOf(e),1);else{var a=t.split(e.start.row,e.start.column);(s=a.folds).shift(),a.start.row=s[0].start.row,a.start.column=s[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,o):this.$updateRowLengthCache(n,o)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach((function(e){this.removeFold(e)}),this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach((function(t){e.restoreRange(t),this.addFold(t)}),this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,i;if(null==e)n=new o(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new o(e,0,e,this.getLine(e).length);else if("row"in e)n=o.fromPoints(e,e);else{if(Array.isArray(e))return i=[],e.forEach((function(e){i=i.concat(this.unfold(e))}),this),i;n=e}for(var s=i=this.getFoldsInRangeList(n);1==i.length&&o.comparePoints(i[0].start,n.start)<0&&o.comparePoints(i[0].end,n.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(i):this.expandFolds(i),s.length)return s},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e}, |
| 145 |
this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,o,i){null==o&&(o=e.start.row),null==i&&(i=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var s=this.doc,a="";return e.walk((function(e,t,n,r){if(!(t<o)){if(t==o){if(n<i)return;r=Math.max(i,r)}a+=null!=e?e:s.getLine(t).substring(r,n)}}),t,n),a},this.getDisplayLine=function(e,t,n,o){var i,s=this.getFoldLine(e);return s?this.getFoldDisplayLine(s,e,t,n,o):(i=this.doc.getLine(e)).substring(o||0,t||i.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map((function(t){var n=t.folds.map((function(e){return e.clone()}));return new i(e,n)}))},this.toggleFold=function(e){var t,n,o=this.selection.getRange();if(o.isEmpty()){var i=o.start;if(t=this.getFoldAt(i.row,i.column))return void this.expandFold(t);if(e){var s=this.getFoldLine(i.row);return void(s&&this.expandFolds(s.folds))}(n=this.findMatchingBracket(i))?1==o.comparePoint(n)?o.end=n:(o.start=n,o.start.column++,o.end.column--):(n=this.findMatchingBracket({row:i.row,column:i.column+1}))?(1==o.comparePoint(n)?o.end=n:o.start=n,o.start.column++):o=this.getCommentFoldRange(i.row,i.column)||o}else{var a=this.getFoldsInRange(o);if(e&&a.length)return void this.expandFolds(a);1==a.length&&(t=a[0])}if(t||(t=this.getFoldAt(o.start.row,o.start.column)),t&&t.range.toString()==o.toString())this.expandFold(t);else{var r="...";if(!o.isMultiLine()){if((r=this.getTextRange(o)).length<4)return;r=r.trim().substring(0,2)+".."}this.addFold(r,o)}},this.getCommentFoldRange=function(e,t,n){var i=new a(this,e,t),s=i.getCurrentToken(),r=s&&s.type;if(s&&/^comment|string/.test(r)){"comment"==(r=r.match(/comment|string/)[0])&&(r+="|doc-start|\\.doc");var l=new RegExp(r),c=new o;if(1!=n){do{s=i.stepBackward()}while(s&&l.test(s.type));s=i.stepForward()}c.start.row=i.getCurrentTokenRow(),c.start.column=i.getCurrentTokenColumn()+s.value.length,i=new a(this,e,t);var d=this.getState(i.$row);if(-1!=n){var u=-1;do{if(s=i.stepForward(),-1==u){var p=this.getState(i.$row);d.toString()!==p.toString()&&(u=i.$row)}else if(i.$row>u)break}while(s&&l.test(s.type));s=i.stepBackward()}else s=i.getCurrentToken();if(c.end.row=i.getCurrentTokenRow(),c.end.column=i.getCurrentTokenColumn(),c.start.row==c.end.row&&c.start.column>c.end.column)return;return c}},this.foldAll=function(e,t,n,o){null==n&&(n=1e5);var i=this.foldWidgets;if(i){t=t||this.getLength();for(var s=e=e||0;s<t;s++)if(null==i[s]&&(i[s]=this.getFoldWidget(s)),"start"==i[s]&&(!o||o(s))){var a=this.getFoldWidgetRange(s);a&&a.isMultiLine()&&a.end.row<=t&&a.start.row>=e&&(s=a.end.row,a.collapseChildren=n,this.addFold("...",a))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),o=0;o<n.length;o++){var i=n[o];if("text"!=i.type||!/^\s+$/.test(i.value))return!!/comment/.test(i.type)}}))},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var o,i=e-1;i>=0;){var s=n[i];if(null==s&&(s=n[i]=this.getFoldWidget(i)),"start"==s){var a=this.getFoldWidgetRange(i);if(o||(o=a),a&&a.end.row>=e)break}i--}return{range:-1!==i&&a,firstRange:o}},this.onFoldWidgetClick=function(e,t){t instanceof r&&(t=t.domEvent);var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var o=t.target||t.srcElement;o&&/ace_fold-widget/.test(o.className)&&(o.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),o=this.getLine(e),i="end"===n?-1:1,s=this.getFoldAt(e,-1===i?0:o.length,i);if(s)return t.children||t.all?this.removeFold(s):this.expandFold(s),s;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(s=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(s.range))return this.removeFold(s),s;if(t.siblings){var r=this.getParentFoldRangeData(e);if(r.range)var l=r.range.start.row+1,c=r.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=a?a.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var o=this.getParentFoldRangeData(t,!0);if(n=o.range||o.firstRange){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var o=Array(n+1);o.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var o=e("../token_iterator").TokenIterator,i=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var o=n.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],e):this.$findOpeningBracket(o[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),o=!0,s=n.charAt(e.column-1),a=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(a||(s=n.charAt(e.column),e={row:e.row,column:e.column+1},a=s&&s.match(/([\(\[\{])|([\)\]\}])/),o=!1),!a)return null;if(a[1]){if(!(r=this.$findClosingBracket(a[1],e)))return null;t=i.fromPoints(e,r),o||(t.end.column++,t.start.column--),t.cursor=t.end}else{var r;if(!(r=this.$findOpeningBracket(a[2],e)))return null;t=i.fromPoints(r,e),o||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),o=/([\(\[\{])|([\)\]\}])/,s=!t&&n.charAt(e.column-1),a=s&&s.match(o);if(a||(s=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},a=s&&s.match(o)),!a)return null;var r=new i(e.row,e.column-1,e.row,e.column),l=a[1]?this.$findClosingBracket(a[1],e):this.$findOpeningBracket(a[2],e);return l?[r,new i(l.row,l.column,l.row,l.column+1)]:[r]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],s=1,a=new o(this,t.row,t.column),r=a.getCurrentToken();if(r||(r=a.stepForward()),r){n||(n=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=t.column-a.getCurrentTokenColumn()-2,c=r.value;;){for(;l>=0;){var d=c.charAt(l);if(d==i){if(0==(s-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()} |
| 146 |
}else d==e&&(s+=1);l-=1}do{r=a.stepBackward()}while(r&&!n.test(r.type));if(null==r)break;l=(c=r.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],s=1,a=new o(this,t.row,t.column),r=a.getCurrentToken();if(r||(r=a.stepForward()),r){n||(n=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=t.column-a.getCurrentTokenColumn();;){for(var c=r.value,d=c.length;l<d;){var u=c.charAt(l);if(u==i){if(0==(s-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else u==e&&(s+=1);l+=1}do{r=a.stepForward()}while(r&&!n.test(r.type));if(null==r)break;l=0}return null}},this.getMatchingTags=function(e){var t=new o(this,e.row,e.column),n=this.$findTagName(t);if(n)return"<"===t.stepBackward().value?this.$findClosingTag(t,n):this.$findOpeningTag(t,n)},this.$findTagName=function(e){var t=e.getCurrentToken(),n=!1,o=!1;if(t&&-1===t.type.indexOf("tag-name"))do{(t=o?e.stepBackward():e.stepForward())&&("/>"===t.value?o=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,o=t.value,s=t.value,a=0,r=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(-1!==(n=t).type.indexOf("tag-close")&&!c){var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(t=e.stepForward())if(">"!==t.value||c||(d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),c=!0),-1!==t.type.indexOf("tag-name")){if(s===(o=t.value))if("<"===n.value)a++;else if("</"===n.value&&--a<0){e.stepBackward();var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2);t=e.stepForward();var p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),!t||">"!==t.value)return;var h=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else s===o&&"/>"===t.value&&--a<0&&(h=p=u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),d=new i(l.end.row,l.end.column,l.end.row,l.end.column+1))}while(t&&a>=0);if(r&&d&&u&&h&&l&&p)return{openTag:new i(r.start.row,r.start.column,d.end.row,d.end.column),closeTag:new i(u.start.row,u.start.column,h.end.row,h.end.column),openTagName:l,closeTagName:p}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),o=t.value,s=0,a=e.getCurrentTokenRow(),r=e.getCurrentTokenColumn(),l=r+2,c=new i(a,r,a,l);e.stepForward();var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),t&&">"===t.value){var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,a=e.getCurrentTokenRow(),l=(r=e.getCurrentTokenColumn())+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(o===t.value)if("<"===n.value){if(++s>0){var p=new i(a,r,a,l),h=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var g=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else"</"===n.value&&s--}else if("/>"===t.value){for(var m=0,b=n;b;){if(-1!==b.type.indexOf("tag-name")&&b.value===o){s--;break}if("<"===b.value)break;b=e.stepBackward(),m++}for(var f=0;f<m;f++)e.stepForward()}}while(n&&s<=0);return h&&g&&c&&u&&p&&d?{openTag:new i(h.start.row,h.start.column,g.end.row,g.end.column),closeTag:new i(c.start.row,c.start.column,u.end.row,u.end.column),openTagName:p,closeTagName:d}:void 0}}}})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./lib/lang"),s=e("./bidihandler").BidiHandler,a=e("./config"),r=e("./lib/event_emitter").EventEmitter,l=e("./selection").Selection,c=e("./mode/text").Mode,d=e("./range").Range,u=e("./line_widgets").LineWidgets,p=e("./document").Document,h=e("./background_tokenizer").BackgroundTokenizer,g=e("./search_highlight").SearchHighlight,m=e("./undomanager").UndoManager,b=function(){function e(t,n){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++e.$uid,this.$foldData.toString=function(){return this.join("\n")},this.$gutterCustomWidgets={},this.bgTokenizer=new h((new c).getTokenizer(),this);var o=this;this.bgTokenizer.on("update",(function(e){o._signal("tokenizerUpdate",e)})),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof t&&t.getLine||(t=new p(t)),this.setDocument(t),this.selection=new l(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new s(this),a.resetOptions(this),this.setMode(n),a._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return e.prototype.$initOperationListeners=function(){var e=this;this.curOp=null,this.on("change",(function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.docChanged=!0}),!0),this.on("changeSelection",(function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.selectionChanged=!0}),!0),this.$operationResetTimer=i.delayedCall(this.endOperation.bind(this,!0))},e.prototype.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(e={}),this.$operationResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",e)},e.prototype.endOperation=function(e){if(this.curOp){if(e&&!1===e.returnValue)return this.curOp=null,void this._signal("endOperation",e);if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;var t=this.selection.toJSON();this.curOp.selectionAfter=t,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(t),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",e)}},e.prototype.setDocument=function(e){this.doc&&this.doc.off("change",this.$onChange),this.doc=e,e.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},e.prototype.getDocument=function(){return this.doc},Object.defineProperty(e.prototype,"widgetManager",{get:function(){var e=new u(this);return this.widgetManager=e,this.$editor&&e.attach(this.$editor),e},set:function(e){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:e})},enumerable:!1,configurable:!0}),e.prototype.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},e.prototype.$getRowCacheIndex=function(e,t){for(var n=0,o=e.length-1;n<=o;){var i=n+o>>1,s=e[i];if(t>s)n=i+1;else{ |
| 147 |
if(!(t<s))return i;o=i-1}}return n-1},e.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},e.prototype.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},e.prototype.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},e.prototype.onSelectionChange=function(){this._signal("changeSelection")},e.prototype.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},e.fromJSON=function(t){"string"==typeof t&&(t=JSON.parse(t));var n=new m;n.$undoStack=t.history.$undoStack,n.$redoStack=t.history.$redoStack,n.mark=t.history.mark,n.$rev=t.history.rev;var o=new e(t.value);return t.folds.forEach((function(e){o.addFold("...",d.fromPoints(e.start,e.end))})),o.setAnnotations(t.annotations),o.setBreakpoints(t.breakpoints),o.setMode(t.mode),o.setScrollLeft(t.scrollLeft),o.setScrollTop(t.scrollTop),o.setUndoManager(n),o.selection.fromJSON(t.selection),o},e.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map((function(e){return e.range})),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},e.prototype.toString=function(){return this.doc.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.getState=function(e){return this.bgTokenizer.getState(e)},e.prototype.getTokens=function(e){return this.bgTokenizer.getTokens(e)},e.prototype.getTokenAt=function(e,t){var n,o=this.bgTokenizer.getTokens(e),i=0;if(null==t){var s=o.length-1;i=this.getLine(e).length}else for(s=0;s<o.length&&!((i+=o[s].value.length)>=t);s++);return(n=o[s])?(n.index=s,n.start=i-n.value.length,n):null},e.prototype.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):"\t"},e.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption("tabSize",e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},e.prototype.removeGutterCustomWidget=function(e){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(e)},e.prototype.addGutterCustomWidget=function(e,t){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},e.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},e.prototype.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},e.prototype.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},e.prototype.addMarker=function(e,t,n,o){var i=this.$markerId++,s={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!o,id:i};return o?(this.$frontMarkers[i]=s,this._signal("changeFrontMarker")):(this.$backMarkers[i]=s,this._signal("changeBackMarker")),i},e.prototype.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},e.prototype.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},e.prototype.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},e.prototype.highlight=function(e){if(!this.$searchHighlight){var t=new g(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},e.prototype.highlightLines=function(e,t,n,o){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var i=new d(e,0,t,1/0);return i.id=this.addMarker(i,n,"fullLine",o),i},e.prototype.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},e.prototype.getAnnotations=function(){return this.$annotations||[]},e.prototype.clearAnnotations=function(){this.setAnnotations([])},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},e.prototype.getWordRange=function(e,t){var n=this.getLine(e),o=!1;if(t>0&&(o=!!n.charAt(t-1).match(this.tokenRe)),o||(o=!!n.charAt(t).match(this.tokenRe)),o)var i=this.tokenRe;else i=/^\s+$/.test(n.slice(t-1,t+1))?/\s/:this.nonTokenRe;var s=t;if(s>0){do{s--}while(s>=0&&n.charAt(s).match(i));s++}for(var a=t;a<n.length&&n.charAt(a).match(i);)a++;return new d(e,s,e,a)},e.prototype.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),o=this.getLine(n.end.row);o.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},e.prototype.setNewLineMode=function(e){this.doc.setNewLineMode(e)},e.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},e.prototype.setUseWorker=function(e){this.setOption("useWorker",e)},e.prototype.getUseWorker=function(){return this.$useWorker},e.prototype.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},e.prototype.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,o=n.path}else o=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[o]&&!n)return this.$onChangeMode(this.$modes[o]),void(t&&t());this.$modeId=o,a.loadModule(["mode",o],function(e){if(!this.destroyed){if(this.$modeId!==o)return t&&t();this.$modes[o]&&!n?this.$onChangeMode(this.$modes[o]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[o]=e,e.$id=o),this.$onChangeMode(e)),t&&t()}}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},e.prototype.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id), |
| 148 |
this.$mode!==e){var n=this.$mode;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var o=e.getTokenizer();if(void 0!==o.on){var i=this.onReloadTokenizer.bind(this);o.on("update",i)}this.bgTokenizer.setTokenizer(o),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:e}))}},e.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},e.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){a.warn("Could not load worker",e),this.$worker=null}},e.prototype.getMode=function(){return this.$mode},e.prototype.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},e.prototype.getScrollTop=function(){return this.$scrollTop},e.prototype.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},e.prototype.getScrollLeft=function(){return this.$scrollLeft},e.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},e.prototype.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach((function(t){t&&t.screenWidth>e&&(e=t.screenWidth)})),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,o=0,i=0,s=this.$foldData[i],a=s?s.start.row:1/0,r=t.length,l=0;l<r;l++){if(l>a){if((l=s.end.row+1)>=r)break;a=(s=this.$foldData[i++])?s.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>o&&(o=n[l])}this.screenWidth=o}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var o=e[n];"insert"==o.action||"remove"==o.action?this.doc.revertDelta(o):o.folds&&this.addFolds(o.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},e.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var o=e[n];"insert"!=o.action&&"remove"!=o.action||this.doc.$safeApplyDelta(o)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},e.prototype.setUndoSelect=function(e){this.$undoSelect=e},e.prototype.$getUndoSelection=function(e,t){function n(e){return t?"insert"!==e.action:"insert"===e.action}for(var o,i,s=0;s<e.length;s++){var a=e[s];a.start&&(o?n(a)?(i=a.start,-1==o.compare(i.row,i.column)&&o.setStart(i),i=a.end,1==o.compare(i.row,i.column)&&o.setEnd(i)):(i=a.start,-1==o.compare(i.row,i.column)&&(o=d.fromPoints(a.start,a.start))):o=n(a)?d.fromPoints(a.start,a.end):d.fromPoints(a.start,a.start))}return o},e.prototype.replace=function(e,t){return this.doc.replace(e,t)},e.prototype.moveText=function(e,t,n){var o=this.getTextRange(e),i=this.getFoldsInRange(e),s=d.fromPoints(t,t);if(!n){this.remove(e);var a=e.start.row-e.end.row;(c=a?-e.end.column:e.start.column-e.end.column)&&(s.start.row==e.end.row&&s.start.column>e.end.column&&(s.start.column+=c),s.end.row==e.end.row&&s.end.column>e.end.column&&(s.end.column+=c)),a&&s.start.row>=e.end.row&&(s.start.row+=a,s.end.row+=a)}if(s.end=this.insert(s.start,o),i.length){var r=e.start,l=s.start,c=(a=l.row-r.row,l.column-r.column);this.addFolds(i.map((function(e){return(e=e.clone()).start.row==r.row&&(e.start.column+=c),e.end.row==r.row&&(e.end.column+=c),e.start.row+=a,e.end.row+=a,e})))}return s},e.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var o=e;o<=t;o++)this.doc.insertInLine({row:o,column:0},n)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new d(0,0,0,0),o=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var s=this.getLine(i);n.start.row=i,n.end.row=i;for(var a=0;a<o&&" "==s.charAt(a);++a);a<o&&"\t"==s.charAt(a)?(n.start.column=a,n.end.column=a+1):(n.start.column=0,n.end.column=a),this.remove(n)}},e.prototype.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((i=this.getRowFoldStart(e+n))<0)return 0;var o=i-e}else if(n>0){var i;if((i=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;o=i-t}else e=this.$clipRowToDocument(e),o=(t=this.$clipRowToDocument(t))-e+1;var s=new d(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(s).map((function(e){return(e=e.clone()).start.row+=o,e.end.row+=o,e})),r=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+o,r),a.length&&this.addFolds(a),o},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},e.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var o=this.$constrainWrapLimit(e,n.min,n.max);return o!=this.$wrapLimit&&o>1&&(this.$wrapLimit=o,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},e.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,o=e.start,i=e.end,s=o.row,a=i.row,r=a-s,l=null;if(this.$updating=!0,0!=r)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(s,r);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var d=0;if(m=this.getFoldLine(i.row)){ |
| 149 |
m.addRemoveChars(i.row,i.column,o.column-i.column),m.shiftRow(-r);var u=this.getFoldLine(s);u&&u!==m&&(u.merge(m),m=u),d=c.indexOf(m)+1}for(;d<c.length;d++)(m=c[d]).start.row>=i.row&&m.shiftRow(-r);a=s}else{var p=Array(r);p.unshift(s,0);var h=t?this.$wrapData:this.$rowLengthCache;if(h.splice.apply(h,p),c=this.$foldData,d=0,m=this.getFoldLine(s)){var g=m.range.compareInside(o.row,o.column);0==g?(m=m.split(o.row,o.column))&&(m.shiftRow(r),m.addRemoveChars(a,0,i.column-o.column)):-1==g&&(m.addRemoveChars(s,0,i.column-o.column),m.shiftRow(r)),d=c.indexOf(m)+1}for(;d<c.length;d++){var m;(m=c[d]).start.row>=s&&m.shiftRow(r)}}else r=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),r=-r),(m=this.getFoldLine(s))&&m.addRemoveChars(s,o.column,r);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(s,a):this.$updateRowLengthCache(s,a),l},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var n,o,i=this.doc.getAllLines(),s=this.getTabSize(),a=this.$wrapData,r=this.$wrapLimit,l=e;for(t=Math.min(t,i.length-1);l<=t;)(o=this.getFoldLine(l,o))?(n=[],o.walk(function(e,t,o,s){var a;if(null!=e){(a=this.$getDisplayTokens(e,n.length))[0]=y;for(var r=1;r<a.length;r++)a[r]=v}else a=this.$getDisplayTokens(i[t].substring(s,o),n.length);n=n.concat(a)}.bind(this),o.end.row,i[o.end.row].length+1),a[o.start.row]=this.$computeWrapSplits(n,r,s),l=o.end.row+1):(n=this.$getDisplayTokens(i[l]),a[l]=this.$computeWrapSplits(n,r,s),l++)},e.prototype.$computeWrapSplits=function(e,t,n){if(0==e.length)return[];var o=[],i=e.length,s=0,a=0,r=this.$wrapAsCode,l=this.$indentedSoftWrap,c=t<=Math.max(2*n,8)||!1===l?0:Math.floor(t/2);function d(t){for(var i=t-s,d=s;d<t;d++){var p=e[d];12!==p&&2!==p||(i-=1)}o.length||(u=function(){var t=0;if(0===c)return t;if(l)for(var o=0;o<e.length;o++){var i=e[o];if(i==w)t+=1;else{if(i!=_){if(i==C)continue;break}t+=n}}return r&&!1!==l&&(t+=n),Math.min(t,c)}(),o.indent=u),a+=i,o.push(a),s=t}for(var u=0;i-s>t-u;){var p=s+t-u;if(e[p-1]>=w&&e[p]>=w)d(p);else if(e[p]!=y&&e[p]!=v){for(var h=Math.max(p-(t-(t>>2)),s-1);p>h&&e[p]<y;)p--;if(r){for(;p>h&&e[p]<y;)p--;for(;p>h&&e[p]==k;)p--}else for(;p>h&&e[p]<w;)p--;p>h?d(++p):(e[p=s+t]==x&&p--,d(p-u))}else{for(;p!=s-1&&e[p]!=y;p--);if(p>s){d(p);continue}for(p=s+t;p<e.length&&e[p]==v;p++);if(p==e.length)break;d(p)}}return o},e.prototype.$getDisplayTokens=function(e,t){var n,o=[];t=t||0;for(var i=0;i<e.length;i++){var s=e.charCodeAt(i);if(9==s){n=this.getScreenTabSize(o.length+t),o.push(_);for(var a=1;a<n;a++)o.push(C)}else 32==s?o.push(w):s>39&&s<48||s>57&&s<64?o.push(k):s>=4352&&j(s)?o.push(f,x):o.push(f)}return o},e.prototype.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var o,i;for(null==t&&(t=1/0),n=n||0,i=0;i<e.length&&(9==(o=e.charCodeAt(i))?n+=this.getScreenTabSize(n):o>=4352&&j(o)?n+=2:n+=1,!(n>t));i++);return[n,i]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},e.prototype.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},e.prototype.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},e.prototype.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},e.prototype.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},e.prototype.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},e.prototype.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},e.prototype.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},e.prototype.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},e.prototype.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var o,i,s=0,a=0,r=0,l=0,c=this.$screenRowCache,d=this.$getRowCacheIndex(c,e),u=c.length;if(u&&d>=0){r=c[d],s=this.$docRowCache[d];var p=e>c[u-1]}else p=!u;for(var h=this.getLength()-1,g=this.getNextFoldLine(s),m=g?g.start.row:1/0;r<=e&&!(r+(l=this.getRowLength(s))>e||s>=h);)r+=l,++s>m&&(s=g.end.row+1,m=(g=this.getNextFoldLine(s,g))?g.start.row:1/0),p&&(this.$docRowCache.push(s),this.$screenRowCache.push(r));if(g&&g.start.row<=s)o=this.getFoldDisplayLine(g),s=g.start.row;else{if(r+l<=e||s>h)return{row:h,column:this.getLine(h).length};o=this.getLine(s),g=null}var b=0,f=Math.floor(e-r);if(this.$useWrapMode){var x=this.$wrapData[s];x&&(i=x[f],f>0&&x.length&&(b=x.indent,a=x[f-1]||x[x.length-1],o=o.substring(a)))}return void 0!==n&&this.$bidiHandler.isBidiRow(r+f,s,f)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(o,t-b)[1],this.$useWrapMode&&a>=i&&(a=i-1),g?g.idxToPosition(a):{row:s,column:a}},e.prototype.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var o,i=0,s=null;(o=this.getFoldAt(e,t,1))&&(e=o.start.row,t=o.start.column);var a,r=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),d=l.length;if(d&&c>=0){r=l[c],i=this.$screenRowCache[c];var u=e>l[d-1]}else u=!d;for(var p=this.getNextFoldLine(r),h=p?p.start.row:1/0;r<e;){if(r>=h){if((a=p.end.row+1)>e)break;h=(p=this.getNextFoldLine(a,p))?p.start.row:1/0}else a=r+1;i+=this.getRowLength(r),r=a,u&&(this.$docRowCache.push(r),this.$screenRowCache.push(i))}var g="";p&&r>=h?(g=this.getFoldDisplayLine(p,e,t),s=p.start.row):(g=this.getLine(e).substring(0,t),s=e);var m=0;if(this.$useWrapMode){var b=this.$wrapData[s];if(b){for(var f=0;g.length>=b[f];)i++,f++;g=g.substring(b[f-1]||0,g.length),m=f>0?b.indent:0}}return this.lineWidgets&&this.lineWidgets[r]&&this.lineWidgets[r].rowsAbove&&(i+=this.lineWidgets[r].rowsAbove),{row:i,column:m+this.$getStringScreenWidth(g)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,o=0,i=(r=0,(t=this.$foldData[r++])?t.start.row:1/0);o<n;){var s=this.$wrapData[o];e+=s?s.length+1:1,++o>i&&(o=t.end.row+1,i=(t=this.$foldData[r++])?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,r=0;r<a.length;r++)e-=(t=a[r]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},e.prototype.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,o){if(0===n)return[0,0];var i,s;for(n||(n=1/0),o=o||0,s=0;s<t.length&&!((o+="\t"===(i=t.charAt(s))?this.getScreenTabSize(o):e.getCharacterWidth(i))>n);s++);return[o,s]})},e.prototype.getPrecedingCharacter=function(){var e=this.selection.getCursor();return 0===e.column?0===e.row?"":this.doc.getNewLineCharacter():this.getLine(e.row)[e.column-1]},e.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},e}();b.$uid=0,b.prototype.$modes=a.$modes, |
| 150 |
b.prototype.getValue=b.prototype.toString,b.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},b.prototype.$overwrite=!1,b.prototype.$mode=null,b.prototype.$modeId=null,b.prototype.$scrollTop=0,b.prototype.$scrollLeft=0,b.prototype.$wrapLimit=80,b.prototype.$useWrapMode=!1,b.prototype.$wrapLimitRange={min:null,max:null},b.prototype.lineWidgets=null,b.prototype.isFullWidth=j,o.implement(b.prototype,r);var f=1,x=2,y=3,v=4,k=9,w=10,_=11,C=12;function j(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}e("./edit_session/folding").Folding.call(b.prototype),e("./edit_session/bracket_match").BracketMatch.call(b.prototype),a.defineOptions(b.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=b})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var o=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,a=function(){function e(){this.$options={}}return e.prototype.set=function(e){return i.mixin(this.$options,e),this},e.prototype.getOptions=function(){return o.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var o=null;return n.forEach((function(e,n,i,a){return o=new s(e,n,i,a),!(n==a&&t.start&&t.start.start&&0!=t.skipCurrent&&o.isEqual(t.start)&&(o=null,1))})),o},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),a=[],r=t.re;if(t.$isMultiLine){var l,c=r.length,d=i.length-c;e:for(var u=r.offset||0;u<=d;u++){for(var p=0;p<c;p++)if(-1==i[u+p].search(r[p]))continue e;var h=i[u],g=i[u+c-1],m=h.length-h.match(r[0])[0].length,b=g.match(r[c-1])[0].length;l&&l.end.row===u&&l.end.column>m||(a.push(l=new s(u,m,u+c-1,b)),c>2&&(u=u+c-2))}}else for(var f,x=0;x<i.length;x++)if(this.$isMultilineSearch(t)){var y=i.length-1;if(f=this.$multiLineForward(e,r,x,y)){var v=f.endRow<=y?f.endRow-1:y;v>x&&(x=v),a.push(new s(f.startRow,f.startCol,f.endRow,f.endCol))}}else for(f=o.getMatchOffsets(i[x],r),p=0;p<f.length;p++){var k=f[p];a.push(new s(x,k.offset,x,k.offset+k.length))}if(n){var w=n.start.column,_=n.end.column;for(x=0,p=a.length-1;x<p&&a[x].start.column<w&&0==a[x].start.row;)x++;for(var C=n.end.row-n.start.row;x<p&&a[p].end.column>_&&a[p].end.row==C;)p--;for(a=a.slice(x,p+1),x=0,p=a.length;x<p;x++)a[x].start.row+=n.start.row,a[x].end.row+=n.start.row}return a},e.prototype.parseReplaceString=function(e){for(var t="",n=0,o=e.length;n<o;n++){var i=e.charCodeAt(n);if(92!==i){if(36===i){if(++n>=o){t+="$";break}var s=e.charCodeAt(n);if(36===s){t+="$$";continue}if(48===s||38===s){t+="$&";continue}if(49<=s&&s<=57){t+="$"+e[n];continue}}t+=e[n]}else{if(++n>=o){t+="\\";break}switch(e.charCodeAt(n)){case 92:t+="\\";break;case 110:t+="\n";break;case 116:t+="\t"}}}return t||e},e.prototype.replace=function(e,t){var n=this.$options,o=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(o){var i=this.$isMultilineSearch(n);i&&(e=e.replace(/\r\n|\r|\n/g,"\n"));var s=o.exec(e);if(!s||!i&&s[0].length!=e.length)return null;if(t=n.regExp?this.parseReplaceString(t):t.replace(/\$/g,"$$$$"),t=e.replace(o,t),n.preserveCase){t=t.split("");for(var a=Math.min(e.length,e.length);a--;){var r=e[a];r&&r.toLowerCase()!=r?t[a]=t[a].toUpperCase():t[a]=t[a].toLowerCase()}t=t.join("")}return t}},e.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=o.escapeRegExp(n));var i=e.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),e.$supportsUnicodeFlag=!0,i+="u"}catch(t){e.$supportsUnicodeFlag=!1}if(e.wholeWord&&(n=function(e,t){var n=o.supportsLookbehind();function i(e,o){return void 0===o&&(o=!0),(n&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(e)||t.regExp?n&&t.$supportsUnicodeFlag?o?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var s=Array.from(e),a=s[0],r=s[s.length-1];return i(a)+e+i(r,!1)}(n,e)),e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var s=new RegExp(n,i)}catch(e){s=!1}return e.re=s},e.prototype.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),o=[],i=0;i<n.length;i++)try{o.push(new RegExp(n[i],t))}catch(e){return!1}return o},e.prototype.$isMultilineSearch=function(e){return e.re&&/\\r\\n|\\r|\\n/.test(e.re.source)&&e.regExp&&!e.$isMultiLine},e.prototype.$multiLineForward=function(e,t,n,o){for(var i,s=l(e,n),a=n;a<=o;){for(var r=0;r<s&&!(a>o);r++){var c=e.getLine(a++);i=null==i?c:i+"\n"+c}var d=t.exec(i);if(t.lastIndex=0,d){var u=i.slice(0,d.index).split("\n"),p=d[0].split("\n"),h=n+u.length-1,g=u[u.length-1].length;return{startRow:h,startCol:g,endRow:h+p.length-1,endCol:1==p.length?g+p[0].length:p[p.length-1].length}}}return null},e.prototype.$multiLineBackward=function(e,t,n,o,i){for(var s,a=l(e,o),c=e.getLine(o).length-n,d=o;d>=i;){for(var u=0;u<a&&d>=i;u++){var p=e.getLine(d--);s=null==s?p:p+"\n"+s}var h=r(s,t,c);if(h){var g=s.slice(0,h.index).split("\n"),m=h[0].split("\n"),b=d+g.length,f=g[g.length-1].length;return{startRow:b,startCol:f,endRow:b+m.length-1,endCol:1==m.length?f+m[0].length:m[m.length-1].length}}}return null},e.prototype.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=this.$isMultilineSearch(t),s=this.$multiLineForward,a=this.$multiLineBackward,r=1==t.backwards,l=0!=t.skipCurrent,c=n.unicode,d=t.range,u=t.start;u||(u=d?d[r?"end":"start"]:e.selection.getRange()),u.start&&(u=u[l!=r?"end":"start"]);var p=d?d.start.row:0,h=d?d.end.row:e.getLength()-1 |
| 151 |
;if(r)var g=function(e){var n=u.row;if(!b(n,u.column,e)){for(n--;n>=p;n--)if(b(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=h,p=u.row;n>=p;n--)if(b(n,Number.MAX_VALUE,e))return}};else g=function(e){var n=u.row;if(!b(n,u.column,e)){for(n+=1;n<=h;n++)if(b(n,0,e))return;if(0!=t.wrap)for(n=p,h=u.row;n<=h;n++)if(b(n,0,e))return}};if(t.$isMultiLine)var m=n.length,b=function(t,o,i){var s=r?t-m+1:t;if(!(s<0||s+m>e.getLength())){var a=e.getLine(s),l=a.search(n[0]);if(!(!r&&l<o||-1===l)){for(var c=1;c<m;c++)if(-1==(a=e.getLine(s+c)).search(n[c]))return;var d=a.match(n[m-1])[0].length;if(!(r&&d>o))return!!i(s,l,s+m-1,d)||void 0}}};else b=r?function(t,s,r){if(i){var l=a(e,n,s,t,p);if(!l)return!1;if(r(l.startRow,l.startCol,l.endRow,l.endCol))return!0}else{var d,u=e.getLine(t),h=[],g=0;for(n.lastIndex=0;d=n.exec(u);){var m=d[0].length;if(g=d.index,!m){if(g>=u.length)break;n.lastIndex=g+=o.skipEmptyMatch(u,g,c)}if(d.index+m>s)break;h.push(d.index,m)}for(var b=h.length-1;b>=0;b-=2){var f=h[b-1];if(r(t,f,t,f+(m=h[b])))return!0}}}:function(t,a,r){if(n.lastIndex=a,i){var l=s(e,n,t,h);if(l){var d=l.endRow<=h?l.endRow-1:h;d>t&&(t=d)}if(!l)return!1;if(r(l.startRow,l.startCol,l.endRow,l.endCol))return!0}else for(var u,p,g=e.getLine(t);p=n.exec(g);){var m=p[0].length;if(r(t,u=p.index,t,u+m))return!0;if(!m&&(n.lastIndex=u+=o.skipEmptyMatch(g,u,c),u>=g.length))return!1}};return{forEach:g}},e}();function r(e,t,n){for(var o=null,i=0;i<=e.length;){t.lastIndex=i;var s=t.exec(e);if(!s)break;var a=s.index+s[0].length;if(a>e.length-n)break;(!o||a>o.index+o[0].length)&&(o=s),i=s.index+1}return o}function l(e,t){var n={row:t,column:0},o=e.doc.positionToIndex(n)+5e3;return e.doc.indexToPosition(o).row+1}t.Search=a})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=e("../lib/keys"),a=e("../lib/useragent"),r=s.KEY_MODS,l=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,n){this.platform=t||(a.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=n},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var o=this.commandKeyBinding;for(var i in o){var s=o[i];if(s==e)delete o[i];else if(Array.isArray(s)){var a=s.indexOf(e);-1!=a&&(s.splice(a,1),1==s.length&&(o[i]=s[0]))}}},e.prototype.bindKey=function(e,t,n){if("object"==typeof e&&e&&(null==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var o="";if(-1!=e.indexOf(" ")){var i=e.split(/\s+/);e=i.pop(),i.forEach((function(e){var t=this.parseKeys(e),n=r[t.hashId]+t.key;o+=(o?" ":"")+n,this._addCommandToBinding(o,"chainKeys")}),this),o+=" "}var s=this.parseKeys(e),a=r[s.hashId]+s.key;this._addCommandToBinding(o+a,t,n)}),this)},e.prototype._addCommandToBinding=function(e,t,n){var o,i=this.commandKeyBinding;if(t)if(!i[e]||this.$singleCommand)i[e]=t;else{Array.isArray(i[e])?-1!=(o=i[e].indexOf(t))&&i[e].splice(o,1):i[e]=[i[e]],"number"!=typeof n&&(n=c(t));var s=i[e];for(o=0;o<s.length&&!(c(s[o])>n);o++);s.splice(o,0,t)}else delete i[e]},e.prototype.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},e.prototype.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),o=s[n];if(s.FUNCTION_KEYS[o])n=s.FUNCTION_KEYS[o].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var i=0,a=t.length;a--;){var r=s.KEY_MODS[t[a]];if(null==r)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;i|=r}return{key:n,hashId:i}},e.prototype.findKeyCommand=function(e,t){var n=r[e]+t;return this.commandKeyBinding[n]},e.prototype.handleKeyboard=function(e,t,n,o){if(!(o<0)){var i=r[t]+n,s=this.commandKeyBinding[i];return e.$keyChain&&(e.$keyChain+=" "+i,s=this.commandKeyBinding[e.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||o>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-i.length-1)),{command:s}):(e.$keyChain=e.$keyChain||i,{command:"null"})}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}();function c(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var d=function(e){function t(t,n){var o=e.call(this,t,n)||this;return o.$singleCommand=!0,o}return i(t,e),t}(l);d.call=function(e,t,n){l.prototype.$init.call(e,t,n,!0)},l.call=function(e,t,n){l.prototype.$init.call(e,t,n,!1)},t.HashHandler=d,t.MultiHashHandler=l})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=e("../lib/oop"),a=e("../keyboard/hash_handler").MultiHashHandler,r=e("../lib/event_emitter").EventEmitter,l=function(e){function t(t,n){var o=e.call(this,n,t)||this;return o.byName=o.commands,o.setDefaultHandler("exec",(function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)})),o}return i(t,e),t.prototype.exec=function(e,t,n){if(Array.isArray(e)){for(var o=e.length;o--;)if(this.exec(e[o],t,n))return!0;return!1}"string"==typeof e&&(e=this.commands[e]);var i={editor:t,command:e,args:n};return this.canExecute(e,t)?(i.returnValue=this._emit("exec",i),this._signal("afterExec",i),!1!==i.returnValue):(this._signal("commandUnavailable",i),!1)},t.prototype.canExecute=function(e,t){return"string"==typeof e&&(e=this.commands[e]),!(!e||t&&t.$readOnly&&!e.readOnly||0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))},t.prototype.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{ |
| 152 |
this.$inReplay=!1}}},t.prototype.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))},t}(a);s.implement(l.prototype,r),t.CommandManager=l})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var o=e("../lib/lang"),i=e("../config"),s=e("../range").Range;function a(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(e){i.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(e){i.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(e){ |
| 153 |
e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()}, |
| 154 |
multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(o.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(n.row).length,r=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=i.row+1;c++){var d=o.stringTrimLeft(o.stringTrimRight(e.session.doc.getLine(c)));0!==d.length&&(d=" "+d),l+=d}i.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new s(n.row,0,i.row+2,0),l),r>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+r)):(a=e.session.doc.getLine(n.row).length>a?a+1:a,e.selection.moveCursorTo(n.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,o=e.selection.rangeList.ranges,i=[];o.length<1&&(o=[e.selection.getRange()]);for(var a=0;a<o.length;a++)a==o.length-1&&(o[a].end.row===t&&o[a].end.column===n||i.push(new s(o[a].end.row,o[a].end.column,t,n))),0===a?0===o[a].start.row&&0===o[a].start.column||i.push(new s(0,0,o[a].start.row,o[a].start.column)):i.push(new s(o[a-1].end.row,o[a-1].end.column,o[a].start.row,o[a].start.column));for(e.exitMultiSelectMode(),e.clearSelection(),a=0;a<i.length;a++)e.selection.addRange(i[a],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(e){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),e.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var r=1;r<9;r++)t.commands.push({name:"foldToLevel"+r,description:"Fold To Level "+r,level:r,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})})),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],(function(e,t,n){"use strict";var o=e("../lib/keys"),i=function(){function e(e){this.editor=e,this.gutterLayer=e.renderer.$gutterLayer,this.element=e.renderer.$gutter,this.lines=e.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return e.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},e.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},e.prototype.$onGutterKeyDown=function(e){if(this.annotationTooltip.isOpen)return e.preventDefault(),void(e.keyCode===o.escape&&this.annotationTooltip.hide());if(e.target===this.element){if(e.keyCode!=o.enter)return;e.preventDefault();var t=this.editor.getCursorPosition().row;return this.editor.isRowVisible(t)||this.editor.scrollToLine(t,!0,!0),void setTimeout(function(){var e=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldLaneWidget(e),n=this.$findNearestAnnotation(e);if(null!==t||null!==n)return this.$findClosestNumber(t,n,e)===t?(this.activeLane="fold",this.activeRowIndex=t,this.$isCustomWidgetVisible(t)?void this.$focusCustomWidget(this.activeRowIndex):void this.$focusFoldWidget(this.activeRowIndex)):(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex))}.bind(this),10)}this.$handleGutterKeyboardInteraction(e),setTimeout(function(){this.editor._signal("gutterkeydown",new s(e,this))}.bind(this),10)},e.prototype.$handleGutterKeyboardInteraction=function(e){if(e.keyCode!==o.tab){if(e.keyCode===o.escape)return e.preventDefault(),this.$blurGutter(),this.element.focus(),void(this.lane=null);if(e.keyCode!==o.up)if(e.keyCode!==o.down){if(e.keyCode===o.left)return e.preventDefault(),void this.$switchLane("annotation");if(e.keyCode===o.right)return e.preventDefault(),void this.$switchLane("fold");if(e.keyCode!==o.enter&&e.keyCode!==o.space);else switch(e.preventDefault(),this.activeLane){case"fold":var t=this.$rowIndexToRow(this.activeRowIndex),n=this.editor.session.$gutterCustomWidgets[t];if(n)n.callbacks&&n.callbacks.onClick&&n.callbacks.onClick(e,t);else{if("start"===this.gutterLayer.session.foldWidgets[t]){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),e),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==t&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(t),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}if("end"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)])break}return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0}}else switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown()}else switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp()}}else e.preventDefault()},e.prototype.$blurGutter=function(){if(null!==this.activeRowIndex)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex)}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()}, |
| 155 |
e.prototype.$isFoldWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n="none"!==this.$getFoldWidget(e).style.display;return t&&n},e.prototype.$isCustomWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n=!!this.$getCustomWidget(e);return t&&n},e.prototype.$isAnnotationVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n="none"!==this.$getAnnotation(e).style.display;return t&&n},e.prototype.$getFoldWidget=function(e){return this.lines.get(e).element.childNodes[1]},e.prototype.$getCustomWidget=function(e){return this.lines.get(e).element.childNodes[3]},e.prototype.$getAnnotation=function(e){return this.lines.get(e).element.childNodes[2]},e.prototype.$findNearestFoldLaneWidget=function(e){if(this.$isCustomWidgetVisible(e))return e;if(this.$isFoldWidgetVisible(e))return e;for(var t=0;e-t>0||e+t<this.lines.getLength()-1;){if(e-++t>=0&&this.$isCustomWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(e+t))return e+t;if(e-t>=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;e-t>0||e+t<this.lines.getLength()-1;){if(e-++t>=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},e.prototype.$focusFoldWidget=function(e){if(null!=e){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$focusCustomWidget=function(e){if(null!=e){var t=this.$getCustomWidget(e);t&&(t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus())}},e.prototype.$focusAnnotation=function(e){if(null!=e){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurCustomWidget=function(e){var t=this.$getCustomWidget(e);t&&(t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur())},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isFoldWidgetVisible(e)||this.$isCustomWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=e,void(this.$isFoldWidgetVisible(e)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex))},e.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(e++,this.$isFoldWidgetVisible(e)||this.$isCustomWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=e,void(this.$isFoldWidgetVisible(e)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex))},e.prototype.$moveAnnotationUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(e++,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$findClosestNumber=function(e,t,n){return null===e?t:null===t||Math.abs(n-e)<=Math.abs(n-t)?e:t},e.prototype.$switchLane=function(e){switch(e){case"annotation":if("annotation"===this.activeLane)break;var t=this.$findNearestAnnotation(this.activeRowIndex);if(null==t)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if("fold"===this.activeLane)break;var n=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(null===n)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$isCustomWidgetVisible(n)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex)}},e.prototype.$rowIndexToRow=function(e){var t=this.lines.get(e);return t?t.row:null},e.prototype.$rowToRowIndex=function(e){for(var t=0;t<this.lines.getLength();t++)if(this.lines.get(t).row==e)return t;return null},e}();t.GutterKeyboardHandler=i;var s=function(){function e(e,t){this.gutterKeyboardHandler=t,this.domEvent=e}return e.prototype.getKey=function(){return o.keyCodeToString(this.domEvent.keyCode)},e.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},e.prototype.isInAnnotationLane=function(){return"annotation"===this.gutterKeyboardHandler.activeLane},e.prototype.isInFoldLane=function(){return"fold"===this.gutterKeyboardHandler.activeLane},e}();t.GutterKeyboardEvent=s})),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=e("./lib/oop"),s=e("./lib/dom"),a=e("./lib/lang"),r=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,d=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,p=e("./edit_session").EditSession,h=e("./search").Search,g=e("./range").Range,m=e("./lib/event_emitter").EventEmitter,b=e("./commands/command_manager").CommandManager,f=e("./commands/default_commands").commands,x=e("./config"),y=e("./token_iterator").TokenIterator,v=e("./keyboard/gutter_handler").GutterKeyboardHandler,k=e("./config").nls,w=e("./clipboard"),_=e("./lib/keys"),C=e("./lib/event"),j=e("./tooltip").HoverTooltip,$=function(){function e(t,n,o){this.id="editor"+ ++e.$uid,this.session,this.$toDestroy=[];var i=t.getContainerElement();this.container=i,this.renderer=t,this.commands=new b(r.isMac?"mac":"win",f),"object"==typeof document&&(this.textInput=new l(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new d(this)),this.keyBinding=new u(this),this.$search=(new h).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(n||o&&o.session||new p("")),x.resetOptions(this),o&&this.setOptions(o),x._signal("editor",this)}return e.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},e.prototype.startOperation=function(e){this.session.startOperation(e)},e.prototype.endOperation=function(e){this.session.endOperation(e)}, |
| 156 |
e.prototype.onStartOperation=function(e){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,e||(this.previousCommand=null)},e.prototype.onEndOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue)return void(this.curOp=null);if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var o=this.selection.getRange(),i=this.renderer.layerConfig;(o.start.row>=i.lastRow||o.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,o=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var i=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),o=o&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else o=o&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(o=!1),o?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},e.prototype.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;x.loadModule(["keybinding",e],(function(o){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(o&&o.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),t&&(t.$editor=null),e&&e._signal("changeEditor",{editor:this}),e&&(e.$editor=this),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e,t){this.renderer.setStyle(e,t)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption("fontSize")||s.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption("fontSize",e)},e.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=e.getCursorPosition(),o=e.getKeyboardHandler(),i=o&&o.$getDirectionForHighlight&&o.$getDirectionForHighlight(e),s=t.getMatchingBracketRanges(n,i);if(!s){var a=new y(t,n.row,n.column).getCurrentToken();if(a&&/\b(?:tag-open|tag-name)/.test(a.type)){var r=t.getMatchingTags(n);r&&(s=[r.openTagName.isEmpty()?r.openTag:r.openTagName,r.closeTagName.isEmpty()?r.closeTag:r.closeTagName])}}if(!s&&t.$mode.getMatching&&(s=t.$mode.getMatching(e.session)),s){var l="ace_bracket";Array.isArray(s)?1==s.length&&(l="ace_error_bracket"):s=[s],2==s.length&&(0==g.comparePoints(s[0].end,s[1].start)?s=[g.fromPoints(s[0].start,s[1].end)]:0==g.comparePoints(s[0].start,s[1].end)&&(s=[g.fromPoints(s[1].start,s[0].end)])),t.$bracketHighlight={ranges:s,markerIds:s.map((function(e){return t.addMarker(e,l,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()}, |
| 157 |
e.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},e.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},e.prototype.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new g(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},e.prototype.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),o=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",o)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,o=t.end.column,i=e.getLine(t.start.row),s=i.substring(n,o);if(!(s.length>5e3)&&/[\w\d]/.test(s)){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s}),r=i.substring(n-1,o+1);if(a.test(r))return a}}},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var o=this.selection.getAllRanges(),i=0;i<o.length;i++){var s=o[i];i&&o[i-1].start.row==s.start.row||(e+=this.session.getLine(s.start.row)+t)}}var a={text:e};return this._signal("copy",a),w.lineMode=!!n&&a.text,a.text},e.prototype.onCopy=function(){this.commands.exec("copy",this)},e.prototype.onCut=function(){this.commands.exec("cut",this)},e.prototype.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},e.prototype.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text,n=t===w.lineMode,o=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?o.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(n)this.selection.rangeList.ranges.forEach((function(e){o.insert({row:e.start.row,column:0},t)}));else{var i=t.split(/\r\n|\r|\n/),s=this.selection.rangeList.ranges,a=!(2!=i.length||i[0]&&i[1]);if(i.length!=s.length||a)return this.commands.exec("insertstring",this,t);for(var r=s.length;r--;){var l=s[r];l.isEmpty()||o.remove(l),o.insert(l.start,i[r])}}},e.prototype.execCommand=function(e,t){return this.commands.exec(e,this,t)},e.prototype.insert=function(e,t){var n=this.session,o=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var s=o.transformAction(n.getState(i.row),"insertion",this,n,e);s&&(e!==s.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=s.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty())this.session.getOverwrite()&&-1==e.indexOf("\n")&&((a=g.fromPoints(i,i)).end.column+=e.length,this.session.remove(a));else{var a=this.getSelectionRange();i=this.session.remove(a),this.clearSelection()}if("\n"==e||"\r\n"==e){var r=n.getLine(i.row);if(i.column>r.search(/\S|$/)){var l=r.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+l)}}this.clearSelection();var c=i.column,d=n.getState(i.row),u=(r=n.getLine(i.row),o.checkOutdent(d,r,e));if(n.insert(i,e),s&&s.selection&&(2==s.selection.length?this.selection.setSelectionRange(new g(i.row,c+s.selection[0],i.row,c+s.selection[1])):this.selection.setSelectionRange(new g(i.row+s.selection[0],s.selection[1],i.row+s.selection[2],s.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var p=o.getNextLineIndent(d,r.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},p)}u&&o.autoOutdent(d,n,i.row)}},e.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),n=this.selection.isEmpty()?[new g(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),o="",i="",s="",a=e.getTabString(),r=0;r<n.length;r++)for(var l=n[r].start.row,c=n[r].end.row,d=l;d<=c;d++){d>0&&(o=e.getState(d-1),i=e.getLine(d-1),s=t.getNextLineIndent(o,i,a));var u=e.getLine(d),p=t.$getIndent(u);if(s!==p){if(p.length>0){var h=new g(d,0,d,p.length);e.remove(h)}s.length>0&&e.insert({row:d,column:0},s)}t.autoOutdent(o,e,d)}},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},e.prototype.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},e.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},e.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},e.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},e.prototype.getDragDelay=function(){return this.getOption("dragDelay")},e.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},e.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")}, |
| 158 |
e.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},e.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},e.prototype.getReadOnly=function(){return this.getOption("readOnly")},e.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},e.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},e.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},e.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,o=n.getState(t.start.row),i=n.getMode().transformAction(o,"deletion",this,n,t);if(0===t.end.column){var s=n.getTextRange(t);if("\n"==s[s.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,o,i=this.session.getLine(e.row);t<i.length?(n=i.charAt(t)+i.charAt(t-1),o=new g(e.row,t-1,e.row,t+1)):(n=i.charAt(t-1)+i.charAt(t-2),o=new g(e.row,t-2,e.row,t)),this.session.replace(o,n),this.session.selection.moveToPosition(o.end)}}},e.prototype.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},e.prototype.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},e.prototype.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n))return d=this.$getSelectedRows(),void e.indentRows(d.first,d.last,"\t")}var o=e.getLine(t.start.row),i=t.start,s=e.getTabSize(),r=e.documentToScreenColumn(i.row,i.column);if(this.session.getUseSoftTabs())var l=s-r%s,c=a.stringRepeat(" ",l);else{for(l=r%s;" "==o[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var d=this.$getSelectedRows();e.indentRows(d.first,d.last,"\t")},e.prototype.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},e.prototype.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},e.prototype.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],o=e.first;o<=e.last;o++)n.push(t.getLine(o));n.sort((function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0}));var i=new g(0,0,0,0);for(o=e.first;o<=e.last;o++){var s=t.getLine(o);i.start.row=o,i.end.row=o,i.end.column=s.length,t.replace(i,n[o-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},e.prototype.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var o=this.session.getLine(e);n.lastIndex<t;){var i=n.exec(o);if(i.index<=t&&i.index+i[0].length>=t)return{value:i[0],start:i.index,end:i.index+i[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,o=new g(t,n-1,t,n),i=this.session.getTextRange(o);if(!isNaN(parseFloat(i))&&isFinite(i)){var s=this.getNumberAt(t,n);if(s){var a=s.value.indexOf(".")>=0?s.start+s.value.indexOf(".")+1:s.end,r=s.start+s.value.length-a,l=parseFloat(s.value);l*=Math.pow(10,r),a!==s.end&&n<a?e*=Math.pow(10,s.end-n-1):e*=Math.pow(10,s.end-n),l+=e;var c=(l/=Math.pow(10,r)).toFixed(r),d=new g(t,s.start,t,s.end);this.session.replace(d,c),this.moveCursorTo(t,Math.max(s.start+1,n+c.length-s.value.length))}}else this.toggleWord()},e.prototype.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),o=this.selection.getWordRange().start.column,i=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),s=t-o-1;s<0&&(s=0);var r=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&i.forEach((function(t,i){l=r+t.length,s>=r&&s<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,r+o),c.selection.selectTo(e,l+o)),r=l}));for(var d,u=this.$toggleWordPairs,p=0;p<u.length;p++)for(var h=u[p],g=0;g<=1;g++){ |
| 159 |
var m=+!g,b=n.match(new RegExp("^\\s?_?("+a.escapeRegExp(h[g])+")\\s?$","i"));b&&n.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(b[1])+")($|\\s)","g"))&&(d=n.replace(new RegExp(a.escapeRegExp(h[g]),"i"),(function(e){var t=h[m];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+h[m].charAt(0).toUpperCase()+t.substr(1)),t})),this.insert(d),d="")}},e.prototype.findLinkAt=function(e,t){var n,i,s=this.session.getLine(e).split(/((?:https?|ftp):\/\/[\S]+)/),a=t;a<0&&(a=0);var r,l=0,c=0;try{for(var d=o(s),u=d.next();!u.done;u=d.next()){var p=u.value;if(c=l+p.length,a>=l&&a<=c&&p.match(/((?:https?|ftp):\/\/[\S]+)/)){r=p.replace(/[\s:.,'";}\]]+$/,"");break}l=c}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return r},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),o=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var s=o?n.start:n.end,a=t.insert(s,t.getTextRange(n));n.start=s,n.end=a,e.setSelectionRange(n,o)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var n,o,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var s=i.toOrientedRange();n=this.$getSelectedRows(s),o=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(o=0),s.moveBy(o,0),i.fromOrientedRange(s)}else{var a=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var r=0,l=0,c=a.length,d=0;d<c;d++){var u=d;a[d].moveBy(r,0);for(var p=(n=this.$getSelectedRows(a[d])).first,h=n.last;++d<c;){l&&a[d].moveBy(l,0);var g=this.$getSelectedRows(a[d]);if(t&&g.first!=h)break;if(!t&&g.first>h+1)break;h=g.last}for(d--,r=this.session.$moveLines(p,h,t?0:e),t&&-1==e&&(u=d+1);u<=d;)a[u].moveBy(r,0),u++;t||(r=0),l+=r}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var n=this.renderer,o=this.renderer.layerConfig,i=e*Math.floor(o.height/o.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(i,0)})):!1===t&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection());var s=n.scrollTop;n.scrollBy(0,i*o.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(s)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,n,o){this.renderer.scrollToLine(e,t,n,o)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),o=new y(this.session,n.row,n.column),i=o.getCurrentToken(),s=0;i&&-1!==i.type.indexOf("tag-name")&&(i=o.stepBackward());var a=i||o.stepForward();if(a){var r,l,c=!1,d={},u=n.column-a.start,p={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(a.value.match(/[{}()\[\]]/g)){for(;u<a.value.length&&!c;u++)if(p[a.value[u]])switch(l=p[a.value[u]]+"."+a.type.replace("rparen","lparen"),isNaN(d[l])&&(d[l]=0),a.value[u]){case"(":case"[":case"{":d[l]++;break;case")":case"]":case"}":d[l]--,-1===d[l]&&(r="bracket",c=!0)}}else-1!==a.type.indexOf("tag-name")&&(isNaN(d[a.value])&&(d[a.value]=0),"<"===i.value&&s>1?d[a.value]++:"</"===i.value&&d[a.value]--,-1===d[a.value]&&(r="tag",c=!0));c||(i=a,s++,a=o.stepForward(),u=0)}while(a&&!c);if(r){var h,m;if("bracket"===r)(h=this.session.getBracketRange(n))||(m=(h=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn()+u-1,o.getCurrentTokenRow(),o.getCurrentTokenColumn()+u-1)).start,(t||m.row===n.row&&Math.abs(m.column-n.column)<2)&&(h=this.session.getBracketRange(m)));else if("tag"===r){if(!a||-1===a.type.indexOf("tag-name"))return;if(0===(h=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn()-2,o.getCurrentTokenRow(),o.getCurrentTokenColumn()-2)).compare(n.row,n.column)){var b=this.session.getMatchingTags(n);b&&(b.openTag.contains(n.row,n.column)?m=(h=b.closeTag).start:(h=b.openTag,m=b.closeTag.start.row===n.row&&b.closeTag.start.column===n.column?h.end:h.start))}m=m||h.start}(m=h&&h.cursor||m)&&(e?h&&t?this.selection.setRange(h):h&&h.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(m.row,m.column):this.selection.moveTo(m.row,m.column))}}},e.prototype.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},e.prototype.navigateTo=function(e,t){this.selection.moveTo(e,t)},e.prototype.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},e.prototype.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},e.prototype.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end |
| 160 |
;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},e.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},e.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},e.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},e.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},e.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},e.prototype.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),o=0;return n?(this.$tryReplace(n,e)&&(o=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),o):o},e.prototype.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),o=0;if(!n.length)return o;var i=this.getSelectionRange();this.selection.moveTo(0,0);for(var s=n.length-1;s>=0;--s)this.$tryReplace(n[s],e)&&o++;return this.selection.setSelectionRange(i),o},e.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&i.mixin(t,e);var o=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(o)||this.$search.$options.needle)||(o=this.session.getWordRange(o.start.row,o.start.column),e=this.session.getTextRange(o)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:o});var s=this.$search.find(this.session);return t.preventScroll?s:s?(this.revealRange(s,n),s):(t.backwards?o.start=o.end:o.end=o.start,void this.selection.setRange(o))},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,o=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var s=this.on("changeSelection",(function(){o=!0})),a=this.renderer.on("beforeRender",(function(){o&&(t=n.renderer.container.getBoundingClientRect())})),r=this.renderer.on("afterRender",(function(){if(o&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,s=e.$cursorLayer.$pixelPos,a=e.layerConfig,r=s.top-a.offset;null!=(o=s.top>=0&&r+t.top<0||!(s.top<a.height&&s.top+t.top+a.lineHeight>window.innerHeight)&&null)&&(i.style.top=r+"px",i.style.left=s.left+"px",i.style.height=a.lineHeight+"px",i.scrollIntoView(o)),o=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",s),this.renderer.off("afterRender",r),this.renderer.off("beforeRender",a))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,s.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},e.prototype.prompt=function(e,t,n){var o=this;x.loadModule("ace/ext/prompt",(function(i){i.prompt(o,e,t,n)}))},Object.defineProperty(e.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new j(this.container))},set:function(e){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=e},enumerable:!1,configurable:!0}),e}();$.$uid=0,$.prototype.curOp=null,$.prototype.prevOp={},$.prototype.$mergeableCommands=["backspace","del","insertstring"],$.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],i.implement($.prototype,m),x.defineOptions($.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){var t=this;if(this.textInput.setReadOnly(e),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(e){var n=!1;if(e&&"keydown"==e.type){if(e&&e.key&&!e.ctrlKey&&!e.metaKey&&(" "==e.key&&e.preventDefault(),n=1==e.key.length),!n)return}else e&&"exec"!==e.type&&(n=!0);if(n){var o=s.createElement("div");o.textContent=k("editor.tooltip.disable-editing","Editing is disabled"),t.hoverTooltip.isOpen||t.hoverTooltip.showForRange(t,t.getSelectionRange(),o)}else t.hoverTooltip&&t.hoverTooltip.isOpen&&t.hoverTooltip.hide()});var n=this.textInput.getElement();e?(C.addListener(n,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(C.removeListener(n,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?S.attach(this):S.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?S.attach(this):S.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),s.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(), |
| 161 |
this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),s.addCssClass(this.container,"ace_hasPlaceholder");var t=s.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t,n={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},o=function(e){if(e.target==this.renderer.scroller&&e.keyCode===_.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}};e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(r.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",k("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",k("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",o.bind(this)),this.commands.addCommand(n),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",k("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",k("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),t||(t=new v(this)),t.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",o.bind(this)),this.commands.removeCommand(n),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),t&&t.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:""},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var S={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=$})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var o=e("../lib/dom"),i=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){o.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,n){var o=t.firstRowScreen*t.lineHeight,i=Math.floor(o/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-i*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=o.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},e.prototype.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=o.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},e.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},e.prototype.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},e.prototype.createCell=function(e,t,n,i){var s=this.cellCache.pop();if(!s){var a=o.createElement("div");i&&i(a),this.element.appendChild(a),s={element:a,text:"",row:e}}return s.row=e,s},e}();t.Lines=i})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],(function(e,t,n){"use strict";var o=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/lang"),a=e("../lib/event_emitter").EventEmitter,r=e("./lines").Lines,l=e("../config").nls,c=function(){function e(e){this.$showCursorMarker=null,this.element=o.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new r(this.element), |
| 162 |
this.$lines.$offsetCoefficient=1}return e.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},e.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},e.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],o=n.row,i=this.$annotations[o];i||(i=this.$annotations[o]={text:[],type:[],displayText:[]});var a=n.text,r=n.text,l=n.type;a=a?s.escapeHTML(a):n.html||"",r=r||n.html||"",-1===i.text.indexOf(a)&&(i.text.push(a),i.type.push(l),i.displayText.push(r));var c=n.className;c?i.className=c:"error"===l?i.className=" ace_error":"security"!==l||/\bace_error\b/.test(i.className)?"warning"!==l||/\bace_(error|security)\b/.test(i.className)?"info"!==l||i.className?"hint"!==l||i.className||(i.className=" ace_hint"):i.className=" ace_info":i.className=" ace_warning":i.className=" ace_security"}},e.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var o=new Array(n+1);o.unshift(t,1),this.$annotations.splice.apply(this.$annotations,o)}}},e.prototype.update=function(e){this.config=e;var t=this.session,n=e.firstRow,o=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=o,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var i=t.getNextFoldLine(n),s=i?i.start.row:1/0,a=null,r=-1,l=n;;){if(l>s&&(l=i.end.row+1,s=(i=t.getNextFoldLine(l,i))?i.start.row:1/0),l>o){for(;this.$lines.getLength()>r+1;)this.$lines.pop();break}(a=this.$lines.get(++r))?a.row=l:(a=this.$lines.createCell(l,e,this.session,d),this.$lines.push(a)),this.$renderCell(a,e,i,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,o=t.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(i=t.getLength()+o-1);var s=n?n.getWidth(t,i,e):i.toString().length*e.characterWidth,a=this.$padding||this.$computePadding();(s+=a.left+a.right)===this.gutterWidth||isNaN(s)||(this.gutterWidth=s,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",s))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<t.length;n++){var o=t[n];if(o.row>=this.$cursorRow){if(o.row>this.$cursorRow){var i=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&i&&i.start.row==t[n-1].row))break;o=t[n-1]}o.element.className="ace_gutter-active-line "+o.element.className,this.$cursorCell=o;break}}}}},e.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=o.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var t=e.selection.cursor,n=this.config,i=this.$lines,s=n.firstRowScreen*n.lineHeight,a=Math.floor(s/i.canvasHeight),r=e.documentToScreenRow(t)*n.lineHeight-a*i.canvasHeight;o.setStyle(this.$highlightElement.style,"height",n.lineHeight+"px"),o.setStyle(this.$highlightElement.style,"top",r+"px")}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),o=this.oldLastRow;if(this.oldLastRow=n,!t||o<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(o>n)for(i=this.session.getFoldedRowCount(n+1,o);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>o&&this.$lines.push(this.$renderLines(e,o+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){for(var o=[],i=t,s=this.session.getNextFoldLine(i),a=s?s.start.row:1/0;i>a&&(i=s.end.row+1,a=(s=this.session.getNextFoldLine(i,s))?s.start.row:1/0),!(i>n);){var r=this.$lines.createCell(i,e,this.session,d);this.$renderCell(r,e,s,i),o.push(r),i++}return o},e.prototype.$renderCell=function(e,t,n,i){var s=e.element,a=this.session,r=s.childNodes[0],c=s.childNodes[1],d=s.childNodes[2],u=s.childNodes[3],p=d.firstChild,h=a.$firstLineNumber,g=a.$breakpoints,m=a.$decorations,b=a.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&a.foldWidgets,x=n?n.start.row:Number.MAX_VALUE,y=t.lineHeight+"px",v=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",k=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",w=(b?b.getText(a,i):i+h).toString();if(this.$highlightGutterLine&&(i==this.$cursorRow||n&&i<this.$cursorRow&&i>=x&&this.$cursorRow<=n.end.row)&&(v+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),g[i]&&(v+=g[i]),m[i]&&(v+=m[i]),this.$annotations[i]&&i!==x&&(v+=this.$annotations[i].className),f){var _=f[i];null==_&&(_=f[i]=a.getFoldWidget(i))}if(_){var C="ace_fold-widget ace_"+_,j="start"==_&&i==x&&i<n.end.row;if(j){C+=" ace_closed";for(var $="",S=!1,T=i+1;T<=n.end.row;T++)if(this.$annotations[T]){if(" ace_error"===this.$annotations[T].className){S=!0,$=" ace_error_fold";break}" ace_security"===this.$annotations[T].className?(S=!0,$=" ace_security_fold"):" ace_warning"===this.$annotations[T].className&&" ace_security_fold"!==$&&(S=!0,$=" ace_warning_fold")}v+=$}else C+=" ace_open";c.className!=C&&(c.className=C),o.setStyle(c.style,"height",y),o.setStyle(c.style,"display","inline-block"),c.setAttribute("role","button"),c.setAttribute("tabindex","-1");var M=a.getFoldWidgetRange(i);M?c.setAttribute("aria-label",l("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[M.start.row+1,M.end.row+1])):n?c.setAttribute("aria-label",l("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[n.start.row+1,n.end.row+1])):c.setAttribute("aria-label",l("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[i+1])),j?(c.setAttribute("aria-expanded","false"),c.setAttribute("title",l("gutter.code-folding.closed.title","Unfold code"))):(c.setAttribute("aria-expanded","true"),c.setAttribute("title",l("gutter.code-folding.open.title","Fold code")))}else c&&(o.setStyle(c.style,"display","none"),c.setAttribute("tabindex","0"),c.removeAttribute("role"),c.removeAttribute("aria-label"));var N=this.session.$gutterCustomWidgets[i];if(N?this.$addCustomWidget(i,N,e):u&&this.$removeCustomWidget(i,e),S&&this.$showFoldedAnnotations){switch(d.className="ace_gutter_annotation",p.className=k,p.className+=$,o.setStyle(p.style,"height",y),o.setStyle(d.style,"display","block"),o.setStyle(d.style,"height",y),$){case" ace_error_fold": |
| 163 |
L=l("gutter.annotation.aria-label.error","Error, read annotations row $0",[w]);break;case" ace_security_fold":L=l("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[w]);break;case" ace_warning_fold":L=l("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[w])}d.setAttribute("aria-label",L),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")}else if(this.$annotations[i]){var L;switch(d.className="ace_gutter_annotation",p.className=k,this.$useSvgGutterIcons?p.className+=this.$annotations[i].className:s.classList.add(this.$annotations[i].className.replace(" ","")),o.setStyle(p.style,"height",y),o.setStyle(d.style,"display","block"),o.setStyle(d.style,"height",y),this.$annotations[i].className){case" ace_error":L=l("gutter.annotation.aria-label.error","Error, read annotations row $0",[w]);break;case" ace_security":L=l("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[w]);break;case" ace_warning":L=l("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[w]);break;case" ace_info":L=l("gutter.annotation.aria-label.info","Info, read annotations row $0",[w]);break;case" ace_hint":L=l("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[w])}d.setAttribute("aria-label",L),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")}else o.setStyle(d.style,"display","none"),d.removeAttribute("aria-label"),d.removeAttribute("role"),d.setAttribute("tabindex","0");return w!==r.data&&(r.data=w),s.className!=v&&(s.className=v),o.setStyle(e.element.style,"height",this.$lines.computeLineHeight(i,t,a)+"px"),o.setStyle(e.element.style,"top",this.$lines.computeLineTop(i,t,a)+"px"),e.text=w,"none"!==d.style.display||"none"!==c.style.display||N?e.element.setAttribute("aria-hidden",!1):e.element.setAttribute("aria-hidden",!0),e},e.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e,!e&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},e.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},e.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},e.prototype.setShowFoldWidgets=function(e){e?o.addCssClass(this.element,"ace_folding-enabled"):o.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},e.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},e.prototype.$hideFoldWidget=function(e,t){var n=t||this.$getGutterCell(e);if(n&&n.element){var i=n.element.childNodes[1];i&&o.setStyle(i.style,"display","none")}},e.prototype.$showFoldWidget=function(e,t){var n=t||this.$getGutterCell(e);if(n&&n.element){var i=n.element.childNodes[1];i&&this.session.foldWidgets&&this.session.foldWidgets[n.row]&&o.setStyle(i.style,"display","inline-block")}},e.prototype.$getGutterCell=function(e){var t=this.$lines.cells,n=0,o=t.length-1;if(!(e<t[0].row||e>t[o].row)){for(;n<=o;){var i=Math.floor((n+o)/2),s=t[i];if(s.row>e)o=i-1;else{if(!(s.row<e))return s;n=i+1}}return s}},e.prototype.$addCustomWidget=function(e,t,n){var i=t.className,s=t.label,a=t.title,r=t.callbacks;this.session.$gutterCustomWidgets[e]={className:i,label:s,title:a,callbacks:r},this.$hideFoldWidget(e,n);var l=n||this.$getGutterCell(e);if(l&&l.element){var c=l.element.querySelector(".ace_custom-widget");c&&c.remove(),(c=o.createElement("span")).className="ace_custom-widget ".concat(i),c.setAttribute("tabindex","-1"),c.setAttribute("role","button"),c.setAttribute("aria-label",s),c.setAttribute("title",a),o.setStyle(c.style,"display","inline-block"),o.setStyle(c.style,"height","inherit"),r&&r.onClick&&c.addEventListener("click",(function(t){r.onClick(t,e),t.stopPropagation()})),l.element.appendChild(c)}},e.prototype.$removeCustomWidget=function(e,t){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,t);var n=t||this.$getGutterCell(e);if(n&&n.element){var o=n.element.querySelector(".ace_custom-widget");o&&n.element.removeChild(o)}},e.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=o.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},e.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0},e}();function d(e){var t=document.createTextNode("");e.appendChild(t);var n=o.createElement("span");e.appendChild(n);var i=o.createElement("span");e.appendChild(i);var s=o.createElement("span");return i.appendChild(s),e}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer=void 0,c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,i.implement(c.prototype,a),t.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var o=e("../range").Range,i=e("../lib/dom"),s=function(){function e(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},e.prototype.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var o=this.markers[n];if(o.range){var i=o.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),o.renderer){var s=this.$getTop(i.start.row,e),a=this.$padding+i.start.column*e.characterWidth;o.renderer(t,i,a,s,e)}else"fullLine"==o.type?this.drawFullLineMarker(t,i,o.clazz,e):"screenLine"==o.type?this.drawScreenLineMarker(t,i,o.clazz,e):i.isMultiLine()?"text"==o.type?this.drawTextMarker(t,i,o.clazz,e):this.drawMultiLineMarker(t,i,o.clazz,e):this.drawSingleLineMarker(t,i,o.clazz+" ace_start ace_br15",e)}else o.update(t,this,this.session,e)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},e.prototype.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},e.prototype.drawTextMarker=function(e,t,n,i,s){for(var a=this.session,r=t.start.row,l=t.end.row,c=r,d=0,u=0,p=a.getScreenLastRowColumn(c),h=new o(c,t.start.column,c,u);c<=l;c++)h.start.row=h.end.row=c,h.start.column=c==r?t.start.column:a.getRowWrapIndent(c),h.end.column=p,d=u,u=p,p=c+1<l?a.getScreenLastRowColumn(c+1):c==l?0:t.end.column,this.drawSingleLineMarker(e,h,n+(c==r?" ace_start":"")+" ace_br"+((c==r||c==r+1&&t.start.column?1:0)|(d<u?2:0)|(u>p?4:0)|(c==l?8:0)),i,c==l?0:1,s)},e.prototype.drawMultiLineMarker=function(e,t,n,o,i){var s=this.$padding,a=o.lineHeight,r=this.$getTop(t.start.row,o),l=s+t.start.column*o.characterWidth;if(i=i||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",o,null,i)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:"+s+"px;top:"+r+"px;left:"+l+"px;"+(i||"")),this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",o,null,i)}else{r=this.$getTop(t.end.row,o);var d=t.end.column*o.characterWidth;this.elt(n+" ace_br12","height:"+a+"px;width:"+d+"px;top:"+r+"px;left:"+s+"px;"+(i||""))}if(!((a=(t.end.row-t.start.row-1)*o.lineHeight)<=0)){r=this.$getTop(t.start.row+1,o);var u=(t.start.column?1:0)|(t.end.column?0:8) |
| 164 |
;this.elt(n+(u?" ace_br"+u:""),"height:"+a+"px;right:"+s+"px;top:"+r+"px;left:"+s+"px;"+(i||""))}},e.prototype.drawSingleLineMarker=function(e,t,n,o,i,s){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,o,i,s);var a=o.lineHeight,r=(t.end.column+(i||0)-t.start.column)*o.characterWidth,l=this.$getTop(t.start.row,o),c=this.$padding+t.start.column*o.characterWidth;this.elt(n,"height:"+a+"px;width:"+r+"px;top:"+l+"px;left:"+c+"px;"+(s||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,o,i,s){var a=o.lineHeight,r=this.$getTop(t.start.row,o),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+a+"px;width:"+(e.width+(i||0))+"px;top:"+r+"px;left:"+(l+e.left)+"px;"+(s||""))}),this)},e.prototype.drawFullLineMarker=function(e,t,n,o,i){var s=this.$getTop(t.start.row,o),a=o.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,o)-s),this.elt(n,"height:"+a+"px;top:"+s+"px;left:0;right:0;"+(i||""))},e.prototype.drawScreenLineMarker=function(e,t,n,o,i){var s=this.$getTop(t.start.row,o),a=o.lineHeight;this.elt(n,"height:"+a+"px;top:"+s+"px;left:0;right:0;"+(i||""))},e}();s.prototype.$padding=0,t.Marker=s})),ace.define("ace/layer/text_util",["require","exports","module"],(function(e,t,n){var o=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return o.has(e)}})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),a=e("./lines").Lines,r=e("../lib/event_emitter").EventEmitter,l=e("../config").nls,c=e("./text_util").isTextToken,d=function(){function e(e){this.dom=i,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++)this.showTabs?((o=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",o.textContent=s.stringRepeat(this.TAB_CHAR,n),t.push(o)):t.push(this.dom.createTextNode(s.stringRepeat(" ",n),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var o,i="ace_indent-guide",a=this.showSpaces?" ace_invisible ace_invisible_space":"",r=this.showSpaces?s.stringRepeat(this.SPACE_CHAR,this.tabSize):s.stringRepeat(" ",this.tabSize),l=this.showTabs?" ace_invisible ace_invisible_tab":"",c=this.showTabs?s.stringRepeat(this.TAB_CHAR,this.tabSize):r;(o=this.dom.createElement("span")).className=i+a,o.textContent=r,this.$tabStrings[" "]=o,(o=this.dom.createElement("span")).className=i+l,o.textContent=c,this.$tabStrings["\t"]=o}},e.prototype.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var o=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),s=this.element.childNodes,a=0,r=e.firstRow;r<o;r++){if(l=this.session.getFoldLine(r)){if(l.containsRow(o)){o=l.start.row;break}r=l.end.row}a++}for(var l,c=!1,d=(r=o,(l=this.session.getNextFoldLine(r))?l.start.row:1/0);r>d&&(r=l.end.row+1,d=(l=this.session.getNextFoldLine(r,l))?l.start.row:1/0),!(r>i);){var u=s[a++];if(u){this.dom.removeChildren(u),this.$renderLine(u,r,r==d&&l),c&&(u.style.top=this.$lines.computeLineTop(r,e,this.session)+"px");var p=e.lineHeight*this.session.getRowLength(r)+"px";u.style.height!=p&&(c=!0,u.style.height=p)}r++}if(c)for(;a<this.$lines.cells.length;){var h=this.$lines.cells[a++];h.element.style.top=this.$lines.computeLineTop(h.row,e,this.session)+"px"}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,o=t?t.lastRow:-1;if(!t||o<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(t.lastRow>e.lastRow)for(i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,n){for(var o=[],s=t,a=this.session.getNextFoldLine(s),r=a?a.start.row:1/0;s>r&&(s=a.end.row+1,r=(a=this.session.getNextFoldLine(s,a))?a.start.row:1/0),!(s>n);){var l=this.$lines.createCell(s,e,this.session),c=l.element;this.dom.removeChildren(c),i.setStyle(c.style,"height",this.$lines.computeLineHeight(s,e,this.session)+"px"),i.setStyle(c.style,"top",this.$lines.computeLineTop(s,e,this.session)+"px"),this.$renderLine(c,s,s==r&&a),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",o.push(l),s++}return o},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,o=this.$lines;o.getLength();)o.pop();o.push(this.$renderLinesFragment(e,t,n))},e.prototype.$renderToken=function(e,t,n,o){for(var i,a=this,r=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,d=this.dom.createFragment(this.element),u=0;i=r.exec(o);){var p=i[1],h=i[2],g=i[3],m=i[4],b=i[5];if(a.showSpaces||!h){var f=u!=i.index?o.slice(u,i.index):"";if(u=i.index+i[0].length,f&&d.appendChild(this.dom.createTextNode(f,this.element)),p){var x=a.session.getScreenTabSize(t+i.index),y=a.$tabStrings[x].cloneNode(!0);y.charCount=1,d.appendChild(y), |
| 165 |
t+=x-1}else h?a.showSpaces?((k=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",k.textContent=s.stringRepeat(a.SPACE_CHAR,h.length),d.appendChild(k)):d.appendChild(this.dom.createTextNode(h,this.element)):g?((k=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",k.textContent=s.stringRepeat(a.SPACE_CHAR,g.length),d.appendChild(k)):m?(t+=1,(k=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",k.className=a.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",k.textContent=a.showSpaces?a.SPACE_CHAR:m,d.appendChild(k)):b&&(t+=1,(k=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",k.className="ace_cjk",k.textContent=b,d.appendChild(k))}}if(d.appendChild(this.dom.createTextNode(u?o.slice(u):o,this.element)),c(n.type))e.appendChild(d);else{var v="ace_"+n.type.replace(/\./g," ace_"),k=this.dom.createElement("span");"fold"==n.type&&(k.style.width=n.value.length*this.config.characterWidth+"px",k.setAttribute("title",l("inline-fold.closed.title","Unfold code"))),k.className=v,k.appendChild(d),e.appendChild(k)}return t+o.length},e.prototype.renderIndentGuide=function(e,t,n){var o=t.search(this.$indentGuideRe);if(o<=0||o>=n)return t;if(" "==t[0]){for(var i=(o-=o%this.tabSize)/this.tabSize,s=0;s<i;s++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(o)}if("\t"==t[0]){for(s=0;s<o;s++){var a=this.$tabStrings["\t"].cloneNode(!0);a.charCount=1,e.appendChild(a)}return this.$highlightIndentGuide(),t.substr(o)}return this.$highlightIndentGuide(),t},e.prototype.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,o=Math.floor(n/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:o,start:t.row},this.session.$bracketHighlight)for(var i=this.session.$bracketHighlight.ranges,s=0;s<i.length;s++)if(t.row!==i[s].start.row){this.$highlightIndentGuideMarker.end=i[s].start.row+1,t.row>i[s].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length)for(this.$highlightIndentGuideMarker.dir=1,s=t.row+1;s<e.length;s++){var a=e[s],r=/^\s*/.exec(a)[0].length;if(""!==a&&(this.$highlightIndentGuideMarker.end=s,r<=n))break}this.$renderHighlightIndentGuide()}}},e.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),t=0;t<e.length;t++)e[t].classList.remove("ace_indent-guide-active")},e.prototype.$setIndentGuideActive=function(e,t){if(""!==this.session.doc.getLine(e.row)){var n=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group")){if(!(e.element.childNodes.length>0))return;n=e.element.childNodes[0]}var o=n.childNodes;if(o){var i=o[t-1];i&&i.classList&&i.classList.contains("ace_indent-guide")&&i.classList.add("ace_indent-guide-active")}}},e.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(0!==t)if(1===this.$highlightIndentGuideMarker.dir)for(var n=0;n<e.length;n++){var o=e[n];if(this.$highlightIndentGuideMarker.end&&o.row>=this.$highlightIndentGuideMarker.start+1){if(o.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(o,t)}}else for(n=e.length-1;n>=0;n--)if(o=e[n],this.$highlightIndentGuideMarker.end&&o.row<this.$highlightIndentGuideMarker.start){if(o.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(o,t)}}},e.prototype.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},e.prototype.$renderWrappedLine=function(e,t,n){var o=0,i=0,a=n[0],r=0,l=this.$createLineElement();e.appendChild(l);for(var c=0;c<t.length;c++){var d=t[c],u=d.value;if(0==c&&this.displayIndentGuides){if(o=u.length,!(u=this.renderIndentGuide(l,u,a)))continue;o-=u.length}if(o+u.length<a)r=this.$renderToken(l,r,d,u),o+=u.length;else{for(;o+u.length>=a;){r=this.$renderToken(l,r,d,u.substring(0,a-o)),u=u.substring(a-o),o=a,l=this.$createLineElement(),e.appendChild(l);var p=this.dom.createTextNode(s.stringRepeat(" ",n.indent),this.element);p.charCount=0,l.appendChild(p),r=0,a=n[++i]||Number.MAX_VALUE}0!=u.length&&(o+=u.length,r=this.$renderToken(l,r,d,u))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,r,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){for(var n=0,o=0;o<t.length;o++){var i=t[o],s=i.value;if(0!=o||!this.displayIndentGuides||(s=this.renderIndentGuide(e,s))){if(n+s.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,s);n=this.$renderToken(e,n,i,s)}}},e.prototype.$renderOverflowMessage=function(e,t,n,o,i){n&&this.$renderToken(e,t,n,o.slice(0,this.MAX_LINE_LENGTH-t));var s=this.dom.createElement("span");s.className="ace_inline_button ace_keyword ace_toggle_wrap",s.textContent=i?"<hide>":"<click to see more...>",e.appendChild(s)},e.prototype.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var o=this.$getFoldLineTokens(t,n);else o=this.session.getTokens(t);var i=e;if(o.length){var s=this.session.getRowSplitData(t);s&&s.length?(this.$renderWrappedLine(e,o,s),i=e.lastChild):(i=e,this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i)),this.$renderSimpleLine(i,o))}else this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i));if(this.showEOL&&i){n&&(t=n.end.row);var a=this.dom.createElement("span");a.className="ace_invisible ace_invisible_eol",a.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,i.appendChild(a)}},e.prototype.$getFoldLineTokens=function(e,t){var n=this.session,o=[],i=n.getTokens(e);return t.walk((function(e,t,s,a,r){null!=e?o.push({type:"fold",value:e}):(r&&(i=n.getTokens(t)),i.length&&function(e,t,n){for(var i=0,s=0;s+e[i].value.length<t;)if(s+=e[i].value.length,++i==e.length)return;for(s!=t&&((a=e[i].value.substring(t-s)).length>n-t&&(a=a.substring(0,n-t)),o.push({type:e[i].type,value:a}),s=t+a.length,i+=1);s<n&&i<e.length;){var a;(a=e[i].value).length+s>n?o.push({type:e[i].type,value:a.substring(0,n-s)}):o.push(e[i]),s+=a.length,i+=1}}(i,a,s))}),t.end.row,this.session.getLine(t.end.row).length),o},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();d.prototype.EOF_CHAR="¶",d.prototype.EOL_CHAR_LF="¬",d.prototype.EOL_CHAR_CRLF="¤",d.prototype.EOL_CHAR=d.prototype.EOL_CHAR_LF,d.prototype.TAB_CHAR="—",d.prototype.SPACE_CHAR="·",d.prototype.$padding=0,d.prototype.MAX_LINE_LENGTH=1e4,d.prototype.showInvisibles=!1,d.prototype.showSpaces=!1,d.prototype.showTabs=!1,d.prototype.showEOL=!1,d.prototype.displayIndentGuides=!0,d.prototype.$highlightIndentGuides=!0,d.prototype.$tabStrings=[],d.prototype.destroy={},d.prototype.onChangeTabSize=d.prototype.$computeTabString,o.implement(d.prototype,r),t.Text=d})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var o=e("../lib/dom"),i=function(){function e(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),o.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)o.setStyle(t[n].style,"opacity",e?"":"0")},e.prototype.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0, |
| 166 |
setTimeout(function(){this.$isAnimating&&o.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,o.removeCssClass(this.element,"ace_animate-blinking")},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,o.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=o.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,o.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,o.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,o.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&o.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),o.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.top<t.maxHeight},e.prototype.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,i=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]),n=0;for(var s=t.length;n<s;n++){var a=this.getPixelPosition(t[n].cursor,!0);if(!((a.top>e.height+e.offset||a.top<0)&&n>1)){var r=this.cursors[i++]||this.addCursor(),l=r.style;this.drawCursor?this.drawCursor(r,a,e,t[n],this.session):this.isCursorInView(a,e)?(o.setStyle(l,"display","block"),o.translate(r,a.left,a.top),o.setStyle(l,"width",Math.round(e.characterWidth)+"px"),o.setStyle(l,"height",e.lineHeight+"px")):o.setStyle(l,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=a,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?o.addCssClass(this.element,"ace_overwrite-cursors"):o.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();i.prototype.$padding=0,i.prototype.drawCursor=null,t.Cursor=i})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=e("./lib/oop"),a=e("./lib/dom"),r=e("./lib/event"),l=e("./lib/event_emitter").EventEmitter,c=32768,d=function(){function e(e,t){this.element=a.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.element.tabIndex=-1,this.inner=a.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,r.addListener(this.element,"scroll",this.onScroll.bind(this)),r.addListener(this.element,"mousedown",r.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();s.implement(d.prototype,l);var u=function(e){function t(t,n){var o=e.call(this,t,"-v")||this;return o.scrollTop=0,o.scrollHeight=0,n.$scrollbarWidth=o.width=a.scrollbarWidth(t.ownerDocument),o.inner.style.width=o.element.style.width=(o.width||15)+5+"px",o.$minWidth=0,o}return i(t,e),t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+"px"},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>c?(this.coeff=c/e,e=c):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(d);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var p=function(e){function t(t,n){var o=e.call(this,t,"-h")||this;return o.scrollLeft=0,o.height=n.$scrollbarWidth,o.inner.style.height=o.element.style.height=(o.height||15)+5+"px",o}return i(t,e),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+"px"},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(d);t.ScrollBar=u,t.ScrollBarV=u,t.ScrollBarH=p,t.VScrollBar=u,t.HScrollBar=p})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=e("./lib/oop"),a=e("./lib/dom"),r=e("./lib/event"),l=e("./lib/event_emitter").EventEmitter |
| 167 |
;a.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var c=function(){function e(e,t){this.element=a.createElement("div"),this.element.className="ace_sb"+t,this.inner=a.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,r.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();s.implement(c.prototype,l);var d=function(e){function t(t,n){var o=e.call(this,t,"-v")||this;return o.scrollTop=0,o.scrollHeight=0,o.parent=t,o.width=o.VScrollWidth,o.renderer=n,o.inner.style.width=o.element.style.width=(o.width||15)+"px",o.$minWidth=0,o}return i(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===r.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,o=t.clientY,i=t.clientY,s=this.thumbTop;r.capture(this.inner,(function(e){o=e.clientY}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==o){var e=n.scrollTopFromThumbTop(s+o-i);e!==n.scrollTop&&n._emit("scroll",{data:e})}}),20);return r.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),r.preventDefault(t)}},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t|=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(c);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var u=function(e){function t(t,n){var o=e.call(this,t,"-h")||this;return o.scrollLeft=0,o.scrollWidth=0,o.height=o.HScrollHeight,o.inner.style.height=o.element.style.height=(o.height||12)+"px",o.renderer=n,o}return i(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===r.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,o=t.clientX,i=t.clientX,s=this.thumbLeft;r.capture(this.inner,(function(e){o=e.clientX}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==o){var e=n.scrollLeftFromThumbLeft(s+o-i);e!==n.scrollLeft&&n._emit("scroll",{data:e})}}),20);return r.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),r.preventDefault(t)}},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t|=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(c);u.prototype.setInnerWidth=u.prototype.setScrollWidth,t.ScrollBar=d,t.ScrollBarV=d,t.ScrollBarH=u,t.VScrollBar=d,t.HScrollBar=u})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var o=e("./lib/event"),i=function(){function e(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(o.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(o.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=i})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var o=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),a=e("../lib/event"),r=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c=512,d="function"==typeof ResizeObserver,u=200,p=function(){function e(e){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=s.stringRepeat("X",c),this.$characterSize={width:0,height:0},d?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",r.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},e.prototype.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){ |
| 168 |
if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=a.onIdle((function t(){e.checkForSizeChanges(),a.onIdle(t,500)}),500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},e.prototype.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},e.prototype.$measureCharWidth=function(e){return this.$main.textContent=s.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return e&&e.parentElement?(Number(window.getComputedStyle(e).zoom)||1)*this.$getZoom(e.parentElement):1},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=i.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},e.prototype.transformCoordinates=function(e,t){function n(e,t,n){var o=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/o,(+e[1]*n[0]-e[0]*n[1])/o]}function o(e,t){return[e[0]-t[0],e[1]-t[1]]}function i(e,t){return[e[0]+t[0],e[1]+t[1]]}function s(e,t){return[e*t[0],e*t[1]]}function a(e){var t=e.getBoundingClientRect();return[t.left,t.top]}e&&(e=s(1/this.$getZoom(this.el),e)),this.els||this.$initTransformMeasureNodes();var r=a(this.els[0]),l=a(this.els[1]),c=a(this.els[2]),d=a(this.els[3]),p=n(o(d,l),o(d,c),o(i(l,c),i(d,r))),h=s(1+p[0],o(l,r)),g=s(1+p[1],o(c,r));if(t){var m=t,b=p[0]*m[0]/u+p[1]*m[1]/u+1,f=i(s(m[0],h),s(m[1],g));return i(s(1/b/u,f),r)}var x=o(e,r),y=n(o(h,s(p[0],x)),o(g,s(p[1],x)),x);return s(u,y)},e}();p.prototype.$characterSize={width:0,height:0},o.implement(p.prototype,l),t.FontMetrics=p})),ace.define("ace/css/editor-css",["require","exports","module"],(function(e,t,n){ |
| 169 |
n.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n.ace_invisible {\n font-variant-ligatures: none;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(33em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget, .ace_custom-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_custom-widget {\n background: none;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "↩";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}' |
| 170 |
})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var o=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/event_emitter").EventEmitter,a=function(){function e(e,t){this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(e)}return e.prototype.$createCanvas=function(){this.canvas=o.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},e.prototype.setScrollBarV=function(e){this.$createCanvas(),this.scrollbarV=e,e.element.appendChild(this.canvas),this.setDimensions()},e.prototype.$updateDecorators=function(e){if("function"==typeof this.canvas.getContext){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;this.setDimensions(e);var n=this.canvas.getContext("2d"),o=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),o){var i={info:1,warning:2,error:3};o.forEach((function(e){e.priority=i[e.type]||null})),o=o.sort((function(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:0}));for(var s=0;s<o.length;s++){var a=o[s].row,r=this.getVerticalOffsetForRow(a),l=r+this.lineHeight,c=Math.round(this.heightRatio*r),d=Math.round(this.heightRatio*l),u=Math.round((c+d)/2),p=d-u;p<this.halfMinDecorationHeight&&(p=this.halfMinDecorationHeight),u-p<0&&(u=p),u+p>this.canvasHeight&&(u=this.canvasHeight-p);var h=u-p,g=u+p-h;n.fillStyle=t[o[s].type]||null,n.fillRect(0,h,Math.round(this.oneZoneWidth-1),g)}}var m=this.renderer.session.selection.getCursor();if(m){var b=Math.round(this.getVerticalOffsetForRow(m.row)*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,b,this.canvasWidth,2)}}},e.prototype.getVerticalOffsetForRow=function(e){return e|=0,this.renderer.session.documentToScreenRow(e,0)*this.lineHeight},e.prototype.setDimensions=function(e){e=e||this.renderer.layerConfig,this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},e.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},e.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},e}();i.implement(a.prototype,s),t.Decorator=a})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],(function(e,t,n){"use strict";var o=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/lang"),a=e("./config"),r=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,d=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,p=e("./scrollbar").VScrollBar,h=e("./scrollbar_custom").HScrollBar,g=e("./scrollbar_custom").VScrollBar,m=e("./renderloop").RenderLoop,b=e("./layer/font_metrics").FontMetrics,f=e("./lib/event_emitter").EventEmitter,x=e("./css/editor-css"),y=e("./layer/decorators").Decorator,v=e("./lib/useragent"),k=e("./layer/text_util").isTextToken;i.importCssString(x,"ace_editor.css",!1);var w=function(){function e(e,t){var n=this;this.container=e||i.createElement("div"),i.addCssClass(this.container,"ace_editor"),i.HI_DPI&&i.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==a.get("useStrictCSP")&&a.set("useStrictCSP",!1),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new r(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var o=this.$textLayer=new c(this.content);this.canvas=o.element,this.$markerFront=new l(this.content),this.$cursorLayer=new d(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new b(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!v.isIOS,this.$loop=new m(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return e.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),i.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},e.prototype.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},e.prototype.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)}, |
| 171 |
e.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,n,o){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;o||(o=i.clientHeight||i.scrollHeight),!o&&this.$maxLines&&this.lineHeight>1&&(i.style.height&&"0px"!=i.style.height||(i.style.height="1px",o=i.clientHeight||i.scrollHeight)),n||(n=i.clientWidth||i.scrollWidth);var s=this.$updateCachedSize(e,t,n,o);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!n&&!o)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},e.prototype.$updateCachedSize=function(e,t,n,o){o-=this.$extraHeight||0;var s=0,a=this.$size,r={width:a.width,height:a.height,scrollerHeight:a.scrollerHeight,scrollerWidth:a.scrollerWidth};if(o&&(e||a.height!=o)&&(a.height=o,s|=this.CHANGE_SIZE,a.scrollerHeight=a.height,this.$horizScroll&&(a.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(a.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",s|=this.CHANGE_SCROLL),n&&(e||a.width!=n)){s|=this.CHANGE_SIZE,a.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,i.setStyle(this.scrollBarH.element.style,"left",t+"px"),i.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),a.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),i.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";i.setStyle(this.scrollBarH.element.style,"right",l),i.setStyle(this.scroller.style,"right",l),i.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(a.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(s|=this.CHANGE_FULL)}return a.$dirty=!n||!o,s&&this._signal("resize",r),s},e.prototype.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},e.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},e.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},e.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},e.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},e.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},e.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},e.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},e.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},e.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},e.prototype.getShowGutter=function(){return this.getOption("showGutter")},e.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var o=this.layerConfig,s=n.top,a=n.left;s-=o.offset;var r=t&&t.useTextareaForIME||v.isMobile?this.lineHeight:1;if(s<0||s>o.height-r)i.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-r;if(t)if(t.useTextareaForIME){var d=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(d)[0]}else s+=this.lineHeight+2;else s+=this.lineHeight;(a-=this.scrollLeft)>this.$size.scrollerWidth-l&&(a=this.$size.scrollerWidth-l),a+=this.gutterWidth+this.margin.left,i.setStyle(e,"height",r+"px"),i.setStyle(e,"width",l+"px"),i.translate(this.textarea,Math.min(a,this.$size.scrollerWidth-l),Math.min(s,c))}}}else i.translate(this.textarea,-100,0)}},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},e.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},e.prototype.setScrollMargin=function(e,t,n,o){var i=this.scrollMargin;i.top=0|e,i.bottom=0|t,i.right=0|o,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},e.prototype.setMargin=function(e,t,n,o){var i=this.margin;i.top=0|e,i.bottom=0|t,i.right=0|o,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},e.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight |
| 172 |
;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var o=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;o>0&&(this.scrollTop=o,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),i.translate(this.content,-this.scrollLeft,-n.offset);var s=n.width+2*this.$padding+"px",a=n.minHeight+"px";i.setStyle(this.content.style,"width",s),i.setStyle(this.content.style,"height",a)}if(e&this.CHANGE_H_SCROLL&&(i.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},e.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var o=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||o!=this.$vScroll){o!=this.$vScroll&&(this.$vScroll=o,this.scrollBarV.setVisible(o));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,o=this.session.getScreenLength()*this.lineHeight,i=this.$getLongestLine(),s=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-i-2*this.$padding<0),a=this.$horizScroll!==s;a&&(this.$horizScroll=s,this.scrollBarH.setVisible(s));var r=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),n=t.height<=2*this.lineHeight);var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;o+=c;var d=this.scrollMargin;this.session.setScrollTop(Math.max(-d.top,Math.min(this.scrollTop,o-t.scrollerHeight+d.bottom))),this.session.setScrollLeft(Math.max(-d.left,Math.min(this.scrollLeft,i+2*this.$padding-t.scrollerWidth+d.right)));var u=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-o+c<0||this.scrollTop>d.top),p=r!==u;p&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var h,g,m=this.scrollTop%this.lineHeight,b=Math.ceil(l/this.lineHeight)-1,f=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),x=f+b,y=this.lineHeight;f=e.screenToDocumentRow(f,0);var v=e.getFoldLine(f);v&&(f=v.start.row),h=e.documentToScreenRow(f,0),g=e.getRowLength(f)*y,x=Math.min(e.screenToDocumentRow(x,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(x)*y+g,(m=this.scrollTop-h*y)<0&&h>0&&(h=Math.max(0,h+Math.floor(m/y)),m=this.scrollTop-h*y);var k=0;return(this.layerConfig.width!=i||a)&&(k=this.CHANGE_H_SCROLL),(a||p)&&(k|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),p&&(i=this.$getLongestLine())),this.layerConfig={width:i,padding:this.$padding,firstRow:f,firstRowScreen:h,lastRow:x,lineHeight:y,characterWidth:this.characterWidth,minHeight:l,maxHeight:o,offset:m,gutterOffset:y?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(i-this.$padding),k},e.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)}},e.prototype.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()}, |
| 173 |
e.prototype.showCursor=function(){this.$cursorLayer.showCursor()},e.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},e.prototype.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var o=this.$cursorLayer.getPixelPosition(e),i=o.left,s=o.top,a=n&&n.top||0,r=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+a>s?(t&&l+a>s+this.lineHeight&&(s-=t*this.$size.scrollerHeight),0===s&&(s=-this.scrollMargin.top),this.session.setScrollTop(s)):l+this.$size.scrollerHeight-r<s+this.lineHeight&&(t&&l+this.$size.scrollerHeight-r<s-this.lineHeight&&(s+=t*this.$size.scrollerHeight),this.session.setScrollTop(s+this.lineHeight+r-this.$size.scrollerHeight));var c=this.scrollLeft,d=2*this.layerConfig.characterWidth;i-d<c?((i-=d)<this.$padding+d&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):(i+=d,c+this.$size.scrollerWidth<i+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&i-c<this.characterWidth&&this.session.setScrollLeft(0))}},e.prototype.getScrollTop=function(){return this.session.getScrollTop()},e.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},e.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},e.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},e.prototype.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},e.prototype.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),o=this.$size.scrollerHeight-this.lineHeight,i=n.top-o*(t||0);return this.session.setScrollTop(i),i},e.prototype.$calcSteps=function(e,t){var n,o,i=0,s=this.STEPS,a=[];for(i=0;i<s;++i)a.push((n=i/this.STEPS,o=e,(t-e)*(Math.pow(n-1,3)+1)+o));return a},e.prototype.scrollToLine=function(e,t,n,o){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(i-=this.$size.scrollerHeight/2);var s=this.scrollTop;this.session.setScrollTop(i),!1!==n&&this.animateScrolling(s,o)},e.prototype.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var o=this;if(e!=n){if(this.$scrollAnimation){var i=this.$scrollAnimation.steps;if(i.length&&(e=i[0])==n)return}var s=o.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:s},clearInterval(this.$timer),o.session.setScrollTop(s.shift()),o.session.$scrollTop=n,this.$timer=setInterval((function(){if(!o.$stopAnimation)return o.session?void(s.length?(o.session.setScrollTop(s.shift()),o.session.$scrollTop=n):null!=n?(o.session.$scrollTop=-1,o.session.setScrollTop(n),n=null):a()):clearInterval(o.$timer);a()}),10)}}function a(){o.$timer=clearInterval(o.$timer),o.$scrollAnimation=null,o.$stopAnimation=!1,t&&t()}},e.prototype.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},e.prototype.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},e.prototype.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(e)},e.prototype.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},e.prototype.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},e.prototype.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var o=this.$fontMetrics.transformCoordinates([e,t]);e=o[1]-this.gutterWidth-this.margin.left,t=o[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,s=i/this.characterWidth,a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),r=this.$blockCursor?Math.floor(s):Math.round(s);return{row:a,column:r,side:s-r>0?1:-1,offsetX:i}},e.prototype.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var o=this.$fontMetrics.transformCoordinates([e,t]);e=o[1]-this.gutterWidth-this.margin.left,t=o[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,s=i/this.characterWidth,a=this.$blockCursor?Math.floor(s):Math.round(s),r=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(r,Math.max(a,0),i)},e.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),o=this.session.documentToScreenPosition(e,t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,e)?this.session.$bidiHandler.getPosLeft(o.column):Math.round(o.column*this.characterWidth)),s=o.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+s-this.scrollTop}},e.prototype.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),i.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},e.prototype.setGhostText=function(e,t){var n=this.session.selection.cursor,o=t||{row:n.row,column:n.column};this.removeGhostText();var s=this.$calculateWrappedTextChunks(e,o);this.addToken(s[0].text,"ghost_text",o.row,o.column),this.$ghostText={text:e,position:{row:o.row,column:o.column}};var a=i.createElement("div");if(s.length>1){var r,l=this.hideTokensAfterPosition(o.row,o.column);s.slice(1).forEach((function(e){var t=i.createElement("div"),n=i.createElement("span");n.className="ace_ghost_text",e.wrapped&&(t.className="ghost_text_line_wrapped"),0===e.text.length&&(e.text=" "),n.appendChild(i.createTextNode(e.text)),t.appendChild(n),a.appendChild(t),r=t})),l.forEach((function(e){var t=i.createElement("span");k(e.type)||(t.className="ace_"+e.type.replace(/\./g," ace_")),t.appendChild(i.createTextNode(e.value)),r.appendChild(t)})),this.$ghostTextWidget={el:a,row:o.row,column:o.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var c=this.$cursorLayer.getPixelPosition(o,!0),d=this.container.getBoundingClientRect().height,u=s.length*this.lineHeight;if(u<d-c.top)return;u<d?this.scrollBy(0,(s.length-1)*this.lineHeight):this.scrollToRow(o.row)}},e.prototype.$calculateWrappedTextChunks=function(e,t){var n=this.$size.scrollerWidth-2*this.$padding,o=Math.floor(n/this.characterWidth)-2;o=o<=0?60:o;for(var i=e.split(/\r?\n/),s=[],a=0;a<i.length;a++){var r=this.session.$getDisplayTokens(i[a],t.column),l=this.session.$computeWrapSplits(r,o,this.session.$tabSize);if(l.length>0){var c=0;l.push(i[a].length);for(var d=0;d<l.length;d++){var u=i[a].slice(c,l[d]);s.push({text:u,wrapped:!0}),c=l[d]}}else s.push({text:i[a],wrapped:!1 |
| 174 |
})}return s},e.prototype.removeGhostText=function(){if(this.$ghostText){var e=this.$ghostText.position;this.removeExtraToken(e.row,e.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},e.prototype.addToken=function(e,t,n,o){var i=this.session;i.bgTokenizer.lines[n]=null;var s={type:t,value:e},a=i.getTokens(n);if(null!=o&&a.length)for(var r=0,l=0;l<a.length;l++){var c=a[l];if(o<=(r+=c.value.length)){var d=c.value.length-(r-o),u=c.value.slice(0,d),p=c.value.slice(d);a.splice(l,1,{type:c.type,value:u},s,{type:c.type,value:p});break}}else a.push(s);this.updateLines(n,n)},e.prototype.hideTokensAfterPosition=function(e,t){for(var n=this.session.getTokens(e),o=0,i=!1,s=[],a=0;a<n.length;a++){var r=n[a];o+=r.value.length,"ghost_text"!==r.type&&(i?(s.push({type:r.type,value:r.value}),r.type="hidden_token"):o===t&&(i=!0))}return this.updateLines(e,e),s},e.prototype.removeExtraToken=function(e,t){this.session.bgTokenizer.lines[e]=null,this.updateLines(e,e)},e.prototype.setTheme=function(e,t){var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)s(e);else{var o=e||this.$options.theme.initialValue;a.loadModule(["theme",o],s)}function s(o){if(n.$themeId!=e)return t&&t();if(!o||!o.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");o.$id&&(n.$themeId=o.$id),i.importCssString(o.cssText,o.cssClass,n.container),n.theme&&i.removeCssClass(n.container,n.theme.cssClass);var s="padding"in o?o.padding:"padding"in(n.theme||{})?4:n.$padding;if(n.$padding&&s!=n.$padding&&n.setPadding(s),n.$gutterLayer){var a=o.$showGutterCursorMarker;a&&!n.$gutterLayer.$showCursorMarker?n.$gutterLayer.$showCursorMarker="theme":a||"theme"!=n.$gutterLayer.$showCursorMarker||(n.$gutterLayer.$showCursorMarker=null)}n.$theme=o.cssClass,n.theme=o,i.addCssClass(n.container,o.cssClass),i.setCssClass(n.container,"ace_dark",o.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:o}),t&&t(),v.isSafari&&n.scroller&&(n.scroller.style.background="red",n.scroller.style.background="")}},e.prototype.getTheme=function(){return this.$themeId},e.prototype.setStyle=function(e,t){i.setCssClass(this.container,e,!1!==t)},e.prototype.unsetStyle=function(e){i.removeCssClass(this.container,e)},e.prototype.setCursorStyle=function(e){i.setStyle(this.scroller.style,"cursor",e)},e.prototype.setMouseCursor=function(e){i.setStyle(this.scroller.style,"cursor",e)},e.prototype.attachToShadowRoot=function(){i.importCssString(x,"ace_editor.css",this.container)},e.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},e.prototype.$updateCustomScrollbar=function(e){var t=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),!0===e?(this.scrollBarV=new g(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)})),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new y(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new p(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)})))},e.prototype.$addResizeObserver=function(){if(window.ResizeObserver&&!this.$resizeObserver){var e=this;this.$resizeTimer=s.delayedCall((function(){e.destroyed||e.onResize()}),50),this.$resizeObserver=new window.ResizeObserver((function(t){var n=t[0].contentRect.width,o=t[0].contentRect.height;Math.abs(e.$size.width-n)>1||Math.abs(e.$size.height-o)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container)}},e}();w.prototype.CHANGE_CURSOR=1,w.prototype.CHANGE_MARKER=2,w.prototype.CHANGE_GUTTER=4,w.prototype.CHANGE_SCROLL=8,w.prototype.CHANGE_LINES=16,w.prototype.CHANGE_TEXT=32,w.prototype.CHANGE_SIZE=64,w.prototype.CHANGE_MARKER_BACK=128,w.prototype.CHANGE_MARKER_FRONT=256,w.prototype.CHANGE_FULL=512,w.prototype.CHANGE_H_SCROLL=1024,w.prototype.$changes=0,w.prototype.$padding=null,w.prototype.$frozen=!1,w.prototype.STEPS=8,o.implement(w.prototype,f),a.defineOptions(w.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{ |
| 175 |
initialValue:!v.isMobile&&!v.isIE}}),t.VirtualRenderer=w})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("../lib/net"),s=e("../lib/event_emitter").EventEmitter,a=e("../config");function r(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+i.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){o.implement(this,s),this.$createWorkerFromOldConfig=function(t,n,o,i,s){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)i=i||a.moduleUrl(n,"worker");else{var l=this.$normalizePath;i=i||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=r(i),s&&this.send("importScripts",s),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:o}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return i.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var o=this.callbackId++;this.callbacks[o]=n,t.push(o)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype),t.UIWorkerClient=function(e,t,n){var o=null,i=!1,r=Object.create(s),c=[],d=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),o&&(i?setTimeout(u):u())}});d.setEmitSync=function(e){i=e};var u=function(){var e=c.shift();e.command?o[e.command].apply(o,e.args):e.event&&r._signal(e.event,e.data)};return r.postMessage=function(e){d.onMessage({data:e})},r.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},r.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],(function(e){for(o=new e[n](r);c.length;)u()})),d},t.WorkerClient=l,t.createWorker=r})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var o=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop"),a=function(){function e(e,t,n,o,i,s){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=o,this.$onCursorChange=function(){setTimeout((function(){a.onCursorChange()}))},this.$pos=n;var r=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=r.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new o(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var o=t.createAnchor(n.row,n.column);o.$insertRight=!0,o.detach(),e.others.push(o)})),n.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new o(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},e.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},e.prototype.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,i=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,s=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var r={row:(l=this.others[a]).row,column:l.column+s};this.doc.insertMergedLines(r,e.lines)}else if("remove"===e.action)for(a=this.others.length-1;a>=0;a--){var l;r={row:(l=this.others[a]).row,column:l.column+s},this.doc.remove(new o(r.row,r.column,r.row,r.column-n))}this.$updating=!1,this.updateMarkers()}},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new o(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)}},e.prototype.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},e.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},e.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},e}();s.implement(a.prototype,i),t.PlaceHolder=a})),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var o=e("../lib/event"),i=e("../lib/useragent");function s(e,t){return e.row==t.row&&e.column==t.column} |
| 176 |
t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,a=t.shiftKey,r=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(r&&i.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(r||n||l){if(0===c){var d,u=e.editor,p=u.selection,h=u.inMultiSelectMode,g=e.getDocumentPosition(),m=p.getCursor(),b=e.inSelection()||p.isEmpty()&&s(g,m),f=e.x,x=e.y,y=u.session,v=u.renderer.pixelToScreenCoordinates(f,x),k=v;if(u.$mouseHandler.$enableJumpToDef)r&&n||l&&n?d=a?"block":"add":n&&u.$blockSelectEnabled&&(d="block");else if(l&&!n){if(d="add",!h&&a)return}else n&&u.$blockSelectEnabled&&(d="block");if(d&&i.isMac&&t.ctrlKey&&u.$mouseHandler.cancelContextMenu(),"add"==d){if(!h&&b)return;if(!h){var w=p.toOrientedRange();u.addSelectionMarker(w)}var _=p.rangeList.rangeAtPoint(g);u.inVirtualSelectionMode=!0,a&&(_=null,w=p.ranges[0]||w,u.removeSelectionMarker(w)),u.once("mouseup",(function(){var e=p.toOrientedRange();_&&e.isEmpty()&&s(_.cursor,e.cursor)?p.substractPoint(e.cursor):(a?p.substractPoint(w.cursor):w&&(u.removeSelectionMarker(w),p.addRange(w)),p.addRange(e)),u.inVirtualSelectionMode=!1}))}else if("block"==d){var C;e.stop(),u.inVirtualSelectionMode=!0;var j=[],$=function(){var e=u.renderer.pixelToScreenCoordinates(f,x),t=y.screenToDocumentPosition(e.row,e.column,e.offsetX);s(k,e)&&s(t,p.lead)||(k=e,u.selection.moveToPosition(t),u.renderer.scrollCursorIntoView(),u.removeSelectionMarkers(j),j=p.rectangularRangeBlock(k,v),u.$mouseHandler.$clickSelection&&1==j.length&&j[0].isEmpty()&&(j[0]=u.$mouseHandler.$clickSelection.clone()),j.forEach(u.addSelectionMarker,u),u.updateSelectionMarkers())};h&&!l?p.toSingleRange():!h&&l&&(C=p.toOrientedRange(),u.addSelectionMarker(C)),a?v=y.documentToScreenPosition(p.lead):p.moveToPosition(g),k={row:-1,column:-1};var S=$;o.capture(u.container,(function(e){f=e.clientX,x=e.clientY}),(function(e){$(),clearInterval(T),u.removeSelectionMarkers(j),j.length||(j=[p.toOrientedRange()]),C&&(u.removeSelectionMarker(C),p.toSingleRange(C));for(var t=0;t<j.length;t++)p.addRange(j[t]);u.inVirtualSelectionMode=!1,u.$mouseHandler.$clickSelection=null}));var T=setInterval((function(){S()}),20);return e.preventDefault()}}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}})),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],(function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(e){e.multiSelect.rangeCount>1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var o=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new o(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var o=e("./range_list").RangeList,i=e("./range").Range,s=e("./selection").Selection,a=e("./mouse/multi_select_handler").onMouseDown,r=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var d=new(0,e("./search").Search),u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var o=this.rangeList.add(e);return this.$onAddRange(e),o.length&&this.$onRemoveRange(o),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var o=this.ranges.indexOf(e[n]);this.ranges.splice(o,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new o,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n<e.length;n++){var o=e[n],s=o.start.row,a=o.end.row;if(s===a)t.push(o.clone());else{for(t.push(new i(s,o.start.column,s,this.session.getLine(s).length));++s<a;)t.push(this.getLineRange(s,!0));t.push(new i(a,0,a,o.end.column))}0!=n||this.isBackwards()||(t=t.reverse())} |
| 177 |
for(this.toSingleRange(),n=t.length;n--;)this.addRange(t[n])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var o=this.session.documentToScreenPosition(this.cursor),s=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(o,s).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var o=[],s=e.column<t.column;if(s)var a=e.column,r=t.column,l=e.offsetX,c=t.offsetX;else a=t.column,r=e.column,l=t.offsetX,c=e.offsetX;var d,u,p,h=e.row<t.row;if(h)var g=e.row,m=t.row;else g=t.row,m=e.row;a<0&&(a=0),g<0&&(g=0),g==m&&(n=!0);for(var b=g;b<=m;b++){var f=i.fromPoints(this.session.screenToDocumentPosition(b,a,l),this.session.screenToDocumentPosition(b,r,c));if(f.isEmpty()){if(d&&(p=d,(u=f.end).row==p.row&&u.column==p.column))break;d=f.end}f.cursor=s?f.start:f.end,o.push(f)}if(h&&o.reverse(),!n){for(var x=o.length-1;o[x].isEmpty()&&x>0;)x--;if(x>0)for(var y=0;o[y].isEmpty();)y++;for(var v=x;v>=y;v--)o[v].isEmpty()&&o.splice(v,1)}return o}}.call(s.prototype);var p=e("./editor").Editor;function h(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",a),e.commands.addCommands(c.defaultCommands),function(e){if(e.textInput){var t=e.textInput.getElement(),n=!1;r.addListener(t,"keydown",(function(t){var i=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&i?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&o()}),e),r.addListener(t,"keyup",o,e),r.addListener(t,"blur",o,e)}function o(t){n&&(e.renderer.setMouseCursor(""),n=!1)}}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var o=e[n];if(o.marker){this.session.removeMarker(o.marker);var i=t.indexOf(o);-1!=i&&t.splice(i,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?o=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?o=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),o=t.exec(n,e.args||{})):o=t.multiSelectAction(n,e.args||{});else{var o=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return o}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var o,i=n&&n.keepOrder,a=1==n||n&&n.$byLines,r=this.session,l=this.selection,c=l.rangeList,d=(i?l:c).ranges;if(!d.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=l._eventRegistry;l._eventRegistry={};var p=new s(r);this.inVirtualSelectionMode=!0;for(var h=d.length;h--;){if(a)for(;h>0&&d[h].start.row==d[h-1].end.row;)h--;p.fromOrientedRange(d[h]),p.index=h,this.selection=r.selection=p;var g=e.exec?e.exec(this,t||{}):e(this,t||{});o||void 0===g||(o=g),p.toOrientedRange(d[h])}p.detach(),this.selection=r.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),o}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],o=0;o<t.length;o++)n.push(this.session.getTextRange(t[o]));var i=this.session.getDocument().getNewLineCharacter();(e=n.join(i)).length==(n.length-1)*i.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var o=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;o.row!=t.row||this.session.$clipPositionToDocument(o.row,o.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(e,t,n){if((t=t||{}).needle=e||t.needle,null==t.needle){var o=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(o)}this.$search.set(t);var i=this.$search.findAll(this.session);if(!i.length)return 0;var s=this.multiSelect;n||s.toSingleRange(i[0]);for(var a=i.length;a--;)s.addRange(i[a],!0);return o&&s.rangeList.rangeAtPoint(o.start)&&s.addRange(o,!0),i.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),o=n.cursor==n.end,s=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(s.column=this.selection.$desiredColumn);var a,r=this.session.screenToDocumentPosition(s.row+e,s.column);if(n.isEmpty())c=r;else var l=this.session.documentToScreenPosition(o?n.end:n.start),c=this.session.screenToDocumentPosition(l.row+e,l.column);if(o?(a=i.fromPoints(r,c)).cursor=a.start:(a=i.fromPoints(c,r)).cursor=a.end,a.desiredColumn=s.column,this.selection.inMultiSelectMode){if(t)var d=n.cursor}else this.selection.addRange(n);this.selection.addRange(a),d&&this.selection.substractPoint(d)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,o=n.ranges,i=o.length;i--;)if((r=o[i]).isEmpty()){var s=t.getWordRange(r.start.row,r.start.column);r.start.row=s.start.row,r.start.column=s.start.column,r.end.row=s.end.row,r.end.column=s.end.column}n.mergeOverlappingRanges();var a=[];for(i=o.length;i--;){var r=o[i];a.unshift(t.getTextRange(r))}for(e<0?a.unshift(a.pop()):a.push(a.shift()),i=o.length;i--;){var l=(r=o[i]).clone();t.replace(r,a[i]),r.start.row=l.start.row, |
| 178 |
r.start.column=l.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var o=this.session,i=o.multiSelect.toOrientedRange();if(!i.isEmpty()||((i=o.getWordRange(i.start.row,i.start.column)).cursor=-1==e?i.start:i.end,this.multiSelect.addRange(i),!n)){var s=o.getTextRange(i),a=function(e,t,n){return d.$options.wrap=!0,d.$options.needle=t,d.$options.backwards=-1==n,d.find(e)}(o,s,e);a&&(a.cursor=-1==e?a.start:a.end,this.session.unfold(a),this.multiSelect.addRange(a),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(i.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,o=-1,s=n.filter((function(e){if(e.cursor.row==o)return!0;o=e.cursor.row}));if(n.length&&s.length!=n.length-1){s.forEach((function(e){t.substractPoint(e.cursor)}));var a=0,r=1/0,c=n.map((function(t){var n=t.cursor,o=e.getLine(n.row).substr(n.column).search(/\S/g);return-1==o&&(o=0),n.column>a&&(a=n.column),o<r&&(r=o),o}));n.forEach((function(t,n){var o=t.cursor,s=a-o.column,d=c[n]-r;s>d?e.insert(o,l.stringRepeat(" ",s-d)):e.remove(new i(o.row,o.column,o.row,o.column-s+d)),t.start.column=t.end.column=a,t.start.row=t.end.row=o.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var d=this.selection.getRange(),u=d.start.row,p=d.end.row,h=u==p;if(h){var g,m=this.session.getLength();do{g=this.session.getLine(p)}while(/[=:]/.test(g)&&++p<m);do{g=this.session.getLine(u)}while(/[=:]/.test(g)&&--u>0);u<0&&(u=0),p>=m&&(p=m-1)}var b=this.session.removeFullLines(u,p);b=this.$reAlignText(b,h),this.session.insert({row:u,column:0},b.join("\n")+"\n"),h||(d.start.column=0,d.end.column=b[b.length-1].length),this.selection.setRange(d)}},this.$reAlignText=function(e,t){var n,o,i,s=!0,a=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,o=t[2].length,i=t[3].length,t):(n+o+i!=t[1].length+t[2].length+t[3].length&&(a=!1),n!=t[1].length&&(s=!1),n>t[1].length&&(n=t[1].length),o<t[2].length&&(o=t[2].length),i>t[3].length&&(i=t[3].length),t):[e]})).map(t?c:s?a?function(e){return e[2]?r(n+o-e[2].length)+e[2]+r(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?r(n)+e[2]+r(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function r(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?r(n)+e[2]+r(o-e[2].length+i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(p.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=h,e("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function(e){h(this),e?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);return this.foldingStartMarker.test(o)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,s=e.getLine(t),a=s.search(i);if(-1!=a){for(var r=n||s.length,l=e.getLength(),c=t,d=t;++t<l;){var u=e.getLine(t).search(i);if(-1!=u){if(u<=a){var p=e.getTokenAt(t,0);if(!p||"string"!==p.type)break}d=t}}if(d>c){var h=e.getLine(d).length;return new o(c,r,d,h)}}},this.openingBracketBlock=function(e,t,n,i,s){var a={row:n,column:i+1},r=e.$findClosingBracket(t,a,s);if(r){var l=e.foldWidgets[r.row];return null==l&&(l=e.getFoldWidget(r.row)),"start"==l&&r.row>a.row&&(r.row--,r.column=e.getLine(r.row).length),o.fromPoints(a,r)}},this.closingBracketBlock=function(e,t,n,i,s){var a={row:n,column:i},r=e.$findOpeningBracket(t,a);if(r)return r.column++,a.column--,o.fromPoints(r,a)}}).call(i.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],(function(e,t,n){"use strict";var o=e("../lib/dom"),i=e("../range").Range,s=e("../config").nls;t.showErrorMarker=function(e,t){var n=e.session,a=e.getCursorPosition(),r=a.row,l=n.widgetManager.getWidgetsAtRow(r).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():r-=t;var c,d=function(e,t,n){var o=e.getAnnotations().sort(i.comparePoints);if(o.length){var s=function(e,t,n){for(var o=0,i=e.length-1;o<=i;){var s=o+i>>1,a=n(t,e[s]);if(a>0)o=s+1;else{if(!(a<0))return s;i=s-1}}return-(o+1)}(o,{row:t,column:-1},i.comparePoints);s<0&&(s=-s-1),s>=o.length?s=n>0?0:o.length-1:0===s&&n<0&&(s=o.length-1);var a=o[s];if(a&&n){if(a.row===t){do{a=o[s+=n]}while(a&&a.row===t);if(!a)return o.slice()}var r=[];t=a.row;do{r[n<0?"unshift":"push"](a),a=o[s+=n]}while(a&&a.row==t);return r.length&&r}}}(n,r,t);if(d){var u=d[0];a.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,a.row=u.row,c=e.renderer.$gutterLayer.$annotations[a.row]}else{if(l)return;c={displayText:[s("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var p={row:a.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},h=p.el.appendChild(o.createElement("div")),g=p.el.appendChild(o.createElement("div"));g.className="error_widget_arrow "+c.className;var m=e.renderer.$cursorLayer.getPixelPosition(a).left;g.style.left=m+e.renderer.gutterWidth-5+"px",p.el.className="error_widget_wrapper",h.className="error_widget "+c.className,c.displayText.forEach((function(e,t){h.appendChild(o.createTextNode(e)),t<c.displayText.length-1&&h.appendChild(o.createElement("br"))})),h.appendChild(o.createElement("div"));var b=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return p.destroy(),{command:"null"}};p.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(b),n.widgetManager.removeLineWidget(p),e.off("changeSelection",p.destroy),e.off("changeSession",p.destroy),e.off("mouseup",p.destroy),e.off("change",p.destroy))},e.keyBinding.addKeyboardHandler(b),e.on("changeSelection",p.destroy),e.on("changeSession",p.destroy),e.on("mouseup",p.destroy),e.on("change",p.destroy),e.session.widgetManager.addLineWidget(p),p.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:p.el.offsetHeight})}, |
| 179 |
o.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],(function(e,t,n){"use strict";e("./loader_build")(t);var o=e("./lib/dom"),i=e("./range").Range,s=e("./editor").Editor,a=e("./edit_session").EditSession,r=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var i=e;if(!(e=document.getElementById(i)))throw new Error("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var r=e;a=r.value,e=o.createElement("pre"),r.parentNode.replaceChild(e,r)}else e&&(a=e.textContent,e.innerHTML="");var c=t.createEditSession(a),d=new s(new l(e),c,n),u={document:c,editor:d,onResize:d.resize.bind(d,null)};return r&&(u.textarea=r),d.on("destroy",(function(){u.editor.container.env=null})),d.container.env=d.env=u,d},t.createEditSession=function(e,t){var n=new a(e,t);return n.setUndoManager(new r),n},t.Range=i,t.Editor=s,t.EditSession=a,t.UndoManager=r,t.VirtualRenderer=l;var c=t.config.version;t.version=c})),ace.require(["ace/ace"],(function(t){t&&(t.config.init(!0),t.define=ace.define);var n=function(){return this}();for(var o in n||"undefined"==typeof window||(n=window),n||"undefined"==typeof self||(n=self),n.ace||(n.ace=t),t)t.hasOwnProperty(o)&&(n.ace[o]=t[o]);n.ace.default=n.ace,e&&(e.exports=n.ace)}))},47(e,t,n){e=n.nmd(e),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(e,t,n){"use strict";var o=e("./lib/dom"),i=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,a=e("./lib/lang"),r=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,d=e("./tokenizer").Tokenizer,u=e("./clipboard"),p={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var o=e.session.getTextRange();return n?o.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):o},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return u.getText&&u.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:h.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:h.bind(null,{year:"2-digit"}),CURRENT_MONTH:h.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:h.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:h.bind(null,{month:"short"}),CURRENT_DATE:h.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:h.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:h.bind(null,{weekday:"short"}),CURRENT_HOUR:h.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:h.bind(null,{minute:"2-digit"}),CURRENT_SECOND:h.bind(null,{second:"2-digit"})};function h(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}p.SELECTED_TEXT=p.SELECTION;var g=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=p}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var o={regex:"/("+n("/")+"+)/",onMatch:function(e,t,n){var o=n[0];return o.fmtString=!0,o.guard=e.slice(1,-1),o.flag="",""},next:"formatString"};return e.$tokenizer=new d({start:[{regex:/\\./,onMatch:function(e,t,n){var o=e[1];return("}"==o&&n.length||-1!="`$\\".indexOf(o))&&(e=o),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,o){var i=t(e.substr(1));return o.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(e,t,n){var o=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}}));return n[0].choices=o,[o[0]]},next:"start"},o,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var o=e[1];return"}"==o&&n.length||-1!="`$\\".indexOf(o)?e=o:"n"==o?e="\n":"t"==o?e="\t":-1!="ulULE".indexOf(o)&&(e={changeCase:o,local:o>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var o=n.shift();return o&&(o.flag=e.slice(1,-1)),this.next=o&&o.tabstopId?"start":"",[o||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var o={text:e.slice(2)};return n.unshift(o),[o]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var o=n.shift();return this.next=o&&o.tabstopId?"start":"",[o||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},o,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""), |
| 180 |
!this.variables.hasOwnProperty(t))return"";var o=this.variables[t];return"function"==typeof o&&(o=this.variables[t](e,t,n)),o??""},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var o=t.flag||"",i=t.guard;i=new RegExp(i,o.replace(/[^gim]/g,""));var s="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,a=this,r=e.replace(i,(function(){var e=a.variables.__;a.variables.__=[].slice.call(arguments);for(var t=a.resolveVariables(s,n),o="E",i=0;i<t.length;i++){var r=t[i];if("object"==typeof r)if(t[i]="",r.changeCase&&r.local){var l=t[i+1];l&&"string"==typeof l&&("u"==r.changeCase?t[i]=l[0].toUpperCase():t[i]=l[0].toLowerCase(),t[i+1]=l.substr(1))}else r.changeCase&&(o=r.changeCase);else"U"==o?t[i]=r.toUpperCase():"L"==o&&(t[i]=r.toLowerCase())}return a.variables.__=e,t.join("")}));return r},e.prototype.tmFormatFunction=function(e,t,n){return"upcase"==t.formatFunction?e.toUpperCase():"downcase"==t.formatFunction?e.toLowerCase():e},e.prototype.resolveVariables=function(e,t){for(var n=[],o="",i=!0,s=0;s<e.length;s++){var a=e[s];if("string"!=typeof a){if(a){if(i=!1,a.fmtString){var r=e.indexOf(a,s+1);-1==r&&(r=e.length),a.fmt=e.slice(s+1,r),s=r}if(a.text){var l=this.getVariableValue(t,a.text,o)+"";a.fmtString&&(l=this.tmStrFormat(l,a,t)),a.formatFunction&&(l=this.tmFormatFunction(l,a,t)),l&&!a.ifEnd?(n.push(l),c(a)):!l&&a.ifEnd&&c(a.ifEnd)}else a.elseEnd?c(a.elseEnd):(null!=a.tabstopId||null!=a.changeCase)&&n.push(a)}}else n.push(a),"\n"==a?(i=!0,o=""):i&&(o=/^\t*/.exec(a)[0],i=/\S/.test(a))}function c(t){var n=e.indexOf(t,s+1);-1!=n&&(s=n)}return n},e.prototype.getDisplayTextForSnippet=function(e,t){return m.call(this,e,t).text},e.prototype.insertSnippetForSelection=function(e,t,n){void 0===n&&(n={});var o=m.call(this,e,t,n),i=e.getSelectionRange(),s=e.session.replace(i,o.text),a=new b(e),r=e.inVirtualSelectionMode&&e.selection.index;a.addTabstops(o.tabstops,i.start,s,r)},e.prototype.insertSnippet=function(e,t,n){void 0===n&&(n={});var o=this;if(e.inVirtualSelectionMode)return o.insertSnippetForSelection(e,t,n);e.forEachSelection((function(){o.insertSnippetForSelection(e,t,n)}),null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},e.prototype.$getScope=function(e){var t=e.session.$mode.$id||"";if("html"===(t=t.split("/").pop())||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var n=e.getCursorPosition(),o=e.session.getState(n.row);"object"==typeof o&&(o=o[0]),o.substring&&("js-"==o.substring(0,3)?t="javascript":"css-"==o.substring(0,4)?t="css":"php-"==o.substring(0,4)&&(t="php"))}return t},e.prototype.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],o=this.snippetMap;return o[t]&&o[t].includeScopes&&n.push.apply(n,o[t].includeScopes),n.push("_"),n},e.prototype.expandWithTab=function(e,t){var n=this,o=e.forEachSelection((function(){return n.expandSnippetForSelection(e,t)}),null,{keepOrder:!0});return o&&e.tabstopManager&&e.tabstopManager.tabNext(),o},e.prototype.expandSnippetForSelection=function(e,t){var n,o=e.getCursorPosition(),i=e.session.getLine(o.row),s=i.substring(0,o.column),a=i.substr(o.column),r=this.snippetMap;return this.getActiveScopes(e).some((function(e){var t=r[e];return t&&(n=this.findMatchingSnippet(t,s,a)),!!n}),this),!!n&&(t&&t.dryRun||(e.session.doc.removeInLine(o.row,o.column-n.replaceBefore.length,o.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(e,n.content),this.variables.M__=this.variables.T__=null),!0)},e.prototype.findMatchingSnippet=function(e,t,n){for(var o=e.length;o--;){var i=e[o];if((!i.startRe||i.startRe.test(t))&&(!i.endRe||i.endRe.test(n))&&(i.startRe||i.endRe))return i.matchBefore=i.startRe?i.startRe.exec(t):[""],i.matchAfter=i.endRe?i.endRe.exec(n):[""],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:"",i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(n)[0]:"",i}},e.prototype.register=function(e,t){var n=this.snippetMap,o=this.snippetNameMap,i=this;function s(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function r(e,t,n){return e=s(e),t=s(t),n?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)}function l(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],o[t]={});var s=o[t];if(e.name){var l=s[e.name];l&&i.unregister(l),s[e.name]=e}n[t].push(e),e.prefix&&(e.tabTrigger=e.prefix),!e.content&&e.body&&(e.content=Array.isArray(e.body)?e.body.join("\n"):e.body),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=a.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=r(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger),e.endRe=r(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger))}e||(e=[]),Array.isArray(e)?e.forEach(l):Object.keys(e).forEach((function(t){l(e[t])})),this._signal("registerSnippets",{scope:t})},e.prototype.unregister=function(e,t){var n=this.snippetMap,o=this.snippetNameMap;function i(e){var i=o[e.scope||t];if(i&&i[e.name]){delete i[e.name];var s=n[e.scope||t],a=s&&s.indexOf(e);a>=0&&s.splice(a,1)}}e.content?i(e):Array.isArray(e)&&e.forEach(i)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],o={},i=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=i.exec(e);){if(t[1])try{o=JSON.parse(t[1]),n.push(o)}catch(e){}if(t[4])o.content=t[4].replace(/^\t/gm,""),n.push(o),o={};else{var s=t[2],a=t[3];if("regex"==s){var r=/\/((?:[^\/\\]|\\.)*)|$/g;o.guard=r.exec(a)[1],o.trigger=r.exec(a)[1],o.endTrigger=r.exec(a)[1],o.endGuard=r.exec(a)[1]}else"snippet"==s?(o.tabTrigger=a.match(/^\S*/)[0],o.name||(o.name=a)):s&&(o[s]=a)}}return n},e.prototype.getSnippetByName=function(e,t){var n,o=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var i=o[t];return i&&(n=i[e]),!!n}),this),n},e}();i.implement(g.prototype,s);var m=function(e,t,n){void 0===n&&(n={});var o=e.getCursorPosition(),i=e.session.getLine(o.row),s=e.session.getTabString(),a=i.match(/^\s*/)[0];o.column<a.length&&(a=a.slice(0,o.column)),t=t.replace(/\r/g,"");var r=this.tokenizeTmSnippet(t);r=(r=this.resolveVariables(r,e)).map((function(e){return"\n"!=e||n.excludeExtraIndent?"string"==typeof e?e.replace(/\t/g,s):e:e+a}));var l=[];r.forEach((function(e,t){if("object"==typeof e){var n=e.tabstopId,o=l[n];if(o||((o=l[n]=[]).index=n,o.value="",o.parents={}),-1===o.indexOf(e)){e.choices&&!o.choices&&(o.choices=e.choices),o.push(e);var i=r.indexOf(e,t+1);if(-1!==i){var s=r.slice(t+1,i);s.some((function(e){return"object"==typeof e}))&&!o.value?o.value=s:!s.length||o.value&&"string"==typeof o.value||(o.value=s.join(""))}}}})),l.forEach((function(e){e.length=0}));var c={};function d(e){for(var t=[],n=0;n<e.length;n++){var o=e[n];if("object"==typeof o){if(c[o.tabstopId])continue;o=t[e.lastIndexOf(o,n-1)]||{tabstopId:o.tabstopId}}t[n]=o}return t}for(var u=0;u<r.length;u++){var p=r[u];if("object"==typeof p){var h=p.tabstopId,g=l[h],m=r.indexOf(p,u+1);if(c[h])c[h]===p&&(delete c[h],Object.keys(c).forEach((function(e){g.parents[e]=!0})));else{c[h]=p;var b=g.value;"string"!=typeof b?b=d(b):p.fmt&&(b=this.tmStrFormat(b,p,e)),r.splice.apply(r,[u+1,Math.max(0,m-u)].concat(b,p)),-1===g.indexOf(p)&&g.push(p)}}}var f=0,x=0,y="";return r.forEach((function(e){if("string"==typeof e){var t=e.split("\n");t.length>1?(x=t[t.length-1].length,f+=t.length-1):x+=e.length,y+=e}else e&&(e.start?e.end={row:f,column:x}:e.start={row:f,column:x})})),{text:y,tabstops:l,tokens:r}},b=function(){function e(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=a.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e, |
| 181 |
this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop||{},o=n.parents||{},i=this.tabstops.slice(),s=0;s<i.length;s++){var a=i[s],r=a==n||o[a.index];if(a.rangeList.$bias=r?0:1,"remove"==e.action&&a!==n){var l=a.parents&&a.parents[n.index],c=a.rangeList.pointIndex(e.start,l);c=c<0?-c-1:c+1;var d=a.rangeList.pointIndex(e.end,l);d=d<0?-d-1:d-1;for(var u=a.rangeList.ranges.slice(c,d),p=0;p<u.length;p++)this.removeRange(u[p])}a.rangeList.$onChange(e)}var h=this.session;this.$inChange||!t||1!=h.getLength()||h.getValue()||this.detach()},e.prototype.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges&&e.firstNonLinked){this.$inChange=!0;for(var n=this.session,o=n.getTextRange(e.firstNonLinked),i=0;i<e.length;i++){var s=e[i];if(s.linked){var a=s.original,r=t.snippetManager.tmStrFormat(o,a,this.editor);n.replace(s,r)}}this.$inChange=!1}},e.prototype.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},e.prototype.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),o=0;o<this.ranges.length;o++)if(!this.ranges[o].linked){var i=this.ranges[o].contains(e.row,e.column),s=n||this.ranges[o].contains(t.row,t.column);if(i&&s)return}this.detach()}},e.prototype.onChangeSession=function(){this.detach()},e.prototype.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);(n=Math.min(Math.max(n,1),t))==t&&(n=0),this.selectTabstop(n),this.updateTabstopMarkers(),0===n&&this.detach()},e.prototype.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,(t=this.tabstops[this.index])&&t.length){this.selectedTabstop=t;var n=t.firstNonLinked||t;if(t.choices&&(n.cursor=n.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(n);else{var o=this.editor.multiSelect;o.toSingleRange(n);for(var i=0;i<t.length;i++)t.hasLinkedRanges&&t[i].linked||o.addRange(t[i].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},e.prototype.addTabstops=function(e,t,n){var o=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var i=r.fromPoints(n,n);x(i.start,t),x(i.end,t),e[0]=[i],e[0].index=0}var s=[this.index+1,0],a=this.ranges,c=this.snippetId=(this.snippetId||0)+1;e.forEach((function(e,n){var i=this.$openTabstops[n]||e;i.snippetId=c;for(var d=0;d<e.length;d++){var u=e[d],p=r.fromPoints(u.start,u.end||u.start);f(p.start,t),f(p.end,t),p.original=u,p.tabstop=i,a.push(p),i!=e?i.unshift(p):i[d]=p,u.fmtString||i.firstNonLinked&&o?(p.linked=!0,i.hasLinkedRanges=!0):i.firstNonLinked||(i.firstNonLinked=p)}i.firstNonLinked||(i.hasLinkedRanges=!1),i===e&&(s.push(i),this.$openTabstops[n]=i),this.addTabstopMarkers(i),i.rangeList=i.rangeList||new l,i.rangeList.$bias=0,i.rangeList.addList(i)}),this),s.length>2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var e=this.selectedTabstop.snippetId;0===this.selectedTabstop.index&&e--,this.tabstops.forEach((function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)}),this)}},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();b.prototype.keyboardHandler=new c,b.prototype.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var f=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},x=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};o.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new g;var y=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(y.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],(function(e,t,n){"use strict";var o=e("../virtual_renderer").VirtualRenderer,i=e("../editor").Editor,s=e("../range").Range,a=e("../lib/event"),r=e("../lib/lang"),l=e("../lib/dom"),c=e("../config").nls,d=e("./../lib/useragent"),u=function(e){return"suggest-aria-id:".concat(e)},p=d.isSafari?"menu":"listbox",h=d.isSafari?"menuitem":"option",g=d.isSafari?"aria-current":"aria-selected",m=function(e){var t=new o(e);t.$maxLines=4;var n=new i(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n} |
| 182 |
;l.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),t.AcePopup=function(e){var t=l.createElement("div"),n=m(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.renderer.$textLayer.element.setAttribute("role",p),n.renderer.$textLayer.element.setAttribute("aria-roledescription",c("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),n.renderer.$textLayer.element.setAttribute("aria-label",c("autocomplete.popup.aria-label","Autocomplete suggestions")),n.renderer.textarea.setAttribute("aria-hidden","true"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var o,i=function(){};n.focus=i,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=i,n.renderer.$cursorLayer.element.style.opacity="0",n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",(function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),b.start.row=b.end.row=t.row,e.stop()}));var d=new s(-1,0,-1,1/0),b=new s(-1,0,-1,1/0);b.id=n.session.addMarker(b,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?d.id&&(n.session.removeMarker(d.id),d.id=null):d.id=n.session.addMarker(d,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",(function(e){if(o){if(o.x!=e.x||o.y!=e.y){(o=e).scrollTop=n.renderer.scrollTop,n.isMouseOver=!0;var t=o.getDocumentPosition().row;d.start.row!=t&&(d.id||n.setRow(t),x(t))}}else o=e})),n.renderer.on("beforeRender",(function(){if(o&&-1!=d.start.row){o.$pos=null;var e=o.getDocumentPosition().row;d.id||n.setRow(e),x(e,!0)}})),n.renderer.on("afterRender",(function(){for(var e=n.renderer.$textLayer,t=e.config.firstRow,o=e.config.lastRow;t<=o;t++){var i=e.element.childNodes[t-e.config.firstRow];i.setAttribute("role",h),i.setAttribute("aria-roledescription",c("autocomplete.popup.item.aria-roledescription","item")),i.setAttribute("aria-setsize",n.data.length),i.setAttribute("aria-describedby","doc-tooltip"),i.setAttribute("aria-posinset",t+1);var s=n.getData(t);if(s){var a="".concat(s.caption||s.value).concat(s.meta?", ".concat(s.meta):"");i.setAttribute("aria-label",a)}i.querySelectorAll(".ace_completion-highlight").forEach((function(e){e.setAttribute("role","mark")}))}})),n.renderer.on("afterRender",(function(){var e=n.getRow(),t=n.renderer.$textLayer,o=t.element.childNodes[e-t.config.firstRow],i=document.activeElement;if(o!==n.selectedNode&&n.selectedNode&&(l.removeCssClass(n.selectedNode,"ace_selected"),n.selectedNode.removeAttribute(g),n.selectedNode.removeAttribute("id")),i.removeAttribute("aria-activedescendant"),n.selectedNode=o,o){var s=u(e);l.addCssClass(o,"ace_selected"),o.id=s,t.element.setAttribute("aria-activedescendant",s),i.setAttribute("aria-activedescendant",s),o.setAttribute(g,"true")}}));var f=function(){x(-1)},x=function(e,t){e!==d.start.row&&(d.start.row=d.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return d.start.row},a.addListener(n.container,"mouseout",(function(){n.isMouseOver=!1,f()})),n.on("hide",f),n.on("changeSelection",f),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var y=n.session.bgTokenizer;return y.$tokenizeRow=function(e){var t=n.data[e],o=[];if(!t)return o;"string"==typeof t&&(t={value:t});var i=t.caption||t.value||t.name;function s(e,n){e&&o.push({type:(t.className||"")+(n||""),value:e})}for(var a=i.toLowerCase(),r=(n.filterText||"").toLowerCase(),l=0,c=0,d=0;d<=r.length;d++)if(d!=c&&(t.matchMask&1<<d||d==r.length)){var u=r.slice(c,d);c=d;var p=a.indexOf(u,l);if(-1==p)continue;s(i.slice(l,p),""),l=p+u.length,s(i.slice(p,l),"completion-highlight")}return s(i.slice(l,i.length),""),o.push({type:"completion-spacer",value:" "}),t.meta&&o.push({type:"completion-meta",value:t.meta}),t.message&&o.push({type:"completion-message",value:t.message}),o},y.$updateOnChange=i,y.start=i,n.session.$computeWidth=function(){return this.screenWidth=0},n.isOpen=!1,n.isTopdown=!1,n.autoSelect=!0,n.filterText="",n.isMouseOver=!1,n.data=[],n.setData=function(e,t){n.filterText=t||"",n.setValue(r.stringRepeat("\n",e.length),-1),n.data=e||[],n.setRow(0)},n.getData=function(e){return n.data[e]},n.getRow=function(){return b.start.row},n.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,e)),b.start.row!=e&&(n.selection.clearSelection(),b.start.row=b.end.row=e||0,n.session._emit("changeBackMarker"),n.moveCursorTo(e||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",(function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()})),n.hide=function(){this.container.style.display="none",n.anchorPos=null,n.anchor=null,n.isOpen&&(n.isOpen=!1,this._signal("hide"))},n.tryShow=function(e,t,i,s){if(!s&&n.isOpen&&n.anchorPos&&n.anchor&&n.anchorPos.top===e.top&&n.anchorPos.left===e.left&&n.anchor===i)return!0;var a=this.container,r=this.renderer.scrollBar.width||10,c=window.innerHeight-r,d=window.innerWidth-r,u=this.renderer,p=u.$maxLines*t*1.4,h={top:0,bottom:0,left:0},g=c-e.top-3*this.$borderSize-t,m=e.top-3*this.$borderSize;i||(i=m<=g||g>=p?"bottom":"top"),"top"===i?(h.bottom=e.top-this.$borderSize,h.top=h.bottom-p):"bottom"===i&&(h.top=e.top+t+this.$borderSize,h.bottom=h.top+p);var b=h.top>=0&&h.bottom<=c;if(!s&&!b)return!1;u.$maxPixelHeight=b?null:"top"===i?m:g,"top"===i?(a.style.top="",a.style.bottom=c+r-h.bottom+"px", |
| 183 |
n.isTopdown=!1):(a.style.top=h.top+"px",a.style.bottom="",n.isTopdown=!0),a.style.display="";var f=e.left;return f+a.offsetWidth>d&&(f=d-a.offsetWidth),a.style.left=f+"px",a.style.right="",l.$fixPositionBug(a),n.isOpen||(n.isOpen=!0,this._signal("show"),o=null),n.anchorPos=e,n.anchor=i,!0},n.show=function(e,t,n){this.tryShow(e,t,n?"bottom":void 0,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n},t.$singleLineEditor=m,t.getAriaId=u})),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],(function(e,t,n){"use strict";var o=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){for(var o="doc-tooltip ",i=0;i<this._lines.length;i++)o+="ace-inline-screenreader-line-".concat(i," ");n.setAttribute("aria-describedby",o)}}.bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=e.split(/\r\n|\r|\n/);var t=this.createCodeBlock();this.screenReaderDiv.appendChild(t)},e.prototype.destroy=function(){this.screenReaderDiv.remove()},e.prototype.createCodeBlock=function(){var e=document.createElement("pre");e.setAttribute("id","ace-inline-screenreader");for(var t=0;t<this._lines.length;t++){var n=document.createElement("code");n.setAttribute("id","ace-inline-screenreader-line-".concat(t));var o=document.createTextNode(this._lines[t]);n.appendChild(o),e.appendChild(n)}return e},e}();t.AceInlineScreenReader=o})),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],(function(e,t,n){"use strict";var o=e("../snippets").snippetManager,i=e("./inline_screenreader").AceInlineScreenReader,s=function(){function e(){this.editor=null}return e.prototype.show=function(e,t,n){if(n=n||"",e&&this.editor&&this.editor!==e&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!e||!t)return!1;this.inlineScreenReader||(this.inlineScreenReader=new i(e));var s=t.snippet?o.getDisplayTextForSnippet(e,t.snippet):t.value;return!(t.hideInlinePreview||!s||!s.startsWith(n)||(this.editor=e,this.inlineScreenReader.setScreenReaderContent(s),""===(s=s.slice(n.length))?e.removeGhostText():e.setGhostText(s),0))},e.prototype.isOpen=function(){return!!this.editor&&!!this.editor.renderer.$ghostText},e.prototype.hide=function(){return!!this.editor&&(this.editor.removeGhostText(),!0)},e.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},e}();t.AceInline=s})),ace.define("ace/autocomplete/util",["require","exports","module"],(function(e,t,n){"use strict";t.parForEach=function(e,t,n){var o=0,i=e.length;0===i&&n();for(var s=0;s<i;s++)t(e[s],(function(e,t){++o===i&&n(e,t)}))};var o=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||o;for(var i=[],s=t-1;s>=0&&n.test(e[s]);s--)i.push(e[s]);return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||o;for(var i=[],s=t;s<e.length&&n.test(e[s]);s++)i.push(e[s]);return i},t.getCompletionPrefix=function(e){var t,n=e.getCursorPosition(),o=e.session.getLine(n.row);return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!t&&e&&(t=this.retrievePrecedingIdentifier(o,n.column,e))}.bind(this))}.bind(this)),t||this.retrievePrecedingIdentifier(o,n.column)},t.triggerAutocomplete=function(e,t){return t=t??e.session.getPrecedingCharacter(),e.completers.some((function(e){if(e.triggerCharacters&&Array.isArray(e.triggerCharacters))return e.triggerCharacters.includes(t)}))}})),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],(function(e,t,n){"use strict";var o=e("./keyboard/hash_handler").HashHandler,i=e("./autocomplete/popup").AcePopup,s=e("./autocomplete/inline").AceInline,a=e("./autocomplete/popup").getAriaId,r=e("./autocomplete/util"),l=e("./lib/lang"),c=e("./lib/dom"),d=e("./snippets").snippetManager,u=e("./config"),p=e("./lib/event"),h=e("./lib/scroll").preventParentScroll,g=function(e,t){t.completer&&t.completer.destroy()},m=function(){function e(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new o,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=l.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=l.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=l.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=l.delayedCall(function(){this.stickySelection=!0}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=l.delayedCall(function(){var t=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!t||0===this.editor.completers.length||(this.completions=new f(e.completionsForLoading),this.openPopup(this.editor,t.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}.bind(this),this.stickySelectionDelay)}return Object.defineProperty(e,"completionsForLoading",{get:function(){return[{caption:u.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),e.prototype.$init=function(){return this.popup=new i(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),p.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},e.prototype.$initInline=function(){if(this.inlineEnabled&&!this.inlineRenderer)return this.inlineRenderer=new s,this.inlineRenderer},e.prototype.getPopup=function(){return this.popup||this.$init()},e.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},e.prototype.$seen=function(e){!this.hasSeen.has(e)&&e&&e.completer&&e.completer.onSeen&&"function"==typeof e.completer.onSeen&&(e.completer.onSeen(this.editor,e),this.hasSeen.add(e))},e.prototype.$onPopupChange=function(e){if(this.inlineRenderer&&this.inlineEnabled){var t=e?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(t),this.popup.isMouseOver&&this.setSelectOnHover)return void this.tooltipTimer.call(null,null);this.popupTimer.schedule(),this.tooltipTimer.schedule() |
| 184 |
}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},e.prototype.$updateGhostText=function(e){var t=this.base.row,n=this.base.column,o=this.editor.getCursorPosition().column,i=this.editor.session.getLine(t).slice(n,o);this.inlineRenderer.show(this.editor,e,i)?this.$seen(e):this.inlineRenderer.hide()},e.prototype.$onPopupRender=function(){var e=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);!n||e&&!n.hideInlinePreview||this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach((function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})})),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,o=t.$cursorLayer.getPixelPosition(this.base,!0);o.left-=this.popup.getTextLeftOffset();var i=e.container.getBoundingClientRect();o.top+=i.top-t.layerConfig.offset,o.left+=i.left-e.renderer.scrollLeft,o.left+=t.gutterWidth;var s={top:o.top,left:o.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(s.top+=t.$ghostTextWidget.el.offsetHeight);var a=e.container.getBoundingClientRect().bottom-n,r=a<s.top?{top:a,left:s.left}:s;this.popup.tryShow(r,n,"bottom")||this.popup.tryShow(o,n,"top")||this.popup.show(o,n)},e.prototype.openPopup=function(e,t,n){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var o,i=this.popup.getRow(),s=this.popup.data[i];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:a(this.popup.getRow()),inline:this.inlineEnabled}),e.keyBinding.addKeyboardHandler(this.keyboardHandler),this.stickySelection&&(o=this.popup.data.indexOf(s)),o&&-1!==o||(o=0),this.popup.setRow(this.autoSelect?o:-1),o===i&&s!==this.completions.filtered[o]&&this.$onPopupChange();var r=this.inlineRenderer&&this.inlineEnabled;if(o===i&&r){var l=this.popup.getData(this.popup.getRow());this.$updateGhostText(l)}n||(this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},e.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},e.prototype.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},e.prototype.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),o=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),i=this.popup&&this.popup.container;t==n||t.parentNode==i||o||t==this.tooltipNode||e.relatedTarget==n||this.detach()},e.prototype.mousedownListener=function(e){this.detach()},e.prototype.mousewheelListener=function(e){this.popup&&!this.popup.isMouseOver&&this.detach()},e.prototype.mouseOutListener=function(e){this.popup.isOpen&&this.$updatePopupPosition()},e.prototype.goTo=function(e){this.popup.goTo(e)},e.prototype.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(""===e.value)return this.detach();var n=this.completions,o=this.getCompletionProvider().insertMatch(this.editor,e,n.filterText,t);return this.completions==n&&this.detach(),o},e.prototype.showPopup=function(e,t){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,t)},e.prototype.getCompletionProvider=function(e){return this.completionProvider||(this.completionProvider=new b(e)),this.completionProvider},e.prototype.gatherCompletions=function(e,t){return this.getCompletionProvider().gatherCompletions(e,t)},e.prototype.updateCompletions=function(t,n){if(t&&this.base&&this.completions){var o=this.editor.getCursorPosition();if((s=this.editor.session.getTextRange({start:this.base,end:o}))==this.completions.filterText)return;return this.completions.setFilter(s),this.completions.filtered.length&&(1!=this.completions.filtered.length||this.completions.filtered[0].value!=s||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,s,t):this.detach()}if(n&&n.matches)return o=this.editor.getSelectionRange().start,this.base=this.editor.session.doc.createAnchor(o.row,o.column),this.base.$insertRight=!0,this.completions=new f(n.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",t);var i=this.editor.getSession(),s=(o=this.editor.getCursorPosition(),r.getCompletionPrefix(this.editor));this.base=i.doc.createAnchor(o.row,o.column-s.length),this.base.$insertRight=!0;var a={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:s,pos:o}).provideCompletions(this.editor,a,function(n,o,i){var s=o.filtered,a=r.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),i){if(!s.length){var l=!this.autoShown&&this.emptyMessage;if("function"==typeof l&&(l=this.emptyMessage(a)),l){var c=[{caption:l,value:""}];return this.completions=new f(c),this.openPopup(this.editor,a,t),this.popup.renderer.setStyle("ace_loading",!1),void this.popup.renderer.setStyle("ace_empty-message",!0)}return this.detach()}if(1==s.length&&s[0].value==a&&!s[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&1==s.length)return this.insertMatch(s[0])}this.completions=!i&&this.showLoadingState?new f(e.completionsForLoading.concat(s),o.filterText):o,this.openPopup(this.editor,a,t),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!i)}.bind(this)),!this.showLoadingState||this.autoShown||this.popup&&this.popup.isOpen||this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},e.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},e.prototype.updateDocTooltip=function(){ |
| 185 |
var e=this.popup,t=this.completions&&this.completions.filtered,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),o=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var i=this.editor.completers.length,s=0;s<i;s++){var a=this.editor.completers[s];if(a.getDocTooltip&&n.completerId===a.id){o=a.getDocTooltip(n);break}}if(o||"string"==typeof n||(o=n),"string"==typeof o&&(o={docText:o}),!o||!o.docHTML&&!o.docText)return this.hideDocTooltip();this.showDocTooltip(o)},e.prototype.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=c.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",h));var t=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(t.isDark?"ace_dark ":"")+(t.cssClass||"");var n=this.tooltipNode;e.docHTML?n.innerHTML=e.docHTML:e.docText&&(n.textContent=e.docText),n.parentNode||this.popup.container.appendChild(this.tooltipNode);var o=this.popup,i=o.container.getBoundingClientRect(),s=400,a=300,r=o.renderer.scrollBar.width||10,l=i.left,d=window.innerWidth-i.right-r,u=o.isTopdown?window.innerHeight-r-i.bottom:i.top,p=[Math.min(d/s,1),Math.min(l/s,1),.9*Math.min(u/a,1)],g=Math.max.apply(Math,p),m=n.style;m.display="block",g==p[0]||p[0]>=1?(m.left=i.right+1+"px",m.right="",m.maxWidth=s*g+"px",m.top=i.top+"px",m.bottom="",m.maxHeight=Math.min(window.innerHeight-r-i.top,a)+"px"):g==p[1]||p[1]>=1?(m.right=window.innerWidth-i.left+"px",m.left="",m.maxWidth=s*g+"px",m.top=i.top+"px",m.bottom="",m.maxHeight=Math.min(window.innerHeight-r-i.top,a)+"px"):g==p[2]&&(m.left=i.left+"px",m.right="",m.maxWidth=Math.min(s,window.innerWidth-i.left)+"px",o.isTopdown?(m.top=i.bottom+"px",m.bottom="",m.maxHeight=Math.min(window.innerHeight-r-i.bottom,a)+"px"):(m.top="",m.bottom=window.innerHeight-i.top+"px",m.maxHeight=Math.min(i.top,a)+"px")),c.$fixPositionBug(n)},e.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},e.prototype.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if("A"==t.nodeName&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}},e.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var e=this.popup.container;e&&e.parentNode&&e.parentNode.removeChild(e)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",g),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},e.for=function(t){return t.completer instanceof e||(t.completer&&(t.completer.destroy(),t.completer=null),u.get("sharedPopups")?(e.$sharedInstance||(e.$sharedInstance=new e),t.completer=e.$sharedInstance):(t.completer=new e,t.once("destroy",g))),t.completer},e}();m.prototype.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},Backspace:function(e){e.execCommand("backspace"),!r.getCompletionPrefix(e)&&e.completer&&e.completer.detach()},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},m.startCommand={name:"startAutocomplete",exec:function(e,t){var n=m.for(e);n.autoInsert=!1,n.autoSelect=!0,n.autoShown=!1,n.showPopup(e,t),n.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var b=function(){function e(e){this.initialPosition=e,this.active=!0}return e.prototype.insertByIndex=function(e,t,n){return!(!this.completions||!this.completions.filtered)&&this.insertMatch(e,this.completions.filtered[t],n)},e.prototype.insertMatch=function(e,t,n){if(!t)return!1;if(e.startOperation({command:{name:"insertMatch"}}),t.completer&&t.completer.insertMatch)t.completer.insertMatch(e,t);else{if(!this.completions)return!1;var o=this.completions.filterText.length,i=0;if(t.range&&t.range.start.row===t.range.end.row&&(o-=this.initialPosition.prefix.length,o+=this.initialPosition.pos.column-t.range.start.column,i+=t.range.end.column-this.initialPosition.pos.column),o||i){var s;s=e.selection.getAllRanges?e.selection.getAllRanges():[e.getSelectionRange()];for(var a,r=0;a=s[r];r++)a.start.column-=o,a.end.column+=i,e.session.remove(a)}t.snippet?d.insertSnippet(e,t.snippet):this.$insertString(e,t),t.completer&&t.completer.onInsert&&"function"==typeof t.completer.onInsert&&t.completer.onInsert(e,t),t.command&&"startAutocomplete"===t.command&&e.execCommand(t.command)}return e.endOperation(),!0},e.prototype.$insertString=function(e,t){var n=t.value||t;e.execCommand("insertstring",n)},e.prototype.gatherCompletions=function(e,t){var n=e.getSession(),o=e.getCursorPosition(),i=r.getCompletionPrefix(e),s=[];this.completers=e.completers;var a=e.completers.length;return e.completers.forEach((function(l,c){l.getCompletions(e,n,o,i,(function(n,o){l.hideInlinePreview&&(o=o.map((function(e){return Object.assign(e,{hideInlinePreview:l.hideInlinePreview})}))),!n&&o&&(s=s.concat(o)),t(null,{prefix:r.getCompletionPrefix(e),matches:s,finished:0==--a})}))})),!0},e.prototype.provideCompletions=function(e,t,n){var o=function(e){var o=e.prefix,i=e.matches;this.completions=new f(i),t.exactMatch&&(this.completions.exactMatch=!0),t.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(o),(e.finished||this.completions.filtered.length)&&n(null,this.completions,e.finished)}.bind(this),i=!0,s=null;if(this.gatherCompletions(e,function(e,t){this.active&&(e&&(n(e,[],!0),this.detach()),0===t.prefix.indexOf(t.prefix)&&(i?s=t:o(t)))}.bind(this)),i=!1,s){var a=s;s=null,o(a)}},e.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach((function(e){"function"==typeof e.cancel&&e.cancel()}))},e}(),f=function(){function e(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1,this.ignoreCaption=!1}return e.prototype.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var n=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)})),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],o=t.toUpperCase(),i=t.toLowerCase();e:for(var s,a=0;s=e[a];a++)if(s.skipFilter)s.$score=s.score,n.push(s);else{var r=!this.ignoreCaption&&s.caption||s.value||s.snippet;if(r){var l,c,d=-1,u=0,p=0;if(this.exactMatch){if(t!==r.substr(0,t.length))continue e}else{var h=r.toLowerCase().indexOf(i);if(h>-1)p=h;else for(var g=0;g<t.length;g++){var m=r.indexOf(i[g],d+1),b=r.indexOf(o[g],d+1);if((l=m>=0&&(b<0||m<b)?m:b)<0)continue e;(c=l-d-1)>0&&(-1===d&&(p+=10),p+=c,u|=1<<g),d=l}}s.matchMask=u,s.exactMatch=p?0:1,s.$score=(s.score||0)-p,n.push(s)}}return n},e}();t.Autocomplete=m,t.CompletionProvider=b,t.FilteredList=f})),ace.define("ace/marker_group",["require","exports","module"],(function(e,t,n){"use strict";var o=function(){function e(e,t){t&&(this.markerType=t.markerType),this.markers=[],this.session=e,e.addDynamicMarker(this)}return e.prototype.getMarkerAtPosition=function(e){ |
| 186 |
return this.markers.find((function(t){return t.range.contains(e.row,e.column)}))},e.prototype.markersComparator=function(e,t){return e.range.start.row-t.range.start.row},e.prototype.setMarkers=function(e){this.markers=e.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},e.prototype.update=function(e,t,n,o){if(this.markers&&this.markers.length)for(var i,s=o.firstRow,a=o.lastRow,r=0,l=0,c=0;c<this.markers.length;c++){var d=this.markers[c];if(!(d.range.end.row<s||d.range.start.row>a||(d.range.start.row===l?r++:(l=d.range.start.row,r=0),r>200))){var u=d.range.clipRows(s,a);if(u.start.row!==u.end.row||u.start.column!==u.end.column){var p=u.toScreenRange(n);p.isEmpty()?(i=n.getNextFoldLine(u.end.row,i))&&i.end.row>u.end.row&&(s=i.end.row):"fullLine"===this.markerType?t.drawFullLineMarker(e,p,d.className,o):p.isMultiLine()?"line"===this.markerType?t.drawMultiLineMarker(e,p,d.className,o):t.drawTextMarker(e,p,d.className,o):t.drawSingleLineMarker(e,p,d.className+" ace_br15",o)}}}},e}();o.prototype.MAX_MARKERS=1e4,t.MarkerGroup=o})),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],(function(e,t,n){var o=e("../range").Range,i=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.id="textCompleter",t.getCompletions=function(e,t,n,s,a){var r=function(e,t){var n=function(e,t){return e.getTextRange(o.fromPoints({row:0,column:0},t)).split(i).length-1}(e,t),s=e.getValue().split(i),a=Object.create(null),r=s[n];return s.forEach((function(e,t){if(e&&e!==r){var o=Math.abs(n-t),i=s.length-o;a[e]?a[e]=Math.max(i,a[e]):a[e]=i}})),a}(t,n);a(null,Object.keys(r).map((function(e){return{caption:e,value:e,score:r[e],meta:"local"}})))}})),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],(function(e,t,n){"use strict";var o=e("../snippets").snippetManager,i=e("../autocomplete").Autocomplete,s=e("../config"),a=e("../lib/lang"),r=e("../autocomplete/util"),l=e("../marker_group").MarkerGroup,c=e("../autocomplete/text_completer"),d={getCompletions:function(e,t,n,o,i){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,o,i);var s=e.session.getState(n.row),a=t.$mode.getCompletions(s,t,n,o);i(null,a=a.map((function(e){return e.completerId=d.id,e})))},id:"keywordCompleter"},u={getCompletions:function(e,t,n,i,s){var a=[],r=t.getTokenAt(n.row,n.column);r&&r.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?a.push("html-tag"):a=o.getActiveScopes(e);var l=o.snippetMap,c=[];a.forEach((function(e){for(var t=l[e]||[],n=t.length;n--;){var o=t[n],i=o.name||o.tabTrigger;i&&c.push({caption:i,snippet:o.content,meta:o.tabTrigger&&!o.name?o.tabTrigger+"⇥ ":"snippet",completerId:u.id})}}),this),s(null,c)},getDocTooltip:function(e){var t,n;e.snippet&&!e.docHTML&&(e.docHTML=["<b>",a.escapeHTML(e.caption),"</b>","<hr></hr>",a.escapeHTML((t=e.snippet,n={},t.replace(/\${(\d+)(:(.*?))?}/g,(function(e,t,o,i){return n[t]=i||""})).replace(/\$(\d+?)/g,(function(e,t){return n[t]}))))].join(""))},id:"snippetCompleter"},p=[u,c,d];t.setCompleters=function(e){p.length=0,e&&p.push.apply(p,e)},t.addCompleter=function(e){p.push(e)},t.textCompleter=c,t.keyWordCompleter=d,t.snippetCompleter=u;var h,g={name:"expandSnippet",exec:function(e){return o.expandWithTab(e)},bindKey:"Tab"},m=function(e,t){b(t.session.$mode)},b=function(e){"string"==typeof e&&(e=s.$modes[e]),e&&(o.files||(o.files={}),f(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(b))},f=function(e,t){t&&e&&!o.files[e]&&(o.files[e]={},s.loadModule(t,(function(t){t&&(o.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=o.parseSnippetFile(t.snippetText)),o.register(t.snippets||[],t.scope),t.includeScopes&&(o.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){b("ace/mode/"+e)}))))})))},x=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!r.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&!n){h=e;var o=e.editor.$liveAutocompletionDelay;o?y.delay(o):v(e)}},y=a.delayedCall((function(){v(h)}),0),v=function(e){var t=e.editor,n=r.getCompletionPrefix(t),o=e.args,s=r.triggerAutocomplete(t,o);if(n&&n.length>=t.$liveAutocompletionThreshold||s){var a=i.for(t);a.autoShown=!0,a.showPopup(t)}},k=e("../editor").Editor;e("../config").defineOptions(k.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(i.for(this),this.completers||(this.completers=Array.isArray(e)?e:p),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:p),this.commands.on("afterExec",x)):this.commands.off("afterExec",x)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(g),this.on("changeMode",m),m(0,this)):(this.commands.removeCommand(g),this.off("changeMode",m))},value:!1}}),t.MarkerGroup=l})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))},9(e,t,n){e=n.nmd(e),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],(function(e,t,n){"use strict";var o,i=e("./lib/oop"),s=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),a=e("./editor").Editor,r=e("./virtual_renderer").VirtualRenderer,l=e("./edit_session").EditSession;(function(){i.implement(this,s),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new a(new r(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<e;)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<e;)this.$createEditor(),this.$splits++}else for(;this.$splits>e;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new l(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;n=null==t?this.$cEditor:this.$editors[t];var o=this.$editors.some((function(t){return t.session===e}));return o&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight |
| 187 |
;if(this.$orientation==this.BESIDE)for(var o=t/this.$splits,i=0;i<this.$splits;i++)(e=this.$editors[i]).container.style.width=o+"px",e.container.style.top="0px",e.container.style.left=i*o+"px",e.container.style.height=n+"px",e.resize();else{var s=n/this.$splits;for(i=0;i<this.$splits;i++)(e=this.$editors[i]).container.style.width=t+"px",e.container.style.top=i*s+"px",e.container.style.left="0px",e.container.style.height=s+"px",e.resize()}}}).call((o=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))}).prototype),t.Split=o})),ace.define("ace/ext/split",["require","exports","module","ace/ext/split","ace/split"],(function(e,t,n){"use strict";n.exports=e("../split")})),ace.require(["ace/ext/split"],(function(t){e&&(e.exports=t)}))},3158(e,t,n){e=n.nmd(e),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=(e("../lib/lang"), |
| 188 |
e("./text_highlight_rules").TextHighlightRules),s=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",r=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",l=t.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",c=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",d=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",u=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",h=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":r,"support.type":s,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:d},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{ |
| 189 |
token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+d+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:u},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};o.inherits(h,i),t.CssHighlightRules=h})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,s=e.findMatchingBracket({row:t,column:i});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new o(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i})),ace.define("ace/mode/css_completions",["require","exports","module"],(function(e,t,n){"use strict";var o={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"==typeof e[t]){var n=t.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()}));o.hasOwnProperty(n)||(o[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,o){if(this.completionsDefined||this.defineCompletions(),"ruleset"===e||"ace/mode/scss"==t.$mode.$id){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,o)):this.getPropertyCompletions(e,t,n,o,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){return s=s||!1,Object.keys(o).map((function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}}))},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),a=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!a)return[];var r=[];return a in o&&"object"==typeof o[a]&&(r=Object.keys(o[a])),r.map((function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}}))}}).call(i.prototype),t.CssCompletions=i})),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],(function(e,t,n){"use strict";var o=e("../../lib/oop"),i=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),s=e("../../token_iterator").TokenIterator,a=function(){this.inherit(i),this.add("colon","insertion",(function(e,t,n,o,i){if(":"===i&&n.selection.isEmpty()){var a=n.getCursorPosition(),r=new s(o,a.row,a.column),l=r.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=r.stepBackward()),l&&"support.type"===l.type){var c=o.doc.getLine(a.row);if(":"===c.substring(a.column,a.column+1))return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(c.substring(a.column)))return{text:":;",selection:[1,1]}}}})),this.add("colon","deletion",(function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&":"===a){var r=n.getCursorPosition(),l=new s(o,r.row,r.column),c=l.getCurrentToken() |
| 190 |
;if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&"support.type"===c.type&&";"===o.doc.getLine(i.start.row).substring(i.end.column,i.end.column+1))return i.end.column++,i}})),this.add("semicolon","insertion",(function(e,t,n,o,i){if(";"===i&&n.selection.isEmpty()){var s=n.getCursorPosition();if(";"===o.doc.getLine(s.row).substring(s.column,s.column+1))return{text:"",selection:[1,1]}}})),this.add("!important","insertion",(function(e,t,n,o,i){if("!"===i&&n.selection.isEmpty()){var s=n.getCursorPosition(),a=o.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(a.substring(s.column)))return{text:"!important",selection:[10,10]}}}))};o.inherits(a,i),t.CssBehaviour=a})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var o=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(o)?"start":i},this.getFoldWidgetRange=function(e,t,n,o){var i,s=e.getLine(n);if(this.startRegionRe.test(s))return this.getCommentRegionBlock(e,s,n);if(i=s.match(this.foldingStartMarker)){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var r=e.getCommentFoldRange(n,a+i[0].length,1);return r&&!r.isMultiLine()&&(o?r=this.getSectionRange(e,n):"all"!=t&&(r=null)),r}return"markbegin"!==t&&(i=s.match(this.foldingStopMarker))?(a=i.index+i[0].length,i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)):void 0},this.getSectionRange=function(e,t){for(var n=e.getLine(t),o=n.search(/\S/),s=t,a=n.length,r=t+=1,l=e.getLength();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(o>c)break;var d=this.getFoldWidgetRange(e,"all",t);if(d){if(d.start.row<=s)break;if(d.isMultiLine())t=d.end.row;else if(o==c)break}r=t}}return new i(s,a,r,e.getLine(r).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),s=e.getLength(),a=n,r=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<s;){t=e.getLine(n);var c=r.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>a)return new i(a,o,n,t.length)}}.call(a.prototype)})),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,r=e("../worker/worker_client").WorkerClient,l=e("./css_completions").CssCompletions,c=e("./behaviour/css").CssBehaviour,d=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.$outdent=new a,this.$behaviour=new c,this.$completer=new l,this.foldingRules=new d};o.inherits(u,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;return i.length&&"comment"==i[i.length-1].type||t.match(/^.*\{\s*$/)&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){var t=new r(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(u.prototype),t.Mode=u})),ace.require(["ace/mode/css"],(function(t){e&&(e.exports=t)}))},9072(e,t,n){e=n.nmd(e),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};o.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s})),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",r=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", |
| 191 |
keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),o="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",s="(function)(\\s*)(\\*?)",r={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+a+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),c("no_regex"),r,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{include:"numeric_constants"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)"+s+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)"+s+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+s+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void)\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:s+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),c("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{ |
| 192 |
token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{include:"numeric_constants"},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[c("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:o},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:o},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}],numeric_constants:[{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F_]+|[oO][0-7_]+|[bB][01_]+)\b/},{token:"constant.numeric",regex:/(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:[eE][+-]?\d+\b)?/}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:o},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),e&&0==e.jsx||l.call(this)),this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};function l(){var e=a.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var o="/"==e.charAt(1)?2:1;return 1==o?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==o&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==o?"":"end-")+"tag-open.xml",value:e.slice(0,o)},{type:"meta.tag.tag-name.xml",value:e.substr(o)}]},regex:"</?(?:"+e+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,c("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function c(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}o.inherits(r,s),t.JavaScriptHighlightRules=r})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,s=e.findMatchingBracket({row:t,column:i});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new o(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i})),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],(function(e,t,n){"use strict";var o=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator;function a(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=function(){this.add("string_dquotes","insertion",(function(e,t,n,o,i){if('"'==i||"'"==i){var r=i,l=o.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:r+l+r,selection:!1};var c=n.getCursorPosition(),d=o.doc.getLine(c.row).substring(c.column,c.column+1),u=new s(o,c.row,c.column),p=u.getCurrentToken();if(d==r&&(a(p,"attribute-value")||a(p,"string")))return{text:"",selection:[1,1]};if(p||(p=u.stepBackward()),!p)return;for(;a(p,"tag-whitespace")||a(p,"whitespace");)p=u.stepBackward();var h=!d||d.match(/\s/);if(a(p,"attribute-equals")&&(h||">"==d)||a(p,"decl-attribute-equals")&&(h||"?"==d))return{text:r+r,selection:[1,1]}}})),this.add("string_dquotes","deletion",(function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&('"'==s||"'"==s)&&o.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==s)return i.end.column++,i})),this.add("autoclosing","insertion",(function(e,t,n,o,i){if(">"==i){var r=n.getSelectionRange().start,l=new s(o,r.row,r.column),c=l.getCurrentToken()||l.stepBackward();if(!c||!(a(c,"tag-name")||a(c,"tag-whitespace")||a(c,"attribute-name")||a(c,"attribute-equals")||a(c,"attribute-value")))return;if(a(c,"reference.attribute-value"))return;if(a(c,"attribute-value")){var d=l.getCurrentTokenColumn()+c.value.length;if(r.column<d)return;if(r.column==d){var u=l.stepForward();if(u&&a(u,"attribute-value"))return;l.stepBackward()}}if(/^\s*>/.test(o.getLine(r.row).slice(r.column)))return;for(;!a(c,"tag-name");)if("<"==(c=l.stepBackward()).value){c=l.stepForward();break}var p=l.getCurrentTokenRow(),h=l.getCurrentTokenColumn();if(a(l.stepBackward(),"end-tag-open"))return;var g=c.value;if(p==r.row&&(g=g.substring(0,r.column-h)),this.voidElements&&this.voidElements.hasOwnProperty(g.toLowerCase()))return;return{text:"></"+g+">",selection:[1,1]}}})),this.add("autoindent","insertion",(function(e,t,n,o,i){if("\n"==i){ |
| 193 |
var r=n.getCursorPosition(),l=o.getLine(r.row),c=new s(o,r.row,r.column),d=c.getCurrentToken();if(a(d,"")&&-1!==d.type.indexOf("tag-close")){if("/>"==d.value)return;for(;d&&-1===d.type.indexOf("tag-name");)d=c.stepBackward();if(!d)return;var u=d.value,p=c.getCurrentTokenRow();if(!(d=c.stepBackward())||-1!==d.type.indexOf("end-tag"))return;if(this.voidElements&&!this.voidElements[u]||!this.voidElements){var h=o.getTokenAt(r.row,r.column+1),g=(l=o.getLine(p),this.$getIndent(l)),m=g+o.getTabString();return h&&"</"===h.value?{text:"\n"+m+"\n"+g,selection:[1,m.length,1,m.length]}:{text:"\n"+m}}}}}))};o.inherits(r,i),t.XmlBehaviour=r})),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],(function(e,t,n){"use strict";var o=e("../../lib/oop"),i=e("../../token_iterator").TokenIterator,s=e("../behaviour/cstyle").CstyleBehaviour,a=e("../behaviour/xml").XmlBehaviour,r=function(){var e=new a({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(e),this.inherit(s),this.add("autoclosing-fragment","insertion",(function(e,t,n,o,s){if(">"==s){var a=n.getSelectionRange().start,r=new i(o,a.row,a.column),l=r.getCurrentToken()||r.stepBackward();if(!l)return;if("<"==l.value)return{text:"></>",selection:[1,1]}}}))};o.inherits(r,s),t.JavaScriptBehaviour=r})),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var o=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,a=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=o.mixin({},this.voidElements),t&&o.mixin(this.optionalEndTags,t)};o.inherits(a,s);var r=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function l(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"===t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/<!-/.test(e.getLine(t))?"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),o=new r,i=0;i<n.length;i++){var s=n[i];if(l(s,"tag-open")){if(o.end.column=o.start.column+s.value.length,o.closing=l(s,"end-tag-open"),!(s=n[++i]))return null;if(o.tagName=s.value,""===s.value){if(!(s=n[++i]))return null;o.tagName=s.value}for(o.end.column+=s.value.length,i++;i<n.length;i++)if(s=n[i],o.end.column+=s.value.length,l(s,"tag-close")){o.selfClosing="/>"==s.value;break}return o}if(l(s,"tag-close"))return o.selfClosing="/>"==s.value,o;o.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,o){for(var i=e.getTokens(t),s=0,a=0;a<i.length;a++){var r=i[a];if(!((s+=r.value.length)<o-1)&&l(r,"end-tag-open")&&(l(r=i[a+1],"tag-name")&&""===r.value&&(r=i[a+2]),r&&r.value==n))return!0}return!1},this.getFoldWidgetRange=function(e,t,n){if(!this._getFirstTagInLine(e,n))return this.getCommentFoldWidget(e,n)&&e.getCommentFoldRange(n,e.getLine(n).length);var o=e.getMatchingTags({row:n,column:0});return o?new i(o.openTag.end.row,o.openTag.end.column,o.closeTag.start.row,o.closeTag.start.column):void 0}}).call(a.prototype)})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var o=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(o)?"start":i},this.getFoldWidgetRange=function(e,t,n,o){var i,s=e.getLine(n);if(this.startRegionRe.test(s))return this.getCommentRegionBlock(e,s,n);if(i=s.match(this.foldingStartMarker)){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var r=e.getCommentFoldRange(n,a+i[0].length,1);return r&&!r.isMultiLine()&&(o?r=this.getSectionRange(e,n):"all"!=t&&(r=null)),r}return"markbegin"!==t&&(i=s.match(this.foldingStopMarker))?(a=i.index+i[0].length,i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)):void 0},this.getSectionRange=function(e,t){for(var n=e.getLine(t),o=n.search(/\S/),s=t,a=n.length,r=t+=1,l=e.getLength();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(o>c)break;var d=this.getFoldWidgetRange(e,"all",t);if(d){if(d.start.row<=s)break;if(d.isMultiLine())t=d.end.row;else if(o==c)break}r=t}}return new i(s,a,r,e.getLine(r).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),s=e.getLength(),a=n,r=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<s;){t=e.getLine(n);var c=r.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>a)return new i(a,o,n,t.length)}}.call(a.prototype)})),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],(function(e,t,n){"use strict";var o=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};o.inherits(a,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){return this.getFoldWidgetBase(e,t,n)||this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,o){return this.getFoldWidgetRangeBase(e,t,n,o)||this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(a.prototype)})),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,r=e("../worker/worker_client").WorkerClient,l=e("./behaviour/javascript").JavaScriptBehaviour,c=e("./folding/javascript").FoldMode,d=function(){this.HighlightRules=s,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c};o.inherits(d,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,a=i.state;if(s.length&&"comment"==s[s.length-1].type)return o;if("start"==e||"no_regex"==e)t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/)&&(o+=n);else if("doc-start"==e&&("start"==a||"no_regex"==a))return"";return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){ |
| 194 |
var t=new r(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(d.prototype),t.Mode=d})),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),s=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",r=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",l=t.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",c=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",d=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",u=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",h=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":r,"support.type":s,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric", |
| 195 |
regex:d},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+d+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:u},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};o.inherits(h,i),t.CssHighlightRules=h})),ace.define("ace/mode/css_completions",["require","exports","module"],(function(e,t,n){"use strict";var o={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"==typeof e[t]){var n=t.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()}));o.hasOwnProperty(n)||(o[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,o){if(this.completionsDefined||this.defineCompletions(),"ruleset"===e||"ace/mode/scss"==t.$mode.$id){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,o)):this.getPropertyCompletions(e,t,n,o,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){return s=s||!1,Object.keys(o).map((function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}}))},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),a=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!a)return[];var r=[];return a in o&&"object"==typeof o[a]&&(r=Object.keys(o[a])),r.map((function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}}))}}).call(i.prototype),t.CssCompletions=i})),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],(function(e,t,n){"use strict";var o=e("../../lib/oop"),i=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),s=e("../../token_iterator").TokenIterator,a=function(){this.inherit(i),this.add("colon","insertion",(function(e,t,n,o,i){if(":"===i&&n.selection.isEmpty()){var a=n.getCursorPosition(),r=new s(o,a.row,a.column),l=r.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=r.stepBackward()),l&&"support.type"===l.type){var c=o.doc.getLine(a.row);if(":"===c.substring(a.column,a.column+1))return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(c.substring(a.column)))return{text:":;",selection:[1,1]}}}})),this.add("colon","deletion",(function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&":"===a){var r=n.getCursorPosition(),l=new s(o,r.row,r.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()), |
| 196 |
c&&"support.type"===c.type&&";"===o.doc.getLine(i.start.row).substring(i.end.column,i.end.column+1))return i.end.column++,i}})),this.add("semicolon","insertion",(function(e,t,n,o,i){if(";"===i&&n.selection.isEmpty()){var s=n.getCursorPosition();if(";"===o.doc.getLine(s.row).substring(s.column,s.column+1))return{text:"",selection:[1,1]}}})),this.add("!important","insertion",(function(e,t,n,o,i){if("!"===i&&n.selection.isEmpty()){var s=n.getCursorPosition(),a=o.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(a.substring(s.column)))return{text:"!important",selection:[10,10]}}}))};o.inherits(a,i),t.CssBehaviour=a})),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,r=e("../worker/worker_client").WorkerClient,l=e("./css_completions").CssCompletions,c=e("./behaviour/css").CssBehaviour,d=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.$outdent=new a,this.$behaviour=new c,this.$completer=new l,this.foldingRules=new d};o.inherits(u,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;return i.length&&"comment"==i[i.length-1].type||t.match(/^.*\{\s*$/)&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){var t=new r(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(u.prototype),t.Mode=u})),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-ZÀ-][-_:.a-zA-Z0-9À-]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:t},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"--\x3e",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+t+":)?"+t+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(</)("+n+"(?=\\s|>|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),o.inherits(s,i),t.XmlHighlightRules=s})),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,r=e("./xml_highlight_rules").XmlHighlightRules,l=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),c=function(){r.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===c&&this.normalizeRules()};o.inherits(c,r),t.HtmlHighlightRules=c})),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var o=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e, |
| 197 |
this.subModes=t};o.inherits(s,i),function(){this.$getMode=function(e){for(var t in"string"!=typeof e&&(e=e[0]),this.subModes)if(0===e.indexOf(t))return this.subModes[t];return null},this.$tryMode=function(e,t,n,o){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,o):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var o=this.$getMode(e.getState(n-1));return o&&o.getFoldWidget(e,t,n)||(o=this.$getMode(e.getState(n))),o&&o.getFoldWidget(e,t,n)||(o=this.defaultMode),o.getFoldWidgetRange(e,t,n)}}.call(s.prototype)})),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],(function(e,t,n){"use strict";var o=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,a=e("./cstyle").FoldMode,r=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new a,"css-":new a})};o.inherits(r,i)})),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],(function(e,t,n){"use strict";var o=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"].concat(["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"]),s={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(s);function r(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){for(var n=new o(e,t.row,t.column),i=n.getCurrentToken();i&&!r(i,"tag-name");)i=n.stepBackward();if(i)return i.value}var c=function(){};(function(){this.getCompletions=function(e,t,n,o){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(r(i,"tag-name")||r(i,"tag-open")||r(i,"end-tag-open"))return this.getTagCompletions(e,t,n,o);if(r(i,"tag-whitespace")||r(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,o);if(r(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,o);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,o):[]},this.getTagCompletions=function(e,t,n,o){return a.map((function(e){return{value:e,meta:"tag",score:1e6}}))},this.getAttributeCompletions=function(e,t,n,o){var a=l(t,n);if(!a)return[];var r=i;return a in s&&(r=r.concat(Object.keys(s[a]))),r.map((function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}}))},this.getAttributeValueCompletions=function(e,t,n,i){var a=l(t,n),c=function(e,t){for(var n=new o(e,t.row,t.column),i=n.getCurrentToken();i&&!r(i,"attribute-name");)i=n.stepBackward();if(i)return i.value}(t,n);if(!a)return[];var d=[];return a in s&&c in s[a]&&"object"==typeof s[a][c]&&(d=Object.keys(s[a][c])),d.map((function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}}))},this.getHTMLEntityCompletions=function(e,t,n,o){ |
| 198 |
return["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"].map((function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}}))}}).call(c.prototype),t.HtmlCompletions=c})),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],(function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,a=e("./javascript").Mode,r=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,c=e("./behaviour/xml").XmlBehaviour,d=e("./folding/html").FoldMode,u=e("./html_completions").HtmlCompletions,p=e("../worker/worker_client").WorkerClient,h=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],g=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],m=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new c,this.$completer=new u,this.createModeDelegates({"js-":a,"css-":r}),this.foldingRules=new d(this.voidElements,i.arrayToMap(g))};o.inherits(m,s),function(){this.blockComment={start:"\x3c!--",end:"--\x3e"},this.voidElements=i.arrayToMap(h),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){if(this.constructor==m){var t=new p(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(m.prototype),t.Mode=m})),ace.require(["ace/mode/html"],(function(t){e&&(e.exports=t)}))},9289(e,t,n){e=n.nmd(e),ace.define("ace/snippets/html.snippets",["require","exports","module"],(function(e,t,n){ |
| 199 |
n.exports='# Some useful Unicode entities\n# Non-Breaking Space\nsnippet nbs\n\t \n# ←\nsnippet left\n\t←\n# →\nsnippet right\n\t→\n# ↑\nsnippet up\n\t↑\n# ↓\nsnippet down\n\t↓\n# ↩\nsnippet return\n\t↩\n# ⇤\nsnippet backtab\n\t⇤\n# ⇥\nsnippet tab\n\t⇥\n# ⇧\nsnippet shift\n\t⇧\n# ⌃\nsnippet ctrl\n\t⌃\n# ⌅\nsnippet enter\n\t⌅\n# ⌘\nsnippet cmd\n\t⌘\n# ⌥\nsnippet option\n\t⌥\n# ⌦\nsnippet delete\n\t⌦\n# ⌫\nsnippet backspace\n\t⌫\n# ⎋\nsnippet esc\n\t⎋\n# Generic Doctype\nsnippet doctype HTML 4.01 Strict\n\t<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n\t"http://www.w3.org/TR/html4/strict.dtd">\nsnippet doctype HTML 4.01 Transitional\n\t<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n\t"http://www.w3.org/TR/html4/loose.dtd">\nsnippet doctype HTML 5\n\t<!DOCTYPE HTML>\nsnippet doctype XHTML 1.0 Frameset\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n\t"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\nsnippet doctype XHTML 1.0 Strict\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n\t"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\nsnippet doctype XHTML 1.0 Transitional\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n\t"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\nsnippet doctype XHTML 1.1\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\n\t"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n# HTML Doctype 4.01 Strict\nsnippet docts\n\t<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n\t"http://www.w3.org/TR/html4/strict.dtd">\n# HTML Doctype 4.01 Transitional\nsnippet doct\n\t<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n\t"http://www.w3.org/TR/html4/loose.dtd">\n# HTML Doctype 5\nsnippet doct5\n\t<!DOCTYPE html>\n# XHTML Doctype 1.0 Frameset\nsnippet docxf\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"\n\t"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">\n# XHTML Doctype 1.0 Strict\nsnippet docxs\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n\t"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n# XHTML Doctype 1.0 Transitional\nsnippet docxt\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n\t"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n# XHTML Doctype 1.1\nsnippet docx\n\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\n\t"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n# html5shiv\nsnippet html5shiv\n\t\x3c!--[if lte IE 8]>\n\t\t<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"><\/script>\n\t<![endif]--\x3e\nsnippet html5printshiv\n\t\x3c!--[if lte IE 8]>\n\t\t<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"><\/script>\n\t<![endif]--\x3e\n# Attributes\nsnippet attr\n\t${1:attribute}="${2:property}"\nsnippet attr+\n\t${1:attribute}="${2:property}" attr+${3}\nsnippet .\n\tclass="${1}"${2}\nsnippet #\n\tid="${1}"${2}\nsnippet alt\n\talt="${1}"${2}\nsnippet charset\n\tcharset="${1:utf-8}"${2}\nsnippet data\n\tdata-${1}="${2:$1}"${3}\nsnippet for\n\tfor="${1}"${2}\nsnippet height\n\theight="${1}"${2}\nsnippet href\n\thref="${1:#}"${2}\nsnippet lang\n\tlang="${1:en}"${2}\nsnippet media\n\tmedia="${1}"${2}\nsnippet name\n\tname="${1}"${2}\nsnippet rel\n\trel="${1}"${2}\nsnippet scope\n\tscope="${1:row}"${2}\nsnippet src\n\tsrc="${1}"${2}\nsnippet title=\n\ttitle="${1}"${2}\nsnippet type\n\ttype="${1}"${2}\nsnippet value\n\tvalue="${1}"${2}\nsnippet width\n\twidth="${1}"${2}\n# Elements\nsnippet a\n\t<a href="${1:#}">${2:$1}</a>\nsnippet a.\n\t<a class="${1}" href="${2:#}">${3:$1}</a>\nsnippet a#\n\t<a id="${1}" href="${2:#}">${3:$1}</a>\nsnippet a:ext\n\t<a href="http://${1:example.com}">${2:$1}</a>\nsnippet a:mail\n\t<a href="mailto:${1:[email protected]}?subject=${2:feedback}">${3:email me}</a>\nsnippet abbr\n\t<abbr title="${1}">${2}</abbr>\nsnippet address\n\t<address>\n\t\t${1}\n\t</address>\nsnippet area\n\t<area shape="${1:rect}" coords="${2}" href="${3}" alt="${4}" />\nsnippet area+\n\t<area shape="${1:rect}" coords="${2}" href="${3}" alt="${4}" />\n\tarea+${5}\nsnippet area:c\n\t<area shape="circle" coords="${1}" href="${2}" alt="${3}" />\nsnippet area:d\n\t<area shape="default" coords="${1}" href="${2}" alt="${3}" />\nsnippet area:p\n\t<area shape="poly" coords="${1}" href="${2}" alt="${3}" />\nsnippet area:r\n\t<area shape="rect" coords="${1}" href="${2}" alt="${3}" />\nsnippet article\n\t<article>\n\t\t${1}\n\t</article>\nsnippet article.\n\t<article class="${1}">\n\t\t${2}\n\t</article>\nsnippet article#\n\t<article id="${1}">\n\t\t${2}\n\t</article>\nsnippet aside\n\t<aside>\n\t\t${1}\n\t</aside>\nsnippet aside.\n\t<aside class="${1}">\n\t\t${2}\n\t</aside>\nsnippet aside#\n\t<aside id="${1}">\n\t\t${2}\n\t</aside>\nsnippet audio\n\t<audio src="${1}>${2}</audio>\nsnippet b\n\t<b>${1}</b>\nsnippet base\n\t<base href="${1}" target="${2}" />\nsnippet bdi\n\t<bdi>${1}</bdo>\nsnippet bdo\n\t<bdo dir="${1}">${2}</bdo>\nsnippet bdo:l\n\t<bdo dir="ltr">${1}</bdo>\nsnippet bdo:r\n\t<bdo dir="rtl">${1}</bdo>\nsnippet blockquote\n\t<blockquote>\n\t\t${1}\n\t</blockquote>\nsnippet body\n\t<body>\n\t\t${1}\n\t</body>\nsnippet br\n\t<br />${1}\nsnippet button\n\t<button type="${1:submit}">${2}</button>\nsnippet button.\n\t<button class="${1:button}" type="${2:submit}">${3}</button>\nsnippet button#\n\t<button id="${1}" type="${2:submit}">${3}</button>\nsnippet button:s\n\t<button type="submit">${1}</button>\nsnippet button:r\n\t<button type="reset">${1}</button>\nsnippet canvas\n\t<canvas id="${1:canvas}"></canvas>\nsnippet caption\n\t<caption>${1}</caption>\nsnippet cite\n\t<cite>${1}</cite>\nsnippet code\n\t<code>${1}</code>\nsnippet col\n\t<col />${1}\nsnippet col+\n\t<col />\n\tcol+${1}\nsnippet colgroup\n\t<colgroup>\n\t\t${1}\n\t</colgroup>\nsnippet colgroup+\n\t<colgroup>\n\t\t<col />\n\t\tcol+${1}\n\t</colgroup>\nsnippet command\n\t<command type="command" label="${1}" icon="${2}" />\nsnippet command:c\n\t<command type="checkbox" label="${1}" icon="${2}" />\nsnippet command:r\n\t<command type="radio" radiogroup="${1}" label="${2}" icon="${3}" />\nsnippet datagrid\n\t<datagrid>\n\t\t${1}\n\t</datagrid>\nsnippet datalist\n\t<datalist>\n\t\t${1}\n\t</datalist>\nsnippet datatemplate\n\t<datatemplate>\n\t\t${1}\n\t</datatemplate>\nsnippet dd\n\t<dd>${1}</dd>\nsnippet dd.\n\t<dd class="${1}">${2}</dd>\nsnippet dd#\n\t<dd id="${1}">${2}</dd>\nsnippet del\n\t<del>${1}</del>\nsnippet details\n\t<details>${1}</details>\nsnippet dfn\n\t<dfn>${1}</dfn>\nsnippet dialog\n\t<dialog>\n\t\t${1}\n\t</dialog>\nsnippet div\n\t<div>\n\t\t${1}\n\t</div>\nsnippet div.\n\t<div class="${1}">\n\t\t${2}\n\t</div>\nsnippet div#\n\t<div id="${1}">\n\t\t${2}\n\t</div>\nsnippet dl\n\t<dl>\n\t\t${1}\n\t</dl>\nsnippet dl.\n\t<dl class="${1}">\n\t\t${2}\n\t</dl>\nsnippet dl#\n\t<dl id="${1}">\n\t\t${2}\n\t</dl>\nsnippet dl+\n\t<dl>\n\t\t<dt>${1}</dt>\n\t\t<dd>${2}</dd>\n\t\tdt+${3}\n\t</dl>\nsnippet dt\n\t<dt>${1}</dt>\nsnippet dt.\n\t<dt class="${1}">${2}</dt>\nsnippet dt#\n\t<dt id="${1}">${2}</dt>\nsnippet dt+\n\t<dt>${1}</dt>\n\t<dd>${2}</dd>\n\tdt+${3}\nsnippet em\n\t<em>${1}</em>\nsnippet embed\n\t<embed src=${1} type="${2} />\nsnippet fieldset\n\t<fieldset>\n\t\t${1}\n\t</fieldset>\nsnippet fieldset.\n\t<fieldset class="${1}">\n\t\t${2}\n\t</fieldset>\nsnippet fieldset#\n\t<fieldset id="${1}">\n\t\t${2}\n\t</fieldset>\nsnippet fieldset+\n\t<fieldset>\n\t\t<legend><span>${1}</span></legend>\n\t\t${2}\n\t</fieldset>\n\tfieldset+${3}\nsnippet figcaption\n\t<figcaption>${1}</figcaption>\nsnippet figure\n\t<figure>${1}</figure>\nsnippet footer\n\t<footer>\n\t\t${1}\n\t</footer>\nsnippet footer.\n\t<footer class="${1}">\n\t\t${2}\n\t</footer>\nsnippet footer#\n\t<footer id="${1}">\n\t\t${2}\n\t</footer>\nsnippet form\n\t<form action="${1}" method="${2:get}" accept-charset="utf-8">\n\t\t${3}\n\t</form>\nsnippet form.\n\t<form class="${1}" action="${2}" method="${3:get}" accept-charset="utf-8">\n\t\t${4}\n\t</form>\nsnippet form#\n\t<form id="${1}" action="${2}" method="${3:get}" accept-charset="utf-8">\n\t\t${4}\n\t</form>\nsnippet h1\n\t<h1>${1}</h1>\nsnippet h1.\n\t<h1 class="${1}">${2}</h1>\nsnippet h1#\n\t<h1 id="${1}">${2}</h1>\nsnippet h2\n\t<h2>${1}</h2>\nsnippet h2.\n\t<h2 class="${1}">${2}</h2>\nsnippet h2#\n\t<h2 id="${1}">${2}</h2>\nsnippet h3\n\t<h3>${1}</h3>\nsnippet h3.\n\t<h3 class="${1}">${2}</h3>\nsnippet h3#\n\t<h3 id="${1}">${2}</h3>\nsnippet h4\n\t<h4>${1}</h4>\nsnippet h4.\n\t<h4 class="${1}">${2}</h4>\nsnippet h4#\n\t<h4 id="${1}">${2}</h4>\nsnippet h5\n\t<h5>${1}</h5>\nsnippet h5.\n\t<h5 class="${1}">${2}</h5>\nsnippet h5#\n\t<h5 id="${1}">${2}</h5>\nsnippet h6\n\t<h6>${1}</h6>\nsnippet h6.\n\t<h6 class="${1}">${2}</h6>\nsnippet h6#\n\t<h6 id="${1}">${2}</h6>\nsnippet head\n\t<head>\n\t\t<meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\n\t\t<title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\n\t\t${2}\n\t</head>\nsnippet header\n\t<header>\n\t\t${1}\n\t</header>\nsnippet header.\n\t<header class="${1}">\n\t\t${2}\n\t</header>\nsnippet header#\n\t<header id="${1}">\n\t\t${2}\n\t</header>\nsnippet hgroup\n\t<hgroup>\n\t\t${1}\n\t</hgroup>\nsnippet hgroup.\n\t<hgroup class="${1}>\n\t\t${2}\n\t</hgroup>\nsnippet hr\n\t<hr />${1}\nsnippet html\n\t<html>\n\t${1}\n\t</html>\nsnippet xhtml\n\t<html xmlns="http://www.w3.org/1999/xhtml">\n\t${1}\n\t</html>\nsnippet html5\n\t<!DOCTYPE html>\n\t<html>\n\t\t<head>\n\t\t\t<meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\t\t\t<title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\n\t\t\t${2:meta}\n\t\t</head>\n\t\t<body>\n\t\t\t${3:body}\n\t\t</body>\n\t</html>\nsnippet xhtml5\n\t<!DOCTYPE html>\n\t<html xmlns="http://www.w3.org/1999/xhtml">\n\t\t<head>\n\t\t\t<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />\n\t\t\t<title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\n\t\t\t${2:meta}\n\t\t</head>\n\t\t<body>\n\t\t\t${3:body}\n\t\t</body>\n\t</html>\nsnippet i\n\t<i>${1}</i>\nsnippet iframe\n\t<iframe src="${1}" frameborder="0"></iframe>${2}\nsnippet iframe.\n\t<iframe class="${1}" src="${2}" frameborder="0"></iframe>${3}\nsnippet iframe#\n\t<iframe id="${1}" src="${2}" frameborder="0"></iframe>${3}\nsnippet img\n\t<img src="${1}" alt="${2}" />${3}\nsnippet img.\n\t<img class="${1}" src="${2}" alt="${3}" />${4}\nsnippet img#\n\t<img id="${1}" src="${2}" alt="${3}" />${4}\nsnippet input\n\t<input type="${1:text/submit/hidden/button/image}" name="${2}" id="${3:$2}" value="${4}" />${5}\nsnippet input.\n\t<input class="${1}" type="${2:text/submit/hidden/button/image}" name="${3}" id="${4:$3}" value="${5}" />${6}\nsnippet input:text\n\t<input type="text" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:submit\n\t<input type="submit" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:hidden\n\t<input type="hidden" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:button\n\t<input type="button" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:image\n\t<input type="image" name="${1}" id="${2:$1}" src="${3}" alt="${4}" />${5}\nsnippet input:checkbox\n\t<input type="checkbox" name="${1}" id="${2:$1}" />${3}\nsnippet input:radio\n\t<input type="radio" name="${1}" id="${2:$1}" />${3}\nsnippet input:color\n\t<input type="color" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:date\n\t<input type="date" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:datetime\n\t<input type="datetime" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:datetime-local\n\t<input type="datetime-local" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:email\n\t<input type="email" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:file\n\t<input type="file" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:month\n\t<input type="month" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:number\n\t<input type="number" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:password\n\t<input type="password" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:range\n\t<input type="range" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:reset\n\t<input type="reset" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:search\n\t<input type="search" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:time\n\t<input type="time" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:url\n\t<input type="url" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:week\n\t<input type="week" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet ins\n\t<ins>${1}</ins>\nsnippet kbd\n\t<kbd>${1}</kbd>\nsnippet keygen\n\t<keygen>${1}</keygen>\nsnippet label\n\t<label for="${2:$1}">${1}</label>\nsnippet label:i\n\t<label for="${2:$1}">${1}</label>\n\t<input type="${3:text/submit/hidden/button}" name="${4:$2}" id="${5:$2}" value="${6}" />${7}\nsnippet label:s\n\t<label for="${2:$1}">${1}</label>\n\t<select name="${3:$2}" id="${4:$2}">\n\t\t<option value="${5}">${6:$5}</option>\n\t</select>\nsnippet legend\n\t<legend>${1}</legend>\nsnippet legend+\n\t<legend><span>${1}</span></legend>\nsnippet li\n\t<li>${1}</li>\nsnippet li.\n\t<li class="${1}">${2}</li>\nsnippet li+\n\t<li>${1}</li>\n\tli+${2}\nsnippet lia\n\t<li><a href="${2:#}">${1}</a></li>\nsnippet lia+\n\t<li><a href="${2:#}">${1}</a></li>\n\tlia+${3}\nsnippet link\n\t<link rel="${1}" href="${2}" title="${3}" type="${4}" />${5}\nsnippet link:atom\n\t<link rel="alternate" href="${1:atom.xml}" title="Atom" type="application/atom+xml" />${2}\nsnippet link:css\n\t<link rel="stylesheet" href="${2:style.css}" type="text/css" media="${3:all}" />${4}\nsnippet link:favicon\n\t<link rel="shortcut icon" href="${1:favicon.ico}" type="image/x-icon" />${2}\nsnippet link:rss\n\t<link rel="alternate" href="${1:rss.xml}" title="RSS" type="application/atom+xml" />${2}\nsnippet link:touch\n\t<link rel="apple-touch-icon" href="${1:favicon.png}" />${2}\nsnippet map\n\t<map name="${1}">\n\t\t${2}\n\t</map>\nsnippet map.\n\t<map class="${1}" name="${2}">\n\t\t${3}\n\t</map>\nsnippet map#\n\t<map name="${1}" id="${2:$1}>\n\t\t${3}\n\t</map>\nsnippet map+\n\t<map name="${1}">\n\t\t<area shape="${2}" coords="${3}" href="${4}" alt="${5}" />${6}\n\t</map>${7}\nsnippet mark\n\t<mark>${1}</mark>\nsnippet menu\n\t<menu>\n\t\t${1}\n\t</menu>\nsnippet menu:c\n\t<menu type="context">\n\t\t${1}\n\t</menu>\nsnippet menu:t\n\t<menu type="toolbar">\n\t\t${1}\n\t</menu>\nsnippet meta\n\t<meta http-equiv="${1}" content="${2}" />${3}\nsnippet meta:compat\n\t<meta http-equiv="X-UA-Compatible" content="IE=${1:7,8,edge}" />${3}\nsnippet meta:refresh\n\t<meta http-equiv="refresh" content="text/html;charset=UTF-8" />${3}\nsnippet meta:utf\n\t<meta http-equiv="content-type" content="text/html;charset=UTF-8" />${3}\nsnippet meter\n\t<meter>${1}</meter>\nsnippet nav\n\t<nav>\n\t\t${1}\n\t</nav>\nsnippet nav.\n\t<nav class="${1}">\n\t\t${2}\n\t</nav>\nsnippet nav#\n\t<nav id="${1}">\n\t\t${2}\n\t</nav>\nsnippet noscript\n\t<noscript>\n\t\t${1}\n\t</noscript>\nsnippet object\n\t<object data="${1}" type="${2}">\n\t\t${3}\n\t</object>${4}\n# Embed QT Movie\nsnippet movie\n\t<object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"\n\t codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n\t\t<param name="src" value="$1" />\n\t\t<param name="controller" value="$4" />\n\t\t<param name="autoplay" value="$5" />\n\t\t<embed src="${1:movie.mov}"\n\t\t\twidth="${2:320}" height="${3:240}"\n\t\t\tcontroller="${4:true}" autoplay="${5:true}"\n\t\t\tscale="tofit" cache="true"\n\t\t\tpluginspage="http://www.apple.com/quicktime/download/" />\n\t</object>${6}\nsnippet ol\n\t<ol>\n\t\t${1}\n\t</ol>\nsnippet ol.\n\t<ol class="${1}>\n\t\t${2}\n\t</ol>\nsnippet ol#\n\t<ol id="${1}>\n\t\t${2}\n\t</ol>\nsnippet ol+\n\t<ol>\n\t\t<li>${1}</li>\n\t\tli+${2}\n\t</ol>\nsnippet opt\n\t<option value="${1}">${2:$1}</option>\nsnippet opt+\n\t<option value="${1}">${2:$1}</option>\n\topt+${3}\nsnippet optt\n\t<option>${1}</option>\nsnippet optgroup\n\t<optgroup>\n\t\t<option value="${1}">${2:$1}</option>\n\t\topt+${3}\n\t</optgroup>\nsnippet output\n\t<output>${1}</output>\nsnippet p\n\t<p>${1}</p>\nsnippet param\n\t<param name="${1}" value="${2}" />${3}\nsnippet pre\n\t<pre>\n\t\t${1}\n\t</pre>\nsnippet progress\n\t<progress>${1}</progress>\nsnippet q\n\t<q>${1}</q>\nsnippet rp\n\t<rp>${1}</rp>\nsnippet rt\n\t<rt>${1}</rt>\nsnippet ruby\n\t<ruby>\n\t\t<rp><rt>${1}</rt></rp>\n\t</ruby>\nsnippet s\n\t<s>${1}</s>\nsnippet samp\n\t<samp>\n\t\t${1}\n\t</samp>\nsnippet script\n\t<script type="text/javascript" charset="utf-8">\n\t\t${1}\n\t<\/script>\nsnippet scriptsrc\n\t<script src="${1}.js" type="text/javascript" charset="utf-8"><\/script>\nsnippet newscript\n\t<script type="application/javascript" charset="utf-8">\n\t\t${1}\n\t<\/script>\nsnippet newscriptsrc\n\t<script src="${1}.js" type="application/javascript" charset="utf-8"><\/script>\nsnippet section\n\t<section>\n\t\t${1}\n\t</section>\nsnippet section.\n\t<section class="${1}">\n\t\t${2}\n\t</section>\nsnippet section#\n\t<section id="${1}">\n\t\t${2}\n\t</section>\nsnippet select\n\t<select name="${1}" id="${2:$1}">\n\t\t${3}\n\t</select>\nsnippet select.\n\t<select name="${1}" id="${2:$1}" class="${3}>\n\t\t${4}\n\t</select>\nsnippet select+\n\t<select name="${1}" id="${2:$1}">\n\t\t<option value="${3}">${4:$3}</option>\n\t\topt+${5}\n\t</select>\nsnippet small\n\t<small>${1}</small>\nsnippet source\n\t<source src="${1}" type="${2}" media="${3}" />\nsnippet span\n\t<span>${1}</span>\nsnippet strong\n\t<strong>${1}</strong>\nsnippet style\n\t<style type="text/css" media="${1:all}">\n\t\t${2}\n\t</style>\nsnippet sub\n\t<sub>${1}</sub>\nsnippet summary\n\t<summary>\n\t\t${1}\n\t</summary>\nsnippet sup\n\t<sup>${1}</sup>\nsnippet table\n\t<table border="${1:0}">\n\t\t${2}\n\t</table>\nsnippet table.\n\t<table class="${1}" border="${2:0}">\n\t\t${3}\n\t</table>\nsnippet table#\n\t<table id="${1}" border="${2:0}">\n\t\t${3}\n\t</table>\nsnippet tbody\n\t<tbody>\n\t\t${1}\n\t</tbody>\nsnippet td\n\t<td>${1}</td>\nsnippet td.\n\t<td class="${1}">${2}</td>\nsnippet td#\n\t<td id="${1}">${2}</td>\nsnippet td+\n\t<td>${1}</td>\n\ttd+${2}\nsnippet textarea\n\t<textarea name="${1}" id=${2:$1} rows="${3:8}" cols="${4:40}">${5}</textarea>${6}\nsnippet tfoot\n\t<tfoot>\n\t\t${1}\n\t</tfoot>\nsnippet th\n\t<th>${1}</th>\nsnippet th.\n\t<th class="${1}">${2}</th>\nsnippet th#\n\t<th id="${1}">${2}</th>\nsnippet th+\n\t<th>${1}</th>\n\tth+${2}\nsnippet thead\n\t<thead>\n\t\t${1}\n\t</thead>\nsnippet time\n\t<time datetime="${1}" pubdate="${2:$1}>${3:$1}</time>\nsnippet title\n\t<title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\nsnippet tr\n\t<tr>\n\t\t${1}\n\t</tr>\nsnippet tr+\n\t<tr>\n\t\t<td>${1}</td>\n\t\ttd+${2}\n\t</tr>\nsnippet track\n\t<track src="${1}" srclang="${2}" label="${3}" default="${4:default}>${5}</track>${6}\nsnippet ul\n\t<ul>\n\t\t${1}\n\t</ul>\nsnippet ul.\n\t<ul class="${1}">\n\t\t${2}\n\t</ul>\nsnippet ul#\n\t<ul id="${1}">\n\t\t${2}\n\t</ul>\nsnippet ul+\n\t<ul>\n\t\t<li>${1}</li>\n\t\tli+${2}\n\t</ul>\nsnippet var\n\t<var>${1}</var>\nsnippet video\n\t<video src="${1}" height="${2}" width="${3}" preload="${5:none}" autoplay="${6:autoplay}">${7}</video>${8}\nsnippet wbr\n\t<wbr />${1}\n' |
| 200 |
})),ace.define("ace/snippets/html",["require","exports","module","ace/snippets/html.snippets"],(function(e,t,n){"use strict";t.snippetText=e("./html.snippets"),t.scope="html"})),ace.require(["ace/snippets/html"],(function(t){e&&(e.exports=t)}))},1289(e,t,n){e=n.nmd(e),ace.define("ace/theme/monokai-css",["require","exports","module"],(function(e,t,n){n.exports=".ace-monokai .ace_gutter {\n background: #2F3129;\n color: #8F908A\n}\n\n.ace-monokai .ace_print-margin {\n width: 1px;\n background: #555651\n}\n\n.ace-monokai {\n background-color: #272822;\n color: #F8F8F2\n}\n\n.ace-monokai .ace_cursor {\n color: #F8F8F0\n}\n\n.ace-monokai .ace_marker-layer .ace_selection {\n background: #49483E\n}\n\n.ace-monokai.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #272822;\n}\n\n.ace-monokai .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-monokai .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #49483E\n}\n\n.ace-monokai .ace_marker-layer .ace_active-line {\n background: #202020\n}\n\n.ace-monokai .ace_gutter-active-line {\n background-color: #272727\n}\n\n.ace-monokai .ace_marker-layer .ace_selected-word {\n border: 1px solid #49483E\n}\n\n.ace-monokai .ace_invisible {\n color: #52524d\n}\n\n.ace-monokai .ace_entity.ace_name.ace_tag,\n.ace-monokai .ace_keyword,\n.ace-monokai .ace_meta.ace_tag,\n.ace-monokai .ace_storage {\n color: #F92672\n}\n\n.ace-monokai .ace_punctuation,\n.ace-monokai .ace_punctuation.ace_tag {\n color: #fff\n}\n\n.ace-monokai .ace_constant.ace_character,\n.ace-monokai .ace_constant.ace_language,\n.ace-monokai .ace_constant.ace_numeric,\n.ace-monokai .ace_constant.ace_other {\n color: #AE81FF\n}\n\n.ace-monokai .ace_invalid {\n color: #F8F8F0;\n background-color: #F92672\n}\n\n.ace-monokai .ace_invalid.ace_deprecated {\n color: #F8F8F0;\n background-color: #AE81FF\n}\n\n.ace-monokai .ace_support.ace_constant,\n.ace-monokai .ace_support.ace_function {\n color: #66D9EF\n}\n\n.ace-monokai .ace_fold {\n background-color: #A6E22E;\n border-color: #F8F8F2\n}\n\n.ace-monokai .ace_storage.ace_type,\n.ace-monokai .ace_support.ace_class,\n.ace-monokai .ace_support.ace_type {\n font-style: italic;\n color: #66D9EF\n}\n\n.ace-monokai .ace_entity.ace_name.ace_function,\n.ace-monokai .ace_entity.ace_other,\n.ace-monokai .ace_entity.ace_other.ace_attribute-name,\n.ace-monokai .ace_variable {\n color: #A6E22E\n}\n\n.ace-monokai .ace_variable.ace_parameter {\n font-style: italic;\n color: #FD971F\n}\n\n.ace-monokai .ace_string {\n color: #E6DB74\n}\n\n.ace-monokai .ace_comment {\n color: #75715E\n}\n\n.ace-monokai .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-monokai .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"})),ace.define("ace/theme/monokai",["require","exports","module","ace/theme/monokai-css","ace/lib/dom"],(function(e,t,n){t.isDark=!0,t.cssClass="ace-monokai",t.cssText=e("./monokai-css"),e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.require(["ace/theme/monokai"],(function(t){e&&(e.exports=t)}))},2189(e){var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,o,i){void 0===i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var s=i;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===o&&(o=!0);var a=o,r=this.diff_commonPrefix(e,n),l=e.substring(0,r);e=e.substring(r),n=n.substring(r),r=this.diff_commonSuffix(e,n);var c=e.substring(e.length-r);e=e.substring(0,e.length-r),n=n.substring(0,n.length-r);var d=this.diff_compute_(e,n,a,s);return l&&d.unshift(new t.Diff(0,l)),c&&d.push(new t.Diff(0,c)),this.diff_cleanupMerge(d),d},t.prototype.diff_compute_=function(e,o,i,s){var a;if(!e)return[new t.Diff(1,o)];if(!o)return[new t.Diff(n,e)];var r=e.length>o.length?e:o,l=e.length>o.length?o:e,c=r.indexOf(l);if(-1!=c)return a=[new t.Diff(1,r.substring(0,c)),new t.Diff(0,l),new t.Diff(1,r.substring(c+l.length))],e.length>o.length&&(a[0][0]=a[2][0]=n),a;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,o)];var d=this.diff_halfMatch_(e,o);if(d){var u=d[0],p=d[1],h=d[2],g=d[3],m=d[4],b=this.diff_main(u,h,i,s),f=this.diff_main(p,g,i,s);return b.concat([new t.Diff(0,m)],f)}return i&&e.length>100&&o.length>100?this.diff_lineMode_(e,o,s):this.diff_bisect_(e,o,s)},t.prototype.diff_lineMode_=function(e,o,i){var s=this.diff_linesToChars_(e,o);e=s.chars1,o=s.chars2;var a=s.lineArray,r=this.diff_main(e,o,!1,i);this.diff_charsToLines_(r,a),this.diff_cleanupSemantic(r),r.push(new t.Diff(0,""));for(var l=0,c=0,d=0,u="",p="";l<r.length;){switch(r[l][0]){case 1:d++,p+=r[l][1];break;case n:c++,u+=r[l][1];break;case 0:if(c>=1&&d>=1){r.splice(l-c-d,c+d),l=l-c-d;for(var h=this.diff_main(u,p,!1,i),g=h.length-1;g>=0;g--)r.splice(l,0,h[g]);l+=h.length}d=0,c=0,u="",p=""}l++}return r.pop(),r},t.prototype.diff_bisect_=function(e,o,i){for(var s=e.length,a=o.length,r=Math.ceil((s+a)/2),l=r,c=2*r,d=new Array(c),u=new Array(c),p=0;p<c;p++)d[p]=-1,u[p]=-1;d[l+1]=0,u[l+1]=0;for(var h=s-a,g=h%2!=0,m=0,b=0,f=0,x=0,y=0;y<r&&!((new Date).getTime()>i);y++){for(var v=-y+m;v<=y-b;v+=2){for(var k=l+v,w=(S=v==-y||v!=y&&d[k-1]<d[k+1]?d[k+1]:d[k-1]+1)-v;S<s&&w<a&&e.charAt(S)==o.charAt(w);)S++,w++;if(d[k]=S,S>s)b+=2;else if(w>a)m+=2;else if(g&&(j=l+h-v)>=0&&j<c&&-1!=u[j]&&S>=(C=s-u[j]))return this.diff_bisectSplit_(e,o,S,w,i)}for(var _=-y+f;_<=y-x;_+=2){for(var C,j=l+_,$=(C=_==-y||_!=y&&u[j-1]<u[j+1]?u[j+1]:u[j-1]+1)-_;C<s&&$<a&&e.charAt(s-C-1)==o.charAt(a-$-1);)C++,$++;if(u[j]=C,C>s)x+=2;else if($>a)f+=2;else if(!g){var S;if((k=l+h-_)>=0&&k<c&&-1!=d[k])if(w=l+(S=d[k])-k,S>=(C=s-C))return this.diff_bisectSplit_(e,o,S,w,i)}}}return[new t.Diff(n,e),new t.Diff(1,o)]},t.prototype.diff_bisectSplit_=function(e,t,n,o,i){var s=e.substring(0,n),a=t.substring(0,o),r=e.substring(n),l=t.substring(o),c=this.diff_main(s,a,!1,i),d=this.diff_main(r,l,!1,i);return c.concat(d)},t.prototype.diff_linesToChars_=function(e,t){var n=[],o={};function i(e){for(var t="",i=0,a=-1,r=n.length;a<e.length-1;){-1==(a=e.indexOf("\n",i))&&(a=e.length-1);var l=e.substring(i,a+1);(o.hasOwnProperty?o.hasOwnProperty(l):void 0!==o[l])?t+=String.fromCharCode(o[l]):(r==s&&(l=e.substring(i),a=e.length),t+=String.fromCharCode(r),o[l]=r,n[r++]=l),i=a+1}return t}n[0]="";var s=4e4,a=i(e);return s=65535,{chars1:a,chars2:i(t),lineArray:n}},t.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var o=e[n][1],i=[],s=0;s<o.length;s++)i[s]=t[o.charCodeAt(s)];e[n][1]=i.join("")}},t.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,o=Math.min(e.length,t.length),i=o,s=0;n<i;)e.substring(s,i)==t.substring(s,i)?s=n=i:o=i,i=Math.floor((o-n)/2+n);return i},t.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,o=Math.min(e.length,t.length),i=o,s=0;n<i;)e.substring(e.length-i,e.length-s)==t.substring(t.length-i,t.length-s)?s=n=i:o=i,i=Math.floor((o-n)/2+n);return i},t.prototype.diff_commonOverlap_=function(e,t){var n=e.length,o=t.length;if(0==n||0==o)return 0;n>o?e=e.substring(n-o):n<o&&(t=t.substring(0,n));var i=Math.min(n,o);if(e==t)return i;for(var s=0,a=1;;){var r=e.substring(i-a),l=t.indexOf(r);if(-1==l)return s;a+=l,0!=l&&e.substring(i-a)!=t.substring(0,a)||(s=a,a++)}},t.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,o=e.length>t.length?t:e |
| 201 |
;if(n.length<4||2*o.length<n.length)return null;var i=this;function s(e,t,n){for(var o,s,a,r,l=e.substring(n,n+Math.floor(e.length/4)),c=-1,d="";-1!=(c=t.indexOf(l,c+1));){var u=i.diff_commonPrefix(e.substring(n),t.substring(c)),p=i.diff_commonSuffix(e.substring(0,n),t.substring(0,c));d.length<p+u&&(d=t.substring(c-p,c)+t.substring(c,c+u),o=e.substring(0,n-p),s=e.substring(n+u),a=t.substring(0,c-p),r=t.substring(c+u))}return 2*d.length>=e.length?[o,s,a,r,d]:null}var a,r,l,c,d,u=s(n,o,Math.ceil(n.length/4)),p=s(n,o,Math.ceil(n.length/2));return u||p?(a=p?u&&u[4].length>p[4].length?u:p:u,e.length>t.length?(r=a[0],l=a[1],c=a[2],d=a[3]):(c=a[0],d=a[1],r=a[2],l=a[3]),[r,l,c,d,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var o=!1,i=[],s=0,a=null,r=0,l=0,c=0,d=0,u=0;r<e.length;)0==e[r][0]?(i[s++]=r,l=d,c=u,d=0,u=0,a=e[r][1]):(1==e[r][0]?d+=e[r][1].length:u+=e[r][1].length,a&&a.length<=Math.max(l,c)&&a.length<=Math.max(d,u)&&(e.splice(i[s-1],0,new t.Diff(n,a)),e[i[s-1]+1][0]=1,s--,r=--s>0?i[s-1]:-1,l=0,c=0,d=0,u=0,a=null,o=!0)),r++;for(o&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),r=1;r<e.length;){if(e[r-1][0]==n&&1==e[r][0]){var p=e[r-1][1],h=e[r][1],g=this.diff_commonOverlap_(p,h),m=this.diff_commonOverlap_(h,p);g>=m?(g>=p.length/2||g>=h.length/2)&&(e.splice(r,0,new t.Diff(0,h.substring(0,g))),e[r-1][1]=p.substring(0,p.length-g),e[r+1][1]=h.substring(g),r++):(m>=p.length/2||m>=h.length/2)&&(e.splice(r,0,new t.Diff(0,p.substring(0,m))),e[r-1][0]=1,e[r-1][1]=h.substring(0,h.length-m),e[r+1][0]=n,e[r+1][1]=p.substring(m),r++),r++}r++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var o=e.charAt(e.length-1),i=n.charAt(0),s=o.match(t.nonAlphaNumericRegex_),a=i.match(t.nonAlphaNumericRegex_),r=s&&o.match(t.whitespaceRegex_),l=a&&i.match(t.whitespaceRegex_),c=r&&o.match(t.linebreakRegex_),d=l&&i.match(t.linebreakRegex_),u=c&&e.match(t.blanklineEndRegex_),p=d&&n.match(t.blanklineStartRegex_);return u||p?5:c||d?4:s&&!r&&l?3:r||l?2:s||a?1:0}for(var o=1;o<e.length-1;){if(0==e[o-1][0]&&0==e[o+1][0]){var i=e[o-1][1],s=e[o][1],a=e[o+1][1],r=this.diff_commonSuffix(i,s);if(r){var l=s.substring(s.length-r);i=i.substring(0,i.length-r),s=l+s.substring(0,s.length-r),a=l+a}for(var c=i,d=s,u=a,p=n(i,s)+n(s,a);s.charAt(0)===a.charAt(0);){i+=s.charAt(0),s=s.substring(1)+a.charAt(0),a=a.substring(1);var h=n(i,s)+n(s,a);h>=p&&(p=h,c=i,d=s,u=a)}e[o-1][1]!=c&&(c?e[o-1][1]=c:(e.splice(o-1,1),o--),e[o][1]=d,u?e[o+1][1]=u:(e.splice(o+1,1),o--))}o++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var o=!1,i=[],s=0,a=null,r=0,l=!1,c=!1,d=!1,u=!1;r<e.length;)0==e[r][0]?(e[r][1].length<this.Diff_EditCost&&(d||u)?(i[s++]=r,l=d,c=u,a=e[r][1]):(s=0,a=null),d=u=!1):(e[r][0]==n?u=!0:d=!0,a&&(l&&c&&d&&u||a.length<this.Diff_EditCost/2&&l+c+d+u==3)&&(e.splice(i[s-1],0,new t.Diff(n,a)),e[i[s-1]+1][0]=1,s--,a=null,l&&c?(d=u=!0,s=0):(r=--s>0?i[s-1]:-1,d=u=!1),o=!0)),r++;o&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var o,i=0,s=0,a=0,r="",l="";i<e.length;)switch(e[i][0]){case 1:a++,l+=e[i][1],i++;break;case n:s++,r+=e[i][1],i++;break;case 0:s+a>1?(0!==s&&0!==a&&(0!==(o=this.diff_commonPrefix(l,r))&&(i-s-a>0&&0==e[i-s-a-1][0]?e[i-s-a-1][1]+=l.substring(0,o):(e.splice(0,0,new t.Diff(0,l.substring(0,o))),i++),l=l.substring(o),r=r.substring(o)),0!==(o=this.diff_commonSuffix(l,r))&&(e[i][1]=l.substring(l.length-o)+e[i][1],l=l.substring(0,l.length-o),r=r.substring(0,r.length-o))),i-=s+a,e.splice(i,s+a),r.length&&(e.splice(i,0,new t.Diff(n,r)),i++),l.length&&(e.splice(i,0,new t.Diff(1,l)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,s=0,r="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(i=1;i<e.length-1;)0==e[i-1][0]&&0==e[i+1][0]&&(e[i][1].substring(e[i][1].length-e[i-1][1].length)==e[i-1][1]?(e[i][1]=e[i-1][1]+e[i][1].substring(0,e[i][1].length-e[i-1][1].length),e[i+1][1]=e[i-1][1]+e[i+1][1],e.splice(i-1,1),c=!0):e[i][1].substring(0,e[i+1][1].length)==e[i+1][1]&&(e[i-1][1]+=e[i+1][1],e[i][1]=e[i][1].substring(e[i+1][1].length)+e[i+1][1],e.splice(i+1,1),c=!0)),i++;c&&this.diff_cleanupMerge(e)},t.prototype.diff_xIndex=function(e,t){var o,i=0,s=0,a=0,r=0;for(o=0;o<e.length&&(1!==e[o][0]&&(i+=e[o][1].length),e[o][0]!==n&&(s+=e[o][1].length),!(i>t));o++)a=i,r=s;return e.length!=o&&e[o][0]===n?r:r+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],o=/&/g,i=/</g,s=/>/g,a=/\n/g,r=0;r<e.length;r++){var l=e[r][0],c=e[r][1].replace(o,"&").replace(i,"<").replace(s,">").replace(a,"¶<br>");switch(l){case 1:t[r]='<ins style="background:#e6ffe6;">'+c+"</ins>";break;case n:t[r]='<del style="background:#ffe6e6;">'+c+"</del>";break;case 0:t[r]="<span>"+c+"</span>"}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},t.prototype.diff_text2=function(e){for(var t=[],o=0;o<e.length;o++)e[o][0]!==n&&(t[o]=e[o][1]);return t.join("")},t.prototype.diff_levenshtein=function(e){for(var t=0,o=0,i=0,s=0;s<e.length;s++){var a=e[s][0],r=e[s][1];switch(a){case 1:o+=r.length;break;case n:i+=r.length;break;case 0:t+=Math.max(o,i),o=0,i=0}}return t+Math.max(o,i)},t.prototype.diff_toDelta=function(e){for(var t=[],o=0;o<e.length;o++)switch(e[o][0]){case 1:t[o]="+"+encodeURI(e[o][1]);break;case n:t[o]="-"+e[o][1].length;break;case 0:t[o]="="+e[o][1].length}return t.join("\t").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(e,o){for(var i=[],s=0,a=0,r=o.split(/\t/g),l=0;l<r.length;l++){var c=r[l].substring(1);switch(r[l].charAt(0)){case"+":try{i[s++]=new t.Diff(1,decodeURI(c))}catch(e){throw new Error("Illegal escape in diff_fromDelta: "+c)}break;case"-":case"=":var d=parseInt(c,10);if(isNaN(d)||d<0)throw new Error("Invalid number in diff_fromDelta: "+c);var u=e.substring(a,a+=d);"="==r[l].charAt(0)?i[s++]=new t.Diff(0,u):i[s++]=new t.Diff(n,u);break;default:if(r[l])throw new Error("Invalid diff operation in diff_fromDelta: "+r[l])}}if(a!=e.length)throw new Error("Delta length ("+a+") does not equal source text length ("+e.length+").");return i},t.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},t.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var o=this.match_alphabet_(t),i=this;function s(e,o){var s=e/t.length,a=Math.abs(n-o);return i.Match_Distance?s+a/i.Match_Distance:a?1:s}var a=this.Match_Threshold,r=e.indexOf(t,n);-1!=r&&(a=Math.min(s(0,r),a),-1!=(r=e.lastIndexOf(t,n+t.length))&&(a=Math.min(s(0,r),a)));var l,c,d=1<<t.length-1;r=-1;for(var u,p=t.length+e.length,h=0;h<t.length;h++){for(l=0,c=p;l<c;)s(h,n+c)<=a?l=c:p=c,c=Math.floor((p-l)/2+l);p=c;var g=Math.max(1,n-c+1),m=Math.min(n+c,e.length)+t.length,b=Array(m+2);b[m+1]=(1<<h)-1;for(var f=m;f>=g;f--){var x=o[e.charAt(f-1)];if(b[f]=0===h?(b[f+1]<<1|1)&x:(b[f+1]<<1|1)&x|(u[f+1]|u[f])<<1|1|u[f+1],b[f]&d){var y=s(h,f-1);if(y<=a){if(a=y,!((r=f-1)>n))break;g=Math.max(1,2*n-r)}}}if(s(h+1,n)>a)break;u=b}return r},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},t.prototype.patch_addContext_=function(e,n){if(0!=n.length){if(null===e.start2)throw Error("patch not initialized");for(var o=n.substring(e.start2,e.start2+e.length1),i=0;n.indexOf(o)!=n.lastIndexOf(o)&&o.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,o=n.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var s=n.substring(e.start2-i,e.start2);s&&e.diffs.unshift(new t.Diff(0,s)) |
| 202 |
;var a=n.substring(e.start2+e.length1,e.start2+e.length1+i);a&&e.diffs.push(new t.Diff(0,a)),e.start1-=s.length,e.start2-=s.length,e.length1+=s.length+a.length,e.length2+=s.length+a.length}},t.prototype.patch_make=function(e,o,i){var s,a;if("string"==typeof e&&"string"==typeof o&&void 0===i)s=e,(a=this.diff_main(s,o,!0)).length>2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===o&&void 0===i)a=e,s=this.diff_text1(a);else if("string"==typeof e&&o&&"object"==typeof o&&void 0===i)s=e,a=o;else{if("string"!=typeof e||"string"!=typeof o||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");s=e,a=i}if(0===a.length)return[];for(var r=[],l=new t.patch_obj,c=0,d=0,u=0,p=s,h=s,g=0;g<a.length;g++){var m=a[g][0],b=a[g][1];switch(c||0===m||(l.start1=d,l.start2=u),m){case 1:l.diffs[c++]=a[g],l.length2+=b.length,h=h.substring(0,u)+b+h.substring(u);break;case n:l.length1+=b.length,l.diffs[c++]=a[g],h=h.substring(0,u)+h.substring(u+b.length);break;case 0:b.length<=2*this.Patch_Margin&&c&&a.length!=g+1?(l.diffs[c++]=a[g],l.length1+=b.length,l.length2+=b.length):b.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,p),r.push(l),l=new t.patch_obj,c=0,p=h,d=u)}1!==m&&(d+=b.length),m!==n&&(u+=b.length)}return c&&(this.patch_addContext_(l,p),r.push(l)),r},t.prototype.patch_deepCopy=function(e){for(var n=[],o=0;o<e.length;o++){var i=e[o],s=new t.patch_obj;s.diffs=[];for(var a=0;a<i.diffs.length;a++)s.diffs[a]=new t.Diff(i.diffs[a][0],i.diffs[a][1]);s.start1=i.start1,s.start2=i.start2,s.length1=i.length1,s.length2=i.length2,n[o]=s}return n},t.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var o=this.patch_addPadding(e);t=o+t+o,this.patch_splitMax(e);for(var i=0,s=[],a=0;a<e.length;a++){var r,l,c=e[a].start2+i,d=this.diff_text1(e[a].diffs),u=-1;if(d.length>this.Match_MaxBits?-1!=(r=this.match_main(t,d.substring(0,this.Match_MaxBits),c))&&(-1==(u=this.match_main(t,d.substring(d.length-this.Match_MaxBits),c+d.length-this.Match_MaxBits))||r>=u)&&(r=-1):r=this.match_main(t,d,c),-1==r)s[a]=!1,i-=e[a].length2-e[a].length1;else if(s[a]=!0,i=r-c,d==(l=-1==u?t.substring(r,r+d.length):t.substring(r,u+this.Match_MaxBits)))t=t.substring(0,r)+this.diff_text2(e[a].diffs)+t.substring(r+d.length);else{var p=this.diff_main(d,l,!1);if(d.length>this.Match_MaxBits&&this.diff_levenshtein(p)/d.length>this.Patch_DeleteThreshold)s[a]=!1;else{this.diff_cleanupSemanticLossless(p);for(var h,g=0,m=0;m<e[a].diffs.length;m++){var b=e[a].diffs[m];0!==b[0]&&(h=this.diff_xIndex(p,g)),1===b[0]?t=t.substring(0,r+h)+b[1]+t.substring(r+h):b[0]===n&&(t=t.substring(0,r+h)+t.substring(r+this.diff_xIndex(p,g+b[1].length))),b[0]!==n&&(g+=b[1].length)}}}}return[t=t.substring(o.length,t.length-o.length),s]},t.prototype.patch_addPadding=function(e){for(var n=this.Patch_Margin,o="",i=1;i<=n;i++)o+=String.fromCharCode(i);for(i=0;i<e.length;i++)e[i].start1+=n,e[i].start2+=n;var s=e[0],a=s.diffs;if(0==a.length||0!=a[0][0])a.unshift(new t.Diff(0,o)),s.start1-=n,s.start2-=n,s.length1+=n,s.length2+=n;else if(n>a[0][1].length){var r=n-a[0][1].length;a[0][1]=o.substring(a[0][1].length)+a[0][1],s.start1-=r,s.start2-=r,s.length1+=r,s.length2+=r}return 0==(a=(s=e[e.length-1]).diffs).length||0!=a[a.length-1][0]?(a.push(new t.Diff(0,o)),s.length1+=n,s.length2+=n):n>a[a.length-1][1].length&&(r=n-a[a.length-1][1].length,a[a.length-1][1]+=o.substring(0,r),s.length1+=r,s.length2+=r),o},t.prototype.patch_splitMax=function(e){for(var o=this.Match_MaxBits,i=0;i<e.length;i++)if(!(e[i].length1<=o)){var s=e[i];e.splice(i--,1);for(var a=s.start1,r=s.start2,l="";0!==s.diffs.length;){var c=new t.patch_obj,d=!0;for(c.start1=a-l.length,c.start2=r-l.length,""!==l&&(c.length1=c.length2=l.length,c.diffs.push(new t.Diff(0,l)));0!==s.diffs.length&&c.length1<o-this.Patch_Margin;){var u=s.diffs[0][0],p=s.diffs[0][1];1===u?(c.length2+=p.length,r+=p.length,c.diffs.push(s.diffs.shift()),d=!1):u===n&&1==c.diffs.length&&0==c.diffs[0][0]&&p.length>2*o?(c.length1+=p.length,a+=p.length,d=!1,c.diffs.push(new t.Diff(u,p)),s.diffs.shift()):(p=p.substring(0,o-c.length1-this.Patch_Margin),c.length1+=p.length,a+=p.length,0===u?(c.length2+=p.length,r+=p.length):d=!1,c.diffs.push(new t.Diff(u,p)),p==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(p.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var h=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);""!==h&&(c.length1+=h.length,c.length2+=h.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=h:c.diffs.push(new t.Diff(0,h))),d||e.splice(++i,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},t.prototype.patch_fromText=function(e){var o=[];if(!e)return o;for(var i=e.split("\n"),s=0,a=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;s<i.length;){var r=i[s].match(a);if(!r)throw new Error("Invalid patch string: "+i[s]);var l=new t.patch_obj;for(o.push(l),l.start1=parseInt(r[1],10),""===r[2]?(l.start1--,l.length1=1):"0"==r[2]?l.length1=0:(l.start1--,l.length1=parseInt(r[2],10)),l.start2=parseInt(r[3],10),""===r[4]?(l.start2--,l.length2=1):"0"==r[4]?l.length2=0:(l.start2--,l.length2=parseInt(r[4],10)),s++;s<i.length;){var c=i[s].charAt(0);try{var d=decodeURI(i[s].substring(1))}catch(e){throw new Error("Illegal escape in patch_fromText: "+d)}if("-"==c)l.diffs.push(new t.Diff(n,d));else if("+"==c)l.diffs.push(new t.Diff(1,d));else if(" "==c)l.diffs.push(new t.Diff(0,d));else{if("@"==c)break;if(""!==c)throw new Error('Invalid patch mode "'+c+'" in: '+d)}s++}}return o},(t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0}).prototype.toString=function(){for(var e,t=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],o=0;o<this.diffs.length;o++){switch(this.diffs[o][0]){case 1:e="+";break;case n:e="-";break;case 0:e=" "}t[o+1]=e+encodeURI(this.diffs[o][1])+"\n"}return t.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0},1040(e,t,n){var o=n(8404),i=n(2524).each;function s(e,t){this.query=e,this.isUnconditional=t,this.handlers=[],this.mql=window.matchMedia(e);var n=this;this.listener=function(e){n.mql=e.currentTarget||e,n.assess()},this.mql.addListener(this.listener)}s.prototype={constuctor:s,addHandler:function(e){var t=new o(e);this.handlers.push(t),this.matches()&&t.on()},removeHandler:function(e){var t=this.handlers;i(t,(function(n,o){if(n.equals(e))return n.destroy(),!t.splice(o,1)}))},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){i(this.handlers,(function(e){e.destroy()})),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var e=this.matches()?"on":"off";i(this.handlers,(function(t){t[e]()}))}},e.exports=s},1098(e,t,n){var o=n(1040),i=n(2524),s=i.each,a=i.isFunction,r=i.isArray;function l(){if(!window.matchMedia)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!window.matchMedia("only all").matches}l.prototype={constructor:l,register:function(e,t,n){var i=this.queries,l=n&&this.browserIsIncapable;return i[e]||(i[e]=new o(e,l)),a(t)&&(t={match:t}),r(t)||(t=[t]),s(t,(function(t){a(t)&&(t={match:t}),i[e].addHandler(t)})),this},unregister:function(e,t){var n=this.queries[e];return n&&(t?n.removeHandler(t):(n.clear(),delete this.queries[e])),this}},e.exports=l},8404(e){function t(e){this.options=e,!e.deferSetup&&this.setup()}t.prototype={constructor:t,setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){ |
| 203 |
this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(e){return this.options===e||this.options.match===e}},e.exports=t},2524(e){e.exports={isFunction:function(e){return"function"==typeof e},isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},each:function(e,t){for(var n=0,o=e.length;n<o&&!1!==t(e[n],n);n++);}}},2386(e,t,n){var o=n(1098);e.exports=new o},1441(e,t,n){var o=n(8028),i=function(e){var t="",n=Object.keys(e);return n.forEach((function(i,s){var a=e[i];(function(e){return/[height|width]$/.test(e)})(i=o(i))&&"number"==typeof a&&(a+="px"),t+=!0===a?i:!1===a?"not "+i:"("+i+": "+a+")",s<n.length-1&&(t+=" and ")})),t};e.exports=function(e){var t="";return"string"==typeof e?e:e instanceof Array?(e.forEach((function(n,o){t+=i(n),o<e.length-1&&(t+=", ")})),t):i(e)}},181(e){var t=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,s=parseInt,a="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis,r="object"==typeof self&&self&&self.Object===Object&&self,l=a||r||Function("return this")(),c=Object.prototype.toString,d=Math.max,u=Math.min,p=function(){return l.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(h(e)){var a="function"==typeof e.valueOf?e.valueOf():e;e=h(a)?a+"":a}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(t,"");var r=o.test(e);return r||i.test(e)?s(e.slice(2),r?2:8):n.test(e)?NaN:+e}e.exports=function(e,t,n){var o,i,s,a,r,l,c=0,m=!1,b=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function x(t){var n=o,s=i;return o=i=void 0,c=t,a=e.apply(s,n)}function y(e){var n=e-l;return void 0===l||n>=t||n<0||b&&e-c>=s}function v(){var e=p();if(y(e))return k(e);r=setTimeout(v,function(e){var n=t-(e-l);return b?u(n,s-(e-c)):n}(e))}function k(e){return r=void 0,f&&o?x(e):(o=i=void 0,a)}function w(){var e=p(),n=y(e);if(o=arguments,i=this,l=e,n){if(void 0===r)return function(e){return c=e,r=setTimeout(v,t),m?x(e):a}(l);if(b)return r=setTimeout(v,t),x(l)}return void 0===r&&(r=setTimeout(v,t)),a}return t=g(t)||0,h(n)&&(m=!!n.leading,s=(b="maxWait"in n)?d(g(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f),w.cancel=function(){void 0!==r&&clearTimeout(r),c=0,o=l=i=r=void 0},w.flush=function(){return void 0===r?a:k(p())},w}},6762(e){var t,n="__lodash_hash_undefined__",o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,s=/^\./,a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,l=/^\[object .+?Constructor\]$/,c="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis,d="object"==typeof self&&self&&self.Object===Object&&self,u=c||d||Function("return this")(),p=Array.prototype,h=Function.prototype,g=Object.prototype,m=u["__core-js_shared__"],b=(t=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"",f=h.toString,x=g.hasOwnProperty,y=g.toString,v=RegExp("^"+f.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=u.Symbol,w=p.splice,_=E(u,"Map"),C=E(Object,"create"),j=k?k.prototype:void 0,$=j?j.toString:void 0;function S(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function N(e,t){for(var n,o,i=e.length;i--;)if((n=e[i][0])===(o=t)||n!=n&&o!=o)return i;return-1}function L(e,t){var n,o,i=e.__data__;return("string"==(o=typeof(n=t))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function E(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!O(e)||b&&b in e)return!1;var t=function(e){var t=O(e)?y.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?v:l;return t.test(function(e){if(null!=e){try{return f.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}S.prototype.clear=function(){this.__data__=C?C(null):{}},S.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},S.prototype.get=function(e){var t=this.__data__;if(C){var o=t[e];return o===n?void 0:o}return x.call(t,e)?t[e]:void 0},S.prototype.has=function(e){var t=this.__data__;return C?void 0!==t[e]:x.call(t,e)},S.prototype.set=function(e,t){return this.__data__[e]=C&&void 0===t?n:t,this},T.prototype.clear=function(){this.__data__=[]},T.prototype.delete=function(e){var t=this.__data__,n=N(t,e);return!(n<0||(n==t.length-1?t.pop():w.call(t,n,1),0))},T.prototype.get=function(e){var t=this.__data__,n=N(t,e);return n<0?void 0:t[n][1]},T.prototype.has=function(e){return N(this.__data__,e)>-1},T.prototype.set=function(e,t){var n=this.__data__,o=N(n,e);return o<0?n.push([e,t]):n[o][1]=t,this},M.prototype.clear=function(){this.__data__={hash:new S,map:new(_||T),string:new S}},M.prototype.delete=function(e){return L(this,e).delete(e)},M.prototype.get=function(e){return L(this,e).get(e)},M.prototype.has=function(e){return L(this,e).has(e)},M.prototype.set=function(e,t){return L(this,e).set(e,t),this};var P=B((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(R(e))return $?$.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return s.test(e)&&n.push(""),e.replace(a,(function(e,t,o,i){n.push(o?i.replace(r,"$1"):t||e)})),n}));function A(e){if("string"==typeof e||R(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var o=arguments,i=t?t.apply(this,o):o[0],s=n.cache;if(s.has(i))return s.get(i);var a=e.apply(this,o);return n.cache=s.set(i,a),a};return n.cache=new(B.Cache||M),n}B.Cache=M;var I=Array.isArray;function O(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function R(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==y.call(e)}e.exports=function(e,t,n){var s=null==e?void 0:function(e,t){var n;t=function(e,t){if(I(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!R(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:I(n=t)?n:P(n);for(var s=0,a=t.length;null!=e&&s<a;)e=e[A(t[s++])];return s&&s==a?e:void 0}(e,t);return void 0===s?n:s}},8142(e,t,n){e=n.nmd(e);var o="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",a="[object Array]",r="[object Boolean]",l="[object Date]",c="[object Error]",d="[object Function]",u="[object Map]",p="[object Number]",h="[object Object]",g="[object Promise]",m="[object RegExp]",b="[object Set]",f="[object String]",x="[object WeakMap]",y="[object ArrayBuffer]",v="[object DataView]",k=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,_={};_["[object Float32Array]"]=_["[object Float64Array]"]=_["[object Int8Array]"]=_["[object Int16Array]"]=_["[object Int32Array]"]=_["[object Uint8Array]"]=_["[object Uint8ClampedArray]"]=_["[object Uint16Array]"]=_["[object Uint32Array]"]=!0,_[s]=_[a]=_[y]=_[r]=_[v]=_[l]=_[c]=_[d]=_[u]=_[p]=_[h]=_[m]=_[b]=_[f]=_[x]=!1;var C="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis,j="object"==typeof self&&self&&self.Object===Object&&self,$=C||j||Function("return this")(),S=t&&!t.nodeType&&t,T=S&&e&&!e.nodeType&&e,M=T&&T.exports===S,N=M&&C.process,L=function(){try{return N&&N.binding&&N.binding("util")}catch(e){}}(),E=L&&L.isTypedArray;function P(e,t){ |
| 204 |
for(var n=-1,o=null==e?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}function A(e){var t=-1,n=Array(e.size);return e.forEach((function(e,o){n[++t]=[o,e]})),n}function B(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var I,O,R,z=Array.prototype,D=Function.prototype,F=Object.prototype,H=$["__core-js_shared__"],W=D.toString,U=F.hasOwnProperty,G=(I=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"",V=F.toString,q=RegExp("^"+W.call(U).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=M?$.Buffer:void 0,K=$.Symbol,Q=$.Uint8Array,Z=F.propertyIsEnumerable,X=z.splice,J=K?K.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=Y?Y.isBuffer:void 0,ne=(O=Object.keys,R=Object,function(e){return O(R(e))}),oe=Te($,"DataView"),ie=Te($,"Map"),se=Te($,"Promise"),ae=Te($,"Set"),re=Te($,"WeakMap"),le=Te(Object,"create"),ce=Ee(oe),de=Ee(ie),ue=Ee(se),pe=Ee(ae),he=Ee(re),ge=K?K.prototype:void 0,me=ge?ge.valueOf:void 0;function be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function fe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new xe;++t<n;)this.add(e[t])}function ve(e){var t=this.__data__=new fe(e);this.size=t.size}function ke(e,t){for(var n=e.length;n--;)if(Pe(e[n][0],t))return n;return-1}function we(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":J&&J in Object(e)?function(e){var t=U.call(e,J),n=e[J];try{e[J]=void 0;var o=!0}catch(e){}var i=V.call(e);return o&&(t?e[J]=n:delete e[J]),i}(e):function(e){return V.call(e)}(e)}function _e(e){return De(e)&&we(e)==s}function Ce(e,t,n,o,i){return e===t||(null==e||null==t||!De(e)&&!De(t)?e!=e&&t!=t:function(e,t,n,o,i,d){var g=Be(e),x=Be(t),k=g?a:Ne(e),w=x?a:Ne(t),_=(k=k==s?h:k)==h,C=(w=w==s?h:w)==h,j=k==w;if(j&&Ie(e)){if(!Ie(t))return!1;g=!0,_=!1}if(j&&!_)return d||(d=new ve),g||Fe(e)?je(e,t,n,o,i,d):function(e,t,n,o,i,s,a){switch(n){case v:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!s(new Q(e),new Q(t)));case r:case l:case p:return Pe(+e,+t);case c:return e.name==t.name&&e.message==t.message;case m:case f:return e==t+"";case u:var d=A;case b:var h=1&o;if(d||(d=B),e.size!=t.size&&!h)return!1;var g=a.get(e);if(g)return g==t;o|=2,a.set(e,t);var x=je(d(e),d(t),o,i,s,a);return a.delete(e),x;case"[object Symbol]":if(me)return me.call(e)==me.call(t)}return!1}(e,t,k,n,o,i,d);if(!(1&n)){var $=_&&U.call(e,"__wrapped__"),S=C&&U.call(t,"__wrapped__");if($||S){var T=$?e.value():e,M=S?t.value():t;return d||(d=new ve),i(T,M,n,o,d)}}return!!j&&(d||(d=new ve),function(e,t,n,o,i,s){var a=1&n,r=$e(e),l=r.length;if(l!=$e(t).length&&!a)return!1;for(var c=l;c--;){var d=r[c];if(!(a?d in t:U.call(t,d)))return!1}var u=s.get(e);if(u&&s.get(t))return u==t;var p=!0;s.set(e,t),s.set(t,e);for(var h=a;++c<l;){var g=e[d=r[c]],m=t[d];if(o)var b=a?o(m,g,d,t,e,s):o(g,m,d,e,t,s);if(!(void 0===b?g===m||i(g,m,n,o,s):b)){p=!1;break}h||(h="constructor"==d)}if(p&&!h){var f=e.constructor,x=t.constructor;f==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof f&&f instanceof f&&"function"==typeof x&&x instanceof x||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,n,o,i,d))}(e,t,n,o,Ce,i))}function je(e,t,n,o,i,s){var a=1&n,r=e.length,l=t.length;if(r!=l&&!(a&&l>r))return!1;var c=s.get(e);if(c&&s.get(t))return c==t;var d=-1,u=!0,p=2&n?new ye:void 0;for(s.set(e,t),s.set(t,e);++d<r;){var h=e[d],g=t[d];if(o)var m=a?o(g,h,d,t,e,s):o(h,g,d,e,t,s);if(void 0!==m){if(m)continue;u=!1;break}if(p){if(!P(t,(function(e,t){if(a=t,!p.has(a)&&(h===e||i(h,e,n,o,s)))return p.push(t);var a}))){u=!1;break}}else if(h!==g&&!i(h,g,n,o,s)){u=!1;break}}return s.delete(e),s.delete(t),u}function $e(e){return function(e,t,n){var o=t(e);return Be(e)?o:function(e,t){for(var n=-1,o=t.length,i=e.length;++n<o;)e[i+n]=t[n];return e}(o,n(e))}(e,He,Me)}function Se(e,t){var n,o,i=e.__data__;return("string"==(o=typeof(n=t))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Te(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ze(e)||function(e){return!!G&&G in e}(e))&&(Oe(e)?q:k).test(Ee(e))}(n)?n:void 0}be.prototype.clear=function(){this.__data__=le?le(null):{},this.size=0},be.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},be.prototype.get=function(e){var t=this.__data__;if(le){var n=t[e];return n===o?void 0:n}return U.call(t,e)?t[e]:void 0},be.prototype.has=function(e){var t=this.__data__;return le?void 0!==t[e]:U.call(t,e)},be.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=le&&void 0===t?o:t,this},fe.prototype.clear=function(){this.__data__=[],this.size=0},fe.prototype.delete=function(e){var t=this.__data__,n=ke(t,e);return!(n<0||(n==t.length-1?t.pop():X.call(t,n,1),--this.size,0))},fe.prototype.get=function(e){var t=this.__data__,n=ke(t,e);return n<0?void 0:t[n][1]},fe.prototype.has=function(e){return ke(this.__data__,e)>-1},fe.prototype.set=function(e,t){var n=this.__data__,o=ke(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this},xe.prototype.clear=function(){this.size=0,this.__data__={hash:new be,map:new(ie||fe),string:new be}},xe.prototype.delete=function(e){var t=Se(this,e).delete(e);return this.size-=t?1:0,t},xe.prototype.get=function(e){return Se(this,e).get(e)},xe.prototype.has=function(e){return Se(this,e).has(e)},xe.prototype.set=function(e,t){var n=Se(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this},ye.prototype.add=ye.prototype.push=function(e){return this.__data__.set(e,o),this},ye.prototype.has=function(e){return this.__data__.has(e)},ve.prototype.clear=function(){this.__data__=new fe,this.size=0},ve.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ve.prototype.get=function(e){return this.__data__.get(e)},ve.prototype.has=function(e){return this.__data__.has(e)},ve.prototype.set=function(e,t){var n=this.__data__;if(n instanceof fe){var o=n.__data__;if(!ie||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new xe(o)}return n.set(e,t),this.size=n.size,this};var Me=ee?function(e){return null==e?[]:(e=Object(e),function(t){for(var n=-1,o=null==t?0:t.length,i=0,s=[];++n<o;){var a=t[n];r=a,Z.call(e,r)&&(s[i++]=a)}var r;return s}(ee(e)))}:function(){return[]},Ne=we;function Le(e,t){return!!(t=t??i)&&("number"==typeof e||w.test(e))&&e>-1&&e%1==0&&e<t}function Ee(e){if(null!=e){try{return W.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Pe(e,t){return e===t||e!=e&&t!=t}(oe&&Ne(new oe(new ArrayBuffer(1)))!=v||ie&&Ne(new ie)!=u||se&&Ne(se.resolve())!=g||ae&&Ne(new ae)!=b||re&&Ne(new re)!=x)&&(Ne=function(e){var t=we(e),n=t==h?e.constructor:void 0,o=n?Ee(n):"";if(o)switch(o){case ce:return v;case de:return u;case ue:return g;case pe:return b;case he:return x}return t});var Ae=_e(function(){return arguments}())?_e:function(e){return De(e)&&U.call(e,"callee")&&!Z.call(e,"callee")},Be=Array.isArray,Ie=te||function(){return!1};function Oe(e){if(!ze(e))return!1;var t=we(e);return t==d||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Re(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function ze(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function De(e){return null!=e&&"object"==typeof e}var Fe=E?function(e){return function(t){return e(t)}}(E):function(e){return De(e)&&Re(e.length)&&!!_[we(e)]};function He(e){return null!=(t=e)&&Re(t.length)&&!Oe(t)?function(e,t){var n=Be(e),o=!n&&Ae(e),i=!n&&!o&&Ie(e),s=!n&&!o&&!i&&Fe(e),a=n||o||i||s,r=a?function(e,t){ |
| 205 |
for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}(e.length,String):[],l=r.length;for(var c in e)!t&&!U.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Le(c,l))||r.push(c);return r}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||F))return ne(e);var t,n,o=[];for(var i in Object(e))U.call(e,i)&&"constructor"!=i&&o.push(i);return o}(e);var t}e.exports=function(e,t){return Ce(e,t)}},7022(){!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},o={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:o},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:o},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:o.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:o.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=o.variable[1].inside,a=0;a<i.length;a++)s[i[a]]=e.languages.bash[i[a]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(Prism)},271(){Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment, |
| 206 |
"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean},5624(){Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},1983(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,o={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof s?new s(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var o,s;switch(n=n||{},i.util.type(t)){case"Object":if(s=i.util.objId(t),n[s])return n[s];for(var a in o={},n[s]=o,t)t.hasOwnProperty(a)&&(o[a]=e(t[a],n));return o;case"Array":return s=i.util.objId(t),n[s]?n[s]:(o=[],n[s]=o,t.forEach((function(t,i){o[i]=e(t,n)})),o);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if(document.currentScript&&"SCRIPT"===document.currentScript.tagName)return document.currentScript;try{throw new Error}catch(o){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(o.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var o="no-"+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(o))return!1;e=e.parentElement}return!!n}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var o in t)n[o]=t[o];return n},insertBefore:function(e,t,n,o){var s=(o=o||i.languages)[e],a={};for(var r in s)if(s.hasOwnProperty(r)){if(r==t)for(var l in n)n.hasOwnProperty(l)&&(a[l]=n[l]);n.hasOwnProperty(r)||(a[r]=s[r])}var c=o[e];return o[e]=a,i.languages.DFS(i.languages,(function(t,n){n===c&&t!=e&&(this[t]=a)})),a},DFS:function e(t,n,o,s){s=s||{};var a=i.util.objId;for(var r in t)if(t.hasOwnProperty(r)){n.call(t,r,t[r],o||r);var l=t[r],c=i.util.type(l);"Object"!==c||s[a(l)]?"Array"!==c||s[a(l)]||(s[a(l)]=!0,e(l,n,r,s)):(s[a(l)]=!0,e(l,n,null,s))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var o={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",o),o.elements=Array.prototype.slice.apply(o.container.querySelectorAll(o.selector)),i.hooks.run("before-all-elements-highlight",o);for(var s,a=0;s=o.elements[a++];)i.highlightElement(s,!0===t,o.callback)},highlightElement:function(t,n,o){var s=i.util.getLanguage(t),a=i.languages[s];i.util.setLanguage(t,s);var r=t.parentElement;r&&"pre"===r.nodeName.toLowerCase()&&i.util.setLanguage(r,s);var l={element:t,language:s,grammar:a,code:t.textContent};function c(e){l.highlightedCode=e,i.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,i.hooks.run("after-highlight",l),i.hooks.run("complete",l),o&&o.call(l.element)}if(i.hooks.run("before-sanity-check",l),(r=l.element.parentElement)&&"pre"===r.nodeName.toLowerCase()&&!r.hasAttribute("tabindex")&&r.setAttribute("tabindex","0"),!l.code)return i.hooks.run("complete",l),void(o&&o.call(l.element));if(i.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var d=new Worker(i.filename);d.onmessage=function(e){c(e.data)},d.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else c(i.highlight(l.code,l.grammar,l.language));else c(i.util.encode(l.code))},highlight:function(e,t,n){var o={code:e,grammar:t,language:n};if(i.hooks.run("before-tokenize",o),!o.grammar)throw new Error('The language "'+o.language+'" has no grammar.');return o.tokens=i.tokenize(o.code,o.grammar),i.hooks.run("after-tokenize",o),s.stringify(i.util.encode(o.tokens),o.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var o in n)t[o]=n[o];delete t.rest}var i=new l;return c(i,i.head,e),r(e,i,t,i.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(i)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(n&&n.length)for(var o,s=0;o=n[s++];)o(t)}},Token:s};function s(e,t,n,o){this.type=e,this.content=t,this.alias=n,this.length=0|(o||"").length}function a(e,t,n,o){e.lastIndex=t;var i=e.exec(n);if(i&&o&&i[1]){var s=i[1].length;i.index+=s,i[0]=i[0].slice(s)}return i}function r(e,t,n,o,l,u){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var h=n[p];h=Array.isArray(h)?h:[h];for(var g=0;g<h.length;++g){if(u&&u.cause==p+","+g)return;var m=h[g],b=m.inside,f=!!m.lookbehind,x=!!m.greedy,y=m.alias;if(x&&!m.pattern.global){var v=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,v+"g")}for(var k=m.pattern||m,w=o.next,_=l;w!==t.tail&&!(u&&_>=u.reach);_+=w.value.length,w=w.next){var C=w.value;if(t.length>e.length)return;if(!(C instanceof s)){var j,$=1;if(x){if(!(j=a(k,_,e,f))||j.index>=e.length)break;var S=j.index,T=j.index+j[0].length,M=_;for(M+=w.value.length;S>=M;)M+=(w=w.next).value.length;if(_=M-=w.value.length,w.value instanceof s)continue;for(var N=w;N!==t.tail&&(M<T||"string"==typeof N.value);N=N.next)$++,M+=N.value.length;$--,C=e.slice(_,M),j.index-=_}else if(!(j=a(k,0,C,f)))continue;S=j.index;var L=j[0],E=C.slice(0,S),P=C.slice(S+L.length),A=_+C.length;u&&A>u.reach&&(u.reach=A);var B=w.prev;if(E&&(B=c(t,B,E),_+=E.length),d(t,B,$),w=c(t,B,new s(p,b?i.tokenize(L,b):L,y,L)),P&&c(t,w,P),$>1){var I={cause:p+","+g,reach:A};r(e,t,n,w.prev,_,I),u&&I.reach>u.reach&&(u.reach=I.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var o=t.next,i={value:n,prev:t,next:o};return t.next=i,o.prev=i,e.length++,i}function d(e,t,n){for(var o=t.next,i=0;i<n&&o!==e.tail;i++)o=o.next;t.next=o,o.prev=t,e.length-=i}if(e.Prism=i,s.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var o="";return t.forEach((function(t){o+=e(t,n)})),o}var s={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(s.classes,a):s.classes.push(a)),i.hooks.run("wrap",s);var r="";for(var l in s.attributes)r+=" "+l+'="'+(s.attributes[l]||"").replace(/"/g,""")+'"';return"<"+s.tag+' class="'+s.classes.join(" ")+'"'+r+">"+s.content+"</"+s.tag+">"},!e.document)return e.addEventListener?(i.disableWorkerMessageHandler||e.addEventListener("message",(function(t){ |
| 207 |
var n=JSON.parse(t.data),o=n.language,s=n.code,a=n.immediateClose;e.postMessage(i.highlight(s,i.languages[o],o)),a&&e.close()}),!1),i):i;var u=i.util.currentScript();function p(){i.manual||i.highlightAll()}if(u&&(i.filename=u.src,u.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var h=document.readyState;"loading"===h||"interactive"===h&&u&&u.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=t),"undefined"!=typeof globalThis&&(globalThis.Prism=t)},2415(){!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)},5651(){!function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,o){return RegExp(t(e,n),o||"")}function o(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,(function(){return"(?:"+e+")"}));return e.replace(/<<self>>/g,"[^\\s\\S]")}var i="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",s="class enum interface record struct",a="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",r="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=l(s),d=RegExp(l(i+" "+s+" "+a+" "+r)),u=l(s+" "+a+" "+r),p=l(i+" "+s+" "+r),h=o(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),g=o(/\((?:[^()]|<<self>>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,b=t(/<<0>>(?:\s*<<1>>)?/.source,[m,h]),f=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,b]),x=/\[\s*(?:,\s*)*\]/.source,y=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[f,x]),v=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[h,g,x]),k=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[v]),w=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[k,f,x]),_={keyword:d,punctuation:/[<>()?,.:[\]]/},C=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,j=/"(?:\\.|[^\\"\r\n])*"/.source,$=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[$]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[f]),lookbehind:!0,inside:_},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,w]),lookbehind:!0,inside:_},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,b]),lookbehind:!0,inside:_},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[f]),lookbehind:!0,inside:_},{pattern:n(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[y]),lookbehind:!0,inside:_},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[w,p,m]),inside:_}],keyword:d,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[g]),lookbehind:!0,alias:"class-name",inside:_},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[w,f]),inside:_,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[w]),lookbehind:!0,inside:_,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,h]),inside:{function:n(/^<<0>>/.source,[m]),generic:{pattern:RegExp(h),alias:"class-name",inside:_}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,b,m,w,d.source,g,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[b,g]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:d,"class-name":{pattern:RegExp(w),greedy:!0,inside:_},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}}) |
| 208 |
;var S=j+"|"+C,T=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[S]),M=o(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[T]),2),N=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,L=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[f,M]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[N,L]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[N]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[M]),inside:e.languages.csharp},"class-name":{pattern:RegExp(f),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var E=/:[^}\r\n]+/.source,P=o(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[T]),2),A=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[P,E]),B=o(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[S]),2),I=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[B,E]);function O(t,o){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[o,E]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[A]),lookbehind:!0,greedy:!0,inside:O(A,P)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[I]),lookbehind:!0,greedy:!0,inside:O(I,B)}],char:{pattern:RegExp(C),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)},1113(){!function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism)},869(){!function(e){var t=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={pattern:RegExp(n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[o,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:o.inside}],keyword:t,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":o,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism)},7839(){!function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var o=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),"diff"===n&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+o+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(Prism)},6378(){Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"]},4619(){Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Prism.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var o=t[n++];if("keyword"===o.type&&"mutation"===o.content){var i=[];if(u(["definition-mutation","punctuation"])&&"("===d(1).content){n+=2;var s=p(/^\($/,/^\)$/);if(-1===s)continue;for(;n<s;n++){var a=d(0) |
| 209 |
;"variable"===a.type&&(h(a,"variable-input"),i.push(a.content))}n=s+1}if(u(["punctuation","property-query"])&&"{"===d(0).content&&(n++,h(d(0),"property-mutation"),i.length>0)){var r=p(/^\{$/,/^\}$/);if(-1===r)continue;for(var l=n;l<r;l++){var c=t[l];"variable"===c.type&&i.indexOf(c.content)>=0&&h(c,"variable-input")}}}}function d(e){return t[n+e]}function u(e,t){t=t||0;for(var n=0;n<e.length;n++){var o=d(n+t);if(!o||o.type!==e[n])return!1}return!0}function p(e,o){for(var i=1,s=n;s<t.length;s++){var a=t[s],r=a.content;if("punctuation"===a.type&&"string"==typeof r)if(e.test(r))i++;else if(o.test(r)&&0==--i)return s}return-1}function h(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}}))},554(){Prism.languages.haskell={comment:{pattern:/(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--(?:(?=.)[^-!#$%*+=?&@|~.:<>^\\\/].*|$)|\{-[\s\S]*?-\})/m,lookbehind:!0},char:{pattern:/'(?:[^\\']|\\(?:[abfnrtv\\"'&]|\^[A-Z@[\]^_]|ACK|BEL|BS|CAN|CR|DC1|DC2|DC3|DC4|DEL|DLE|EM|ENQ|EOT|ESC|ETB|ETX|FF|FS|GS|HT|LF|NAK|NUL|RS|SI|SO|SOH|SP|STX|SUB|SYN|US|VT|\d+|o[0-7]+|x[0-9a-fA-F]+))'/,alias:"string"},string:{pattern:/"(?:[^\\"]|\\(?:\S|\s+\\))*"/,greedy:!0},keyword:/\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,"import-statement":{pattern:/(^[\t ]*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|hiding|import|qualified)\b/,punctuation:/\./}},builtin:/\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,operator:[{pattern:/`(?:[A-Z][\w']*\.)*[_a-z][\w']*`/,greedy:!0},{pattern:/(\s)\.(?=\s)/,lookbehind:!0},/[-!#$%*+=?&@|~:<>^\\\/][-!#$%*+=?&@|~.:<>^\\\/]*|\.[-!#$%*+=?&@|~.:<>^\\\/]+/],hvariable:{pattern:/\b(?:[A-Z][\w']*\.)*[_a-z][\w']*/,inside:{punctuation:/\./}},constant:{pattern:/\b(?:[A-Z][\w']*\.)*[A-Z][\w']*/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:]/},Prism.languages.hs=Prism.languages.haskell},6976(){!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[o,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:o.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:o.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":o,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:o.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:o.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)},5723(){Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}), |
| 210 |
Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript},2514(){Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json},5903(){!function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,o=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function s(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return o})).replace(/<SPREAD>/g,(function(){return i})),RegExp(e,t)}i=s(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=s(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:s(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:s(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var a=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(a).join(""):""},r=function(t){for(var n=[],o=0;o<t.length;o++){var i=t[o],s=!1;if("string"!=typeof i&&("tag"===i.type&&i.content[0]&&"tag"===i.content[0].type?"</"===i.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===a(i.content[0].content[1])&&n.pop():"/>"===i.content[i.content.length-1].content||n.push({tagName:a(i.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===i.type&&"{"===i.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?n[n.length-1].openedBraces--:s=!0),(s||"string"==typeof i)&&n.length>0&&0===n[n.length-1].openedBraces){var l=a(i);o<t.length-1&&("string"==typeof t[o+1]||"plain-text"===t[o+1].type)&&(l+=a(t[o+1]),t.splice(o+1,1)),o>0&&("string"==typeof t[o-1]||"plain-text"===t[o-1].type)&&(l=a(t[o-1])+l,t.splice(o-1,1),o--),t[o]=new e.Token("plain-text",l,null,l)}i.content&&"string"!=typeof i.content&&r(i.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||r(e.tokens)}))}(Prism)},463(){Prism.languages.julia={comment:{pattern:/(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,lookbehind:!0},regex:{pattern:/r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,greedy:!0},string:{pattern:/"""[\s\S]+?"""|(?:\b\w+)?"(?:\\.|[^"\\\r\n])*"|`(?:[^\\`\r\n]|\\.)*`/,greedy:!0},char:{pattern:/(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'/,lookbehind:!0,greedy:!0},keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,operator:/&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/,punctuation:/::?|[{}[\]();,.?]/,constant:/\b(?:(?:Inf|NaN)(?:16|32|64)?|im|pi)\b|[πℯ]/}},9913(){!function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}], |
| 211 |
number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(Prism)},8713(){Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})},5545(){!function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var o=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return o})),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+s+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+s+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(o),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(o),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,o=t.length;n<o;n++){var i=t[n];if("code"===i.type){var s=i.content[1],a=i.content[3];if(s&&a&&"code-language"===s.type&&"code-block"===a.type&&"string"==typeof s.content){var r=s.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),l="language-"+(r=(/[a-z][\w-]*/i.exec(r)||[""])[0].toLowerCase());a.alias?"string"==typeof a.alias?a.alias=[a.alias,l]:a.alias.push(l):a.alias=[l]}}else e(i.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",o=0,i=t.classes.length;o<i;o++){var s=t.classes[o],c=/language-(.+)/.exec(s);if(c){n=c[1];break}}var d=e.languages[n];if(d)t.content=e.highlight(t.content.replace(a,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;return"#"===(t=t.toLowerCase())[0]?(n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n)):r[t]||e})),d,n);else if(n&&"none"!==n&&e.plugins.autoloader){var u="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=u,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(u);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}}));var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),r={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism)},9700(){!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,o,i,s){if(n.language===o){var a=n.tokenStack=[];n.code=n.code.replace(i,(function(e){if("function"==typeof s&&!s(e))return e;for(var i,r=a.length;-1!==n.code.indexOf(i=t(o,r));)++r;return a[r]=e,i})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,o){if(n.language===o&&n.tokenStack){n.grammar=e.languages[o];var i=0,s=Object.keys(n.tokenStack);!function a(r){for(var l=0;l<r.length&&!(i>=s.length);l++){var c=r[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var d=s[i],u=n.tokenStack[d],p="string"==typeof c?c:c.content,h=t(o,d),g=p.indexOf(h);if(g>-1){++i;var m=p.substring(0,g),b=new e.Token(o,e.tokenize(u,n.grammar),"language-"+o,u),f=p.substring(g+h.length),x=[] |
| 212 |
;m&&x.push.apply(x,a([m])),x.push(b),f&&x.push.apply(x,a([f])),"string"==typeof c?r.splice.apply(r,[l,1].concat(x)):c.content=x}}else c.content&&a(c.content)}return r}(n.tokens)}}}})}(Prism)},4312(){Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};o["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:o},Prism.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml},2821(){!function(e){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}(Prism)},3554(){!function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],o=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{ |
| 213 |
pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:o,operator:i,punctuation:s};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];e.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:o,operator:i,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(Prism)},2342(){Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python},1648(){!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",o=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+o),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+o+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}), |
| 214 |
e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism)},5342(){!function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)},4604(){Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss},6966(){Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, |
| 215 |
keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}},4793(){Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift}))},2769(){!function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(Prism)},9587(){!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)},83(){!function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,o="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),s=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function a(e,t){ |
| 216 |
t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return o})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return o}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return o})).replace(/<<key>>/g,(function(){return"(?:"+i+"|"+s+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:a(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:a(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:a(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:a(s),lookbehind:!0,greedy:!0},number:{pattern:a(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism)},2694(e,t,n){"use strict";var o=n(6925);function i(){}function s(){}s.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,s,a){if(a!==o){var r=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw r.name="Invariant Violation",r}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:i};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5549(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(952),r=n(5556),l=n(1609),c=n(8142),d=n(5707),u=(0,d.getAceInstance)(),p=function(e){function t(t){var n=e.call(this,t)||this;return d.editorEvents.forEach((function(e){n[e]=n[e].bind(n)})),n.debounce=d.debounce,n}return i(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,o=t.onBeforeLoad,i=t.onValidate,s=t.mode,a=t.focus,r=t.theme,l=t.fontSize,c=t.lineHeight,p=t.value,h=t.defaultValue,g=t.showGutter,m=t.wrapEnabled,b=t.showPrintMargin,f=t.scrollMargin,x=void 0===f?[0,0,0,0]:f,y=t.keyboardHandler,v=t.onLoad,k=t.commands,w=t.annotations,_=t.markers,C=t.placeholder;this.editor=u.edit(this.refEditor),o&&o(u);for(var j=Object.keys(this.props.editorProps),$=0;$<j.length;$++)this.editor[j[$]]=this.props.editorProps[j[$]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(x[0],x[1],x[2],x[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode("string"==typeof s?"ace/mode/".concat(s):s),r&&""!==r&&this.editor.setTheme("ace/theme/".concat(r)),this.editor.setFontSize("number"==typeof l?"".concat(l,"px"):l),c&&(this.editor.container.style.lineHeight="number"==typeof c?"".concat(c,"px"):"".concat(c),this.editor.renderer.updateFontSize()),this.editor.getSession().setValue(h||p||""),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(g),this.editor.getSession().setUseWrapMode(m),this.editor.setShowPrintMargin(b),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),C&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),i&&this.editor.getSession().on("changeAnnotation",(function(){var t=e.editor.getSession().getAnnotations();e.props.onValidate(t)})),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(w||[]),_&&_.length>0&&this.handleMarkers(_);var S=this.editor.$options;d.editorOptions.forEach((function(t){S.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(t," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))})),this.handleOptions(this.props),Array.isArray(k)&&k.forEach((function(t){"string"==typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),y&&this.editor.setKeyboardHandler("ace/keyboard/"+y),n&&(this.refEditor.className+=" "+n),v&&v(this.editor),this.editor.resize(),a&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,o=0;o<d.editorOptions.length;o++){var i=d.editorOptions[o];n[i]!==t[i]&&this.editor.setOption(i,n[i])}if(n.className!==t.className){var s=this.refEditor.className.trim().split(" ");t.className.trim().split(" ").forEach((function(e){var t=s.indexOf(e);s.splice(t,1)})),this.refEditor.className=" "+n.className+" "+s.join(" ")}var a=this.editor&&null!=n.value&&this.editor.getValue()!==n.value;if(a){this.silent=!0;var r=this.editor.session.selection.toJSON();this.editor.setValue(n.value,n.cursorStart),this.editor.session.selection.fromJSON(r),this.silent=!1}n.placeholder!==t.placeholder&&this.updatePlaceholder(),n.mode!==t.mode&&this.editor.getSession().setMode("string"==typeof n.mode?"ace/mode/".concat(n.mode):n.mode),n.theme!==t.theme&&this.editor.setTheme("ace/theme/"+n.theme),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+n.keyboardHandler):this.editor.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&this.editor.setFontSize("number"==typeof n.fontSize?"".concat(n.fontSize,"px"):n.fontSize),n.lineHeight!==t.lineHeight&&(this.editor.container.style.lineHeight="number"==typeof n.lineHeight?"".concat(n.lineHeight,"px"):n.lineHeight,this.editor.renderer.updateFontSize()),n.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(n.showGutter),c(n.setOptions,t.setOptions)||this.handleOptions(n),!a&&c(n.annotations,t.annotations)||this.editor.getSession().setAnnotations(n.annotations||[]),!c(n.markers,t.markers)&&Array.isArray(n.markers)&&this.handleMarkers(n.markers),c(n.scrollMargin,t.scrollMargin)||this.handleScrollMargins(n.scrollMargin),e.height===this.props.height&&e.width===this.props.width||this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()},t.prototype.handleScrollMargins=function(e){ |
| 217 |
void 0===e&&(e=[0,0,0,0]),this.editor.renderer.setScrollMargin(e[0],e[1],e[2],e[3])},t.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null)},t.prototype.onChange=function(e){if(this.editor&&this.props.onChange&&!this.silent){var t=this.editor.getValue();this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=this.editor.getSelection();this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=this.editor.getSelection();this.props.onCursorChange(t,e)}},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e,this.editor)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e,this.editor)},t.prototype.onCopy=function(e){var t=e.text;this.props.onCopy&&this.props.onCopy(t)},t.prototype.onPaste=function(e){var t=e.text;this.props.onPaste&&this.props.onPaste(t)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e){for(var t=Object.keys(e.setOptions),n=0;n<t.length;n++)this.editor.setOption(t[n],e.setOptions[t[n]])},t.prototype.handleMarkers=function(e){var t=this,n=this.editor.getSession().getMarkers(!0);for(var o in n)n.hasOwnProperty(o)&&this.editor.getSession().removeMarker(n[o].id);for(var o in n=this.editor.getSession().getMarkers(!1))n.hasOwnProperty(o)&&"ace_active-line"!==n[o].clazz&&"ace_selected-word"!==n[o].clazz&&this.editor.getSession().removeMarker(n[o].id);e.forEach((function(e){var n=e.startRow,o=e.startCol,i=e.endRow,s=e.endCol,r=e.className,l=e.type,c=e.inFront,d=void 0!==c&&c,u=new a.Range(n,o,i,s);t.editor.getSession().addMarker(u,r,l,d)}))},t.prototype.updatePlaceholder=function(){var e=this.editor,t=this.props.placeholder,n=!e.session.getValue().length,o=e.renderer.placeholderNode;!n&&o?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):n&&!o?((o=e.renderer.placeholderNode=document.createElement("div")).textContent=t||"",o.className="ace_comment ace_placeholder",o.style.padding="0 9px",o.style.position="absolute",o.style.zIndex="3",e.renderer.scroller.appendChild(o)):n&&o&&(o.textContent=t)},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,o=e.height,i=e.style,a=s({width:n,height:o},i);return l.createElement("div",{ref:this.updateRef,id:t,style:a})},t.propTypes={mode:r.oneOfType([r.string,r.object]),focus:r.bool,theme:r.string,name:r.string,className:r.string,height:r.string,width:r.string,fontSize:r.oneOfType([r.number,r.string]),lineHeight:r.oneOfType([r.number,r.string]),showGutter:r.bool,onChange:r.func,onCopy:r.func,onPaste:r.func,onFocus:r.func,onInput:r.func,onBlur:r.func,onScroll:r.func,value:r.string,defaultValue:r.string,onLoad:r.func,onSelectionChange:r.func,onCursorChange:r.func,onBeforeLoad:r.func,onValidate:r.func,minLines:r.number,maxLines:r.number,readOnly:r.bool,highlightActiveLine:r.bool,tabSize:r.number,showPrintMargin:r.bool,cursorStart:r.number,debounceChangePeriod:r.number,editorProps:r.object,setOptions:r.object,style:r.object,scrollMargin:r.array,annotations:r.array,markers:r.array,keyboardHandler:r.string,wrapEnabled:r.bool,enableSnippets:r.bool,enableBasicAutocompletion:r.oneOfType([r.bool,r.array]),enableLiveAutocompletion:r.oneOfType([r.bool,r.array]),navigateToFileEnd:r.bool,commands:r.array,placeholder:r.string},t.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},t}(l.Component);t.default=p},3091(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});Object.defineProperty(t,"__esModule",{value:!0});var s=n(5556),a=n(1609),r=n(4038),l=n(2189),c=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.props.value},n.onChange=n.onChange.bind(n),n.diff=n.diff.bind(n),n}return i(t,e),t.prototype.componentDidUpdate=function(){var e=this.props.value;e!==this.state.value&&this.setState({value:e})},t.prototype.onChange=function(e){this.setState({value:e}),this.props.onChange&&this.props.onChange(e)},t.prototype.diff=function(){var e=new l,t=this.state.value[0],n=this.state.value[1];if(0===t.length&&0===n.length)return[];var o=e.diff_main(t,n);e.diff_cleanupSemantic(o);var i=this.generateDiffedLines(o);return this.setCodeMarkers(i)},t.prototype.generateDiffedLines=function(e){var t={left:[],right:[]},n={left:1,right:1};return e.forEach((function(e){var o=e[0],i=e[1],s=i.split("\n").length-1;if(0!==i.length){var a=i[0],r=i[i.length-1],l=0;switch(o){case 0:n.left+=s,n.right+=s;break;case-1:"\n"===a&&(n.left++,s--),0===(l=s)&&t.right.push({startLine:n.right,endLine:n.right}),"\n"===r&&(l-=1),t.left.push({startLine:n.left,endLine:n.left+l}),n.left+=s;break;case 1:"\n"===a&&(n.right++,s--),0===(l=s)&&t.left.push({startLine:n.left,endLine:n.left}),"\n"===r&&(l-=1),t.right.push({startLine:n.right,endLine:n.right+l}),n.right+=s;break;default:throw new Error("Diff type was not defined.")}}})),t},t.prototype.setCodeMarkers=function(e){void 0===e&&(e={left:[],right:[]});for(var t=[],n={left:[],right:[]},o=0;o<e.left.length;o++){var i={startRow:e.left[o].startLine-1,endRow:e.left[o].endLine,type:"text",className:"codeMarker"};n.left.push(i)}for(o=0;o<e.right.length;o++)i={startRow:e.right[o].startLine-1,endRow:e.right[o].endLine,type:"text",className:"codeMarker"},n.right.push(i);return t[0]=n.left,t[1]=n.right,t},t.prototype.render=function(){var e=this.diff();return a.createElement(r.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:e})},t.propTypes={cursorStart:s.number,editorProps:s.object,enableBasicAutocompletion:s.bool,enableLiveAutocompletion:s.bool,focus:s.bool,fontSize:s.number,height:s.string,highlightActiveLine:s.bool,maxLines:s.number,minLines:s.number,mode:s.string,name:s.string,className:s.string,onLoad:s.func,onPaste:s.func,onScroll:s.func,onChange:s.func,orientation:s.string,readOnly:s.bool,scrollMargin:s.array,setOptions:s.object,showGutter:s.bool,showPrintMargin:s.bool,splits:s.number,style:s.object,tabSize:s.number,theme:s.string,value:s.array,width:s.string, |
| 218 |
wrapEnabled:s.bool},t.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},t}(a.Component);t.default=c},5707(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAceInstance=t.debounce=t.editorEvents=t.editorOptions=void 0,t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"],t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"],t.getAceInstance=function(){var e;return"undefined"==typeof window?(globalThis.window={},e=n(952),delete globalThis.window):window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=n(952),e},t.debounce=function(e,t){var n=null;return function(){var o=this,i=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(o,i)}),t)}}},470(e,t,n){"use strict";var o=n(5549);n(3091).default,n(4038).default,t.Ay=o.default},4038(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(5707),r=(0,a.getAceInstance)(),l=n(952),c=n(9),d=n(5556),u=n(1609),p=n(8142),h=n(6762),g=function(e){function t(t){var n=e.call(this,t)||this;return a.editorEvents.forEach((function(e){n[e]=n[e].bind(n)})),n.debounce=a.debounce,n}return i(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,o=t.onBeforeLoad,i=t.mode,s=t.focus,l=t.theme,d=t.fontSize,u=t.value,p=t.defaultValue,g=t.cursorStart,m=t.showGutter,b=t.wrapEnabled,f=t.showPrintMargin,x=t.scrollMargin,y=void 0===x?[0,0,0,0]:x,v=t.keyboardHandler,k=t.onLoad,w=t.commands,_=t.annotations,C=t.markers,j=t.splits;this.editor=r.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme("ace/theme/".concat(l)),o&&o(r);var $=Object.keys(this.props.editorProps),S=new c.Split(this.editor.container,"ace/theme/".concat(l),j);this.editor.env.split=S,this.splitEditor=S.getEditor(0),this.split=S,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var T=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),S.forEach((function(t,n){for(var o=0;o<$.length;o++)t[$[o]]=e.props.editorProps[$[o]];var s=h(p,n),c=h(u,n,"");t.session.setUndoManager(new r.UndoManager),t.setTheme("ace/theme/".concat(l)),t.renderer.setScrollMargin(y[0],y[1],y[2],y[3]),t.getSession().setMode("ace/mode/".concat(i)),t.setFontSize(d),t.renderer.setShowGutter(m),t.getSession().setUseWrapMode(b),t.setShowPrintMargin(f),t.on("focus",e.onFocus),t.on("blur",e.onBlur),t.on("input",e.onInput),t.on("copy",e.onCopy),t.on("paste",e.onPaste),t.on("change",e.onChange),t.getSession().selection.on("changeSelection",e.onSelectionChange),t.getSession().selection.on("changeCursor",e.onCursorChange),t.session.on("changeScrollTop",e.onScroll),t.setValue(void 0===s?c:s,g);var x=h(_,n,[]),k=h(C,n,[]);for(t.getSession().setAnnotations(x),k&&k.length>0&&e.handleMarkers(k,t),o=0;o<a.editorOptions.length;o++){var j=a.editorOptions[o];T.hasOwnProperty(j)?t.setOption(j,e.props[j]):e.props[j]&&console.warn("ReaceAce: editor option ".concat(j," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}e.handleOptions(e.props,t),Array.isArray(w)&&w.forEach((function(e){"string"==typeof e.exec?t.commands.bindKey(e.bindKey,e.exec):t.commands.addCommand(e)})),v&&t.setKeyboardHandler("ace/keyboard/"+v)})),n&&(this.refEditor.className+=" "+n),s&&this.splitEditor.focus();var M=this.editor.env.split;M.setOrientation("below"===this.props.orientation?M.BELOW:M.BESIDE),M.resize(!0),k&&k(M)},t.prototype.componentDidUpdate=function(e){var t=this,n=e,o=this.props,i=this.editor.env.split;if(o.splits!==n.splits&&i.setSplits(o.splits),o.orientation!==n.orientation&&i.setOrientation("below"===o.orientation?i.BELOW:i.BESIDE),i.forEach((function(e,i){o.mode!==n.mode&&e.getSession().setMode("ace/mode/"+o.mode),o.keyboardHandler!==n.keyboardHandler&&(o.keyboardHandler?e.setKeyboardHandler("ace/keyboard/"+o.keyboardHandler):e.setKeyboardHandler(null)),o.fontSize!==n.fontSize&&e.setFontSize(o.fontSize),o.wrapEnabled!==n.wrapEnabled&&e.getSession().setUseWrapMode(o.wrapEnabled),o.showPrintMargin!==n.showPrintMargin&&e.setShowPrintMargin(o.showPrintMargin),o.showGutter!==n.showGutter&&e.renderer.setShowGutter(o.showGutter);for(var s=0;s<a.editorOptions.length;s++){var r=a.editorOptions[s];o[r]!==n[r]&&e.setOption(r,o[r])}p(o.setOptions,n.setOptions)||t.handleOptions(o,e);var l=h(o.value,i,"");if(e.getValue()!==l){t.silent=!0;var c=e.session.selection.toJSON();e.setValue(l,o.cursorStart),e.session.selection.fromJSON(c),t.silent=!1}var d=h(o.annotations,i,[]),u=h(n.annotations,i,[]);p(d,u)||e.getSession().setAnnotations(d);var g=h(o.markers,i,[]),m=h(n.markers,i,[]);!p(g,m)&&Array.isArray(g)&&t.handleMarkers(g,e)})),o.className!==n.className){var s=this.refEditor.className.trim().split(" ");n.className.trim().split(" ").forEach((function(e){var t=s.indexOf(e);s.splice(t,1)})),this.refEditor.className=" "+o.className+" "+s.join(" ")}o.theme!==n.theme&&i.setTheme("ace/theme/"+o.theme),o.focus&&!n.focus&&this.splitEditor.focus(),o.height===this.props.height&&o.width===this.props.width||this.editor.resize()},t.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getValue())})),this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getSelection())})),this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getSelection())})),this.props.onCursorChange(t,e)}},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e)},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e)},t.prototype.onCopy=function(e){this.props.onCopy&&this.props.onCopy(e)},t.prototype.onPaste=function(e){this.props.onPaste&&this.props.onPaste(e)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e,t){for(var n=Object.keys(e.setOptions),o=0;o<n.length;o++)t.setOption(n[o],e.setOptions[n[o]])},t.prototype.handleMarkers=function(e,t){var n=t.getSession().getMarkers(!0);for(var o in n)n.hasOwnProperty(o)&&t.getSession().removeMarker(n[o].id) |
| 219 |
;for(var o in n=t.getSession().getMarkers(!1))n.hasOwnProperty(o)&&t.getSession().removeMarker(n[o].id);e.forEach((function(e){var n=e.startRow,o=e.startCol,i=e.endRow,s=e.endCol,a=e.className,r=e.type,c=e.inFront,d=void 0!==c&&c,u=new l.Range(n,o,i,s);t.getSession().addMarker(u,a,r,d)}))},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,o=e.height,i=e.style,a=s({width:n,height:o},i);return u.createElement("div",{ref:this.updateRef,id:t,style:a})},t.propTypes={className:d.string,debounceChangePeriod:d.number,defaultValue:d.arrayOf(d.string),focus:d.bool,fontSize:d.oneOfType([d.number,d.string]),height:d.string,mode:d.string,name:d.string,onBlur:d.func,onChange:d.func,onCopy:d.func,onFocus:d.func,onInput:d.func,onLoad:d.func,onPaste:d.func,onScroll:d.func,orientation:d.string,showGutter:d.bool,splits:d.number,theme:d.string,value:d.arrayOf(d.string),width:d.string,onSelectionChange:d.func,onCursorChange:d.func,onBeforeLoad:d.func,minLines:d.number,maxLines:d.number,readOnly:d.bool,highlightActiveLine:d.bool,tabSize:d.number,showPrintMargin:d.bool,cursorStart:d.number,editorProps:d.object,setOptions:d.object,style:d.object,scrollMargin:d.array,annotations:d.array,markers:d.array,keyboardHandler:d.string,wrapEnabled:d.bool,enableBasicAutocompletion:d.oneOfType([d.bool,d.array]),enableLiveAutocompletion:d.oneOfType([d.bool,d.array]),commands:d.array},t.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},t}(u.Component);t.default=g},9223(e,t,n){"use strict";function o(e){return o="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},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.PrevArrow=t.NextArrow=void 0;var i=r(n(1609)),s=r(n(6942)),a=n(9445);function r(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l.apply(this,arguments)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){var o,i,s;o=e,i=t,s=n[t],(i=g(i))in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,g(o.key),o)}}function h(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:String(t)}function m(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function f(e){var t=x();return function(){var n,i=y(e);if(t){var s=y(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}t.PrevArrow=function(e){m(n,e);var t=f(n);function n(){return u(this,n),t.apply(this,arguments)}return h(n,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-prev":!0},t=this.clickHandler.bind(this,{message:"previous"});!this.props.infinite&&(0===this.props.currentSlide||this.props.slideCount<=this.props.slidesToShow)&&(e["slick-disabled"]=!0,t=null);var n={key:"0","data-role":"none",className:(0,s.default)(e),style:{display:"block"},onClick:t},o={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.prevArrow?i.default.cloneElement(this.props.prevArrow,d(d({},n),o)):i.default.createElement("button",l({key:"0",type:"button"},n)," ","Previous")}}]),n}(i.default.PureComponent),t.NextArrow=function(e){m(n,e);var t=f(n);function n(){return u(this,n),t.apply(this,arguments)}return h(n,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-next":!0},t=this.clickHandler.bind(this,{message:"next"});(0,a.canGoNext)(this.props)||(e["slick-disabled"]=!0,t=null);var n={key:"1","data-role":"none",className:(0,s.default)(e),style:{display:"block"},onClick:t},o={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.nextArrow?i.default.cloneElement(this.props.nextArrow,d(d({},n),o)):i.default.createElement("button",l({key:"1",type:"button"},n)," ","Next")}}]),n}(i.default.PureComponent)},1327(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,i=(o=n(1609))&&o.__esModule?o:{default:o},s={accessibility:!0,adaptiveHeight:!1,afterChange:null,appendDots:function(e){return i.default.createElement("ul",{style:{display:"block"}},e)},arrows:!0,autoplay:!1,autoplaySpeed:3e3,beforeChange:null,centerMode:!1,centerPadding:"50px",className:"",cssEase:"ease",customPaging:function(e){return i.default.createElement("button",null,e+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:null,nextArrow:null,onEdge:null,onInit:null,onLazyLoadError:null,onReInit:null,pauseOnDotsHover:!1,pauseOnFocus:!1,pauseOnHover:!0,prevArrow:null,responsive:null,rows:1,rtl:!1,slide:"div",slidesPerRow:1,slidesToScroll:1,slidesToShow:1,speed:500,swipe:!0,swipeEvent:null,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0,asNavFor:null,unslick:!1};t.default=s},773(e,t,n){"use strict";function o(e){return o="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},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Dots=void 0 |
| 220 |
;var i=r(n(1609)),s=r(n(6942)),a=n(9445);function r(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,d(o.key),o)}}function d(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:String(t)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function p(e){var t=h();return function(){var n,i=g(e);if(t){var s=g(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}t.Dots=function(e){!function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(r,e);var t,n,o=p(r);function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),o.apply(this,arguments)}return t=r,n=[{key:"clickHandler",value:function(e,t){t.preventDefault(),this.props.clickHandler(e)}},{key:"render",value:function(){for(var e,t=this.props,n=t.onMouseEnter,o=t.onMouseOver,r=t.onMouseLeave,c=t.infinite,u=t.slidesToScroll,p=t.slidesToShow,h=t.slideCount,g=t.currentSlide,m=(e={slideCount:h,slidesToScroll:u,slidesToShow:p,infinite:c}).infinite?Math.ceil(e.slideCount/e.slidesToScroll):Math.ceil((e.slideCount-e.slidesToShow)/e.slidesToScroll)+1,b={onMouseEnter:n,onMouseOver:o,onMouseLeave:r},f=[],x=0;x<m;x++){var y=(x+1)*u-1,v=c?y:(0,a.clamp)(y,0,h-1),k=v-(u-1),w=c?k:(0,a.clamp)(k,0,h-1),_=(0,s.default)({"slick-active":c?g>=w&&g<=v:g===w}),C={message:"dots",index:x,slidesToScroll:u,currentSlide:g},j=this.clickHandler.bind(this,C);f=f.concat(i.default.createElement("li",{key:x,className:_},i.default.cloneElement(this.props.customPaging(x),{onClick:j})))}return i.default.cloneElement(this.props.appendDots(f),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){var o,i,s;o=e,i=t,s=n[t],(i=d(i))in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({className:this.props.dotsClass},b))}}],n&&c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),r}(i.default.PureComponent)},4589(e,t,n){"use strict";t.A=void 0;var o,i=(o=n(8120))&&o.__esModule?o:{default:o};t.A=i.default},8841(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={animating:!1,autoplaying:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,dragging:!1,edgeDragged:!1,initialized:!1,lazyLoadedList:[],listHeight:null,listWidth:null,scrolling:!1,slideCount:null,slideHeight:null,slideWidth:null,swipeLeft:null,swiped:!1,swiping:!1,touchObject:{startX:0,startY:0,curX:0,curY:0},trackStyle:{},trackWidth:0,targetSlide:0}},4999(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSlider=void 0;var o=p(n(1609)),i=p(n(8841)),s=p(n(181)),a=p(n(6942)),r=n(9445),l=n(5942),c=n(773),d=n(9223),u=p(n(3591));function p(e){return e&&e.__esModule?e:{default:e}}function h(e){return h="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},h(e)}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},g.apply(this,arguments)}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,C(o.key),o)}}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function y(e){var t=k();return function(){var n,o=w(e);if(t){var i=w(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}(this,n)}}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(k=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function _(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:String(t)}t.InnerSlider=function(e){!function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}(m,e);var t,n,p=y(m);function m(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),_(v(t=p.call(this,e)),"listRefHandler",(function(e){return t.list=e})),_(v(t),"trackRefHandler",(function(e){return t.track=e})),_(v(t),"adaptHeight",(function(){if(t.props.adaptiveHeight&&t.list){var e=t.list.querySelector('[data-index="'.concat(t.state.currentSlide,'"]'));t.list.style.height=(0,r.getHeight)(e)+"px"}})),_(v(t),"componentDidMount",(function(){if(t.props.onInit&&t.props.onInit(),t.props.lazyLoad){var e=(0,r.getOnDemandLazySlides)(b(b({},t.props),t.state));e.length>0&&(t.setState((function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}})),t.props.onLazyLoad&&t.props.onLazyLoad(e))}var n=b({ |
| 221 |
listRef:t.list,trackRef:t.track},t.props);t.updateState(n,!0,(function(){t.adaptHeight(),t.props.autoplay&&t.autoPlay("update")})),"progressive"===t.props.lazyLoad&&(t.lazyLoadTimer=setInterval(t.progressiveLazyLoad,1e3)),t.ro=new u.default((function(){t.state.animating?(t.onWindowResized(!1),t.callbackTimers.push(setTimeout((function(){return t.onWindowResized()}),t.props.speed))):t.onWindowResized()})),t.ro.observe(t.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),(function(e){e.onfocus=t.props.pauseOnFocus?t.onSlideFocus:null,e.onblur=t.props.pauseOnFocus?t.onSlideBlur:null})),window.addEventListener?window.addEventListener("resize",t.onWindowResized):window.attachEvent("onresize",t.onWindowResized)})),_(v(t),"componentWillUnmount",(function(){t.animationEndCallback&&clearTimeout(t.animationEndCallback),t.lazyLoadTimer&&clearInterval(t.lazyLoadTimer),t.callbackTimers.length&&(t.callbackTimers.forEach((function(e){return clearTimeout(e)})),t.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",t.onWindowResized):window.detachEvent("onresize",t.onWindowResized),t.autoplayTimer&&clearInterval(t.autoplayTimer),t.ro.disconnect()})),_(v(t),"componentDidUpdate",(function(e){if(t.checkImagesLoad(),t.props.onReInit&&t.props.onReInit(),t.props.lazyLoad){var n=(0,r.getOnDemandLazySlides)(b(b({},t.props),t.state));n.length>0&&(t.setState((function(e){return{lazyLoadedList:e.lazyLoadedList.concat(n)}})),t.props.onLazyLoad&&t.props.onLazyLoad(n))}t.adaptHeight();var i=b(b({listRef:t.list,trackRef:t.track},t.props),t.state),s=t.didPropsChange(e);s&&t.updateState(i,s,(function(){t.state.currentSlide>=o.default.Children.count(t.props.children)&&t.changeSlide({message:"index",index:o.default.Children.count(t.props.children)-t.props.slidesToShow,currentSlide:t.state.currentSlide}),t.props.autoplay?t.autoPlay("update"):t.pause("paused")}))})),_(v(t),"onWindowResized",(function(e){t.debouncedResize&&t.debouncedResize.cancel(),t.debouncedResize=(0,s.default)((function(){return t.resizeWindow(e)}),50),t.debouncedResize()})),_(v(t),"resizeWindow",(function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(Boolean(t.track&&t.track.node)){var n=b(b({listRef:t.list,trackRef:t.track},t.props),t.state);t.updateState(n,e,(function(){t.props.autoplay?t.autoPlay("update"):t.pause("paused")})),t.setState({animating:!1}),clearTimeout(t.animationEndCallback),delete t.animationEndCallback}})),_(v(t),"updateState",(function(e,n,i){var s=(0,r.initializedState)(e);e=b(b(b({},e),s),{},{slideIndex:s.currentSlide});var a=(0,r.getTrackLeft)(e);e=b(b({},e),{},{left:a});var l=(0,r.getTrackCSS)(e);(n||o.default.Children.count(t.props.children)!==o.default.Children.count(e.children))&&(s.trackStyle=l),t.setState(s,i)})),_(v(t),"ssrInit",(function(){if(t.props.variableWidth){var e=0,n=0,i=[],s=(0,r.getPreClones)(b(b(b({},t.props),t.state),{},{slideCount:t.props.children.length})),a=(0,r.getPostClones)(b(b(b({},t.props),t.state),{},{slideCount:t.props.children.length}));t.props.children.forEach((function(t){i.push(t.props.style.width),e+=t.props.style.width}));for(var l=0;l<s;l++)n+=i[i.length-1-l],e+=i[i.length-1-l];for(var c=0;c<a;c++)e+=i[c];for(var d=0;d<t.state.currentSlide;d++)n+=i[d];var u={width:e+"px",left:-n+"px"};if(t.props.centerMode){var p="".concat(i[t.state.currentSlide],"px");u.left="calc(".concat(u.left," + (100% - ").concat(p,") / 2 ) ")}return{trackStyle:u}}var h=o.default.Children.count(t.props.children),g=b(b(b({},t.props),t.state),{},{slideCount:h}),m=(0,r.getPreClones)(g)+(0,r.getPostClones)(g)+h,f=100/t.props.slidesToShow*m,x=100/m,y=-x*((0,r.getPreClones)(g)+t.state.currentSlide)*f/100;return t.props.centerMode&&(y+=(100-x*f/100)/2),{slideWidth:x+"%",trackStyle:{width:f+"%",left:y+"%"}}})),_(v(t),"checkImagesLoad",(function(){var e=t.list&&t.list.querySelectorAll&&t.list.querySelectorAll(".slick-slide img")||[],n=e.length,o=0;Array.prototype.forEach.call(e,(function(e){var i=function(){return++o&&o>=n&&t.onWindowResized()};if(e.onclick){var s=e.onclick;e.onclick=function(t){s(t),e.parentNode.focus()}}else e.onclick=function(){return e.parentNode.focus()};e.onload||(t.props.lazyLoad?e.onload=function(){t.adaptHeight(),t.callbackTimers.push(setTimeout(t.onWindowResized,t.props.speed))}:(e.onload=i,e.onerror=function(){i(),t.props.onLazyLoadError&&t.props.onLazyLoadError()}))}))})),_(v(t),"progressiveLazyLoad",(function(){for(var e=[],n=b(b({},t.props),t.state),o=t.state.currentSlide;o<t.state.slideCount+(0,r.getPostClones)(n);o++)if(t.state.lazyLoadedList.indexOf(o)<0){e.push(o);break}for(var i=t.state.currentSlide-1;i>=-(0,r.getPreClones)(n);i--)if(t.state.lazyLoadedList.indexOf(i)<0){e.push(i);break}e.length>0?(t.setState((function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}})),t.props.onLazyLoad&&t.props.onLazyLoad(e)):t.lazyLoadTimer&&(clearInterval(t.lazyLoadTimer),delete t.lazyLoadTimer)})),_(v(t),"slideHandler",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=t.props,i=o.asNavFor,s=o.beforeChange,a=o.onLazyLoad,l=o.speed,c=o.afterChange,d=t.state.currentSlide,u=(0,r.slideHandler)(b(b(b({index:e},t.props),t.state),{},{trackRef:t.track,useCSS:t.props.useCSS&&!n})),p=u.state,h=u.nextState;if(p){s&&s(d,p.currentSlide);var g=p.lazyLoadedList.filter((function(e){return t.state.lazyLoadedList.indexOf(e)<0}));a&&g.length>0&&a(g),!t.props.waitForAnimate&&t.animationEndCallback&&(clearTimeout(t.animationEndCallback),c&&c(d),delete t.animationEndCallback),t.setState(p,(function(){i&&t.asNavForIndex!==e&&(t.asNavForIndex=e,i.innerSlider.slideHandler(e)),h&&(t.animationEndCallback=setTimeout((function(){var e=h.animating,n=function(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},s=Object.keys(e);for(o=0;o<s.length;o++)n=s[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(h,["animating"]);t.setState(n,(function(){t.callbackTimers.push(setTimeout((function(){return t.setState({animating:e})}),10)),c&&c(p.currentSlide),delete t.animationEndCallback}))}),l))}))}})),_(v(t),"changeSlide",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=b(b({},t.props),t.state),i=(0,r.changeSlide)(o,e);if((0===i||i)&&(!0===n?t.slideHandler(i,n):t.slideHandler(i),t.props.autoplay&&t.autoPlay("update"),t.props.focusOnSelect)){var s=t.list.querySelectorAll(".slick-current");s[0]&&s[0].focus()}})),_(v(t),"clickHandler",(function(e){!1===t.clickable&&(e.stopPropagation(),e.preventDefault()),t.clickable=!0})),_(v(t),"keyHandler",(function(e){var n=(0,r.keyHandler)(e,t.props.accessibility,t.props.rtl);""!==n&&t.changeSlide({message:n})})),_(v(t),"selectHandler",(function(e){t.changeSlide(e)})),_(v(t),"disableBodyScroll",(function(){window.ontouchmove=function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.returnValue=!1}})),_(v(t),"enableBodyScroll",(function(){window.ontouchmove=null})),_(v(t),"swipeStart",(function(e){t.props.verticalSwiping&&t.disableBodyScroll();var n=(0,r.swipeStart)(e,t.props.swipe,t.props.draggable);""!==n&&t.setState(n)})),_(v(t),"swipeMove",(function(e){var n=(0,r.swipeMove)(e,b(b(b({},t.props),t.state),{},{trackRef:t.track,listRef:t.list,slideIndex:t.state.currentSlide}));n&&(n.swiping&&(t.clickable=!1),t.setState(n))})),_(v(t),"swipeEnd",(function(e){var n=(0,r.swipeEnd)(e,b(b(b({},t.props),t.state),{},{trackRef:t.track,listRef:t.list,slideIndex:t.state.currentSlide}));if(n){var o=n.triggerSlideHandler;delete n.triggerSlideHandler,t.setState(n),void 0!==o&&(t.slideHandler(o),t.props.verticalSwiping&&t.enableBodyScroll())}})),_(v(t),"touchEnd",(function(e){t.swipeEnd(e),t.clickable=!0})),_(v(t),"slickPrev",(function(){t.callbackTimers.push(setTimeout((function(){return t.changeSlide({ |
| 222 |
message:"previous"})}),0))})),_(v(t),"slickNext",(function(){t.callbackTimers.push(setTimeout((function(){return t.changeSlide({message:"next"})}),0))})),_(v(t),"slickGoTo",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e=Number(e),isNaN(e))return"";t.callbackTimers.push(setTimeout((function(){return t.changeSlide({message:"index",index:e,currentSlide:t.state.currentSlide},n)}),0))})),_(v(t),"play",(function(){var e;if(t.props.rtl)e=t.state.currentSlide-t.props.slidesToScroll;else{if(!(0,r.canGoNext)(b(b({},t.props),t.state)))return!1;e=t.state.currentSlide+t.props.slidesToScroll}t.slideHandler(e)})),_(v(t),"autoPlay",(function(e){t.autoplayTimer&&clearInterval(t.autoplayTimer);var n=t.state.autoplaying;if("update"===e){if("hovered"===n||"focused"===n||"paused"===n)return}else if("leave"===e){if("paused"===n||"focused"===n)return}else if("blur"===e&&("paused"===n||"hovered"===n))return;t.autoplayTimer=setInterval(t.play,t.props.autoplaySpeed+50),t.setState({autoplaying:"playing"})})),_(v(t),"pause",(function(e){t.autoplayTimer&&(clearInterval(t.autoplayTimer),t.autoplayTimer=null);var n=t.state.autoplaying;"paused"===e?t.setState({autoplaying:"paused"}):"focused"===e?"hovered"!==n&&"playing"!==n||t.setState({autoplaying:"focused"}):"playing"===n&&t.setState({autoplaying:"hovered"})})),_(v(t),"onDotsOver",(function(){return t.props.autoplay&&t.pause("hovered")})),_(v(t),"onDotsLeave",(function(){return t.props.autoplay&&"hovered"===t.state.autoplaying&&t.autoPlay("leave")})),_(v(t),"onTrackOver",(function(){return t.props.autoplay&&t.pause("hovered")})),_(v(t),"onTrackLeave",(function(){return t.props.autoplay&&"hovered"===t.state.autoplaying&&t.autoPlay("leave")})),_(v(t),"onSlideFocus",(function(){return t.props.autoplay&&t.pause("focused")})),_(v(t),"onSlideBlur",(function(){return t.props.autoplay&&"focused"===t.state.autoplaying&&t.autoPlay("blur")})),_(v(t),"render",(function(){var e,n,i,s=(0,a.default)("slick-slider",t.props.className,{"slick-vertical":t.props.vertical,"slick-initialized":!0}),u=b(b({},t.props),t.state),p=(0,r.extractObject)(u,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]),h=t.props.pauseOnHover;if(p=b(b({},p),{},{onMouseEnter:h?t.onTrackOver:null,onMouseLeave:h?t.onTrackLeave:null,onMouseOver:h?t.onTrackOver:null,focusOnSelect:t.props.focusOnSelect&&t.clickable?t.selectHandler:null}),!0===t.props.dots&&t.state.slideCount>=t.props.slidesToShow){var m=(0,r.extractObject)(u,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","customPaging","infinite","appendDots"]),f=t.props.pauseOnDotsHover;m=b(b({},m),{},{clickHandler:t.changeSlide,onMouseEnter:f?t.onDotsLeave:null,onMouseOver:f?t.onDotsOver:null,onMouseLeave:f?t.onDotsLeave:null}),e=o.default.createElement(c.Dots,m)}var x=(0,r.extractObject)(u,["infinite","centerMode","currentSlide","slideCount","slidesToShow","prevArrow","nextArrow"]);x.clickHandler=t.changeSlide,t.props.arrows&&(n=o.default.createElement(d.PrevArrow,x),i=o.default.createElement(d.NextArrow,x));var y=null;t.props.vertical&&(y={height:t.state.listHeight});var v=null;!1===t.props.vertical?!0===t.props.centerMode&&(v={padding:"0px "+t.props.centerPadding}):!0===t.props.centerMode&&(v={padding:t.props.centerPadding+" 0px"});var k=b(b({},y),v),w=t.props.touchMove,_={className:"slick-list",style:k,onClick:t.clickHandler,onMouseDown:w?t.swipeStart:null,onMouseMove:t.state.dragging&&w?t.swipeMove:null,onMouseUp:w?t.swipeEnd:null,onMouseLeave:t.state.dragging&&w?t.swipeEnd:null,onTouchStart:w?t.swipeStart:null,onTouchMove:t.state.dragging&&w?t.swipeMove:null,onTouchEnd:w?t.touchEnd:null,onTouchCancel:t.state.dragging&&w?t.swipeEnd:null,onKeyDown:t.props.accessibility?t.keyHandler:null},C={className:s,dir:"ltr",style:t.props.style};return t.props.unslick&&(_={className:"slick-list"},C={className:s}),o.default.createElement("div",C,t.props.unslick?"":n,o.default.createElement("div",g({ref:t.listRefHandler},_),o.default.createElement(l.Track,g({ref:t.trackRefHandler},p),t.props.children)),t.props.unslick?"":i,t.props.unslick?"":e)})),t.list=null,t.track=null,t.state=b(b({},i.default),{},{currentSlide:t.props.initialSlide,targetSlide:t.props.initialSlide?t.props.initialSlide:0,slideCount:o.default.Children.count(t.props.children)}),t.callbackTimers=[],t.clickable=!0,t.debouncedResize=null;var n=t.ssrInit();return t.state=b(b({},t.state),n),t}return t=m,(n=[{key:"didPropsChange",value:function(e){for(var t=!1,n=0,i=Object.keys(this.props);n<i.length;n++){var s=i[n];if(!e.hasOwnProperty(s)){t=!0;break}if("object"!==h(e[s])&&"function"!=typeof e[s]&&!isNaN(e[s])&&e[s]!==this.props[s]){t=!0;break}}return t||o.default.Children.count(this.props.children)!==o.default.Children.count(e.children)}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(o.default.Component)},8120(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=l(n(1609)),i=n(4999),s=l(n(1441)),a=l(n(1327)),r=n(9445);function l(e){return e&&e.__esModule?e:{default:e}}function c(e){return c="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},c(e)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},d.apply(this,arguments)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,v(o.key),o)}}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function m(e){var t=f();return function(){var n,o=x(e);if(t){var i=x(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}(this,n)}}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function y(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:String(t)}var k=(0,r.canUseDOM)()&&n(2386);t.default=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function") |
| 223 |
;e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(c,e);var t,n,l=m(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),y(b(t=l.call(this,e)),"innerSliderRefHandler",(function(e){return t.innerSlider=e})),y(b(t),"slickPrev",(function(){return t.innerSlider.slickPrev()})),y(b(t),"slickNext",(function(){return t.innerSlider.slickNext()})),y(b(t),"slickGoTo",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.innerSlider.slickGoTo(e,n)})),y(b(t),"slickPause",(function(){return t.innerSlider.pause("paused")})),y(b(t),"slickPlay",(function(){return t.innerSlider.autoPlay("play")})),t.state={breakpoint:null},t._responsiveMediaHandlers=[],t}return t=c,(n=[{key:"media",value:function(e,t){k.register(e,t),this._responsiveMediaHandlers.push({query:e,handler:t})}},{key:"componentDidMount",value:function(){var e=this;if(this.props.responsive){var t=this.props.responsive.map((function(e){return e.breakpoint}));t.sort((function(e,t){return e-t})),t.forEach((function(n,o){var i;i=0===o?(0,s.default)({minWidth:0,maxWidth:n}):(0,s.default)({minWidth:t[o-1]+1,maxWidth:n}),(0,r.canUseDOM)()&&e.media(i,(function(){e.setState({breakpoint:n})}))}));var n=(0,s.default)({minWidth:t.slice(-1)[0]});(0,r.canUseDOM)()&&this.media(n,(function(){e.setState({breakpoint:null})}))}}},{key:"componentWillUnmount",value:function(){this._responsiveMediaHandlers.forEach((function(e){k.unregister(e.query,e.handler)}))}},{key:"render",value:function(){var e,t,n=this;(e=this.state.breakpoint?"unslick"===(t=this.props.responsive.filter((function(e){return e.breakpoint===n.state.breakpoint})))[0].settings?"unslick":p(p(p({},a.default),this.props),t[0].settings):p(p({},a.default),this.props)).centerMode&&(e.slidesToScroll,e.slidesToScroll=1),e.fade&&(e.slidesToShow,e.slidesToScroll,e.slidesToShow=1,e.slidesToScroll=1);var s=o.default.Children.toArray(this.props.children);s=s.filter((function(e){return"string"==typeof e?!!e.trim():!!e})),e.variableWidth&&(e.rows>1||e.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),e.variableWidth=!1);for(var l=[],c=null,u=0;u<s.length;u+=e.rows*e.slidesPerRow){for(var h=[],g=u;g<u+e.rows*e.slidesPerRow;g+=e.slidesPerRow){for(var m=[],b=g;b<g+e.slidesPerRow&&(e.variableWidth&&s[b].props.style&&(c=s[b].props.style.width),!(b>=s.length));b+=1)m.push(o.default.cloneElement(s[b],{key:100*u+10*g+b,tabIndex:-1,style:{width:"".concat(100/e.slidesPerRow,"%"),display:"inline-block"}}));h.push(o.default.createElement("div",{key:10*u+g},m))}e.variableWidth?l.push(o.default.createElement("div",{key:u,style:{width:c}},h)):l.push(o.default.createElement("div",{key:u},h))}if("unslick"===e){var f="regular slider "+(this.props.className||"");return o.default.createElement("div",{className:f},s)}return l.length<=e.slidesToShow&&!e.infinite&&(e.unslick=!0),o.default.createElement(i.InnerSlider,d({style:this.props.style,ref:this.innerSliderRefHandler},(0,r.filterSettings)(e)),l)}}])&&h(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.default.Component)},5942(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Track=void 0;var o=a(n(1609)),i=a(n(6942)),s=n(9445);function a(e){return e&&e.__esModule?e:{default:e}}function r(e){return r="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},r(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l.apply(this,arguments)}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,x(o.key),o)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function u(e){var t=h();return function(){var n,o=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}(this,n)}}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:String(t)}var y=function(e){var t,n,o,i,s;return o=(s=e.rtl?e.slideCount-1-e.index:e.index)<0||s>=e.slideCount,e.centerMode?(i=Math.floor(e.slidesToShow/2),n=(s-e.currentSlide)%e.slideCount==0,s>e.currentSlide-i-1&&s<=e.currentSlide+i&&(t=!0)):t=e.currentSlide<=s&&s<e.currentSlide+e.slidesToShow,{"slick-slide":!0,"slick-active":t,"slick-center":n,"slick-cloned":o,"slick-current":s===(e.targetSlide<0?e.targetSlide+e.slideCount:e.targetSlide>=e.slideCount?e.targetSlide-e.slideCount:e.targetSlide)}},v=function(e,t){return e.key||t};t.Track=function(e){!function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(r,e);var t,n,a=u(r);function r(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return f(p(e=a.call.apply(a,[this].concat(n))),"node",null),f(p(e),"handleRef",(function(t){e.node=t})),e}return t=r,(n=[{key:"render",value:function(){var e=function(e){var t,n=[],a=[],r=[],l=o.default.Children.count(e.children),c=(0,s.lazyStartIndex)(e),d=(0,s.lazyEndIndex)(e);return o.default.Children.forEach(e.children,(function(u,p){var h,g={message:"children",index:p,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};h=!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(p)>=0?u:o.default.createElement("div",null);var m=function(e){var t={};return void 0!==e.variableWidth&&!1!==e.variableWidth||(t.width=e.slideWidth),e.fade&&(t.position="relative",e.vertical?t.top=-e.index*parseInt(e.slideHeight):t.left=-e.index*parseInt(e.slideWidth),t.opacity=e.currentSlide===e.index?1:0,t.zIndex=e.currentSlide===e.index?999:998,e.useCSS&&(t.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase)),t}(b(b({},e),{},{index:p})),f=h.props.className||"",x=y(b(b({},e),{},{index:p})) |
| 224 |
;if(n.push(o.default.cloneElement(h,{key:"original"+v(h,p),"data-index":p,className:(0,i.default)(x,f),tabIndex:"-1","aria-hidden":!x["slick-active"],style:b(b({outline:"none"},h.props.style||{}),m),onClick:function(t){h.props&&h.props.onClick&&h.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(g)}})),e.infinite&&!1===e.fade){var k=l-p;k<=(0,s.getPreClones)(e)&&((t=-k)>=c&&(h=u),x=y(b(b({},e),{},{index:t})),a.push(o.default.cloneElement(h,{key:"precloned"+v(h,t),"data-index":t,tabIndex:"-1",className:(0,i.default)(x,f),"aria-hidden":!x["slick-active"],style:b(b({},h.props.style||{}),m),onClick:function(t){h.props&&h.props.onClick&&h.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(g)}}))),(t=l+p)<d&&(h=u),x=y(b(b({},e),{},{index:t})),r.push(o.default.cloneElement(h,{key:"postcloned"+v(h,t),"data-index":t,tabIndex:"-1",className:(0,i.default)(x,f),"aria-hidden":!x["slick-active"],style:b(b({},h.props.style||{}),m),onClick:function(t){h.props&&h.props.onClick&&h.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(g)}}))}})),e.rtl?a.concat(n,r).reverse():a.concat(n,r)}(this.props),t=this.props,n={onMouseEnter:t.onMouseEnter,onMouseOver:t.onMouseOver,onMouseLeave:t.onMouseLeave};return o.default.createElement("div",l({ref:this.handleRef,className:"slick-track",style:this.props.trackStyle},n),e)}}])&&c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),r}(o.default.PureComponent)},9445(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkSpecKeys=t.checkNavigable=t.changeSlide=t.canUseDOM=t.canGoNext=void 0,t.clamp=c,t.extractObject=void 0,t.filterSettings=function(e){return P.reduce((function(t,n){return e.hasOwnProperty(n)&&(t[n]=e[n]),t}),{})},t.validSettings=t.swipeStart=t.swipeMove=t.swipeEnd=t.slidesOnRight=t.slidesOnLeft=t.slideHandler=t.siblingDirection=t.safePreventDefault=t.lazyStartIndex=t.lazySlidesOnRight=t.lazySlidesOnLeft=t.lazyEndIndex=t.keyHandler=t.initializedState=t.getWidth=t.getTrackLeft=t.getTrackCSS=t.getTrackAnimateCSS=t.getTotalSlides=t.getSwipeDirection=t.getSlideCount=t.getRequiredLazySlides=t.getPreClones=t.getPostClones=t.getOnDemandLazySlides=t.getNavigableIndexes=t.getHeight=void 0;var o=s(n(1609)),i=s(n(1327));function s(e){return e&&e.__esModule?e:{default:e}}function a(e){return a="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},a(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){var o,i,s,r;o=e,i=t,s=n[t],r=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i),(i="symbol"==a(r)?r:String(r))in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return Math.max(t,Math.min(e,n))}var d=t.safePreventDefault=function(e){["onTouchStart","onTouchMove","onWheel"].includes(e._reactName)||e.preventDefault()},u=t.getOnDemandLazySlides=function(e){for(var t=[],n=p(e),o=h(e),i=n;i<o;i++)e.lazyLoadedList.indexOf(i)<0&&t.push(i);return t},p=(t.getRequiredLazySlides=function(e){for(var t=[],n=p(e),o=h(e),i=n;i<o;i++)t.push(i);return t},t.lazyStartIndex=function(e){return e.currentSlide-g(e)}),h=t.lazyEndIndex=function(e){return e.currentSlide+m(e)},g=t.lazySlidesOnLeft=function(e){return e.centerMode?Math.floor(e.slidesToShow/2)+(parseInt(e.centerPadding)>0?1:0):0},m=t.lazySlidesOnRight=function(e){return e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+(parseInt(e.centerPadding)>0?1:0):e.slidesToShow},b=t.getWidth=function(e){return e&&e.offsetWidth||0},f=t.getHeight=function(e){return e&&e.offsetHeight||0},x=t.getSwipeDirection=function(e){var t,n,o,i,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=e.startX-e.curX,n=e.startY-e.curY,o=Math.atan2(n,t),(i=Math.round(180*o/Math.PI))<0&&(i=360-Math.abs(i)),i<=45&&i>=0||i<=360&&i>=315?"left":i>=135&&i<=225?"right":!0===s?i>=35&&i<=135?"up":"down":"vertical"},y=t.canGoNext=function(e){var t=!0;return e.infinite||(e.centerMode&&e.currentSlide>=e.slideCount-1||e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1),t},v=(t.extractObject=function(e,t){var n={};return t.forEach((function(t){return n[t]=e[t]})),n},t.initializedState=function(e){var t,n=o.default.Children.count(e.children),i=e.listRef,s=Math.ceil(b(i)),a=e.trackRef&&e.trackRef.node,r=Math.ceil(b(a));if(e.vertical)t=s;else{var c=e.centerMode&&2*parseInt(e.centerPadding);"string"==typeof e.centerPadding&&"%"===e.centerPadding.slice(-1)&&(c*=s/100),t=Math.ceil((s-c)/e.slidesToShow)}var d=i&&f(i.querySelector('[data-index="0"]')),p=d*e.slidesToShow,h=void 0===e.currentSlide?e.initialSlide:e.currentSlide;e.rtl&&void 0===e.currentSlide&&(h=n-1-e.initialSlide);var g=e.lazyLoadedList||[],m=u(l(l({},e),{},{currentSlide:h,lazyLoadedList:g})),x={slideCount:n,slideWidth:t,listWidth:s,trackWidth:r,currentSlide:h,slideHeight:d,listHeight:p,lazyLoadedList:g=g.concat(m)};return null===e.autoplaying&&e.autoplay&&(x.autoplaying="playing"),x},t.slideHandler=function(e){var t=e.waitForAnimate,n=e.animating,o=e.fade,i=e.infinite,s=e.index,a=e.slideCount,r=e.lazyLoad,d=e.currentSlide,p=e.centerMode,h=e.slidesToScroll,g=e.slidesToShow,m=e.useCSS,b=e.lazyLoadedList;if(t&&n)return{};var f,x,v,k=s,w={},_={},S=i?s:c(s,0,a-1);if(o){if(!i&&(s<0||s>=a))return{};s<0?k=s+a:s>=a&&(k=s-a),r&&b.indexOf(k)<0&&(b=b.concat(k)),w={animating:!0,currentSlide:k,lazyLoadedList:b,targetSlide:k},_={animating:!1,targetSlide:k}}else f=k,k<0?(f=k+a,i?a%h!=0&&(f=a-a%h):f=0):!y(e)&&k>d?k=f=d:p&&k>=a?(k=i?a:a-1,f=i?0:a-1):k>=a&&(f=k-a,i?a%h!=0&&(f=0):f=a-g),!i&&k+g>=a&&(f=a-g),x=$(l(l({},e),{},{slideIndex:k})),v=$(l(l({},e),{},{slideIndex:f})),i||(x===v&&(k=f),x=v),r&&(b=b.concat(u(l(l({},e),{},{currentSlide:k})))),m?(w={animating:!0,currentSlide:f,trackStyle:j(l(l({},e),{},{left:x})),lazyLoadedList:b,targetSlide:S},_={animating:!1,currentSlide:f,trackStyle:C(l(l({},e),{},{left:v})),swipeLeft:null,targetSlide:S}):w={currentSlide:f,trackStyle:C(l(l({},e),{},{left:v})),lazyLoadedList:b,targetSlide:S};return{state:w,nextState:_}},t.changeSlide=function(e,t){var n,o,i,s,a=e.slidesToScroll,r=e.slidesToShow,c=e.slideCount,d=e.currentSlide,u=e.targetSlide,p=e.lazyLoad,h=e.infinite;if(n=c%a!=0?0:(c-d)%a,"previous"===t.message)s=d-(i=0===n?a:r-n),p&&!h&&(s=-1==(o=d-i)?c-1:o),h||(s=u-a);else if("next"===t.message)s=d+(i=0===n?a:n),p&&!h&&(s=(d+a)%c+n),h||(s=u+a);else if("dots"===t.message)s=t.index*t.slidesToScroll;else if("children"===t.message){if(s=t.index,h){var g=N(l(l({},e),{},{targetSlide:s}));s>t.currentSlide&&"left"===g?s-=c:s<t.currentSlide&&"right"===g&&(s+=c)}}else"index"===t.message&&(s=Number(t.index));return s},t.keyHandler=function(e,t,n){return e.target.tagName.match("TEXTAREA|INPUT|SELECT")||!t?"":37===e.keyCode?n?"next":"previous":39===e.keyCode?n?"previous":"next":""},t.swipeStart=function(e,t,n){return"IMG"===e.target.tagName&&d(e),!t||!n&&-1!==e.type.indexOf("mouse")?"":{dragging:!0,touchObject:{startX:e.touches?e.touches[0].pageX:e.clientX,startY:e.touches?e.touches[0].pageY:e.clientY,curX:e.touches?e.touches[0].pageX:e.clientX,curY:e.touches?e.touches[0].pageY:e.clientY}}},t.swipeMove=function(e,t){ |
| 225 |
var n=t.scrolling,o=t.animating,i=t.vertical,s=t.swipeToSlide,a=t.verticalSwiping,r=t.rtl,c=t.currentSlide,u=t.edgeFriction,p=t.edgeDragged,h=t.onEdge,g=t.swiped,m=t.swiping,b=t.slideCount,f=t.slidesToScroll,v=t.infinite,k=t.touchObject,w=t.swipeEvent,_=t.listHeight,j=t.listWidth;if(!n){if(o)return d(e);i&&s&&a&&d(e);var S,T={},M=$(t);k.curX=e.touches?e.touches[0].pageX:e.clientX,k.curY=e.touches?e.touches[0].pageY:e.clientY,k.swipeLength=Math.round(Math.sqrt(Math.pow(k.curX-k.startX,2)));var N=Math.round(Math.sqrt(Math.pow(k.curY-k.startY,2)));if(!a&&!m&&N>10)return{scrolling:!0};a&&(k.swipeLength=N);var L=(r?-1:1)*(k.curX>k.startX?1:-1);a&&(L=k.curY>k.startY?1:-1);var E=Math.ceil(b/f),P=x(t.touchObject,a),A=k.swipeLength;return v||(0===c&&("right"===P||"down"===P)||c+1>=E&&("left"===P||"up"===P)||!y(t)&&("left"===P||"up"===P))&&(A=k.swipeLength*u,!1===p&&h&&(h(P),T.edgeDragged=!0)),!g&&w&&(w(P),T.swiped=!0),S=i?M+A*(_/j)*L:r?M-A*L:M+A*L,a&&(S=M+A*L),T=l(l({},T),{},{touchObject:k,swipeLeft:S,trackStyle:C(l(l({},t),{},{left:S}))}),Math.abs(k.curX-k.startX)<.8*Math.abs(k.curY-k.startY)||k.swipeLength>10&&(T.swiping=!0,d(e)),T}},t.swipeEnd=function(e,t){var n=t.dragging,o=t.swipe,i=t.touchObject,s=t.listWidth,a=t.touchThreshold,r=t.verticalSwiping,c=t.listHeight,u=t.swipeToSlide,p=t.scrolling,h=t.onSwipe,g=t.targetSlide,m=t.currentSlide,b=t.infinite;if(!n)return o&&d(e),{};var f=r?c/a:s/a,y=x(i,r),v={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(p)return v;if(!i.swipeLength)return v;if(i.swipeLength>f){var _,C;d(e),h&&h(y);var S=b?m:g;switch(y){case"left":case"up":C=S+w(t),_=u?k(t,C):C,v.currentDirection=0;break;case"right":case"down":C=S-w(t),_=u?k(t,C):C,v.currentDirection=1;break;default:_=S}v.triggerSlideHandler=_}else{var T=$(t);v.trackStyle=j(l(l({},t),{},{left:T}))}return v},t.getNavigableIndexes=function(e){for(var t=e.infinite?2*e.slideCount:e.slideCount,n=e.infinite?-1*e.slidesToShow:0,o=e.infinite?-1*e.slidesToShow:0,i=[];n<t;)i.push(n),n=o+e.slidesToScroll,o+=Math.min(e.slidesToScroll,e.slidesToShow);return i}),k=t.checkNavigable=function(e,t){var n=v(e),o=0;if(t>n[n.length-1])t=n[n.length-1];else for(var i in n){if(t<n[i]){t=o;break}o=n[i]}return t},w=t.getSlideCount=function(e){var t=e.centerMode?e.slideWidth*Math.floor(e.slidesToShow/2):0;if(e.swipeToSlide){var n,o=e.listRef,i=o.querySelectorAll&&o.querySelectorAll(".slick-slide")||[];if(Array.from(i).every((function(o){if(e.vertical){if(o.offsetTop+f(o)/2>-1*e.swipeLeft)return n=o,!1}else if(o.offsetLeft-t+b(o)/2>-1*e.swipeLeft)return n=o,!1;return!0})),!n)return 0;var s=!0===e.rtl?e.slideCount-e.currentSlide:e.currentSlide;return Math.abs(n.dataset.index-s)||1}return e.slidesToScroll},_=t.checkSpecKeys=function(e,t){return t.reduce((function(t,n){return t&&e.hasOwnProperty(n)}),!0)?null:console.error("Keys Missing:",e)},C=t.getTrackCSS=function(e){var t,n;_(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);var o=e.slideCount+2*e.slidesToShow;e.vertical?n=o*e.slideHeight:t=M(e)*e.slideWidth;var i={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){var s=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",a=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",r=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";i=l(l({},i),{},{WebkitTransform:s,transform:a,msTransform:r})}else e.vertical?i.top=e.left:i.left=e.left;return e.fade&&(i={opacity:1}),t&&(i.width=t),n&&(i.height=n),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?i.marginTop=e.left+"px":i.marginLeft=e.left+"px"),i},j=t.getTrackAnimateCSS=function(e){_(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var t=C(e);return e.useTransform?(t.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,t.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?t.transition="top "+e.speed+"ms "+e.cssEase:t.transition="left "+e.speed+"ms "+e.cssEase,t},$=t.getTrackLeft=function(e){if(e.unslick)return 0;_(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);var t,n,o=e.slideIndex,i=e.trackRef,s=e.infinite,a=e.centerMode,r=e.slideCount,l=e.slidesToShow,c=e.slidesToScroll,d=e.slideWidth,u=e.listWidth,p=e.variableWidth,h=e.slideHeight,g=e.fade,m=e.vertical;if(g||1===e.slideCount)return 0;var b=0;if(s?(b=-S(e),r%c!=0&&o+c>r&&(b=-(o>r?l-(o-r):r%c)),a&&(b+=parseInt(l/2))):(r%c!=0&&o+c>r&&(b=l-r%c),a&&(b=parseInt(l/2))),t=m?o*h*-1+b*h:o*d*-1+b*d,!0===p){var f,x=i&&i.node;if(f=o+S(e),t=(n=x&&x.childNodes[f])?-1*n.offsetLeft:0,!0===a){f=s?o+S(e):o,n=x&&x.children[f],t=0;for(var y=0;y<f;y++)t-=x&&x.children[y]&&x.children[y].offsetWidth;t-=parseInt(e.centerPadding),t+=n&&(u-n.offsetWidth)/2}}return t},S=t.getPreClones=function(e){return e.unslick||!e.infinite?0:e.variableWidth?e.slideCount:e.slidesToShow+(e.centerMode?1:0)},T=t.getPostClones=function(e){return e.unslick||!e.infinite?0:e.slideCount},M=t.getTotalSlides=function(e){return 1===e.slideCount?1:S(e)+e.slideCount+T(e)},N=t.siblingDirection=function(e){return e.targetSlide>e.currentSlide?e.targetSlide>e.currentSlide+L(e)?"left":"right":e.targetSlide<e.currentSlide-E(e)?"right":"left"},L=t.slidesOnRight=function(e){var t=e.slidesToShow,n=e.centerMode,o=e.rtl,i=e.centerPadding;if(n){var s=(t-1)/2+1;return parseInt(i)>0&&(s+=1),o&&t%2==0&&(s+=1),s}return o?0:t-1},E=t.slidesOnLeft=function(e){var t=e.slidesToShow,n=e.centerMode,o=e.rtl,i=e.centerPadding;if(n){var s=(t-1)/2+1;return parseInt(i)>0&&(s+=1),o||t%2!=0||(s+=1),s}return o?t-1:0},P=(t.canUseDOM=function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)},t.validSettings=Object.keys(i.default))},3591(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>_});var o=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,o){return e[0]===t&&(n=o,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(t,n){var o=e(this.__entries__,t);~o?this.__entries__[o][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,o=e(n,t);~o&&n.splice(o,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,o=this.__entries__;n<o.length;n++){var i=o[n];e.call(t,i[1],i[0])}},t}()}(),i="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,s="undefined"!=typeof globalThis&&globalThis.Math===Math?globalThis:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),a="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(s):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},r=["top","right","bottom","left","width","height","size","weight"],l="undefined"!=typeof MutationObserver,c=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,n=!1,o=0;function i(){t&&(t=!1,e()),n&&r()}function s(){a(i)}function r(){var e=Date.now();if(t){if(e-o<2)return;n=!0}else t=!0,n=!1,setTimeout(s,20);o=e}return r}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1), |
| 226 |
!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;r.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),d=function(e,t){for(var n=0,o=Object.keys(t);n<o.length;n++){var i=o[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||s},p=f(0,0,0,0);function h(e){return parseFloat(e)||0}function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+h(e["border-"+n+"-width"])}),0)}var m="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function b(e){return i?m(e)?function(e){var t=e.getBBox();return f(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return p;var o=u(e).getComputedStyle(e),i=function(e){for(var t={},n=0,o=["top","right","bottom","left"];n<o.length;n++){var i=o[n],s=e["padding-"+i];t[i]=h(s)}return t}(o),s=i.left+i.right,a=i.top+i.bottom,r=h(o.width),l=h(o.height);if("border-box"===o.boxSizing&&(Math.round(r+s)!==t&&(r-=g(o,"left","right")+s),Math.round(l+a)!==n&&(l-=g(o,"top","bottom")+a)),!function(e){return e===u(e).document.documentElement}(e)){var c=Math.round(r+s)-t,d=Math.round(l+a)-n;1!==Math.abs(c)&&(r-=c),1!==Math.abs(d)&&(l-=d)}return f(i.left,i.top,r,l)}(e):p}function f(e,t,n,o){return{x:e,y:t,width:n,height:o}}var x=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=f(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=b(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),y=function(e,t){var n,o,i,s,a,r,l,c=(o=(n=t).x,i=n.y,s=n.width,a=n.height,r="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(r.prototype),d(l,{x:o,y:i,width:s,height:a,top:i,right:o+s,bottom:a+i,left:o}),l);d(this,{target:e,contentRect:c})},v=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new o,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new x(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new y(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),k="undefined"!=typeof WeakMap?new WeakMap:new o,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),o=new v(t,n,this);k.set(this,o)};["observe","unobserve","disconnect"].forEach((function(e){w.prototype[e]=function(){var t;return(t=k.get(this))[e].apply(t,arguments)}}));const _=void 0!==s.ResizeObserver?s.ResizeObserver:w},8028(e){e.exports=function(e){return e.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()})).toLowerCase()}},1609(e){"use strict";e.exports=window.React},428(e){"use strict";e.exports=window.jQuery},6942(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,s(n)))}return e}function s(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()}},s={};function a(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=i,a.amdD=function(){throw new Error("define cannot be used indirect")},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);a.r(i);var s={};e=e||[null,t({}),t([]),t(t)];for(var r=2&o&&n;("object"==typeof r||"function"==typeof r)&&!~e.indexOf(r);r=t(r))Object.getOwnPropertyNames(r).forEach((e=>s[e]=()=>n[e]));return s.default=()=>n,a.d(i,s),i},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>(({2907:"bpl-icons-bootstrap",6706:"bpl-icons-lucid",7493:"bpl-icons-fontawesome"}[e]||e)+".js?ver="+{417:"6c3b0b8b3fd3c8f381cb",897:"12c1b66ee1cb70ef99ea",1710:"c707441f1b762d524dae",2877:"be0c1d8c6bcdebfda496",2907:"dad14d554791df87f82f",2967:"657986d282bfdff3c64d",5668:"c1222d29770c2957e574",6706:"4b45fff54f857216d7b7",7108:"0f8ee9e491e60aff8afc",7164:"24a64d77d9877372bb7b",7493:"eeef2f862f7dbdb6accb",7837:"ca0253e14707107aeae7",7917:"b322c914cf9ba1ddd337",8486:"7498f2443e069a6beb19",9908:"deef5d4dc43162276351"}[e]),a.miniCssF=e=>{},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},o="b-blocks:",a.l=(e,t,i,s)=>{ |
| 227 |
if(n[e])n[e].push(t);else{var r,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==o+i){r=u;break}}r||(l=!0,(r=document.createElement("script")).charset="utf-8",a.nc&&r.setAttribute("nonce",a.nc),r.setAttribute("data-webpack",o+i),r.src=e),n[e]=[t];var p=(t,o)=>{r.onerror=r.onload=null,clearTimeout(h);var i=n[e];if(delete n[e],r.parentNode&&r.parentNode.removeChild(r),i&&i.forEach((e=>e(o))),t)return t(o)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=p.bind(null,r.onerror),r.onload=p.bind(null,r.onload),l&&document.head.appendChild(r)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e={3057:0};a.f.j=(t,n)=>{var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{var i=new Promise(((n,i)=>o=e[t]=[n,i]));n.push(o[2]=i);var s=a.p+a.u(t),r=new Error;a.l(s,(n=>{if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var i=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;r.message="Loading chunk "+t+" failed.\n("+i+": "+s+")",r.name="ChunkLoadError",r.type=i,r.request=s,o[1](r)}}),"chunk-"+t,t)}};var t=(t,n)=>{var o,i,[s,r,l]=n,c=0;if(s.some((t=>0!==e[t]))){for(o in r)a.o(r,o)&&(a.m[o]=r[o]);l&&l(a)}for(t&&t(n);c<s.length;c++)i=s[c],a.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=globalThis.webpackChunkb_blocks=globalThis.webpackChunkb_blocks||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{"use strict";const e="@media only screen and (min-width: 1025px)",t="@media only screen and (max-width: 1024px)",n="@media only screen and (max-width: 640px)",o="#146EF5",i="#85b4fa",s="#FF7A00",r="linear-gradient(135deg, #0040E3, #18D4FD)",l=window.ReactJSXRuntime,c=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 43 43",fill:"none",children:[(0,l.jsxs)("g",{clipPath:"url(#clip0_1877_1771)",children:[(0,l.jsx)("rect",{width:"43",height:"43",rx:"15",fill:"url(#paint0_linear_1877_1771)"}),(0,l.jsx)("path",{d:"M24.2285 40.5754C21.8801 38.2139 19.3932 35.7203 16.8931 33.2071L19.9671 30.265C19.9209 30.1528 19.9209 30.1462 19.8747 30.0341H11.1541C10.2107 30.0341 9.43896 29.2689 9.43896 28.319V15.1984C9.43896 14.4464 10.0458 13.8395 10.7979 13.8395H19.9803L16.7348 10.7589L24.3736 3.14648L34.2487 13.0216C35.0205 13.7934 35.0205 15.0533 34.2487 15.8185L28.1798 21.8016C30.2577 23.8597 32.2763 25.8651 34.2553 27.8242C35.0271 28.5894 35.0205 29.8296 34.2553 30.5948L24.2285 40.5754ZM20.1914 14.11V29.5394C22.7706 26.9799 25.3631 24.4006 27.9357 21.8478C25.3961 19.3147 22.8234 16.742 20.1914 14.11Z",fill:"white"})]}),(0,l.jsxs)("defs",{children:[(0,l.jsxs)("linearGradient",{id:"paint0_linear_1877_1771",x1:"-4.31905",y1:"30.2033",x2:"31.8123",y2:"30.2033",gradientUnits:"userSpaceOnUse",children:[(0,l.jsx)("stop",{stopColor:"#A997F7"}),(0,l.jsx)("stop",{offset:"1",stopColor:"#8C74FD"})]}),(0,l.jsx)("clipPath",{id:"clip0_1877_1771",children:(0,l.jsx)("rect",{width:"43",height:"43",fill:"white"})})]})]}),d=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 14.707 14.707",children:(0,l.jsx)("rect",{x:"6.275",y:"0",width:"2.158",height:"14.707"})}),u=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 357 357",children:(0,l.jsx)("path",{d:"M357,204H0v-51h357V204z"})}),p=window.wp.blocks,h=window.wp.blockEditor,g=JSON.parse('{"apiVersion":3,"name":"b-blocks/container","title":"Container","description":"A versatile block for grouping and styling multiple blocks.","category":"bBlocks","keywords":["container","wrapper","gutenberg-wrapper","container-block"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"type":"constrained"}},"wrapper":{"type":"object","default":{"minHeight":""}},"content":{"type":"object","default":{"isFullWidth":true,"width":{"desktop":"100%","tablet":"","mobile":""},"height":"initial","verticalAlign":"center","horizontalAlign":"center"}},"shape":{"type":"object","default":{"top":{"isUpload":false,"uploadSvg":{"url":""},"type":"none","color":"#000","isFlip":false,"isFront":false,"width":{"desktop":"100%","tablet":"","mobile":""},"height":{"desktop":"","tablet":"","mobile":""}},"bottom":{"isUpload":false,"uploadSvg":{"url":""},"type":"none","color":"#000","isFlip":false,"isFront":false,"width":{"desktop":"100%","tablet":"","mobile":""},"height":{"desktop":"","tablet":"","mobile":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false,"layout":{"allowSizingOnChildren":true}},"editorScript":"file:../index.js","style":["file:./view.css","aos"],"render":"file:./render.php","viewScript":["file:./view.js","aos"]}');var m=a(1609),b=a.n(m);const f=window.wp.data,x=window.wp.i18n,y=window.wp.components,v=e=>{const{className:t="mt20 mb5",htmlFor:n,children:o}=e;return(0,l.jsx)("label",{className:`bPlLabel ${t}`,htmlFor:n,children:o})},k=e=>{const{label:t,values:n={},onChange:o=()=>{},resetValues:i,units:s,sides:a,style:r,className:c="",disableUnits:d=!1}=e,[u,p]=(0,m.useState)(!1),h=a||["top","right","bottom","left"],g=i&&Object.keys(i).map((e=>{let t=!1;return t=!Object.keys(n)||i[e]===n[e],t})),b=i&&g.includes(!1)&&Object.keys(n)?.length>0,f=[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"vh",value:"vh"}];return(0,l.jsxs)("div",{style:{...r},className:`bPlBoxControl ${c}`,children:[t&&(0,l.jsx)(v,{className:"mb5",children:t}),(0,l.jsxs)("div",{className:"sides "+(a&&a.includes("horizontal","vertical")?"gap":""),children:[h.map(((e,t)=>(0,l.jsxs)("div",{className:"bplUnitControlWrapper",children:[(0,l.jsx)(y.__experimentalUnitControl,{onChange:t=>((e,t)=>{u?o({top:e,right:e,bottom:e,left:e}):a?"horizontal"===t?o({...n,right:e,left:e}):"vertical"===t&&o({...n,top:e,bottom:e}):o({...n,[t]:e})})(t,e),value:a?"horizontal"===e?n?.right:"vertical"===e&&n?.top:n?.[e],units:s||f,disableUnits:d}),(0,l.jsx)("div",{className:"sideLabel",children:e})]},t))),!a&&(0,l.jsx)("button",{ |
| 228 |
className:"bplBoxControlLinkButton "+(u?"activeLink":""),onClick:()=>p(!u),children:u?(0,l.jsx)("span",{className:"dashicons dashicons-admin-links"}):(0,l.jsx)("span",{className:"dashicons dashicons-editor-unlink"})}),b&&(0,l.jsx)("button",{className:"bplBoxControlLinkButton",onClick:()=>o(i),children:(0,l.jsx)("span",{className:"dashicons dashicons-image-rotate"})})]})]})},w=window.wp.compose,_=(0,w.compose)((0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}})),(0,f.withDispatch)((e=>({setDevice:t=>e("core/editor").setDeviceType(t)}))))((({style:e,className:t,position:n="horizontal",device:o,setDevice:i,onChange:s=()=>{}})=>(0,l.jsx)("div",{className:`bPlDeviceControl ${t}`,style:{display:"horizontal"===n?"flex":"grid",...e},children:[{label:"Desktop",name:"desktop",icon:"dashicons-desktop"},{label:"Tablet",name:"tablet",icon:"dashicons-tablet"},{label:"Mobile",name:"mobile",icon:"dashicons-smartphone"}].map((({label:e,name:t,icon:n},a)=>(0,l.jsx)("button",{className:t===o?"active":"",onClick:()=>{i(e),s(e.toLowerCase())},children:(0,l.jsx)("span",{className:`dashicons ${n} ${t===o?"active":""} `})},a)))})));var C=Symbol.for("immer-nothing"),j=Symbol.for("immer-draftable"),$=Symbol.for("immer-state");function S(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var T=Object.getPrototypeOf;function M(e){return!!e&&!!e[$]}function N(e){return!!e&&(E(e)||Array.isArray(e)||!!e[j]||!!e.constructor?.[j]||O(e)||R(e))}var L=Object.prototype.constructor.toString();function E(e){if(!e||"object"!=typeof e)return!1;const t=T(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===L}function P(e,t){0===A(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,o)=>t(o,n,e)))}function A(e){const t=e[$];return t?t.type_:Array.isArray(e)?1:O(e)?2:R(e)?3:0}function B(e,t){return 2===A(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function I(e,t,n){const o=A(e);2===o?e.set(t,n):3===o?e.add(n):e[t]=n}function O(e){return e instanceof Map}function R(e){return e instanceof Set}function z(e){return e.copy_||e.base_}function D(e,t){if(O(e))return new Map(e);if(R(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=E(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[$];let n=Reflect.ownKeys(t);for(let o=0;o<n.length;o++){const i=n[o],s=t[i];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(T(e),t)}{const t=T(e);if(null!==t&&n)return{...e};const o=Object.create(t);return Object.assign(o,e)}}function F(e,t=!1){return W(e)||M(e)||!N(e)||(A(e)>1&&(e.set=e.add=e.clear=e.delete=H),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>F(t,!0)))),e}function H(){S(2)}function W(e){return Object.isFrozen(e)}var U,G={};function V(e){const t=G[e];return t||S(0),t}function q(){return U}function Y(e,t){t&&(V("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function K(e){Q(e),e.drafts_.forEach(X),e.drafts_=null}function Q(e){e===U&&(U=e.parent_)}function Z(e){return U={drafts_:[],parent_:U,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function X(e){const t=e[$];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function J(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[$].modified_&&(K(t),S(4)),N(e)&&(e=ee(t,e),t.parent_||ne(t,e)),t.patches_&&V("Patches").generateReplacementPatches_(n[$].base_,e,t.patches_,t.inversePatches_)):e=ee(t,n,[]),K(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==C?e:void 0}function ee(e,t,n){if(W(t))return t;const o=t[$];if(!o)return P(t,((i,s)=>te(e,o,t,i,s,n))),t;if(o.scope_!==e)return t;if(!o.modified_)return ne(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const t=o.copy_;let i=t,s=!1;3===o.type_&&(i=new Set(t),t.clear(),s=!0),P(i,((i,a)=>te(e,o,t,i,a,n,s))),ne(e,t,!1),n&&e.patches_&&V("Patches").generatePatches_(o,n,e.patches_,e.inversePatches_)}return o.copy_}function te(e,t,n,o,i,s,a){if(M(i)){const a=ee(e,i,s&&t&&3!==t.type_&&!B(t.assigned_,o)?s.concat(o):void 0);if(I(n,o,a),!M(a))return;e.canAutoFreeze_=!1}else a&&n.add(i);if(N(i)&&!W(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ee(e,i),t&&t.scope_.parent_||"symbol"==typeof o||!Object.prototype.propertyIsEnumerable.call(n,o)||ne(e,i)}}function ne(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&F(t,n)}var oe={get(e,t){if(t===$)return e;const n=z(e);if(!B(n,t))return function(e,t,n){const o=ae(t,n);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}(e,n,t);const o=n[t];return e.finalized_||!N(o)?o:o===se(e.base_,t)?(le(e),e.copy_[t]=ce(o,e)):o},has:(e,t)=>t in z(e),ownKeys:e=>Reflect.ownKeys(z(e)),set(e,t,n){const o=ae(z(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){const o=se(z(e),t),a=o?.[$];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((i=n)===(s=o)?0!==i||1/i==1/s:i!=i&&s!=s)&&(void 0!==n||B(e.base_,t)))return!0;le(e),re(e)}var i,s;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==se(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,le(e),re(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=z(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:o.enumerable,value:n[t]}:o},defineProperty(){S(11)},getPrototypeOf:e=>T(e.base_),setPrototypeOf(){S(12)}},ie={};function se(e,t){const n=e[$];return(n?z(n):e)[t]}function ae(e,t){if(!(t in e))return;let n=T(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=T(n)}}function re(e){e.modified_||(e.modified_=!0,e.parent_&&re(e.parent_))}function le(e){e.copy_||(e.copy_=D(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function ce(e,t){const n=O(e)?V("MapSet").proxyMap_(e,t):R(e)?V("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),o={type_:n?1:0,scope_:t?t.scope_:q(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=o,s=oe;n&&(i=[o],s=ie);const{revoke:a,proxy:r}=Proxy.revocable(i,s);return o.draft_=r,o.revoke_=a,r}(e,t);return(t?t.scope_:q()).drafts_.push(n),n}function de(e){if(!N(e)||W(e))return e;const t=e[$];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=D(e,t.scope_.immer_.useStrictShallowCopy_)}else n=D(e,!0);return P(n,((e,t)=>{I(n,e,de(t))})),t&&(t.finalized_=!1),n}P(oe,((e,t)=>{ie[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),ie.deleteProperty=function(e,t){return ie.set.call(this,e,t,void 0)},ie.set=function(e,t,n){return oe.set.call(this,e[0],t,n,e[0])};var ue=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const o=this;return function(e=n,...i){return o.produce(e,(e=>t.call(this,e,...i)))}}let o;if("function"!=typeof t&&S(6),void 0!==n&&"function"!=typeof n&&S(7),N(e)){const i=Z(this),s=ce(e,void 0);let a=!0;try{o=t(s),a=!1}finally{a?K(i):Q(i)}return Y(i,n),J(o,i)}if(!e||"object"!=typeof e){if(o=t(e),void 0===o&&(o=e),o===C&&(o=void 0),this.autoFreeze_&&F(o,!0),n){const t=[],i=[];V("Patches").generateReplacementPatches_(e,o,t,i),n(t,i)}return o}S(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,o;return[this.produce(e,t,((e,t)=>{n=e,o=t})),n,o]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;N(e)||S(8), |
| 229 |
M(e)&&(M(t=e)||S(10),e=de(t));const n=Z(this),o=ce(e,void 0);return o[$].isManual_=!0,Q(n),o}finishDraft(e,t){const n=e&&e[$];n&&n.isManual_||S(9);const{scope_:o}=n;return Y(o,t),J(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}n>-1&&(t=t.slice(n+1));const o=V("Patches").applyPatches_;return M(e)?o(e,t):this.produce(e,(e=>o(e,t)))}},pe=ue.produce;ue.produceWithPatches.bind(ue),ue.setAutoFreeze.bind(ue),ue.setUseStrictShallowCopy.bind(ue),ue.applyPatches.bind(ue),ue.createDraft.bind(ue),ue.finishDraft.bind(ue);const he=e=>Object.values(e).join(" "),ge=(e,t)=>{if(!e)return[];let n=[];const o=e.media_details.sizes;for(const e in o){const i=t.find((t=>t.slug===e));i&&n.push({label:i.name,value:o[e].source_url})}return n},me=()=>{setTimeout((()=>{const e=document.querySelectorAll(".bPlPanelBody:not(.itemPanelBody) > h2 > button");function t(){this.removeEventListener("click",t),e.forEach((e=>{"true"!==e.getAttribute("aria-expanded")||e.isEqualNode(this)||e.click()})),setTimeout((()=>{this.addEventListener("click",t)}),500)}e.forEach((e=>{e.addEventListener("click",t)}))}),500)},be=(e,t,...n)=>{if(0===n.length)return t;const[o,...i]=n;return 0===i.length?pe(e,(e=>{Array.isArray(e[o])&&null==e&&(e={}),e[o]=t})):pe(e,(e=>{null==e&&(e={}),Object.prototype.hasOwnProperty.call(e,o)||(e[o]={}),e[o]=be(e[o],t,...i)}))},fe=(e,t)=>(n,o,...i)=>{t({[n]:be(e[n],o,...i)})},xe=(e,t)=>{let n;return(...o)=>{clearTimeout(n),n=setTimeout((()=>{e(...o)}),t)}},ye=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({dimension:e,onChange:t,title:n=(0,x.__)("Dimension"),enabled:o,device:i})=>{const{padding:s={},margin:a={},width:r={},height:c={}}=e||{},d=e=>o.includes(e);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:n,children:[d("width")&&(0,l.jsxs)(y.Flex,{className:"mb5",gap:"20px",children:[(0,l.jsxs)(y.Flex,{className:"flex1",gap:"2px",children:[" ",(0,l.jsx)(v,{className:"",children:"Width"})," ",(0,l.jsx)(_,{})," "]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",label:"",labelPosition:"edge",value:r?.width?.[i],onChange:n=>t(be(e,n,"width","width",i))})]}),d("minWidth")&&(0,l.jsxs)(y.Flex,{className:"mb5",gap:"20px",children:[(0,l.jsxs)(y.Flex,{className:"flex1",children:[" ",(0,l.jsx)(v,{className:"",children:"Min Width"})," ",(0,l.jsx)(_,{style:{marginLeft:"auto"}})," "]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",label:"",labelPosition:"edge",value:r?.min?.[i],onChange:n=>t(be(e,n,"width","min",i))})]}),d("maxWidth")&&(0,l.jsxs)(y.Flex,{className:"mb15",gap:"20px",children:[(0,l.jsxs)(y.Flex,{className:"flex1",children:[" ",(0,l.jsx)(v,{className:"",children:"Max Width"})," ",(0,l.jsx)(_,{})," "]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",label:"",labelPosition:"edge",value:r?.max?.[i],onChange:n=>t(be(e,n,"width","max",i))})]}),d("height")&&(0,l.jsxs)(y.Flex,{className:"mb5",gap:"20px",children:[(0,l.jsxs)(y.Flex,{className:"flex1",children:[" ",(0,l.jsx)(v,{className:"",children:"Height"})," ",(0,l.jsx)(_,{})," "]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",label:"",labelPosition:"edge",value:c?.height?.[i],onChange:n=>t(be(e,n,"height","height",i))})]}),d("minHeight")&&(0,l.jsxs)(y.Flex,{className:"mb5",gap:"20px",children:[(0,l.jsxs)(y.Flex,{className:"flex1",children:[" ",(0,l.jsx)(v,{className:"",children:"Min Height"})," ",(0,l.jsx)(_,{})," "]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",label:"",labelPosition:"edge",value:c?.min?.[i],onChange:n=>t(be(e,n,"height","min",i))})]}),d("maxHeight")&&(0,l.jsxs)(y.Flex,{gap:"20px",children:[(0,l.jsxs)(y.Flex,{className:"flex1",children:[" ",(0,l.jsx)(v,{className:"",children:"Max Height"})," ",(0,l.jsx)(_,{})," "]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",label:"",labelPosition:"edge",value:c?.max?.[i],onChange:n=>t(be(e,n,"height","max",i))})]}),d("padding")&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mb5",children:[" ",(0,l.jsx)(v,{className:"",children:"Padding"})," ",(0,l.jsx)(_,{})," "]}),(0,l.jsx)(k,{values:s[i],onChange:n=>t(be(e,n,"padding",i))})]}),d("margin")&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt20 mb5",children:[" ",(0,l.jsx)(v,{className:"",children:"Margin"})," ",(0,l.jsx)(_,{})," "]}),(0,l.jsx)(k,{values:a[i],onChange:n=>t(be(e,n,"margin",i))})]})]})})),ve=e=>{const{className:t,label:n="",value:o,types:i=["image"],onChange:s,placeholder:a=(0,x.__)("Enter URL")}=e;return(0,l.jsxs)("div",{className:t,children:[n&&(0,l.jsx)(v,{className:"mb5",children:n}),(0,l.jsxs)(y.PanelRow,{className:"bPlInlineMediaUpload",children:[(0,l.jsx)(y.TextControl,{value:o,onChange:e=>s(e),placeholder:a}),(0,l.jsx)(h.MediaUpload,{allowedTypes:i,onSelect:e=>s(e.url),render:({open:e})=>(0,l.jsx)(y.Button,{className:"button button-primary",onClick:e,children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M7.4,10h1.59v5c0,0.55,0.45,1,1,1h4c0.55,0,1-0.45,1-1v-5h1.59c0.89,0,1.34-1.08,0.71-1.71L12.7,3.7 c-0.39-0.39-1.02-0.39-1.41,0L6.7,8.29C6.07,8.92,6.51,10,7.4,10z M5,19c0,0.55,0.45,1,1,1h12c0.55,0,1-0.45,1-1s-0.45-1-1-1H6 C5.45,18,5,18.45,5,19z"})})})})]})]})},ke=e=>{const{className:t,label:n="",value:o={},types:i=["image"],onChange:s,placeholder:a=(0,x.__)("Enter URL")}=e;return(0,l.jsxs)("div",{className:t,children:[n&&(0,l.jsx)(v,{className:"mb5",children:n}),(0,l.jsxs)(y.PanelRow,{className:"bPlInlineMediaUpload",children:[(0,l.jsx)(y.TextControl,{value:o?.url,onChange:e=>s({id:null,url:e,alt:"",title:"",caption:""}),placeholder:a}),(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:i,onSelect:({id:e,url:t,alt:n,title:o,caption:i})=>s({id:e,url:t,alt:n,title:o,caption:i}),render:({open:e})=>(0,l.jsx)(y.Button,{className:"button button-primary",onClick:e,icon:"upload"})})})]})]})},we=e=>{const{className:t="",label:n="Choose",value:o,types:i=["image/*"],onChange:s=()=>{},default:a="",height:r="50px",width:c="50px",style:d,onClick:u=()=>{},isSvgEnabled:p=!1}=e,g=e=>({onClick:()=>{u(),p&&wp.media({library:{type:["image/svg+xml"]},mimeType:"image/svg+xml"}),e()}}),m=e=>p?(0,l.jsx)("img",{src:`data:image/svg+xml;utf8,${o?.url||a}`,alt:"",className:"mediaImage",...g(e),style:{height:r,width:c}}):(0,l.jsx)("img",{className:"mediaImage",src:o?.url||a,alt:"",...g(e),style:{height:r,width:c}});return(0,l.jsx)("div",{style:d,className:`bPlMediaArea ${t}`,children:(0,l.jsx)(h.MediaUpload,{value:o?.id?[o?.id]:[],onSelect:({id:e,url:t,alt:n,title:o})=>{s({id:e,url:t,alt:n,title:o})},gallery:!1,allowedTypes:i,multiple:!1,render:({open:e})=>(0,l.jsxs)("div",{className:"mediaAreaContainer",children:[a||o?.url?m(e):(0,l.jsx)("div",{className:"mediaPlusBtnWrapper",...g(e),children:(0,l.jsx)("div",{className:"mediaPlusBtnCircle",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mediaPlusBtn",width:"1em",height:"1em",viewBox:"0 0 448 512",fill:"currentColor",children:(0,l.jsx)("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"})})})}),(0,l.jsx)("div",{onClick:()=>s({}),className:"mediaDelete",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 448 512",fill:"currentColor",children:(0,l.jsx)("path",{ |
| 230 |
d:"M268 416h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12zM432 80h-82.41l-34-56.7A48 48 0 0 0 274.41 0H173.59a48 48 0 0 0-41.16 23.3L98.41 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16v336a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM171.84 50.91A6 6 0 0 1 177 48h94a6 6 0 0 1 5.15 2.91L293.61 80H154.39zM368 464H80V128h288zm-212-48h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12z"})})}),(0,l.jsx)("div",{...g(e),className:"mediaButton",children:(0,l.jsx)("span",{children:n})})]})})})},_e=e=>{const{className:t="",onChange:n,icon:o="format-image",type:i="image",typeName:s="",placeholder:a=(0,x.__)("Paste or type a image URL")}=e,[r,c]=(0,m.useState)();return(0,l.jsxs)(y.Placeholder,{className:`bPlMediaPlaceholder ${t}`,label:(0,x.__)(`Upload ${s||i}`),instructions:(0,x.__)(`Upload a ${s||i} or paste/write ${s||i} url to get started.`),icon:o,children:[(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:[i],onSelect:({id:e,url:t,alt:o,title:i})=>n({id:e,url:t,alt:o,title:i}),render:({open:e})=>(0,l.jsxs)(y.Button,{isPrimary:!0,onClick:e,children:[" ",(0,x.__)("Upload")," "]})})}),(0,l.jsxs)(y.PanelRow,{className:"bPlUrlInput",children:[(0,l.jsxs)("h3",{children:[" ",(0,x.__)("Or")," "]}),(0,l.jsx)("input",{type:"url","aria-label":(0,x.__)("URL"),placeholder:a,onChange:e=>c(e.target.value),value:r}),(0,l.jsx)(y.Button,{label:(0,x.__)("Apply"),type:"submit",onClick:e=>{e.preventDefault(),n({id:null,url:r,alt:"",title:""}),c("")},isPrimary:!0,children:(0,x.__)("Apply")})]})]})},Ce=e=>{const{label:t=(0,x.__)("Edit Image:"),icon:n="format-image",types:o=["image"],value:i={},onChange:s,isMultiple:a=!1}=e;return(a?i?.length:i?.url)&&(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:o,value:a?i.map((e=>e.id)):i?.id,onSelect:e=>{if(a){const t=e.map((e=>({id:e?.id,url:e?.url,alt:e?.alt,name:e?.name,title:e?.title,sizes:e?.sizes,caption:e?.caption,description:e?.description,link:e?.link})));s(t)}else s({id:e?.id,url:e?.url,alt:e?.alt,name:e?.name,title:e?.title,sizes:e?.sizes,caption:e?.caption,description:e?.description,link:e?.link})},render:({open:e})=>(0,l.jsx)(y.ToolbarButton,{label:t,icon:n,onClick:e}),multiple:a})})})},je=[{label:"Circle",value:"circle"},{label:"Flower",value:"flower"},{label:"Sketch",value:"sketch"},{label:"Triangle",value:"triangle"},{label:"Blob",value:"blob"},{label:"Hexagon",value:"hexagon"},{label:"Custom",value:"custom"}],$e=[{label:"Fit",value:"contain"},{label:"Fill",value:"cover"},{label:"Custom",value:"custom"}],Se=[{label:"Center Center",value:"center center"},{label:"Center Left",value:"center left"},{label:"Center Right",value:"center right"},{label:"Top Center",value:"top center"},{label:"Top Left",value:"top left"},{label:"Top Right",value:"top right"},{label:"Bottom Center",value:"bottom center"},{label:"Bottom Left",value:"bottom left"},{label:"Bottom Right",value:"bottom right"},{label:"Custom",value:"custom"}],Te=[{label:"No-repeat",value:"no-repeat"},{label:"Repeat",value:"repeat"},{label:"Repeat-x",value:"repeat-x"},{label:"Repeat-y",value:"repeat-y"},{label:"Round",value:"round"},{label:"Space",value:"space"}],Me=({mask:e,onChange:t})=>{const{isMask:n=!1,shape:o={},size:i={},position:s={},repeat:a="no-repeat"}=e||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:"Mask",initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mb10",label:"Mask",checked:n,value:n,onChange:n=>t({...e,isMask:n}),__nextHasNoMarginBottom:!0}),n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:"Shape"}),(0,l.jsx)(y.SelectControl,{options:je,value:o.type,onChange:n=>t({...e,shape:{...e.shape,type:n}})})]}),"custom"===o.type&&(0,l.jsx)(we,{className:"mt10",types:["image/svg+xml"],value:{url:o.url},onChange:n=>t({...e,shape:{...e.shape,url:n.url}})}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:"Size"}),(0,l.jsx)(y.SelectControl,{options:$e,value:i.type,onChange:n=>t({...e,size:{...e.size,type:n}})})]}),"custom"===i.type&&(0,l.jsx)(y.__experimentalUnitControl,{label:"Size",labelPosition:"edge",min:0,max:1e3,value:i.scale,onChange:n=>t({...e,size:{...e.size,scale:n}})}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:"Position"}),(0,l.jsx)(y.SelectControl,{options:Se,value:s.type,onChange:n=>t({...e,position:{...e.position,type:n}})})]}),"custom"===s.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:"Position X",labelPosition:"edge",min:-1e3,max:1e3,value:s.x,onChange:n=>t({...e,position:{...e.position,x:n}})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:"Position Y",labelPosition:"edge",min:-1e3,max:1e3,value:s.y,onChange:n=>t({...e,position:{...e.position,y:n}})})]}),"cover"!==i.type&&(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:"Repeat"}),(0,l.jsx)(y.SelectControl,{options:Te,value:a,onChange:n=>t({...e,repeat:n})})]})]})]})},Ne=[{title:(0,x.__)("Normal"),name:"normal"},{title:(0,x.__)("Hover"),name:"hover"}],Le=[{label:"Solid",value:"solid"},{label:"Dashed",value:"dashed"},{label:"Dotted",value:"dotted"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"},{label:"Ridge",value:"ridge"}],Ee=(e=0)=>({value:"px",label:"px",default:e}),Pe=(e=0)=>({value:"%",label:"%",default:e}),Ae=(e=0)=>({value:"em",label:"em",default:e}),Be=(e=0)=>({value:"rem",label:"rem",default:e}),Ie=(e=0)=>({value:"vw",label:"vw",default:e}),Oe=(e=0)=>({value:"vh",label:"vh",default:e}),Re=[{value:"all",label:"All Sides"},{value:"top",label:"Top"},{value:"right",label:"Right"},{value:"bottom",label:"Bottom"},{value:"left",label:"Left"},{value:"topRight",label:"Top Right"},{value:"topBottom",label:"Top Bottom"},{value:"topLeft",label:"Top Left"},{value:"topRightBottom",label:"Top Right Bottom"},{value:"topRightLeft",label:"Top Right Left"},{value:"topBottomLeft",label:"Top Bottom Left"},{value:"rightBottom",label:"Right Bottom"},{value:"rightLeft",label:"Right Left"},{value:"rightBottomLeft",label:"Right Bottom Left"},{value:"bottomLeft",label:"Bottom Left"}],ze=[{label:"Solid",value:"solid"},{label:"Gradient",value:"gradient"}],De=[{label:(0,x.__)("Default"),value:""},{label:(0,x.__)("Auto"),value:"auto"},{label:(0,x.__)("Hidden"),value:"hidden"},{label:(0,x.__)("Visible"),value:"visible"},{label:(0,x.__)("Scroll"),value:"scroll"}],Fe=[{label:(0,x.__)("None"),value:""},{label:(0,x.__)("Fade Up"),value:"fade-up"},{label:(0,x.__)("Fade Down"),value:"fade-down"},{label:(0,x.__)("Fade Left"),value:"fade-left"},{label:(0,x.__)("Fade Right"),value:"fade-right"},{label:(0,x.__)("Fade Up Left"),value:"fade-up-left"},{label:(0,x.__)("Fade Up Right"),value:"fade-up-right"},{label:(0,x.__)("Fade Down Left"),value:"fade-down-left"},{label:(0,x.__)("Fade Down Right"),value:"fade-down-right"},{label:(0,x.__)("Flip Left"),value:"flip-left"},{label:(0,x.__)("Flip Right"),value:"flip-right"},{label:(0,x.__)("Flip Up"),value:"flip-up"},{label:(0,x.__)("Flip Down"),value:"flip-down"},{label:(0,x.__)("Zoom In"),value:"zoom-in"},{label:(0,x.__)("Zoom In Up"),value:"zoom-in-up"},{label:(0,x.__)("Zoom In Down"),value:"zoom-in-down"},{label:(0,x.__)("Zoom In Left"),value:"zoom-in-left"},{label:(0,x.__)("Zoom In Right"),value:"zoom-in-right"},{label:(0,x.__)("Zoom Out"),value:"zoom-out"},{label:(0,x.__)("Zoom Out Up"),value:"zoom-out-up"},{label:(0,x.__)("Zoom Out Down"),value:"zoom-out-down"},{label:(0,x.__)("Zoom Out Right"),value:"zoom-out-right"},{label:(0,x.__)("Zoom Out Left"),value:"zoom-out-left"}],He=({animation:e,onChange:t,id:n})=>{const{type:o="",duration:i=1,delay:s=0}=e||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:"Animation",initialOpen:!1, |
| 231 |
children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Type"),labelPosition:"left",value:o,onChange:n=>t(be(e,n,"type")),options:Fe}),(0,l.jsx)(y.RangeControl,{className:"mt20",label:"Duration (s)",value:i,onChange:n=>t(be(e,n,"duration")),min:0,max:3,step:.05}),(0,l.jsx)(y.RangeControl,{className:"mt20",label:"Delay (s)",value:s,onChange:n=>t(be(e,n,"delay")),min:0,max:3,step:.05})]})},We=(0,f.withSelect)((e=>({themeColors:e("core/block-editor").getSettings().colors})))((({isOpen:e,onClose:t,onChange:n,themeColors:o})=>o.length?(0,l.jsx)("div",{className:"bPlThemeColors",children:o.map((({color:o})=>(0,l.jsx)("div",{className:"bPlColorButtonContainer",children:(0,l.jsx)("button",{type:"button",className:"bPlColorButton","aria-expanded":e,style:{backgroundColor:o||"transparent"},onClick:()=>{n(o),t()}})},o)))}):null)),Ue=(0,m.forwardRef)(((e,t)=>{const{className:n="",label:o=(0,x.__)("Color:"),value:i="",onChange:s,defaultColor:a,disableAlpha:r=!1}=e;return(0,l.jsxs)(y.PanelRow,{ref:t,className:n,children:[(0,l.jsx)(v,{className:"",children:o}),(0,l.jsx)(y.Dropdown,{className:"bPlDropdownContainer bPlColor",contentClassName:"bPlDropdownPopover",popoverProps:{placement:"top-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"bPlColorButtonContainer",children:(0,l.jsx)("button",{type:"button",className:"bPlColorButton",onClick:t,"aria-expanded":e,style:{backgroundColor:i||"transparent"}})}),a&&a!=i&&(0,l.jsx)(y.Button,{className:"bPlResetVal",icon:"image-rotate",label:(0,x.__)("Reset"),onClick:()=>s(a)})]}),renderContent:({isOpen:e,onClose:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ColorPicker,{color:i||"",disableAlpha:r,onChangeComplete:e=>s(`rgba(${e.rgb.r}, ${e.rgb.g}, ${e.rgb.b}, ${e.rgb.a})`)}),(0,l.jsx)(We,{isOpen:e,onClose:t,onChange:s})]})})]})})),Ge=e=>{const{className:t="",label:n=(0,x.__)("Color:"),value:o,onChange:i,defaultColor:s,disableAlpha:a}=e;return(0,l.jsxs)(y.PanelRow,{className:t,children:[(0,l.jsx)(v,{className:"",children:n}),(0,l.jsx)(y.Dropdown,{className:"bPlDropdownContainer bPlColor",contentClassName:"bPlDropdownPopover",popoverProps:{placement:"top-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"bPlColorButtonContainer",children:(0,l.jsx)("button",{type:"button",className:"bPlColorButton",onClick:t,"aria-expanded":e,style:{backgroundColor:o||"transparent"}})}),s&&s!=o&&(0,l.jsx)(y.Button,{className:"bPlResetVal",icon:"image-rotate",label:(0,x.__)("Reset"),onClick:()=>i(s)})]}),renderContent:({isOpen:e,onClose:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ColorPicker,{className:"bPlColorControl",color:o||"",onChangeComplete:e=>{const t=a?"":("0"+Math.round(255*e.rgb.a).toString(16)).slice(-2);i(e.hex+t)},disableAlpha:a}),(0,l.jsx)(We,{isOpen:e,onClose:t,onChange:i})]})})]})},Ve=e=>{const{className:t="",options:n=[],label:i="Button Group",value:s,defaultValue:a="",onChange:r=()=>{},borderRadius:c="30px",height:d,paddingX:u="8px",paddingY:p="4px",fontSize:h="12px",fontWeight:g=400,activeBg:b,activeColor:f="#fff",inactiveColor:x="#000",hoverBg:y,hoverColor:v,style:k}=e,[w,_]=(0,m.useState)(0),C=n.length>0?n:[1,2],j=(0,m.useRef)(null),$=(0,m.useRef)(null),S=Math.floor(99999999*Math.random());return(0,m.useEffect)((()=>{const e=w>n.length-1?w-1:w,t=j.current,o=$.current;s&&C.forEach(((e,t)=>{e.value===s&&_(t)}));const i=t.querySelectorAll(`.bpl-button-group-${S}`),a=Array.from(i)[e],r=a.getBoundingClientRect().height.toFixed(2),l=a.getBoundingClientRect().width.toFixed(2),c=Number(l),d=Number(r);o.style.width=`${c||a.clientWidth}px`,o.style.height=`${d||a.clientHeight}px`,o.style.left=`${a.offsetLeft}px`}),[w,n,s]),(0,l.jsxs)("div",{className:t,style:{marginBottom:"10px",...k},children:[(0,l.jsx)("style",{children:`\n\t\t\t\t.bpl-buttonGroupHover-${S}.bpl-button-group-${S}:hover{\n\t\t\t\t\tbackground:${y};\n\t\t\t\t\tcolor:${v};\n\t\t\t\t\ttransition: background 0.3s ease-in-out;\n\t\t\t\t}\n\t\t\t`}),(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[i&&(0,l.jsx)("label",{style:{fontWeight:500},children:i}),(0,l.jsxs)("div",{ref:j,style:{display:"flex",position:"relative",border:"1px solid #ccc",borderRadius:c},children:[C.map(((e,t)=>(0,l.jsx)("button",{style:{background:y?w===t?"transparent":"":"transparent",borderRadius:c,height:d,padding:`${p} ${u}`,fontSize:h,zIndex:20,cursor:"pointer",fontWeight:g,color:`${w!==t?x:f}`,border:"none"},onClick:n=>((e,t,n)=>{const o=s===t.value?a:t.value,i=C.findIndex((e=>e.value===o));_(i>-1?i:n),r(o)})(0,e,t),className:`${w!==t?`bpl-buttonGroupHover-${S}`:""} bpl-button-group-${S}`,children:n.length?e.label:`Button ${t+1}`},t))),(0,l.jsx)("div",{ref:$,style:{background:b||o,transition:"left 0.2s ease-in-out",position:"absolute",top:0,left:0,zIndex:10,borderRadius:c}})]})]})]})},qe=e=>{const{value:t={},onChange:n}=e,{type:i="linear",radialType:s="ellipse",colors:a=[],centerPositions:r={x:0,y:0},angel:c=90}=t,d=(e,o,i)=>{const s=pe(t.colors,(t=>{t[e][o]=i}));n({...t,colors:s})};return(0,m.useEffect)((()=>{n(t)}),[t,t]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{className:"mt10",label:"Gradient Type",value:i,onChange:e=>n({...t,type:e}),options:[{label:"Linear",value:"linear"},{label:"Radial",value:"radial"}]}),"radial"===i&&(0,l.jsx)(Ve,{label:"Radial Type",value:s,onChange:e=>n({...t,radialType:e}),options:[{label:"Ellipse",value:"ellipse"},{label:"Circle",value:"circle"}]}),a?.map(((e,o)=>(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"10px"},children:[(0,l.jsx)(Ue,{value:e.color,onChange:e=>d(o,"color",e),tooltip:"Color"}),(0,l.jsxs)("div",{className:"advExtraMargin",style:{display:"flex",alignItems:"center",gap:"5px"},children:[(0,l.jsx)(y.Tooltip,{delay:300,text:"Position",placement:"top",children:(0,l.jsx)(y.__experimentalNumberControl,{value:e.position,onChange:e=>d(o,"position",e),min:0,max:100})}),a.length>1&&(0,l.jsx)(y.Dashicon,{style:{cursor:"pointer",color:"red"},onClick:()=>(e=>{const o=pe(t.colors,(t=>{t.splice(e,1)}));n({...t,colors:o})})(o),icon:"trash"})]})]},o))),(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",margin:"10px 0"},children:(0,l.jsx)(y.Button,{text:"Add Color",variant:"tertiary",style:{color:"#fff",background:o},icon:"plus",iconPosition:"right",onClick:()=>{const e=[...a];e.push({color:"#"+Math.floor(16777215*Math.random()).toString(16).padStart(6,"0"),position:parseInt(99*Math.random())}),n({...t,colors:e})}})}),"radial"===i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{label:"Center X Position",value:r?.x,onChange:e=>n({...t,centerPositions:{...r,x:e}}),min:0,max:100}),(0,l.jsx)(y.RangeControl,{label:"Center Y Position",value:r?.y,onChange:e=>n({...t,centerPositions:{...r,y:e}}),min:0,max:100})]}):(0,l.jsx)(y.RangeControl,{label:"Angle",value:c,onChange:e=>n({...t,angel:e}),min:0,max:360})]})},Ye=(0,f.withSelect)((e=>{const{gradients:t}=e("core/block-editor").getSettings();return{gradients:t.length>12?t.slice(0,12):t}}))((e=>{const{label:t="Color",value:n,onChange:o=()=>{},className:i="",gradients:s}=e,[a,c]=(0,m.useState)("solid"),d=Math.floor(9999999*Math.random());return(0,l.jsxs)("div",{className:i,children:[(0,l.jsx)("style",{children:`#customColorControlPanel-${d}-dualColor{\n\t\t\t\t${n?`background: ${n};`:"\n\t\t\t\t\tbackground-image: linear-gradient( 45deg, #d5d8dc 25%, transparent 0, transparent 75%, #d5d8dc 0, #d5d8dc ), linear-gradient( 45deg, #d5d8dc 25%, transparent 0, transparent 75%, #d5d8dc 0, #d5d8dc );\n\t\t\t\t\tbackground-size: 16px 16px;\n\t\t\t\t\tbackground-position: 0 0, calc(16px / 2) calc(16px / 2);\n\t\t\t\t"}\n\t\t\t}`}),(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,l.jsx)(v,{className:"",children:t}),(0,l.jsx)(y.Dropdown,{className:"my-container-class-name",contentClassName:"my-popover-content-classname", |
| 232 |
renderToggle:({isOpen:e,onToggle:t,onClose:n})=>(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[(0,l.jsx)("div",{id:`customColorControlPanel-${d}-dualColor`,style:{height:"25px",width:"25px",borderRadius:"50%",border:"1px solid #ccc"}}),(0,l.jsx)(y.Button,{onClick:t,"aria-expanded":e,icon:"edit"})]}),renderContent:({isOpen:e,onToggle:t,onClose:i})=>(0,l.jsxs)("div",{className:"panel-custom-color-control-container",children:[(0,l.jsx)(Ve,{label:"Type:",options:[{label:"Solid",value:"solid"},{label:"Gradient",value:"gradient"}],value:a,onChange:e=>c(e)}),"solid"===a&&(0,l.jsx)("div",{style:{marginTop:"20px"},children:(0,l.jsx)(Ue,{value:n,label:"Color :",onChange:e=>o(e)})}),"gradient"===a&&(0,l.jsx)("div",{style:{marginTop:"10px"},children:(0,l.jsx)(y.GradientPicker,{value:n||r,onChange:e=>o(e),gradients:s})}),(0,l.jsx)("div",{onClick:i})]})})]})]})})),Ke=[{label:"Default",value:"initial"},{label:"Fixed",value:"fixed"},{label:"Scroll",value:"scroll"}],Qe=[{label:"Default",value:"initial"},{label:"Center Center",value:"center center"},{label:"Center Left",value:"center left"},{label:"Center Right",value:"center right"},{label:"Top Center",value:"center top"},{label:"Top Left",value:"left top"},{label:"Top Right",value:"left bottom"},{label:"Bottom Center",value:"right center"},{label:"Bottom Left",value:"right top"},{label:"Bottom Right",value:"right bottom"},{label:"Custom",value:"custom"}],Ze=[{label:"Default",value:"initial"},{label:"Repeat",value:"repeat"},{label:"Repeat-X",value:"repeat-x"},{label:"Repeat-Y",value:"repeat-y"},{label:"No-Repeat",value:"no-repeat"}],Xe=[{label:"Default",value:"initial"},{label:"Auto",value:"auto"},{label:"Cover",value:"cover"},{label:"Contain",value:"contain"},{label:"Custom",value:"custom"}],Je=[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"}],et=[{title:(0,x.__)("Color"),name:"color"},{title:(0,x.__)("Gradient"),name:"gradient"},{title:(0,x.__)("Image"),name:"image"},{title:(0,x.__)("Video"),name:"video"}],tt=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({name:e="Background",value:t,onChange:n,isVideo:o=!1,device:i})=>{const{type:s="color",color:a="",gradient:r={},img:c={},video:d={}}=t||{},{position:u="center center",xPosition:p,yPosition:h,attachment:g,repeat:m="no-repeat",size:b="cover",customSize:f}=c?.[i]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10 mb10",children:e}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:o?et:et.filter((e=>"video"!==e.name)),initialTabName:s,onSelect:e=>n({...t,type:e}),children:o=>(0,l.jsxs)(l.Fragment,{children:["color"===o.name&&(0,l.jsx)(Ye,{className:"mt20",label:`${e} Color`,value:a,onChange:e=>n({...t,color:e})}),"gradient"===o.name&&(0,l.jsx)(qe,{value:r,onChange:e=>n({...t,gradient:e})}),"image"===o.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(v,{className:"mt10 mb10",children:[e," Image"]}),(0,l.jsx)(we,{label:"Upload Image",value:t?.img,onChange:e=>n({...t,img:{...c,url:e.url}}),width:"100%",height:"100%"}),c?.url&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:"Position"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.SelectControl,{value:u,options:Qe,onChange:e=>n({...t,img:{...c,[i]:{...c[i],position:e}}})}),"custom"===u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt15",children:[(0,l.jsx)(v,{className:"",children:"X Position"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{units:Je,value:p,min:-2e3,max:2e3,onChange:e=>n({...t,img:{...c,[i]:{...c[i],xPosition:e}}})}),(0,l.jsxs)(y.PanelRow,{className:"mt15",children:[(0,l.jsx)(v,{className:"",children:"Y Position"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{units:Je,value:h,min:-2e3,max:2e3,onChange:e=>n({...t,img:{...c,[i]:{...c[i],yPosition:e}}})})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:"Attachment"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.SelectControl,{value:g,options:Ke,onChange:e=>n({...t,img:{...c,[i]:{...c[i],attachment:e}}})}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:"Repeat"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.SelectControl,{value:m,options:Ze,onChange:e=>n({...t,img:{...c,[i]:{...c[i],repeat:e}}})}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:"Size"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.SelectControl,{value:b,options:Xe,onChange:e=>n({...t,img:{...c,[i]:{...c[i],size:e}}})}),"custom"===b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt15",children:[(0,l.jsx)(v,{className:"",children:"Width"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{units:Je,value:f,min:-2e3,max:2e3,onChange:e=>n({...t,img:{...c,[i]:{...c[i],customSize:e}}})})]})]})]}),"video"===o.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(v,{className:"mt10 mb10",children:[e," Video"]}),(0,l.jsx)(we,{loop:d?.loop,types:["video/mp4","video/3gpp","video/x-ms-wmv"],isVideo:!0,value:d,onChange:e=>n({...t,video:{...d,url:e.url}}),label:"Upload Video"}),(0,l.jsx)(y.__experimentalInputControl,{style:{marginTop:"10px"},label:"Inline Upload",labelPosition:"top",type:"text",value:d?.url,onChange:e=>n({...t,video:{...d,url:e}}),placeholder:"Insert your video link.."}),d?.url&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:"Loop",checked:d?.loop,value:d?.loop,onChange:e=>n({...t,video:{...d,loop:e}}),__nextHasNoMarginBottom:!0})]})]})})]})})),nt=[{label:"Normal",value:"normal"},{label:"Multiply",value:"multiply"},{label:"Screen",value:"screen"},{label:"Overlay",value:"overlay"},{label:"Darken",value:"darken"},{label:"Lighten",value:"lighten"},{label:"Color Dodge",value:"color-dodge"},{label:"Saturation",value:"saturation"},{label:"Color",value:"color"},{label:"Luminosity",value:"luminosity"}],ot={top:0,right:0,bottom:0,left:0},it=e=>{const{value:t,onChange:n}=e,{isEnabled:o=!1,colors:i={},opacity:s=1,blend:a="normal",filter:r="",blur:c=0,brightness:d=100,contrast:u=100,saturation:p=100,hue:h=0,position:g=ot,zIndex:m=-1}=t||{},b=(e,o,i=null)=>{const s=pe(t||{},(t=>{null!==i?t[e][i]=o:t[e]=o}));n(s)};return(0,l.jsxs)(y.PanelBody,{title:"Overlay",className:"bPlPanelBody bPlOverlay mt20",children:[(0,l.jsx)(y.ToggleControl,{label:"Enable",checked:o,value:o,onChange:e=>b("isEnabled",e),__nextHasNoMarginBottom:!0}),o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tt,{name:"Overlay",value:i,onChange:e=>b("colors",e)}),(0,l.jsx)(k,{label:"Overlay Position",values:g,resetValues:ot,onChange:e=>b("position",e)}),(0,l.jsx)(y.RangeControl,{className:"mt20",label:"Opacity",value:s,onChange:e=>b("opacity",e),min:0,max:1,step:.01}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:"Blend Mode",labelPosition:"left",value:a,onChange:e=>b("blend",e),options:nt}),(0,l.jsx)(y.SelectControl,{className:"mt20 mb5",label:"CSS Filter",labelPosition:"left",value:r,onChange:e=>b("filter",e),options:[{label:"None",value:""},{label:"Filter",value:"filter"},{label:"Backdrop Filter",value:"backdrop-filter"}]}),r&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{className:"mt15",label:"Blur",value:c,onChange:e=>b("blur",e),min:0,max:20}),(0,l.jsx)(y.RangeControl,{className:"mt15",label:"Brightness",value:d,onChange:e=>b("brightness",e),min:0,max:200}),(0,l.jsx)(y.RangeControl,{className:"mt15",label:"Contrast",value:u,onChange:e=>b("contrast",e),min:0,max:200}),(0,l.jsx)(y.RangeControl,{className:"mt15",label:"Saturation",value:p,onChange:e=>b("saturation",e),min:0,max:200}),(0,l.jsx)(y.RangeControl,{className:"mt15",label:"Hue",value:h,onChange:e=>b("hue",e),min:0,max:360})]}),(0,l.jsx)(y.__experimentalNumberControl,{label:"Z Index",labelPosition:"edge",value:m,onChange:e=>b("zIndex",e)})]})]})},st=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({background:e,onChange:t,enabled:n,isPremium:o})=>{ |
| 233 |
const i=n?.filter((e=>"overlay"!==e))?.map((e=>({title:e,name:e}))),s=e=>n.includes(e);return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:"Background",initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:i,children:n=>(0,l.jsxs)(l.Fragment,{children:["normal"===n.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tt,{name:"Background Type",value:e?.[n.name],onChange:o=>t(be(e,o,n.name)),isVideo:o}),s("overlay")&&(0,l.jsx)(it,{value:e?.overlay,onChange:n=>t(be(e,n,"overlay"))})]}),"hover"===n.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{className:"mt10 mb10",label:"Hover Transition",value:e?.transition||.4,onChange:n=>t(be(e,n,"transition")),min:0,max:10,step:.05}),(0,l.jsx)(tt,{name:"Hover Background Type",value:e?.[n.name],onChange:o=>t(be(e,o,n.name)),isVideo:!1,isHover:!0}),s("overlay")&&(0,l.jsx)(it,{value:e?.hoverOverlay,onChange:n=>t(be(e,n,"hoverOverlay"))})]})]})})})})),at=(0,l.jsx)("svg",{xmlns:"https://www.w3.org/2000/svg",width:15,height:15,viewBox:"0 0 548.172 548.172",children:(0,l.jsx)("path",{fill:o,d:"M534.75 49.965c-8.945-8.945-19.694-13.422-32.261-13.422H45.681c-12.562 0-23.313 4.477-32.264 13.422C4.471 58.913 0 69.663 0 82.226v310.633c0 12.566 4.471 23.315 13.417 32.265 8.951 8.945 19.702 13.414 32.264 13.414h155.318c0 7.231-1.524 14.661-4.57 22.269-3.044 7.614-6.09 14.273-9.136 19.981-3.042 5.715-4.565 9.897-4.565 12.56 0 4.948 1.807 9.24 5.424 12.847 3.615 3.621 7.898 5.435 12.847 5.435h146.179c4.949 0 9.233-1.813 12.848-5.435 3.62-3.606 5.427-7.898 5.427-12.847 0-2.468-1.526-6.611-4.571-12.415-3.046-5.801-6.092-12.566-9.134-20.267-3.046-7.71-4.569-15.085-4.569-22.128h155.318c12.56 0 23.309-4.469 32.254-13.414 8.949-8.949 13.422-19.698 13.422-32.265V82.226c.003-12.563-4.474-23.313-13.423-32.261zm-23.123 269.803c0 2.475-.903 4.613-2.711 6.424-1.81 1.804-3.952 2.707-6.427 2.707H45.681c-2.473 0-4.615-.903-6.423-2.707-1.807-1.817-2.712-3.949-2.712-6.424V82.226c0-2.475.902-4.615 2.712-6.423 1.809-1.805 3.951-2.712 6.423-2.712h456.815c2.471 0 4.617.904 6.42 2.712 1.808 1.809 2.711 3.949 2.711 6.423v237.542z"})}),rt=(0,l.jsx)("svg",{xmlns:"https://www.w3.org/2000/svg",width:15,height:15,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{fill:o,d:"M394.667 0H117.333C87.936 0 64 23.936 64 53.333v405.333C64 488.064 87.936 512 117.333 512h277.333C424.064 512 448 488.064 448 458.667V53.333C448 23.936 424.064 0 394.667 0zM256 480c-11.755 0-21.333-9.579-21.333-21.333s9.579-21.333 21.333-21.333 21.333 9.579 21.333 21.333S267.755 480 256 480zm149.333-64c0 5.888-4.779 10.667-10.667 10.667H117.333c-5.888 0-10.667-4.779-10.667-10.667V53.333c0-5.888 4.779-10.667 10.667-10.667h277.333c5.888 0 10.667 4.779 10.667 10.667V416z"})}),lt=(0,l.jsx)("svg",{xmlns:"https://www.w3.org/2000/svg",width:15,height:15,viewBox:"0 0 503.604 503.604",children:(0,l.jsx)("path",{fill:o,d:"M337.324 0H167.192c-28.924 0-53.5 23.584-53.5 52.5v398.664c0 28.916 24.056 52.44 52.98 52.44l170.412-.184c28.92 0 52.58-23.528 52.58-52.448l.248-398.5C389.908 23.452 366.364 0 337.324 0zM227.68 31.476h49.36c4.336 0 7.868 3.52 7.868 7.868 0 4.348-3.532 7.868-7.868 7.868h-49.36a7.865 7.865 0 01-7.868-7.868 7.865 7.865 0 017.868-7.868zm-29.66 2.504c2.916-2.912 8.224-2.952 11.136 0a7.973 7.973 0 012.324 5.588c0 2.048-.864 4.088-2.324 5.548-1.452 1.46-3.504 2.32-5.548 2.32-2.084 0-4.088-.86-5.588-2.32-1.452-1.456-2.28-3.5-2.28-5.548-.004-2.088.828-4.132 2.28-5.588zm52.752 454.028c-12.984 0-23.544-10.568-23.544-23.548 0-12.984 10.56-23.548 23.544-23.548s23.544 10.564 23.544 23.548c0 12.98-10.564 23.548-23.544 23.548zm114.716-63.1H141.232V74.756h224.256v350.152z"})}),ct=(0,l.jsx)("svg",{xmlns:"https://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 330 330",children:(0,l.jsx)("path",{d:"M100.606 229.393c-5.857-5.857-15.355-5.857-21.213 0-5.858 5.857-5.858 15.355 0 21.213l75 75A14.954 14.954 0 00165 330a14.95 14.95 0 0010.606-4.394l75-75c5.858-5.857 5.858-15.355 0-21.213-5.857-5.857-15.355-5.857-21.213 0L180 278.787V51.212l49.394 49.394A14.95 14.95 0 00240 105a14.95 14.95 0 0010.606-4.394c5.858-5.857 5.858-15.355 0-21.213l-75-75c-5.857-5.858-15.355-5.858-21.213 0l-75 75c-5.858 5.857-5.858 15.355 0 21.213 5.857 5.857 15.355 5.857 21.213 0L150 51.212v227.574l-49.394-49.393z"})}),dt=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 430.848 430.848",children:[(0,l.jsx)("path",{d:"M286.244,249.537l10.992-45.639c0.035-0.143,0.071-0.285,0.109-0.428c2.909-10.867,11.469-19.426,22.339-22.338 l33.347-8.936c-5.472-6.525-13.678-10.682-22.839-10.682h-9.837c-2.511-7.895-5.7-15.59-9.515-22.957l6.96-6.959 c11.622-11.623,11.622-30.535,0-42.156L296.76,68.4c-5.631-5.629-13.117-8.73-21.079-8.73c-7.961,0-15.447,3.102-21.078,8.732 l-6.96,6.959c-7.369-3.814-15.064-7.004-22.956-9.516V56.01c0-16.436-13.372-29.807-29.808-29.807h-29.758 c-16.436,0-29.808,13.371-29.808,29.807v9.836c-7.893,2.512-15.588,5.701-22.957,9.516l-6.96-6.961 c-5.631-5.629-13.117-8.73-21.078-8.73c-7.961,0-15.447,3.102-21.079,8.732L42.2,89.443c-11.622,11.621-11.622,30.533,0,42.156 l6.959,6.959c-3.815,7.367-7.004,15.063-9.515,22.957h-9.837C13.372,161.516,0,174.887,0,191.324v29.758 c0,16.436,13.372,29.807,29.808,29.807h9.837c2.511,7.895,5.7,15.588,9.515,22.957l-6.96,6.959 c-11.623,11.623-11.623,30.533,0,42.158l21.041,21.039c5.632,5.631,13.118,8.732,21.079,8.732s15.447-3.102,21.077-8.732 l6.96-6.959c7.366,3.815,15.061,7.002,22.957,9.514v9.838c0,16.436,13.372,29.809,29.808,29.809h25.809 c-2.388-5.691-3.644-11.852-3.645-18.209c-0.002-12.572,4.892-24.391,13.781-33.279L286.244,249.537z M180,286.201 c-44.112,0-80-35.887-80-79.998c0-44.113,35.888-80.002,80-80.002s80,35.889,80,80.002C260,250.314,224.112,286.201,180,286.201z"}),(0,l.jsx)("path",{d:"M425.267,218.734l-0.319-0.32c-0.939-0.941-2.189-1.428-3.541-1.469c-1.326,0-2.598,0.525-3.536,1.465l-21.596,21.596 c-3.304,3.305-7.699,5.125-12.375,5.125c-4.676,0-9.072-1.82-12.379-5.129c-3.307-3.305-5.128-7.701-5.128-12.377 c0.001-4.676,1.821-9.072,5.126-12.377l21.596-21.596c0.939-0.939,1.465-2.213,1.464-3.539c-0.001-1.328-0.53-2.6-1.47-3.537 l-0.314-0.313c-3.605-3.605-8.399-5.592-13.499-5.592c-1.665,0-3.325,0.219-4.936,0.65l-44.348,11.885 c-6.568,1.76-11.741,6.932-13.498,13.496c-0.011,0.041-0.021,0.08-0.031,0.121l-11.817,49.063l-87.667,87.666 c-6.528,6.527-10.122,15.207-10.121,24.44c0.002,9.232,3.598,17.91,10.126,24.439l2.088,2.088 c6.528,6.529,15.209,10.125,24.443,10.125h0c9.231,0,17.909-3.594,24.437-10.121l87.667-87.666l49.061-11.816 c0.041-0.01,0.082-0.022,0.122-0.031c6.563-1.758,11.735-6.928,13.497-13.496l11.883-44.352 C431.959,230.598,430.066,223.535,425.267,218.734z M257.26,368.406c-1.888,1.889-4.399,2.93-7.071,2.93 c-2.671,0-5.183-1.041-7.072-2.932c-1.887-1.885-2.928-4.397-2.928-7.068c-0.001-2.672,1.041-5.185,2.931-7.072 c1.886-1.887,4.398-2.928,7.069-2.928c2.672,0,5.184,1.041,7.072,2.93c1.887,1.885,2.928,4.396,2.928,7.068 C260.189,364.006,259.148,366.518,257.26,368.406z M316.194,305.935L274.82,347.31c-1.416,1.416-3.3,2.197-5.303,2.197 c-2.003,0-3.887-0.781-5.303-2.197c-1.417-1.416-2.197-3.299-2.197-5.303s0.78-3.887,2.197-5.303l41.374-41.375 c1.417-1.418,3.3-2.197,5.303-2.197s3.887,0.779,5.303,2.197c1.417,1.416,2.197,3.299,2.197,5.303S317.611,304.519,316.194,305.935 z"})]}),ut=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:30,height:30,viewBox:"0 0 448 512",children:(0,l.jsx)("path",{d:"M96 0C43 0 0 43 0 96V416c0 53 43 96 96 96H384h32c17.7 0 32-14.3 32-32s-14.3-32-32-32V384c17.7 0 32-14.3 32-32V32c0-17.7-14.3-32-32-32H384 96zm0 384H352v64H96c-17.7 0-32-14.3-32-32s14.3-32 32-32zm32-240c0-8.8 7.2-16 16-16H336c8.8 0 16 7.2 16 16s-7.2 16-16 16H144c-8.8 0-16-7.2-16-16zm16 48H336c8.8 0 16 7.2 16 16s-7.2 16-16 16H144c-8.8 0-16-7.2-16-16s7.2-16 16-16z"})}),pt=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:30,height:30,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{ |
| 234 |
d:"M256 48C141.1 48 48 141.1 48 256v40c0 13.3-10.7 24-24 24s-24-10.7-24-24V256C0 114.6 114.6 0 256 0S512 114.6 512 256V400.1c0 48.6-39.4 88-88.1 88L313.6 488c-8.3 14.3-23.8 24-41.6 24H240c-26.5 0-48-21.5-48-48s21.5-48 48-48h32c17.8 0 33.3 9.7 41.6 24l110.4 .1c22.1 0 40-17.9 40-40V256c0-114.9-93.1-208-208-208zM144 208h16c17.7 0 32 14.3 32 32V352c0 17.7-14.3 32-32 32H144c-35.3 0-64-28.7-64-64V272c0-35.3 28.7-64 64-64zm224 0c35.3 0 64 28.7 64 64v48c0 35.3-28.7 64-64 64H352c-17.7 0-32-14.3-32-32V240c0-17.7 14.3-32 32-32h16z"})}),ht=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:30,height:30,viewBox:"0 0 576 512",children:(0,l.jsx)("path",{d:"M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"})}),gt=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:30,height:30,viewBox:"0 0 448 512",children:(0,l.jsx)("path",{d:"M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"})}),mt=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,viewBox:"0 0 448 512",children:(0,l.jsx)("path",{d:"M384 336H192c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16l140.1 0L400 115.9V320c0 8.8-7.2 16-16 16zM192 384H384c35.3 0 64-28.7 64-64V115.9c0-12.7-5.1-24.9-14.1-33.9L366.1 14.1c-9-9-21.2-14.1-33.9-14.1H192c-35.3 0-64 28.7-64 64V320c0 35.3 28.7 64 64 64zM64 128c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H256c35.3 0 64-28.7 64-64V416H272v32c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V192c0-8.8 7.2-16 16-16H96V128H64z"})}),bt=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",children:(0,l.jsx)("path",{d:"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z"})}),ft=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 320 512",width:16,height:16,children:(0,l.jsx)("path",{d:"M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z"})}),xt=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 544 432",children:(0,l.jsx)("path",{d:"m297 71.2c9.2-7.3 15-18.6 15-31.2 0-22.1-17.9-40-40-40-22.1 0-40 17.9-40 40 0 12.6 5.9 23.9 15 31.2l-68.4 107.6c-10 15.7-31.3 19.6-46.2 8.4l-59.5-44.5c4.5-6.4 7.1-14.3 7.1-22.7 0-22.1-17.9-40-40-40-22.1 0-40 17.9-40 40 0 21.8 17.5 39.6 39.2 40l32.6 217.5c4.7 31.3 31.6 54.5 63.3 54.5h273.8c31.7 0 58.6-23.2 63.3-54.5l32.6-217.5c21.7-0.4 39.2-18.2 39.2-40 0-22.1-17.9-40-40-40-22.1 0-40 17.9-40 40 0 8.4 2.6 16.3 7.1 22.7l-59.4 44.6c-14.9 11.2-36.2 7.3-46.2-8.4z"})}),yt=e=>{const{className:t="",label:n=(0,x.__)("Shadow"),value:o,onChange:i,type:s="box",defaults:a=[]}=e,[r,c]=(0,m.useState)(0),d=[{hOffset:"0px",vOffset:"0px",blur:"0px",spreed:"0px",color:"#7090b0",isInset:!1}],u=(o?.length?o:null)||(a?.length?a:null)||d,p=e=>a?.[r]?.[e]||d[0][e],h=e=>(0,l.jsx)(y.Button,{icon:"image-rotate",className:"bPlResetVal",onClick:()=>g(e,p(e))}),g=(e,t)=>{const n=pe(u,(n=>{null==n&&(n=[]),n[r][e]=t}));i(n)},b=e=>{e.preventDefault(),i([...u.slice(0,r),{...u[r]},...u.slice(r)]),c(r+1)},f=e=>{e.preventDefault(),i([...u.slice(0,r),...u.slice(r+1)]),c(0===r?0:r-1)},{hOffset:k="",vOffset:w="",blur:_="",spreed:C="",color:j="",isInset:$=!1}=u[r]||{};return(0,l.jsxs)(y.PanelRow,{className:`bPlDropdown ${t}`,children:[(0,l.jsx)(v,{className:"mt5",children:n}),(0,l.jsx)(y.Dropdown,{className:"bPlDropdownContainer",contentClassName:"bPlDropdownPopover",popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,l.jsx)(y.Button,{icon:"edit",onClick:()=>{t(),c(0)},"aria-expanded":e}),renderContent:()=>(0,l.jsxs)(l.Fragment,{children:[1<u.length&&(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Shadow:")}),(0,l.jsx)(Ve,{label:"",value:r,onChange:e=>c(e),options:u&&u?.map(((e,t)=>({label:t+1+"",value:t})))||[{label:1,value:0}],borderRadius:"5px"})]}),null!==r&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Horizontal Offset:"),labelPosition:"left",value:k,onChange:e=>g("hOffset",e),units:[Ee(),Ae(),Be()]}),k&&k!==p("hOffset")&&h("hOffset")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Vertical Offset:"),labelPosition:"left",value:w,onChange:e=>g("vOffset",e),units:[Ee(),Ae(),Be()]}),w&&w!==p("vOffset")&&h("vOffset")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Blur:"),labelPosition:"left",value:_,onChange:e=>g("blur",e),units:[Ee(),Ae(),Be()]}),_&&_!==p("blur")&&h("blur")]}),(0,l.jsx)("small",{children:(0,x.__)("Blur cannot be negative value!")}),"box"===s&&(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Spreed:"),labelPosition:"left",value:C,onChange:e=>g("spreed",e),units:[Ee(),Ae(),Be()]}),C&&C!==p("spreed")&&h("spreed")]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:"),value:j,onChange:e=>g("color",e),defaultColor:p("color")}),"box"===s&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Shadow Inset?"),checked:$,onChange:e=>g("isInset",e),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.PanelRow,{className:"itemAction mt20",children:[1<u?.length&&(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove"),onClick:f,children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate"),onClick:b,children:[dt,(0,x.__)("Duplicate")]})]})]}),(0,l.jsx)("br",{}),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Shadow"),onClick:()=>i([...u,d[0]]),children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Shadow")]})})]})})]})},vt=({borderShadow:e,onChange:t,enabled:n})=>{const o=n?.filter((e=>!["border","shadow"].includes(e)))?.map((e=>({title:e,name:e}))),i=e=>n.includes(e);return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:"Border & Shadow",initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:o,children:n=>(0,l.jsxs)(l.Fragment,{children:["normal"===n.name&&(0,l.jsxs)(l.Fragment,{children:[i("border")&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Borders"),value:e?.[n.name]?.border,onChange:o=>t(be(e,o,n.name,"border"))}),(0,l.jsx)(y.PanelRow,{className:"mt20 mb5",children:(0,l.jsx)(v,{className:"",children:(0,x.__)("Border Radius")})}),(0,l.jsx)(k,{values:e?.[n.name]?.radius,onChange:o=>t(be(e,o,n.name,"radius"))})]}),i("shadow")&&(0,l.jsx)(yt,{label:(0,x.__)("Shadow"),value:e?.[n.name]?.shadow,onChange:o=>t(be(e,o,n.name,"shadow"))})]}),"hover"===n.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{className:"mt10 mb10",label:"Hover Transition",value:e?.transition||.4,onChange:n=>t(be(e,n,"transition")),min:0,max:10,step:.05}),i("border")&&(0,l.jsxs)(l.Fragment,{children:[(0, |
| 235 |
l.jsx)(y.__experimentalBorderBoxControl,{className:"mt20",label:(0,x.__)("Borders"),value:e?.[n.name]?.border,onChange:o=>t(be(e,o,n.name,"border"))}),(0,l.jsx)(y.PanelRow,{className:"mt20 mb5",children:(0,l.jsx)(v,{className:"",children:(0,x.__)("Border Radius")})}),(0,l.jsx)(k,{values:e?.[n.name]?.radius,onChange:o=>t(be(e,o,n.name,"radius"))})]}),i("shadow")&&(0,l.jsx)(yt,{label:(0,x.__)("Shadow"),value:e?.[n.name]?.shadow,onChange:o=>t(be(e,o,n.name,"shadow"))})]})]})})})};var kt=a(8579);a(44),a(997),a(3222),a(2972),a(4144),a(9326),a(6704);const wt=e=>{const{value:t,onChange:n,height:o="300px",width:i="100%",wrap:s=!1}=e,a=Math.floor(99999999*Math.random()),r=(0,m.useRef)(null),c=(0,m.useCallback)((e=>{clearTimeout(r.current),r.current=setTimeout((()=>n(e)),600)}),[n]);return(0,l.jsx)("div",{className:"bPlCustomCodeEditor",children:(0,l.jsx)(kt.Ay,{mode:"css",theme:"monokai",name:`advEditor-${a}`,onChange:c,fontSize:14,lineHeight:19,height:o,width:i,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,wrapEnabled:s,value:t,setOptions:{useWorker:!1,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,tabSize:2}})})},_t=({css:e="",onChange:t})=>(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:"Custom CSS",initialOpen:!1,children:(0,l.jsx)(wt,{value:e,onChange:n=>t(be(e,n))})}),Ct=({responsive:e,onChange:t})=>{const{desktop:n=!1,tablet:o=!1,mobile:i=!1}=e||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:"Responsive Control",initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:"Hide on Desktop",checked:n,onChange:n=>t(be(e,n,"desktop")),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt15",label:"Hide on Tablet",checked:o,onChange:n=>t(be(e,n,"tablet")),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt15",label:"Hide on Mobile",checked:i,onChange:n=>t(be(e,n,"mobile")),__nextHasNoMarginBottom:!0})]})},jt=e=>!(null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&""===e.trim()||"number"==typeof e&&0===e),$t=e=>{try{const t=new URL(e);return["http:","https:"].includes(t.protocol)?t.toString():null}catch(t){return"string"==typeof e&&e.startsWith("/")&&!e.startsWith("//")?e:null}},St=e=>{const t=(new DOMParser).parseFromString(e,"text/html"),n=["b","strong","i","em","span","a","br"],o=["style","href","target","rel","class"];return t.body.querySelectorAll("*").forEach((e=>{n.includes(e.tagName.toLowerCase())?[...e.attributes].forEach((t=>{if(o.includes(t.name)||e.removeAttribute(t.name),"href"===t.name){const n=$t(t.value);n?e.setAttribute("href",n):e.removeAttribute("href")}})):e.remove()})),t.body.innerHTML};class Tt{constructor(e={}){this.defaultOptions={allowedTags:["svg","g","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","defs","clipPath","mask","linearGradient","radialGradient","stop","style","title","desc"],allowedAttributes:["id","class","style","transform","xmlns","xmlns:xlink","version","baseProfile","xml:space","d","x","y","width","height","cx","cy","r","rx","ry","points","x1","y1","x2","y2","viewBox","preserveAspectRatio","overflow","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","opacity","color","paint-order","vector-effect","shape-rendering","display","visibility","clip-path","clip-rule","clipPathUnits","mask","maskUnits","maskContentUnits","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","fx","fy","fr","dx","dy","text-anchor","dominant-baseline","alignment-baseline","font-family","font-size","font-style","font-weight","letter-spacing","word-spacing","textLength","lengthAdjust","role","focusable","aria-hidden","aria-label","aria-labelledby","aria-describedby"],allowedProtocols:["http","https","data"],removeScripts:!0,removeEvents:!0,removeExternalResources:!0,sanitizeStyle:!0},this.options={...this.defaultOptions,...e},this.allowedTagSet=new Set(this.options.allowedTags.map((e=>e.toLowerCase()))),this.allowedAttributeSet=new Set(this.options.allowedAttributes.map((e=>e.toLowerCase())))}sanitize(e){if("string"!=typeof e||""===e.trim())return"";const t=(new DOMParser).parseFromString(e,"image/svg+xml"),n=t.documentElement;return!n||"svg"!==n.localName.toLowerCase()||t.getElementsByTagName("parsererror").length?"":(this.removeScripts(t),this.sanitizeElements(t),(new XMLSerializer).serializeToString(t.documentElement))}async sanitizeFile(e){const t=await fetch(e),n=await t.text();return this.sanitize(`${n}`)}removeScripts(e){this.options.removeScripts&&Array.from(e.querySelectorAll("*")).forEach((e=>{e.localName.toLowerCase().includes("script")&&e.remove()}))}sanitizeElements(e){Array.from(e.querySelectorAll("*")).forEach((e=>{const t=e.localName.toLowerCase();this.allowedTagSet.has(t)?("style"===t&&this.options.sanitizeStyle&&(e.textContent=this.sanitizeCss(e.textContent)),this.sanitizeAttributes(e)):e.remove()}))}sanitizeAttributes(e){Array.from(e.attributes).forEach((t=>{const n=t.name,o=n.toLowerCase(),i=t.value;if(this.options.removeEvents&&o.startsWith("on"))return void e.removeAttribute(n);if(this.options.removeExternalResources&&("href"===o||o.endsWith(":href"))&&!this.isAllowedUrl(i))return void e.removeAttribute(n);const s=o.replace("xlink:","");this.allowedAttributeSet.has(o)||this.allowedAttributeSet.has(s)?this.options.removeExternalResources&&this.hasExternalUrl(i)?e.removeAttribute(n):"style"===o&&this.options.sanitizeStyle&&e.setAttribute(n,this.sanitizeCss(i)):e.removeAttribute(n)}))}hasExternalUrl(e){return!("string"!=typeof e||!/url\s*\(/i.test(e))&&Array.from(e.matchAll(/url\s*\(\s*['"]?([^'")]*)/gi)).some((([,e])=>!e.trim().startsWith("#")))}isAllowedUrl(e){const t=String(e||"").trim();if(t.startsWith("#"))return!0;if(/^data:/i.test(t))return this.options.allowedProtocols.includes("data")&&/^data:image\/(png|jpe?g|gif|webp);base64,/i.test(t);try{return this.options.allowedProtocols.includes(new URL(t).protocol.replace(":",""))}catch{return!1}}sanitizeCss(e){return String(e||"").replace(/expression\s*\(/gi,"").replace(/javascript:/gi,"").replace(/behavior\s*:/gi,"").replace(/binding\s*:/gi,"").replace(/@import[^;]*;?/gi,"").replace(/url\s*\(\s*(['"]?)(?!#)[^)]*\)/gi,"none")}}const Mt=new Tt,Nt=({icon:e,btnText:t,children:n,value:o,label:i,resetValues:s={},onClick:a=()=>{}})=>{const[r,c]=(0,m.useState)(!1),d=(0,m.useRef)(null),u=(0,m.useRef)(null),p=jt(o)&&jt(s)&&JSON.stringify(o)!==JSON.stringify(s);return(0,m.useEffect)((()=>{const e=e=>{u?.current?.contains(e.target)||d?.current?.contains(e.target)||c(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}})),(0,l.jsxs)("div",{className:"bPlCustomPopoverWrapper",children:[i&&(0,l.jsx)(v,{className:"",children:i}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(y.Flex,{children:[p?(0,l.jsx)(y.Tooltip,{text:"Back to default",delay:100,position:"top center",placement:"top",children:(0,l.jsx)(y.Button,{icon:"image-rotate",onClick:()=>a(s)})}):"",(0,l.jsx)(y.Button,{icon:e,ref:u,isSecondary:!0,onClick:()=>c(!r),children:t})]}),r&&(0,l.jsx)(y.Popover,{ref:d,onMouseOver:()=>c(!0),children:(0,l.jsx)("div",{className:"bPlCustomPopoverChildren",children:n})})]})]})},Lt={x:"",y:""},Et={desktop:{...Lt,z:""},tablet:{...Lt,z:""},mobile:{...Lt,z:""},threeDRotate:!1},Pt={desktop:Lt,tablet:Lt,mobile:Lt},At={isProportion:!0,desktop:{...Lt,scale:""},tablet:{...Lt,scale:""},mobile:{...Lt,scale:""}},Bt={desktop:Lt,tablet:Lt,mobile:Lt},It=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({value:e={},onChange:t=()=>{},device:n})=>{const{rotate:o={},offset:i={},scale:s={},skew:a={},flipX:r=!1,flipY:c=!1}=e||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(Nt,{value:o,onClick:n=>t({...e,rotate:n}),icon:"edit",label:"Rotate",resetValues:Et, |
| 236 |
children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0",children:"Rotate (deg)"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{className:"bPlPanelBody",value:o?.[n]?.z,min:-360,max:360,onChange:o=>t({...e,rotate:{...e.rotate,[n]:{...e.rotate[n],z:o}}})}),(0,l.jsx)(y.ToggleControl,{className:"bPlPanelBody",label:"3D Rotate",defaultChecked:!1,defaultValue:!1,checked:o?.threeDRotate,value:o?.threeDRotate,onChange:n=>t({...e,rotate:{...e.rotate,threeDRotate:n}}),__nextHasNoMarginBottom:!0}),o?.threeDRotate&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0",children:"Rotate X (deg)"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{className:"bPlPanelBody",value:o?.[n]?.x,min:-360,max:360,onChange:o=>t({...e,rotate:{...e.rotate,[n]:{...e.rotate[n],x:o}}})}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0",children:"Rotate Y (deg)"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{className:"bPlPanelBody",value:o?.[n]?.y,min:-360,max:360,onChange:o=>t({...e,rotate:{...e.rotate,[n]:{...e.rotate[n],y:o}}})})]})]}),(0,l.jsxs)(Nt,{value:i,resetValues:Pt,onClick:n=>t({...e,offset:n}),className:"bPlPanelBody",icon:"edit",label:"Offset",children:[(0,l.jsxs)(y.PanelRow,{children:[" ",(0,l.jsx)(v,{className:"mt0",children:"Offset X"})," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:i?.[n]?.x,min:-1e3,max:1e3,onChange:o=>t({...e,offset:{...e.offset,[n]:{...e.offset[n],x:o}}})}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0",children:"Offset Y"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"bPlPanelBody",value:i?.[n]?.y,min:-1e3,max:1e3,onChange:o=>t({...e,offset:{...e.offset,[n]:{...e.offset[n],y:o}}})})]}),(0,l.jsxs)(Nt,{value:s,resetValues:At,onClick:n=>t({...e,scale:n}),icon:"edit",label:"Scale",children:[(0,l.jsx)(y.ToggleControl,{className:"bPlPanelBody",label:"Keep Proportions",defaultChecked:!1,defaultValue:!1,checked:s?.isProportion,value:s?.isProportion,onChange:n=>t({...e,scale:{...e.scale,isProportion:n}}),__nextHasNoMarginBottom:!0}),s?.isProportion?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0",children:"Scale"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{className:"bPlPanelBody",value:s?.[n]?.scale,step:.1,min:0,max:5,onChange:o=>t({...e,scale:{...e.scale,[n]:{...e.scale[n],scale:o}}})})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0",children:"Scale X"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{className:"bPlPanelBody",value:s?.[n]?.x,step:.1,min:0,max:5,onChange:o=>t({...e,scale:{...e.scale,[n]:{...e.scale[n],x:o}}})}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0",children:"Scale Y"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{className:"bPlPanelBody",value:s?.[n]?.y,step:.1,min:0,max:5,onChange:o=>t({...e,scale:{...e.scale,[n]:{...e.scale[n],y:o}}})})]})]}),(0,l.jsxs)(Nt,{value:a,resetValues:Bt,onClick:n=>t({...e,skew:n}),icon:"edit",label:"Skew",children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0",children:"Skew X (deg)"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{className:"bPlPanelBody",defaultValue:0,min:-360,max:360,value:a?.[n]?.x,onChange:o=>t({...e,skew:{...e.skew,[n]:{...e.skew[n],x:o}}})}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0",children:"Skew Y (deg)"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{className:"bPlPanelBody",defaultValue:0,min:-360,max:360,value:a?.[n]?.y,onChange:o=>t({...e,skew:{...e.skew,[n]:{...e.skew[n],y:o}}})})]}),(0,l.jsx)(y.ToggleControl,{className:"bPlPanelBody",label:"Flip Horizontal",checked:r,value:r,onChange:n=>t({...e,flipX:n}),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"bPlPanelBody",label:"Flip Vertical",checked:c,value:c,onChange:n=>t({...e,flipY:n}),__nextHasNoMarginBottom:!0})]})})),Ot=({transform:e={},onChange:t=()=>{},device:n})=>{const{normal:o,hover:i,transition:s}=e||{};return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:"Transform",initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:Ne,children:a=>(0,l.jsxs)(l.Fragment,{children:["normal"===a.name&&(0,l.jsx)(It,{value:o,device:n,onChange:n=>t({...e,normal:n})}),"hover"===a.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(It,{value:i,device:n,onChange:n=>t({...e,hover:n})}),(0,l.jsx)(y.RangeControl,{className:"bPlPanelBody",label:"Transition Duration (ms)",value:s,max:1e4,onChange:n=>t({...e,transition:n})})]})]})})})},Rt=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({visibility:e,onChange:t,enabled:n,device:o})=>{const{zIndex:i={},overflow:s=""}=e||{},a=e=>n.includes(e);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:"Visibility",initialOpen:!1,children:[a("zIndex")&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mb5",children:[(0,l.jsx)(v,{className:"",children:"Z Index"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalNumberControl,{value:i[o],onChange:n=>t(be(e,n,"zIndex",o))})]}),a("overflow")&&(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Overflow"),labelPosition:"left",value:s,onChange:n=>t(be(e,n,"overflow")),options:De})]})})),zt={direction:"",speed:"",bottom:"",top:""},Dt={direction:"",speed:""},Ft=({multiple:e=!0,defaultValue:t,value:n,onChange:o=()=>{},options:i=[]})=>{const[s,a]=(0,m.useState)(""),[r,c]=(0,m.useState)(!1),d=(0,m.useRef)(),u=n||t,p=i&&i.find((e=>e.value===u)),h=Array.isArray(u)?u:u?[u]:[],g=i&&i.filter((e=>h.includes(e.value)));(0,m.useEffect)((()=>{const e=e=>{d?.current?.contains(e.target)||c(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[r]);const b=i.filter((e=>e.label.toLowerCase().includes(s.toLowerCase()))),f=Math.floor(999999*Math.random());return(0,l.jsx)("div",{className:"bPl-token-field-main-wrapper",children:(0,l.jsxs)("div",{className:"bPl-single-token-field-wrapper",...e?{style:{width:"100%"}}:{},ref:d,children:[!e&&(0,l.jsxs)("div",{onClick:()=>c(!r),className:"bPl-single-token-field "+(r?"activeField":""),children:[p?(0,l.jsx)("span",{className:"bPl-token-field-value",children:p.label}):(0,l.jsx)("span",{className:"bPl-token-field-value",children:"Select an option"}),(0,l.jsx)("span",{onClick:()=>o(""),className:"bPl-xMark-icon",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",height:"14px",children:(0,l.jsx)("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"})})}),(0,l.jsx)("span",{onClick:()=>c(!r),style:{transform:r?"rotate(180deg)":"rotate(0deg)"},className:"bPl-arrow-icon",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",height:"14px",children:(0,l.jsx)("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"})})})]}),e&&(0,l.jsx)("div",{className:"bPl-token-multiple-filed-wrapper",children:(0,l.jsx)("label",{htmlFor:`searchText${f}`,children:(0,l.jsxs)("div",{onClick:()=>c(!0),className:"bPl-token-multiple-filed-wrapper-item "+(r?"focusItem":""),style:{cursor:"text"},children:[!r&&!h.length&&(0,l.jsx)("div",{className:"bPl-empty-token-field",children:(0,l.jsx)("span",{children:"Select an option"})}),g?.map(((e,t)=>(0,l.jsxs)("div",{className:"bPl-multiple-token-field",children:[(0,l.jsx)("span",{className:"bPl-multiple-token-field-value",children:e.label}),(0,l.jsx)("span",{onClick:()=>o(h.filter((t=>t!==e.value))),className:"bPl-xMark-icon",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",height:"14px",children:(0, |
| 237 |
l.jsx)("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"})})})]},t))),(0,l.jsx)("input",{type:"text",name:"",id:`searchText${f}`,className:"bPl-multiple-search",onChange:e=>a(e.target.value)})]})})}),i.length>0&&r&&(0,l.jsx)("div",{className:"bPl-token-field-dropdown-wrapper",children:(0,l.jsx)("ul",{className:"bPlTools-token-field-dropdown-list",children:b.map(((t,n)=>(0,l.jsx)("li",{className:e?g.find((e=>e.value===t.value))?"bPlTools-multipleActiveItem":"":t.value===u?"activeItemInList":"",onClick:()=>{if(e){const e=h.includes(t.value);!e&&o([...h,t.value]),c(e)}else o(t.value),c(!1)},children:t.label},n)))})})]})})},Ht=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({motion:e,onChange:t=()=>{},device:n})=>{const{isEnable:o=!1,vertical:i={},horizontal:s={},transparency:a={},blur:r={},rotate:c={},scale:d={},effectsRelativeTo:u="viewport",effectOn:p=["desktop","tablet-portrait","mobile-portrait"],isMouseEffect:h=!1,mouseTrack:g={},tilt:m={},sticky:b={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:"Motion Effects",initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:"Scrolling Effects",checked:o,value:o,onChange:n=>t({...e,isEnable:n})}),o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(Nt,{value:i||{},resetValues:zt,onClick:n=>t({...e,vertical:n}),icon:"edit",label:"Vertical Scroll",children:[(0,l.jsx)(y.SelectControl,{value:i?.direction,label:"Direction",labelPosition:"edge",options:[{label:"None",value:""},{label:"Up",value:"up"},{label:"Down",value:"down"}],onChange:n=>t({...e,vertical:{...e?.vertical,direction:n}})}),(0,l.jsx)(y.RangeControl,{label:"Speed",step:.1,min:0,max:10,value:i?.speed,onChange:n=>t({...e,vertical:{...e?.vertical,speed:n}})}),(0,l.jsx)(v,{className:"mt10 mb10",children:"ViewPort"}),(0,l.jsx)(y.RangeControl,{label:"Bottom (%)",value:i?.bottom,onChange:n=>t({...e,vertical:{...e?.vertical,bottom:n}})}),(0,l.jsx)(y.RangeControl,{label:"Top (%)",value:i?.top,onChange:n=>t({...e,vertical:{...i,top:n}})})]}),(0,l.jsxs)(Nt,{value:s||{},resetValues:zt,onClick:n=>t({...e,horizontal:n}),icon:"edit",label:"Horizontal Scroll",children:[(0,l.jsx)(y.SelectControl,{value:s?.direction,label:"Direction",labelPosition:"edge",options:[{label:"None",value:""},{label:"To Left",value:"to-left"},{label:"To Right",value:"to-right"}],onChange:n=>t({...e,horizontal:{...e?.horizontal,direction:n}})}),(0,l.jsx)(y.RangeControl,{label:"Speed",step:.1,min:0,max:10,value:s?.speed,onChange:n=>t({...e,horizontal:{...e?.horizontal,speed:n}})}),(0,l.jsx)(v,{className:"mt10 mb10",children:"ViewPort"}),(0,l.jsx)(y.RangeControl,{label:"Bottom (%)",value:s?.bottom,onChange:n=>t({...e,horizontal:{...e?.horizontal,bottom:n}})}),(0,l.jsx)(y.RangeControl,{label:"Top (%)",value:s?.top,onChange:n=>t({...e,horizontal:{...s,top:n}})})]}),(0,l.jsxs)(Nt,{value:a||{},resetValues:zt,onClick:n=>t({...e,transparency:n}),icon:"edit",label:"Transparency",children:[(0,l.jsx)(y.SelectControl,{value:a?.direction,label:"Direction",labelPosition:"edge",options:[{label:"None",value:""},{label:"Fade In",value:"fade-in"},{label:"Fade Out",value:"fade-out"},{label:"Fade Out In",value:"fade-out-in"},{label:"Fade In Out",value:"fade-in-out"}],onChange:n=>t({...e,transparency:{...a,direction:n}})}),(0,l.jsx)(y.RangeControl,{label:"Level",step:.1,min:0,max:10,value:a?.level,onChange:n=>t({...e,transparency:{...a,level:n}})}),(0,l.jsx)(v,{className:"mt10 mb10",children:"ViewPort"}),(0,l.jsx)(y.RangeControl,{label:"Bottom (%)",value:a?.bottom,onChange:n=>t({...e,transparency:{...a,bottom:n}})}),(0,l.jsx)(y.RangeControl,{label:"Top (%)",value:a?.top,onChange:n=>t({...e,transparency:{...a,top:n}})})]}),(0,l.jsxs)(Nt,{value:r||{},resetValues:zt,onClick:n=>t({...e,blur:n}),icon:"edit",label:"Blur",children:[(0,l.jsx)(y.SelectControl,{value:r?.direction,label:"Direction",labelPosition:"edge",options:[{label:"None",value:""},{label:"Fade In",value:"fade-in"},{label:"Fade Out",value:"fade-out"},{label:"Fade Out In",value:"fade-out-in"},{label:"Fade In Out",value:"fade-in-out"}],onChange:n=>t({...e,blur:{...r,direction:n}})}),(0,l.jsx)(y.RangeControl,{label:"Level",step:.1,min:0,max:10,value:r?.level,onChange:n=>t({...e,blur:{...r,level:n}})}),(0,l.jsx)(v,{className:"mb10 mt10",children:"ViewPort"}),(0,l.jsx)(y.RangeControl,{label:"Bottom (%)",value:r?.bottom,onChange:n=>t({...e,blur:{...r,bottom:n}})}),(0,l.jsx)(y.RangeControl,{label:"Top (%)",value:r?.top,onChange:n=>t({...e,blur:{...r,top:n}})})]}),(0,l.jsxs)(Nt,{value:c||{},resetValues:zt,onClick:n=>t({...e,rotate:n}),icon:"edit",label:"Rotate",children:[(0,l.jsx)(y.SelectControl,{value:c?.direction,label:"Direction",labelPosition:"edge",options:[{label:"None",value:""},{label:"To Left",value:"to-left"},{label:"To Right",value:"to-right"}],onChange:n=>t({...e,rotate:{...c,direction:n}})}),(0,l.jsx)(y.RangeControl,{label:"Level",step:.1,min:0,max:10,value:c?.level,onChange:n=>t({...e,rotate:{...c,level:n}})}),(0,l.jsx)(v,{className:"mt10 mb10",children:"ViewPort"}),(0,l.jsx)(y.RangeControl,{label:"Bottom (%)",value:c?.bottom,onChange:n=>t({...e,rotate:{...c,bottom:n}})}),(0,l.jsx)(y.RangeControl,{label:"Top (%)",value:c?.top,onChange:n=>t({...e,rotate:{...c,top:n}})})]}),(0,l.jsxs)(Nt,{value:d||{},resetValues:zt,onClick:n=>t({...e,scale:n}),icon:"edit",label:"Scale",children:[(0,l.jsx)(y.SelectControl,{value:d?.direction,label:"Direction",labelPosition:"edge",options:[{label:"None",value:""},{label:"Scale Up",value:"scale-up"},{label:"Scale Down",value:"scale-down"},{label:"Scale Down Up",value:"scale-down-up"},{label:"Scale Up Down",value:"scale-up-down"}],onChange:n=>t({...e,scale:{...d,direction:n}})}),(0,l.jsx)(y.RangeControl,{label:"Speed",step:.1,min:0,max:10,value:d?.level,onChange:n=>t({...e,scale:{...d,level:n}})}),(0,l.jsx)(v,{className:"mb10 mt10",children:"ViewPort"}),(0,l.jsx)(y.RangeControl,{label:"Bottom (%)",value:d?.bottom,onChange:n=>t({...e,scale:{...d,bottom:n}})}),(0,l.jsx)(y.RangeControl,{label:"Top (%)",value:d?.top,onChange:n=>t({...e,scale:{...d,top:n}})})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:"Effects Relative To",labelPosition:"edge",value:u,options:[{label:"Entire Page",value:"entire-page"},{label:"Viewport",value:"viewport"}],onChange:n=>t({...e,effectsRelativeTo:n})}),(0,l.jsx)(v,{className:"mt5",children:"Apply Effect On"}),(0,l.jsx)(Ft,{options:[{label:"Desktop",value:"desktop"},{label:"Tablet Portrait",value:"tablet-portrait"},{label:"Mobile Portrait",value:"mobile-portrait"}],value:p,defaultValue:["desktop","tablet-portrait","mobile-portrait"],onChange:n=>t({...e,effectOn:n})})]}),(0,l.jsx)("hr",{className:"mt10 mb10"}),(0,l.jsx)(y.ToggleControl,{label:"Mouse Effects",value:h,checked:h,onChange:n=>t({...e,isMouseEffect:n})}),h&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(Nt,{label:"Mouse Track",resetValues:Dt,icon:"edit",value:g,onClick:n=>t({...e,mouseTrack:n}),children:[(0,l.jsx)(y.SelectControl,{value:g?.direction,label:"Direction",labelPosition:"edge",options:[{label:"None",value:""},{label:"Direct",value:"direct"},{label:"Opposite",value:"opposite"}],onChange:n=>t({...e,mouseTrack:{...g,direction:n}})}),(0,l.jsx)(y.RangeControl,{label:"Speed",step:.1,min:0,max:10,value:g?.speed,onChange:n=>t({...e,mouseTrack:{...g,speed:n}})})]}),(0,l.jsxs)(Nt,{label:"3D Tilt",resetValues:Dt,value:m,icon:"edit",onClick:n=>t({...e,tilt:n}),children:[(0,l.jsx)(y.SelectControl,{value:m?.direction,label:"Direction",labelPosition:"edge",options:[{label:"None",value:""},{label:"Direct",value:"direct"},{label:"Opposite",value:"opposite"}],onChange:n=>t({...e,tilt:{...m,direction:n}})}),(0,l.jsx)(y.RangeControl,{label:"Speed",step:.1,min:0,max:10,value:m?.speed,onChange:n=>t({...e,tilt:{...m,speed:n}})})]})] |
| 238 |
}),(0,l.jsx)("hr",{className:"mt10 mb10"}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,l.jsxs)(y.Flex,{children:["Sticky ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.SelectControl,{options:[{label:"None",value:""},{label:"Top",value:"top"},{label:"Bottom",value:"bottom"}],value:b?.[n],onChange:o=>t({...e,sticky:{...b,[n]:o}})})]})]})})),Wt={x:{from:"",to:""},y:{from:"",to:""},duration:100,delay:""},Ut={x:{from:"",to:""},y:{from:"",to:""},z:{from:"",to:""},duration:100,delay:""},Gt={z:{from:"",to:""},y:{from:"",to:""},duration:100,delay:""},Vt=({floating:e,onChange:t=()=>{}})=>{const{translate:n={},rotate:o={},scale:i={},isEnabled:s=!1}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:"Floating Effects",initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:"Enable",value:s,checked:s,onChange:n=>t({...e,isEnabled:n})}),(0,l.jsxs)(Nt,{value:n||{},resetValues:Wt,onClick:n=>t({...e,translate:n}),icon:"edit",label:"Translate",children:[(0,l.jsx)(v,{className:"mt0",children:"Translate X"}),(0,l.jsx)(y.RangeControl,{label:"From (px)",defaultValue:0,min:-100,max:100,value:n?.x?.from,onChange:o=>t({...e,translate:{...n,x:{...n?.x,from:o}}})}),(0,l.jsx)(y.RangeControl,{label:"To (px)",defaultValue:0,min:-100,max:100,value:n?.x?.to,onChange:o=>t({...e,translate:{...n,x:{...n?.x,to:o}}})}),(0,l.jsx)(v,{className:"mt10",children:"Translate Y"}),(0,l.jsx)(y.RangeControl,{label:"From (px)",defaultValue:0,min:-100,max:100,value:n?.y?.from,onChange:o=>t({...e,translate:{...n,y:{...n?.y,from:o}}})}),(0,l.jsx)(y.RangeControl,{label:"To (px)",defaultValue:0,min:-100,max:100,value:n?.y?.to,onChange:o=>t({...e,translate:{...n,y:{...n?.y,to:o}}})}),(0,l.jsx)(y.RangeControl,{label:"Duration (ms)",defaultValue:0,min:0,max:1e4,value:n?.duration,step:.01,onChange:o=>t({...e,translate:{...n,duration:o}})}),(0,l.jsx)(y.RangeControl,{label:"Delay (ms)",defaultValue:0,min:0,max:1e4,step:.01,value:n?.delay,onChange:o=>t({...e,translate:{...n,delay:o}})})]}),(0,l.jsxs)(Nt,{value:o||{},resetValues:Ut,onClick:n=>t({...e,rotate:n}),icon:"edit",label:"Rotate",children:[(0,l.jsx)(v,{className:"mt0",children:"Rotate X"}),(0,l.jsx)(y.RangeControl,{label:"From (px)",defaultValue:0,min:-100,max:100,value:o?.x?.from,onChange:n=>t({...e,rotate:{...o,x:{...o?.x,from:n}}})}),(0,l.jsx)(y.RangeControl,{label:"To (px)",defaultValue:0,min:-100,max:100,value:o?.x?.to,onChange:n=>t({...e,rotate:{...o,x:{...o?.x,to:n}}})}),(0,l.jsx)(v,{className:"mt10",children:"Rotate Y"}),(0,l.jsx)(y.RangeControl,{label:"From (px)",defaultValue:0,min:-100,max:100,value:o?.y?.from,onChange:n=>t({...e,rotate:{...o,y:{...o?.y,from:n}}})}),(0,l.jsx)(y.RangeControl,{label:"To (px)",defaultValue:0,min:-100,max:100,value:o?.y?.to,onChange:n=>t({...e,rotate:{...o,y:{...o?.y,to:n}}})}),(0,l.jsx)(v,{className:"mt10",children:"Rotate Z"}),(0,l.jsx)(y.RangeControl,{label:"From (px)",defaultValue:0,min:-100,max:100,value:o?.z?.from,onChange:n=>t({...e,rotate:{...o,z:{...o?.z,from:n}}})}),(0,l.jsx)(y.RangeControl,{label:"To (px)",defaultValue:0,min:-100,max:100,value:o?.z?.to,onChange:n=>t({...e,rotate:{...o,z:{...o?.z,to:n}}})}),(0,l.jsx)(y.RangeControl,{label:"Duration (ms)",defaultValue:0,min:0,max:1e4,value:o?.duration,step:.01,onChange:n=>t({...e,rotate:{...o,duration:n}})}),(0,l.jsx)(y.RangeControl,{label:"Delay (ms)",defaultValue:0,min:0,max:1e4,step:.01,value:o?.delay,onChange:n=>t({...e,rotate:{...o,delay:n}})})]}),(0,l.jsxs)(Nt,{value:i||{},resetValues:Gt,onClick:n=>t({...e,scale:n}),icon:"edit",label:" Scale",children:[(0,l.jsx)(v,{className:"mt0",children:"Scale Z"}),(0,l.jsx)(y.RangeControl,{label:"From",defaultValue:0,min:0,max:5,value:i?.z?.from,step:.1,onChange:n=>t({...e,scale:{...i,z:{...i?.z,from:n}}})}),(0,l.jsx)(y.RangeControl,{label:"To (px)",defaultValue:0,min:0,max:5,step:.1,value:i?.z?.to,onChange:n=>t({...e,scale:{...i,z:{...i?.z,to:n}}})}),(0,l.jsx)(v,{className:"mt10",children:"Scale Y"}),(0,l.jsx)(y.RangeControl,{label:"From (px)",defaultValue:0,min:0,max:5,step:.1,value:i?.y?.from,onChange:n=>t({...e,scale:{...i,y:{...i?.y,from:n}}})}),(0,l.jsx)(y.RangeControl,{label:"To (px)",defaultValue:0,min:0,max:5,step:.1,value:i?.y?.to,onChange:n=>t({...e,scale:{...i,y:{...i?.y,to:n}}})}),(0,l.jsx)(y.RangeControl,{label:"Duration (ms)",defaultValue:0,min:0,max:1e4,value:i?.duration,step:.01,onChange:n=>t({...e,scale:{...i,duration:n}})}),(0,l.jsx)(y.RangeControl,{label:"Delay (ms)",defaultValue:0,min:0,max:1e4,step:.01,value:i?.delay,onChange:n=>t({...e,scale:{...i,delay:n}})})]})]})},qt=[{label:"Default",value:""},{label:"Absolute",value:"absolute"},{label:"Fixed",value:"fixed"},{label:"Relative",value:"relative"}],Yt=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({position:e={},onChange:t=()=>{},device:n})=>{const[o,i]=(0,m.useState)({horizontal:"left",vertical:"top"});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:"Position",initialOpen:!1,children:[(0,l.jsx)(y.Notice,{status:"info",isDismissible:!1,children:"Positioning may look slightly different in the editor than on the live site."}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{children:["Type ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.SelectControl,{options:qt,value:e?.[n]?.type,onChange:o=>t({...e,[n]:{...e?.[n],type:o}})})]}),(0,l.jsx)(v,{className:"mt10",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:10,children:["Horizontal ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt5",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:o?.horizontal,onChange:e=>i({...o,horizontal:e}),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Left",value:"left"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Right",value:"right"})]}),"left"==o?.horizontal&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,l.jsxs)(y.Flex,{gap:10,children:["Left Offset ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{value:e?.[n]?.horizontal?.left,onChange:o=>t({...e,[n]:{...e?.[n],horizontal:{...e?.[n]?.horizontal,left:o}}})})]}),"right"==o?.horizontal&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,l.jsxs)(y.Flex,{gap:10,children:["Right Offset ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{value:e?.[n]?.horizontal?.right,onChange:o=>t({...e,[n]:{...e?.[n],horizontal:{...e?.[n]?.horizontal,right:o}}})})]}),(0,l.jsx)(v,{className:"mt10",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:10,children:["Vertical ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt5",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:o?.vertical,onChange:e=>i({...o,vertical:e}),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Top",value:"top"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Bottom",value:"bottom"})]}),"top"==o?.vertical&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,l.jsxs)(y.Flex,{gap:10,children:["Top Offset ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{value:e?.[n]?.vertical?.top,onChange:o=>t({...e,[n]:{...e?.[n],vertical:{...e?.[n]?.vertical,top:o}}})})]}),"bottom"==o?.vertical&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,l.jsxs)(y.Flex,{gap:10,children:["Bottom Offset ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{value:e?.[n]?.vertical?.bottom,onChange:o=>t({...e,[n]:{...e?.[n],vertical:{...e?.[n]?.vertical,bottom:o}}})})]})]})})),Kt={dimension:["padding","margin","width"],floating:!0,motion:!0,position:!0,transform:!0,background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],mask:!0,animation:!0, |
| 239 |
visibility:["zIndex","overflow"],responsive:!0,css:!0},Qt=({advanced:e,onChange:t,enabled:n=Kt,id:o=null,isPremium:i=!1})=>{const{dimension:s={},transform:a={},background:r={},borderShadow:c={},mask:d={},animation:u={},visibility:p={},responsive:h={},position:g={},floating:m={},motion:b={},css:f=""}=e||{},x=e=>Object.prototype.hasOwnProperty.call(n,e);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{children:(0,l.jsx)(y.Notice,{status:"info",isDismissible:!1,children:"Leave blank if you don't want to use/apply this option."})}),x("dimension")&&(0,l.jsx)(ye,{dimension:s,onChange:n=>t(be(e,n,"dimension")),enabled:n.dimension}),x("motion")&&i&&(0,l.jsx)(Ht,{motion:b,onChange:n=>t(be(e,n,"motion"))}),x("floating")&&i&&(0,l.jsx)(Vt,{floating:m,onChange:n=>t(be(e,n,"floating"))}),x("position")&&i&&(0,l.jsx)(Yt,{position:g,onChange:n=>t(be(e,n,"position"))}),x("transform")&&i&&(0,l.jsx)(Ot,{transform:a,onChange:n=>t(be(e,n,"transform"))}),x("background")&&(0,l.jsx)(st,{background:r,onChange:n=>t(be(e,n,"background")),enabled:n.background,isPremium:i}),x("borderShadow")&&(n.borderShadow?.includes("border")||n.borderShadow?.includes("shadow"))&&(0,l.jsx)(vt,{borderShadow:c,onChange:n=>t(be(e,n,"borderShadow")),enabled:n.borderShadow}),x("mask")&&i&&(0,l.jsx)(Me,{mask:d,onChange:n=>t(be(e,n,"mask"))}),x("animation")&&(0,l.jsx)(He,{animation:u,onChange:n=>t(be(e,n,"animation")),id:o,isPremium:i}),x("visibility")&&(0,l.jsx)(Rt,{visibility:p,onChange:n=>t(be(e,n,"visibility")),enabled:n.visibility}),x("responsive")&&(0,l.jsx)(Ct,{responsive:h,onChange:n=>t(be(e,n,"responsive"))}),x("css")&&(0,l.jsx)(_t,{css:f,onChange:n=>t(be(e,n,"css"))})]})},Zt=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Xt=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],Jt=((0,x.__)("General","b-blocks"),(0,x.__)("Style","b-blocks"),(0,x.__)("Advanced","b-blocks"),[{label:"Left",value:"left",icon:"editor-alignleft"},{label:"Center",value:"center",icon:"editor-aligncenter"},{label:"Right",value:"right",icon:"editor-alignright"},{label:"Justify",value:"justify",icon:"editor-justify"}]),en=[{name:"normal",title:(0,x.__)("Normal","b-blocks")},{name:"hover",title:(0,x.__)("Hover","b-blocks")}],tn=[{label:"Start",value:"flex-start"},{label:"End",value:"flex-end"},{label:"Center",value:"center"},{label:"Space Around",value:"space-around"},{label:"Space Between",value:"space-between"},{label:"Space Evenly",value:"space-evenly"}],nn="b-blocks",on="https://bblockswp.com/docs/",sn=`${on}3d-viewer-block/`,an=`${on}alert-block/`,rn=`${on}animated-text-block/`,ln=`${on}chart-block/`,cn=`${on}countdown-block/`,dn=`${on}counters-block/`,un=`${on}gif-block/`,pn=`${on}mail-to-block/`,hn=`${on}pricing-table-block/`,gn=`${on}qr-code-block/`,mn=`${on}row-block/`,bn=`${on}services-section-block/`,fn=`${on}social-share-block/`,xn=`${on}team-block/`,yn=`${location.origin}/wp-admin/admin.php?page=b-blocks#/pricing`,vn=`${location.origin}/wp-admin/admin.php?page=b-blocks#/settings`,kn="https://templates.bplugins.com/wp-content/uploads/2025/10/placeholder.png",wn=["b-blocks/logo-slider","b-blocks/content-ticker","b-blocks/image-hotspot","b-blocks/stacked-cards","b-blocks/key-takeaways","b-blocks/stat-cards","b-blocks/article-card","b-blocks/event-card","b-blocks/file-download-card","b-blocks/google-map","b-blocks/code-highlight","b-blocks/one-page-navigation"],Cn=["Posts","Countdown","Slider","Lottie Player","Button","Cards","Image Comparison","SVG Draw","Logo Slider","Content Ticker"],jn=({isProModalOpen:e,setIsProModalOpen:t,block:n,children:o})=>{const i=Cn.filter((e=>e!==n)).map(((e,t)=>Cn.length>2&&t===Cn.length-2?`and ${e}`:e)).join(", ");return e&&(0,l.jsxs)(y.Modal,{className:"bBlocksProModal",title:(0,l.jsx)(Sn,{}),onRequestClose:()=>t(!1),children:[(0,l.jsxs)("h3",{children:["Enhance your experience with Pro features of the ",(0,l.jsx)("span",{children:n})," block"]}),(0,l.jsx)("ul",{className:"features",children:o}),(0,l.jsxs)("h4",{className:"text",children:["Also, upgrade to the pro versions of ",(0,l.jsx)("span",{children:i})," blocks ",(0,l.jsx)("br",{})," to access advanced features and enhance your website with more functionalities."]}),(0,l.jsx)($n,{})]})},$n=()=>(0,l.jsx)("a",{className:"upgradeNow",href:yn,target:"_blank",rel:"noreferrer",children:(0,x.__)("Upgrade Now","advanced-post-block")}),Sn=()=>(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Upgrade to bBlocks Pro for advanced features","b-blocks"),(0,l.jsx)($n,{})]}),Tn=e=>{const{className:t,label:n="",labelPosition:o="left",value:i,defaultValue:s="",onChange:a,options:r,isIcon:c=!1,isTextIcon:d=!1,size:u="compact"}=e,p=({className:e=""})=>(0,l.jsx)(y.ButtonGroup,{className:`bPlBtnGroup ${e||null}`,children:Object.values(r).map((e=>{const{value:t,icon:n="",label:o="",def:r=""}=e,p=i===t;return(0,l.jsx)(y.Button,{value:t,label:o,showTooltip:!0,tooltipPosition:"top",icon:c?n:null,variant:p?"primary":"","aria-pressed":p,size:u,onClick:()=>a(p?s:t,r&&r),children:d?n:c?"":o},t)}))});return n?"left"===o?(0,l.jsxs)(y.PanelRow,{className:t,children:[(0,l.jsx)(v,{className:"",children:n}),(0,l.jsx)(p,{})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:n}),(0,l.jsx)(p,{className:t})]}):(0,l.jsx)(p,{className:t})},Mn=[{label:"Solid",value:"solid"},{label:"Gradient",value:"gradient"},{label:"Image",value:"image"}],Nn=[{label:"Default",value:""},{label:"Initial",value:"initial"},{label:"Scroll",value:"scroll"},{label:"Fixed",value:"fixed"},{label:"Local",value:"local"}],Ln=[{label:"Default",value:""},{label:"No Repeat",value:"no-repeat"},{label:"Repeat",value:"repeat"},{label:"Repeat X",value:"repeat-x"},{label:"Repeat Y",value:"repeat-y"}],En=[{label:"Default",value:""},{label:"Cover",value:"cover"},{label:"Auto",value:"auto"},{label:"Contain",value:"contain"}],Pn=y.__experimentalGradientPicker||y.GradientPicker,An=(0,f.withSelect)((e=>{const{gradients:t}=e("core/block-editor").getSettings();return{gradients:t.length>12?t.slice(0,12):t}}))((e=>{const{className:t="",label:n=(0,x.__)("Background"),value:o={},onChange:i,defaults:s={},isSolid:a=!0,isGradient:c=!0,isImage:d=!0,gradients:u}=e,p={type:"solid",color:"",gradient:r,image:{},position:"center center",attachment:"",repeat:"",size:"",overlayColor:""},h=e=>s?.[e]||p[e],g=e=>i({...o,[e]:h(e)}),m=e=>o?.[e]||h(e),b=(e,t)=>i({...o,[e]:t}),f=e=>o?.[e]&&o?.[e]!==h(e)?(0,l.jsx)(y.Button,{icon:"image-rotate",className:"bPlResetVal",onClick:()=>g(e)}):null,k=()=>{i({...o,type:"image",image:h("image"),position:h("position"),attachment:h("attachment"),repeat:h("repeat"),size:h("size"),overlayColor:h("overlayColor")})};return(0,l.jsxs)(y.PanelRow,{className:`bPlDropdown ${t}`,children:[(0,l.jsx)(v,{className:"mb5",children:n}),(0,l.jsx)(y.Dropdown,{className:"bPlDropdownContainer",contentClassName:"bPlDropdownPopover",popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,l.jsx)(y.Button,{icon:"edit",onClick:t,"aria-expanded":e}),renderContent:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:")}),(0,l.jsx)(Tn,{value:m("type"),onChange:e=>b("type",e),options:Mn.filter((e=>{switch(e.value){case"solid":return a;case"gradient":return c;case"image":return d;default:return!0}}))})]}),"solid"===m("type")&&a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color:"),value:m("color"),onChange:e=>b("color",e),defaultColor:h("color")}),(0,l.jsx)(y.Flex,{justify:"flex-end",className:"mt10",children:(0,l.jsx)(y.Button,{variant:"tertiary",onClick:()=>g("color"),children:"Clear"})})]}),"gradient"===m("type")&&c&&(0,l.jsx)(Pn,{className:"mt20",value:m("gradient"),onChange:e=>b("gradient",e),gradients:u}),"image"===m("type")&&d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb5",children:(0, |
| 240 |
x.__)("Image")}),(0,l.jsx)(ke,{types:["image"],value:m("image"),onChange:e=>b("image",e)}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Position")}),(0,l.jsx)(y.__experimentalAlignmentMatrixControl,{value:m("position"),onChange:e=>b("position",e)}),f("position")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Attachment:")}),(0,l.jsx)(y.SelectControl,{value:m("attachment"),onChange:e=>b("attachment",e),options:Nn}),f("attachments")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Repeat:")}),(0,l.jsx)(y.SelectControl,{value:m("repeat"),onChange:e=>b("repeat",e),options:Ln}),f("repeat")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Size:")}),(0,l.jsx)(y.SelectControl,{value:m("size"),onChange:e=>b("size",e),options:En}),f("size")]}),(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Overlay Color:"),value:m("overlayColor"),onChange:e=>b("overlayColor",e),defaultColor:h("overlayColor")}),(0,l.jsx)(y.Flex,{justify:"flex-end",className:"mt10",children:(0,l.jsx)(y.Button,{variant:"tertiary",onClick:k,children:"Clear"})})]})]})})]})}));(0,f.withDispatch)((e=>({replaceBlock:e("core/block-editor").replaceBlock})))((({blocks:e,clientId:t,value:n,minHeight:o="",minWidth:i="200px",viewportWidth:s=1600,replaceBlock:a})=>{const[r,c]=(0,m.useState)(null),d=(e,t)=>{c(e),g(t)},u=(e,t)=>{c(t?e:null)},g=e=>{const n=(0,p.parse)(e);a(t,n)};return(0,l.jsx)("div",{className:"bPlBlockPreviewWrapper",children:e.map(((e,t)=>(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)(y.Button,{className:"bPl-previewBtn "+(n===e.value?"bPl-activeBtn":""),onClick:()=>d(t,e.content),onMouseEnter:()=>u(t,!0),onMouseLeave:()=>u(t,!1),children:e.label})}),r===t&&(0,l.jsx)(y.Popover,{style:{cursor:"pointer"},onClick:()=>d(t,e.content),children:(0,l.jsx)("div",{onMouseEnter:()=>u(t,!0),onMouseLeave:()=>u(t,!1),style:{minWidth:i,minHeight:o},children:(0,l.jsx)(h.BlockPreview,{blocks:(0,p.parse)(e.content),viewportWidth:s,minHeight:o})})})]},t)))})}));const Bn=({type:e="button",href:t="",target:n="",onClick:o=null,className:i,variant:s="primary",size:a="",children:r,disabled:c=!1,...d})=>{const u=`bPlButton ${s?`variant-${s}`:""} ${a?`size-${a}`:""} ${i||""} ${c?"bPlButton-disabled":""}`;return"function"!=typeof o&&t?(0,l.jsx)("a",{href:t,target:n,className:u,...d,children:r}):(0,l.jsx)("button",{type:e,className:u,...d,onClick:o,children:r})},In=y.__experimentalGradientPicker||y.GradientPicker,On=(0,f.withSelect)((e=>{const{gradients:t}=e("core/block-editor").getSettings();return{gradients:t.length>12?t.slice(0,12):t}}))((e=>{const{className:t="",label:n=(0,x.__)("Colors:"),labelPosition:o="left",value:i,onChange:s,defaults:a={},gradients:c}=e,d={color:"#333",bgType:"solid",bg:"",gradient:r},u=e=>a?.[e]||d[e],p=e=>i?.[e]||u(e),h=(e,t)=>s({...i,[e]:t}),g=(0,l.jsxs)(l.Fragment,{children:[n," ",(0,l.jsx)(y.ColorIndicator,{colorValue:p("color")})," ",(0,l.jsx)(y.ColorIndicator,{colorValue:p("gradient"===p("bgType")?"gradient":"bg")})]});return"left"===o?(0,l.jsxs)(y.PanelRow,{className:`bPlDropdown ${t}`,children:[(0,l.jsx)(v,{className:"",children:g}),(0,l.jsx)(Rn,{getValue:p,setValue:h,getDefault:u,gradients:c,bgTypes:ze})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:g}),(0,l.jsx)(Rn,{getValue:p,setValue:h,getDefault:u,gradients:c,bgTypes:ze})]})})),Rn=({getValue:e,setValue:t,getDefault:n,gradients:o,bgTypes:i})=>(0,l.jsx)(y.Dropdown,{className:"bPlDropdownContainer",contentClassName:"bPlDropdownPopover",popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,l.jsx)(y.Button,{icon:"edit",onClick:t,"aria-expanded":e}),renderContent:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:"),value:e("color"),onChange:e=>t("color",e),defaultColor:n("color")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Background:")}),(0,l.jsx)(Tn,{value:e("bgType"),onChange:e=>t("bgType",e),options:i,size:"small"})]}),"gradient"===e("bgType")?(0,l.jsx)(In,{value:e("gradient"),onChange:e=>t("gradient",e),gradients:o}):(0,l.jsx)(Ue,{label:(0,x.__)("Background Color:"),value:e("bg"),onChange:e=>t("bg",e),defaultColor:n("bg")})]})}),zn=({tagName:e,...t})=>(0,l.jsx)(e,{...t}),Dn=({slug:e,docsLink:t})=>(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody bPlHelpPanel",title:(0,x.__)("Help"),initialOpen:!1,children:(0,l.jsxs)("div",{className:"helpItems",children:[t&&(0,l.jsxs)("a",{href:t,target:"_blank",rel:"noreferrer",children:[ut,(0,l.jsx)("p",{children:(0,x.__)("Read Documentation")})]}),(0,l.jsxs)("a",{href:"https://bplugins.com/support",target:"_blank",rel:"noreferrer",children:[pt,(0,l.jsx)("p",{children:(0,x.__)("Contact Support")})]}),e&&(0,l.jsxs)("a",{href:`https://wordpress.org/support/plugin/${e}/reviews/#new-post`,target:"_blank",rel:"noreferrer",children:[ht,(0,l.jsx)("p",{children:(0,x.__)("Rate Plugin")})]}),(0,l.jsxs)("a",{href:"https://bplugins.com/products",target:"_blank",rel:"noreferrer",children:[gt,(0,l.jsx)("p",{children:(0,x.__)("Other Plugins")})]})]}) |
| 241 |
}),Fn=["","fa-solid fa-0","fa-solid fa-1","fa-solid fa-2","fa-solid fa-3","fa-solid fa-4","fa-solid fa-5","fa-solid fa-6","fa-solid fa-7","fa-solid fa-8","fa-solid fa-9","fa-brands fa-11ty","fa-brands fa-42-group","fa-brands fa-500px","fa-solid fa-a","fa-brands fa-accessible-icon","fa-brands fa-accusoft","fa-regular fa-address-book","fa-solid fa-address-book","fa-regular fa-address-card","fa-solid fa-address-card","fa-brands fa-adn","fa-brands fa-adversal","fa-brands fa-affiliatetheme","fa-brands fa-airbnb","fa-regular fa-alarm-clock","fa-solid fa-alarm-clock","fa-brands fa-algolia","fa-solid fa-align-center","fa-solid fa-align-justify","fa-solid fa-align-left","fa-solid fa-align-right","fa-brands fa-alipay","fa-brands fa-amazon","fa-brands fa-amazon-pay","fa-brands fa-amilia","fa-solid fa-anchor","fa-solid fa-anchor-circle-check","fa-solid fa-anchor-circle-exclamation","fa-solid fa-anchor-circle-xmark","fa-solid fa-anchor-lock","fa-brands fa-android","fa-brands fa-angellist","fa-solid fa-angle-down","fa-solid fa-angle-left","fa-solid fa-angle-right","fa-solid fa-angle-up","fa-solid fa-angles-down","fa-solid fa-angles-left","fa-solid fa-angles-right","fa-solid fa-angles-up","fa-brands fa-angrycreative","fa-brands fa-angular","fa-solid fa-ankh","fa-brands fa-app-store","fa-brands fa-app-store-ios","fa-brands fa-apper","fa-brands fa-apple","fa-brands fa-apple-pay","fa-solid fa-apple-whole","fa-solid fa-archway","fa-solid fa-arrow-down","fa-solid fa-arrow-down-1-9","fa-solid fa-arrow-down-9-1","fa-solid fa-arrow-down-a-z","fa-solid fa-arrow-down-long","fa-solid fa-arrow-down-short-wide","fa-solid fa-arrow-down-up-across-line","fa-solid fa-arrow-down-up-lock","fa-solid fa-arrow-down-wide-short","fa-solid fa-arrow-down-z-a","fa-solid fa-arrow-left","fa-solid fa-arrow-left-long","fa-solid fa-arrow-pointer","fa-solid fa-arrow-right","fa-solid fa-arrow-right-arrow-left","fa-solid fa-arrow-right-from-bracket","fa-solid fa-arrow-right-long","fa-solid fa-arrow-right-to-bracket","fa-solid fa-arrow-right-to-city","fa-solid fa-arrow-rotate-left","fa-solid fa-arrow-rotate-right","fa-solid fa-arrow-trend-down","fa-solid fa-arrow-trend-up","fa-solid fa-arrow-turn-down","fa-solid fa-arrow-turn-up","fa-solid fa-arrow-up","fa-solid fa-arrow-up-1-9","fa-solid fa-arrow-up-9-1","fa-solid fa-arrow-up-a-z","fa-solid fa-arrow-up-from-bracket","fa-solid fa-arrow-up-from-ground-water","fa-solid fa-arrow-up-from-water-pump","fa-solid fa-arrow-up-long","fa-solid fa-arrow-up-right-dots","fa-solid fa-arrow-up-right-from-square","fa-solid fa-arrow-up-short-wide","fa-solid fa-arrow-up-wide-short","fa-solid fa-arrow-up-z-a","fa-solid fa-arrows-down-to-line","fa-solid fa-arrows-down-to-people","fa-solid fa-arrows-left-right","fa-solid fa-arrows-left-right-to-line","fa-solid fa-arrows-rotate","fa-solid fa-arrows-spin","fa-solid fa-arrows-split-up-and-left","fa-solid fa-arrows-to-circle","fa-solid fa-arrows-to-dot","fa-solid fa-arrows-to-eye","fa-solid fa-arrows-turn-right","fa-solid fa-arrows-turn-to-dots","fa-solid fa-arrows-up-down","fa-solid fa-arrows-up-down-left-right","fa-solid fa-arrows-up-to-line","fa-brands fa-artstation","fa-solid fa-asterisk","fa-brands fa-asymmetrik","fa-solid fa-at","fa-brands fa-atlassian","fa-solid fa-atom","fa-brands fa-audible","fa-solid fa-audio-description","fa-solid fa-austral-sign","fa-brands fa-autoprefixer","fa-brands fa-avianex","fa-brands fa-aviato","fa-solid fa-award","fa-brands fa-aws","fa-solid fa-b","fa-solid fa-baby","fa-solid fa-baby-carriage","fa-solid fa-backward","fa-solid fa-backward-fast","fa-solid fa-backward-step","fa-solid fa-bacon","fa-solid fa-bacteria","fa-solid fa-bacterium","fa-solid fa-bag-shopping","fa-solid fa-bahai","fa-solid fa-baht-sign","fa-solid fa-ban","fa-solid fa-ban-smoking","fa-solid fa-bandage","fa-brands fa-bandcamp","fa-solid fa-bangladeshi-taka-sign","fa-solid fa-barcode","fa-solid fa-bars","fa-solid fa-bars-progress","fa-solid fa-bars-staggered","fa-solid fa-baseball","fa-solid fa-baseball-bat-ball","fa-solid fa-basket-shopping","fa-solid fa-basketball","fa-solid fa-bath","fa-solid fa-battery-empty","fa-solid fa-battery-full","fa-solid fa-battery-half","fa-solid fa-battery-quarter","fa-solid fa-battery-three-quarters","fa-brands fa-battle-net","fa-solid fa-bed","fa-solid fa-bed-pulse","fa-solid fa-beer-mug-empty","fa-brands fa-behance","fa-regular fa-bell","fa-solid fa-bell","fa-solid fa-bell-concierge","fa-regular fa-bell-slash","fa-solid fa-bell-slash","fa-solid fa-bezier-curve","fa-solid fa-bicycle","fa-brands fa-bilibili","fa-brands fa-bimobject","fa-solid fa-binoculars","fa-solid fa-biohazard","fa-brands fa-bitbucket","fa-brands fa-bitcoin","fa-solid fa-bitcoin-sign","fa-brands fa-bity","fa-brands fa-black-tie","fa-brands fa-blackberry","fa-solid fa-blender","fa-solid fa-blender-phone","fa-solid fa-blog","fa-brands fa-blogger","fa-brands fa-blogger-b","fa-brands fa-bluesky","fa-brands fa-bluetooth","fa-brands fa-bluetooth-b","fa-solid fa-bold","fa-solid fa-bolt","fa-solid fa-bolt-lightning","fa-solid fa-bomb","fa-solid fa-bone","fa-solid fa-bong","fa-solid fa-book","fa-solid fa-book-atlas","fa-solid fa-book-bible","fa-solid fa-book-bookmark","fa-solid fa-book-journal-whills","fa-solid fa-book-medical","fa-solid fa-book-open","fa-solid fa-book-open-reader","fa-solid fa-book-quran","fa-solid fa-book-skull","fa-solid fa-book-tanakh","fa-regular fa-bookmark","fa-solid fa-bookmark","fa-brands fa-bootstrap","fa-solid fa-border-all","fa-solid fa-border-none","fa-solid fa-border-top-left","fa-solid fa-bore-hole","fa-brands fa-bots","fa-solid fa-bottle-droplet","fa-solid fa-bottle-water","fa-solid fa-bowl-food","fa-solid fa-bowl-rice","fa-solid fa-bowling-ball","fa-solid fa-box","fa-solid fa-box-archive","fa-solid fa-box-open","fa-solid fa-box-tissue","fa-solid fa-boxes-packing","fa-solid fa-boxes-stacked","fa-solid fa-braille","fa-solid fa-brain","fa-brands fa-brave","fa-brands fa-brave-reverse","fa-solid fa-brazilian-real-sign","fa-solid fa-bread-slice","fa-solid fa-bridge","fa-solid fa-bridge-circle-check","fa-solid fa-bridge-circle-exclamation","fa-solid fa-bridge-circle-xmark","fa-solid fa-bridge-lock","fa-solid fa-bridge-water","fa-solid fa-briefcase","fa-solid fa-briefcase-medical","fa-solid fa-broom","fa-solid fa-broom-ball","fa-solid fa-brush","fa-brands fa-btc","fa-solid fa-bucket","fa-brands fa-buffer","fa-solid fa-bug","fa-solid fa-bug-slash","fa-solid fa-bugs","fa-regular fa-building","fa-solid fa-building","fa-solid fa-building-circle-arrow-right","fa-solid fa-building-circle-check","fa-solid fa-building-circle-exclamation","fa-solid fa-building-circle-xmark","fa-solid fa-building-columns","fa-solid fa-building-flag","fa-solid fa-building-lock","fa-solid fa-building-ngo","fa-solid fa-building-shield","fa-solid fa-building-un","fa-solid fa-building-user","fa-solid fa-building-wheat","fa-solid fa-bullhorn","fa-solid fa-bullseye","fa-solid fa-burger","fa-brands fa-buromobelexperte","fa-solid fa-burst","fa-solid fa-bus","fa-solid fa-bus-side","fa-solid fa-bus-simple","fa-solid fa-business-time","fa-brands fa-buy-n-large","fa-brands fa-buysellads","fa-solid fa-c","fa-solid fa-cable-car","fa-solid fa-cake-candles","fa-solid fa-calculator","fa-regular fa-calendar","fa-solid fa-calendar","fa-regular fa-calendar-check","fa-solid fa-calendar-check","fa-solid fa-calendar-day","fa-regular fa-calendar-days","fa-solid fa-calendar-days","fa-regular fa-calendar-minus","fa-solid fa-calendar-minus","fa-regular fa-calendar-plus","fa-solid fa-calendar-plus","fa-solid fa-calendar-week","fa-regular fa-calendar-xmark","fa-solid fa-calendar-xmark","fa-regular fa-camera","fa-solid fa-camera","fa-solid fa-camera-retro","fa-solid fa-camera-rotate","fa-solid fa-campground","fa-brands fa-canadian-maple-leaf","fa-solid fa-candy-cane","fa-solid fa-cannabis","fa-solid fa-capsules","fa-solid fa-car","fa-solid fa-car-battery","fa-solid fa-car-burst","fa-solid fa-car-on","fa-solid fa-car-rear","fa-solid fa-car-side","fa-solid fa-car-tunnel","fa-solid fa-caravan","fa-solid fa-caret-down","fa-solid fa-caret-left","fa-solid fa-caret-right","fa-solid fa-caret-up","fa-solid fa-carrot","fa-solid fa-cart-arrow-down","fa-solid fa-cart-flatbed","fa-solid fa-cart-flatbed-suitcase","fa-solid fa-cart-plus","fa-solid fa-cart-shopping","fa-brands fa-cash-app","fa-solid fa-cash-register","fa-solid fa-cat","fa-brands fa-cc-amazon-pay","fa-brands fa-cc-amex","fa-brands fa-cc-apple-pay","fa-brands fa-cc-diners-club","fa-brands fa-cc-discover","fa-brands fa-cc-jcb","fa-brands fa-cc-mastercard","fa-brands fa-cc-paypal","fa-brands fa-cc-stripe","fa-brands fa-cc-visa","fa-solid fa-cedi-sign","fa-solid fa-cent-sign","fa-brands fa-centercode","fa-brands fa-centos","fa-solid fa-certificate","fa-solid fa-chair","fa-solid fa-chalkboard","fa-solid fa-chalkboard-user","fa-solid fa-champagne-glasses","fa-solid fa-charging-station","fa-solid fa-chart-area","fa-regular fa-chart-bar","fa-solid fa-chart-bar","fa-solid fa-chart-column","fa-solid fa-chart-diagram","fa-solid fa-chart-gantt","fa-solid fa-chart-line","fa-solid fa-chart-pie","fa-solid fa-chart-simple","fa-solid fa-check","fa-solid fa-check-double","fa-solid fa-check-to-slot","fa-solid fa-cheese","fa-solid fa-chess","fa-regular fa-chess-bishop","fa-solid fa-chess-bishop","fa-solid fa-chess-board","fa-regular fa-chess-king","fa-solid fa-chess-king","fa-regular fa-chess-knight","fa-solid fa-chess-knight","fa-regular fa-chess-pawn","fa-solid fa-chess-pawn","fa-regular fa-chess-queen","fa-solid fa-chess-queen","fa-regular fa-chess-rook","fa-solid fa-chess-rook","fa-solid fa-chevron-down","fa-solid fa-chevron-left","fa-solid fa-chevron-right","fa-solid fa-chevron-up","fa-solid fa-child","fa-solid fa-child-combatant","fa-solid fa-child-dress","fa-solid fa-child-reaching","fa-solid fa-children","fa-brands fa-chrome","fa-brands fa-chromecast","fa-solid fa-church","fa-regular fa-circle","fa-solid fa-circle","fa-solid fa-circle-arrow-down","fa-solid fa-circle-arrow-left","fa-solid fa-circle-arrow-right","fa-solid fa-circle-arrow-up","fa-regular fa-circle-check","fa-solid fa-circle-check","fa-solid fa-circle-chevron-down","fa-solid fa-circle-chevron-left","fa-solid fa-circle-chevron-right","fa-solid fa-circle-chevron-up","fa-solid fa-circle-dollar-to-slot","fa-regular fa-circle-dot","fa-solid fa-circle-dot","fa-regular fa-circle-down","fa-solid fa-circle-down","fa-solid fa-circle-exclamation","fa-solid fa-circle-h","fa-solid fa-circle-half-stroke","fa-solid fa-circle-info","fa-regular fa-circle-left","fa-solid fa-circle-left","fa-solid fa-circle-minus","fa-solid fa-circle-nodes","fa-solid fa-circle-notch","fa-regular fa-circle-pause","fa-solid fa-circle-pause","fa-regular fa-circle-play","fa-solid fa-circle-play","fa-solid fa-circle-plus","fa-regular fa-circle-question","fa-solid fa-circle-question","fa-solid fa-circle-radiation","fa-regular fa-circle-right","fa-solid fa-circle-right","fa-regular fa-circle-stop","fa-solid fa-circle-stop","fa-regular fa-circle-up","fa-solid fa-circle-up","fa-regular fa-circle-user","fa-solid fa-circle-user","fa-regular fa-circle-xmark","fa-solid fa-circle-xmark","fa-solid fa-city","fa-solid fa-clapperboard","fa-regular fa-clipboard","fa-solid fa-clipboard","fa-solid fa-clipboard-check","fa-solid fa-clipboard-list","fa-solid fa-clipboard-question","fa-solid fa-clipboard-user","fa-regular fa-clock","fa-solid fa-clock","fa-solid fa-clock-rotate-left","fa-regular fa-clone","fa-solid fa-clone","fa-regular fa-closed-captioning","fa-solid fa-closed-captioning","fa-regular fa-cloud","fa-solid fa-cloud","fa-solid fa-cloud-arrow-down","fa-solid fa-cloud-arrow-up","fa-solid fa-cloud-bolt","fa-solid fa-cloud-meatball","fa-solid fa-cloud-moon","fa-solid fa-cloud-moon-rain","fa-solid fa-cloud-rain","fa-solid fa-cloud-showers-heavy","fa-solid fa-cloud-showers-water","fa-solid fa-cloud-sun","fa-solid fa-cloud-sun-rain","fa-brands fa-cloudflare","fa-brands fa-cloudscale","fa-brands fa-cloudsmith","fa-brands fa-cloudversify","fa-solid fa-clover","fa-brands fa-cmplid","fa-solid fa-code","fa-solid fa-code-branch","fa-solid fa-code-commit","fa-solid fa-code-compare","fa-solid fa-code-fork","fa-solid fa-code-merge","fa-solid fa-code-pull-request","fa-brands fa-codepen","fa-brands fa-codiepie","fa-solid fa-coins","fa-solid fa-colon-sign","fa-regular fa-comment","fa-solid fa-comment","fa-solid fa-comment-dollar","fa-regular fa-comment-dots","fa-solid fa-comment-dots","fa-solid fa-comment-medical","fa-solid fa-comment-nodes","fa-solid fa-comment-slash","fa-solid fa-comment-sms","fa-regular fa-comments","fa-solid fa-comments","fa-solid fa-comments-dollar","fa-solid fa-compact-disc","fa-regular fa-compass","fa-solid fa-compass","fa-solid fa-compass-drafting","fa-solid fa-compress","fa-solid fa-computer","fa-solid fa-computer-mouse","fa-brands fa-confluence","fa-brands fa-connectdevelop","fa-brands fa-contao","fa-solid fa-cookie","fa-solid fa-cookie-bite","fa-regular fa-copy","fa-solid fa-copy","fa-regular fa-copyright","fa-solid fa-copyright","fa-brands fa-cotton-bureau","fa-solid fa-couch","fa-solid fa-cow","fa-brands fa-cpanel","fa-brands fa-creative-commons","fa-brands fa-creative-commons-by","fa-brands fa-creative-commons-nc","fa-brands fa-creative-commons-nc-eu","fa-brands fa-creative-commons-nc-jp","fa-brands fa-creative-commons-nd","fa-brands fa-creative-commons-pd","fa-brands fa-creative-commons-pd-alt","fa-brands fa-creative-commons-remix","fa-brands fa-creative-commons-sa","fa-brands fa-creative-commons-sampling","fa-brands fa-creative-commons-sampling-plus","fa-brands fa-creative-commons-share","fa-brands fa-creative-commons-zero","fa-regular fa-credit-card","fa-solid fa-credit-card","fa-brands fa-critical-role","fa-solid fa-crop","fa-solid fa-crop-simple","fa-solid fa-cross","fa-solid fa-crosshairs","fa-solid fa-crow","fa-solid fa-crown","fa-solid fa-crutch","fa-solid fa-cruzeiro-sign","fa-brands fa-css","fa-brands fa-css3","fa-brands fa-css3-alt","fa-solid fa-cube","fa-solid fa-cubes","fa-solid fa-cubes-stacked","fa-brands fa-cuttlefish","fa-solid fa-d","fa-brands fa-d-and-d","fa-brands fa-d-and-d-beyond","fa-brands fa-dailymotion","fa-brands fa-dart-lang","fa-brands fa-dashcube","fa-solid fa-database","fa-brands fa-debian","fa-brands fa-deezer","fa-solid fa-delete-left","fa-brands fa-delicious","fa-solid fa-democrat","fa-brands fa-deploydog","fa-brands fa-deskpro","fa-solid fa-desktop","fa-brands fa-dev","fa-brands fa-deviantart","fa-solid fa-dharmachakra","fa-brands fa-dhl","fa-solid fa-diagram-next","fa-solid fa-diagram-predecessor","fa-solid fa-diagram-project","fa-solid fa-diagram-successor","fa-solid fa-diamond","fa-solid fa-diamond-turn-right","fa-brands fa-diaspora","fa-solid fa-dice","fa-solid fa-dice-d20","fa-solid fa-dice-d6","fa-solid fa-dice-five","fa-solid fa-dice-four","fa-solid fa-dice-one","fa-solid fa-dice-six","fa-solid fa-dice-three","fa-solid fa-dice-two","fa-brands fa-digg","fa-brands fa-digital-ocean","fa-brands fa-discord","fa-brands fa-discourse","fa-solid fa-disease","fa-solid fa-display","fa-brands fa-disqus","fa-solid fa-divide","fa-solid fa-dna","fa-brands fa-dochub","fa-brands fa-docker","fa-solid fa-dog","fa-solid fa-dollar-sign","fa-solid fa-dolly","fa-solid fa-dong-sign","fa-solid fa-door-closed","fa-solid fa-door-open","fa-solid fa-dove","fa-solid fa-down-left-and-up-right-to-center","fa-solid fa-down-long","fa-solid fa-download","fa-brands fa-draft2digital","fa-solid fa-dragon","fa-solid fa-draw-polygon","fa-brands fa-dribbble","fa-brands fa-dropbox","fa-solid fa-droplet","fa-solid fa-droplet-slash","fa-solid fa-drum","fa-solid fa-drum-steelpan","fa-solid fa-drumstick-bite","fa-brands fa-drupal","fa-solid fa-dumbbell","fa-solid fa-dumpster","fa-solid fa-dumpster-fire","fa-solid fa-dungeon","fa-brands fa-duolingo","fa-brands fa-dyalog","fa-solid fa-e","fa-solid fa-ear-deaf","fa-solid fa-ear-listen","fa-brands fa-earlybirds","fa-solid fa-earth-africa","fa-solid fa-earth-americas","fa-solid fa-earth-asia","fa-solid fa-earth-europe","fa-solid fa-earth-oceania","fa-brands fa-ebay","fa-brands fa-edge","fa-brands fa-edge-legacy","fa-solid fa-egg","fa-solid fa-eject","fa-brands fa-elementor","fa-solid fa-elevator","fa-brands fa-eleventy","fa-solid fa-ellipsis","fa-solid fa-ellipsis-vertical","fa-brands fa-ello","fa-brands fa-ember","fa-brands fa-empire","fa-regular fa-envelope","fa-solid fa-envelope","fa-solid fa-envelope-circle-check","fa-regular fa-envelope-open","fa-solid fa-envelope-open","fa-solid fa-envelope-open-text","fa-solid fa-envelopes-bulk","fa-brands fa-envira","fa-solid fa-equals","fa-solid fa-eraser","fa-brands fa-erlang","fa-brands fa-ethereum","fa-solid fa-ethernet","fa-brands fa-etsy","fa-solid fa-euro-sign","fa-brands fa-evernote","fa-solid fa-exclamation","fa-solid fa-expand","fa-brands fa-expeditedssl","fa-solid fa-explosion","fa-regular fa-eye","fa-solid fa-eye","fa-solid fa-eye-dropper","fa-solid fa-eye-low-vision","fa-regular fa-eye-slash","fa-solid fa-eye-slash","fa-solid fa-f","fa-regular fa-face-angry","fa-solid fa-face-angry","fa-regular fa-face-dizzy","fa-solid fa-face-dizzy","fa-regular fa-face-flushed","fa-solid fa-face-flushed","fa-regular fa-face-frown","fa-solid fa-face-frown","fa-regular fa-face-frown-open","fa-solid fa-face-frown-open","fa-regular fa-face-grimace","fa-solid fa-face-grimace","fa-regular fa-face-grin","fa-solid fa-face-grin","fa-regular fa-face-grin-beam","fa-solid fa-face-grin-beam","fa-regular fa-face-grin-beam-sweat","fa-solid fa-face-grin-beam-sweat","fa-regular fa-face-grin-hearts","fa-solid fa-face-grin-hearts","fa-regular fa-face-grin-squint","fa-solid fa-face-grin-squint","fa-regular fa-face-grin-squint-tears","fa-solid fa-face-grin-squint-tears","fa-regular fa-face-grin-stars","fa-solid fa-face-grin-stars","fa-regular fa-face-grin-tears","fa-solid fa-face-grin-tears","fa-regular fa-face-grin-tongue","fa-solid fa-face-grin-tongue","fa-regular fa-face-grin-tongue-squint","fa-solid fa-face-grin-tongue-squint","fa-regular fa-face-grin-tongue-wink","fa-solid fa-face-grin-tongue-wink","fa-regular fa-face-grin-wide","fa-solid fa-face-grin-wide","fa-regular fa-face-grin-wink","fa-solid fa-face-grin-wink","fa-regular fa-face-kiss","fa-solid fa-face-kiss","fa-regular fa-face-kiss-beam","fa-solid fa-face-kiss-beam","fa-regular fa-face-kiss-wink-heart","fa-solid fa-face-kiss-wink-heart","fa-regular fa-face-laugh","fa-solid fa-face-laugh","fa-regular fa-face-laugh-beam","fa-solid fa-face-laugh-beam","fa-regular fa-face-laugh-squint","fa-solid fa-face-laugh-squint","fa-regular fa-face-laugh-wink","fa-solid fa-face-laugh-wink","fa-regular fa-face-meh","fa-solid fa-face-meh","fa-regular fa-face-meh-blank","fa-solid fa-face-meh-blank","fa-regular fa-face-rolling-eyes","fa-solid fa-face-rolling-eyes","fa-regular fa-face-sad-cry","fa-solid fa-face-sad-cry","fa-regular fa-face-sad-tear","fa-solid fa-face-sad-tear","fa-regular fa-face-smile","fa-solid fa-face-smile","fa-regular fa-face-smile-beam","fa-solid fa-face-smile-beam","fa-regular fa-face-smile-wink","fa-solid fa-face-smile-wink","fa-regular fa-face-surprise","fa-solid fa-face-surprise","fa-regular fa-face-tired","fa-solid fa-face-tired","fa-brands fa-facebook","fa-brands fa-facebook-f","fa-brands fa-facebook-messenger","fa-solid fa-fan","fa-brands fa-fantasy-flight-games","fa-solid fa-faucet","fa-solid fa-faucet-drip","fa-solid fa-fax","fa-solid fa-feather","fa-solid fa-feather-pointed","fa-brands fa-fedex","fa-brands fa-fedora","fa-solid fa-ferry","fa-brands fa-figma","fa-regular fa-file","fa-solid fa-file","fa-solid fa-file-arrow-down","fa-solid fa-file-arrow-up","fa-regular fa-file-audio","fa-solid fa-file-audio","fa-solid fa-file-circle-check","fa-solid fa-file-circle-exclamation","fa-solid fa-file-circle-minus","fa-solid fa-file-circle-plus","fa-solid fa-file-circle-question","fa-solid fa-file-circle-xmark","fa-regular fa-file-code","fa-solid fa-file-code","fa-solid fa-file-contract","fa-solid fa-file-csv","fa-regular fa-file-excel","fa-solid fa-file-excel","fa-solid fa-file-export","fa-solid fa-file-fragment","fa-solid fa-file-half-dashed","fa-regular fa-file-image","fa-solid fa-file-image","fa-solid fa-file-import","fa-solid fa-file-invoice","fa-solid fa-file-invoice-dollar","fa-regular fa-file-lines","fa-solid fa-file-lines","fa-solid fa-file-medical","fa-regular fa-file-pdf","fa-solid fa-file-pdf","fa-solid fa-file-pen","fa-regular fa-file-powerpoint","fa-solid fa-file-powerpoint","fa-solid fa-file-prescription","fa-solid fa-file-shield","fa-solid fa-file-signature","fa-regular fa-file-video","fa-solid fa-file-video","fa-solid fa-file-waveform","fa-regular fa-file-word","fa-solid fa-file-word","fa-regular fa-file-zipper","fa-solid fa-file-zipper","fa-brands fa-files-pinwheel","fa-solid fa-fill","fa-solid fa-fill-drip","fa-solid fa-film","fa-solid fa-filter","fa-solid fa-filter-circle-dollar","fa-solid fa-filter-circle-xmark","fa-solid fa-fingerprint","fa-solid fa-fire","fa-solid fa-fire-burner","fa-solid fa-fire-extinguisher","fa-solid fa-fire-flame-curved","fa-solid fa-fire-flame-simple","fa-brands fa-firefox","fa-brands fa-firefox-browser","fa-brands fa-first-order","fa-brands fa-first-order-alt","fa-brands fa-firstdraft","fa-solid fa-fish","fa-solid fa-fish-fins","fa-regular fa-flag","fa-solid fa-flag","fa-solid fa-flag-checkered","fa-solid fa-flag-usa","fa-solid fa-flask","fa-solid fa-flask-vial","fa-brands fa-flickr","fa-brands fa-flipboard","fa-regular fa-floppy-disk","fa-solid fa-floppy-disk","fa-solid fa-florin-sign","fa-brands fa-flutter","fa-brands fa-fly","fa-regular fa-folder","fa-solid fa-folder","fa-regular fa-folder-closed","fa-solid fa-folder-closed","fa-solid fa-folder-minus","fa-regular fa-folder-open","fa-solid fa-folder-open","fa-solid fa-folder-plus","fa-solid fa-folder-tree","fa-solid fa-font","fa-brands fa-font-awesome","fa-regular fa-font-awesome","fa-solid fa-font-awesome","fa-brands fa-fonticons","fa-brands fa-fonticons-fi","fa-solid fa-football","fa-brands fa-fort-awesome","fa-brands fa-fort-awesome-alt","fa-brands fa-forumbee","fa-solid fa-forward","fa-solid fa-forward-fast","fa-solid fa-forward-step","fa-brands fa-foursquare","fa-solid fa-franc-sign","fa-brands fa-free-code-camp","fa-brands fa-freebsd","fa-solid fa-frog","fa-brands fa-fulcrum","fa-regular fa-futbol","fa-solid fa-futbol","fa-solid fa-g","fa-brands fa-galactic-republic","fa-brands fa-galactic-senate","fa-solid fa-gamepad","fa-solid fa-gas-pump","fa-solid fa-gauge","fa-solid fa-gauge-high","fa-solid fa-gauge-simple","fa-solid fa-gauge-simple-high","fa-solid fa-gavel","fa-solid fa-gear","fa-solid fa-gears","fa-regular fa-gem","fa-solid fa-gem","fa-solid fa-genderless","fa-brands fa-get-pocket","fa-brands fa-gg","fa-brands fa-gg-circle","fa-solid fa-ghost","fa-solid fa-gift","fa-solid fa-gifts","fa-brands fa-git","fa-brands fa-git-alt","fa-brands fa-github","fa-brands fa-github-alt","fa-brands fa-gitkraken","fa-brands fa-gitlab","fa-brands fa-gitter","fa-solid fa-glass-water","fa-solid fa-glass-water-droplet","fa-solid fa-glasses","fa-brands fa-glide","fa-brands fa-glide-g","fa-solid fa-globe","fa-brands fa-gofore","fa-brands fa-golang","fa-solid fa-golf-ball-tee","fa-brands fa-goodreads","fa-brands fa-goodreads-g","fa-brands fa-google","fa-brands fa-google-drive","fa-brands fa-google-pay","fa-brands fa-google-play","fa-brands fa-google-plus","fa-brands fa-google-plus-g","fa-brands fa-google-scholar","fa-brands fa-google-wallet","fa-solid fa-gopuram","fa-solid fa-graduation-cap","fa-brands fa-gratipay","fa-brands fa-grav","fa-solid fa-greater-than","fa-solid fa-greater-than-equal","fa-solid fa-grip","fa-solid fa-grip-lines","fa-solid fa-grip-lines-vertical","fa-solid fa-grip-vertical","fa-brands fa-gripfire","fa-solid fa-group-arrows-rotate","fa-brands fa-grunt","fa-solid fa-guarani-sign","fa-brands fa-guilded","fa-solid fa-guitar","fa-brands fa-gulp","fa-solid fa-gun","fa-solid fa-h","fa-brands fa-hacker-news","fa-brands fa-hackerrank","fa-solid fa-hammer","fa-solid fa-hamsa","fa-regular fa-hand","fa-solid fa-hand","fa-regular fa-hand-back-fist","fa-solid fa-hand-back-fist","fa-solid fa-hand-dots","fa-solid fa-hand-fist","fa-solid fa-hand-holding","fa-solid fa-hand-holding-dollar","fa-solid fa-hand-holding-droplet","fa-solid fa-hand-holding-hand","fa-solid fa-hand-holding-heart","fa-solid fa-hand-holding-medical","fa-regular fa-hand-lizard","fa-solid fa-hand-lizard","fa-solid fa-hand-middle-finger","fa-regular fa-hand-peace","fa-solid fa-hand-peace","fa-regular fa-hand-point-down","fa-solid fa-hand-point-down","fa-regular fa-hand-point-left","fa-solid fa-hand-point-left","fa-regular fa-hand-point-right","fa-solid fa-hand-point-right","fa-regular fa-hand-point-up","fa-solid fa-hand-point-up","fa-regular fa-hand-pointer","fa-solid fa-hand-pointer","fa-regular fa-hand-scissors","fa-solid fa-hand-scissors","fa-solid fa-hand-sparkles","fa-regular fa-hand-spock","fa-solid fa-hand-spock","fa-solid fa-handcuffs","fa-solid fa-hands","fa-solid fa-hands-asl-interpreting","fa-solid fa-hands-bound","fa-solid fa-hands-bubbles","fa-solid fa-hands-clapping","fa-solid fa-hands-holding","fa-solid fa-hands-holding-child","fa-solid fa-hands-holding-circle","fa-solid fa-hands-praying","fa-regular fa-handshake","fa-solid fa-handshake","fa-solid fa-handshake-angle","fa-solid fa-handshake-slash","fa-solid fa-hanukiah","fa-regular fa-hard-drive","fa-solid fa-hard-drive","fa-brands fa-hashnode","fa-solid fa-hashtag","fa-solid fa-hat-cowboy","fa-solid fa-hat-cowboy-side","fa-solid fa-hat-wizard","fa-solid fa-head-side-cough","fa-solid fa-head-side-cough-slash","fa-solid fa-head-side-mask","fa-solid fa-head-side-virus","fa-solid fa-heading","fa-regular fa-headphones","fa-solid fa-headphones","fa-solid fa-headset","fa-regular fa-heart","fa-solid fa-heart","fa-solid fa-heart-circle-bolt","fa-solid fa-heart-circle-check","fa-solid fa-heart-circle-exclamation","fa-solid fa-heart-circle-minus","fa-solid fa-heart-circle-plus","fa-solid fa-heart-circle-xmark","fa-solid fa-heart-crack","fa-solid fa-heart-pulse","fa-solid fa-helicopter","fa-solid fa-helicopter-symbol","fa-solid fa-helmet-safety","fa-solid fa-helmet-un","fa-solid fa-hexagon","fa-solid fa-hexagon-nodes","fa-solid fa-hexagon-nodes-bolt","fa-solid fa-highlighter","fa-solid fa-hill-avalanche","fa-solid fa-hill-rockslide","fa-solid fa-hippo","fa-brands fa-hips","fa-brands fa-hire-a-helper","fa-brands fa-hive","fa-solid fa-hockey-puck","fa-solid fa-holly-berry","fa-brands fa-hooli","fa-brands fa-hornbill","fa-solid fa-horse","fa-solid fa-horse-head","fa-regular fa-hospital","fa-solid fa-hospital","fa-solid fa-hospital-user","fa-solid fa-hot-tub-person","fa-solid fa-hotdog","fa-solid fa-hotel","fa-brands fa-hotjar","fa-regular fa-hourglass","fa-solid fa-hourglass","fa-solid fa-hourglass-end","fa-regular fa-hourglass-half","fa-solid fa-hourglass-half","fa-solid fa-hourglass-start","fa-regular fa-house","fa-solid fa-house","fa-solid fa-house-chimney","fa-solid fa-house-chimney-crack","fa-solid fa-house-chimney-medical","fa-solid fa-house-chimney-user","fa-solid fa-house-chimney-window","fa-solid fa-house-circle-check","fa-solid fa-house-circle-exclamation","fa-solid fa-house-circle-xmark","fa-solid fa-house-crack","fa-solid fa-house-fire","fa-solid fa-house-flag","fa-solid fa-house-flood-water","fa-solid fa-house-flood-water-circle-arrow-right","fa-solid fa-house-laptop","fa-solid fa-house-lock","fa-solid fa-house-medical","fa-solid fa-house-medical-circle-check","fa-solid fa-house-medical-circle-exclamation","fa-solid fa-house-medical-circle-xmark","fa-solid fa-house-medical-flag","fa-solid fa-house-signal","fa-solid fa-house-tsunami","fa-solid fa-house-user","fa-brands fa-houzz","fa-solid fa-hryvnia-sign","fa-brands fa-html5","fa-brands fa-hubspot","fa-solid fa-hurricane","fa-solid fa-i","fa-solid fa-i-cursor","fa-solid fa-ice-cream","fa-solid fa-icicles","fa-solid fa-icons","fa-regular fa-id-badge","fa-solid fa-id-badge","fa-regular fa-id-card","fa-solid fa-id-card","fa-solid fa-id-card-clip","fa-brands fa-ideal","fa-solid fa-igloo","fa-regular fa-image","fa-solid fa-image","fa-solid fa-image-portrait","fa-regular fa-images","fa-solid fa-images","fa-brands fa-imdb","fa-solid fa-inbox","fa-solid fa-indent","fa-solid fa-indian-rupee-sign","fa-solid fa-industry","fa-solid fa-infinity","fa-solid fa-info","fa-brands fa-innosoft","fa-brands fa-instagram","fa-brands fa-instalod","fa-brands fa-intercom","fa-brands fa-internet-explorer","fa-brands fa-invision","fa-brands fa-ioxhost","fa-solid fa-italic","fa-brands fa-itch-io","fa-brands fa-itunes","fa-brands fa-itunes-note","fa-solid fa-j","fa-solid fa-jar","fa-solid fa-jar-wheat","fa-brands fa-java","fa-solid fa-jedi","fa-brands fa-jedi-order","fa-brands fa-jenkins","fa-solid fa-jet-fighter","fa-solid fa-jet-fighter-up","fa-brands fa-jira","fa-brands fa-joget","fa-solid fa-joint","fa-brands fa-joomla","fa-brands fa-js","fa-brands fa-jsfiddle","fa-solid fa-jug-detergent","fa-brands fa-jxl","fa-solid fa-k","fa-solid fa-kaaba","fa-brands fa-kaggle","fa-brands fa-kakao-talk","fa-solid fa-key","fa-brands fa-keybase","fa-regular fa-keyboard","fa-solid fa-keyboard","fa-brands fa-keycdn","fa-solid fa-khanda","fa-brands fa-kickstarter","fa-brands fa-kickstarter-k","fa-solid fa-kip-sign","fa-solid fa-kit-medical","fa-solid fa-kitchen-set","fa-solid fa-kiwi-bird","fa-brands fa-korvue","fa-solid fa-l","fa-solid fa-land-mine-on","fa-solid fa-landmark","fa-solid fa-landmark-dome","fa-solid fa-landmark-flag","fa-solid fa-language","fa-solid fa-laptop","fa-solid fa-laptop-code","fa-solid fa-laptop-file","fa-solid fa-laptop-medical","fa-brands fa-laravel","fa-solid fa-lari-sign","fa-brands fa-lastfm","fa-solid fa-layer-group","fa-solid fa-leaf","fa-brands fa-leanpub","fa-solid fa-left-long","fa-solid fa-left-right","fa-regular fa-lemon","fa-solid fa-lemon","fa-brands fa-less","fa-solid fa-less-than","fa-solid fa-less-than-equal","fa-brands fa-letterboxd","fa-regular fa-life-ring","fa-solid fa-life-ring","fa-regular fa-lightbulb","fa-solid fa-lightbulb","fa-brands fa-line","fa-solid fa-lines-leaning","fa-solid fa-link","fa-solid fa-link-slash","fa-brands fa-linkedin","fa-brands fa-linkedin-in","fa-brands fa-linktree","fa-brands fa-linode","fa-brands fa-linux","fa-solid fa-lira-sign","fa-solid fa-list","fa-solid fa-list-check","fa-solid fa-list-ol","fa-solid fa-list-ul","fa-solid fa-litecoin-sign","fa-solid fa-location-arrow","fa-solid fa-location-crosshairs","fa-solid fa-location-dot","fa-solid fa-location-pin","fa-solid fa-location-pin-lock","fa-solid fa-lock","fa-solid fa-lock-open","fa-solid fa-locust","fa-brands fa-lumon","fa-brands fa-lumon-drop","fa-solid fa-lungs","fa-solid fa-lungs-virus","fa-brands fa-lyft","fa-solid fa-m","fa-brands fa-magento","fa-solid fa-magnet","fa-solid fa-magnifying-glass","fa-solid fa-magnifying-glass-arrow-right","fa-solid fa-magnifying-glass-chart","fa-solid fa-magnifying-glass-dollar","fa-solid fa-magnifying-glass-location","fa-solid fa-magnifying-glass-minus","fa-solid fa-magnifying-glass-plus","fa-brands fa-mailchimp","fa-solid fa-manat-sign","fa-brands fa-mandalorian","fa-regular fa-map","fa-solid fa-map","fa-solid fa-map-location","fa-solid fa-map-location-dot","fa-solid fa-map-pin","fa-brands fa-markdown","fa-solid fa-marker","fa-solid fa-mars","fa-solid fa-mars-and-venus","fa-solid fa-mars-and-venus-burst","fa-solid fa-mars-double","fa-solid fa-mars-stroke","fa-solid fa-mars-stroke-right","fa-solid fa-mars-stroke-up","fa-solid fa-martini-glass","fa-solid fa-martini-glass-citrus","fa-solid fa-martini-glass-empty","fa-solid fa-mask","fa-solid fa-mask-face","fa-solid fa-mask-ventilator","fa-solid fa-masks-theater","fa-brands fa-mastodon","fa-solid fa-mattress-pillow","fa-brands fa-maxcdn","fa-solid fa-maximize","fa-brands fa-mdb","fa-solid fa-medal","fa-brands fa-medapps","fa-brands fa-medium","fa-brands fa-medium-m","fa-brands fa-medrt","fa-brands fa-meetup","fa-brands fa-megaport","fa-solid fa-memory","fa-brands fa-mendeley","fa-solid fa-menorah","fa-solid fa-mercury","fa-regular fa-message","fa-solid fa-message","fa-brands fa-meta","fa-solid fa-meteor","fa-brands fa-microblog","fa-solid fa-microchip","fa-solid fa-microphone","fa-solid fa-microphone-lines","fa-solid fa-microphone-lines-slash","fa-solid fa-microphone-slash","fa-solid fa-microscope","fa-brands fa-microsoft","fa-solid fa-mill-sign","fa-solid fa-minimize","fa-brands fa-mintbit","fa-solid fa-minus","fa-solid fa-mitten","fa-brands fa-mix","fa-brands fa-mixcloud","fa-brands fa-mixer","fa-brands fa-mizuni","fa-solid fa-mobile","fa-solid fa-mobile-button","fa-solid fa-mobile-retro","fa-solid fa-mobile-screen","fa-solid fa-mobile-screen-button","fa-solid fa-mobile-vibrate","fa-brands fa-modx","fa-brands fa-monero","fa-solid fa-money-bill","fa-regular fa-money-bill-1","fa-solid fa-money-bill-1","fa-solid fa-money-bill-1-wave","fa-solid fa-money-bill-transfer","fa-solid fa-money-bill-trend-up","fa-solid fa-money-bill-wave","fa-solid fa-money-bill-wheat","fa-solid fa-money-bills","fa-solid fa-money-check","fa-solid fa-money-check-dollar","fa-solid fa-monument","fa-regular fa-moon","fa-solid fa-moon","fa-solid fa-mortar-pestle","fa-solid fa-mosque","fa-solid fa-mosquito","fa-solid fa-mosquito-net","fa-solid fa-motorcycle","fa-solid fa-mound","fa-solid fa-mountain","fa-solid fa-mountain-city","fa-solid fa-mountain-sun","fa-solid fa-mug-hot","fa-solid fa-mug-saucer","fa-solid fa-music","fa-solid fa-n","fa-solid fa-naira-sign","fa-brands fa-napster","fa-brands fa-neos","fa-solid fa-network-wired","fa-solid fa-neuter","fa-regular fa-newspaper","fa-solid fa-newspaper","fa-brands fa-nfc-directional","fa-brands fa-nfc-symbol","fa-brands fa-nimblr","fa-brands fa-node","fa-brands fa-node-js","fa-solid fa-non-binary","fa-solid fa-not-equal","fa-solid fa-notdef","fa-regular fa-note-sticky","fa-solid fa-note-sticky","fa-solid fa-notes-medical","fa-brands fa-notion","fa-brands fa-npm","fa-brands fa-ns8","fa-brands fa-nutritionix","fa-solid fa-o","fa-regular fa-object-group","fa-solid fa-object-group","fa-regular fa-object-ungroup","fa-solid fa-object-ungroup","fa-solid fa-octagon","fa-brands fa-octopus-deploy","fa-brands fa-odnoklassniki","fa-brands fa-odysee","fa-solid fa-oil-can","fa-solid fa-oil-well","fa-brands fa-old-republic","fa-solid fa-om","fa-brands fa-openai","fa-brands fa-opencart","fa-brands fa-openid","fa-brands fa-opensuse","fa-brands fa-opera","fa-brands fa-optin-monster","fa-brands fa-orcid","fa-brands fa-osi","fa-solid fa-otter","fa-solid fa-outdent","fa-solid fa-p","fa-brands fa-padlet","fa-brands fa-page4","fa-brands fa-pagelines","fa-solid fa-pager","fa-solid fa-paint-roller","fa-solid fa-paintbrush","fa-solid fa-palette","fa-brands fa-palfed","fa-solid fa-pallet","fa-brands fa-pandora","fa-solid fa-panorama","fa-regular fa-paper-plane","fa-solid fa-paper-plane","fa-solid fa-paperclip","fa-solid fa-parachute-box","fa-solid fa-paragraph","fa-solid fa-passport","fa-regular fa-paste","fa-solid fa-paste","fa-brands fa-patreon","fa-solid fa-pause","fa-solid fa-paw","fa-brands fa-paypal","fa-solid fa-peace","fa-solid fa-pen","fa-solid fa-pen-clip","fa-solid fa-pen-fancy","fa-solid fa-pen-nib","fa-solid fa-pen-ruler","fa-regular fa-pen-to-square","fa-solid fa-pen-to-square","fa-solid fa-pencil","fa-solid fa-pentagon","fa-solid fa-people-arrows","fa-solid fa-people-carry-box","fa-solid fa-people-group","fa-solid fa-people-line","fa-solid fa-people-pulling","fa-solid fa-people-robbery","fa-solid fa-people-roof","fa-solid fa-pepper-hot","fa-brands fa-perbyte","fa-solid fa-percent","fa-brands fa-periscope","fa-solid fa-person","fa-solid fa-person-arrow-down-to-line","fa-solid fa-person-arrow-up-from-line","fa-solid fa-person-biking","fa-solid fa-person-booth","fa-solid fa-person-breastfeeding","fa-solid fa-person-burst","fa-solid fa-person-cane","fa-solid fa-person-chalkboard","fa-solid fa-person-circle-check","fa-solid fa-person-circle-exclamation","fa-solid fa-person-circle-minus","fa-solid fa-person-circle-plus","fa-solid fa-person-circle-question","fa-solid fa-person-circle-xmark","fa-solid fa-person-digging","fa-solid fa-person-dots-from-line","fa-solid fa-person-dress","fa-solid fa-person-dress-burst","fa-solid fa-person-drowning","fa-solid fa-person-falling","fa-solid fa-person-falling-burst","fa-solid fa-person-half-dress","fa-solid fa-person-harassing","fa-solid fa-person-hiking","fa-solid fa-person-military-pointing","fa-solid fa-person-military-rifle","fa-solid fa-person-military-to-person","fa-solid fa-person-praying","fa-solid fa-person-pregnant","fa-solid fa-person-rays","fa-solid fa-person-rifle","fa-solid fa-person-running","fa-solid fa-person-shelter","fa-solid fa-person-skating","fa-solid fa-person-skiing","fa-solid fa-person-skiing-nordic","fa-solid fa-person-snowboarding","fa-solid fa-person-swimming","fa-solid fa-person-through-window","fa-solid fa-person-walking","fa-solid fa-person-walking-arrow-loop-left","fa-solid fa-person-walking-arrow-right","fa-solid fa-person-walking-dashed-line-arrow-right","fa-solid fa-person-walking-luggage","fa-solid fa-person-walking-with-cane","fa-solid fa-peseta-sign","fa-solid fa-peso-sign","fa-brands fa-phabricator","fa-brands fa-phoenix-framework","fa-brands fa-phoenix-squadron","fa-solid fa-phone","fa-solid fa-phone-flip","fa-solid fa-phone-slash","fa-solid fa-phone-volume","fa-solid fa-photo-film","fa-brands fa-php","fa-brands fa-pied-piper","fa-brands fa-pied-piper-alt","fa-brands fa-pied-piper-hat","fa-brands fa-pied-piper-pp","fa-brands fa-pied-piper-square","fa-solid fa-piggy-bank","fa-solid fa-pills","fa-brands fa-pinterest","fa-brands fa-pinterest-p","fa-brands fa-pix","fa-brands fa-pixelfed","fa-brands fa-pixiv","fa-solid fa-pizza-slice","fa-solid fa-place-of-worship","fa-solid fa-plane","fa-solid fa-plane-arrival","fa-solid fa-plane-circle-check","fa-solid fa-plane-circle-exclamation","fa-solid fa-plane-circle-xmark","fa-solid fa-plane-departure","fa-solid fa-plane-lock","fa-solid fa-plane-slash","fa-solid fa-plane-up","fa-solid fa-plant-wilt","fa-solid fa-plate-wheat","fa-solid fa-play","fa-brands fa-playstation","fa-solid fa-plug","fa-solid fa-plug-circle-bolt","fa-solid fa-plug-circle-check","fa-solid fa-plug-circle-exclamation","fa-solid fa-plug-circle-minus","fa-solid fa-plug-circle-plus","fa-solid fa-plug-circle-xmark","fa-solid fa-plus","fa-solid fa-plus-minus","fa-solid fa-podcast","fa-solid fa-poo","fa-solid fa-poo-storm","fa-solid fa-poop","fa-solid fa-power-off","fa-solid fa-prescription","fa-solid fa-prescription-bottle","fa-solid fa-prescription-bottle-medical","fa-solid fa-print","fa-brands fa-product-hunt","fa-solid fa-pump-medical","fa-solid fa-pump-soap","fa-brands fa-pushed","fa-solid fa-puzzle-piece","fa-brands fa-python","fa-solid fa-q","fa-brands fa-qq","fa-solid fa-qrcode","fa-solid fa-question","fa-brands fa-quinscape","fa-brands fa-quora","fa-solid fa-quote-left","fa-solid fa-quote-right","fa-solid fa-r","fa-brands fa-r-project","fa-solid fa-radiation","fa-solid fa-radio","fa-solid fa-rainbow","fa-solid fa-ranking-star","fa-brands fa-raspberry-pi","fa-brands fa-ravelry","fa-brands fa-react","fa-brands fa-reacteurope","fa-brands fa-readme","fa-brands fa-rebel","fa-solid fa-receipt","fa-solid fa-record-vinyl","fa-solid fa-rectangle-ad","fa-regular fa-rectangle-list","fa-solid fa-rectangle-list","fa-regular fa-rectangle-xmark","fa-solid fa-rectangle-xmark","fa-solid fa-recycle","fa-brands fa-red-river","fa-brands fa-reddit","fa-brands fa-reddit-alien","fa-brands fa-redhat","fa-regular fa-registered","fa-solid fa-registered","fa-brands fa-rendact","fa-brands fa-renren","fa-solid fa-repeat","fa-solid fa-reply","fa-solid fa-reply-all","fa-brands fa-replyd","fa-solid fa-republican","fa-brands fa-researchgate","fa-brands fa-resolving","fa-solid fa-restroom","fa-solid fa-retweet","fa-brands fa-rev","fa-solid fa-ribbon","fa-solid fa-right-from-bracket","fa-solid fa-right-left","fa-solid fa-right-long","fa-solid fa-right-to-bracket","fa-solid fa-ring","fa-solid fa-road","fa-solid fa-road-barrier","fa-solid fa-road-bridge","fa-solid fa-road-circle-check","fa-solid fa-road-circle-exclamation","fa-solid fa-road-circle-xmark","fa-solid fa-road-lock","fa-solid fa-road-spikes","fa-solid fa-robot","fa-solid fa-rocket","fa-brands fa-rocketchat","fa-brands fa-rockrms","fa-solid fa-rotate","fa-solid fa-rotate-left","fa-solid fa-rotate-right","fa-solid fa-route","fa-solid fa-rss","fa-solid fa-ruble-sign","fa-solid fa-rug","fa-solid fa-ruler","fa-solid fa-ruler-combined","fa-solid fa-ruler-horizontal","fa-solid fa-ruler-vertical","fa-solid fa-rupee-sign","fa-solid fa-rupiah-sign","fa-brands fa-rust","fa-solid fa-s","fa-solid fa-sack-dollar","fa-solid fa-sack-xmark","fa-brands fa-safari","fa-solid fa-sailboat","fa-brands fa-salesforce","fa-brands fa-sass","fa-solid fa-satellite","fa-solid fa-satellite-dish","fa-solid fa-scale-balanced","fa-solid fa-scale-unbalanced","fa-solid fa-scale-unbalanced-flip","fa-brands fa-schlix","fa-solid fa-school","fa-solid fa-school-circle-check","fa-solid fa-school-circle-exclamation","fa-solid fa-school-circle-xmark","fa-solid fa-school-flag","fa-solid fa-school-lock","fa-solid fa-scissors","fa-brands fa-screenpal","fa-solid fa-screwdriver","fa-solid fa-screwdriver-wrench","fa-brands fa-scribd","fa-solid fa-scroll","fa-solid fa-scroll-torah","fa-solid fa-sd-card","fa-brands fa-searchengin","fa-solid fa-section","fa-solid fa-seedling","fa-brands fa-sellcast","fa-brands fa-sellsy","fa-solid fa-septagon","fa-solid fa-server","fa-brands fa-servicestack","fa-solid fa-shapes","fa-solid fa-share","fa-regular fa-share-from-square","fa-solid fa-share-from-square","fa-solid fa-share-nodes","fa-solid fa-sheet-plastic","fa-solid fa-shekel-sign","fa-solid fa-shield","fa-solid fa-shield-cat","fa-solid fa-shield-dog","fa-solid fa-shield-halved","fa-solid fa-shield-heart","fa-solid fa-shield-virus","fa-solid fa-ship","fa-solid fa-shirt","fa-brands fa-shirtsinbulk","fa-solid fa-shoe-prints","fa-brands fa-shoelace","fa-solid fa-shop","fa-solid fa-shop-lock","fa-solid fa-shop-slash","fa-brands fa-shopify","fa-brands fa-shopware","fa-solid fa-shower","fa-solid fa-shrimp","fa-solid fa-shuffle","fa-solid fa-shuttle-space","fa-solid fa-sign-hanging","fa-solid fa-signal","fa-brands fa-signal-messenger","fa-solid fa-signature","fa-solid fa-signs-post","fa-solid fa-sim-card","fa-brands fa-simplybuilt","fa-solid fa-single-quote-left","fa-solid fa-single-quote-right","fa-solid fa-sink","fa-brands fa-sistrix","fa-solid fa-sitemap","fa-brands fa-sith","fa-brands fa-sitrox","fa-brands fa-sketch","fa-solid fa-skull","fa-solid fa-skull-crossbones","fa-brands fa-skyatlas","fa-brands fa-skype","fa-brands fa-slack","fa-brands fa-slack-hash","fa-solid fa-slash","fa-solid fa-sleigh","fa-solid fa-sliders","fa-brands fa-slideshare","fa-solid fa-smog","fa-solid fa-smoking","fa-brands fa-snapchat","fa-brands fa-snapchat-ghost","fa-regular fa-snowflake","fa-solid fa-snowflake","fa-solid fa-snowman","fa-solid fa-snowplow","fa-solid fa-soap","fa-solid fa-socks","fa-solid fa-solar-panel","fa-solid fa-sort","fa-solid fa-sort-down","fa-solid fa-sort-up","fa-brands fa-soundcloud","fa-brands fa-sourcetree","fa-solid fa-spa","fa-brands fa-space-awesome","fa-solid fa-spaghetti-monster-flying","fa-brands fa-speakap","fa-brands fa-speaker-deck","fa-solid fa-spell-check","fa-solid fa-spider","fa-solid fa-spinner","fa-solid fa-spiral","fa-solid fa-splotch","fa-solid fa-spoon","fa-brands fa-spotify","fa-solid fa-spray-can","fa-solid fa-spray-can-sparkles","fa-regular fa-square","fa-solid fa-square","fa-solid fa-square-arrow-up-right","fa-brands fa-square-behance","fa-solid fa-square-binary","fa-brands fa-square-bluesky","fa-regular fa-square-caret-down","fa-solid fa-square-caret-down","fa-regular fa-square-caret-left","fa-solid fa-square-caret-left","fa-regular fa-square-caret-right","fa-solid fa-square-caret-right","fa-regular fa-square-caret-up","fa-solid fa-square-caret-up","fa-regular fa-square-check","fa-solid fa-square-check","fa-brands fa-square-dribbble","fa-solid fa-square-envelope","fa-brands fa-square-facebook","fa-brands fa-square-figma","fa-brands fa-square-font-awesome","fa-brands fa-square-font-awesome-stroke","fa-regular fa-square-full","fa-solid fa-square-full","fa-brands fa-square-git","fa-brands fa-square-github","fa-brands fa-square-gitlab","fa-brands fa-square-google-plus","fa-solid fa-square-h","fa-brands fa-square-hacker-news","fa-brands fa-square-instagram","fa-brands fa-square-js","fa-brands fa-square-lastfm","fa-brands fa-square-letterboxd","fa-brands fa-square-linkedin","fa-regular fa-square-minus","fa-solid fa-square-minus","fa-solid fa-square-nfi","fa-brands fa-square-odnoklassniki","fa-solid fa-square-parking","fa-solid fa-square-pen","fa-solid fa-square-person-confined","fa-solid fa-square-phone","fa-solid fa-square-phone-flip","fa-brands fa-square-pied-piper","fa-brands fa-square-pinterest","fa-regular fa-square-plus","fa-solid fa-square-plus","fa-solid fa-square-poll-horizontal","fa-solid fa-square-poll-vertical","fa-brands fa-square-reddit","fa-solid fa-square-root-variable","fa-solid fa-square-rss","fa-solid fa-square-share-nodes","fa-brands fa-square-snapchat","fa-brands fa-square-steam","fa-brands fa-square-threads","fa-brands fa-square-tumblr","fa-brands fa-square-twitter","fa-solid fa-square-up-right","fa-brands fa-square-upwork","fa-brands fa-square-viadeo","fa-brands fa-square-vimeo","fa-solid fa-square-virus","fa-brands fa-square-web-awesome","fa-brands fa-square-web-awesome-stroke","fa-brands fa-square-whatsapp","fa-brands fa-square-x-twitter","fa-brands fa-square-xing","fa-solid fa-square-xmark","fa-brands fa-square-youtube","fa-brands fa-squarespace","fa-brands fa-stack-exchange","fa-brands fa-stack-overflow","fa-brands fa-stackpath","fa-solid fa-staff-snake","fa-solid fa-stairs","fa-solid fa-stamp","fa-solid fa-stapler","fa-regular fa-star","fa-solid fa-star","fa-solid fa-star-and-crescent","fa-regular fa-star-half","fa-solid fa-star-half","fa-regular fa-star-half-stroke","fa-solid fa-star-half-stroke","fa-solid fa-star-of-david","fa-solid fa-star-of-life","fa-brands fa-staylinked","fa-brands fa-steam","fa-brands fa-steam-symbol","fa-solid fa-sterling-sign","fa-solid fa-stethoscope","fa-brands fa-sticker-mule","fa-solid fa-stop","fa-solid fa-stopwatch","fa-solid fa-stopwatch-20","fa-solid fa-store","fa-solid fa-store-slash","fa-brands fa-strava","fa-solid fa-street-view","fa-solid fa-strikethrough","fa-brands fa-stripe","fa-brands fa-stripe-s","fa-solid fa-stroopwafel","fa-brands fa-stubber","fa-brands fa-studiovinari","fa-brands fa-stumbleupon","fa-brands fa-stumbleupon-circle","fa-solid fa-subscript","fa-solid fa-suitcase","fa-solid fa-suitcase-medical","fa-solid fa-suitcase-rolling","fa-regular fa-sun","fa-solid fa-sun","fa-solid fa-sun-plant-wilt","fa-brands fa-superpowers","fa-solid fa-superscript","fa-brands fa-supple","fa-brands fa-suse","fa-solid fa-swatchbook","fa-brands fa-swift","fa-brands fa-symfony","fa-solid fa-synagogue","fa-solid fa-syringe","fa-solid fa-t","fa-solid fa-table","fa-solid fa-table-cells","fa-solid fa-table-cells-column-lock","fa-solid fa-table-cells-large","fa-solid fa-table-cells-row-lock","fa-solid fa-table-cells-row-unlock","fa-solid fa-table-columns","fa-solid fa-table-list","fa-solid fa-table-tennis-paddle-ball","fa-solid fa-tablet","fa-solid fa-tablet-button","fa-solid fa-tablet-screen-button","fa-solid fa-tablets","fa-solid fa-tachograph-digital","fa-solid fa-tag","fa-solid fa-tags","fa-solid fa-tape","fa-solid fa-tarp","fa-solid fa-tarp-droplet","fa-solid fa-taxi","fa-brands fa-teamspeak","fa-solid fa-teeth","fa-solid fa-teeth-open","fa-brands fa-telegram","fa-brands fa-telegram-plane","fa-solid fa-temperature-arrow-down","fa-solid fa-temperature-arrow-up","fa-solid fa-temperature-empty","fa-solid fa-temperature-full","fa-solid fa-temperature-half","fa-solid fa-temperature-high","fa-solid fa-temperature-low","fa-solid fa-temperature-quarter","fa-solid fa-temperature-three-quarters","fa-brands fa-tencent-weibo","fa-solid fa-tenge-sign","fa-solid fa-tent","fa-solid fa-tent-arrow-down-to-line","fa-solid fa-tent-arrow-left-right","fa-solid fa-tent-arrow-turn-left","fa-solid fa-tent-arrows-down","fa-solid fa-tents","fa-solid fa-terminal","fa-brands fa-tex","fa-solid fa-text-height","fa-solid fa-text-slash","fa-solid fa-text-width","fa-brands fa-the-red-yeti","fa-brands fa-themeco","fa-brands fa-themeisle","fa-solid fa-thermometer","fa-brands fa-think-peaks","fa-brands fa-threads","fa-regular fa-thumbs-down","fa-solid fa-thumbs-down","fa-regular fa-thumbs-up","fa-solid fa-thumbs-up","fa-solid fa-thumbtack","fa-solid fa-thumbtack-slash","fa-solid fa-ticket","fa-solid fa-ticket-simple","fa-brands fa-tidal","fa-brands fa-tiktok","fa-solid fa-timeline","fa-solid fa-toggle-off","fa-solid fa-toggle-on","fa-solid fa-toilet","fa-solid fa-toilet-paper","fa-solid fa-toilet-paper-slash","fa-solid fa-toilet-portable","fa-solid fa-toilets-portable","fa-solid fa-toolbox","fa-solid fa-tooth","fa-solid fa-torii-gate","fa-solid fa-tornado","fa-solid fa-tower-broadcast","fa-solid fa-tower-cell","fa-solid fa-tower-observation","fa-solid fa-tractor","fa-brands fa-trade-federation","fa-solid fa-trademark","fa-solid fa-traffic-light","fa-solid fa-trailer","fa-solid fa-train","fa-solid fa-train-subway","fa-solid fa-train-tram","fa-solid fa-transgender","fa-solid fa-trash","fa-solid fa-trash-arrow-up","fa-regular fa-trash-can","fa-solid fa-trash-can","fa-solid fa-trash-can-arrow-up","fa-solid fa-tree","fa-solid fa-tree-city","fa-brands fa-trello","fa-solid fa-triangle-exclamation","fa-solid fa-trophy","fa-solid fa-trowel","fa-solid fa-trowel-bricks","fa-regular fa-truck","fa-solid fa-truck","fa-solid fa-truck-arrow-right","fa-solid fa-truck-droplet","fa-solid fa-truck-fast","fa-solid fa-truck-field","fa-solid fa-truck-field-un","fa-solid fa-truck-front","fa-solid fa-truck-medical","fa-solid fa-truck-monster","fa-solid fa-truck-moving","fa-solid fa-truck-pickup","fa-solid fa-truck-plane","fa-solid fa-truck-ramp-box","fa-solid fa-tty","fa-brands fa-tumblr","fa-solid fa-turkish-lira-sign","fa-solid fa-turn-down","fa-solid fa-turn-up","fa-solid fa-tv","fa-brands fa-twitch","fa-brands fa-twitter","fa-brands fa-typo3","fa-solid fa-u","fa-brands fa-uber","fa-brands fa-ubuntu","fa-brands fa-uikit","fa-brands fa-umbraco","fa-solid fa-umbrella","fa-solid fa-umbrella-beach","fa-brands fa-uncharted","fa-solid fa-underline","fa-brands fa-uniregistry","fa-brands fa-unity","fa-solid fa-universal-access","fa-solid fa-unlock","fa-solid fa-unlock-keyhole","fa-brands fa-unsplash","fa-brands fa-untappd","fa-solid fa-up-down","fa-solid fa-up-down-left-right","fa-solid fa-up-long","fa-solid fa-up-right-and-down-left-from-center","fa-solid fa-up-right-from-square","fa-solid fa-upload","fa-brands fa-ups","fa-brands fa-upwork","fa-brands fa-usb","fa-regular fa-user","fa-solid fa-user","fa-solid fa-user-astronaut","fa-solid fa-user-check","fa-solid fa-user-clock","fa-solid fa-user-doctor","fa-solid fa-user-gear","fa-solid fa-user-graduate","fa-solid fa-user-group","fa-solid fa-user-injured","fa-solid fa-user-lock","fa-solid fa-user-minus","fa-solid fa-user-ninja","fa-solid fa-user-nurse","fa-solid fa-user-pen","fa-solid fa-user-plus","fa-solid fa-user-secret","fa-solid fa-user-shield","fa-solid fa-user-slash","fa-solid fa-user-tag","fa-solid fa-user-tie","fa-solid fa-user-xmark","fa-solid fa-users","fa-solid fa-users-between-lines","fa-solid fa-users-gear","fa-solid fa-users-line","fa-solid fa-users-rays","fa-solid fa-users-rectangle","fa-solid fa-users-slash","fa-solid fa-users-viewfinder","fa-brands fa-usps","fa-brands fa-ussunnah","fa-solid fa-utensils","fa-solid fa-v","fa-brands fa-vaadin","fa-solid fa-van-shuttle","fa-solid fa-vault","fa-solid fa-venus","fa-solid fa-venus-double","fa-solid fa-venus-mars","fa-solid fa-vest","fa-solid fa-vest-patches","fa-brands fa-viacoin","fa-brands fa-viadeo","fa-solid fa-vial","fa-solid fa-vial-circle-check","fa-solid fa-vial-virus","fa-solid fa-vials","fa-brands fa-viber","fa-solid fa-video","fa-solid fa-video-slash","fa-solid fa-vihara","fa-brands fa-vimeo","fa-brands fa-vimeo-v","fa-brands fa-vine","fa-solid fa-virus","fa-solid fa-virus-covid","fa-solid fa-virus-covid-slash","fa-solid fa-virus-slash","fa-solid fa-viruses","fa-brands fa-vk","fa-brands fa-vnv","fa-solid fa-voicemail","fa-solid fa-volcano","fa-solid fa-volleyball","fa-solid fa-volume-high","fa-solid fa-volume-low","fa-solid fa-volume-off","fa-solid fa-volume-xmark","fa-solid fa-vr-cardboard","fa-brands fa-vsco","fa-brands fa-vuejs","fa-solid fa-w","fa-brands fa-w3c","fa-solid fa-walkie-talkie","fa-solid fa-wallet","fa-solid fa-wand-magic","fa-solid fa-wand-magic-sparkles","fa-solid fa-wand-sparkles","fa-solid fa-warehouse","fa-brands fa-watchman-monitoring","fa-solid fa-water","fa-solid fa-water-ladder","fa-solid fa-wave-square","fa-brands fa-waze","fa-brands fa-web-awesome","fa-solid fa-web-awesome","fa-brands fa-webflow","fa-brands fa-weebly","fa-brands fa-weibo","fa-solid fa-weight-hanging","fa-solid fa-weight-scale","fa-brands fa-weixin","fa-brands fa-whatsapp","fa-solid fa-wheat-awn","fa-solid fa-wheat-awn-circle-exclamation","fa-solid fa-wheelchair","fa-solid fa-wheelchair-move","fa-solid fa-whiskey-glass","fa-brands fa-whmcs","fa-solid fa-wifi","fa-brands fa-wikipedia-w","fa-solid fa-wind","fa-regular fa-window-maximize","fa-solid fa-window-maximize","fa-regular fa-window-minimize","fa-solid fa-window-minimize","fa-regular fa-window-restore","fa-solid fa-window-restore","fa-brands fa-windows","fa-solid fa-wine-bottle","fa-solid fa-wine-glass","fa-solid fa-wine-glass-empty","fa-brands fa-wirsindhandwerk","fa-brands fa-wix","fa-brands fa-wizards-of-the-coast","fa-brands fa-wodu","fa-brands fa-wolf-pack-battalion","fa-solid fa-won-sign","fa-brands fa-wordpress","fa-brands fa-wordpress-simple","fa-solid fa-worm","fa-brands fa-wpbeginner","fa-brands fa-wpexplorer","fa-brands fa-wpforms","fa-brands fa-wpressr","fa-solid fa-wrench","fa-brands fa-wsh","fa-solid fa-x","fa-solid fa-x-ray","fa-brands fa-x-twitter","fa-brands fa-xbox","fa-brands fa-xing","fa-solid fa-xmark","fa-solid fa-xmarks-lines","fa-solid fa-y","fa-brands fa-y-combinator","fa-brands fa-yahoo","fa-brands fa-yammer","fa-brands fa-yandex","fa-brands fa-yandex-international","fa-brands fa-yarn","fa-brands fa-yelp","fa-solid fa-yen-sign","fa-solid fa-yin-yang","fa-brands fa-yoast","fa-brands fa-youtube","fa-solid fa-z","fa-brands fa-zhihu"],Hn=y.GradientPicker||y.__experimentalGradientPicker,Wn=e=>(e=>e?.slice(e?.indexOf(" fa-")+4))(e)?.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),Un=(0, |
| 242 |
f.withSelect)((e=>{const{gradients:t}=e("core/block-editor").getSettings();return{gradients:t.length>12?t.slice(0,12):t}}))((e=>{const{className:t="",label:n=(0,x.__)("Select Icon:"),value:o={},onChange:i,defaults:s={},isSize:a=!0,isColor:c=!0,gradients:d}=e,u={class:"",fontSize:16,colorType:"solid",color:"inherit",gradient:r},p=e=>s[e]||u[e],h=e=>o[e]||p(e),g=(e,t)=>i({...o,[e]:t}),[b,f]=(0,m.useState)(""),[k,w]=(0,m.useState)(!1),_=Fn.filter((e=>Wn(e).toLowerCase().includes(b.toLowerCase())));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:`bPlIconTitle ${t}`,children:[(0,l.jsx)(v,{className:"mt0 mb0",children:n}),(0,l.jsx)(y.Tooltip,{text:Wn(o.class),placement:"top",position:"top",children:(0,l.jsx)("i",{className:o.class})})]}),(0,l.jsxs)("div",{className:"bPlIconSelect",children:[(0,l.jsx)("input",{type:"search",value:b,onClick:()=>w(!k),placeholder:Wn(h("class"))||"Search & Select Icon",onChange:e=>f(e.target.value)}),(0,l.jsx)("span",{className:"dashicon dashicons dashicons-"+(k?"arrow-up":"arrow-down"),onClick:()=>w(!k)}),k&&(0,l.jsx)("div",{className:"bPlIconLists",children:_?.map((e=>(0,l.jsx)(y.Tooltip,{text:Wn(e),placement:"top",position:"top",children:(0,l.jsx)("i",{onClick:()=>{i({...o,class:e}),f(""),w(!1)},className:e})},e)))})]}),a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon Size:")}),(0,l.jsx)(y.RangeControl,{value:h("fontSize"),onChange:e=>g("fontSize",e),min:0,max:400,step:1,allowReset:!0,resetFallbackValue:p("fontSize"),initialPosition:p("fontSize")})]}),c&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Color Type:")}),(0,l.jsx)(Tn,{value:h("colorType"),onChange:e=>g("colorType",e),options:ze,size:"small"})]}),"gradient"===h("colorType")?(0,l.jsx)(Hn,{value:h("gradient"),onChange:e=>g("gradient",e),gradients:d}):(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:"),value:h("color"),onChange:e=>g("color",e),defaultColor:p("color")})]})]})})),Gn=({className:e="",text:t="Loading...",orientation:n="horizontal",iconSize:o="2rem",iconThickness:i="4px",textSize:s="18px"})=>(0,l.jsx)("div",{className:`bPlLoading ${e}`,children:(0,l.jsxs)("div",{className:`loadingContent ${n}`,children:[(0,l.jsx)("div",{className:"loadingSpinner",style:{width:o,height:o,borderWidth:i}}),t&&(0,l.jsx)("p",{className:"loadingText",style:{fontSize:s},children:t})]})}),Vn=e=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",...e,children:[(0,l.jsx)("path",{fill:o,d:"m470 163.9c-0.1 35.6-15.8 68-40.5 91.2-24.1 23-57 37.2-92 37.2h-15.4c-38.6 0-69.9 31.3-69.9 69.9v115.2h-89.4c-10.8 0-19.4-8.8-19.4-19.5v-143.8c0-8.7-4.9-17.3-13-20.5-8.3-3.3-16.9-0.9-22.3 4.3-0.2 0.3-0.4 0.4-0.6 0.6-11.3 12.3-27.4 19.9-45.3 19.9-36.8 0-66-31.9-61.8-69.4 3.3-28.9 27.3-52 56.2-54.6 20.2-1.7 38.7 6.2 51.2 19.7 4.8 4.8 12.1 7.3 19.6 5.5 9.6-2.2 16.1-11.3 16.1-21.3v-144c0-10.8 8.7-19.4 19.4-19.4h63.3c11.1 0 21.2 8.1 22.1 19.1 0.4 6.5-1.9 12.4-6 16.5-12.3 11.4-20.1 27.6-20.1 45.6 0 34.4 27.9 62.1 62.2 62.1 34.4 0 62.1-27.7 62.1-62.1 0-18-7.6-34.1-19.8-45.4-0.2-0.2-0.3-0.4-0.6-0.6-4.7-4.9-7-12.2-5-19.7 2.4-9.6 11.8-15.7 21.7-15.6 34.9 0.5 66.5 14.7 89.4 37.6 23.4 23.5 37.9 55.7 37.8 91.5z"}),(0,l.jsx)("path",{fill:s,d:"m470 348.7c0 71.1-57.6 128.7-128.7 128.7h-89.1v-115.2c0-38.6 31.3-69.9 69.9-69.9h15.4c35 0 67.9-14.2 92-37.2 0.9 0.8 1.9 1.7 2.7 2.7 23.4 23.2 37.8 55.4 37.8 90.9z"})]}),qn=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:20,viewBox:"0 0 512 512",...e,children:(0,l.jsx)("path",{d:"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"})}),Yn=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:20,viewBox:"0 0 20 20",fill:"currentColor",stroke:"currentColor",...e,children:(0,l.jsx)("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})}),Kn="bPlIconLibrary";let Qn=null;const Zn=({className:e="",label:t=(0,x.__)("Icon Library"),value:n,onChange:o=()=>{}})=>{const[i,s]=(0,m.useState)(!1),[r,c]=(0,m.useState)("all"),[d,u]=(0,m.useState)(""),[p,h]=(0,m.useState)({}),[g,b]=(0,m.useState)(n||""),[f,k]=(0,m.useState)(1),[w,_]=(0,m.useState)(null),[C,j]=(0,m.useState)(!1),$=(0,m.useRef)(null),S=(0,m.useRef)(null);(0,m.useEffect)((()=>{if(!i||w)return;let e=!1;return j(!1),(Qn||(Qn=Promise.all([a.e(7493).then(a.t.bind(a,693,19)),a.e(2907).then(a.t.bind(a,9664,19)),a.e(6706).then(a.t.bind(a,9519,19))]).then((([e,t,n])=>({fontawesome:e.default||e,bootstrap:t.default||t,lucid:n.default||n}))).catch((e=>{throw Qn=null,e}))),Qn).then((t=>{e||_(t)})).catch((()=>{e||j(!0)})),()=>{e=!0}}),[i]);const T=(0,m.useMemo)((()=>w?{fontawesome:{label:"Font Awesome",styles:["regular","solid","brands"],icons:w.fontawesome},bootstrap:{label:"Bootstrap",styles:["regular","fill"],icons:w.bootstrap},lucid:{label:"Lucid Icons",styles:["regular"],icons:w.lucid}}:{}),[w]),M=(0,m.useMemo)((()=>w?"all"!==r?T[r]:{label:"All Icons",icons:[...w.fontawesome,...w.bootstrap,...w.lucid]}:{label:"All Icons",icons:[]}),[w,r,T]),N=(0,m.useMemo)((()=>xe((e=>{const t=d?M.icons.filter((t=>{const n=t.label.toLowerCase();return(t.terms?t.terms.map((e=>e.toLowerCase())):[]).some((t=>t.includes(e.toLowerCase())))||n.includes(e.toLowerCase())})):M.icons;h({icons:t})}),600)),[d,f,M]);(0,m.useEffect)((()=>{h({icons:M.icons})}),[r,w]),(0,m.useEffect)((()=>{b(n)}),[i]),(0,m.useEffect)((()=>{const e=e=>{$?.current?.contains(e.target)||s(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[i,$?.current]);const L=new IntersectionObserver((e=>{e.some((e=>e.isIntersecting))&&k((e=>e+1))}),{threshold:.3});return(0,m.useEffect)((()=>{S?.current&&L.observe(S?.current)}),[S,i,f,w]),(0,l.jsxs)("div",{className:Kn,children:[(0,l.jsxs)(y.PanelRow,{className:e,children:[(0,l.jsx)(v,{className:"",children:t}),(0,l.jsxs)(y.Flex,{align:"center",gap:4,justify:"right",children:[n&&(0,l.jsx)("div",{className:"panel-icon",dangerouslySetInnerHTML:{__html:n}}),(0,l.jsx)(y.Button,{variant:"primary",onClick:()=>s(!0),icon:"edit"}),n&&(0,l.jsx)(y.Button,{className:`${Kn}-removeIconBtn`,variant:"tertiary",onClick:()=>o(""),icon:"trash"})]})]}),i&&(0,l.jsx)("div",{className:`${Kn}ModalWrapper ${i?"isOpen":""}`,children:(0,l.jsxs)("div",{ref:$,className:`${Kn}Modal`,children:[(0,l.jsxs)("div",{className:`${Kn}Header`,children:[(0,l.jsxs)("div",{className:`${Kn}HeaderLogo`,children:[(0,l.jsx)(Vn,{}),(0,l.jsx)("h3",{children:"Icon Library"})]}),(0,l.jsx)("div",{className:`${Kn}HeaderClose`,children:(0,l.jsx)(Yn,{onClick:()=>s(!1)})})]}),(0,l.jsxs)("div",{className:`${Kn}Body`,children:[(0,l.jsx)("div",{className:`${Kn}Sidebar`,children:(0,l.jsx)("ul",{className:`${Kn}SidebarMenu`,children:[{label:"All Icons",value:"all"},{label:"Font Awesome",value:"fontawesome"},{label:"Bootstrap",value:"bootstrap"},{label:"Lucid Icons",value:"lucid"}].map(((e,t)=>(0,l.jsx)("li",{className:e.value===r?"active":"",onClick:()=>c(e.value),children:e.label},t)))})}),(0,l.jsxs)("div",{className:`${Kn}Main`,children:[(0,l.jsxs)("div",{className:`${Kn}Search`,children:[(0,l.jsx)("input",{value:d,onChange:e=>{const t=e.target.value;u(t),N(t)},type:"text",className:`${Kn}SearchInput`,placeholder:"Filter by name...",disabled:!w}),(0,l.jsx)(qn,{className:`${Kn}SearchIcon`})]}),(0,l.jsxs)("div",{className:`${Kn}IconsWrapper`,children:[C&&(0,l.jsx)("p",{className:`${Kn}LoadError`,children:(0,x.__)("Could not load the icons. Please close and reopen the library to try again.")}),!w&&!C&&(0,l.jsx)(Gn,{text:(0,x.__)("Loading icons..."),orientation:"vertical"}),w&&(0,l.jsx)("div",{className:`${Kn}Icons`,children:p?.icons?.filter(((e,t)=>t<100*f)).map((e=>{ |
| 243 |
const t=e.svg;return Object.keys(t).map(((n,o)=>(0,l.jsxs)("div",{ref:S,onClick:()=>b(t[n]),className:`${Kn}Icon ${JSON.stringify(g)===JSON.stringify(t[n])?"isActive":""} `,children:[(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:t[n]}}),(0,l.jsx)("div",{className:`${Kn}IconLabel`,title:e.label,children:e.label})]},o)))}))})]})]})]}),(0,l.jsx)("div",{className:`${Kn}Footer`,children:(0,l.jsx)("button",{className:`${Kn}FooterInsert`,onClick:()=>{o(g),s(!1)},children:"Insert"})})]})})]})},Xn=window.ReactDOM,Jn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function eo(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function to(e){return"nodeType"in e}function no(e){var t,n;return e?eo(e)?e:to(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function oo(e){const{Document:t}=no(e);return e instanceof t}function io(e){return!eo(e)&&e instanceof no(e).HTMLElement}function so(e){return e instanceof no(e).SVGElement}function ao(e){return e?eo(e)?e.document:to(e)?oo(e)?e:io(e)||so(e)?e.ownerDocument:document:document:document}const ro=Jn?m.useLayoutEffect:m.useEffect;function lo(e){const t=(0,m.useRef)(e);return ro((()=>{t.current=e})),(0,m.useCallback)((function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)}),[])}function co(e,t){void 0===t&&(t=[e]);const n=(0,m.useRef)(e);return ro((()=>{n.current!==e&&(n.current=e)}),t),n}function uo(e,t){const n=(0,m.useRef)();return(0,m.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function po(e){const t=lo(e),n=(0,m.useRef)(null),o=(0,m.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function ho(e){const t=(0,m.useRef)();return(0,m.useEffect)((()=>{t.current=e}),[e]),t.current}let go={};function mo(e,t){return(0,m.useMemo)((()=>{if(t)return t;const n=null==go[e]?0:go[e]+1;return go[e]=n,e+"-"+n}),[e,t])}function bo(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce(((t,n)=>{const o=Object.entries(n);for(const[n,i]of o){const o=t[n];null!=o&&(t[n]=o+e*i)}return t}),{...t})}}const fo=bo(1),xo=bo(-1);function yo(e){if(!e)return!1;const{KeyboardEvent:t}=no(e.target);return t&&e instanceof t}function vo(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=no(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const ko=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[ko.Translate.toString(e),ko.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),wo="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function _o(e){return e.matches(wo)?e:e.querySelector(wo)}const Co={display:"none"};function jo(e){let{id:t,value:n}=e;return b().createElement("div",{id:t,style:Co},n)}function $o(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;return b().createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":o,"aria-atomic":!0},n)}const So=(0,m.createContext)(null),To={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},Mo={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function No(e){let{announcements:t=Mo,container:n,hiddenTextDescribedById:o,screenReaderInstructions:i=To}=e;const{announce:s,announcement:a}=function(){const[e,t]=(0,m.useState)("");return{announce:(0,m.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),r=mo("DndLiveRegion"),[l,c]=(0,m.useState)(!1);if((0,m.useEffect)((()=>{c(!0)}),[]),function(e){const t=(0,m.useContext)(So);(0,m.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}((0,m.useMemo)((()=>({onDragStart(e){let{active:n}=e;s(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:o}=e;t.onDragMove&&s(t.onDragMove({active:n,over:o}))},onDragOver(e){let{active:n,over:o}=e;s(t.onDragOver({active:n,over:o}))},onDragEnd(e){let{active:n,over:o}=e;s(t.onDragEnd({active:n,over:o}))},onDragCancel(e){let{active:n,over:o}=e;s(t.onDragCancel({active:n,over:o}))}})),[s,t])),!l)return null;const d=b().createElement(b().Fragment,null,b().createElement(jo,{id:o,value:i.draggable}),b().createElement($o,{id:r,announcement:a}));return n?(0,Xn.createPortal)(d,n):d}var Lo;function Eo(){}function Po(e,t){return(0,m.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function Ao(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,m.useMemo)((()=>[...t].filter((e=>null!=e))),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Lo||(Lo={}));const Bo=Object.freeze({x:0,y:0});function Io(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function Oo(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function Ro(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const zo=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=Ro(t,t.left,t.top),s=[];for(const e of o){const{id:t}=e,o=n.get(t);if(o){const n=(a=Ro(o),r=i,Math.sqrt(Math.pow(a.x-r.x,2)+Math.pow(a.y-r.y,2)));s.push({id:t,data:{droppableContainer:e,value:n}})}}var a,r;return s.sort(Io)};function Do(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),a=i-o,r=s-n;if(o<i&&n<s){const n=t.width*t.height,o=e.width*e.height,i=a*r;return Number((i/(n+o-i)).toFixed(4))}return 0}const Fo=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=[];for(const e of o){const{id:o}=e,s=n.get(o);if(s){const n=Do(s,t);n>0&&i.push({id:o,data:{droppableContainer:e,value:n}})}}return i.sort(Oo)};function Ho(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Bo}function Wo(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const Uo=Wo(1);const Go={ignoreTransform:!1};function Vo(e,t){void 0===t&&(t=Go);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:o}=no(e).getComputedStyle(e);t&&(n=function(e,t,n){const o=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}} |
| 244 |
if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!o)return e;const{scaleX:i,scaleY:s,x:a,y:r}=o,l=e.left-a-(1-i)*parseFloat(n),c=e.top-r-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),d=i?e.width/i:e.width,u=s?e.height/s:e.height;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l}}(n,t,o))}const{top:o,left:i,width:s,height:a,bottom:r,right:l}=n;return{top:o,left:i,width:s,height:a,bottom:r,right:l}}function qo(e){return Vo(e,{ignoreTransform:!0})}function Yo(e,t){const n=[];return e?function o(i){if(null!=t&&n.length>=t)return n;if(!i)return n;if(oo(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!io(i)||so(i))return n;if(n.includes(i))return n;const s=no(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=no(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const o=t[e];return"string"==typeof o&&n.test(o)}))}(i,s)&&n.push(i),function(e,t){return void 0===t&&(t=no(e).getComputedStyle(e)),"fixed"===t.position}(i,s)?n:o(i.parentNode)}(e):n}function Ko(e){const[t]=Yo(e,1);return null!=t?t:null}function Qo(e){return Jn&&e?eo(e)?e:to(e)?oo(e)||e===ao(e).scrollingElement?window:io(e)?e:null:null:null}function Zo(e){return eo(e)?e.scrollX:e.scrollLeft}function Xo(e){return eo(e)?e.scrollY:e.scrollTop}function Jo(e){return{x:Zo(e),y:Xo(e)}}var ei;function ti(e){return!(!Jn||!e)&&e===document.scrollingElement}function ni(e){const t={x:0,y:0},n=ti(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=o.y,isRight:e.scrollLeft>=o.x,maxScroll:o,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(ei||(ei={}));const oi={x:.2,y:.2};function ii(e,t,n,o,i){let{top:s,left:a,right:r,bottom:l}=n;void 0===o&&(o=10),void 0===i&&(i=oi);const{isTop:c,isBottom:d,isLeft:u,isRight:p}=ni(e),h={x:0,y:0},g={x:0,y:0},m=t.height*i.y,b=t.width*i.x;return!c&&s<=t.top+m?(h.y=ei.Backward,g.y=o*Math.abs((t.top+m-s)/m)):!d&&l>=t.bottom-m&&(h.y=ei.Forward,g.y=o*Math.abs((t.bottom-m-l)/m)),!p&&r>=t.right-b?(h.x=ei.Forward,g.x=o*Math.abs((t.right-b-r)/b)):!u&&a<=t.left+b&&(h.x=ei.Backward,g.x=o*Math.abs((t.left+b-a)/b)),{direction:h,speed:g}}function si(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:o,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:i,width:e.clientWidth,height:e.clientHeight}}function ai(e){return e.reduce(((e,t)=>fo(e,Jo(t))),Bo)}const ri=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+Zo(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+Xo(t)),0)}]];class li{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Yo(t),o=ai(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,i]of ri)for(const s of t)Object.defineProperty(this,s,{get:()=>{const t=i(n),a=o[e]-t;return this.rect[s]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ci{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var o;null==(o=this.target)||o.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function di(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t&&o>t.y}var ui,pi;function hi(e){e.preventDefault()}function gi(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(ui||(ui={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(pi||(pi={}));const mi={start:[pi.Space,pi.Enter],cancel:[pi.Esc],end:[pi.Space,pi.Enter,pi.Tab]},bi=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case pi.Right:return{...n,x:n.x+25};case pi.Left:return{...n,x:n.x-25};case pi.Down:return{...n,y:n.y+25};case pi.Up:return{...n,y:n.y-25}}};class fi{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new ci(ao(t)),this.windowListeners=new ci(no(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ui.Resize,this.handleCancel),this.windowListeners.add(ui.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(ui.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Vo),!e)return;const{top:n,left:o,bottom:i,right:s}=t(e);Ko(e)&&(i<=0||s<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Bo)}handleKeyDown(e){if(yo(e)){const{active:t,context:n,options:o}=this.props,{keyboardCodes:i=mi,coordinateGetter:s=bi,scrollBehavior:a="smooth"}=o,{code:r}=e;if(i.end.includes(r))return void this.handleEnd(e);if(i.cancel.includes(r))return void this.handleCancel(e);const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:Bo;this.referenceCoordinates||(this.referenceCoordinates=c);const d=s(e,{active:t,context:n.current,currentCoordinates:c});if(d){const t=xo(d,c),o={x:0,y:0},{scrollableAncestors:i}=n.current;for(const n of i){const i=e.code,{isTop:s,isRight:r,isLeft:l,isBottom:c,maxScroll:u,minScroll:p}=ni(n),h=si(n),g={x:Math.min(i===pi.Right?h.right-h.width/2:h.right,Math.max(i===pi.Right?h.left:h.left+h.width/2,d.x)),y:Math.min(i===pi.Down?h.bottom-h.height/2:h.bottom,Math.max(i===pi.Down?h.top:h.top+h.height/2,d.y))},m=i===pi.Right&&!r||i===pi.Left&&!l,b=i===pi.Down&&!c||i===pi.Up&&!s;if(m&&g.x!==d.x){const e=n.scrollLeft+t.x,s=i===pi.Right&&e<=u.x||i===pi.Left&&e>=p.x;if(s&&!t.y)return void n.scrollTo({left:e,behavior:a});o.x=s?n.scrollLeft-e:i===pi.Right?n.scrollLeft-u.x:n.scrollLeft-p.x,o.x&&n.scrollBy({left:-o.x,behavior:a});break}if(b&&g.y!==d.y){const e=n.scrollTop+t.y,s=i===pi.Down&&e<=u.y||i===pi.Up&&e>=p.y;if(s&&!t.x)return void n.scrollTo({top:e,behavior:a});o.y=s?n.scrollTop-e:i===pi.Down?n.scrollTop-u.y:n.scrollTop-p.y,o.y&&n.scrollBy({top:-o.y,behavior:a});break}}this.handleMove(e,fo(xo(d,this.referenceCoordinates),o))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function xi(e){return Boolean(e&&"distance"in e)}function yi(e){return Boolean(e&&"delay"in e)}fi.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=mi,onActivation:i}=t,{active:s}=n;const{code:a}=e.nativeEvent;if(o.start.includes(a)){const t=s.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==i||i({event:e.nativeEvent}),0))}return!1}}];class vi{constructor(e,t,n){var o;void 0===n&&(n=function(e){const{EventTarget:t}=no(e);return e instanceof t?e:ao(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:s}=i |
| 245 |
;this.props=e,this.events=t,this.document=ao(s),this.documentListeners=new ci(this.document),this.listeners=new ci(n),this.windowListeners=new ci(no(s)),this.initialCoordinates=null!=(o=vo(i))?o:Bo,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ui.Resize,this.handleCancel),this.windowListeners.add(ui.DragStart,hi),this.windowListeners.add(ui.VisibilityChange,this.handleCancel),this.windowListeners.add(ui.ContextMenu,hi),this.documentListeners.add(ui.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(yi(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(xi(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:o}=this.props;o(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ui.Click,gi,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ui.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!o)return;const r=null!=(t=vo(e))?t:Bo,l=xo(o,r);if(!n&&a){if(xi(a)){if(null!=a.tolerance&&di(l,a.tolerance))return this.handleCancel();if(di(l,a.distance))return this.handleStart()}return yi(a)&&di(l,a.tolerance)?this.handleCancel():void this.handlePending(a,l)}e.cancelable&&e.preventDefault(),s(r)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===pi.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const ki={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class wi extends vi{constructor(e){const{event:t}=e,n=ao(t.target);super(e,ki,n)}}wi.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!(!n.isPrimary||0!==n.button||(null==o||o({event:n}),0))}}];const _i={move:{name:"mousemove"},end:{name:"mouseup"}};var Ci;!function(e){e[e.RightClick=2]="RightClick"}(Ci||(Ci={})),class extends vi{constructor(e){super(e,_i,ao(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button!==Ci.RightClick&&(null==o||o({event:n}),!0)}}];const ji={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var $i,Si;(class extends vi{constructor(e){super(e,ji)}static setup(){return window.addEventListener(ji.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ji.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:i}=n;return!(i.length>1||(null==o||o({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}($i||($i={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Si||(Si={}));const Ti={x:{[ei.Backward]:!1,[ei.Forward]:!1},y:{[ei.Backward]:!1,[ei.Forward]:!1}};var Mi,Ni;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Mi||(Mi={})),function(e){e.Optimized="optimized"}(Ni||(Ni={}));const Li=new Map;function Ei(e,t){return uo((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Pi(e){let{callback:t,disabled:n}=e;const o=lo(t),i=(0,m.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)}),[n]);return(0,m.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}function Ai(e){return new li(Vo(e),e)}function Bi(e,t,n){void 0===t&&(t=Ai);const[o,i]=(0,m.useState)(null);function s(){i((o=>{if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=o?o:n)?i:null;const s=t(e);return JSON.stringify(o)===JSON.stringify(s)?o:s}))}const a=function(e){let{callback:t,disabled:n}=e;const o=lo(t),i=(0,m.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)}),[o,n]);return(0,m.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:o}=n;if("childList"===t&&o instanceof HTMLElement&&o.contains(e)){s();break}}}}),r=Pi({callback:s});return ro((()=>{s(),e?(null==r||r.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==r||r.disconnect(),null==a||a.disconnect())}),[e]),o}const Ii=[];function Oi(e,t){void 0===t&&(t=[]);const n=(0,m.useRef)(null);return(0,m.useEffect)((()=>{n.current=null}),t),(0,m.useEffect)((()=>{const t=e!==Bo;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?xo(e,n.current):Bo}function Ri(e){return(0,m.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const zi=[];const Di=[{sensor:wi,options:{}},{sensor:fi,options:{}}],Fi={current:{}},Hi={draggable:{measure:qo},droppable:{measure:qo,strategy:Mi.WhileDragging,frequency:Ni.Optimized},dragOverlay:{measure:Vo}};class Wi extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Ui={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Wi,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Eo},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Hi,measureDroppableContainers:Eo,windowRect:null,measuringScheduled:!1},Gi={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Eo,draggableNodes:new Map,over:null,measureDroppableContainers:Eo},Vi=(0,m.createContext)(Gi),qi=(0,m.createContext)(Ui);function Yi(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Wi}}}function Ki(e,t){switch(t.type){case Lo.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Lo.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Lo.DragEnd:case Lo.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Lo.RegisterDroppable:{const{element:n}=t,{id:o}=n,i=new Wi(e.droppable.containers);return i.set(o,n),{...e,droppable:{...e.droppable,containers:i}}}case Lo.SetDroppableDisabled:{const{id:n,key:o,disabled:i}=t,s=e.droppable.containers.get(n);if(!s||o!==s.key)return e;const a=new Wi(e.droppable.containers);return a.set(n,{...s, |
| 246 |
disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Lo.UnregisterDroppable:{const{id:n,key:o}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const s=new Wi(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function Qi(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=(0,m.useContext)(Vi),s=ho(o),a=ho(null==n?void 0:n.id);return(0,m.useEffect)((()=>{if(!t&&!o&&s&&null!=a){if(!yo(s))return;if(document.activeElement===s.target)return;const e=i.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=_o(e);if(t){t.focus();break}}}))}}),[o,t,i,a,s]),null}const Zi=(0,m.createContext)({...Bo,scaleX:1,scaleY:1});var Xi;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Xi||(Xi={}));const Ji=(0,m.memo)((function(e){var t,n,o,i;let{id:s,accessibility:a,autoScroll:r=!0,children:l,sensors:c=Di,collisionDetection:d=Fo,measuring:u,modifiers:p,...h}=e;const g=(0,m.useReducer)(Ki,void 0,Yi),[f,x]=g,[y,v]=function(){const[e]=(0,m.useState)((()=>new Set)),t=(0,m.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]),n=(0,m.useCallback)((t=>{let{type:n,event:o}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,o)}))}),[e]);return[n,t]}(),[k,w]=(0,m.useState)(Xi.Uninitialized),_=k===Xi.Initialized,{draggable:{active:C,nodes:j,translate:$},droppable:{containers:S}}=f,T=null!=C?j.get(C):null,M=(0,m.useRef)({initial:null,translated:null}),N=(0,m.useMemo)((()=>{var e;return null!=C?{id:C,data:null!=(e=null==T?void 0:T.data)?e:Fi,rect:M}:null}),[C,T]),L=(0,m.useRef)(null),[E,P]=(0,m.useState)(null),[A,B]=(0,m.useState)(null),I=co(h,Object.values(h)),O=mo("DndDescribedBy",s),R=(0,m.useMemo)((()=>S.getEnabled()),[S]),z=(D=u,(0,m.useMemo)((()=>({draggable:{...Hi.draggable,...null==D?void 0:D.draggable},droppable:{...Hi.droppable,...null==D?void 0:D.droppable},dragOverlay:{...Hi.dragOverlay,...null==D?void 0:D.dragOverlay}})),[null==D?void 0:D.draggable,null==D?void 0:D.droppable,null==D?void 0:D.dragOverlay]));var D;const{droppableRects:F,measureDroppableContainers:H,measuringScheduled:W}=function(e,t){let{dragging:n,dependencies:o,config:i}=t;const[s,a]=(0,m.useState)(null),{frequency:r,measure:l,strategy:c}=i,d=(0,m.useRef)(e),u=function(){switch(c){case Mi.Always:return!1;case Mi.BeforeDragging:return n;default:return!n}}(),p=co(u),h=(0,m.useCallback)((function(e){void 0===e&&(e=[]),p.current||a((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[p]),g=(0,m.useRef)(null),b=uo((t=>{if(u&&!n)return Li;if(!t||t===Li||d.current!==e||null!=s){const t=new Map;for(let n of e){if(!n)continue;if(s&&s.length>0&&!s.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new li(l(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t}),[e,s,n,u,l]);return(0,m.useEffect)((()=>{d.current=e}),[e]),(0,m.useEffect)((()=>{u||h()}),[n,u]),(0,m.useEffect)((()=>{s&&s.length>0&&a(null)}),[JSON.stringify(s)]),(0,m.useEffect)((()=>{u||"number"!=typeof r||null!==g.current||(g.current=setTimeout((()=>{h(),g.current=null}),r))}),[r,u,h,...o]),{droppableRects:b,measureDroppableContainers:h,measuringScheduled:null!=s}}(R,{dragging:_,dependencies:[$.x,$.y],config:z.droppable}),U=function(e,t){const n=null!=t?e.get(t):void 0,o=n?n.node.current:null;return uo((e=>{var n;return null==t?null:null!=(n=null!=o?o:e)?n:null}),[o,t])}(j,C),G=(0,m.useMemo)((()=>A?vo(A):null),[A]),V=function(){const e=!1===(null==E?void 0:E.autoScrollEnabled),t="object"==typeof r?!1===r.enabled:!1===r,n=_&&!e&&!t;return"object"==typeof r?{...r,enabled:n}:{enabled:n}}(),q=function(e,t){return Ei(e,t)}(U,z.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const s=(0,m.useRef)(!1),{x:a,y:r}="boolean"==typeof i?{x:i,y:i}:i;ro((()=>{if(!a&&!r||!t)return void(s.current=!1);if(s.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const i=Ho(n(e),o);if(a||(i.x=0),r||(i.y=0),s.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){const t=Ko(e);t&&t.scrollBy({top:i.y,left:i.x})}}),[t,a,r,o,n])}({activeNode:null!=C?j.get(C):null,config:V.layoutShiftCompensation,initialRect:q,measure:z.draggable.measure});const Y=Bi(U,z.draggable.measure,q),K=Bi(U?U.parentElement:null),Q=(0,m.useRef)({activatorEvent:null,active:null,activeNode:U,collisionRect:null,collisions:null,droppableRects:F,draggableNodes:j,draggingNode:null,draggingNodeRect:null,droppableContainers:S,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Z=S.getNodeFor(null==(t=Q.current.over)?void 0:t.id),X=function(e){let{measure:t}=e;const[n,o]=(0,m.useState)(null),i=Pi({callback:(0,m.useCallback)((e=>{for(const{target:n}of e)if(io(n)){o((e=>{const o=t(n);return e?{...e,width:o.width,height:o.height}:o}));break}}),[t])}),s=(0,m.useCallback)((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return io(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),o(n?t(n):null)}),[t,i]),[a,r]=po(s);return(0,m.useMemo)((()=>({nodeRef:a,rect:n,setRef:r})),[n,a,r])}({measure:z.dragOverlay.measure}),J=null!=(n=X.nodeRef.current)?n:U,ee=_?null!=(o=X.rect)?o:Y:null,te=Boolean(X.nodeRef.current&&X.rect),ne=Ho(oe=te?null:Y,Ei(oe));var oe;const ie=Ri(J?no(J):null),se=function(e){const t=(0,m.useRef)(e),n=uo((n=>e?n&&n!==Ii&&e&&t.current&&e.parentNode===t.current.parentNode?n:Yo(e):Ii),[e]);return(0,m.useEffect)((()=>{t.current=e}),[e]),n}(_?null!=Z?Z:U:null),ae=function(e,t){void 0===t&&(t=Vo);const[n]=e,o=Ri(n?no(n):null),[i,s]=(0,m.useState)(zi);function a(){s((()=>e.length?e.map((e=>ti(e)?o:new li(t(e),e))):zi))}const r=Pi({callback:a});return ro((()=>{null==r||r.disconnect(),a(),e.forEach((e=>null==r?void 0:r.observe(e)))}),[e]),i}(se),re=function(e,t){let{transform:n,...o}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...o})),n):n}(p,{transform:{x:$.x-ne.x,y:$.y-ne.y,scaleX:1,scaleY:1},activatorEvent:A,active:N,activeNodeRect:Y,containerNodeRect:K,draggingNodeRect:ee,over:Q.current.over,overlayNodeRect:X.rect,scrollableAncestors:se,scrollableAncestorRects:ae,windowRect:ie}),le=G?fo(G,$):null,ce=function(e){const[t,n]=(0,m.useState)(null),o=(0,m.useRef)(e),i=(0,m.useCallback)((e=>{const t=Qo(e.target);t&&n((e=>e?(e.set(t,Jo(t)),new Map(e)):null))}),[]);return(0,m.useEffect)((()=>{const t=o.current;if(e!==t){s(t);const a=e.map((e=>{const t=Qo(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,Jo(t)]):null})).filter((e=>null!=e));n(a.length?new Map(a):null),o.current=e}return()=>{s(e),s(t)};function s(e){e.forEach((e=>{const t=Qo(e);null==t||t.removeEventListener("scroll",i)}))}}),[i,e]),(0,m.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>fo(e,t)),Bo):ai(e):Bo),[e,t])}(se),de=Oi(ce),ue=Oi(ce,[Y]),pe=fo(re,de),he=ee?Uo(ee,re):null,ge=N&&he?d({active:N,collisionRect:he,droppableRects:F,droppableContainers:R,pointerCoordinates:le}):null,me=function(e){if(!e||0===e.length)return null;const[t]=e;return t.id}(ge),[be,fe]=(0,m.useState)(null),xe=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(te?re:fo(re,ue),null!=(i=null==be?void 0:be.rect)?i:null,Y),ye=(0,m.useRef)(null),ve=(0,m.useCallback)(((e,t)=>{let{sensor:n,options:o}=t;if(null==L.current)return;const i=j.get(L.current);if(!i)return;const s=e.nativeEvent,a=new n({active:L.current,activeNode:i,event:s,options:o,context:Q,onAbort(e){if(!j.get(e))return;const{onDragAbort:t}=I.current,n={id:e};null==t||t(n),y({type:"onDragAbort",event:n})},onPending(e,t,n,o){if(!j.get(e))return;const{onDragPending:i}=I.current,s={id:e,constraint:t,initialCoordinates:n,offset:o};null==i||i(s),y({type:"onDragPending",event:s})},onStart(e){const t=L.current;if(null==t)return;const n=j.get(t);if(!n)return |
| 247 |
;const{onDragStart:o}=I.current,i={activatorEvent:s,active:{id:t,data:n.data,rect:M}};(0,Xn.unstable_batchedUpdates)((()=>{null==o||o(i),w(Xi.Initializing),x({type:Lo.DragStart,initialCoordinates:e,active:t}),y({type:"onDragStart",event:i}),P(ye.current),B(s)}))},onMove(e){x({type:Lo.DragMove,coordinates:e})},onEnd:r(Lo.DragEnd),onCancel:r(Lo.DragCancel)});function r(e){return async function(){const{active:t,collisions:n,over:o,scrollAdjustedTranslate:i}=Q.current;let a=null;if(t&&i){const{cancelDrop:r}=I.current;a={activatorEvent:s,active:t,collisions:n,delta:i,over:o},e===Lo.DragEnd&&"function"==typeof r&&await Promise.resolve(r(a))&&(e=Lo.DragCancel)}L.current=null,(0,Xn.unstable_batchedUpdates)((()=>{x({type:e}),w(Xi.Uninitialized),fe(null),P(null),B(null),ye.current=null;const t=e===Lo.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=I.current[t];null==e||e(a),y({type:t,event:a})}}))}}ye.current=a}),[j]),ke=(0,m.useCallback)(((e,t)=>(n,o)=>{const i=n.nativeEvent,s=j.get(o);if(null!==L.current||!s||i.dndKit||i.defaultPrevented)return;const a={active:s};!0===e(n,t.options,a)&&(i.dndKit={capturedBy:t.sensor},L.current=o,ve(n,t))}),[j,ve]),we=function(e,t){return(0,m.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:o}=n;return[...e,...o.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(c,ke);!function(e){(0,m.useEffect)((()=>{if(!Jn)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(c),ro((()=>{Y&&k===Xi.Initializing&&w(Xi.Initialized)}),[Y,k]),(0,m.useEffect)((()=>{const{onDragMove:e}=I.current,{active:t,activatorEvent:n,collisions:o,over:i}=Q.current;if(!t||!n)return;const s={active:t,activatorEvent:n,collisions:o,delta:{x:pe.x,y:pe.y},over:i};(0,Xn.unstable_batchedUpdates)((()=>{null==e||e(s),y({type:"onDragMove",event:s})}))}),[pe.x,pe.y]),(0,m.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:o,scrollAdjustedTranslate:i}=Q.current;if(!e||null==L.current||!t||!i)return;const{onDragOver:s}=I.current,a=o.get(me),r=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:r};(0,Xn.unstable_batchedUpdates)((()=>{fe(r),null==s||s(l),y({type:"onDragOver",event:l})}))}),[me]),ro((()=>{Q.current={activatorEvent:A,active:N,activeNode:U,collisionRect:he,collisions:ge,droppableRects:F,draggableNodes:j,draggingNode:J,draggingNodeRect:ee,droppableContainers:S,over:be,scrollableAncestors:se,scrollAdjustedTranslate:pe},M.current={initial:ee,translated:he}}),[N,U,ge,he,j,J,ee,F,S,be,se,pe]),function(e){let{acceleration:t,activator:n=$i.Pointer,canScroll:o,draggingRect:i,enabled:s,interval:a=5,order:r=Si.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:d,delta:u,threshold:p}=e;const h=function(e){let{delta:t,disabled:n}=e;const o=ho(t);return uo((e=>{if(n||!o||!e)return Ti;const i=Math.sign(t.x-o.x),s=Math.sign(t.y-o.y);return{x:{[ei.Backward]:e.x[ei.Backward]||-1===i,[ei.Forward]:e.x[ei.Forward]||1===i},y:{[ei.Backward]:e.y[ei.Backward]||-1===s,[ei.Forward]:e.y[ei.Forward]||1===s}}}),[n,t,o])}({delta:u,disabled:!s}),[g,b]=function(){const e=(0,m.useRef)(null);return[(0,m.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,m.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),f=(0,m.useRef)({x:0,y:0}),x=(0,m.useRef)({x:0,y:0}),y=(0,m.useMemo)((()=>{switch(n){case $i.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case $i.DraggableRect:return i}}),[n,i,l]),v=(0,m.useRef)(null),k=(0,m.useCallback)((()=>{const e=v.current;if(!e)return;const t=f.current.x*x.current.x,n=f.current.y*x.current.y;e.scrollBy(t,n)}),[]),w=(0,m.useMemo)((()=>r===Si.TreeOrder?[...c].reverse():c),[r,c]);(0,m.useEffect)((()=>{if(s&&c.length&&y){for(const e of w){if(!1===(null==o?void 0:o(e)))continue;const n=c.indexOf(e),i=d[n];if(!i)continue;const{direction:s,speed:r}=ii(e,i,y,t,p);for(const e of["x","y"])h[e][s[e]]||(r[e]=0,s[e]=0);if(r.x>0||r.y>0)return b(),v.current=e,g(k,a),f.current=r,void(x.current=s)}f.current={x:0,y:0},x.current={x:0,y:0},b()}else b()}),[t,k,o,b,s,a,JSON.stringify(y),JSON.stringify(h),g,c,w,d,JSON.stringify(p)])}({...V,delta:$,draggingRect:he,pointerCoordinates:le,scrollableAncestors:se,scrollableAncestorRects:ae});const _e=(0,m.useMemo)((()=>({active:N,activeNode:U,activeNodeRect:Y,activatorEvent:A,collisions:ge,containerNodeRect:K,dragOverlay:X,draggableNodes:j,droppableContainers:S,droppableRects:F,over:be,measureDroppableContainers:H,scrollableAncestors:se,scrollableAncestorRects:ae,measuringConfiguration:z,measuringScheduled:W,windowRect:ie})),[N,U,Y,A,ge,K,X,j,S,F,be,H,se,ae,z,W,ie]),Ce=(0,m.useMemo)((()=>({activatorEvent:A,activators:we,active:N,activeNodeRect:Y,ariaDescribedById:{draggable:O},dispatch:x,draggableNodes:j,over:be,measureDroppableContainers:H})),[A,we,N,Y,x,O,j,be,H]);return b().createElement(So.Provider,{value:v},b().createElement(Vi.Provider,{value:Ce},b().createElement(qi.Provider,{value:_e},b().createElement(Zi.Provider,{value:xe},l)),b().createElement(Qi,{disabled:!1===(null==a?void 0:a.restoreFocus)})),b().createElement(No,{...a,hiddenTextDescribedById:O}))})),es=(0,m.createContext)(null),ts="button";const ns={timeout:25};function os(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function is(e,t){return e.reduce(((e,n,o)=>{const i=t.get(n);return i&&(e[o]=i),e}),Array(e.length))}function ss(e){return null!==e&&e>=0}const as=e=>{let{rects:t,activeIndex:n,overIndex:o,index:i}=e;const s=os(t,o,n),a=t[i],r=s[i];return r&&a?{x:r.left-a.left,y:r.top-a.top,scaleX:r.width/a.width,scaleY:r.height/a.height}:null},rs={scaleX:1,scaleY:1},ls=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:i,rects:s,overIndex:a}=e;const r=null!=(t=s[n])?t:o;if(!r)return null;if(i===n){const e=s[a];return e?{x:0,y:n<a?e.top+e.height-(r.top+r.height):e.top-r.top,...rs}:null}const l=function(e,t,n){const o=e[t],i=e[t-1],s=e[t+1];return o?n<t?i?o.top-(i.top+i.height):s?s.top-(o.top+o.height):0:s?s.top-(o.top+o.height):i?o.top-(i.top+i.height):0:0}(s,i,n);return i>n&&i<=a?{x:0,y:-r.height-l,...rs}:i<n&&i>=a?{x:0,y:r.height+l,...rs}:{x:0,y:0,...rs}},cs="Sortable",ds=b().createContext({activeIndex:-1,containerId:cs,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:as,disabled:{draggable:!1,droppable:!1}});function us(e){let{children:t,id:n,items:o,strategy:i=as,disabled:s=!1}=e;const{active:a,dragOverlay:r,droppableRects:l,over:c,measureDroppableContainers:d}=(0,m.useContext)(qi),u=mo(cs,n),p=Boolean(null!==r.rect),h=(0,m.useMemo)((()=>o.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[o]),g=null!=a,f=a?h.indexOf(a.id):-1,x=c?h.indexOf(c.id):-1,y=(0,m.useRef)(h),v=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(h,y.current),k=-1!==x&&-1===f||v,w=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(s);ro((()=>{v&&g&&d(h)}),[v,h,g,d]),(0,m.useEffect)((()=>{y.current=h}),[h]);const _=(0,m.useMemo)((()=>({activeIndex:f,containerId:u,disabled:w,disableTransforms:k,items:h,overIndex:x,useDragOverlay:p,sortedRects:is(h,l),strategy:i})),[f,u,w.draggable,w.droppable,k,h,x,l,p,i]);return b().createElement(ds.Provider,{value:_},t)}const ps=e=>{let{id:t,items:n,activeIndex:o,overIndex:i}=e;return os(n,o,i).indexOf(t)},hs=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:i,items:s,newIndex:a,previousItems:r,previousContainerId:l,transition:c}=e;return!(!c||!o||r!==s&&i===a||!n&&(a===i||t!==l))},gs={duration:200,easing:"ease"},ms="transform",bs=ko.Transition.toString({property:ms,duration:0,easing:"linear"}),fs={roleDescription:"sortable"};function xs(e){ |
| 248 |
let{animateLayoutChanges:t=hs,attributes:n,disabled:o,data:i,getNewIndex:s=ps,id:a,strategy:r,resizeObserverConfig:l,transition:c=gs}=e;const{items:d,containerId:u,activeIndex:p,disabled:h,disableTransforms:g,sortedRects:b,overIndex:f,useDragOverlay:x,strategy:y}=(0,m.useContext)(ds),v=function(e,t){var n,o;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(o=null==e?void 0:e.droppable)?o:t.droppable}}(o,h),k=d.indexOf(a),w=(0,m.useMemo)((()=>({sortable:{containerId:u,index:k,items:d},...i})),[u,i,k,d]),_=(0,m.useMemo)((()=>d.slice(d.indexOf(a))),[d,a]),{rect:C,node:j,isOver:$,setNodeRef:S}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const s=mo("Droppable"),{active:a,dispatch:r,over:l,measureDroppableContainers:c}=(0,m.useContext)(Vi),d=(0,m.useRef)({disabled:n}),u=(0,m.useRef)(!1),p=(0,m.useRef)(null),h=(0,m.useRef)(null),{disabled:g,updateMeasurementsFor:b,timeout:f}={...ns,...i},x=co(null!=b?b:o),y=Pi({callback:(0,m.useCallback)((()=>{u.current?(null!=h.current&&clearTimeout(h.current),h.current=setTimeout((()=>{c(Array.isArray(x.current)?x.current:[x.current]),h.current=null}),f)):u.current=!0}),[f]),disabled:g||!a}),v=(0,m.useCallback)(((e,t)=>{y&&(t&&(y.unobserve(t),u.current=!1),e&&y.observe(e))}),[y]),[k,w]=po(v),_=co(t);return(0,m.useEffect)((()=>{y&&k.current&&(y.disconnect(),u.current=!1,y.observe(k.current))}),[k,y]),(0,m.useEffect)((()=>(r({type:Lo.RegisterDroppable,element:{id:o,key:s,disabled:n,node:k,rect:p,data:_}}),()=>r({type:Lo.UnregisterDroppable,key:s,id:o}))),[o]),(0,m.useEffect)((()=>{n!==d.current.disabled&&(r({type:Lo.SetDroppableDisabled,id:o,key:s,disabled:n}),d.current.disabled=n)}),[o,s,n,r]),{active:a,rect:p,isOver:(null==l?void 0:l.id)===o,node:k,over:l,setNodeRef:w}}({id:a,data:w,disabled:v.droppable,resizeObserverConfig:{updateMeasurementsFor:_,...l}}),{active:T,activatorEvent:M,activeNodeRect:N,attributes:L,setNodeRef:E,listeners:P,isDragging:A,over:B,setActivatorNodeRef:I,transform:O}=function(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const s=mo("Draggable"),{activators:a,activatorEvent:r,active:l,activeNodeRect:c,ariaDescribedById:d,draggableNodes:u,over:p}=(0,m.useContext)(Vi),{role:h=ts,roleDescription:g="draggable",tabIndex:b=0}=null!=i?i:{},f=(null==l?void 0:l.id)===t,x=(0,m.useContext)(f?Zi:es),[y,v]=po(),[k,w]=po(),_=function(e,t){return(0,m.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:o,handler:i}=n;return e[o]=e=>{i(e,t)},e}),{})),[e,t])}(a,t),C=co(n);return ro((()=>(u.set(t,{id:t,key:s,node:y,activatorNode:k,data:C}),()=>{const e=u.get(t);e&&e.key===s&&u.delete(t)})),[u,t]),{active:l,activatorEvent:r,activeNodeRect:c,attributes:(0,m.useMemo)((()=>({role:h,tabIndex:b,"aria-disabled":o,"aria-pressed":!(!f||h!==ts)||void 0,"aria-roledescription":g,"aria-describedby":d.draggable})),[o,h,b,f,g,d.draggable]),isDragging:f,listeners:o?void 0:_,node:y,over:p,setNodeRef:v,setActivatorNodeRef:w,transform:x}}({id:a,data:w,attributes:{...fs,...n},disabled:v.draggable}),R=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,m.useMemo)((()=>e=>{t.forEach((t=>t(e)))}),t)}(S,E),z=Boolean(T),D=z&&!g&&ss(p)&&ss(f),F=!x&&A,H=F&&D?O:null,W=D?null!=H?H:(null!=r?r:y)({rects:b,activeNodeRect:N,activeIndex:p,overIndex:f,index:k}):null,U=ss(p)&&ss(f)?s({id:a,items:d,activeIndex:p,overIndex:f}):k,G=null==T?void 0:T.id,V=(0,m.useRef)({activeId:G,items:d,newIndex:U,containerId:u}),q=d!==V.current.items,Y=t({active:T,containerId:u,isDragging:A,isSorting:z,id:a,index:k,items:d,newIndex:V.current.newIndex,previousItems:V.current.items,previousContainerId:V.current.containerId,transition:c,wasDragging:null!=V.current.activeId}),K=function(e){let{disabled:t,index:n,node:o,rect:i}=e;const[s,a]=(0,m.useState)(null),r=(0,m.useRef)(n);return ro((()=>{if(!t&&n!==r.current&&o.current){const e=i.current;if(e){const t=Vo(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&a(n)}}n!==r.current&&(r.current=n)}),[t,n,o,i]),(0,m.useEffect)((()=>{s&&a(null)}),[s]),s}({disabled:!Y,index:k,node:j,rect:C});return(0,m.useEffect)((()=>{z&&V.current.newIndex!==U&&(V.current.newIndex=U),u!==V.current.containerId&&(V.current.containerId=u),d!==V.current.items&&(V.current.items=d)}),[z,U,u,d]),(0,m.useEffect)((()=>{if(G===V.current.activeId)return;if(null!=G&&null==V.current.activeId)return void(V.current.activeId=G);const e=setTimeout((()=>{V.current.activeId=G}),50);return()=>clearTimeout(e)}),[G]),{active:T,activeIndex:p,attributes:L,data:w,rect:C,index:k,newIndex:U,items:d,isOver:$,isSorting:z,isDragging:A,listeners:P,node:j,overIndex:f,over:B,setNodeRef:R,setActivatorNodeRef:I,setDroppableNodeRef:S,setDraggableNodeRef:E,transform:null!=K?K:W,transition:K||q&&V.current.newIndex===k?bs:F&&!yo(M)||!c?void 0:z||Y?ko.Transition.toString({...c,property:ms}):void 0}}pi.Down,pi.Right,pi.Up,pi.Left;const ys=e=>{let{transform:t}=e;return{...t,x:0}},vs=({listeners:e})=>(0,l.jsx)("div",{className:"gripIcon",...e,children:ft}),ks=({id:e,index:t,removeItem:n,duplicateItem:o,ItemSettings:i,active:s,setActive:a,itemLabel:r,minItem:c,title:d,...u})=>{const{value:p,attributes:h,arrKey:g,setActiveIndex:m}=u,b=h?h[g]:p,f=b?.[t]?.[d]||"",{setNodeRef:x,transform:y,transition:v,listeners:k,isDragging:w}=xs({id:e}),_={transform:ko.Transform.toString(y),transition:w?v:"none"};return(0,l.jsxs)("div",{ref:x,style:_,className:"bPlSortablePanelItem",children:[(0,l.jsxs)("div",{className:"itemsPanelHeader mt10",...k,children:[(0,l.jsx)(vs,{listeners:k}),(0,l.jsxs)("div",{className:"panel-header-title",children:[(0,l.jsx)("div",{className:"repeater-panel-title",onClick:()=>{a(s===t?null:t),m?.(t)},children:d?f:`${r} ${t+1}`}),(0,l.jsxs)("div",{className:"itemAction",children:[(0,l.jsx)("div",{onClick:e=>o(e,t),children:mt}),b.length>Number(c)&&(0,l.jsx)("div",{onClick:e=>n(e,t),children:bt})]})]})]}),(0,l.jsx)("div",{className:"itemsPanelBody "+(s===t?"":"hidden"),children:(0,l.jsx)(i,{...u,index:t})})]})},ws=e=>{const{value:t,onChange:n,attributes:o,setAttributes:i,arrKey:s,activeIndex:a}=e,r=o?o[s]:t,[c,d]=(0,m.useState)(a??0);(0,m.useEffect)((()=>d(a??0)),[a]);const u=Ao(Po(wi,{activationConstraint:{distance:6}}));return(0,l.jsx)(Ji,{sensors:u,modifiers:[ys],collisionDetection:zo,onDragEnd:({active:e,over:t})=>{if(!t||e.id===t.id)return;const a=os(r,e.id,t.id);o?i({[s]:a}):n(a)},children:(0,l.jsx)(us,{items:r.map(((e,t)=>t)),strategy:ls,children:(0,l.jsx)("div",{className:"bPlItemsPanel",children:r.map(((t,n)=>(0,l.jsx)(ks,{id:n,index:n,active:c,setActive:d,...e},n)))})})})},_s=e=>{const{value:t,onChange:n,attributes:o,setAttributes:i,clientId:s,arrKey:a,newItem:r,ItemSettings:c,itemLabel:d="Item",activeIndex:u,setActiveIndex:p,design:h="single",title:g="",premiumProps:m,minItem:b=1,handleCopy:f,handleDelete:v,handleAdd:k,...w}=e,_=o?o[a]:t,C=(e,t)=>{if(e.preventDefault(),"function"==typeof f)return void f(t);const s=[..._.slice(0,t),{..._[t]},..._.slice(t)];o?i({[a]:s}):n(s),p&&p(t+1)},j=(e,t)=>{if(e.preventDefault(),"function"==typeof v)return void v(t);const s=[..._.slice(0,t),..._.slice(t+1)];o?i({[a]:s}):n(s),p&&p(0===t?0:t-1)},$={value:t,onChange:n,attributes:o,setAttributes:i,clientId:s,arrKey:a,ItemSettings:c,removeItem:j,duplicateItem:C,itemLabel:d,activeIndex:u,setActiveIndex:p,premiumProps:m,title:g,minItem:b,...w},S={value:t,onChange:n,attributes:o,setAttributes:i,clientId:s,arrKey:a,setActiveIndex:p,premiumProps:m};return(0,l.jsxs)(l.Fragment,{children:["single"===h&&void 0!==u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:"bplItemTitle",children:(0,x.__)(`${d} ${u+1}:`)}),(0,l.jsx)(c,{...S,index:u}),(0,l.jsx)(Cs,{items:_,index:u,duplicateItem:C,removeItem:j})]}),"all"===h&&_.map(((e,t)=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody itemPanelBody",title:(0,x.__)(`${d} ${t+1}:`),initialOpen:u?u===t:0===t,children:[(0,l.jsx)(c,{...S, |
| 249 |
index:t}),(0,l.jsx)(Cs,{items:_,index:t,duplicateItem:C,removeItem:j})]},t))),"sortable"===h&&(0,l.jsx)(ws,{...$}),(0,l.jsx)(y.Flex,{justify:"center",className:"addItem mt15",children:(0,l.jsxs)(y.Button,{variant:"primary",label:(0,x.__)("Add New")+" "+d,onClick:()=>{const e=[..._,r];"function"!=typeof k?(o?i({[a]:e}):n(e),p&&p(_.length)):k(e)},children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New")+" "+d]})})]})},Cs=({items:e,index:t,duplicateItem:n,removeItem:o})=>(0,l.jsxs)(y.PanelRow,{className:"itemAction mt20 mb15",children:[(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate"),onClick:e=>n(e,t),children:[mt,(0,x.__)("Duplicate")]}),1<e?.length&&(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove"),onClick:e=>o(e,t),children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove")]})]}),js=({className:e="mt10",status:t="info",isIcon:n=!1,children:o})=>{const i={info:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,l.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),success:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),(0,l.jsx)("polyline",{points:"22 4 12 14.01 9 11.01"})]}),warning:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),(0,l.jsx)("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),(0,l.jsx)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),danger:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,l.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),premium:xt};return(0,l.jsxs)("div",{className:`bPlNotice ${t} ${e}`,children:[n&&(0,l.jsx)("div",{className:"icon",children:i[t]||i.info}),(0,l.jsx)("span",{children:o})]})};var $s=a(6708);const Ss=e=>{const{className:t="",label:n="",value:o,onChange:i,options:s=[]}=e,a=(0,m.useRef)(null),r=(0,m.useRef)(i);return r.current=i,(0,m.useEffect)((()=>{a.current&&(a.current.innerHTML="",new $s.A(a.current,{value:o,onChange:e=>r.current(e),options:s,multiple:!0,autocomplete:!0,icon:"closeIcon",classNames:{select:"bplSelectPure",multiselect:"selectMultiple",label:"selectLabel",selectedLabel:"selectSelectedLabel",dropdown:"selectOptions",dropdownShown:"selectOptionsOpened",autocompleteInput:"selectAutocomplete",option:"selectOption",selectedOption:"selectOptionSelected",optionDisabled:"selectOptionDisabled",optionHidden:"selectOptionHidden",placeholder:"selectPlaceholder",placeholderHidden:"selectPlaceholderHidden"}}))}),[JSON.stringify(o),JSON.stringify(s)]),n?(0,l.jsxs)("div",{className:t,children:[(0,l.jsx)(v,{className:"mb5",children:n}),(0,l.jsx)("div",{ref:a})]}):(0,l.jsx)("div",{className:t,ref:a})},Ts=e=>{const{className:t="",label:n=(0,x.__)("Separator"),value:o,onChange:i,defaults:s={}}=e,a={width:"50%",height:"2px",style:"solid",color:"#bbb"},r=e=>s?.[e]||a[e],c=e=>o?.[e]||r(e),d=(e,t)=>i({...o,[e]:t}),u=e=>(0,l.jsx)(y.Button,{icon:"image-rotate",className:"bPlResetVal",onClick:()=>(e=>i({...o,[e]:r(e)}))(e)});return(0,l.jsxs)(y.PanelRow,{className:`bPlDropdown ${t}`,children:[(0,l.jsx)(v,{className:"mt5",children:n}),(0,l.jsx)(y.Dropdown,{className:"bPlDropdownContainer",contentClassName:"bPlDropdownPopover",popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,l.jsx)(y.Button,{icon:"edit",onClick:t,"aria-expanded":e}),renderContent:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:"),labelPosition:"left",value:c("width"),onChange:e=>d("width",e),units:[Ee(50),Pe(25),Ae(3)],isResetValueOnUnitChange:!0}),o?.width&&o?.width!==r("width")&&u("width")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height:"),labelPosition:"left",value:c("height"),onChange:e=>d("height",e),units:[Ee(3),Ae(),Be()]}),o?.height&&o?.height!==r("height")&&u("height")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Style:")}),(0,l.jsx)(y.SelectControl,{value:c("style"),onChange:e=>d("style",e),options:Le}),o?.style&&o?.style!==r("style")&&u("style")]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:"),value:c("color"),onChange:e=>d("color",e),defaultColor:r("color")})]})})]})},Ms=({id:e,text:t,className:n})=>{const{attributes:o,listeners:i,setNodeRef:s,transform:a,transition:r,isDragging:c}=xs({id:e}),d={transform:ko.Transform.toString(a),transition:c?r:"none"};return(0,l.jsx)("li",{ref:s,style:d,className:`bplSortableListItem ${n}`,...o,...i,children:t})},Ns=({className:e="",label:t=(0,x.__)("Sort:"),value:n=[],property:o,onChange:i})=>{const s=Ao(Po(wi,{activationConstraint:{distance:5}})),a=n.map(((e,t)=>({id:e?.id??e?._id??e?.key??`item-${t}`,text:o?e?.[o]:e,className:e?.className})));return(0,l.jsxs)("div",{className:`bplSortableList ${e}`,children:[(0,l.jsx)(v,{className:"mb5",children:t}),(0,l.jsx)(Ji,{sensors:s,collisionDetection:zo,onDragEnd:e=>{const{active:t,over:o}=e;if(!o||t.id===o.id)return;const s=a.findIndex((e=>e.id===t.id)),r=a.findIndex((e=>e.id===o.id));i(os(n,s,r))},children:(0,l.jsx)(us,{items:a.map((e=>e.id)),strategy:ls,children:(0,l.jsx)("ul",{children:a.map((e=>(0,l.jsx)(Ms,{...e},e.id)))})})}),(0,l.jsx)("small",{children:(0,x.__)("Drag and drop to sort")})]})},Ls=({value:e="",onChange:t,media_button:n=!0,quicktags:o=!0,height:i="180px",className:s})=>{const[a,r]=(0,m.useState)(null);return(0,m.useEffect)((()=>{r(String(Math.floor(99999*Math.random())))}),[]),(0,m.useEffect)((()=>{if(!a)return;const s={tinymce:{selector:`bpl-wp-${a}editor`,height:i,wpautop:!1,plugins:"charmap colorpicker compat3x directionality fullscreen hr image lists media paste tabfocus textcolor wordpress wpautoresize wpdialogs wpeditimage wpemoji wpgallery wplink wptextpattern wpview",toolbar1:"formatselect bold italic underline bullist numlist blockquote alignleft aligncenter alignright link unlink wp_more fullscreen wp_adv",toolbar2:"strikethrough hr alignjustify forecolor pastetext removeformat charmap outdent indent undo redo wp_help",setup(n){n.on("init",(function(){n.setContent(e)}));const o=()=>{const e=n.getContent();t(e)};n.on("keyup",o),n.on("change",o),n.on("input",o),n.on("paste",o),n.on("blur",(()=>{const o=n.getContent();o!==e&&t(o)}))}},quicktags:o,mediaButtons:n,paste_block_drop:!0,paste_data_images:!0,paste_as_text:!0,content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"};return wp.editor.initialize(`bpl-wp-${a}editor`,s),()=>{const e=window.tinymce.editors[`bpl-wp-${a}editor`];e&&(e.off("keyup"),e.off("change"),e.off("input"),e.off("paste"),e.off("focus"),e.off("blur")),wp.editor.remove(`bpl-wp-${a}editor`)}}),[a]),(0,m.useEffect)((()=>{if(!a)return;const t=window.tinymce.editors[`bpl-wp-${a}editor`];t&&e!==t.getContent()&&t.setContent(e)}),[e,a]),(0,l.jsxs)("div",{className:s,children:[(0,l.jsx)("style",{ |
| 250 |
children:`\n\t\t\t\t#bpl-wp-${a}editor{\n\t\t\t\t\tborder:none !important;\n\t\t\t\t}\n\t\t\t\t#bpl-wp-${a}editor:focus{\n\t\t\t\t\tborder:none !important;\n\t\t\t\t\toutline: none !important;\n\t\t\t\t\tbox-shadow:none !important;\n\t\t\t\t}\n\t\t\t\t\t#wp-bpl-wp-${a}editor-wrap .wp-editor-tools .wp-media-buttons{\n\t\t\t\t\t\twidth:48%;\n\t\t\t\t\t\tmargin:0px;\n\t\t\t\t\t}\n\t\t\t\t\t#wp-bpl-wp-${a}editor-wrap .wp-editor-tools .wp-editor-tabs>button{\n\t\t\t\t\t\tfont-size:9px;\n\t\t\t\t\t}\n\t\t\t`}),(0,l.jsx)("textarea",{style:{width:"100%"},id:`bpl-wp-${a}editor`,className:"bpl-wp-editor"})]})},Es=({device:e="desktop",onChange:t,className:n="iconButton",style:o})=>{const[i,s]=(0,m.useState)(!1);return window.addEventListener("click",(()=>s(!1))),(0,l.jsxs)("div",{className:"bDevice",style:o,children:[!i&&(0,l.jsx)("button",{className:n,title:e[0].toUpperCase()+e.slice(1),onClick:e=>{s(!0),e.stopPropagation()},children:"desktop"==e?at:"tablet"==e?rt:lt}),i&&(0,l.jsx)("div",{className:"bDevicePopup",children:[{value:"desktop",icon:at},{value:"tablet",icon:rt},{value:"mobile",icon:lt}].map((({icon:e,value:o})=>(0,l.jsx)("button",{className:n,title:o[0].toUpperCase()+o.slice(1),onClick:()=>{t(o),s(!1)},children:e},o)))})]})},Ps=[{family:"Default",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"ABeeZee",variants:[400,"400i"],category:"sans-serif"},{family:"Abel",variants:[400],category:"sans-serif"},{family:"Abhaya Libre",variants:[400,500,600,700,800],category:"serif"},{family:"Abril Fatface",variants:[400],category:"display"},{family:"Aclonica",variants:[400],category:"sans-serif"},{family:"Acme",variants:[400],category:"sans-serif"},{family:"Actor",variants:[400],category:"sans-serif"},{family:"Adamina",variants:[400],category:"serif"},{family:"Advent Pro",variants:[100,200,300,400,500,600,700],category:"sans-serif"},{family:"Aguafina Script",variants:[400],category:"handwriting"},{family:"Akaya Kanadaka",variants:[400],category:"display"},{family:"Akaya Telivigala",variants:[400],category:"display"},{family:"Akronim",variants:[400],category:"display"},{family:"Aladin",variants:[400],category:"handwriting"},{family:"Alata",variants:[400],category:"sans-serif"},{family:"Alatsi",variants:[400],category:"sans-serif"},{family:"Aldrich",variants:[400],category:"sans-serif"},{family:"Alef",variants:[400,700],category:"sans-serif"},{family:"Alegreya",variants:[400,500,600,700,800,900,"400i","500i","600i","700i","800i","900i"],category:"serif"},{family:"Alegreya SC",variants:[400,"400i",500,"500i",700,"700i",800,"800i",900,"900i"],category:"serif"},{family:"Alegreya Sans",variants:[100,"100i",300,"300i",400,"400i",500,"500i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Alegreya Sans SC",variants:[100,"100i",300,"300i",400,"400i",500,"500i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Aleo",variants:[300,"300i",400,"400i",700,"700i"],category:"serif"},{family:"Alex Brush",variants:[400],category:"handwriting"},{family:"Alfa Slab One",variants:[400],category:"display"},{family:"Alice",variants:[400],category:"serif"},{family:"Alike",variants:[400],category:"serif"},{family:"Alike Angular",variants:[400],category:"serif"},{family:"Allan",variants:[400,700],category:"display"},{family:"Allerta",variants:[400],category:"sans-serif"},{family:"Allerta Stencil",variants:[400],category:"sans-serif"},{family:"Allura",variants:[400],category:"handwriting"},{family:"Almarai",variants:[300,400,700,800],category:"sans-serif"},{family:"Almendra",variants:[400,"400i",700,"700i"],category:"serif"},{family:"Almendra Display",variants:[400],category:"display"},{family:"Almendra SC",variants:[400],category:"serif"},{family:"Amarante",variants:[400],category:"display"},{family:"Amaranth",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Amatic SC",variants:[400,700],category:"handwriting"},{family:"Amethysta",variants:[400],category:"serif"},{family:"Amiko",variants:[400,600,700],category:"sans-serif"},{family:"Amiri",variants:[400,"400i",700,"700i"],category:"serif"},{family:"Amita",variants:[400,700],category:"handwriting"},{family:"Anaheim",variants:[400],category:"sans-serif"},{family:"Andada",variants:[400],category:"serif"},{family:"Andika",variants:[400],category:"sans-serif"},{family:"Andika New Basic",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Angkor",variants:[400],category:"display"},{family:"Annie Use Your Telescope",variants:[400],category:"handwriting"},{family:"Anonymous Pro",variants:[400,"400i",700,"700i"],category:"monospace"},{family:"Antic",variants:[400],category:"sans-serif"},{family:"Antic Didone",variants:[400],category:"serif"},{family:"Antic Slab",variants:[400],category:"serif"},{family:"Anton",variants:[400],category:"sans-serif"},{family:"Antonio",variants:[100,200,300,400,500,600,700],category:"sans-serif"},{family:"Arapey",variants:[400,"400i"],category:"serif"},{family:"Arbutus",variants:[400],category:"display"},{family:"Arbutus Slab",variants:[400],category:"serif"},{family:"Architects Daughter",variants:[400],category:"handwriting"},{family:"Archivo",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"sans-serif"},{family:"Archivo Black",variants:[400],category:"sans-serif"},{family:"Archivo Narrow",variants:[400,"400i",500,"500i",600,"600i",700,"700i"],category:"sans-serif"},{family:"Aref Ruqaa",variants:[400,700],category:"serif"},{family:"Arima Madurai",variants:[100,200,300,400,500,700,800,900],category:"display"},{family:"Arimo",variants:[400,500,600,700,"400i","500i","600i","700i"],category:"sans-serif"},{family:"Arizonia",variants:[400],category:"handwriting"},{family:"Armata",variants:[400],category:"sans-serif"},{family:"Arsenal",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Artifika",variants:[400],category:"serif"},{family:"Arvo",variants:[400,"400i",700,"700i"],category:"serif"},{family:"Arya",variants:[400,700],category:"sans-serif"},{family:"Asap",variants:[400,500,600,700,"400i","500i","600i","700i"],category:"sans-serif"},{family:"Asap Condensed",variants:[400,"400i",500,"500i",600,"600i",700,"700i"],category:"sans-serif"},{family:"Asar",variants:[400],category:"serif"},{family:"Asset",variants:[400],category:"display"},{family:"Assistant",variants:[200,300,400,500,600,700,800],category:"sans-serif"},{family:"Astloch",variants:[400,700],category:"display"},{family:"Asul",variants:[400,700],category:"sans-serif"},{family:"Athiti",variants:[200,300,400,500,600,700],category:"sans-serif"},{family:"Atma",variants:[300,400,500,600,700],category:"display"},{family:"Atomic Age",variants:[400],category:"display"},{family:"Aubrey",variants:[400],category:"display"},{family:"Audiowide",variants:[400],category:"display"},{family:"Autour One",variants:[400],category:"display"},{family:"Average",variants:[400],category:"serif"},{family:"Average Sans",variants:[400],category:"sans-serif"},{family:"Averia Gruesa Libre",variants:[400],category:"display"},{family:"Averia Libre",variants:[300,"300i",400,"400i",700,"700i"],category:"display"},{family:"Averia Sans Libre",variants:[300,"300i",400,"400i",700,"700i"],category:"display"},{family:"Averia Serif Libre",variants:[300,"300i",400,"400i",700,"700i"],category:"display"},{family:"B612",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"B612 Mono",variants:[400,"400i",700,"700i"],category:"monospace"},{family:"Bad Script",variants:[400],category:"handwriting"},{family:"Bahiana",variants:[400],category:"display"},{family:"Bahianita",variants:[400],category:"display"},{family:"Bai Jamjuree",variants:[200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"sans-serif"},{family:"Ballet",variants:[400],category:"handwriting"},{family:"Baloo 2",variants:[400,500,600,700,800],category:"display"},{family:"Baloo Bhai 2",variants:[400,500,600,700,800],category:"display" |
| 251 |
},{family:"Baloo Bhaina 2",variants:[400,500,600,700,800],category:"display"},{family:"Baloo Chettan 2",variants:[400,500,600,700,800],category:"display"},{family:"Baloo Da 2",variants:[400,500,600,700,800],category:"display"},{family:"Baloo Paaji 2",variants:[400,500,600,700,800],category:"display"},{family:"Baloo Tamma 2",variants:[400,500,600,700,800],category:"display"},{family:"Baloo Tammudu 2",variants:[400,500,600,700,800],category:"display"},{family:"Baloo Thambi 2",variants:[400,500,600,700,800],category:"display"},{family:"Balsamiq Sans",variants:[400,"400i",700,"700i"],category:"display"},{family:"Balthazar",variants:[400],category:"serif"},{family:"Bangers",variants:[400],category:"display"},{family:"Barlow",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Barlow Condensed",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Barlow Semi Condensed",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Barriecito",variants:[400],category:"display"},{family:"Barrio",variants:[400],category:"display"},{family:"Basic",variants:[400],category:"sans-serif"},{family:"Baskervville",variants:[400,"400i"],category:"serif"},{family:"Battambang",variants:[400,700],category:"display"},{family:"Baumans",variants:[400],category:"display"},{family:"Bayon",variants:[400],category:"display"},{family:"Be Vietnam",variants:[100,"100i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i"],category:"sans-serif"},{family:"Bebas Neue",variants:[400],category:"display"},{family:"Belgrano",variants:[400],category:"serif"},{family:"Bellefair",variants:[400],category:"serif"},{family:"Belleza",variants:[400],category:"sans-serif"},{family:"Bellota",variants:[300,"300i",400,"400i",700,"700i"],category:"display"},{family:"Bellota Text",variants:[300,"300i",400,"400i",700,"700i"],category:"display"},{family:"BenchNine",variants:[300,400,700],category:"sans-serif"},{family:"Benne",variants:[400],category:"serif"},{family:"Bentham",variants:[400],category:"serif"},{family:"Berkshire Swash",variants:[400],category:"handwriting"},{family:"Beth Ellen",variants:[400],category:"handwriting"},{family:"Bevan",variants:[400],category:"display"},{family:"Big Shoulders Display",variants:[100,300,400,500,600,700,800,900],category:"display"},{family:"Big Shoulders Inline Display",variants:[100,300,400,500,600,700,800,900],category:"display"},{family:"Big Shoulders Inline Text",variants:[100,300,400,500,600,700,800,900],category:"display"},{family:"Big Shoulders Stencil Display",variants:[100,300,400,500,600,700,800,900],category:"display"},{family:"Big Shoulders Stencil Text",variants:[100,300,400,500,600,700,800,900],category:"display"},{family:"Big Shoulders Text",variants:[100,300,400,500,600,700,800,900],category:"display"},{family:"Bigelow Rules",variants:[400],category:"display"},{family:"Bigshot One",variants:[400],category:"display"},{family:"Bilbo",variants:[400],category:"handwriting"},{family:"Bilbo Swash Caps",variants:[400],category:"handwriting"},{family:"BioRhyme",variants:[200,300,400,700,800],category:"serif"},{family:"BioRhyme Expanded",variants:[200,300,400,700,800],category:"serif"},{family:"Biryani",variants:[200,300,400,600,700,800,900],category:"sans-serif"},{family:"Bitter",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"serif"},{family:"Black And White Picture",variants:[400],category:"sans-serif"},{family:"Black Han Sans",variants:[400],category:"sans-serif"},{family:"Black Ops One",variants:[400],category:"display"},{family:"Blinker",variants:[100,200,300,400,600,700,800,900],category:"sans-serif"},{family:"Bodoni Moda",variants:[400,500,600,700,800,900,"400i","500i","600i","700i","800i","900i"],category:"serif"},{family:"Bokor",variants:[400],category:"display"},{family:"Bonbon",variants:[400],category:"handwriting"},{family:"Boogaloo",variants:[400],category:"display"},{family:"Bowlby One",variants:[400],category:"display"},{family:"Bowlby One SC",variants:[400],category:"display"},{family:"Brawler",variants:[400],category:"serif"},{family:"Bree Serif",variants:[400],category:"serif"},{family:"Brygada 1918",variants:[400,500,600,700,"400i","500i","600i","700i"],category:"serif"},{family:"Bubblegum Sans",variants:[400],category:"display"},{family:"Bubbler One",variants:[400],category:"sans-serif"},{family:"Buda",variants:[300,400],category:"display"},{family:"Buenard",variants:[400,700],category:"serif"},{family:"Bungee",variants:[400],category:"display"},{family:"Bungee Hairline",variants:[400],category:"display"},{family:"Bungee Inline",variants:[400],category:"display"},{family:"Bungee Outline",variants:[400],category:"display"},{family:"Bungee Shade",variants:[400],category:"display"},{family:"Butcherman",variants:[400],category:"display"},{family:"Butterfly Kids",variants:[400],category:"handwriting"},{family:"Cabin",variants:[400,500,600,700,"400i","500i","600i","700i"],category:"sans-serif"},{family:"Cabin Condensed",variants:[400,500,600,700],category:"sans-serif"},{family:"Cabin Sketch",variants:[400,700],category:"display"},{family:"Caesar Dressing",variants:[400],category:"display"},{family:"Cagliostro",variants:[400],category:"sans-serif"},{family:"Cairo",variants:[200,300,400,600,700,900],category:"sans-serif"},{family:"Caladea",variants:[400,"400i",700,"700i"],category:"serif"},{family:"Calistoga",variants:[400],category:"display"},{family:"Calligraffitti",variants:[400],category:"handwriting"},{family:"Cambay",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Cambo",variants:[400],category:"serif"},{family:"Candal",variants:[400],category:"sans-serif"},{family:"Cantarell",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Cantata One",variants:[400],category:"serif"},{family:"Cantora One",variants:[400],category:"sans-serif"},{family:"Capriola",variants:[400],category:"sans-serif"},{family:"Cardo",variants:[400,"400i",700],category:"serif"},{family:"Carme",variants:[400],category:"sans-serif"},{family:"Carrois Gothic",variants:[400],category:"sans-serif"},{family:"Carrois Gothic SC",variants:[400],category:"sans-serif"},{family:"Carter One",variants:[400],category:"display"},{family:"Castoro",variants:[400,"400i"],category:"serif"},{family:"Catamaran",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Caudex",variants:[400,"400i",700,"700i"],category:"serif"},{family:"Caveat",variants:[400,500,600,700],category:"handwriting"},{family:"Caveat Brush",variants:[400],category:"handwriting"},{family:"Cedarville Cursive",variants:[400],category:"handwriting"},{family:"Ceviche One",variants:[400],category:"display"},{family:"Chakra Petch",variants:[300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"sans-serif"},{family:"Changa",variants:[200,300,400,500,600,700,800],category:"sans-serif"},{family:"Changa One",variants:[400,"400i"],category:"display"},{family:"Chango",variants:[400],category:"display"},{family:"Charm",variants:[400,700],category:"handwriting"},{family:"Charmonman",variants:[400,700],category:"handwriting"},{family:"Chathura",variants:[100,300,400,700,800],category:"sans-serif"},{family:"Chau Philomene One",variants:[400,"400i"],category:"sans-serif"},{family:"Chela One",variants:[400],category:"display"},{family:"Chelsea Market",variants:[400],category:"display"},{family:"Chenla",variants:[400],category:"display"},{family:"Cherry Cream Soda",variants:[400],category:"display"},{family:"Cherry Swash",variants:[400,700],category:"display"},{family:"Chewy",variants:[400],category:"display"},{family:"Chicle",variants:[400],category:"display"},{family:"Chilanka",variants:[400],category:"handwriting"},{family:"Chivo", |
| 252 |
variants:[300,"300i",400,"400i",700,"700i",900,"900i"],category:"sans-serif"},{family:"Chonburi",variants:[400],category:"display"},{family:"Cinzel",variants:[400,500,600,700,800,900],category:"serif"},{family:"Cinzel Decorative",variants:[400,700,900],category:"display"},{family:"Clicker Script",variants:[400],category:"handwriting"},{family:"Coda",variants:[400,800],category:"display"},{family:"Coda Caption",variants:[400,800],category:"sans-serif"},{family:"Codystar",variants:[300,400],category:"display"},{family:"Coiny",variants:[400],category:"display"},{family:"Combo",variants:[400],category:"display"},{family:"Comfortaa",variants:[300,400,500,600,700],category:"display"},{family:"Comic Neue",variants:[300,"300i",400,"400i",700,"700i"],category:"handwriting"},{family:"Coming Soon",variants:[400],category:"handwriting"},{family:"Commissioner",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Concert One",variants:[400],category:"display"},{family:"Condiment",variants:[400],category:"handwriting"},{family:"Content",variants:[400,700],category:"display"},{family:"Contrail One",variants:[400],category:"display"},{family:"Convergence",variants:[400],category:"sans-serif"},{family:"Cookie",variants:[400],category:"handwriting"},{family:"Copse",variants:[400],category:"serif"},{family:"Corben",variants:[400,700],category:"display"},{family:"Cormorant",variants:[300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"serif"},{family:"Cormorant Garamond",variants:[300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"serif"},{family:"Cormorant Infant",variants:[300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"serif"},{family:"Cormorant SC",variants:[300,400,500,600,700],category:"serif"},{family:"Cormorant Unicase",variants:[300,400,500,600,700],category:"serif"},{family:"Cormorant Upright",variants:[300,400,500,600,700],category:"serif"},{family:"Courgette",variants:[400],category:"handwriting"},{family:"Courier Prime",variants:[400,"400i",700,"700i"],category:"monospace"},{family:"Cousine",variants:[400,"400i",700,"700i"],category:"monospace"},{family:"Coustard",variants:[400,900],category:"serif"},{family:"Covered By Your Grace",variants:[400],category:"handwriting"},{family:"Crafty Girls",variants:[400],category:"handwriting"},{family:"Creepster",variants:[400],category:"display"},{family:"Crete Round",variants:[400,"400i"],category:"serif"},{family:"Crimson Pro",variants:[200,300,400,500,600,700,800,900,"200i","300i","400i","500i","600i","700i","800i","900i"],category:"serif"},{family:"Crimson Text",variants:[400,"400i",600,"600i",700,"700i"],category:"serif"},{family:"Croissant One",variants:[400],category:"display"},{family:"Crushed",variants:[400],category:"display"},{family:"Cuprum",variants:[400,500,600,700,"400i","500i","600i","700i"],category:"sans-serif"},{family:"Cute Font",variants:[400],category:"display"},{family:"Cutive",variants:[400],category:"serif"},{family:"Cutive Mono",variants:[400],category:"monospace"},{family:"DM Mono",variants:[300,"300i",400,"400i",500,"500i"],category:"monospace"},{family:"DM Sans",variants:[400,"400i",500,"500i",700,"700i"],category:"sans-serif"},{family:"DM Serif Display",variants:[400,"400i"],category:"serif"},{family:"DM Serif Text",variants:[400,"400i"],category:"serif"},{family:"Damion",variants:[400],category:"handwriting"},{family:"Dancing Script",variants:[400,500,600,700],category:"handwriting"},{family:"Dangrek",variants:[400],category:"display"},{family:"Darker Grotesque",variants:[300,400,500,600,700,800,900],category:"sans-serif"},{family:"David Libre",variants:[400,500,700],category:"serif"},{family:"Dawning of a New Day",variants:[400],category:"handwriting"},{family:"Days One",variants:[400],category:"sans-serif"},{family:"Dekko",variants:[400],category:"handwriting"},{family:"Dela Gothic One",variants:[400],category:"display"},{family:"Delius",variants:[400],category:"handwriting"},{family:"Delius Swash Caps",variants:[400],category:"handwriting"},{family:"Delius Unicase",variants:[400,700],category:"handwriting"},{family:"Della Respira",variants:[400],category:"serif"},{family:"Denk One",variants:[400],category:"sans-serif"},{family:"Devonshire",variants:[400],category:"handwriting"},{family:"Dhurjati",variants:[400],category:"sans-serif"},{family:"Didact Gothic",variants:[400],category:"sans-serif"},{family:"Diplomata",variants:[400],category:"display"},{family:"Diplomata SC",variants:[400],category:"display"},{family:"Do Hyeon",variants:[400],category:"sans-serif"},{family:"Dokdo",variants:[400],category:"handwriting"},{family:"Domine",variants:[400,500,600,700],category:"serif"},{family:"Donegal One",variants:[400],category:"serif"},{family:"Doppio One",variants:[400],category:"sans-serif"},{family:"Dorsa",variants:[400],category:"sans-serif"},{family:"Dosis",variants:[200,300,400,500,600,700,800],category:"sans-serif"},{family:"DotGothic16",variants:[400],category:"sans-serif"},{family:"Dr Sugiyama",variants:[400],category:"handwriting"},{family:"Duru Sans",variants:[400],category:"sans-serif"},{family:"Dynalight",variants:[400],category:"display"},{family:"EB Garamond",variants:[400,500,600,700,800,"400i","500i","600i","700i","800i"],category:"serif"},{family:"Eagle Lake",variants:[400],category:"handwriting"},{family:"East Sea Dokdo",variants:[400],category:"handwriting"},{family:"Eater",variants:[400],category:"display"},{family:"Economica",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Eczar",variants:[400,500,600,700,800],category:"serif"},{family:"El Messiri",variants:[400,500,600,700],category:"sans-serif"},{family:"Electrolize",variants:[400],category:"sans-serif"},{family:"Elsie",variants:[400,900],category:"display"},{family:"Elsie Swash Caps",variants:[400,900],category:"display"},{family:"Emblema One",variants:[400],category:"display"},{family:"Emilys Candy",variants:[400],category:"display"},{family:"Encode Sans",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Encode Sans Condensed",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Encode Sans Expanded",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Encode Sans Semi Condensed",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Encode Sans Semi Expanded",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Engagement",variants:[400],category:"handwriting"},{family:"Englebert",variants:[400],category:"sans-serif"},{family:"Enriqueta",variants:[400,500,600,700],category:"serif"},{family:"Epilogue",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"sans-serif"},{family:"Erica One",variants:[400],category:"display"},{family:"Esteban",variants:[400],category:"serif"},{family:"Euphoria Script",variants:[400],category:"handwriting"},{family:"Ewert",variants:[400],category:"display"},{family:"Exo",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"sans-serif"},{family:"Exo 2",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"sans-serif"},{family:"Expletus Sans",variants:[400,"400i",500,"500i",600,"600i",700,"700i"],category:"display"},{family:"Fahkwang",variants:[200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"sans-serif"},{family:"Fanwood Text",variants:[400,"400i"],category:"serif"},{family:"Farro",variants:[300,400,500,700],category:"sans-serif"},{family:"Farsan",variants:[400],category:"display"},{family:"Fascinate",variants:[400],category:"display"},{family:"Fascinate Inline",variants:[400],category:"display"},{family:"Faster One",variants:[400],category:"display"},{family:"Fasthand",variants:[400],category:"serif"},{family:"Fauna One",variants:[400], |
| 253 |
category:"serif"},{family:"Faustina",variants:[400,500,600,700,"400i","500i","600i","700i"],category:"serif"},{family:"Federant",variants:[400],category:"display"},{family:"Federo",variants:[400],category:"sans-serif"},{family:"Felipa",variants:[400],category:"handwriting"},{family:"Fenix",variants:[400],category:"serif"},{family:"Finger Paint",variants:[400],category:"display"},{family:"Fira Code",variants:[300,400,500,600,700],category:"monospace"},{family:"Fira Mono",variants:[400,500,700],category:"monospace"},{family:"Fira Sans",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Fira Sans Condensed",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Fira Sans Extra Condensed",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Fjalla One",variants:[400],category:"sans-serif"},{family:"Fjord One",variants:[400],category:"serif"},{family:"Flamenco",variants:[300,400],category:"display"},{family:"Flavors",variants:[400],category:"display"},{family:"Fondamento",variants:[400,"400i"],category:"handwriting"},{family:"Fontdiner Swanky",variants:[400],category:"display"},{family:"Forum",variants:[400],category:"display"},{family:"Francois One",variants:[400],category:"sans-serif"},{family:"Frank Ruhl Libre",variants:[300,400,500,700,900],category:"serif"},{family:"Fraunces",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"serif"},{family:"Freckle Face",variants:[400],category:"display"},{family:"Fredericka the Great",variants:[400],category:"display"},{family:"Fredoka One",variants:[400],category:"display"},{family:"Freehand",variants:[400],category:"display"},{family:"Fresca",variants:[400],category:"sans-serif"},{family:"Frijole",variants:[400],category:"display"},{family:"Fruktur",variants:[400],category:"display"},{family:"Fugaz One",variants:[400],category:"display"},{family:"GFS Didot",variants:[400],category:"serif"},{family:"GFS Neohellenic",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Gabriela",variants:[400],category:"serif"},{family:"Gaegu",variants:[300,400,700],category:"handwriting"},{family:"Gafata",variants:[400],category:"sans-serif"},{family:"Galada",variants:[400],category:"display"},{family:"Galdeano",variants:[400],category:"sans-serif"},{family:"Galindo",variants:[400],category:"display"},{family:"Gamja Flower",variants:[400],category:"handwriting"},{family:"Gayathri",variants:[100,400,700],category:"sans-serif"},{family:"Gelasio",variants:[400,"400i",500,"500i",600,"600i",700,"700i"],category:"serif"},{family:"Gentium Basic",variants:[400,"400i",700,"700i"],category:"serif"},{family:"Gentium Book Basic",variants:[400,"400i",700,"700i"],category:"serif"},{family:"Geo",variants:[400,"400i"],category:"sans-serif"},{family:"Geostar",variants:[400],category:"display"},{family:"Geostar Fill",variants:[400],category:"display"},{family:"Germania One",variants:[400],category:"display"},{family:"Gidugu",variants:[400],category:"sans-serif"},{family:"Gilda Display",variants:[400],category:"serif"},{family:"Girassol",variants:[400],category:"display"},{family:"Give You Glory",variants:[400],category:"handwriting"},{family:"Glass Antiqua",variants:[400],category:"display"},{family:"Glegoo",variants:[400,700],category:"serif"},{family:"Gloria Hallelujah",variants:[400],category:"handwriting"},{family:"Goblin One",variants:[400],category:"display"},{family:"Gochi Hand",variants:[400],category:"handwriting"},{family:"Goldman",variants:[400,700],category:"display"},{family:"Gorditas",variants:[400,700],category:"display"},{family:"Gothic A1",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Gotu",variants:[400],category:"sans-serif"},{family:"Goudy Bookletter 1911",variants:[400],category:"serif"},{family:"Graduate",variants:[400],category:"display"},{family:"Grand Hotel",variants:[400],category:"handwriting"},{family:"Grandstander",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"display"},{family:"Gravitas One",variants:[400],category:"display"},{family:"Great Vibes",variants:[400],category:"handwriting"},{family:"Grenze",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"serif"},{family:"Grenze Gotisch",variants:[100,200,300,400,500,600,700,800,900],category:"display"},{family:"Griffy",variants:[400],category:"display"},{family:"Gruppo",variants:[400],category:"display"},{family:"Gudea",variants:[400,"400i",700],category:"sans-serif"},{family:"Gugi",variants:[400],category:"display"},{family:"Gupter",variants:[400,500,700],category:"serif"},{family:"Gurajada",variants:[400],category:"serif"},{family:"Habibi",variants:[400],category:"serif"},{family:"Hachi Maru Pop",variants:[400],category:"handwriting"},{family:"Halant",variants:[300,400,500,600,700],category:"serif"},{family:"Hammersmith One",variants:[400],category:"sans-serif"},{family:"Hanalei",variants:[400],category:"display"},{family:"Hanalei Fill",variants:[400],category:"display"},{family:"Handlee",variants:[400],category:"handwriting"},{family:"Hanuman",variants:[400,700],category:"serif"},{family:"Happy Monkey",variants:[400],category:"display"},{family:"Harmattan",variants:[400,700],category:"sans-serif"},{family:"Headland One",variants:[400],category:"serif"},{family:"Heebo",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Henny Penny",variants:[400],category:"display"},{family:"Hepta Slab",variants:[100,200,300,400,500,600,700,800,900],category:"serif"},{family:"Herr Von Muellerhoff",variants:[400],category:"handwriting"},{family:"Hi Melody",variants:[400],category:"handwriting"},{family:"Hind",variants:[300,400,500,600,700],category:"sans-serif"},{family:"Hind Guntur",variants:[300,400,500,600,700],category:"sans-serif"},{family:"Hind Madurai",variants:[300,400,500,600,700],category:"sans-serif"},{family:"Hind Siliguri",variants:[300,400,500,600,700],category:"sans-serif"},{family:"Hind Vadodara",variants:[300,400,500,600,700],category:"sans-serif"},{family:"Holtwood One SC",variants:[400],category:"serif"},{family:"Homemade Apple",variants:[400],category:"handwriting"},{family:"Homenaje",variants:[400],category:"sans-serif"},{family:"IBM Plex Mono",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"monospace"},{family:"IBM Plex Sans",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"sans-serif"},{family:"IBM Plex Sans Condensed",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"sans-serif"},{family:"IBM Plex Serif",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"serif"},{family:"IM Fell DW Pica",variants:[400,"400i"],category:"serif"},{family:"IM Fell DW Pica SC",variants:[400],category:"serif"},{family:"IM Fell Double Pica",variants:[400,"400i"],category:"serif"},{family:"IM Fell Double Pica SC",variants:[400],category:"serif"},{family:"IM Fell English",variants:[400,"400i"],category:"serif"},{family:"IM Fell English SC",variants:[400],category:"serif"},{family:"IM Fell French Canon",variants:[400,"400i"],category:"serif"},{family:"IM Fell French Canon SC",variants:[400],category:"serif"},{family:"IM Fell Great Primer",variants:[400,"400i"],category:"serif"},{family:"IM Fell Great Primer SC",variants:[400],category:"serif"},{family:"Ibarra Real Nova",variants:[400,500,600,700,"400i","500i","600i","700i"],category:"serif"},{family:"Iceberg",variants:[400],category:"display"},{family:"Iceland",variants:[400],category:"display"},{ |
| 254 |
family:"Imbue",variants:[100,200,300,400,500,600,700,800,900],category:"serif"},{family:"Imprima",variants:[400],category:"sans-serif"},{family:"Inconsolata",variants:[200,300,400,500,600,700,800,900],category:"monospace"},{family:"Inder",variants:[400],category:"sans-serif"},{family:"Indie Flower",variants:[400],category:"handwriting"},{family:"Inika",variants:[400,700],category:"serif"},{family:"Inknut Antiqua",variants:[300,400,500,600,700,800,900],category:"serif"},{family:"Inria Sans",variants:[300,"300i",400,"400i",700,"700i"],category:"sans-serif"},{family:"Inria Serif",variants:[300,"300i",400,"400i",700,"700i"],category:"serif"},{family:"Inter",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Irish Grover",variants:[400],category:"display"},{family:"Istok Web",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Italiana",variants:[400],category:"serif"},{family:"Italianno",variants:[400],category:"handwriting"},{family:"Itim",variants:[400],category:"handwriting"},{family:"Jacques Francois",variants:[400],category:"serif"},{family:"Jacques Francois Shadow",variants:[400],category:"display"},{family:"Jaldi",variants:[400,700],category:"sans-serif"},{family:"JetBrains Mono",variants:[100,200,300,400,500,600,700,800,"100i","200i","300i","400i","500i","600i","700i","800i"],category:"monospace"},{family:"Jim Nightshade",variants:[400],category:"handwriting"},{family:"Jockey One",variants:[400],category:"sans-serif"},{family:"Jolly Lodger",variants:[400],category:"display"},{family:"Jomhuria",variants:[400],category:"display"},{family:"Jomolhari",variants:[400],category:"serif"},{family:"Josefin Sans",variants:[100,200,300,400,500,600,700,"100i","200i","300i","400i","500i","600i","700i"],category:"sans-serif"},{family:"Josefin Slab",variants:[100,200,300,400,500,600,700,"100i","200i","300i","400i","500i","600i","700i"],category:"serif"},{family:"Jost",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"sans-serif"},{family:"Joti One",variants:[400],category:"display"},{family:"Jua",variants:[400],category:"sans-serif"},{family:"Judson",variants:[400,"400i",700],category:"serif"},{family:"Julee",variants:[400],category:"handwriting"},{family:"Julius Sans One",variants:[400],category:"sans-serif"},{family:"Junge",variants:[400],category:"serif"},{family:"Jura",variants:[300,400,500,600,700],category:"sans-serif"},{family:"Just Another Hand",variants:[400],category:"handwriting"},{family:"Just Me Again Down Here",variants:[400],category:"handwriting"},{family:"K2D",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i"],category:"sans-serif"},{family:"Kadwa",variants:[400,700],category:"serif"},{family:"Kalam",variants:[300,400,700],category:"handwriting"},{family:"Kameron",variants:[400,700],category:"serif"},{family:"Kanit",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Kantumruy",variants:[300,400,700],category:"sans-serif"},{family:"Karantina",variants:[300,400,700],category:"display"},{family:"Karla",variants:[200,300,400,500,600,700,800,"200i","300i","400i","500i","600i","700i","800i"],category:"sans-serif"},{family:"Karma",variants:[300,400,500,600,700],category:"serif"},{family:"Katibeh",variants:[400],category:"display"},{family:"Kaushan Script",variants:[400],category:"handwriting"},{family:"Kavivanar",variants:[400],category:"handwriting"},{family:"Kavoon",variants:[400],category:"display"},{family:"Kdam Thmor",variants:[400],category:"display"},{family:"Keania One",variants:[400],category:"display"},{family:"Kelly Slab",variants:[400],category:"display"},{family:"Kenia",variants:[400],category:"display"},{family:"Khand",variants:[300,400,500,600,700],category:"sans-serif"},{family:"Khmer",variants:[400],category:"display"},{family:"Khula",variants:[300,400,600,700,800],category:"sans-serif"},{family:"Kirang Haerang",variants:[400],category:"display"},{family:"Kite One",variants:[400],category:"sans-serif"},{family:"Kiwi Maru",variants:[300,400,500],category:"serif"},{family:"Knewave",variants:[400],category:"display"},{family:"KoHo",variants:[200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"sans-serif"},{family:"Kodchasan",variants:[200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"sans-serif"},{family:"Kosugi",variants:[400],category:"sans-serif"},{family:"Kosugi Maru",variants:[400],category:"sans-serif"},{family:"Kotta One",variants:[400],category:"serif"},{family:"Koulen",variants:[400],category:"display"},{family:"Kranky",variants:[400],category:"display"},{family:"Kreon",variants:[300,400,500,600,700],category:"serif"},{family:"Kristi",variants:[400],category:"handwriting"},{family:"Krona One",variants:[400],category:"sans-serif"},{family:"Krub",variants:[200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"sans-serif"},{family:"Kufam",variants:[400,500,600,700,800,900,"400i","500i","600i","700i","800i","900i"],category:"display"},{family:"Kulim Park",variants:[200,"200i",300,"300i",400,"400i",600,"600i",700,"700i"],category:"sans-serif"},{family:"Kumar One",variants:[400],category:"display"},{family:"Kumar One Outline",variants:[400],category:"display"},{family:"Kumbh Sans",variants:[300,400,700],category:"sans-serif"},{family:"Kurale",variants:[400],category:"serif"},{family:"La Belle Aurore",variants:[400],category:"handwriting"},{family:"Lacquer",variants:[400],category:"display"},{family:"Laila",variants:[300,400,500,600,700],category:"sans-serif"},{family:"Lakki Reddy",variants:[400],category:"handwriting"},{family:"Lalezar",variants:[400],category:"display"},{family:"Lancelot",variants:[400],category:"display"},{family:"Langar",variants:[400],category:"display"},{family:"Lateef",variants:[400],category:"handwriting"},{family:"Lato",variants:[100,"100i",300,"300i",400,"400i",700,"700i",900,"900i"],category:"sans-serif"},{family:"League Script",variants:[400],category:"handwriting"},{family:"Leckerli One",variants:[400],category:"handwriting"},{family:"Ledger",variants:[400],category:"serif"},{family:"Lekton",variants:[400,"400i",700],category:"sans-serif"},{family:"Lemon",variants:[400],category:"display"},{family:"Lemonada",variants:[300,400,500,600,700],category:"display"},{family:"Lexend",variants:[100,300,400,500,600,700,800],category:"sans-serif"},{family:"Lexend Deca",variants:[400],category:"sans-serif"},{family:"Lexend Exa",variants:[400],category:"sans-serif"},{family:"Lexend Giga",variants:[400],category:"sans-serif"},{family:"Lexend Mega",variants:[400],category:"sans-serif"},{family:"Lexend Peta",variants:[400],category:"sans-serif"},{family:"Lexend Tera",variants:[400],category:"sans-serif"},{family:"Lexend Zetta",variants:[400],category:"sans-serif"},{family:"Libre Barcode 128",variants:[400],category:"display"},{family:"Libre Barcode 128 Text",variants:[400],category:"display"},{family:"Libre Barcode 39",variants:[400],category:"display"},{family:"Libre Barcode 39 Extended",variants:[400],category:"display"},{family:"Libre Barcode 39 Extended Text",variants:[400],category:"display"},{family:"Libre Barcode 39 Text",variants:[400],category:"display"},{family:"Libre Barcode EAN13 Text",variants:[400],category:"display"},{family:"Libre Baskerville",variants:[400,"400i",700],category:"serif"},{family:"Libre Caslon Display",variants:[400],category:"serif"},{family:"Libre Caslon Text",variants:[400,"400i",700],category:"serif"},{family:"Libre Franklin",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"sans-serif"},{family:"Life Savers",variants:[400,700,800],category:"display"},{family:"Lilita One",variants:[400],category:"display"},{family:"Lily Script One",variants:[400],category:"display"},{family:"Limelight", |
| 255 |
variants:[400],category:"display"},{family:"Linden Hill",variants:[400,"400i"],category:"serif"},{family:"Literata",variants:[200,300,400,500,600,700,800,900,"200i","300i","400i","500i","600i","700i","800i","900i"],category:"serif"},{family:"Liu Jian Mao Cao",variants:[400],category:"handwriting"},{family:"Livvic",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",900,"900i"],category:"sans-serif"},{family:"Lobster",variants:[400],category:"display"},{family:"Lobster Two",variants:[400,"400i",700,"700i"],category:"display"},{family:"Londrina Outline",variants:[400],category:"display"},{family:"Londrina Shadow",variants:[400],category:"display"},{family:"Londrina Sketch",variants:[400],category:"display"},{family:"Londrina Solid",variants:[100,300,400,900],category:"display"},{family:"Long Cang",variants:[400],category:"handwriting"},{family:"Lora",variants:[400,500,600,700,"400i","500i","600i","700i"],category:"serif"},{family:"Love Ya Like A Sister",variants:[400],category:"display"},{family:"Loved by the King",variants:[400],category:"handwriting"},{family:"Lovers Quarrel",variants:[400],category:"handwriting"},{family:"Luckiest Guy",variants:[400],category:"display"},{family:"Lusitana",variants:[400,700],category:"serif"},{family:"Lustria",variants:[400],category:"serif"},{family:"M PLUS 1p",variants:[100,300,400,500,700,800,900],category:"sans-serif"},{family:"M PLUS Rounded 1c",variants:[100,300,400,500,700,800,900],category:"sans-serif"},{family:"Ma Shan Zheng",variants:[400],category:"handwriting"},{family:"Macondo",variants:[400],category:"display"},{family:"Macondo Swash Caps",variants:[400],category:"display"},{family:"Mada",variants:[200,300,400,500,600,700,900],category:"sans-serif"},{family:"Magra",variants:[400,700],category:"sans-serif"},{family:"Maiden Orange",variants:[400],category:"display"},{family:"Maitree",variants:[200,300,400,500,600,700],category:"serif"},{family:"Major Mono Display",variants:[400],category:"monospace"},{family:"Mako",variants:[400],category:"sans-serif"},{family:"Mali",variants:[200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"handwriting"},{family:"Mallanna",variants:[400],category:"sans-serif"},{family:"Mandali",variants:[400],category:"sans-serif"},{family:"Manjari",variants:[100,400,700],category:"sans-serif"},{family:"Manrope",variants:[200,300,400,500,600,700,800],category:"sans-serif"},{family:"Mansalva",variants:[400],category:"handwriting"},{family:"Manuale",variants:[400,500,600,700,"400i","500i","600i","700i"],category:"serif"},{family:"Marcellus",variants:[400],category:"serif"},{family:"Marcellus SC",variants:[400],category:"serif"},{family:"Marck Script",variants:[400],category:"handwriting"},{family:"Margarine",variants:[400],category:"display"},{family:"Markazi Text",variants:[400,500,600,700],category:"serif"},{family:"Marko One",variants:[400],category:"serif"},{family:"Marmelad",variants:[400],category:"sans-serif"},{family:"Martel",variants:[200,300,400,600,700,800,900],category:"serif"},{family:"Martel Sans",variants:[200,300,400,600,700,800,900],category:"sans-serif"},{family:"Marvel",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Mate",variants:[400,"400i"],category:"serif"},{family:"Mate SC",variants:[400],category:"serif"},{family:"Maven Pro",variants:[400,500,600,700,800,900],category:"sans-serif"},{family:"McLaren",variants:[400],category:"display"},{family:"Meddon",variants:[400],category:"handwriting"},{family:"MedievalSharp",variants:[400],category:"display"},{family:"Medula One",variants:[400],category:"display"},{family:"Meera Inimai",variants:[400],category:"sans-serif"},{family:"Megrim",variants:[400],category:"display"},{family:"Meie Script",variants:[400],category:"handwriting"},{family:"Merienda",variants:[400,700],category:"handwriting"},{family:"Merienda One",variants:[400],category:"handwriting"},{family:"Merriweather",variants:[300,"300i",400,"400i",700,"700i",900,"900i"],category:"serif"},{family:"Merriweather Sans",variants:[300,400,500,600,700,800,"300i","400i","500i","600i","700i","800i"],category:"sans-serif"},{family:"Metal",variants:[400],category:"display"},{family:"Metal Mania",variants:[400],category:"display"},{family:"Metamorphous",variants:[400],category:"display"},{family:"Metrophobic",variants:[400],category:"sans-serif"},{family:"Michroma",variants:[400],category:"sans-serif"},{family:"Milonga",variants:[400],category:"display"},{family:"Miltonian",variants:[400],category:"display"},{family:"Miltonian Tattoo",variants:[400],category:"display"},{family:"Mina",variants:[400,700],category:"sans-serif"},{family:"Miniver",variants:[400],category:"display"},{family:"Miriam Libre",variants:[400,700],category:"sans-serif"},{family:"Mirza",variants:[400,500,600,700],category:"display"},{family:"Miss Fajardose",variants:[400],category:"handwriting"},{family:"Mitr",variants:[200,300,400,500,600,700],category:"sans-serif"},{family:"Modak",variants:[400],category:"display"},{family:"Modern Antiqua",variants:[400],category:"display"},{family:"Mogra",variants:[400],category:"display"},{family:"Molengo",variants:[400],category:"sans-serif"},{family:"Molle",variants:[400,"400i"],category:"handwriting"},{family:"Monda",variants:[400,700],category:"sans-serif"},{family:"Monofett",variants:[400],category:"display"},{family:"Monoton",variants:[400],category:"display"},{family:"Monsieur La Doulaise",variants:[400],category:"handwriting"},{family:"Montaga",variants:[400],category:"serif"},{family:"Montez",variants:[400],category:"handwriting"},{family:"Montserrat",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Montserrat Alternates",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Montserrat Subrayada",variants:[400,700],category:"sans-serif"},{family:"Moul",variants:[400],category:"display"},{family:"Moulpali",variants:[400],category:"display"},{family:"Mountains of Christmas",variants:[400,700],category:"display"},{family:"Mouse Memoirs",variants:[400],category:"sans-serif"},{family:"Mr Bedfort",variants:[400],category:"handwriting"},{family:"Mr Dafoe",variants:[400],category:"handwriting"},{family:"Mr De Haviland",variants:[400],category:"handwriting"},{family:"Mrs Saint Delafield",variants:[400],category:"handwriting"},{family:"Mrs Sheppards",variants:[400],category:"handwriting"},{family:"Mukta",variants:[200,300,400,500,600,700,800],category:"sans-serif"},{family:"Mukta Mahee",variants:[200,300,400,500,600,700,800],category:"sans-serif"},{family:"Mukta Malar",variants:[200,300,400,500,600,700,800],category:"sans-serif"},{family:"Mukta Vaani",variants:[200,300,400,500,600,700,800],category:"sans-serif"},{family:"Mulish",variants:[200,300,400,500,600,700,800,900,"200i","300i","400i","500i","600i","700i","800i","900i"],category:"sans-serif"},{family:"MuseoModerno",variants:[100,200,300,400,500,600,700,800,900],category:"display"},{family:"Mystery Quest",variants:[400],category:"display"},{family:"NTR",variants:[400],category:"sans-serif"},{family:"Nanum Brush Script",variants:[400],category:"handwriting"},{family:"Nanum Gothic",variants:[400,700,800],category:"sans-serif"},{family:"Nanum Gothic Coding",variants:[400,700],category:"monospace"},{family:"Nanum Myeongjo",variants:[400,700,800],category:"serif"},{family:"Nanum Pen Script",variants:[400],category:"handwriting"},{family:"Nerko One",variants:[400],category:"handwriting"},{family:"Neucha",variants:[400],category:"handwriting"},{family:"Neuton",variants:[200,300,400,"400i",700,800],category:"serif"},{family:"New Rocker",variants:[400],category:"display"},{family:"New Tegomin",variants:[400],category:"serif"},{family:"News Cycle",variants:[400,700],category:"sans-serif"},{family:"Newsreader", |
| 256 |
variants:[200,300,400,500,600,700,800,"200i","300i","400i","500i","600i","700i","800i"],category:"serif"},{family:"Niconne",variants:[400],category:"handwriting"},{family:"Niramit",variants:[200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"sans-serif"},{family:"Nixie One",variants:[400],category:"display"},{family:"Nobile",variants:[400,"400i",500,"500i",700,"700i"],category:"sans-serif"},{family:"Nokora",variants:[400,700],category:"serif"},{family:"Norican",variants:[400],category:"handwriting"},{family:"Nosifer",variants:[400],category:"display"},{family:"Notable",variants:[400],category:"sans-serif"},{family:"Nothing You Could Do",variants:[400],category:"handwriting"},{family:"Noticia Text",variants:[400,"400i",700,"700i"],category:"serif"},{family:"Noto Sans",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Noto Sans HK",variants:[100,300,400,500,700,900],category:"sans-serif"},{family:"Noto Sans JP",variants:[100,300,400,500,700,900],category:"sans-serif"},{family:"Noto Sans KR",variants:[100,300,400,500,700,900],category:"sans-serif"},{family:"Noto Sans SC",variants:[100,300,400,500,700,900],category:"sans-serif"},{family:"Noto Sans TC",variants:[100,300,400,500,700,900],category:"sans-serif"},{family:"Noto Serif",variants:[400,"400i",700,"700i"],category:"serif"},{family:"Noto Serif JP",variants:[200,300,400,500,600,700,900],category:"serif"},{family:"Noto Serif KR",variants:[200,300,400,500,600,700,900],category:"serif"},{family:"Noto Serif SC",variants:[200,300,400,500,600,700,900],category:"serif"},{family:"Noto Serif TC",variants:[200,300,400,500,600,700,900],category:"serif"},{family:"Nova Cut",variants:[400],category:"display"},{family:"Nova Flat",variants:[400],category:"display"},{family:"Nova Mono",variants:[400],category:"monospace"},{family:"Nova Oval",variants:[400],category:"display"},{family:"Nova Round",variants:[400],category:"display"},{family:"Nova Script",variants:[400],category:"display"},{family:"Nova Slim",variants:[400],category:"display"},{family:"Nova Square",variants:[400],category:"display"},{family:"Numans",variants:[400],category:"sans-serif"},{family:"Nunito",variants:[200,"200i",300,"300i",400,"400i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Nunito Sans",variants:[200,"200i",300,"300i",400,"400i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Odibee Sans",variants:[400],category:"display"},{family:"Odor Mean Chey",variants:[400],category:"display"},{family:"Offside",variants:[400],category:"display"},{family:"Oi",variants:[400],category:"display"},{family:"Old Standard TT",variants:[400,"400i",700],category:"serif"},{family:"Oldenburg",variants:[400],category:"display"},{family:"Oleo Script",variants:[400,700],category:"display"},{family:"Oleo Script Swash Caps",variants:[400,700],category:"display"},{family:"Open Sans",variants:[300,"300i",400,"400i",600,"600i",700,"700i",800,"800i"],category:"sans-serif"},{family:"Open Sans Condensed",variants:[300,"300i",400,700],category:"sans-serif"},{family:"Oranienbaum",variants:[400],category:"serif"},{family:"Orbitron",variants:[400,500,600,700,800,900],category:"sans-serif"},{family:"Oregano",variants:[400,"400i"],category:"display"},{family:"Orelega One",variants:[400],category:"display"},{family:"Orienta",variants:[400],category:"sans-serif"},{family:"Original Surfer",variants:[400],category:"display"},{family:"Oswald",variants:[200,300,400,500,600,700],category:"sans-serif"},{family:"Over the Rainbow",variants:[400],category:"handwriting"},{family:"Overlock",variants:[400,"400i",700,"700i",900,"900i"],category:"display"},{family:"Overlock SC",variants:[400],category:"display"},{family:"Overpass",variants:[100,"100i",200,"200i",300,"300i",400,"400i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Overpass Mono",variants:[300,400,600,700],category:"monospace"},{family:"Ovo",variants:[400],category:"serif"},{family:"Oxanium",variants:[200,300,400,500,600,700,800],category:"display"},{family:"Oxygen",variants:[300,400,700],category:"sans-serif"},{family:"Oxygen Mono",variants:[400],category:"monospace"},{family:"PT Mono",variants:[400],category:"monospace"},{family:"PT Sans",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"PT Sans Caption",variants:[400,700],category:"sans-serif"},{family:"PT Sans Narrow",variants:[400,700],category:"sans-serif"},{family:"PT Serif",variants:[400,"400i",700,"700i"],category:"serif"},{family:"PT Serif Caption",variants:[400,"400i"],category:"serif"},{family:"Pacifico",variants:[400],category:"handwriting"},{family:"Padauk",variants:[400,700],category:"sans-serif"},{family:"Palanquin",variants:[100,200,300,400,500,600,700],category:"sans-serif"},{family:"Palanquin Dark",variants:[400,500,600,700],category:"sans-serif"},{family:"Pangolin",variants:[400],category:"handwriting"},{family:"Paprika",variants:[400],category:"display"},{family:"Parisienne",variants:[400],category:"handwriting"},{family:"Passero One",variants:[400],category:"display"},{family:"Passion One",variants:[400,700,900],category:"display"},{family:"Pathway Gothic One",variants:[400],category:"sans-serif"},{family:"Patrick Hand",variants:[400],category:"handwriting"},{family:"Patrick Hand SC",variants:[400],category:"handwriting"},{family:"Pattaya",variants:[400],category:"sans-serif"},{family:"Patua One",variants:[400],category:"display"},{family:"Pavanam",variants:[400],category:"sans-serif"},{family:"Paytone One",variants:[400],category:"sans-serif"},{family:"Peddana",variants:[400],category:"serif"},{family:"Peralta",variants:[400],category:"display"},{family:"Permanent Marker",variants:[400],category:"handwriting"},{family:"Petit Formal Script",variants:[400],category:"handwriting"},{family:"Petrona",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"serif"},{family:"Philosopher",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Piazzolla",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"serif"},{family:"Piedra",variants:[400],category:"display"},{family:"Pinyon Script",variants:[400],category:"handwriting"},{family:"Pirata One",variants:[400],category:"display"},{family:"Plaster",variants:[400],category:"display"},{family:"Play",variants:[400,700],category:"sans-serif"},{family:"Playball",variants:[400],category:"display"},{family:"Playfair Display",variants:[400,500,600,700,800,900,"400i","500i","600i","700i","800i","900i"],category:"serif"},{family:"Playfair Display SC",variants:[400,"400i",700,"700i",900,"900i"],category:"serif"},{family:"Podkova",variants:[400,500,600,700,800],category:"serif"},{family:"Poiret One",variants:[400],category:"display"},{family:"Poller One",variants:[400],category:"display"},{family:"Poly",variants:[400,"400i"],category:"serif"},{family:"Pompiere",variants:[400],category:"display"},{family:"Pontano Sans",variants:[400],category:"sans-serif"},{family:"Poor Story",variants:[400],category:"display"},{family:"Poppins",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Port Lligat Sans",variants:[400],category:"sans-serif"},{family:"Port Lligat Slab",variants:[400],category:"serif"},{family:"Potta One",variants:[400],category:"display"},{family:"Pragati Narrow",variants:[400,700],category:"sans-serif"},{family:"Prata",variants:[400],category:"serif"},{family:"Preahvihear",variants:[400],category:"display"},{family:"Press Start 2P",variants:[400],category:"display"},{family:"Pridi",variants:[200,300,400,500,600,700],category:"serif"},{family:"Princess Sofia",variants:[400],category:"handwriting"},{family:"Prociono",variants:[400],category:"serif"},{family:"Prompt", |
| 257 |
variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Prosto One",variants:[400],category:"display"},{family:"Proza Libre",variants:[400,"400i",500,"500i",600,"600i",700,"700i",800,"800i"],category:"sans-serif"},{family:"Public Sans",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"sans-serif"},{family:"Puritan",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Purple Purse",variants:[400],category:"display"},{family:"Quando",variants:[400],category:"serif"},{family:"Quantico",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Quattrocento",variants:[400,700],category:"serif"},{family:"Quattrocento Sans",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Questrial",variants:[400],category:"sans-serif"},{family:"Quicksand",variants:[300,400,500,600,700],category:"sans-serif"},{family:"Quintessential",variants:[400],category:"handwriting"},{family:"Qwigley",variants:[400],category:"handwriting"},{family:"Racing Sans One",variants:[400],category:"display"},{family:"Radley",variants:[400,"400i"],category:"serif"},{family:"Rajdhani",variants:[300,400,500,600,700],category:"sans-serif"},{family:"Rakkas",variants:[400],category:"display"},{family:"Raleway",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"sans-serif"},{family:"Raleway Dots",variants:[400],category:"display"},{family:"Ramabhadra",variants:[400],category:"sans-serif"},{family:"Ramaraja",variants:[400],category:"serif"},{family:"Rambla",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Rammetto One",variants:[400],category:"display"},{family:"Ranchers",variants:[400],category:"display"},{family:"Rancho",variants:[400],category:"handwriting"},{family:"Ranga",variants:[400,700],category:"display"},{family:"Rasa",variants:[300,400,500,600,700],category:"serif"},{family:"Rationale",variants:[400],category:"sans-serif"},{family:"Ravi Prakash",variants:[400],category:"display"},{family:"Recursive",variants:[300,400,500,600,700,800,900],category:"sans-serif"},{family:"Red Hat Display",variants:[400,"400i",500,"500i",700,"700i",900,"900i"],category:"sans-serif"},{family:"Red Hat Text",variants:[400,"400i",500,"500i",700,"700i"],category:"sans-serif"},{family:"Red Rose",variants:[300,400,500,600,700],category:"display"},{family:"Redressed",variants:[400],category:"handwriting"},{family:"Reem Kufi",variants:[400],category:"sans-serif"},{family:"Reenie Beanie",variants:[400],category:"handwriting"},{family:"Reggae One",variants:[400],category:"display"},{family:"Revalia",variants:[400],category:"display"},{family:"Rhodium Libre",variants:[400],category:"serif"},{family:"Ribeye",variants:[400],category:"display"},{family:"Ribeye Marrow",variants:[400],category:"display"},{family:"Righteous",variants:[400],category:"display"},{family:"Risque",variants:[400],category:"display"},{family:"Roboto",variants:[100,"100i",300,"300i",400,"400i",500,"500i",700,"700i",900,"900i"],category:"sans-serif"},{family:"Roboto Condensed",variants:[300,"300i",400,"400i",700,"700i"],category:"sans-serif"},{family:"Roboto Mono",variants:[100,200,300,400,500,600,700,"100i","200i","300i","400i","500i","600i","700i"],category:"monospace"},{family:"Roboto Slab",variants:[100,200,300,400,500,600,700,800,900],category:"serif"},{family:"Rochester",variants:[400],category:"handwriting"},{family:"Rock Salt",variants:[400],category:"handwriting"},{family:"RocknRoll One",variants:[400],category:"sans-serif"},{family:"Rokkitt",variants:[100,200,300,400,500,600,700,800,900],category:"serif"},{family:"Romanesco",variants:[400],category:"handwriting"},{family:"Ropa Sans",variants:[400,"400i"],category:"sans-serif"},{family:"Rosario",variants:[300,400,500,600,700,"300i","400i","500i","600i","700i"],category:"sans-serif"},{family:"Rosarivo",variants:[400,"400i"],category:"serif"},{family:"Rouge Script",variants:[400],category:"handwriting"},{family:"Rowdies",variants:[300,400,700],category:"display"},{family:"Rozha One",variants:[400],category:"serif"},{family:"Rubik",variants:[300,400,500,600,700,800,900,"300i","400i","500i","600i","700i","800i","900i"],category:"sans-serif"},{family:"Rubik Mono One",variants:[400],category:"sans-serif"},{family:"Ruda",variants:[400,500,600,700,800,900],category:"sans-serif"},{family:"Rufina",variants:[400,700],category:"serif"},{family:"Ruge Boogie",variants:[400],category:"handwriting"},{family:"Ruluko",variants:[400],category:"sans-serif"},{family:"Rum Raisin",variants:[400],category:"sans-serif"},{family:"Ruslan Display",variants:[400],category:"display"},{family:"Russo One",variants:[400],category:"sans-serif"},{family:"Ruthie",variants:[400],category:"handwriting"},{family:"Rye",variants:[400],category:"display"},{family:"Sacramento",variants:[400],category:"handwriting"},{family:"Sahitya",variants:[400,700],category:"serif"},{family:"Sail",variants:[400],category:"display"},{family:"Saira",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"sans-serif"},{family:"Saira Condensed",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Saira Extra Condensed",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Saira Semi Condensed",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Saira Stencil One",variants:[400],category:"display"},{family:"Salsa",variants:[400],category:"display"},{family:"Sanchez",variants:[400,"400i"],category:"serif"},{family:"Sancreek",variants:[400],category:"display"},{family:"Sansita",variants:[400,"400i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Sansita Swashed",variants:[300,400,500,600,700,800,900],category:"display"},{family:"Sarabun",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i"],category:"sans-serif"},{family:"Sarala",variants:[400,700],category:"sans-serif"},{family:"Sarina",variants:[400],category:"display"},{family:"Sarpanch",variants:[400,500,600,700,800,900],category:"sans-serif"},{family:"Satisfy",variants:[400],category:"handwriting"},{family:"Sawarabi Gothic",variants:[400],category:"sans-serif"},{family:"Sawarabi Mincho",variants:[400],category:"sans-serif"},{family:"Scada",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"Scheherazade",variants:[400,700],category:"serif"},{family:"Schoolbell",variants:[400],category:"handwriting"},{family:"Scope One",variants:[400],category:"serif"},{family:"Seaweed Script",variants:[400],category:"display"},{family:"Secular One",variants:[400],category:"sans-serif"},{family:"Sedgwick Ave",variants:[400],category:"handwriting"},{family:"Sedgwick Ave Display",variants:[400],category:"handwriting"},{family:"Sen",variants:[400,700,800],category:"sans-serif"},{family:"Sevillana",variants:[400],category:"display"},{family:"Seymour One",variants:[400],category:"sans-serif"},{family:"Shadows Into Light",variants:[400],category:"handwriting"},{family:"Shadows Into Light Two",variants:[400],category:"handwriting"},{family:"Shanti",variants:[400],category:"sans-serif"},{family:"Share",variants:[400,"400i",700,"700i"],category:"display"},{family:"Share Tech",variants:[400],category:"sans-serif"},{family:"Share Tech Mono",variants:[400],category:"monospace"},{family:"Shippori Mincho",variants:[400,500,600,700,800],category:"serif"},{family:"Shippori Mincho B1",variants:[400,500,600,700,800],category:"serif"},{family:"Shojumaru",variants:[400],category:"display"},{family:"Short Stack",variants:[400],category:"handwriting"},{family:"Shrikhand",variants:[400],category:"display"},{family:"Siemreap",variants:[400],category:"display"},{family:"Sigmar One",variants:[400],category:"display"},{family:"Signika", |
| 258 |
variants:[300,400,500,600,700],category:"sans-serif"},{family:"Signika Negative",variants:[300,400,600,700],category:"sans-serif"},{family:"Simonetta",variants:[400,"400i",900,"900i"],category:"display"},{family:"Single Day",variants:[400],category:"display"},{family:"Sintony",variants:[400,700],category:"sans-serif"},{family:"Sirin Stencil",variants:[400],category:"display"},{family:"Six Caps",variants:[400],category:"sans-serif"},{family:"Skranji",variants:[400,700],category:"display"},{family:"Slabo 13px",variants:[400],category:"serif"},{family:"Slabo 27px",variants:[400],category:"serif"},{family:"Slackey",variants:[400],category:"display"},{family:"Smokum",variants:[400],category:"display"},{family:"Smythe",variants:[400],category:"display"},{family:"Sniglet",variants:[400,800],category:"display"},{family:"Snippet",variants:[400],category:"sans-serif"},{family:"Snowburst One",variants:[400],category:"display"},{family:"Sofadi One",variants:[400],category:"display"},{family:"Sofia",variants:[400],category:"handwriting"},{family:"Solway",variants:[300,400,500,700,800],category:"serif"},{family:"Song Myung",variants:[400],category:"serif"},{family:"Sonsie One",variants:[400],category:"display"},{family:"Sora",variants:[100,200,300,400,500,600,700,800],category:"sans-serif"},{family:"Sorts Mill Goudy",variants:[400,"400i"],category:"serif"},{family:"Source Code Pro",variants:[200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",900,"900i"],category:"monospace"},{family:"Source Sans Pro",variants:[200,"200i",300,"300i",400,"400i",600,"600i",700,"700i",900,"900i"],category:"sans-serif"},{family:"Source Serif Pro",variants:[200,"200i",300,"300i",400,"400i",600,"600i",700,"700i",900,"900i"],category:"serif"},{family:"Space Grotesk",variants:[300,400,500,600,700],category:"sans-serif"},{family:"Space Mono",variants:[400,"400i",700,"700i"],category:"monospace"},{family:"Spartan",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Special Elite",variants:[400],category:"display"},{family:"Spectral",variants:[200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i"],category:"serif"},{family:"Spectral SC",variants:[200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i"],category:"serif"},{family:"Spicy Rice",variants:[400],category:"display"},{family:"Spinnaker",variants:[400],category:"sans-serif"},{family:"Spirax",variants:[400],category:"display"},{family:"Squada One",variants:[400],category:"display"},{family:"Sree Krushnadevaraya",variants:[400],category:"serif"},{family:"Sriracha",variants:[400],category:"handwriting"},{family:"Srisakdi",variants:[400,700],category:"display"},{family:"Staatliches",variants:[400],category:"display"},{family:"Stalemate",variants:[400],category:"handwriting"},{family:"Stalinist One",variants:[400],category:"display"},{family:"Stardos Stencil",variants:[400,700],category:"display"},{family:"Stick",variants:[400],category:"sans-serif"},{family:"Stint Ultra Condensed",variants:[400],category:"display"},{family:"Stint Ultra Expanded",variants:[400],category:"display"},{family:"Stoke",variants:[300,400],category:"serif"},{family:"Strait",variants:[400],category:"sans-serif"},{family:"Stylish",variants:[400],category:"sans-serif"},{family:"Sue Ellen Francisco",variants:[400],category:"handwriting"},{family:"Suez One",variants:[400],category:"serif"},{family:"Sulphur Point",variants:[300,400,700],category:"sans-serif"},{family:"Sumana",variants:[400,700],category:"serif"},{family:"Sunflower",variants:[300,400,500,700],category:"sans-serif"},{family:"Sunshiney",variants:[400],category:"handwriting"},{family:"Supermercado One",variants:[400],category:"display"},{family:"Sura",variants:[400,700],category:"serif"},{family:"Suranna",variants:[400],category:"serif"},{family:"Suravaram",variants:[400],category:"serif"},{family:"Suwannaphum",variants:[400],category:"display"},{family:"Swanky and Moo Moo",variants:[400],category:"handwriting"},{family:"Syncopate",variants:[400,700],category:"sans-serif"},{family:"Syne",variants:[400,500,600,700,800],category:"sans-serif"},{family:"Syne Mono",variants:[400],category:"monospace"},{family:"Syne Tactile",variants:[400],category:"display"},{family:"Tajawal",variants:[200,300,400,500,700,800,900],category:"sans-serif"},{family:"Tangerine",variants:[400,700],category:"handwriting"},{family:"Taprom",variants:[400],category:"display"},{family:"Tauri",variants:[400],category:"sans-serif"},{family:"Taviraj",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"serif"},{family:"Teko",variants:[300,400,500,600,700],category:"sans-serif"},{family:"Telex",variants:[400],category:"sans-serif"},{family:"Tenali Ramakrishna",variants:[400],category:"sans-serif"},{family:"Tenor Sans",variants:[400],category:"sans-serif"},{family:"Text Me One",variants:[400],category:"sans-serif"},{family:"Texturina",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"serif"},{family:"Thasadith",variants:[400,"400i",700,"700i"],category:"sans-serif"},{family:"The Girl Next Door",variants:[400],category:"handwriting"},{family:"Tienne",variants:[400,700,900],category:"serif"},{family:"Tillana",variants:[400,500,600,700,800],category:"handwriting"},{family:"Timmana",variants:[400],category:"sans-serif"},{family:"Tinos",variants:[400,"400i",700,"700i"],category:"serif"},{family:"Titan One",variants:[400],category:"display"},{family:"Titillium Web",variants:[200,"200i",300,"300i",400,"400i",600,"600i",700,"700i",900],category:"sans-serif"},{family:"Tomorrow",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"sans-serif"},{family:"Trade Winds",variants:[400],category:"display"},{family:"Train One",variants:[400],category:"display"},{family:"Trirong",variants:[100,"100i",200,"200i",300,"300i",400,"400i",500,"500i",600,"600i",700,"700i",800,"800i",900,"900i"],category:"serif"},{family:"Trispace",variants:[100,200,300,400,500,600,700,800],category:"sans-serif"},{family:"Trocchi",variants:[400],category:"serif"},{family:"Trochut",variants:[400,"400i",700],category:"display"},{family:"Truculenta",variants:[100,200,300,400,500,600,700,800,900],category:"sans-serif"},{family:"Trykker",variants:[400],category:"serif"},{family:"Tulpen One",variants:[400],category:"display"},{family:"Turret Road",variants:[200,300,400,500,700,800],category:"display"},{family:"Ubuntu",variants:[300,"300i",400,"400i",500,"500i",700,"700i"],category:"sans-serif"},{family:"Ubuntu Condensed",variants:[400],category:"sans-serif"},{family:"Ubuntu Mono",variants:[400,"400i",700,"700i"],category:"monospace"},{family:"Ultra",variants:[400],category:"serif"},{family:"Uncial Antiqua",variants:[400],category:"display"},{family:"Underdog",variants:[400],category:"display"},{family:"Unica One",variants:[400],category:"display"},{family:"UnifrakturCook",variants:[400,700],category:"display"},{family:"UnifrakturMaguntia",variants:[400],category:"display"},{family:"Unkempt",variants:[400,700],category:"display"},{family:"Unlock",variants:[400],category:"display"},{family:"Unna",variants:[400,"400i",700,"700i"],category:"serif"},{family:"VT323",variants:[400],category:"monospace"},{family:"Vampiro One",variants:[400],category:"display"},{family:"Varela",variants:[400],category:"sans-serif"},{family:"Varela Round",variants:[400],category:"sans-serif"},{family:"Varta",variants:[300,400,500,600,700],category:"sans-serif"},{family:"Vast Shadow",variants:[400],category:"display"},{family:"Vesper Libre",variants:[400,500,700,900],category:"serif"},{family:"Viaoda Libre",variants:[400],category:"display"},{family:"Vibes",variants:[400],category:"display"},{family:"Vibur",variants:[400],category:"handwriting"},{family:"Vidaloka",variants:[400],category:"serif"},{family:"Viga",variants:[400], |
| 259 |
category:"sans-serif"},{family:"Voces",variants:[400],category:"display"},{family:"Volkhov",variants:[400,"400i",700,"700i"],category:"serif"},{family:"Vollkorn",variants:[400,500,600,700,800,900,"400i","500i","600i","700i","800i","900i"],category:"serif"},{family:"Vollkorn SC",variants:[400,600,700,900],category:"serif"},{family:"Voltaire",variants:[400],category:"sans-serif"},{family:"Waiting for the Sunrise",variants:[400],category:"handwriting"},{family:"Wallpoet",variants:[400],category:"display"},{family:"Walter Turncoat",variants:[400],category:"handwriting"},{family:"Warnes",variants:[400],category:"display"},{family:"Wellfleet",variants:[400],category:"display"},{family:"Wendy One",variants:[400],category:"sans-serif"},{family:"Wire One",variants:[400],category:"sans-serif"},{family:"Work Sans",variants:[100,200,300,400,500,600,700,800,900,"100i","200i","300i","400i","500i","600i","700i","800i","900i"],category:"sans-serif"},{family:"Xanh Mono",variants:[400,"400i"],category:"monospace"},{family:"Yanone Kaffeesatz",variants:[200,300,400,500,600,700],category:"sans-serif"},{family:"Yantramanav",variants:[100,300,400,500,700,900],category:"sans-serif"},{family:"Yatra One",variants:[400],category:"display"},{family:"Yellowtail",variants:[400],category:"handwriting"},{family:"Yeon Sung",variants:[400],category:"display"},{family:"Yeseva One",variants:[400],category:"display"},{family:"Yesteryear",variants:[400],category:"handwriting"},{family:"Yrsa",variants:[300,400,500,600,700],category:"serif"},{family:"Yusei Magic",variants:[400],category:"sans-serif"},{family:"ZCOOL KuaiLe",variants:[400],category:"display"},{family:"ZCOOL QingKe HuangYou",variants:[400],category:"display"},{family:"ZCOOL XiaoWei",variants:[400],category:"serif"},{family:"Zen Dots",variants:[400],category:"display"},{family:"Zeyada",variants:[400],category:"handwriting"},{family:"Zhi Mang Xing",variants:[400],category:"handwriting"},{family:"Zilla Slab",variants:[300,"300i",400,"400i",500,"500i",600,"600i",700,"700i"],category:"serif"},{family:"Zilla Slab Highlight",variants:[400,700],category:"display"}],As=[{label:(0,x.__)("Normal"),value:"normal"},{label:(0,x.__)("Italic"),value:"italic"},{label:(0,x.__)("Oblique"),value:"oblique"}],Bs=[{label:(0,x.__)("None"),value:"none",icon:"NO"},{label:(0,x.__)("Capitalize"),value:"capitalize",icon:"Aa"},{label:(0,x.__)("Uppercase"),value:"uppercase",icon:"AA"},{label:(0,x.__)("Lowercase"),value:"lowercase",icon:"aa"}],Is=[{label:(0,x.__)("Default"),value:"auto"},{label:(0,x.__)("Underline"),value:"underline"},{label:(0,x.__)("Overline"),value:"overline"},{label:(0,x.__)("Line Through"),value:"line-through"},{label:(0,x.__)("None"),value:"none"}],Os=e=>{const{className:t="",label:n=(0,x.__)("Typography:"),value:o,onChange:i,defaults:s={},isFamily:a=!0}=e,r={fontFamily:"Default",fontCategory:"sans-serif",fontWeight:null,isUploadFont:!0,fontSize:{desktop:null,tablet:null,mobile:null},fontStyle:null,textTransform:null,textDecoration:null,lineHeight:null,letterSpace:null},c=e=>s?.[e]||r[e],d=e=>void 0===o?.[e]?c(e):o?.[e],u=e=>o?.[e]&&o?.[e]!==c(e)&&(0,l.jsx)(y.Button,{icon:"image-rotate",className:"bPlResetVal",onClick:()=>(e=>i({...o,[e]:c(e)}))(e)}),[p,h]=(0,m.useState)("desktop"),[g,b]=(0,m.useState)(""),[f,k]=(0,m.useState)(!1),w=Ps.filter((({family:e})=>e.toLowerCase().includes(g.toLowerCase()))),_=()=>{const e=Ps.find((e=>e.family===d("fontFamily")))?.variants;let t=[];return e?.map((e=>t?.push({label:e,value:e}))),0===t.length?[400]:t},C=(e,t,n)=>{const s=pe(o,(o=>{o[e]=n?{...o[e],[n]:t}:t}));i(s)};return(0,l.jsxs)(y.PanelRow,{className:`bPlDropdown ${t}`,children:[(0,l.jsx)(v,{className:"",children:n}),(0,l.jsx)(y.Dropdown,{className:"bPlDropdownContainer",contentClassName:"bPlDropdownPopover",popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,l.jsx)(y.Button,{icon:"admin-customizer",onClick:t,"aria-expanded":e}),renderContent:()=>(0,l.jsxs)(l.Fragment,{children:[a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"bPlTypoFontTitle",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Font Family:")}),(0,l.jsx)(v,{className:"",children:(0,x.__)("Weight:")})]}),(0,l.jsxs)(y.PanelRow,{className:"bPlTypoFont",children:[(0,l.jsxs)("div",{className:"bPlTypoFontSelect",children:[(0,l.jsx)("input",{type:"search",value:g,onClick:()=>k(!f),placeholder:d("fontFamily")||"Search Font",onChange:e=>b(e.target.value)}),(0,l.jsx)("span",{className:`dashicon dashicons dashicons-${f?"arrow-up":"arrow-down"} `,onClick:()=>k(!f)}),f&&(0,l.jsx)("ul",{className:"bPlTypoFontLists",children:w?.map((e=>(0,l.jsx)("li",{onClick:()=>{i({...o,fontFamily:e?.family,fontCategory:e?.category||"sans-serif",fontWeight:400,fontVariant:400}),b(""),k(!1)},children:e?.family},e?.family)))})]}),(0,l.jsx)(y.SelectControl,{value:d("fontVariant")||"",onChange:e=>{i({...o,fontWeight:parseInt(e?.replace("00i","00")),fontVariant:e})},options:_()})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Load Google Font"),checked:d("isUploadFont"),onChange:e=>C("isUploadFont",e),__nextHasNoMarginBottom:!0})]}):(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Weight:")}),(0,l.jsx)(y.SelectControl,{value:d("fontWeight")||"",onChange:e=>C("fontWeight",e),options:_()})]}),(0,l.jsxs)(y.Flex,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Font Size:")}),(0,l.jsx)(Es,{device:p,onChange:e=>h(e)}),(0,l.jsx)(y.__experimentalUnitControl,{value:d("fontSize")?.[p]||d("fontSize"),onChange:e=>C("fontSize",e,p),units:[Ee(16),Be(1),Ae(1),Ie(.85)],style:{width:"100px"}})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Font Style:")}),(0,l.jsx)(y.SelectControl,{value:d("fontStyle")||"",onChange:e=>C("fontStyle",e),options:As}),u("fontStyle")]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mt5",children:(0,x.__)("Text Transform:")}),(0,l.jsx)(Tn,{value:d("textTransform"),onChange:e=>C("textTransform",e),options:Bs,isTextIcon:!0})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Decoration:")}),(0,l.jsx)(y.SelectControl,{value:d("textDecoration")||"",onChange:e=>C("textDecoration",e),options:Is}),u("textDecoration")]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Line Height:"),labelPosition:"left",value:d("lineHeight"),onChange:e=>C("lineHeight",e),units:[Ee(24),Pe(135),Ae(2),Be(2)],isResetValueOnUnitChange:!0}),u("lineHeight")]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Letter Spacing:"),labelPosition:"left",value:d("letterSpace"),onChange:e=>C("letterSpace",e),units:[Ee(),Ae(),Be()]}),u("letterSpace")]})]})})]})},Rs=()=>(0,l.jsxs)("span",{children:["Need more block like this? Checkout the bundle ➡ ",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:"bBlocks"})]}),zs=[{value:"initial",label:"Auto"},{value:1,label:"Full"}],Ds=[{value:"none",label:"None"},{value:"ocean-wave",label:"Ocean Wave"},{value:"asymmetric-triangle",label:"Asymmetric Triangle [Left]"},{value:"abstract-paintbrush",label:"Abstract Paintbrush"},{value:"asymmetric-curve",label:"Asymmetric Curve (Inverted)"}],Fs=[{value:"start",label:"Top"},{value:"center",label:"Center"},{value:"end",label:"Bottom"}],Hs=[{value:"flex-start",label:"Left"},{value:"center",label:"Center"},{value:"flex-end",label:"Right"}],Ws=[{name:"top",title:(0,x.__)("Top","b-blocks")},{name:"bottom",title:(0,x.__)("Bottom","b-blocks")}],Us={dimension:["padding","margin","width","minWidth","maxWidth","minHeight","height"],transform:!0,background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],mask:!0,animation:!0,visibility:["zIndex","overflow"],responsive:!0,css:!0},Gs=e=>{ |
| 260 |
const{attributes:t,setAttributes:n,device:o}=e,{content:i}=t,{isFullWidth:s,width:a,height:r,verticalAlign:c,horizontalAlign:d}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:"Enable Full Width",checked:s,onChange:e=>n({content:be(i,e,"isFullWidth")})}),!s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Width:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:a[o],onChange:e=>n({content:be(i,e,"width",o)}),beforeIcon:"grid-view"})]}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Height","b-blocks"),labelPosition:"left",value:r,onChange:e=>{n({content:be(i,e,"height")})},options:zs}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Vertical Align","b-blocks"),labelPosition:"left",value:c,options:Fs,onChange:e=>{n({content:be(i,e,"verticalAlign")})}}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Horizontal Align","b-blocks"),labelPosition:"left",value:d,options:Hs,onChange:e=>{n({content:be(i,e,"horizontalAlign")})}})]})},Vs=e=>{const{attributes:t,setAttributes:n}=e,{wrapper:o}=t,{minHeight:i}=o;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Wrapper","b-blocks"),children:(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Minimum Height:","b-blocks"),labelPosition:"left",value:i,onChange:e=>n({wrapper:{...o,minHeight:e}}),units:[Ee(700),Oe(100),Ae(43),Pe(100)],isResetValueOnUnitChange:!0})})},qs=({isProModalOpen:e,setIsProModalOpen:t,link:n,children:o})=>e&&(0,l.jsxs)(y.Modal,{className:"bplAboutProModal",title:(0,x.__)("Upgrade to PRO"),onRequestClose:()=>t(!1),children:[(0,l.jsx)("h3",{children:(0,x.__)("Explore new features in Pro")}),(0,l.jsx)("ul",{className:"features",children:o}),(0,l.jsx)("h4",{className:"text",children:(0,x.__)("To unlock those features! Upgrade to Pro")}),(0,l.jsx)("br",{}),(0,l.jsx)(Bn,{href:n,target:"_blank",children:(0,x.__)("Upgrade Now")})]}),Ys=({label:e,className:t,onChange:n,isPremium:o=!1,Component:i,setIsProModalOpen:s=()=>{},...a})=>(0,l.jsx)(i,{className:`${t} ${o?"":"bplProIdentifier"}`,label:(e=>o?e:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"bplOpacity75",children:e})," ",(0,l.jsx)("span",{className:"labelPro",children:(0,x.__)("Pro")})]}))(e),onChange:e=>o?n(e):s(!0),...a}),Ks=e=>{const{className:t,label:n,value:o,onChange:i,options:s,isIcon:a=!1,isTextIcon:r=!1,size:c="compact",isPremium:d=!1,setIsProModalOpen:u=()=>{},proValues:p}=e,h=s.map((e=>({...e,className:p?.includes(e.value)&&!d?"bplProGroupBtn":""}))),g=({className:e=""})=>(0,l.jsx)(y.ButtonGroup,{className:`bPlBtnGroup ${e||null}`,children:h?.map((e=>{const{className:t="",value:n,icon:s="",label:h="",def:g=""}=e,m=o===n;return(0,l.jsx)(y.Button,{className:t,label:h,showTooltip:!0,tooltipPosition:"top",icon:a?s:null,variant:m?"primary":"","aria-pressed":m,size:c,onClick:()=>d?i(n,g&&g):p?.includes(n)?u(!0):i(n,g&&g),children:r?s:a?"":h},n)}))});return n?(0,l.jsxs)(y.PanelRow,{className:t,children:[(0,l.jsx)(v,{className:"",children:n}),(0,l.jsx)(g,{})]}):(0,l.jsx)(g,{className:t})},Qs=((0,f.withSelect)((e=>({currentPostType:e("core/editor").getCurrentPostType()})))((({postType:e,shortCode:t,currentPostType:n})=>{const o=(0,m.useRef)(null);return e===n&&(0,l.jsxs)("div",{className:"bPlFrontShortCode",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Copy the shortcode and use it anywhere.")}),(0,l.jsxs)("div",{className:"bPlFrontShortCodeInput",children:[(0,l.jsx)("input",{onClick:e=>{const t=e.target;t.select(),t.setSelectionRange(0,30),document.execCommand("copy"),o.current.innerHTML=(0,x.__)("Copied Successfully!"),setTimeout((()=>{o.current.innerHTML=(0,x.__)("Copy To Clipboard")}),1500)},value:t}),(0,l.jsx)("span",{ref:o,className:"tooltip",children:(0,x.__)("Copy To Clipboard")})]})]})})),window.wp.element),Zs=({className:e,onChange:t,isPremium:n=!1,setIsProModalOpen:o=()=>{},options:i=[],proValues:s=[],...a})=>{const r=i.map((e=>({...e,label:s?.includes(e.value)&&!n?`${e.label} - Pro`:e.label}))),c=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const e=c?.current;if(e&&!n){const t=e?.childNodes;t?.forEach((e=>{s?.includes(e.value)&&e.classList.add("proOption")}))}}),[c,s]),(0,l.jsx)(y.SelectControl,{ref:c,className:`${e} ${n?"":"bplPorSelect"}`,onChange:e=>n?t(e):s?.includes(e)?o(!0):t(e),options:r,...a})},Xs=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({labelPrefix:e,shape:t,setAttributes:n,uploadSvg:o,type:i,color:s,width:a,height:r,isUpload:c,isFlip:d,isFront:u,name:p,premiumProps:h,device:g})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt15",label:`${e} Upload Shape`,checked:c,onChange:e=>n({shape:be(t,e,p,"isUpload")})}),c?(0,l.jsx)(we,{className:"mt20",value:o,types:"image/svg+xml",onChange:({id:e,url:o,alt:i,title:s})=>n({shape:be(t,{id:e,url:o,alt:i,title:s},p,"uploadSvg")}),height:"100%",width:"100%"}):(0,l.jsx)(Zs,{className:"mt20",label:(0,x.__)(`${e} Shape Type`,"b-blocks"),value:i,options:Ds,onChange:e=>n({shape:be(t,e,p,"type")}),...h,proValues:["cloud","mountain","fire","sports","travel"]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)(`${e} Shape Width:`,"b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:a[g],onChange:e=>n({shape:be(t,e,p,"width",g)}),beforeIcon:"grid-view",step:1}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)(`${e} Shape Height:`,"b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:r[g],onChange:e=>n({shape:be(t,e,p,"height",g)}),beforeIcon:"grid-view"}),(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)(`${e} Shape Color`,"b-blocks"),value:s,onChange:e=>n({shape:be(t,e,p,"color")}),defaultColor:"#000"}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:"Flip",checked:d,onChange:e=>n({shape:be(t,e,p,"isFlip")})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:"Bring to Front",checked:u,onChange:e=>n({shape:be(t,e,p,"isFront")})})]}))),Js=({attributes:e,setAttributes:t,premiumProps:n})=>{const{shape:o}=e,{top:i,bottom:s}=o;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Shape","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:Ws,children:a=>(0,l.jsxs)(l.Fragment,{children:["top"===a.name&&(0,l.jsx)(Xs,{...i,labelPrefix:"Top",shape:o,attributes:e,setAttributes:t,name:"top",premiumProps:n}),"bottom"===a.name&&(0,l.jsx)(Xs,{...s,labelPrefix:"Bottom",shape:o,attributes:e,setAttributes:t,name:"bottom",premiumProps:n})]})})})},ea=e=>{const{attributes:t,setAttributes:n,id:o,isPremium:i}=e,{advanced:s}=t,[a,r]=(0,m.useState)(!1),c={isPremium:i,setIsProModalOpen:r};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel bPlRemPrev",activeClass:"activeTab",tabs:Zt,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Vs,{...e}),(0,l.jsx)(Gs,{...e}),(0,l.jsx)(Js,{...e,premiumProps:c})]}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:s,onChange:e=>n({advanced:e}),id:o,isPremium:i,enabled:Us})})]})})}),(0,l.jsx)(jn,{isProModalOpen:a,setIsProModalOpen:r,block:"Countdown",children:(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)(": ","b-blocks")}),(0,x.__)("","b-blocks")]})})]})},ta=e=>{const t=$t(e);return t?`url('${t.replace(/['"()]/g,"")}')`:"none"},na=(e,t)=>jt(t)?`${e}: ${t};`:"",oa=(e,t=!0,n=!0,o=!0)=>{const{type:i="solid",color:s="",gradient:a=r,image:l={},position:c="center center",attachment:d="",repeat:u="no-repeat",size:p="",overlayColor:h=""}=e||{} |
| 261 |
;return"gradient"===i&&n?na("background",a):"image"===i&&o?`background: ${ta(l?.url)};\n\t\t\t\t${na("background-color",h)}\n\t\t\t\t${na("background-position",c)}\n\t\t\t\t${na("background-size",p)}\n\t\t\t\t${na("background-repeat",u)}\n\t\t\t\t${na("background-attachment",d)}\n\t\t\t\t${na("background-repeat",u)}\n\t\t\t\tbackground-blend-mode: overlay;`:t&&na("background",s)},ia=e=>{const{width:t="",style:n="solid",color:o="",side:i="all",radius:s=""}=e||{},a=e=>{const t=i?.toLowerCase();return t?.includes("all")||t?.includes(e)},r=`${t} ${n} ${o}`,l=`\n\t\t${t&&0!==parseInt(t)?["top","right","bottom","left"].map((e=>a(e)?`border-${e}: ${r};`:"")).join(""):""}\n\t\t${na("border-radius",s)}\n\t`;return l},sa=e=>{if(!e)return"";const t=e=>{const{color:t="#000000",style:n="solid",width:o="0px"}=e;return`${o} ${n} ${t}`};return"object"!=typeof e||Array.isArray(e)?"":e.hasOwnProperty("top")||e.hasOwnProperty("right")||e.hasOwnProperty("bottom")||e.hasOwnProperty("left")?["top","right","bottom","left"].map((n=>e[n]?`border-${n}: ${t(e[n])};`:"")).join(" ").trim():na("border",t(e))},aa=e=>{const{color:t="",bgType:n="solid",bg:o="",gradient:i=r}=e||{};return`\n\t\t${na("color",t)}\n\t\t${i||o?na("background","gradient"===n?i:o):""}\n\t`},ra=(e,t=!0,n=!0)=>{const{fontSize:o=16,colorType:i="solid",color:s="inherit",gradient:a=r}=e||{},l="gradient"===i?`color: transparent; background-image: ${a}; -webkit-background-clip: text; background-clip: text;`:na("color",s);return`\n\t\t${o&&t?na("font-size",o?`${o}px`:""):""}\n\t\t${n?l:""}\n\t`},la=(e,t="box")=>{let n="";return e?.map(((o,i)=>{const{hOffset:s="0px",vOffset:a="0px",blur:r="0px",spreed:l="0px",color:c="#e7f0fe",isInset:d=!1}=o||{},u=d?"inset":"",p=`${s} ${a} ${r}`,h=i+1>=e.length?"":", ";n+="text"===t?`${p} ${c}${h}`:`${p} ${l} ${c} ${u}${h}`})),n||""},ca=e=>{const{width:t="50%",height:n="2px",style:o="solid",color:s=i}=e||{};return`\n\t\t${na("width",t)}\n\t\t${0===parseInt(n)?"":`border-top: ${n} ${o} ${s};`}\n\t`},da=(e,t="box")=>{const{hOffset:n="0px",vOffset:o="0px",blur:i="0px",spreed:s="0px",color:a="#7090b0",isInset:r=!1}=e||{},l=`${n} ${o} ${i}`;return("text"===t?`${l} ${a}`:`${l} ${s} ${a} ${r?"inset":""}`)||"none"},ua=e=>{const{side:t=2,vertical:n="0px",horizontal:o="0px",top:i="0px",right:s="0px",bottom:a="0px",left:r="0px"}=e||{};return 2===t?`${n} ${o}`:`${i} ${s} ${a} ${r}`},pa=(e,o,i=!0)=>{const{fontFamily:s="Default",fontCategory:a="sans-serif",fontVariant:r=400,fontWeight:l,isUploadFont:c=!0,fontSize:d={desktop:null,tablet:null,mobile:null},fontStyle:u,textTransform:p,textDecoration:h,lineHeight:g,letterSpace:m}=o||{},b=!i||!s||"Default"===s,f=d?.desktop||d,x=d?.tablet||f,y=d?.mobile||x,v=e=>{const t=String(e);return["px","em","rem","%","vh","vw"].some((e=>t.endsWith(e)))?t:"number"==typeof e?`${t}px`:""},k=`\n\t\t${b?"":`font-family: '${s}', ${a};`}\n\t\t${na("font-weight",l)}\n\t\t${na("font-size",v(f))}\n\t\t${na("font-style",u)}\n\t\t${na("text-transform",p)}\n\t\t${na("text-decoration",h)}\n\t\t${na("line-height",g)}\n\t\t${na("letter-spacing",m)}\n\t`,w=r&&400!==r?"400i"===r?":ital@1":r?.includes("00i")?`: ital, wght@1, ${r?.replace("00i","00")} `:`: wght@${r} `:"",_=b?"":`https://fonts.googleapis.com/css2?family=${s?.split(" ").join("+")}${w.replace(/ /g,"")}&display=swap`;return{googleFontLink:!c||b?"":`@import url(${_});`,styles:`${e}{\n\t\t\t${k}\n\t\t}\n\t\t${t} {\n\t\t\t${e}{\n\t\t\t\t${na("font-size",v(x))}\n\t\t\t}\n\t\t}\n\t\t${n} {\n\t\t\t${e}{\n\t\t\t\t${na("font-size",v(y))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},ha=e=>{if(!e)return"";if("string"==typeof e)return e;if("object"==typeof e&&!Array.isArray(e)){const t=["top","right","bottom","left"];return t.map((t=>e[t]||"")).every((e=>!e))?"":t.map((t=>e[t]||"0")).join(" ")}return""},ga=e=>{const{position:t="center center",xPosition:n=0,yPosition:o=0,attachment:i="",repeat:s="no-repeat",size:a="cover",customSize:r="0px"}=e||{},l=e=>"initial"!==e||jt(e);return`\n\t\t${l(t)?`background-position: ${"custom"===t?`${n} ${o}`:t};`:""}\n\t\t${i&&l(i)?`background-attachment: ${i};`:""}\n\t\t${l(s)?`background-repeat: ${s};`:""}\n\t\t${l(a)?`background-size: ${"custom"===a?`${r} auto`:a};`:""}\n\t`},ma=(e={})=>e?{desktop:jt(e.url)?`background-image: ${ta(e.url)}; ${ga(e?.desktop)}`:"",tablet:jt(e.url)?ga(e?.tablet):"",mobile:jt(e.url)?ga(e?.mobile):""}:"",ba=(e,o,i=!1)=>{const{type:s="color",color:a,gradient:r,img:l,video:c}=e||{},d="color"===s?na("background",a):"gradient"===s?(e=>{const{type:t="linear",radialType:n="ellipse",colors:o=[],centerPositions:i={x:0,y:0},angel:s=0}=e||{};if(jt(e)){const e=o?.map((({color:e,position:t})=>`${e} ${t}%`)),a=`linear-gradient(${s}deg, ${e})`;return na("background","radial"===t?`radial-gradient(${n} at ${i?.x}% ${i?.y}%,${e})`:a)}return""})(r):"image"===s?ma(l).desktop:"",u="image"===s?ma(l).tablet:"",p="image"===s?ma(l).mobile:"",h=i?`${o}:hover`:o;return`\n\t\t${"video"===s?((e,t)=>{const{url:n,loop:o}=e||{},i=document.querySelector(t),s=i?.querySelector(".bPlVideo"),a=document.createElement("video");if(a.muted=!0,a.autoplay=!0,a.classList.add("bPlVideo"),!s&&i&&n){const e=$t(n);if(e){const t=document.createElement("source");t.src=e,a.appendChild(t),i.appendChild(a)}}return a.loop=o,a.play(),`${t} .bPlVideo{\n\t\tleft: 0;\n\t\tmin-height: 100%;\n\t\tmin-width: 100%;\n\t\tposition: absolute;\n\t\twidth: -webkit-fill-available;\n\t\ttop: 0;\n\t\tz-index: 0;\n\t}`})(c,o):""}\n\n\t\t${d?`${h}{\n\t\t\t${d}\n\t\t}`:""}\n\n\t\t${u?`${t} {\n\t\t\t${h}{\n\t\t\t\t${u}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${p?`${n} {\n\t\t\t${h}{\n\t\t\t\t${p}\n\t\t\t}\n\t\t}`:""}\n\t`.replace(/\s+/g," ").trim()},fa=(e,t,n=!1)=>{const{isEnabled:o,colors:i,opacity:s=1,blend:a,filter:r="",blur:l=0,brightness:c=100,contrast:d=100,saturation:u=100,hue:p=0,position:h={top:0,right:0,bottom:0,left:0},zIndex:g=-1}=e||{},m=`${100!==c?`brightness(${c}%)`:""} ${100!==d?`contrast(${d}%)`:""} ${100!==u?`saturate(${u}%)`:""} ${0!==l?`blur(${l}px)`:""} ${0!==p?`hue-rotate(${p}deg)`:""}`,b=`${r}: ${r?m:""}; -webkit-${r}: ${r?m:""};`,f=n?`${t}:hover::after`:`${t}::after`;return o?`\n\t\t${t}{\n\t\t\tposition:relative;\n\t\t\tz-index:1;\n\t\t}\n\t\t${t}::after{\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop:${jt(h.top)?h.top:0};\n\t\t\tright:${jt(h.right)?h.right:0};\n\t\t\tbottom:${jt(h.bottom)?h.bottom:0};\n\t\t\tleft:${jt(h.left)?h.left:0};\n\t\t\tz-index:${g};\n\t\t}\n\t\t${ba(i,f,!1)}\n\t\t${f}{\n\t\t\t${na("opacity",s)}\n\t\t\t${na("mix-blend-mode",a)}\n\t\t\t${b}\n\t\t}\n\t`.replace(/\s+/g," ").trim():""},xa=(e,o,i=!1)=>{const s=(e,t="desktop")=>{if(!jt(e))return"";const{skew:n,scale:o,rotate:i,offset:s,flipX:a,flipY:r}=e,{threeDRotate:l}=i||{},{isProportion:c}=o||{},d=[];return jt(n)&&(jt(n?.[t]?.x)&&d.push(`skewX(${n[t].x}deg)`),jt(n?.[t]?.y)&&d.push(`skewY(${n[t].y}deg)`)),c?jt(o?.[t]?.scale)&&d.push(`scale(${o[t].scale})`):(jt(o?.[t]?.x)&&d.push(`scaleX(${o[t].x})`),jt(o?.[t]?.y)&&d.push(`scaleY(${o[t].y})`)),jt(i)&&(jt(i?.[t]?.z)&&d.push(`rotateZ(${i[t].z}deg)`),l&&(jt(i?.[t]?.x)&&d.push(`rotateX(${i[t].x}deg)`),jt(i?.[t]?.y)&&d.push(`rotateY(${i[t].y}deg)`))),jt(s)&&(jt(s?.[t]?.x)&&d.push(`translateX(${s[t].x})`),jt(s?.[t]?.y)&&d.push(`translateY(${s[t].y})`)),jt(a)&&d.push(a?"scaleX(-1)":""),jt(r)&&d.push(r?"scaleY(-1)":""),0===d.length?"":na("transform",d.join(" "))},a=i?`${o}:hover`:o;return`\n\t\t${a} {\n\t\t\t${s(e,"desktop")}\n\t\t}\n\t\t${t}{\n\t\t\t${a} {\n\t\t\t\t${s(e,"tablet")}\n\t\t\t}\n\t\t}\n\t\t${n}{\n\t\t\t${a} {\n\t\t\t\t${s(e,"mobile")}\n\t\t\t}\n\t\t}\n\t`},ya=e=>{const{padding:t,margin:n,height:o,width:i}=e||{},s=(e,t)=>na(e,t),a=(e,t,n)=>s(e,t?.[e]?.[n])+s(`min-${e}`,t?.min?.[n])+s(`max-${e}`,t?.max?.[n]),r=e=>na("padding",ha(e)),l=e=>na("margin",ha(e));return{desktop:r(t?.desktop)+l(n?.desktop)+a("height",o,"desktop")+a("width",i,"desktop"),tablet:r(t?.tablet)+l(n?.tablet)+a("height",o,"tablet")+a("width",i,"tablet"), |
| 262 |
mobile:r(t?.mobile)+l(n?.mobile)+a("height",o,"mobile")+a("width",i,"mobile")}},va=e=>{const{normal:t,hover:n}=e||{},o=e=>{const{border:t,radius:n,shadow:o}=e||{},i=na("border-radius",ha(n)),s=na("box-shadow",la(o,"box"));return sa(t)+i+s};return{normal:o(t),hover:o(n)}},ka=e=>{const{zIndex:t,overflow:n}=e||{},o=n?`overflow: ${n};`:"",i=e=>`${na("z-index",t?.[e])} ${na("position",jt(t?.[e])?"relative":"")}`;return{desktop:i("desktop")+o,tablet:i("tablet"),mobile:i("mobile")}},wa=(e,t)=>{const{desktop:n=!1,tablet:o=!1,mobile:i=!1}=e||{},s=t?"opacity: 0.5;":"display: none;",a=e=>e?s:"";return{desktop:a(n),tablet:a(o),mobile:a(i)}},_a=(o,i,s=!1,a=!0)=>{const{dimension:r,transform:l,background:c,borderShadow:d,mask:u,animation:p,visibility:h,responsive:g,position:m={},floating:b={},motion:f={},css:x=""}=i||{},y=s?`#${o}>div>div${a?":first-child":""}`:`#${o}>div`;((e,t,n)=>{const o=n?`#${t} > div`:`#${t}`,i=document.querySelector(o);if(i&&e&&e.type&&(i.setAttribute("data-aos",e.type),i.setAttribute("data-aos-duration",1e3*e.duration||.4),i.setAttribute("data-aos-delay",1e3*e.delay||0),i.classList.contains("aos-init")||(i.classList.add("aos-init"),window?.AOS?.init()),n)){const e=new IntersectionObserver((e=>{e.forEach((e=>{e.intersectionRatio>.5?i.classList.add("aos-animate"):i.classList.remove("aos-animate")}))}),{threshold:[.5]});e.observe(i)}})(p,o,s);const v=ya(r).desktop+ka(h).desktop+((e,t,n)=>{const{transition:o=.4}=e||{},{transition:i=.4}=t||{},{transition:s=200}=n||{};return`transition: background ${o}s, border ${i}s, border-radius ${i}s, box-shadow ${i}s, transform ${s}ms ease-in-out;`})(c,d,l)+(e=>{const{isMask:t=!1,shape:n={type:"circle"},size:o={type:"contain",scale:"100%"},position:i={type:"center center",x:50,y:50},repeat:s="no-repeat"}=e||{},a=[{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48Y2lyY2xlIGN4PSI0NC41IiBjeT0iNDQuNSIgcj0iNDQuNSIvPjwvc3ZnPg==",type:"circle"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48cGF0aCBkPSJNNzYuMTMzMiw0NC40NzUybDYuMzI4OS02LjMyODVBMjIuMzQ4NiwyMi4zNDg2LDAsMCwwLDUwLjg1LDYuNTQ3NEw0NC41MzIsMTIuODY1MSwzOC4xNiw2LjU0NzRhMjIuMzUyNCwyMi4zNTI0LDAsMSwwLTMxLjYxMiwzMS42MWw2LjMxODEsNi4zMTc3TDYuNTQ3OCw1MC44NDdhMjIuMzUyNCwyMi4zNTI0LDAsMCwwLDMxLjYxMiwzMS42MWw2LjMxODEtNi4zMTc3TDUwLjg1LDgyLjM5MjJhMjIuMzQ4NiwyMi4zNDg2LDAsMCwwLDMxLjYxMi0zMS41OTkzWiIvPjwvc3ZnPg==",type:"flower"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MS4xMTQzIiBoZWlnaHQ9Ijg4Ljk5OTkiIHZpZXdCb3g9IjAgMCA5MS4xMTQzIDg4Ljk5OTkiPjxwYXRoIGQ9Ik04Mi4xNzQ5LDM3LjUyNjZsMS42MTE5LTEuNjExOWMuOTQ4Ni0uOTQ4Ny02LjM3LTUuOTMwOS03LjA0OTItNi4zNzgyYTQ1LjE1MTYsNDUuMTUxNiwwLDAsMC01Ljc3NjYtMy4zMjQxYy0uMjQ2OC0uMTE1Ny0uNjAxNi0uMzAwOC0uOTg3Mi0uNDc4MnExLjc4MTYtMS44OTcyLDMuNTg2My0zLjc3MTNjLjk0ODYtLjk4LTYuMzYyOC01LjkyMzItNy4wNDkyLTYuMzcwNUE0NC4xNTc5LDQ0LjE1NzksMCwwLDAsNjAuNzUsMTIuMjYwNmwtLjI5My0uMTQ2NSwxLjM5NTktMS41NDI1Yy45NDA5LTEuMDQ4OS02LjMzMTktNS45LTcuMDQ5Mi02LjM3QTQ0LjIxMiw0NC4yMTIsMCwwLDAsNDkuMDQyMi44NjE2Yy0uNTQtLjI0NjctMi4zMTM3LTEuMjY0OC0yLjg0NTgtLjY4NjRRMzIuNzM4MSwxNS4xNjgyLDE4LjExNTQsMjkuMDY2Yy03Ljg0MzYsNy40NS0xNi41NjYzLDE1LjU3OTEtMTguMTA4OCwyNi44Ny0uMTE1Ny44MjUzLDEuMzI2NSwxLjk3NDQsMS43NDMsMi4zMTM4YTQwLjc5OSw0MC43OTksMCwwLDAsNS4zMTM5LDQuMDU2Nyw0NC4yMTc0LDQ0LjIxNzQsMCwwLDAsNS43NjExLDMuMzRjLjY0LjI5MzEsMi4xNzUsMS4yMDMxLDIuODQ1OS42ODY0bDIuMDc0Ny0xLjU1NzljMS40NSwxLjg1ODcsNS45Njk0LDQuNzIsNi42NzEyLDUuMTc1bDEuNDg4NS45NTY0QzI0LjQwMSw3Mi43NjQ3LDIyLjkyLDc0LjYzMTEsMjEuNDcsNzYuNTI4M2MtLjkxLDEuMTg3OCw2LjI2MjUsNS44NjE1LDcuMDQ5Miw2LjM3YTQ0LjE2MzMsNDQuMTYzMywwLDAsMCw1Ljc2MTEsMy4zMzE4Yy42MDE2LjI3NzYsMi4yMjg5LDEuMjM0LDIuODQ1OS42OTQxbDkuMjU1LTguMDk4Yy44MjUyLDIuNTY4MiwxNC41Njg3LDExLjYzLDE1LjY3MTYsOS45NzIxTDkxLjA2LDQ1LjM2MjRDOTEuNjkyLDQ0LjQxMzgsODYuNzI1Miw0MC4zMjYyLDgyLjE3NDksMzcuNTI2NloiLz48L3N2Zz4=",type:"sketch"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDMiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCAxMDMgODkiPjxwb2x5Z29uIHBvaW50cz0iNzcuMjU1IDQ0LjUwNSA1MS41IDAgMjUuNzU1IDQ0LjUwNSAwIDg5IDUxLjUgODkgMTAzIDg5IDc3LjI1NSA0NC41MDUiLz48L3N2Zz4=",type:"triangle"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjEuMDAwMiIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDEyMS4wMDAyIDg5Ij48cGF0aCBkPSJNMTAwLjAxNiw3LjM5NzJDOTAuMjQ1MiwxLjIyLDczLjMwODQtMy42NjYzLDY0LjQyNTUsMy43MTI2LDU2Ljk4MzYsOS44OSw2Mi4wNDY5LDE4LjkxNzQsNTUuMDEsMjUuMzAzMmMtMTAuNiw5LjYxMzQtMjguMTU4OS01LjQ0MjMtNDEuODU4NCwyLjYzMThDLjY3NTcsMzUuMjU0My00LjI3OTEsNTkuMTQ4OSw0LjI3ODEsNzMuNzk3NWMxMy4xMzY5LDIyLjUyNCw1My4xMywxMy44NTQxLDYxLjE5MzYsMTIuMTA2MSw0LjUwMDctLjk5MzEsNTMuNDk1My0xMi4yNjUsNTUuNDY5My00Mi43MDQzQzEyMS44OTgsMjguMjUyOCwxMTEuMSwxNC40MTg1LDEwMC4wMTYsNy4zOTcyWiIvPjwvc3ZnPg==",type:"blob"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDMiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCAxMDMgODkiPjxwYXRoIGQ9Ik03Ny4yMTE0LDBIMjUuNzUyM0wwLDQ0LjUwNDUsMjUuNzUyMyw4OUg3Ny4yMTE0TDEwMyw0NC41MDQ1Wk02MS43NjkxLDYyLjI2MUg0MS4yMjE4TDMwLjkzOTEsNDQuNTA0NSw0MS4yMjE4LDI2LjczOUg2MS43NjkxTDcyLjA1MTksNDQuNTA0NVoiLz48L3N2Zz4=",type:"hexagon"}];return t?`-webkit-mask-image: ${"custom"===n.type?ta(n.url):`url(${(r=n.type,a.find((e=>e.type===r))).svg})`};\n\t\t-webkit-mask-size: ${"custom"===o.type?o.scale:o.type};\n\t\t${"custom"===i.type?`${na("-webkit-mask-position-x",i.x)}\n\t\t\t${na("-webkit-mask-position-y",i.y)}`:`${na("-webkit-mask-position",i.type)}`}\n\t\t${"cover"!==o.type?`-webkit-mask-repeat: ${s};`:""}`:"";var r})(u),k=ya(r).tablet+ka(h).tablet+wa(g,s).tablet,w=ya(r).mobile+ka(h).mobile+wa(g,s).mobile,_=va(d).normal,C=va(d).hover,j=wa(g,s).desktop;return`\n\t\t${v||_?`${y} {\n\t\t\t${v}\n\t\t\t${_}\n\t\t}`:""}\n\t\t${C?`${y}:hover {\n\t\t\t${C}\n\t\t}`:""}\n\n\t\t${j?`${e} {\n\t\t\t${y}{\n\t\t\t\t${j}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${k?`${t} {\n\t\t\t${y}{\n\t\t\t\t${k}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${w?`${n} {\n\t\t\t${y}{\n\t\t\t\t${w}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${ba(c?.normal,y)}\n\t\t${ba(c?.hover,y,!0)}\n\t\t${fa(c?.overlay,y)}\n\t\t${fa(c?.hoverOverlay,y,!0)}\n\t\t${jt(l?.normal)?xa(l?.normal,y):""}\n\t\t${jt(l?.hover)?xa(l?.hover,y,!0):""}\n\t\t${((e,o)=>{const{desktop:i={},tablet:s={},mobile:a={}}=e,r=(e={})=>`\n\t\t${o}{\n\t\t\t${na("position",e?.type)}\n\t\t\t${na("left",e?.horizontal?.left)}\n\t\t\t${na("right",e?.horizontal?.right)}\n\t\t\t${na("top",e?.vertical?.top)}\n\t\t\t${na("bottom",e?.vertical?.bottom)}\n\t\t}\n\t`;return`\n\t\t\n\t\t${i?.type?r(i):""}\n\t\t\n\t\t${t}{\n\t\t\t${s?.type?r(s):""}\n\t\t}\n\n\t\t${n}{\n\t\t\t${a?.type?r(a):""}\n\t\t}\n\t`})(m,y)}\n\t\t${((e,t,n="")=>{const{translate:o={},rotate:i={},scale:s={},isEnabled:a=!1}=e||{};if(!a)return"";const r=[],l=[];return[{name:"Translate",property:"translate",values:o,value:e=>["x","y"].some((t=>jt(o?.[t]?.[e])))?`${o?.x?.[e]||0}px ${o?.y?.[e]||0}px`:""},{name:"Rotate",property:"transform",values:i,value:e=>["x","y","z"].filter((t=>jt(i?.[t]?.[e]))).map((t=>`rotate${t.toUpperCase()}(${i[t][e]}deg)`)).join(" ")},{name:"Scale",property:"scale",values:s,value:e=>{const t=s?.y?.[e],n=s?.z?.[e];return jt(t)||jt(n)?jt(n)?`1 ${jt(t)?t:1} ${n}`:`1 ${t}`:""}}].forEach((({name:e,property:t,values:o,value:i})=>{const s=i("from"),a=i("to");if(!s||!a)return;const c=Number(o?.duration)>0?Number(o.duration):1e3,d=Number(o?.delay)>0?Number(o.delay):0,u=`advFloat${e}${n?`-${n}`:""}`;r.push(`@keyframes ${u}{ from{ ${t}: ${s}; } to{ ${t}: ${a}; } }`),l.push(`${u} ${c}ms ease-in-out ${d}ms infinite alternate`)})),l.length?`\n\t\t${r.join(" ")}\n\t\t${t}{\n\t\t\tanimation: ${l.join(", ")};\n\t\t}\n\t`:""})(b,y,o)}\n\t\t${((o,i,s)=>{ |
| 263 |
const{isEnable:a=!1,vertical:r={},horizontal:l={},transparency:c={},blur:d={},rotate:u={},scale:p={},effectsRelativeTo:h="viewport",effectOn:g=["desktop","tablet-portrait","mobile-portrait"],isMouseEffect:m=!1,mouseTrack:b={},tilt:f={},sticky:x={}}=o||{},y=(e,t)=>jt(e)&&!isNaN(e)?Number(e):t,v="viewport"===h,k=v?"view()":"scroll(nearest block)",w=[],_=[],C=[],j=[],$=String(s??"").replace(/[^a-zA-Z0-9]/g,""),S=(e,t,n)=>{w.push(`@keyframes advMe${e}${$}{ ${t} }`),_.push(`advMe${e}${$}`),C.push(k),j.push((e=>{const t=y(e?.top,0),n=y(e?.bottom,100),o=Math.min(t,n),i=Math.max(t,n);return v?`cover ${o}% ${i>=90?"contain 100%":`cover ${i}%`}`:`min(${3*o}vh, ${o}%) min(${3*i}vh, ${i}%)`})(n))};if(a){const e=r?.direction,t=l?.direction,n=e?100*y(r?.speed,4):0,o=t?100*y(l?.speed,4):0;if(n||o){const i="up"===e?-n:n,s="to-left"===t?-o:o,a=[n&&r,o&&l].filter(Boolean);S("Translate",`from{ translate: 0px 0px; } to{ translate: ${s}px ${i}px; }`,{top:Math.min(...a.map((e=>y(e?.top,0)))),bottom:Math.max(...a.map((e=>y(e?.bottom,100))))})}const i=c?.direction;if(i){const e=Math.max(0,1-y(c?.level,5)/10),t={"fade-in":`from{ opacity: ${e}; } to{ opacity: 1; }`,"fade-out":`from{ opacity: 1; } to{ opacity: ${e}; }`,"fade-out-in":`0%{ opacity: 1; } 50%{ opacity: ${e}; } 100%{ opacity: 1; }`,"fade-in-out":`0%{ opacity: ${e}; } 50%{ opacity: 1; } 100%{ opacity: ${e}; }`}[i];t&&S("Opacity",t,c)}const s=d?.direction;if(s){const e=3*y(d?.level,4),t={"fade-in":`from{ filter: blur(${e}px); } to{ filter: blur(0px); }`,"fade-out":`from{ filter: blur(0px); } to{ filter: blur(${e}px); }`,"fade-out-in":`0%{ filter: blur(0px); } 50%{ filter: blur(${e}px); } 100%{ filter: blur(0px); }`,"fade-in-out":`0%{ filter: blur(${e}px); } 50%{ filter: blur(0px); } 100%{ filter: blur(${e}px); }`}[s];t&&S("Blur",t,d)}const a=u?.direction;if(a){const e=20*y(u?.level,4);S("Rotate",`from{ rotate: 0deg; } to{ rotate: ${"to-left"===a?-e:e}deg; }`,u)}if(p?.direction){const e=.15*y(p?.level,4),t=Math.max(0,1-e),n=1+e,o={"scale-up":`from{ scale: 1; } to{ scale: ${n}; }`,"scale-down":`from{ scale: 1; } to{ scale: ${t}; }`,"scale-down-up":`0%{ scale: 1; } 50%{ scale: ${t}; } 100%{ scale: 1; }`,"scale-up-down":`0%{ scale: 1; } 50%{ scale: ${n}; } 100%{ scale: 1; }`}[p.direction];o&&S("Scale",o,p)}}const T=[];if(m){if(b?.direction){const e="direct"===b?.direction?100:-100;T.push(((t,n)=>`translate(${(t*e).toFixed(2)}px, ${(n*e).toFixed(2)}px)`))}if(f?.direction){const e=12*("direct"===f?.direction?1:-1);T.push(((t,n)=>`perspective(1000px) rotateX(${(n*-e).toFixed(2)}deg) rotateY(${(t*e).toFixed(2)}deg)`))}}const M=(e,t,n)=>{if(!e||!e.defaultView)return;const o=e.defaultView,s=e.bPlMouse||(e.bPlMouse={x:0,y:0,items:new Map,frame:0,last:0}),a=s.items.get(i)||{x:0,y:0};if(a.rate=t,a.build=n,s.items.set(i,a),s.bound)return;s.bound=!0;const r=t=>{const n=s.last?Math.min(t-s.last,100):16.7;s.last=t;let i=!1;s.items.forEach(((t,o)=>{const a=t.el&&t.el.isConnected?t.el:e.querySelector(o);if(!a)return;t.el=a;const r=t.rate*n/1e3,l=s.x-t.x,c=s.y-t.y,d=Math.sqrt(l*l+c*c);d<=r?(t.x=s.x,t.y=s.y):(t.x+=l/d*r,t.y+=c/d*r,i=!0),a.style.transform=t.build(t.x,t.y)})),s.frame=i?o.requestAnimationFrame(r):0,s.last=i?t:0};e.addEventListener("pointermove",(e=>{s.x=2*(e.clientX/o.innerWidth-.5),s.y=2*(e.clientY/o.innerHeight-.5),s.frame||(s.frame=o.requestAnimationFrame(r))}))};if(T.length&&"undefined"!=typeof document){const e=Math.max(.25,1.5*y(b?.speed,y(f?.speed,4))),t=(e,t)=>T.map((n=>n(e,t))).join(" ");M(document,e,t),M(document.querySelector('iframe[name="editor-canvas"]')?.contentDocument,e,t)}const N=e=>x?.[e]||("desktop"===e?x?.undefined:""),L=i.split(">")[0],E=e=>{const t=N(e);return t?`position: sticky; ${t}: 0; z-index: 9;`:(e=>"tablet"===e?N("desktop"):"mobile"===e?N("tablet")||N("desktop"):"")(e)?"position: static;":""},P=Array.isArray(g)?g:jt(g)?[g]:[],A=e=>!P.length||P.includes(e)?"":`${i}{ animation-name: none; }`;return`\n\t\t${_.length?`\n\t\t${w.join(" ")}\n\t\t@supports (animation-timeline: scroll()){\n\t\t\t${i}{\n\t\t\t\tanimation-name: ${_.join(", ")};\n\t\t\t\tanimation-duration: ${_.map((()=>"auto")).join(", ")};\n\t\t\t\tanimation-timing-function: ${_.map((()=>"linear")).join(", ")};\n\t\t\t\tanimation-fill-mode: ${_.map((()=>"both")).join(", ")};\n\t\t\t\tanimation-direction: ${_.map((()=>v?"normal":"reverse")).join(", ")};\n\t\t\t\tanimation-timeline: ${C.join(", ")};\n\t\t\t\tanimation-range: ${j.join(", ")};\n\t\t\t}\n\t\t\t${A("desktop")?`${e}{ ${A("desktop")} }`:""}\n\t\t\t${A("tablet-portrait")?`@media only screen and (min-width: 641px) and (max-width: 1024px){ ${A("tablet-portrait")} }`:""}\n\t\t\t${A("mobile-portrait")?`${n}{ ${A("mobile-portrait")} }`:""}\n\t\t}\n\t`:""}\n\t\t${T.length?`${i}{ transition-property: background, border, border-radius, box-shadow; }`:""}\n\t\t${E("desktop")?`${L}{ ${E("desktop")} }`:""}\n\t\t${E("tablet")?`${t}{ ${L}{ ${E("tablet")} } }`:""}\n\t\t${E("mobile")?`${n}{ ${L}{ ${E("mobile")} } }`:""}\n\t`})(f,y,o)}\n\t\t${x}\n\t`.replace(/\s+/g," ")},Ca=_a,ja="bBlocksContainer",$a=(e,o)=>{const{top:i,bottom:s}=e||{},{color:a,isFlip:r,isFront:l,width:c,height:d}=i||{},{isUpload:u,color:p,isFlip:h,isFront:g,width:m,height:b}=s||{},f=`#${o} .topShaped`,x=`#${o} .bottomShaped`;return`\n\t\t${f}{\n\t\t\t${d?.desktop?`height: ${d?.desktop};`:""}\n\t\t\tcolor: ${a};\n\t\t\t${l?"z-index: 4;":""}\n\t\t}\n\n\t\t${f} svg{\n\t\t\t${c?.desktop?`width: ${c?.desktop};`:""}\n\t\t\t${d?.desktop?`height: ${d?.desktop};`:""}\n\t\t\tfill: ${a};\n\t\t\t${r?"transform: translateX(0%) rotateY(180deg);":""}\n\t\t}\n\n\t\t${f} svg *{\n\t\t\tfill: ${a};\n\t\t}\n\n\t\t${x}{\n\t\t\t${b?.desktop?`height: ${b?.desktop};`:""}\n\t\t\tcolor: ${p};\n\t\t\t${g?"z-index: 4;":""}\n\t\t}\n\t\t${x} svg{\n\t\t\t${m?.desktop?`width: ${m?.desktop};`:""}\n\t\t\t${b?.desktop?`height: ${b?.desktop};`:""}\n\t\t\tfill: ${p};\n\t\t\t${h?"transform: translateX(0%) rotateX(180deg);":"transform: rotate(180deg);"}\n\t\t\t${u?"transform: none;":""}\n\t\t}\n\t\t${x} svg *{\n\t\t\tcolor: ${p};\n\t\t\tfill: ${p};\n\t\t}\n\t\t\n\t\t${t}{\n\t\t\t${f} svg{\n\t\t\t\t${c?.tablet?`width: ${c?.tablet}`:""}\n\t\t\t\t${d?.tablet?`height: ${d?.tablet}`:""}\n\t\t\t}\n\t\t\t${x} svg{\n\t\t\t\t${m?.tablet?`width: ${m?.tablet}`:""}\n\t\t\t\t${b?.tablet?`height: ${b?.tablet}`:""}\n\t\t\t}\n\t\t}\n\n\t\t${n}{\n\t\t\t${f} svg{\n\t\t\t\t${c?.mobile?`width: ${c?.mobile}`:""}\n\t\t\t\t${d?.mobile?`height: ${d?.mobile}`:""}\n\t\t\t}\n\t\t\t${x} svg{\n\t\t\t\t${m?.mobile?`width: ${m?.mobile}`:""}\n\t\t\t\t${b?.mobile?`height: ${b?.mobile}`:""}\n\t\t\t}\n\t\t}\n\t`.replace(/\s+/g," ")},Sa=({attributes:e,id:o,isBackend:i=!1})=>{const{wrapper:s,content:a,shape:r,advanced:c}=e,{minHeight:d}=s,{isFullWidth:u,width:p,height:h,verticalAlign:g,horizontalAlign:m}=a,b=`#${o} .${ja}`,f=`${b} .${ja}Content`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t#${o}{\n\t\t\tmin-height: ${0===parseInt(d)?"auto":d};\n\t\t}\n\t\t${b}{\n\t\t\talign-items: ${m};\n\t\t\tjustify-content: ${g};\n\t\t}\n\n\t\t${f}{\n\t\t\twidth: ${u||0===parseInt(p.desktop)?"100%":p.desktop};\n\t\t\tflex-grow: ${h};\n\t\t}\n\t\t${t}{\n\t\t\t${f}{\n\t\t\t\twidth: ${u||0===parseInt(p.tablet)?"100%":p.tablet};\n\t\t\t}\n\t\t}\n\t\t${n}{\n\t\t\t${f}{\n\t\t\t\twidth: ${u||0===parseInt(p.mobile)?"100%":p.mobile};\n\t\t\t}\n\t\t}\n\t\t${$a(r,o)}\n\t\t${Ca(o,c,i,!1)}\n\t`.replace(/\s+/g," ")}})};var Ta=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],Ma={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan", |
| 264 |
contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",typemustmatch:"typeMustMatch",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace", |
| 265 |
ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"};function Na(e,t,n){const o=[...e].map(((e,o)=>Ea(e,{...n,index:o,level:t+1}))).filter(Boolean);return o.length?o:null}function La(e,t={}){return"string"==typeof e?function(e,t={}){if(!e||"string"!=typeof e)return null;const{includeAllNodes:n=!1,nodeOnly:o=!1,selector:i="body > *",type:s="text/html"}=t;try{const a=(new DOMParser).parseFromString(e,s);if(n){const{childNodes:e}=a.body;return o?e:[...e].map((e=>Ea(e,t)))}const r=a.querySelector(i)||a.body.childNodes[0];if(!(r instanceof Node))throw new TypeError("Error parsing input");return o?r:Ea(r,t)}catch(e){}return null}(e,t):e instanceof Node?Ea(e,t):null}function Ea(e,t={}){if(!(e&&e instanceof Node))return null;const{actions:n=[],index:o=0,level:i=0,randomKey:s}=t;let a=e,r=`${i}-${o}`;const l=[];return s&&0===i&&(r=`${function(e=6){let t="";for(let n=e;n>0;--n)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.round(61*Math.random())];return t}()}-${r}`),Array.isArray(n)&&n.forEach((t=>{t.condition(a,r,i)&&("function"==typeof t.pre&&(a=t.pre(a,r,i),a instanceof Node||(a=e)),"function"==typeof t.post&&l.push(t.post(a,r,i)))})),l.length?l:function(e,t){const{key:n,level:o,...i}=t;switch(e.nodeType){case 1:return m.createElement((s=e.nodeName,/[a-z]+[A-Z]+[a-z]+/.test(s)?s:s.toLowerCase()),function(e,t){const n={key:t};if(e instanceof Element){const t=e.getAttribute("class");t&&(n.className=t),[...e.attributes].forEach((e=>{switch(e.name){case"class":break;case"style":n[e.name]="string"!=typeof(t=e.value)?{}:t.split(/ ?; ?/).reduce(((e,t)=>{const[n,o]=t.split(/ ?: ?/).map(((e,t)=>0===t?e.replace(/\s+/g,""):e.trim()));if(n&&o){const t=n.replace(/(\w)-(\w)/g,((e,t,n)=>`${t}${n.toUpperCase()}`));let i=o.trim();Number.isNaN(Number(o))||(i=Number(o)),e[n.startsWith("-")?n:t]=i}return e}),{});break;case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"readonly":case"required":case"reversed":case"selected":case"typemustmatch":n[Ma[e.name]||e.name]=!0;break;default:n[Ma[e.name]||e.name]=e.value}var t}))}return n}(e,n),Na(e.childNodes,o,i));case 3:{const t=e.nodeValue?.toString()??"";if(!i.allowWhiteSpaces&&/^\s+$/.test(t)&&!/[\u00A0\u202F]/.test(t))return null;if(!e.parentNode)return t;const n=e.parentNode.nodeName.toLowerCase();return Ta.includes(n)?(/\S/.test(t)&&console.warn(`A textNode is not allowed inside '${n}'. Your text "${t}" will be ignored`),null):t}case 8:default:return null;case 11:return Na(e.childNodes,o,t)}var s}(a,{key:r,level:i,...t})}var Pa=Object.defineProperty,Aa=(e,t,n)=>((e,t,n)=>t in e?Pa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Ba="react-inlinesvg",Ia={IDLE:"idle",LOADING:"loading",LOADED:"loaded",FAILED:"failed",READY:"ready",UNSUPPORTED:"unsupported"};function Oa(){return!("undefined"==typeof window||!window.document?.createElement)}function Ra(e,...t){const n={};for(const o in e)({}).hasOwnProperty.call(e,o)&&!t.includes(o)&&(n[o]=e[o]);return n}async function za(e,t){const n=await fetch(e,t),o=n.headers.get("content-type"),[i]=(o??"").split(/ ?; ?/);if(n.status>299)throw new Error("Not found");if(!["image/svg+xml","text/plain"].some((e=>i.includes(e))))throw new Error(`Content type isn't valid: ${i}`);return n.text()}function Da(e=1){return new Promise((t=>{setTimeout(t,1e3*e)}))}function Fa(e){const t=(0,m.useRef)(void 0);return(0,m.useEffect)((()=>{t.current=e})),t.current}function Ha(e){const{baseURL:t,content:n,description:o,handleError:i,hash:s,preProcessor:a,title:r,uniquifyIDs:l=!1}=e;try{let e=a?a(n):n;l&&(e=function(e,t,n){const o=e.matchAll(/\bid=(["'])([^"']+)\1/g),i=[...new Set([...o].map((e=>e[2])))];return i.length?(i.sort(((e,t)=>t.length-e.length)),e.replace(/<style[^>]*>([\S\s]*?)<\/style>/gi,((e,o)=>{let s=o;for(const e of i){const o=e.replace(/[$()*+.?[\\\]^{|}]/g,"\\$&");s=s.replace(new RegExp(`url\\((['"]?)#${o}\\1\\)`,"g"),`url($1${n}#${e}__${t}$1)`),s=s.replace(new RegExp(`#${o}(?![a-zA-Z0-9_-])`,"g"),`#${e}__${t}`)}return e.replace(o,s)}))):e}(e,s,t??""));const i=La(e,{nodeOnly:!0});if(!(i&&i instanceof SVGSVGElement))throw new Error("Could not convert the src to a DOM Node");const c=Wa(i,{baseURL:t,hash:s,uniquifyIDs:l});if(o){const e=c.querySelector("desc");e?.parentNode&&e.parentNode.removeChild(e);const t=document.createElementNS("http://www.w3.org/2000/svg","desc");t.innerHTML=o,c.prepend(t)}if(void 0!==r){const e=c.querySelector("title");if(e?.parentNode&&e.parentNode.removeChild(e),r){const e=document.createElementNS("http://www.w3.org/2000/svg","title");e.innerHTML=r,c.prepend(e)}}return c}catch(e){return i(e)}}function Wa(e,t){const{baseURL:n="",hash:o,uniquifyIDs:i}=t,s=["id","href","xlink:href","xlink:role","xlink:arcrole"],a=["href","xlink:href"];return i?([...e.children].forEach((e=>{if(e.attributes?.length){const t=Object.values(e.attributes).map((e=>{const t=e,i=/url\((.*?)\)/.exec(e.value);return i?.[1]&&(t.value=e.value.replace(i[0],`url(${n}${i[1]}__${o})`)),t}));s.forEach((e=>{const n=t.find((t=>t.name===e));var i,s;n&&(i=e,s=n.value,!a.includes(i)||!s||s.includes("#"))&&(n.value=`${n.value}__${o}`)}))}return e.children.length?Wa(e,t):e})),e):e}function Ua(e,t){const{baseURL:n,cacheRequests:o=!0,description:i,fetchOptions:s,onError:a,onLoad:r,preProcessor:l,src:c,title:d,uniqueHash:u,uniquifyIDs:p}=e,h=(0,m.useRef)(u??function(){const e="abcdefghijklmnopqrstuvwxyz",t=`${e}${e.toUpperCase()}1234567890`;let n="";for(let e=0;e<8;e++)n+=(o=t)[Math.floor(Math.random()*o.length)];var o;return n}()),g=(0,m.useRef)(s),b=(0,m.useRef)(a),f=(0,m.useRef)(r),x=(0,m.useRef)(l);g.current=s,b.current=a,f.current=r,x.current=l;const[y,v]=(0,m.useReducer)(((e,t)=>({...e,...t})),{content:"",element:null,isCached:!1,status:Ia.IDLE},(n=>{if(!o||!t.isCached(c))return n;const i=t.getContent(c);try{const t=Ha({...e,handleError:()=>{},hash:h.current,content:i});if(!t)return{...n,content:i,isCached:!0,status:Ia.LOADED};const o=La(t);if(o&&(0,m.isValidElement)(o))return{content:i,element:o,isCached:!0,status:Ia.READY}}catch{}return{...n,content:i,isCached:!0,status:Ia.LOADED}})),{content:k,element:w,isCached:_,status:C}=y,j=Fa(e),$=Fa(y),S=(0,m.useRef)(!1),T=(0,m.useRef)(!1),M=(0,m.useCallback)((e=>{S.current&&(v({status:"Browser does not support SVG"===e.message?Ia.UNSUPPORTED:Ia.FAILED}),b.current?.(e))}),[]),N=(0,m.useCallback)((()=>{try{const e=La(Ha({baseURL:n,content:k,description:i,handleError:M,hash:h.current,preProcessor:x.current,src:c,title:d,uniquifyIDs:p}));if(!e||!(0,m.isValidElement)(e))throw new Error("Could not convert the src to a React element");v({element:e,status:Ia.READY})}catch(e){M(e)}}),[n,k,i,M,c,d,p]);var L;return L=()=>{if(S.current=!0,Oa()&&!T.current){try{if(C===Ia.READY)f.current?.(c,_);else if(C===Ia.IDLE){if(!function(){if(!document)return!1;const e=document.createElement("div");e.innerHTML="<svg />";const t=e.firstChild |
| 266 |
;return!!t&&"http://www.w3.org/2000/svg"===t.namespaceURI}()||"undefined"==typeof window||null===window)throw new Error("Browser does not support SVG");if(!c)throw new Error("Missing src");v({content:"",element:null,isCached:!1,status:Ia.LOADING})}}catch(e){M(e)}return T.current=!0,()=>{S.current=!1}}},(0,m.useEffect)(L,[]),(0,m.useEffect)((()=>{if(Oa()&&j&&j.src!==c){if(!c)return void M(new Error("Missing src"));v({content:"",element:null,isCached:!1,status:Ia.LOADING})}}),[M,j,c]),(0,m.useEffect)((()=>{if(C!==Ia.LOADING)return;const e=new AbortController;let n=!0;return(async()=>{try{const i=/^data:image\/svg[^,]*?(;base64)?,(.*)/.exec(c);let s;if(i?s=i[1]?window.atob(i[2]):decodeURIComponent(i[2]):c.includes("<svg")&&(s=c),s)return void(n&&v({content:s,isCached:!1,status:Ia.LOADED}));const a={...g.current,signal:e.signal};let r,l=!1;o?(l=t.isCached(c),r=await t.get(c,a)):r=await za(c,a),n&&v({content:r,isCached:l,status:Ia.LOADED})}catch(e){n&&"AbortError"!==e.name&&M(e)}})(),()=>{n=!1,e.abort()}}),[o,t,M,c,C]),(0,m.useEffect)((()=>{C===Ia.LOADED&&k&&N()}),[k,N,C]),(0,m.useEffect)((()=>{Oa()&&j&&j.src===c&&(j.title===d&&j.description===i||N())}),[i,N,j,c,d]),(0,m.useEffect)((()=>{$&&C===Ia.READY&&$.status!==Ia.READY&&f.current?.(c,_)}),[_,$,c,C]),{element:w,status:C}}var Ga=(0,m.createContext)(null),Va=new class{constructor(e={}){Aa(this,"cacheApi"),Aa(this,"cacheStore"),Aa(this,"subscribers",[]),Aa(this,"isReady",!1);const{name:t=Ba,persistent:n=!1}=e;this.cacheStore=new Map,n&&Oa()&&"caches"in window?caches.open(t).then((e=>{this.cacheApi=e})).catch((e=>{console.error(`Failed to open cache: ${e.message}`),this.cacheApi=void 0})).finally((()=>{this.isReady=!0;const e=[...this.subscribers];this.subscribers.length=0,e.forEach((e=>{try{e()}catch(e){console.error(`Error in CacheStore subscriber callback: ${e.message}`)}}))})):this.isReady=!0}onReady(e){return this.isReady?(e(),()=>{}):(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);t>=0&&this.subscribers.splice(t,1)})}waitForReady(){return this.isReady?Promise.resolve():new Promise((e=>{this.onReady(e)}))}async get(e,t){return await this.fetchAndCache(e,t),this.cacheStore.get(e)?.content??""}getContent(e){return this.cacheStore.get(e)?.content??""}set(e,t){this.cacheStore.set(e,t)}isCached(e){return this.cacheStore.get(e)?.status===Ia.LOADED}async fetchAndCache(e,t){this.isReady||await this.waitForReady();const n=this.cacheStore.get(e);if(n?.status!==Ia.LOADED)if(n?.status!==Ia.LOADING){this.cacheStore.set(e,{content:"",status:Ia.LOADING});try{const n=this.cacheApi?await this.fetchFromPersistentCache(e,t):await za(e,t);this.cacheStore.set(e,{content:n,status:Ia.LOADED})}catch(t){const n="AbortError"===t?.name;throw this.cacheStore.set(e,{content:"",error:n?void 0:t,status:Ia.FAILED}),t}}else{await this.handleLoading(e,t?.signal||void 0,(async()=>{this.cacheStore.set(e,{content:"",status:Ia.IDLE}),await this.fetchAndCache(e,t)}));const n=this.cacheStore.get(e);if(n?.status===Ia.FAILED){if(n.error)throw n.error;this.cacheStore.delete(e),await this.fetchAndCache(e,t)}}}async fetchFromPersistentCache(e,t){const n=await(this.cacheApi?.match(e));if(n)return n.text();await(this.cacheApi?.add(new Request(e,t)));const o=await(this.cacheApi?.match(e));return await(o?.text())??""}async handleLoading(e,t,n){for(let n=0;n<10;n++){if(t?.aborted)throw t.reason instanceof Error?t.reason:new DOMException("The operation was aborted.","AbortError");if(this.cacheStore.get(e)?.status!==Ia.LOADING)return;await Da(.1)}await n()}keys(){return[...this.cacheStore.keys()]}data(){return[...this.cacheStore.entries()].map((([e,t])=>({[e]:t})))}async delete(e){this.cacheApi&&await this.cacheApi.delete(e),this.cacheStore.delete(e)}async clear(){if(this.cacheApi){const e=await this.cacheApi.keys();await Promise.allSettled(e.map((e=>this.cacheApi.delete(e))))}this.cacheStore.clear()}};function qa(e){const{children:t=null,innerRef:n,loader:o=null}=e,i=(0,m.useContext)(Ga)??Va,{element:s,status:a}=Ua(e,i);return Oa()?s?(0,m.cloneElement)(s,{ref:n,...Ra(e,"baseURL","cacheRequests","children","description","fetchOptions","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs")}):[Ia.UNSUPPORTED,Ia.FAILED].includes(a)?t:o:o}const Ya=()=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 1000 100",preserveAspectRatio:"none",children:[(0,l.jsx)("path",{fill:"currentColor",d:"M0 97.79S101.82-.97 283.17 5.23c203.09 0 290.46 94.4 716.83 94.4V0H0v97.79Z"}),(0,l.jsx)("defs",{children:(0,l.jsx)("path",{d:"M0 0h1000v99.62H0z"})})]}),Ka=()=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"none",viewBox:"0 0 1000 100",fill:"currentColor",children:[(0,l.jsx)("path",{d:"m0 98.99 170.59-87.45S611.11 98.99 1000 98.99V0H0v98.99Z"}),(0,l.jsx)("defs",{children:(0,l.jsx)("path",{d:"M0 0h1000v98.99H0z"})})]}),Qa=()=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"none",viewBox:"0 0 1000 100",fill:"currentColor",children:(0,l.jsx)("path",{d:"M1000 0H0l.004 84.53c8.883-1.503 17.67-3.832 26.606-4.38 11.144-.693 22.668-2.426 33.516 2.75 2.148 1.022 5.802 1.283 7.787.236 16.643-8.726 35.02-8.353 52.995-8.552 16.393-.171 32.8 2.003 49.227 2.575 7.39.249 14.834-.883 22.252-1.395 5.505-.385 11.126-1.657 16.502-1.017 27.437 3.259 54.741.483 82.116-.512 22.989-.824 46.094-1.695 69.014-.384 18.454 1.053 36.688 5.406 55.054 8.106 3.796.56 7.833.866 11.584.284 19.935-3.06 39.975-5.795 59.667-9.936 13.651-2.875 27.24-4.332 41.044-3.482 16.178.995 32.295 2.86 48.464 4.05 14.143 1.039 28.322 2.251 42.486 2.24 6.99-.004 13.954-2.691 20.971-3.957 3.599-.646 7.394-1.548 10.917-1.071 8.379 1.156 16.747 2.73 24.926 4.807 3.59.91 6.937 3.182 9.992 5.342 8.332 5.887 12.636 5.884 21.316.173 1.429-.938 4.516-.871 6.155-.05 4.483 2.259 8.528 5.261 12.874 7.783 4.35 2.528 8.526 3.508 13.604.622 8.431-4.779 8.798-4.844 5.644-16.958 9.004 5.279 16.629 10.026 24.537 14.293 5.578 3.015 11.102 6.918 18.332 3.864 5.162-2.182 9.711-4.556 8.883-11.517 8.026 4.971 15.566 9.27 22.664 14.154 6.305 4.338 12.352 3.68 18.678.595 6.039-2.943 4.774-7.627 1.511-13.691 4.874 2.2 8.264 3.038 10.67 4.97 4.736 3.8 9.051 2.95 14.068.709 7.736-3.457 8.919-7.193 3.577-13.387-.879-1.02-1.85-1.978-1.982-3.99 5.02 3.216 10.095 6.346 15.041 9.666 5.659 3.8 11.127 7.853 16.793 11.63 7.265 4.848 15.631 4.988 21.951-.296 4.726-3.951 2.104-8.467-.974-12.184-4.576-5.533-9.527-10.8-14.312-16.168.415-.445.829-.877 1.244-1.316 5.943 4.058 11.898 8.105 17.824 12.196 4.109 2.835 8.088 5.854 12.277 8.587 10.747 7.007 15.487 6.835 26.683-1.303 4.201 3.223 8.74 6.49 13.041 10.025 9.951 8.183 15.277 7.933 24.777-2.595V0Z"})}),Za=()=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"none",viewBox:"0 0 1000 100",fill:"currentColor",children:(0,l.jsx)("path",{d:"M646.99 79.145C766.266 62.962 906.985 26.462 1000 0H0c211.255 131.265 460.086 104.501 646.99 79.145Z"})}),Xa=({data:e})=>{const{isUpload:t,uploadSvg:n,type:o}=e||{};return t?(0,l.jsx)(qa,{src:n?.url}):(0,l.jsx)(l.Fragment,{children:(()=>{switch(o){case"ocean-wave":return(0,l.jsx)(Ya,{});case"asymmetric-triangle":return(0,l.jsx)(Ka,{});case"abstract-paintbrush":return(0,l.jsx)(Qa,{});case"asymmetric-curve":return(0,l.jsx)(Za,{});default:return null}})()})},Ja=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o}=e("core/block-editor");return{innerBlocks:o(t),device:n()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,innerBlocks:o,device:i}=e,{shape:s,advanced:a}=t,{top:r,bottom:c}=s,d=(0,h.useBlockProps)(),u=(0,m.useRef)();((e,t)=>{const{type:n,duration:o,delay:i}=t||{};(0,m.useEffect)((()=>{window.AOS?.init()}),[]),(0,m.useEffect)((()=>{e&&n&&(e.setAttribute("data-aos",n),e.setAttribute("data-aos-duration",o||.4),e.setAttribute("data-aos-delay",i||0),e.classList.remove("aos-init"),e.classList.remove("aos-animate"),setTimeout((()=>{e.classList.add("aos-init"), |
| 267 |
e.classList.add("aos-animate")}),500))}),[e,n,o,i])})(u.current,a?.animation);const p=bBlocksPremiumChecker;return(0,l.jsxs)("div",{...d,children:[(0,l.jsx)(ea,{attributes:t,setAttributes:n,device:i,id:d.id,isPremium:p}),(0,l.jsxs)("div",{ref:u,children:[(0,l.jsx)(Sa,{attributes:t,id:d.id,isBackend:!0}),(0,l.jsxs)("div",{className:ja,children:[!!r?.uploadSvg?.url||"none"!==r?.type&&(0,l.jsx)("div",{className:"shaped topShaped",children:(0,l.jsx)(Xa,{data:r})}),(0,l.jsx)("div",{className:`${ja}Content`,children:(0,l.jsx)(h.InnerBlocks,{renderAppender:()=>o?.length?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):(0,l.jsx)(h.InnerBlocks.ButtonBlockAppender,{})})}),c?.uploadSvg?.url||"none"!==c?.type?(0,l.jsx)("div",{className:"shaped bottomShaped",children:(0,l.jsx)(Xa,{data:c})}):null]})]})]})})),er={xmlns:"http://www.w3.org/2000/svg",className:"bPlBlockIcon"},tr=(0,l.jsx)("svg",{...er,viewBox:"0 0 16 16",children:(0,l.jsx)("path",{d:"M2 1a1 1 0 1 0 0 2 1 1 0 0 0 0-2M0 2a2 2 0 0 1 3.937-.5h8.126A2 2 0 1 1 14.5 3.937v8.126a2 2 0 1 1-2.437 2.437H3.937A2 2 0 1 1 1.5 12.063V3.937A2 2 0 0 1 0 2m2.5 1.937v8.126c.703.18 1.256.734 1.437 1.437h8.126a2 2 0 0 1 1.437-1.437V3.937A2 2 0 0 1 12.063 2.5H3.937A2 2 0 0 1 2.5 3.937M14 1a1 1 0 1 0 0 2 1 1 0 0 0 0-2M2 13a1 1 0 1 0 0 2 1 1 0 0 0 0-2m12 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2"})}),nr=(0,l.jsx)("svg",{...er,viewBox:"0 0 50 50",children:(0,l.jsx)("path",{d:"M 3 9 C 1.346 9 0 10.346 0 12 L 0 38 C 0 39.654 1.346 41 3 41 L 15.0625 41 C 15.5655 46.046 19.823 50 25 50 C 30.176 50 34.4335 46.046 34.9375 41 L 47 41 C 48.654 41 50 39.654 50 38 L 50 12 C 50 10.346 48.654 9 47 9 L 3 9 z M 25 32 C 29.411 32 33 35.589 33 40 C 33 44.411 29.411 48 25 48 C 20.589 48 17 44.411 17 40 C 17 35.589 20.589 32 25 32 z M 24 35 L 24 39 L 20 39 L 20 41 L 24 41 L 24 45 L 26 45 L 26 41 L 30 41 L 30 39 L 26 39 L 26 35 L 24 35 z"})}),or=(0,l.jsx)("svg",{...er,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M4,4 L20,4 C21.1045695,4 22,4.8954305 22,6 L22,18 C22,19.1045695 21.1045695,20 20,20 L4,20 C2.8954305,20 2,19.1045695 2,18 L2,6 C2,4.8954305 2.8954305,4 4,4 Z M16,6 L16,18 L20,18 L20,6 L16,6 Z M4,6 L4,18 L8,18 L8,6 L4,6 Z M10,6 L10,18 L14,18 L14,6 L10,6 Z"})}),ir=(0,l.jsx)("svg",{...er,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M68.983,382.642l171.35,98.928a32.082,32.082,0,0,0,32,0l171.352-98.929a32.093,32.093,0,0,0,16-27.713V157.071a32.092,32.092,0,0,0-16-27.713L272.334,30.429a32.086,32.086,0,0,0-32,0L68.983,129.358a32.09,32.09,0,0,0-16,27.713V354.929A32.09,32.09,0,0,0,68.983,382.642ZM272.333,67.38l155.351,89.691V334.449L272.333,246.642ZM256.282,274.327l157.155,88.828-157.1,90.7L99.179,363.125ZM84.983,157.071,240.333,67.38v179.2L84.983,334.39Z"})}),sr=(0,l.jsx)("svg",{...er,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M7 10h-4.083l1.271-1.396.812.396.676-.862 1.324 1.862zm.88 3h-7.88v-8h9.204c.739 1.612 2.024 1.696 3.796 2.509v4.648c-1.638-.182-3.985-.26-5.12.843zm.12-6h-6v4h6v-4zm9.17-1.833c-.806-1.165-5.031-1.924-6.742-2.167-.169.727.111 1.643.859 2.076.729.422 2.847 1.078 3.473 1.702.812.808 2.026 4.668.028 7.282-2.076-.589-4.24-.527-5.415-.048-1.153.47-1.013 1.908.189 2.045 3.42.39 7.587 1.161 10.322 4.943 0 0 1.821-1.885 4.115-4.426-3.668-3.053-4.198-7.606-6.829-11.407zm-13.92 2.833c-.138 0-.25.112-.25.25s.112.25.25.25c.139 0 .25-.112.25-.25s-.111-.25-.25-.25z"})}),ar=(0,l.jsxs)("svg",{...er,viewBox:"0 0 20 20",children:[(0,l.jsx)("path",{fillRule:"evenodd",d:"M9.938 4.016a.146.146 0 00-.054.057L3.027 15.74a.176.176 0 00-.002.183c.016.03.037.05.054.06.015.01.034.017.066.017h13.713a.12.12 0 00.066-.017.163.163 0 00.055-.06.176.176 0 00-.003-.183L10.12 4.073a.146.146 0 00-.054-.057.13.13 0 00-.063-.016.13.13 0 00-.064.016zm1.043-.45a1.13 1.13 0 00-1.96 0L2.166 15.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L10.982 3.566z"}),(0,l.jsx)("rect",{width:"2",height:"2",x:"9.002",y:"13",rx:"1"}),(0,l.jsx)("path",{d:"M9.1 7.995a.905.905 0 111.8 0l-.35 3.507a.553.553 0 01-1.1 0L9.1 7.995z"})]}),rr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 195 195",children:[(0,l.jsx)("path",{fill:`${o}33`,d:"M40.4 53.2C25.6 64.3 17.9 79.5 17.9 97.5C17.9 104.9 18.4 108.5 20.5 114.5C24.2 125.7 30.6 134.4 40.5 141.9L43.5 144.2L39 143.5C12.7 139.2 -5.1 112.1 1.5 86.5C5.9 69.8 19.7 55.9 35.7 52.1C42.5 50.5 43.6 50.7 40.4 53.2Z"}),(0,l.jsx)("path",{fill:`${o}66`,d:"M65.4 53.2C50.6 64.3 42.9 79.5 42.9 97.5C42.9 104.9 43.4 108.5 45.5 114.5C49.2 125.7 55.6 134.4 65.5 141.9L68.5 144.2L64 143.5C37.7 139.2 19.9 112.1 26.5 86.5C30.9 69.8 44.7 55.9 60.7 52.1C67.5 50.5 68.6 50.7 65.4 53.2Z"}),(0,l.jsx)("path",{fill:`${o}99`,d:"M91.4 53.2C76.6 64.3 68.9 79.5 68.9 97.5C68.9 104.9 69.4 108.5 71.5 114.5C75.2 125.7 81.6 134.4 91.5 141.9L94.5 144.2L90 143.5C63.7 139.2 45.9 112.1 52.5 86.5C56.9 69.8 70.7 55.9 86.7 52.1C93.5 50.5 94.6 50.7 91.4 53.2Z"}),(0,l.jsx)("path",{fill:`${o}cc`,d:"M116.4 53.2C101.6 64.3 93.9 79.5 93.9 97.5C93.9 104.9 94.4 108.5 96.5 114.5C100.2 125.7 106.6 134.4 116.5 141.9L119.5 144.2L115 143.5C88.7 139.2 70.9 112.1 77.5 86.5C81.9 69.8 95.7 55.9 111.7 52.1C118.5 50.5 119.6 50.7 116.4 53.2Z"}),(0,l.jsx)("path",{fill:o,d:"M161.9 52.9C177.8 57.8 190.5 71.8 193.9 87.8C199.9 116.6 177.8 144.1 148.7 144C134.9 143.9 124.9 139.9 115.4 130.5C96.7 111.9 96.7 83 115.4 64.5C121.7 58.3 128.2 54.5 136 52.4C142.9 50.5 154.9 50.7 161.9 52.9Z"})]}),lr=(0,l.jsx)("svg",{...er,viewBox:"0 0 48 48",children:(0,l.jsx)("path",{d:"M7 34Q5.75 34 4.875 33.125Q4 32.25 4 31V17Q4 15.75 4.875 14.875Q5.75 14 7 14H41Q42.25 14 43.125 14.875Q44 15.75 44 17V31Q44 32.25 43.125 33.125Q42.25 34 41 34H37.8V31H41Q41 31 41 31Q41 31 41 31V17Q41 17 41 17Q41 17 41 17H7Q7 17 7 17Q7 17 7 17V31Q7 31 7 31Q7 31 7 31H20.2V34ZM29 38 27.2 34 23.2 32.2 27.2 30.4 29 26.4 30.8 30.4 34.8 32.2 30.8 34ZM34 27.4 32.95 25.05 30.6 24 32.95 22.95 34 20.6 35.05 22.95 37.4 24 35.05 25.05Z"})}),cr=(0,l.jsx)("svg",{...er,viewBox:"0 0 465.088 465.088",children:(0,l.jsx)("path",{d:"M61.21,83.126C27.461,83.126,0,110.582,0,144.341c0,33.751,27.457,61.212,61.21,61.212s61.217-27.456,61.217-61.212 C122.427,110.582,94.958,83.126,61.21,83.126z M61.21,191.091c-25.781,0-46.752-20.969-46.752-46.75 c0-25.778,20.971-46.759,46.752-46.759c25.788,0,46.755,20.98,46.755,46.759C107.965,170.123,86.991,191.091,61.21,191.091z M61.21,259.533C27.461,259.533,0,286.99,0,320.747c0,33.758,27.457,61.216,61.21,61.216s61.217-27.458,61.217-61.216 C122.427,286.997,94.958,259.533,61.21,259.533z M61.21,367.507c-25.781,0-46.752-20.981-46.752-46.761 C14.458,294.968,35.429,274,61.21,274c25.788,0,46.755,20.969,46.755,46.747C107.965,346.526,86.991,367.507,61.21,367.507z M465.088,107.244v74.187c0,3.196-2.591,5.784-5.78,5.784H155.637c-3.187,0-5.775-2.587-5.775-5.784v-74.187 c0-3.19,2.588-5.778,5.775-5.778h303.663C462.498,101.46,465.088,104.048,465.088,107.244z M465.088,283.659v74.184 c0,3.195-2.591,5.777-5.78,5.777H155.637c-3.187,0-5.775-2.582-5.775-5.777v-74.184c0-3.196,2.588-5.784,5.775-5.784h303.663 C462.498,277.875,465.088,280.462,465.088,283.659z M85.765,144.336c0,13.554-10.996,24.549-24.555,24.549 c-13.554,0-24.548-10.996-24.548-24.549c0-13.554,10.994-24.547,24.548-24.547C74.769,119.789,85.765,130.782,85.765,144.336z M85.765,320.186c0,13.558-10.996,24.545-24.555,24.545c-13.554,0-24.548-10.987-24.548-24.545c0-13.551,10.994-24.55,24.548-24.55 C74.769,295.636,85.765,306.635,85.765,320.186z"})}),dr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"m21.5 21h-19c-1.378 0-2.5-1.122-2.5-2.5v-13c0-1.378 1.122-2.5 2.5-2.5h19c1.378 0 2.5 1.122 2.5 2.5v13c0 1.378-1.122 2.5-2.5 2.5zm-19-17c-.827 0-1.5.673-1.5 1.5v13c0 .827.673 1.5 1.5 1.5h19c.827 0 1.5-.673 1.5-1.5v-13c0-.827-.673-1.5-1.5-1.5z"}),(0,l.jsx)("path",{d:"m7.5 12c-1.378 0-2.5-1.122-2.5-2.5s1.122-2.5 2.5-2.5 2.5 1.122 2.5 2.5-1.122 2.5-2.5 2.5zm0-4c-.827 0-1.5.673-1.5 1.5s.673 1.5 1.5 1.5 1.5-.673 1.5-1.5-.673-1.5-1.5-1.5z"}),(0,l.jsx)("path",{ |
| 268 |
d:"m11.5 17c-.276 0-.5-.224-.5-.5v-1c0-.827-.673-1.5-1.5-1.5h-4c-.827 0-1.5.673-1.5 1.5v1c0 .276-.224.5-.5.5s-.5-.224-.5-.5v-1c0-1.378 1.122-2.5 2.5-2.5h4c1.378 0 2.5 1.122 2.5 2.5v1c0 .276-.224.5-.5.5z"}),(0,l.jsx)("path",{d:"m20.5 9h-6c-.276 0-.5-.224-.5-.5s.224-.5.5-.5h6c.276 0 .5.224.5.5s-.224.5-.5.5z"}),(0,l.jsx)("path",{d:"m20.5 13h-6c-.276 0-.5-.224-.5-.5s.224-.5.5-.5h6c.276 0 .5.224.5.5s-.224.5-.5.5z"}),(0,l.jsx)("path",{d:"m20.5 17h-6c-.276 0-.5-.224-.5-.5s.224-.5.5-.5h6c.276 0 .5.224.5.5s-.224.5-.5.5z"})]}),ur=(0,l.jsx)("svg",{...er,viewBox:"0 0 256 256",children:(0,l.jsx)("g",{transform:"translate(128 128) scale(0.72 0.72)",children:(0,l.jsxs)("g",{transform:"translate(-175.05 -175.05000000000004) scale(3.89 3.89)",children:[(0,l.jsx)("path",{d:"M 87.994 0 H 69.342 c -1.787 0 -2.682 2.16 -1.418 3.424 l 5.795 5.795 l -33.82 33.82 L 28.056 31.196 l -3.174 -3.174 c -1.074 -1.074 -2.815 -1.074 -3.889 0 L 0.805 48.209 c -1.074 1.074 -1.074 2.815 0 3.889 l 3.174 3.174 c 1.074 1.074 2.815 1.074 3.889 0 l 15.069 -15.069 l 14.994 14.994 c 1.074 1.074 2.815 1.074 3.889 0 l 1.614 -1.614 c 0.083 -0.066 0.17 -0.125 0.247 -0.202 l 37.1 -37.1 l 5.795 5.795 C 87.84 23.34 90 22.445 90 20.658 V 2.006 C 90 0.898 89.102 0 87.994 0 z"}),(0,l.jsx)("path",{d:"M 65.626 37.8 v 49.45 c 0 1.519 1.231 2.75 2.75 2.75 h 8.782 c 1.519 0 2.75 -1.231 2.75 -2.75 V 23.518 L 65.626 37.8 z"}),(0,l.jsx)("path",{d:"M 47.115 56.312 V 87.25 c 0 1.519 1.231 2.75 2.75 2.75 h 8.782 c 1.519 0 2.75 -1.231 2.75 -2.75 V 42.03 L 47.115 56.312 z"}),(0,l.jsx)("path",{d:"M 39.876 60.503 c -1.937 0 -3.757 -0.754 -5.127 -2.124 l -6.146 -6.145 V 87.25 c 0 1.519 1.231 2.75 2.75 2.75 h 8.782 c 1.519 0 2.75 -1.231 2.75 -2.75 V 59.844 C 41.952 60.271 40.933 60.503 39.876 60.503 z"}),(0,l.jsx)("path",{d:"M 22.937 46.567 L 11.051 58.453 c -0.298 0.298 -0.621 0.562 -0.959 0.8 V 87.25 c 0 1.519 1.231 2.75 2.75 2.75 h 8.782 c 1.519 0 2.75 -1.231 2.75 -2.75 V 48.004 L 22.937 46.567 z"})]})})}),pr=(0,l.jsx)("svg",{...er,viewBox:"0 0 84 82",children:(0,l.jsxs)("g",{transform:"translate(0, 82) scale(0.1, -0.1)",children:[(0,l.jsx)("path",{d:"M42 754 c-22 -15 -22 -17 -22 -303 0 -271 1 -289 19 -305 11 -10 27 -16 37 -14 24 4 30 28 7 28 -41 0 -43 13 -43 291 0 214 3 269 14 278 9 8 100 11 312 9 l299 -3 3 -22 c5 -31 32 -30 32 1 0 53 -18 56 -340 56 -251 0 -299 -2 -318 -16z"}),(0,l.jsx)("path",{d:"M137 642 c-15 -16 -17 -52 -17 -300 0 -242 2 -283 16 -296 13 -14 57 -16 329 -16 313 0 314 0 329 22 24 33 24 553 0 586 -15 22 -16 22 -328 22 -290 0 -314 -1 -329 -18z m638 -297 l0 -280 -310 0 -310 0 -3 270 c-1 148 0 275 3 282 3 11 70 13 312 11 l308 -3 0 -280z"}),(0,l.jsx)("path",{d:"M223 595 c0 -8 9 -15 19 -15 10 0 18 7 18 15 0 8 -8 15 -18 15 -10 0 -19 -7 -19 -15z"}),(0,l.jsx)("path",{d:"M177 553 c-4 -3 -7 -10 -7 -15 0 -4 133 -8 296 -8 232 0 295 3 292 13 -4 9 -72 13 -290 15 -156 1 -287 -1 -291 -5z"}),(0,l.jsx)("path",{d:"M482 409 c5 -16 188 -18 188 -1 0 9 -26 12 -96 12 -64 0 -94 -4 -92 -11z"}),(0,l.jsx)("path",{d:"M315 398 c-23 -62 -55 -164 -55 -175 0 -8 12 -13 31 -13 22 0 32 5 36 20 4 14 14 20 34 20 22 0 29 -5 29 -20 0 -16 7 -20 36 -20 25 0 35 4 31 13 -2 6 -16 51 -31 100 l-27 87 -40 0 c-23 0 -42 -5 -44 -12z m96 -85 c26 -77 26 -83 9 -83 -10 0 -20 9 -23 20 -4 15 -14 20 -40 20 -27 0 -37 -5 -42 -20 -6 -18 -35 -29 -35 -14 0 4 12 42 27 86 24 72 29 79 51 76 22 -3 29 -14 53 -85z"}),(0,l.jsx)("path",{d:"M341 339 c-16 -47 -14 -59 13 -59 33 0 37 10 25 53 -12 45 -24 47 -38 6z"}),(0,l.jsx)("path",{d:"M480 350 c0 -6 38 -10 95 -10 57 0 95 4 95 10 0 6 -38 10 -95 10 -57 0 -95 -4 -95 -10z"})]})}),hr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 512 512",children:[(0,l.jsx)("path",{d:"m288 48h-64a24 24 0 0 1 0-48h64a24 24 0 0 1 0 48z"}),(0,l.jsx)("path",{d:"m414.392 129.608c-1.867-1.867-3.772-3.684-5.692-5.477l19.963-26.769a8 8 0 0 0 -1.63-11.195l-25.65-19.13a8 8 0 0 0 -11.2 1.631l-19.844 26.614a224.63 224.63 0 1 0 44.053 34.326zm-158.392 350.392c-105.869 0-192-86.131-192-192s86.131-192 192-192 192 86.131 192 192-86.131 192-192 192z"}),(0,l.jsx)("path",{d:"m408 296h-152a8 8 0 0 1 -8-8v-152a8 8 0 0 1 8-8c88.224 0 160 71.775 160 160a8 8 0 0 1 -8 8z"}),(0,l.jsx)("circle",{cx:201.421,cy:145.912,r:8}),(0,l.jsx)("circle",{cx:160.185,cy:169.732,r:8}),(0,l.jsx)("circle",{cx:128.327,cy:205.129,r:8}),(0,l.jsx)("circle",{cx:108.967,cy:248.638,r:8}),(0,l.jsx)("circle",{cx:104,cy:296,r:8}),(0,l.jsx)("circle",{cx:113.912,cy:342.579,r:8}),(0,l.jsx)("circle",{cx:137.732,cy:383.815,r:8}),(0,l.jsx)("circle",{cx:173.129,cy:415.673,r:8}),(0,l.jsx)("circle",{cx:216.638,cy:435.033,r:8}),(0,l.jsx)("circle",{cx:264,cy:440,r:8}),(0,l.jsx)("circle",{cx:310.579,cy:430.088,r:8}),(0,l.jsx)("circle",{cx:351.815,cy:406.268,r:8}),(0,l.jsx)("circle",{cx:383.673,cy:370.871,r:8}),(0,l.jsx)("circle",{cx:403.033,cy:327.362,r:8})]}),gr=(0,l.jsx)("svg",{...er,viewBox:"0 0 448 512",children:(0,l.jsx)("path",{d:"M176 0c-17.7 0-32 14.3-32 32s14.3 32 32 32h16V98.4C92.3 113.8 16 200 16 304c0 114.9 93.1 208 208 208s208-93.1 208-208c0-41.8-12.3-80.7-33.5-113.2l24.1-24.1c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L355.7 143c-28.1-23-62.2-38.8-99.7-44.6V64h16c17.7 0 32-14.3 32-32s-14.3-32-32-32H176zM288 204c28.7 0 52 23.3 52 52v96c0 28.7-23.3 52-52 52s-52-23.3-52-52V256c0-28.7 23.3-52 52-52zm-12 52v96c0 6.6 5.4 12 12 12s12-5.4 12-12V256c0-6.6-5.4-12-12-12s-12 5.4-12 12zM159.5 244c-5.4 0-10.2 3.5-11.9 8.6l-.6 1.7c-3.5 10.5-14.8 16.1-25.3 12.6s-16.1-14.8-12.6-25.3l.6-1.7c7.2-21.5 27.2-35.9 49.8-35.9c29 0 52.5 23.5 52.5 52.5v2.2c0 13.4-4.9 26.4-13.8 36.4l-39 43.9c-6.2 7-10 15.7-10.9 24.9H192c11 0 20 9 20 20s-9 20-20 20H128c-11 0-20-9-20-20V368.3c0-20.6 7.5-40.4 21.2-55.8l39-43.9c2.4-2.7 3.7-6.2 3.7-9.8v-2.2c0-6.9-5.6-12.5-12.5-12.5z"})}),mr=(0,l.jsx)("svg",{...er,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M456 89.333v333.333h33.333c9.205 0 16.667 7.462 16.667 16.667v33.333c0 9.205-7.462 16.667-16.667 16.667H322.667c-9.205 0-16.667-7.462-16.667-16.667v-33.333c0-9.205 7.462-16.667 16.667-16.667H356V289.333H156v133.333h33.333c9.205 0 16.667 7.462 16.667 16.667v33.333c0 9.205-7.462 16.667-16.667 16.667H22.667C13.462 489.333 6 481.871 6 472.667v-33.333c0-9.205 7.462-16.667 16.667-16.667H56V89.333H22.667C13.462 89.333 6 81.871 6 72.667V39.333c0-9.205 7.462-16.667 16.667-16.667h166.667c9.205 0 16.667 7.462 16.667 16.667v33.333c0 9.205-7.462 16.667-16.667 16.667H156v133.333h200V89.333h-33.333c-9.205 0-16.667-7.462-16.667-16.667V39.333c0-9.205 7.462-16.667 16.667-16.667h166.667c9.205 0 16.667 7.462 16.667 16.667v33.333c0 9.205-7.462 16.667-16.667 16.667z"})}),br=(0,l.jsx)("svg",{...er,viewBox:"0 0 448 512",children:(0,l.jsx)("path",{d:"M400 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h137.25V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.27c-30.81 0-40.42 19.12-40.42 38.73V256h68.78l-11 71.69h-57.78V480H400a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48z"})}),fr=(0,l.jsx)("svg",{...er,viewBox:"0 0 448 512",children:(0,l.jsx)("path",{d:"M400 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h137.25V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.27c-30.81 0-40.42 19.12-40.42 38.73V256h68.78l-11 71.69h-57.78V480H400a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48z"})}),xr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 512.015 512.015",children:[(0,l.jsx)("path",{d:"m198.562 0h66.4v80.333h-66.4z"}),(0,l.jsx)("path",{d:"m344.229 162.8c41.599 0 80.103 13.477 111.4 36.279v-184.079c0-8.284-6.716-15-15-15h-145.666v95.333c0 8.284-6.716 15-15 15h-96.4c-8.284 0-15-6.716-15-15v-95.333h-145.667c-8.284 0-15 6.716-15 15v417.733c0 8.284 6.716 15 15 15h157.501c-73.932-123.458 19.116-286.358 163.832-284.933z"}),(0,l.jsx)("path",{d:"m495.817 302.361-140.98 140.979c-5.858 5.859-15.357 5.857-21.213 0l-80.333-80.333c-5.859-5.859-5.852-15.361 0-21.213l45.444-45.444c5.858-5.859 15.361-5.853 21.213 0l24.282 24.284 95.85-95.851c-103.098-78.701-256.216-3.381-255.45 127.619-.001 88.143 71.454 159.598 159.599 159.598 107.198 1.479 186.383-108.623 151.588-209.639z"}),(0, |
| 269 |
l.jsx)("path",{d:"m354.835 352.453c-5.858 5.858-15.355 5.858-21.213 0l-24.283-24.284-24.23 24.23 59.12 59.12 132.382-132.382c3.905-3.905 3.905-10.237 0-14.142l-10.089-10.088c-3.905-3.905-10.237-3.905-14.142 0z"})]}),yr=(0,l.jsx)("svg",{...er,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M256 0c-8.284 0-15 6.716-15 15v70c0 8.284 6.716 15 15 15s15-6.716 15-15V15c0-8.284-6.716-15-15-15zM256 137c-8.284 0-15 6.716-15 15v70c0 8.284 6.716 15 15 15s15-6.716 15-15v-70c0-8.284-6.716-15-15-15zM256 275c-8.284 0-15 6.716-15 15v70c0 8.284 6.716 15 15 15s15-6.716 15-15v-70c0-8.284-6.716-15-15-15zM256 412c-8.284 0-15 6.716-15 15v70c0 8.284 6.716 15 15 15s15-6.716 15-15v-70c0-8.284-6.716-15-15-15zM179.402 103.503l-120-36.842A14.999 14.999 0 0040 81v350a14.999 14.999 0 0019.402 14.338l120-36.842A14.999 14.999 0 00190 394.157V117.842c0-6.588-4.3-12.405-10.598-14.339zM465.915 68.937a14.999 14.999 0 00-13.317-2.276l-120 36.842A14.999 14.999 0 00322 117.842v276.316c0 6.588 4.3 12.405 10.598 14.339l120 36.842A15 15 0 00472 431V81c0-4.759-2.258-9.235-6.085-12.063z"})}),vr=(0,l.jsx)("svg",{...er,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"m19.25 0h-14.5c-1.517 0-2.75 1.233-2.75 2.75v18.5c0 1.517 1.233 2.75 2.75 2.75h14.5c1.517 0 2.75-1.233 2.75-2.75v-18.5c0-1.517-1.233-2.75-2.75-2.75zm-12.5 18.5h.75v-.293c-.292-.103-.5-.381-.5-.707 0-.414.336-.75.75-.75h.5c.414 0 .75.336.75.75v1.75c0 .414-.336.75-.75.75h-1.5c-.965 0-1.75-.785-1.75-1.75v-2.5c0-.965.785-1.75 1.75-1.75h1.5c.414 0 .75.336.75.75s-.336.75-.75.75h-1.5c-.138 0-.25.112-.25.25v2.5c0 .138.112.25.25.25zm5.5.75c0 .414-.336.75-.75.75s-.75-.336-.75-.75v-4.5c0-.414.336-.75.75-.75s.75.336.75.75zm5-2.75c.414 0 .75.336.75.75s-.336.75-.75.75h-2v1.25c0 .414-.336.75-.75.75s-.75-.336-.75-.75v-3.5c0-.965.785-1.75 1.75-1.75h1.75c.414 0 .75.336.75.75s-.336.75-.75.75h-1.75c-.138 0-.25.112-.25.25v.75z"})}),kr=(0,l.jsx)("svg",{...er,viewBox:"0 0 16 16",children:(0,l.jsx)("path",{d:"M4.854 4.146a.5.5 0 010 .708L1.707 8l3.147 3.146a.5.5 0 01-.708.708l-3.5-3.5a.5.5 0 010-.708l3.5-3.5a.5.5 0 01.708 0zm6.292 0a.5.5 0 000 .708L14.293 8l-3.147 3.146a.5.5 0 00.708.708l3.5-3.5a.5.5 0 000-.708l-3.5-3.5a.5.5 0 00-.708 0zm-.999-3.124a.5.5 0 01.33.625l-4 13a.5.5 0 01-.955-.294l4-13a.5.5 0 01.625-.33z"})}),wr=(0,l.jsx)("svg",{...er,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z"})}),_r=(0,l.jsx)("svg",{...er,viewBox:"0 0 469.333 469.333",children:(0,l.jsx)("path",{d:"M192 42.667H85.333c-23.573 0-42.667 19.093-42.667 42.667V384c0 23.573 19.093 42.667 42.667 42.667H192v42.667h42.667V0H192v42.667zm0 320H85.333l106.667-128v128zM384 42.667H277.333v42.667H384v277.333l-106.667-128v192H384c23.573 0 42.667-19.093 42.667-42.667V85.333c0-23.573-19.094-42.666-42.667-42.666z"})}),Cr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"m6.25 19.5c-1.601 0-3.025-1.025-3.542-2.551l-.035-.115c-.122-.404-.173-.744-.173-1.084v-6.818l-2.426 8.098c-.312 1.191.399 2.426 1.592 2.755l15.463 4.141c.193.05.386.074.576.074.996 0 1.906-.661 2.161-1.635l.901-2.865z"}),(0,l.jsx)("path",{d:"m9 9c1.103 0 2-.897 2-2s-.897-2-2-2-2 .897-2 2 .897 2 2 2z"}),(0,l.jsx)("path",{d:"m21.5 2h-15c-1.378 0-2.5 1.122-2.5 2.5v11c0 1.378 1.122 2.5 2.5 2.5h15c1.378 0 2.5-1.122 2.5-2.5v-11c0-1.378-1.122-2.5-2.5-2.5zm-15 2h15c.276 0 .5.224.5.5v7.099l-3.159-3.686c-.335-.393-.82-.603-1.341-.615-.518.003-1.004.233-1.336.631l-3.714 4.458-1.21-1.207c-.684-.684-1.797-.684-2.48 0l-2.76 2.759v-9.439c0-.276.224-.5.5-.5z"})]}),jr=(0,l.jsx)("svg",{...er,viewBox:"0 0 1000 1004.1441",children:(0,l.jsx)("path",{d:"m229 542.144c58 0 104-47 104-105s-46-104-104-104-104 47-104 104 47 105 104 105zm0-167c35 0 63 28 63 62s-28 63-63 63-62-28-62-63 28-62 62-62zm750-167h-147c1-7 1-14 1-21 0-80-65-145-145-145s-146 65-146 145c0 7 0 14 1 21h-522c-12 0-21 10-21 21v709c0 11 9 20 21 20h958c12 0 21-9 21-20v-709c0-11-9-21-21-21zm-291-125c57 0 104 47 104 104 0 75-71 199-104 253-34-54-105-178-105-253 0-57 47-104 105-104zm-136 167c29 106 114 234 118 241 4 5 11 9 18 9s13-4 17-9c4-7 89-135 118-241h135v547l-171-206c-8-10-24-10-32 0l-85 102-131-224c-4-7-10-11-18-11-6 1-14 4-18 10l-172 268-128-146c-4-5-11-7-18-7-6 1-12 5-16 11l-127 223v-567zm-510 667v-16l149-261 127 145c4 4 10 7 17 7 6-1 12-4 16-10l169-263 129 221c3 6 9 9 16 10 7 0 13-2 18-8l88-105 187 225v55zm708-730c0-34-28-62-62-62s-63 28-63 62 28 63 63 63 62-28 62-63zm-83 0c0-11 9-20 21-20s20 9 20 20-9 21-20 21-21-9-21-21z"})}),$r=(0,l.jsx)("svg",{...er,version:"1.1",id:"Capa_1",x:"0px",y:"0px",viewBox:"0 0 512 512",style:{enableBackground:"new 0 0 512 512"},xmlSpace:"preserve",children:(0,l.jsxs)("g",{id:"Scroll",children:[(0,l.jsx)("circle",{style:{fill:"none",stroke:o,strokeWidth:40,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},cx:256,cy:256,r:120}),(0,l.jsx)("path",{style:{fill:"none",stroke:o,strokeWidth:40,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},d:"M176,83.431l51.716-51.716c15.621-15.621,40.948-15.621,56.569,0L336,83.431"}),(0,l.jsx)("path",{style:{fill:"none",stroke:o,strokeWidth:40,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},d:"M176,428.569l51.716,51.716c15.621,15.621,40.948,15.621,56.569,0L336,428.569"}),(0,l.jsx)("path",{style:{fill:"none",stroke:o,strokeWidth:40,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},d:"M83.431,336l-51.716-51.716c-15.621-15.621-15.621-40.948,0-56.569L83.431,176"}),(0,l.jsx)("path",{style:{fill:"none",stroke:o,strokeWidth:40,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10},d:" M428.569,336l51.716-51.716c15.621-15.621,15.621-40.948,0-56.569L428.569,176"})]})}),Sr=(0,l.jsx)("svg",{...er,viewBox:"0 0 23.625 23.625",children:(0,l.jsx)("path",{d:"M11.812,0C5.289,0,0,5.289,0,11.812s5.289,11.813,11.812,11.813s11.813-5.29,11.813-11.813 S18.335,0,11.812,0z M14.271,18.307c-0.608,0.24-1.092,0.422-1.455,0.548c-0.362,0.126-0.783,0.189-1.262,0.189 c-0.736,0-1.309-0.18-1.717-0.539s-0.611-0.814-0.611-1.367c0-0.215,0.015-0.435,0.045-0.659c0.031-0.224,0.08-0.476,0.147-0.759 l0.761-2.688c0.067-0.258,0.125-0.503,0.171-0.731c0.046-0.23,0.068-0.441,0.068-0.633c0-0.342-0.071-0.582-0.212-0.717 c-0.143-0.135-0.412-0.201-0.813-0.201c-0.196,0-0.398,0.029-0.605,0.09c-0.205,0.063-0.383,0.12-0.529,0.176l0.201-0.828 c0.498-0.203,0.975-0.377,1.43-0.521c0.455-0.146,0.885-0.218,1.29-0.218c0.731,0,1.295,0.178,1.692,0.53 c0.395,0.353,0.594,0.812,0.594,1.376c0,0.117-0.014,0.323-0.041,0.617c-0.027,0.295-0.078,0.564-0.152,0.811l-0.757,2.68 c-0.062,0.215-0.117,0.461-0.167,0.736c-0.049,0.275-0.073,0.485-0.073,0.626c0,0.356,0.079,0.599,0.239,0.728 c0.158,0.129,0.435,0.194,0.827,0.194c0.185,0,0.392-0.033,0.626-0.097c0.232-0.064,0.4-0.121,0.506-0.17L14.271,18.307z M14.137,7.429c-0.353,0.328-0.778,0.492-1.275,0.492c-0.496,0-0.924-0.164-1.28-0.492c-0.354-0.328-0.533-0.727-0.533-1.193 c0-0.465,0.18-0.865,0.533-1.196c0.356-0.332,0.784-0.497,1.28-0.497c0.497,0,0.923,0.165,1.275,0.497 c0.353,0.331,0.53,0.731,0.53,1.196C14.667,6.703,14.49,7.101,14.137,7.429z"})}),Tr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.2",opacity:"0.45"}),(0,l.jsx)("circle",{cx:"12",cy:"12",r:"4.6",fill:o,opacity:"0.9"}),(0,l.jsx)("circle",{cx:"12",cy:"2.6",r:"2.2",fill:i}),(0,l.jsx)("circle",{cx:"20.1",cy:"16.7",r:"2.2",fill:i}),(0,l.jsx)("circle",{cx:"3.9",cy:"16.7",r:"2.2",fill:i})]}),Mr=(0,l.jsx)("svg",{...er,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{ |
| 270 |
d:"M15,2 C16.6568542,2 18,3.34314575 18,5 L18,19 C18,20.6568542 16.6568542,22 15,22 L9,22 C7.34314575,22 6,20.6568542 6,19 L6,5 C6,3.34314575 7.34314575,2 9,2 L15,2 Z M15,4 L9,4 C8.44771525,4 8,4.44771525 8,5 L8,19 C8,19.5522847 8.44771525,20 9,20 L15,20 C15.5522847,20 16,19.5522847 16,19 L16,5 C16,4.44771525 15.5522847,4 15,4 Z M3,6 C3.55228475,6 4,6.44771525 4,7 L4,17 C4,17.5522847 3.55228475,18 3,18 C2.44771525,18 2,17.5522847 2,17 L2,7 C2,6.44771525 2.44771525,6 3,6 Z M21,6 C21.5522847,6 22,6.44771525 22,7 L22,17 C22,17.5522847 21.5522847,18 21,18 C20.4477153,18 20,17.5522847 20,17 L20,7 C20,6.44771525 20.4477153,6 21,6 Z"})}),Nr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 44 44",children:[(0,l.jsx)("path",{fillRule:"evenodd",fill:"url(#lottieLogoGradient)",d:"M3.252 0A3.252 3.252 0 000 3.252v37.496A3.252 3.252 0 003.252 44h36.887a3.252 3.252 0 003.252-3.252V3.252A3.252 3.252 0 0040.139 0H3.252zM34.9 11.165c.176-1.208-.646-2.33-1.837-2.509-4.495-.674-8.754 3.376-13.297 12.148-3.567 6.888-6.775 10.35-8.96 10.186-1.2-.09-2.245.824-2.334 2.04-.088 1.217.813 2.277 2.013 2.367 4.423.331 8.625-3.822 13.14-12.539 3.535-6.827 6.693-10.147 8.801-9.83 1.19.177 2.298-.656 2.474-1.864z"}),(0,l.jsxs)("linearGradient",{id:"lottieLogoGradient",x1:-13.485,y1:25.573,x2:28.352,y2:52.389,gradientUnits:"userSpaceOnUse",children:[(0,l.jsx)("stop",{stopColor:i}),(0,l.jsx)("stop",{offset:1,stopColor:o})]})]}),Lr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 512 512",children:[(0,l.jsx)("path",{d:"M10.688,95.156C80.958,154.667,204.26,259.365,240.5,292.01c4.865,4.406,10.083,6.646,15.5,6.646 c5.406,0,10.615-2.219,15.469-6.604c36.271-32.677,159.573-137.385,229.844-196.896c4.375-3.698,5.042-10.198,1.5-14.719 C494.625,69.99,482.417,64,469.333,64H42.667c-13.083,0-25.292,5.99-33.479,16.438C5.646,84.958,6.313,91.458,10.688,95.156z"}),(0,l.jsx)("path",{d:"M505.813,127.406c-3.781-1.76-8.229-1.146-11.375,1.542C416.51,195.01,317.052,279.688,285.76,307.885 c-17.563,15.854-41.938,15.854-59.542-0.021c-33.354-30.052-145.042-125-208.656-178.917c-3.167-2.688-7.625-3.281-11.375-1.542 C2.417,129.156,0,132.927,0,137.083v268.25C0,428.865,19.135,448,42.667,448h426.667C492.865,448,512,428.865,512,405.333 v-268.25C512,132.927,509.583,129.146,505.813,127.406z"})]}),Er=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M13 3.5h7a1 1 0 0 1 0 2h-7a1 1 0 0 1 0-2zm0 7h7a1 1 0 0 1 0 2h-7a1 1 0 0 1 0-2zm0 7h7a1 1 0 0 1 0 2h-7a1 1 0 0 1 0-2z",opacity:"0.45"}),(0,l.jsx)("path",{d:"M6.5 2.6a1 1 0 0 1 1 1v16.8a1 1 0 0 1-2 0V3.6a1 1 0 0 1 1-1z",opacity:"0.35"}),(0,l.jsx)("circle",{cx:"6.5",cy:"11.5",r:"3.4",fill:o}),(0,l.jsx)("circle",{cx:"6.5",cy:"4.5",r:"1.8",fill:i}),(0,l.jsx)("circle",{cx:"6.5",cy:"19.5",r:"1.8",fill:i})]}),Pr=(0,l.jsx)("svg",{...er,viewBox:"0 0 448 512",children:(0,l.jsx)("path",{d:"M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Ar=(0,l.jsxs)("svg",{...er,viewBox:"0 0 512 512",children:[(0,l.jsx)("path",{d:"M294.416 447.644l56.28-62.302-47.401-27.367-25.815 79.891c-3.315 10.257 9.71 17.777 16.936 9.778zM496.995 77.21c-14.349-8.284-32.696-3.368-40.981 10.981l-15 25.981 51.962 30 15-25.981c8.284-14.349 3.368-32.696-10.981-40.981zM316.008 330.686l80-138.56 51.96 30-80 138.56zM411.011 166.145l15-25.98 51.96 30-15 25.98zM302 0H55C24.624 0 0 24.624 0 55v25h302zM131.607 225.393l19.199 19.199L179 207c6-8 18-8 24 0l33 44v-80H76v88.787l34.393-34.394c5.858-5.858 15.356-5.858 21.214 0z"}),(0,l.jsx)("path",{d:"M97.213 281h47.574L121 257.213zM172.234 266.021L187.213 281H221l-30-40zM432 69.786V55c0-30.376-24.624-55-55-55h-45v80h94.103z"}),(0,l.jsx)("path",{d:"M380.317 397.305l-63.64 70.449C309.074 476.172 298.301 481 287.126 481h-.001c-12.838 0-25.024-6.214-32.599-16.622A39.56 39.56 0 01248.197 451H61c-8.284 0-15-6.716-15-15s6.716-15 15-15h190.402l12.925-40H61c-8.284 0-15-6.716-15-15s6.716-15 15-15h213.021l4.102-12.695a44.94 44.94 0 013.849-8.663L408.782 110H0v347c0 30.376 24.624 55 55 55h322c30.376 0 55-24.624 55-55V309.785l-46.104 79.855a45.037 45.037 0 01-5.579 7.665zM46 156c0-8.284 6.716-15 15-15h190c8.284 0 15 6.716 15 15v140c0 8.284-6.716 15-15 15H61c-8.284 0-15-6.716-15-15z"})]}),Br=(0,l.jsxs)("svg",{...er,viewBox:"-25 0 512 512.00078",children:[(0,l.jsx)("path",{d:"M 266.4375 104.960938 L 322.957031 104.960938 L 236.449219 13.957031 L 236.449219 74.855469 C 236.449219 91.351562 249.828125 104.960938 266.4375 104.960938 Z M 266.4375 104.960938"}),(0,l.jsx)("path",{d:"M 172.667969 334.488281 L 72.433594 334.488281 C 67.359375 334.488281 63.207031 330.339844 63.207031 325.261719 C 63.207031 320.1875 67.359375 316.035156 72.433594 316.035156 L 178.78125 316.035156 C 184.660156 301.042969 192.503906 288.351562 202.195312 275.664062 L 72.433594 275.664062 C 67.359375 275.664062 63.207031 271.515625 63.207031 266.4375 C 63.207031 261.363281 67.359375 257.210938 72.433594 257.210938 L 219.726562 257.210938 C 247.40625 232.988281 284.085938 217.535156 324.109375 217.535156 C 327.914062 217.535156 331.03125 217.878906 335.644531 218.226562 L 335.644531 123.414062 L 266.4375 123.414062 C 239.679688 123.414062 217.996094 101.5 217.996094 74.855469 L 217.996094 0 L 41.0625 0 C 18.222656 0 0 18.683594 0 41.636719 L 0 393.660156 C 0 416.613281 18.222656 434.835938 41.0625 434.835938 L 180.046875 434.835938 C 172.089844 416.382812 167.707031 395.621094 167.707031 373.9375 C 167.589844 360.328125 169.4375 347.175781 172.667969 334.488281 Z M 72.433594 199.539062 L 189.277344 199.539062 C 194.351562 199.539062 198.503906 203.691406 198.503906 208.769531 C 198.503906 213.84375 194.351562 217.996094 189.277344 217.996094 L 72.433594 217.996094 C 67.359375 217.996094 63.207031 213.84375 63.207031 208.769531 C 63.207031 203.691406 67.359375 199.539062 72.433594 199.539062 Z M 72.433594 199.539062"}),(0,l.jsx)("path",{d:"M 323.992188 236.335938 C 247.984375 236.335938 186.160156 298.15625 186.160156 374.167969 C 186.160156 450.175781 247.984375 512 323.992188 512 C 400.003906 512 461.828125 450.175781 461.828125 374.167969 C 461.828125 298.15625 400.003906 236.335938 323.992188 236.335938 Z M 323.765625 364.25 C 351.5625 364.25 374.050781 386.855469 374.050781 414.535156 C 374.050781 439.449219 355.945312 460.097656 332.183594 464.132812 L 332.183594 477.511719 C 332.183594 482.589844 328.03125 486.742188 322.957031 486.742188 C 317.882812 486.742188 313.730469 482.589844 313.730469 477.511719 L 313.730469 463.789062 C 290.777344 459.058594 273.476562 438.757812 273.476562 414.535156 C 273.476562 409.460938 277.628906 405.308594 282.703125 405.308594 C 287.777344 405.308594 291.929688 409.460938 291.929688 414.535156 C 291.929688 432.070312 306.234375 446.371094 323.765625 446.371094 C 341.296875 446.371094 355.597656 432.066406 355.597656 414.535156 C 355.597656 397.003906 341.296875 382.703125 323.765625 382.703125 C 295.96875 382.703125 273.476562 360.09375 273.476562 332.414062 C 273.476562 308.074219 290.777344 287.777344 313.730469 283.164062 L 313.730469 273.359375 C 313.730469 268.28125 317.882812 264.128906 322.957031 264.128906 C 328.03125 264.128906 332.183594 268.28125 332.183594 273.359375 L 332.183594 282.699219 C 355.945312 286.738281 374.050781 307.382812 374.050781 332.296875 C 374.050781 337.371094 369.902344 341.523438 364.824219 341.523438 C 359.75 341.523438 355.597656 337.371094 355.597656 332.296875 C 355.597656 315.457031 342.449219 301.617188 325.839844 300.464844 C 324.917969 300.808594 323.878906 300.925781 322.839844 300.925781 C 321.917969 300.925781 321.109375 300.808594 320.1875 300.578125 C 304.269531 302.308594 291.816406 315.804688 291.816406 332.296875 C 291.929688 349.945312 306.230469 364.25 323.765625 364.25 Z M 323.765625 364.25"})]}),Ir=(0,l.jsx)("svg",{...er,viewBox:"0 0 34 34",children:(0,l.jsx)("path",{ |
| 271 |
transform:"translate(-1094.000000, -2938.000000)",d:"M1118.5,2938.0001 C1119.881,2938.0001 1121,2939.1191 1121,2940.5001 L1121,2940.5001 L1121,2969.5001 C1121,2970.8801 1119.881,2972.0001 1118.5,2972.0001 L1118.5,2972.0001 L1103.5,2972.0001 C1102.12,2972.0001 1101,2970.8801 1101,2969.5001 L1101,2969.5001 L1101,2940.5001 C1101,2939.1191 1102.12,2938.0001 1103.5,2938.0001 L1103.5,2938.0001 Z M1118.5,2939.0001 L1103.5,2939.0001 C1102.673,2939.0001 1102,2939.6731 1102,2940.5001 L1102,2940.5001 L1102,2969.5001 C1102,2970.3271 1102.673,2971.0001 1103.5,2971.0001 L1103.5,2971.0001 L1118.5,2971.0001 C1119.327,2971.0001 1120,2970.3271 1120,2969.5001 L1120,2969.5001 L1120,2940.5001 C1120,2939.6731 1119.327,2939.0001 1118.5,2939.0001 L1118.5,2939.0001 Z M1125.23077,2942 C1126.75754,2942 1128,2943.29615 1128,2944.88889 L1128,2944.88889 L1128,2965.11111 C1128,2966.70385 1126.75754,2968 1125.23077,2968 L1125.23077,2968 L1123,2968 L1123,2967.03704 L1125.23077,2967.03704 C1126.24892,2967.03704 1127.07692,2966.17326 1127.07692,2965.11111 L1127.07692,2965.11111 L1127.07692,2944.88889 C1127.07692,2943.82674 1126.24892,2942.96296 1125.23077,2942.96296 L1125.23077,2942.96296 L1123,2942.96296 L1123,2942 Z M1099,2942 L1099,2942.96296 L1096.76923,2942.96296 C1095.75108,2942.96296 1094.92308,2943.82674 1094.92308,2944.88889 L1094.92308,2944.88889 L1094.92308,2965.11111 C1094.92308,2966.17326 1095.75108,2967.03704 1096.76923,2967.03704 L1096.76923,2967.03704 L1099,2967.03704 L1099,2968 L1096.76923,2968 C1095.24246,2968 1094,2966.70385 1094,2965.11111 L1094,2965.11111 L1094,2944.88889 C1094,2943.29615 1095.24246,2942 1096.76923,2942 L1096.76923,2942 L1099,2942 Z M1116.6436,2962.4107 C1117.4726,2962.4107 1118.1436,2963.0817 1118.1436,2963.9107 C1118.1436,2964.7397 1117.4726,2965.4107 1116.6436,2965.4107 L1116.6436,2965.4107 L1106.0266,2965.4107 C1105.1976,2965.4107 1104.5266,2964.7397 1104.5266,2963.9107 C1104.5266,2963.0817 1105.1976,2962.4107 1106.0266,2962.4107 L1106.0266,2962.4107 Z M1115.6434,2955.9249 C1115.9204,2955.9249 1116.1434,2956.1489 1116.1434,2956.4249 C1116.1434,2956.7009 1115.9204,2956.9249 1115.6434,2956.9249 L1115.6434,2956.9249 L1105.0264,2956.9249 C1104.7504,2956.9249 1104.5264,2956.7009 1104.5264,2956.4249 C1104.5264,2956.1489 1104.7504,2955.9249 1105.0264,2955.9249 L1105.0264,2955.9249 Z M1110.3354,2952.2164 C1110.6114,2952.2164 1110.8354,2952.4404 1110.8354,2952.7164 C1110.8354,2952.9924 1110.6114,2953.2164 1110.3354,2953.2164 L1110.3354,2953.2164 L1105.0264,2953.2164 C1104.7504,2953.2164 1104.5264,2952.9924 1104.5264,2952.7164 C1104.5264,2952.4404 1104.7504,2952.2164 1105.0264,2952.2164 L1105.0264,2952.2164 Z M1114.7064,2948.2579 C1114.9824,2948.2579 1115.2064,2948.4819 1115.2064,2948.7579 C1115.2064,2949.0339 1114.9824,2949.2579 1114.7064,2949.2579 L1114.7064,2949.2579 L1105.0264,2949.2579 C1104.7504,2949.2579 1104.5264,2949.0339 1104.5264,2948.7579 C1104.5264,2948.4819 1104.7504,2948.2579 1105.0264,2948.2579 L1105.0264,2948.2579 Z M1116.8594,2944.2022 C1117.1354,2944.2022 1117.3594,2944.4262 1117.3594,2944.7022 C1117.3594,2944.9782 1117.1354,2945.2022 1116.8594,2945.2022 L1116.8594,2945.2022 L1105.0264,2945.2022 C1104.7504,2945.2022 1104.5264,2944.9782 1104.5264,2944.7022 C1104.5264,2944.4262 1104.7504,2944.2022 1105.0264,2944.2022 L1105.0264,2944.2022 Z"})}),Or=(0,l.jsxs)("svg",{...er,viewBox:"0 0 512 512",children:[(0,l.jsx)("path",{d:"m30 30h53.857v-30h-83.857v83.857h30z"}),(0,l.jsx)("path",{d:"m428.143 0v30h53.857v53.857h30v-83.857z"}),(0,l.jsx)("path",{d:"m30 428.143h-30v83.857h83.857v-30h-53.857z"}),(0,l.jsx)("path",{d:"m482 482h-53.857v30h83.857v-83.857h-30z"}),(0,l.jsx)("path",{d:"m68.857 236.571h167.714v-167.714h-167.714zm30-137.714h107.714v107.714h-107.714z"}),(0,l.jsx)("path",{d:"m443.143 275.429h-167.714v167.714h167.714zm-137.714 30h107.714v38.857h-68.856v68.856h-38.857v-107.713zm68.857 107.714v-38.856h38.856v38.856z"}),(0,l.jsx)("path",{d:"m206.571 344.286h-38.857v-68.857h-98.857v167.714h167.714v-152.714h-30zm0 68.857h-107.714v-107.714h38.857v68.857h68.857z"}),(0,l.jsx)("path",{d:"m137.714 137.714h30v30h-30z"}),(0,l.jsx)("path",{d:"m305.429 98.857h38.857v68.856h68.856v38.857h-137.705v30h167.705v-167.713h-167.713v98.643h30zm68.857 0h38.856v38.856h-38.856z"})]}),Rr=(0,l.jsx)("svg",{...er,viewBox:"0 0 20 20",children:(0,l.jsx)("path",{d:"M12.5 4v5.2h-5V4H5v13h2.5v-5.2h5V17H15V4"})}),zr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 512.013 512.013",children:[(0,l.jsx)("path",{ |
| 272 |
d:"m469.481 127.589h-5.19c-3.068-10.775-7.354-21.113-12.802-30.887l3.689-3.69c4.221-4.219 6.544-9.846 6.544-15.845s-2.323-11.625-6.547-15.849l-24.58-24.551c-4.221-4.247-9.855-6.585-15.865-6.585-6.009 0-11.644 2.338-15.844 6.564l-3.685 3.685c-9.781-5.465-20.123-9.759-30.891-12.826v-5.189c.001-12.36-10.054-22.416-22.415-22.416h-34.752c-12.36 0-22.416 10.056-22.416 22.416v5.189c-10.766 3.066-21.114 7.361-30.915 12.83l-3.668-3.668c-4.223-4.247-9.857-6.585-15.866-6.584-6.009 0-11.643 2.339-15.843 6.564l-24.575 24.576c-4.221 4.219-6.544 9.846-6.544 15.845s2.323 11.625 6.543 15.844l3.688 3.689c-5.471 9.804-9.759 20.144-12.81 30.888h-5.209c-12.36 0-22.416 10.056-22.416 22.416v34.782c0 12.36 10.056 22.416 22.416 22.416h5.209c3.051 10.743 7.339 21.083 12.81 30.888l-3.688 3.689c-4.221 4.219-6.544 9.846-6.544 15.845 0 5.998 2.323 11.625 6.543 15.844l24.556 24.556c4.221 4.247 9.854 6.585 15.863 6.585h.001c6.009 0 11.644-2.338 15.845-6.564l3.688-3.689c9.811 5.474 20.159 9.763 30.915 12.813v5.207c0 12.36 10.056 22.416 22.416 22.416h34.752c12.36 0 22.416-10.056 22.416-22.416v-5.207c10.759-3.051 21.099-7.338 30.891-12.809l3.664 3.664c4.221 4.247 9.855 6.585 15.864 6.585 6.01 0 11.645-2.339 15.841-6.56l24.608-24.581c4.22-4.22 6.543-9.847 6.543-15.845 0-5.999-2.323-11.625-6.543-15.844l-3.69-3.69c5.448-9.774 9.733-20.112 12.802-30.887h5.19c12.36 0 22.416-10.056 22.416-22.416v-34.782c.001-12.36-10.054-22.416-22.415-22.416zm-125.17 184.787c0 1.31-1.106 2.416-2.416 2.416h-34.752c-1.31 0-2.416-1.106-2.416-2.416v-12.983-63.043c0-4.182-2.602-7.922-6.522-9.376-26.872-9.966-44.926-35.828-44.926-64.354 0-22.607 11.257-43.799 30.107-56.684.846-.578 1.594-1.05 2.248-1.437-.036 1.3-.128 2.536-.177 3.181-.075 1.015-.135 1.816-.135 2.611v47.197c0 21.663 16.927 39.755 38.534 41.188.441.029.883.029 1.324 0 21.592-1.432 38.506-19.524 38.506-41.188v-47.197c0-.791-.059-1.587-.133-2.596-.048-.648-.14-1.891-.175-3.197.652.386 1.396.857 2.239 1.434 18.855 12.888 30.112 34.08 30.112 56.687 0 28.523-18.044 54.386-44.9 64.355-3.919 1.455-6.52 5.194-6.52 9.375v63.043 12.984zm127.586-127.589c0 1.287-1.129 2.416-2.416 2.416h-12.954c-4.672 0-8.722 3.235-9.753 7.792-3.167 13.993-8.652 27.225-16.303 39.328-2.498 3.952-1.924 9.108 1.382 12.414l9.185 9.185c.596.596.685 1.322.685 1.702 0 .379-.089 1.106-.682 1.698l-24.629 24.602c-.563.566-1.226.685-1.682.685-.455 0-1.117-.119-1.701-.707l-9.185-9.185c-3.311-3.31-8.472-3.88-12.424-1.376-8.536 5.409-17.622 9.701-27.109 12.873v-43.213c31.024-14.438 51.42-45.901 51.42-80.383 0-29.217-14.515-56.581-38.825-73.198-3.724-2.545-15.049-10.288-24.954-4.587-9.726 5.6-8.757 18.727-8.344 24.333.036.487.071.896.079 1.125v47.197c0 10.946-8.366 20.123-19.168 21.178-10.817-1.056-19.196-10.233-19.196-21.178l-.001-47.125c.009-.301.045-.71.081-1.199.417-5.603 1.394-18.723-8.324-24.326-9.901-5.711-21.243 2.035-24.974 4.582-24.312 16.618-38.826 43.982-38.826 73.199 0 34.487 20.407 65.952 51.448 80.386v43.21c-9.489-3.172-18.586-7.466-27.147-12.878-1.646-1.04-3.498-1.547-5.341-1.547-2.583 0-5.145.999-7.074 2.929l-9.204 9.205c-.563.567-1.226.686-1.682.686s-1.117-.119-1.701-.706l-24.576-24.577c-.597-.596-.686-1.323-.686-1.702 0-.38.089-1.106.686-1.703l9.184-9.185c3.306-3.306 3.88-8.462 1.382-12.414-7.69-12.167-13.174-25.393-16.299-39.311-1.024-4.565-5.078-7.81-9.757-7.81h-12.982c-1.287 0-2.416-1.129-2.416-2.416v-34.782c0-1.31 1.106-2.416 2.416-2.416h12.982c4.679 0 8.732-3.245 9.757-7.81 3.125-13.918 8.608-27.145 16.299-39.311 2.498-3.952 1.924-9.108-1.382-12.414l-9.185-9.185c-.596-.596-.685-1.322-.685-1.702s.089-1.106.686-1.703l24.597-24.598c.563-.566 1.225-.685 1.681-.685s1.118.119 1.702.706l9.184 9.185c3.308 3.307 8.464 3.88 12.415 1.382 12.151-7.682 25.392-13.177 39.351-16.33 4.56-1.03 7.797-5.081 7.797-9.754v-12.953c0-1.31 1.106-2.416 2.416-2.416h34.752c1.31 0 2.416 1.106 2.416 2.416v12.955c0 4.674 3.237 8.724 7.796 9.754 13.972 3.156 27.198 8.648 39.313 16.325 3.953 2.504 9.113 1.934 12.424-1.376l9.205-9.206c.563-.566 1.226-.685 1.681-.685.456 0 1.118.119 1.706.71l24.602 24.573c.596.596.685 1.322.685 1.702s-.089 1.106-.686 1.703l-9.184 9.185c-3.306 3.306-3.88 8.462-1.382 12.414 7.65 12.103 13.136 25.334 16.303 39.328 1.031 4.557 5.081 7.792 9.753 7.792h12.954c1.31 0 2.416 1.106 2.416 2.416v34.781z"}),(0,l.jsx)("path",{d:"m382.786 440.321c-3.905 3.905-3.905 10.237 0 14.143 1.953 1.952 4.512 2.929 7.071 2.929s5.118-.977 7.071-2.929l.028-.028c3.905-3.905 3.891-10.223-.015-14.128s-10.25-3.89-14.155.013z"}),(0,l.jsx)("path",{d:"m429.112 343.45-79.391 40.771c-6.73-6.97-16.16-11.318-26.591-11.318h-54.396c-3.046 0-3.79-.242-3.84-.259-.441-.232-1.835-1.542-2.954-2.594l-.496-.466c-44.008-41.427-81.183-38.802-123.458-22.118-6.84 2.7-6.972 2.706-13.841 2.999l-12.3.009c-3.504-10.571-13.476-18.221-25.207-18.221h-39.996c-14.627 0-26.526 11.913-26.526 26.555v104.969c0 14.626 11.899 26.526 26.526 26.526h39.996c11.73 0 21.701-7.641 25.206-18.199h22.5c1.987 0 1.987 0 4.298.651.84.237 1.862.525 3.182.88l103.494 27.688c4.562 1.232 8.746 2.445 12.793 3.617 13.26 3.842 24.406 7.072 36.023 7.072 13.13 0 26.859-4.126 44.916-16.16.087-.058.174-.118.26-.179l19.758-14.089c4.497-3.207 5.543-9.451 2.336-13.948-3.207-4.498-9.453-5.543-13.947-2.336l-19.627 13.995c-26.204 17.429-37.331 14.207-64.153 6.435-4.132-1.197-8.404-2.435-13.165-3.721l-103.502-27.689c-1.212-.326-2.163-.594-2.943-.814-3.776-1.064-5.188-1.4-9.722-1.4h-21.152v-81.624h10.807c.144 0 .286-.003.43-.009l.57-.024c8.383-.358 10.728-.587 20.33-4.378 37.129-14.652 65.789-16.393 102.419 18.09l.495.465c6.26 5.883 9.865 8.279 20.491 8.279h54.396c6.384 0 11.951 3.544 14.853 8.765.031.058.067.113.099.171 1.296 2.397 2.034 5.139 2.034 8.051 0 9.351-7.619 16.958-16.985 16.958h-88.157c-5.522 0-10 4.477-10 10s4.478 10 10 10h88.157c20.394 0 36.985-16.579 36.985-36.958 0-2.77-.316-5.466-.896-8.063l79.028-40.585c7.48-3.84 17.708-3.428 22.786 4.812 4.492 7.263 2.021 16.917-5.744 22.453l-34.667 24.69c-4.499 3.204-5.549 9.448-2.345 13.947 1.951 2.739 5.029 4.2 8.154 4.2 2.007 0 4.033-.603 5.792-1.855l34.671-24.693c16.466-11.739 21.258-32.917 11.156-49.248-9.934-16.122-30.972-21.324-48.94-12.1zm-335.92 120.327c0 3.538-3.001 6.526-6.554 6.526h-39.996c-3.538 0-6.526-2.989-6.526-6.526v-104.968c0-3.614 2.928-6.555 6.526-6.555h39.996c3.553 0 6.554 3.001 6.554 6.555z"})]}),Dr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 20 20",children:[(0,l.jsx)("path",{fillRule:"evenodd",d:"M22.53,4.33V19.68A31.08,31.08,0,0,0,12,17.76,31.08,31.08,0,0,0,1.43,19.68V4.33A31.08,31.08,0,0,0,12,6.25,31.08,31.08,0,0,0,22.53,4.33Z"}),(0,l.jsx)("rect",{width:"2",height:"2",x:"9.002",y:"13",rx:"1"}),(0,l.jsx)("path",{d:"M9.1 7.995a.905.905 0 111.8 0l-.35 3.507a.553.553 0 01-1.1 0L9.1 7.995z"})]}),Fr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("circle",{cx:"7",cy:"18",r:"1"}),(0,l.jsx)("path",{d:"m7.707 12.293c.391.391.391 1.023 0 1.414-.195.195-.451.293-.707.293s-.512-.098-.707-.293l-3-3c-.391-.391-.391-1.023 0-1.414l3-3c.391-.391 1.023-.391 1.414 0s.391 1.023 0 1.414l-2.293 2.293z"}),(0,l.jsx)("circle",{cx:"12",cy:"18",r:"1"}),(0,l.jsx)("circle",{cx:"17",cy:"18",r:"1"}),(0,l.jsx)("path",{d:"m20.707 10.707-3 3c-.195.195-.451.293-.707.293s-.512-.098-.707-.293c-.391-.391-.391-1.023 0-1.414l2.293-2.293-2.293-2.293c-.391-.391-.391-1.023 0-1.414s1.023-.391 1.414 0l3 3c.391.391.391 1.023 0 1.414z"}),(0,l.jsx)("path",{d:"m21 24h-18c-1.654 0-3-1.346-3-3v-18c0-1.654 1.346-3 3-3h18c1.654 0 3 1.346 3 3v18c0 1.654-1.346 3-3 3zm-18-22c-.552 0-1 .449-1 1v18c0 .551.448 1 1 1h18c.552 0 1-.449 1-1v-18c0-.551-.448-1-1-1z"})]}),Hr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 490 490",children:[(0,l.jsx)("path",{d:"M245,490c135.31,0,245-109.69,245-245C490,109.69,380.31,0,245,0S0,109.69,0,245C0,380.31,109.69,490,245,490z M245,30.625 c118.207,0,214.375,96.168,214.375,214.375S363.207,459.375,245,459.375S30.625,363.207,30.625,245S126.793,30.625,245,30.625z"}),(0,l.jsx)("path",{ |
| 273 |
d:"M137.499,304.69c15.674,0,29.948-6.083,40.611-16l78.128,36.678c-0.583,3.341-0.904,6.771-0.904,10.276 c0,32.913,26.782,59.695,59.695,59.695c32.913,0,59.695-26.782,59.695-59.695c0-32.913-26.782-59.695-59.695-59.695 c-18.454,0-34.978,8.422-45.937,21.621l-74.543-34.995c1.717-5.561,2.646-11.464,2.646-17.581c0-4.942-0.615-9.741-1.753-14.337 l75.93-35.646c10.906,11.704,26.437,19.043,43.657,19.043c32.913,0,59.695-26.782,59.695-59.695 c0-32.913-26.782-59.695-59.695-59.695c-32.913,0-59.695,26.782-59.695,59.695c0,4.681,0.559,9.232,1.583,13.606l-76.295,35.817 c-10.876-11.376-26.181-18.484-43.123-18.484c-32.913,0-59.695,26.782-59.695,59.695S104.586,304.69,137.499,304.69z M315.028,306.574c16.03,0,29.07,13.04,29.07,29.07c0,16.03-13.04,29.07-29.07,29.07c-16.03,0-29.07-13.04-29.07-29.07 C285.958,319.614,298.998,306.574,315.028,306.574z M315.028,125.291c16.03,0,29.07,13.039,29.07,29.07 c0,16.03-13.04,29.07-29.07,29.07c-16.03,0-29.07-13.04-29.07-29.07C285.958,138.331,298.998,125.291,315.028,125.291z M137.499,215.925c16.03,0,29.07,13.04,29.07,29.07s-13.039,29.07-29.07,29.07s-29.07-13.04-29.07-29.07 S121.468,215.925,137.499,215.925z"})]}),Wr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 473.931 473.931",children:[(0,l.jsx)("circle",{cx:"236.966",cy:"236.966",r:"236.966"}),(0,l.jsx)("path",{fill:"#FFC50B",d:"M100.174,228.419c-0.228-0.67-0.797-1.156-1.489-1.257l-23.768-3.454l-10.634-21.538\r c-0.614-1.253-2.69-1.253-3.304,0l-10.634,21.538l-23.76,3.454c-0.696,0.101-1.272,0.587-1.489,1.257\r c-0.213,0.67-0.037,1.399,0.468,1.886l17.197,16.763l-4.056,23.67c-0.123,0.692,0.161,1.388,0.73,1.8s1.325,0.468,1.946,0.142\r l21.253-11.177l21.261,11.177c0.269,0.142,0.561,0.21,0.861,0.21c0.382,0,0.76-0.116,1.081-0.352\r c0.561-0.412,0.849-1.111,0.722-1.8l-4.052-23.67l17.197-16.763C100.212,229.819,100.388,229.086,100.174,228.419z"}),(0,l.jsx)("path",{fill:"#FFC50B",d:"M187.339,228.419c-0.221-0.67-0.797-1.156-1.489-1.257l-23.76-3.454l-10.634-21.538\r c-0.614-1.253-2.69-1.253-3.304,0l-10.634,21.538l-23.76,3.454c-0.696,0.101-1.272,0.587-1.489,1.257\r c-0.217,0.67-0.037,1.399,0.468,1.886l17.197,16.763l-4.064,23.67c-0.109,0.692,0.168,1.388,0.73,1.8\r c0.576,0.412,1.328,0.468,1.946,0.142l21.261-11.177l21.253,11.177c0.269,0.142,0.569,0.21,0.861,0.21\r c0.389,0,0.767-0.116,1.089-0.352c0.561-0.412,0.849-1.111,0.722-1.8l-4.056-23.67l17.197-16.763\r C187.376,229.819,187.559,229.086,187.339,228.419z"}),(0,l.jsx)("path",{fill:"#FFC50B",d:"M275.409,228.419c-0.221-0.67-0.797-1.156-1.489-1.257l-23.76-3.454l-10.634-21.538\r c-0.614-1.253-2.69-1.253-3.304,0l-10.634,21.538l-23.756,3.454c-0.696,0.101-1.272,0.587-1.489,1.257\r c-0.217,0.67-0.045,1.399,0.468,1.886l17.197,16.763l-4.064,23.67c-0.116,0.692,0.168,1.388,0.73,1.8\r c0.569,0.412,1.328,0.468,1.946,0.142l21.261-11.177l21.261,11.177c0.262,0.142,0.561,0.21,0.857,0.21\r c0.382,0,0.767-0.116,1.081-0.352c0.561-0.412,0.857-1.111,0.73-1.8l-4.056-23.67l17.197-16.763\r C275.446,229.819,275.629,229.086,275.409,228.419z"}),(0,l.jsx)("path",{fill:"#FFC50B",d:"M360.822,228.419c-0.213-0.67-0.789-1.156-1.482-1.257l-23.76-3.454l-10.634-21.538\r c-0.621-1.253-2.69-1.253-3.304,0l-10.634,21.538l-23.76,3.454c-0.703,0.101-1.272,0.587-1.489,1.257\r c-0.217,0.67-0.045,1.399,0.46,1.886l17.205,16.763l-4.064,23.67c-0.116,0.692,0.161,1.388,0.73,1.8s1.325,0.468,1.946,0.142\r l21.261-11.177l21.253,11.177c0.269,0.142,0.561,0.21,0.861,0.21c0.382,0,0.76-0.116,1.081-0.352c0.561-0.412,0.849-1.111,0.73-1.8\r l-4.056-23.67l17.197-16.763C360.855,229.819,361.039,229.086,360.822,228.419z"}),(0,l.jsx)("path",{fill:"#fff",d:"M447.997,228.419c-0.221-0.67-0.804-1.156-1.489-1.257l-23.768-3.454l-10.634-21.538\r c-0.614-1.253-2.683-1.253-3.304,0l-10.627,21.538l-23.768,3.454c-0.696,0.101-1.272,0.587-1.489,1.257\r c-0.217,0.67-0.037,1.399,0.468,1.886l17.197,16.763l-4.056,23.67c-0.116,0.692,0.161,1.388,0.73,1.8s1.325,0.468,1.938,0.142\r l21.261-11.177l21.261,11.177c0.269,0.142,0.561,0.21,0.861,0.21c0.382,0,0.76-0.116,1.081-0.352\r c0.561-0.412,0.849-1.111,0.722-1.8l-4.049-23.67l17.19-16.763C448.035,229.819,448.21,229.086,447.997,228.419z"})]}),Ur=(0,l.jsx)("svg",{...er,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"m18.85 10.39 1.06-1.06c.78-.78.78-2.05 0-2.83L18.5 5.09c-.78-.78-2.05-.78-2.83 0l-1.06 1.06 4.24 4.24zm-4.24 1.42L7.41 19H6v-1.41l7.19-7.19 1.42 1.41zm-1.42-4.25L4 16.76V21h4.24l9.19-9.19-4.24-4.25zM19 17.5c0 2.19-2.54 3.5-5 3.5-.55 0-1-.45-1-1s.45-1 1-1c1.54 0 3-.73 3-1.5 0-.47-.48-.87-1.23-1.2l1.48-1.48c1.07.63 1.75 1.47 1.75 2.68zM4.58 13.35C3.61 12.79 3 12.06 3 11c0-1.8 1.89-2.63 3.56-3.36C7.59 7.18 9 6.56 9 6c0-.41-.78-1-2-1-1.26 0-1.8.61-1.83.64-.35.41-.98.46-1.4.12a.992.992 0 0 1-.15-1.38C3.73 4.24 4.76 3 7 3s4 1.32 4 3c0 1.87-1.93 2.72-3.64 3.47C6.42 9.88 5 10.5 5 11c0 .31.43.6 1.07.86l-1.49 1.49z"})}),Gr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 237.1 300",children:[(0,l.jsx)("path",{d:"M117.9,0c14.1-0.7,27.3,7.4,32.3,20.7c8.7,1.2,21.6-2.4,28.5,3.4c2.1,4.7,0.4,10.3,0.8,15.4c16.5,0.7,35.7-4.4,48.7,8.6 c11.9,12,8.1,29.6,8.7,44.9c0,41.7,0,83.4,0,125.1c0,15.4,0,30.8,0,46.1c2.1,27.1-15.3,38-40.6,35.8c-45.5,0-90.9,0-136.4,0.1 c-17.5-1.1-37.9,4.5-52-8.8c-9.1-9.7-7.4-23-7.6-35.3c0-13.2,0-26.3,0-39.5c0-41.5,0-83.1,0-124.6c-1.1-22.5-0.1-50.5,28.7-52.4 c9.6,0,19.3,0,28.9,0.1c0.2-4.7-1.3-12.6,1-15.9c7.8-4.8,18.8-1.4,27.7-2.3C90.3,7.8,104.2-0.8,117.9,0z M102.3,21.9 c-2.2,3.3-3.3,7-4.6,10.7c-4.7,5.9-18,2.1-25.2,3.4c0,9.3,0,18.5,0,28.1c30.5,0,61,0,92.4,0c0-9.3,0-18.5,0-28.1 c-8-0.9-18,1.8-24.8-2c-1.7-1.8-2.2-3.1-2.9-5.5C133,12.5,112.1,8.8,102.3,21.9z M18.6,59.9c-5,7.2-2.9,16-3.3,24.2 c0,12.2,0,24.5,0,36.7c0,38.6,0,77.1,0,115.7c1.3,11.6-3.3,35.6,3.3,43.9c5,5,11.7,5,18.3,4.8c12.2,0,24.4,0,36.6,0 c34,0,68,0,102,0.1c14.3-1.5,31.3,4.3,43.4-5.1c5.8-8.6,1.7-20.4,2.9-30.2c0-44.1,0-88.2,0-132.3c0-11.5,0-23.1,0-34.6 c-0.4-8.8,1.8-18.2-4.9-25c-8.7-7.5-26.2-2.7-37.4-4c-0.8,9.3,3.4,26.6-11.4,24.6c-19.8,0.1-39.5,0.1-59.3,0.1 c-11.9,0-23.7,0-35.6,0.1c-9.9,0.1-9.9,0.1-13.6-2.6c-2.9-6.9-1-14.9-1.8-22.2C44.9,55.3,28.6,49.4,18.6,59.9z"}),(0,l.jsx)("path",{d:"M193.2,135h-81.4c-4.4,0-7.9-3.5-7.9-7.9v0c0-4.4,3.5-7.9,7.9-7.9h81.4c4.4,0,7.9,3.5,7.9,7.9v0 C201.1,131.5,197.5,135,193.2,135z"}),(0,l.jsx)("path",{d:"M193.2,190.8h-81.4c-4.4,0-7.9-3.5-7.9-7.9v0c0-4.4,3.5-7.9,7.9-7.9h81.4c4.4,0,7.9,3.5,7.9,7.9v0 C201.1,187.3,197.5,190.8,193.2,190.8z"}),(0,l.jsx)("path",{d:"M193.2,246.6h-81.4c-4.4,0-7.9-3.5-7.9-7.9v0c0-4.4,3.5-7.9,7.9-7.9h81.4c4.4,0,7.9,3.5,7.9,7.9v0 C201.1,243.1,197.5,246.6,193.2,246.6z"}),(0,l.jsx)("path",{d:"M40.2,131.9c-2.5-2.5-2.5-6.6,0-9.1l0,0c2.5-2.5,6.6-2.5,9.1,0l7.7,7.7c0.4,0.4,1.1,0.4,1.5,0l22.2-22.2 c2.5-2.5,6.6-2.5,9.1,0l0,0c2.5,2.5,2.5,6.6,0,9.1l-29.3,29.3c-1.5,1.5-3.9,1.5-5.5,0L40.2,131.9z"}),(0,l.jsx)("path",{d:"M40.2,187.7c-2.5-2.5-2.5-6.6,0-9.1l0,0c2.5-2.5,6.6-2.5,9.1,0l7.7,7.7c0.4,0.4,1.1,0.4,1.5,0l22.2-22.2 c2.5-2.5,6.6-2.5,9.1,0l0,0c2.5,2.5,2.5,6.6,0,9.1l-29.3,29.3c-1.5,1.5-3.9,1.5-5.5,0L40.2,187.7z"}),(0,l.jsx)("path",{d:"M40.2,243.5c-2.5-2.5-2.5-6.6,0-9.1l0,0c2.5-2.5,6.6-2.5,9.1,0l7.7,7.7c0.4,0.4,1.1,0.4,1.5,0l22.2-22.2 c2.5-2.5,6.6-2.5,9.1,0l0,0c2.5,2.5,2.5,6.6,0,9.1l-29.3,29.3c-1.5,1.5-3.9,1.5-5.5,0L40.2,243.5z"})]}),Vr=(0,l.jsx)("svg",{...er,viewBox:"0 0 505.4 505.4",children:(0,l.jsx)("path",{ |
| 274 |
d:"M437.1,233.45c14.8-10.4,24.6-27.7,24.6-47.2c0-31.9-25.8-57.7-57.7-57.7c-31.9,0-57.7,25.8-57.7,57.7 c0,19.5,9.7,36.8,24.6,47.2c-12.7,4.4-24.3,11.2-34.1,20c-13.5-11.5-29.4-20.3-46.8-25.5c21.1-12.8,35.3-36.1,35.3-62.6 c0-40.4-32.7-73.1-73.1-73.1c-40.4,0-73.1,32.8-73.1,73.1c0,26.5,14.1,49.8,35.3,62.6c-17.2,5.2-32.9,13.9-46.3,25.2 c-9.8-8.6-21.2-15.3-33.7-19.6c14.8-10.4,24.6-27.7,24.6-47.2c0-31.9-25.8-57.7-57.7-57.7s-57.7,25.8-57.7,57.7 c0,19.5,9.7,36.8,24.6,47.2C28.5,247.25,0,284.95,0,329.25v6.6c0,0.2,0.2,0.4,0.4,0.4h122.3c-0.7,5.5-1.1,11.2-1.1,16.9v6.8 c0,29.4,23.8,53.2,53.2,53.2h155c29.4,0,53.2-23.8,53.2-53.2v-6.8c0-5.7-0.4-11.4-1.1-16.9H505c0.2,0,0.4-0.2,0.4-0.4v-6.6 C505.2,284.85,476.8,247.15,437.1,233.45z M362.3,186.15c0-23,18.7-41.7,41.7-41.7s41.7,18.7,41.7,41.7 c0,22.7-18.3,41.2-40.9,41.7c-0.3,0-0.5,0-0.8,0s-0.5,0-0.8,0C380.5,227.45,362.3,208.95,362.3,186.15z M194.9,165.35 c0-31.5,25.6-57.1,57.1-57.1s57.1,25.6,57.1,57.1c0,30.4-23.9,55.3-53.8,57c-1.1,0-2.2,0-3.3,0c-1.1,0-2.2,0-3.3,0 C218.8,220.65,194.9,195.75,194.9,165.35z M59.3,186.15c0-23,18.7-41.7,41.7-41.7s41.7,18.7,41.7,41.7c0,22.7-18.3,41.2-40.9,41.7 c-0.3,0-0.5,0-0.8,0s-0.5,0-0.8,0C77.6,227.45,59.3,208.95,59.3,186.15z M125.5,320.15H16.2c4.5-42.6,40.5-76,84.2-76.3 c0.2,0,0.4,0,0.6,0s0.4,0,0.6,0c20.8,0.1,39.8,7.8,54.5,20.3C141.7,279.75,131,298.95,125.5,320.15z M366.8,359.95 c0,20.5-16.7,37.2-37.2,37.2h-155c-20.5,0-37.2-16.7-37.2-37.2v-6.8c0-62.1,49.6-112.9,111.3-114.7c1.1,0.1,2.3,0.1,3.4,0.1 s2.3,0,3.4-0.1c61.7,1.8,111.3,52.6,111.3,114.7V359.95z M378.7,320.15c-5.5-21.1-16-40-30.3-55.6c14.8-12.8,34-20.5,55-20.7 c0.2,0,0.4,0,0.6,0s0.4,0,0.6,0c43.7,0.3,79.7,33.7,84.2,76.3H378.7z"})}),qr=(0,l.jsx)("svg",{...er,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M5.25 6C4.00736 6 3 7.00736 3 8.25V15.75C3 16.9926 4.00736 18 5.25 18H14.25C15.4926 18 16.5 16.9926 16.5 15.75V13.6013L19.7699 16.3262C19.9934 16.5125 20.3046 16.5526 20.5681 16.4292C20.8317 16.3058 21 16.041 21 15.75V8.25C21 7.95899 20.8317 7.69424 20.5681 7.57081C20.3046 7.44737 19.9934 7.48753 19.7699 7.67383L16.5 10.3987V8.25C16.5 7.00736 15.4926 6 14.25 6H5.25Z"})}),Yr=(0,l.jsx)("svg",{...er,version:"1.1",x:"0px",y:"0px",width:"46.47px",height:"46.47px",viewBox:"0 0 46.47 46.47",children:(0,l.jsx)("path",{d:"M3.445,6.322c0-3.423,2.777-6.201,6.201-6.201c3.423,0,6.2,2.777,6.2,6.201c0,3.426-2.777,6.203-6.2,6.203 C6.222,12.524,3.445,9.748,3.445,6.322z M31.562,6.322c0-3.423,2.78-6.201,6.203-6.201s6.201,2.777,6.201,6.201 c0,3.426-2.777,6.203-6.201,6.203C34.343,12.524,31.562,9.748,31.562,6.322z M46.223,31.72 C42.38,40.607,33.38,46.349,23.294,46.349c-10.301,0-19.354-5.771-23.064-14.703c-0.636-1.53,0.089-3.286,1.62-3.922 c0.376-0.155,0.766-0.229,1.15-0.229c1.176,0,2.292,0.696,2.771,1.851c2.777,6.685,9.655,11.004,17.523,11.004 c7.69,0,14.528-4.322,17.421-11.012c0.658-1.521,2.424-2.222,3.943-1.562C46.181,28.433,46.881,30.199,46.223,31.72z"})}),Kr=(0,l.jsx)("svg",{...er,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"m17.75 6v12c0 1.517-1.233 2.75-2.75 2.75h-6c-1.517 0-2.75-1.233-2.75-2.75v-12c0-1.517 1.233-2.75 2.75-2.75h6c1.517 0 2.75 1.233 2.75 2.75zm1.43-.74c.05.24.07.49.07.74v12c0 .25-.02.5-.07.74 1.44-.09 2.57-1.28 2.57-2.74v-8c0-1.46-1.13-2.65-2.57-2.74zm-14.36 0c-1.44.09-2.57 1.28-2.57 2.74v8c0 1.46 1.13 2.65 2.57 2.74-.05-.24-.07-.49-.07-.74v-12c0-.25.02-.5.07-.74z"})}),Qr=(0,l.jsx)("svg",{...er,viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M64 136C64 122.8 74.7 112 88 112L136 112C149.3 112 160 122.7 160 136L160 240L184 240C197.3 240 208 250.7 208 264C208 277.3 197.3 288 184 288L88 288C74.7 288 64 277.3 64 264C64 250.7 74.7 240 88 240L112 240L112 160L88 160C74.7 160 64 149.3 64 136zM94.4 365.2C105.8 356.6 119.7 352 134 352L138.9 352C172.6 352 200 379.4 200 413.1C200 432.7 190.6 451 174.8 462.5L150.8 480L184 480C197.3 480 208 490.7 208 504C208 517.3 197.3 528 184 528L93.3 528C77.1 528 64 514.9 64 498.7C64 489.3 68.5 480.5 76.1 475L146.6 423.7C150 421.2 152 417.3 152 413.1C152 405.9 146.1 400 138.9 400L134 400C130.1 400 126.3 401.3 123.2 403.6L102.4 419.2C91.8 427.2 76.8 425 68.8 414.4C60.8 403.8 63 388.8 73.6 380.8L94.4 365.2zM288 128L544 128C561.7 128 576 142.3 576 160C576 177.7 561.7 192 544 192L288 192C270.3 192 256 177.7 256 160C256 142.3 270.3 128 288 128zM288 288L544 288C561.7 288 576 302.3 576 320C576 337.7 561.7 352 544 352L288 352C270.3 352 256 337.7 256 320C256 302.3 270.3 288 288 288zM288 448L544 448C561.7 448 576 462.3 576 480C576 497.7 561.7 512 544 512L288 512C270.3 512 256 497.7 256 480C256 462.3 270.3 448 288 448z"})}),Zr=(0,l.jsx)("svg",{...er,height:"30",viewBox:"0 0 24 24",width:"30",children:(0,l.jsxs)("g",{id:"Layer_2","data-name":"Layer 2",children:[(0,l.jsx)("rect",{height:"11.5",rx:"1.25",width:"5.5",x:"1.25",y:"10.25"}),(0,l.jsx)("rect",{height:"15.5",rx:"1.25",width:"5.5",x:"9.25",y:"6.25"}),(0,l.jsx)("rect",{height:"19.5",rx:"1.25",width:"5.5",x:"17.25",y:"2.25"})]})}),Xr=(0,l.jsxs)("svg",{...er,width:"30",height:"30",viewBox:"0 0 20 20",children:[(0,l.jsx)("rect",{x:"0",fill:"none",width:"20",height:"20"}),(0,l.jsx)("g",{children:(0,l.jsx)("path",{d:"M4 3h12c.55 0 1.02.2 1.41.59S18 4.45 18 5v7c0 .55-.2 1.02-.59 1.41S16.55 14 16 14h-1l-5 5v-5H4c-.55 0-1.02-.2-1.41-.59S2 12.55 2 12V5c0-.55.2-1.02.59-1.41S3.45 3 4 3zm11 2H4v1h11V5zm1 3H4v1h12V8zm-3 3H4v1h9v-1z"})})]}),Jr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 102.05 102.05",children:[(0,l.jsx)("path",{d:"m76.97 21.58-19.76 19.76-2.67 7.74 7.75-2.66 19.76-19.76z"}),(0,l.jsx)("rect",{height:"5.28",rx:"2.12",width:"20.83",x:"22.51",y:"72.13"}),(0,l.jsx)("path",{d:"m81.58 15.87h5.17v7.19h-5.17z",transform:"matrix(.707 -.707 .707 .707 10.89 65.21)"}),(0,l.jsxs)("g",{children:[(0,l.jsx)("path",{d:"m76.18 43.76a2 2 0 0 0 -2 2v42h-61.49v-66h51.11a2 2 0 0 0 0-4h-53.11a2 2 0 0 0 -2 2v70a2 2 0 0 0 2 2h65.49a2 2 0 0 0 2-2v-44a2 2 0 0 0 -2-2z"}),(0,l.jsx)("path",{d:"m24.63 68.13a6.13 6.13 0 0 0 -6.12 6.12v1a6.13 6.13 0 0 0 6.12 6.12h16.59a6.13 6.13 0 0 0 6.12-6.12v-1a6.13 6.13 0 0 0 -6.12-6.12zm18.71 6.12v1a2.12 2.12 0 0 1 -2.12 2.12h-16.59a2.12 2.12 0 0 1 -2.12-2.12v-1a2.12 2.12 0 0 1 2.12-2.12h16.59a2.12 2.12 0 0 1 2.12 2.12z"}),(0,l.jsx)("path",{d:"m53 33.73a2 2 0 1 0 0-4h-32.49a2 2 0 0 0 -2 2v10.1a2 2 0 0 0 2 2h25.22a2 2 0 1 0 0-4h-23.22v-6.1z"}),(0,l.jsx)("path",{d:"m68.35 60.82v-5.33a2 2 0 0 0 -4 0v3.33h-41.84v-6.1h20.65a2 2 0 0 0 0-4h-22.65a2 2 0 0 0 -2 2v10.1a2 2 0 0 0 2 2h45.84a2 2 0 0 0 2-2z"}),(0,l.jsx)("path",{d:"m92.78 18.76-7.92-7.91a2 2 0 0 0 -2.82 0l-28 28a2.11 2.11 0 0 0 -.47.77l-4.14 12.04a2 2 0 0 0 .48 2.06 2 2 0 0 0 1.41.59 2.06 2.06 0 0 0 .68-.11l12-4.15a1.9 1.9 0 0 0 .76-.48l28-28a2 2 0 0 0 .02-2.81zm-30.49 27.66-7.75 2.66 2.67-7.74 19.79-19.76 5.08 5.08zm22.59-22.59-5.08-5.08 3.65-3.66 5.08 5.09z"})]})]}),el=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,l.jsx)("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"})]}),tl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2.5",fill:o,opacity:"0.12"}),(0,l.jsx)("rect",{x:"3",y:"3",width:"18",height:"5",rx:"2.5",fill:o}),(0,l.jsx)("circle",{cx:"6.5",cy:"12.5",r:"1.8",fill:o}),(0,l.jsx)("path",{d:"M5.7 12.6l0.6 0.7 1.4-1.5-0.6-0.5-0.8 0.9-0.2-0.2-0.4 0.6z",fill:"#ffffff"}),(0,l.jsx)("rect",{x:"9.6",y:"11.6",width:"8.8",height:"1.8",rx:"0.6",fill:o,opacity:"0.7"}),(0,l.jsx)("circle",{cx:"6.5",cy:"17",r:"1.8",fill:o}),(0,l.jsx)("path",{d:"M5.7 17.1l0.6 0.7 1.4-1.5-0.6-0.5-0.8 0.9-0.2-0.2-0.4 0.6z",fill:"#ffffff"}),(0,l.jsx)("rect",{x:"9.6",y:"16.1",width:"6.5",height:"1.8",rx:"0.6",fill:o,opacity:"0.7"})]}),nl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2.5",fill:o,opacity:"0.12" |
| 275 |
}),(0,l.jsx)("rect",{x:"4.5",y:"6",width:"4",height:"4",rx:"1",fill:o}),(0,l.jsx)("path",{d:"M5.2 8l0.7 0.8 1.6-1.7-0.7-0.6-0.9 1-0.3-0.3z",fill:"#ffffff"}),(0,l.jsx)("rect",{x:"10.5",y:"7",width:"8",height:"2",rx:"1",fill:o,opacity:"0.7"}),(0,l.jsx)("rect",{x:"4.5",y:"14",width:"4",height:"4",rx:"1",fill:o}),(0,l.jsx)("path",{d:"M5.2 16l0.7 0.8 1.6-1.7-0.7-0.6-0.9 1-0.3-0.3z",fill:"#ffffff"}),(0,l.jsx)("rect",{x:"10.5",y:"15",width:"8",height:"2",rx:"1",fill:o,opacity:"0.7"})]}),ol=(0,l.jsx)("svg",{...er,viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M342.6 105.4C330.1 92.9 309.8 92.9 297.3 105.4L137.3 265.4C124.8 277.9 124.8 298.2 137.3 310.7C149.8 323.2 170.1 323.2 182.6 310.7L320 173.3L457.4 310.6C469.9 323.1 490.2 323.1 502.7 310.6C515.2 298.1 515.2 277.8 502.7 265.3L342.7 105.3zM502.6 457.4L342.6 297.4C330.1 284.9 309.8 284.9 297.3 297.4L137.3 457.4C124.8 469.9 124.8 490.2 137.3 502.7C149.8 515.2 170.1 515.2 182.6 502.7L320 365.3L457.4 502.6C469.9 515.1 490.2 515.1 502.7 502.6C515.2 490.1 515.2 469.8 502.7 457.3z"})}),il=(0,l.jsx)("svg",{...er,viewBox:"0 0 512.006 512.006",children:(0,l.jsxs)("g",{children:[(0,l.jsx)("path",{d:"m324.174 93.201 3.882 14.489c2.144 8.002 10.366 12.75 18.371 10.607 8.002-2.144 12.75-10.369 10.606-18.371l-7.765-28.978c-2.145-8.002-10.368-12.751-18.371-10.607l-289.777 77.646c-3.843 1.03-7.119 3.544-9.108 6.989s-2.528 7.54-1.499 11.382l7.765 28.978c2.134 7.963 10.33 12.761 18.371 10.606 8.002-2.144 12.75-10.369 10.606-18.371l-3.882-14.489 86.934-23.294 54.352 202.844-14.489 3.883c-8.002 2.144-12.75 10.369-10.606 18.371s10.368 12.751 18.371 10.606l115.911-31.058c8.002-2.144 12.751-10.369 10.606-18.371-2.151-8.029-10.393-12.744-18.371-10.607l-14.489 3.882-54.352-202.843z"}),(0,l.jsx)("path",{d:"m461.803 367.785c-24.295-13.74-52.521-17.328-79.448-10.113l-228.143 60.595c-48.557 13.01-100.51-8.021-126.341-51.145-4.258-7.107-13.47-9.417-20.576-5.16-7.107 4.257-9.417 13.469-5.16 20.576 16.119 26.909 40.008 47.354 69.084 59.125 17.287 6.998 35.384 10.518 53.583 10.517 12.411 0 24.872-1.638 37.144-4.927l228.143-60.595c39.675-10.628 81.164 12.838 92.497 52.311 2.286 7.963 10.594 12.565 18.557 10.278 7.962-2.286 12.564-10.594 10.278-18.557-7.703-26.826-25.324-49.166-49.618-62.905z"})]})}),sl=(0,l.jsx)("svg",{...er,viewBox:"0 0 512 512",children:(0,l.jsx)("g",{id:"Layer_2_00000082364357583340289580000016949097236183363201_",children:(0,l.jsx)("g",{id:"Layer_copy_7",children:(0,l.jsxs)("g",{id:"_115",children:[(0,l.jsx)("path",{d:"m378.2 389.8h-244.4c-73.8 0-133.8-60-133.8-133.8s60-133.8 133.8-133.8h244.5c73.8 0 133.8 60 133.8 133.8s-60.1 133.8-133.9 133.8zm-244.4-248.5c-63.3.6-114.2 52.4-113.6 115.8.6 62.5 51.1 113 113.6 113.6h244.5c63.3-.6 114.2-52.4 113.6-115.8-.6-62.5-51.1-113-113.6-113.6z"}),(0,l.jsx)("path",{d:"m376.5 355.1c-54.7 0-99.1-44.3-99.1-99.1s44.3-99.1 99.1-99.1 99.1 44.3 99.1 99.1c-.1 54.7-44.4 99-99.1 99.1zm0-179.1c-44.2 0-80 35.8-80 80s35.8 80 80 80 80-35.8 80-80-35.8-80-80-80z"})]})})})}),al=(0,l.jsx)("svg",{...er,fill:"currentColor",viewBox:"0 0 16 16",id:"tabs",children:(0,l.jsx)("path",{d:"M14 4V2H0v12h16V4h-2zm-4-1h3v1h-3V3zM6 3h3v1H6V3zm9 10H1V3h4v2h10v8z"})}),rl=(0,l.jsx)("svg",{...er,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"m202.9 251.7-97.1-154.1c-1.5-2.3-4-3.7-6.8-3.7h-91c-6.3 0-10.1 7-6.8 12.3l94.4 149.8-94.4 149.8c-3.4 5.3.5 12.3 6.8 12.3h91c2.8 0 5.3-1.4 6.8-3.7l97.1-154.1c1.6-2.6 1.6-6 0-8.6zm-108.3 150.4h-72.1l89.3-141.8c1.6-2.6 1.6-5.9 0-8.5l-89.3-141.9h72.1l92 146.1zm262.2-150.4-97-154.1c-1.5-2.3-4-3.7-6.8-3.7h-91c-6.3 0-10.1 7-6.8 12.3l94.4 149.8-94.4 149.8c-3.4 5.3.5 12.3 6.8 12.3h91c2.8 0 5.3-1.4 6.8-3.7l97.1-154.1c1.6-2.6 1.6-6-.1-8.6zm-108.2 150.4h-72.1l89.3-141.8c1.6-2.6 1.6-5.9 0-8.5l-89.3-141.8h72.1l92 146.1zm262.2-150.4-97.1-154.1c-1.5-2.3-4-3.7-6.8-3.7h-91c-6.3 0-10.1 7-6.8 12.3l94.4 149.8-94.4 149.8c-3.4 5.3.5 12.3 6.8 12.3h91c2.8 0 5.3-1.4 6.8-3.7l97.1-154.1c1.6-2.6 1.6-6 0-8.6zm-108.3 150.4h-72.1l89.3-141.8c1.6-2.6 1.6-5.9 0-8.5l-89.3-141.8h72.1l92 146.1z"})}),ll=(0,l.jsx)("svg",{...er,viewBox:"42.5 101.81 427 308.39",children:(0,l.jsx)("g",{children:(0,l.jsx)("path",{d:"M42.5,149.249h23.722v142.335H42.5V149.249z M89.943,315.305h23.723V125.527H89.943V315.305z M137.389,339.027h237.223 V101.805H137.389V339.027z M398.334,315.305h23.723V125.527h-23.723V315.305z M445.778,149.249v142.335H469.5V149.249H445.778z M256,386.473c-6.557,0-11.861,5.281-11.861,11.861c0,6.531,5.305,11.861,11.861,11.861s11.861-5.33,11.861-11.861 C267.861,391.754,262.557,386.473,256,386.473z M184.834,386.473c-6.557,0-11.863,5.281-11.863,11.861 c0,6.531,5.307,11.861,11.863,11.861c6.555,0,11.86-5.33,11.86-11.861C196.694,391.754,191.389,386.473,184.834,386.473z M327.166,386.473c-6.555,0-11.86,5.281-11.86,11.861c0,6.531,5.306,11.861,11.86,11.861c6.557,0,11.863-5.33,11.863-11.861 C339.029,391.754,333.723,386.473,327.166,386.473z"})})}),cl=(0,l.jsxs)("svg",{...er,width:"1em",height:"1em",viewBox:"0 0 32 32",size:"24",children:[(0,l.jsx)("path",{fillRule:"evenodd",d:"M1.6 10.1a.033.033 0 0 0-.033.033v16.534c0 .018.015.033.033.033h24a.033.033 0 0 0 .033-.033V10.133a.033.033 0 0 0-.033-.033zm-1.033.033c0-.57.462-1.033 1.033-1.033h24c.57 0 1.033.463 1.033 1.033v16.534c0 .57-.462 1.033-1.033 1.033h-24c-.57 0-1.033-.463-1.033-1.033z",clipRule:"evenodd"}),(0,l.jsx)("path",{fillRule:"evenodd",d:"M2.167 7.467a.5.5 0 0 1 .5-.5h24c1.16 0 2.1.94 2.1 2.1v17.066a.5.5 0 1 1-1 0V9.067a1.1 1.1 0 0 0-1.1-1.1h-24a.5.5 0 0 1-.5-.5",clipRule:"evenodd"}),(0,l.jsx)("path",{fillRule:"evenodd",d:"M3.767 5.333a.5.5 0 0 1 .5-.5H27.2a3.7 3.7 0 0 1 3.7 3.7v16a.5.5 0 1 1-1 0v-16a2.7 2.7 0 0 0-2.7-2.7H4.267a.5.5 0 0 1-.5-.5",clipRule:"evenodd"})]}),dl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M3 4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H3zm0 2h18v12H3V6z"}),(0,l.jsx)("path",{d:"M3 4h9v16H3V4z",opacity:"0.85"}),(0,l.jsx)("path",{d:"M5.5 8h4v1.5h-4V8zm0 3h4v1.5h-4V11zm0 3h4v1.5h-4V14z",fill:"#ffffff"})]}),ul=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("circle",{cx:"4.5",cy:"12",r:"2.5"}),(0,l.jsx)("circle",{cx:"12",cy:"12",r:"2.5"}),(0,l.jsx)("circle",{cx:"19.5",cy:"12",r:"2.5",opacity:"0.55"}),(0,l.jsx)("path",{d:"M7.2 12h1.6v.6H7.2V12zm0-.6h1.6V12H7.2v-.6z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeDasharray:"1.6 1.4"}),(0,l.jsx)("path",{d:"M7 12h2.5",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,l.jsx)("path",{d:"M14.5 12H17",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeDasharray:"1.6 1.4",opacity:"0.7"}),(0,l.jsx)("text",{x:"4.5",y:"13.2",textAnchor:"middle",fontSize:"3.2",fontWeight:"700",fill:"#ffffff",children:"1"}),(0,l.jsx)("text",{x:"12",y:"13.2",textAnchor:"middle",fontSize:"3.2",fontWeight:"700",fill:"#ffffff",children:"2"}),(0,l.jsx)("text",{x:"19.5",y:"13.2",textAnchor:"middle",fontSize:"3.2",fontWeight:"700",fill:"#ffffff",opacity:"0.85",children:"3"})]}),pl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2",y:"7",width:"20",height:"10",rx:"3",fill:o,opacity:"0.9"}),(0,l.jsx)("circle",{cx:"7.5",cy:"12",r:"2.6",fill:"#fff"}),(0,l.jsx)("path",{d:"M6.6 10.7v2.6l2.3-1.3z",fill:o}),(0,l.jsx)("rect",{x:"12",y:"9.3",width:"1.4",height:"5.4",rx:"0.7",fill:"#fff",opacity:"0.95"}),(0,l.jsx)("rect",{x:"14.4",y:"10.6",width:"1.4",height:"2.8",rx:"0.7",fill:"#fff",opacity:"0.85"}),(0,l.jsx)("rect",{x:"16.8",y:"8.6",width:"1.4",height:"6.8",rx:"0.7",fill:"#fff",opacity:"0.95"}),(0,l.jsx)("rect",{x:"19.2",y:"10.2",width:"1.4",height:"3.6",rx:"0.7",fill:"#fff",opacity:"0.8"})]}),hl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M4 4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H4zm0 2h16v12H4V6z"}),(0,l.jsx)("path",{d:"M6 8h12v1.4H6V8zm0 3h12v1.4H6V11zm0 3h7v1.4H6V14z",opacity:"0.7"}),(0,l.jsx)("path",{d:"M13 14h5v1.4h-5V14z",opacity:"0.25" |
| 276 |
}),(0,l.jsx)("path",{d:"M12 21l-3.5-3.5h7L12 21z"})]}),gl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M3 4a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4zm2 0v3h14V4H5zm0 5v11h14V9H5z"}),(0,l.jsx)("circle",{cx:"6.5",cy:"5.5",r:"0.7",opacity:"0.6"}),(0,l.jsx)("circle",{cx:"8.7",cy:"5.5",r:"0.7",opacity:"0.6"}),(0,l.jsx)("circle",{cx:"10.9",cy:"5.5",r:"0.7",opacity:"0.6"}),(0,l.jsx)("path",{d:"M9.4 12.4l-2.6 2.6 2.6 2.6 1-1-1.6-1.6 1.6-1.6-1-1zm5.2 0l-1 1 1.6 1.6-1.6 1.6 1 1 2.6-2.6-2.6-2.6zm-2.1-0.4l-1.5 6.1 1.1 0.3 1.5-6.1-1.1-0.3z"})]}),ml=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M7.5 2h9A5.5 5.5 0 0 1 22 7.5v9A5.5 5.5 0 0 1 16.5 22h-9A5.5 5.5 0 0 1 2 16.5v-9A5.5 5.5 0 0 1 7.5 2zm0 2A3.5 3.5 0 0 0 4 7.5v9A3.5 3.5 0 0 0 7.5 20h9a3.5 3.5 0 0 0 3.5-3.5v-9A3.5 3.5 0 0 0 16.5 4h-9z"}),(0,l.jsx)("path",{d:"M12 7a5 5 0 1 1 0 10 5 5 0 0 1 0-10zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6z"}),(0,l.jsx)("circle",{cx:"17.3",cy:"6.7",r:"1.2"})]}),bl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M12 2C7.86 2 4.5 5.36 4.5 9.5c0 5.55 7 12 7.3 12.27a.3.3 0 0 0 .4 0C12.5 21.5 19.5 15.05 19.5 9.5 19.5 5.36 16.14 2 12 2zm0 18.06c-1.62-1.6-6-6.27-6-10.56A6 6 0 0 1 12 3.5a6 6 0 0 1 6 6c0 4.29-4.38 8.95-6 10.56z"}),(0,l.jsx)("circle",{cx:"12",cy:"9.5",r:"2.5"}),(0,l.jsx)("path",{d:"M5.6 14.4l-2.4 5.6h17.6l-2.4-5.6-1.4.6 1.8 4H4.6l1.8-4-1.4-.6z",opacity:"0.35"})]}),fl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M3 5a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2H5v12h1a1 1 0 0 1 0 2H4a1 1 0 0 1-1-1V5z",opacity:"0.85"}),(0,l.jsx)("path",{d:"M8 8h12v1.6H8V8zm0 3.4h12V13H8v-1.6zm0 3.4h8v1.6H8V14.8z",opacity:"0.55"}),(0,l.jsx)("path",{d:"M9.5 7.2C8.67 7.2 8 7.87 8 8.7v1.5c0 .83.67 1.5 1.5 1.5h.8c0 .83-.6 1.5-1.43 1.5V14.4c1.66 0 3-1.34 3-3V8.7c0-.83-.67-1.5-1.37-1.5H9.5zm5 0c-.83 0-1.5.67-1.5 1.5v1.5c0 .83.67 1.5 1.5 1.5h.8c0 .83-.6 1.5-1.43 1.5V14.4c1.66 0 3-1.34 3-3V8.7c0-.83-.67-1.5-1.37-1.5H14.5z"})]}),xl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 6.82666 6.82666",children:[(0,l.jsxs)("g",{fillRule:"nonzero",children:[(0,l.jsx)("path",{d:"m3.533.962028v4.906662h-.21333v-4.906662z"}),(0,l.jsx)("path",{d:"m4.03509 3.393.395.395 1.19472-1.19472.15083.15083-1.27014 1.27014-.07541.07542-.07542-.07542-.47042-.47042z"}),(0,l.jsx)("path",{d:"m4.03509 5.10953.395.395 1.19472-1.19472.15083.15083-1.27014 1.27014-.07541.07542-.07542-.07542-.47042-.47042z"}),(0,l.jsx)("path",{d:"m1.37758 5.57994 1.27014-1.27013.15084.15083-1.27014 1.27014z"}),(0,l.jsx)("path",{d:"m2.64772 5.73078-1.27014-1.27014.15084-.15083 1.27014 1.27013z"}),(0,l.jsx)("path",{d:"m4.03509 1.68227.395.395 1.19472-1.194719.15083.150839-1.27014 1.27013-.07541.07542-.07542-.07542-.47042-.47041z"}),(0,l.jsx)("path",{d:"m1.20185 1.68227.395.395 1.19472-1.194719.15084.150839-1.27014 1.27013-.07542.07542-.07542-.07542-.47041-.47041z"}),(0,l.jsx)("path",{d:"m1.20185 3.393.395.395 1.19472-1.19472.15084.15083-1.27014 1.27014-.07542.07542-.07542-.07542-.47041-.47042z"})]}),(0,l.jsx)("path",{d:"m0 0h6.827v6.827h-6.827z",fill:"none"})]}),yl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"3",y:"4",width:"18",height:"2",rx:"1",opacity:"0.35",fill:o}),(0,l.jsx)("rect",{x:"3",y:"11",width:"7",height:"2",rx:"1",fill:o}),(0,l.jsx)("rect",{x:"14",y:"11",width:"7",height:"2",rx:"1",fill:o}),(0,l.jsx)("circle",{cx:"12",cy:"12",r:"2.2",fill:o}),(0,l.jsx)("rect",{x:"3",y:"18",width:"18",height:"2",rx:"1",opacity:"0.35",fill:o})]}),vl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2",y:"3",width:"20",height:"18",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,l.jsx)("rect",{x:"2.8",y:"3.8",width:"18.4",height:"16.4",rx:"1.4",fill:o,opacity:"0.12"}),(0,l.jsx)("rect",{x:"8",y:"8",width:"8",height:"1.6",rx:"0.4",fill:o,opacity:"0.55"}),(0,l.jsx)("rect",{x:"5",y:"10.6",width:"14",height:"2.6",rx:"0.5",fill:o}),(0,l.jsx)("rect",{x:"6.5",y:"14.2",width:"11",height:"1.4",rx:"0.4",fill:o,opacity:"0.5"}),(0,l.jsx)("rect",{x:"8",y:"17",width:"3.8",height:"2.2",rx:"0.8",fill:o}),(0,l.jsx)("rect",{x:"12.3",y:"17",width:"3.8",height:"2.2",rx:"0.8",fill:"none",stroke:o,strokeWidth:"1.2"})]}),kl=(0,l.jsx)("svg",{...er,width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),wl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6",opacity:"0.5"}),(0,l.jsx)("rect",{x:"3.5",y:"5.5",width:"8",height:"13",rx:"1",fill:o,opacity:"0.85"}),(0,l.jsx)("path",{d:"M5 13l1.8-2.2 1.4 1.7 1.6-2.4L11 13z",fill:"#fff",opacity:"0.9"}),(0,l.jsx)("circle",{cx:"6.4",cy:"8.6",r:"1",fill:"#fff",opacity:"0.9"}),(0,l.jsx)("rect",{x:"13.5",y:"7",width:"7",height:"1.6",rx:"0.8",fill:o,opacity:"0.5"}),(0,l.jsx)("rect",{x:"13.5",y:"10.4",width:"7",height:"1.4",rx:"0.7",fill:o,opacity:"0.35"}),(0,l.jsx)("rect",{x:"13.5",y:"13.4",width:"5",height:"1.4",rx:"0.7",fill:o,opacity:"0.35"})]}),_l=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2.5",y:"4",width:"8.5",height:"16",rx:"1.4",fill:o,opacity:"0.85"}),(0,l.jsx)("rect",{x:"13",y:"4",width:"8.5",height:"16",rx:"1.4",fill:o,opacity:"0.55"}),(0,l.jsx)("rect",{x:"4.3",y:"7",width:"4.2",height:"2.6",rx:"0.6",fill:"#fff",opacity:"0.95"}),(0,l.jsx)("rect",{x:"4.3",y:"11.2",width:"5",height:"1.1",rx:"0.55",fill:"#fff",opacity:"0.8"}),(0,l.jsx)("rect",{x:"14.8",y:"7",width:"4.2",height:"2.6",rx:"0.6",fill:"#fff",opacity:"0.95"}),(0,l.jsx)("rect",{x:"14.8",y:"11.2",width:"5",height:"1.1",rx:"0.55",fill:"#fff",opacity:"0.8"})]}),Cl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2.5",y:"5",width:"19",height:"14",rx:"2",fill:o,opacity:"0.12"}),(0,l.jsx)("rect",{x:"2.5",y:"5",width:"8.5",height:"14",rx:"2",fill:o,opacity:"0.85"}),(0,l.jsx)("rect",{x:"13",y:"7.4",width:"6.6",height:"1.7",rx:"0.85",fill:o,opacity:"0.75"}),(0,l.jsx)("rect",{x:"13",y:"10.6",width:"6.6",height:"1.4",rx:"0.7",fill:o,opacity:"0.45"}),(0,l.jsx)("rect",{x:"13",y:"13.2",width:"5",height:"1.4",rx:"0.7",fill:o,opacity:"0.45"}),(0,l.jsx)("rect",{x:"13",y:"16",width:"3.6",height:"1.8",rx:"0.9",fill:o,opacity:"0.85"})]}),jl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M6 2.5h7l5 5v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2z",fill:o,opacity:"0.85"}),(0,l.jsx)("path",{d:"M13 2.5l5 5h-4a1 1 0 0 1-1-1z",fill:"#fff",opacity:"0.55"}),(0,l.jsx)("path",{d:"M11 9.5v4m0 0l-2-2m2 2l2-2",fill:"none",stroke:"#fff",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("rect",{x:"7.5",y:"16",width:"7",height:"1.6",rx:"0.8",fill:"#fff",opacity:"0.9"})]}),$l=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2.5", |
| 277 |
fill:"none",stroke:"currentColor",strokeWidth:"1.4",opacity:"0.4"}),(0,l.jsx)("path",{d:"M3 9h18",stroke:"currentColor",strokeWidth:"1.4",opacity:"0.4"}),(0,l.jsx)("path",{d:"M8 3v3M16 3v3",stroke:o,strokeWidth:"1.6",strokeLinecap:"round"}),(0,l.jsx)("rect",{x:"6",y:"12",width:"5",height:"5",rx:"1",fill:o}),(0,l.jsx)("path",{d:"M13 13h5M13 16h3",stroke:i,strokeWidth:"1.4",strokeLinecap:"round",opacity:"0.6"})]}),Sl=(0,l.jsx)("svg",{...er,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M13.5 2h-12l-.5.5v11l.5.5h12l.5-.5v-11l-.5-.5zM2 3h11v1H2V3zm7 4H6V5h3v2zm0 1v2H6V8h3zM2 5h3v2H2V5zm0 3h3v2H2V8zm0 5v-2h3v2H2zm4 0v-2h3v2H6zm7 0h-3v-2h3v2zm0-3h-3V8h3v2zm-3-3V5h3v2h-3z"})}),Tl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M12 3v18",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",opacity:"0.45"}),(0,l.jsx)("circle",{cx:"12",cy:"6.5",r:"2.6",fill:o}),(0,l.jsx)("circle",{cx:"12",cy:"12",r:"2.6",fill:o,opacity:"0.75"}),(0,l.jsx)("circle",{cx:"12",cy:"17.5",r:"2.6",fill:o,opacity:"0.55"}),(0,l.jsx)("rect",{x:"1.5",y:"4.5",width:"7",height:"4",rx:"1",fill:"currentColor",opacity:"0.35"}),(0,l.jsx)("rect",{x:"15.5",y:"10",width:"7",height:"4",rx:"1",fill:"currentColor",opacity:"0.35"}),(0,l.jsx)("rect",{x:"1.5",y:"15.5",width:"7",height:"4",rx:"1",fill:"currentColor",opacity:"0.35"})]}),Ml=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M19 3v18",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",opacity:"0.45"}),(0,l.jsx)("circle",{cx:"19",cy:"12",r:"2.8",fill:o}),(0,l.jsx)("rect",{x:"2",y:"8",width:"12",height:"8",rx:"1.5",fill:"currentColor",opacity:"0.35"}),(0,l.jsx)("path",{d:"M14 12l2.2 0",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",opacity:"0.45"})]}),Nl=e=>{const t="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,n="undefined"!=typeof bBlocksDisabledBlocks&&bBlocksDisabledBlocks||[],o=wn.includes(e);return!(!t&&o||n.includes(e))};Nl(g.name)&&(0,p.registerBlockType)(g,{icon:tr,edit:Ja,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{}),variations:[{isDefault:!0}]});const Ll=JSON.parse('{"apiVersion":3,"name":"b-blocks/row","title":"Row","description":"Implement row and column layout.","category":"bBlocks","keywords":["row","columns","multi columns"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"layout":{"type":"object","default":{"type":"flex","desktop":{"direction":"row","justify":"","alignItems":"","columnGap":"","wrap":"wrap","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""},"tablet":{"direction":"","justify":"","alignItems":"","columnGap":"","wrap":"","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""},"mobile":{"direction":"","justify":"","alignItems":"","columnGap":"","wrap":"","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""}}},"columns":{"type":"number"},"columnGap":{"type":"string","default":"0px"},"heightType":{"type":"string","default":"auto"},"height":{"type":"string","default":"0px"},"columnPositionY":{"type":"string","default":"center"},"columnPositionX":{"type":"string","default":"center"},"overflow":{"type":"string","default":"hidden"},"background":{"type":"object","default":{"color":""}},"padding":{"type":"object","default":{"vertical":"0px","horizontal":"0px"}},"border":{"type":"object","default":{}},"shadow":{"type":"object","default":{}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"providesContext":{"b-blocks/rowColumns":"columns","b-blocks/rowColumnGap":"columnGap"},"supports":{"align":["wide","full"],"html":false,"interactivity":{"clientNavigation":true}},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),El="bBlocksColumn",{getBlocks:Pl,getBlockAttributes:Al}=(0,f.select)("core/block-editor"),{updateBlockAttributes:Bl}=(0,f.dispatch)("core/block-editor"),Il=e=>parseInt(e.match(/\d+/g)[0]),Ol=e=>parseFloat(e.toFixed(2)),Rl=[50,50],zl=[100,100],Dl=[100,100,100],Fl=[{label:"100",columns:1,layout:{desktop:[100],tablet:[100],mobile:[100]}},{label:"50/50",columns:2,layout:{desktop:[50,50],tablet:zl,mobile:zl}},{label:"34/66",columns:2,layout:{desktop:[34,66],tablet:zl,mobile:zl}},{label:"66/34",columns:2,layout:{desktop:[66,34],tablet:zl,mobile:zl}},{label:"33.33/33.33/33.34",columns:3,layout:{desktop:[33.33,33.33,33.34],tablet:[50,50,50],mobile:Dl}},{label:"25/25/50",columns:3,layout:{desktop:[25,25,50],tablet:[...Rl,100],mobile:Dl}},{label:"50/25/25",columns:3,layout:{desktop:[50,25,25],tablet:[100,...Rl],mobile:Dl}},{label:"25/50/25",columns:3,layout:{desktop:[25,50,25],tablet:Dl,mobile:Dl}},{label:"16.66/66.68/16.66",columns:3,layout:{desktop:[16.66,66.68,16.66],tablet:Dl,mobile:Dl}},{label:"25/25/25/25",columns:4,layout:{desktop:[25,25,25,25],tablet:[50,50,50,50],mobile:[100,100,100,100]}},{label:"20/20/20/20/20",columns:5,layout:{desktop:[20,20,20,20,20],tablet:[33.33,33.33,33.34,50,50],mobile:[50,50,50,50,100]}},{label:"16.66/16.67/16.67/16.67/16.67/16.66",columns:6,layout:{desktop:[16.66,16.67,16.67,16.67,16.67,16.66],tablet:[33.33,33.33,33.34,33.33,33.33,33.34],mobile:[50,50,50,50,50,50]}}],Hl=((0,x.__)("Auto","b-blocks"),(0,x.__)("Hidden","b-blocks"),(0,x.__)("Visible","b-blocks"),(0,x.__)("Default","b-blocks"),(0,x.__)("Top","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Bottom","b-blocks"),(0,x.__)("Baseline","b-blocks"),(0,x.__)("Stretch","b-blocks"),(0,x.__)("Default","b-blocks"),(0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Right","b-blocks"),(0,x.__)("Space Between","b-blocks"),(0,x.__)("Space Around","b-blocks"),(0,x.__)("Space Evenly","b-blocks"),(0,x.__)("Stretch","b-blocks"),{dimension:["padding","margin","maxWidth","maxHeight"],transform:!0,background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],mask:!0,animation:!0, |
| 278 |
visibility:["zIndex","overflow"],responsive:!0,css:!0}),Wl=(e,o,i=!1)=>{const{layout:s={},columns:a,columnGap:r,height:l,columnPositionY:c,columnPositionX:d,overflow:u,background:p,padding:h,border:g,shadow:m,advanced:b}=e,f=i?`#${o} > div > div`:`#${o} > div`,x=i?`${f} >.block-editor-inner-blocks >.block-editor-block-list__layout`:f,y=e=>`\n\t\t${na("justify-content",s?.[e]?.justify)}\n\t\t${na("align-items",s?.[e]?.alignItems)}\n\t\t${na("flex-direction",s?.[e]?.direction)}\n\t\t${(e=>{const t=["column-reverse","column"].includes(s?.[e]?.direction),n=s?.[e]?.wrap;return t?na("flex-wrap","nowrap"):`${na("flex-wrap",n)} ${na("align-content","nowrap"!==s?.[e]?.wrap||""!==s?.[e]?.wrap?s?.[e]?.alignContent:"")}`})(e)}\n\t`;return`\n\t\t${f}{\n\t\t\t${na("overflow",u)}\n\t\t\t${na("padding",ua(h))}\n\t\t\t${na("box-shadow",da(m))}\n\t\t\t${oa(p)}\n\t\t\t${ia(g)}\n\t\t}\n\t\t${x}{\n\t\t\t${na("gap",r)}\n\t\t\t${na("min-height",l)}\n\t\t\t${na("align-items",c)}\n\t\t\t${na("align-content",d)}\n\t\t\t${"flex"===s.type?y("desktop"):""}\n\t\t}\n\t\t${t}{\n\t\t\t${x}{\n\t\t\t\t${na("gap",s?.tablet?.columnGap)}\n\t\t\t\t${"flex"===s.type?y("tablet"):""}\n\t\t\t}\n\t\t}\n\n\t\t${n}{\n\t\t\t${x}{\n\t\t\t\t${na("gap",s?.mobile?.columnGap)}\n\t\t\t\t${"flex"===s.type?y("mobile"):""}\n\t\t\t}\n\t\t}\n\n\t\t${a>0?Ca(o,b,i):""}\n\t`.replace(/\s+/g," ")},Ul=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z"})}),Gl=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z"})}),Vl=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M297.4 566.6C309.9 579.1 330.2 579.1 342.7 566.6L502.7 406.6C515.2 394.1 515.2 373.8 502.7 361.3C490.2 348.8 469.9 348.8 457.4 361.3L352 466.7L352 96C352 78.3 337.7 64 320 64C302.3 64 288 78.3 288 96L288 466.7L182.6 361.3C170.1 348.8 149.8 348.8 137.3 361.3C124.8 373.8 124.8 394.1 137.3 406.6L297.3 566.6z"})}),ql=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M342.6 81.4C330.1 68.9 309.8 68.9 297.3 81.4L137.3 241.4C124.8 253.9 124.8 274.2 137.3 286.7C149.8 299.2 170.1 299.2 182.6 286.7L288 181.3L288 552C288 569.7 302.3 584 320 584C337.7 584 352 569.7 352 552L352 181.3L457.4 286.7C469.9 299.2 490.2 299.2 502.7 286.7C515.2 274.2 515.2 253.9 502.7 241.4L342.7 81.4z"})}),Yl=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Flex-Start-Fill--Streamline-Sharp-Fill-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M2 22V2h1.5v20H2Zm11.25 -5.25v-9.5h2.5v9.5h-2.5Zm-6 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),Kl=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Center--Streamline-Sharp-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{fill:"currentColor",d:"M11.25 22V2h1.5v20h-1.5Zm3 -5.25v-9.5h2.5v9.5h-2.5Zm-7 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),Ql=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Flex-End--Streamline-Sharp-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{fill:"currentColor",d:"M20.5 22V2h1.5v20h-1.5ZM14.25 16.75v-9.5h2.5v9.5h-2.5Zm-6 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),Zl=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Space-Between-Fill--Streamline-Sharp-Fill-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M20.5 22V16.75h-2.5v-9.5h2.5V2h1.5v20h-1.5ZM2 22V2h1.5v5.25h2.5v9.5H3.5V22H2Z",strokeWidth:"0.5"})}),Xl=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Space-Around-Fill--Streamline-Sharp-Fill-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M20.5 22V2h1.5v20h-1.5ZM2 22V2h1.5v20H2Zm13.25 -5.25v-9.5h2.5v9.5h-2.5Zm-9 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),Jl=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Space-Even-Fill--Streamline-Sharp-Fill-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M20.5 22V2h1.5v20h-1.5ZM2 22V2h1.5v20H2Zm12.25 -5.25v-9.5h2.5v9.5h-2.5Zm-7 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),ec=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),tc=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),nc=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),oc=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Items-Stretch--Streamline-Rounded-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M8 17.75c-0.2125 0 -0.3906 -0.0719 -0.53425 -0.21575C7.3219 17.3906 7.25 17.2125 7.25 17V7c0 -0.2125 0.0719 -0.39065 0.21575 -0.5345 0.14365 -0.14365 0.32175 -0.2155 0.53425 -0.2155h1c0.2125 0 0.39065 0.07185 0.5345 0.2155 0.14365 0.14385 0.2155 0.322 0.2155 0.5345v10c0 0.2125 -0.07185 0.3906 -0.2155 0.53425 -0.14385 0.14385 -0.322 0.21575 -0.5345 0.21575h-1Zm7 0c-0.2125 0 -0.3906 -0.0719 -0.53425 -0.21575C14.3219 17.3906 14.25 17.2125 14.25 17V7c0 -0.2125 0.0719 -0.39065 0.21575 -0.5345 0.14365 -0.14365 0.32175 -0.2155 0.53425 -0.2155h1c0.2125 0 0.39065 0.07185 0.5345 0.2155 0.14365 0.14385 0.2155 0.322 0.2155 0.5345v10c0 0.2125 -0.07185 0.3906 -0.2155 0.53425 -0.14385 0.14385 -0.322 0.21575 -0.5345 0.21575h-1ZM2.75 22c-0.2125 0 -0.390585 -0.07235 -0.53425 -0.217C2.071915 21.6385 2 21.45935 2 21.2455c0 -0.21365 0.071915 -0.39135 0.21575 -0.533C2.359415 20.57085 2.5375 20.5 2.75 20.5h18.5c0.2125 0 0.39065 0.07235 0.5345 0.217 0.14365 0.1445 0.2155 0.32365 0.2155 0.5375 0 0.21365 -0.07185 0.39135 -0.2155 0.533 -0.14385 0.14165 -0.322 0.2125 -0.5345 0.2125h-18.5Zm0 -18.5c-0.2125 0 -0.390585 -0.072335 -0.53425 -0.217C2.071915 3.1385 2 2.959335 2 2.7455c0 -0.213665 0.071915 -0.391335 0.21575 -0.533C2.359415 2.070835 2.5375 2 2.75 2h18.5c0.2125 0 0.39065 0.072335 0.5345 0.217 0.14365 0.1445 0.2155 0.323665 0.2155 0.5375 0 0.213665 -0.07185 0.391335 -0.2155 0.533 -0.14385 0.141665 -0.322 0.2125 -0.5345 0.2125h-18.5Z",strokeWidth:"0.5"})}),ic=e=>(0,l.jsxs)("svg",{height:"16",viewBox:"0 0 512 512",width:"16",xmlns:"http://www.w3.org/2000/svg",...e,style:{height:"16px",width:"16px"},children:[(0,l.jsx)("path",{ |
| 279 |
d:"m349.4 289.3h-13c-68.4 0-92.1.1-160.5-.1-26.4-.1-42.3-23.1-32.3-46.8 6.1-14.5 18-19.9 33.3-19.8 68 .1 91.3 0 159.4 0h14.7c-3.8-4.3-5.9-7.1-8.3-9.5-11.2-11-22.6-21.8-33.6-33-13.9-14.2-14.6-35.1-1.9-48.5 12.8-13.5 34.9-13.7 49.4.5 33.3 32.8 66.3 65.8 99.1 99.1 14.3 14.6 14.4 34.7.1 49.2-32.8 33.4-65.8 66.4-99.2 99.2-14.5 14.3-36.5 14.2-49.4.7s-11.9-34.4 2.4-49.3c13-13.4 25.7-26.9 39.8-41.7z"}),(0,l.jsx)("path",{d:"m112.3 256.1v226.7c0 21.3-21.9 34.3-45.4 27.3-13.6-4-21.3-13.7-21.3-27.2-.1-41.1 0-82.2 0-123.3 0-109.7 0-219.4 0-329.1 0-18.8 13.4-30.7 33.9-30.5 19.6.2 32.8 11.9 32.8 29.4.1 75.6.1 151.2 0 226.7z"})]}),sc=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Format-Text-Wrap--Streamline-Rounded-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M4.7455 19.975c-0.213665 0 -0.391335 -0.0719 -0.533 -0.21575C4.070835 19.6156 4 19.4375 4 19.225V4.75c0 -0.2125 0.072335 -0.390665 0.217 -0.5345C4.3615 4.071835 4.540665 4 4.7545 4c0.213665 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.323665 0.21575 -0.5375 0.21575Zm14.5 0c-0.21365 0 -0.39135 -0.0719 -0.533 -0.21575 -0.14165 -0.14365 -0.2125 -0.32175 -0.2125 -0.53425V4.75c0 -0.2125 0.07235 -0.390665 0.217 -0.5345 0.1445 -0.143665 0.32365 -0.2155 0.5375 -0.2155 0.21365 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.32365 0.21575 -0.5375 0.21575ZM9.075 16.9l-2.15 -2.125c-0.15 -0.15 -0.225 -0.325 -0.225 -0.525s0.075 -0.375 0.225 -0.525l2.15 -2.125c0.15 -0.13335 0.32585 -0.20415 0.5275 -0.2125 0.20165 -0.00835 0.37585 0.0625 0.5225 0.2125 0.15 0.15 0.225 0.325 0.225 0.525s-0.075 0.375 -0.225 0.525l-0.85 0.85h4.475c0.7 0 1.29165 -0.24165 1.775 -0.725 0.48335 -0.48335 0.725 -1.075 0.725 -1.775s-0.24165 -1.29165 -0.725 -1.775C15.04165 8.74165 14.45 8.5 13.75 8.5H7c-0.2125 0 -0.3906 -0.07235 -0.53425 -0.217 -0.14385 -0.1445 -0.21575 -0.32365 -0.21575 -0.5375 0 -0.21365 0.0719 -0.39135 0.21575 -0.533C6.6094 7.07085 6.7875 7 7 7h6.75c1.1 0 2.04165 0.39165 2.825 1.175S17.75 9.9 17.75 11s-0.39165 2.04165 -1.175 2.825S14.85 15 13.75 15h-4.475l0.85 0.85c0.15 0.15 0.225 0.32635 0.225 0.529 0 0.20265 -0.07175 0.37765 -0.21525 0.525 -0.1565 0.14735 -0.3356 0.221 -0.53725 0.221s-0.37585 -0.075 -0.5225 -0.225Z",strokeWidth:"0.5"})}),ac=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Format-Text-Wrap--Streamline-Rounded-Material",height:"24",width:"24",style:{rotate:"180deg"},...e,children:(0,l.jsx)("path",{d:"M4.7455 19.975c-0.213665 0 -0.391335 -0.0719 -0.533 -0.21575C4.070835 19.6156 4 19.4375 4 19.225V4.75c0 -0.2125 0.072335 -0.390665 0.217 -0.5345C4.3615 4.071835 4.540665 4 4.7545 4c0.213665 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.323665 0.21575 -0.5375 0.21575Zm14.5 0c-0.21365 0 -0.39135 -0.0719 -0.533 -0.21575 -0.14165 -0.14365 -0.2125 -0.32175 -0.2125 -0.53425V4.75c0 -0.2125 0.07235 -0.390665 0.217 -0.5345 0.1445 -0.143665 0.32365 -0.2155 0.5375 -0.2155 0.21365 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.32365 0.21575 -0.5375 0.21575ZM9.075 16.9l-2.15 -2.125c-0.15 -0.15 -0.225 -0.325 -0.225 -0.525s0.075 -0.375 0.225 -0.525l2.15 -2.125c0.15 -0.13335 0.32585 -0.20415 0.5275 -0.2125 0.20165 -0.00835 0.37585 0.0625 0.5225 0.2125 0.15 0.15 0.225 0.325 0.225 0.525s-0.075 0.375 -0.225 0.525l-0.85 0.85h4.475c0.7 0 1.29165 -0.24165 1.775 -0.725 0.48335 -0.48335 0.725 -1.075 0.725 -1.775s-0.24165 -1.29165 -0.725 -1.775C15.04165 8.74165 14.45 8.5 13.75 8.5H7c-0.2125 0 -0.3906 -0.07235 -0.53425 -0.217 -0.14385 -0.1445 -0.21575 -0.32365 -0.21575 -0.5375 0 -0.21365 0.0719 -0.39135 0.21575 -0.533C6.6094 7.07085 6.7875 7 7 7h6.75c1.1 0 2.04165 0.39165 2.825 1.175S17.75 9.9 17.75 11s-0.39165 2.04165 -1.175 2.825S14.85 15 13.75 15h-4.475l0.85 0.85c0.15 0.15 0.225 0.32635 0.225 0.529 0 0.20265 -0.07175 0.37765 -0.21525 0.525 -0.1565 0.14735 -0.3356 0.221 -0.53725 0.221s-0.37585 -0.075 -0.5225 -0.225Z",strokeWidth:"0.5"})}),rc=e=>{const{attributes:t,setAttributes:n,updateObj:o,device:i}=e,{layout:s,heightType:a,columnGap:r,height:c}=t,d="column"===s[i]?.direction||"column-reverse"===s[i]?.direction?{style:{rotate:"90deg"}}:{},u=[{label:(0,x.__)("Auto","b-blocks"),value:"auto"},{label:(0,x.__)("Window Height (100%)","b-blocks"),value:"window"},{label:(0,x.__)("Custom","b-blocks"),value:"custom"}];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Height:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:a,onChange:e=>{n({heightType:e,height:"window"===e?"100vh":"auto"===e?"auto":"initial"})},options:u})]}),"custom"===a&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Min Height:","b-blocks"),labelPosition:"left",value:c,onChange:e=>n({height:e}),units:[Ee(),Ae(),Oe()]}),"flex"===s.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"flex1 mt10",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Direction","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s[i]?.direction,onChange:e=>o("layout",e,i,"direction"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Row",value:"row",icon:Gl}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Column",value:"column",icon:Vl}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Row Reverse",value:"row-reverse",icon:Ul}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Column Reverse",value:"column-reverse",icon:ql})]}),(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Justify Content","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s[i]?.justify,onChange:e=>o("layout",e,i,"justify"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Yl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Kl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Ql,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Between",value:"space-between",icon:(0,l.jsx)(Zl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Around",value:"space-around",icon:(0,l.jsx)(Xl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Evenly",value:"space-evenly",icon:(0,l.jsx)(Jl,{...d})})]}),(0,l.jsx)(v,{className:"flex1 mt10",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Align Items","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s[i]?.alignItems,onChange:e=>o("layout",e,i,"alignItems"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(ec,{style:{rotate:"column"===s[i]?.direction||"column-reverse"===s[i]?.direction?"-90deg":"0deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(tc,{style:{ |
| 280 |
rotate:"column"===s[i]?.direction||"column-reverse"===s[i]?.direction?"-90deg":"0deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(nc,{style:{rotate:"column"===s[i]?.direction||"column-reverse"===s[i]?.direction?"-90deg":"0deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Stretch",value:"stretch",icon:(0,l.jsx)(oc,{style:{rotate:"column"===s[i]?.direction||"column-reverse"===s[i]?.direction?"-90deg":"0deg"}})})]}),!["column","column-reverse"].includes(s[i]?.direction)&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{gap:0,children:[(0,x.__)("Wrap","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s[i]?.wrap,onChange:e=>o("layout",e,i,"wrap"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"No Wrap",value:"nowrap",icon:(0,l.jsx)(ic,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Wrap",value:"wrap",icon:(0,l.jsx)(sc,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Wrap Reverse",value:"wrap-reverse",icon:(0,l.jsx)(ac,{})})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,l.jsxs)(y.Flex,{gap:5,justify:"flex-start",children:[(0,x.__)("Gap:","b-blocks"),(0,l.jsx)(_,{})]})}),"desktop"===i&&(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"left",value:r,onChange:e=>n({columnGap:e}),units:[Ee()]}),"desktop"!==i&&(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"left",value:s[i]?.columnGap,onChange:e=>o("layout",e,i,"columnGap"),units:[Ee()]})]}),"nowrap"!==s[i]?.wrap&&""!==s[i]?.wrap&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Align Content","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s[i]?.alignContent,onChange:e=>o("layout",e,i,"alignContent"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Yl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Kl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Ql,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Between",value:"space-between",icon:(0,l.jsx)(Zl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Around",value:"space-around",icon:(0,l.jsx)(Xl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Evenly",value:"space-evenly",icon:(0,l.jsx)(Jl,{...d})})]})]})]}),"grid"===s.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Justify Content","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s[i]?.gridJustify,onChange:e=>o("layout",e,i,"gridJustify"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Yl,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Kl,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Ql,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Between",value:"space-between",icon:(0,l.jsx)(Zl,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Around",value:"space-around",icon:(0,l.jsx)(Xl,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Evenly",value:"space-evenly",icon:(0,l.jsx)(Jl,{})})]}),(0,l.jsx)(v,{className:"flex1 mt10",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Align Items","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s[i]?.gridAlignItems,onChange:e=>o("layout",e,i,"gridAlignItems"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(ec,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(tc,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(nc,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Stretch",value:"stretch",icon:(0,l.jsx)(oc,{})})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Columns","b-blocks"),min:0,max:12,value:s[i]?.gridColumns,onChange:e=>o("layout",e,i,"gridColumns")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Rows","b-blocks"),min:0,max:12,value:s[i]?.gridRows,onChange:e=>o("layout",e,i,"gridRows")})]})]})},lc=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(rc,{...e})}),cc=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:mn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(lc,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),enabled:Hl,isPremium:o})})]})})]})};let dc={desktop:[33.33,33.33,33.34],tablet:[50,50,50],mobile:[100,100,100]};const uc=(0,w.compose)((0,f.withSelect)(((e,t)=>{const{clientId:n}=t,{getBlocks:o}=e("core/block-editor"),{getDeviceType:i}=e("core/editor");return{innerBlocks:o(n),device:i()?.toLowerCase()}})),(0,f.withDispatch)((e=>({updateAttributes:(t,n)=>e("core/block-editor").updateBlockAttributes(t,n)}))))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,innerBlocks:s,device:a}=e,{columns:r}=t,c=bBlocksPremiumChecker;(0,m.useEffect)((()=>me()),[i]);const d=e=>{const t="add"===e?r+1:r-1,i=6===t?16.66:Ol(100/t);var s;n({columns:t}),s=i,Pl(o).forEach((e=>{const t=e.clientId,n=Al(t)?.width;Bl(t,{width:{...n,desktop:s}})}))};(0,m.useEffect)((()=>{r<s.length?d("add"):r>s.length&&d("delete")}),[s.length]);const u=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(cc,{attributes:t,setAttributes:n,isPremium:c,updateObj:u,device:a}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:Wl(t,`block-${o}`,!0)}}),r?(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:`bBlocksRow has-${r}-columns ${i?"":"notSelected"}`,children:(0,l.jsx)(h.InnerBlocks,{allowedBlocks:["b-blocks/column"],template:(e=>[...Array(e)]?.map(((e,t)=>["b-blocks/column",{width:{desktop:dc.desktop[t],tablet:dc.tablet[t],mobile:dc.mobile[t]}}])))(r),renderAppender:()=>r<12&&i?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):null})})}):(0,l.jsxs)("div",{className:"columnLayoutContainer",children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(y.Dashicon,{icon:"layout"})," ",(0,x.__)("Select a column layout","b-blocks")]}),(0,l.jsx)("div",{className:"columnLayouts",children:Fl.map(((e,t)=>(0,l.jsx)(y.Button,{showTooltip:!0,label:e.label,tooltipPosition:"top",onClick:()=>{n({columns:e.columns}),dc=e.layout},children:e.layout?.[a]?.map(((e,t)=>(0,l.jsx)("i",{style:{width:e+"%"}},t)))},t)))})]})]})]})}));Nl(Ll.name)&&(0,p.registerBlockType)(Ll,{icon:nr,edit:uc,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})}) |
| 281 |
;const pc=JSON.parse('{"apiVersion":3,"name":"b-blocks/column","title":"Column","description":"Column of the row.","category":"bBlocks","parent":["b-blocks/row"],"keywords":["column","columns","multi columns"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"width":{"type":"object","default":{"mobile":100,"tablet":50,"desktop":33.33}},"overflow":{"type":"string","default":"hidden"},"background":{"type":"object","default":{"color":""}},"padding":{"type":"object","default":{"vertical":"","horizontal":""}},"border":{"type":"object","default":{}},"shadow":{"type":"object","default":{}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"usesContext":["b-blocks/rowColumns","b-blocks/rowColumnGap"],"supports":{"align":["wide","full"],"html":false,"interactivity":{"clientNavigation":true}},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),hc=(e,o,i,s,a=!1)=>{const{width:r,overflow:l,background:c,padding:d,border:u,shadow:p,advanced:h}=e,g=`#${o}`,m=a?`${g} > div > div:first-child`:`${g} > div`;return`\n\t\t${g}{\n\t\t\tflex-basis: calc(${r.desktop}% - (${s} * (${i} - 1) / ${i}));\n\t\t}\n\n\t\t${t} {\n\t\t\t${g}{\n\t\t\t\tflex-basis: calc(${r.tablet}% - (${s} * (${i} - 1) / ${i}));\n\t\t\t}\n\t\t}\n\n\t\t${n} {\n\t\t\t${g}{\n\t\t\t\tflex-basis: calc(${r.mobile}% - (${s} * (${i} - 1) / ${i}));\n\t\t\t}\n\t\t}\n\n\t\t${m}{\n\t\t\toverflow: ${l};\n\t\t\t${oa(c)}\n\t\t\tpadding: ${ua(d)};\n\t\t\t${ia(u)}\n\t\t\tbox-shadow: ${da(p)};\n\t\t}\n\t\t${Ca(o,h,a)}\n\t\t`.replace(/\s+/g," ")},gc=({attributes:e,updateColumnWidth:t,device:n,MINWIDTH:o,columns:i})=>{const{width:s}=e,a=100-(i-1)*o;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Width (%):","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:s[n],onChange:e=>t(n,e),min:o,max:"desktop"===n?a:100,step:.01})]})})},mc={dimension:["padding","margin","height","minHeight","maxHeight"],floating:!0,motion:!0,position:!0,transform:!0,background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],mask:!0,animation:!0,visibility:["zIndex","overflow"],responsive:!0,css:!0},bc=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,columns:o,updateColumns:i}=e,{advanced:s}=t,a=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel bPlRemPrev",activeClass:"activeTab",tabs:Zt,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(gc,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:s,onChange:e=>n({advanced:e}),enabled:mc,isPremium:a})})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsxs)(y.ToolbarGroup,{label:(0,x.__)("Column Options","b-blocks"),children:[o<6&&(0,l.jsx)(y.ToolbarButton,{icon:"plus",label:(0,x.__)("Add Column","b-blocks"),onClick:()=>i("add")}),o>1&&(0,l.jsx)(y.ToolbarButton,{icon:"trash",label:(0,x.__)("Delete Column","b-blocks"),onClick:()=>i("delete")})]})})]})})),{replaceInnerBlocks:fc}=(0,f.dispatch)("core/block-editor"),xc=(0,w.compose)((0,f.withSelect)(((e,t)=>{const{clientId:n}=t,{getBlocks:o,getBlockParents:i,getBlockIndex:s,getBlockAttributes:a,getPreviousBlockClientId:r,getNextBlockClientId:l}=e("core/block-editor"),c=document.querySelector('iframe[name="editor-canvas"]'),d=c?c?.contentDocument:document,u=i(n)[0],p=d?.querySelector(`#block-${u}`),h=p?"100%":"0px",g=l(n),m=r(n);return{parentBlockId:u,rowWidth:Il(h),parentInnerBlocks:o(u),currentIndex:s(n,u),innerBlocks:o(n),nextClientId:g,nextWidth:a(g)?.width,prevClientId:m,prevWidth:a(m)?.width}})),(0,f.withDispatch)((e=>({updateAttributes:(t,n)=>e("core/block-editor").updateBlockAttributes(t,n)}))))((e=>{const{attributes:t,context:n,setAttributes:o,clientId:i,isSelected:s,toggleSelection:a,parentBlockId:r,rowWidth:c,parentInnerBlocks:d,currentIndex:u,innerBlocks:g,prevWidth:b,nextClientId:f,nextWidth:x,updateAttributes:v}=e,{width:k}=t,w=n["b-blocks/rowColumns"],_=n["b-blocks/rowColumnGap"],C=(0,m.useRef)(null),j=C?.current,$=j?.ownerDocument||document;(0,m.useEffect)((()=>me()),[s]);const[S,T]=(0,m.useState)(!1),M=(0,m.useRef)(k),N=(0,m.useRef)(x),L=(0,m.useRef)(b),E=`block-${i}`,P=$?.querySelector(`#block-${i}`),A=$?.querySelector(`#block-${f}`);(0,m.useEffect)((()=>{M.current={...k},N.current={...x},L.current={...b}}),[s,P,c]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(bc,{...e,attributes:t,setAttributes:o,nextClientId:f,columns:w,updateColumns:e=>{const t=100/("add"===e?w+1:w-1),n={...k,desktop:t};let o=[...d];"delete"===e?o.splice(u,1):o.splice(u+1,0,(0,p.createBlock)("b-blocks/column",{width:n})),fc(r,o)},updateColumnWidth:(e,t)=>{if("desktop"!==e)return void o({width:{...k,[e]:t}});if(t<5)return;const n=t-k.desktop;let i={};if(A&&null!==f&&(i={...x},i.desktop=parseFloat(i.desktop)-n,i.desktop>=5&&t>=5&&(v(f,{width:{...i}}),N.current={...i})),i.desktop>=5&&t>=5){const e=Math.abs(t);o({width:{...k,desktop:e}}),M.current={...M.current,desktop:e}}},MINWIDTH:5}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({ref:C}),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:hc(t,E,w,_,!0)}}),(0,l.jsx)(y.ResizableBox,{className:S?`${El}Resizing`:"",enable:{top:!1,right:!!f,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResize:(e,t,n,i)=>((e,t,n,i)=>{const s=(a=i.width,100*parseFloat(a/c));var a;const r=M.current.desktop+s;let l=0;A&&null!==f&&(l=parseFloat(N.current.desktop)-s,l>=5&&r>=5&&(l=Math.abs(l),v(f,{width:{...x,desktop:l}}))),l>=5&&r>=5&&o({width:{...k,desktop:r}})})(0,0,0,i),onResizeStop:(e,t,n,o)=>(a(!0),T(!1),M.current={...k},void(N.current={...x})),onResizeStart:(e,t,n)=>(a(!1),void T(!0)),size:{width:"auto",height:"100%"},minWidth:c/5-Il(_||"0px"),children:(0, |
| 282 |
l.jsx)("div",{className:El,style:0===g?.length?{padding:"10px",background:"#fff"}:{},children:(0,l.jsx)(h.InnerBlocks,{renderAppender:()=>g?.length?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):(0,l.jsx)(h.InnerBlocks.ButtonBlockAppender,{className:"columnEmpty"})})})}),(0,l.jsx)("span",{className:"widthPlaceholder",children:s&&Ol(k?.desktop)})]})]})}));Nl("b-blocks/row")&&(0,p.registerBlockType)(pc,{icon:or,edit:xc,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})});const yc=JSON.parse('{"apiVersion":3,"name":"b-blocks/td-viewer","title":"3D Viewer","description":"Display interactive 3D models on the web","category":"bBlocks","keywords":["3d","3d model","3d viewer"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"alignment":{"type":"string","default":"center"},"sourceType":{"type":"string","default":"upload"},"model":{"type":"object","default":{"id":null,"url":"https://modelviewer.dev/assets/ShopifyModels/ToyTrain.glb","title":""}},"modelLink":{"type":"string","default":"https://modelviewer.dev/assets/ShopifyModels/ToyTrain.glb"},"width":{"type":"string","default":"100%"},"height":{"type":"string","default":"350px"},"isTouchMove":{"type":"boolean","default":true},"isZoom":{"type":"boolean","default":true},"loadingType":{"type":"string","default":"auto"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"sourceType":"link"}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","modelViewer"]}'),vc=((0,x.__)("Upload","b-blocks"),(0,x.__)("Link","b-blocks"),[{label:(0,x.__)("Auto","b-blocks"),value:"auto"},{label:(0,x.__)("Lazy","b-blocks"),value:"lazy"},{label:(0,x.__)("Eager","b-blocks"),value:"eager"}]),kc=({attributes:e,setAttributes:t})=>{const{alignment:n,model:o,width:i,height:s,isTouchMove:a,isZoom:r,loadingType:c}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:sn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("3D Model Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Model:","b-blocks")}),(0,l.jsx)(ke,{types:["model/gltf-binary"],value:o,onChange:e=>t({model:e}),placeholder:(0,x.__)("Enter Model URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:i,onChange:e=>t({width:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)("small",{children:(0,x.__)("Keep width 0, to auto width.","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:s,onChange:e=>t({height:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)("small",{children:(0,x.__)("Keep height 0, to 350px height.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Controls via mouse/touch","b-blocks"),checked:a,onChange:e=>t({isTouchMove:e})}),a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Zoom","b-blocks"),checked:r,onChange:e=>t({isZoom:e})}),(0,l.jsx)("small",{children:(0,x.__)("Enable 'Controls via mouse/touch' to work Zoom!","b-blocks")})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Loading Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:c,onChange:e=>t({loadingType:e}),options:vc})]})]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(Ce,{label:(0,x.__)("Edit 3D Model:","b-blocks"),icon:"edit",types:["model/gltf-binary"],value:o,onChange:({id:e,url:n,title:i})=>t({model:{...o,id:e,url:n,title:i}})}),(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("3D Model Alignment"),alignmentControls:[{title:(0,x.__)("3D Model in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("3D Model in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("3D Model in right","b-blocks"),align:"right",icon:"align-right"}]})]})]})},wc="bBlocks3DViewer",_c=({attributes:e,id:t})=>{const{alignment:n,width:o,height:i}=e,s=`#${t} .${wc}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${s}{\n\t\t\ttext-align: ${n};\n\t\t}\n\t\t${s} model-viewer{\n\t\t\twidth: ${["0px","0%","0em"].includes(o)?"auto":o};\n\t\t\theight: ${["0px","0%","0em"].includes(i)?"350px":i};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},Cc=(0,m.forwardRef)((({attributes:e},t)=>{const{sourceType:n,model:o,modelLink:i,isTouchMove:s,isZoom:a,loadingType:r}=e,c=s?{"camera-controls":""}:{},d=a?{}:{"disable-zoom":""};return(0,l.jsx)("div",{className:wc,ref:t,children:(0,l.jsx)("model-viewer",{src:"upload"===n?o?.url:i,alt:"upload"===n?o?.title:"",loading:r,"auto-rotate":!0,...c,...d})})})),jc=(e,t,n,o)=>{t&&e?.setAttribute(n,o),!t&&e?.removeAttribute(n,o)};Nl(yc.name)&&(0,p.registerBlockType)(yc,{icon:ir,transforms:{from:[{type:"block",blocks:["tdvb/td-viewer"],transform:e=>(0,p.createBlock)("b-blocks/td-viewer",e)},{type:"prefix",prefix:"3d",transform:()=>(0,p.createBlock)("b-blocks/td-viewer")}],to:[{type:"block",blocks:["tdvb/td-viewer"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("tdvb/td-viewer",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e,{sourceType:s,model:a,modelLink:r,isTouchMove:c,isZoom:d,loadingType:u}=t;(0,m.useEffect)((()=>me()),[i]);const p=(0,m.useRef)(null);return(0,m.useEffect)((()=>{p.current.innerHTML="";const e=document.createElement("model-viewer");jc(e,!0,"src","upload"===s?a?.url:r),jc(e,!0,"alt","upload"===s?a?.title:""),jc(e,c,"camera-controls",""),jc(e,!d,"disable-zoom",""),jc(e,!0,"loading",u),jc(e,!0,"auto-rotate",""),p.current.appendChild(e)}),[s,a,r,c,d,u]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(kc,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(_c,{attributes:t,id:`block-${o}`}),"upload"!==s||a.url?"":(0,l.jsx)("p",{className:"noModel",children:(0,x.__)("Please, upload Model or enter Model Link first!","3d-viewer-block")}),(0,l.jsx)(Cc,{attributes:t,ref:p})]})]})},save:()=>null}) |
| 283 |
;const $c=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/advanced-image","title":"Advanced Image","category":"bBlocks","description":"A block that allows for advanced image handling with custom features.","keywords":["b blocks","advanced","image","advanced image"],"textdomain":"b-blocks","attributes":{"image":{"type":"object","default":{"sourceType":"","source":{"id":"","url":"","alt":"","title":""},"link":{"url":"","tab":"_self"}}},"layout":{"type":"object","default":{"size":"default","width":{"desktop":"100%","tablet":"100%","mobile":"100%"},"isAutoHeight":true,"height":{"desktop":"230px","tablet":"200px","mobile":"150px"},"isAutoFit":false,"fitOptionType":"cover"}},"style":{"type":"object","default":{"hoverEffect":"none","normalEffect":"none","effectOptions":{"normal":{"duration":1000,"delay":0,"iteration":"initial","iterationCount":1},"hover":{"duration":1000,"delay":0,"iteration":"initial","iterationCount":1}},"optionType":"rounded","alignment":{"desktop":"start","tablet":"start","mobile":"start"}}},"caption":{"type":"object","default":{"enabled":false,"text":""}},"captionStyle":{"type":"object","default":{"typo":{},"desktop":{"textAlign":"center","hAlign":"left","vAlign":"bottom","width":"","margin":{},"padding":{}},"tablet":{"textAlign":"center","hAlign":"left","vAlign":"top","width":"","margin":{},"padding":{}},"mobile":{"textAlign":"center","hAlign":"left","vAlign":"middle","width":"","margin":{},"padding":{}},"colors":{"color":"black","bg":"#eee"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","aos"]}'),Sc="bBlocksAdvancedImage",Tc=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:s,style:a,captionStyle:r,image:c,advanced:d}=e,{width:u,height:p,isAutoHeight:h,isAutoFit:g,fitOptionType:m}=s,{hoverEffect:b,optionType:f,alignment:x,normalEffect:y="",effectOptions:v={}}=a,{normal:k={},hover:w={}}=v,{typo:_,desktop:C,tablet:j,mobile:$,colors:S}=r,T=`#${o} .${Sc}`,M=`${T} .image`,N=`${M} .caption`,L=(e,t,n,o,i)=>`${t} ${n}ms ${t==e+"Spin"?"linear":t===e+"Ping"?"cubic-bezier(0, 0, 0.2, 1)":"ease-in-out"} ${o}ms ${i};`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",_)?.googleFontLink}\n\t\t${pa(N,_)?.styles}\n\n\t\t${T}{\n\t\t\talign-items:${x.desktop};\n\t\t}\n\n\t\t${M}{\n\t\t\twidth : ${c.source?.url?u.desktop:"100%"};\n\t\t\theight: ${h?"auto":p.desktop};\n\t\t\tborder-radius: ${"rounded"===f?"15px":"square"===f?"0px":"Circle"===f?"100%":"0"};\n\t\t\t${na("clip-path","Triangle"===f?"polygon(50% 0%, 0% 100%, 100% 100%)":"Rhombus"===f?"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)":"Octagon"===f?"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)":"square"===f?"inset(0%)":"")}\n\t\t}\n\n\t\t${T} img{\n\t\t\t${g?`object-fit: ${m};`:na("object-fit","Triangle"===f||"Octagon"===f||"Rhombus"===f?"cover":"")}\n\t\t\t${na("transform","zoomOut"===b?"scale(1.5)":"")}\n\t\t\tfilter: ${"blur"===b?"blur(3px)":"blur(0px)"};\n\t\t}\n\t\t${T}:hover img{\n\t\t\t${na("transform","zoomIn"===b?"scale(1.5)":"zoomOut"===b?"scale(1)":"")}\n\t\t\t${na("filter","blur"===b?"blur(0px)":"")}\n\t\t}\n\n\t\t${M}{\n\t\t\tanimation:${L("n",y,k?.duration,k?.delay,"number"===k?.iteration?k?.iterationCount:k?.iteration)}\n\t\t}\n\n\t\t${M}:hover{\n\t\t\tanimation:${L("h",b,w?.duration,w?.delay,"number"===w?.iteration?w?.iterationCount:w?.iteration)}\n\t\t}\n\n\t\t${N}{\n\t\t\twidth: ${C.width?C.width:"100%"};\n\t\t\ttext-align:${C.textAlign};\n\t\t\t${aa(S)}\n\t\t\t${na("padding",ha(C.padding))}\n\t\t\t${na("margin",ha(C.margin))}\n\t\t\t${Mc(C.vAlign,C.hAlign)}\n\t\t}\n\n\t\t${t}{\n\t\t\t${T}{\n\t\t\t\talign-items:${x.tablet};\n\t\t\t}\n\n\t\t\t${M}{\n\t\t\t\twidth : ${c.source?.url?u.tablet:"100%"};\n\t\t\t\theight: ${h?"auto":p.tablet};\n\t\t\t}\n\n\t\t\t${N}{\n\t\t\t\twidth: ${j.width?j.width:"100%"};\n\t\t\t\ttext-align:${j.textAlign};\n\t\t\t\t${na("padding",ha(j.padding))}\n\t\t\t\t${na("margin",ha(j.margin))}\n\t\t\t\t${Mc(j.vAlign,j.hAlign)}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t${n}{\n\t\t\t${T}{\n\t\t\t\talign-items:${x.mobile};\n\t\t\t}\n\n\t\t\t${M}{\n\t\t\t\twidth : ${c.source?.url?u.mobile:"100%"};\n\t\t\t\theight: ${h?"auto":p.mobile};\n\t\t\t}\n\n\t\t\t${N}{\n\t\t\t\twidth: ${$.width?$.width:"100%"};\n\t\t\t\ttext-align:${$.textAlign};\n\t\t\t\t${na("padding",ha($.padding))}\n\t\t\t\t${na("margin",ha($.margin))}\n\t\t\t\t${Mc($.vAlign,$.hAlign)}\n\t\t\t}\n\t\t}\n\t\t${Ca(o,d,i)}\n\t`}})},Mc=(e,t)=>`\n\t${"left"===t?"left: 0; right: auto;":"center"===t?"left:50%;"+("middle"!==e?"transform: translateX(-50%);":""):"right:0;left:auto;"}\n\t${"top"===e?"top:0;bottom:auto;":"middle"===e?"top:50%;"+("center"!==t?"transform: translateY(-50%);":""):"bottom:0;top:auto;"}\n\t${"center"===t&&"middle"===e?"transform:translateY(-50%) translateX(-50%);":""}\n`,Nc=[{label:"Custom",value:"custom"},{label:"Featured Image",value:"featured"}],Lc=[{label:"Rounded",value:"rounded"},{label:"Square",value:"square"},{label:"Circle",value:"Circle"},{label:"Octagon",value:"Octagon"},{label:"Rhombus",value:"Rhombus"},{label:"Triangle",value:"Triangle"}],Ec=[{label:"Default",value:"default"},{label:"Thumbnail",value:"thumbnail"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}],Pc=[{label:"Cover",value:"cover"},{label:"Contain",value:"contain"},{label:"Fill",value:"fill"}],Ac=[{label:"No Effect",value:"none"},{label:"Zoom in",value:"zoomIn"},{label:"Zoom out",value:"zoomOut"},{label:"Blur",value:"blur"}],Bc=[{label:"Left",value:"start",icon:"align-left"},{label:"Center",value:"center",icon:"align-center"},{label:"Right",value:"end",icon:"align-right"}],Ic=[{ |
| 284 |
label:"Left",value:"left",icon:"editor-alignleft"},{label:"Center",value:"center",icon:"editor-aligncenter"},{label:"Right",value:"right",icon:"editor-alignright"},{label:"Justify",value:"justify",icon:"editor-justify"}],Oc=[{label:"Left",value:"left",icon:"align-left"},{label:"Center",value:"center",icon:"align-center"},{label:"Right",value:"right",icon:"align-right"}],Rc=[{label:"Top",value:"top"},{label:"Middle",value:"middle"},{label:"Bottom",value:"bottom"}],zc=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Bounce","b-blocks"),value:"nBounce"},{label:(0,x.__)("Pulse","b-blocks"),value:"nPulse"},{label:(0,x.__)("Spin","b-blocks"),value:"nSpin"},{label:(0,x.__)("Shake","b-blocks"),value:"nShake"},{label:(0,x.__)("Wiggle","b-blocks"),value:"nWiggle"},{label:(0,x.__)("Ping","b-blocks"),value:"nPing"},{label:(0,x.__)("Float","b-blocks"),value:"nFloat"}],Dc=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Bounce","b-blocks"),value:"hBounce"},{label:(0,x.__)("Pulse","b-blocks"),value:"hPulse"},{label:(0,x.__)("Spin","b-blocks"),value:"hSpin"},{label:(0,x.__)("Shake","b-blocks"),value:"hShake"},{label:(0,x.__)("Wiggle","b-blocks"),value:"hWiggle"},{label:(0,x.__)("Ping","b-blocks"),value:"hPing"},{label:(0,x.__)("Float","b-blocks"),value:"hFloat"}],Fc=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Infinite","b-blocks"),value:"infinite"},{label:(0,x.__)("Number","b-blocks"),value:"number"}],Hc=({attributes:e,setAttributes:t,updateObj:n})=>{const{image:o,layout:i,style:s,caption:a}=e,{sourceType:r,link:c}=o,{optionType:d}=s,{enabled:u}=a;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Source","b-blocks"),labelPosition:"left",value:r,options:Nc,onChange:e=>n("image",e,"sourceType")}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Styles","b-blocks"),labelPosition:"left",value:d,options:Lc,help:"Circle"===d||"Rhombus"===d||"Octagon"===d||"Triangle"===d?`Please Use Equal 'Height' & 'Width' For Perfect ${d} Shape.`:"",onChange:e=>n("style",e,"optionType")}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Size","b-blocks"),labelPosition:"left",value:i.size,options:Ec,onChange:e=>{let n;switch(e){case"thumbnail":n="150px";break;case"medium":n="300px";break;case"large":n="1024px";break;default:n="100%"}t({layout:{...i,size:e,width:{desktop:n,tablet:n,mobile:n}}})}}),(0,l.jsx)("span",{children:(0,x.__)("Width will be change while changing the Size","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt20",label:(0,x.__)("Link","b-blocks"),placeholder:"https://example.com",help:"If you want to link the image, please enter the URL. If not want to link leave as blank",value:c.url,onChange:e=>n("image",e,"link","url")}),c.url&&(0,l.jsx)(y.ToggleControl,{className:"mt20",checked:"_blank"===c.tab,label:(0,x.__)("Open in New Tab","b-blocks"),onChange:e=>n("image",e?"_blank":"_self","link","tab")})]}),"custom"===r&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.ToggleControl,{checked:u,label:(0,x.__)("Display Caption","b-blocks"),onChange:e=>n("caption",e,"enabled")})})]})},Wc=({attributes:e,updateObj:t,device:n})=>{const{image:o,layout:i,style:s,captionStyle:a,caption:r}=e,{height:c,isAutoHeight:d,isAutoFit:u,fitOptionType:p}=i,{alignment:h,hoverEffect:g,normalEffect:m="",effectOptions:b={}}=s,{textAlign:f,hAlign:w,vAlign:C,margin:j,padding:$,width:S}=a[n],{sourceType:T}=o,{typo:M,colors:N}=a,{normal:L={},hover:E={}}=b;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:i.width[n],onChange:e=>t("layout",e,"width",n)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",checked:d,label:(0,x.__)("Auto Height","b-blocks"),onChange:e=>t("layout",e,"isAutoHeight")}),!d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{children:(0,x.__)("Height","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:c[n],onChange:e=>t("layout",e,"height",n)})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{value:h[n],onChange:e=>t("style",e,"alignment",n),options:Bc,isIcon:!0,size:"default"}),(0,l.jsx)(y.ToggleControl,{className:"mt20",checked:u,label:(0,x.__)("Auto Fit","b-blocks"),onChange:e=>t("layout",e,"isAutoFit")}),u&&(0,l.jsx)(Tn,{label:(0,x.__)("Image Fit","b-blocks"),value:p,onChange:e=>t("layout",e,"fitOptionType"),options:Pc,size:"small"}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Hover Effect","b-blocks"),labelPosition:"left",value:g,options:Ac,onChange:e=>t("style",e,"hoverEffect")})]}),r.enabled&&"custom"===T&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(On,{label:(0,x.__)("Colors","b-blocks"),value:N,onChange:e=>t("captionStyle",e,"colors"),defaults:{color:"black",bg:"#EEEEEE"}}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,l.jsx)(v,{children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(_,{})]}),value:S,allowReset:!0,onChange:e=>t("captionStyle",e,n,"width")}),(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:M,onChange:e=>t("captionStyle",e,"typo"),defaults:{fontSize:13}}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{value:f,onChange:e=>t("captionStyle",e,n,"textAlign"),options:Ic,isIcon:!0,size:"small"}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Horizontal Align","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{value:w,onChange:e=>t("captionStyle",e,n,"hAlign"),options:Oc,isIcon:!0,size:"small"}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Vertical Align","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{value:C,onChange:e=>t("captionStyle",e,n,"vAlign"),options:Rc,size:"small"}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{children:(0,x.__)("Margin","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{label:"",values:j,onChange:e=>t("captionStyle",e,n,"margin")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{children:(0,x.__)("Padding","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{label:"",values:$,onChange:e=>t("captionStyle",e,n,"padding")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!0,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini mt10",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Type","b-blocks"),options:zc,value:m,onChange:e=>t("style",e,"normalEffect")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Iteration","b-blocks"),options:Fc,value:L?.iteration,onChange:e=>t("style",e,"effectOptions","normal","iteration")}),"number"==L?.iteration&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Iteration Count","b-blocks"),min:0,max:10,step:1,value:L?.iterationCount,onChange:e=>t("style",e,"effectOptions","normal","iterationCount")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"),min:0,max:2e4,step:50,value:L?.duration,onChange:e=>t("style",e,"effectOptions","normal","duration")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Delay (ms)","b-blocks"),min:0,max:2e4,step:50,value:L?.delay, |
| 285 |
onChange:e=>t("style",e,"effectOptions","normal","delay")})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Type","b-blocks"),options:Dc,value:g,onChange:e=>t("style",e,"hoverEffect")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Iteration","b-blocks"),options:Fc,value:E?.iteration,onChange:e=>t("style",e,"effectOptions","hover","iteration")}),"number"===E?.iteration&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Iteration Count","b-blocks"),min:0,max:10,step:1,value:E?.iterationCount,onChange:e=>t("style",e,"effectOptions","hover","iterationCount")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"),min:0,max:2e4,step:50,value:E?.duration,onChange:e=>t("style",e,"effectOptions","hover","duration")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Delay (ms)","b-blocks"),min:0,max:2e4,step:50,value:E?.delay,onChange:e=>t("style",e,"effectOptions","hover","delay")})]})]})})})]})},Uc=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updateObj:n,isPremium:o,device:i})=>{const{image:s}=e,{sourceType:a,source:r}=s,c={attributes:e,setAttributes:t,updateObj:n,isPremium:o,device:i};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Xt,children:n=>(0,l.jsxs)(l.Fragment,{children:["general"===n.name&&(0,l.jsx)(Hc,{...c}),"style"===n.name&&(0,l.jsx)(Wc,{...c}),"advanced"===n.name&&(0,l.jsx)(Qt,{advanced:e.advanced,onChange:e=>t({advanced:e}),isPremium:o})]})})}),(0,l.jsx)(h.BlockControls,{children:r.url&&"custom"===a&&(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image/*"],onSelect:({id:e,url:t,alt:o,title:i})=>n("image",{id:e,url:t,alt:o,title:i},"source"),render:({open:e})=>(0,l.jsx)(y.ToolbarButton,{icon:"edit",iconSize:"25",title:(0,x.__)("Edit Custom Image","b-blocks"),onClick:e})})})})})]})})),Gc=({image:e,link:t,isBackend:n=!1})=>{const{url:o,alt:i,title:s}=e||{};return o&&(0,l.jsx)(Vc,{link:t,isBackend:n,children:(0,l.jsx)("img",{src:o,alt:i||s})})},Vc=({link:e={},children:t,isBackend:n})=>{const{url:o="",tab:i="_self"}=e;return o&&!n?(0,l.jsx)("a",{href:$t(o),target:i,children:t}):t},qc=({attributes:e,setAttributes:t,featuredImageURL:n})=>{const{image:o,caption:i}=e,{sourceType:s,source:a,link:r}=o,{enabled:c,text:d}=i;return(0,l.jsx)("div",{className:Sc,children:(0,l.jsx)("div",{className:"image",children:"custom"===s?(0,l.jsx)(l.Fragment,{children:a.url?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Gc,{image:a,link:r,isBackend:!0}),c&&(0,l.jsx)("div",{className:"caption ",children:(0,l.jsx)(h.RichText,{tagName:"p",value:d,onChange:e=>t({caption:be(i,e,"text")}),placeholder:"Add Caption..."})})]}):(0,l.jsx)(_e,{label:(0,x.__)("Custom Image","b-blocks"),onChange:({id:e,url:n,alt:i,title:s})=>t({image:{...o,source:{id:e,url:n,alt:i,title:s}}})})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Gc,{image:{url:n,alt:"Feature Image"},link:r,isBackend:!0}),!n&&(0,l.jsxs)("div",{className:"featureImageNotFound",children:[(0,l.jsx)("h3",{children:"Warning !!!"}),(0,l.jsx)("p",{children:"Seems like you have not added a Featured Image for this post. Please make sure to add a Featured Image and try again."})]})]})})})},Yc=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,l.jsx)("path",{d:"M448 80c8.8 0 16 7.2 16 16l0 319.8-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3L48 96c0-8.8 7.2-16 16-16l384 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"})}),Kc=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,l.jsx)("path",{d:"M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"})}),Qc=(0,f.withSelect)(((e,t)=>{const{layout:n}=t.attributes,{size:o}=n,{getMedia:i}=e("core"),{getDeviceType:s,getEditedPostAttribute:a}=e("core/editor"),r=i(a("featured_media")),l=r?.media_details?.sizes[o]?.source_url||r?.source_url;return{device:s()?.toLowerCase(),featuredImageURL:l}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,featuredImageURL:s}=e,{image:a}=t,{sourceType:r}=a,c=bBlocksPremiumChecker,d=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Uc,{attributes:t,setAttributes:n,updateObj:d,isPremium:c}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Tc,{attributes:t,id:`block-${o}`,device:i,isBackend:!0}),(0,l.jsx)("div",{className:"bblocks-advanced-image",children:r?(0,l.jsx)(qc,{attributes:t,setAttributes:n,featuredImageURL:s}):(0,l.jsxs)("div",{className:"sourceSelector",children:[(0,l.jsx)("h4",{children:"Choose Your Image Source"}),(0,l.jsx)("div",{className:"sourceOptions",children:[{label:"Custom Image",value:"custom",icon:Yc},{label:"Featured Image",value:"featured",icon:Kc}].map((({label:e,value:t,icon:o})=>(0,l.jsxs)("div",{onClick:()=>n({image:{...a,sourceType:t}}),children:[o,e]},t)))})]})})]})]})}));Nl($c.name)&&(0,p.registerBlockType)($c,{icon:sr,edit:Qc});const Zc=JSON.parse('{"apiVersion":3,"name":"b-blocks/alert","title":"Alert","description":"Provide contextual feedback messages.","category":"bBlocks","keywords":["alert message","alert block","custom alert"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"type":{"type":"string","default":"general"},"width":{"type":"string","default":"100%"},"alignment":{"type":"string","default":"center"},"textAlign":{"type":"string","default":"center"},"message":{"type":"string","default":"You have an alert message!","selector":".bBlocksAlert .alert .alertMessage"},"icon":{"type":"object","default":{"class":"fa-solid fa-bell"}},"isDismiss":{"type":"boolean","default":true},"typography":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"}}},"colors":{"type":"object","default":{"color":"#333","bg":"#fff"}},"padding":{"type":"object","default":{"vertical":"15px","horizontal":"30px"}},"border":{"type":"object","default":{"width":"2px","color":"#333","radius":"8px"}},"shadow":{"type":"object","default":{}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),Xc=e=>{const{className:t="",label:n=(0,x.__)("Border:"),value:o,onChange:i,defaults:s={}}=e,[a,r]=(0,m.useState)(!0),c={width:"0px",style:"solid",color:"",side:"all",radius:"0px 0px 0px 0px"},d=e=>{if(!e)return["0px","0px","0px","0px"];const t=e.trim().split(/\s+/);return 4===t.length?t:1===t.length?[t[0],t[0],t[0],t[0]]:["0px","0px","0px","0px"]},u=e=>e.join(" "),p=e=>s?.[e]||c[e],h=e=>i({...o,[e]:p(e)}),g=e=>o?.[e]||p(e),b=(e,t)=>i({...o,[e]:t}),f=e=>(0,l.jsx)(y.Button,{icon:"image-rotate",className:"bPlResetVal",onClick:()=>h(e)}),k=d(g("radius")),w=d(p("radius")),_=k.every(((e,t)=>e===w[t])),C=[{key:"topLeft",index:0,label:(0,x.__)("Top-left")},{key:"topRight",index:1,label:(0,x.__)("Top-right")},{key:"bottomRight",index:2,label:(0,x.__)("Bottom-right")},{key:"bottomLeft",index:3,label:(0,x.__)("Bottom-left")}];return(0,l.jsxs)(y.PanelRow,{className:`bPlDropdown ${t}`,children:[(0,l.jsx)(v,{ |
| 286 |
className:"mt5",children:n}),(0,l.jsx)(y.Dropdown,{className:"bPlDropdownContainer",contentClassName:"bPlDropdownPopover",popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,l.jsx)(y.Button,{icon:"edit",onClick:t,"aria-expanded":e}),renderContent:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:"),labelPosition:"left",value:g("width"),onChange:e=>b("width",e),units:[Ee(),Ae()]}),o?.width&&o?.width!==p("width")&&f("width")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Style:")}),(0,l.jsx)(y.SelectControl,{value:g("style"),onChange:e=>b("style",e),options:Le}),o?.style&&o?.style!==p("style")&&f("style")]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:"),value:g("color"),onChange:e=>b("color",e),defaultColor:p("color")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Sides:")}),(0,l.jsx)(y.SelectControl,{value:g("side"),onChange:e=>b("side",e),options:Re}),o?.side&&o?.side!==p("side")&&f("side")]}),(0,l.jsxs)("div",{className:"bPlBoxControl mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Radius:")}),(0,l.jsxs)("div",{className:"sides",children:[C.map((e=>(0,l.jsx)("div",{className:"bplUnitControlWrapper",children:(0,l.jsx)(y.__experimentalUnitControl,{onChange:t=>((e,t)=>{const n=d(g("radius"));a?b("radius",u([e,e,e,e])):(n[{topLeft:0,topRight:1,bottomRight:2,bottomLeft:3}[t]]=e,b("radius",u(n)))})(t,e.key),value:k[e.index],units:[Ee(50),Pe(50),Ae(3),Be(3)],isResetValueOnUnitChange:!0})},e.key))),(0,l.jsx)("button",{className:"bplBoxControlLinkButton "+(a?"activeLink":""),onClick:()=>r(!a),children:a?(0,l.jsx)("span",{className:"dashicons dashicons-admin-links"}):(0,l.jsx)("span",{className:"dashicons dashicons-editor-unlink"})}),!_&&(0,l.jsx)("button",{className:"bplBoxControlLinkButton",onClick:()=>h("radius"),children:(0,l.jsx)("span",{className:"dashicons dashicons-image-rotate"})})]})]})]})})]})},Jc=window.wp.blob,ed=(0,f.withSelect)(((e,t)=>{const{value:n}=t;return{image:n?.id?e("core").getMedia(n?.id):null,imageSizes:e("core/block-editor").getSettings().imageSizes}}))((e=>{const{className:t,value:n={},onChange:o,image:i,imageSizes:s}=e,a=(e,t)=>o({...n,[e]:t});return(0,l.jsxs)("div",{className:t,children:[n?.url&&!(0,Jc.isBlobURL)(n?.url)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Alt Text (Alternative Text):")}),(0,l.jsx)(y.TextControl,{value:n?.alt,onChange:e=>a("alt",e)})]}),n?.id&&0!==ge(i,s)?.length&&(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Select Size:")}),(0,l.jsx)(y.SelectControl,{value:n?.url,onChange:e=>a("url",e),options:ge(i,s)})]})]})})),td=(0,y.withNotices)((e=>{const{label:t=(0,x.__)(" Image:"),icon:n="format-image",value:o={},onChange:i,noticeOperations:s,noticeUI:a}=e;return(0,l.jsx)(h.MediaPlaceholder,{labels:{title:t},icon:n,allowedTypes:["image"],accept:"image/*",onSelect:({id:e,url:t,alt:n,title:s})=>i({...o,id:e,url:t,alt:n,title:s}),onSelectURL:e=>i({...o,id:null,url:e,alt:"",title:""}),onError:e=>s.createErrorNotice(e),notices:a})})),nd=e=>{const{className:t="",label:n=(0,x.__)("Shadow"),value:o,onChange:i,defaults:s={},type:a="box"}=e,r={hOffset:"0px",vOffset:"0px",blur:"0px",spreed:"0px",color:"#7090b0",isInset:!1},c=e=>s?.[e]||r[e],d=e=>o?.[e]||c(e),u=(e,t)=>i({...o,[e]:t}),p=e=>(0,l.jsx)(y.Button,{icon:"image-rotate",className:"bPlResetVal",onClick:()=>(e=>i({...o,[e]:c(e)}))(e)});return(0,l.jsxs)(y.PanelRow,{className:`bPlDropdown ${t}`,children:[(0,l.jsx)(v,{className:"mt5",children:n}),(0,l.jsx)(y.Dropdown,{className:"bPlDropdownContainer",contentClassName:"bPlDropdownPopover",popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,l.jsx)(y.Button,{icon:"edit",onClick:t,"aria-expanded":e}),renderContent:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Horizontal Offset:"),labelPosition:"left",value:d("hOffset"),onChange:e=>u("hOffset",e),units:[Ee(),Ae(),Be()]}),o?.hOffset&&o?.hOffset!==c("hOffset")&&p("hOffset")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Vertical Offset:"),labelPosition:"left",value:d("vOffset"),onChange:e=>u("vOffset",e),units:[Ee(),Ae(),Be()]}),o?.vOffset&&o?.vOffset!==c("vOffset")&&p("vOffset")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Blur:"),labelPosition:"left",value:d("blur"),onChange:e=>u("blur",e),units:[Ee(),Ae(),Be()]}),o?.blur&&o?.blur!==c("blur")&&p("blur")]}),(0,l.jsx)("small",{children:(0,x.__)("Blur cannot be negative value!")}),"box"===a&&(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Spreed:"),labelPosition:"left",value:d("spreed"),onChange:e=>u("spreed",e),units:[Ee(),Ae(),Be()]}),o?.spreed&&o?.spreed!==c("spreed")&&p("spreed")]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:"),value:d("color"),onChange:e=>u("color",e),defaultColor:c("color")}),"box"===a&&(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Shadow Inset?"),checked:d("isInset"),onChange:e=>u("isInset",e),__nextHasNoMarginBottom:!0})]})})]})},od=e=>{const{className:t="",label:n=(0,x.__)("Space:"),value:o,onChange:i,defaults:s={}}=e,a={side:2,vertical:"0px",horizontal:"0px",top:"0px",right:"0px",bottom:"0px",left:"0px"},r=e=>s?.[e]||a[e],c=e=>o?.[e]||r(e),d=(e,t)=>i({...o,[e]:t}),u=e=>parseInt(c(e)?.replace(/([a-z])+/g,"")),p=e=>null!=e&&"object"==typeof e;return(0,l.jsxs)("div",{className:`bPlSpaceControl ${t}`,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:n}),(0,l.jsxs)(y.ButtonGroup,{className:"bPlBtnGroup",children:[(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Vertical, Horizontal"),placement:"top",position:"top",children:(0,l.jsxs)(y.Button,{className:"side2",size:"small",isPrimary:2===c("side"),"aria-pressed":2===c("side"),onClick:()=>i({...o,side:2,vertical:(u("top")+u("bottom"))/2+"px",horizontal:(u("left")+u("right"))/2+"px"}),children:[(0,l.jsx)("span",{className:"scrollIcon",children:ct}),(0,l.jsx)("span",{className:"sideScrollIcon",children:ct})]})}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Top, Right, Bottom, Left"),placement:"top",position:"top",children:(0,l.jsxs)(y.Button,{size:"small",isPrimary:4===c("side"),"aria-pressed":4===c("side"),onClick:()=>i({...o,side:4,top:c("vertical"),right:c("horizontal"),bottom:c("vertical"),left:c("horizontal")}),children:[(0,l.jsx)(y.Dashicon,{icon:"arrow-up-alt"}),(0,l.jsx)(y.Dashicon,{icon:"arrow-right-alt"}),(0,l.jsx)(y.Dashicon,{icon:"arrow-down-alt"}),(0,l.jsx)(y.Dashicon,{icon:"arrow-left-alt"})]})})]}),!((e,t,n)=>{const o=Object.keys(e||{}).filter((e=>"styles"!==e)),i=(e,t)=>{const n=Object.keys(e);for(const o of n){const n=e[o],s=t[o],a=p(n)&&p(s);if(a&&!i(n,s)||!a&&n!==s)return!1}return!0};for(const s of o){const o=e[s],a=t[s],r=n[s],l=p(o)&&p(a),c=p(o)&&p(r);if(a){if(l&&!i(o,a)||!l&&o!==a)return!1}else if(c&&!i(o,r)||!c&&o!==r)return!1}return!0})(o,s,a)&&(0,l.jsx)(y.Button,{icon:"image-rotate",className:"bPlResetVal",onClick:()=>{const e={side:r("side"),vertical:r("vertical"),horizontal:r("horizontal"),top:r("top"),right:r("right"),bottom:r("bottom"),left:r("left")};i({...o,...e})}})]}),2===c("side")&&(0,l.jsxs)(y.PanelRow,{className:"twoColumn",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Top Bottom:"),labelPosition:"top",value:c("vertical"),onChange:e=>d("vertical",e),units:[Ee(),Pe(),Ae(),Be()]}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Left Right:"),labelPosition:"top",value:c("horizontal"),onChange:e=>d("horizontal",e),units:[Ee(),Pe(),Ae(),Be()]})]}),4===c("side")&&(0,l.jsxs)(y.PanelRow,{className:"fourColumn",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Top:"),labelPosition:"top",value:c("top"),onChange:e=>d("top",e),units:[Ee(),Pe(),Ae(),Be()]}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0, |
| 287 |
x.__)("Right:"),labelPosition:"top",value:c("right"),onChange:e=>d("right",e),units:[Ee(),Pe(),Ae(),Be()]}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Bottom:"),labelPosition:"top",value:c("bottom"),onChange:e=>d("bottom",e),units:[Ee(),Pe(),Ae(),Be()]}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Left:"),labelPosition:"top",value:c("left"),onChange:e=>d("left",e),units:[Ee(),Pe(),Ae(),Be()]})]})]})},id=[{label:(0,x.__)("General","b-blocks"),value:"general"},{label:(0,x.__)("Success","b-blocks"),value:"success"},{label:(0,x.__)("Info","b-blocks"),value:"info"},{label:(0,x.__)("Warning","b-blocks"),value:"warning"},{label:(0,x.__)("Error","b-blocks"),value:"error"},{label:(0,x.__)("Minimal","b-blocks"),value:"minimal"}],sd=e=>({general:{color:"#333",icon:"fa-solid fa-bell"},success:{color:"#12b878",icon:"fa-regular fa-circle-check"},info:{color:"#2cacff",icon:"fa-solid fa-circle-info"},warning:{color:"#f1ae2a",icon:"fa-solid fa-gear"},error:{color:"#db4b68",icon:"fa-solid fa-circle-exclamation"}}[e]),ad=(e,t,n)=>"minimal"===e?{width:"0px",icon:{class:sd("info").icon},isDismiss:"minimal"!==e,colors:{color:"#00AB6D",bg:"#fff"},padding:{vertical:"10px",horizontal:"13px"},border:{...t,color:"#00AB6D",radius:"50px"},shadow:{...n,blur:"10px",color:"#00AB6D"}}:{width:"100%",icon:{class:sd(e).icon},isDismiss:"minimal"!==e,colors:{color:sd(e).color,bg:`${sd(e).color}1a`},padding:{vertical:"15px",horizontal:"30px"},border:{...t,color:sd(e).color,radius:"8px"},shadow:{}},rd=({attributes:e,setAttributes:t})=>{const{type:n,width:o,alignment:i,textAlign:s,icon:a,isDismiss:r,typography:c,colors:d,padding:u,border:p,shadow:g}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:an}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Alert Settings","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:n,onChange:e=>t({type:e,...ad(e,p,g)}),options:id})]}),(0,l.jsx)("small",{children:(0,x.__)("Some settings may change when type will be changed.","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:o,onChange:e=>t({width:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)("small",{children:(0,x.__)("Keep width 0, to auto width.","b-blocks")}),(0,l.jsx)(Un,{label:(0,x.__)("Alert Icon:","b-blocks"),value:a,onChange:e=>t({icon:e}),defaults:{class:"fa-solid fa-bell"},isSize:!1,isColor:!1}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Alert Dismissible?","b-blocks"),checked:r,onChange:e=>t({isDismiss:e})}),(0,l.jsx)(Os,{className:"mt20",label:(0,x.__)("Typography:","b-blocks"),value:c,onChange:e=>t({typography:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20}}}),(0,l.jsx)(On,{value:d,onChange:e=>t({colors:e}),defaults:{color:"#333",bg:"#fff"}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:u,onChange:e=>t({padding:e}),defaults:{vertical:"15px",horizontal:"30px"}}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:p,onChange:e=>t({border:e}),defaults:{width:"2px",color:"#333",radius:"8px"}}),(0,l.jsx)(nd,{label:(0,x.__)("Shadow:","b-blocks"),value:g,onChange:e=>t({shadow:e})})]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.AlignmentToolbar,{value:i,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Alert Alignment"),alignmentControls:[{title:(0,x.__)("Alert in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Alert in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Alert in right","b-blocks"),align:"right",icon:"align-right"}]}),(0,l.jsx)(h.AlignmentToolbar,{value:s,onChange:e=>t({textAlign:e})})]})]})},ld="bBlocksAlert",cd=({attributes:e,id:t})=>{const{width:n,alignment:o,textAlign:i,typography:s,colors:a,padding:r,border:c,shadow:d}=e,u=`#${t} .${ld} .alert`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",s)?.googleFontLink}\n\t\t${pa(u,s)?.styles}\n\n\t\t${u}{\n\t\t\ttext-align: ${o};\n\t\t}\n\t\t${u}{\n\t\t\ttext-align: ${i};\n\t\t\twidth: ${["0px","0%","0em"].includes(n)?"auto":n};\n\t\t\t${aa(a)}\n\t\t\tpadding: ${ua(r)};\n\t\t\t${ia(c)}\n\t\t\tbox-shadow: ${da(d)};\n\t\t}\n\t\t${u} .alertIcon{\n\t\t\tfont-size: ${s?.fontSize?.desktop};\n\t\t\tcolor: ${a?.color};\n\t\t}\n\t\t${u} .alertClose{\n\t\t\tcolor: ${a?.color};\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${u} .alertIcon{\n\t\t\t\tfont-size: ${s?.fontSize?.tablet};\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${u} .alertIcon{\n\t\t\t\tfont-size: ${s?.fontSize?.mobile};\n\t\t\t}c\n\t\t}\n\t\t`.replace(/\s+/g," ")}})};Nl(Zc.name)&&(0,p.registerBlockType)(Zc,{icon:ar,transforms:{from:[{type:"block",blocks:["abb/alert-box"],transform:e=>(0,p.createBlock)("b-blocks/alert",e)},{type:"block",blocks:["core/paragraph"],transform:({content:e,align:t})=>(0,p.createBlock)("b-blocks/alert",{message:e,textAlign:t})},{type:"block",blocks:["core/heading"],transform:({content:e,textAlign:t})=>(0,p.createBlock)("b-blocks/alert",{message:e,textAlign:t})},{type:"prefix",prefix:"alert",transform:()=>(0,p.createBlock)("b-blocks/alert")}],to:[{type:"block",blocks:["abb/alert-box"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("abb/alert-box",e)},{type:"block",blocks:["core/paragraph"],isMatch:({message:e})=>!!e,transform:({message:e,textAlign:t})=>(0,p.createBlock)("core/paragraph",{content:e,align:t})},{type:"block",blocks:["core/heading"],isMatch:({message:e})=>!!e,transform:({message:e,textAlign:t})=>(0,p.createBlock)("core/heading",{content:e,textAlign:t})}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e,{message:s,icon:a,isDismiss:r}=t;return(0,m.useEffect)((()=>me()),[i]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(rd,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(cd,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{className:ld,children:(0,l.jsxs)("div",{className:"alert",children:[a?.class&&(0,l.jsx)("i",{className:`alertIcon ${a?.class}`}),(0,l.jsx)(h.RichText,{className:"alertMessage",tagName:"span",value:s,onChange:e=>n({message:e}),placeholder:(0,x.__)("Alert Message","b-blocks"),inlineToolbar:!0}),r&&(0,l.jsx)(y.Tooltip,{text:"Hide will only work in frontend",placement:"top",position:"top",children:(0,l.jsx)("i",{className:"alertClose fa fa-times-circle"})})]})})]})]})},save:()=>null});const dd=JSON.parse('{"apiVersion":3,"name":"b-blocks/animated-text","title":"Animated Text","description":"Apply animation on any text.","category":"bBlocks","keywords":["animated text","text animation","text animated"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"loop":{"type":"boolean","default":true},"animateIn":{"type":"string","default":"char"},"inEffect":{"type":"string","default":"fadeInLeftBig"},"inSequence":{"type":"string","default":"default"},"outEffect":{"type":"string","default":"rollOut"},"outSequence":{"type":"string","default":"shuffle"},"textAlign":{"type":"string","default":"center"},"background":{"type":"object","default":{"color":"#0000"}},"content":{"type":"string","default":"Animated text for animation","selector":".atbAnimatedText .content"},"typography":{"type":"object","default":{"fontSize":{"desktop":"22px","tablet":"20px","mobile":"18px"}}},"color":{"type":"string","default":"#333"},"padding":{"type":"object","default":{"vertical":"15px","horizontal":"15px"}},"border":{"type":"object","default":{"radius":"5px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","animate"],"render":"file:./render.php","viewScript":["file:./view.js","textillate"]}'),ud=[{label:(0,x.__)("Char","b-blocks"),value:"char"},{label:(0,x.__)("Word","b-blocks"),value:"word"}],pd=[{label:(0, |
| 288 |
x.__)("Flash","b-blocks"),value:"flash"},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce"},{label:(0,x.__)("Shake","b-blocks"),value:"shake"},{label:(0,x.__)("Tada","b-blocks"),value:"tada"},{label:(0,x.__)("Swing","b-blocks"),value:"swing"},{label:(0,x.__)("Wobble","b-blocks"),value:"wobble"},{label:(0,x.__)("Pulse","b-blocks"),value:"pulse"},{label:(0,x.__)("Flip","b-blocks"),value:"flip"}],hd=[{label:(0,x.__)("Fade In","b-blocks"),value:"fadeIn"},{label:(0,x.__)("Flip In X","b-blocks"),value:"flipInX"},{label:(0,x.__)("Flip In Y","b-blocks"),value:"flipInY"},{label:(0,x.__)("Fade In Up","b-blocks"),value:"fadeInUp"},{label:(0,x.__)("Fade In Down","b-blocks"),value:"fadeInDown"},{label:(0,x.__)("Fade In Left","b-blocks"),value:"fadeInLeft"},{label:(0,x.__)("Fade In Right","b-blocks"),value:"fadeInRight"},{label:(0,x.__)("Fade In Up Big","b-blocks"),value:"fadeInUpBig"},{label:(0,x.__)("Fade In Down Big","b-blocks"),value:"fadeInDownBig"},{label:(0,x.__)("Fade In Left Big","b-blocks"),value:"fadeInLeftBig"},{label:(0,x.__)("Fade In Right Big","b-blocks"),value:"fadeInRightBig"},{label:(0,x.__)("Bounce In","b-blocks"),value:"bounceIn"},{label:(0,x.__)("Bounce In Up","b-blocks"),value:"bounceInUp"},{label:(0,x.__)("Bounce In Down","b-blocks"),value:"bounceInDown"},{label:(0,x.__)("Bounce In Left","b-blocks"),value:"bounceInLeft"},{label:(0,x.__)("Bounce In Right","b-blocks"),value:"bounceInRight"},{label:(0,x.__)("Rotate In","b-blocks"),value:"rotateIn"},{label:(0,x.__)("Rotate In Up Left","b-blocks"),value:"rotateInUpLeft"},{label:(0,x.__)("Rotate In Up Right","b-blocks"),value:"rotateInUpRight"},{label:(0,x.__)("Rotate In Down Left","b-blocks"),value:"rotateInDownLeft"},{label:(0,x.__)("Rotate In Down Right","b-blocks"),value:"rotateInDownRight"},{label:(0,x.__)("Roll In","b-blocks"),value:"rollIn"}],gd=[{label:(0,x.__)("Fade Out","b-blocks"),value:"fadeOut"},{label:(0,x.__)("Flip Out X","b-blocks"),value:"flipOutX"},{label:(0,x.__)("Flip Out Y","b-blocks"),value:"flipOutY"},{label:(0,x.__)("Fade Out Up","b-blocks"),value:"fadeOutUp"},{label:(0,x.__)("Fade Out Down","b-blocks"),value:"fadeOutDown"},{label:(0,x.__)("Fade Out Left","b-blocks"),value:"fadeOutLeft"},{label:(0,x.__)("Fade Out Right","b-blocks"),value:"fadeOutRight"},{label:(0,x.__)("Fade Out Up Big","b-blocks"),value:"fadeOutUpBig"},{label:(0,x.__)("Fade Out Down Big","b-blocks"),value:"fadeOutDownBig"},{label:(0,x.__)("Fade Out Left Big","b-blocks"),value:"fadeOutLeftBig"},{label:(0,x.__)("Fade Out Right Big","b-blocks"),value:"fadeOutRightBig"},{label:(0,x.__)("Bounce Out","b-blocks"),value:"bounceOut"},{label:(0,x.__)("Bounce Out Up","b-blocks"),value:"bounceOutUp"},{label:(0,x.__)("Bounce Out Down","b-blocks"),value:"bounceOutDown"},{label:(0,x.__)("Bounce Out Left","b-blocks"),value:"bounceOutLeft"},{label:(0,x.__)("Bounce Out Right","b-blocks"),value:"bounceOutRight"},{label:(0,x.__)("Rotate Out","b-blocks"),value:"rotateOut"},{label:(0,x.__)("Rotate Out Up Left","b-blocks"),value:"rotateOutUpLeft"},{label:(0,x.__)("Rotate Out Up Right","b-blocks"),value:"rotateOutUpRight"},{label:(0,x.__)("Rotate Out Down Left","b-blocks"),value:"rotateOutDownLeft"},{label:(0,x.__)("Rotate Out Down Right","b-blocks"),value:"rotateOutDownRight"},{label:(0,x.__)("Hinge","b-blocks"),value:"hinge"},{label:(0,x.__)("Roll Out","b-blocks"),value:"rollOut"}],md=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Sync","b-blocks"),value:"sync"},{label:(0,x.__)("Shuffle","b-blocks"),value:"shuffle"},{label:(0,x.__)("Reverse","b-blocks"),value:"reverse"}],bd=({attributes:e,setAttributes:t})=>{const{loop:n,animateIn:o,inEffect:i,inSequence:s,outEffect:a,outSequence:r,textAlign:c,background:d,content:u,typography:p,color:g,padding:m,border:b}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:rn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animated Text Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Animate text:","b-blocks")}),(0,l.jsx)(y.TextareaControl,{value:u,onChange:e=>t({content:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Loop","b-blocks"),checked:n,onChange:e=>t({loop:e})}),(0,l.jsx)("small",{children:(0,x.__)("Loop will not work instantly in editor! you have to refresh the page.","b-blocks")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Animate in:","b-blocks")}),(0,l.jsx)(Tn,{value:o,onChange:e=>t({animateIn:e}),options:ud})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("In Effect:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i,onChange:e=>t({inEffect:e}),options:[...pd,...hd]})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("In Sequence:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:s,onChange:e=>t({inSequence:e}),options:md})]}),n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Out Effect:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:a,onChange:e=>t({outEffect:e}),options:[...pd,...gd]})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Out Sequence:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:r,onChange:e=>t({outSequence:e}),options:md})]})]})]})]}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animated Text Style","b-blocks"),children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:d,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(Os,{className:"mt20",label:(0,x.__)("Typography:","b-blocks"),value:p,onChange:e=>t({typography:e}),defaults:{fontSize:{desktop:22,tablet:20,mobile:18}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:g,onChange:e=>t({color:e}),defaultColor:"#333"}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:m,onChange:e=>t({padding:e}),defaults:{vertical:"15px",horizontal:"15px"}}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:b,onChange:e=>t({border:e}),defaults:{radius:"5px"}})]})})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:c,onChange:e=>t({textAlign:e})})})]})},fd="bBlocksAnimatedText",xd=({attributes:e,id:t})=>{const{textAlign:n,background:o,typography:i,color:s,padding:a,border:r}=e,c=`#${t} .${fd}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",i)?.googleFontLink}\n\t\t${pa(`${c} .content`,i)?.styles}\n\n\t\t${c}{\n\t\t\ttext-align: ${n};\n\t\t\t${oa(o)}\n\t\t\tpadding: ${ua(a)};\n\t\t\t${ia(r)}\n\t\t}\n\t\t${c} .content{\n\t\t\tcolor: ${s};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},yd=jQuery;Nl(dd.name)&&(0,p.registerBlockType)(dd,{icon:rr,transforms:{from:[{type:"block",blocks:["atb/animated-text"],transform:e=>(0,p.createBlock)("b-blocks/animated-text",e)},{type:"block",blocks:["b-blocks/alert"],transform:({message:e,textAlign:t})=>(0,p.createBlock)("b-blocks/animated-text",{content:e,textAlign:t})},{type:"block",blocks:["core/paragraph"],transform:({content:e,align:t})=>(0,p.createBlock)("b-blocks/animated-text",{content:e,textAlign:t})},{type:"block",blocks:["core/heading"],transform:({content:e,textAlign:t})=>(0,p.createBlock)("b-blocks/animated-text",{content:e,textAlign:t})},{type:"prefix",prefix:"animated-text",transform:()=>(0,p.createBlock)("b-blocks/animated-text")}],to:[{type:"block",blocks:["atb/animated-text"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("atb/animated-text",e)},{type:"block",blocks:["core/paragraph"],isMatch:({content:e})=>!!e,transform:({content:e,textAlign:t})=>(0,p.createBlock)("core/paragraph",{content:e,align:t})},{type:"block",blocks:["b-blocks/alert"],isMatch:({content:e})=>!!e, |
| 289 |
transform:({content:e,textAlign:t})=>(0,p.createBlock)("b-blocks/alert",{message:e,textAlign:t})},{type:"block",blocks:["core/heading"],isMatch:({content:e})=>!!e,transform:({content:e,textAlign:t})=>(0,p.createBlock)("core/heading",{content:e,textAlign:t})}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{loop:i,animateIn:s,inEffect:a,inSequence:r,outEffect:c,outSequence:d,content:u}=t,p=`block-${o}`,g=(0,m.useRef)(null);return(0,m.useEffect)((()=>{g.current&&yd(g.current).textillate((e=>{const{loop:t,animateIn:n,inEffect:o,inSequence:i,outEffect:s,outSequence:a}=e;return{loop:t,minDisplayTime:2e3,initialDelay:0,autoStart:!0,inEffects:[],outEffects:["hinge"],in:{effect:o,delayScale:1.5,delay:50,sync:"sync"===i,shuffle:"shuffle"===i,reverse:"reverse"===i},out:{effect:s,delayScale:1.5,delay:50,sync:"sync"===a,shuffle:"shuffle"===a,reverse:"reverse"===a},type:n}})(t))}),[i,s,a,r,c,d,u]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(bd,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(xd,{attributes:t,id:p}),(0,l.jsx)("div",{className:fd,children:(0,l.jsx)("p",{className:"content",ref:g,children:u})})]})]})},save:()=>null}) |
| 290 |
;const vd=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/advanced-tabs","title":"Advanced Tabs","category":"bBlocks","description":"Display content in responsive, customizable tabs with support for nested blocks and flexible layouts.","keywords":["tabs","tab","content","advanced tabs","tab content"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"clientId":{"type":"string","default":""},"tabLists":{"type":"array","default":[{"title":"Tab 1","subTitle":"","id":1,"iconType":"none","image":"","svg":"","library":"","iconPosition":"left","isExpanded":true,"isDefault":true,"customId":""},{"title":"Tab 2","subTitle":"","id":2,"iconType":"none","image":"","svg":"","library":"","iconPosition":"left","isExpanded":false,"isDefault":false,"customId":""},{"title":"Tab 3","subTitle":"","id":3,"iconType":"none","image":"","svg":"","library":"","iconPosition":"left","isExpanded":false,"isDefault":false,"customId":""}]},"tabs":{"type":"object","default":{"desktop":{"direction":"row","columnJustify":"center","rowJustify":"","contentAlign":"center","wrap":"nowrap"},"tablet":{"direction":"","columnJustify":"","rowJustify":"","contentAlign":"center","wrap":""},"mobile":{"direction":"","columnJustify":"","rowJustify":"","contentAlign":"center","wrap":""},"isShowTitle":true,"isShowSubTitle":false,"isShowActiveSubTitle":false,"isShowIcon":false,"isCloseAllTab":false}},"styles":{"type":"object","default":{"tabContainer":{"bg":{},"border":{},"desktop":{"spaceBetween":"","padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"spaceBetween":"","padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"spaceBetween":"","padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}}},"tabs":{"normal":{"normal":{"bg":{"color":"#eeeeee"},"border":{},"desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}}},"hover":{"bg":{},"border":{},"desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"transition":0.2}},"active":{"normal":{"bg":{"color":"#146EF5"},"border":{},"desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"transition":0.2},"hover":{"bg":{},"border":{},"desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"transition":0.2}},"desktop":{"gap":"10px","width":""},"tablet":{"gap":"10px","width":""},"mobile":{"gap":"10px","width":""}},"tabTitle":{"typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""}},"normal":{"normal":{"color":"#242424"},"hover":{"color":""}},"active":{"normal":{"color":"#fff"},"hover":{"color":""}}},"tabSubTitle":{"typography":{"fontSize":{"desktop":"14px","tablet":"","mobile":""}},"normal":{"normal":{"color":"#242424"},"hover":{"color":""}},"active":{"normal":{"color":"#fff"},"hover":{"color":""}}},"icon":{"desktop":{"size":"","position":"row"},"tablet":{"size":"","position":""},"mobile":{"size":"","position":""},"normal":{"normal":{"color":"#242424","bg":{},"border":{},"desktop":{"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"tablet":{"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"mobile":{"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}}},"hover":{"color":"","bg":{},"border":{},"desktop":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"tablet":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"mobile":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}}},"transition":0.2},"active":{"normal":{"color":"#fff","bg":{},"border":{},"desktop":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"tablet":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"mobile":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}}},"hover":{"color":"","bg":{},"border":{},"desktop":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"tablet":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"mobile":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}}},"transition":0.2}},"content":{"bg":{},"border":{},"desktop":{"padding":{},"margin":{},"radius":{},"width":""},"tablet":{"padding":{},"margin":{},"radius":{},"width":""},"mobile":{"padding":{},"margin":{},"radius":{},"width":""}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","lodash"],"render":"file:./render.php","viewScript":"file:./view.js","style":"file:./view.css"}'),kd=[{ |
| 291 |
name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],wd=()=>{const[e,t]=(0,m.useState)("desktop"),n=()=>{const e=window.innerWidth;t(e>1024?"desktop":e>640?"tablet":"mobile")};return(0,m.useEffect)((()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)})),[]),{device:e}},_d=(e,t={},n=!0)=>{const[o,i]=(0,m.useState)(!1),[s,a]=(0,m.useState)(!1),[r,l]=(0,m.useState)(null),[c,d]=(0,m.useState)(null);if(!wp.ajax)return void console.error("Please use wp-util as a dependency");const u=(n={})=>{i(!0),a(!1),l(null),wp.ajax.post(e,{...t,...n}).done((e=>{i(!1),d(e)})).fail((e=>{i(!1),a(!0),l(e)}))},p=(e={})=>{u(e)};return(0,m.useEffect)((()=>{n&&u(t)}),[]),{data:c,saveData:p,refetch:p,isLoading:o,isError:s,error:r}},Cd=e=>{const[t,n]=(0,m.useState)(!0),[o,i]=(0,m.useState)(!1),[s,a]=(0,m.useState)(null),[r,l]=(0,m.useState)(null);(0,m.useEffect)((()=>{i(!1),a(null),wp.api.loadPromise.then((()=>{(new wp.api.models.Settings).fetch().then((t=>{l(c(t[e])),n(!1)}))}))}),[]);const c=e=>{let t=e;try{t=JSON.parse(e)}catch(e){i(!0),a(e.message)}return t};return{data:r,isLoading:t,isError:o,error:s}},jd=()=>{const e=window?.wp?.Uploader?.defaults||window?._wpPluploadSettings?.defaults,t=e?.filters?.mime_types;Array.isArray(t)&&t.forEach((e=>{const t=String(e?.extensions||"");t.split(",").includes("svg")||(e.extensions=t?`${t},svg`:"svg")}))},$d=({attributes:e,setAttributes:t,index:n,updateObj:o})=>{const{tabLists:i,tabs:s}=e,{isCloseAllTab:a}=s,r=i[n],{data:c}=Cd("bBlocksUtils"),{refetch:d}=_d("b-blocks-enable-svg-mime-type",{_wpnonce:c?.nonce},!1),u=new Tt;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Initial Active","b-blocks"),checked:r.isDefault,value:r.isDefault,onChange:()=>{const e=i.map(((e,t)=>t===n?{...e,isDefault:!0}:{...e,isDefault:!1}));a||t({tabLists:e})}}),(0,l.jsx)(y.TextControl,{type:"text",className:"mt10",label:(0,x.__)("Title","b-blocks"),value:r.title,onChange:e=>o("tabLists",e,n,"title")}),(0,l.jsx)(y.TextareaControl,{rows:2,className:"mt10",label:(0,x.__)("Sub Title","b-blocks"),value:r.subTitle,onChange:e=>o("tabLists",e,n,"subTitle")}),(0,l.jsx)(v,{children:(0,x.__)("Icon Type","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:r.iconType,onChange:e=>o("tabLists",e,n,"iconType"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"None",value:"none"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Library",value:"library"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Upload SVG",value:"svg"})]}),"library"===r.iconType&&(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Icon Library","b-blocks"),value:r.library,onChange:e=>o("tabLists",e,n,"library")}),"svg"===r.iconType&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(we,{className:"mt10",label:(0,x.__)("Upload SVG","b-blocks"),types:["image/svg+xml"],onClick:()=>(jd(),d()),value:{url:r.svg},onChange:async e=>{const t=e?.url?await u.sanitizeFile(e?.url):"";o("tabLists",t,n,"svg")},isSvgEnabled:!0})})]})},Sd=({clientId:e,tabLists:t,setAttributes:n,handleTabTitleClick:o})=>{const i=[...(0,f.select)("core/block-editor").getBlocks(e)],s=(t||[]).reduce(((e,t)=>Math.max(Number(e),Number(t?.id||0))),0)+1,a={title:`Tab ${s}`,subTitle:"",id:s,iconType:"none",image:"",svg:"",library:"",isExpanded:!1,isDefault:!1,customId:""},r=(0,p.createBlock)("b-blocks/container",{lock:{remove:!0,move:!0},className:"b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-"+s});i.push(r),(0,f.dispatch)("core/block-editor").replaceInnerBlocks(e,i,!1).then((()=>{n({tabLists:[...t||[],a]}),o&&o(String(s))}))},Td=e=>{const{attributes:t,setAttributes:n,updateObj:o,clientId:i,activeIndex:s,setActiveIndex:a}=e,{tabLists:r}=t,c={title:`Tab ${r.length+1}`,subTitle:"",id:r.length+1,iconType:"none",image:"",svg:"",library:"",isExpanded:!1,isDefault:!1,customId:""};return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tab Lists","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_s,{attributes:t,setAttributes:n,handleAdd:()=>{Sd({clientId:i,blockId:"",tabLists:r,setAttributes:n})},handleDelete:e=>{const t=[...(0,f.select)("core/block-editor").getBlocks(i)],o=r[e];o?.id&&t.forEach(((s,a)=>{if(s?.attributes?.className.split(" ").includes(`b-blocks-advanced-tabs-panel-${o?.id}`)){const o=[...t.slice(0,a),...t.slice(a+1)];(0,f.dispatch)("core/block-editor").replaceInnerBlocks(i,o,!1);const s=[...r.slice(0,e),...r.slice(e+1)];n({tabLists:s})}}))},newItem:c,design:"sortable",itemLabel:"Tab",arrKey:"tabLists",title:"title",ItemSettings:$d,handleCopy:e=>{const t=(r||[]).reduce(((e,t)=>Math.max(Number(e),Number(t?.id||0))),0),o=[...(0,f.select)("core/block-editor").getBlocks(i)],s=r[e];s?.id&&o.forEach(((o,a)=>{if(o?.attributes?.className.split(" ").includes(`b-blocks-advanced-tabs-panel-${s?.id}`)){const l=(0,p.createBlock)(o.name,{...o.attributes,className:`b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-${t+1}`,lock:{remove:!0,move:!0}},o?.innerBlocks?.length>0?o?.innerBlocks:[]);(0,f.dispatch)("core/block-editor").insertBlocks(l,a+1,i);const c=[...r.slice(0,e),{...s,id:t+1},...r.slice(e)];n({tabLists:c}),(0,f.dispatch)("core/block-editor").selectBlock(i)}}))},minItem:0,updateObj:o,activeIndex:s,setActiveIndex:a})})},Md=e=>{const{attributes:t,updateObj:n,setAttributes:o}=e,{tabs:i,tabLists:s}=t;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Title","b-blocks"),checked:i?.isShowTitle,value:i.isShowTitle,onChange:e=>n("tabs",e,"isShowTitle")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Sub Title","b-blocks"),checked:i?.isShowSubTitle,value:i.isShowSubTitle,onChange:e=>n("tabs",e,"isShowSubTitle")}),i.isShowSubTitle&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Only Tab Active Sub Title","b-blocks"),checked:i?.isShowActiveSubTitle,value:i.isShowActiveSubTitle,onChange:e=>n("tabs",e,"isShowActiveSubTitle")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Icon","b-blocks"),checked:i?.isShowIcon,value:i.isShowIcon,onChange:e=>n("tabs",e,"isShowIcon")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Close All Tabs Initially","b-blocks"),checked:i?.isCloseAllTab,value:i.isCloseAllTab,onChange:e=>{const t=e?s?.map((e=>({...e,isDefault:!1}))):s?.map(((e,t)=>({...e,isDefault:0===t})));o({tabLists:t,tabs:{...i,isCloseAllTab:e}})}})]})},Nd=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M12 10l0 10"}),(0,l.jsx)("path",{d:"M12 10l4 4"}),(0,l.jsx)("path",{d:"M12 10l-4 4"}),(0,l.jsx)("path",{d:"M4 4l16 0"})]}),Ld=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M4 20l16 0"}),(0,l.jsx)("path",{d:"M12 14l0 -10"}),(0,l.jsx)("path",{d:"M12 14l4 -4"}),(0,l.jsx)("path",{d:"M12 14l-4 -4"})]}),Ed=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M10 12l10 0"}),(0,l.jsx)("path",{d:"M10 12l4 4"}),(0,l.jsx)("path",{d:"M10 12l4 -4"}),(0,l.jsx)("path",{d:"M4 4l0 16"})]}),Pd=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M14 12l-10 0"}),(0,l.jsx)("path",{d:"M14 12l-4 4" |
| 292 |
}),(0,l.jsx)("path",{d:"M14 12l-4 -4"}),(0,l.jsx)("path",{d:"M20 4l0 16"})]}),Ad=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),Bd=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),Id=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),Od=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Items-Stretch--Streamline-Rounded-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M8 17.75c-0.2125 0 -0.3906 -0.0719 -0.53425 -0.21575C7.3219 17.3906 7.25 17.2125 7.25 17V7c0 -0.2125 0.0719 -0.39065 0.21575 -0.5345 0.14365 -0.14365 0.32175 -0.2155 0.53425 -0.2155h1c0.2125 0 0.39065 0.07185 0.5345 0.2155 0.14365 0.14385 0.2155 0.322 0.2155 0.5345v10c0 0.2125 -0.07185 0.3906 -0.2155 0.53425 -0.14385 0.14385 -0.322 0.21575 -0.5345 0.21575h-1Zm7 0c-0.2125 0 -0.3906 -0.0719 -0.53425 -0.21575C14.3219 17.3906 14.25 17.2125 14.25 17V7c0 -0.2125 0.0719 -0.39065 0.21575 -0.5345 0.14365 -0.14365 0.32175 -0.2155 0.53425 -0.2155h1c0.2125 0 0.39065 0.07185 0.5345 0.2155 0.14365 0.14385 0.2155 0.322 0.2155 0.5345v10c0 0.2125 -0.07185 0.3906 -0.2155 0.53425 -0.14385 0.14385 -0.322 0.21575 -0.5345 0.21575h-1ZM2.75 22c-0.2125 0 -0.390585 -0.07235 -0.53425 -0.217C2.071915 21.6385 2 21.45935 2 21.2455c0 -0.21365 0.071915 -0.39135 0.21575 -0.533C2.359415 20.57085 2.5375 20.5 2.75 20.5h18.5c0.2125 0 0.39065 0.07235 0.5345 0.217 0.14365 0.1445 0.2155 0.32365 0.2155 0.5375 0 0.21365 -0.07185 0.39135 -0.2155 0.533 -0.14385 0.14165 -0.322 0.2125 -0.5345 0.2125h-18.5Zm0 -18.5c-0.2125 0 -0.390585 -0.072335 -0.53425 -0.217C2.071915 3.1385 2 2.959335 2 2.7455c0 -0.213665 0.071915 -0.391335 0.21575 -0.533C2.359415 2.070835 2.5375 2 2.75 2h18.5c0.2125 0 0.39065 0.072335 0.5345 0.217 0.14365 0.1445 0.2155 0.323665 0.2155 0.5375 0 0.213665 -0.07185 0.391335 -0.2155 0.533 -0.14385 0.141665 -0.322 0.2125 -0.5345 0.2125h-18.5Z",strokeWidth:"0.5"})}),Rd=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),zd=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),Dd=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Fd=e=>(0,l.jsxs)("svg",{height:"16",viewBox:"0 0 512 512",width:"16",xmlns:"http://www.w3.org/2000/svg",...e,style:{height:"16px",width:"16px"},children:[(0,l.jsx)("path",{d:"m349.4 289.3h-13c-68.4 0-92.1.1-160.5-.1-26.4-.1-42.3-23.1-32.3-46.8 6.1-14.5 18-19.9 33.3-19.8 68 .1 91.3 0 159.4 0h14.7c-3.8-4.3-5.9-7.1-8.3-9.5-11.2-11-22.6-21.8-33.6-33-13.9-14.2-14.6-35.1-1.9-48.5 12.8-13.5 34.9-13.7 49.4.5 33.3 32.8 66.3 65.8 99.1 99.1 14.3 14.6 14.4 34.7.1 49.2-32.8 33.4-65.8 66.4-99.2 99.2-14.5 14.3-36.5 14.2-49.4.7s-11.9-34.4 2.4-49.3c13-13.4 25.7-26.9 39.8-41.7z"}),(0,l.jsx)("path",{d:"m112.3 256.1v226.7c0 21.3-21.9 34.3-45.4 27.3-13.6-4-21.3-13.7-21.3-27.2-.1-41.1 0-82.2 0-123.3 0-109.7 0-219.4 0-329.1 0-18.8 13.4-30.7 33.9-30.5 19.6.2 32.8 11.9 32.8 29.4.1 75.6.1 151.2 0 226.7z"})]}),Hd=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Format-Text-Wrap--Streamline-Rounded-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M4.7455 19.975c-0.213665 0 -0.391335 -0.0719 -0.533 -0.21575C4.070835 19.6156 4 19.4375 4 19.225V4.75c0 -0.2125 0.072335 -0.390665 0.217 -0.5345C4.3615 4.071835 4.540665 4 4.7545 4c0.213665 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.323665 0.21575 -0.5375 0.21575Zm14.5 0c-0.21365 0 -0.39135 -0.0719 -0.533 -0.21575 -0.14165 -0.14365 -0.2125 -0.32175 -0.2125 -0.53425V4.75c0 -0.2125 0.07235 -0.390665 0.217 -0.5345 0.1445 -0.143665 0.32365 -0.2155 0.5375 -0.2155 0.21365 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.32365 0.21575 -0.5375 0.21575ZM9.075 16.9l-2.15 -2.125c-0.15 -0.15 -0.225 -0.325 -0.225 -0.525s0.075 -0.375 0.225 -0.525l2.15 -2.125c0.15 -0.13335 0.32585 -0.20415 0.5275 -0.2125 0.20165 -0.00835 0.37585 0.0625 0.5225 0.2125 0.15 0.15 0.225 0.325 0.225 0.525s-0.075 0.375 -0.225 0.525l-0.85 0.85h4.475c0.7 0 1.29165 -0.24165 1.775 -0.725 0.48335 -0.48335 0.725 -1.075 0.725 -1.775s-0.24165 -1.29165 -0.725 -1.775C15.04165 8.74165 14.45 8.5 13.75 8.5H7c-0.2125 0 -0.3906 -0.07235 -0.53425 -0.217 -0.14385 -0.1445 -0.21575 -0.32365 -0.21575 -0.5375 0 -0.21365 0.0719 -0.39135 0.21575 -0.533C6.6094 7.07085 6.7875 7 7 7h6.75c1.1 0 2.04165 0.39165 2.825 1.175S17.75 9.9 17.75 11s-0.39165 2.04165 -1.175 2.825S14.85 15 13.75 15h-4.475l0.85 0.85c0.15 0.15 0.225 0.32635 0.225 0.529 0 0.20265 -0.07175 0.37765 -0.21525 0.525 -0.1565 0.14735 -0.3356 0.221 -0.53725 0.221s-0.37585 -0.075 -0.5225 -0.225Z",strokeWidth:"0.5"})}),Wd=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Format-Text-Wrap--Streamline-Rounded-Material",height:"24",width:"24",style:{rotate:"180deg"},...e,children:(0,l.jsx)("path",{ |
| 293 |
d:"M4.7455 19.975c-0.213665 0 -0.391335 -0.0719 -0.533 -0.21575C4.070835 19.6156 4 19.4375 4 19.225V4.75c0 -0.2125 0.072335 -0.390665 0.217 -0.5345C4.3615 4.071835 4.540665 4 4.7545 4c0.213665 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.323665 0.21575 -0.5375 0.21575Zm14.5 0c-0.21365 0 -0.39135 -0.0719 -0.533 -0.21575 -0.14165 -0.14365 -0.2125 -0.32175 -0.2125 -0.53425V4.75c0 -0.2125 0.07235 -0.390665 0.217 -0.5345 0.1445 -0.143665 0.32365 -0.2155 0.5375 -0.2155 0.21365 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.32365 0.21575 -0.5375 0.21575ZM9.075 16.9l-2.15 -2.125c-0.15 -0.15 -0.225 -0.325 -0.225 -0.525s0.075 -0.375 0.225 -0.525l2.15 -2.125c0.15 -0.13335 0.32585 -0.20415 0.5275 -0.2125 0.20165 -0.00835 0.37585 0.0625 0.5225 0.2125 0.15 0.15 0.225 0.325 0.225 0.525s-0.075 0.375 -0.225 0.525l-0.85 0.85h4.475c0.7 0 1.29165 -0.24165 1.775 -0.725 0.48335 -0.48335 0.725 -1.075 0.725 -1.775s-0.24165 -1.29165 -0.725 -1.775C15.04165 8.74165 14.45 8.5 13.75 8.5H7c-0.2125 0 -0.3906 -0.07235 -0.53425 -0.217 -0.14385 -0.1445 -0.21575 -0.32365 -0.21575 -0.5375 0 -0.21365 0.0719 -0.39135 0.21575 -0.533C6.6094 7.07085 6.7875 7 7 7h6.75c1.1 0 2.04165 0.39165 2.825 1.175S17.75 9.9 17.75 11s-0.39165 2.04165 -1.175 2.825S14.85 15 13.75 15h-4.475l0.85 0.85c0.15 0.15 0.225 0.32635 0.225 0.529 0 0.20265 -0.07175 0.37765 -0.21525 0.525 -0.1565 0.14735 -0.3356 0.221 -0.53725 0.221s-0.37585 -0.075 -0.5225 -0.225Z",strokeWidth:"0.5"})}),Ud=e=>{const{attributes:t,updateObj:n,device:o}=e,{tabs:i,styles:s}=t,{tabs:a,content:r}=s,c=["row","row-reverse"],d=["column","column-reverse"];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Layout","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{style:{padding:"2px"},className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i?.[o]?.direction,onChange:e=>{n("tabs",e,o,"direction")},size:"small",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Top",value:"column",icon:Nd}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Bottom",value:"column-reverse",icon:Ld}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"row-reverse",icon:Pd}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"row",icon:Ed})]})]}),d.includes(i?.[o]?.direction)&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Justify ","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o]?.columnJustify,onChange:e=>n("tabs",e,o,"columnJustify"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Ad,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Bd,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Id,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Stretch",value:"stretch",icon:(0,l.jsx)(Od,{style:{rotate:"-90deg"}})})]})]}),c.includes(i?.[o]?.direction)&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Justify ","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o]?.rowJustify,onChange:e=>n("tabs",e,o,"rowJustify"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Ad,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Bd,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Id,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Stretch",value:"stretch",icon:(0,l.jsx)(Od,{})})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Tab Content Alignment","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i?.[o]?.contentAlign,onChange:e=>n("tabs",e,o,"contentAlign"),isDeselectable:!0,size:"small",style:{padding:"2px"},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"start",icon:Rd}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:zd}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"end",icon:Dd})]})]}),d.includes(i?.[o]?.direction)&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Wrap","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i?.[o]?.wrap,onChange:e=>n("tabs",e,o,"wrap"),isDeselectable:!0,style:{padding:"2px"},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Wrap",value:"wrap",icon:(0,l.jsx)(Hd,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"No Wrap",value:"nowrap",icon:(0,l.jsx)(Fd,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Wrap Reverse",value:"wrap-reverse",icon:(0,l.jsx)(Wd,{})})]})]}),c.includes(i?.[o]?.direction)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Tabs Menu Width","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a[o].width,onChange:e=>n("styles",e,"tabs",o,"width")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Content Width","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r[o].width,onChange:e=>n("styles",e,"content",o,"width")})]})]})]})},Gd=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ud,{...e}),(0,l.jsx)(Td,{...e}),(0,l.jsx)(Md,{...e})]}),Vd=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{tabContainer:s}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tab Container","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:s[o].margin,onChange:e=>n("styles",e,"tabContainer",o,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:s[o].padding,onChange:e=>n("styles",e,"tabContainer",o,"padding")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:s.bg,onChange:e=>n("styles",e,"tabContainer","bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>n("styles",e,"tabContainer","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),values:s[o].radius,onChange:e=>n("styles",e,"tabContainer",o,"radius")})]})},qd=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("normal"),[s,a]=(0,m.useState)("normal"),{styles:r}=e,{icon:c}=r;return(0,l.jsxs)(y.PanelBody,{ |
| 294 |
className:"bPlPanelBody",title:(0,x.__)("Tabs Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),labelPosition:"edge",value:c[n].size,onChange:e=>t("styles",e,"icon",n,"size")}),(0,l.jsxs)(v,{children:[(0,x.__)("Icon Position","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:c[n].position,onChange:e=>t("styles",e,"icon",n,"position"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Top",value:"column"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Bottom",value:"column-reverse"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Left",value:"row"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Right",value:"row-reverse"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e),a("normal")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>a(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][s][n].margin,onChange:e=>t("styles",e,"icon",o,s,n,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][s][n].padding,onChange:e=>t("styles",e,"icon",o,s,n,"padding")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:c[o][s].color,onChange:e=>t("styles",e,"icon",o,s,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:c[o][s].bg,onChange:e=>t("styles",e,"icon",o,s,"bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:c[o][s].border,onChange:e=>t("styles",e,"icon",o,s,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][s][n].radius,onChange:e=>t("styles",e,"icon",o,s,n,"radius")})]})},Yd=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("normal"),[s,a]=(0,m.useState)("normal"),{styles:r}=e,{tabs:c}=r;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tabs","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Tabs Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",value:c[n].gap,onChange:e=>t("styles",e,"tabs",n,"gap")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e),a("normal")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>a(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][s][n].margin,onChange:e=>t("styles",e,"tabs",o,s,n,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][s][n].padding,onChange:e=>t("styles",e,"tabs",o,s,n,"padding")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:c[o][s].bg,onChange:e=>t("styles",e,"tabs",o,s,"bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:c[o][s].border,onChange:e=>t("styles",e,"tabs",o,s,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][s][n].radius,onChange:e=>t("styles",e,"tabs",o,s,n,"radius")}),"hover"===s&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),min:0,max:5,step:.01,value:c.normal.hover.transition,onChange:e=>t("styles",e,"tabs","normal","hover","transition")})]})},Kd=({attributes:e,updateObj:t})=>{const[n,o]=(0,m.useState)("normal"),[i,s]=(0,m.useState)("normal"),{styles:a}=e,{tabSubTitle:r}=a;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tabs SubTitle","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:r.typography,onChange:e=>t("styles",e,"tabSubTitle","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n,onChange:e=>{o(e),s("normal")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i,onChange:e=>s(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r[n][i].color,onChange:e=>t("styles",e,"tabSubTitle",n,i,"color")})]})},Qd=({attributes:e,updateObj:t})=>{const[n,o]=(0,m.useState)("normal"),[i,s]=(0,m.useState)("normal"),{styles:a}=e,{tabTitle:r}=a;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tabs Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:r.typography,onChange:e=>t("styles",e,"tabTitle","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n,onChange:e=>{o(e),s("normal")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i,onChange:e=>s(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r[n][i].color,onChange:e=>t("styles",e,"tabTitle",n,i,"color")})]})},Zd=e=>{const{attributes:t}=e,{tabs:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Vd,{...e}),(0,l.jsx)(Yd,{...e}),n.isShowTitle&&(0,l.jsx)(Qd,{...e}),n.isShowSubTitle&&(0,l.jsx)(Kd,{...e}),n.isShowIcon&&(0,l.jsx)(qd,{...e})]})},Xd=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:kd,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Gd,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Zd,{...e})})]})})})}),Jd=(e,o)=>{ |
| 295 |
const{tabs:i,styles:s}=e,{tabContainer:a,tabs:r,tabTitle:l,tabSubTitle:c,icon:d,content:u}=s,p=`#${o} .b-blocks-advanced-tabs-main-wrapper`,h=`${p} .b-blocks-advanced-tabs-wrapper`,g=`${h} .b-blocks-advanced-tabs-button-lists`,m=`${g} .b-blocks-advanced-tabs-button`,b=`${m}.b-blocks-advanced-tabs-button-active`,f=`${m}.b-blocks-advanced-tabs-button-normal`,x=`${m} .b-blocks-advanced-tabs-button-title-container`,y=`${x} .b-blocks-advanced-tabs-button-title`,v=`${b} .b-blocks-advanced-tabs-button-title`,k=`${x} .b-blocks-advanced-tabs-button-subTitle`,w=`${b} .b-blocks-advanced-tabs-button-subTitle`,_=`${m} .b-blocks-advanced-tabs-button-icon`,C=`${p} .b-blocks-advanced-tabs-contents`,j=(e="desktop")=>"row-reverse"===i?.[e].direction||"row"===i?.[e].direction,$=(e="desktop")=>"column"===i?.[e].direction||"column-reverse"===i?.[e].direction,S=(e="normal",t="normal",n="desktop")=>`\n\t\t\t\t\t${na("margin",ha(r[e][t][n].margin))}\n\t\t\t\t\t${na("padding",ha(r[e][t][n].padding))}\n\t\t\t\t\t${na("border-radius",ha(r[e][t][n].radius))}\n\t\t\t\t\t${"desktop"===n?oa(r[e][t].bg):""}\n\t\t\t\t\t${"desktop"===n?sa(r[e][t].border):""}\n\t\t\t\t`,T=(e="normal",t="normal",n="desktop")=>`\n\t\t\t\t${na("margin",ha(d[e][t][n].margin))}\n\t\t\t\t${na("padding",ha(d[e][t][n].padding))}\n\t\t\t\t${na("border-radius",ha(d[e][t][n].radius))}\n\t\t\t\t${"desktop"===n?oa(d[e][t].bg):""}\n\t\t\t\t${"desktop"===n?sa(d[e][t].border):""}\n\t`,M=["row","row-reverse"],N=["column","column-reverse"] |
| 296 |
;return`\n\n\t\t\t${pa("",l.typography).googleFontLink}\n\t\t\t${pa("",c.typography).googleFontLink}\n\n\t\t\t${pa(y,l.typography).styles}\n\t\t\t${pa(k,c.typography).styles}\n\n\t\t\t${h}{\n\t\t\t\t${na("flex-direction",i.desktop.direction)}\n\t\t\t}\n\n\t\t\t${g}{\n\t\t\t\t${na("justify-content",$("desktop")?i.desktop.columnJustify:i.desktop.rowJustify)}\n\t\t\t\t${na("flex-direction",j("desktop")?"column":"")}\n\t\t\t\t${na("gap",r.desktop.gap)}\n\t\t\t\t${na("padding",ha(a.desktop.padding))}\n\t\t\t\t${na("margin",ha(a.desktop.margin))}\n\t\t\t\t${na("border-radius",ha(a.desktop.radius))}\n\t\t\t\t${sa(a.border)}\n\t\t\t\t${oa(a.bg)}\n\t\t\t\t${M.includes(i?.desktop?.direction)?na("width",r.desktop.width):""}\n\t\t\t\t${N.includes(i.desktop.direction)?na("flex-wrap",i.desktop.wrap):""}\n\t\t\t}\n\n\t\t\t${m}{\n\t\t\t\t${na("width",$("desktop")&&"stretch"===i.desktop.columnJustify?"100%":"")}\n\t\t\t\t${na("height",j("desktop")&&"stretch"===i.desktop.rowJustify?"100%":"")}\n\t\t\t\t${na("justify-content",i.desktop.contentAlign)}\n\t\t\t\t${na("flex-direction",d.desktop.position)}\n\t\t\t\t${S("normal","normal")}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out; \n\t\t\t}\n\n\t\t\t${f}:hover{\n\t\t\t\t${S("normal","hover")}\n\t\t\t}\n\t\t\t\n\t\t\t${b}{\n\t\t\t\t${S("active","normal")}\n\t\t\t}\n\t\t\t${b}:hover{\n\t\t\t\t${S("active","hover")}\n\t\t\t}\n\n\t\t\t${x}{\n\t\t\t\t${na("text-align",i.desktop.contentAlign)}\n\t\t\t}\n\n\t\t\t${m}:hover .b-blocks-advanced-tabs-button-title{\n\t\t\t\t${na("color",l.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${b}:hover .b-blocks-advanced-tabs-button-title{\n\t\t\t\t${na("color",l.active.hover.color)}\n\t\t\t}\n\n\t\t\t${y}{\n\t\t\t\t${na("color",l.normal.normal.color)}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out; \n\t\t\t}\n\n\t\t\t${v}{\n\t\t\t\t${na("color",l.active.normal.color)}\n\t\t\t}\n\n\t\t\t${k}{\n\t\t\t ${na("color",c.normal.normal.color)}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out;\n\t\t\t\t${i.isShowActiveSubTitle?na("display","none"):""}\n\t\t\t}\n\n\t\t\t${m}:hover .b-blocks-advanced-tabs-button-subTitle{\n\t\t\t\t${na("color",c.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${w}{\n\t\t\t\t${na("color",c.active.normal.color)}\n\t\t\t\t${i.isShowActiveSubTitle?na("display","block"):""}\n\t\t\t}\n\n\t\t\t${b}:hover .b-blocks-advanced-tabs-button-subTitle{\n\t\t\t\t${na("color",jt(c.active.hover.color)?c.active.hover.color:c.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${_}{\n\t\t\t\t${T("normal","normal")}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out;\n\t\t\t}\n\n\t\t\t${m}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t${T("normal","hover")}\n\t\t\t}\n\n\t\t\t${_}>svg{\n\t\t\t\t${na("height",d.desktop.size)}\n\t\t\t\t${na("width",d.desktop.size)}\n\t\t\t\t${na("fill",d.normal.normal.color)}\n\t\t\t\t${na("color",d.normal.normal.color)}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out;\n\t\t\t}\n\n\t\t\t${m}:hover .b-blocks-advanced-tabs-button-icon>svg{\n\t\t\t\t${na("fill",d.normal.hover.color)}\n\t\t\t\t${na("color",d.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${b} .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t${T("active","normal")}\n\t\t\t}\n\n\t\t\t${b} .b-blocks-advanced-tabs-button-icon>svg{\n\t\t\t\t${na("fill",d.active.normal.color)}\n\t\t\t\t${na("color",d.active.normal.color)}\n\t\t\t}\n\n\t\t\t${b}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("active","hover")}\n\t\t\t}\n\n\t\t\t${b}:hover .b-blocks-advanced-tabs-button-icon>svg{\n\t\t\t\t${na("fill",jt(d.active.hover.color)?d.active.hover.color:d.normal.hover.color)}\n\t\t\t\t${na("color",jt(d.active.hover.color)?d.active.hover.color:d.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${C}{\n\t\t\t\t${M.includes(i?.desktop?.direction)&&na("max-width",u.desktop.width)}\n\t\t\t}\n\n\t\t\t${t}{\n\t\t\t\t${h}{\n\t\t\t\t\t${na("flex-direction",i?.tablet?.direction)}\n\t\t\t\t}\n\t\t\t\t\t${g}{\n\t\t\t\t\t${na("justify-content",$("tablet")?i?.tablet?.columnJustify:i?.tablet?.rowJustify)}\n\t\t\t\t\t${na("flex-direction",j("tablet")?"column":"")}\n\t\t\t\t\t${na("gap",r?.tablet?.gap)}\n\t\t\t\t\t${na("padding",ha(a?.tablet?.padding))}\n\t\t\t\t\t${na("margin",ha(a?.tablet?.margin))}\n\t\t\t\t\t${na("border-radius",ha(a?.tablet?.radius))}\n\t\t\t\t\t${M.includes(i?.tablet?.direction)?na("width",r?.tablet?.width):""}\n\t\t\t\t\t${N.includes(i?.tablet?.direction)?na("flex-wrap",i?.tablet?.wrap):""}\n\t\t\t\t}\n\n\t\t\t\t${m}{\n\t\t\t\t\t${na("width",$("tablet")&&"stretch"===i?.tablet.columnJustify?"100%":"")}\n\t\t\t\t\t${na("height",j("tablet")&&"stretch"===i?.tablet.rowJustify?"100%":"")}\n\t\t\t\t\t${na("justify-content",i?.tablet.contentAlign)}\n\t\t\t\t\t${na("flex-direction",d?.tablet.position)}\n\t\t\t\t\t${S("normal","normal","tablet")}\n\t\t\t\t}\n\t\t\t\t${f}:hover{\n\t\t\t\t\t${S("normal","hover","tablet")}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t${b}{\n\t\t\t\t\t${S("active","normal","tablet")}\n\t\t\t\t}\n\t\t\t\t${b}:hover{\n\t\t\t\t\t${S("active","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${x}{\n\t\t\t\t\t${na("text-align",i?.tablet.contentAlign)}\n\t\t\t\t}\n\n\t\t\t\t${m}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("normal","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${_}>svg{\n\t\t\t\t\t${na("height",d?.tablet.size)}\n\t\t\t\t\t${na("width",d?.tablet.size)}\n\t\t\t\t}\n\n\t\t\t\t${b} .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("active","normal","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${b}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t\t${T("active","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${C}{\n\t\t\t\t\t${M.includes(i?.tablet?.direction)&&na("max-width",u?.tablet.width)}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t${n}{\n\t\t\t\t${h}{\n\t\t\t\t\t${na("flex-direction",i?.tablet?.direction)}\n\t\t\t\t}\n\t\t\t\t\t${g}{\n\t\t\t\t\t${na("justify-content",$("tablet")?i?.tablet?.columnJustify:i?.tablet?.rowJustify)}\n\t\t\t\t\t${na("flex-direction",j("tablet")?"column":"")}\n\t\t\t\t\t${na("gap",r?.tablet?.gap)}\n\t\t\t\t\t${na("padding",ha(a?.tablet?.padding))}\n\t\t\t\t\t${na("margin",ha(a?.tablet?.margin))}\n\t\t\t\t\t${na("border-radius",ha(a?.tablet?.radius))}\n\t\t\t\t\t${M.includes(i?.tablet?.direction)?na("width",r?.tablet?.width):""}\n\t\t\t\t\t${N.includes(i?.tablet?.direction)?na("flex-wrap",i?.tablet?.wrap):""}\n\t\t\t\t}\n\n\t\t\t\t${m}{\n\t\t\t\t\t${na("width",$("tablet")&&"stretch"===i?.tablet.columnJustify?"100%":"")}\n\t\t\t\t\t${na("height",j("tablet")&&"stretch"===i?.tablet.rowJustify?"100%":"")}\n\t\t\t\t\t${na("justify-content",i?.tablet.contentAlign)}\n\t\t\t\t\t${na("flex-direction",d?.tablet.position)}\n\t\t\t\t\t${S("normal","normal","tablet")}\n\t\t\t\t}\n\t\t\t\t${f}:hover{\n\t\t\t\t\t${S("normal","hover","tablet")}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t${b}{\n\t\t\t\t\t${S("active","normal","tablet")}\n\t\t\t\t}\n\t\t\t\t${b}:hover{\n\t\t\t\t\t${S("active","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${x}{\n\t\t\t\t\t${na("text-align",i?.tablet.contentAlign)}\n\t\t\t\t}\n\n\t\t\t\t${m}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("normal","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${_}>svg{\n\t\t\t\t\t${na("height",d?.tablet.size)}\n\t\t\t\t\t${na("width",d?.tablet.size)}\n\t\t\t\t}\n\n\t\t\t\t${b} .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("active","normal","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${b}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t\t${T("active","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${C}{\n\t\t\t\t\t${M.includes(i?.tablet?.direction)&&na("max-width",u?.tablet.width)}\n\t\t\t\t}\n\t\t\t}\n\n\t`},eu=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{tabLists:s=[],tabs:a}=t,r=(0,m.useRef)(null),[c,d]=(0,m.useState)(null),[u,p]=(0,m.useState)(null),g=(0,m.useRef)(null),b=(0,m.useMemo)((()=>{const e=(s||[]).find((e=>e.isDefault));return a.isCloseAllTab?"":(e||{id:1})?.id}),[s]);(0, |
| 297 |
m.useEffect)((()=>{c||d(b)}),[b]);const f="b-blocks/container",x=[[f,{className:`b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-1 b-blocks-advanced-tabs-parent-${t.clientId}`,lock:{remove:!0,move:!0}}],[f,{className:`b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-2 b-blocks-advanced-tabs-parent-${t.clientId}`,lock:{remove:!0,move:!0}}],[f,{className:`b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-3 b-blocks-advanced-tabs-parent-${t.clientId}`,lock:{remove:!0,move:!0}}]],v=fe(t,n);return(0,m.useEffect)((()=>{if(c){const e=g?.current,t=e?.querySelector(`.b-blocks-advanced-tabs-panel-${c}`),n=e?.querySelector(".b-blocks-advanced-tabs-panel");t?t.style.display="block":n&&(n.style.display="none")}}),[g,c]),(0,m.useEffect)((()=>{n({clientId:o.slice(0,12)})}),[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Xd,{attributes:t,setAttributes:n,updateObj:v,clientId:o,device:i,activeIndex:u,setActiveIndex:p}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:Jd(t,`block-${o}`)}}),(0,l.jsx)("div",{className:"b-blocks-advanced-tabs-main-wrapper",children:(0,l.jsxs)("div",{className:"b-blocks-advanced-tabs-wrapper",ref:r,children:[(0,l.jsxs)("div",{className:"b-blocks-advanced-tabs-button-lists",children:[(s||[]).map(((e,t)=>(0,l.jsxs)("button",{"data-title-tab-id":e.id,onClick:()=>{(e=>{d(String(e));const t=g?.current,n=t.querySelectorAll(".b-blocks-advanced-tabs-panel");(Array.from(n)||[]).forEach((t=>{t.classList.contains(`b-blocks-advanced-tabs-panel-${e}`)?t.style.display="block":t.style.display="none"}))})(e.id),p(t)},className:"b-blocks-advanced-tabs-button "+(c==e.id?"b-blocks-advanced-tabs-button-active":"b-blocks-advanced-tabs-button-normal"),children:[a.isShowIcon&&"none"!==e.iconType&&(0,l.jsx)("p",{className:"b-blocks-advanced-tabs-button-icon",dangerouslySetInnerHTML:{__html:e?.[e.iconType]}}),(0,l.jsxs)("div",{className:"b-blocks-advanced-tabs-button-title-container",children:[a.isShowTitle&&(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-advanced-tabs-button-title",placeholder:"Tab Title",value:e.title,onChange:e=>v("tabLists",e,t,"title")}),a.isShowSubTitle&&(0,l.jsx)(h.RichText,{className:"b-blocks-advanced-tabs-button-subTitle",placeholder:"Tab SubTitle",value:e.subTitle,onChange:e=>v("tabLists",e,t,"subTitle")})]})]},`${t}-${e.id}`))),(0,l.jsx)("div",{className:"b-blocks-advanced-tabs-button-add",onClick:()=>{Sd({clientId:o,blockId:"",tabLists:s,setAttributes:n})},children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})]}),(0,l.jsx)("div",{className:"b-blocks-advanced-tabs-contents",ref:g,children:(0,l.jsx)(h.InnerBlocks,{templateLock:!1,template:s.length>0?x:[],renderAppender:!1})})]})})]})]})}));Nl(vd.name)&&(0,p.registerBlockType)(vd,{icon:al,edit:eu,save:h.InnerBlocks.Content,deprecated:[{attributes:{...vd.attributes,oldHTML:{type:"string",source:"html"}},isEligible:()=>!0,migrate:(e,t)=>[e,t],save:()=>null}]}) |
| 298 |
;const tu=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/article-card","title":"Article Card","category":"bBlocks","description":"A single static article, resource, or featured-page preview card — image, category badge, heading, excerpt, optional meta line, and CTA link — in horizontal or vertical layout. No JavaScript required.","keywords":["article","card","resource","read also","featured","preview","link"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"type":{"desktop":"horizontal","tablet":"","mobile":"vertical"},"alignment":{"desktop":"left","tablet":"","mobile":""}}},"image":{"type":"object","default":{"id":{"desktop":0,"tablet":0,"mobile":0},"url":{"desktop":"","tablet":"","mobile":""},"alt":"","objectFit":{"desktop":"cover","tablet":"","mobile":""},"objectPosition":{"desktop":"center","tablet":"","mobile":""},"filter":{"desktop":{},"tablet":{},"mobile":{}},"position":{"desktop":"left","tablet":"","mobile":""},"splitRatio":{"desktop":"40","tablet":"","mobile":""},"splitLeft":{"desktop":"40%","tablet":"","mobile":""},"splitRight":{"desktop":"60%","tablet":"","mobile":""}}},"content":{"type":"object","default":{"badge":"Read Also","heading":"Article title goes here","headingTag":"h3","excerpt":"","meta":"","metaIcon":""}},"link":{"type":"object","default":{"url":"","target":false,"ctaLabel":"Read More","ctaStyle":"button","cardLinkMode":false}},"badge":{"type":"object","default":{"align":"left","bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff","padding":{"desktop":{"top":"3px","right":"10px","bottom":"3px","left":"10px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"","style":"solid","color":""},"borderRadius":{"desktop":{"top":"999px","right":"999px","bottom":"999px","left":"999px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"colors":{"type":"object","default":{"heading":"#111827","text":"#374151","meta":"#6b7280"}},"heading":{"type":"object","default":{"background":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"","style":"solid","color":""},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"excerpt":{"type":"object","default":{"background":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"","style":"solid","color":""},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"meta":{"type":"object","default":{"color":"#6b7280","iconColor":"#6b7280","bg":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"","style":"solid","color":""},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"card":{"type":"object","default":{"background":{"type":"solid","color":""},"padding":{"desktop":{"top":"20px","right":"20px","bottom":"20px","left":"20px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"1px","style":"solid","color":"#e5e7eb"},"borderRadius":{"desktop":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[{"hOffset":"0px","vOffset":"1px","blur":"3px","spreed":"0px","color":"rgba(0,0,0,0.12)","isInset":false}]}},"cta":{"type":"object","default":{"normal":{"bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff","border":{"width":"","style":"solid","color":""},"shadow":[]},"hover":{"bg":{"type":"solid","color":"#1d4ed8"},"color":"#ffffff","border":{"width":"","style":"solid","color":""},"shadow":[]},"padding":{"desktop":{"top":"8px","right":"18px","bottom":"8px","left":"18px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"6px","right":"6px","bottom":"6px","left":"6px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"transition":0.2}},"typography":{"type":"object","default":{"heading":{"fontSize":{"desktop":"18px","tablet":"","mobile":""},"fontWeight":"600"},"excerpt":{"fontSize":{"desktop":"14px","tablet":"","mobile":""},"fontWeight":"400"},"cta":{"fontSize":{"desktop":"14px","tablet":"","mobile":""},"fontWeight":"600"},"badge":{"fontSize":{"desktop":"12px","tablet":"","mobile":""},"fontWeight":"600"},"meta":{"fontSize":{"desktop":"13px","tablet":"","mobile":""},"fontWeight":"400"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 0)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":["file:../index.js"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),nu=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,ou={ |
| 299 |
left:"flex-start",center:"center",right:"flex-end"},iu=({attributes:e,id:o,isBackend:i=!1})=>{const{advanced:s,layout:a={},image:r={},badge:c={},meta:d={},colors:u={},card:p={},cta:h={},typography:g={},heading:m={},excerpt:b={}}=e,{type:f={},alignment:x}=a,y="string"==typeof x?{desktop:x,tablet:"",mobile:""}:x||{},{position:v={},objectFit:k={},objectPosition:w={},filter:_={},splitRatio:C={},splitLeft:j={},splitRight:$={}}=r,{align:S,bg:T,color:M,padding:N={},margin:L={},border:E={},borderRadius:P={}}=c,{heading:A,text:B,meta:I}=u,{background:O={},padding:R={},border:z={},borderRadius:D={},shadow:F}=p,{normal:H={},hover:W={},padding:U={},margin:G={},borderRadius:V={},transition:q=.2}=h,{heading:Y={},excerpt:K={},cta:Q={},badge:Z={},meta:X={}}=g,J=`#${o} .b-blocks-article-card`,ee=`${J} .b-blocks-article-card-card`,te=`${J} .b-blocks-article-card-media`,ne=`${J} .b-blocks-article-card-img`,oe=`${J} .b-blocks-article-card-media-placeholder`,ie=`${J} .b-blocks-article-card-body`,se=`${J} .b-blocks-article-card-badge`,ae=`${J} .b-blocks-article-card-heading`,re=`${J} .b-blocks-article-card-excerpt`,le=`${J} .b-blocks-article-card-meta`,ce=`${J} .b-blocks-article-card-meta-icon`,de=`${J} .b-blocks-article-card-cta`,ue=`${J} .b-blocks-article-card-link`,pe=`#${o} .b-blocks-article-card--cta-button .b-blocks-article-card-cta`,he=`#${o} .b-blocks-article-card--cta-link .b-blocks-article-card-cta`,ge=(e,t,n)=>na(e,ha(t?.[n])),me=e=>`\n\t\t${ie}{ ${ge("padding",R,e)} }\n\t\t${ee}{ ${ge("border-radius",D,e)} }\n\t\t${se}{ ${ge("padding",N,e)} ${ge("margin",L,e)} ${ge("border-radius",P,e)} }\n\t\t${ae}{ ${ge("padding",m.padding,e)} ${ge("margin",m.margin,e)} ${ge("border-radius",m.borderRadius,e)} }\n\t\t${re}{ ${ge("padding",b.padding,e)} ${ge("margin",b.margin,e)} ${ge("border-radius",b.borderRadius,e)} }\n\t\t${le}{ ${ge("padding",d.padding,e)} ${ge("margin",d.margin,e)} ${ge("border-radius",d.borderRadius,e)} }\n\t\t${pe}{ ${ge("padding",U,e)} ${ge("margin",G,e)} ${ge("border-radius",V,e)} }\n\t`,be=e=>{const t=nu(k,e)||"cover",n=nu(w,e)||"center";return`\n\t\t\t${ne}{ ${na("object-fit",t)} ${na("object-position",n)} ${(e=>{if(!e)return"";const t=[];return e.blur&&t.push(`blur(${e.blur}px)`),null!=e.brightness&&100!==e.brightness&&t.push(`brightness(${e.brightness}%)`),null!=e.contrast&&100!==e.contrast&&t.push(`contrast(${e.contrast}%)`),null!=e.saturate&&100!==e.saturate&&t.push(`saturate(${e.saturate}%)`),e.grayscale&&t.push(`grayscale(${e.grayscale}%)`),t.length?`filter:${t.join(" ")};`:""})(_?.[e])} }\n\t\t`},fe=e=>{const t="horizontal"===(nu(f,e)||"horizontal"),n=nu(v,e)||(t?"left":"top"),o=nu(C,e),i=parseInt(o,10)||40,s="custom"===o?nu(j,e)||"40%":`${i}%`,a="custom"===o?nu($,e)||"60%":100-i+"%",r=t?"right"===n?"row-reverse":"row":"bottom"===n?"column-reverse":"column",l=nu(y,e)||"left";let c="";return c="center"===l?`\n\t\t\t\t${J}{ display: flex; justify-content: center; }\n\t\t\t\t${ie}{ align-items: center; text-align: center; }\n\t\t\t\t${de}{ align-self: center !important; }\n\t\t\t`:"right"===l?`\n\t\t\t\t${J}{ display: flex; justify-content: flex-end; }\n\t\t\t\t${ie}{ align-items: flex-end; text-align: right; }\n\t\t\t\t${de}{ align-self: flex-end !important; }\n\t\t\t`:`\n\t\t\t\t${J}{ display: block; }\n\t\t\t\t${ie}{ align-items: flex-start; text-align: left; }\n\t\t\t\t${de}{ align-self: flex-start; }\n\t\t\t`,`\n\t\t\t${ee}, ${ue}{ flex-direction:${r}; }\n\t\t\t${t?`\n\t\t\t\t${te}{ flex:0 0 ${s}; max-width:${s}; width:${s}; align-self:stretch; position:relative; }\n\t\t\t\t${ne}{ width:100%; height:100%; aspect-ratio:auto; }\n\t\t\t\t${oe}{ width:100%; height:100%; min-height:180px; }\n\t\t\t\t${ie}{ flex:1 1 ${a}; max-width:${a}; width:${a}; justify-content:center; }\n\t\t\t`:`\n\t\t\t\t${te}{ flex:0 0 auto; width:100%; max-width:100%; align-self:auto; }\n\t\t\t\t${ne}{ width:100%; height:auto; }\n\t\t\t\t${oe}{ width:100%; min-height:180px; }\n\t\t\t\t${ie}{ flex:1 1 auto; width:100%; max-width:100%; justify-content:normal; }\n\t\t\t`}\n\t\t\t${c}\n\t\t`};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${pa("",Y).googleFontLink}\n\t\t\t${pa("",K).googleFontLink}\n\t\t\t${pa("",Q).googleFontLink}\n\t\t\t${pa("",Z).googleFontLink}\n\t\t\t${pa("",X).googleFontLink}\n\t\t\t${ee}{\n\t\t\t\t${na("box-shadow",la(F))}\n\t\t\t\t${oa(O)}\n\t\t\t\t${ia(z)}\n\t\t\t}\n\t\t\t${se}{\n\t\t\t\talign-self:${ou[S]||"flex-start"} !important;\n\t\t\t\t${oa(T)}\n\t\t\t\tcolor:${M||"#ffffff"};\n\t\t\t\t${ia(E)}\n\t\t\t}\n\t\t\t${ae}{\n\t\t\t\tcolor:${A||"#111827"};\n\t\t\t\t${oa(m.background)}\n\t\t\t\t${ia(m.border)}\n\t\t\t}\n\t\t\t${re}{\n\t\t\t\tcolor:${B||"#374151"};\n\t\t\t\t${oa(b.background)}\n\t\t\t\t${ia(b.border)}\n\t\t\t}\n\t\t\t${le}{\n\t\t\t\tcolor:${d.color||I||"#6b7280"};\n\t\t\t\t${oa(d.bg)}\n\t\t\t\t${ia(d.border)}\n\t\t\t}\n\t\t\t${ce}{\n\t\t\t\tcolor:${d.iconColor||d.color||I||"#6b7280"};\n\t\t\t}\n\t\t\t${ce} svg{\n\t\t\t\tfill: currentColor;\n\t\t\t}\n\t\t\t${pa(ae,Y).styles}\n\t\t\t${pa(re,K).styles}\n\t\t\t${pa(de,Q).styles}\n\t\t\t${pa(se,Z).styles}\n\t\t\t${pa(le,X).styles}\n\t\t\t${pe}{\n\t\t\t\t${ia(H.border)}\n\t\t\t\t${oa(H.bg)}\n\t\t\t\t${na("box-shadow",la(H.shadow))}\n\t\t\t\tcolor:${H.color||"#ffffff"};\n\t\t\t\ttransition:all ${q}s ease;\n\t\t\t}\n\t\t\t${pe}:hover, ${pe}:focus-visible{\n\t\t\t\t${oa(W.bg)}\n\t\t\t\t${ia(W.border)}\n\t\t\t\t${na("box-shadow",la(W.shadow))}\n\t\t\t\tcolor:${W.color||"#ffffff"};\n\t\t\t}\n\t\t\t${he}{ color:${H.bg?.color||"#2563eb"}; }\n\t\t\t${de}:focus-visible, ${ue}:focus-visible{\n\t\t\t\toutline:2px solid ${H.bg?.color||"#2563eb"};\n\t\t\t\toutline-offset:2px;\n\t\t\t}\n\t\t\t${me("desktop")}\n\t\t\t${be("desktop")}\n\t\t\t${fe("desktop")}\n\t\t\t${t}{\n\t\t\t\t${me("tablet")}\n\t\t\t\t${be("tablet")}\n\t\t\t\t${fe("tablet")}\n\t\t\t}\n\t\t\t${n}{\n\t\t\t\t${me("mobile")}\n\t\t\t\t${be("mobile")}\n\t\t\t\t${fe("mobile")}\n\t\t\t}\n\t\t\t${_a(o,s,i,!1)}\n\t\t\t`}})},su=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],au={top:"",right:"",bottom:"",left:""},ru=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],lu=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",...e,children:(0,l.jsx)("path",{d:"M4 11h12.17l-3.58-3.59L14 6l6 6-6 6-1.41-1.41L16.17 13H4z"})}),cu=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,du=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{layout:i={},image:s={},content:a={},link:r={},colors:c={}}=e,{type:d={},alignment:u}=i,p="string"==typeof u?{desktop:u,tablet:"",mobile:""}:u||{},{id:h={},url:g={},alt:m="",objectFit:b={},objectPosition:f={},filter:k={},position:w={},splitRatio:C={},splitLeft:j={},splitRight:$={}}=s,S=k[o]||{},{badge:T,headingTag:M,meta:N,metaIcon:L}=a,{url:E,target:P,ctaLabel:A,ctaStyle:B,cardLinkMode:I}=r,{meta:O}=c,R="horizontal"===cu(d,o),z=cu(C,o),D=!!cu(g,o);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:2,children:[(0,x.__)("Layout","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",isBlock:!0,isDeselectable:!0,value:d[o]||"",onChange:e=>{const n=w[o]||"";let a=n;"horizontal"!==e||["left","right"].includes(n)||(a="left"),"vertical"!==e||["top","bottom"].includes(n)||(a="top"),t({layout:{...i,type:{...d,[o]:e||""}},image:{...s,position:{...w,[o]:a}}})},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Vertical","b-blocks"),value:"vertical"})]}),(0,l.jsxs)(y.Flex,{align:"center", |
| 300 |
className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Image Position","b-blocks")," ",(0,l.jsx)(_,{})]})}),R?(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:w[o]||"",onChange:e=>n("image",e,"position",o),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:(0,l.jsx)(lu,{style:{rotate:"180deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:(0,l.jsx)(lu,{})})]}):(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:w[o]||"",onChange:e=>n("image",e,"position",o),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Top","b-blocks"),value:"top",icon:(0,l.jsx)(lu,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Bottom","b-blocks"),value:"bottom",icon:(0,l.jsx)(lu,{style:{rotate:"90deg"}})})]})]}),R&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Image Split Ratio","b-blocks")," ",(0,l.jsx)(_,{})]}),value:z||"",options:[{label:"30 / 70",value:"30"},{label:"40 / 60",value:"40"},{label:"50 / 50",value:"50"},{label:(0,x.__)("Custom","b-blocks"),value:"custom"}],onChange:e=>{"custom"===e?n("image",e,"splitRatio",o):t({image:{...s,splitRatio:{...C,[o]:e},splitLeft:{...j,[o]:`${e}%`},splitRight:{...$,[o]:100-parseInt(e,10)+"%"}}})},__nextHasNoMarginBottom:!0}),"custom"===z&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Left","b-blocks"),className:"flex1",value:j[o],onChange:e=>n("image",e,"splitLeft",o)}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Right","b-blocks"),className:"flex1",value:$[o],onChange:e=>n("image",e,"splitRight",o)})]})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:p[o]||"",onChange:e=>{const t="string"==typeof u?{desktop:u,tablet:"",mobile:""}:{...u};t[o]=e,n("layout",t,"alignment")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:"editor-alignleft"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:"editor-aligncenter"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:"editor-alignright"})]})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Wrap entire card in link","b-blocks"),help:(0,x.__)("The whole card becomes a single link (no separate CTA button).","b-blocks"),checked:!!I,onChange:e=>n("link",e,"cardLinkMode")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Image:","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(we,{label:g[o]?(0,x.__)("Replace Image","b-blocks"):(0,x.__)("Select Image","b-blocks"),value:{id:h[o],url:g[o],alt:m},types:["image"],height:"100%",width:"100%",onChange:e=>t({image:{...s,id:{...h,[o]:e?.id||0},url:{...g,[o]:e?.url||""},alt:e?.alt||m||""}})}),"desktop"!==o&&(0,l.jsx)("p",{style:{margin:"6px 0 0",fontSize:11,color:"#777"},children:(0,x.__)("Leave empty to reuse the Desktop image on this device.","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Alt Text","b-blocks"),value:m||"",onChange:e=>n("image",e,"alt"),help:(0,x.__)("Describes the image; leave empty for a decorative image.","b-blocks"),__nextHasNoMarginBottom:!0}),D&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Object Fit","b-blocks")," ",(0,l.jsx)(_,{})]}),value:b[o]||"",options:[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Cover","b-blocks"),value:"cover"},{label:(0,x.__)("Contain","b-blocks"),value:"contain"},{label:(0,x.__)("Fill","b-blocks"),value:"fill"},{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Scale Down","b-blocks"),value:"scale-down"}],onChange:e=>n("image",e,"objectFit",o),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Object Position","b-blocks")," ",(0,l.jsx)(_,{})]}),value:f[o]||"",options:[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"},{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"},{label:(0,x.__)("Top Left","b-blocks"),value:"top left"},{label:(0,x.__)("Top Right","b-blocks"),value:"top right"},{label:(0,x.__)("Bottom Left","b-blocks"),value:"bottom left"},{label:(0,x.__)("Bottom Right","b-blocks"),value:"bottom right"}],onChange:e=>n("image",e,"objectPosition",o),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt20",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Filter","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Blur (px)","b-blocks"),value:S.blur??0,onChange:e=>n("image",e,"filter",o,"blur"),min:0,max:20,step:.5}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Brightness (%)","b-blocks"),value:S.brightness??100,onChange:e=>n("image",e,"filter",o,"brightness"),min:0,max:200}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Contrast (%)","b-blocks"),value:S.contrast??100,onChange:e=>n("image",e,"filter",o,"contrast"),min:0,max:200}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Saturation (%)","b-blocks"),value:S.saturate??100,onChange:e=>n("image",e,"filter",o,"saturate"),min:0,max:200}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Grayscale (%)","b-blocks"),value:S.grayscale??0,onChange:e=>n("image",e,"filter",o,"grayscale"),min:0,max:100})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Badge Text","b-blocks"),value:T||"",onChange:e=>n("content",e,"badge"),placeholder:(0,x.__)("e.g. Read Also","b-blocks"),help:(0,x.__)("Empty hides the badge.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Heading Tag","b-blocks"),labelPosition:"edge",value:M,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:(0,x.__)("Paragraph","b-blocks"),value:"p"}],onChange:e=>n("content",e,"headingTag"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Meta Line","b-blocks"),value:N||"",onChange:e=>n("content",e,"meta"),placeholder:(0,x.__)("e.g. 5 min read","b-blocks"),help:(0,x.__)("Empty hides the meta line.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Meta Icon","b-blocks"),value:L,onChange:e=>n("content",e,"metaIcon")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Meta Color:","b-blocks"),value:O||"#6b7280",onChange:e=>n("colors",e,"meta"),defaultColor:"#6b7280"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Link & CTA","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Link URL","b-blocks"),value:E||"", |
| 301 |
onChange:e=>n("link",e,"url"),type:"url",placeholder:"https://",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open in new tab","b-blocks"),checked:!!P,onChange:e=>n("link",e,"target")}),!I&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("CTA Label","b-blocks"),value:A||"",onChange:e=>n("link",e,"ctaLabel"),placeholder:(0,x.__)("Read More","b-blocks"),help:(0,x.__)("Empty hides the CTA.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("CTA Style","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:B,options:[{label:(0,x.__)("Button","b-blocks"),value:"button"},{label:(0,x.__)("Arrow Link","b-blocks"),value:"link"}],onChange:e=>n("link",e,"ctaStyle"),__nextHasNoMarginBottom:!0})]})]})]})]})},uu=({attributes:e,updateObj:t,device:n="desktop"})=>{const[o,i]=(0,m.useState)("normal"),{card:s={},colors:a={},cta:r={},link:c={},typography:d={},badge:u={},meta:p={},heading:h={},excerpt:g={}}=e,{background:b={},padding:f={},border:v={},borderRadius:w={},shadow:C}=s,{heading:j,text:$}=a,{align:S,bg:T={},color:M,padding:N={},margin:L={},border:E={},borderRadius:P={}}=u,{padding:A={},margin:B={},borderRadius:I={},transition:O}=r,R=r[o]||{},{ctaStyle:z,cardLinkMode:D,ctaLabel:F}=c,{heading:H={},excerpt:W={},cta:U={},badge:G={},meta:V={}}=d,q="button"===z,Y=(e,o,i,s,a)=>(0,l.jsx)(k,{className:a,label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[e," ",(0,l.jsx)(_,{})]}),units:su,values:s?.[n],resetValues:au,onChange:e=>t(o,e,i,n)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Card Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:b,onChange:e=>t("card",e,"background")}),Y((0,x.__)("Padding","b-blocks"),"card","padding",f,"mt10"),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:v,onChange:e=>t("card",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"card","borderRadius",w),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Shadow","b-blocks"),value:C,onChange:e=>t("card",e,"shadow")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Heading","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:j||"#111827",onChange:e=>t("colors",e,"heading"),defaultColor:"#111827"}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:H,onChange:e=>t("typography",e,"heading")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:h.background,onChange:e=>t("heading",e,"background")}),Y((0,x.__)("Padding","b-blocks"),"heading","padding",h.padding),Y((0,x.__)("Margin","b-blocks"),"heading","margin",h.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:h.border,onChange:e=>t("heading",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"heading","borderRadius",h.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Excerpt","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:$||"#374151",onChange:e=>t("colors",e,"text"),defaultColor:"#374151"}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:W,onChange:e=>t("typography",e,"excerpt")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:g.background,onChange:e=>t("excerpt",e,"background")}),Y((0,x.__)("Padding","b-blocks"),"excerpt","padding",g.padding),Y((0,x.__)("Margin","b-blocks"),"excerpt","margin",g.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:g.border,onChange:e=>t("excerpt",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"excerpt","borderRadius",g.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Badge","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Alignment","b-blocks"),labelPosition:"edge",value:S,options:[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],onChange:e=>t("badge",e,"align"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:T,onChange:e=>t("badge",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:M||"#ffffff",onChange:e=>t("badge",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:G,onChange:e=>t("typography",e,"badge")}),Y((0,x.__)("Padding","b-blocks"),"badge","padding",N),Y((0,x.__)("Margin","b-blocks"),"badge","margin",L),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:E,onChange:e=>t("badge",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"badge","borderRadius",P)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Meta","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:p.color||a.meta||"#6b7280",onChange:e=>t("meta",e,"color"),defaultColor:"#6b7280"}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:p.iconColor||p.color||a.meta||"#6b7280",onChange:e=>t("meta",e,"iconColor"),defaultColor:"#6b7280"}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:V,onChange:e=>t("typography",e,"meta")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:p.bg,onChange:e=>t("meta",e,"bg")}),Y((0,x.__)("Padding","b-blocks"),"meta","padding",p.padding),Y((0,x.__)("Margin","b-blocks"),"meta","margin",p.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:p.border,onChange:e=>t("meta",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"meta","borderRadius",p.borderRadius)]}),!D&&F&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("CTA","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:U,onChange:e=>t("typography",e,"cta")}),q&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10 flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:R.bg,onChange:e=>t("cta",e,o,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:R.color||"#ffffff",onChange:e=>t("cta",e,o,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:R.border,onChange:e=>t("cta",e||{},o,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Shadow","b-blocks"),value:R.shadow,onChange:e=>t("cta",e,o,"shadow")}),Y((0,x.__)("Padding","b-blocks"),"cta","padding",A),Y((0,x.__)("Margin","b-blocks"),"cta","margin",B),Y((0,x.__)("Border Radius","b-blocks"),"cta","borderRadius",I),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (s)","b-blocks"),value:O,onChange:e=>t("cta",e,"transition"),min:0,max:5,step:.01})]}),!q&&(0,l.jsx)(Ue,{label:(0,x.__)("Link Color:","b-blocks"),value:r.normal?.bg?.color||"#2563eb",onChange:e=>t("cta",{...r.normal?.bg||{},type:"solid",color:e},"normal","bg"),defaultColor:"#2563eb"})]})]})},pu=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab", |
| 302 |
tabs:ru,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(du,{...e}),"style"===t.name&&(0,l.jsx)(uu,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},hu=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,gu=(0,w.compose)((0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}})))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i="desktop"}=e,{layout:s={},image:a={},content:r={},link:c={}}=t,{alignment:d}=s,u="string"==typeof d?{desktop:d,tablet:"",mobile:""}:d||{},{id:p={},url:g={},alt:m=""}=a,{badge:b,heading:f,headingTag:v,excerpt:k,meta:w,metaIcon:_}=r,{ctaLabel:C,ctaStyle:j,cardLinkMode:$}=c,S="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,T=fe(t,n),M=hu(g,i),N=v||"h3",L=["b-blocks-article-card",`b-blocks-article-card--cta-${j}`].filter(Boolean).join(" "),E=M?(0,l.jsx)("div",{className:"b-blocks-article-card-media",children:(0,l.jsx)("img",{className:"b-blocks-article-card-img",src:M,alt:m||""})}):(0,l.jsx)("div",{className:"b-blocks-article-card-media",children:(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{onSelect:e=>{n({image:{...a,id:{...p,[i]:e?.id||0},url:{...g,[i]:e?.url||""},alt:e?.alt||m||""}})},allowedTypes:["image"],value:hu(p,i),render:({open:e})=>(0,l.jsxs)("div",{className:"b-blocks-article-card-media-placeholder",onClick:e,children:[(0,l.jsx)(y.Dashicon,{icon:"format-image",style:{fontSize:36,width:36,height:36,marginBottom:8}}),(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:(0,x.__)("Select or Upload Image","b-blocks")})}),(0,l.jsx)("span",{style:{fontSize:12,opacity:.8,marginTop:4},children:(0,x.__)("Click to open Media Library","b-blocks")})]})})})}),P=(0,l.jsxs)("div",{className:"b-blocks-article-card-body",children:[b?(0,l.jsx)("span",{className:"b-blocks-article-card-badge",children:b}):null,(0,l.jsx)(h.RichText,{tagName:N,className:"b-blocks-article-card-heading",value:f,onChange:e=>T("content",e,"heading"),placeholder:(0,x.__)("Article title goes here","b-blocks"),allowedFormats:["core/bold","core/italic"]}),(0,l.jsx)(h.RichText,{tagName:"p",className:"b-blocks-article-card-excerpt",value:k,onChange:e=>T("content",e,"excerpt"),placeholder:(0,x.__)("Add a short excerpt or description…","b-blocks"),allowedFormats:["core/bold","core/italic"]}),w?(0,l.jsxs)("span",{className:"b-blocks-article-card-meta",children:[_?(0,l.jsx)("span",{className:"b-blocks-article-card-meta-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:_}}):null,(0,l.jsx)("span",{className:"b-blocks-article-card-meta-text",children:w})]}):null,!$&&C?(0,l.jsxs)("span",{className:"b-blocks-article-card-cta",children:[(0,l.jsx)("span",{className:"b-blocks-article-card-cta-label",children:C}),"link"===j?(0,l.jsx)("svg",{className:"b-blocks-article-card-cta-arrow",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M5 12h14M13 6l6 6-6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null]}):null]}),A=(0,h.useBlockProps)({id:`block-${o}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(pu,{...e,updateObj:T,isPremium:S}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],value:p[i]||0,onSelect:e=>n({image:{...a,id:{...p,[i]:e?.id||0},url:{...g,[i]:e?.url||""},alt:e?.alt||m||""}}),render:({open:e})=>(0,l.jsx)(y.ToolbarButton,{icon:"format-image",label:M?(0,x.__)("Replace image","b-blocks"):(0,x.__)("Add image","b-blocks"),onClick:e})})})}),(0,l.jsx)(h.AlignmentToolbar,{value:u[i]||hu(u,i)||"left",onChange:e=>{const t="string"==typeof d?{desktop:d,tablet:"",mobile:""}:{...d};t[i]=e||"",T("layout",t,"alignment")}})]}),(0,l.jsxs)("div",{...A,children:[(0,l.jsx)(iu,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:L,children:(0,l.jsxs)("article",{className:"b-blocks-article-card-card",children:[E,P]})})})]})]})}));Nl(tu.name)&&(0,p.registerBlockType)(tu,{icon:Cl,edit:gu,save:()=>null}) |
| 303 |
;const mu=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/audio-player","title":"Audio Player","category":"bBlocks","description":"A custom-styled HTML5 audio player with bar, card, sound-bars, vinyl, coverflow and playlist themes.","keywords":["audio player","podcast","music","mp3","html5 audio","playlist"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"audio":{"type":"object","default":{"url":"","id":0,"trackTitle":"","artistName":"","albumArt":{"url":"","id":0}}},"tracks":{"type":"array","default":[]},"behavior":{"type":"object","default":{"autoPlay":false,"loop":false,"showDownload":true,"showSeek":true,"showTimecode":true,"showVolume":true,"showSkip":true,"skipSeconds":10,"showRestart":false,"showStop":false,"showRepeat":false,"showSpeed":false,"speeds":[1,1.25,1.5,2],"showRemaining":false}},"layout":{"type":"object","default":{"style":"bar","alignment":"left","maxWidth":{"desktop":"","tablet":"","mobile":""}}},"player":{"type":"object","default":{"bg":{"type":"solid","color":"#006F9E"},"border":{},"borderRadius":{"desktop":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"16px","right":"20px","bottom":"16px","left":"20px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"colors":{"type":"object","default":{"control":"#ffffff","accent":"","track":"","trackActive":""}},"title":{"type":"object","default":{"color":"#ffffff","typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""},"fontWeight":"600"},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"artist":{"type":"object","default":{"color":"#ffffff","typo":{"fontSize":{"desktop":"13px","tablet":"","mobile":""}},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"buttonStyle":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"hoverColor":"","hoverBg":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"playBtnStyle":{"type":"object","default":{"color":"#fff","bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"skipBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"restartBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"repeatBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"stopBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"speedBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""}}},"volumeStyle":{"type":"object","default":{"trackColor":"#FFFFFF","fillColor":"#EAEAEA","margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{}}},"downloadStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"seekStyle":{"type":"object","default":{"trackColor":"#FFFFFF","fillColor":"#EAEAEA","margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"trackSize":{"desktop":"","tablet":"","mobile":""},"fillSize":{"desktop":"","tablet":"","mobile":""}}},"timecode":{"type":"object","default":{"position":"left","color":"","typo":{}}},"playlistStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"color":"","activeBg":{"type":"solid","color":""},"activeColor":"","itemPadding":{"desktop":{"top":"","left":"","bottom":"","right":""},"tablet":{"top":"","left":"","bottom":"","right":""},"mobile":{"top":"","left":"","bottom":"","right":""}},"border":{},"borderRadius":{"desktop":{"top":"","left":"","bottom":"","right":""},"tablet":{"top":"","left":"","bottom":"","right":""},"mobile":{"top":"","left":"","bottom":"","right":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 0)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),bu=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,fu=({attributes:e,id:o,isBackend:i=!1})=>{ |
| 304 |
const{layout:s={},player:a={},colors:r={},title:c={},artist:d={},timecode:u={},buttonStyle:p={},playBtnStyle:h={},skipBtnStyle:g={},restartBtnStyle:m={},repeatBtnStyle:b={},stopBtnStyle:f={},speedBtnStyle:x={},volumeStyle:y={},downloadStyle:v={},seekStyle:k={},playlistStyle:w={},advanced:_}=e,C=r.control,j=r.accent,$=a.bg?.color,S=r.track,T=r.trackActive,M=`#${o} .b-blocks-audio-player`,N=`${M} .b-blocks-audio-player-player`,L=`${M} .b-blocks-audio-player-title`,E=`${M} .b-blocks-audio-player-artist`,P=`${M} .b-blocks-audio-player-time, ${M} .b-blocks-audio-player-current, ${M} .b-blocks-audio-player-duration`,A=`${M} .b-blocks-audio-player-playpause, ${M} .b-blocks-audio-player-skip, ${M} .b-blocks-audio-player-restart, ${M} .b-blocks-audio-player-repeat, ${M} .b-blocks-audio-player-stop, ${M} .b-blocks-audio-player-speed`,B=`${M} .b-blocks-audio-player-playpause`,I=`${M} .b-blocks-audio-player-skip`,O=`${M} .b-blocks-audio-player-restart`,R=`${M} .b-blocks-audio-player-repeat`,z=`${M} .b-blocks-audio-player-stop`,D=`${M} .b-blocks-audio-player-speed`,F=`${M} input[type='range'].b-blocks-audio-player-volume`,H=`${M} .b-blocks-audio-player-download`,W=`${M} .b-blocks-audio-player-seek-wrap`,U=`${M} input[type='range'].b-blocks-audio-player-seek`,G=`${M} .b-blocks-audio-player-list-item`,V=`${M} .b-blocks-audio-player-list-item.is-active`,q=(e,t,n)=>na(e,ha(t?.[n])),Y=(e,t)=>e.split(",").map((e=>`${e.trim()}${t}`)).join(", "),K=(e,t)=>`\n\t\t${e}{\n\t\t\t${na("color",t?.color)}\n\t\t\t${oa(t?.bg)}\n\t\t\t${ia(t?.border)}\n\t\t}\n\t\t${Y(e,":hover")}{\n\t\t\t${na("color",t?.hoverColor)}\n\t\t\t${oa(t?.hoverBg)}\n\t\t}\n\t`,Q=(e,t,n)=>{const o=bu(t?.iconSize,n);return`\n\t\t\t${e}{\n\t\t\t\t${q("margin",t?.margin,n)}\n\t\t\t\t${q("padding",t?.padding,n)}\n\t\t\t\t${q("border-radius",t?.borderRadius,n)}\n\t\t\t}\n\t\t\t${o?`${Y(e," svg")}{ ${na("width",o)} ${na("height",o)} }`:""}\n\t\t`},Z=e=>`\n\t\t${N}{\n\t\t\t${na("max-width",bu(s.maxWidth,e))}\n\t\t\t${q("margin",a.margin,e)}\n\t\t\t${q("padding",a.padding,e)}\n\t\t\t${q("border-radius",a.borderRadius,e)}\n\t\t}\n\t\t${Q(A,p,e)}\n\t\t${Q(B,h,e)}\n\t\t${Q(I,g,e)}\n\t\t${Q(O,m,e)}\n\t\t${Q(R,b,e)}\n\t\t${Q(z,f,e)}\n\t\t${Q(D,x,e)}\n\t\t${Q(F,y,e)}\n\t\t${Q(H,v,e)}\n\t\t${W}{\n\t\t\t${q("margin",k.margin,e)}\n\t\t}\n\t\t${U}::-webkit-slider-runnable-track{\n\t\t\t${na("height",bu(k.trackSize,e))}\n\t\t\t${q("border-radius",k.borderRadius,e)}\n\t\t}\n\t\t${U}::-moz-range-track{\n\t\t\t${na("height",bu(k.trackSize,e))}\n\t\t\t${q("border-radius",k.borderRadius,e)}\n\t\t}\n\t\t${L}{\n\t\t\t${q("margin",c.margin,e)}\n\t\t\t${q("padding",c.padding,e)}\n\t\t\t${q("border-radius",c.borderRadius,e)}\n\t\t}\n\t\t${E}{\n\t\t\t${q("margin",d.margin,e)}\n\t\t\t${q("padding",d.padding,e)}\n\t\t\t${q("border-radius",d.borderRadius,e)}\n\t\t}\n\t\t${G}{\n\t\t\t${q("padding",w.itemPadding,e)}\n\t\t\t${q("border-radius",w.borderRadius,e)}\n\t\t}\n\t`,X=k.fillColor||j,J=k.trackColor,ee=k.trackColor||"rgba(127, 127, 127, 0.3)",te=y.fillColor||j,ne=y.trackColor||"rgba(127, 127, 127, 0.3)";return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${pa("",c.typo).googleFontLink}\n\t\t\t${pa("",d.typo).googleFontLink}\n\t\t\t${pa("",u.typo).googleFontLink}\n\n\t\t\t${N}{\n\t\t\t\t${na("color",C)}\n\t\t\t\t${oa(a.bg)}\n\t\t\t\t${ia(a.border)}\n\t\t\t}\n\n\t\t\t${A}{\n\t\t\t\t${na("color",C)}\n\t\t\t}\n\n\t\t\t${B}{\n\t\t\t\t${na("background",j)}\n\t\t\t\t${na("color",$)}\n\t\t\t}\n\n\t\t\t${R}.is-active{\n\t\t\t\t${na("color",j)}\n\t\t\t}\n\n\t\t\t${K(A,p)}\n\t\t\t${K(B,h)}\n\t\t\t${K(I,g)}\n\t\t\t${K(O,m)}\n\t\t\t${K(R,b)}\n\t\t\t${K(z,f)}\n\t\t\t${K(D,x)}\n\t\t\t${K(F,y)}\n\t\t\t${K(H,v)}\n\n\t\t\t${U}::-webkit-slider-runnable-track{ background: linear-gradient(to right, ${X} 0%, ${X} var(--b-blocks-audio-player-var-progress, 0%), ${ee} var(--b-blocks-audio-player-var-progress, 0%), ${ee} 100%); }\n\t\t\t${U}::-moz-range-track{ background: ${ee}; }\n\t\t\t${U}::-moz-range-progress{ background: ${X}; }\n\t\t\t${U}::-webkit-slider-thumb {\n\t\t\t\t${na("border-color",X)}\n\t\t\t\t${na("background",C)}\n\t\t\t}\n\t\t\t${U}::-moz-range-thumb {\n\t\t\t\t${na("border-color",X)}\n\t\t\t\t${na("background",C)}\n\t\t\t}\n\n\t\t\t${F}::-webkit-slider-runnable-track{ background: linear-gradient(to right, ${te} 0%, ${te} var(--b-blocks-audio-player-var-progress, 0%), ${ne} var(--b-blocks-audio-player-var-progress, 0%), ${ne} 100%); }\n\t\t\t${F}::-moz-range-track{ background: ${ne}; }\n\t\t\t${F}::-moz-range-progress{ background: ${te}; }\n\t\t\t${F}::-webkit-slider-thumb{ border-color: ${te}; }\n\t\t\t${F}::-moz-range-thumb{ border-color: ${te}; }\n\n\t\t\t${M} .b-blocks-audio-player-bar {\n\t\t\t\t${na("background",J||"rgba(127, 127, 127, 0.35)")}\n\t\t\t}\n\n\t\t\t${M} .b-blocks-audio-player-bar.is-played {\n\t\t\t\tbackground: ${X};\n\t\t\t}\n\n\t\t\t${M} .b-blocks-audio-player-vinyl-disc {\n\t\t\t\t${na("border-color",j)}\n\t\t\t}\n\n\t\t\t${M} .b-blocks-audio-player-vinyl-center {\n\t\t\t\t${na("background",j)}\n\t\t\t}\n\n\t\t\t${L}{\n\t\t\t\t${na("color",c.color||C)}\n\t\t\t\t${oa(c.bg)}\n\t\t\t\t${ia(c.border)}\n\t\t\t}\n\t\t\t${pa(L,c.typo).styles}\n\t\t\t${E}{\n\t\t\t\t${na("color",d.color||C)}\n\t\t\t\t${oa(d.bg)}\n\t\t\t\t${ia(d.border)}\n\t\t\t}\n\t\t\t${pa(E,d.typo).styles}\n\t\t\t${P}{ ${na("color",u.color||C)} }\n\t\t\t${pa(P,u.typo).styles}\n\n\t\t\t${G}{\n\t\t\t\t${na("color",w.color||C)}\n\t\t\t\t${oa(w.bg)||`background:${S};`}\n\t\t\t\t${ia(w.border)}\n\t\t\t}\n\n\t\t\t${V}{\n\t\t\t\t${na("color",w.activeColor)}\n\t\t\t\t${oa(w.activeBg)||`background:${T};`}\n\t\t\t}\n\n\t\t\t${Z("desktop")}\n\t\t\t${t}{ ${Z("tablet")} }\n\t\t\t${n}{ ${Z("mobile")} }\n\t\t\t${_a(o,_,i,!1)}\n\t\t\t`}})},xu=e=>{(!isFinite(e)||e<0)&&(e=0);const t=Math.floor(e),n=Math.floor(t/3600),o=Math.floor(t%3600/60),i=t%60,s=e=>String(e).padStart(2,"0");return n>0?`${n}:${s(o)}:${s(i)}`:`${o}:${s(i)}`},yu=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M8 5v14l11-7z"})}),vu=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M6 5h4v14H6zM14 5h4v14h-4z"})}),ku=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M6 6h12v12H6z"})}),wu=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M11 12l8.5 6V6L11 12zM4 6h2.5v12H4z"})}),_u=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M13 12L4.5 6v12L13 12zM17.5 6H20v12h-2.5z"})}),Cu=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M4 4v6h6M4.5 10a8 8 0 1 1-1 5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),ju=()=>(0,l.jsx)("svg",{viewBox:"0 0 640 640",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M534.6 182.6C547.1 170.1 547.1 149.8 534.6 137.3L470.6 73.3C461.4 64.1 447.7 61.4 435.7 66.4C423.7 71.4 416 83.1 416 96L416 128L256 128C150 128 64 214 64 320C64 337.7 78.3 352 96 352C113.7 352 128 337.7 128 320C128 249.3 185.3 192 256 192L416 192L416 224C416 236.9 423.8 248.6 435.8 253.6C447.8 258.6 461.5 255.8 470.7 246.7L534.7 182.7zM105.4 457.4C92.9 469.9 92.9 490.2 105.4 502.7L169.4 566.7C178.6 575.9 192.3 578.6 204.3 573.6C216.3 568.6 224 556.9 224 544L224 512L384 512C490 512 576 426 576 320C576 302.3 561.7 288 544 288C526.3 288 512 302.3 512 320C512 390.7 454.7 448 384 448L224 448L224 416C224 403.1 216.2 391.4 204.2 386.4C192.2 381.4 178.5 384.2 169.3 393.3L105.3 457.3z"})}),$u=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M12 3v12m0 0l-4-4m4 4l4-4M5 21h14", |
| 305 |
stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})}),Su=()=>(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:[(0,l.jsx)("path",{d:"M9 18V6l10-2v12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("circle",{cx:"6",cy:"18",r:"3",stroke:"currentColor",strokeWidth:"1.6"}),(0,l.jsx)("circle",{cx:"16",cy:"16",r:"3",stroke:"currentColor",strokeWidth:"1.6"})]}),Tu="b-blocks-audio-player",Mu=({player:e,className:t=""})=>{const{playing:n,buffering:o,togglePlay:i}=e;return(0,l.jsx)("button",{type:"button",className:`${Tu}-playpause ${t}`.trim(),"aria-label":n?(0,x.__)("Pause","b-blocks"):(0,x.__)("Play","b-blocks"),"aria-pressed":n?"true":"false",onClick:i,children:o?(0,l.jsx)("span",{className:`${Tu}-spinner`,"aria-hidden":"true"}):(0,l.jsx)("span",{className:`${Tu}-icon`,"aria-hidden":"true",children:n?(0,l.jsx)(vu,{}):(0,l.jsx)(yu,{})})})},Nu=({player:e,dir:t,className:n=""})=>(0,l.jsx)("button",{type:"button",className:`${Tu}-skip ${Tu}-skip--${t<0?"prev":"next"} ${n}`.trim(),"aria-label":t<0?(0,x.__)("Previous","b-blocks"):(0,x.__)("Next","b-blocks"),onClick:()=>e.skip(t),children:t<0?(0,l.jsx)(wu,{}):(0,l.jsx)(_u,{})}),Lu=({player:e,className:t=""})=>(0,l.jsx)("button",{type:"button",className:`${Tu}-stop ${t}`.trim(),"aria-label":(0,x.__)("Stop","b-blocks"),onClick:e.stop,children:(0,l.jsx)(ku,{})}),Eu=({player:e,className:t=""})=>(0,l.jsx)("button",{type:"button",className:`${Tu}-restart ${t}`.trim(),"aria-label":(0,x.__)("Restart","b-blocks"),onClick:e.restart,children:(0,l.jsx)(Cu,{})}),Pu=({player:e,className:t=""})=>(0,l.jsx)("button",{type:"button",className:`${Tu}-repeat ${e.repeat?"is-active":""} ${t}`.trim(),"aria-label":(0,x.__)("Repeat","b-blocks"),"aria-pressed":e.repeat?"true":"false",onClick:e.toggleRepeat,children:(0,l.jsx)(ju,{})}),Au=({player:e,className:t=""})=>(0,l.jsxs)("button",{type:"button",className:`${Tu}-speed ${t}`.trim(),"aria-label":(0,x.__)("Playback speed","b-blocks"),onClick:e.cycleSpeed,children:[e.speed,"x"]}),Bu=({player:e,className:t=""})=>{const{seekingRef:n,currentTime:o,duration:i,seekTo:s}=e,[a,r]=(0,m.useState)(null),c=(0,m.useRef)(null),d=(0,m.useRef)(s);c.current=a,d.current=s;const u=null!==a?a:o,p=i>0?Math.min(100,u/i*100):0;return(0,m.useEffect)((()=>{const e=()=>{if(null===c.current)return;const e=c.current;n.current=!1,r(null),d.current(e)};return window.addEventListener("pointerup",e),window.addEventListener("mouseup",e),window.addEventListener("touchend",e),window.addEventListener("pointercancel",e),()=>{window.removeEventListener("pointerup",e),window.removeEventListener("mouseup",e),window.removeEventListener("touchend",e),window.removeEventListener("pointercancel",e)}}),[n]),(0,l.jsx)("input",{type:"range",className:`${Tu}-seek ${t}`.trim(),min:"0",max:i||0,step:"0.1",value:u,"aria-label":(0,x.__)("Seek","b-blocks"),"aria-valuemin":"0","aria-valuemax":Math.floor(i),"aria-valuenow":Math.floor(u),"aria-valuetext":xu(u),style:{"--b-blocks-audio-player-var-progress":`${p}%`},onPointerDown:()=>{n.current=!0},onChange:e=>{n.current=!0,r(parseFloat(e.target.value)||0)},onKeyUp:e=>{const t=parseFloat(e.currentTarget.value)||0;n.current=!1,r(null),s(t)}})},Iu=({player:e,className:t=""})=>(0,l.jsx)("input",{type:"range",className:`${Tu}-volume ${t}`.trim(),min:"0",max:"1",step:"0.01",value:e.muted?0:e.volume,"aria-label":(0,x.__)("Volume","b-blocks"),style:{"--b-blocks-audio-player-var-progress":100*(e.muted?0:e.volume)+"%"},onChange:t=>e.setVol(t.target.value)}),Ou=({player:e,remaining:t=!1,className:n=""})=>{const{currentTime:o,duration:i}=e;return t?(0,l.jsxs)("span",{className:`${Tu}-time ${n}`.trim(),"aria-hidden":"true",children:["-",xu(Math.max(0,i-o))]}):(0,l.jsxs)("span",{className:`${Tu}-time ${n}`.trim(),"aria-hidden":"true",children:[(0,l.jsx)("span",{className:`${Tu}-current`,children:xu(o)}),(0,l.jsx)("span",{className:`${Tu}-sep`,children:" / "}),(0,l.jsx)("span",{className:`${Tu}-duration`,children:xu(i)})]})},Ru=({url:e,className:t=""})=>(0,l.jsxs)("a",{className:`${Tu}-download ${t}`.trim(),href:e,download:!0,"aria-label":(0,x.__)("Download audio","b-blocks"),children:[(0,l.jsx)($u,{}),(0,l.jsx)("span",{className:"screen-reader-text",children:(0,x.__)("Download audio","b-blocks")})]}),zu="b-blocks-audio-player",Du=({track:e})=>e.title||e.artist?(0,l.jsxs)("div",{className:`${zu}-meta`,children:[e.title?(0,l.jsx)("p",{className:`${zu}-title`,children:e.title}):null,e.artist?(0,l.jsx)("p",{className:`${zu}-artist`,children:e.artist}):null]}):null,Fu=({track:e,className:t=""})=>(0,l.jsx)("div",{className:`${zu}-art ${t}`.trim(),children:e.art?(0,l.jsx)("img",{className:`${zu}-art-img`,src:e.art,alt:"",loading:"lazy",decoding:"async"}):(0,l.jsx)("span",{className:`${zu}-art-placeholder`,"aria-hidden":"true",children:(0,l.jsx)(Su,{})})}),Hu=e=>{const t=43758.5453*Math.sin(12.9898*e);return 18+42*(t-Math.floor(t))},Wu=new WeakMap,Uu=({player:e})=>{const t=(0,m.useRef)([]),n=(0,m.useRef)(0),{playing:o,audioRef:i,url:s}=e,a=()=>{for(let e=0;e<t.current.length;e++){const n=t.current[e];n&&(n.style.height=`${Hu(e)}%`)}};return(0,m.useEffect)((()=>{a()}),[]),(0,m.useEffect)((()=>{const e=i.current;if(!o||!e)return void a();const s=(e=>{if(Wu.has(e))return Wu.get(e);let t=null;try{const n=window.AudioContext||window.webkitAudioContext;if(n){const o=new n,i=o.createMediaElementSource(e),s=o.createAnalyser();s.fftSize=128,s.smoothingTimeConstant=.75,i.connect(s),s.connect(o.destination),t={ctx:o,analyser:s,data:new Uint8Array(s.frequencyBinCount)}}}catch(e){t=null}return Wu.set(e,t),t})(e);if(!s)return void a();"suspended"===s.ctx.state&&s.ctx.resume();const{analyser:r,data:l}=s,c=l.length,d=()=>{r.getByteFrequencyData(l);for(let e=0;e<56;e++){const n=t.current[e];if(!n)continue;const o=Math.min(c-1,Math.floor((e/56)**.85*c)),i=l[o]/255;n.style.height=8+92*i+"%"}n.current=requestAnimationFrame(d)};return n.current=requestAnimationFrame(d),()=>cancelAnimationFrame(n.current)}),[o,s]),(0,l.jsx)("div",{className:`${zu}-bars`,"aria-hidden":"true",children:Array.from({length:56}).map(((n,o)=>(0,l.jsx)("span",{ref:e=>{t.current[o]=e},className:`${zu}-bar${o/56*100<=e.seekPct?" is-played":""}`},o)))})},Gu=({attributes:e,isBackend:t=!1})=>{const{layout:n={},behavior:o={},timecode:i={}}=e,s=((e,t=!1)=>{const{behavior:n={}}=e,{autoPlay:o=!1,loop:i=!1,skipSeconds:s=10,speeds:a=[1,1.25,1.5,2]}=n,r=(0,m.useMemo)((()=>(e=>{const{audio:t={},tracks:n=[]}=e,o=(Array.isArray(n)?n:[]).map((e=>({url:e?.url||"",title:e?.title||"",artist:e?.artist||"",art:e?.art?.url||""}))).filter((e=>e.url));return o.length?o:[{url:t.url||"",title:t.trackTitle||"",artist:t.artistName||"",art:t.albumArt?.url||""}]})(e)),[e]),l=r.length>1,c=(0,m.useRef)(null),d=(0,m.useRef)(!1),u=(0,m.useRef)(!1),p=(0,m.useRef)(0),h=(0,m.useRef)(""),g=(0,m.useRef)(!1),[b,f]=(0,m.useState)({}),[x,y]=(0,m.useState)(0),[v,k]=(0,m.useState)(!1),[w,_]=(0,m.useState)(!1),[C,j]=(0,m.useState)(0),[$,S]=(0,m.useState)(0),[T,M]=(0,m.useState)(1),[N,L]=(0,m.useState)(!1),[E,P]=(0,m.useState)(1),[A,B]=(0,m.useState)(!!i),I=r[Math.min(x,r.length-1)]||{},O=I.url||"",[R,z]=(0,m.useState)(O);(0,m.useEffect)((()=>{if(z(O),!O||"undefined"==typeof fetch)return;let e=!1;return fetch(O).then((e=>e.ok?e.blob():Promise.reject(e.status))).then((t=>{if(e)return;const n=URL.createObjectURL(t),o=c.current;o&&(p.current=o.currentTime||0,u.current=!o.paused),h.current&&URL.revokeObjectURL(h.current),h.current=n,z(n)})).catch((()=>{})),()=>{e=!0}}),[O]),(0,m.useEffect)((()=>()=>{h.current&&URL.revokeObjectURL(h.current)}),[]),(0,m.useEffect)((()=>{if("undefined"==typeof window||"undefined"==typeof Audio||!r||!r.length)return;const e=[];return r.forEach((t=>{if(!t.url)return;const n=new Audio;n.preload="metadata";const o=()=>{isFinite(n.duration)&&n.duration>0&&f((e=>({...e,[t.url]:n.duration})))};n.addEventListener("loadedmetadata",o),n.src=t.url,e.push({ |
| 306 |
audio:n,onMeta:o})})),()=>{e.forEach((({audio:e,onMeta:t})=>{e.removeEventListener("loadedmetadata",t)}))}}),[r]),(0,m.useEffect)((()=>{const e=c.current;if(!e)return;const t=()=>k(!0),n=()=>k(!1),o=()=>{if(e.duration===1/0){g.current=!0;try{e.currentTime=1e101}catch(e){}return}const t=isFinite(e.duration)?e.duration:0;if(t>0&&(j(t),O&&f((e=>({...e,[O]:t})))),g.current||p.current>0){g.current=!1;const t=p.current||0;p.current=0;try{e.currentTime=t}catch(e){}S(t)}if(u.current){u.current=!1;const t=e.play();t&&"function"==typeof t.catch&&t.catch((()=>k(!1)))}},i=()=>{d.current||g.current||S(e.currentTime||0)},s=()=>_(!0),a=()=>{_(!1),k(!0)},h=()=>_(!1),m=()=>{M(e.volume),L(e.muted)},b=()=>{if(A&&!l)return e.currentTime=0,void e.play().catch((()=>{}));l&&x<r.length-1?y((e=>e+1)):l&&A?y(0):k(!1)};return e.addEventListener("play",t),e.addEventListener("pause",n),e.addEventListener("loadedmetadata",o),e.addEventListener("durationchange",o),e.addEventListener("timeupdate",i),e.addEventListener("waiting",s),e.addEventListener("playing",a),e.addEventListener("canplay",h),e.addEventListener("volumechange",m),e.addEventListener("ended",b),e.playbackRate=E,e.readyState>=1&&o(),()=>{e.removeEventListener("play",t),e.removeEventListener("pause",n),e.removeEventListener("loadedmetadata",o),e.removeEventListener("durationchange",o),e.removeEventListener("timeupdate",i),e.removeEventListener("waiting",s),e.removeEventListener("playing",a),e.removeEventListener("canplay",h),e.removeEventListener("volumechange",m),e.removeEventListener("ended",b)}}),[O,A,l,x,r.length]),(0,m.useEffect)((()=>{c.current&&(c.current.playbackRate=E)}),[E,O]);const D=(0,m.useRef)(!1);(0,m.useEffect)((()=>{const e=c.current;e&&(D.current||!o||t||(D.current=!0,e.muted=!0,e.play().catch((()=>{}))))}),[o,t,O]);const F=()=>{const e=c.current;if(!e)return;const t=e.play();t&&"function"==typeof t.catch&&t.catch((()=>k(!1)))},H=()=>{const e=c.current;e&&(e.paused||e.ended?F():c.current&&c.current.pause())},W=e=>{let t=parseFloat(e);if(Number.isNaN(t))return null;const n=c.current,o=(n&&isFinite(n.duration)?n.duration:0)||C||b[O]||0;return o>0&&(t=Math.min(t,o)),Math.max(0,t)},U=e=>{const t=W(e);if(null===t)return;S(t);const n=c.current;if(n)try{n.currentTime=t}catch(e){}},G=e=>{const t=(e%r.length+r.length)%r.length;t!==x?(u.current=!0,y(t),S(0)):H()},V=C||b[O]||0;return{audioRef:c,seekingRef:d,mediaSrc:R,list:r,index:x,multi:l,track:I,url:O,playing:v,buffering:w,duration:V,durations:b,currentTime:$,volume:T,muted:N,speed:E,repeat:A,seekPct:V>0?$/V*100:0,togglePlay:H,stop:()=>{const e=c.current;e&&(e.pause(),e.currentTime=0,S(0))},restart:()=>{const e=c.current;e&&(e.currentTime=0,S(0),F())},skip:e=>{if(l)return void G(x+e);const t=c.current;if(!t)return;const n=Math.min(Math.max(0,(t.currentTime||0)+e*s),t.duration||0);U(n)},seekTo:U,previewTime:e=>{const t=W(e);null!==t&&S(t)},playIndex:G,setVol:e=>{const t=c.current,n=Math.min(1,Math.max(0,parseFloat(e)||0));M(n),t&&(t.volume=n,n>0&&(t.muted=!1))},toggleMute:()=>{const e=c.current;e&&(e.muted=!e.muted)},cycleSpeed:()=>{const e=a&&a.length?a:[1],t=e.indexOf(E);P(e[(t+1)%e.length])},toggleRepeat:()=>B((e=>!e))}})(e,t),{url:a,track:r,list:c,index:d,playing:u}=s,p=n.style||"bar",h="left"===i.position,g=!1!==o.showSeek,b=!1!==o.showSkip,f=!1!==o.showTimecode,y=!1!==o.showVolume,v=!1!==o.showDownload,k=!!o.showRestart,w=!!o.showStop,_=!!o.showRepeat,C=!!o.showSpeed,j=!!o.showRemaining,$=[zu,`${zu}--style-${p}`,`${zu}--align-${n.alignment||"left"}`,u?"is-playing":""].filter(Boolean).join(" ");if(!a)return(0,l.jsx)("div",{className:$,children:(0,l.jsxs)("div",{className:`${zu}-empty`,children:[(0,l.jsx)("span",{className:`${zu}-empty-icon`,"aria-hidden":"true",children:(0,l.jsx)(Su,{})}),(0,l.jsx)("span",{className:`${zu}-empty-title`,children:(0,x.__)("No audio selected","b-blocks")}),(0,l.jsx)("span",{className:`${zu}-empty-text`,children:(0,x.__)("Add an audio file to start playing.","b-blocks")})]})});const S=(0,l.jsx)("audio",{ref:s.audioRef,className:`${zu}-audio`,preload:"metadata",src:s.mediaSrc||a,children:(0,x.__)("Your browser does not support the audio element.","b-blocks")}),T=(e=null)=>(0,l.jsxs)("div",{className:`${zu}-transport`,children:[k?(0,l.jsx)(Eu,{player:s}):null,b?(0,l.jsx)(Nu,{player:s,dir:-1}):null,(0,l.jsx)(Mu,{player:s}),b?(0,l.jsx)(Nu,{player:s,dir:1}):null,w?(0,l.jsx)(Lu,{player:s}):null,_?(0,l.jsx)(Pu,{player:s}):null,e]}),M=f?(0,l.jsx)(Ou,{player:s}):null,N=(0,l.jsxs)("div",{className:`${zu}-controls`,children:[T(),h?M:null,g?(0,l.jsx)("div",{className:`${zu}-seek-wrap`,children:(0,l.jsx)(Bu,{player:s})}):null,h?null:M,j?(0,l.jsx)(Ou,{player:s,remaining:!0}):null,C?(0,l.jsx)(Au,{player:s}):null,y?(0,l.jsx)(Iu,{player:s}):null,v?(0,l.jsx)(Ru,{url:a}):null]});let L;return"bar"===p||"card"===p?L=(0,l.jsxs)("div",{className:`${zu}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:["card"===p?(0,l.jsx)(Fu,{track:r}):null,(0,l.jsxs)("div",{className:`${zu}-body`,children:[(0,l.jsx)(Du,{track:r}),N]})]}):"bars"===p?L=(0,l.jsxs)("div",{className:`${zu}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:[(0,l.jsx)(Du,{track:r}),(0,l.jsxs)("div",{className:`${zu}-wave-seek`,children:[(0,l.jsx)(Uu,{player:s}),(0,l.jsx)(Bu,{player:s,className:`${zu}-seek--overlay`})]}),(0,l.jsxs)("div",{className:`${zu}-controls`,children:[T(),h&&f?(0,l.jsx)(Ou,{player:s,className:`${zu}-time--current`,remaining:!1}):null,g?(0,l.jsx)("div",{className:`${zu}-seek-wrap`,children:(0,l.jsx)(Bu,{player:s})}):null,!h&&f?(0,l.jsx)(Ou,{player:s,className:`${zu}-time--current`,remaining:!1}):null,y?(0,l.jsx)(Iu,{player:s}):null,j?(0,l.jsx)(Ou,{player:s,remaining:!0}):null,C?(0,l.jsx)(Au,{player:s}):null,v?(0,l.jsx)(Ru,{url:a}):null]})]}):"vinyl"===p?L=(0,l.jsxs)("div",{className:`${zu}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:[(0,l.jsxs)("div",{className:`${zu}-vinyl`,children:[(0,l.jsxs)("div",{className:`${zu}-vinyl-disc`,children:[r.art?(0,l.jsx)("img",{className:`${zu}-vinyl-art`,src:r.art,alt:""}):null,(0,l.jsx)("span",{className:`${zu}-vinyl-center`})]}),(0,l.jsxs)("div",{className:`${zu}-vinyl-arm`,"aria-hidden":"true",children:[(0,l.jsx)("span",{className:`${zu}-vinyl-arm-base`}),(0,l.jsx)("span",{className:`${zu}-vinyl-arm-stick`}),(0,l.jsx)("span",{className:`${zu}-vinyl-arm-head`})]})]}),(0,l.jsxs)("div",{className:`${zu}-body`,children:[r.title?(0,l.jsx)("p",{className:`${zu}-title ${zu}-title--pill`,children:r.title}):null,g?(0,l.jsx)("div",{className:`${zu}-seek-wrap`,children:(0,l.jsx)(Bu,{player:s})}):null,T(),(0,l.jsxs)("div",{className:`${zu}-vinyl-row`,children:[f?(0,l.jsxs)("span",{className:`${zu}-time ${zu}-time--pill`,"aria-hidden":"true",children:[xu(s.currentTime)," / ",xu(s.duration)]}):null,j?(0,l.jsx)(Ou,{player:s,remaining:!0,className:`${zu}-time--pill`}):null,y?(0,l.jsx)(Iu,{player:s}):null]})]}),v?(0,l.jsx)(Ru,{url:a}):null]}):"coverflow"===p?L=(0,l.jsxs)("div",{className:`${zu}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:[v?(0,l.jsx)(Ru,{url:a}):null,(0,l.jsx)("div",{className:`${zu}-coverflow`,children:c.map(((e,t)=>{const n=t-d;return Math.abs(n)>2?null:(0,l.jsx)("button",{type:"button",className:`${zu}-cover ${zu}-cover--pos${n}`,"aria-label":e.title||(0,x.__)("Track","b-blocks"),"aria-current":0===n?"true":void 0,onClick:()=>s.playIndex(t),children:e.art?(0,l.jsx)("img",{src:e.art,alt:""}):(0,l.jsx)("span",{className:`${zu}-art-placeholder`,"aria-hidden":"true",children:(0,l.jsx)(Su,{})})},t)}))}),(0,l.jsx)(Du,{track:r}),(0,l.jsxs)("div",{className:`${zu}-controls`,children:[f?(0,l.jsx)("span",{className:`${zu}-current`,children:xu(s.currentTime)}):null,g?(0,l.jsx)("div",{className:`${zu}-seek-wrap`,children:(0,l.jsx)(Bu,{player:s})}):null,f?(0,l.jsx)("span",{className:`${zu}-duration`,children:xu(s.duration)}):null,j?(0,l.jsx)(Ou,{player:s,remaining:!0}):null]}),T()] |
| 307 |
}):"playlist"===p&&(L=(0,l.jsxs)("div",{className:`${zu}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:[v?(0,l.jsx)(Ru,{url:a}):null,(0,l.jsxs)("div",{className:`${zu}-nowplaying`,children:[f?(0,l.jsx)("span",{className:`${zu}-current`,children:xu(s.currentTime)}):null,r.title?(0,l.jsx)("span",{className:`${zu}-np-title`,children:r.title}):null,f?(0,l.jsx)("span",{className:`${zu}-duration`,children:xu(s.duration)}):null,j?(0,l.jsx)(Ou,{player:s,remaining:!0}):null]}),g?(0,l.jsx)("div",{className:`${zu}-seek-wrap`,children:(0,l.jsx)(Bu,{player:s})}):null,T(),y?(0,l.jsx)("div",{className:`${zu}-volume-row`,children:(0,l.jsx)(Iu,{player:s})}):null,(0,l.jsx)("ul",{className:`${zu}-list`,children:c.map(((e,t)=>{const n=t===d&&s.duration>0?s.duration:s.durations?.[e.url]||e.duration||0,o=()=>t===d?s.togglePlay():s.playIndex(t);return(0,l.jsxs)("li",{className:`${zu}-list-item ${t===d?"is-active":""}`.trim(),onClick:o,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),o())},role:"button",tabIndex:0,"aria-label":e.title||`${(0,x.__)("Track","b-blocks")} ${t+1}`,children:[(0,l.jsx)("button",{type:"button",className:`${zu}-list-play`,"aria-hidden":"true",tabIndex:-1,onClick:e=>{e.stopPropagation(),o()},children:t===d&&u?(0,l.jsx)(vu,{}):(0,l.jsx)(yu,{})}),(0,l.jsx)("span",{className:`${zu}-list-title`,children:e.title||`${(0,x.__)("Track","b-blocks")} ${t+1}`}),(0,l.jsx)("span",{className:`${zu}-list-time`,children:xu(n)})]},t)}))})]})),(0,l.jsxs)("div",{className:$,children:[S,L]})},Vu=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],qu={top:"",right:"",bottom:"",left:""},Yu=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],Ku=[{label:(0,x.__)("Bar (compact)","b-blocks"),value:"bar"},{label:(0,x.__)("Card (album art top)","b-blocks"),value:"card"},{label:(0,x.__)("Sound Bars","b-blocks"),value:"bars"},{label:(0,x.__)("Vinyl (spinning record)","b-blocks"),value:"vinyl"},{label:(0,x.__)("Coverflow (multi-track)","b-blocks"),value:"coverflow"},{label:(0,x.__)("Playlist (multi-track)","b-blocks"),value:"playlist"}],Qu=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],Zu={url:"",id:0,title:"",artist:"",art:{url:"",id:0}},Xu=({attributes:e,setAttributes:t,index:n})=>{const o=e?.tracks||[],i=o[n]||Zu,s=e=>{const i=[...o];i[n]={...Zu,...i[n],...e},t({tracks:i})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Audio:","b-blocks")}),(0,l.jsx)(ve,{value:i.url||"",types:["audio"],onChange:e=>s({url:e||"",id:0}),placeholder:(0,x.__)("Audio URL","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Title","b-blocks"),value:i.title||"",onChange:e=>s({title:e}),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Artist","b-blocks"),value:i.artist||"",onChange:e=>s({artist:e}),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Album Art:","b-blocks")}),(0,l.jsx)(ve,{value:i.art?.url||"",types:["image"],onChange:e=>s({art:{url:e||"",id:0}}),placeholder:(0,x.__)("Art URL","b-blocks")})]})},Ju={url:"",id:0,title:"",artist:"",art:{url:"",id:0}},ep=({attributes:e,updateObj:t,setAttributes:n,device:o="desktop",activeIndex:i,setActiveIndex:s})=>{const{behavior:a={},layout:r={}}=e,{autoPlay:c,loop:d,showDownload:u,showTimecode:p,showVolume:h,showSkip:g,skipSeconds:m=10,showRestart:b,showStop:f,showRepeat:k,showSpeed:w,showRemaining:C,showSeek:j}=a,$="playlist"===r.style||"coverflow"===r.style,S=r.maxWidth||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tracks (playlist / coverflow)","b-blocks"),initialOpen:!1,children:[!$&&(0,l.jsx)(y.Notice,{status:"info",isDismissible:!1,children:(0,x.__)("The track list is used by the Playlist and Coverflow themes. Other themes play the single Audio file above.","b-blocks")}),(0,l.jsx)(_s,{attributes:e,setAttributes:n,arrKey:"tracks",newItem:Ju,itemLabel:"Track",title:"title",design:"sortable",minItem:0,activeIndex:i,setActiveIndex:s,ItemSettings:Xu})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Theme:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:r.style||"bar",options:Ku,onChange:e=>t("layout",e,"style"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Alignment:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:r.alignment,onChange:e=>t("layout",e,"alignment"),children:Qu.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e.label,value:e.value,icon:`editor-align${e.value}`},e.value)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:S?.[o],units:Vu,onChange:e=>{const t=S&&"object"==typeof S?S:{};n({layout:{...r,maxWidth:{...t,[o]:e}}})},__next40pxDefaultSize:!0})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Controls","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Skip / Prev-Next","b-blocks"),checked:!1!==g,onChange:e=>t("behavior",!!e,"showSkip")}),!1!==g&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Skip seconds","b-blocks"),value:m,onChange:e=>t("behavior",e,"skipSeconds"),min:5,max:60,step:5,__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Restart","b-blocks"),checked:!!b,onChange:e=>t("behavior",!!e,"showRestart")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Stop","b-blocks"),checked:!!f,onChange:e=>t("behavior",!!e,"showStop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Repeat","b-blocks"),checked:!!k,onChange:e=>t("behavior",!!e,"showRepeat")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Playback Speed","b-blocks"),checked:!!w,onChange:e=>t("behavior",!!e,"showSpeed")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Seek Bar / Progress","b-blocks"),checked:!1!==j,onChange:e=>t("behavior",!!e,"showSeek")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Timecode","b-blocks"),checked:!1!==p,onChange:e=>t("behavior",!!e,"showTimecode")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Remaining Time","b-blocks"),checked:!!C,onChange:e=>t("behavior",!!e,"showRemaining")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Volume Slider","b-blocks"),checked:!1!==h,onChange:e=>t("behavior",!!e,"showVolume")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Download Link","b-blocks"),checked:!1!==u,onChange:e=>t("behavior",!!e,"showDownload")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Behavior","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Autoplay","b-blocks"),checked:!!c,onChange:e=>t("behavior",!!e,"autoPlay")}),c&&(0,l.jsx)(y.Notice,{status:"warning",isDismissible:!1,children:(0,x.__)("Most browsers block autoplay with sound; the player starts muted. The visitor must interact to hear audio.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Loop","b-blocks"),checked:!!d,onChange:e=>t("behavior",!!e,"loop")})]})]})},tp=({player:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Player Container","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(An,{label:(0, |
| 308 |
x.__)("Background","b-blocks"),value:e.bg,onChange:e=>t("player",e,"bg")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.margin?.[n],resetValues:qu,onChange:e=>t("player",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.padding?.[n],resetValues:qu,onChange:e=>t("player",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("player",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.borderRadius?.[n],resetValues:qu,onChange:e=>t("player",e,"borderRadius",n)})]}),np=({colors:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Color Palette","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Controls & Text","b-blocks"),value:e.control,onChange:e=>t("colors",e,"control")}),(0,l.jsx)(Ue,{label:(0,x.__)("Accent Color","b-blocks"),value:e.accent,onChange:e=>t("colors",e,"accent")}),(0,l.jsx)(Ue,{label:(0,x.__)("Playlist Row","b-blocks"),value:e.track,onChange:e=>t("colors",e,"track")}),(0,l.jsx)(Ue,{label:(0,x.__)("Playlist Active Row","b-blocks"),value:e.trackActive,onChange:e=>t("colors",e,"trackActive")})]}),op=({buttonStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("All Buttons (Global)","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color","b-blocks"),value:e.color,onChange:e=>t("buttonStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:e.bg,onChange:e=>t("buttonStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color","b-blocks"),value:e.hoverColor,onChange:e=>t("buttonStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background","b-blocks"),value:e.hoverBg,onChange:e=>t("buttonStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:Vu,onChange:e=>t("buttonStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.margin?.[n],resetValues:qu,onChange:e=>t("buttonStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.padding?.[n],resetValues:qu,onChange:e=>t("buttonStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("buttonStyle",e,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.borderRadius?.[n],resetValues:qu,onChange:e=>t("buttonStyle",e,"borderRadius",n)})]}),ip=({playBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Play / Pause Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color,onChange:e=>t("playBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("playBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor,onChange:e=>t("playBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("playBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:Vu,onChange:e=>t("playBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.margin?.[n],resetValues:qu,onChange:e=>t("playBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.padding?.[n],resetValues:qu,onChange:e=>t("playBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("playBtnStyle",e,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.borderRadius?.[n],resetValues:qu,onChange:e=>t("playBtnStyle",e,"borderRadius",n)})]}),sp=({skipBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Skip Buttons (Next / Prev)","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("skipBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("skipBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("skipBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("skipBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:Vu,onChange:e=>t("skipBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.margin?.[n],resetValues:qu,onChange:e=>t("skipBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.padding?.[n],resetValues:qu,onChange:e=>t("skipBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("skipBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.borderRadius?.[n],resetValues:qu,onChange:e=>t("skipBtnStyle",e,"borderRadius",n)})]}),ap=({restartBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Restart Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("restartBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("restartBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("restartBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("restartBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0, |
| 309 |
x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:Vu,onChange:e=>t("restartBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.margin?.[n],resetValues:qu,onChange:e=>t("restartBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.padding?.[n],resetValues:qu,onChange:e=>t("restartBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("restartBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.borderRadius?.[n],resetValues:qu,onChange:e=>t("restartBtnStyle",e,"borderRadius",n)})]}),rp=({repeatBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Repeat Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("repeatBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("repeatBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("repeatBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("repeatBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:Vu,onChange:e=>t("repeatBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.margin?.[n],resetValues:qu,onChange:e=>t("repeatBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.padding?.[n],resetValues:qu,onChange:e=>t("repeatBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("repeatBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.borderRadius?.[n],resetValues:qu,onChange:e=>t("repeatBtnStyle",e,"borderRadius",n)})]}),lp=({stopBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Stop Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("stopBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("stopBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("stopBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("stopBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:Vu,onChange:e=>t("stopBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.margin?.[n],resetValues:qu,onChange:e=>t("stopBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.padding?.[n],resetValues:qu,onChange:e=>t("stopBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("stopBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.borderRadius?.[n],resetValues:qu,onChange:e=>t("stopBtnStyle",e,"borderRadius",n)})]}),cp=({speedBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Speed Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("speedBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("speedBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("speedBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("speedBtnStyle",e,"hoverBg")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.margin?.[n],resetValues:qu,onChange:e=>t("speedBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.padding?.[n],resetValues:qu,onChange:e=>t("speedBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("speedBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.borderRadius?.[n],resetValues:qu,onChange:e=>t("speedBtnStyle",e,"borderRadius",n)})]}),dp=({volumeStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Volume Control","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Track Color","b-blocks"),value:e.trackColor,onChange:e=>t("volumeStyle",e,"trackColor")}),(0,l.jsx)(Ue,{label:(0,x.__)("Fill Color","b-blocks"),value:e.fillColor,onChange:e=>t("volumeStyle",e,"fillColor")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.margin?.[n],resetValues:qu,onChange:e=>t("volumeStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.padding?.[n],resetValues:qu,onChange:e=>t("volumeStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("volumeStyle",e,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.borderRadius?.[n],resetValues:qu,onChange:e=>t("volumeStyle",e,"borderRadius",n)})]}),up=({downloadStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Download Link","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"", |
| 310 |
onChange:e=>t("downloadStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("downloadStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("downloadStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("downloadStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:Vu,onChange:e=>t("downloadStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.margin?.[n],resetValues:qu,onChange:e=>t("downloadStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.padding?.[n],resetValues:qu,onChange:e=>t("downloadStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("downloadStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.borderRadius?.[n],resetValues:qu,onChange:e=>t("downloadStyle",e,"borderRadius",n)})]}),pp=({seekStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Seek Bar / Progress","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Track Color","b-blocks"),value:e.trackColor,onChange:e=>t("seekStyle",e,"trackColor")}),(0,l.jsx)(Ue,{label:(0,x.__)("Progress Fill Color","b-blocks"),value:e.fillColor,onChange:e=>t("seekStyle",e,"fillColor")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Track Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.trackSize?.[n],units:Vu,onChange:e=>t("seekStyle",e,"trackSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Progress Fill Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.fillSize?.[n],units:Vu,onChange:e=>t("seekStyle",e,"fillSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.margin?.[n],resetValues:qu,onChange:e=>t("seekStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.borderRadius?.[n],resetValues:qu,onChange:e=>t("seekStyle",e,"borderRadius",n)})]}),hp=({title:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Track Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:e.color||"#ffffff",onChange:e=>t("title",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("title",e,"bg")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("title",e,"typo")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.margin?.[n],resetValues:qu,onChange:e=>t("title",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.padding?.[n],resetValues:qu,onChange:e=>t("title",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("title",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.borderRadius?.[n],resetValues:qu,onChange:e=>t("title",e,"borderRadius",n)})]}),gp=({artist:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Artist","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:e.color||"#ffffff",onChange:e=>t("artist",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("artist",e,"bg")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("artist",e,"typo")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.margin?.[n],resetValues:qu,onChange:e=>t("artist",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.padding?.[n],resetValues:qu,onChange:e=>t("artist",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("artist",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.borderRadius?.[n],resetValues:qu,onChange:e=>t("artist",e,"borderRadius",n)})]}),mp=({timecode:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Timecode","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Position","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:e.position,onChange:e=>t("timecode",e,"position"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Left","b-blocks"),value:"left"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Right","b-blocks"),value:"right"})]})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color:","b-blocks"),value:e.color,onChange:e=>t("timecode",e,"color")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("timecode",e,"typo")})]}),bp=({playlistStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Playlist Items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Item Background:","b-blocks"),value:e.bg,onChange:e=>t("playlistStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Item Color:","b-blocks"),value:e.color,onChange:e=>t("playlistStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Active Background:","b-blocks"),value:e.activeBg,onChange:e=>t("playlistStyle",e,"activeBg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Active Color:","b-blocks"),value:e.activeColor,onChange:e=>t("playlistStyle",e,"activeColor")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Item Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.itemPadding?.[n],resetValues:qu,onChange:e=>t("playlistStyle",e,"itemPadding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Item Border","b-blocks"),value:e.border,onChange:e=>t("playlistStyle",e,"border"),withSlider:!0, |
| 311 |
__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Item Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Vu,values:e.borderRadius?.[n],resetValues:qu,onChange:e=>t("playlistStyle",e,"borderRadius",n)})]}),fp=({attributes:e,updateObj:t,device:n="desktop"})=>{const{layout:o={},behavior:i={},player:s={},colors:a={},title:r={},artist:c={},timecode:d={},buttonStyle:u={},playBtnStyle:p={},skipBtnStyle:h={},restartBtnStyle:g={},repeatBtnStyle:m={},stopBtnStyle:b={},speedBtnStyle:f={},volumeStyle:x={},downloadStyle:y={},seekStyle:v={},playlistStyle:k={}}=e,w={skip:!1!==i.showSkip,restart:!!i.showRestart,stop:!!i.showStop,repeat:!!i.showRepeat,speed:!!i.showSpeed,volume:!1!==i.showVolume,download:!1!==i.showDownload,seek:!1!==i.showSeek,timecode:!1!==i.showTimecode||!!i.showRemaining,playlist:"playlist"===o.style};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tp,{player:s,updateObj:t,device:n}),(0,l.jsx)(np,{colors:a,updateObj:t}),(0,l.jsx)(op,{buttonStyle:u,updateObj:t,device:n}),(0,l.jsx)(ip,{playBtnStyle:p,updateObj:t,device:n}),w.skip&&(0,l.jsx)(sp,{skipBtnStyle:h,updateObj:t,device:n}),w.restart&&(0,l.jsx)(ap,{restartBtnStyle:g,updateObj:t,device:n}),w.repeat&&(0,l.jsx)(rp,{repeatBtnStyle:m,updateObj:t,device:n}),w.stop&&(0,l.jsx)(lp,{stopBtnStyle:b,updateObj:t,device:n}),w.speed&&(0,l.jsx)(cp,{speedBtnStyle:f,updateObj:t,device:n}),w.volume&&(0,l.jsx)(dp,{volumeStyle:x,updateObj:t,device:n}),w.download&&(0,l.jsx)(up,{downloadStyle:y,updateObj:t,device:n}),w.seek&&(0,l.jsx)(pp,{seekStyle:v,updateObj:t,device:n}),(0,l.jsx)(hp,{title:r,updateObj:t,device:n}),(0,l.jsx)(gp,{artist:c,updateObj:t,device:n}),w.timecode&&(0,l.jsx)(mp,{timecode:d,updateObj:t,device:n}),w.playlist&&(0,l.jsx)(bp,{playlistStyle:k,updateObj:t,device:n})]})},xp=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Yu,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(ep,{...e}),"style"===t.name&&(0,l.jsx)(fp,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},yp=()=>(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:[(0,l.jsx)("path",{d:"M9 18V6l10-2v12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("circle",{cx:"6",cy:"18",r:"3",stroke:"currentColor",strokeWidth:"1.6"}),(0,l.jsx)("circle",{cx:"16",cy:"16",r:"3",stroke:"currentColor",strokeWidth:"1.6"})]}),vp=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{layout:i={},audio:s={},tracks:a=[]}=t,[r,c]=(0,Qs.useState)(0),d="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,u=fe(t,n),p=(0,h.useBlockProps)({id:`block-${o}`}),g=!(!s.url&&!a.some((e=>e?.url)));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(xp,{...e,updateObj:u,isPremium:d,activeIndex:r,setActiveIndex:c}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:i.alignment,onChange:e=>u("layout",e,"alignment")})}),(0,l.jsxs)("div",{...p,children:[(0,l.jsx)(fu,{attributes:t,id:`block-${o}`,isBackend:!0}),g?(0,l.jsx)(Gu,{attributes:t,isBackend:!0}):(0,l.jsxs)("div",{className:"b-blocks-audio-player-placeholder",children:[(0,l.jsx)("span",{className:"b-blocks-audio-player-placeholder-icon","aria-hidden":"true",children:(0,l.jsx)(yp,{})}),(0,l.jsx)("h4",{className:"b-blocks-audio-player-placeholder-title",children:(0,x.__)("Audio Player","b-blocks")}),(0,l.jsx)("p",{className:"b-blocks-audio-player-placeholder-text",children:(0,x.__)("Upload an audio file or pick one from your media library.","b-blocks")}),(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["audio"],value:s.id,onSelect:e=>n({audio:{...s,url:e?.url||"",id:e?.id||0,trackTitle:s.trackTitle||e?.title||""}}),render:({open:e})=>(0,l.jsx)(y.Button,{variant:"primary",icon:"upload",onClick:e,children:(0,x.__)("Select Audio","b-blocks")})})})]})]})]})}));Nl(mu.name)&&(0,p.registerBlockType)(mu,{icon:pl,edit:vp,save:()=>null}) |
| 312 |
;const kp=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/blockquote","title":"Blockquote","category":"bBlocks","description":"Styled blockquote with an accent bar or large decorative quote-mark, optional author photo, name, and role — the designer alternative to the core Quote block.","keywords":["blockquote","quote","pullquote","indent","testimonial","citation","author"],"textdomain":"b-blocks","attributes":{"quote":{"type":"object","default":{"text":"The details are not the details. They make the design.","color":"","bg":{"type":"solid","color":""},"typography":{"fontSize":{"desktop":"20px","tablet":"","mobile":""}},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""}}},"authorName":{"type":"object","default":{"text":"Charles Eames","color":"","typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":600},"bg":{"type":"solid","color":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"authorRole":{"type":"object","default":{"text":"","show":true,"color":"","typography":{"fontSize":{"desktop":"14px","tablet":"","mobile":""}},"bg":{"type":"solid","color":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"avatar":{"type":"object","default":{"show":true,"id":0,"url":"","alt":"","size":"48px","shape":"circle","bg":{"type":"solid","color":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"layout":{"type":"object","default":{"type":"border","alignment":"left"}},"icon":{"type":"object","default":{"color":"#6366f1","size":"48px","align":"left","bg":{"type":"solid","color":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"15px","right":"15px","bottom":"15px","left":"15px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"10px","right":"10px","bottom":"10px","left":"10px"},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"color":"#6366f1","style":"solid","width":"4px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":["file:./view.css"],"viewScript":"file:./view.js","render":"file:./render.php"}'),_p=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],Cp=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],jp=[{label:(0,x.__)("Border — left accent bar","b-blocks"),value:"border"},{label:(0,x.__)("Quotation — large decorative mark","b-blocks"),value:"quotation"}],$p=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],Sp=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Rounded","b-blocks"),value:"rounded"},{label:(0,x.__)("Square","b-blocks"),value:"square"}],Tp=(e={})=>`\n\t${oa(e.bg)}\n\t${na("padding",ha(e.padding))}\n\t${na("margin",ha(e.margin))}\n\t${ia(e.border)}\n\t${na("border-radius",ha(e.borderRadius))}\n`,Mp=({attributes:e,id:t,isBackend:n=!1})=>{const{quote:o={},authorName:i={},authorRole:s={},avatar:a={},icon:r={},advanced:c}=e,{color:d,bg:u={},typography:p={},padding:h={},margin:g={},border:m={},borderRadius:b={}}=o,{color:f,typography:x={}}=i,{color:y,typography:v={}}=s,{size:k,shape:w}=a,{color:_,size:C,align:j}=r,$="circle"===w?"50%":"rounded"===w?"12px":"0",S="center"===j?"center":"right"===j?"flex-end":"flex-start",T=C||"48px",M=`#${t} .bBlocks-blockquote-wrapper`,N=`${M} .bBlocks-blockquote-quote`,L=`${M} .bBlocks-blockquote-avatar`,E=`${M} .bBlocks-blockquote-author`,P=`${M} .bBlocks-blockquote-role`,A=`${M} .bBlocks-blockquote-icon`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${pa("",p).googleFontLink}\n\t\t\t${pa("",x).googleFontLink}\n\t\t\t${pa("",v).googleFontLink}\n\t\t\t${A}{\n\t\t\t\t${na("width",T)}\n\t\t\t\t${na("height",T)}\n\t\t\t\t${na("color",_)}\n\t\t\t\talign-self: ${S};\n\t\t\t\t${Tp(r)}\n\t\t\t}\n\t\t\t${pa(N,p).styles}\n\t\t\t${N}{\n\t\t\t\t${na("color",d)}\n\t\t\t\t${oa(u)}\n\t\t\t\t${na("padding",ha(h))}\n\t\t\t\t${na("margin",ha(g))}\n\t\t\t\t${ia(m)}\n\t\t\t\t${na("border-radius",ha(b))}\n\t\t\t}\n\t\t\t${L}{\n\t\t\t\t${na("width",k)}\n\t\t\t\t${na("height",k)}\n\t\t\t\t${na("border-radius",$)}\n\t\t\t\t${Tp(a)}\n\t\t\t}\n\t\t\t${pa(E,x).styles}\n\t\t\t${E}{\n\t\t\t\t${na("color",f)}\n\t\t\t\t${Tp(i)}\n\t\t\t}\n\t\t\t${pa(P,v).styles}\n\t\t\t${P}{\n\t\t\t\t${na("color",y)}\n\t\t\t\t${Tp(s)}\n\t\t\t}\n\t\t\t${_a(t,c,n,!1)}\n\t\t\t`}})},Np={style:"none",width:"0px"},Lp={top:Np,right:Np,bottom:Np,left:{color:"#6366f1",style:"solid",width:"4px"}},Ep={top:Np,right:Np,bottom:Np,left:Np},Pp={top:"10px",right:"10px",bottom:"10px",left:"10px"},Ap=({attributes:e,updateObj:t})=>{const{layout:n={},authorName:o={},authorRole:i={},avatar:s={},advanced:a={}}=e,{text:r}=o,{text:c,show:d}=i,{show:u,url:p,alt:h}=s;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0, |
| 313 |
x.__)("Layout","b-blocks"),labelPosition:"edge",value:n.type||"border",options:jp,onChange:e=>{t("layout",e,"type");const n=a?.borderShadow?.normal||{};t("advanced",{...n,border:"border"===e?Lp:Ep,radius:"border"===e?Pp:n.radius},"borderShadow","normal")},help:(0,x.__)("Border = left accent bar (editable in the Advanced tab). Quotation = large decorative quote mark.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Alignment","b-blocks"),labelPosition:"edge",className:"mt10",value:n.alignment||"left",options:$p,onChange:e=>t("layout",e,"alignment"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Author Name","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Author Name","b-blocks"),value:r||"",onChange:e=>t("authorName",e,"text"),placeholder:(0,x.__)("Jane Doe","b-blocks"),__nextHasNoMarginBottom:!0})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Role / Company","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Role / Company","b-blocks"),checked:!!d,onChange:e=>t("authorRole",e,"show")}),d&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Role / Company","b-blocks"),value:c||"",onChange:e=>t("authorRole",e,"text"),placeholder:(0,x.__)("CEO, Acme","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Author Photo","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Author Photo","b-blocks"),checked:!!u,onChange:e=>t("avatar",e,"show")}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(we,{className:"mt10",label:p?(0,x.__)("Replace Photo","b-blocks"):(0,x.__)("Select Photo","b-blocks"),value:s,types:["image"],width:"90%",height:"90%",onChange:e=>{return n={id:e?.id||0,url:e?.url||"",alt:e?.alt||h||""},t("avatar",{...s,...n});var n}}),p&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Image Alt Text","b-blocks"),value:h||"",onChange:e=>t("avatar",e,"alt"),placeholder:(0,x.__)("Photo of Jane Doe","b-blocks"),help:(0,x.__)('Defaults to "Photo of <author name>" when empty.',"b-blocks"),__nextHasNoMarginBottom:!0})]})]})]})},Bp={top:"",right:"",bottom:"",left:""},Ip=({attrKey:e,value:t={},updateObj:n})=>{const{bg:o={},padding:i={},margin:s={},border:a={},borderRadius:r={}}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:o,onChange:t=>n(e,t,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),units:_p,values:i,resetValues:Bp,onChange:t=>n(e,t,"padding")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),units:_p,values:s,resetValues:Bp,onChange:t=>n(e,t,"margin")}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border:","b-blocks"),value:a,onChange:t=>n(e,t||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),units:_p,values:r,resetValues:Bp,onChange:t=>n(e,t,"borderRadius")})]})},Op=({attributes:e,updateObj:t})=>{const{quote:n={},authorName:o={},authorRole:i={},avatar:s={},layout:a={},icon:r={}}=e,{color:c,bg:d={},typography:u={},padding:p={},margin:h={},border:g={},borderRadius:m={}}=n,{color:b,typography:f={}}=o,{color:v,typography:w={}}=i,{size:_,shape:C}=s,{color:j,size:$,align:S}=r,T="quotation"===a.type;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Quote Text","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:c||"",onChange:e=>t("quote",e||"","color"),defaultColor:""}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:u,onChange:e=>t("quote",e,"typography")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:d,onChange:e=>t("quote",e,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),units:_p,values:p,resetValues:Bp,onChange:e=>t("quote",e,"padding")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),units:_p,values:h,resetValues:Bp,onChange:e=>t("quote",e,"margin")}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:g,onChange:e=>t("quote",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),units:_p,values:m,resetValues:Bp,onChange:e=>t("quote",e,"borderRadius")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Author Name","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Name Color","b-blocks"),value:b,onChange:e=>t("authorName",e||"","color"),defaultColor:""}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:f,onChange:e=>t("authorName",e,"typography")}),(0,l.jsx)(Ip,{attrKey:"authorName",value:o,updateObj:t})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Role / Company","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Role Color:","b-blocks"),value:v,onChange:e=>t("authorRole",e||"","color"),defaultColor:""}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:w,onChange:e=>t("authorRole",e,"typography")}),(0,l.jsx)(Ip,{attrKey:"authorRole",value:i,updateObj:t})]}),T&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Quote Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Icon Alignment","b-blocks"),labelPosition:"edge",value:S,options:$p,onChange:e=>t("icon",e,"align"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Icon Size","b-blocks"),className:"mt10",labelPosition:"edge",units:_p,isUnitSelectTabbable:!0,value:$||"48px",onChange:e=>t("icon",e,"size")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:j,onChange:e=>t("icon",e,"color"),defaultColor:"#6366f1"}),(0,l.jsx)(Ip,{attrKey:"icon",value:r,updateObj:t})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Author Photo","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Avatar Size","b-blocks"),labelPosition:"edge",units:_p,isUnitSelectTabbable:!0,value:_||"48px",onChange:e=>t("avatar",e,"size")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Avatar Shape","b-blocks"),labelPosition:"edge",className:"mt10",value:C,options:Sp,onChange:e=>t("avatar",e,"shape"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ip,{attrKey:"avatar",value:s,updateObj:t})]})]})},Rp=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Cp,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(Ap,{...e}),"style"===t.name&&(0,l.jsx)(Op,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},zp=["border","quotation"],Dp=["left","center","right"],Fp=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{quote:s={},authorName:a={},authorRole:r={},avatar:c={},layout:d={}}=t,{text:u}=s,{text:p}=a,{text:g,show:m}=r,{show:b,url:f,alt:y,size:v}=c,k=parseInt(v,10)||48,w=bBlocksPremiumChecker,_=fe(t,n),C=zp.includes(d.type)?d.type:"border",j=Dp.includes(d.alignment)?d.alignment:"left",$=["bBlocks-blockquote-wrapper",`bBlocks-blockquote-layout-${C}`,`bBlocks-blockquote-align-${j}`].join(" "),S=b&&!!f,T=!(!p||!p.trim()),M=m&&!(!g||!g.trim()),N=S||T||M,L=y||(T?(0,x.sprintf)((0,x.__)("Photo of %s","b-blocks"),p):"");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:j,onChange:e=>_("layout",e||"left","alignment")})}),(0,l.jsx)(Rp,{attributes:t,setAttributes:n,updateObj:_,isPremium:w,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Mp,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{children:(0,l.jsxs)("figure",{className:$, |
| 314 |
children:["quotation"===C&&(0,l.jsx)("span",{className:"bBlocks-blockquote-icon","aria-hidden":"true",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 435 332",fill:"currentColor",focusable:"false",children:(0,l.jsx)("path",{d:"m142.6 0.7h-99.6c-23.5 0-42.7 19.2-42.7 42.6v99.7c0 23.4 19.2 42.6 42.7 42.6h60.4c0 47.2-34.6 85.4-81.7 85.4v60.3c86.4 0 156.3-69.9 156.3-156.3v-131.7c0-23.4-19.2-42.6-35.4-42.6zm256 0h-99.6c-23.5 0-42.7 19.2-42.7 42.6v99.7c0 23.4 19.2 42.6 42.7 42.6h60.4c0 47.2-34.6 85.4-81.7 85.4v60.3c86.4 0 156.3-69.9 156.3-156.3v-131.7c0-23.4-19.2-42.6-35.4-42.6z"})})}),(0,l.jsx)("blockquote",{className:"bBlocks-blockquote-quote",children:(0,l.jsx)(h.RichText,{tagName:"p",className:"bBlocks-blockquote-quoteText",value:u||"",onChange:e=>_("quote",e,"text"),placeholder:(0,x.__)("Type the quote…","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"]})}),N&&(0,l.jsxs)("figcaption",{className:"bBlocks-blockquote-caption",children:[S&&(0,l.jsx)("img",{className:"bBlocks-blockquote-avatar",src:f,alt:L,width:k,height:k}),(T||M)&&(0,l.jsxs)("cite",{className:"bBlocks-blockquote-cite",children:[T&&(0,l.jsx)("span",{className:"bBlocks-blockquote-author",children:p}),M&&(0,l.jsx)("span",{className:"bBlocks-blockquote-role",children:g})]})]})]})})})]})]})}));Nl(kp.name)&&(0,p.registerBlockType)(kp,{icon:fl,edit:Fp,save:()=>null});const Hp=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/breadcrumb","title":"Breadcrumb","category":"bBlocks","description":"Show a breadcrumb navigation trail for better navigation","keywords":["breadcrumb","breadcrumb block","navigation"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"home":{"type":"object","default":{"label":"Home"}},"separator":{"type":"object","default":{"type":"text","text":">","library":"","image":"","upload":""}},"prefix":{"type":"object","default":{"type":"text","text":"Browse:","library":"","image":"","upload":""}},"options":{"type":"object","default":{"isHomeShow":true,"isSchema":false,"isShowPrefix":false,"isBeforeSeparator":false}},"styles":{"type":"object","default":{"crumbs":{"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""}},"normal":{"color":"","bg":{},"border":{},"shadow":[{}],"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"transition":0.2,"color":"","bg":{},"border":{},"shadow":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"active":{"color":"","bg":{},"border":{},"shadow":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"desktop":{"align":"start","gap":""},"tablet":{"align":"","gap":""},"mobile":{"align":"","gap":""}},"separator":{"color":"","text":{"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""}}},"library":{"desktop":{"size":""},"tablet":{"size":""},"mobile":{"size":""}}},"prefix":{"color":"","text":{"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""}}},"library":{"desktop":{"size":""},"tablet":{"size":""},"mobile":{"size":""}},"image":{"height":"","width":""},"bg":{},"border":{},"shadow":{},"desktop":{"rightGap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"rightGap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"rightGap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Wp=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Up=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Gp=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),Vp=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),qp=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i,home:s,options:a}=t,{crumbs:r}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("BreadCrumb","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:r?.[o]?.align,onChange:e=>n("styles",e,"crumbs",o,"align"),isDeselectable:!0,size:"small",style:{padding:"2px"},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"start",icon:Up}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:Gp}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"end",icon:Vp})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2 mb0",children:[(0,x.__)("Gap","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r?.[o]?.gap,onChange:e=>n("styles",e,"crumbs",o,"gap")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Home Page","b-blocks"),checked:a?.isHomeShow,onChange:e=>n("options",e,"isHomeShow")}),a?.isHomeShow&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Home Label","b-blocks"),value:s?.label, |
| 315 |
onChange:e=>n("home",e,"label")})]})},Yp=({attributes:e,updateObj:t})=>{const{options:n,prefix:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Prefix","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Prefix","b-blocks"),checked:n?.isShowPrefix,onChange:e=>t("options",e,"isShowPrefix")}),n.isShowPrefix&&(0,l.jsxs)(m.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Before Separator","b-blocks"),checked:n?.isBeforeSeparator,onChange:e=>t("options",e,"isBeforeSeparator")}),(0,l.jsx)(v,{className:"flex1 mb0 mt10",children:(0,x.__)("Prefix Type","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o?.type,onChange:e=>t("prefix",e,"type"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Text","b-blocks"),value:"text"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Icon","b-blocks"),value:"library"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Image","b-blocks"),value:"image"})]}),"text"===o.type&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Prefix Text","b-blocks"),value:o?.text,onChange:e=>t("prefix",e,"text")}),"library"===o.type&&(0,l.jsx)(Zn,{className:"mt10",value:o?.library,onChange:e=>t("prefix",e,"library")}),"image"===o.type&&(0,l.jsx)(we,{height:"80%",width:"80%",className:"mt10",value:{url:o?.image},onChange:e=>t("prefix",e?.url,"image")})]})]})},Kp=({attributes:e,updateObj:t})=>{const{separator:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Separator Type","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n?.type,onChange:e=>t("separator",e,"type"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Text","b-blocks"),value:"text"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Icon","b-blocks"),value:"library"})]})]}),"text"===n.type&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Separator Text","b-blocks"),value:n?.text,onChange:e=>t("separator",e,"text")}),"library"===n.type&&(0,l.jsx)(Zn,{className:"mt10",value:n?.library,onChange:e=>t("separator",e,"library")})]})},Qp=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(qp,{...e}),(0,l.jsx)(Kp,{...e}),(0,l.jsx)(Yp,{...e})]}),Zp=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{crumbs:i}=o,[s,a]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Breadcrumb Styles","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Os,{value:i.typo,onChange:e=>t("styles",e,"crumbs","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>a(e),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Active","b-blocks"),value:"active"})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:i[s][n].padding,onChange:e=>t("styles",e,"crumbs",s,n,"padding")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i[s].color,onChange:e=>t("styles",e,"crumbs",s,"color")}),(0,l.jsx)(An,{isImage:!1,label:(0,x.__)("Background","b-blocks"),value:i[s].bg,onChange:e=>t("styles",e,"crumbs",s,"bg")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),values:i[s].shadow,onChange:e=>t("styles",e,"crumbs",s,"shadow")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i[s].border,onChange:e=>t("styles",e,"crumbs",s,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i[s][n].radius,onChange:e=>t("styles",e,"crumbs",s,n,"radius")}),"hover"===s&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),min:0,max:5,step:.01,value:i.hover.transition,onChange:e=>t("styles",e,"crumbs","hover","transition")})]})},Xp=({attributes:e,updateObj:t,device:n})=>{const{styles:o,prefix:i}=e,{prefix:s}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Prefix","b-blocks"),initialOpen:!1,children:["text"===i.type&&(0,l.jsx)(Os,{value:s.text.typo,onChange:e=>t("styles",e,"prefix","text","typo")}),"library"===i.type&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"flex2 mb0",children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s.library[n].size,onChange:e=>t("styles",e,"prefix","library",n,"size")})]})}),"image"===i.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Height","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s.image.height,onChange:e=>t("styles",e,"prefix","image","height")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s.image.width,onChange:e=>t("styles",e,"prefix","image","width")})]})]}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Padding","b-blocks"),values:s[n].padding,onChange:e=>t("styles",e,"prefix",n,"padding")}),"text"===i.type&&(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:s.color,onChange:e=>t("styles",e,"prefix","color")}),(0,l.jsx)(An,{isImage:!1,label:(0,x.__)("Background","b-blocks"),value:s.bg,onChange:e=>t("styles",e,"prefix","bg")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:s.shadow,onChange:e=>t("styles",e,"prefix","shadow")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>t("styles",e,"prefix","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:s[n].radius,onChange:e=>t("styles",e,"prefix",n,"radius")})]})},Jp=({attributes:e,updateObj:t,device:n})=>{const{styles:o,separator:i}=e,{separator:s}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:s.color,onChange:e=>t("styles",e,"separator","color")}),"text"===i.type&&(0,l.jsx)(Os,{value:s.text.typo,onChange:e=>t("styles",e,"separator","text","typo")}),"library"===i.type&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s.library[n].size,onChange:e=>t("styles",e,"separator","library",n,"size")})]})]})},eh=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zp,{...e}),(0,l.jsx)(Jp,{...e}),(0,l.jsx)(Xp,{...e})]}),th=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Wp,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qp,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(eh,{...e})})]})})})}),nh=({attributes:e,id:o})=>{ |
| 316 |
const{styles:i}=e,{crumbs:s,separator:a,prefix:r}=i,c=`#${o} .bBlocks-breadCrumb-wrapper .bBlocks-breadCrumb-items`,d=`${c} .bBlocks-breadCrumb-item`,u=`${c} .bBlocks-breadCrumb-item-active`,p=`${c} .bBlocks-breadCrumb-item-separator`,h=`${p}.bBlocks-breadCrumb-item-separator-library`,g=`${c} .bBlocks-breadCrumbItem-prefix`,m=(e="")=>`\n\t\t${na("padding",ha(s[e].desktop.padding))}\n\t\t${na("color",s[e].color)}\n\t\t${oa(s[e].bg)}\n\t\t${sa(s[e].border)}\n\t\t${na("border-radius",ha(s[e].desktop.radius))}\n\t\t${na("box-shadow",la(s[e].shadow))}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",s.typo).googleFontLink}\n\t\t${pa("",a.text.typo).googleFontLink}\n\t\t${pa("",r.text.typo).googleFontLink}\n\n\t\t${pa(d,s.typo).styles}\n\t\t${pa(p,a.text.typo).styles}\n\t\t${pa(`${g}.bBlocks-breadCrumbItem-prefixText`,r.text.typo).styles}\n\n\t\t${c}{\n\t\t\t${na("justify-content",s.desktop.align)}\n\t\t\t${na("gap",s.desktop.gap)}\n\t\t}\n\n\t\t${d}{\n\t\t\t${m("normal")}\n\t\t\t${na("transition",jt(s.hover.transition)?"all "+s.hover.transition+"s ease-in-out":"")}\n\t\t}\n\n\t\t${d}:hover{\n\t\t\t${m("hover")}\n\t\t}\n\n\t\t${u}{\n\t\t\t${m("active")}\n\t\t}\n\n\t\t${p}{\n\t\t\t${na("color",a.color)}\n\t\t\t${na("fill",a.color)}\n\t\t}\n\n\t\t${h}>svg{\n\t\t\t${na("fill",a.color)}\n\t\t\t${na("height",a.library.desktop.size)}\n\t\t\t${na("width",a.library.desktop.size)}\n\t\t}\n\n\t\t${g}{\n\t\t\t${na("color",r.color)}\n\t\t\t${na("padding",ha(r.desktop.padding))}\n\t\t\t${oa(r.bg)}\n\t\t\t${sa(r.border)}\n\t\t\t${na("border-radius",ha(r.desktop.radius))}\n\t\t\t${na("box-shadow",la(r.shadow))}\n\t\t}\n\n\t\t${g}.bBlocks-breadCrumbItem-prefixIcon>svg{\n\t\t\t${na("fill",r.color)}\n\t\t\t${na("height",r.library.desktop.size)}\n\t\t\t${na("width",r.library.desktop.size)}\n\t\t}\n\t\t${g}.bBlocks-breadCrumbItem-prefixImage>img{\n\t\t\t${na("height",r.image.height)}\n\t\t\t${na("width",r.image.width)}\n\t\t}\n\n\t\t${t}{\n\n\t\t\t${d}{\n\t\t\t\t${na("padding",ha(s.normal.tablet.padding))}\n\t\t\t\t${na("border-radius",ha(s.normal.tablet.radius))}\n\t\t\t}\n\n\t\t\t${d}:hover{\n\t\t\t\t${na("padding",ha(s.hover.tablet.padding))}\n\t\t\t\t${na("border-radius",ha(s.hover.tablet.radius))}\n\t\t\t}\n\n\t\t\t${u}{\n\t\t\t\t${na("padding",ha(s.active.tablet.padding))}\n\t\t\t\t${na("border-radius",ha(s.active.tablet.radius))}\n\t\t\t}\n\t\t\t\n\t\t\t${h}>svg{\n\t\t\t\t${na("height",a.library.tablet.size)}\n\t\t\t\t${na("width",a.library.tablet.size)}\n\t\t\t}\n\n\t\t\t${g}{\n\t\t\t\t${na("padding",ha(r.tablet.padding))}\n\t\t\t\t${na("border-radius",ha(r.tablet.radius))}\n\t\t\t}\n\n\t\t\t${g}.bBlocks-breadCrumbItem-prefixIcon>svg{\n\t\t\t\t${na("height",r.library.tablet.size)}\n\t\t\t\t${na("width",r.library.tablet.size)}\n\t\t\t}\n\n\t\t}\n\n\t\t${n}{\n\t\t\t${d}{\n\t\t\t\t${na("padding",ha(s.normal.mobile.padding))}\n\t\t\t\t${na("border-radius",ha(s.normal.mobile.radius))}\n\t\t\t}\n\n\t\t\t${d}:hover{\n\t\t\t\t${na("padding",ha(s.hover.mobile.padding))}\n\t\t\t\t${na("border-radius",ha(s.hover.mobile.radius))}\n\t\t\t}\n\n\t\t\t${u}{\n\t\t\t\t${na("padding",ha(s.active.mobile.padding))}\n\t\t\t\t${na("border-radius",ha(s.active.mobile.radius))}\n\t\t\t}\n\t\t\t\n\t\t\t${h}>svg{\n\t\t\t\t${na("height",a.library.mobile.size)}\n\t\t\t\t${na("width",a.library.mobile.size)}\n\t\t\t}\n\n\t\t\t${g}{\n\t\t\t\t${na("padding",ha(r.mobile.padding))}\n\t\t\t\t${na("border-radius",ha(r.mobile.radius))}\n\t\t\t}\n\n\t\t\t${g}.bBlocks-breadCrumbItem-prefixIcon>svg{\n\t\t\t\t${na("height",r.library.mobile.size)}\n\t\t\t\t${na("width",r.library.mobile.size)}\n\t\t\t}\n\t\t}\n\n\t\t\n\t`}})},oh=({separator:e})=>{const{type:t,text:n,library:o}=e;return(0,l.jsxs)(m.Fragment,{children:["text"===t&&(0,l.jsxs)("span",{className:"bBlocks-breadCrumb-item-separator",children:[" ",n]}),"library"===t&&(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item-separator bBlocks-breadCrumb-item-separator-library",dangerouslySetInnerHTML:{__html:o}})]})},ih=({prefix:e,isBeforeSeparator:t,separator:n})=>{const{type:o,text:i,library:s,image:a}=e;return(0,l.jsxs)(m.Fragment,{children:["text"===o&&(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item bBlocks-breadCrumbItem-prefix bBlocks-breadCrumbItem-prefixText",children:i}),"library"===o&&(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item bBlocks-breadCrumbItem-prefix bBlocks-breadCrumbItem-prefixIcon",dangerouslySetInnerHTML:{__html:s}}),"image"===o&&(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item bBlocks-breadCrumbItem-prefix bBlocks-breadCrumbItem-prefixImage",children:a&&(0,l.jsx)("img",{src:a,alt:""})}),t&&(0,l.jsx)(oh,{separator:n})]})},sh=({attributes:e,crumbs:t})=>{const{separator:n,options:o,prefix:i}=e;return(0,l.jsx)("div",{className:"bBlocks-breadCrumb-wrapper",children:(0,l.jsxs)("div",{className:"bBlocks-breadCrumb-items",children:[o.isShowPrefix&&(0,l.jsx)(ih,{prefix:i,separator:n,isBeforeSeparator:o.isBeforeSeparator}),t.map(((e,o)=>(0,l.jsxs)(m.Fragment,{children:[0!==o&&(0,l.jsx)(oh,{separator:n}),e?.url?(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item "+(o===t.length-1?"bBlocks-breadCrumb-item-active":""),children:(0,l.jsx)("a",{href:e.url,children:e.label})}):(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item "+(o===t.length-1?"bBlocks-breadCrumb-item-active":""),children:e.label})]},o)))]})})},ah=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{home:s,options:a}=t,r=fe(t,n),c=[a.isHomeShow&&{label:s.label},{label:"Template"},{label:"Current Page"}].filter(Boolean);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(th,{attributes:t,setAttributes:n,isPremium:!1,updateObj:r,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(nh,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{children:(0,l.jsx)(sh,{attributes:t,crumbs:c})})]})]})}));Nl(Hp.name)&&(0,p.registerBlockType)(Hp,{icon:rl,edit:ah}) |
| 317 |
;const rh=JSON.parse('{"apiVersion":3,"name":"b-blocks/button","title":"Button","description":"Implement multi-functional button.","category":"bBlocks","keywords":["multi-functional button","download button","link button"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"text":{"type":"string","default":"Button"},"actionType":{"type":"string","default":"link"},"security":{"type":"string","default":"none"},"securityPassword":{"type":"string","default":""},"securityRole":{"type":"string"},"url":{"type":"string","default":""},"tooltip":{"type":"string","default":""},"tooltipPos":{"type":"string","default":"top"},"target":{"type":"string","default":"_self"},"attrs":{"type":"object","default":{"rel":"noreferrer","referrerpolicy":"no-referrer"}},"hideOn":{"type":"object","default":{"desktop":false,"tablet":false,"mobile":false}},"isDownload":{"type":"boolean","default":false},"downloadFileName":{"type":"string","default":""},"isUpIcon":{"type":"boolean","default":false},"icon":{"type":"object","default":{"class":"fa fa-paper-plane"}},"upIcon":{"type":"object","default":{"id":null,"url":"","alt":"","title":""}},"iconPos":{"type":"string","default":"left"},"type":{"type":"string","default":"flat"},"isFullWidth":{"type":"boolean","default":false},"size":{"type":"string","default":"medium"},"popup":{"type":"object","default":{"type":"image","content":"","caption":"","width":"","videoOptions":{"autoplay":false}}},"animationType":{"type":"string","default":""},"animationDuration":{"type":"number","default":0.4},"addID":{"type":"string","default":""},"addCSS":{"type":"string","default":""},"alignment":{"type":"string","default":"center"},"typography":{"type":"object","default":{"fontSize":{"desktop":"16px"},"fontWeight":600,"textDecoration":"none"}},"colors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"hovColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"padding":{"type":"object","default":{"vertical":"12px","horizontal":"24px"}},"border":{"type":"object","default":{"radius":"5px"}},"shadow":{"type":"array","default":[]},"buttonHover":{"type":"object","default":{"padding":{},"shadow":[],"border":{}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome","aos"],"render":"file:./render.php","viewScript":["file:./view.js","aos","wp-util"]}'),lh="bBlocksButton",ch=(e,t="none",n,o,i=!1)=>{const{actionType:s="link",url:a,tooltip:r,tooltipPos:l="top",target:c,attrs:d={rel:"noreferrer",referrerpolicy:"no-referrer"},isDownload:u,downloadFileName:p="",animationType:h,animationDuration:g,addID:m}=e,b=d?.referrerpolicy||"no-referrer",f=d?.rel||"noreferrer",x=a&&(n||"none"===t)?{href:$t(a)}:{},y="popup"===s||i?{}:{...x,target:c,...o?{referrerPolicy:b,rel:f}:{},...u?{download:o?p:""}:{}};return{className:i?`${lh} btnEditor`:lh,...y,tooltip:r,"tooltip-pos":o?l:"top","data-aos":h,"data-aos-duration":1e3*g,id:m}},dh=({attributes:e})=>{const{isUpIcon:t,icon:n,upIcon:o}=e;return(0,l.jsxs)(l.Fragment,{children:[t&&o?.url&&(0,l.jsx)("img",{src:o?.url,alt:o?.alt}),!t&&n?.class&&(0,l.jsx)("i",{className:n?.class})]})};function uh(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ph(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function hh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function mh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gh(Object(n),!0).forEach((function(t){hh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bh={addCSS:!0,thumbWidth:15,watch:!0},fh=function(e){return null!=e?e.constructor:null},xh=function(e,t){return!!(e&&t&&e instanceof t)},yh=function(e){return fh(e)===String},vh=function(e){return Array.isArray(e)},kh=function(e){return xh(e,NodeList)},wh=yh,_h=vh,Ch=kh,jh=function(e){return xh(e,Element)},$h=function(e){return xh(e,Event)},Sh=function(e){return function(e){return null==e}(e)||(yh(e)||vh(e)||kh(e))&&!e.length||function(e){return fh(e)===Object}(e)&&!Object.keys(e).length};var Th=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),jh(t)?this.element=t:wh(t)&&(this.element=document.querySelector(t)),jh(this.element)&&Sh(this.element.rangeTouch)&&(this.config=mh({},bh,{},n),this.init())}return function(e,t,n){t&&ph(e.prototype,t),n&&ph(e,n)}(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,n=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(e){t.element[n](e,(function(e){return t.set(e)}),!1)}))}},{key:"get",value:function(t){if(!e.enabled||!$h(t))return null;var n,o=t.target,i=t.changedTouches[0],s=parseFloat(o.getAttribute("min"))||0,a=parseFloat(o.getAttribute("max"))||100,r=parseFloat(o.getAttribute("step"))||1,l=o.getBoundingClientRect(),c=100/l.width*(this.config.thumbWidth/2)/100;return 0>(n=100/l.width*(i.clientX-l.left))?n=0:100<n&&(n=100),50>n?n-=(100-2*n)*c:50<n&&(n+=2*(n-50)*c),s+function(e,t){if(1>t){var n=function(e){var t="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);return parseFloat(e.toFixed(n))}return Math.round(e/t)*t}(n/100*(a-s),r)}},{key:"set",value:function(t){e.enabled&&$h(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,t){if(e&&t){var n=new Event(t,{bubbles:!0});e.dispatchEvent(n)}}(t.target,"touchend"===t.type?"change":"input"))}}],[{key:"setup",value:function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=null;if(Sh(t)||wh(t)?o=Array.from(document.querySelectorAll(wh(t)?t:'input[type="range"]')):jh(t)?o=[t]:Ch(t)?o=Array.from(t):_h(t)&&(o=t.filter(jh)),Sh(o))return null;var i=mh({},bh,{},n);if(wh(t)&&i.watch){var s=new MutationObserver((function(n){Array.from(n).forEach((function(n){Array.from(n.addedNodes).forEach((function(n){jh(n)&&function(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}(n,t)&&new e(n,i)}))}))}));s.observe(document.body,{childList:!0,subtree:!0})}return o.map((function(t){return new e(t,n)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}();const Mh=e=>null!=e?e.constructor:null,Nh=(e,t)=>Boolean(e&&t&&e instanceof t),Lh=e=>null==e,Eh=e=>Mh(e)===Object,Ph=e=>Mh(e)===String,Ah=e=>"function"==typeof e,Bh=e=>Array.isArray(e),Ih=e=>Nh(e,NodeList);function Oh(e){return Lh(e)||(Ph(e)||Bh(e)||Ih(e))&&!e.length||Eh(e)&&!Object.keys(e).length}var Rh={nullOrUndefined:Lh,object:Eh, |
| 318 |
number:e=>Mh(e)===Number&&!Number.isNaN(e),string:Ph,boolean:e=>Mh(e)===Boolean,function:Ah,array:Bh,weakMap:e=>Nh(e,WeakMap),nodeList:Ih,element:function(e){return null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument},textNode:e=>Mh(e)===Text,event:e=>Nh(e,Event),keyboardEvent:e=>Nh(e,KeyboardEvent),cue:e=>Nh(e,window.TextTrackCue)||Nh(e,window.VTTCue),track:e=>Nh(e,TextTrack)||!Lh(e)&&Ph(e.kind),promise:e=>Nh(e,Promise)&&Ah(e.then),url:function(e){if(Nh(e,window.URL))return!0;if(!Ph(e))return!1;let t=e;e.startsWith("http://")&&e.startsWith("https://")||(t=`http://${e}`);try{return!Oh(new URL(t).hostname)}catch{return!1}},empty:Oh};const zh=(()=>{const e=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n=Object.keys(t).find((t=>void 0!==e.style[t]));return!!Rh.string(n)&&t[n]})();function Dh(e,t){setTimeout((()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch{}}),t)}function Fh(e,t){return t.split(".").reduce(((e,t)=>e&&e[t]),e)}function Hh(e={},...t){if(!t.length)return e;const n=t.shift();return Rh.object(n)?(Object.keys(n).forEach((t=>{Rh.object(n[t])?(Object.keys(e).includes(t)||Object.assign(e,{[t]:{}}),Hh(e[t],n[t])):Object.assign(e,{[t]:n[t]})})),Hh(e,...t)):e}function Wh(e,t){const n=e.length?e:[e];Array.from(n).reverse().forEach(((e,n)=>{const o=n>0?t.cloneNode(!0):t,i=e.parentNode,s=e.nextSibling;o.appendChild(e),s?i.insertBefore(o,s):i.appendChild(o)}))}function Uh(e,t){Rh.element(e)&&!Rh.empty(t)&&Object.entries(t).filter((([,e])=>!Rh.nullOrUndefined(e))).forEach((([t,n])=>e.setAttribute(t,n)))}function Gh(e,t,n){const o=document.createElement(e);return Rh.object(t)&&Uh(o,t),Rh.string(n)&&(o.textContent=n),o}function Vh(e,t,n,o){Rh.element(t)&&t.appendChild(Gh(e,n,o))}function qh(e){Rh.nodeList(e)||Rh.array(e)?Array.from(e).forEach(qh):Rh.element(e)&&Rh.element(e.parentNode)&&e.parentNode.removeChild(e)}function Yh(e){if(!Rh.element(e))return;let{length:t}=e.childNodes;for(;t>0;)e.removeChild(e.lastChild),t-=1}function Kh(e,t){return Rh.element(t)&&Rh.element(t.parentNode)&&Rh.element(e)?(t.parentNode.replaceChild(e,t),e):null}function Qh(e,t){if(!Rh.string(e)||Rh.empty(e))return{};const n={},o=Hh({},t);return e.split(",").forEach((e=>{const t=e.trim(),i=t.replace(".",""),s=t.replace(/[[\]]/g,"").split("="),[a]=s,r=s.length>1?s[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":Rh.string(o.class)?n.class=`${o.class} ${i}`:n.class=i;break;case"#":n.id=t.replace("#","");break;case"[":n[a]=r}})),Hh(o,n)}function Zh(e,t){if(!Rh.element(e))return;let n=t;Rh.boolean(n)||(n=!e.hidden),e.hidden=n}function Xh(e,t,n){if(Rh.nodeList(e))return Array.from(e).map((e=>Xh(e,t,n)));if(Rh.element(e)){let o="toggle";return void 0!==n&&(o=n?"add":"remove"),e.classList[o](t),e.classList.contains(t)}return!1}function Jh(e,t){return Rh.element(e)&&e.classList.contains(t)}function eg(e,t){const{prototype:n}=Element;return(n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function tg(e){return this.elements.container.querySelectorAll(e)}function ng(e){return this.elements.container.querySelector(e)}function og(e=null,t=!1){Rh.element(e)&&e.focus({preventScroll:!0,focusVisible:t})}const ig={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},sg={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,t){const n=sg[e]||"html5"!==t;return{api:n,ui:n&&sg.rangeInput}},pip:document.pictureInPictureEnabled&&!Gh("video").disablePictureInPicture,airplay:Rh.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(Rh.empty(e))return!1;const[t]=e.split("/");let n=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(ig).includes(n)&&(n+=`; codecs="${ig[e]}"`);try{return Boolean(n&&this.media.canPlayType(n).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range","range"===e.type})(),touch:"ontouchstart"in document.documentElement,transitions:!1!==zh,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},ag=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e})();function rg(e,t,n,o=!1,i=!0,s=!1){if(!e||!("addEventListener"in e)||Rh.empty(t)||!Rh.function(n))return;const a=t.split(" ");let r=s;ag&&(r={passive:i,capture:s}),a.forEach((t=>{this&&this.eventListeners&&o&&this.eventListeners.push({element:e,type:t,callback:n,options:r}),e[o?"addEventListener":"removeEventListener"](t,n,r)}))}function lg(e,t="",n,o=!0,i=!1){rg.call(this,e,t,n,!0,o,i)}function cg(e,t="",n,o=!0,i=!1){rg.call(this,e,t,n,!1,o,i)}function dg(e,t="",n,o=!0,i=!1){const s=(...a)=>{cg(e,t,s,o,i),n.apply(this,a)};rg.call(this,e,t,s,!0,o,i)}function ug(e,t="",n=!1,o={}){if(!Rh.element(e)||Rh.empty(t))return;const i=new CustomEvent(t,{bubbles:n,detail:{...o,plyr:this}});e.dispatchEvent(i)}function pg(){this&&this.eventListeners&&(this.eventListeners.forEach((e=>{const{element:t,type:n,callback:o,options:i}=e;t.removeEventListener(n,o,i)})),this.eventListeners=[])}function hg(){return new Promise((e=>this.ready?setTimeout(e,0):lg.call(this,this.elements.container,"ready",e))).then((()=>{}))}function gg(e){Rh.promise(e)&&e.then(null,(()=>{}))}function mg(e){return Rh.array(e)?e.filter(((t,n)=>e.indexOf(t)===n)):e}function bg(e,t){return Rh.array(e)&&e.length?e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)):null}function fg(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}const xg=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce(((e,[t,n])=>({...e,[t/n]:[t,n]})),{});function yg(e){return!!(Rh.array(e)||Rh.string(e)&&e.includes(":"))&&(Rh.array(e)?e:e.split(":")).map(Number).every(Rh.number)}function vg(e){if(!Rh.array(e)||!e.every(Rh.number))return null;const[t,n]=e,o=(e,t)=>0===t?e:o(t,e%t),i=o(t,n);return[t/i,n/i]}function kg(e){const t=e=>yg(e)?e.split(":").map(Number):null;let n=t(e);if(null===n&&(n=t(this.config.ratio)),null===n&&!Rh.empty(this.embed)&&Rh.array(this.embed.ratio)&&({ratio:n}=this.embed),null===n&&this.isHTML5){const{videoWidth:e,videoHeight:t}=this.media;n=[e,t]}return vg(n)}function wg(e){if(!this.isVideo)return{};const{wrapper:t}=this.elements,n=kg.call(this,e);if(!Rh.array(n))return{};const[o,i]=vg(n),s=100/o*i;if(fg(`aspect-ratio: ${o}/${i}`)?t.style.aspectRatio=`${o}/${i}`:t.style.paddingBottom=`${s}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const e=100/this.media.offsetWidth*Number.parseInt(window.getComputedStyle(this.media).paddingBottom,10),n=(e-s)/(e/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform=`translateY(-${n}%)`}else this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio);return{padding:s,ratio:n}}function _g(e,t,n=.05){const o=e/t,i=bg(Object.keys(xg),o);return Math.abs(i-o)<=n?xg[i]:[e,t]}const Cg={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((e=>{const t=e.getAttribute("type");return!!Rh.empty(t)||sg.mime.call(this,t)})):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:Cg.getSources.call(this).map((e=>Number(e.getAttribute("size")))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,Rh.empty(this.config.ratio)||wg.call(e),Object.defineProperty(e.media,"quality",{get(){const t=Cg.getSources.call(e).find((t=>t.getAttribute("src")===e.source)) |
| 319 |
;return t&&Number(t.getAttribute("size"))},set(t){if(e.quality!==t){if(e.config.quality.forced&&Rh.function(e.config.quality.onChange))e.config.quality.onChange(t);else{const n=Cg.getSources.call(e).find((e=>Number(e.getAttribute("size"))===t));if(!n)return;const{currentTime:o,paused:i,preload:s,readyState:a,playbackRate:r}=e.media;e.media.src=n.getAttribute("src"),("none"!==s||a)&&(e.once("loadedmetadata",(()=>{e.speed=r,e.currentTime=o,i||gg(e.play())})),e.media.load())}ug.call(e,e.media,"qualitychange",!1,{quality:t})}}})},cancelRequests(){this.isHTML5&&(qh(Cg.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};var jg={isIE:Boolean(window.document.documentMode),isEdge:/Edge/.test(navigator.userAgent),isWebKit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPadOS:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,isIos:/iPad|iPhone|iPod/i.test(navigator.userAgent)&&navigator.maxTouchPoints>1};function $g(e,...t){return Rh.empty(e)?e:e.toString().replace(/\{(\d+)\}/g,((e,n)=>t[n].toString()))}function Sg(e="",t="",n=""){return e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),n.toString())}function Tg(e=""){return e.toString().replace(/\w\S*/g,(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()))}function Mg(e){const t=document.createElement("div");return t.appendChild(e),t.innerHTML}const Ng={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Lg={get(e="",t={}){if(Rh.empty(e)||Rh.empty(t))return"";let n=Fh(t.i18n,e);if(Rh.empty(n))return Object.keys(Ng).includes(e)?Ng[e]:"";const o={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(o).forEach((([e,t])=>{n=Sg(n,e,t)})),n}};class Eg{constructor(e){uh(this,"get",(e=>{if(!Eg.supported||!this.enabled)return null;const t=window.localStorage.getItem(this.key);if(Rh.empty(t))return null;const n=JSON.parse(t);return Rh.string(e)&&e.length?n[e]:n})),uh(this,"set",(e=>{if(!Eg.supported||!this.enabled)return;if(!Rh.object(e))return;let t=this.get();Rh.empty(t)&&(t={}),Hh(t,e);try{window.localStorage.setItem(this.key,JSON.stringify(t))}catch{}})),this.enabled=e.config.storage.enabled,this.key=e.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}}function Pg(e,t="text",n=!1){return new Promise(((o,i)=>{try{const i=new XMLHttpRequest;if(!("withCredentials"in i))return;n&&(i.withCredentials=!0),i.addEventListener("load",(()=>{if("text"===t)try{o(JSON.parse(i.responseText))}catch{o(i.responseText)}else o(i.response)})),i.addEventListener("error",(()=>{throw new Error(i.status)})),i.open("GET",e,!0),i.responseType=t,i.send()}catch(e){i(e)}}))}function Ag(e,t){if(!Rh.string(e))return;const n="cache",o=Rh.string(t);let i=!1;const s=()=>null!==document.getElementById(t),a=(e,t)=>{e.innerHTML=t,o&&s()||document.body.insertAdjacentElement("afterbegin",e)};if(!o||!s()){const s=Eg.supported,r=document.createElement("div");if(r.setAttribute("hidden",""),o&&r.setAttribute("id",t),s){const e=window.localStorage.getItem(`${n}-${t}`);if(i=null!==e,i){const t=JSON.parse(e);a(r,t.content)}}Pg(e).then((e=>{if(!Rh.empty(e)){if(s)try{window.localStorage.setItem(`${n}-${t}`,JSON.stringify({content:e}))}catch{}a(r,e)}})).catch((()=>{}))}}const Bg=e=>Math.trunc(e/60/60%60,10);function Ig(e=0,t=!1,n=!1){if(!Rh.number(e))return Ig(void 0,t,n);const o=e=>`0${e}`.slice(-2);let i=Bg(e);const s=(a=e,Math.trunc(a/60%60,10));var a;const r=(e=>Math.trunc(e%60,10))(e);return i=t||i>0?`${i}:`:"",`${n&&e>0?"-":""}${i}${o(s)}:${o(r)}`}const Og={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),t=window.location.host?window.location.host:window.top.location.host,n=e.host!==t||jg.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:n}},findElements(){try{return this.elements.controls=ng.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:tg.call(this,this.config.selectors.buttons.play),pause:ng.call(this,this.config.selectors.buttons.pause),restart:ng.call(this,this.config.selectors.buttons.restart),rewind:ng.call(this,this.config.selectors.buttons.rewind),fastForward:ng.call(this,this.config.selectors.buttons.fastForward),mute:ng.call(this,this.config.selectors.buttons.mute),pip:ng.call(this,this.config.selectors.buttons.pip),airplay:ng.call(this,this.config.selectors.buttons.airplay),settings:ng.call(this,this.config.selectors.buttons.settings),captions:ng.call(this,this.config.selectors.buttons.captions),fullscreen:ng.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=ng.call(this,this.config.selectors.progress),this.elements.inputs={seek:ng.call(this,this.config.selectors.inputs.seek),volume:ng.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:ng.call(this,this.config.selectors.display.buffer),currentTime:ng.call(this,this.config.selectors.display.currentTime),duration:ng.call(this,this.config.selectors.display.duration)},Rh.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,t){const n="http://www.w3.org/2000/svg",o=Og.getIconUrl.call(this),i=`${o.cors?"":o.url}#${this.config.iconPrefix}`,s=document.createElementNS(n,"svg");Uh(s,Hh(t,{"aria-hidden":"true",focusable:"false"}));const a=document.createElementNS(n,"use"),r=`${i}-${e}`;return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",r),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r),s.appendChild(a),s},createLabel(e,t={}){const n=Lg.get(e,this.config);return Gh("span",{...t,class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")},n)},createBadge(e){if(Rh.empty(e))return null;const t=Gh("span",{class:this.config.classNames.menu.value});return t.appendChild(Gh("span",{class:this.config.classNames.menu.badge},e)),t},createButton(e,t){const n=Hh({},t);let o=function(e=""){let t=e.toString();return t=function(e=""){let t=e.toString();return t=Sg(t,"-"," "),t=Sg(t,"_"," "),t=Tg(t),Sg(t," ","")}(t),t.charAt(0).toLowerCase()+t.slice(1)}(e);const i={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((e=>{Object.keys(n).includes(e)&&(i[e]=n[e],delete n[e])})),"button"!==i.element||Object.keys(n).includes("type")||(n.type="button"),Object.keys(n).includes("class")?n.class.split(" ").includes(this.config.classNames.control)||Hh(n,{class:`${n.class} ${this.config.classNames.control}`}):n.class=this.config.classNames.control,e){case"play":i.toggle=!0,i.label="play",i.labelPressed="pause",i.icon="play",i.iconPressed="pause";break;case"mute":i.toggle=!0,i.label="mute",i.labelPressed="unmute",i.icon="volume",i.iconPressed="muted";break;case"captions":i.toggle=!0,i.label="enableCaptions",i.labelPressed="disableCaptions",i.icon="captions-off",i.iconPressed="captions-on";break;case"fullscreen":i.toggle=!0,i.label="enterFullscreen",i.labelPressed="exitFullscreen",i.icon="enter-fullscreen",i.iconPressed="exit-fullscreen";break;case"play-large":n.class+=` ${this.config.classNames.control}--overlaid`,o="play",i.label="play",i.icon="play";break;default:Rh.empty(i.label)&&(i.label=o),Rh.empty(i.icon)&&(i.icon=e)}const s=Gh(i.element);return i.toggle?(s.appendChild(Og.createIcon.call(this,i.iconPressed,{class:"icon--pressed"})),s.appendChild(Og.createIcon.call(this,i.icon,{class:"icon--not-pressed"})),s.appendChild(Og.createLabel.call(this,i.labelPressed,{class:"label--pressed"})),s.appendChild(Og.createLabel.call(this,i.label,{class:"label--not-pressed" |
| 320 |
}))):(s.appendChild(Og.createIcon.call(this,i.icon)),s.appendChild(Og.createLabel.call(this,i.label))),Hh(n,Qh(this.config.selectors.buttons[o],n)),Uh(s,n),"play"===o?(Rh.array(this.elements.buttons[o])||(this.elements.buttons[o]=[]),this.elements.buttons[o].push(s)):this.elements.buttons[o]=s,s},createRange(e,t){const n=Gh("input",Hh(Qh(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Lg.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=n,Og.updateRangeFill.call(this,n),Th.setup(n),n},createProgress(e,t){const n=Gh("progress",Hh(Qh(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){n.appendChild(Gh("span",null,"0"));const t={played:"played",buffer:"buffered"}[e],o=t?Lg.get(t,this.config):"";n.textContent=`% ${o.toLowerCase()}`}return this.elements.display[e]=n,n},createTime(e,t){const n=Qh(this.config.selectors.display[e],t),o=Gh("div",Hh(n,{class:`${n.class?n.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Lg.get(e,this.config),role:"timer"}),"00:00");return this.elements.display[e]=o,o},bindMenuItemShortcuts(e,t){lg.call(this,e,"keydown keyup",(n=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(n.key))return;if(n.preventDefault(),n.stopPropagation(),"keydown"===n.type)return;const o=eg(e,'[role="menuitemradio"]');if(!o&&[" ","ArrowRight"].includes(n.key))Og.showMenuPanel.call(this,t,!0);else{let t;" "!==n.key&&("ArrowDown"===n.key||o&&"ArrowRight"===n.key?(t=e.nextElementSibling,Rh.element(t)||(t=e.parentNode.firstElementChild)):(t=e.previousElementSibling,Rh.element(t)||(t=e.parentNode.lastElementChild)),og.call(this,t,!0))}}),!1),lg.call(this,e,"keyup",(e=>{"Return"===e.key&&Og.focusFirstMenuItem.call(this,null,!0)}))},createMenuItem({value:e,list:t,type:n,title:o,badge:i=null,checked:s=!1}){const a=Qh(this.config.selectors.inputs[n]),r=Gh("button",Hh(a,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${a.class?a.class:""}`.trim(),"aria-checked":s,value:e})),l=Gh("span");l.innerHTML=o,Rh.element(i)&&l.appendChild(i),r.appendChild(l),Object.defineProperty(r,"checked",{enumerable:!0,get:()=>"true"===r.getAttribute("aria-checked"),set(e){e&&Array.from(r.parentNode.children).filter((e=>eg(e,'[role="menuitemradio"]'))).forEach((e=>e.setAttribute("aria-checked","false"))),r.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(r,"click keyup",(t=>{if(!Rh.keyboardEvent(t)||" "===t.key){switch(t.preventDefault(),t.stopPropagation(),r.checked=!0,n){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=Number.parseFloat(e)}Og.showMenuPanel.call(this,"home",Rh.keyboardEvent(t))}}),n,!1),Og.bindMenuItemShortcuts.call(this,r,n),t.appendChild(r)},formatTime(e=0,t=!1){return Rh.number(e)?Ig(e,Bg(this.duration)>0,t):e},updateTimeDisplay(e=null,t=0,n=!1){Rh.element(e)&&Rh.number(t)&&(e.textContent=Og.formatTime(t,n))},updateVolume(){this.supported.ui&&(Rh.element(this.elements.inputs.volume)&&Og.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),Rh.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange(e,t=0){Rh.element(e)&&(e.value=t,Og.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!Rh.event(e))return;let t=0;const n=(e,t)=>{const n=Rh.number(t)?t:0,o=Rh.element(e)?e:this.elements.display.buffer;if(Rh.element(o)){o.value=n;const e=o.getElementsByTagName("span")[0];Rh.element(e)&&(e.childNodes[0].nodeValue=n)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":o=this.currentTime,i=this.duration,t=0===o||0===i||Number.isNaN(o)||Number.isNaN(i)?0:(o/i*100).toFixed(2),"timeupdate"===e.type&&Og.setRange.call(this,this.elements.inputs.seek,t);break;case"playing":case"progress":n(this.elements.display.buffer,100*this.buffered)}var o,i},updateRangeFill(e){const t=Rh.event(e)?e.target:e;if(Rh.element(t)&&"range"===t.getAttribute("type")){if(eg(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);const e=Og.formatTime(this.currentTime),n=Og.formatTime(this.duration),o=Lg.get("seekLabel",this.config);t.setAttribute("aria-valuetext",o.replace("{currentTime}",e).replace("{duration}",n))}else if(eg(t,this.config.selectors.inputs.volume)){const e=100*t.value;t.setAttribute("aria-valuenow",e),t.setAttribute("aria-valuetext",`${e.toFixed(1)}%`)}else t.setAttribute("aria-valuenow",t.value);(jg.isWebKit||jg.isIPadOS)&&t.style.setProperty("--value",t.value/t.max*100+"%")}},updateSeekTooltip(e){var t,n;if(!this.config.tooltips.seek||!Rh.element(this.elements.inputs.seek)||!Rh.element(this.elements.display.seekTooltip)||0===this.duration)return;const o=this.elements.display.seekTooltip,i=`${this.config.classNames.tooltip}--visible`,s=e=>Xh(o,i,e);if(this.touch)return void s(!1);let a=0;const r=this.elements.progress.getBoundingClientRect();if(Rh.event(e)){const t=e.pageX-e.clientX;a=100/r.width*(e.pageX-r.left-t)}else{if(!Jh(o,i))return;a=Number.parseFloat(o.style.left,10)}a<0?a=0:a>100&&(a=100);const l=this.duration/100*a;o.textContent=Og.formatTime(l);const c=null===(t=this.config.markers)||void 0===t||null===(n=t.points)||void 0===n?void 0:n.find((({time:e})=>e===Math.round(l)));c&&o.insertAdjacentHTML("afterbegin",`${c.label}<br>`),o.style.left=`${a}%`,Rh.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&s("mouseenter"===e.type)},timeUpdate(e){const t=!Rh.element(this.elements.display.duration)&&this.config.invertTime;Og.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||Og.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return Zh(this.elements.display.currentTime,!0),void Zh(this.elements.progress,!0);Rh.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=Rh.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&Og.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&Og.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&Og.setMarkers.call(this),Og.updateSeekTooltip.call(this)},toggleMenuButton(e,t){Zh(this.elements.settings.buttons[e],!t)},updateSetting(e,t,n){const o=this.elements.settings.panels[e];let i=null,s=t;if("captions"===e)i=this.currentTrack;else{if(i=Rh.empty(n)?this[e]:n,Rh.empty(i)&&(i=this.config[e].default),!Rh.empty(this.options[e])&&!this.options[e].includes(i))return void this.debug.warn(`Unsupported value of '${i}' for ${e}`);if(!this.config[e].options.includes(i))return void this.debug.warn(`Disabled value of '${i}' for ${e}`)}if(Rh.element(s)||(s=o&&o.querySelector('[role="menu"]')),!Rh.element(s))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=Og.getLabel.call(this,e,i);const a=s&&s.querySelector(`[value="${i}"]`);Rh.element(a)&&(a.checked=!0)},getLabel(e,t){switch(e){case"speed":return 1===t?Lg.get("normal",this.config):`${t}×`;case"quality":if(Rh.number(t)){const e=Lg.get(`qualityLabel.${t}`,this.config);return e.length?e:`${t}p`}return Tg(t);case"captions":return Dg.getLabel.call(this);default:return null}},setQualityMenu(e){if(!Rh.element(this.elements.settings.panels.quality))return;const t="quality",n=this.elements.settings.panels.quality.querySelector('[role="menu"]');Rh.array(e)&&(this.options.quality=mg(e).filter((e=>this.config.quality.options.includes(e))));const o=!Rh.empty(this.options.quality)&&this.options.quality.length>1;if(Og.toggleMenuButton.call(this,t,o),Yh(n),Og.checkMenu.call(this),!o)return;const i=e=>{ |
| 321 |
const t=Lg.get(`qualityBadge.${e}`,this.config);return t.length?Og.createBadge.call(this,t):null};this.options.quality.sort(((e,t)=>{const n=this.config.quality.options;return n.indexOf(e)>n.indexOf(t)?1:-1})).forEach((e=>{Og.createMenuItem.call(this,{value:e,list:n,type:t,title:Og.getLabel.call(this,"quality",e),badge:i(e)})})),Og.updateSetting.call(this,t,n)},setCaptionsMenu(){if(!Rh.element(this.elements.settings.panels.captions))return;const e="captions",t=this.elements.settings.panels.captions.querySelector('[role="menu"]'),n=Dg.getTracks.call(this),o=Boolean(n.length);if(Og.toggleMenuButton.call(this,e,o),Yh(t),Og.checkMenu.call(this),!o)return;const i=n.map(((e,n)=>({value:n,checked:this.captions.toggled&&this.currentTrack===n,title:Dg.getLabel.call(this,e),badge:e.language&&Og.createBadge.call(this,e.language.toUpperCase()),list:t,type:"language"})));i.unshift({value:-1,checked:!this.captions.toggled,title:Lg.get("disabled",this.config),list:t,type:"language"}),i.forEach(Og.createMenuItem.bind(this)),Og.updateSetting.call(this,e,t)},setSpeedMenu(){if(!Rh.element(this.elements.settings.panels.speed))return;const e="speed",t=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((e=>e>=this.minimumSpeed&&e<=this.maximumSpeed));const n=!Rh.empty(this.options.speed)&&this.options.speed.length>1;Og.toggleMenuButton.call(this,e,n),Yh(t),Og.checkMenu.call(this),n&&(this.options.speed.forEach((n=>{Og.createMenuItem.call(this,{value:n,list:t,type:e,title:Og.getLabel.call(this,"speed",n)})})),Og.updateSetting.call(this,e,t))},checkMenu(){const{buttons:e}=this.elements.settings,t=!Rh.empty(e)&&Object.values(e).some((e=>!e.hidden));Zh(this.elements.settings.menu,!t)},focusFirstMenuItem(e,t=!1){if(this.elements.settings.popup.hidden)return;let n=e;Rh.element(n)||(n=Object.values(this.elements.settings.panels).find((e=>!e.hidden)));const o=n.querySelector('[role^="menuitem"]');og.call(this,o,t)},toggleMenu(e){const{popup:t}=this.elements.settings,n=this.elements.buttons.settings;if(!Rh.element(t)||!Rh.element(n))return;const{hidden:o}=t;let i=o;if(Rh.boolean(e))i=e;else if(Rh.keyboardEvent(e)&&"Escape"===e.key)i=!1;else if(Rh.event(e)){const o=Rh.function(e.composedPath)?e.composedPath()[0]:e.target,s=t.contains(o);if(s||!s&&e.target!==n&&i)return}n.setAttribute("aria-expanded",i),Zh(t,!i),Xh(this.elements.container,this.config.classNames.menu.open,i),i&&Rh.keyboardEvent(e)?Og.focusFirstMenuItem.call(this,null,!0):i||o||og.call(this,n,Rh.keyboardEvent(e))},getMenuSize(e){const t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);const n=t.scrollWidth,o=t.scrollHeight;return qh(t),{width:n,height:o}},showMenuPanel(e="",t=!1){const n=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!Rh.element(n))return;const o=n.parentNode,i=Array.from(o.children).find((e=>!e.hidden));if(sg.transitions&&!sg.reducedMotion){o.style.width=`${i.scrollWidth}px`,o.style.height=`${i.scrollHeight}px`;const e=Og.getMenuSize.call(this,n),t=e=>{e.target===o&&["width","height"].includes(e.propertyName)&&(o.style.width="",o.style.height="",cg.call(this,o,zh,t))};lg.call(this,o,zh,t),o.style.width=`${e.width}px`,o.style.height=`${e.height}px`}Zh(i,!0),Zh(n,!1),Og.focusFirstMenuItem.call(this,n,t)},setDownloadUrl(){const e=this.elements.buttons.download;Rh.element(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:t,createButton:n,createProgress:o,createRange:i,createTime:s,setQualityMenu:a,setSpeedMenu:r,showMenuPanel:l}=Og;this.elements.controls=null,Rh.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(n.call(this,"play-large"));const c=Gh("div",Qh(this.config.selectors.controls.wrapper));this.elements.controls=c;const d={class:"plyr__controls__item"};return mg(Rh.array(this.config.controls)?this.config.controls:[]).forEach((a=>{if("restart"===a&&c.appendChild(n.call(this,"restart",d)),"rewind"===a&&c.appendChild(n.call(this,"rewind",d)),"play"===a&&c.appendChild(n.call(this,"play",d)),"fast-forward"===a&&c.appendChild(n.call(this,"fast-forward",d)),"progress"===a){const t=Gh("div",{class:`${d.class} plyr__progress__container`}),n=Gh("div",Qh(this.config.selectors.progress));if(n.appendChild(i.call(this,"seek",{id:`plyr-seek-${e.id}`})),n.appendChild(o.call(this,"buffer")),this.config.tooltips.seek){const e=Gh("span",{class:this.config.classNames.tooltip},"00:00");n.appendChild(e),this.elements.display.seekTooltip=e}this.elements.progress=n,t.appendChild(this.elements.progress),c.appendChild(t)}if("current-time"===a&&c.appendChild(s.call(this,"currentTime",d)),"duration"===a&&c.appendChild(s.call(this,"duration",d)),"mute"===a||"volume"===a){let{volume:t}=this.elements;if(Rh.element(t)&&c.contains(t)||(t=Gh("div",Hh({},d,{class:`${d.class} plyr__volume`.trim()})),this.elements.volume=t,c.appendChild(t)),"mute"===a&&t.appendChild(n.call(this,"mute")),"volume"===a&&!jg.isIos&&!jg.isIPadOS){const n={max:1,step:.05,value:this.config.volume};t.appendChild(i.call(this,"volume",Hh(n,{id:`plyr-volume-${e.id}`})))}}if("captions"===a&&c.appendChild(n.call(this,"captions",d)),"settings"===a&&!Rh.empty(this.config.settings)){const o=Gh("div",Hh({},d,{class:`${d.class} plyr__menu`.trim(),hidden:""}));o.appendChild(n.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const i=Gh("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),s=Gh("div"),a=Gh("div",{id:`plyr-settings-${e.id}-home`}),r=Gh("div",{role:"menu"});a.appendChild(r),s.appendChild(a),this.elements.settings.panels.home=a,this.config.settings.forEach((n=>{const o=Gh("button",Hh(Qh(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));t.call(this,o,n),lg.call(this,o,"click",(()=>{l.call(this,n,!1)}));const i=Gh("span",null,Lg.get(n,this.config)),a=Gh("span",{class:this.config.classNames.menu.value});a.innerHTML=e[n],i.appendChild(a),o.appendChild(i),r.appendChild(o);const c=Gh("div",{id:`plyr-settings-${e.id}-${n}`,hidden:""}),d=Gh("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});d.appendChild(Gh("span",{"aria-hidden":!0},Lg.get(n,this.config))),d.appendChild(Gh("span",{class:this.config.classNames.hidden},Lg.get("menuBack",this.config))),lg.call(this,c,"keydown",(e=>{"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),l.call(this,"home",!0))}),!1),lg.call(this,d,"click",(()=>{l.call(this,"home",!1)})),c.appendChild(d),c.appendChild(Gh("div",{role:"menu"})),s.appendChild(c),this.elements.settings.buttons[n]=o,this.elements.settings.panels[n]=c})),i.appendChild(s),o.appendChild(i),c.appendChild(o),this.elements.settings.popup=i,this.elements.settings.menu=o}if("pip"===a&&sg.pip&&c.appendChild(n.call(this,"pip",d)),"airplay"===a&&sg.airplay&&c.appendChild(n.call(this,"airplay",d)),"download"===a){const e=Hh({},d,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(e.download="");const{download:t}=this.config.urls;!Rh.url(t)&&this.isEmbed&&Hh(e,{icon:`logo-${this.provider}`,label:this.provider}),c.appendChild(n.call(this,"download",e))}"fullscreen"===a&&c.appendChild(n.call(this,"fullscreen",d))})),this.isHTML5&&a.call(this,Cg.getQualityOptions.call(this)),r.call(this),c},inject(){if(this.config.loadSprite){const e=Og.getIconUrl.call(this);e.cors&&Ag(e.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const t={id:this.id,seektime:this.config.seekTime,title:this.config.title};let n,o=!0;if(Rh.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,t)),this.config.controls||(this.config.controls=[]), |
| 322 |
Rh.element(this.config.controls)||Rh.string(this.config.controls)?e=this.config.controls:(e=Og.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Dg.getLabel.call(this)}),o=!1),o&&Rh.string(this.config.controls)&&(e=(e=>{let n=e;return Object.entries(t).forEach((([e,t])=>{n=Sg(n,`{${e}}`,t)})),n})(e)),Rh.string(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),Rh.element(n)||(n=this.elements.container),n[Rh.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),Rh.element(this.elements.controls)||Og.findElements.call(this),!Rh.empty(this.elements.buttons)){const e=e=>{const t=this.config.classNames.controlPressed;e.setAttribute("aria-pressed","false"),Object.defineProperty(e,"pressed",{configurable:!0,enumerable:!0,get:()=>Jh(e,t),set(n=!1){Xh(e,t,n),e.setAttribute("aria-pressed",n?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach((t=>{Rh.array(t)||Rh.nodeList(t)?Array.from(t).filter(Boolean).forEach(e):e(t)}))}if(jg.isEdge&&Dh(n),this.config.tooltips.controls){const{classNames:e,selectors:t}=this.config,n=`${t.controls.wrapper} ${t.labels} .${e.hidden}`,o=tg.call(this,n);Array.from(o).forEach((e=>{Xh(e,this.config.classNames.hidden,!1),Xh(e,this.config.classNames.tooltip,!0)}))}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch{}},setMarkers(){var e,t;if(!this.duration||this.elements.markers)return;const n=null===(e=this.config.markers)||void 0===e||null===(t=e.points)||void 0===t?void 0:t.filter((({time:e})=>e>0&&e<this.duration));if(null==n||!n.length)return;const o=document.createDocumentFragment(),i=document.createDocumentFragment();let s=null;const a=`${this.config.classNames.tooltip}--visible`,r=e=>Xh(s,a,e);n.forEach((e=>{const t=Gh("span",{class:this.config.classNames.marker},""),n=e.time/this.duration*100+"%";s&&(t.addEventListener("mouseenter",(()=>{e.label||(s.style.left=n,s.innerHTML=e.label,r(!0))})),t.addEventListener("mouseleave",(()=>{r(!1)}))),t.addEventListener("click",(()=>{this.currentTime=e.time})),t.style.left=n,i.appendChild(t)})),o.appendChild(i),this.config.tooltips.seek||(s=Gh("span",{class:this.config.classNames.tooltip},""),o.appendChild(s)),this.elements.markers={points:i,tip:s},this.elements.progress.appendChild(o)}};function Rg(e,t=!0){let n=e;if(t){const e=document.createElement("a");e.href=n,n=e.href}try{return new URL(n)}catch{return null}}function zg(e){const t=new URLSearchParams;return Rh.object(e)&&Object.entries(e).forEach((([e,n])=>{t.set(e,n)})),t}const Dg={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!sg.textTracks)return void(Rh.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Og.setCaptionsMenu.call(this));var e,t;if(Rh.element(this.elements.captions)||(this.elements.captions=Gh("div",Qh(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),e=this.elements.captions,t=this.elements.wrapper,Rh.element(e)&&Rh.element(t)&&t.parentNode.insertBefore(e,t.nextSibling)),jg.isIE&&window.URL){const e=this.media.querySelectorAll("track");Array.from(e).forEach((e=>{const t=e.getAttribute("src"),n=Rg(t);null!==n&&n.hostname!==window.location.href.hostname&&["http:","https:"].includes(n.protocol)&&Pg(t,"blob").then((t=>{e.setAttribute("src",window.URL.createObjectURL(t))})).catch((()=>{qh(e)}))}))}const n=mg((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((e=>e.split("-")[0])));let o=(this.storage.get("language")||this.captions.language||this.config.captions.language||"auto").toLowerCase();"auto"===o&&([o]=n);let i=this.storage.get("captions")||this.captions.active;if(Rh.boolean(i)||({active:i}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:i,language:o,languages:n}),this.isHTML5){const e=this.config.captions.update?"addtrack removetrack":"removetrack";lg.call(this,this.media.textTracks,e,Dg.update.bind(this))}setTimeout(Dg.update.bind(this),0)},update(){const e=Dg.getTracks.call(this,!0),{active:t,language:n,meta:o,currentTrackNode:i}=this.captions,s=Boolean(e.find((e=>e.language===n)));this.isHTML5&&this.isVideo&&e.filter((e=>!o.get(e))).forEach((e=>{this.debug.log("Track added",e),o.set(e,{default:"showing"===e.mode}),"showing"===e.mode&&(e.mode="hidden"),lg.call(this,e,"cuechange",(()=>Dg.updateCues.call(this)))})),(s&&this.language!==n||!e.includes(i))&&(Dg.setLanguage.call(this,n),Dg.toggle.call(this,t&&s)),this.elements&&Xh(this.elements.container,this.config.classNames.captions.enabled,!Rh.empty(e)),Rh.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Og.setCaptionsMenu.call(this)},toggle(e,t=!0){if(!this.supported.ui)return;const{toggled:n}=this.captions,o=this.config.classNames.captions.active,i=Rh.nullOrUndefined(e)?!n:e;if(i!==n){if(t||(this.captions.active=i,this.storage.set({captions:i})),!this.language&&i&&!t){const e=Dg.getTracks.call(this),t=Dg.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=t.language,void Dg.set.call(this,e.indexOf(t))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=i),Xh(this.elements.container,o,i),this.captions.toggled=i,Og.updateSetting.call(this,"captions"),ug.call(this,this.media,i?"captionsenabled":"captionsdisabled")}setTimeout((()=>{i&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")}))},set(e,t=!0){const n=Dg.getTracks.call(this);if(-1!==e)if(Rh.number(e))if(e in n){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const o=n[e],{language:i}=o||{};this.captions.currentTrackNode=o,Og.updateSetting.call(this,"captions"),t||(this.captions.language=i,this.storage.set({language:i})),this.isVimeo&&this.embed.enableTextTrack(i,null,!1),ug.call(this,this.media,"languagechange")}Dg.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&Dg.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else Dg.toggle.call(this,!1,t)},setLanguage(e,t=!0){if(!Rh.string(e))return void this.debug.warn("Invalid language argument",e);const n=e.toLowerCase();this.captions.language=n;const o=Dg.getTracks.call(this),i=Dg.findTrack.call(this,[n]);Dg.set.call(this,o.indexOf(i),t)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter((t=>!this.isHTML5||e||this.captions.meta.has(t))).filter((e=>["captions","subtitles"].includes(e.kind)))},findTrack(e,t=!1){const n=Dg.getTracks.call(this),o=e=>Number((this.captions.meta.get(e)||{}).default),i=Array.from(n).sort(((e,t)=>o(t)-o(e)));let s;return e.every((e=>(s=i.find((t=>t.language===e)),!s))),s||(t?i[0]:void 0)},getCurrentTrack(){return Dg.getTracks.call(this)[this.currentTrack]},getLabel(e){let t=e;return!Rh.track(t)&&sg.textTracks&&this.captions.toggled&&(t=Dg.getCurrentTrack.call(this)),Rh.track(t)?Rh.empty(t.label)?Rh.empty(t.language)?Lg.get("enabled",this.config):e.language.toUpperCase():t.label:Lg.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!Rh.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!Rh.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let t=e;if(!t){const e=Dg.getCurrentTrack.call(this);t=Array.from((e||{}).activeCues||[]).map((e=>e.getCueAsHTML())).map(Mg)}const n=t.map((e=>e.trim())).join("\n");if(n!==this.elements.captions.innerHTML){Yh(this.elements.captions);const e=Gh("span",Qh(this.config.selectors.caption));e.innerHTML=n,this.elements.captions.appendChild(e), |
| 323 |
ug.call(this,this.media,"cuechange")}}},Fg={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.8.4/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:"",withCredentials:!1},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},Hg="picture-in-picture",Wg={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Ug="video";function Gg(){}class Vg{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Gg}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Gg}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Gg}}class qg{constructor(e){uh(this,"onChange",(()=>{if(!this.supported)return;const e=this.player.elements.buttons.fullscreen;Rh.element(e)&&(e.pressed=this.active);const t=this.target===this.player.media?this.target:this.player.elements.container;ug.call(this.player,t,this.active?"enterfullscreen":"exitfullscreen",!0)})),uh(this,"toggleFallback",((e=!1)=>{var t,n;if(e?this.scrollPosition={x:null!==(t=window.scrollX)&&void 0!==t?t:0,y:null!==(n=window.scrollY)&&void 0!==n?n:0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=e?"hidden":"",Xh(this.target,this.player.config.classNames.fullscreen.fallback,e),jg.isIos){let t=document.head.querySelector('meta[name="viewport"]');const n="viewport-fit=cover";t||(t=document.createElement("meta"),t.setAttribute("name","viewport"));const o=Rh.string(t.content)&&t.content.includes(n);e?(this.cleanupViewport=!o,o||(t.content+=`,${n}`)):this.cleanupViewport&&(t.content=t.content.split(",").filter((e=>e.trim()!==n)).join(","))}this.onChange()})),uh(this,"trapFocus",(e=>{if(jg.isIos||jg.isIPadOS||!this.active||"Tab"!==e.key)return;const t=document.activeElement,n=tg.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[o]=n,i=n[n.length-1];t!==i||e.shiftKey?t===o&&e.shiftKey&&(i.focus(),e.preventDefault()):(o.focus(),e.preventDefault())})),uh(this,"update",(()=>{if(this.supported){let e;e=this.forceFallback?"Fallback (forced)":qg.nativeSupported?"Native":"Fallback",this.player.debug.log(`${e} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Xh(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)})),uh(this,"enter",(()=>{ |
| 324 |
this.supported&&(jg.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!qg.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?Rh.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))})),uh(this,"exit",(()=>{if(this.supported)if(jg.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),gg(this.player.play());else if(!qg.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!Rh.empty(this.prefix)){const e="moz"===this.prefix?"Cancel":"Exit";document[`${this.prefix}${e}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),uh(this,"toggle",(()=>{this.active?this.exit():this.enter()})),this.player=e,this.prefix=qg.prefix,this.property=qg.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===e.config.fullscreen.fallback,this.player.elements.fullscreen=e.config.fullscreen.container&&function(e,t){const{prototype:n}=Element;return(n.closest||function(){let e=this;do{if(eg.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}).call(e,t)}(this.player.elements.container,e.config.fullscreen.container),lg.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":`${this.prefix}fullscreenchange`,(()=>{this.onChange()})),lg.call(this.player,this.player.elements.container,"dblclick",(e=>{Rh.element(this.player.elements.controls)&&this.player.elements.controls.contains(e.target)||this.player.listeners.proxy(e,this.toggle,"fullscreen")})),lg.call(this,this.player.elements.container,"keydown",(e=>this.trapFocus(e))),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return qg.nativeSupported&&!this.forceFallback}static get prefix(){if(Rh.function(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some((t=>!(!Rh.function(document[`${t}ExitFullscreen`])&&!Rh.function(document[`${t}CancelFullScreen`])||(e=t,0)))),e}static get property(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,qg.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||qg.nativeSupported||!jg.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!qg.nativeSupported||this.forceFallback)return Jh(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){var e;return jg.isIos&&this.player.config.fullscreen.iosNative?this.player.media:null!==(e=this.player.elements.fullscreen)&&void 0!==e?e:this.player.elements.container}}function Yg(e,t=1){return new Promise(((n,o)=>{const i=new Image,s=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=t?n:o)(i)};Object.assign(i,{onload:s,onerror:s,src:e})}))}const Kg={addStyleHook(){Xh(this.elements.container,this.config.selectors.container.replace(".",""),!0),Xh(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Kg.toggleNativeControls.call(this,!0);Rh.element(this.elements.controls)||(Og.inject.call(this),this.listeners.controls()),Kg.toggleNativeControls.call(this),this.isHTML5&&Dg.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Og.updateVolume.call(this),Og.timeUpdate.call(this),Og.durationUpdate.call(this),Kg.checkPlaying.call(this),Xh(this.elements.container,this.config.classNames.pip.supported,sg.pip&&this.isHTML5&&this.isVideo),Xh(this.elements.container,this.config.classNames.airplay.supported,sg.airplay&&this.isHTML5),Xh(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((()=>{ug.call(this,this.media,"ready")}),0),Kg.setTitle.call(this),this.poster&&Kg.setPoster.call(this,this.poster,!1).catch((()=>{})),this.config.duration&&Og.durationUpdate.call(this),this.config.mediaMetadata&&Og.setMediaMetadata.call(this)},setTitle(){let e=Lg.get("play",this.config);if(Rh.string(this.config.title)&&!Rh.empty(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach((t=>{t.setAttribute("aria-label",e)})),this.isEmbed){const e=ng.call(this,"iframe");if(!Rh.element(e))return;const t=Rh.empty(this.config.title)?"video":this.config.title,n=Lg.get("frameTitle",this.config);e.setAttribute("title",n.replace("{title}",t))}},togglePoster(e){Xh(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,t=!0){return t&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),hg.call(this).then((()=>Yg(e))).catch((t=>{throw e===this.poster&&Kg.togglePoster.call(this,!1),t})).then((()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),Kg.togglePoster.call(this,!0),e))))},checkPlaying(e){Xh(this.elements.container,this.config.classNames.playing,this.playing),Xh(this.elements.container,this.config.classNames.paused,this.paused),Xh(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",Lg.get(this.playing?"pause":"play",this.config))})),Rh.event(e)&&"timeupdate"===e.type||Kg.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((()=>{Xh(this.elements.container,this.config.classNames.loading,this.loading),Kg.toggleControls.call(this)}),this.loading?250:0)},toggleControls(e){const{controls:t}=this.elements;if(t&&this.config.hideControls){const n=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||t.pressed||t.hover||n))}},migrateStyles(){Object.values({...this.media.style}).filter((e=>!Rh.empty(e)&&Rh.string(e)&&e.startsWith("--plyr"))).forEach((e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)})),Rh.empty(this.media.style)&&this.media.removeAttribute("style")}};class Qg{constructor(e){uh(this,"firstTouch",(()=>{const{player:e}=this,{elements:t}=e;e.touch=!0,Xh(t.container,e.config.classNames.isTouch,!0)})),uh(this,"global",((e=!0)=>{const{player:t}=this;t.config.keyboard.global&&rg.call(t,window,"keydown keyup",this.handleKey,e,!1),rg.call(t,document.body,"click",this.toggleMenu,e),dg.call(t,document.body,"touchstart",this.firstTouch)})),uh(this,"container",(()=>{const{player:e}=this,{config:t,elements:n,timers:o}=e;!t.keyboard.global&&t.keyboard.focused&&lg.call(e,n.container,"keydown keyup",this.handleKey,!1),lg.call(e,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(t=>{const{controls:i}=n;i&&"enterfullscreen"===t.type&&(i.pressed=!1,i.hover=!1);let s=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(Kg.toggleControls.call(e,!0),s=e.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout((()=>Kg.toggleControls.call(e,!1)),s)})) |
| 325 |
;const i=()=>{if(!e.isVimeo||e.config.vimeo.premium)return;const t=n.wrapper,{active:o}=e.fullscreen,[i,s]=kg.call(e),a=fg(`aspect-ratio: ${i} / ${s}`);if(!o)return void(a?(t.style.width=null,t.style.height=null):(t.style.maxWidth=null,t.style.margin=null));const[r,l]=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],c=r/l>i/s;a?(t.style.width=c?"auto":"100%",t.style.height=c?"100%":"auto"):(t.style.maxWidth=c?l/s*i+"px":null,t.style.margin=c?"0 auto":null)},s=()=>{clearTimeout(o.resized),o.resized=setTimeout(i,50)};lg.call(e,n.container,"enterfullscreen exitfullscreen",(t=>{const{target:o}=e.fullscreen;o===n.container&&(!e.isEmbed&&Rh.empty(e.config.ratio)||(i(),("enterfullscreen"===t.type?lg:cg).call(e,window,"resize",s)))}))})),uh(this,"media",(()=>{const{player:e}=this,{elements:t}=e;if(lg.call(e,e.media,"timeupdate seeking seeked",(t=>Og.timeUpdate.call(e,t))),lg.call(e,e.media,"durationchange loadeddata loadedmetadata",(t=>Og.durationUpdate.call(e,t))),lg.call(e,e.media,"ended",(()=>{e.isHTML5&&e.isVideo&&e.config.resetOnEnd&&(e.restart(),e.pause())})),lg.call(e,e.media,"progress playing seeking seeked",(t=>Og.updateProgress.call(e,t))),lg.call(e,e.media,"volumechange",(t=>Og.updateVolume.call(e,t))),lg.call(e,e.media,"playing play pause ended emptied timeupdate",(t=>Kg.checkPlaying.call(e,t))),lg.call(e,e.media,"waiting canplay seeked playing",(t=>Kg.checkLoading.call(e,t))),e.supported.ui&&e.config.clickToPlay&&!e.isAudio){const n=ng.call(e,`.${e.config.classNames.video}`);if(!Rh.element(n))return;lg.call(e,t.container,"click",(o=>{([t.container,n].includes(o.target)||n.contains(o.target))&&(e.touch&&e.config.hideControls||(e.ended?(this.proxy(o,e.restart,"restart"),this.proxy(o,(()=>{gg(e.play())}),"play")):this.proxy(o,(()=>{gg(e.togglePlay())}),"play")))}))}e.supported.ui&&e.config.disableContextMenu&&lg.call(e,t.wrapper,"contextmenu",(e=>{e.preventDefault()}),!1),lg.call(e,e.media,"volumechange",(()=>{e.storage.set({volume:e.volume,muted:e.muted})})),lg.call(e,e.media,"ratechange",(()=>{Og.updateSetting.call(e,"speed"),e.storage.set({speed:e.speed})})),lg.call(e,e.media,"qualitychange",(t=>{Og.updateSetting.call(e,"quality",null,t.detail.quality)})),lg.call(e,e.media,"ready qualitychange",(()=>{Og.setDownloadUrl.call(e)}));const n=e.config.events.concat(["keyup","keydown"]).join(" ");lg.call(e,e.media,n,(n=>{let{detail:o={}}=n;"error"===n.type&&(o=e.media.error),ug.call(e,t.container,n.type,!0,o)}))})),uh(this,"proxy",((e,t,n)=>{const{player:o}=this,i=o.config.listeners[n];let s=!0;Rh.function(i)&&(s=i.call(o,e)),!1!==s&&Rh.function(t)&&t.call(o,e)})),uh(this,"bind",((e,t,n,o,i=!0)=>{const{player:s}=this,a=s.config.listeners[o],r=Rh.function(a);lg.call(s,e,t,(e=>this.proxy(e,n,o)),i&&!r)})),uh(this,"controls",(()=>{const{player:e}=this,{elements:t}=e,n=jg.isIE?"change":"input";if(t.buttons.play&&Array.from(t.buttons.play).forEach((t=>{this.bind(t,"click",(()=>{gg(e.togglePlay())}),"play")})),this.bind(t.buttons.restart,"click",e.restart,"restart"),this.bind(t.buttons.rewind,"click",(()=>{e.lastSeekTime=Date.now(),e.rewind()}),"rewind"),this.bind(t.buttons.fastForward,"click",(()=>{e.lastSeekTime=Date.now(),e.forward()}),"fastForward"),this.bind(t.buttons.mute,"click",(()=>{e.muted=!e.muted}),"mute"),this.bind(t.buttons.captions,"click",(()=>e.toggleCaptions())),this.bind(t.buttons.download,"click",(()=>{ug.call(e,e.media,"download")}),"download"),this.bind(t.buttons.fullscreen,"click",(()=>{e.fullscreen.toggle()}),"fullscreen"),this.bind(t.buttons.pip,"click",(()=>{e.pip="toggle"}),"pip"),this.bind(t.buttons.airplay,"click",e.airplay,"airplay"),this.bind(t.buttons.settings,"click",(t=>{t.stopPropagation(),t.preventDefault(),Og.toggleMenu.call(e,t)}),null,!1),this.bind(t.buttons.settings,"keyup",(t=>{[" ","Enter"].includes(t.key)&&("Enter"!==t.key?(t.preventDefault(),t.stopPropagation(),Og.toggleMenu.call(e,t)):Og.focusFirstMenuItem.call(e,null,!0))}),null,!1),this.bind(t.settings.menu,"keydown",(t=>{"Escape"===t.key&&Og.toggleMenu.call(e,t)})),this.bind(t.inputs.seek,"mousedown mousemove",(e=>{const n=t.progress.getBoundingClientRect(),o=e.pageX-e.clientX,i=100/n.width*(e.pageX-n.left-o);e.currentTarget.setAttribute("seek-value",i)})),this.bind(t.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(t=>{const n=t.currentTarget,o="play-on-seeked";if(Rh.keyboardEvent(t)&&!["ArrowLeft","ArrowRight"].includes(t.key))return;e.lastSeekTime=Date.now();const i=n.hasAttribute(o),s=["mouseup","touchend","keyup"].includes(t.type);i&&s?(n.removeAttribute(o),gg(e.play())):!s&&e.playing&&(n.setAttribute(o,""),e.pause())})),jg.isIos){const t=tg.call(e,'input[type="range"]');Array.from(t).forEach((e=>this.bind(e,n,(e=>Dh(e.target)))))}this.bind(t.inputs.seek,n,(t=>{const n=t.currentTarget;let o=n.getAttribute("seek-value");Rh.empty(o)&&(o=n.value),n.removeAttribute("seek-value"),e.currentTime=o/n.max*e.duration}),"seek"),this.bind(t.progress,"mouseenter mouseleave mousemove",(t=>Og.updateSeekTooltip.call(e,t))),this.bind(t.progress,"mousemove touchmove",(t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.startMove(t)})),this.bind(t.progress,"mouseleave touchend click",(()=>{const{previewThumbnails:t}=e;t&&t.loaded&&t.endMove(!1,!0)})),this.bind(t.progress,"mousedown touchstart",(t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.startScrubbing(t)})),this.bind(t.progress,"mouseup touchend",(t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.endScrubbing(t)})),jg.isWebKit&&Array.from(tg.call(e,'input[type="range"]')).forEach((t=>{this.bind(t,"input",(t=>Og.updateRangeFill.call(e,t.target)))})),e.config.toggleInvert&&!Rh.element(t.display.duration)&&this.bind(t.display.currentTime,"click",(()=>{0!==e.currentTime&&(e.config.invertTime=!e.config.invertTime,Og.timeUpdate.call(e))})),this.bind(t.inputs.volume,n,(t=>{e.volume=t.target.value}),"volume"),this.bind(t.controls,"mouseenter mouseleave",(n=>{t.controls.hover=!e.touch&&"mouseenter"===n.type})),t.fullscreen&&Array.from(t.fullscreen.children).filter((e=>!e.contains(t.container))).forEach((n=>{this.bind(n,"mouseenter mouseleave",(n=>{t.controls&&(t.controls.hover=!e.touch&&"mouseenter"===n.type)}))})),this.bind(t.controls,"mousedown mouseup touchstart touchend touchcancel",(e=>{t.controls.pressed=["mousedown","touchstart"].includes(e.type)})),this.bind(t.controls,"focusin",(()=>{const{config:n,timers:o}=e;Xh(t.controls,n.classNames.noTransition,!0),Kg.toggleControls.call(e,!0),setTimeout((()=>{Xh(t.controls,n.classNames.noTransition,!1)}),0);const i=this.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout((()=>Kg.toggleControls.call(e,!1)),i)})),this.bind(t.inputs.volume,"wheel",(t=>{const n=t.webkitDirectionInvertedFromDevice,[o,i]=[t.deltaX,-t.deltaY].map((e=>n?-e:e)),s=Math.sign(Math.abs(o)>Math.abs(i)?o:i);e.increaseVolume(s/50);const{volume:a}=e.media;(1===s&&a<1||-1===s&&a>0)&&t.preventDefault()}),"volume",!1)})),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:n}=t,{key:o,type:i,altKey:s,ctrlKey:a,metaKey:r,shiftKey:l}=e,c="keydown"===i,d=c&&o===this.lastKey;var u;if(!(s||a||r||l)&&o)if(c){const i=document.activeElement;if(Rh.element(i)){const{editable:o}=t.config.selectors,{seek:s}=n.inputs;if(i!==s&&eg(i,o))return;if(" "===e.key&&eg(i,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(o)&&(e.preventDefault(),e.stopPropagation()),o){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":d||(u=Number.parseInt(o,10),t.currentTime=t.duration/10*u);break;case" ":case"k":d||gg(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown": |
| 326 |
t.decreaseVolume(.1);break;case"m":d||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":d||t.toggleCaptions();break;case"l":t.loop=!t.loop}"Escape"===o&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=o}else this.lastKey=null}toggleMenu(e){Og.toggleMenu.call(this.player,e)}}function Zg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xg,Jg={exports:{}},em=(Xg||(Xg=1,Jg.exports=function(){var e=function(){},t={},n={},o={};function i(e,t){if(e){var i=o[e];if(n[e]=t,i)for(;i.length;)i[0](e,t),i.splice(0,1)}}function s(t,n){t.call&&(t={success:t}),n.length?(t.error||e)(n):(t.success||e)(t)}function a(t,n,o,i){var s,r,l,c=document,d=o.async,u=(o.numRetries||0)+1,p=o.before||e,h=t.replace(/[\?|#].*$/,""),g=t.replace(/^(css|img|module|nomodule)!/,"");if(i=i||0,/(^css!|\.css$)/.test(h))(l=c.createElement("link")).rel="stylesheet",l.href=g,(s="hideFocus"in l)&&l.relList&&(s=0,l.rel="preload",l.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(h))(l=c.createElement("img")).src=g;else if((l=c.createElement("script")).src=g,l.async=void 0===d||d,r="noModule"in l,/^module!/.test(h)){if(!r)return n(t,"l");l.type="module"}else if(/^nomodule!/.test(h)&&r)return n(t,"l");l.onload=l.onerror=l.onbeforeload=function(e){var r=e.type[0];if(s)try{l.sheet.cssText.length||(r="e")}catch(e){18!=e.code&&(r="e")}if("e"==r){if((i+=1)<u)return a(t,n,o,i)}else if("preload"==l.rel&&"style"==l.as)return l.rel="stylesheet";n(t,r,e.defaultPrevented)},!1!==p(t,l)&&c.head.appendChild(l)}function r(e,n,o){var r,l;if(n&&n.trim&&(r=n),l=(r?o:n)||{},r){if(r in t)throw"LoadJS";t[r]=!0}function c(t,n){!function(e,t,n){var o,i,s=(e=e.push?e:[e]).length,r=s,l=[];for(o=function(e,n,o){if("e"==n&&l.push(e),"b"==n){if(!o)return;l.push(e)}--s||t(l)},i=0;i<r;i++)a(e[i],o,n)}(e,(function(e){s(l,e),t&&s({success:t,error:n},e),i(r,e)}),l)}if(l.returnPromise)return new Promise(c);c()}return r.ready=function(e,t){return function(e,t){e=e.push?e:[e];var i,s,a,r=[],l=e.length,c=l;for(i=function(e,n){n.length&&r.push(e),--c||t(r)};l--;)s=e[l],(a=n[s])?i(s,a):(o[s]=o[s]||[]).push(i)}(e,(function(e){s(t,e)})),r},r.done=function(e){i(e,[])},r.reset=function(){t={},n={},o={}},r.isDefined=function(e){return e in t},r}()),Jg.exports),tm=Zg(em);function nm(e){return new Promise(((t,n)=>{tm(e,{success:t,error:n})}))}function om(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,ug.call(this,this.media,e?"play":"pause"))}const im={setup(){const e=this;Xh(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,wg.call(e),Rh.object(window.Vimeo)?im.ready.call(e):nm(e.config.urls.vimeo.sdk).then((()=>{im.ready.call(e)})).catch((t=>{e.debug.warn("Vimeo SDK (player.js) failed to load",t)}))},ready(){const e=this,t=e.config.vimeo,{premium:n,referrerPolicy:o,...i}=t;let s=e.media.getAttribute("src"),a="";Rh.empty(s)?(s=e.media.getAttribute(e.config.attributes.embed.id),a=e.media.getAttribute(e.config.attributes.embed.hash)):a=function(e){const t=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*h=|\/)+([\d,a-f]+)/);return t&&5===t.length?t[4]:null}(s);const r=a?{h:a}:{};n&&Object.assign(i,{controls:!1,sidedock:!1});const l=zg({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:e.config.playsinline,...r,...i}),c=function(e){if(Rh.empty(e))return null;if(Rh.number(Number(e)))return e;const t=e.match(/^.*(vimeo.com\/|video\/)(\d+).*/);return t?t[2]:e}(s),d=Gh("iframe"),u=$g(e.config.urls.vimeo.iframe,c,l);if(d.setAttribute("src",u),d.setAttribute("allowfullscreen",""),d.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),Rh.empty(o)||d.setAttribute("referrerPolicy",o),n||!t.customControls)d.setAttribute("data-poster",e.poster),e.media=Kh(d,e.media);else{const t=Gh("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});t.appendChild(d),e.media=Kh(t,e.media)}t.customControls||Pg($g(e.config.urls.vimeo.api,u)).then((t=>{!Rh.empty(t)&&t.thumbnail_url&&Kg.setPoster.call(e,t.thumbnail_url).catch((()=>{}))})),e.embed=new window.Vimeo.Player(d,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(om.call(e,!0),e.embed.play()),e.media.pause=()=>(om.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:p}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>p,set(t){const{embed:n,media:o,paused:i,volume:s}=e,a=i&&!n.hasPlayed;o.seeking=!0,ug.call(e,o,"seeking"),Promise.resolve(a&&n.setVolume(0)).then((()=>n.setCurrentTime(t))).then((()=>a&&n.pause())).then((()=>a&&n.setVolume(s))).catch((()=>{}))}});let h=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>h,set(t){e.embed.setPlaybackRate(t).then((()=>{h=t,ug.call(e,e.media,"ratechange")})).catch((()=>{e.options.speed=[1]}))}});let{volume:g}=e.config;Object.defineProperty(e.media,"volume",{get:()=>g,set(t){e.embed.setVolume(t).then((()=>{g=t,ug.call(e,e.media,"volumechange")}))}});let{muted:m}=e.config;Object.defineProperty(e.media,"muted",{get:()=>m,set(t){const n=!!Rh.boolean(t)&&t;e.embed.setMuted(!!n||e.config.muted).then((()=>{m=n,ug.call(e,e.media,"volumechange")}))}});let b,{loop:f}=e.config;Object.defineProperty(e.media,"loop",{get:()=>f,set(t){const n=Rh.boolean(t)?t:e.config.loop.active;e.embed.setLoop(n).then((()=>{f=n}))}}),e.embed.getVideoUrl().then((t=>{b=t,Og.setDownloadUrl.call(e)})).catch((e=>{this.debug.warn(e)})),Object.defineProperty(e.media,"currentSrc",{get:()=>b}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then((t=>{const[n,o]=t;e.embed.ratio=_g(n,o),wg.call(this)})),e.embed.setAutopause(e.config.autopause).then((t=>{e.config.autopause=t})),e.embed.getVideoTitle().then((t=>{e.config.title=t,Kg.setTitle.call(this)})),e.embed.getCurrentTime().then((t=>{p=t,ug.call(e,e.media,"timeupdate")})),e.embed.getDuration().then((t=>{e.media.duration=t,ug.call(e,e.media,"durationchange")})),e.embed.getTextTracks().then((t=>{e.media.textTracks=t,Dg.setup.call(e)})),e.embed.on("cuechange",(({cues:t=[]})=>{const n=t.map((e=>function(e){const t=document.createDocumentFragment(),n=document.createElement("div");return t.appendChild(n),n.innerHTML=e,t.firstChild.textContent}(e.text)));Dg.updateCues.call(e,n)})),e.embed.on("loaded",(()=>{e.embed.getPaused().then((t=>{om.call(e,!t),t||ug.call(e,e.media,"playing")})),Rh.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)})),e.embed.on("bufferstart",(()=>{ug.call(e,e.media,"waiting")})),e.embed.on("bufferend",(()=>{ug.call(e,e.media,"playing")})),e.embed.on("play",(()=>{om.call(e,!0),ug.call(e,e.media,"playing")})),e.embed.on("pause",(()=>{om.call(e,!1)})),e.embed.on("timeupdate",(t=>{e.media.seeking=!1,p=t.seconds,ug.call(e,e.media,"timeupdate")})),e.embed.on("progress",(t=>{e.media.buffered=t.percent,ug.call(e,e.media,"progress"),1===Number.parseInt(t.percent,10)&&ug.call(e,e.media,"canplaythrough"),e.embed.getDuration().then((t=>{t!==e.media.duration&&(e.media.duration=t,ug.call(e,e.media,"durationchange"))}))})),e.embed.on("seeked",(()=>{e.media.seeking=!1,ug.call(e,e.media,"seeked")})),e.embed.on("ended",(()=>{e.media.paused=!0,ug.call(e,e.media,"ended")})),e.embed.on("error",(t=>{e.media.error=t,ug.call(e,e.media,"error")})),t.customControls&&setTimeout((()=>Kg.build.call(e)),0)}};function sm(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,ug.call(this,this.media,e?"play":"pause"))}function am(e){return e.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0} |
| 327 |
const rm={setup(){if(Xh(this.elements.wrapper,this.config.classNames.embed,!0),Rh.object(window.YT)&&Rh.function(window.YT.Player))rm.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{Rh.function(e)&&e(),rm.ready.call(this)},nm(this.config.urls.youtube.sdk).catch((e=>{this.debug.warn("YouTube API failed to load",e)}))}},getTitle(e){Pg($g(this.config.urls.youtube.api,e)).then((e=>{if(Rh.object(e)){const{title:t,height:n,width:o}=e;this.config.title=t,Kg.setTitle.call(this),this.embed.ratio=_g(o,n)}wg.call(this)})).catch((()=>{wg.call(this)}))},ready(){const e=this,t=e.config.youtube,n=e.media&&e.media.getAttribute("id");if(!Rh.empty(n)&&n.startsWith("youtube-"))return;let o=e.media.getAttribute("src");Rh.empty(o)&&(o=e.media.getAttribute(this.config.attributes.embed.id));const i=function(e){if(Rh.empty(e))return null;const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&t[2]?t[2]:e}(o),s=function(e){return`${e}-${Math.floor(1e4*Math.random())}`}(e.provider),a=Gh("div",{id:s,"data-poster":t.customControls?e.poster:void 0});if(e.media=Kh(a,e.media),t.customControls){const t=e=>`https://i.ytimg.com/vi/${i}/${e}default.jpg`;Yg(t("maxres"),121).catch((()=>Yg(t("sd"),121))).catch((()=>Yg(t("hq")))).then((t=>Kg.setPoster.call(e,t.src))).then((t=>{t.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")})).catch((()=>{}))}e.embed=new window.YT.Player(e.media,{videoId:i,host:am(t),playerVars:Hh({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&t.customControls?0:1,disablekb:1,playsinline:e.config.playsinline&&!e.config.fullscreen.iosNative?1:0,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},t),events:{onError(t){if(!e.media.error){const n=t.data,o={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[n]||"An unknown error occurred";e.media.error={code:n,message:o},ug.call(e,e.media,"error")}},onPlaybackRateChange(t){const n=t.target;e.media.playbackRate=n.getPlaybackRate(),ug.call(e,e.media,"ratechange")},onReady(n){if(Rh.function(e.media.play))return;const o=n.target;rm.getTitle.call(e,i),e.media.play=()=>{sm.call(e,!0),o.playVideo()},e.media.pause=()=>{sm.call(e,!1),o.pauseVideo()},e.media.stop=()=>{o.stopVideo()},e.media.duration=o.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(o.getCurrentTime()),set(t){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,ug.call(e,e.media,"seeking"),o.seekTo(t)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>o.getPlaybackRate(),set(e){o.setPlaybackRate(e)}});let{volume:s}=e.config;Object.defineProperty(e.media,"volume",{get:()=>s,set(t){s=t,o.setVolume(100*s),ug.call(e,e.media,"volumechange")}});let{muted:a}=e.config;Object.defineProperty(e.media,"muted",{get:()=>a,set(t){const n=Rh.boolean(t)?t:a;a=n,o[n?"mute":"unMute"](),o.setVolume(100*s),ug.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>o.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const r=o.getAvailablePlaybackRates();e.options.speed=r.filter((t=>e.config.speed.options.includes(t))),e.supported.ui&&t.customControls&&e.media.setAttribute("tabindex",-1),ug.call(e,e.media,"timeupdate"),ug.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval((()=>{e.media.buffered=o.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBuffered<e.media.buffered)&&ug.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,1===e.media.buffered&&(clearInterval(e.timers.buffering),ug.call(e,e.media,"canplaythrough"))}),200),t.customControls&&setTimeout((()=>Kg.build.call(e)),50)},onStateChange(n){const o=n.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(n.data)&&(e.media.seeking=!1,ug.call(e,e.media,"seeked")),n.data){case-1:ug.call(e,e.media,"timeupdate"),e.media.buffered=o.getVideoLoadedFraction(),ug.call(e,e.media,"progress");break;case 0:sm.call(e,!1),e.media.loop?(o.stopVideo(),o.playVideo()):ug.call(e,e.media,"ended");break;case 1:t.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(sm.call(e,!0),ug.call(e,e.media,"playing"),e.timers.playing=setInterval((()=>{ug.call(e,e.media,"timeupdate")}),50),e.media.duration!==o.getDuration()&&(e.media.duration=o.getDuration(),ug.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),sm.call(e,!1);break;case 3:ug.call(e,e.media,"waiting")}ug.call(e,e.elements.container,"statechange",!1,{code:n.data})}}})}},lm={setup(){this.media?(Xh(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Xh(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Xh(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=Gh("div",{class:this.config.classNames.video}),Wh(this.media,this.elements.wrapper),this.elements.poster=Gh("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?Cg.setup.call(this):this.isYouTube?rm.setup.call(this):this.isVimeo&&im.setup.call(this)):this.debug.warn("No media element found!")}};class cm{constructor(e){uh(this,"load",(()=>{this.enabled&&(Rh.object(window.google)&&Rh.object(window.google.ima)?this.ready():nm(this.player.config.urls.googleIMA.sdk).then((()=>{this.ready()})).catch((()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))})))})),uh(this,"ready",(()=>{var e;this.enabled||((e=this).manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then((()=>{this.clearSafetyTimer("onAdsManagerLoaded()")})),this.listeners(),this.setupIMA()})),uh(this,"setupIMA",(()=>{this.elements.container=Gh("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(e=>this.onAdsManagerLoaded(e)),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e)),!1),this.requestAds()})),uh(this,"requestAds",(()=>{const{container:e}=this.player.elements;try{const t=new google.ima.AdsRequest;t.adTagUrl=this.tagUrl,t.linearAdSlotWidth=e.offsetWidth,t.linearAdSlotHeight=e.offsetHeight,t.nonLinearAdSlotWidth=e.offsetWidth,t.nonLinearAdSlotHeight=e.offsetHeight,t.forceNonLinearFullSlot=!1,t.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(t)}catch(e){this.onAdError(e)}})),uh(this,"pollCountdown",((e=!1)=>{if(!e)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text") |
| 328 |
;this.countdownTimer=setInterval((()=>{const e=Ig(Math.max(this.manager.getRemainingTime(),0)),t=`${Lg.get("advertisement",this.player.config)} - ${e}`;this.elements.container.setAttribute("data-badge-text",t)}),100)})),uh(this,"onAdsManagerLoaded",(e=>{if(!this.enabled)return;const t=new google.ima.AdsRenderingSettings;t.restoreCustomPlaybackStateOnAdBreakComplete=!0,t.enablePreloading=!0,this.manager=e.getAdsManager(this.player,t),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e))),Object.keys(google.ima.AdEvent.Type).forEach((e=>{this.manager.addEventListener(google.ima.AdEvent.Type[e],(e=>this.onAdEvent(e)))})),this.trigger("loaded")})),uh(this,"addCuePoints",(()=>{Rh.empty(this.cuePoints)||this.cuePoints.forEach((e=>{if(0!==e&&-1!==e&&e<this.player.duration){const t=this.player.elements.progress;if(Rh.element(t)){const n=100/this.player.duration*e,o=Gh("span",{class:this.player.config.classNames.cues});o.style.left=`${n.toString()}%`,t.appendChild(o)}}}))})),uh(this,"onAdEvent",(e=>{const{container:t}=this.player.elements,n=e.getAd(),o=e.getAdData();switch((e=>{ug.call(this.player,this.player.media,`ads${e.replace(/_/g,"").toLowerCase()}`)})(e.type),e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),n.isLinear()||(n.width=t.offsetWidth,n.height=t.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&this.player.debug.warn(`Non-fatal ad error: ${o.adError.getMessage()}`)}})),uh(this,"onAdError",(e=>{this.cancel(),this.player.debug.warn("Ads error",e)})),uh(this,"listeners",(()=>{const{container:e}=this.player.elements;let t;this.player.on("canplay",(()=>{this.addCuePoints()})),this.player.on("ended",(()=>{this.loader.contentComplete()})),this.player.on("timeupdate",(()=>{t=this.player.currentTime})),this.player.on("seeked",(()=>{const e=this.player.currentTime;Rh.empty(this.cuePoints)||this.cuePoints.forEach(((n,o)=>{t<n&&n<e&&(this.manager.discardAdBreak(),this.cuePoints.splice(o,1))}))})),window.addEventListener("resize",(()=>{this.manager&&this.manager.resize(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL)}))})),uh(this,"play",(()=>{const{container:e}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then((()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(e){this.onAdError(e)}})).catch((()=>{}))})),uh(this,"resumeContent",(()=>{this.elements.container.style.zIndex="",this.playing=!1,gg(this.player.media.play())})),uh(this,"pauseContent",(()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()})),uh(this,"cancel",(()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()})),uh(this,"loadAds",(()=>{this.managerPromise.then((()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise((e=>{this.on("loaded",e),this.player.debug.log(this.manager)})),this.initialized=!1,this.requestAds()})).catch((()=>{}))})),uh(this,"trigger",((e,...t)=>{const n=this.events[e];Rh.array(n)&&n.forEach((e=>{Rh.function(e)&&e.apply(this,t)}))})),uh(this,"on",((e,t)=>(Rh.array(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this))),uh(this,"startSafetyTimer",((e,t)=>{this.player.debug.log(`Safety timer invoked from: ${t}`),this.safetyTimer=setTimeout((()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")}),e)})),uh(this,"clearSafetyTimer",(e=>{Rh.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${e}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)})),this.player=e,this.config=e.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise(((e,t)=>{this.on("loaded",e),this.on("error",t)})),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!Rh.empty(e.publisherId)||Rh.url(e.tagUrl))}get tagUrl(){const{config:e}=this;return Rh.url(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${zg({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function dm(e=0,t=0,n=255){return Math.min(Math.max(e,t),n)}function um(e){const t=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach((e=>{const n={};e.split(/\r\n|\n|\r/).forEach((e=>{if(Rh.number(n.startTime)){if(!Rh.empty(e.trim())&&Rh.empty(n.text)){const t=e.trim().split("#xywh=");[n.text]=t,t[1]&&([n.x,n.y,n.w,n.h]=t[1].split(","))}}else{const t=e.match(/(\d{2})?:?(\d{2}):(\d{2}).(\d{2,3})( ?--> ?)(\d{2})?:?(\d{2}):(\d{2}).(\d{2,3})/);t&&(n.startTime=60*Number(t[1]||0)*60+60*Number(t[2])+Number(t[3])+Number(`0.${t[4]}`),n.endTime=60*Number(t[6]||0)*60+60*Number(t[7])+Number(t[8])+Number(`0.${t[9]}`))}})),n.text&&t.push(n)})),t}function pm(e,t){const n={};return e>t.width/t.height?(n.width=t.width,n.height=1/e*t.width):(n.height=t.height,n.width=e*t.height),n}class hm{constructor(e){uh(this,"load",(()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then((()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)}))})),uh(this,"getThumbnails",(()=>new Promise((e=>{const{src:t}=this.player.config.previewThumbnails;if(Rh.empty(t))throw new Error("Missing previewThumbnails.src config attribute");const n=()=>{this.thumbnails.sort(((e,t)=>e.height-t.height)),this.player.debug.log("Preview thumbnails",this.thumbnails),e()};if(Rh.function(t))t((e=>{this.thumbnails=e,n()}));else{const e=(Rh.string(t)?[t]:t).map((e=>this.getThumbnail(e)));Promise.all(e).then(n)}})))),uh(this,"getThumbnail",(e=>new Promise((t=>{Pg(e,void 0,this.player.config.previewThumbnails.withCredentials).then((n=>{const o={frames:um(n),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=e.substring(0,e.lastIndexOf("/")+1));const i=new Image;i.onload=()=>{o.height=i.naturalHeight,o.width=i.naturalWidth,this.thumbnails.push(o),t()},i.src=o.urlPrefix+o.frames[0].text}))})))),uh(this,"startMove",(e=>{if(this.loaded&&Rh.event(e)&&["touchmove","mousemove"].includes(e.type)&&this.player.media.duration){if("touchmove"===e.type)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var t,n;const o=this.player.elements.progress.getBoundingClientRect(),i=100/o.width*(e.pageX-o.left);this.seekTime=this.player.media.duration*(i/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=e.pageX,this.elements.thumb.time.textContent=Ig(this.seekTime);const s=null===(t=this.player.config.markers)||void 0===t||null===(n=t.points)||void 0===n?void 0:n.find((({time:e})=>e===Math.round(this.seekTime)));s&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${s.label}<br>`)}this.showImageAtCurrentTime()}})),uh(this,"endMove",(()=>{this.toggleThumbContainer(!1,!0)})),uh(this,"startScrubbing",(e=>{(Rh.nullOrUndefined(e.button)||!1===e.button||0===e.button)&&(this.mouseDown=!0, |
| 329 |
this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))})),uh(this,"endScrubbing",(()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):dg.call(this.player,this.player.media,"timeupdate",(()=>{this.mouseDown||this.toggleScrubbingContainer(!1)}))})),uh(this,"listeners",(()=>{this.player.on("play",(()=>{this.toggleThumbContainer(!1,!0)})),this.player.on("seeked",(()=>{this.toggleThumbContainer(!1)})),this.player.on("timeupdate",(()=>{this.lastTime=this.player.media.currentTime}))})),uh(this,"render",(()=>{this.elements.thumb.container=Gh("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=Gh("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const e=Gh("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=Gh("span",{},"00:00"),e.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(e),Rh.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=Gh("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)})),uh(this,"destroy",(()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()})),uh(this,"showImageAtCurrentTime",(()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const e=this.thumbnails[0].frames.findIndex((e=>this.seekTime>=e.startTime&&this.seekTime<=e.endTime)),t=e>=0;let n=0;this.mouseDown||this.toggleThumbContainer(t),t&&(this.thumbnails.forEach(((t,o)=>{this.loadedImages.includes(t.frames[e].text)&&(n=o)})),e!==this.showingThumb&&(this.showingThumb=e,this.loadImage(n)))})),uh(this,"loadImage",((e=0)=>{const t=this.showingThumb,n=this.thumbnails[e],{urlPrefix:o}=n,i=n.frames[t],s=n.frames[t].text,a=o+s;if(this.currentImageElement&&this.currentImageElement.dataset.filename===s)this.showImage(this.currentImageElement,i,e,t,s,!1),this.currentImageElement.dataset.index=t,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const n=new Image;n.src=a,n.dataset.index=t,n.dataset.filename=s,this.showingThumbFilename=s,this.player.debug.log(`Loading image: ${a}`),n.onload=()=>this.showImage(n,i,e,t,s,!0),this.loadingImage=n,this.removeOldImages(n)}})),uh(this,"showImage",((e,t,n,o,i,s=!0)=>{this.player.debug.log(`Showing thumb: ${i}. num: ${o}. qual: ${n}. newimg: ${s}`),this.setImageSizeAndOffset(e,t),s&&(this.currentImageContainer.appendChild(e),this.currentImageElement=e,this.loadedImages.includes(i)||this.loadedImages.push(i)),this.preloadNearby(o,!0).then(this.preloadNearby(o,!1)).then(this.getHigherQuality(n,e,t,i))})),uh(this,"removeOldImages",(e=>{Array.from(this.currentImageContainer.children).forEach((t=>{if("img"!==t.tagName.toLowerCase())return;const n=this.usingSprites?500:1e3;if(t.dataset.index!==e.dataset.index&&!t.dataset.deleting){t.dataset.deleting=!0;const{currentImageContainer:e}=this;setTimeout((()=>{e.removeChild(t),this.player.debug.log(`Removing thumb: ${t.dataset.filename}`)}),n)}}))})),uh(this,"preloadNearby",((e,t=!0)=>new Promise((n=>{setTimeout((()=>{const o=this.thumbnails[0].frames[e].text;if(this.showingThumbFilename===o){let i;i=t?this.thumbnails[0].frames.slice(e):this.thumbnails[0].frames.slice(0,e).reverse();let s=!1;i.forEach((e=>{const t=e.text;if(t!==o&&!this.loadedImages.includes(t)){s=!0,this.player.debug.log(`Preloading thumb filename: ${t}`);const{urlPrefix:e}=this.thumbnails[0],o=e+t,i=new Image;i.src=o,i.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${t}`),this.loadedImages.includes(t)||this.loadedImages.push(t),n()}}})),s||n()}}),300)})))),uh(this,"getHigherQuality",((e,t,n,o)=>{if(e<this.thumbnails.length-1){let i=t.naturalHeight;this.usingSprites&&(i=n.h),i<this.thumbContainerHeight&&setTimeout((()=>{this.showingThumbFilename===o&&(this.player.debug.log(`Showing higher quality thumb for: ${o}`),this.loadImage(e+1))}),300)}})),uh(this,"toggleThumbContainer",((e=!1,t=!1)=>{const n=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(n,e),!e&&t&&(this.showingThumb=null,this.showingThumbFilename=null)})),uh(this,"toggleScrubbingContainer",((e=!1)=>{const t=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(t,e),e||(this.showingThumb=null,this.showingThumbFilename=null)})),uh(this,"determineContainerAutoSizing",(()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)})),uh(this,"setThumbContainerSizeAndPos",(()=>{const{imageContainer:e}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(e.clientHeight>20&&e.clientWidth<20){const t=Math.floor(e.clientHeight*this.thumbAspectRatio);e.style.width=`${t}px`}else if(e.clientHeight<20&&e.clientWidth>20){const t=Math.floor(e.clientWidth/this.thumbAspectRatio);e.style.height=`${t}px`}}else{const t=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);e.style.height=`${this.thumbContainerHeight}px`,e.style.width=`${t}px`}this.setThumbContainerPos()})),uh(this,"setThumbContainerPos",(()=>{const e=this.player.elements.progress.getBoundingClientRect(),t=this.player.elements.container.getBoundingClientRect(),{container:n}=this.elements.thumb,o=t.left-e.left+10,i=t.right-e.left-n.clientWidth-10,s=this.mousePosX-e.left-n.clientWidth/2,a=dm(s,o,i);n.style.left=`${a}px`,n.style.setProperty("--preview-arrow-offset",s-a+"px")})),uh(this,"setScrubbingContainerSize",(()=>{const{width:e,height:t}=pm(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${e}px`,this.elements.scrubbing.container.style.height=`${t}px`})),uh(this,"setImageSizeAndOffset",((e,t)=>{if(!this.usingSprites)return;const n=this.thumbContainerHeight/t.h;e.style.height=e.naturalHeight*n+"px",e.style.width=e.naturalWidth*n+"px",e.style.left=`-${t.x*n}px`,e.style.top=`-${t.y*n}px`})),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=pm(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const gm={insertElements(e,t){Rh.string(t)?Vh(e,this.media,{src:t}):Rh.array(t)&&t.forEach((t=>{Vh(e,this.media,t)}))},change(e){Fh(e,"sources.length")?(Cg.cancelRequests.call(this),this.destroy((()=>{this.options.quality=[],qh(this.media),this.media=null, |
| 330 |
Rh.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:t,type:n}=e,[{provider:o=Wg.html5,src:i}]=t,s="html5"===o?n:"div",a="html5"===o?{}:{src:i};Object.assign(this,{provider:o,type:n,supported:sg.check(n,o,this.config.playsinline),media:Gh(s,a)}),this.elements.container.appendChild(this.media),Rh.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),Rh.empty(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Kg.addStyleHook.call(this),this.isHTML5&&gm.insertElements.call(this,"source",t),this.config.title=e.title,lm.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&gm.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Kg.build.call(this),this.isHTML5&&this.media.load(),Rh.empty(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new hm(this))),this.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}};class mm{constructor(e,t){if(uh(this,"play",(()=>Rh.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then((()=>this.ads.play())).catch((()=>gg(this.media.play()))),this.media.play()):null)),uh(this,"pause",(()=>this.playing&&Rh.function(this.media.pause)?this.media.pause():null)),uh(this,"togglePlay",(e=>(Rh.boolean(e)?e:!this.playing)?this.play():this.pause())),uh(this,"stop",(()=>{this.isHTML5?(this.pause(),this.restart()):Rh.function(this.media.stop)&&this.media.stop()})),uh(this,"restart",(()=>{this.currentTime=0})),uh(this,"rewind",(e=>{this.currentTime-=Rh.number(e)?e:this.config.seekTime})),uh(this,"forward",(e=>{this.currentTime+=Rh.number(e)?e:this.config.seekTime})),uh(this,"increaseVolume",(e=>{const t=this.media.muted?0:this.volume;this.volume=t+(Rh.number(e)?e:0)})),uh(this,"decreaseVolume",(e=>{this.increaseVolume(-e)})),uh(this,"airplay",(()=>{sg.airplay&&this.media.webkitShowPlaybackTargetPicker()})),uh(this,"toggleControls",(e=>{if(this.supported.ui&&!this.isAudio){const t=Jh(this.elements.container,this.config.classNames.hideControls),n=void 0===e?void 0:!e,o=Xh(this.elements.container,this.config.classNames.hideControls,n);if(o&&Rh.array(this.config.controls)&&this.config.controls.includes("settings")&&!Rh.empty(this.config.settings)&&Og.toggleMenu.call(this,!1),o!==t){const e=o?"controlshidden":"controlsshown";ug.call(this,this.media,e)}return!o}return!1})),uh(this,"on",((e,t)=>{lg.call(this,this.elements.container,e,t)})),uh(this,"once",((e,t)=>{dg.call(this,this.elements.container,e,t)})),uh(this,"off",((e,t)=>{cg(this.elements.container,e,t)})),uh(this,"destroy",((e,t=!1)=>{if(!this.ready)return;const n=()=>{document.body.style.overflow="",this.embed=null,t?(Object.keys(this.elements).length&&(qh(this.elements.buttons.play),qh(this.elements.captions),qh(this.elements.controls),qh(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),Rh.function(e)&&e()):(pg.call(this),Cg.cancelRequests.call(this),Kh(this.elements.original,this.elements.container),ug.call(this,this.elements.original,"destroyed",!0),Rh.function(e)&&e.call(this.elements.original),this.ready=!1,setTimeout((()=>{this.elements=null,this.media=null}),200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Kg.toggleNativeControls.call(this,!0),n()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&Rh.function(this.embed.destroy)&&this.embed.destroy(),n()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(n),setTimeout(n,200))})),uh(this,"supports",(e=>sg.mime.call(this,e))),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=sg.touch,this.media=e,Rh.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||Rh.nodeList(this.media)||Rh.array(this.media))&&(this.media=this.media[0]),this.config=Hh({},Fg,mm.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Vg(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",sg),Rh.nullOrUndefined(this.media)||!Rh.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!sg.check().api)return void this.debug.error("Setup failed: no support");const n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;const o=this.media.tagName.toLowerCase();let i=null,s=null;switch(o){case"div":if(i=this.media.querySelector("iframe"),Rh.element(i)){if(s=Rg(i.getAttribute("src")),this.provider=function(e){return/^(?:https?:\/\/)?(?:www\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Wg.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Wg.vimeo:null}(s.toString()),this.elements.container=this.media,this.media=i,this.elements.container.className="",s.search.length){const e=["1","true"];e.includes(s.searchParams.get("autoplay"))&&(this.config.autoplay=!0),e.includes(s.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=e.includes(s.searchParams.get("playsinline")),this.config.youtube.hl=s.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(Rh.empty(this.provider)||!Object.values(Wg).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Ug;break;case"video":case"audio":this.type=o,this.provider=Wg.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=sg.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new Qg(this),this.storage=new Eg(this),this.media.plyr=this,Rh.element(this.elements.container)||(this.elements.container=Gh("div"),Wh(this.media,this.elements.container)),Kg.migrateStyles.call(this),Kg.addStyleHook.call(this),lm.setup.call(this),this.config.debug&&lg.call(this,this.elements.container,this.config.events.join(" "),(e=>{this.debug.log(`event: ${e.type}`)})),this.fullscreen=new qg(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Kg.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new cm(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(()=>gg(this.play()))),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new hm(this))):this.debug.error("Setup failed: no support")} |
| 331 |
get isHTML5(){return this.provider===Wg.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Wg.youtube}get isVimeo(){return this.provider===Wg.vimeo}get isVideo(){return this.type===Ug}get isAudio(){return"audio"===this.type}get playing(){return Boolean(this.ready&&!this.paused&&!this.ended)}get paused(){return Boolean(this.media.paused)}get stopped(){return Boolean(this.paused&&0===this.currentTime)}get ended(){return Boolean(this.media.ended)}set currentTime(e){if(!this.duration)return;const t=Rh.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return Rh.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return Boolean(this.media.seeking)}get duration(){const e=Number.parseFloat(this.config.duration),t=(this.media||{}).duration,n=Rh.number(t)&&t!==1/0?t:0;return e||n}set volume(e){let t=e;Rh.string(t)&&(t=Number(t)),Rh.number(t)||(t=this.storage.get("volume")),Rh.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!Rh.empty(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;Rh.boolean(t)||(t=this.storage.get("muted")),Rh.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return Boolean(this.media.muted)}get hasAudio(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;Rh.number(e)&&(t=e),Rh.number(t)||(t=this.storage.get("speed")),Rh.number(t)||(t=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:o}=this;t=dm(t,n,o),this.config.speed.selected=t,setTimeout((()=>{this.media&&(this.media.playbackRate=t)}),0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,n=this.options.quality;if(!n.length)return;let o=[!Rh.empty(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(Rh.number),i=!0;if(!n.includes(o)){const e=bg(n,o);this.debug.warn(`Unsupported quality option: ${o}, using ${e} instead`),o=e,i=!1}t.selected=o,this.media.quality=o,i&&this.storage.set({quality:o})}get quality(){return this.media.quality}set loop(e){const t=Rh.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return Boolean(this.media.loop)}set source(e){gm.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return Rh.url(e)?e:this.source}set download(e){Rh.url(e)&&(this.config.urls.download=e,Og.setDownloadUrl.call(this))}set poster(e){this.isVideo?Kg.setPoster.call(this,e,!1).catch((()=>{})):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=vg(kg.call(this));return Rh.array(e)?e.join(":"):e}set ratio(e){this.isVideo?Rh.string(e)&&yg(e)?(this.config.ratio=vg(e),wg.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){this.config.autoplay=Rh.boolean(e)?e:this.config.autoplay}get autoplay(){return Boolean(this.config.autoplay)}toggleCaptions(e){Dg.toggle.call(this,e,!1)}set currentTrack(e){Dg.set.call(this,e,!1),Dg.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Dg.setLanguage.call(this,e,!1)}get language(){return(Dg.getCurrentTrack.call(this)||{}).language}set pip(e){if(!sg.pip)return;const t=Rh.boolean(e)?e:!this.pip;Rh.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Hg:"inline"),Rh.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return sg.pip?Rh.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Hg:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new hm(this))}static supported(e,t){return sg.check(e,t)}static loadSprite(e,t){return Ag(e,t)}static setup(e,t={}){let n=null;return Rh.string(e)?n=Array.from(document.querySelectorAll(e)):Rh.nodeList(e)?n=Array.from(e):Rh.array(e)&&(n=e.filter(Rh.element)),Rh.empty(n)?null:n.map((e=>new mm(e,t)))}}var bm;mm.defaults=(bm=Fg,JSON.parse(JSON.stringify(bm)));var fm=a(5556),xm=a.n(fm);const ym=(e,t)=>{const n=new mm(".plyr-react",t.options||{});return t.source&&(n.source=t.source),n},vm=e=>{e&&e.destroy()},km=()=>{},wm=e=>e?()=>({plyr:e}):()=>new Proxy({plyr:{source:null}},{get:(e,t)=>"plyr"===t?e[t]:km});const _m=m.forwardRef(((e,t)=>{const{source:n,options:o=null,...i}=e,s=function(e,t,n=null){return function(e,t,n=[]){const[o,i]=(0,m.useState)(null),s=(0,m.useRef)(null),{instantiate:a,destroy:r,getAPI:l,params:c}=t;(0,m.useEffect)((()=>{const e=a(s.current,c);return i(e),()=>{r&&r(e,c)}}),n);const d=(0,m.useMemo)((()=>l(o,c)),[o]);return(0,m.useImperativeHandle)(e,d,[d]),s}(e,{instantiate:ym,getAPI:wm,destroy:vm,params:t},n||[t.options,t.source])}(t,{source:n,options:o});return(0,l.jsx)("video",{ref:s,className:"plyr-react plyr",...i})}));_m.displayName="Plyr",_m.defaultProps={options:{controls:["rewind","play","fast-forward","progress","current-time","duration","mute","volume","settings","fullscreen"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop"}},source:{type:"video",sources:[{src:"https://cdn.plyr.io/static/blank.mp4",type:"video/mp4",size:720},{src:"https://cdn.plyr.io/static/blank.mp4",type:"video/mp4",size:1080}]}},_m.propTypes={options:xm().object,source:xm().any};const Cm=({popup:e})=>{const{type:t="video",content:n="",videoOptions:o={}}=e,{autoplay:i=!1}=o||{};return(0,l.jsx)(_m,{source:{type:t,sources:[{src:n,provider:n.includes("youtube")?"youtube":n.includes("vimeo")?"vimeo":"html5"}]},options:{autoplay:i}})},jm=(0,m.forwardRef)((({attributes:e,securityPass:t=!0,setSecurityPass:n,isPremium:o,Popup:i,popupContent:s,isBackend:a=!1,children:r,onClick:c=()=>{}},d)=>{const{actionType:u="link",iconPos:p="left"}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("a",{ref:d,...ch(e,t,o,a),onClick:()=>c(!0),children:["right"!==p&&(0,l.jsx)(dh,{attributes:e}),r,"right"===p&&(0,l.jsx)(dh,{attributes:e})]}),o&&"popup"===u&&t&&!a&&(0,l.jsx)($m,{attributes:e,Popup:i,popupContent:s,securityPop:t,setSecurityPass:n,btnRef:d})]})})),$m=({attributes:e,Popup:t,popupContent:n,securityPop:o,setSecurityPass:i})=>{const{actionType:s="link",popup:a={}}=e,{caption:r=""}=a,[c,d]=(0,m.useState)(o);return(0,m.useEffect)((()=>{}),[s]),(0,l.jsx)(t,{isOpen:c,onClose:()=>{d(!1),i(!1)},caption:r,children:(0,l.jsx)(Sm,{popup:a,popupContent:n})})},Sm=({popup:e,popupContent:t})=>{ |
| 332 |
const{type:n="image",content:o="",caption:i=""}=e;if(!o)return(0,l.jsxs)("p",{className:"warning",children:["Sorry! No ","iframe"===n?"Iframe Source":n," Found. Please Insert..."]});switch(n){case"image":return(0,l.jsx)("img",{className:"image",src:o,alt:i});case"audio":case"video":return(0,l.jsx)(Cm,{popup:e});case"content":return t;case"document":return(0,l.jsx)("div",{className:"document",children:(0,l.jsx)("iframe",{src:`//docs.google.com/viewer?embedded=true&url=${o}`})});case"iframe":return(0,l.jsx)("div",{className:"iframe",children:(0,l.jsx)("iframe",{src:o})});default:return null}},Tm=({attributes:e,id:t})=>{const{hideOn:n={desktop:!1,tablet:!1,mobile:!1},isFullWidth:i,addCSS:a,alignment:r,typography:c,colors:d,hovColors:u,padding:p,border:h,shadow:g,buttonHover:m}=e,b=`#${t}`,f=`${b} .${lh}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",c)?.googleFontLink}\n\t\t${pa(f,c)?.styles}\n\n\t\t${b}{\n\t\t\ttext-align: ${r};\n\t\t}\n\t\t${f}:not(.btnEditor){\n\t\t\tdisplay: ${n?.desktop?"none":"inline-flex"};\n\t\t}\n\t\t${f}.btnEditor{\n\t\t\topacity: ${n?.desktop?.8:1};\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${f}:not(.btnEditor){\n\t\t\t\tdisplay: ${n?.tablet?"none":"inline-flex"};\n\t\t\t}\n\t\t\t${f}.btnEditor{\n\t\t\t\topacity: ${n?.tablet?.8:1};\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${f}:not(.btnEditor){\n\t\t\t\tdisplay: ${n?.mobile?"none":"inline-flex"};\n\t\t\t}\n\t\t\t${f}.btnEditor{\n\t\t\t\topacity: ${n?.mobile?.8:1};\n\t\t\t}\n\t\t}\n\t\t${f}{\n\t\t\t${aa(d)||`color: #fff; background-color: ${o};`}\n\t\t\twidth: ${i?"100%":"auto"};\n\t\t\tpadding: ${ua(p)||"10px 20px"};\n\t\t\t${ia(h)||"border-radius: 5px;"}\n\t\t\tbox-shadow: ${la(g?.shadow||g)||"none"};\n\t\t}\n\t\t${f}:hover{\n\t\t\t${aa(u)||`color: #fff; background-color: ${s};`}\n\t\t\t${jt(m?.shadow)?`box-shadow: ${la(m?.shadow)};`:""}\n\t\t\t${jt(m?.border)?ia(m?.border):""}\n\t\t\t${jt(m?.padding)?`padding: ${ua(m?.padding)}`:""}\n\t\t}\n\t\t${a}\n\t\t`.replace(/\s+/g," ")}})},Mm=({popup:e,setAttributes:t})=>{const{ShortcutProvider:n}=wp.keyboardShortcuts,[o,i]=(0,m.useState)([]);(0,m.useEffect)((()=>{i((0,p.parse)(e?.content))}),[]);const s=n=>{const o=n[n.length-1];"core/paragraph"===o.name&&""===o.attributes.content?i(n):i([...n,...(0,p.parse)("\x3c!-- wp:paragraph --\x3e\x3c!-- /wp:paragraph --\x3e")]),t({popup:{...e,content:(0,p.serialize)(n)}})};return(0,l.jsx)(h.BlockEditorProvider,{value:o,onInput:e=>s(e),onChange:e=>s(e),children:(0,l.jsx)(y.SlotFillProvider,{children:(0,l.jsxs)(n,{className:"btnContentArea",children:[(0,l.jsx)(h.BlockEditorKeyboardShortcuts,{}),(0,l.jsxs)("div",{className:"btnContentBox",children:[(0,l.jsxs)("div",{className:"btnContentEditor",children:[(0,l.jsx)(h.BlockTools,{children:(0,l.jsx)(h.WritingFlow,{children:(0,l.jsx)(h.ObserveTyping,{children:(0,l.jsx)(h.BlockList,{})})})}),(0,l.jsx)("div",{className:"popoverSlotOuter",children:(0,l.jsx)(y.Popover.Slot,{})})]}),(0,l.jsx)("div",{className:"btnContentSidebar",children:(0,l.jsx)(h.BlockInspector,{})})]})]})})})},Nm=[{label:(0,x.__)("Link","b-blocks"),value:"link"},{label:(0,x.__)("Popup","b-blocks"),value:"popup"}],Lm=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Password Protected","b-blocks"),value:"password"},{label:(0,x.__)("Login Protected","b-blocks"),value:"login"}],Em=((0,x.__)("Alternate","b-blocks"),(0,x.__)("Author","b-blocks"),(0,x.__)("Bookmark","b-blocks"),(0,x.__)("External","b-blocks"),(0,x.__)("Help","b-blocks"),(0,x.__)("License","b-blocks"),(0,x.__)("Next","b-blocks"),(0,x.__)("No Follow","b-blocks"),(0,x.__)("No Opener","b-blocks"),(0,x.__)("No Referrer","b-blocks"),(0,x.__)("Prev","b-blocks"),(0,x.__)("Search","b-blocks"),(0,x.__)("Tag","b-blocks"),(0,x.__)("No Referrer","b-blocks"),(0,x.__)("No Referrer When Downgrade","b-blocks"),(0,x.__)("Origin","b-blocks"),(0,x.__)("Origin When Cross Origin","b-blocks"),(0,x.__)("Same Origin","b-blocks"),(0,x.__)("Strict Origin When Cross Origin","b-blocks"),(0,x.__)("Unsafe Url","b-blocks"),[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Right","b-blocks"),value:"right"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"},{label:(0,x.__)("Left","b-blocks"),value:"left"}]),Pm=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],Am=[{label:(0,x.__)("Flat","b-blocks"),value:"flat",icon:"Flat"},{label:(0,x.__)("3D","b-blocks"),value:"3d",icon:"3D"}],Bm=[{label:(0,x.__)("Small","b-blocks"),value:"small"},{label:(0,x.__)("Medium","b-blocks"),value:"medium"},{label:(0,x.__)("Large","b-blocks"),value:"large"},{label:(0,x.__)("X Large","b-blocks"),value:"x-large"}],Im=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Fade","b-blocks"),value:"fade"},{label:(0,x.__)("Fade Up","b-blocks"),value:"fade-up"},{label:(0,x.__)("Fade Down","b-blocks"),value:"fade-down"},{label:(0,x.__)("Fade Left","b-blocks"),value:"fade-left"},{label:(0,x.__)("Fade Right","b-blocks"),value:"fade-right"},{label:(0,x.__)("Flip Up","b-blocks"),value:"flip-up"},{label:(0,x.__)("Flip Down","b-blocks"),value:"flip-down"},{label:(0,x.__)("Flip Left","b-blocks"),value:"flip-left"},{label:(0,x.__)("Flip Right","b-blocks"),value:"flip-right"},{label:(0,x.__)("Zoom In","b-blocks"),value:"zoom-in"},{label:(0,x.__)("Zoom In Up","b-blocks"),value:"zoom-in-up"},{label:(0,x.__)("Zoom In Down","b-blocks"),value:"zoom-in-down"},{label:(0,x.__)("Zoom In Left","b-blocks"),value:"zoom-in-left"},{label:(0,x.__)("Zoom In Right","b-blocks"),value:"zoom-in-right"}],Om=[{label:(0,x.__)("Image","b-blocks"),value:"image"},{label:(0,x.__)("Audio","b-blocks"),value:"audio"},{label:(0,x.__)("Video","b-blocks"),value:"video"},{label:(0,x.__)("Content","b-blocks"),value:"content"},{label:(0,x.__)("Document","b-blocks"),value:"document"},{label:(0,x.__)("Iframe","b-blocks"),value:"iframe"}],Rm=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"popup",title:(0,x.__)("Popup","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],zm=({attributes:e,setAttributes:t,isPremium:n,setContentPopup:i})=>{const{text:a,actionType:r="link",security:c,url:d,tooltip:u,tooltipPos:p="top",target:g,attrs:b={},hideOn:f={},isDownload:k,downloadFileName:w="",isUpIcon:_,icon:C,upIcon:j,iconPos:$,type:S,isFullWidth:T,size:M,popup:N={},animationType:L,animationDuration:E,addID:P,addCSS:A,alignment:B,typography:I,colors:O,hovColors:R,padding:z,border:D,shadow:F,securityPassword:H,securityRole:W,buttonHover:U}=e,{type:G="image",content:V="",caption:q="",videoOptions:Y}=N,[K,Q]=(0,m.useState)(!1),{roles:Z}=(()=>{const{data:e}=Cd("bBlocksUtils"),{data:t=null,refetch:n,isLoading:o=!0}=_d("bBlocksUserRoles",{_wpnonce:e?.nonce},!0),i=null===t?[]:Object.entries(t).map((([e,t])=>({label:t,value:e})));return(0,m.useEffect)((()=>{n()}),[e]),{roles:i,isLoading:o}})(),X={isPremium:n,setIsProModalOpen:Q},J=(n,o,i)=>{t({[n]:{...e[n],[o]:i}})},ee="popup"===r,te={value:V,onChange:e=>J("popup","content",e)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Rm,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:"https://bplugins.com/docs/button-block"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:a,onChange:e=>t({text:e})})]}),(0,l.jsx)(Zs,{className:"mt20",label:(0,x.__)("Action:","b-blocks"),labelPosition:"left",value:r,onChange:e=>t({actionType:e}),options:Nm,...X,proValues:["popup"]}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Security:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({security:e}),options:Lm,...X,Component:y.SelectControl}),"login"==c&&(0, |
| 333 |
l.jsx)(l.Fragment,{children:(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Set User Role:","b-blocks"),labelPosition:"left",value:W,onChange:e=>t({securityRole:e}),options:[{label:"Default",value:"default"},...Z],...X,Component:y.SelectControl})}),"password"==c&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Set Password:","b-blocks"),value:H,onChange:e=>t({securityPassword:e}),...X,Component:y.TextControl})}),!ee&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("URL:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:d,onChange:e=>t({url:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Open link in new tab","b-blocks"),checked:"_blank"===g,onChange:e=>t({target:e?"_blank":"_self"})}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("URL/Link Rel/Relation:","b-blocks"),value:b?.rel,onChange:e=>J("attrs","rel",e),...X,Component:y.TextControl}),(0,l.jsxs)("small",{children:["For more details read the ",(0,l.jsx)("a",{href:"https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel",target:"_blank",rel:"noreferrer",children:"documentation"})]}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Enter Referer Policy:","b-blocks"),value:b?.referrerpolicy,onChange:e=>J("attrs","referrerpolicy",e),...X,Component:y.TextControl}),(0,l.jsxs)("small",{children:["For more details read the ",(0,l.jsx)("a",{href:"https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/referrerPolicy",target:"_blank",rel:"noreferrer",children:"documentation"})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Download Button","b-blocks"),checked:k,onChange:e=>t({isDownload:e})}),k&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("small",{children:(0,x.__)("Make sure the URL/link is downloadable!","b-blocks")}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Download File Name:","b-blocks"),labelPosition:"left",value:w,onChange:e=>t({downloadFileName:e}),...X,Component:y.TextControl}),(0,l.jsxs)("small",{children:[(0,x.__)("This is an experimental feature, and it may not work reliably every time.","b-blocks")," ",(0,l.jsx)("a",{href:"https://www.w3schools.com/howto/howto_html_download_link.asp",target:"_blank",rel:"noreferrer",children:"Source"})]})]})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Upload Icon?","b-blocks"),checked:_,onChange:e=>t({isUpIcon:e})}),_?(0,l.jsx)(ke,{value:j,types:["image"],onChange:e=>t({upIcon:e}),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}):(0,l.jsx)(Un,{value:C,onChange:e=>t({icon:e}),defaults:{class:"fa fa-paper-plane"},isSize:!1,isColor:!1}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Icon Position:","b-blocks"),labelPosition:"left",value:$,onChange:e=>t({iconPos:e}),options:Pm,...X,Component:y.SelectControl}),(0,l.jsx)(v,{children:(0,x.__)("Tooltip Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:u,onChange:e=>t({tooltip:e})}),(0,l.jsx)("small",{children:(0,x.__)("If you want to add tooltip on button, type text rather then leave empty.","b-blocks")}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Tooltip Position:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({tooltipPos:e}),options:Em,...X,Component:y.SelectControl}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Hide On Desktop","b-blocks"),checked:f?.desktop,onChange:e=>J("hideOn","desktop",e),...X,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Hide On Tablet","b-blocks"),checked:f?.tablet,onChange:e=>J("hideOn","tablet",e),...X,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Hide On Mobile","b-blocks"),checked:f?.mobile,onChange:e=>J("hideOn","mobile",e),...X,Component:y.ToggleControl})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Design","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Button Full Width?","b-blocks"),checked:T,onChange:e=>t({isFullWidth:e})}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Size:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:M,onChange:e=>{t({size:e}),"small"===e&&t({typography:{...I,fontSize:12},padding:{...z,vertical:"8px",horizontal:"16px"}}),"medium"===e&&t({typography:{...I,fontSize:16},padding:{...z,vertical:"12px",horizontal:"24px"}}),"large"===e&&t({typography:{...I,fontSize:20},padding:{...z,vertical:"14px",horizontal:"30px"}}),"x-large"===e&&t({typography:{...I,fontSize:22},padding:{...z,vertical:"16px",horizontal:"46px"}})},options:Bm})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Type:","b-blocks")}),(0,l.jsx)(Tn,{value:S,onChange:e=>{t({type:e}),"flat"===e&&t({shadow:[]}),"3d"===e&&t({shadow:[{hOffset:"-5px",vOffset:"6px",blur:"2px",spreed:"0px",color:"#0006",isInset:!1},{hOffset:"3px",vOffset:"-3px",blur:"0px",spreed:"2px",color:"#341b7e",isInset:!0}]})},isTextIcon:!0,options:Am})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:L,onChange:e=>t({animationType:e}),options:Im})]}),(0,l.jsx)(v,{children:(0,x.__)("Duration (Speed) (s):","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:E,onChange:e=>t({animationDuration:e}),min:0,max:3,step:.05}),(0,l.jsx)("small",{children:(0,x.__)("Animation duration of speed in seconds")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Additional","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("ID:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:P,onChange:e=>t({addID:e}),placeholder:(0,x.__)("Enter additional ID","b-blocks")})]}),(0,l.jsx)(v,{children:(0,x.__)("CSS:","b-blocks")}),(0,l.jsx)(y.TextareaControl,{value:A,onChange:e=>t({addCSS:e}),placeholder:(0,x.__)("Enter additional CSS","b-blocks")})]})]}),"popup"===e.name&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","b-blocks"),children:[!ee&&(0,l.jsx)("div",{className:"mb20",children:(0,l.jsx)("small",{children:(0,x.__)("Please select the popup from the button action to enable these options.","b-blocks")})}),(0,l.jsxs)("div",{className:ee?"":"bPlNoEvent",children:[(0,l.jsx)(Ys,{label:(0,x.__)("Content Type:","b-blocks"),labelPosition:"left",value:G,options:Om,onChange:e=>t({popup:{...N,type:e,content:"content"===e?"\x3c!-- wp:paragraph --\x3e\x3c!-- /wp:paragraph --\x3e":""}}),...X,Component:y.SelectControl}),"image"===G&&(0,l.jsx)(Ys,{label:(0,x.__)("Image:","b-blocks"),type:["image"],...te,placeholder:(0,x.__)("Enter Image URL","b-blocks"),...X,Component:ve}),"audio"===G&&(0,l.jsx)(Ys,{label:(0,x.__)("Audio:","b-blocks"),types:["audio"],...te,placeholder:(0,x.__)("Enter Audio URL","b-blocks"),...X,Component:ve}),"video"===G&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{label:(0,x.__)("Video:","b-blocks"),types:["video"],...te,placeholder:(0,x.__)("Enter Video URL","b-blocks"),...X,Component:ve}),(0,l.jsx)("span",{children:(0,x.__)("Also support YouTube and Vimeo video.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Autoplay Video","b-blocks"),checked:Y?.autoplay,value:Y?.autoplay,onChange:e=>t({popup:be(N,e,"videoOptions","autoplay")})})]}),"content"===G&&(0,l.jsx)(y.Flex,{className:"mt20",justify:"center",children:(0,l.jsx)(y.Button,{variant:"primary",onClick:()=>i(!0),children:"Add/Update Content"})}),"document"===G&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{label:(0,x.__)("Document:","b-blocks"),types:["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],...te,placeholder:(0,x.__)("Enter Document URL","b-blocks"),...X,Component:ve}),(0, |
| 334 |
l.jsx)("span",{children:(0,x.__)("Supported Document: .pdf, .doc, .docx, .xls, .xlsx","b-blocks")})]}),"iframe"===G&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{label:(0,x.__)("Iframe Source:","b-blocks"),...te,placeholder:(0,x.__)("Enter Iframe URL","b-blocks"),...X,Component:y.TextControl}),(0,l.jsx)("span",{children:(0,x.__)("Note: Enter only source URL","b-blocks")})]}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Title/Caption:","b-blocks"),value:q,onChange:e=>J("popup","caption",e),...X,Component:y.TextControl})]})]}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),children:[(0,l.jsx)(Os,{value:I,onChange:e=>t({typography:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16},textDecoration:"none"}}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:Ne,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(On,{value:O,onChange:e=>t({colors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:z,onChange:e=>t({padding:e}),defaults:{vertical:"10px",horizontal:"20px"}}),(0,l.jsx)(Xc,{className:"mt20",value:D,onChange:e=>t({border:e}),defaults:{radius:"5px"}}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow:","b-blocks"),value:F?.shadow||F,onChange:e=>t({shadow:e})})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(On,{label:(0,x.__)("Colors:","b-blocks"),value:R,onChange:e=>t({hovColors:e}),defaults:{color:"#fff",bg:s}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:U?.padding||{},onChange:e=>t({buttonHover:{...U,padding:e}})}),(0,l.jsx)(Xc,{className:"mt20",value:U?.border,onChange:e=>t({buttonHover:{border:e}}),defaults:{radius:"5px"}}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow:","b-blocks"),value:U?.shadow||[],onChange:e=>t({buttonHover:{...U,shadow:e}})})]})]})})]})})]})})}),(0,l.jsxs)(jn,{isProModalOpen:K,setIsProModalOpen:Q,block:"Button",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Button Action: ","b-blocks")}),(0,x.__)("Use the button as a link or popup trigger.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("rel Attribute: ","b-blocks")}),(0,x.__)("Add the rel/relation attribute to the anchor link.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("referrer-policy Attribute: ","b-blocks")}),(0,x.__)("Add the Referrer Policy attribute to the anchor link.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Download File Name: ","b-blocks")}),(0,x.__)("For the download, enter a custom name for the download file. This is an experimental feature, and it may not work reliably every time.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Icon Position: ","b-blocks")}),(0,x.__)("Set the icon position to the left or right.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Tooltip Position: ","b-blocks")}),(0,x.__)("Choose a different position for the tooltip.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Hide on Devices: ","b-blocks")}),(0,x.__)("Hide on various devices (desktop, tablet, and mobile).","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Popup Content: ","b-blocks")}),(0,x.__)("Show Image, Audio, Video, Block Content, Document(.pdf, .doc, .docx, .xls, .xlsx), and Iframe.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Security Features: ","b-blocks")}),(0,x.__)("Login, Password Required","b-blocks")]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:B,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Button Alignment"),alignmentControls:[{title:(0,x.__)("Button in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Button in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Button in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},Dm=({isOpen:e,onClose:t,caption:n,children:o})=>{if(!e)return null;const i=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const n=i.current;if(n&&e){const e=document.createElement("button");e.className="popupCloseBtn",e.innerHTML="\n\t\t\t\t<svg xmlns='http://www.w3.org/2000/svg' fill='#fff' width='24px' height='24px' viewBox='0 0 32 32'>\n\t\t\t\t\t<path d='M17.769 16l9.016-9.016c0.226-0.226 0.366-0.539 0.366-0.884 0-0.691-0.56-1.251-1.251-1.251-0.346 0-0.658 0.14-0.885 0.367v0l-9.015 9.015-9.016-9.015c-0.226-0.226-0.539-0.366-0.884-0.366-0.69 0-1.25 0.56-1.25 1.25 0 0.345 0.14 0.658 0.366 0.884v0l9.015 9.016-9.015 9.015c-0.227 0.226-0.367 0.539-0.367 0.885 0 0.691 0.56 1.251 1.251 1.251 0.345 0 0.658-0.14 0.884-0.366v0l9.016-9.016 9.015 9.016c0.227 0.228 0.541 0.369 0.888 0.369 0.691 0 1.251-0.56 1.251-1.251 0-0.347-0.141-0.661-0.369-0.887l-0-0z' />\n\t\t\t\t</svg>\n\t\t\t",e.addEventListener("click",(()=>t())),n.appendChild(e)}}),[i.current,e]),(0,l.jsxs)(y.Modal,{onRequestClose:()=>t(),className:"popupContent",overlayClassName:"btnPopupWrap",shouldCloseOnClickOutside:!0,isFullScreen:!1,__experimentalHideHeader:!0,ref:i,children:[(0,l.jsx)("div",{children:o}),n&&(0,l.jsx)("p",{className:"popupCaption",dangerouslySetInnerHTML:{__html:n}})]})};Nl(rh.name)&&(0,p.registerBlockType)(rh,{icon:lr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{text:i,animationType:s,animationDuration:a,popup:r={}}=t,[c,d]=(0,m.useState)(!1),u=(0,m.useRef)(null),p=bBlocksPremiumChecker;return(0,m.useEffect)((()=>{window.AOS?.init()}),[]),(0,m.useEffect)((()=>{const e=u.current?.classList;e.remove("aos-init"),e.remove("aos-animate"),setTimeout((()=>{e.add("aos-init"),e.add("aos-animate")}),500)}),[s,a]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(zm,{attributes:t,setAttributes:n,isPremium:p,setContentPopup:d}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Tm,{attributes:t,id:`block-${o}`}),(0,l.jsx)(jm,{attributes:t,security:"none",isPremium:p,Popup:Dm,popupContent:(0,l.jsx)(Mm,{popup:r,setAttributes:n}),ref:u,isBackend:!0,children:(0,l.jsx)(h.RichText,{className:"btnText",tagName:"span",value:i,onChange:e=>n({text:e}),placeholder:(0,x.__)("Button Text","b-blocks")})}),c&&(0,l.jsx)($m,{attributes:t,Popup:Dm,popupContent:(0,l.jsx)(Mm,{popup:r,setAttributes:n}),securityPop:!0,setSecurityPass:d})]})]})},save:()=>null}) |
| 335 |
;const Fm=JSON.parse('{"apiVersion":3,"name":"b-blocks/button-group","title":"Button Group","description":"Display Dual Button.","category":"bBlocks","keywords":["buttons","multiple buttons","group of buttons"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"width":{"type":"string","default":"0px"},"layout":{"type":"string","default":"row"},"alignment":{"type":"object","default":{"desktop":{"vertical":"center","horizontal":"center"},"tablet":{"vertical":"","horizontal":""},"mobile":{"vertical":"","horizontal":""}}},"gap":{"type":"object","default":{"desktop":"","tablet":"","mobile":""}},"btnAlign":{"type":"string","default":"center"},"btnType":{"type":"string","default":"fill"},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"btnPadding":{"type":"object","default":{"vertical":"12px","horizontal":"30px"}},"btnOne":{"type":"string","selector":"a.btnOne","default":"First Button"},"btnOneLink":{"type":"string","default":"#"},"btnOneBorder":{"type":"object","default":{"radius":"50px"}},"btnOneColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"btnOneHovColors":{"type":"object","default":{"color":"#fff","bg":"#070127"}},"btnTwo":{"type":"string","selector":"a.btnTwo","default":"Second Button"},"btnTwoLink":{"type":"string","default":"#"},"btnTwoBorder":{"type":"object","default":{"radius":"50px"}},"btnTwoColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"btnTwoHovColors":{"type":"object","default":{"color":"#fff","bg":"#070127"}},"isSep":{"type":"boolean","default":true},"sepType":{"type":"string","default":"icon"},"sepText":{"type":"string","default":"or"},"sepTextTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"sepTextColor":{"type":"string","default":"#333"},"sepIcon":{"type":"object","default":{"class":"fa fa-arrows-alt-h","fontSize":20,"color":"#333"}},"sepBGColor":{"type":"string","default":"#fff"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),Hm=[{label:"Icon",value:"icon",icon:"Icon"},{label:"Text",value:"text",icon:"Text"}],Wm=[{name:"btn-one",title:(0,x.__)("Button One","b-blocks")},{name:"btn-two",title:(0,x.__)("Button Two","b-blocks")}],Um=({attributes:e,setAttributes:t,device:n,updateObj:i})=>{const{width:a,btnAlign:r,btnType:c,btnTypo:d,btnPadding:u,btnOneLink:p,btnOneBorder:g,btnOneColors:m,btnOneHovColors:b,btnTwoLink:f,btnTwoBorder:k,btnTwoColors:w,btnTwoHovColors:C,isSep:j,sepType:$,sepText:S,sepTextTypo:T,sepTextColor:M,sepIcon:N,sepBGColor:L,layout:E="row",alignment:P={},gap:A={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Settings","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Container Width:","b-blocks"),labelPosition:"left",value:a,onChange:e=>t({width:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Layout","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:E,onChange:e=>t({layout:e}),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"column"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"row"})]})]}),"column"===E&&(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.Flex,{children:(0,l.jsxs)(v,{className:"flex1",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"default",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:P?.[n]?.vertical,onChange:e=>i("alignment",e,n,"vertical"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:"editor-alignleft"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:"editor-aligncenter"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:"editor-alignright"})]})]}),"row"===E&&(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.Flex,{children:(0,l.jsxs)(v,{className:"flex1",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"default",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:P?.[n]?.horizontal,onChange:e=>i("alignment",e,n,"horizontal"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:"editor-alignleft"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:"editor-aligncenter"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:"editor-alignright"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Between",value:"space-between",icon:"editor-justify"})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2",children:[(0,x.__)("Gap:","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:A?.[n]||"",onChange:e=>i("gap",e,n)})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(Tn,{value:c,onChange:e=>{t({btnType:e}),"fill"===e&&t({btnOneColors:{...m,color:"#fff",bg:o,styles:`color: #fff; background: ${o};`},btnOneBorder:{...g,width:"0px",color:"#0000",styles:""},btnTwoColors:{...w,color:"#fff",bg:s,styles:`color: #fff; background: ${s};`},btnTwoBorder:{...k,width:"0px",color:"#0000",styles:""}}),"outline"===e&&t({btnOneColors:{...m,color:o,bg:"#0000",styles:`color: ${o}; background: #0000;`},btnOneBorder:{...g,width:"3px",color:o,styles:`border: 3px solid ${o};`},btnTwoColors:{...w,color:s,bg:"#0000",styles:`color: ${s}; background: #0000;`},btnTwoBorder:{...k,width:"3px",color:s,styles:`border: 3px solid ${s};`}})},options:[{label:(0,x.__)("Fill","b-blocks"),value:"fill",icon:"FILL"},{label:(0,x.__)("Outline","b-blocks"),value:"outline",icon:"OUTLINE"}]})]}),(0,l.jsx)("small",{children:(0,x.__)("Some settings may change when type will be changed.","b-blocks")}),(0,l.jsx)(Os,{value:d,onChange:e=>t({btnTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:u,onChange:e=>t({btnPadding:e}),defaults:{vertical:"12px",horizontal:"30px"}}),(0,l.jsx)(v,{children:(0,x.__)("Buttons:","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:Wm,children:e=>(0,l.jsxs)(l.Fragment,{children:["btn-one"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:p,onChange:e=>t({btnOneLink:e})})]}),(0,l.jsx)(Xc,{label:(0,x.__)("Border","b-blocks"),value:g,onChange:e=>t({btnOneBorder:e}),defaults:{radius:"50px"}}),(0,l.jsx)(On,{value:m,onChange:e=>t({btnOneColors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:b,onChange:e=>t({btnOneHovColors:e}),defaults:{color:"#fff",bg:s}})]}),"btn-two"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:f,onChange:e=>t({btnTwoLink:e})})]}),(0,l.jsx)(Xc,{label:(0,x.__)("Border","b-blocks"),value:k,onChange:e=>t({btnTwoBorder:e}),defaults:{radius:"50px"}}),(0,l.jsx)(On,{value:w,onChange:e=>t({btnTwoColors:e}),defaults:{color:"#fff",bg:s}}),(0,l.jsx)(On,{label:(0, |
| 336 |
x.__)("Hover Colors:","b-blocks"),value:C,onChange:e=>t({btnTwoHovColors:e}),defaults:{color:"#fff",bg:o}})]})]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:j,onChange:e=>t({isSep:e})}),j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(Tn,{value:$,onChange:e=>t({sepType:e}),options:Hm})]}),"text"===$&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Separator Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:S,onChange:e=>t({sepText:e})}),(0,l.jsx)(Os,{label:(0,x.__)("Text Typography","b-blocks"),value:T,onChange:e=>t({sepTextTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:M,onChange:e=>t({sepTextColor:e}),defaultColor:"#333"})]}),"icon"===$&&(0,l.jsx)(Un,{value:N,onChange:e=>t({sepIcon:e}),defaults:{class:"fa fa fa-arrows-alt-h",fontSize:20,color:"#333"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color:","b-blocks"),value:L,onChange:e=>t({sepBGColor:e}),defaultColor:"#fff"})]})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:r,onChange:e=>t({btnAlign:e}),describedBy:(0,x.__)("Button Group Align"),alignmentControls:[{title:(0,x.__)("Button Group in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Button Group in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Button Group in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},Gm="bBlocksButtonGroup",Vm=({attributes:e,id:t})=>{const{width:n,btnAlign:o,btnTypo:i,btnPadding:s,btnOneBorder:a,btnOneColors:r,btnOneHovColors:c,btnTwoBorder:d,btnTwoColors:u,btnTwoHovColors:p,sepType:h,sepTextTypo:g,sepTextColor:m,sepIcon:b,sepBGColor:f,alignment:x={},layout:y="row",gap:v={}}=e,k=`#${t}`,w=`${k} .${Gm}`,_=`${w} .btnSeparator`,C=g?.fontSize?.desktop||g?.fontSize;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",i)?.googleFontLink}\n\t\t${pa("",g)?.googleFontLink}\n\t\t${pa(`${w} .bBlocksBtn a`,i)?.styles}\n\t\t${pa(`${_} span`,g)?.styles}\n\n\t\t${k}{\n\t\t\ttext-align: ${o};\n\t\t\t${"column"===y?na("text-align",x.desktop.vertical):""}\n\t\t}\n\t\t${w}{\n\t\t\twidth: ${"0px"!==n&&"0%"!==n&&"0em"!==n?n:"auto"};\n\t\t\t${na("gap",v?.desktop)}\n\t\t}\n\t\t${w}.layout-row{\n\t\t\t${na("justify-content",x.desktop.horizontal)}\n\t\t}\n\t\t${w}.layout-column{\n\t\t\t${na("justify-content",x.desktop.vertical)}\n\t\t}\n\t\t${w} .bBlocksBtn{\n\t\t\tmin-width: ${"0px"!==n&&"0%"!==n&&"0em"!==n?"50%":"auto"};\n\t\t}\n\t\t${w} .bBlocksBtn a{\n\t\t\tpadding: ${ua(s)};\n\t\t}\n\n\t\t${w} .btnOne{\n\t\t\t${ia(a)||"border-radius: 50px;"}\n\t\t\t${aa(r)}\n\t\t\tborder-radius: ${a?.radius||"50px"} 0 0 ${a?.radius||"50px"};\n\t\t}\n\t\t${w} .btnOne:hover{\n\t\t\t${aa(c)}\n\t\t}\n\n\t\t${w} .btnTwo{\n\t\t\t${ia(d)||"border-radius: 50px;"}\n\t\t\t${aa(u)}\n\t\t\tborder-radius: 0 ${d?.radius||"50px"} ${d?.radius||"50px"} 0;\n\t\t}\n\t\t${w} .btnTwo:hover{\n\t\t\t${aa(p)}\n\t\t}\n\n\t\t${_}{\n\t\t\twidth: ${"text"===h?1.75*C+"px":1.65*b?.fontSize+"px"};\n\t\t\theight: ${"text"===h?1.75*C+"px":1.65*b?.fontSize+"px"};\n\t\t\tbackground-color: ${f};\n\t\t\t${(()=>{const e=`margin-top: -${"text"===h?1.75*C/2:1.65*b?.fontSize/2}px;\n\t\t\tmargin-bottom: -${"text"===h?1.75*C/2:1.65*b?.fontSize/2}px;`;return"row"===y?`margin-left: -${"text"===h?1.75*C/2:1.65*b?.fontSize/2}px;\n\t\t\tmargin-right: -${"text"===h?1.75*C/2:1.65*b?.fontSize/2}px;`:e})()}\n\t\t}\n\t\t${_} span{\n\t\t\tcolor: ${m};\n\t\t}\n\t\t${_} i{\n\t\t\t${ra(b)}\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},qm=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,device:s}=e,{btnType:a,btnOne:r,btnOneLink:c,btnTwo:d,btnTwoLink:u,isSep:p,sepType:g,sepText:b,sepIcon:f,layout:y="row"}=t;(0,m.useEffect)((()=>me()),[i]);const v=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Um,{attributes:t,setAttributes:n,device:s,updateObj:v}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Vm,{attributes:t,id:`block-${o}`}),(0,l.jsxs)("div",{className:`${Gm} layout-${y}`,children:[(0,l.jsx)("div",{className:"bBlocksBtn firstBtn",children:(0,l.jsx)(h.RichText,{className:`btnOne btn-${a}`,tagName:"a",href:$t(c),value:r,onChange:e=>n({btnOne:e}),placeholder:(0,x.__)("First Button","b-blocks"),inlineToolbar:!0})}),p&&(0,l.jsx)("div",{className:"btnSeparator",children:"text"===g?(0,l.jsx)("span",{children:b}):"icon"===g&&f?.class?(0,l.jsx)("i",{className:f?.class}):""}),(0,l.jsx)("div",{className:"bBlocksBtn secondBtn",children:(0,l.jsx)(h.RichText,{className:`btnTwo btn-${a}`,tagName:"a",href:$t(u),value:d,onChange:e=>n({btnTwo:e}),placeholder:(0,x.__)("Second Button","b-blocks"),inlineToolbar:!0})})]})]})]})}));Nl(Fm.name)&&(0,p.registerBlockType)(Fm,{icon:cr,edit:qm,save:()=>null});const Ym=JSON.parse('{"apiVersion":3,"name":"b-blocks/cards","title":"Cards","description":"Provide cards to display anything.","category":"bBlocks","keywords":["card","cards","cards section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"cards":{"type":"array","default":[{"link":"","background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{"radius":"5px"},"cat":"Category 1","catColor":"#0dcaf0","title":"Card Title 1","titleColor":"#ff7500","desc":"This content area describes card 1 descriptions or details.","descColor":"#333"},{"link":"","background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{"radius":"5px"},"cat":"Category 2","catColor":"#0dcaf0","title":"Card Title 2","titleColor":"#ff7500","desc":"This content area describes card 2 descriptions or details.","descColor":"#333"},{"link":"","background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{"radius":"5px"},"cat":"Category 3","catColor":"#0dcaf0","title":"Card Title 3","titleColor":"#ff7500","desc":"This content area describes card 3 descriptions or details.","descColor":"#333"}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"20px"},"rowGap":{"type":"string","default":"30px"},"layout":{"type":"string","default":"vertical"},"link":{"type":"object","default":{"target":"_self","element":"card"}},"textAlign":{"type":"string","default":"left"},"padding":{"type":"object","default":{"vertical":"20px","horizontal":"10px"}},"imgPos":{"type":"string","default":"top"},"imgHeight":{"type":"string","default":"250px"},"imgWidth":{"type":"string","default":"90%"},"imgAlign":{"type":"object","default":"center"},"isCat":{"type":"boolean","default":true},"catTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"catMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isTitle":{"type":"boolean","default":true},"titlePos":{"type":"string","default":"image"},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"22px","tablet":"20px","mobile":"18px"}}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}');var Km=Symbol.for("immer-nothing"),Qm=Symbol.for("immer-draftable"),Zm=Symbol.for("immer-state");function Xm(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Jm=Object.getPrototypeOf;function eb(e){return!!e&&!!e[Zm]}function tb(e){ |
| 337 |
return!!e&&(ob(e)||Array.isArray(e)||!!e[Qm]||!!e.constructor?.[Qm]||lb(e)||cb(e))}var nb=Object.prototype.constructor.toString();function ob(e){if(!e||"object"!=typeof e)return!1;const t=Jm(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===nb}function ib(e,t){0===sb(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,o)=>t(o,n,e)))}function sb(e){const t=e[Zm];return t?t.type_:Array.isArray(e)?1:lb(e)?2:cb(e)?3:0}function ab(e,t){return 2===sb(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function rb(e,t,n){const o=sb(e);2===o?e.set(t,n):3===o?e.add(n):e[t]=n}function lb(e){return e instanceof Map}function cb(e){return e instanceof Set}function db(e){return e.copy_||e.base_}function ub(e,t){if(lb(e))return new Map(e);if(cb(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=ob(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[Zm];let n=Reflect.ownKeys(t);for(let o=0;o<n.length;o++){const i=n[o],s=t[i];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Jm(e),t)}{const t=Jm(e);if(null!==t&&n)return{...e};const o=Object.create(t);return Object.assign(o,e)}}function pb(e,t=!1){return gb(e)||eb(e)||!tb(e)||(sb(e)>1&&(e.set=e.add=e.clear=e.delete=hb),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>pb(t,!0)))),e}function hb(){Xm(2)}function gb(e){return Object.isFrozen(e)}var mb,bb={};function fb(e){const t=bb[e];return t||Xm(0),t}function xb(){return mb}function yb(e,t){t&&(fb("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function vb(e){kb(e),e.drafts_.forEach(_b),e.drafts_=null}function kb(e){e===mb&&(mb=e.parent_)}function wb(e){return mb={drafts_:[],parent_:mb,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function _b(e){const t=e[Zm];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Cb(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Zm].modified_&&(vb(t),Xm(4)),tb(e)&&(e=jb(t,e),t.parent_||Sb(t,e)),t.patches_&&fb("Patches").generateReplacementPatches_(n[Zm].base_,e,t.patches_,t.inversePatches_)):e=jb(t,n,[]),vb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Km?e:void 0}function jb(e,t,n){if(gb(t))return t;const o=t[Zm];if(!o)return ib(t,((i,s)=>$b(e,o,t,i,s,n))),t;if(o.scope_!==e)return t;if(!o.modified_)return Sb(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const t=o.copy_;let i=t,s=!1;3===o.type_&&(i=new Set(t),t.clear(),s=!0),ib(i,((i,a)=>$b(e,o,t,i,a,n,s))),Sb(e,t,!1),n&&e.patches_&&fb("Patches").generatePatches_(o,n,e.patches_,e.inversePatches_)}return o.copy_}function $b(e,t,n,o,i,s,a){if(eb(i)){const a=jb(e,i,s&&t&&3!==t.type_&&!ab(t.assigned_,o)?s.concat(o):void 0);if(rb(n,o,a),!eb(a))return;e.canAutoFreeze_=!1}else a&&n.add(i);if(tb(i)&&!gb(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;jb(e,i),t&&t.scope_.parent_||"symbol"==typeof o||!Object.prototype.propertyIsEnumerable.call(n,o)||Sb(e,i)}}function Sb(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&pb(t,n)}var Tb={get(e,t){if(t===Zm)return e;const n=db(e);if(!ab(n,t))return function(e,t,n){const o=Lb(t,n);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}(e,n,t);const o=n[t];return e.finalized_||!tb(o)?o:o===Nb(e.base_,t)?(Pb(e),e.copy_[t]=Ab(o,e)):o},has:(e,t)=>t in db(e),ownKeys:e=>Reflect.ownKeys(db(e)),set(e,t,n){const o=Lb(db(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){const o=Nb(db(e),t),a=o?.[Zm];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((i=n)===(s=o)?0!==i||1/i==1/s:i!=i&&s!=s)&&(void 0!==n||ab(e.base_,t)))return!0;Pb(e),Eb(e)}var i,s;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Nb(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Pb(e),Eb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=db(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:o.enumerable,value:n[t]}:o},defineProperty(){Xm(11)},getPrototypeOf:e=>Jm(e.base_),setPrototypeOf(){Xm(12)}},Mb={};function Nb(e,t){const n=e[Zm];return(n?db(n):e)[t]}function Lb(e,t){if(!(t in e))return;let n=Jm(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Jm(n)}}function Eb(e){e.modified_||(e.modified_=!0,e.parent_&&Eb(e.parent_))}function Pb(e){e.copy_||(e.copy_=ub(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Ab(e,t){const n=lb(e)?fb("MapSet").proxyMap_(e,t):cb(e)?fb("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),o={type_:n?1:0,scope_:t?t.scope_:xb(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=o,s=Tb;n&&(i=[o],s=Mb);const{revoke:a,proxy:r}=Proxy.revocable(i,s);return o.draft_=r,o.revoke_=a,r}(e,t);return(t?t.scope_:xb()).drafts_.push(n),n}function Bb(e){if(!tb(e)||gb(e))return e;const t=e[Zm];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ub(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ub(e,!0);return ib(n,((e,t)=>{rb(n,e,Bb(t))})),t&&(t.finalized_=!1),n}ib(Tb,((e,t)=>{Mb[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Mb.deleteProperty=function(e,t){return Mb.set.call(this,e,t,void 0)},Mb.set=function(e,t,n){return Tb.set.call(this,e[0],t,n,e[0])};var Ib=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const o=this;return function(e=n,...i){return o.produce(e,(e=>t.call(this,e,...i)))}}let o;if("function"!=typeof t&&Xm(6),void 0!==n&&"function"!=typeof n&&Xm(7),tb(e)){const i=wb(this),s=Ab(e,void 0);let a=!0;try{o=t(s),a=!1}finally{a?vb(i):kb(i)}return yb(i,n),Cb(o,i)}if(!e||"object"!=typeof e){if(o=t(e),void 0===o&&(o=e),o===Km&&(o=void 0),this.autoFreeze_&&pb(o,!0),n){const t=[],i=[];fb("Patches").generateReplacementPatches_(e,o,t,i),n(t,i)}return o}Xm(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,o;return[this.produce(e,t,((e,t)=>{n=e,o=t})),n,o]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;tb(e)||Xm(8),eb(e)&&(eb(t=e)||Xm(10),e=Bb(t));const n=wb(this),o=Ab(e,void 0);return o[Zm].isManual_=!0,kb(n),o}finishDraft(e,t){const n=e&&e[Zm];n&&n.isManual_||Xm(9);const{scope_:o}=n;return yb(o,t),Cb(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}n>-1&&(t=t.slice(n+1));const o=fb("Patches").applyPatches_;return eb(e)?o(e,t):this.produce(e,(e=>o(e,t)))}},Ob=Ib.produce;Ib.produceWithPatches.bind(Ib),Ib.setAutoFreeze.bind(Ib),Ib.setUseStrictShallowCopy.bind(Ib),Ib.applyPatches.bind(Ib),Ib.createDraft.bind(Ib),Ib.finishDraft.bind(Ib);const Rb=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),zb=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024", |
| 338 |
height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),Db=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),Fb=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 16 16",height:"1em",width:"1em",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M2 12.5a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11a.5.5 0 01-.5-.5zm0-3a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11a.5.5 0 01-.5-.5zm0-3a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11a.5.5 0 01-.5-.5zm0-3a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11a.5.5 0 01-.5-.5z",clipRule:"evenodd"})}),Hb=[{label:"Left",value:"left",icon:Rb},{label:"Center",value:"center",icon:zb},{label:"Right",value:"right",icon:Db}],Wb=e=>{const{attributes:t,setAttributes:n,index:o}=e,{cards:i}=t,s=i[o],{background:a,img:r,imgBorder:c,catColor:d,titleColor:u,descColor:p,cardLink:h}=s,g=(e,t)=>{n({cards:be(i,t,o,e)})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:a,onChange:e=>g("background",e)}),(0,l.jsx)(v,{children:(0,x.__)("Image:","b-blocks")}),(0,l.jsx)(ke,{value:r,onChange:e=>g("img",e),placeholder:(0,x.__)("Enter Image URL","b-blocks")}),(0,l.jsx)(Xc,{label:(0,x.__)("Image Border:","b-blocks"),value:c,onChange:e=>g("imgBorder",e),defaults:{radius:"5px"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Category Color:","b-blocks"),value:d,onChange:e=>g("catColor",e),defaultColor:"#0dcaf0"}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:u,onChange:e=>g("titleColor",e),defaultColor:"#ff7500"}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:p,onChange:e=>g("descColor",e),defaultColor:"#333"}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Link:","b-blocks"),value:h,onChange:e=>g("link",e)}),(0,l.jsx)("span",{children:(0,x.__)("Insert the link if you want; otherwise, leave it blank.","b-blocks")})]})},Ub=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,isPremium:i,device:s})=>{const{cards:a=[],columns:r,columnGap:c,rowGap:p,layout:g,link:b={},textAlign:f,padding:k,imgPos:w,imgHeight:C,isCat:j,catTypo:$,catMargin:S,isTitle:T,titlePos:M,titleTypo:N,titleMargin:L,isDesc:E,descTypo:P,imgWidth:A,imgAlign:B}=e,{target:I="_self",element:O="card"}=b,[R,z]=(0,m.useState)(!1),D={background:{color:"#0000"},img:{id:null,url:"",alt:"",title:""},imgBorder:{radius:"5px"},cat:`Category ${a.length+1}`,catColor:"#0dcaf0",title:`Card Title ${a.length+1}`,titleColor:"#ff7500",desc:`This content area describes card ${a.length+1} descriptions/details.`,descColor:"#333"},F={isPremium:i,setIsProModalOpen:z};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:a=>(0,l.jsxs)(l.Fragment,{children:["general"===a.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Add or Remove Cards","b-blocks"),children:[(0,l.jsx)(_s,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,arrKey:"cards",title:"title",ItemSettings:Wb,itemLabel:"Card",newItem:D,design:i?"sortable":"single"}),!i&&(0,l.jsxs)("small",{children:[" ",(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"__blank",children:"Upgrade to Premium"})})," to unlock sorting and more features."]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(Tn,{value:g,onChange:e=>t({layout:e,columns:{...r,desktop:"vertical"===e?3:2},textAlign:"vertical"===e?"center":"left",imgHeight:"vertical"===e?"250px":"200px",imgWidth:"vertical"===e?"90%":"50%"}),options:[{label:"Vertical",value:"vertical",icon:d},{label:"Horizontal",value:"horizontal",icon:u}],isIcon:!0})]}),(0,l.jsx)("small",{children:(0,x.__)("Some options will be change when you change the layout.","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:r[s],onChange:e=>{t({columns:{...r,[s]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({columnGap:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({rowGap:e}),units:[Ee(),Pe(),Ae()]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Image Position:","b-blocks")}),(0,l.jsx)(Tn,{value:w,onChange:e=>t({imgPos:e}),options:[{label:"vertical"==g?"Top":"Left",value:"top",icon:"vertical"==g?"TOP":"LEFT"},{label:"vertical"==g?"Bottom":"Right",value:"bottom",icon:"vertical"==g?"BOTTOM":"RIGHT"}]})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Category","b-blocks"),checked:j,onChange:e=>t({isCat:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Title","b-blocks"),checked:T,onChange:e=>t({isTitle:e})}),T&&(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Title Position:","b-blocks")}),(0,l.jsx)(Tn,{value:M,onChange:e=>t({titlePos:e}),options:[{label:"Image",value:"image",icon:"IMAGE"},{label:"Content",value:"content",icon:"CONTENT"}]})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Description","b-blocks"),checked:E,onChange:e=>t({isDesc:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Link","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ys,{label:(0,x.__)("Open link in new tab?","b-blocks"),checked:"_blank"===I,onChange:e=>t({link:{...b,target:e?"_blank":"_self"}}),...F,Component:y.ToggleControl}),(0,l.jsx)(Zs,{className:"mt20",label:(0,x.__)("Link to:","b-blocks"),labelPosition:"left",value:O,onChange:e=>t({link:{...b,element:e}}),options:[{label:"Card",value:"card"},{label:"Image",value:"image"},{label:"Title",value:"title"}],proValues:["image","title"],...F})]})]}),"style"===a.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content Area","b-blocks"),children:(0,l.jsx)(od,{label:(0,x.__)("Padding:","b-blocks"),value:k,onChange:e=>t({padding:e}),defaults:{vertical:"20px",horizontal:"10px"}})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:C,onChange:e=>t({imgHeight:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:A,onChange:e=>t({imgWidth:e}),units:[Ee(),Pe(),Ae()]}),"vertical"===g&&(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Alignment","b-blocks"),value:B,onChange:e=>t({imgAlign:e |
| 339 |
}),options:Hb,isIcon:!0})]}),j&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Category","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:$,onChange:e=>t({catTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:S,onChange:e=>t({catMargin:e}),defaults:{side:4,bottom:"10px"}})]}),T&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:N,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:22,tablet:20,mobile:18}}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:L,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]}),E&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Os,{value:P,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}})})]})]})})}),(0,l.jsxs)(jn,{isProModalOpen:R,setIsProModalOpen:z,block:"Cards",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Link Target: ","b-blocks")}),(0,x.__)("Set the card link target.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Link Element: ","b-blocks")}),(0,x.__)("Choose the link element you want to link to.","b-blocks")]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Card","b-blocks"),onClick:()=>t({cards:[...a,D]}),children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:f,onChange:e=>t({textAlign:e})})]})]})})),Gb="bBlocksCards",Vb=({attributes:e,id:t})=>{const{cards:n=[],columnGap:o,rowGap:i,textAlign:s,padding:a,imgHeight:r,catTypo:c,catMargin:d,titleTypo:u,titleMargin:p,descTypo:h,imgWidth:g,imgAlign:m,layout:b}=e,f=`#${t}`,x=`${f} .${Gb} .${Gb}-card`,y=`${x} .cardDetails`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",c)?.googleFontLink}\n\t\t${pa("",u)?.googleFontLink}\n\t\t${pa("",h)?.googleFontLink}\n\t\t${pa(`${y} .${Gb}-cardCategory`,c)?.styles}\n\t\t${pa(`${x} .${Gb}-cardTitle`,u)?.styles}\n\t\t${pa(`${x} .cardDescription`,h)?.styles}\n\n\t\t${f} .${Gb}{\n\t\t\tgrid-gap: ${i} ${o};\n\t\t}\n\t\t${x} .${Gb}-cardImage{\n\t\t\t${na("width",g?`calc( ${g} - 30px)`:"")}\n\t\t\t${na("height",r)}\n\t\t\t${"vertical"===b?(v=m,"left"===v?"margin-inline-end: auto;":"center"===v?"margin-inline: auto;":"margin-inline-start: auto;"):""}\n\t\t}\n\t\t${y}{\n\t\t\ttext-align: ${s};\n\t\t\tpadding: ${ua(a)};\n\t\t}\n\t\t${y} .${Gb}-cardCategory{\n\t\t\tmargin: ${ua(d)};\n\t\t}\n\t\t${x} .${Gb}-cardTitle{\n\t\t\tmargin: ${ua(p)};\n\t\t}\n\n\t\t${n.map(((e,n)=>{const{background:o,imgBorder:i,catColor:s,titleColor:a,descColor:r}=e,l=`#${t} #${Gb}-card-${n}`;return`\n\t\t\t\t${l} .${Gb}-card{\n\t\t\t\t\t${oa(o)}\n\t\t\t\t}\n\t\t\t\t${l} .${Gb}-cardImage{\n\t\t\t\t\t${ia(i)}\n\t\t\t\t}\n\t\t\t\t${l} .cardDetails .${Gb}-cardCategory{\n\t\t\t\t\tcolor: ${s};\n\t\t\t\t}\n\t\t\t\t${l} .${Gb}-cardTitle{\n\t\t\t\t\tcolor: ${a};\n\t\t\t\t}\n\t\t\t\t${l} .${Gb}-cardDescription{\n\t\t\t\t\tcolor: ${r};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}});var v};Nl(Ym.name)&&(0,p.registerBlockType)(Ym,{icon:dr,transforms:{from:[{type:"block",blocks:["crd/cards"],transform:e=>(0,p.createBlock)("b-blocks/cards",e)},{type:"prefix",prefix:"counter",transform:()=>(0,p.createBlock)("b-blocks/cards")}],to:[{type:"block",blocks:["crd/cards"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("crd/cards",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{cards:i=[],columns:s,layout:a,imgPos:r,isCat:c,isTitle:d,titlePos:u,isDesc:p}=t,[g,b]=(0,m.useState)(0),f=bBlocksPremiumChecker,v=(e,t)=>{const o=Ob(i,(n=>{n[g][e]=t}));n({cards:o})},k=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ub,{attributes:t,setAttributes:n,activeIndex:g,setActiveIndex:b,updateCard:v,isPremium:f}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Vb,{attributes:t,id:k}),(0,l.jsx)("div",{className:`${Gb} ${a||"vertical"} columns-${s?.desktop} columns-tablet-${s?.tablet} columns-mobile-${s?.mobile}`,children:i?.map(((e,t)=>{const{img:n,cat:o,title:i,desc:s}=e,a=d&&(0,l.jsx)(h.RichText,{className:`${Gb}-cardTitle`,tagName:"h3",value:i,onChange:e=>v("title",e),placeholder:(0,x.__)("Card title","b-blocks"),inlineToolbar:!0}),m=n?.url?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("figure",{className:`${Gb}-cardImage`,children:[(0,l.jsx)("img",{className:`${Gb}-wp-image`,src:n.url,alt:n?.alt||n?.title}),"image"===u&&a]}),(0,Jc.isBlobURL)(n.url)&&(0,l.jsx)(y.Spinner,{})]}):(0,l.jsx)(td,{label:(0,x.__)(" Card Image:","b-blocks"),value:n,onChange:e=>v("img",e)});return(0,l.jsx)("div",{onClick:()=>b(t),className:t===g?"bPlNowEditing":"",id:`${Gb}-card-${t}`,children:(0,l.jsxs)("div",{className:`${Gb}-card ${"bottom"===r?"bottomImg":"topImg"}`,children:["top"===r&&m,(0,l.jsxs)("div",{className:"cardDetails",children:[c&&(0,l.jsx)(h.RichText,{className:`${Gb}-cardCategory`,tagName:"h6",value:o,onChange:e=>v("cat",e),placeholder:(0,x.__)("Card category","b-blocks"),inlineToolbar:!0}),"content"===u&&a,p&&(0,l.jsx)(h.RichText,{className:`${Gb}-cardDescription`,tagName:"p",value:s,onChange:e=>v("desc",e),placeholder:(0,x.__)("Description of the card","b-blocks"),inlineToolbar:!0})]}),"bottom"===r&&m]})},t)}))})]})]})},save:()=>null});const qb=JSON.parse('{"apiVersion":3,"name":"b-blocks/chart","title":"Chart","description":"Graphical representation for data visualization.","category":"bBlocks","keywords":["charts","line charts","pie charts"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"data":{"type":"object","default":{"labels":["January","February","March","April","May","June"],"datasets":[{"label":"T-Shirts Sell 2021","data":[3,9,10,16,14,16],"backgroundColor":["#ff638433","#36a28733","#ffce5633","#4bc0c033","#9966ff33","#ff9f4033"],"borderColor":["#ff6384","#36a287","#ffce56","#4bc0c0","#9966ff","#ff9f40"],"tension":0.4,"borderWidth":2,"hoverBorderWidth":2,"pointRadius":3,"pointHoverRadius":4,"pointStyle":"triangle"},{"label":"Shoes Sell 2021","data":[5,7,12,14,13,17],"backgroundColor":["#ff638433","#36a28733","#ffce5633","#4bc0c033","#9966ff33","#ff9f4033"],"borderColor":["#ff6384","#36a287","#ffce56","#4bc0c0","#9966ff","#ff9f40"],"tension":0.4,"borderWidth":2,"hoverBorderWidth":2,"pointRadius":3,"pointHoverRadius":4,"pointStyle":"circle"}]}},"type":{"type":"string","default":"line"},"width":{"type":"string","default":"100%"},"height":{"type":"string","default":"450px"},"background":{"type":"object","default":{"color":"#0000"}},"textColor":{"type":"string","default":"#666"},"isXScale":{"type":"boolean","default":true},"isXGridLine":{"type":"boolean","default":true},"isYScale":{"type":"boolean","default":true},"isYGridLine":{"type":"boolean","default":true},"gridLineColor":{"type":"string","default":"#0000001a"},"alignment":{"type":"string","default":"center"},"isTitle":{"type":"boolean","default":true},"title":{"type":"string","default":"Chart Title"},"titleFontSize":{"type":"number","default":22},"titleColor":{"type":"string","default":"#146EF5"},"isSubtitle":{"type":"boolean","default":false},"subtitle":{"type":"string","default":"Chart Subtitle"},"subtitleFontSize":{"type":"number","default":13},"subtitleColor":{"type":"string","default":"#FF7A00"},"isDownload":{"type":"boolean","default":false}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","chartJS"]}'),Yb="bBlocksChart",Kb=[{label:(0,x.__)("Line","b-blocks"),value:"line"},{label:(0,x.__)("Bar","b-blocks"),value:"bar"},{label:(0,x.__)("Pie","b-blocks"),value:"pie"},{label:(0,x.__)("Radar","b-blocks"),value:"radar"},{label:(0, |
| 340 |
x.__)("Doughnut","b-blocks"),value:"doughnut"},{label:(0,x.__)("Polar Area","b-blocks"),value:"polarArea"}],Qb=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Cross","b-blocks"),value:"cross"},{label:(0,x.__)("Cross Rot","b-blocks"),value:"crossRot"},{label:(0,x.__)("Dash","b-blocks"),value:"dash"},{label:(0,x.__)("Line","b-blocks"),value:"line"},{label:(0,x.__)("Rect","b-blocks"),value:"rect"},{label:(0,x.__)("Rect Rounded","b-blocks"),value:"rectRounded"},{label:(0,x.__)("Rect Rot","b-blocks"),value:"rectRot"},{label:(0,x.__)("Star","b-blocks"),value:"star"},{label:(0,x.__)("Triangle","b-blocks"),value:"triangle"}],Zb=({attributes:e,setAttributes:t})=>{const{data:n,type:a,background:r,textColor:c,isXScale:d,isXGridLine:u,isYScale:p,isYGridLine:g,gridLineColor:m,width:b,height:f,alignment:k,isTitle:w,title:_,titleFontSize:C,titleColor:j,isSubtitle:$,subtitle:S,subtitleFontSize:T,subtitleColor:M,isDownload:N}=e,L=()=>{let e="#";for(let t=0;t<6;t++)e+="0123456789abcdef"[Math.floor(16*Math.random())];return e},E=(e,o,i,s=!1,a=!1)=>{const r={...n};!1!==a&&s?r[e][o][s][a]=i:s?r[e][o][s]=i:r[e][o]=i,t({data:r})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:ln}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems",title:(0,x.__)("Add or Remove Datasets","b-blocks"),children:[n.labels.map(((e,o)=>(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)(`Label ${o+1}:`,"b-blocks")}),(0,l.jsx)(y.TextControl,{value:e,onChange:e=>E("labels",o,e)}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Remove this Dataset","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(y.Button,{className:"removeDataset",onClick:e=>{e.preventDefault(),(e=>{let o=[];for(let t=0;t<n.datasets.length;t++)o.push({label:n.datasets[t].label,data:[...n.datasets[t].data.slice(0,e),...n.datasets[t].data.slice(e+1)],backgroundColor:[...n.datasets[t].backgroundColor.slice(0,e),...n.datasets[t].backgroundColor.slice(e+1)],borderColor:[...n.datasets[t].borderColor.slice(0,e),...n.datasets[t].borderColor.slice(e+1)],tension:n.datasets[t].tension,borderWidth:n.datasets[t].borderWidth,hoverBorderWidth:n.datasets[t].hoverBorderWidth,pointRadius:n.datasets[t].pointRadius,pointHoverRadius:n.datasets[t].pointHoverRadius,pointStyle:n.datasets[t].pointStyle});t({data:{labels:[...n.labels.slice(0,e),...n.labels.slice(e+1)],datasets:[...o]}})})(o)},children:(0,l.jsx)(y.Dashicon,{icon:"no"})})})]},o))),(0,l.jsx)("div",{className:"addItem mt10 mb10",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Dataset","b-blocks"),onClick:()=>{let e=[];for(let t=0;t<n.datasets.length;t++)e.push({label:n.datasets[t].label,data:[...n.datasets[t].data,Math.ceil(20*Math.random())],backgroundColor:[...n.datasets[t].backgroundColor,i],borderColor:[...n.datasets[t].borderColor,o],tension:n.datasets[t].tension,borderWidth:n.datasets[t].borderWidth,hoverBorderWidth:n.datasets[t].hoverBorderWidth,pointRadius:n.datasets[t].pointRadius,pointHoverRadius:n.datasets[t].pointHoverRadius,pointStyle:n.datasets[t].pointStyle});t({data:{labels:[...n.labels,`Data ${n.labels.length+1}`],datasets:[...e]}})},children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Dataset","b-blocks")]})}),n.datasets.map(((e,o)=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody editItem",title:(0,x.__)(`Dataset Value ${o+1}:`,"b-blocks"),initialOpen:0===o,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Label:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:e.label,onChange:e=>E("datasets",o,e,"label")})]}),n.labels.map(((t,n)=>(0,l.jsxs)(y.PanelRow,{className:`${Yb}DatasetEdit`,children:[(0,l.jsx)(v,{className:"",children:(0,x.__)(`${t}:`,"b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"chartDataValue",value:e.data[n],onChange:e=>E("datasets",o,parseFloat(e),"data",n)}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Dataset Background Color","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(Ue,{className:"chartBGColor",label:"",value:e.backgroundColor[n],onChange:e=>E("datasets",o,e,"backgroundColor",n)})}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Dataset Border Color","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(Ue,{label:"",value:e.borderColor[n],onChange:e=>E("datasets",o,e,"borderColor",n)})})]},n))),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt20",label:(0,x.__)("Border Width:"),labelPosition:"left",value:e.borderWidth,onChange:e=>{const i={...n};i.datasets[o].borderWidth=parseFloat(e),i.datasets[o].hoverBorderWidth=parseFloat(e),t({data:i})}}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt15",label:(0,x.__)("Point Size:"),labelPosition:"left",value:e.pointRadius,onChange:e=>E("datasets",o,parseFloat(e),"pointRadius")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt15",label:(0,x.__)("Point Hover Size:"),labelPosition:"left",value:e.pointHoverRadius,onChange:e=>E("datasets",o,parseFloat(e),"pointHoverRadius")}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Point Style:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:e.pointStyle,onChange:e=>E("datasets",o,e,"pointStyle"),options:Qb})]}),(0,l.jsxs)(y.PanelRow,{className:"itemAction",children:[(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:e=>{var i;e.preventDefault(),i=o,t({data:{labels:[...n.labels],datasets:[...n.datasets.slice(0,i),...n.datasets.slice(i+1)]}})},children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:e=>{var i;e.preventDefault(),i=o,t({data:{labels:[...n.labels],datasets:[...n.datasets,{...n.datasets[i]}]}})},children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]},o))),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add Dataset Value","b-blocks"),onClick:()=>{let e=[],o=[],i=[];for(let t=0;t<n.labels.length;t++){const t=L();e.push(Math.ceil(20*Math.random())),o.push(`${t}33`),i.push(t)}t({data:{labels:[...n.labels],datasets:[...n.datasets,{label:`Dataset Value ${n.datasets.length+1}`,data:e,backgroundColor:o,borderColor:i,tension:.4,borderWidth:2,hoverBorderWidth:2,pointRadius:3,pointHoverRadius:4,pointStyle:"rectRounded"}]}})},children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add Dataset Value","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Chart Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:a,onChange:e=>t({type:e}),options:Kb})]}),(0,l.jsx)("small",{children:(0,x.__)("Use single dataset value for 'Pie', 'Doughnut', and 'Polar Area'","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:b,onChange:e=>t({width:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:f,onChange:e=>t({height:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(An,{className:"mt20",label:(0,x.__)("Background:","b-blocks"),value:r,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:c,onChange:e=>t({textColor:e}),defaultColor:"#666"}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show X Scale","b-blocks"),checked:d,onChange:e=>t({isXScale:e})}),d&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show X Grid Line","b-blocks"),checked:u,onChange:e=>t({isXGridLine:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Y Scale","b-blocks"),checked:p,onChange:e=>t({isYScale:e})}),p&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Y Grid Line","b-blocks"),checked:g,onChange:e=>t({isYGridLine:e})}),(u||g)&&(0,l.jsx)(Ue,{label:(0, |
| 341 |
x.__)("Grid Line Color:","b-blocks"),value:m,onChange:e=>t({gridLineColor:e}),defaultColor:"#0000001a"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title & Subtitle Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:w,onChange:e=>t({isTitle:e})}),w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Title:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:_,onChange:e=>t({title:e})})]}),(0,l.jsx)(v,{children:(0,x.__)("Title Font Size:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:C,onChange:e=>t({titleFontSize:e}),min:0,max:80,step:1,allowReset:!0,resetFallbackValue:22,initialPosition:22}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:j,onChange:e=>t({titleColor:e}),defaultColor:o})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Subtitle","b-blocks"),checked:$,onChange:e=>t({isSubtitle:e})}),$&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Subtitle:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:S,onChange:e=>t({subtitle:e})})]}),(0,l.jsx)(v,{children:(0,x.__)("Subtitle Font Size:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:T,onChange:e=>t({subtitleFontSize:e}),min:0,max:80,step:1,allowReset:!0,resetFallbackValue:13,initialPosition:13}),(0,l.jsx)(Ue,{label:(0,x.__)("Subtitle Color:","b-blocks"),value:M,onChange:e=>t({subtitleColor:e}),defaultColor:s})]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Download Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Download Button","b-blocks"),checked:N,onChange:e=>t({isDownload:e})})})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:k,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Chart Alignment"),alignmentControls:[{title:(0,x.__)("Chart in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Chart in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Chart in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},Xb=({attributes:e,id:t})=>{const{background:n,width:o,height:i,alignment:s}=e,a=`#${t}`,r=`${a} .${Yb}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${a}{\n\t\t\ttext-align: ${s};\n\t\t}\n\t\t${r}{\n\t\t\theight: ${i};\n\t\t}\n\t\t${r},\n\t\t${a} .downloadArea{\n\t\t\twidth: ${o};\n\t\t}\n\t\t${r} canvas{\n\t\t\t${oa(n)};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},Jb=({attributes:e,id:t,isBackend:n=!1})=>{const{data:o,type:i,textColor:s,isXScale:a,isXGridLine:r,isYScale:c,isYGridLine:d,gridLineColor:u,isTitle:p,title:h,titleFontSize:g,titleColor:b,isSubtitle:f,subtitle:x,subtitleFontSize:y,subtitleColor:v,isDownload:k}=e,w=(0,m.useRef)(null),_=(0,m.useRef)(null),C=n?[o,i,s,a,r,c,d,u,p,h,g,b,f,x,y,v,k,w.current]:[];return(0,m.useEffect)((()=>{n&&(w.current.innerHTML="",w.current.innerHTML="<canvas>Your browser does not support the canvas element.</canvas>");const o=w.current.ownerDocument,i=o.querySelector(`#${t} .${Yb} canvas`),s=i&&new Chart(i,(e=>{const{data:t,type:n,textColor:o,isXScale:i,isXGridLine:s,isYScale:a,isYGridLine:r,gridLineColor:l,isTitle:c,title:d,titleFontSize:u,titleColor:p,isSubtitle:h,subtitle:g,subtitleFontSize:m,subtitleColor:b}=e;return{type:n,data:t,options:{maintainAspectRatio:!1,plugins:{legend:{position:"top",labels:{usePointStyle:!0,color:o}},title:{display:c,text:d,color:p,font:{size:u,family:"Roboto"},padding:{bottom:10}},subtitle:{display:h,text:g,color:b,font:{size:m,family:"Roboto"},padding:{bottom:15}},tooltip:{position:"nearest",usePointStyle:!0}},scales:{x:{display:i,ticks:{color:o},grid:{display:s,color:l}},y:{display:a,beginAtZero:!0,ticks:{color:o},grid:{display:r,color:l}}}}}})(e));k&&_?.current.addEventListener("click",(()=>{const e=o.createElement("a");e.href=s.toBase64Image(),e.download="b-chart.png",e.click()}))}),C),(0,l.jsxs)(l.Fragment,{children:[k&&(0,l.jsx)("div",{className:"downloadArea",children:(0,l.jsx)("div",{className:"downloadChart",ref:_,children:"Download Chart"})}),(0,l.jsx)("div",{className:Yb,ref:w,children:(0,l.jsx)("canvas",{children:"Your browser does not support the canvas element."})})]})};Nl(qb.name)&&(0,p.registerBlockType)(qb,{icon:ur,transforms:{from:[{type:"block",blocks:["b-chart/chart"],transform:e=>(0,p.createBlock)("b-blocks/chart",e)},{type:"prefix",prefix:"chart",transform:()=>(0,p.createBlock)("b-blocks/chart")}],to:[{type:"block",blocks:["b-chart/chart"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("b-chart/chart",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e;(0,m.useEffect)((()=>me()),[i]);const s=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zb,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Xb,{attributes:t,id:s}),(0,l.jsx)(Jb,{attributes:t,id:s,isBackend:!0})]})]})},save:()=>null}) |
| 342 |
;const ef=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/content-ticker","version":"1.0.0","title":"Content Ticker","category":"bBlocks","description":"Content Ticker will let you showcase your trending news.","keywords":["content","ticker","content-ticker"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"badge":{"type":"object","default":{"text":"Trending Now","desktop":{"width":"130px","height":"","padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"bRadius":{}},"tablet":{"width":"","height":"","padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"bRadius":{}},"mobile":{"width":"","height":"","padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"bRadius":{}},"color":{"bg":{"color":"#595959"},"text":""},"typography":{"fontSize":{"desktop":"16px"},"fontWeight":400},"border":{}}},"content":{"type":"array","default":[{"text":"Ticker custom content","link":"#","toggle":false}]},"style":{"type":"object","default":{"bg":"","color":{"normal":"#222222","hover":"#2D82C9"},"typography":{"fontSize":{"desktop":"16px"},"fontWeight":400},"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}},"bRadius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"options":{"type":"object","default":{"effect":"slide","sliderSpeed":2000,"isAutoplay":true,"autoPlaySpeed":2000,"isPauseOnHover":true,"isLoop":true,"isGrabCursor":true,"isArrows":true,"direction":"right","easing":""}},"arrows":{"type":"object","default":{"left":{"url":""},"right":{"url":""},"icon":"style1","desktop":{"size":22,"alignLeft":25,"alignRight":5,"padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"size":22,"alignLeft":25,"alignRight":5,"padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"size":22,"alignLeft":25,"alignRight":5,"padding":{"top":"","right":"","bottom":"","left":""}},"normal":{"bg":"","color":"","border":{},"borderRadius":{}},"hover":{"bg":"","color":"","border":{},"borderRadius":{}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","react","react-dom"]}'),tf={style1:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5303 18.5303C14.2374 18.8232 13.7626 18.8232 13.4697 18.5303L7.46967 12.5303C7.17678 12.2374 7.17678 11.7626 7.46967 11.4697L13.4697 5.46967C13.7626 5.17678 14.2374 5.17678 14.5303 5.46967C14.8232 5.76256 14.8232 6.23744 14.5303 6.53033L9.06066 12L14.5303 17.4697C14.8232 17.7626 14.8232 18.2374 14.5303 18.5303Z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.46967 5.46967C9.76256 5.17678 10.2374 5.17678 10.5303 5.46967L16.5303 11.4697C16.8232 11.7626 16.8232 12.2374 16.5303 12.5303L10.5303 18.5303C10.2374 18.8232 9.76256 18.8232 9.46967 18.5303C9.17678 18.2374 9.17678 17.7626 9.46967 17.4697L14.9393 12L9.46967 6.53033C9.17678 6.23744 9.17678 5.76256 9.46967 5.46967Z"})})},style2:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4939 20.5644C11.1821 20.8372 10.7083 20.8056 10.4356 20.4939L3.43557 12.4939C3.18814 12.2111 3.18814 11.7889 3.43557 11.5061L10.4356 3.50613C10.7083 3.1944 11.1822 3.16281 11.4939 3.43557C11.8056 3.70834 11.8372 4.18216 11.5644 4.49388L5.65283 11.25L20 11.25C20.4142 11.25 20.75 11.5858 20.75 12C20.75 12.4142 20.4142 12.75 20 12.75L5.65283 12.75L11.5644 19.5061C11.8372 19.8179 11.8056 20.2917 11.4939 20.5644Z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5061 3.43557C12.8178 3.16281 13.2917 3.19439 13.5644 3.50612L20.5644 11.5061C20.8119 11.7889 20.8119 12.2111 20.5644 12.4939L13.5644 20.4939C13.2917 20.8056 12.8178 20.8372 12.5061 20.5644C12.1944 20.2917 12.1628 19.8178 12.4356 19.5061L18.3472 12.75H4C3.58579 12.75 3.25 12.4142 3.25 12C3.25 11.5858 3.58579 11.25 4 11.25H18.3472L12.4356 4.49388C12.1628 4.18215 12.1944 3.70833 12.5061 3.43557Z"})})},style3:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{ |
| 343 |
d:"M11 20.74C10.9012 20.7423 10.803 20.7238 10.7118 20.686C10.6205 20.6481 10.5382 20.5916 10.47 20.52L2.47 12.52C2.32955 12.3794 2.25066 12.1888 2.25066 11.99C2.25066 11.7913 2.32955 11.6007 2.47 11.46L10.47 3.46003C10.576 3.35806 10.7096 3.2895 10.8542 3.26288C10.9989 3.23626 11.1481 3.25274 11.2835 3.31029C11.4188 3.36783 11.5342 3.4639 11.6154 3.58653C11.6966 3.70917 11.7399 3.85296 11.74 4.00003V7.30003H21C21.1981 7.30262 21.3874 7.38247 21.5275 7.52256C21.6676 7.66265 21.7474 7.85192 21.75 8.05003V16.05C21.7474 16.2481 21.6676 16.4374 21.5275 16.5775C21.3874 16.7176 21.1981 16.7974 21 16.8H11.74V19.99C11.7402 20.139 11.6954 20.2845 11.6116 20.4076C11.5277 20.5307 11.4087 20.6257 11.27 20.68C11.1848 20.7175 11.0931 20.7379 11 20.74ZM4.07 12L10.25 18.18V16.05C10.25 15.8511 10.329 15.6603 10.4697 15.5197C10.6103 15.379 10.8011 15.3 11 15.3H20.25V8.80003H11C10.8019 8.79744 10.6126 8.71759 10.4725 8.57749C10.3324 8.4374 10.2526 8.24813 10.25 8.05003V5.82003L4.07 12Z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M13 20.74C12.9039 20.7541 12.8062 20.7541 12.71 20.74C12.5724 20.6823 12.4551 20.5849 12.3732 20.4602C12.2912 20.3355 12.2484 20.1892 12.25 20.04V16.7H3.00001C2.81189 16.6956 2.63208 16.6216 2.49538 16.4923C2.35868 16.363 2.27481 16.1876 2.26001 16V8.00002C2.25463 7.89856 2.26965 7.79706 2.30417 7.7015C2.3387 7.60595 2.39204 7.51829 2.46103 7.44371C2.53002 7.36913 2.61326 7.30913 2.70584 7.26727C2.79841 7.22542 2.89844 7.20255 3.00001 7.20002H12.25V4.01002C12.2498 3.86106 12.2946 3.71551 12.3784 3.59241C12.4623 3.4693 12.5813 3.37436 12.72 3.32002C12.8551 3.26039 13.0053 3.24376 13.1502 3.27238C13.2951 3.301 13.4277 3.37349 13.53 3.48002L21.53 11.48C21.6705 11.6206 21.7493 11.8113 21.7493 12.01C21.7493 12.2088 21.6705 12.3994 21.53 12.54L13.53 20.54C13.4601 20.6079 13.377 20.6608 13.2858 20.6952C13.1946 20.7296 13.0973 20.7448 13 20.74ZM3.76001 15.2H13C13.1981 15.2026 13.3874 15.2825 13.5275 15.4226C13.6676 15.5626 13.7474 15.7519 13.75 15.95V18.18L19.93 12L13.75 5.83002V8.00002C13.7477 8.19843 13.6689 8.3883 13.53 8.53002C13.3817 8.65257 13.1919 8.71343 13 8.70002H3.76001V15.2Z"})})},style4:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:"",d:"M1.02698 11.9929L5.26242 16.2426L6.67902 14.8308L4.85766 13.0033L22.9731 13.0012L22.9728 11.0012L4.85309 11.0033L6.6886 9.17398L5.27677 7.75739L1.02698 11.9929Z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:"",d:"M23.0677 11.9929L18.818 7.75739L17.4061 9.17398L19.2415 11.0032L0.932469 11.0012L0.932251 13.0012L19.2369 13.0032L17.4155 14.8308L18.8321 16.2426L23.0677 11.9929Z"})})},style5:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:"",d:"m4.431 12.822 13 9A1 1 0 0 0 19 21V3a1 1 0 0 0-1.569-.823l-13 9a1.003 1.003 0 0 0 0 1.645z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{transform:"",d:"M5.536 21.886a1.004 1.004 0 0 0 1.033-.064l13-9a1 1 0 0 0 0-1.644l-13-9A1 1 0 0 0 5 3v18a1 1 0 0 0 .536.886z"})})},style6:{left:(0,l.jsxs)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",children:[(0,l.jsx)("path",{d:"M16.5 8L13 11.5L16.5 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M10.5 8L7 11.5L10.5 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),right:(0,l.jsxs)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",children:[(0,l.jsx)("path",{d:"M7 8L10.5 11.5L7 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M13 8L16.5 11.5L13 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},nf=tf;function of(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function sf(e,t){void 0===e&&(e={}),void 0===t&&(t={});const n=["__proto__","constructor","prototype"];Object.keys(t).filter((e=>n.indexOf(e)<0)).forEach((n=>{void 0===e[n]?e[n]=t[n]:of(t[n])&&of(e[n])&&Object.keys(t[n]).length>0&&sf(e[n],t[n])}))}const af={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function rf(){const e="undefined"!=typeof document?document:{};return sf(e,af),e}const lf={document:af,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function cf(){const e="undefined"!=typeof window?window:{};return sf(e,lf),e}function df(e){return void 0===e&&(e=""),e.trim().split(" ").filter((e=>!!e.trim()))}function uf(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function pf(){return Date.now()}function hf(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function gf(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let o=1;o<arguments.length;o+=1){const i=o<0||arguments.length<=o?void 0:arguments[o];if(null!=i&&(n=i,!("undefined"!=typeof window&&void 0!==window.HTMLElement?n instanceof HTMLElement:n&&(1===n.nodeType||11===n.nodeType)))){const n=Object.keys(Object(i)).filter((e=>t.indexOf(e)<0));for(let t=0,o=n.length;t<o;t+=1){const o=n[t],s=Object.getOwnPropertyDescriptor(i,o);void 0!==s&&s.enumerable&&(hf(e[o])&&hf(i[o])?i[o].__swiper__?e[o]=i[o]:gf(e[o],i[o]):!hf(e[o])&&hf(i[o])?(e[o]={},i[o].__swiper__?e[o]=i[o]:gf(e[o],i[o])):e[o]=i[o])}}}var n;return e}function mf(e,t,n){e.style.setProperty(t,n)}function bf(e){let{swiper:t,targetPosition:n,side:o}=e;const i=cf(),s=-t.translate;let a,r=null;const l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(t.cssModeFrameID);const c=n>s?"next":"prev",d=(e,t)=>"next"===c&&e>=t||"prev"===c&&e<=t,u=()=>{a=(new Date).getTime(),null===r&&(r=a);const e=Math.max(Math.min((a-r)/l,1),0),c=.5-Math.cos(e*Math.PI)/2;let p=s+c*(n-s);if(d(p,n)&&(p=n),t.wrapperEl.scrollTo({[o]:p}),d(p,n))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[o]:p})})),void i.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=i.requestAnimationFrame(u)};u()}function ff(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function xf(e,t){void 0===t&&(t="") |
| 344 |
;const n=cf(),o=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&o.push(...e.assignedElements()),t?o.filter((e=>e.matches(t))):o}function yf(e){try{return void console.warn(e)}catch(e){}}function vf(e,t){void 0===t&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:df(t)),n}function kf(e,t){return cf().getComputedStyle(e,null).getPropertyValue(t)}function wf(e){let t,n=e;if(n){for(t=0;null!==(n=n.previousSibling);)1===n.nodeType&&(t+=1);return t}}function _f(e,t){const n=[];let o=e.parentElement;for(;o;)t?o.matches(t)&&n.push(o):n.push(o),o=o.parentElement;return n}function Cf(e,t,n){const o=cf();return n?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(o.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(o.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}function jf(e){return(Array.isArray(e)?e:[e]).filter((e=>!!e))}function $f(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90==0?t+.001:t}function Sf(e,t){void 0===t&&(t=""),"undefined"!=typeof trustedTypes?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:e=>e}).createHTML(t):e.innerHTML=t}function Tf(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;const s=cf();let a;n({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),t.mousewheel={enabled:!1};let r,l=pf();const c=[];function d(){t.enabled&&(t.mouseEntered=!0)}function u(){t.enabled&&(t.mouseEntered=!1)}function p(e){return!(t.params.mousewheel.thresholdDelta&&e.delta<t.params.mousewheel.thresholdDelta||t.params.mousewheel.thresholdTime&&pf()-l<t.params.mousewheel.thresholdTime||!(e.delta>=6&&pf()-l<60)&&(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),i("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),i("scroll",e.raw)),l=(new s.Date).getTime(),1))}function h(e){let n=e,o=!0;if(!t.enabled)return;if(e.target.closest(`.${t.params.mousewheel.noMousewheelClass}`))return;const s=t.params.mousewheel;t.params.cssMode&&n.preventDefault();let l=t.el;"container"!==t.params.mousewheel.eventsTarget&&(l=document.querySelector(t.params.mousewheel.eventsTarget));const d=l&&l.contains(n.target);if(!t.mouseEntered&&!d&&!s.releaseOnEdges)return!0;n.originalEvent&&(n=n.originalEvent);let u=0;const h=t.rtlTranslate?-1:1,g=function(e){let t=0,n=0,o=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=10*t,i=10*n,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(o=e.deltaX),e.shiftKey&&!o&&(o=i,i=0),(o||i)&&e.deltaMode&&(1===e.deltaMode?(o*=40,i*=40):(o*=800,i*=800)),o&&!t&&(t=o<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:i}}(n);if(s.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(g.pixelX)>Math.abs(g.pixelY)))return!0;u=-g.pixelX*h}else{if(!(Math.abs(g.pixelY)>Math.abs(g.pixelX)))return!0;u=-g.pixelY}else u=Math.abs(g.pixelX)>Math.abs(g.pixelY)?-g.pixelX*h:-g.pixelY;if(0===u)return!0;s.invert&&(u=-u);let m=t.getTranslate()+u*s.sensitivity;if(m>=t.minTranslate()&&(m=t.minTranslate()),m<=t.maxTranslate()&&(m=t.maxTranslate()),o=!!t.params.loop||!(m===t.minTranslate()||m===t.maxTranslate()),o&&t.params.nested&&n.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:pf(),delta:Math.abs(u),direction:Math.sign(u)},o=r&&e.time<r.time+500&&e.delta<=r.delta&&e.direction===r.direction;if(!o){r=void 0;let l=t.getTranslate()+u*s.sensitivity;const d=t.isBeginning,p=t.isEnd;if(l>=t.minTranslate()&&(l=t.minTranslate()),l<=t.maxTranslate()&&(l=t.maxTranslate()),t.setTransition(0),t.setTranslate(l),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!d&&t.isBeginning||!p&&t.isEnd)&&t.updateSlidesClasses(),t.params.loop&&t.loopFix({direction:e.direction<0?"next":"prev",byMousewheel:!0}),t.params.freeMode.sticky){clearTimeout(a),a=void 0,c.length>=15&&c.shift();const n=c.length?c[c.length-1]:void 0,o=c[0];if(c.push(e),n&&(e.delta>n.delta||e.direction!==n.direction))c.splice(0);else if(c.length>=15&&e.time-o.time<500&&o.delta-e.delta>=1&&e.delta<=6){const n=u>0?.8:.2;r=e,c.splice(0),a=uf((()=>{!t.destroyed&&t.params&&t.slideToClosest(t.params.speed,!0,void 0,n)}),0)}a||(a=uf((()=>{!t.destroyed&&t.params&&(r=e,c.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5))}),500))}if(o||i("scroll",n),t.params.autoplay&&t.params.autoplay.disableOnInteraction&&t.autoplay.stop(),s.releaseOnEdges&&(l===t.minTranslate()||l===t.maxTranslate()))return!0}}else{const n={time:pf(),delta:Math.abs(u),direction:Math.sign(u),raw:e};c.length>=2&&c.shift();const o=c.length?c[c.length-1]:void 0;if(c.push(n),o?(n.direction!==o.direction||n.delta>o.delta||n.time>o.time+150)&&p(n):p(n),function(e){const n=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&n.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&n.releaseOnEdges)return!0;return!1}(n))return!0}return n.preventDefault?n.preventDefault():n.returnValue=!1,!1}function g(e){let n=t.el;"container"!==t.params.mousewheel.eventsTarget&&(n=document.querySelector(t.params.mousewheel.eventsTarget)),n[e]("mouseenter",d),n[e]("mouseleave",u),n[e]("wheel",h)}function m(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",h),!0):!t.mousewheel.enabled&&(g("addEventListener"),t.mousewheel.enabled=!0,!0)}function b(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,h),!0):!!t.mousewheel.enabled&&(g("removeEventListener"),t.mousewheel.enabled=!1,!0)}o("init",(()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&b(),t.params.mousewheel.enabled&&m()})),o("destroy",(()=>{t.params.cssMode&&m(),t.mousewheel.enabled&&b()})),Object.assign(t.mousewheel,{enable:m,disable:b})}function Mf(e,t,n,o){return e.params.createElements&&Object.keys(o).forEach((i=>{if(!n[i]&&!0===n.auto){let s=xf(e.el,`.${o[i]}`)[0];s||(s=vf("div",o[i]),s.className=o[i],e.el.append(s)),n[i]=s,t[i]=s}})),n}function Nf(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;function s(e){let n;return e&&"string"==typeof e&&t.isElement&&(n=t.el.querySelector(e)||t.hostEl.querySelector(e),n)?n:(e&&("string"==typeof e&&(n=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&n&&n.length>1&&1===t.el.querySelectorAll(e).length?n=t.el.querySelector(e):n&&1===n.length&&(n=n[0])),e&&!n?e:n)}function a(e,n){const o=t.params.navigation;(e=jf(e)).forEach((e=>{e&&(e.classList[n?"add":"remove"](...o.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=n),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](o.lockClass))}))}function r(){const{nextEl:e,prevEl:n}=t.navigation;if(t.params.loop)return a(n,!1),void a(e,!1);a(n,t.isBeginning&&!t.params.rewind),a(e,t.isEnd&&!t.params.rewind)}function l(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),i("navigationPrev"))}function c(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),i("navigationNext"))}function d(){const e=t.params.navigation;if(t.params.navigation=Mf(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let n=s(e.nextEl),o=s(e.prevEl);Object.assign(t.navigation,{nextEl:n,prevEl:o}),n=jf(n),o=jf(o);const i=(n,o)=>{n&&n.addEventListener("click","next"===o?c:l),!t.enabled&&n&&n.classList.add(...e.lockClass.split(" "))};n.forEach((e=>i(e,"next"))),o.forEach((e=>i(e,"prev")))}function u(){let{nextEl:e,prevEl:n}=t.navigation;e=jf(e),n=jf(n);const o=(e,n)=>{e.removeEventListener("click","next"===n?c:l),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach((e=>o(e,"next"))),n.forEach((e=>o(e,"prev")))}n({navigation:{nextEl:null, |
| 345 |
prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null},o("init",(()=>{!1===t.params.navigation.enabled?p():(d(),r())})),o("toEdge fromEdge lock unlock",(()=>{r()})),o("destroy",(()=>{u()})),o("enable disable",(()=>{let{nextEl:e,prevEl:n}=t.navigation;e=jf(e),n=jf(n),t.enabled?r():[...e,...n].filter((e=>!!e)).forEach((e=>e.classList.add(t.params.navigation.lockClass)))})),o("click",((e,n)=>{let{nextEl:o,prevEl:s}=t.navigation;o=jf(o),s=jf(s);const a=n.target;let r=s.includes(a)||o.includes(a);if(t.isElement&&!r){const e=n.path||n.composedPath&&n.composedPath();e&&(r=e.find((e=>o.includes(e)||s.includes(e))))}if(t.params.navigation.hideOnClick&&!r){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===a||t.pagination.el.contains(a)))return;let e;o.length?e=o[0].classList.contains(t.params.navigation.hiddenClass):s.length&&(e=s[0].classList.contains(t.params.navigation.hiddenClass)),i(!0===e?"navigationShow":"navigationHide"),[...o,...s].filter((e=>!!e)).forEach((e=>e.classList.toggle(t.params.navigation.hiddenClass)))}}));const p=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),u()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),d(),r()},disable:p,update:r,init:d,destroy:u})}function Lf(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/()[\]])/g,"\\$1").replace(/ /g,".")}`}function Ef(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;const s="swiper-pagination";let a;n({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${s}-bullet`,bulletActiveClass:`${s}-bullet-active`,modifierClass:`${s}-`,currentClass:`${s}-current`,totalClass:`${s}-total`,hiddenClass:`${s}-hidden`,progressbarFillClass:`${s}-progressbar-fill`,progressbarOppositeClass:`${s}-progressbar-opposite`,clickableClass:`${s}-clickable`,lockClass:`${s}-lock`,horizontalClass:`${s}-horizontal`,verticalClass:`${s}-vertical`,paginationDisabledClass:`${s}-disabled`}}),t.pagination={el:null,bullets:[]};let r=0;function l(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function c(e,n){const{bulletActiveClass:o}=t.params.pagination;e&&(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${o}-${n}`),(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&e.classList.add(`${o}-${n}-${n}`))}function d(e){const n=e.target.closest(Lf(t.params.pagination.bulletClass));if(!n)return;e.preventDefault();const o=wf(n)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===o)return;const e=(i=t.realIndex,s=o,(s%=a=t.slides.length)==1+(i%=a)?"next":s===i-1?"previous":void 0);"next"===e?t.slideNext():"previous"===e?t.slidePrev():t.slideToLoop(o)}else t.slideTo(o);var i,s,a}function u(){const e=t.rtl,n=t.params.pagination;if(l())return;let o,s,d=t.pagination.el;d=jf(d);const u=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,p=t.params.loop?Math.ceil(u/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(s=t.previousRealIndex||0,o=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(o=t.snapIndex,s=t.previousSnapIndex):(s=t.previousIndex||0,o=t.activeIndex||0),"bullets"===n.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const i=t.pagination.bullets;let l,u,p;if(n.dynamicBullets&&(a=Cf(i[0],t.isHorizontal()?"width":"height",!0),d.forEach((e=>{e.style[t.isHorizontal()?"width":"height"]=a*(n.dynamicMainBullets+4)+"px"})),n.dynamicMainBullets>1&&void 0!==s&&(r+=o-(s||0),r>n.dynamicMainBullets-1?r=n.dynamicMainBullets-1:r<0&&(r=0)),l=Math.max(o-r,0),u=l+(Math.min(i.length,n.dynamicMainBullets)-1),p=(u+l)/2),i.forEach((e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${n.bulletActiveClass}${e}`))].map((e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),d.length>1)i.forEach((e=>{const i=wf(e);i===o?e.classList.add(...n.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),n.dynamicBullets&&(i>=l&&i<=u&&e.classList.add(...`${n.bulletActiveClass}-main`.split(" ")),i===l&&c(e,"prev"),i===u&&c(e,"next"))}));else{const e=i[o];if(e&&e.classList.add(...n.bulletActiveClass.split(" ")),t.isElement&&i.forEach(((e,t)=>{e.setAttribute("part",t===o?"bullet-active":"bullet")})),n.dynamicBullets){const e=i[l],t=i[u];for(let e=l;e<=u;e+=1)i[e]&&i[e].classList.add(...`${n.bulletActiveClass}-main`.split(" "));c(e,"prev"),c(t,"next")}}if(n.dynamicBullets){const o=Math.min(i.length,n.dynamicMainBullets+4),s=(a*o-a)/2-p*a,r=e?"right":"left";i.forEach((e=>{e.style[t.isHorizontal()?r:"top"]=`${s}px`}))}}d.forEach(((e,s)=>{if("fraction"===n.type&&(e.querySelectorAll(Lf(n.currentClass)).forEach((e=>{e.textContent=n.formatFractionCurrent(o+1)})),e.querySelectorAll(Lf(n.totalClass)).forEach((e=>{e.textContent=n.formatFractionTotal(p)}))),"progressbar"===n.type){let i;i=n.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const s=(o+1)/p;let a=1,r=1;"horizontal"===i?a=s:r=s,e.querySelectorAll(Lf(n.progressbarFillClass)).forEach((e=>{e.style.transform=`translate3d(0,0,0) scaleX(${a}) scaleY(${r})`,e.style.transitionDuration=`${t.params.speed}ms`}))}"custom"===n.type&&n.renderCustom?(Sf(e,n.renderCustom(t,o+1,p)),0===s&&i("paginationRender",e)):(0===s&&i("paginationRender",e),i("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](n.lockClass)}))}function p(){const e=t.params.pagination;if(l())return;const n=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length;let o=t.pagination.el;o=jf(o);let s="";if("bullets"===e.type){let o=t.params.loop?Math.ceil(n/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&o>n&&(o=n);for(let n=0;n<o;n+=1)e.renderBullet?s+=e.renderBullet.call(t,n,e.bulletClass):s+=`<${e.bulletElement} ${t.isElement?'part="bullet"':""} class="${e.bulletClass}"></${e.bulletElement}>`}"fraction"===e.type&&(s=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`),"progressbar"===e.type&&(s=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`),t.pagination.bullets=[],o.forEach((n=>{"custom"!==e.type&&Sf(n,s||""),"bullets"===e.type&&t.pagination.bullets.push(...n.querySelectorAll(Lf(e.bulletClass)))})),"custom"!==e.type&&i("paginationRender",o[0])}function h(){t.params.pagination=Mf(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let n;"string"==typeof e.el&&t.isElement&&(n=t.el.querySelector(e.el)),n||"string"!=typeof e.el||(n=[...document.querySelectorAll(e.el)]),n||(n=e.el),n&&0!==n.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(n)&&n.length>1&&(n=[...t.el.querySelectorAll(e.el)],n.length>1&&(n=n.find((e=>_f(e,".swiper")[0]===t.el)))),Array.isArray(n)&&1===n.length&&(n=n[0]),Object.assign(t.pagination,{el:n}),n=jf(n),n.forEach((n=>{"bullets"===e.type&&e.clickable&&n.classList.add(...(e.clickableClass||"").split(" ")),n.classList.add(e.modifierClass+e.type),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(n.classList.add(`${e.modifierClass}${e.type}-dynamic`),r=0, |
| 346 |
e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&n.classList.add(e.progressbarOppositeClass),e.clickable&&n.addEventListener("click",d),t.enabled||n.classList.add(e.lockClass)})))}function g(){const e=t.params.pagination;if(l())return;let n=t.pagination.el;n&&(n=jf(n),n.forEach((n=>{n.classList.remove(e.hiddenClass),n.classList.remove(e.modifierClass+e.type),n.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(n.classList.remove(...(e.clickableClass||"").split(" ")),n.removeEventListener("click",d))}))),t.pagination.bullets&&t.pagination.bullets.forEach((t=>t.classList.remove(...e.bulletActiveClass.split(" "))))}o("changeDirection",(()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:n}=t.pagination;n=jf(n),n.forEach((n=>{n.classList.remove(e.horizontalClass,e.verticalClass),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),o("init",(()=>{!1===t.params.pagination.enabled?m():(h(),p(),u())})),o("activeIndexChange",(()=>{void 0===t.snapIndex&&u()})),o("snapIndexChange",(()=>{u()})),o("snapGridLengthChange",(()=>{p(),u()})),o("destroy",(()=>{g()})),o("enable disable",(()=>{let{el:e}=t.pagination;e&&(e=jf(e),e.forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))))})),o("lock unlock",(()=>{u()})),o("click",((e,n)=>{const o=n.target,s=jf(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&s&&s.length>0&&!o.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&o===t.navigation.nextEl||t.navigation.prevEl&&o===t.navigation.prevEl))return;const e=s[0].classList.contains(t.params.pagination.hiddenClass);i(!0===e?"paginationShow":"paginationHide"),s.forEach((e=>e.classList.toggle(t.params.pagination.hiddenClass)))}}));const m=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=jf(e),e.forEach((e=>e.classList.add(t.params.pagination.paginationDisabledClass)))),g()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=jf(e),e.forEach((e=>e.classList.remove(t.params.pagination.paginationDisabledClass)))),h(),p(),u()},disable:m,render:p,update:u,init:h,destroy:g})}function Pf(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;const s=rf();let a,r,l,c,d=!1,u=null,p=null;function h(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e,rtlTranslate:n}=t,{dragEl:o,el:i}=e,s=t.params.scrollbar,a=t.params.loop?t.progressLoop:t.progress;let c=r,d=(l-r)*a;n?(d=-d,d>0?(c=r-d,d=0):-d+r>l&&(c=l+d)):d<0?(c=r+d,d=0):d+r>l&&(c=l-d),t.isHorizontal()?(o.style.transform=`translate3d(${d}px, 0, 0)`,o.style.width=`${c}px`):(o.style.transform=`translate3d(0px, ${d}px, 0)`,o.style.height=`${c}px`),s.hide&&(clearTimeout(u),i.style.opacity=1,u=setTimeout((()=>{i.style.opacity=0,i.style.transitionDuration="400ms"}),1e3))}function g(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e}=t,{dragEl:n,el:o}=e;n.style.width="",n.style.height="",l=t.isHorizontal()?o.offsetWidth:o.offsetHeight,c=t.size/(t.virtualSize+t.params.slidesOffsetBefore-(t.params.centeredSlides?t.snapGrid[0]:0)),r="auto"===t.params.scrollbar.dragSize?l*c:parseInt(t.params.scrollbar.dragSize,10),t.isHorizontal()?n.style.width=`${r}px`:n.style.height=`${r}px`,o.style.display=c>=1?"none":"",t.params.scrollbar.hide&&(o.style.opacity=0),t.params.watchOverflow&&t.enabled&&e.el.classList[t.isLocked?"add":"remove"](t.params.scrollbar.lockClass)}function m(e){return t.isHorizontal()?e.clientX:e.clientY}function b(e){const{scrollbar:n,rtlTranslate:o}=t,{el:i}=n;let s;s=(m(e)-function(e){const t=cf(),n=rf(),o=e.getBoundingClientRect(),i=n.body,s=e.clientTop||i.clientTop||0,a=e.clientLeft||i.clientLeft||0,r=e===t?t.scrollY:e.scrollTop,l=e===t?t.scrollX:e.scrollLeft;return{top:o.top+r-s,left:o.left+l-a}}(i)[t.isHorizontal()?"left":"top"]-(null!==a?a:r/2))/(l-r),s=Math.max(Math.min(s,1),0),o&&(s=1-s);const c=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*s;t.updateProgress(c),t.setTranslate(c),t.updateActiveIndex(),t.updateSlidesClasses()}function f(e){const n=t.params.scrollbar,{scrollbar:o,wrapperEl:s}=t,{el:r,dragEl:l}=o;d=!0,a=e.target===l?m(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),s.style.transitionDuration="100ms",l.style.transitionDuration="100ms",b(e),clearTimeout(p),r.style.transitionDuration="0ms",n.hide&&(r.style.opacity=1),t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="none"),i("scrollbarDragStart",e)}function x(e){const{scrollbar:n,wrapperEl:o}=t,{el:s,dragEl:a}=n;d&&(e.preventDefault&&e.cancelable?e.preventDefault():e.returnValue=!1,b(e),o.style.transitionDuration="0ms",s.style.transitionDuration="0ms",a.style.transitionDuration="0ms",i("scrollbarDragMove",e))}function y(e){const n=t.params.scrollbar,{scrollbar:o,wrapperEl:s}=t,{el:a}=o;d&&(d=!1,t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="",s.style.transitionDuration=""),n.hide&&(clearTimeout(p),p=uf((()=>{a.style.opacity=0,a.style.transitionDuration="400ms"}),1e3)),i("scrollbarDragEnd",e),n.snapOnRelease&&t.slideToClosest())}function v(e){const{scrollbar:n,params:o}=t,i=n.el;if(!i)return;const a=i,r=!!o.passiveListeners&&{passive:!1,capture:!1},l=!!o.passiveListeners&&{passive:!0,capture:!1};if(!a)return;const c="on"===e?"addEventListener":"removeEventListener";a[c]("pointerdown",f,r),s[c]("pointermove",x,r),s[c]("pointerup",y,l)}function k(){const{scrollbar:e,el:n}=t;t.params.scrollbar=Mf(t,t.originalParams.scrollbar,t.params.scrollbar,{el:"swiper-scrollbar"});const o=t.params.scrollbar;if(!o.el)return;let i,a;if("string"==typeof o.el&&t.isElement&&(i=t.el.querySelector(o.el)),i||"string"!=typeof o.el)i||(i=o.el);else if(i=s.querySelectorAll(o.el),!i.length)return;t.params.uniqueNavElements&&"string"==typeof o.el&&i.length>1&&1===n.querySelectorAll(o.el).length&&(i=n.querySelector(o.el)),i.length>0&&(i=i[0]),i.classList.add(t.isHorizontal()?o.horizontalClass:o.verticalClass),i&&(a=i.querySelector(Lf(t.params.scrollbar.dragClass)),a||(a=vf("div",t.params.scrollbar.dragClass),i.append(a))),Object.assign(e,{el:i,dragEl:a}),o.draggable&&t.params.scrollbar.el&&t.scrollbar.el&&v("on"),i&&i.classList[t.enabled?"remove":"add"](...df(t.params.scrollbar.lockClass))}function w(){const e=t.params.scrollbar,n=t.scrollbar.el;n&&n.classList.remove(...df(t.isHorizontal()?e.horizontalClass:e.verticalClass)),t.params.scrollbar.el&&t.scrollbar.el&&v("off")}n({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),t.scrollbar={el:null,dragEl:null},o("changeDirection",(()=>{if(!t.scrollbar||!t.scrollbar.el)return;const e=t.params.scrollbar;let{el:n}=t.scrollbar;n=jf(n),n.forEach((n=>{n.classList.remove(e.horizontalClass,e.verticalClass),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),o("init",(()=>{!1===t.params.scrollbar.enabled?_():(k(),g(),h())})),o("update resize observerUpdate lock unlock changeDirection",(()=>{g()})),o("setTranslate",(()=>{h()})),o("setTransition",((e,n)=>{!function(e){t.params.scrollbar.el&&t.scrollbar.el&&(t.scrollbar.dragEl.style.transitionDuration=`${e}ms`)}(n)})),o("enable disable",(()=>{const{el:e}=t.scrollbar;e&&e.classList[t.enabled?"remove":"add"](...df(t.params.scrollbar.lockClass))})),o("destroy",(()=>{w()}));const _=()=>{t.el.classList.add(...df(t.params.scrollbar.scrollbarDisabledClass)),t.scrollbar.el&&t.scrollbar.el.classList.add(...df(t.params.scrollbar.scrollbarDisabledClass)),w()};Object.assign(t.scrollbar,{enable:()=>{t.el.classList.remove(...df(t.params.scrollbar.scrollbarDisabledClass)), |
| 347 |
t.scrollbar.el&&t.scrollbar.el.classList.remove(...df(t.params.scrollbar.scrollbarDisabledClass)),k(),g(),h()},disable:_,updateSize:g,setTranslate:h,init:k,destroy:w})}function Af(e){let{swiper:t,extendParams:n,on:o}=e;n({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,containerRole:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null,scrollOnFocus:!0}}),t.a11y={clicked:!1};let i,s,a=null,r=(new Date).getTime();function l(e){const t=a;0!==t.length&&Sf(t,e)}function c(e){(e=jf(e)).forEach((e=>{e.setAttribute("tabIndex","0")}))}function d(e){(e=jf(e)).forEach((e=>{e.setAttribute("tabIndex","-1")}))}function u(e,t){(e=jf(e)).forEach((e=>{e.setAttribute("role",t)}))}function p(e,t){(e=jf(e)).forEach((e=>{e.setAttribute("aria-roledescription",t)}))}function h(e,t){(e=jf(e)).forEach((e=>{e.setAttribute("aria-label",t)}))}function g(e){(e=jf(e)).forEach((e=>{e.setAttribute("aria-disabled",!0)}))}function m(e){(e=jf(e)).forEach((e=>{e.setAttribute("aria-disabled",!1)}))}function b(e){if(13!==e.keyCode&&32!==e.keyCode)return;const n=t.params.a11y,o=e.target;if(!t.pagination||!t.pagination.el||o!==t.pagination.el&&!t.pagination.el.contains(e.target)||e.target.matches(Lf(t.params.pagination.bulletClass))){if(t.navigation&&t.navigation.prevEl&&t.navigation.nextEl){const e=jf(t.navigation.prevEl);jf(t.navigation.nextEl).includes(o)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?l(n.lastSlideMessage):l(n.nextSlideMessage)),e.includes(o)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?l(n.firstSlideMessage):l(n.prevSlideMessage))}t.pagination&&o.matches(Lf(t.params.pagination.bulletClass))&&o.click()}}function f(){return t.pagination&&t.pagination.bullets&&t.pagination.bullets.length}function x(){return f()&&t.params.pagination.clickable}const y=(e,t,n)=>{c(e),"BUTTON"!==e.tagName&&(u(e,"button"),e.addEventListener("keydown",b)),h(e,n),function(e,t){(e=jf(e)).forEach((e=>{e.setAttribute("aria-controls",t)}))}(e,t)},v=e=>{s&&s!==e.target&&!s.contains(e.target)&&(i=!0),t.a11y.clicked=!0},k=()=>{i=!1,requestAnimationFrame((()=>{requestAnimationFrame((()=>{t.destroyed||(t.a11y.clicked=!1)}))}))},w=e=>{r=(new Date).getTime()},_=e=>{if(t.a11y.clicked||!t.params.a11y.scrollOnFocus)return;if((new Date).getTime()-r<100)return;const n=e.target.closest(`.${t.params.slideClass}, swiper-slide`);if(!n||!t.slides.includes(n))return;s=n;const o=t.slides.indexOf(n)===t.activeIndex,a=t.params.watchSlidesProgress&&t.visibleSlides&&t.visibleSlides.includes(n);o||a||e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents||(t.isHorizontal()?t.el.scrollLeft=0:t.el.scrollTop=0,requestAnimationFrame((()=>{i||(t.params.loop?t.slideToLoop(t.getSlideIndexWhenGrid(parseInt(n.getAttribute("data-swiper-slide-index"))),0):t.slideTo(t.getSlideIndexWhenGrid(t.slides.indexOf(n)),0),i=!1)})))},C=()=>{const e=t.params.a11y;e.itemRoleDescriptionMessage&&p(t.slides,e.itemRoleDescriptionMessage),e.slideRole&&u(t.slides,e.slideRole);const n=t.slides.length;e.slideLabelMessage&&t.slides.forEach(((o,i)=>{const s=t.params.loop?parseInt(o.getAttribute("data-swiper-slide-index"),10):i;h(o,e.slideLabelMessage.replace(/\{\{index\}\}/,s+1).replace(/\{\{slidesLength\}\}/,n))}))};o("beforeInit",(()=>{a=vf("span",t.params.a11y.notificationClass),a.setAttribute("aria-live","assertive"),a.setAttribute("aria-atomic","true")})),o("afterInit",(()=>{t.params.a11y.enabled&&(()=>{const e=t.params.a11y;t.el.append(a);const n=t.el;e.containerRoleDescriptionMessage&&p(n,e.containerRoleDescriptionMessage),e.containerMessage&&h(n,e.containerMessage),e.containerRole&&u(n,e.containerRole);const o=t.wrapperEl,i=e.id||o.getAttribute("id")||`swiper-wrapper-${s=16,void 0===s&&(s=16),"x".repeat(s).replace(/x/g,(()=>Math.round(16*Math.random()).toString(16)))}`;var s;const r=t.params.autoplay&&t.params.autoplay.enabled?"off":"polite";var l;l=i,jf(o).forEach((e=>{e.setAttribute("id",l)})),function(e,t){(e=jf(e)).forEach((e=>{e.setAttribute("aria-live",t)}))}(o,r),C();let{nextEl:c,prevEl:d}=t.navigation?t.navigation:{};c=jf(c),d=jf(d),c&&c.forEach((t=>y(t,i,e.nextSlideMessage))),d&&d.forEach((t=>y(t,i,e.prevSlideMessage))),x()&&jf(t.pagination.el).forEach((e=>{e.addEventListener("keydown",b)})),rf().addEventListener("visibilitychange",w),t.el.addEventListener("focus",_,!0),t.el.addEventListener("focus",_,!0),t.el.addEventListener("pointerdown",v,!0),t.el.addEventListener("pointerup",k,!0)})()})),o("slidesLengthChange snapGridLengthChange slidesGridLengthChange",(()=>{t.params.a11y.enabled&&C()})),o("fromEdge toEdge afterInit lock unlock",(()=>{t.params.a11y.enabled&&function(){if(t.params.loop||t.params.rewind||!t.navigation)return;const{nextEl:e,prevEl:n}=t.navigation;n&&(t.isBeginning?(g(n),d(n)):(m(n),c(n))),e&&(t.isEnd?(g(e),d(e)):(m(e),c(e)))}()})),o("paginationUpdate",(()=>{t.params.a11y.enabled&&function(){const e=t.params.a11y;f()&&t.pagination.bullets.forEach((n=>{t.params.pagination.clickable&&(c(n),t.params.pagination.renderBullet||(u(n,"button"),h(n,e.paginationBulletMessage.replace(/\{\{index\}\}/,wf(n)+1)))),n.matches(Lf(t.params.pagination.bulletActiveClass))?n.setAttribute("aria-current","true"):n.removeAttribute("aria-current")}))}()})),o("destroy",(()=>{t.params.a11y.enabled&&function(){a&&a.remove();let{nextEl:e,prevEl:n}=t.navigation?t.navigation:{};e=jf(e),n=jf(n),e&&e.forEach((e=>e.removeEventListener("keydown",b))),n&&n.forEach((e=>e.removeEventListener("keydown",b))),x()&&jf(t.pagination.el).forEach((e=>{e.removeEventListener("keydown",b)})),rf().removeEventListener("visibilitychange",w),t.el&&"string"!=typeof t.el&&(t.el.removeEventListener("focus",_,!0),t.el.removeEventListener("pointerdown",v,!0),t.el.removeEventListener("pointerup",k,!0))}()}))}function Bf(e){let t,n,{swiper:o,extendParams:i,on:s,emit:a,params:r}=e;o.autoplay={running:!1,paused:!1,timeLeft:0},i({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let l,c,d,u,p,h,g,m,b=r&&r.autoplay?r.autoplay.delay:3e3,f=r&&r.autoplay?r.autoplay.delay:3e3,x=(new Date).getTime();function y(e){o&&!o.destroyed&&o.wrapperEl&&e.target===o.wrapperEl&&(o.wrapperEl.removeEventListener("transitionend",y),m||e.detail&&e.detail.bySwiperTouchMove||j())}const v=()=>{if(o.destroyed||!o.autoplay.running)return;o.autoplay.paused?c=!0:c&&(f=l,c=!1);const e=o.autoplay.paused?l:x+f-(new Date).getTime();o.autoplay.timeLeft=e,a("autoplayTimeLeft",e,e/b),n=requestAnimationFrame((()=>{v()}))},k=e=>{if(o.destroyed||!o.autoplay.running)return;cancelAnimationFrame(n),v();let i=void 0===e?o.params.autoplay.delay:e;b=o.params.autoplay.delay,f=o.params.autoplay.delay;const s=(()=>{let e;if(e=o.virtual&&o.params.virtual.enabled?o.slides.find((e=>e.classList.contains("swiper-slide-active"))):o.slides[o.activeIndex],e)return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(s)&&s>0&&void 0===e&&(i=s,b=s,f=s),l=i;const r=o.params.speed,c=()=>{o&&!o.destroyed&&(o.params.autoplay.reverseDirection?!o.isBeginning||o.params.loop||o.params.rewind?(o.slidePrev(r,!0,!0),a("autoplay")):o.params.autoplay.stopOnLastSlide||(o.slideTo(o.slides.length-1,r,!0,!0),a("autoplay")):!o.isEnd||o.params.loop||o.params.rewind?(o.slideNext(r,!0,!0),a("autoplay")):o.params.autoplay.stopOnLastSlide||(o.slideTo(0,r,!0,!0),a("autoplay")),o.params.cssMode&&(x=(new Date).getTime(),requestAnimationFrame((()=>{k()}))))};return i>0?(clearTimeout(t),t=setTimeout((()=>{c()}),i)):requestAnimationFrame((()=>{c()})),i},w=()=>{x=(new Date).getTime(),o.autoplay.running=!0,k(),a("autoplayStart")},_=()=>{o.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(n),a("autoplayStop") |
| 348 |
},C=(e,n)=>{if(o.destroyed||!o.autoplay.running)return;clearTimeout(t),e||(g=!0);const i=()=>{a("autoplayPause"),o.params.autoplay.waitForTransition?o.wrapperEl.addEventListener("transitionend",y):j()};if(o.autoplay.paused=!0,n)return h&&(l=o.params.autoplay.delay),h=!1,void i();const s=l||o.params.autoplay.delay;l=s-((new Date).getTime()-x),o.isEnd&&l<0&&!o.params.loop||(l<0&&(l=0),i())},j=()=>{o.isEnd&&l<0&&!o.params.loop||o.destroyed||!o.autoplay.running||(x=(new Date).getTime(),g?(g=!1,k(l)):k(),o.autoplay.paused=!1,a("autoplayResume"))},$=()=>{if(o.destroyed||!o.autoplay.running)return;const e=rf();"hidden"===e.visibilityState&&(g=!0,C(!0)),"visible"===e.visibilityState&&j()},S=e=>{"mouse"===e.pointerType&&(g=!0,m=!0,o.animating||o.autoplay.paused||C(!0))},T=e=>{"mouse"===e.pointerType&&(m=!1,o.autoplay.paused&&j())};s("init",(()=>{o.params.autoplay.enabled&&(o.params.autoplay.pauseOnMouseEnter&&(o.el.addEventListener("pointerenter",S),o.el.addEventListener("pointerleave",T)),rf().addEventListener("visibilitychange",$),w())})),s("destroy",(()=>{o.el&&"string"!=typeof o.el&&(o.el.removeEventListener("pointerenter",S),o.el.removeEventListener("pointerleave",T)),rf().removeEventListener("visibilitychange",$),o.autoplay.running&&_()})),s("_freeModeStaticRelease",(()=>{(u||g)&&j()})),s("_freeModeNoMomentumRelease",(()=>{o.params.autoplay.disableOnInteraction?_():C(!0,!0)})),s("beforeTransitionStart",((e,t,n)=>{!o.destroyed&&o.autoplay.running&&(n||!o.params.autoplay.disableOnInteraction?C(!0,!0):_())})),s("sliderFirstMove",(()=>{!o.destroyed&&o.autoplay.running&&(o.params.autoplay.disableOnInteraction?_():(d=!0,u=!1,g=!1,p=setTimeout((()=>{g=!0,u=!0,C(!0)}),200)))})),s("touchEnd",(()=>{if(!o.destroyed&&o.autoplay.running&&d){if(clearTimeout(p),clearTimeout(t),o.params.autoplay.disableOnInteraction)return u=!1,void(d=!1);u&&o.params.cssMode&&j(),u=!1,d=!1}})),s("slideChange",(()=>{!o.destroyed&&o.autoplay.running&&(h=!0)})),Object.assign(o.autoplay,{start:w,stop:_,pause:C,resume:j})}function If(e){const{effect:t,swiper:n,on:o,setTranslate:i,setTransition:s,overwriteParams:a,perspective:r,recreateShadows:l,getEffectParams:c}=e;let d;o("beforeInit",(()=>{if(n.params.effect!==t)return;n.classNames.push(`${n.params.containerModifierClass}${t}`),r&&r()&&n.classNames.push(`${n.params.containerModifierClass}3d`);const e=a?a():{};Object.assign(n.params,e),Object.assign(n.originalParams,e)})),o("setTranslate _virtualUpdated",(()=>{n.params.effect===t&&i()})),o("setTransition",((e,o)=>{n.params.effect===t&&s(o)})),o("transitionEnd",(()=>{if(n.params.effect===t&&l){if(!c||!c().slideShadows)return;n.slides.forEach((e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((e=>e.remove()))})),l()}})),o("virtualUpdate",(()=>{n.params.effect===t&&(n.slides.length||(d=!0),requestAnimationFrame((()=>{d&&n.slides&&n.slides.length&&(i(),d=!1)})))}))}function Of(e,t){const n=ff(t);return n!==t&&(n.style.backfaceVisibility="hidden",n.style["-webkit-backface-visibility"]="hidden"),n}function Rf(e){let{swiper:t,duration:n,transformElements:o,allSlides:i}=e;const{activeIndex:s}=t;if(t.params.virtualTranslate&&0!==n){let e,n=!1;e=i?o:o.filter((e=>{const n=e.classList.contains("swiper-slide-transform")?(e=>e.parentElement?e.parentElement:t.slides.find((t=>t.shadowRoot&&t.shadowRoot===e.parentNode)))(e):e;return t.getSlideIndex(n)===s})),e.forEach((e=>{!function(e,t){t&&e.addEventListener("transitionend",(function n(o){o.target===e&&(t.call(e,o),e.removeEventListener("transitionend",n))}))}(e,(()=>{if(n)return;if(!t||t.destroyed)return;n=!0,t.animating=!1;const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(e)}))}))}}function zf(e){let{swiper:t,extendParams:n,on:o}=e;n({fadeEffect:{crossFade:!1}}),If({effect:"fade",swiper:t,on:o,setTranslate:()=>{const{slides:e}=t;t.params.fadeEffect;for(let n=0;n<e.length;n+=1){const e=t.slides[n];let o=-e.swiperSlideOffset;t.params.virtualTranslate||(o-=t.translate);let i=0;t.isHorizontal()||(i=o,o=0);const s=t.params.fadeEffect.crossFade?Math.max(1-Math.abs(e.progress),0):1+Math.min(Math.max(e.progress,-1),0),a=Of(0,e);a.style.opacity=s,a.style.transform=`translate3d(${o}px, ${i}px, 0px)`}},setTransition:e=>{const n=t.slides.map((e=>ff(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`})),Rf({swiper:t,duration:e,transformElements:n,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})}function Df(e){let{swiper:t,extendParams:n,on:o}=e;n({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const i=(e,t,n)=>{let o=n?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),i=n?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");o||(o=vf("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(n?"left":"top")).split(" ")),e.append(o)),i||(i=vf("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(n?"right":"bottom")).split(" ")),e.append(i)),o&&(o.style.opacity=Math.max(-t,0)),i&&(i.style.opacity=Math.max(t,0))};If({effect:"cube",swiper:t,on:o,setTranslate:()=>{const{el:e,wrapperEl:n,slides:o,width:s,height:a,rtlTranslate:r,size:l,browser:c}=t,d=$f(t),u=t.params.cubeEffect,p=t.isHorizontal(),h=t.virtual&&t.params.virtual.enabled;let g,m=0;u.shadow&&(p?(g=t.wrapperEl.querySelector(".swiper-cube-shadow"),g||(g=vf("div","swiper-cube-shadow"),t.wrapperEl.append(g)),g.style.height=`${s}px`):(g=e.querySelector(".swiper-cube-shadow"),g||(g=vf("div","swiper-cube-shadow"),e.append(g))));for(let e=0;e<o.length;e+=1){const t=o[e];let n=e;h&&(n=parseInt(t.getAttribute("data-swiper-slide-index"),10));let s=90*n,a=Math.floor(s/360);r&&(s=-s,a=Math.floor(-s/360));const c=Math.max(Math.min(t.progress,1),-1);let g=0,b=0,f=0;n%4==0?(g=4*-a*l,f=0):(n-1)%4==0?(g=0,f=4*-a*l):(n-2)%4==0?(g=l+4*a*l,f=l):(n-3)%4==0&&(g=-l,f=3*l+4*l*a),r&&(g=-g),p||(b=g,g=0);const x=`rotateX(${d(p?0:-s)}deg) rotateY(${d(p?s:0)}deg) translate3d(${g}px, ${b}px, ${f}px)`;c<=1&&c>-1&&(m=90*n+90*c,r&&(m=90*-n-90*c)),t.style.transform=x,u.slideShadows&&i(t,c,p)}if(n.style.transformOrigin=`50% 50% -${l/2}px`,n.style["-webkit-transform-origin"]=`50% 50% -${l/2}px`,u.shadow)if(p)g.style.transform=`translate3d(0px, ${s/2+u.shadowOffset}px, ${-s/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${u.shadowScale})`;else{const e=Math.abs(m)-90*Math.floor(Math.abs(m)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),n=u.shadowScale,o=u.shadowScale/t,i=u.shadowOffset;g.style.transform=`scale3d(${n}, 1, ${o}) translate3d(0px, ${a/2+i}px, ${-a/2/o}px) rotateX(-89.99deg)`}const b=(c.isSafari||c.isWebView)&&c.needPerspectiveFix?-l/2:0;n.style.transform=`translate3d(0px,0,${b}px) rotateX(${d(t.isHorizontal()?0:m)}deg) rotateY(${d(t.isHorizontal()?-m:0)}deg)`,n.style.setProperty("--swiper-cube-translate-z",`${b}px`)},setTransition:e=>{const{el:n,slides:o}=t;if(o.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),t.params.cubeEffect.shadow&&!t.isHorizontal()){const t=n.querySelector(".swiper-cube-shadow");t&&(t.style.transitionDuration=`${e}ms`)}},recreateShadows:()=>{const e=t.isHorizontal();t.slides.forEach((t=>{const n=Math.max(Math.min(t.progress,1),-1);i(t,n,e)}))},getEffectParams:()=>t.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})}function Ff(e,t,n){const o=`swiper-slide-shadow${n?`-${n}`:""}${e?` swiper-slide-shadow-${e}`:""}`,i=ff(t);let s=i.querySelector(`.${o.split(" ").join(".")}`);return s||(s=vf("div",o.split(" ")),i.append(s)),s} |
| 349 |
function Hf(e){let{swiper:t,extendParams:n,on:o}=e;n({flipEffect:{slideShadows:!0,limitRotation:!0}});const i=(e,n)=>{let o=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),i=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");o||(o=Ff("flip",e,t.isHorizontal()?"left":"top")),i||(i=Ff("flip",e,t.isHorizontal()?"right":"bottom")),o&&(o.style.opacity=Math.max(-n,0)),i&&(i.style.opacity=Math.max(n,0))};If({effect:"flip",swiper:t,on:o,setTranslate:()=>{const{slides:e,rtlTranslate:n}=t,o=t.params.flipEffect,s=$f(t);for(let a=0;a<e.length;a+=1){const r=e[a];let l=r.progress;t.params.flipEffect.limitRotation&&(l=Math.max(Math.min(r.progress,1),-1));const c=r.swiperSlideOffset;let d=-180*l,u=0,p=t.params.cssMode?-c-t.translate:-c,h=0;t.isHorizontal()?n&&(d=-d):(h=p,p=0,u=-d,d=0),r.style.zIndex=-Math.abs(Math.round(l))+e.length,o.slideShadows&&i(r,l);const g=`translate3d(${p}px, ${h}px, 0px) rotateX(${s(u)}deg) rotateY(${s(d)}deg)`;Of(0,r).style.transform=g}},setTransition:e=>{const n=t.slides.map((e=>ff(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),Rf({swiper:t,duration:e,transformElements:n})},recreateShadows:()=>{t.params.flipEffect,t.slides.forEach((e=>{let n=e.progress;t.params.flipEffect.limitRotation&&(n=Math.max(Math.min(e.progress,1),-1)),i(e,n)}))},getEffectParams:()=>t.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})}function Wf(e){let{swiper:t,extendParams:n,on:o}=e;n({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),If({effect:"coverflow",swiper:t,on:o,setTranslate:()=>{const{width:e,height:n,slides:o,slidesSizesGrid:i}=t,s=t.params.coverflowEffect,a=t.isHorizontal(),r=t.translate,l=a?e/2-r:n/2-r,c=a?s.rotate:-s.rotate,d=s.depth,u=$f(t);for(let e=0,t=o.length;e<t;e+=1){const t=o[e],n=i[e],r=(l-t.swiperSlideOffset-n/2)/n,p="function"==typeof s.modifier?s.modifier(r):r*s.modifier;let h=a?c*p:0,g=a?0:c*p,m=-d*Math.abs(p),b=s.stretch;"string"==typeof b&&-1!==b.indexOf("%")&&(b=parseFloat(s.stretch)/100*n);let f=a?0:b*p,x=a?b*p:0,y=1-(1-s.scale)*Math.abs(p);Math.abs(x)<.001&&(x=0),Math.abs(f)<.001&&(f=0),Math.abs(m)<.001&&(m=0),Math.abs(h)<.001&&(h=0),Math.abs(g)<.001&&(g=0),Math.abs(y)<.001&&(y=0);const v=`translate3d(${x}px,${f}px,${m}px) rotateX(${u(g)}deg) rotateY(${u(h)}deg) scale(${y})`;if(Of(0,t).style.transform=v,t.style.zIndex=1-Math.abs(Math.round(p)),s.slideShadows){let e=a?t.querySelector(".swiper-slide-shadow-left"):t.querySelector(".swiper-slide-shadow-top"),n=a?t.querySelector(".swiper-slide-shadow-right"):t.querySelector(".swiper-slide-shadow-bottom");e||(e=Ff("coverflow",t,a?"left":"top")),n||(n=Ff("coverflow",t,a?"right":"bottom")),e&&(e.style.opacity=p>0?p:0),n&&(n.style.opacity=-p>0?-p:0)}}},setTransition:e=>{t.slides.map((e=>ff(e))).forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))}))},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}function Uf(e){let{swiper:t,extendParams:n,on:o}=e;n({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const i=e=>"string"==typeof e?e:`${e}px`;If({effect:"creative",swiper:t,on:o,setTranslate:()=>{const{slides:e,wrapperEl:n,slidesSizesGrid:o}=t,s=t.params.creativeEffect,{progressMultiplier:a}=s,r=t.params.centeredSlides,l=$f(t);if(r){const e=o[0]/2-t.params.slidesOffsetBefore||0;n.style.transform=`translateX(calc(50% - ${e}px))`}for(let n=0;n<e.length;n+=1){const o=e[n],c=o.progress,d=Math.min(Math.max(o.progress,-s.limitProgress),s.limitProgress);let u=d;r||(u=Math.min(Math.max(o.originalProgress,-s.limitProgress),s.limitProgress));const p=o.swiperSlideOffset,h=[t.params.cssMode?-p-t.translate:-p,0,0],g=[0,0,0];let m=!1;t.isHorizontal()||(h[1]=h[0],h[0]=0);let b={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};d<0?(b=s.next,m=!0):d>0&&(b=s.prev,m=!0),h.forEach(((e,t)=>{h[t]=`calc(${e}px + (${i(b.translate[t])} * ${Math.abs(d*a)}))`})),g.forEach(((e,t)=>{let n=b.rotate[t]*Math.abs(d*a);g[t]=n})),o.style.zIndex=-Math.abs(Math.round(c))+e.length;const f=h.join(", "),x=`rotateX(${l(g[0])}deg) rotateY(${l(g[1])}deg) rotateZ(${l(g[2])}deg)`,y=u<0?`scale(${1+(1-b.scale)*u*a})`:`scale(${1-(1-b.scale)*u*a})`,v=u<0?1+(1-b.opacity)*u*a:1-(1-b.opacity)*u*a,k=`translate3d(${f}) ${x} ${y}`;if(m&&b.shadow||!m){let e=o.querySelector(".swiper-slide-shadow");if(!e&&b.shadow&&(e=Ff("creative",o)),e){const t=s.shadowPerProgress?d*(1/s.limitProgress):d;e.style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const w=Of(0,o);w.style.transform=k,w.style.opacity=v,b.origin&&(w.style.transformOrigin=b.origin)}},setTransition:e=>{const n=t.slides.map((e=>ff(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),Rf({swiper:t,duration:e,transformElements:n,allSlides:!0})},perspective:()=>t.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}function Gf(e){let{swiper:t,extendParams:n,on:o}=e;n({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),If({effect:"cards",swiper:t,on:o,setTranslate:()=>{const{slides:e,activeIndex:n,rtlTranslate:o}=t,i=t.params.cardsEffect,{startTranslate:s,isTouched:a}=t.touchEventsData,r=o?-t.translate:t.translate;for(let l=0;l<e.length;l+=1){const c=e[l],d=c.progress,u=Math.min(Math.max(d,-4),4);let p=c.swiperSlideOffset;t.params.centeredSlides&&!t.params.cssMode&&(t.wrapperEl.style.transform=`translateX(${t.minTranslate()}px)`),t.params.centeredSlides&&t.params.cssMode&&(p-=e[0].swiperSlideOffset);let h=t.params.cssMode?-p-t.translate:-p,g=0;const m=-100*Math.abs(u);let b=1,f=-i.perSlideRotate*u,x=i.perSlideOffset-.75*Math.abs(u);const y=t.virtual&&t.params.virtual.enabled?t.virtual.from+l:l,v=(y===n||y===n-1)&&u>0&&u<1&&(a||t.params.cssMode)&&r<s,k=(y===n||y===n+1)&&u<0&&u>-1&&(a||t.params.cssMode)&&r>s;if(v||k){const e=(1-Math.abs((Math.abs(u)-.5)/.5))**.5;f+=-28*u*e,b+=-.5*e,x+=96*e,g=-25*e*Math.abs(u)+"%"}if(h=u<0?`calc(${h}px ${o?"-":"+"} (${x*Math.abs(u)}%))`:u>0?`calc(${h}px ${o?"-":"+"} (-${x*Math.abs(u)}%))`:`${h}px`,!t.isHorizontal()){const e=g;g=h,h=e}const w=u<0?""+(1+(1-b)*u):""+(1-(1-b)*u),_=`\n translate3d(${h}, ${g}, ${m}px)\n rotateZ(${i.rotate?o?-f:f:0}deg)\n scale(${w})\n `;if(i.slideShadows){let e=c.querySelector(".swiper-slide-shadow");e||(e=Ff("cards",c)),e&&(e.style.opacity=Math.min(Math.max((Math.abs(u)-.5)/.5,0),1))}c.style.zIndex=-Math.abs(Math.round(d))+e.length,Of(0,c).style.transform=_}},setTransition:e=>{const n=t.slides.map((e=>ff(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),Rf({swiper:t,duration:e,transformElements:n})},perspective:()=>!0,overwriteParams:()=>({_loopSwapReset:!1,watchSlidesProgress:!0,loopAdditionalSlides:t.params.cardsEffect.rotate?3:2,centeredSlides:!0,virtualTranslate:!t.params.cssMode})})}let Vf,qf,Yf;function Kf(){return Vf||(Vf=function(){const e=cf(),t=rf();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),Vf}function Qf(e){return void 0===e&&(e={}),qf||(qf=function(e){ |
| 350 |
let{userAgent:t}=void 0===e?{}:e;const n=Kf(),o=cf(),i=o.navigator.platform,s=t||o.navigator.userAgent,a={ios:!1,android:!1},r=o.screen.width,l=o.screen.height,c=s.match(/(Android);?[\s\/]+([\d.]+)?/);let d=s.match(/(iPad).*OS\s([\d_]+)/);const u=s.match(/(iPod)(.*OS\s([\d_]+))?/),p=!d&&s.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h="Win32"===i;let g="MacIntel"===i;return!d&&g&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${r}x${l}`)>=0&&(d=s.match(/(Version)\/([\d.]+)/),d||(d=[0,1,"13_0_0"]),g=!1),c&&!h&&(a.os="android",a.android=!0),(d||p||u)&&(a.os="ios",a.ios=!0),a}(e)),qf}function Zf(){return Yf||(Yf=function(){const e=cf(),t=Qf();let n=!1;function o(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(o()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,o]=t.split("Version/")[1].split(" ")[0].split(".").map((e=>Number(e)));n=e<16||16===e&&o<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),s=o();return{isSafari:n||s,needPerspectiveFix:n,need3dFix:s||i&&t.ios,isWebView:i}}()),Yf}var Xf={on(e,t,n){const o=this;if(!o.eventsListeners||o.destroyed)return o;if("function"!=typeof t)return o;const i=n?"unshift":"push";return e.split(" ").forEach((e=>{o.eventsListeners[e]||(o.eventsListeners[e]=[]),o.eventsListeners[e][i](t)})),o},once(e,t,n){const o=this;if(!o.eventsListeners||o.destroyed)return o;if("function"!=typeof t)return o;function i(){o.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];t.apply(o,s)}return i.__emitterProxy=t,o.on(e,i,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;const o=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[o](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach(((o,i)=>{(o===t||o.__emitterProxy&&o.__emitterProxy===t)&&n.eventsListeners[e].splice(i,1)}))})),n):n},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,n,o;for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return"string"==typeof s[0]||Array.isArray(s[0])?(t=s[0],n=s.slice(1,s.length),o=e):(t=s[0].events,n=s[0].data,o=s[0].context||e),n.unshift(o),(Array.isArray(t)?t:t.split(" ")).forEach((t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(o,[t,...n])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(o,n)}))})),e}};const Jf=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)},ex=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)},tx=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(n){let t=n.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(n.shadowRoot?t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame((()=>{n.shadowRoot&&(t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())}))),t&&t.remove()}},nx=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},ox=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const o="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const n=i,s=[n-t];return s.push(...Array.from({length:t}).map(((e,t)=>n+o+t))),void e.slides.forEach(((t,n)=>{s.includes(t.column)&&nx(e,n)}))}const s=i+o-1;if(e.params.rewind||e.params.loop)for(let o=i-t;o<=s+t;o+=1){const t=(o%n+n)%n;(t<i||t>s)&&nx(e,t)}else for(let o=Math.max(i-t,0);o<=Math.min(s+t,n-1);o+=1)o!==i&&(o>s||o<i)&&nx(e,o)};var ix={updateSize:function(){const e=this;let t,n;const o=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:o.clientWidth,n=void 0!==e.params.height&&null!==e.params.height?e.params.height:o.clientHeight,0===t&&e.isHorizontal()||0===n&&e.isVertical()||(t=t-parseInt(kf(o,"padding-left")||0,10)-parseInt(kf(o,"padding-right")||0,10),n=n-parseInt(kf(o,"padding-top")||0,10)-parseInt(kf(o,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))},updateSlides:function(){const e=this;function t(t,n){return parseFloat(t.getPropertyValue(e.getDirectionLabel(n))||0)}const n=e.params,{wrapperEl:o,slidesEl:i,size:s,rtlTranslate:a,wrongRTL:r}=e,l=e.virtual&&n.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,d=xf(i,`.${e.params.slideClass}, swiper-slide`),u=l?e.virtual.slides.length:d.length;let p=[];const h=[],g=[];let m=n.slidesOffsetBefore;"function"==typeof m&&(m=n.slidesOffsetBefore.call(e));let b=n.slidesOffsetAfter;"function"==typeof b&&(b=n.slidesOffsetAfter.call(e));const f=e.snapGrid.length,x=e.slidesGrid.length;let y=n.spaceBetween,v=-m,k=0,w=0;if(void 0===s)return;"string"==typeof y&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*s:"string"==typeof y&&(y=parseFloat(y)),e.virtualSize=-y,d.forEach((e=>{a?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),n.centeredSlides&&n.cssMode&&(mf(o,"--swiper-centered-offset-before",""),mf(o,"--swiper-centered-offset-after",""));const _=n.grid&&n.grid.rows>1&&e.grid;let C;_?e.grid.initSlides(d):e.grid&&e.grid.unsetSlides();const j="auto"===n.slidesPerView&&n.breakpoints&&Object.keys(n.breakpoints).filter((e=>void 0!==n.breakpoints[e].slidesPerView)).length>0;for(let o=0;o<u;o+=1){let i;if(C=0,d[o]&&(i=d[o]),_&&e.grid.updateSlide(o,i,d),!d[o]||"none"!==kf(i,"display")){if("auto"===n.slidesPerView){j&&(d[o].style[e.getDirectionLabel("width")]="");const s=getComputedStyle(i),a=i.style.transform,r=i.style.webkitTransform;if(a&&(i.style.transform="none"),r&&(i.style.webkitTransform="none"),n.roundLengths)C=e.isHorizontal()?Cf(i,"width",!0):Cf(i,"height",!0);else{const e=t(s,"width"),n=t(s,"padding-left"),o=t(s,"padding-right"),a=t(s,"margin-left"),r=t(s,"margin-right"),l=s.getPropertyValue("box-sizing");if(l&&"border-box"===l)C=e+a+r;else{const{clientWidth:t,offsetWidth:s}=i;C=e+n+o+a+r+(s-t)}}a&&(i.style.transform=a),r&&(i.style.webkitTransform=r),n.roundLengths&&(C=Math.floor(C))}else C=(s-(n.slidesPerView-1)*y)/n.slidesPerView,n.roundLengths&&(C=Math.floor(C)),d[o]&&(d[o].style[e.getDirectionLabel("width")]=`${C}px`);d[o]&&(d[o].swiperSlideSize=C),g.push(C),n.centeredSlides?(v=v+C/2+k/2+y,0===k&&0!==o&&(v=v-s/2-y),0===o&&(v=v-s/2-y),Math.abs(v)<.001&&(v=0),n.roundLengths&&(v=Math.floor(v)),w%n.slidesPerGroup==0&&p.push(v),h.push(v)):(n.roundLengths&&(v=Math.floor(v)),(w-Math.min(e.params.slidesPerGroupSkip,w))%e.params.slidesPerGroup==0&&p.push(v),h.push(v),v=v+C+y),e.virtualSize+=C+y,k=C,w+=1}}if(e.virtualSize=Math.max(e.virtualSize,s)+b,a&&r&&("slide"===n.effect||"coverflow"===n.effect)&&(o.style.width=`${e.virtualSize+y}px`),n.setWrapperSize&&(o.style[e.getDirectionLabel("width")]=`${e.virtualSize+y}px`),_&&e.grid.updateWrapperSize(C,p),!n.centeredSlides){const t=[];for(let o=0;o<p.length;o+=1){let i=p[o];n.roundLengths&&(i=Math.floor(i)),p[o]<=e.virtualSize-s&&t.push(i)}p=t,Math.floor(e.virtualSize-s)-Math.floor(p[p.length-1])>1&&p.push(e.virtualSize-s)}if(l&&n.loop){const t=g[0]+y |
| 351 |
;if(n.slidesPerGroup>1){const o=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),i=t*n.slidesPerGroup;for(let e=0;e<o;e+=1)p.push(p[p.length-1]+i)}for(let o=0;o<e.virtual.slidesBefore+e.virtual.slidesAfter;o+=1)1===n.slidesPerGroup&&p.push(p[p.length-1]+t),h.push(h[h.length-1]+t),e.virtualSize+=t}if(0===p.length&&(p=[0]),0!==y){const t=e.isHorizontal()&&a?"marginLeft":e.getDirectionLabel("marginRight");d.filter(((e,t)=>!(n.cssMode&&!n.loop)||t!==d.length-1)).forEach((e=>{e.style[t]=`${y}px`}))}if(n.centeredSlides&&n.centeredSlidesBounds){let e=0;g.forEach((t=>{e+=t+(y||0)})),e-=y;const t=e>s?e-s:0;p=p.map((e=>e<=0?-m:e>t?t+b:e))}if(n.centerInsufficientSlides){let e=0;g.forEach((t=>{e+=t+(y||0)})),e-=y;const t=(n.slidesOffsetBefore||0)+(n.slidesOffsetAfter||0);if(e+t<s){const n=(s-e-t)/2;p.forEach(((e,t)=>{p[t]=e-n})),h.forEach(((e,t)=>{h[t]=e+n}))}}if(Object.assign(e,{slides:d,snapGrid:p,slidesGrid:h,slidesSizesGrid:g}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){mf(o,"--swiper-centered-offset-before",-p[0]+"px"),mf(o,"--swiper-centered-offset-after",e.size/2-g[g.length-1]/2+"px");const t=-e.snapGrid[0],n=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+n))}if(u!==c&&e.emit("slidesLengthChange"),p.length!==f&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==x&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(l||n.cssMode||"slide"!==n.effect&&"fade"!==n.effect)){const t=`${n.containerModifierClass}backface-hidden`,o=e.el.classList.contains(t);u<=n.maxBackfaceHiddenSlides?o||e.el.classList.add(t):o&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,n=[],o=t.virtual&&t.params.virtual.enabled;let i,s=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const a=e=>o?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{n.push(e)}));else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const e=t.activeIndex+i;if(e>t.slides.length&&!o)break;n.push(a(e))}else n.push(a(t.activeIndex));for(i=0;i<n.length;i+=1)if(void 0!==n[i]){const e=n[i].offsetHeight;s=e>s?e:s}(s||0===s)&&(t.wrapperEl.style.height=`${s}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let o=0;o<t.length;o+=1)t[o].swiperSlideOffset=(e.isHorizontal()?t[o].offsetLeft:t[o].offsetTop)-n-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,n=t.params,{slides:o,rtlTranslate:i,snapGrid:s}=t;if(0===o.length)return;void 0===o[0].swiperSlideOffset&&t.updateSlidesOffset();let a=-e;i&&(a=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let r=n.spaceBetween;"string"==typeof r&&r.indexOf("%")>=0?r=parseFloat(r.replace("%",""))/100*t.size:"string"==typeof r&&(r=parseFloat(r));for(let e=0;e<o.length;e+=1){const l=o[e];let c=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(c-=o[0].swiperSlideOffset);const d=(a+(n.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+r),u=(a-s[0]+(n.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+r),p=-(a-c),h=p+t.slidesSizesGrid[e],g=p>=0&&p<=t.size-t.slidesSizesGrid[e],m=p>=0&&p<t.size-1||h>1&&h<=t.size||p<=0&&h>=t.size;m&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e)),Jf(l,m,n.slideVisibleClass),Jf(l,g,n.slideFullyVisibleClass),l.progress=i?-d:d,l.originalProgress=i?-u:u}},updateProgress:function(e){const t=this;if(void 0===e){const n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}const n=t.params,o=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:s,isEnd:a,progressLoop:r}=t;const l=s,c=a;if(0===o)i=0,s=!0,a=!0;else{i=(e-t.minTranslate())/o;const n=Math.abs(e-t.minTranslate())<1,r=Math.abs(e-t.maxTranslate())<1;s=n||i<=0,a=r||i>=1,n&&(i=0),r&&(i=1)}if(n.loop){const n=t.getSlideIndexByData(0),o=t.getSlideIndexByData(t.slides.length-1),i=t.slidesGrid[n],s=t.slidesGrid[o],a=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);r=l>=i?(l-i)/a:(l+a-s)/a,r>1&&(r-=1)}Object.assign(t,{progress:i,progressLoop:r,isBeginning:s,isEnd:a}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),s&&!l&&t.emit("reachBeginning toEdge"),a&&!c&&t.emit("reachEnd toEdge"),(l&&!s||c&&!a)&&t.emit("fromEdge"),t.emit("progress",i)},updateSlidesClasses:function(){const e=this,{slides:t,params:n,slidesEl:o,activeIndex:i}=e,s=e.virtual&&n.virtual.enabled,a=e.grid&&n.grid&&n.grid.rows>1,r=e=>xf(o,`.${n.slideClass}${e}, swiper-slide${e}`)[0];let l,c,d;if(s)if(n.loop){let t=i-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),l=r(`[data-swiper-slide-index="${t}"]`)}else l=r(`[data-swiper-slide-index="${i}"]`);else a?(l=t.find((e=>e.column===i)),d=t.find((e=>e.column===i+1)),c=t.find((e=>e.column===i-1))):l=t[i];l&&(a||(d=function(e,t){const n=[];for(;e.nextElementSibling;){const o=e.nextElementSibling;t?o.matches(t)&&n.push(o):n.push(o),e=o}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!d&&(d=t[0]),c=function(e,t){const n=[];for(;e.previousElementSibling;){const o=e.previousElementSibling;t?o.matches(t)&&n.push(o):n.push(o),e=o}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&0===!c&&(c=t[t.length-1]))),t.forEach((e=>{ex(e,e===l,n.slideActiveClass),ex(e,e===d,n.slideNextClass),ex(e,e===c,n.slidePrevClass)})),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:o,params:i,activeIndex:s,realIndex:a,snapIndex:r}=t;let l,c=e;const d=e=>{let n=e-t.virtual.slidesBefore;return n<0&&(n=t.virtual.slides.length+n),n>=t.virtual.slides.length&&(n-=t.virtual.slides.length),n};if(void 0===c&&(c=function(e){const{slidesGrid:t,params:n}=e,o=e.rtlTranslate?e.translate:-e.translate;let i;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?o>=t[e]&&o<t[e+1]-(t[e+1]-t[e])/2?i=e:o>=t[e]&&o<t[e+1]&&(i=e+1):o>=t[e]&&(i=e);return n.normalizeSlideIndex&&(i<0||void 0===i)&&(i=0),i}(t)),o.indexOf(n)>=0)l=o.indexOf(n);else{const e=Math.min(i.slidesPerGroupSkip,c);l=e+Math.floor((c-e)/i.slidesPerGroup)}if(l>=o.length&&(l=o.length-1),c===s&&!t.params.loop)return void(l!==r&&(t.snapIndex=l,t.emit("snapIndexChange")));if(c===s&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=d(c));const u=t.grid&&i.grid&&i.grid.rows>1;let p;if(t.virtual&&i.virtual.enabled&&i.loop)p=d(c);else if(u){const e=t.slides.find((e=>e.column===c));let n=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(n)&&(n=Math.max(t.slides.indexOf(e),0)),p=Math.floor(n/i.grid.rows)}else if(t.slides[c]){const e=t.slides[c].getAttribute("data-swiper-slide-index");p=e?parseInt(e,10):c}else p=c;Object.assign(t,{previousSnapIndex:r,snapIndex:l,previousRealIndex:a,realIndex:p,previousIndex:s,activeIndex:c}),t.initialized&&ox(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(a!==p&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const n=this,o=n.params;let i=e.closest(`.${o.slideClass}, swiper-slide`);!i&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach((e=>{!i&&e.matches&&e.matches(`.${o.slideClass}, swiper-slide`)&&(i=e)}));let s,a=!1;if(i)for(let e=0;e<n.slides.length;e+=1)if(n.slides[e]===i){a=!0,s=e;break}if(!i||!a)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=i,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(i.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=s,o.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}},sx={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y") |
| 352 |
;const{params:t,rtlTranslate:n,translate:o,wrapperEl:i}=this;if(t.virtualTranslate)return n?-o:o;if(t.cssMode)return o;let s=function(e,t){void 0===t&&(t="x");const n=cf();let o,i,s;const a=function(e){const t=cf();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}(e);return n.WebKitCSSMatrix?(i=a.transform||a.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map((e=>e.replace(",","."))).join(", ")),s=new n.WebKitCSSMatrix("none"===i?"":i)):(s=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),o=s.toString().split(",")),"x"===t&&(i=n.WebKitCSSMatrix?s.m41:16===o.length?parseFloat(o[12]):parseFloat(o[4])),"y"===t&&(i=n.WebKitCSSMatrix?s.m42:16===o.length?parseFloat(o[13]):parseFloat(o[5])),i||0}(i,e);return s+=this.cssOverflowAdjustment(),n&&(s=-s),s||0},setTranslate:function(e,t){const n=this,{rtlTranslate:o,params:i,wrapperEl:s,progress:a}=n;let r,l=0,c=0;n.isHorizontal()?l=o?-e:e:c=e,i.roundLengths&&(l=Math.floor(l),c=Math.floor(c)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:c,i.cssMode?s[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-c:i.virtualTranslate||(n.isHorizontal()?l-=n.cssOverflowAdjustment():c-=n.cssOverflowAdjustment(),s.style.transform=`translate3d(${l}px, ${c}px, 0px)`);const d=n.maxTranslate()-n.minTranslate();r=0===d?0:(e-n.minTranslate())/d,r!==a&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,n,o,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),void 0===o&&(o=!0);const s=this,{params:a,wrapperEl:r}=s;if(s.animating&&a.preventInteractionOnTransition)return!1;const l=s.minTranslate(),c=s.maxTranslate();let d;if(d=o&&e>l?l:o&&e<c?c:e,s.updateProgress(d),a.cssMode){const e=s.isHorizontal();if(0===t)r[e?"scrollLeft":"scrollTop"]=-d;else{if(!s.support.smoothScroll)return bf({swiper:s,targetPosition:-d,side:e?"left":"top"}),!0;r.scrollTo({[e?"left":"top"]:-d,behavior:"smooth"})}return!0}return 0===t?(s.setTransition(0),s.setTranslate(d),n&&(s.emit("beforeTransitionStart",t,i),s.emit("transitionEnd"))):(s.setTransition(t),s.setTranslate(d),n&&(s.emit("beforeTransitionStart",t,i),s.emit("transitionStart")),s.animating||(s.animating=!0,s.onTranslateToWrapperTransitionEnd||(s.onTranslateToWrapperTransitionEnd=function(e){s&&!s.destroyed&&e.target===this&&(s.wrapperEl.removeEventListener("transitionend",s.onTranslateToWrapperTransitionEnd),s.onTranslateToWrapperTransitionEnd=null,delete s.onTranslateToWrapperTransitionEnd,s.animating=!1,n&&s.emit("transitionEnd"))}),s.wrapperEl.addEventListener("transitionend",s.onTranslateToWrapperTransitionEnd))),!0}};function ax(e){let{swiper:t,runCallbacks:n,direction:o,step:i}=e;const{activeIndex:s,previousIndex:a}=t;let r=o;r||(r=s>a?"next":s<a?"prev":"reset"),t.emit(`transition${i}`),n&&"reset"===r?t.emit(`slideResetTransition${i}`):n&&s!==a&&(t.emit(`slideChangeTransition${i}`),"next"===r?t.emit(`slideNextTransition${i}`):t.emit(`slidePrevTransition${i}`))}var rx={slideTo:function(e,t,n,o,i){void 0===e&&(e=0),void 0===n&&(n=!0),"string"==typeof e&&(e=parseInt(e,10));const s=this;let a=e;a<0&&(a=0);const{params:r,snapGrid:l,slidesGrid:c,previousIndex:d,activeIndex:u,rtlTranslate:p,wrapperEl:h,enabled:g}=s;if(!g&&!o&&!i||s.destroyed||s.animating&&r.preventInteractionOnTransition)return!1;void 0===t&&(t=s.params.speed);const m=Math.min(s.params.slidesPerGroupSkip,a);let b=m+Math.floor((a-m)/s.params.slidesPerGroup);b>=l.length&&(b=l.length-1);const f=-l[b];if(r.normalizeSlideIndex)for(let e=0;e<c.length;e+=1){const t=-Math.floor(100*f),n=Math.floor(100*c[e]),o=Math.floor(100*c[e+1]);void 0!==c[e+1]?t>=n&&t<o-(o-n)/2?a=e:t>=n&&t<o&&(a=e+1):t>=n&&(a=e)}if(s.initialized&&a!==u){if(!s.allowSlideNext&&(p?f>s.translate&&f>s.minTranslate():f<s.translate&&f<s.minTranslate()))return!1;if(!s.allowSlidePrev&&f>s.translate&&f>s.maxTranslate()&&(u||0)!==a)return!1}let x;a!==(d||0)&&n&&s.emit("beforeSlideChangeStart"),s.updateProgress(f),x=a>u?"next":a<u?"prev":"reset";const y=s.virtual&&s.params.virtual.enabled;if((!y||!i)&&(p&&-f===s.translate||!p&&f===s.translate))return s.updateActiveIndex(a),r.autoHeight&&s.updateAutoHeight(),s.updateSlidesClasses(),"slide"!==r.effect&&s.setTranslate(f),"reset"!==x&&(s.transitionStart(n,x),s.transitionEnd(n,x)),!1;if(r.cssMode){const e=s.isHorizontal(),n=p?f:-f;if(0===t)y&&(s.wrapperEl.style.scrollSnapType="none",s._immediateVirtual=!0),y&&!s._cssModeVirtualInitialSet&&s.params.initialSlide>0?(s._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{h[e?"scrollLeft":"scrollTop"]=n}))):h[e?"scrollLeft":"scrollTop"]=n,y&&requestAnimationFrame((()=>{s.wrapperEl.style.scrollSnapType="",s._immediateVirtual=!1}));else{if(!s.support.smoothScroll)return bf({swiper:s,targetPosition:n,side:e?"left":"top"}),!0;h.scrollTo({[e?"left":"top"]:n,behavior:"smooth"})}return!0}const v=Zf().isSafari;return y&&!i&&v&&s.isElement&&s.virtual.update(!1,!1,a),s.setTransition(t),s.setTranslate(f),s.updateActiveIndex(a),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,o),s.transitionStart(n,x),0===t?s.transitionEnd(n,x):s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(e){s&&!s.destroyed&&e.target===this&&(s.wrapperEl.removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(n,x))}),s.wrapperEl.addEventListener("transitionend",s.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,n,o){void 0===e&&(e=0),void 0===n&&(n=!0),"string"==typeof e&&(e=parseInt(e,10));const i=this;if(i.destroyed)return;void 0===t&&(t=i.params.speed);const s=i.grid&&i.params.grid&&i.params.grid.rows>1;let a=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)a+=i.virtual.slidesBefore;else{let e;if(s){const t=a*i.params.grid.rows;e=i.slides.find((e=>1*e.getAttribute("data-swiper-slide-index")===t)).column}else e=i.getSlideIndexByData(a);const t=s?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:n}=i.params;let r=i.params.slidesPerView;"auto"===r?r=i.slidesPerViewDynamic():(r=Math.ceil(parseFloat(i.params.slidesPerView,10)),n&&r%2==0&&(r+=1));let l=t-e<r;if(n&&(l=l||e<Math.ceil(r/2)),o&&n&&"auto"!==i.params.slidesPerView&&!s&&(l=!1),l){const o=n?e<i.activeIndex?"prev":"next":e-i.activeIndex-1<i.params.slidesPerView?"next":"prev";i.loopFix({direction:o,slideTo:!0,activeSlideIndex:"next"===o?e+1:e-t+1,slideRealIndex:"next"===o?i.realIndex:void 0})}if(s){const e=a*i.params.grid.rows;a=i.slides.find((t=>1*t.getAttribute("data-swiper-slide-index")===e)).column}else a=i.getSlideIndexByData(a)}return requestAnimationFrame((()=>{i.slideTo(a,t,n,o)})),i},slideNext:function(e,t,n){void 0===t&&(t=!0);const o=this,{enabled:i,params:s,animating:a}=o;if(!i||o.destroyed)return o;void 0===e&&(e=o.params.speed);let r=s.slidesPerGroup;"auto"===s.slidesPerView&&1===s.slidesPerGroup&&s.slidesPerGroupAuto&&(r=Math.max(o.slidesPerViewDynamic("current",!0),1));const l=o.activeIndex<s.slidesPerGroupSkip?1:r,c=o.virtual&&s.virtual.enabled;if(s.loop){if(a&&!c&&s.loopPreventsSliding)return!1;if(o.loopFix({direction:"next"}),o._clientLeft=o.wrapperEl.clientLeft,o.activeIndex===o.slides.length-1&&s.cssMode)return requestAnimationFrame((()=>{o.slideTo(o.activeIndex+l,e,t,n)})),!0}return s.rewind&&o.isEnd?o.slideTo(0,e,t,n):o.slideTo(o.activeIndex+l,e,t,n)},slidePrev:function(e,t,n){void 0===t&&(t=!0);const o=this,{params:i,snapGrid:s,slidesGrid:a,rtlTranslate:r,enabled:l,animating:c}=o;if(!l||o.destroyed)return o;void 0===e&&(e=o.params.speed);const d=o.virtual&&i.virtual.enabled;if(i.loop){if(c&&!d&&i.loopPreventsSliding)return!1;o.loopFix({direction:"prev"}), |
| 353 |
o._clientLeft=o.wrapperEl.clientLeft}function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const p=u(r?o.translate:-o.translate),h=s.map((e=>u(e))),g=i.freeMode&&i.freeMode.enabled;let m=s[h.indexOf(p)-1];if(void 0===m&&(i.cssMode||g)){let e;s.forEach(((t,n)=>{p>=t&&(e=n)})),void 0!==e&&(m=g?s[e]:s[e>0?e-1:e])}let b=0;if(void 0!==m&&(b=a.indexOf(m),b<0&&(b=o.activeIndex-1),"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(b=b-o.slidesPerViewDynamic("previous",!0)+1,b=Math.max(b,0))),i.rewind&&o.isBeginning){const i=o.params.virtual&&o.params.virtual.enabled&&o.virtual?o.virtual.slides.length-1:o.slides.length-1;return o.slideTo(i,e,t,n)}return i.loop&&0===o.activeIndex&&i.cssMode?(requestAnimationFrame((()=>{o.slideTo(b,e,t,n)})),!0):o.slideTo(b,e,t,n)},slideReset:function(e,t,n){void 0===t&&(t=!0);const o=this;if(!o.destroyed)return void 0===e&&(e=o.params.speed),o.slideTo(o.activeIndex,e,t,n)},slideToClosest:function(e,t,n,o){void 0===t&&(t=!0),void 0===o&&(o=.5);const i=this;if(i.destroyed)return;void 0===e&&(e=i.params.speed);let s=i.activeIndex;const a=Math.min(i.params.slidesPerGroupSkip,s),r=a+Math.floor((s-a)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[r]){const e=i.snapGrid[r];l-e>(i.snapGrid[r+1]-e)*o&&(s+=i.params.slidesPerGroup)}else{const e=i.snapGrid[r-1];l-e<=(i.snapGrid[r]-e)*o&&(s-=i.params.slidesPerGroup)}return s=Math.max(s,0),s=Math.min(s,i.slidesGrid.length-1),i.slideTo(s,e,t,n)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,o="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let i,s=e.getSlideIndexWhenGrid(e.clickedIndex);const a=e.isElement?"swiper-slide":`.${t.slideClass}`,r=e.grid&&e.params.grid&&e.params.grid.rows>1;if(t.loop){if(e.animating)return;i=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?e.slideToLoop(i):s>(r?(e.slides.length-o)/2-(e.params.grid.rows-1):e.slides.length-o)?(e.loopFix(),s=e.getSlideIndex(xf(n,`${a}[data-swiper-slide-index="${i}"]`)[0]),uf((()=>{e.slideTo(s)}))):e.slideTo(s)}else e.slideTo(s)}},lx={loopCreate:function(e,t){const n=this,{params:o,slidesEl:i}=n;if(!o.loop||n.virtual&&n.params.virtual.enabled)return;const s=()=>{xf(i,`.${o.slideClass}, swiper-slide`).forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t)}))},a=n.grid&&o.grid&&o.grid.rows>1;o.loopAddBlankSlides&&(o.slidesPerGroup>1||a)&&(()=>{const e=xf(i,`.${o.slideBlankClass}`);e.forEach((e=>{e.remove()})),e.length>0&&(n.recalcSlides(),n.updateSlides())})();const r=o.slidesPerGroup*(a?o.grid.rows:1),l=n.slides.length%r!=0,c=a&&n.slides.length%o.grid.rows!=0,d=e=>{for(let t=0;t<e;t+=1){const e=n.isElement?vf("swiper-slide",[o.slideBlankClass]):vf("div",[o.slideClass,o.slideBlankClass]);n.slidesEl.append(e)}};l?(o.loopAddBlankSlides?(d(r-n.slides.length%r),n.recalcSlides(),n.updateSlides()):yf("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"),s()):c?(o.loopAddBlankSlides?(d(o.grid.rows-n.slides.length%o.grid.rows),n.recalcSlides(),n.updateSlides()):yf("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"),s()):s(),n.loopFix({slideRealIndex:e,direction:o.centeredSlides?void 0:"next",initial:t})},loopFix:function(e){let{slideRealIndex:t,slideTo:n=!0,direction:o,setTranslate:i,activeSlideIndex:s,initial:a,byController:r,byMousewheel:l}=void 0===e?{}:e;const c=this;if(!c.params.loop)return;c.emit("beforeLoopFix");const{slides:d,allowSlidePrev:u,allowSlideNext:p,slidesEl:h,params:g}=c,{centeredSlides:m,initialSlide:b}=g;if(c.allowSlidePrev=!0,c.allowSlideNext=!0,c.virtual&&g.virtual.enabled)return n&&(g.centeredSlides||0!==c.snapIndex?g.centeredSlides&&c.snapIndex<g.slidesPerView?c.slideTo(c.virtual.slides.length+c.snapIndex,0,!1,!0):c.snapIndex===c.snapGrid.length-1&&c.slideTo(c.virtual.slidesBefore,0,!1,!0):c.slideTo(c.virtual.slides.length,0,!1,!0)),c.allowSlidePrev=u,c.allowSlideNext=p,void c.emit("loopFix");let f=g.slidesPerView;"auto"===f?f=c.slidesPerViewDynamic():(f=Math.ceil(parseFloat(g.slidesPerView,10)),m&&f%2==0&&(f+=1));const x=g.slidesPerGroupAuto?f:g.slidesPerGroup;let y=m?Math.max(x,Math.ceil(f/2)):x;y%x!=0&&(y+=x-y%x),y+=g.loopAdditionalSlides,c.loopedSlides=y;const v=c.grid&&g.grid&&g.grid.rows>1;d.length<f+y||"cards"===c.params.effect&&d.length<f+2*y?yf("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):v&&"row"===g.grid.fill&&yf("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const k=[],w=[],_=v?Math.ceil(d.length/g.grid.rows):d.length,C=a&&_-b<f&&!m;let j=C?b:c.activeIndex;void 0===s?s=c.getSlideIndex(d.find((e=>e.classList.contains(g.slideActiveClass)))):j=s;const $="next"===o||!o,S="prev"===o||!o;let T=0,M=0;const N=(v?d[s].column:s)+(m&&void 0===i?-f/2+.5:0);if(N<y){T=Math.max(y-N,x);for(let e=0;e<y-N;e+=1){const t=e-Math.floor(e/_)*_;if(v){const e=_-t-1;for(let t=d.length-1;t>=0;t-=1)d[t].column===e&&k.push(t)}else k.push(_-t-1)}}else if(N+f>_-y){M=Math.max(N-(_-2*y),x),C&&(M=Math.max(M,f-_+b+1));for(let e=0;e<M;e+=1){const t=e-Math.floor(e/_)*_;v?d.forEach(((e,n)=>{e.column===t&&w.push(n)})):w.push(t)}}if(c.__preventObserver__=!0,requestAnimationFrame((()=>{c.__preventObserver__=!1})),"cards"===c.params.effect&&d.length<f+2*y&&(w.includes(s)&&w.splice(w.indexOf(s),1),k.includes(s)&&k.splice(k.indexOf(s),1)),S&&k.forEach((e=>{d[e].swiperLoopMoveDOM=!0,h.prepend(d[e]),d[e].swiperLoopMoveDOM=!1})),$&&w.forEach((e=>{d[e].swiperLoopMoveDOM=!0,h.append(d[e]),d[e].swiperLoopMoveDOM=!1})),c.recalcSlides(),"auto"===g.slidesPerView?c.updateSlides():v&&(k.length>0&&S||w.length>0&&$)&&c.slides.forEach(((e,t)=>{c.grid.updateSlide(t,e,c.slides)})),g.watchSlidesProgress&&c.updateSlidesOffset(),n)if(k.length>0&&S){if(void 0===t){const e=c.slidesGrid[j],t=c.slidesGrid[j+T]-e;l?c.setTranslate(c.translate-t):(c.slideTo(j+Math.ceil(T),0,!1,!0),i&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-t,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-t))}else if(i){const e=v?k.length/g.grid.rows:k.length;c.slideTo(c.activeIndex+e,0,!1,!0),c.touchEventsData.currentTranslate=c.translate}}else if(w.length>0&&$)if(void 0===t){const e=c.slidesGrid[j],t=c.slidesGrid[j-M]-e;l?c.setTranslate(c.translate-t):(c.slideTo(j-M,0,!1,!0),i&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-t,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-t))}else{const e=v?w.length/g.grid.rows:w.length;c.slideTo(c.activeIndex-e,0,!1,!0)}if(c.allowSlidePrev=u,c.allowSlideNext=p,c.controller&&c.controller.control&&!r){const e={slideRealIndex:t,direction:o,setTranslate:i,activeSlideIndex:s,byController:!0};Array.isArray(c.controller.control)?c.controller.control.forEach((t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===g.slidesPerView&&n})})):c.controller.control instanceof c.constructor&&c.controller.control.params.loop&&c.controller.control.loopFix({...e,slideTo:c.controller.control.params.slidesPerView===g.slidesPerView&&n})}c.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||!n||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const o=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;o[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),o.forEach((e=>{n.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function cx(e,t,n){ |
| 354 |
const o=cf(),{params:i}=e,s=i.edgeSwipeDetection,a=i.edgeSwipeThreshold;return!s||!(n<=a||n>=o.innerWidth-a)||"prevent"===s&&(t.preventDefault(),!0)}function dx(e){const t=this,n=rf();let o=e;o.originalEvent&&(o=o.originalEvent);const i=t.touchEventsData;if("pointerdown"===o.type){if(null!==i.pointerId&&i.pointerId!==o.pointerId)return;i.pointerId=o.pointerId}else"touchstart"===o.type&&1===o.targetTouches.length&&(i.touchId=o.targetTouches[0].identifier);if("touchstart"===o.type)return void cx(t,o,o.targetTouches[0].pageX);const{params:s,touches:a,enabled:r}=t;if(!r)return;if(!s.simulateTouch&&"mouse"===o.pointerType)return;if(t.animating&&s.preventInteractionOnTransition)return;!t.animating&&s.cssMode&&s.loop&&t.loopFix();let l=o.target;if("wrapper"===s.touchEventsTarget&&!function(e,t){const n=cf();let o=t.contains(e);return!o&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&(o=[...t.assignedElements()].includes(e),o||(o=function(e,t){const n=[t];for(;n.length>0;){const t=n.shift();if(e===t)return!0;n.push(...t.children,...t.shadowRoot?t.shadowRoot.children:[],...t.assignedElements?t.assignedElements():[])}}(e,t))),o}(l,t.wrapperEl))return;if("which"in o&&3===o.which)return;if("button"in o&&o.button>0)return;if(i.isTouched&&i.isMoved)return;const c=!!s.noSwipingClass&&""!==s.noSwipingClass,d=o.composedPath?o.composedPath():o.path;c&&o.target&&o.target.shadowRoot&&d&&(l=d[0]);const u=s.noSwipingSelector?s.noSwipingSelector:`.${s.noSwipingClass}`,p=!(!o.target||!o.target.shadowRoot);if(s.noSwiping&&(p?function(e,t){return void 0===t&&(t=this),function t(n){if(!n||n===rf()||n===cf())return null;n.assignedSlot&&(n=n.assignedSlot);const o=n.closest(e);return o||n.getRootNode?o||t(n.getRootNode().host):null}(t)}(u,l):l.closest(u)))return void(t.allowClick=!0);if(s.swipeHandler&&!l.closest(s.swipeHandler))return;a.currentX=o.pageX,a.currentY=o.pageY;const h=a.currentX,g=a.currentY;if(!cx(t,o,h))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=h,a.startY=g,i.touchStartTime=pf(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,s.threshold>0&&(i.allowThresholdMove=!1);let m=!0;l.matches(i.focusableElements)&&(m=!1,"SELECT"===l.nodeName&&(i.isTouched=!1)),n.activeElement&&n.activeElement.matches(i.focusableElements)&&n.activeElement!==l&&("mouse"===o.pointerType||"mouse"!==o.pointerType&&!l.matches(i.focusableElements))&&n.activeElement.blur();const b=m&&t.allowTouchMove&&s.touchStartPreventDefault;!s.touchStartForcePreventDefault&&!b||l.isContentEditable||o.preventDefault(),s.freeMode&&s.freeMode.enabled&&t.freeMode&&t.animating&&!s.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",o)}function ux(e){const t=rf(),n=this,o=n.touchEventsData,{params:i,touches:s,rtlTranslate:a,enabled:r}=n;if(!r)return;if(!i.simulateTouch&&"mouse"===e.pointerType)return;let l,c=e;if(c.originalEvent&&(c=c.originalEvent),"pointermove"===c.type){if(null!==o.touchId)return;if(c.pointerId!==o.pointerId)return}if("touchmove"===c.type){if(l=[...c.changedTouches].find((e=>e.identifier===o.touchId)),!l||l.identifier!==o.touchId)return}else l=c;if(!o.isTouched)return void(o.startMoving&&o.isScrolling&&n.emit("touchMoveOpposite",c));const d=l.pageX,u=l.pageY;if(c.preventedByNestedSwiper)return s.startX=d,void(s.startY=u);if(!n.allowTouchMove)return c.target.matches(o.focusableElements)||(n.allowClick=!1),void(o.isTouched&&(Object.assign(s,{startX:d,startY:u,currentX:d,currentY:u}),o.touchStartTime=pf()));if(i.touchReleaseOnEdges&&!i.loop)if(n.isVertical()){if(u<s.startY&&n.translate<=n.maxTranslate()||u>s.startY&&n.translate>=n.minTranslate())return o.isTouched=!1,void(o.isMoved=!1)}else{if(a&&(d>s.startX&&-n.translate<=n.maxTranslate()||d<s.startX&&-n.translate>=n.minTranslate()))return;if(!a&&(d<s.startX&&n.translate<=n.maxTranslate()||d>s.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(o.focusableElements)&&t.activeElement!==c.target&&"mouse"!==c.pointerType&&t.activeElement.blur(),t.activeElement&&c.target===t.activeElement&&c.target.matches(o.focusableElements))return o.isMoved=!0,void(n.allowClick=!1);o.allowTouchCallbacks&&n.emit("touchMove",c),s.previousX=s.currentX,s.previousY=s.currentY,s.currentX=d,s.currentY=u;const p=s.currentX-s.startX,h=s.currentY-s.startY;if(n.params.threshold&&Math.sqrt(p**2+h**2)<n.params.threshold)return;if(void 0===o.isScrolling){let e;n.isHorizontal()&&s.currentY===s.startY||n.isVertical()&&s.currentX===s.startX?o.isScrolling=!1:p*p+h*h>=25&&(e=180*Math.atan2(Math.abs(h),Math.abs(p))/Math.PI,o.isScrolling=n.isHorizontal()?e>i.touchAngle:90-e>i.touchAngle)}if(o.isScrolling&&n.emit("touchMoveOpposite",c),void 0===o.startMoving&&(s.currentX===s.startX&&s.currentY===s.startY||(o.startMoving=!0)),o.isScrolling||"touchmove"===c.type&&o.preventTouchMoveFromPointerMove)return void(o.isTouched=!1);if(!o.startMoving)return;n.allowClick=!1,!i.cssMode&&c.cancelable&&c.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&c.stopPropagation();let g=n.isHorizontal()?p:h,m=n.isHorizontal()?s.currentX-s.previousX:s.currentY-s.previousY;i.oneWayMovement&&(g=Math.abs(g)*(a?1:-1),m=Math.abs(m)*(a?1:-1)),s.diff=g,g*=i.touchRatio,a&&(g=-g,m=-m);const b=n.touchesDirection;n.swipeDirection=g>0?"prev":"next",n.touchesDirection=m>0?"prev":"next";const f=n.params.loop&&!i.cssMode,x="next"===n.touchesDirection&&n.allowSlideNext||"prev"===n.touchesDirection&&n.allowSlidePrev;if(!o.isMoved){if(f&&x&&n.loopFix({direction:n.swipeDirection}),o.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(e)}o.allowMomentumBounce=!1,!i.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",c)}if((new Date).getTime(),!1!==i._loopSwapReset&&o.isMoved&&o.allowThresholdMove&&b!==n.touchesDirection&&f&&x&&Math.abs(g)>=1)return Object.assign(s,{startX:d,startY:u,currentX:d,currentY:u,startTranslate:o.currentTranslate}),o.loopSwapReset=!0,void(o.startTranslate=o.currentTranslate);n.emit("sliderMove",c),o.isMoved=!0,o.currentTranslate=g+o.startTranslate;let y=!0,v=i.resistanceRatio;if(i.touchReleaseOnEdges&&(v=0),g>0?(f&&x&&o.allowThresholdMove&&o.currentTranslate>(i.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-("auto"!==i.slidesPerView&&n.slides.length-i.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),o.currentTranslate>n.minTranslate()&&(y=!1,i.resistance&&(o.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+o.startTranslate+g)**v))):g<0&&(f&&x&&o.allowThresholdMove&&o.currentTranslate<(i.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+("auto"!==i.slidesPerView&&n.slides.length-i.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-("auto"===i.slidesPerView?n.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),o.currentTranslate<n.maxTranslate()&&(y=!1,i.resistance&&(o.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-o.startTranslate-g)**v))),y&&(c.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&o.currentTranslate<o.startTranslate&&(o.currentTranslate=o.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&o.currentTranslate>o.startTranslate&&(o.currentTranslate=o.startTranslate),n.allowSlidePrev||n.allowSlideNext||(o.currentTranslate=o.startTranslate),i.threshold>0){if(!(Math.abs(g)>i.threshold||o.allowThresholdMove))return void(o.currentTranslate=o.startTranslate);if(!o.allowThresholdMove)return o.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY, |
| 355 |
o.currentTranslate=o.startTranslate,void(s.diff=n.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY)}i.followFinger&&!i.cssMode&&((i.freeMode&&i.freeMode.enabled&&n.freeMode||i.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(o.currentTranslate),n.setTranslate(o.currentTranslate))}function px(e){const t=this,n=t.touchEventsData;let o,i=e;if(i.originalEvent&&(i=i.originalEvent),"touchend"===i.type||"touchcancel"===i.type){if(o=[...i.changedTouches].find((e=>e.identifier===n.touchId)),!o||o.identifier!==n.touchId)return}else{if(null!==n.touchId)return;if(i.pointerId!==n.pointerId)return;o=i}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(i.type)&&(!["pointercancel","contextmenu"].includes(i.type)||!t.browser.isSafari&&!t.browser.isWebView))return;n.pointerId=null,n.touchId=null;const{params:s,touches:a,rtlTranslate:r,slidesGrid:l,enabled:c}=t;if(!c)return;if(!s.simulateTouch&&"mouse"===i.pointerType)return;if(n.allowTouchCallbacks&&t.emit("touchEnd",i),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&s.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);s.grabCursor&&n.isMoved&&n.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const d=pf(),u=d-n.touchStartTime;if(t.allowClick){const e=i.path||i.composedPath&&i.composedPath();t.updateClickedSlide(e&&e[0]||i.target,e),t.emit("tap click",i),u<300&&d-n.lastClickTime<300&&t.emit("doubleTap doubleClick",i)}if(n.lastClickTime=pf(),uf((()=>{t.destroyed||(t.allowClick=!0)})),!n.isTouched||!n.isMoved||!t.swipeDirection||0===a.diff&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let p;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,p=s.followFinger?r?t.translate:-t.translate:-n.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:p});const h=p>=-t.maxTranslate()&&!t.params.loop;let g=0,m=t.slidesSizesGrid[0];for(let e=0;e<l.length;e+=e<s.slidesPerGroupSkip?1:s.slidesPerGroup){const t=e<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;void 0!==l[e+t]?(h||p>=l[e]&&p<l[e+t])&&(g=e,m=l[e+t]-l[e]):(h||p>=l[e])&&(g=e,m=l[l.length-1]-l[l.length-2])}let b=null,f=null;s.rewind&&(t.isBeginning?f=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(b=0));const x=(p-l[g])/m,y=g<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;if(u>s.longSwipesMs){if(!s.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(x>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?b:g+y):t.slideTo(g)),"prev"===t.swipeDirection&&(x>1-s.longSwipesRatio?t.slideTo(g+y):null!==f&&x<0&&Math.abs(x)>s.longSwipesRatio?t.slideTo(f):t.slideTo(g))}else{if(!s.shortSwipes)return void t.slideTo(t.activeIndex);!t.navigation||i.target!==t.navigation.nextEl&&i.target!==t.navigation.prevEl?("next"===t.swipeDirection&&t.slideTo(null!==b?b:g+y),"prev"===t.swipeDirection&&t.slideTo(null!==f?f:g)):i.target===t.navigation.nextEl?t.slideTo(g+y):t.slideTo(g)}}function hx(){const e=this,{params:t,el:n}=e;if(n&&0===n.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:o,allowSlidePrev:i,snapGrid:s}=e,a=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const r=a&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||r?e.params.loop&&!a?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()}),500)),e.allowSlidePrev=i,e.allowSlideNext=o,e.params.watchOverflow&&s!==e.snapGrid&&e.checkOverflow()}function gx(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function mx(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:o}=e;if(!o)return;let i;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const s=e.maxTranslate()-e.minTranslate();i=0===s?0:(e.translate-e.minTranslate())/s,i!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function bx(e){const t=this;tx(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function fx(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const xx=(e,t)=>{const n=rf(),{params:o,el:i,wrapperEl:s,device:a}=e,r=!!o.nested,l="on"===t?"addEventListener":"removeEventListener",c=t;i&&"string"!=typeof i&&(n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:r}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:r}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:r}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(o.preventClicks||o.preventClicksPropagation)&&i[l]("click",e.onClick,!0),o.cssMode&&s[l]("scroll",e.onScroll),o.updateOnWindowResize?e[c](a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",hx,!0):e[c]("observerUpdate",hx,!0),i[l]("load",e.onLoad,{capture:!0}))},yx=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var vx={addClasses:function(){const e=this,{classNames:t,params:n,rtl:o,el:i,device:s}=e,a=function(e,t){const n=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((o=>{e[o]&&n.push(t+o)})):"string"==typeof e&&n.push(t+e)})),n}(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:o},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&"column"===n.grid.fill},{android:s.android},{ios:s.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...a),i.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}},kx={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85, |
| 356 |
watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function wx(e,t){return function(n){void 0===n&&(n={});const o=Object.keys(n)[0],i=n[o];"object"==typeof i&&null!==i?(!0===e[o]&&(e[o]={enabled:!0}),"navigation"===o&&e[o]&&e[o].enabled&&!e[o].prevEl&&!e[o].nextEl&&(e[o].auto=!0),["pagination","scrollbar"].indexOf(o)>=0&&e[o]&&e[o].enabled&&!e[o].el&&(e[o].auto=!0),o in e&&"enabled"in i?("object"!=typeof e[o]||"enabled"in e[o]||(e[o].enabled=!0),e[o]||(e[o]={enabled:!1}),gf(t,n)):gf(t,n)):gf(t,n)}}const Cx={eventsEmitter:Xf,update:ix,translate:sx,transition:{setTransition:function(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=0===e?"0ms":""),n.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const n=this,{params:o}=n;o.cssMode||(o.autoHeight&&n.updateAutoHeight(),ax({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const n=this,{params:o}=n;n.animating=!1,o.cssMode||(n.setTransition(0),ax({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:rx,loop:lx,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame((()=>{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame((()=>{e.__preventObserver__=!1})))}},events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=dx.bind(e),e.onTouchMove=ux.bind(e),e.onTouchEnd=px.bind(e),e.onDocumentTouchStart=fx.bind(e),t.cssMode&&(e.onScroll=mx.bind(e)),e.onClick=gx.bind(e),e.onLoad=bx.bind(e),xx(e,"on")},detachEvents:function(){xx(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{realIndex:t,initialized:n,params:o,el:i}=e,s=o.breakpoints;if(!s||s&&0===Object.keys(s).length)return;const a=rf(),r="window"!==o.breakpointsBase&&o.breakpointsBase?"container":o.breakpointsBase,l=["window","container"].includes(o.breakpointsBase)||!o.breakpointsBase?e.el:a.querySelector(o.breakpointsBase),c=e.getBreakpoint(s,r,l);if(!c||e.currentBreakpoint===c)return;const d=(c in s?s[c]:void 0)||e.originalParams,u=yx(e,o),p=yx(e,d),h=e.params.grabCursor,g=d.grabCursor,m=o.enabled;u&&!p?(i.classList.remove(`${o.containerModifierClass}grid`,`${o.containerModifierClass}grid-column`),e.emitContainerClasses()):!u&&p&&(i.classList.add(`${o.containerModifierClass}grid`),(d.grid.fill&&"column"===d.grid.fill||!d.grid.fill&&"column"===o.grid.fill)&&i.classList.add(`${o.containerModifierClass}grid-column`),e.emitContainerClasses()),h&&!g?e.unsetGrabCursor():!h&&g&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===d[t])return;const n=o[t]&&o[t].enabled,i=d[t]&&d[t].enabled;n&&!i&&e[t].disable(),!n&&i&&e[t].enable()}));const b=d.direction&&d.direction!==o.direction,f=o.loop&&(d.slidesPerView!==o.slidesPerView||b),x=o.loop;b&&n&&e.changeDirection(),gf(e.params,d);const y=e.params.enabled,v=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),m&&!y?e.disable():!m&&y&&e.enable(),e.currentBreakpoint=c,e.emit("_beforeBreakpoint",d),n&&(f?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!x&&v?(e.loopCreate(t),e.updateSlides()):x&&!v&&e.loopDestroy()),e.emit("breakpoint",d)},getBreakpoint:function(e,t,n){if(void 0===t&&(t="window"),!e||"container"===t&&!n)return;let o=!1;const i=cf(),s="window"===t?i.innerHeight:n.clientHeight,a=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:s*t,point:e}}return{value:e,point:e}}));a.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e<a.length;e+=1){const{point:s,value:r}=a[e];"window"===t?i.matchMedia(`(min-width: ${r}px)`).matches&&(o=s):r<=n.clientWidth&&(o=s)}return o||"max"}},checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:o}=n;if(o){const t=e.slides.length-1,n=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*o;e.isLocked=e.size>n}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:vx},jx={};class $x{constructor(){let e,t;for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];1===o.length&&o[0].constructor&&"Object"===Object.prototype.toString.call(o[0]).slice(8,-1)?t=o[0]:[e,t]=o,t||(t={}),t=gf({},t),e&&!t.el&&(t.el=e);const s=rf();if(t.el&&"string"==typeof t.el&&s.querySelectorAll(t.el).length>1){const e=[];return s.querySelectorAll(t.el).forEach((n=>{const o=gf({},t,{el:n});e.push(new $x(o))})),e}const a=this;a.__swiper__=!0,a.support=Kf(),a.device=Qf({userAgent:t.userAgent}),a.browser=Zf(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],t.modules&&Array.isArray(t.modules)&&a.modules.push(...t.modules);const r={};a.modules.forEach((e=>{e({params:t,swiper:a,extendParams:wx(t,r),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})}));const l=gf({},kx,r);return a.params=gf({},l,jx,t),a.originalParams=gf({},a.params),a.passedParams=gf({},t),a.params&&a.params.on&&Object.keys(a.params.on).forEach((e=>{a.on(e,a.params.on[e])})),a.params&&a.params.onAny&&a.onAny(a.params.onAny),Object.assign(a,{enabled:a.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===a.params.direction,isVertical:()=>"vertical"===a.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:n}=this,o=wf(xf(t,`.${n.slideClass}, swiper-slide`)[0]);return wf(e)-o}getSlideIndexByData(e){ |
| 357 |
return this.getSlideIndex(this.slides.find((t=>1*t.getAttribute("data-swiper-slide-index")===e)))}getSlideIndexWhenGrid(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&("column"===this.params.grid.fill?e=Math.floor(e/this.params.grid.rows):"row"===this.params.grid.fill&&(e%=Math.ceil(this.slides.length/this.params.grid.rows))),e}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=xf(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const o=n.minTranslate(),i=(n.maxTranslate()-o)*e+o;n.translateTo(i,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((n=>{const o=e.getSlideClasses(n);t.push({slideEl:n,classNames:o}),e.emit("_slideClass",n,o)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:n,slides:o,slidesGrid:i,slidesSizesGrid:s,size:a,activeIndex:r}=this;let l=1;if("number"==typeof n.slidesPerView)return n.slidesPerView;if(n.centeredSlides){let e,t=o[r]?Math.ceil(o[r].swiperSlideSize):0;for(let n=r+1;n<o.length;n+=1)o[n]&&!e&&(t+=Math.ceil(o[n].swiperSlideSize),l+=1,t>a&&(e=!0));for(let n=r-1;n>=0;n-=1)o[n]&&!e&&(t+=o[n].swiperSlideSize,l+=1,t>a&&(e=!0))}else if("current"===e)for(let e=r+1;e<o.length;e+=1)(t?i[e]+s[e]-i[r]<a:i[e]-i[r]<a)&&(l+=1);else for(let e=r-1;e>=0;e-=1)i[r]-i[e]<a&&(l+=1);return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;function o(){const t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}let i;if(n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach((t=>{t.complete&&tx(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n.freeMode&&n.freeMode.enabled&&!n.cssMode)o(),n.autoHeight&&e.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const t=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;i=e.slideTo(t.length-1,0,!1,!0)}else i=e.slideTo(e.activeIndex,0,!1,!0);i||o()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const n=this,o=n.params.direction;return e||(e="horizontal"===o?"vertical":"horizontal"),e===o||"horizontal"!==e&&"vertical"!==e||(n.el.classList.remove(`${n.params.containerModifierClass}${o}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if("string"==typeof n&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const o=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let i=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(o()):xf(n,o())[0];return!i&&t.params.createElements&&(i=vf("div",t.params.wrapperClass),n.append(i),xf(n,`.${t.params.slideClass}`).forEach((e=>{i.append(e)}))),Object.assign(t,{el:n,wrapperEl:i,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:i,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===kf(n,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===kf(n,"direction")),wrongRTL:"-webkit-box"===kf(i,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();const n=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&n.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach((e=>{e.complete?tx(t,e):e.addEventListener("load",(e=>{tx(t,e.target)}))})),ox(t),t.initialized=!0,ox(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const n=this,{params:o,el:i,wrapperEl:s,slides:a}=n;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),o.loop&&n.loopDestroy(),t&&(n.removeClasses(),i&&"string"!=typeof i&&i.removeAttribute("style"),s&&s.removeAttribute("style"),a&&a.length&&a.forEach((e=>{e.classList.remove(o.slideVisibleClass,o.slideFullyVisibleClass,o.slideActiveClass,o.slideNextClass,o.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),n.emit("destroy"),Object.keys(n.eventsListeners).forEach((e=>{n.off(e)})),!1!==e&&(n.el&&"string"!=typeof n.el&&(n.el.swiper=null),function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}(n)),n.destroyed=!0),null}static extendDefaults(e){gf(jx,e)}static get extendedDefaults(){return jx}static get defaults(){return kx}static installModule(e){$x.prototype.__modules__||($x.prototype.__modules__=[]);const t=$x.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>$x.installModule(e))),$x):($x.installModule(e),$x)}}Object.keys(Cx).forEach((e=>{Object.keys(Cx[e]).forEach((t=>{$x.prototype[t]=Cx[e][t]}))})),$x.use([function(e){let{swiper:t,on:n,emit:o}=e;const i=cf();let s=null,a=null;const r=()=>{t&&!t.destroyed&&t.initialized&&(o("beforeResize"),o("resize"))},l=()=>{t&&!t.destroyed&&t.initialized&&o("orientationchange")};n("init",(()=>{t.params.resizeObserver&&void 0!==i.ResizeObserver?t&&!t.destroyed&&t.initialized&&(s=new ResizeObserver((e=>{a=i.requestAnimationFrame((()=>{const{width:n,height:o}=t;let i=n,s=o;e.forEach((e=>{let{contentBoxSize:n,contentRect:o,target:a}=e;a&&a!==t.el||(i=o?o.width:(n[0]||n).inlineSize,s=o?o.height:(n[0]||n).blockSize)})),i===n&&s===o||r()}))})),s.observe(t.el)):(i.addEventListener("resize",r),i.addEventListener("orientationchange",l))})),n("destroy",(()=>{a&&i.cancelAnimationFrame(a),s&&s.unobserve&&t.el&&(s.unobserve(t.el),s=null),i.removeEventListener("resize",r),i.removeEventListener("orientationchange",l)}))},function(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;const s=[],a=cf(),r=function(e,n){void 0===n&&(n={});const o=new(a.MutationObserver||a.WebkitMutationObserver)((e=>{if(t.__preventObserver__)return;if(1===e.length)return void i("observerUpdate",e[0]);const n=function(){i("observerUpdate",e[0])};a.requestAnimationFrame?a.requestAnimationFrame(n):a.setTimeout(n,0)}));o.observe(e,{ |
| 358 |
attributes:void 0===n.attributes||n.attributes,childList:t.isElement||(void 0===n.childList||n).childList,characterData:void 0===n.characterData||n.characterData}),s.push(o)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),o("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=_f(t.hostEl);for(let t=0;t<e.length;t+=1)r(e[t])}r(t.hostEl,{childList:t.params.observeSlideChildren}),r(t.wrapperEl,{attributes:!1})}})),o("destroy",(()=>{s.forEach((e=>{e.disconnect()})),s.splice(0,s.length)}))}]);const Sx=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function Tx(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)&&!e.__swiper__}function Mx(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter((e=>n.indexOf(e)<0)).forEach((n=>{void 0===e[n]?e[n]=t[n]:Tx(t[n])&&Tx(e[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?e[n]=t[n]:Mx(e[n],t[n]):e[n]=t[n]}))}function Nx(e){return void 0===e&&(e={}),e.navigation&&void 0===e.navigation.nextEl&&void 0===e.navigation.prevEl}function Lx(e){return void 0===e&&(e={}),e.pagination&&void 0===e.pagination.el}function Ex(e){return void 0===e&&(e={}),e.scrollbar&&void 0===e.scrollbar.el}function Px(e){void 0===e&&(e="");const t=e.split(" ").map((e=>e.trim())).filter((e=>!!e)),n=[];return t.forEach((e=>{n.indexOf(e)<0&&n.push(e)})),n.join(" ")}function Ax(e){return void 0===e&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function Bx(){return Bx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Bx.apply(this,arguments)}function Ix(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function Ox(e){const t=[];return m.Children.toArray(e).forEach((e=>{Ix(e)?t.push(e):e.props&&e.props.children&&Ox(e.props.children).forEach((e=>t.push(e)))})),t}function Rx(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return m.Children.toArray(e).forEach((e=>{if(Ix(e))t.push(e);else if(e.props&&e.props.slot&&n[e.props.slot])n[e.props.slot].push(e);else if(e.props&&e.props.children){const o=Ox(e.props.children);o.length>0?o.forEach((e=>t.push(e))):n["container-end"].push(e)}else n["container-end"].push(e)})),{slides:t,slots:n}}function zx(e,t){return"undefined"==typeof window?(0,m.useEffect)(e,t):(0,m.useLayoutEffect)(e,t)}const Dx=(0,m.createContext)(null),Fx=(0,m.createContext)(null),Hx=(0,m.forwardRef)((function(e,t){let{className:n,tag:o="div",wrapperTag:i="div",children:s,onSwiper:a,...r}=void 0===e?{}:e,l=!1;const[c,d]=(0,m.useState)("swiper"),[u,p]=(0,m.useState)(null),[h,g]=(0,m.useState)(!1),b=(0,m.useRef)(!1),f=(0,m.useRef)(null),x=(0,m.useRef)(null),y=(0,m.useRef)(null),v=(0,m.useRef)(null),k=(0,m.useRef)(null),w=(0,m.useRef)(null),_=(0,m.useRef)(null),C=(0,m.useRef)(null),{params:j,passedParams:$,rest:S,events:T}=function(e,t){void 0===e&&(e={}),void 0===t&&(t=!0);const n={on:{}},o={},i={};Mx(n,kx),n._emitClasses=!0,n.init=!1;const s={},a=Sx.map((e=>e.replace(/_/,""))),r=Object.assign({},e);return Object.keys(r).forEach((r=>{void 0!==e[r]&&(a.indexOf(r)>=0?Tx(e[r])?(n[r]={},i[r]={},Mx(n[r],e[r]),Mx(i[r],e[r])):(n[r]=e[r],i[r]=e[r]):0===r.search(/on[A-Z]/)&&"function"==typeof e[r]?t?o[`${r[2].toLowerCase()}${r.substr(3)}`]=e[r]:n.on[`${r[2].toLowerCase()}${r.substr(3)}`]=e[r]:s[r]=e[r])})),["navigation","pagination","scrollbar"].forEach((e=>{!0===n[e]&&(n[e]={}),!1===n[e]&&delete n[e]})),{params:n,passedParams:i,rest:s,events:o}}(r),{slides:M,slots:N}=Rx(s),L=()=>{g(!h)};Object.assign(j.on,{_containerClasses(e,t){d(t)}});const E=()=>{Object.assign(j.on,T),l=!0;const e={...j};if(delete e.wrapperClass,x.current=new $x(e),x.current.virtual&&x.current.params.virtual.enabled){x.current.virtual.slides=M;const e={cache:!1,slides:M,renderExternal:p,renderExternalUpdate:!1};Mx(x.current.params.virtual,e),Mx(x.current.originalParams.virtual,e)}};return f.current||E(),x.current&&x.current.on("_beforeBreakpoint",L),(0,m.useEffect)((()=>()=>{x.current&&x.current.off("_beforeBreakpoint",L)})),(0,m.useEffect)((()=>{!b.current&&x.current&&(x.current.emitSlidesClasses(),b.current=!0)})),zx((()=>{if(t&&(t.current=f.current),f.current)return x.current.destroyed&&E(),function(e,t){let{el:n,nextEl:o,prevEl:i,paginationEl:s,scrollbarEl:a,swiper:r}=e;Nx(t)&&o&&i&&(r.params.navigation.nextEl=o,r.originalParams.navigation.nextEl=o,r.params.navigation.prevEl=i,r.originalParams.navigation.prevEl=i),Lx(t)&&s&&(r.params.pagination.el=s,r.originalParams.pagination.el=s),Ex(t)&&a&&(r.params.scrollbar.el=a,r.originalParams.scrollbar.el=a),r.init(n)}({el:f.current,nextEl:k.current,prevEl:w.current,paginationEl:_.current,scrollbarEl:C.current,swiper:x.current},j),a&&!x.current.destroyed&&a(x.current),()=>{x.current&&!x.current.destroyed&&x.current.destroy(!0,!1)}}),[]),zx((()=>{!l&&T&&x.current&&Object.keys(T).forEach((e=>{x.current.on(e,T[e])}));const e=function(e,t,n,o,i){const s=[];if(!t)return s;const a=e=>{s.indexOf(e)<0&&s.push(e)};if(n&&o){const e=o.map(i),t=n.map(i);e.join("")!==t.join("")&&a("children"),o.length!==n.length&&a("children")}return Sx.filter((e=>"_"===e[0])).map((e=>e.replace(/_/,""))).forEach((n=>{if(n in e&&n in t)if(Tx(e[n])&&Tx(t[n])){const o=Object.keys(e[n]),i=Object.keys(t[n]);o.length!==i.length?a(n):(o.forEach((o=>{e[n][o]!==t[n][o]&&a(n)})),i.forEach((o=>{e[n][o]!==t[n][o]&&a(n)})))}else e[n]!==t[n]&&a(n)})),s}($,y.current,M,v.current,(e=>e.key));return y.current=$,v.current=M,e.length&&x.current&&!x.current.destroyed&&function(e){let{swiper:t,slides:n,passedParams:o,changedParams:i,nextEl:s,prevEl:a,scrollbarEl:r,paginationEl:l}=e;const c=i.filter((e=>"children"!==e&&"direction"!==e&&"wrapperClass"!==e)),{params:d,pagination:u,navigation:p,scrollbar:h,virtual:g,thumbs:m}=t;let b,f,x,y,v,k,w,_;i.includes("thumbs")&&o.thumbs&&o.thumbs.swiper&&!o.thumbs.swiper.destroyed&&d.thumbs&&(!d.thumbs.swiper||d.thumbs.swiper.destroyed)&&(b=!0), |
| 359 |
i.includes("controller")&&o.controller&&o.controller.control&&d.controller&&!d.controller.control&&(f=!0),i.includes("pagination")&&o.pagination&&(o.pagination.el||l)&&(d.pagination||!1===d.pagination)&&u&&!u.el&&(x=!0),i.includes("scrollbar")&&o.scrollbar&&(o.scrollbar.el||r)&&(d.scrollbar||!1===d.scrollbar)&&h&&!h.el&&(y=!0),i.includes("navigation")&&o.navigation&&(o.navigation.prevEl||a)&&(o.navigation.nextEl||s)&&(d.navigation||!1===d.navigation)&&p&&!p.prevEl&&!p.nextEl&&(v=!0);const C=e=>{t[e]&&(t[e].destroy(),"navigation"===e?(t.isElement&&(t[e].prevEl.remove(),t[e].nextEl.remove()),d[e].prevEl=void 0,d[e].nextEl=void 0,t[e].prevEl=void 0,t[e].nextEl=void 0):(t.isElement&&t[e].el.remove(),d[e].el=void 0,t[e].el=void 0))};i.includes("loop")&&t.isElement&&(d.loop&&!o.loop?k=!0:!d.loop&&o.loop?w=!0:_=!0),c.forEach((e=>{if(Tx(d[e])&&Tx(o[e]))Object.assign(d[e],o[e]),"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e||!("enabled"in o[e])||o[e].enabled||C(e);else{const t=o[e];!0!==t&&!1!==t||"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e?d[e]=o[e]:!1===t&&C(e)}})),c.includes("controller")&&!f&&t.controller&&t.controller.control&&d.controller&&d.controller.control&&(t.controller.control=d.controller.control),i.includes("children")&&n&&g&&d.virtual.enabled?(g.slides=n,g.update(!0)):i.includes("virtual")&&g&&d.virtual.enabled&&(n&&(g.slides=n),g.update(!0)),i.includes("children")&&n&&d.loop&&(_=!0),b&&m.init()&&m.update(!0),f&&(t.controller.control=d.controller.control),x&&(!t.isElement||l&&"string"!=typeof l||(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(d.pagination.el=l),u.init(),u.render(),u.update()),y&&(!t.isElement||r&&"string"!=typeof r||(r=document.createElement("div"),r.classList.add("swiper-scrollbar"),r.part.add("scrollbar"),t.el.appendChild(r)),r&&(d.scrollbar.el=r),h.init(),h.updateSize(),h.setTranslate()),v&&(t.isElement&&(s&&"string"!=typeof s||(s=document.createElement("div"),s.classList.add("swiper-button-next"),Sf(s,t.hostEl.constructor.nextButtonSvg),s.part.add("button-next"),t.el.appendChild(s)),a&&"string"!=typeof a||(a=document.createElement("div"),a.classList.add("swiper-button-prev"),Sf(a,t.hostEl.constructor.prevButtonSvg),a.part.add("button-prev"),t.el.appendChild(a))),s&&(d.navigation.nextEl=s),a&&(d.navigation.prevEl=a),p.init(),p.update()),i.includes("allowSlideNext")&&(t.allowSlideNext=o.allowSlideNext),i.includes("allowSlidePrev")&&(t.allowSlidePrev=o.allowSlidePrev),i.includes("direction")&&t.changeDirection(o.direction,!1),(k||_)&&t.loopDestroy(),(w||_)&&t.loopCreate(),t.update()}({swiper:x.current,slides:M,passedParams:$,changedParams:e,nextEl:k.current,prevEl:w.current,scrollbarEl:C.current,paginationEl:_.current}),()=>{T&&x.current&&Object.keys(T).forEach((e=>{x.current.off(e,T[e])}))}})),zx((()=>{var e;!(e=x.current)||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.emit("_virtualUpdated"),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())}),[u]),m.createElement(o,Bx({ref:f,className:Px(`${c}${n?` ${n}`:""}`)},S),m.createElement(Fx.Provider,{value:x.current},N["container-start"],m.createElement(i,{className:Ax(j.wrapperClass)},N["wrapper-start"],j.virtual?function(e,t,n){if(!n)return null;const o=e=>{let n=e;return e<0?n=t.length+e:n>=t.length&&(n-=t.length),n},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:s,to:a}=n,r=e.params.loop?-t.length:0,l=e.params.loop?2*t.length:t.length,c=[];for(let e=r;e<l;e+=1)e>=s&&e<=a&&c.push(t[o(e)]);return c.map(((t,n)=>m.cloneElement(t,{swiper:e,style:i,key:t.props.virtualIndex||t.key||`slide-${n}`})))}(x.current,M,u):M.map(((e,t)=>m.cloneElement(e,{swiper:x.current,swiperSlideIndex:t}))),N["wrapper-end"]),Nx(j)&&m.createElement(m.Fragment,null,m.createElement("div",{ref:w,className:"swiper-button-prev"}),m.createElement("div",{ref:k,className:"swiper-button-next"})),Ex(j)&&m.createElement("div",{ref:C,className:"swiper-scrollbar"}),Lx(j)&&m.createElement("div",{ref:_,className:"swiper-pagination"}),N["container-end"]))}));Hx.displayName="Swiper";const Wx=(0,m.forwardRef)((function(e,t){let{tag:n="div",children:o,className:i="",swiper:s,zoom:a,lazy:r,virtualIndex:l,swiperSlideIndex:c,...d}=void 0===e?{}:e;const u=(0,m.useRef)(null),[p,h]=(0,m.useState)("swiper-slide"),[g,b]=(0,m.useState)(!1);function f(e,t,n){t===u.current&&h(n)}zx((()=>{if(void 0!==c&&(u.current.swiperSlideIndex=c),t&&(t.current=u.current),u.current&&s){if(!s.destroyed)return s.on("_slideClass",f),()=>{s&&s.off("_slideClass",f)};"swiper-slide"!==p&&h("swiper-slide")}})),zx((()=>{s&&u.current&&!s.destroyed&&h(s.getSlideClasses(u.current))}),[s]);const x={isActive:p.indexOf("swiper-slide-active")>=0,isVisible:p.indexOf("swiper-slide-visible")>=0,isPrev:p.indexOf("swiper-slide-prev")>=0,isNext:p.indexOf("swiper-slide-next")>=0},y=()=>"function"==typeof o?o(x):o;return m.createElement(n,Bx({ref:u,className:Px(`${p}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:()=>{b(!0)}},d),a&&m.createElement(Dx.Provider,{value:x},m.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":"number"==typeof a?a:void 0},y(),r&&!g&&m.createElement("div",{className:"swiper-lazy-preloader"}))),!a&&m.createElement(Dx.Provider,{value:x},y(),r&&!g&&m.createElement("div",{className:"swiper-lazy-preloader"})))}));Wx.displayName="SwiperSlide";const Ux=({attributes:e})=>{const{content:t,options:n}=e,o={"--swiper-wrapper-transition-timing-function":n?.easing},i=()=>(0,l.jsxs)(Hx,{style:o,modules:[Nf,Ef,Pf,Af,Bf,zf],slidesPerView:1,loop:n.isLoop,loopAddBlankSlides:!0,autoplay:!!n.isAutoplay&&{delay:n.autoPlaySpeed,reverseDirection:"slide"!==n.effect||"right"!==n.direction,pauseOnMouseEnter:n.isPauseOnHover},..."fade"===n.effect?{effect:"fade"}:{},speed:n.sliderSpeed,grabCursor:n.isGrabCursor,navigation:!!n.isArrows&&{prevEl:".custom-prev-btn",nextEl:".custom-next-btn"},className:"cttk-ticker-content-wrapper",children:[t?.map(((e,t)=>(0,l.jsx)(Wx,{children:(0,l.jsx)("a",{className:"cttk-ticker-link",...e.link.length>2?{href:e.link}:{},...e.link.length>2?{target:"_blank"}:{},children:e.text})},t))),!(t.length>1)&&(0,l.jsx)(Wx,{})]});return(0,l.jsx)(i,{})},Gx=({attributes:e})=>{const{options:t,arrows:n,badge:o}=e;return(0,l.jsx)("div",{className:"cttk-ticker-wrapper",children:(0,l.jsxs)("div",{className:"cttk-ticker-swiper-wrapper",children:[(0,l.jsx)("div",{className:"cttk-ticker-badge",children:o.text}),(0,l.jsx)(Ux,{attributes:e}),t.isArrows&&(0,l.jsxs)(l.Fragment,{children:[tf[n.icon].left,tf[n.icon].right]})]})})},Vx=e=>{const{top:t,right:n,bottom:o,left:i}=e;return`${t?"border-top-left-radius:"+t+";":""}\n\t${n?"border-top-right-radius:"+n+";":""}\n\t${o?"border-bottom-right-radius:"+o+";":""}\n\t${i?"border-bottom-left-radius:"+i+";":""}\n\t`.replace(/\s+/g," ").trim()},qx=({attributes:e,id:t})=>{const{badge:n,style:o,arrows:i,advanced:s}=e,a=`#${t} .cttk-ticker-wrapper .cttk-ticker-swiper-wrapper`,r=`${a} .cttk-ticker-badge`,c=`${a} .cttk-ticker-content-wrapper`,d=`${a} #cttk-nextBtn`,u=`${a} #cttk-prevBtn`,p=e=>`\n\t\t${na("height",jt(i[e].size)?i[e].size+"px":"")}\n\t\t${na("width",jt(i[e].size)?i[e].size+"px":"")}\n\t\t${na("font-size",jt(i[e].size)?i[e].size+"px":"")}\n\t\t${na("padding",ha(i[e].padding))}\n\t\t${na("color",i.normal.color)}\n\t\t${na("fill",i.normal.color)}\n\t\t${na("background",i.normal.bg)}\n\t\t${sa(i.normal.border)}\n\t\t${Vx(i.normal.borderRadius)}\n`,h=`\n\t\t${na("color",i.hover.color)}\n\t\t${na("fill",i.hover.color)}\n\t\t${na("background",i.hover.bg)}\n\t\t${sa(i.hover.border)}\n\t\t${Vx(i.hover.borderRadius)}\n`;return(0,l.jsx)("style",{ |
| 360 |
children:`\n\t\t${Ca(t,s)}\n\t\t${pa(r,n.typography)?.googleFontLink}\n\t\t${pa(`${c} a.cttk-ticker-link`,o.typography)?.googleFontLink}\n\t\t${pa(r,n.typography)?.styles}\n\t\t${r}{\n\t\t\t${na("width",n.desktop.width)}\n\t\t\t${na("height",n.desktop.height)}\n\t\t\t${na("color",n.color.text)}\n\t\t\t${na("padding",ha(n.desktop.padding))}\n\t\t\t${na("margin",ha(n.desktop.margin))}\n\t\t\t${sa(n.border)}\n\t\t\t${na("border-radius",ha(n.desktop.bRadius))}\n\t\t\t${oa(n.color.bg)}\n\t\t}\n\t\t${c}{\n\t\t\t${na("background-color",o.bg)}\n\t\t\t${na("padding",ha(o.padding.desktop))}\n\t\t\t${Vx(o.bRadius)}\n\t\t\twidth:calc(100% - ${jt(n.desktop.width)?n.desktop.width:"0px"});\n\t\t}\n\t\t${c} a.cttk-ticker-link{\n\t\t\t${na("color",o.color.normal)}\n\t\t\ttransition:all 0.2s ease-in-out;\n\t\t}\n\t\t${c} a.cttk-ticker-link:hover{\n\t\t\t${na("color",o.color.hover)}\n\t\t}\n\t\t${d}{\n\t\t\t${p("desktop")}\n\t\t\tright:${i.desktop.alignLeft}px;\n\t\t}\n\t\t${d}:hover{\n\t\t\t${h}\n\t\t}\n\t\t${u}{\n\t\t\t${p("desktop")}\n\t\t\tright:${i.desktop.alignRight}px;\n\t\t}\n\t\t${u}:hover{\n\t\t\t${h}\n\t\t}\n\n\t\t${pa(`${c} .cttk-ticker-link`,o.typography)?.styles}\n\n\t\t@media only screen and (min-width:641px) and (max-width: 1024px){\n\t\t\t${r}{\n\t\t\t\t${na("width",n.tablet.width)}\n\t\t\t\t${na("height",n.tablet.height)}\n\t\t\t\t${na("padding",ha(n.tablet.padding))}\n\t\t\t\t${na("margin",ha(n.tablet.margin))}\n\t\t\t\t${Vx(n.tablet.bRadius)}\n\t\t\t}\n\t\t\t${c}{\n\t\t\t\t${na("padding",ha(o.padding.tablet))}\n\t\t\t\twidth:calc(100% - ${jt(n.tablet.width)?n.tablet.width:"0px"});\n\t\t\t}\n\t\t\t${d}{\n\t\t\t\t${p("tablet")}\n\t\t\t\tright:${i.tablet.alignLeft}px;\n\t\t\t}\n\t\t\t${u}{\n\t\t\t\t${p("tablet")}\n\t\t\t\tright:${i.tablet.alignRight}px;\n\t\t\t}\n\t\t}\n\n\t\t@media only screen and (max-width: 640px){\n\t\t\t${r}{\n\t\t\t\t${na("width",n.mobile.width)}\n\t\t\t\t${na("height",n.mobile.height)}\n\t\t\t\t${na("padding",ha(n.mobile.padding))}\n\t\t\t\t${na("margin",ha(n.mobile.margin))}\n\t\t\t\t${Vx(n.mobile.bRadius)}\n\t\t\t}\n\t\t\t${c}{\n\t\t\t\t${na("padding",ha(o.padding.mobile))}\n\t\t\t\twidth:calc(100% - ${jt(n.mobile.width)?n.mobile.width:"0px"});\n\t\t\t}\n\t\t\t${d}{\n\t\t\t${p("mobile")}\n\t\t\t\tright:${i.mobile.alignLeft}px;\n\t\t\t}\n\t\t\t${u}{\n\t\t\t${p("mobile")}\n\t\t\t\tright:${i.mobile.alignRight}px;\n\t\t\t}\n\t\t}\n\t`})},Yx=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],Kx=[{label:(0,x.__)("Style 1","b-blocks"),value:"style1",icon:nf.style1.right},{label:(0,x.__)("Style 2","b-blocks"),value:"style2",icon:nf.style2.right},{label:(0,x.__)("Style 3","b-blocks"),value:"style3",icon:nf.style3.right},{label:(0,x.__)("Style 4","b-blocks"),value:"style4",icon:nf.style4.right},{label:(0,x.__)("Style 5","b-blocks"),value:"style5",icon:nf.style5.right},{label:(0,x.__)("Style 6","b-blocks"),value:"style6",icon:nf.style6.right}],Qx=[{value:"slide",label:"Slide"},{value:"fade",label:"Fade"}],Zx=[{value:"left",label:"Left"},{value:"right",label:"Right"}],Xx=[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Step Start","b-blocks"),value:"step-start"},{label:(0,x.__)("Step End","b-blocks"),value:"step-end"}],Jx=({options:e,value:t,tooltipPosition:n="top",label:o,onChange:i,...s})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:o}),(0,l.jsx)(y.ButtonGroup,{className:"bPlBtnGroup",children:Object.values(e).map((e=>(0,l.jsx)(y.Tooltip,{text:e.label,position:n,children:(0,l.jsx)(y.Button,{icon:e?.icon,isPrimary:t===e.value,"aria-pressed":t===e.value,isMedium:!0,onClick:()=>i(e.value),...s})},e.value)))})]}),ey=({attributes:e,setAttributes:t,index:n})=>{const{content:o}=e,i=o[n];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalInputControl,{label:(0,x.__)("Content","b-blocks"),className:"mt5",value:i.text,onChange:e=>t({content:be(o,e,n,"text")})}),(0,l.jsx)(y.__experimentalInputControl,{label:(0,x.__)("Link","b-blocks"),className:"mt10",value:i.link,onChange:e=>t({content:be(o,e,n,"link")})})]})},ty=({attributes:e,updateObj:t})=>{const{options:n}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Ticker Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{className:"mb10",label:(0,x.__)("Effect","b-blocks"),labelPosition:"edge",value:n.effect,options:Qx,onChange:e=>t("options",e,"effect")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Slider Speed(ms)","b-blocks"),value:n.sliderSpeed,onChange:e=>t("options",e,"sliderSpeed"),min:0,max:1e4}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Autoplay","b-blocks"),checked:n.isAutoplay,value:n.isAutoplay,onChange:e=>t("options",e,"isAutoplay")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",value:n.easing,options:Xx,onChange:e=>t("options",e,"easing")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Autoplay Speed(ms)","b-blocks"),value:n.autoPlaySpeed,onChange:e=>t("options",e,"autoPlaySpeed"),min:0,max:1e4}),n.isAutoplay&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pause On Hover","b-blocks"),checked:n.isPauseOnHover,value:n.isPauseOnHover,onChange:e=>t("options",e,"isPauseOnHover")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Infinite Loop","b-blocks"),checked:n.isLoop,value:n.isLoop,onChange:e=>t("options",e,"isLoop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Grab Cursor","b-blocks"),checked:n.isGrabCursor,value:n.isGrabCursor,onChange:e=>t("options",e,"isGrabCursor")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Navigation Arrows","b-blocks"),checked:n.isArrows,value:n.isArrows,onChange:e=>t("options",e,"isArrows")}),"slide"===n.effect&&(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Direction","b-blocks"),labelPosition:"edge",value:n.direction,options:Zx,onChange:e=>t("options",e,"direction")})]})})},ny=({attributes:e,setAttributes:t,updateObj:n})=>{const{badge:o,content:i,arrows:s}=e,a={text:`Ticker custom content ${i.length+1}`,link:"#",toggle:!1};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.__experimentalInputControl,{label:(0,x.__)("Badge Text","b-blocks"),className:"mt5",value:o.text,onChange:e=>n("badge",e,"text")}),(0,l.jsx)(_s,{attributes:e,setAttributes:t,newItem:a,design:"sortable",itemLabel:"Item",arrKey:"content",title:"text",ItemSettings:ey})]}),(0,l.jsx)(ty,{attributes:e,updateObj:n}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Arrows","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Jx,{label:(0,x.__)("Arrow Style:","slider"),value:s.icon,onChange:e=>n("arrows",e,"icon"),options:Kx})})]})},oy=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,device:t,updateObj:n})=>{const{arrows:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Arrows","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Arrows Size","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o[t].size,onChange:e=>n("arrows",e,t,"size")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Align Left Arrow","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o[t].alignLeft,onChange:e=>n("arrows",e,t,"alignLeft"),min:-50,max:200}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Align Right Arrow","b-blocks")," ",(0,l.jsx)(_,{})]}), |
| 361 |
value:o[t].alignRight,onChange:e=>n("arrows",e,t,"alignRight"),min:-50,max:200}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[t].padding,onChange:e=>n("arrows",e,"padding",t)}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:en,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Background","b-blocks"),value:o[e.name].bg,onChange:t=>n("arrows",t,e.name,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o[e.name].color,onChange:t=>n("arrows",t,e.name,"color")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o[e.name].border,onChange:t=>n("arrows",t,e.name,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:o[e.name].borderRadius,onChange:t=>n("arrows",t,e.name,"borderRadius")})]})})]})})),iy=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n})=>{const{badge:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Badge Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",value:o[n].width,onChange:e=>t("badge",e,n,"width")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o[n].height,labelPosition:"edge",onChange:e=>t("badge",e,n,"height")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:o.color.bg,onChange:e=>t("badge",e,"color","bg"),defaults:{color:"#0e0e0e"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o.color.text,onChange:e=>t("badge",e,"color","text"),default:"#00F"}),(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:o.typography,onChange:e=>t("badge",e,"typography")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[n].padding,onChange:e=>t("badge",e,n,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[n].margin,onChange:e=>t("badge",e,n,"margin")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("badge",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[n].bRadius,onChange:e=>t("badge",e,n,"bRadius")})]})})),sy=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n})=>{const{style:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content Style","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o.padding[n],resetValues:{top:"0px",right:"0px",bottom:"0px",left:"0px"},onChange:e=>t("style",e,"padding",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:o.bRadius,resetValues:{top:"0px",right:"0px",bottom:"0px",left:"0px"},onChange:e=>t("style",e,"bRadius")}),(0,l.jsx)(Ue,{label:(0,x.__)("Background","b-blocks"),value:o.bg,onChange:e=>t("style",e,"bg")}),(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:o.typography,onChange:e=>t("style",e,"typography")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini mt10",activeClass:"activeTab",tabs:en,onSelect:me,children:e=>(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:o.color[e.name],onChange:n=>t("style",n,"color",e.name)})})]})})),ay=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(iy,{...e}),(0,l.jsx)(sy,{...e}),(0,l.jsx)(oy,{...e})]}),ry=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,s=fe(t,n);return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡"," ",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:"bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Yx,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(ny,{...e,updateObj:s}),"style"===t.name&&(0,l.jsx)(ay,{...e,updateObj:s}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},ly=(0,f.withDispatch)(((e,t)=>({selectBlock:()=>{e("core/block-editor").selectBlock(t.clientId)}})))((e=>{const{attributes:t,setAttributes:n,clientId:o,selectBlock:i}=e,s=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ry,{attributes:t,setAttributes:n,isPremium:s}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),onClick:()=>i(o),children:[(0,l.jsx)(qx,{attributes:t,id:`block-${o}`}),(0,l.jsx)(Gx,{attributes:t})]})]})}));Nl(ef.name)&&(0,p.registerBlockType)(ef,{icon:pr,edit:ly}) |
| 362 |
;const cy=JSON.parse('{"apiVersion":3,"name":"b-blocks/countdown","title":"Countdown","description":"Display events date into a timer.","category":"bBlocks","keywords":["countdown timer","countdown events","set timer"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"destDate":{"type":"string","default":""},"layout":{"type":"string","default":"default"},"isResponsive":{"type":"boolean","default":true},"boxIsInline":{"type":"boolean","default":false},"boxPosition":{"type":"string","default":"center"},"isLabels":{"type":"boolean","default":true},"isDays":{"type":"boolean","default":true},"daysLabel":{"type":"string","default":"Days"},"isHours":{"type":"boolean","default":true},"hoursLabel":{"type":"string","default":"Hours"},"isMinutes":{"type":"boolean","default":true},"minutesLabel":{"type":"string","default":"Minutes"},"isSeconds":{"type":"boolean","default":true},"secondsLabel":{"type":"string","default":"Seconds"},"isExpired":{"type":"boolean","default":false},"hideOn0":{"type":"boolean","default":false},"hideOnMobile":{"type":"boolean","default":false},"hideOnTablet":{"type":"boolean","default":false},"prefixSuffixDirection":{"type":"string","default":"row"},"prefixText":{"type":"string","default":""},"suffixButtonText":{"type":"string","default":""},"suffixButtonUrl":{"type":"string","default":"#"},"addID":{"type":"string","default":""},"addClass":{"type":"string","default":""},"addCSS":{"type":"string","default":""},"width":{"type":"string","default":"0px"},"background":{"type":"object","default":{"color":"#0000"}},"padding":{"type":"object","default":{"vertical":"10px","horizontal":"15px"}},"shadow":{"type":"object","default":{}},"alignment":{"type":"string","default":"center"},"boxBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"boxWidth":{"type":"string","default":"170px"},"boxHeight":{"type":"string","default":"120px"},"boxSpace":{"type":"string","default":"30px"},"boxBorder":{"type":"object","default":{"radius":"5%"}},"boxShadow":{"type":"object","default":{}},"digitTypo":{"type":"object","default":{"fontSize":{"desktop":"48px","tablet":"40px","mobile":"32px"}}},"digitColor":{"type":"string","default":"#fff"},"labelTypo":{"type":"object","default":{"fontSize":{"desktop":"18px","tablet":"17px","mobile":"16px"}}},"labelColor":{"type":"string","default":"#fff"},"isDaysSingleStyle":{"type":"boolean","default":false},"daysBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"daysDigitColor":{"type":"string","default":"#fff"},"daysLabelColor":{"type":"string","default":"#fff"},"isHoursSingleStyle":{"type":"boolean","default":false},"hoursBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"hoursDigitColor":{"type":"string","default":"#fff"},"hoursLabelColor":{"type":"string","default":"#fff"},"isMinutesSingleStyle":{"type":"boolean","default":false},"minutesBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"minutesDigitColor":{"type":"string","default":"#fff"},"minutesLabelColor":{"type":"string","default":"#fff"},"isSecondsSingleStyle":{"type":"boolean","default":false},"secondsBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"secondsDigitColor":{"type":"string","default":"#fff"},"secondsLabelColor":{"type":"string","default":"#fff"},"isSep":{"type":"boolean","default":false},"sepType":{"type":"string","default":":"},"sepSize":{"type":"number","default":52},"sepColor":{"type":"string","default":"#146EF5"},"prefixTextTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"prefixTextColor":{"type":"string","default":"#222"},"suffixButtonTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"suffixButtonColors":{"type":"object","default":{"color":"#fff","bg":"#222"}},"suffixButtonPadding":{"type":"object","default":{"vertical":"14px","horizontal":"28px"}},"isDismiss":{"type":"boolean","default":false},"dismissColor":{"type":"string","default":"#333"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"boxWidth":"120px","boxHeight":"100px","boxSpace":"15px","destDate":""}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),dy=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Layout 1","b-blocks"),value:"layout1"},{label:(0,x.__)("Layout 2","b-blocks"),value:"layout2"},{label:(0,x.__)("Layout 3","b-blocks"),value:"layout3"}],uy=[{label:(0,x.__)("Dotted","b-blocks"),value:":"},{label:(0,x.__)("Dashed","b-blocks"),value:"-"},{label:(0,x.__)("Solid","b-blocks"),value:"|"}],py=[{label:(0,x.__)("Row","b-blocks"),value:"row"},{label:(0,x.__)("Column","b-blocks"),value:"column"}],hy=({attributes:e,setAttributes:t,isPremium:n})=>{const{destDate:i,layout:s,isResponsive:a,boxIsInline:c,boxPosition:d,isLabels:u,isDays:p,isHours:g,isMinutes:b,isSeconds:f,isExpired:k=!1,hideOn0:w=!1,hideOnMobile:_=!1,hideOnTablet:C=!1,prefixSuffixDirection:j="row",prefixText:$="",suffixButtonText:S="",suffixButtonUrl:T="#",addID:M="",addClass:N="",addCSS:L="",width:E,background:P,padding:A,shadow:B,alignment:I,boxBG:O,boxWidth:R,boxHeight:z,boxSpace:D,boxBorder:F,boxShadow:H,digitTypo:W,digitColor:U,labelTypo:G,labelColor:V,isDaysSingleStyle:q=!1,daysBG:Y={type:"gradient",gradient:r},daysDigitColor:K="#fff",daysLabelColor:Q="#fff",isHoursSingleStyle:Z=!1,hoursBG:X={type:"gradient",gradient:r},hoursDigitColor:J="#fff",hoursLabelColor:ee="#fff",isMinutesSingleStyle:te=!1,minutesBG:ne={type:"gradient",gradient:r},minutesDigitColor:oe="#fff",minutesLabelColor:ie="#fff",isSecondsSingleStyle:se=!1,secondsBG:ae={type:"gradient",gradient:r},secondsDigitColor:re="#fff",secondsLabelColor:le="#fff",isSep:ce,sepType:de,sepSize:ue,sepColor:pe,prefixTextTypo:he={fontSize:{desktop:15}},prefixTextColor:ge="#222",suffixButtonTypo:be={fontSize:{desktop:16}},suffixButtonColors:fe={color:"#fff",bg:"#222"},suffixButtonPadding:xe={vertical:"14px",horizontal:"28px"},isDismiss:ye=!1,dismissColor:ve="#333"}=e,[ke,we]=(0,m.useState)(!1),_e={isPremium:n,setIsProModalOpen:we};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:()=>me(),children:e=>(0,l.jsxs)(l.Fragment,{children:["general"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:cn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Countdown Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Destination Date:","b-blocks")}),(0,l.jsx)(y.DateTimePicker,{currentDate:i,onChange:e=>t({destDate:e}),is12Hour:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:s,onChange:e=>{t({layout:e}),"default"===e&&t({boxIsInline:!1,background:{type:"solid",color:"#0000"},shadow:{hOffset:"0px",vOffset:"0px",color:"#0000"},boxBG:{type:"gradient",color:o,gradient:r},boxSpace:"30px",boxBorder:{width:"0px",type:"solid",color:"#0000",radius:"5%"},digitColor:"#fff",labelColor:"#fff",isSep:!1,sepColor:o}),"layout1"===e&&t({boxIsInline:!1,background:{type:"gradient",gradient:r},shadow:{hOffset:"5px",vOffset:"5px",color:o},boxBG:{type:"solid",color:"#0000"},boxSpace:"0px",boxBorder:{width:"0px",type:"solid",color:"#0000",radius:"5%"},digitColor:"#fff",labelColor:"#fff",isSep:!0,sepColor:"#fff"}),"layout2"===e&&t({boxIsInline:!1,background:{type:"solid",color:"#0000"},shadow:{hOffset:"0px",vOffset:"0px",color:"#0000"},boxBG:{type:"solid", |
| 363 |
color:"#0000"},boxSpace:"30px",boxBorder:{width:"2px",type:"solid",color:o,radius:"5%"},digitColor:o,labelColor:o,isSep:!0,sepColor:o}),"layout3"===e&&t({boxIsInline:!0,background:{type:"solid",color:"#0000"},shadow:{hOffset:"0px",vOffset:"8px",blur:"15px",color:o},boxBG:{type:"solid",color:"#0000"},boxSpace:"30px",boxBorder:{width:"0px",type:"solid",color:"#0000",radius:"5%"},digitColor:o,labelColor:o,isSep:!0,sepColor:o})},options:dy})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Responsive on Mobile","b-blocks"),checked:a,onChange:e=>t({isResponsive:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Box Inline?","b-blocks"),checked:c,onChange:e=>t({boxIsInline:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Labels","b-blocks"),checked:u,onChange:e=>t({isLabels:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Days","b-blocks"),checked:p,onChange:e=>t({isDays:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Hours","b-blocks"),checked:g,onChange:e=>t({isHours:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Minutes","b-blocks"),checked:b,onChange:e=>t({isMinutes:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Seconds","b-blocks"),checked:f,onChange:e=>t({isSeconds:e})}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Show expired content on expire","b-blocks"),checked:k,onChange:e=>t({isExpired:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Hide box if value is 0","b-blocks"),checked:w,onChange:e=>t({hideOn0:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Hide Countdown on Mobile","b-blocks"),checked:_,onChange:e=>t({hideOnMobile:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Hide Countdown on Tablet","b-blocks"),checked:C,onChange:e=>t({hideOnTablet:e}),..._e,Component:y.ToggleControl})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Prefix & Suffix","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ys,{label:(0,x.__)("Prefix Suffix Direction:","b-blocks"),labelPosition:"left",value:j,onChange:e=>t({prefixSuffixDirection:e}),options:py,..._e,Component:y.SelectControl}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Prefix Text:","b-blocks"),value:$,onChange:e=>t({prefixText:e}),placeholder:(0,x.__)("Prefix/Before Text","b-blocks"),..._e,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Enter prefix text to show a message before countdown","b-blocks")}),(0,l.jsx)("hr",{}),(0,l.jsx)(Ys,{label:(0,x.__)("Suffix Button Text:","b-blocks"),value:S,onChange:e=>t({suffixButtonText:e}),placeholder:(0,x.__)("Suffix/After Button Text","b-blocks"),..._e,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Enter suffix button text to display a button after countdown","b-blocks")}),S&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Suffix Button Url:","b-blocks"),value:T,onChange:e=>t({suffixButtonUrl:e}),placeholder:(0,x.__)("Button url","b-blocks"),..._e,Component:y.TextControl})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Additional","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ys,{label:(0,x.__)("ID:","b-blocks"),value:M,onChange:e=>t({addID:e}),placeholder:(0,x.__)("Enter additional ID","b-blocks"),..._e,Component:y.TextControl}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Class:","b-blocks"),value:N,onChange:e=>t({addClass:e}),placeholder:(0,x.__)("Enter additional Class","b-blocks"),..._e,Component:y.TextControl}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("CSS:","b-blocks"),value:L,onChange:e=>t({addCSS:e}),placeholder:(0,x.__)("Enter additional CSS","b-blocks"),..._e,Component:y.TextareaControl})]})]}),"style"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Countdown","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:E,onChange:e=>t({width:e}),units:[Ee(900),Pe(100),Ae(56)],isResetValueOnUnitChange:!0}),(0,l.jsx)("small",{children:(0,x.__)("Keep width 0, to auto width.","b-blocks")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:P,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:A,onChange:e=>t({padding:e}),defaults:{vertical:"10px",horizontal:"15px"}}),(0,l.jsx)(nd,{label:(0,x.__)("Shadow:","b-blocks"),value:B,onChange:e=>t({shadow:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Boxes","b-blocks"),initialOpen:!1,children:[["0px","0%","0em"].includes(E)?"":(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Box Position:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:d,onChange:e=>t({boxPosition:e}),options:tn})]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:O,onChange:e=>t({boxBG:e}),defaults:{type:"gradient",color:o,gradient:r}}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:R,onChange:e=>t({boxWidth:e}),units:[Ee(170),Ae(10.5),Be(10.5)],isResetValueOnUnitChange:!0}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:z,onChange:e=>t({boxHeight:e}),units:[Ee(120),Ae(7.5),Be(7.5)],isResetValueOnUnitChange:!0}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Space Between Boxes:","b-blocks"),labelPosition:"left",value:D,onChange:e=>t({boxSpace:e}),units:[Ee(30),Ae(2),Be(2)],isResetValueOnUnitChange:!0}),(0,l.jsx)(Xc,{label:(0,x.__)("Border","b-blocks"),value:F,onChange:e=>t({boxBorder:e}),defaults:{radius:"5%"}}),(0,l.jsx)(nd,{label:(0,x.__)("Shadow:","b-blocks"),value:H,onChange:e=>t({boxShadow:e})})]}),p||g||b||f?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{label:(0,x.__)("Digit Typography:","b-blocks"),value:W,onChange:e=>t({digitTypo:e}),defaults:{fontSize:{desktop:48,tablet:40,mobile:32}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Digit Color:","b-blocks"),value:U,onChange:e=>t({digitColor:e}),defaultColor:"#fff"}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Os,{className:"mt20",label:(0,x.__)("Label Typography:","b-blocks"),value:G,onChange:e=>t({labelTypo:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Label Color:","b-blocks"),value:V,onChange:e=>t({labelColor:e}),defaultColor:"#fff"})]})]}):null,p&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Days Style","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(Ys,{label:(0,x.__)("Enable Single Style","b-blocks"),checked:q,onChange:e=>t({isDaysSingleStyle:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"bPlResetVal",icon:"image-rotate",label:(0,x.__)("Reset style according to parent","b-blocks"),tooltipPosition:"top right",onClick:()=>t({daysBG:O,daysDigitColor:U,daysLabelColor:V}),..._e,Component:y.Button})]}),q&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{label:(0,x.__)("Box Background:","b-blocks"),value:Y,onChange:e=>t({daysBG:e}),defaults:{type:"gradient",color:o,gradient:r},..._e,Component:An}),(0,l.jsx)(Ys,{label:(0,x.__)("Digit Color:","b-blocks"),value:K,onChange:e=>t({daysDigitColor:e}),defaultColor:"#fff",..._e,Component:Ue}),u&&(0,l.jsx)(Ys,{label:(0,x.__)("Label Color:","b-blocks"),value:Q,onChange:e=>t({daysLabelColor:e}),defaultColor:"#fff",..._e,Component:Ue})]})]}),g&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Hours Style","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(Ys,{label:(0,x.__)("Enable Single Style","b-blocks"),checked:Z,onChange:e=>t({isHoursSingleStyle:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"bPlResetVal", |
| 364 |
icon:"image-rotate",label:(0,x.__)("Reset style according to parent","b-blocks"),tooltipPosition:"top right",onClick:()=>t({hoursBG:O,hoursDigitColor:U,hoursLabelColor:V}),..._e,Component:y.Button})]}),Z&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{label:(0,x.__)("Box Background:","b-blocks"),value:X,onChange:e=>t({hoursBG:e}),defaults:{type:"gradient",color:o,gradient:r},..._e,Component:An}),(0,l.jsx)(Ys,{label:(0,x.__)("Digit Color:","b-blocks"),value:J,onChange:e=>t({hoursDigitColor:e}),defaultColor:"#fff",..._e,Component:Ue}),u&&(0,l.jsx)(Ys,{label:(0,x.__)("Label Color:","b-blocks"),value:ee,onChange:e=>t({hoursLabelColor:e}),defaultColor:"#fff",..._e,Component:Ue})]})]}),b&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Minutes Style","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(Ys,{label:(0,x.__)("Enable Single Style","b-blocks"),checked:te,onChange:e=>t({isMinutesSingleStyle:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"bPlResetVal",icon:"image-rotate",label:(0,x.__)("Reset style according to parent","b-blocks"),tooltipPosition:"top right",onClick:()=>t({minutesBG:O,minutesDigitColor:U,minutesLabelColor:V}),..._e,Component:y.Button})]}),te&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{label:(0,x.__)("Box Background:","b-blocks"),value:ne,onChange:e=>t({minutesBG:e}),defaults:{type:"gradient",color:o,gradient:r},..._e,Component:An}),(0,l.jsx)(Ys,{label:(0,x.__)("Digit Color:","b-blocks"),value:oe,onChange:e=>t({minutesDigitColor:e}),defaultColor:"#fff",..._e,Component:Ue}),u&&(0,l.jsx)(Ys,{label:(0,x.__)("Label Color:","b-blocks"),value:ie,onChange:e=>t({minutesLabelColor:e}),defaultColor:"#fff",..._e,Component:Ue})]})]}),f&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Seconds Style","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(Ys,{label:(0,x.__)("Enable Single Style","b-blocks"),checked:se,onChange:e=>t({isSecondsSingleStyle:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"bPlResetVal",icon:"image-rotate",label:(0,x.__)("Reset style according to parent","b-blocks"),tooltipPosition:"top right",onClick:()=>t({secondsBG:O,secondsDigitColor:U,secondsLabelColor:V}),..._e,Component:y.Button})]}),se&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{label:(0,x.__)("Box Background:","b-blocks"),value:ae,onChange:e=>t({secondsBG:e}),defaults:{type:"gradient",color:o,gradient:r},..._e,Component:An}),(0,l.jsx)(Ys,{label:(0,x.__)("Digit Color:","b-blocks"),value:re,onChange:e=>t({secondsDigitColor:e}),defaultColor:"#fff",..._e,Component:Ue}),u&&(0,l.jsx)(Ys,{label:(0,x.__)("Label Color:","b-blocks"),value:le,onChange:e=>t({secondsLabelColor:e}),defaultColor:"#fff",..._e,Component:Ue})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:ce,onChange:e=>t({isSep:e})}),ce&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:de,onChange:e=>t({sepType:e}),options:uy})]}),(0,l.jsx)(v,{children:(0,x.__)("Size:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:ue,onChange:e=>t({sepSize:e}),min:0,max:160,step:1,allowReset:!0,resetFallbackValue:48,initialPosition:48}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:pe,onChange:e=>t({sepColor:e}),defaultColor:o})]})]}),$&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Prefix Text","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ys,{label:(0,x.__)("Typography:","b-blocks"),value:he,onChange:e=>t({prefixTextTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}},..._e,Component:Os}),(0,l.jsx)(Ys,{label:(0,x.__)("Color:","b-blocks"),value:ge,onChange:e=>t({prefixTextColor:e}),defaultColor:"#222",..._e,Component:Ue})]}),S&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Suffix Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ys,{label:(0,x.__)("Typography:","b-blocks"),value:be,onChange:e=>t({suffixButtonTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}},..._e,Component:Os}),(0,l.jsx)(Ys,{value:fe,onChange:e=>t({suffixButtonColors:e}),defaults:{color:"#fff",bg:"#222"},..._e,Component:On}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:xe,onChange:e=>t({suffixButtonPadding:e}),defaults:{vertical:"14px",horizontal:"28px"},..._e,Component:od})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Dismiss Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ys,{label:(0,x.__)("Countdown Dismissible?","b-blocks"),checked:ye,onChange:e=>t({isDismiss:e}),..._e,Component:y.ToggleControl}),ye&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ys,{label:(0,x.__)("Color:","b-blocks"),value:ve,onChange:e=>t({dismissColor:e}),defaultColor:"#333",..._e,Component:Ue})})]})]})]})})}),(0,l.jsxs)(jn,{isProModalOpen:ke,setIsProModalOpen:we,block:"Countdown",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Expired Display: ","b-blocks")}),(0,x.__)("Show content that has expired after the countdown timer has elapsed.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Hide at Zero: ","b-blocks")}),(0,x.__)("Conceal the box when the countdown timer reaches 0.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Mobile Visibility: ","b-blocks")}),(0,x.__)("Toggle visibility of the countdown timer on mobile devices.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Tablet Visibility: ","b-blocks")}),(0,x.__)("Toggle visibility of the countdown timer on tablet devices.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Prefix Text: ","b-blocks")}),(0,x.__)("Display text before the countdown timer.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Prefix Style: ","b-blocks")}),(0,x.__)("Implement typography settings and adjust the color for the prefix text.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Suffix Button: ","b-blocks")}),(0,x.__)("Show a button after the countdown timer.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Suffix Button Style: ","b-blocks")}),(0,x.__)("Apply typography, colors(text and background) and padding for the suffix button.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Prefix Suffix Direction: ","b-blocks")}),(0,x.__)("Direction of the content displayed before and after the countdown timer.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Single Style: ","b-blocks")}),(0,x.__)("Apply different styles to each box, including variations in background, digit color, and label color.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Dismiss Button: ","b-blocks")}),(0,x.__)("Provide a button to dismiss/hide the countdown timer.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Patterns: ","b-blocks")}),(0,x.__)("Additional patterns for expanding the variety of countdown styles.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Shortcode Integration: ","b-blocks")}),(0,x.__)("Shortcode for flexible use across various locations.","b-blocks")]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:I,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Countdown Alignment"),alignmentControls:[{title:(0,x.__)("Countdown in left","b-blocks"),align:"flex-start",icon:"align-left"},{title:(0,x.__)("Countdown in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Countdown in right","b-blocks"),align:"flex-end",icon:"align-right"}]})})]}) |
| 365 |
},gy="bBlocksCountdown",my=({attributes:e,id:t})=>{const{boxPosition:n,prefixSuffixDirection:o="row",prefixText:i="",suffixButtonText:s="",addCSS:a="",width:c,background:d,padding:u,shadow:p,alignment:h,boxBG:g,boxWidth:m,boxHeight:b,boxSpace:f,boxBorder:x,boxShadow:y,digitTypo:v,digitColor:k,labelTypo:w,labelColor:_,isDaysSingleStyle:C=!1,daysBG:j={type:"gradient",gradient:r},daysDigitColor:$="#fff",daysLabelColor:S="#fff",isHoursSingleStyle:T=!1,hoursBG:M={type:"gradient",gradient:r},hoursDigitColor:N="#fff",hoursLabelColor:L="#fff",isMinutesSingleStyle:E=!1,minutesBG:P={type:"gradient",gradient:r},minutesDigitColor:A="#fff",minutesLabelColor:B="#fff",isSecondsSingleStyle:I=!1,secondsBG:O={type:"gradient",gradient:r},secondsDigitColor:R="#fff",secondsLabelColor:z="#fff",sepType:D,sepSize:F,sepColor:H,prefixTextTypo:W={fontSize:{desktop:15}},prefixTextColor:U="#222",suffixButtonTypo:G={fontSize:{desktop:16}},suffixButtonColors:V={color:"#fff",bg:"#222"},suffixButtonPadding:q={vertical:"14px",horizontal:"28px"},dismissColor:Y="#333"}=e,K=`#${t}`,Q=`${K} .countdownItems`,Z=`${Q} .countdownItem`,X=`${K} .${gy}`,J=(e,t,n,o,i)=>e?`${Q} .${t}{\n\t\t${oa(n)}\n\t}\n\t${Q} .${t} .digit{\n\t\tcolor: ${o};\n\t}\n\t${Q} .${t} .label{\n\t\tcolor: ${i};\n\t}`:"";return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",v)?.googleFontLink}\n\t\t${pa("",w)?.googleFontLink}\n\t\t${pa("",W)?.googleFontLink}\n\t\t${pa("",G)?.googleFontLink}\n\t\t${pa(`${Z} .digit`,v)?.styles}\n\t\t${pa(`${Z} .label`,w)?.styles}\n\t\t${pa(`${X} .prefixText`,W)?.styles}\n\t\t${pa(`${X} .suffixButton`,G)?.styles}\n\n\t\t${K}{\n\t\t\talign-items: ${h};\n\t\t\tjustify-content: ${h};\n\t\t}\n\t\t${X}{\n\t\t\tflex-direction: ${o};\n\t\t\tjustify-content: ${i||s?"space-between":"center"};\n\t\t\twidth: ${["0px","0%","0em"].includes(c)?"auto":c};\n\t\t\t${oa(d)}\n\t\t\tpadding: ${ua(u)};\n\t\t\tbox-shadow: ${da(p)};\n\t\t}\n\t\t${Q}{\n\t\t\tjustify-content: ${n};\n\t\t\tgap: ${f};\n\t\t\tmargin: ${i||s?"column"===o?"20px 0":"0 20px":"0"}\n\t\t}\n\t\t${Z}{\n\t\t\t${oa(g)}\n\t\t\twidth: ${m};\n\t\t\theight: ${b};\n\t\t\t${ia(x)}\n\t\t\tbox-shadow: ${da(y)};\n\t\t}\n\t\t${Z} .digit{\n\t\t\tcolor: ${k};\n\t\t}\n\t\t${Z} .label{\n\t\t\tcolor: ${_};\n\t\t}\n\t\t${J(C,"countdownDays",j,$,S)}\n\t\t${J(T,"countdownHours",M,N,L)}\n\t\t${J(E,"countdownMinutes",P,A,B)}\n\t\t${J(I,"countdownSeconds",O,R,z)}\n\n\t\t${Q} .separator::before{\n\t\t\tcontent: '${D}';\n\t\t\tfont-size: ${F}px;\n\t\t\tcolor: ${H};\n\t\t}\n\t\t${X} .prefixText{\n\t\t\tcolor: ${U};\n\t\t}\n\t\t${X} .suffixButton{\n\t\t\t${aa(V)}\n\t\t\tpadding: ${ua(q)};\n\t\t}\n\t\t${X} .countdownClose{\n\t\t\tfill: ${Y};\n\t\t}\n\t\t${a}\n\t\t`.replace(/\s+/g," ")}})},by=e=>e>(new Date).getTime()?(e-(new Date).getTime())/1e3:0,fy=e=>Math.floor(e%86400/3600),xy=e=>Math.floor(e%3600/60),yy=e=>Math.floor(e%60),vy=e=>e<10?("0"+e).slice(-2):e,ky=(window.matchMedia("(max-width: 640px)"),window.matchMedia("(max-width: 1024px)"),(e,t=!0,n=!0,o=!0)=>{const i=(s=e,Math.floor(s/86400));var s;const a=t?fy(e):24*i+fy(e),r=n?xy(e):60*a+xy(e),l=o?yy(e):60*r+yy(e);return{days:i,hours:a,minutes:r,seconds:l,expired:!(i+a+r+l>0)}}),wy=(e,t=!0,n=!0,o=!0)=>{const[i,s]=(0,m.useState)(by(e));return(0,m.useEffect)((()=>{const t=setInterval((()=>{s(by(e))}),1e3);return()=>clearInterval(t)}),[e]),ky(i,t,n,o)},_y=({attributes:e,Box:t,isBackend:n=!1,custom:o={}})=>{const{destDate:i,boxIsInline:s,isLabels:a,isDays:r,daysLabel:c,isHours:d,hoursLabel:u,isMinutes:p,minutesLabel:h,isSeconds:g,secondsLabel:m,hideOn0:b,isSep:f}=e,x=new Date(i).getTime(),{days:y,hours:v,minutes:k,seconds:w}=wy(x,r,d,p),_=s?"inline":"",C=b&&0===y,j=b&&0===y+v,$=b&&0===y+v+k,S=b&&0===y+v+k+w;return(0,l.jsxs)(l.Fragment,{children:[!C&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t,{is:r,boxClass:`countdownDays ${_}`,digit:vy(y),isLabels:a,label:c,onChange:e=>n&&o.setAttributes({daysLabel:e})}),f&&r&&(d||p||g)&&(0,l.jsx)("span",{className:"separator"})]}),!j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t,{is:d,boxClass:`countdownHours ${_}`,digit:vy(v),isLabels:a,label:u,onChange:e=>n&&o.setAttributes({hoursLabel:e})}),f&&d&&(p||g)&&(0,l.jsx)("span",{className:"separator"})]}),!$&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t,{is:p,boxClass:`countdownMinutes ${_}`,digit:vy(k),isLabels:a,label:h,onChange:e=>n&&o.setAttributes({minutesLabel:e})}),f&&p&&g&&(0,l.jsx)("span",{className:"separator"})]}),!S&&(0,l.jsx)(t,{is:g,boxClass:`countdownSeconds ${_}`,digit:vy(w),isLabels:a,label:m,onChange:e=>n&&o.setAttributes({secondsLabel:e})})]})},Cy=({attributes:e,Box:t,closeEl:n,isBackend:o=!1,custom:i={},children:s})=>{const{destDate:a,isResponsive:r,isExpired:c,prefixText:d,suffixButtonText:u,suffixButtonUrl:p,addID:h,addClass:g,isDismiss:m}=e,b=new Date(a).getTime(),{expired:f}=wy(b);return(0,l.jsxs)("div",{className:`${gy} ${g}`,id:h,children:[c&&f?s:(0,l.jsxs)(l.Fragment,{children:[d&&(0,l.jsx)("p",{className:"prefixText",dangerouslySetInnerHTML:{__html:St(d)}}),(0,l.jsx)("div",{className:"countdownItems "+(r?`${gy}Responsive`:""),children:(0,l.jsx)(_y,{attributes:e,Box:t,isBackend:o,custom:i})}),u&&(0,l.jsx)("a",{className:"suffixButton",href:$t(p),children:u})]}),m&&n]})},jy=(0,l.jsx)("svg",{className:"countdownClose",xmlns:"http://www.w3.org/2000/svg",width:22,height:22,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M256,31C131.7,31,31,131.7,31,256s100.7,225,225,225s225-100.7,225-225S380.3,31,256,31z M366.3,315.1 c4.3,4.3,4.3,11.2,0,15.4l-35.9,35.8c-4.3,4.3-11.2,4.3-15.4,0l-59-59.5l-59.1,59.5c-4.3,4.3-11.2,4.3-15.4,0l-35.8-35.9 c-4.3-4.3-4.3-11.2,0-15.4l59.5-59l-59.5-59.1c-4.3-4.3-4.3-11.2,0-15.4l35.9-35.9c4.3-4.3,11.2-4.3,15.4,0l59,59.6l59.1-59.5 c4.3-4.3,11.2-4.3,15.4,0l35.9,35.9c4.3,4.3,4.3,11.2,0,15.4l-59.6,59L366.3,315.1z"})}),$y=e=>{const{is:t,boxClass:n,digit:o,isLabels:i,label:s,onChange:a}=e;return t&&(0,l.jsxs)("div",{className:`countdownItem ${n}`,children:[(0,l.jsx)("span",{className:"digit",children:o}),i&&(0,l.jsx)(h.RichText,{className:"label",tagName:"span",value:s,onChange:e=>a(e),placeholder:(0,x.__)("Label","countdown-time")})]})};Nl(cy.name)&&(0,p.registerBlockType)(cy,{icon:hr,transforms:{from:[{type:"block",blocks:["ctb/countdown-time"],transform:e=>(0,p.createBlock)("b-blocks/countdown",e)},{type:"prefix",prefix:"count",transform:()=>(0,p.createBlock)("b-blocks/countdown")}],to:[{type:"block",blocks:["ctb/countdown-time"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("ctb/countdown-time",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{destDate:i}=t,s=bBlocksPremiumChecker;return(0,m.useEffect)((()=>{""===i&&n({destDate:new Date((new Date).setDate((new Date).getDate()+2))})}),[i]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(hy,{attributes:t,setAttributes:n,isPremium:s}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(my,{attributes:t,id:`block-${o}`}),(0,l.jsx)(Cy,{attributes:t,Box:$y,closeEl:(0,l.jsx)(y.Tooltip,{text:"Hide will only work in frontend",placement:"top",position:"top",children:jy}),isBackend:!0,custom:{setAttributes:n},children:(0,l.jsx)("div",{className:"countdownExpired",children:(0,l.jsx)(h.InnerBlocks,{template:[["core/heading",{content:"Oops! the offers just expired!",textAlign:"center",level:3,style:{color:{text:"#dc3545"}}}],["core/paragraph",{content:"But don't worry! we will announce next offer as soon as possible. Stay with us.",style:{color:{text:"#222"}}}]]})})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})}) |
| 366 |
;const Sy=JSON.parse('{"apiVersion":3,"name":"b-blocks/counters","title":"Counters","description":"Display Number as animated counter.","category":"bBlocks","keywords":["counter","number counter","at a glance"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"counters":{"type":"array","default":[{"background":{"color":"#146EF5"},"icon":{"class":"fa fa-puzzle-piece","fontSize":50,"color":"#fff"},"number":{"start":0,"end":30,"prefix":"","suffix":"+","color":"#fff"},"label":{"text":"Products","color":"#fff"}},{"background":{"color":"#146EF5"},"icon":{"class":"fa fa-thumbs-up","fontSize":50,"color":"#fff"},"number":{"start":0,"end":380,"prefix":"","suffix":"K+","color":"#fff"},"label":{"text":"Customers","color":"#fff"}},{"background":{"color":"#146EF5"},"icon":{"class":"fa fa-award","fontSize":50,"color":"#fff"},"number":{"start":0,"end":90,"prefix":"","suffix":"","color":"#fff"},"label":{"text":"Awards","color":"#fff"}}]},"theme":{"type":"string","default":"default"},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"20px"},"rowGap":{"type":"string","default":"30px"},"duration":{"type":"number","default":2000},"separator":{"type":"object","default":{"char":""}},"background":{"type":"object","default":{"color":"#0000"}},"padding":{"type":"object","default":{"vertical":"20px","horizontal":"0px"}},"textAlign":{"type":"string","default":"center"},"counterWidth":{"type":"string","default":"250px"},"counterHeight":{"type":"string","default":"250px"},"isIcon":{"type":"boolean","default":true},"iconSize":{"type":"number","default":50},"iconPosition":{"type":"string","default":"top"},"numberTypo":{"type":"object","default":{"fontSize":{"desktop":"48px","tablet":"40px","mobile":"32px"}}},"isLabel":{"type":"boolean","default":true},"labelTypo":{"type":"object","default":{"fontSize":{"desktop":"22px","tablet":"20px","mobile":"18px"}}},"counterPadding":{"type":"object","default":{"vertical":"20px","horizontal":"20px"}},"counterBorder":{"type":"object","default":{"radius":"50%"}},"counterShadow":{"type":"object","default":{}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),Ty=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Theme 1","b-blocks"),value:"theme1"},{label:(0,x.__)("Theme 2","b-blocks"),value:"theme2"},{label:(0,x.__)("Theme 3","b-blocks"),value:"theme3"}],My=[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Label","b-blocks"),value:"label"}],Ny=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Coma (1,000)","b-blocks"),value:","},{label:(0,x.__)("Space (1 000)","b-blocks"),value:" "}],Ly=e=>{const{attributes:t,setAttributes:n,index:o}=e,{counters:i}=t,s=i[o],{background:a,icon:r,number:c,label:d}=s,u=(e,t,...s)=>{n({counters:be(i,t,o,e,...s)})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:a,onChange:e=>u("background",e),defaults:{color:"#0000"}}),(0,l.jsx)(Un,{label:(0,x.__)("Icon:","b-blocks"),value:r,onChange:e=>u("icon",e),defaults:{class:"fa fa-award",fontSize:50,color:"#fff"},isSize:!1}),(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Start Number:","b-blocks"),labelPosition:"left",className:"mt20",value:c.start,onChange:e=>u("number",parseFloat(e),"start")}),(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("End Number:","b-blocks"),labelPosition:"left",className:"mt20",value:c.end,onChange:e=>u("number",parseFloat(e),"end")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Prefix:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:c.prefix,onChange:e=>u("number",e,"prefix")})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Suffix:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:c.suffix,onChange:e=>u("number",e,"suffix")})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Number Color:","b-blocks"),value:c.color,onChange:e=>u("number",e,"color"),defaultColor:"#fff"}),(0,l.jsx)(Ue,{label:(0,x.__)("Label Color:","b-blocks"),value:d.color,onChange:e=>u("label",e,"color"),defaultColor:"#fff"})]})},Ey=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:i,isPremium:s,device:a})=>{const{counters:r=[],theme:c,columns:d,columnGap:u,rowGap:p,duration:g,separator:m,background:b,padding:f,counterWidth:k,counterHeight:w,textAlign:C,isIcon:j,iconSize:$,iconPosition:S,numberTypo:T,isLabel:M,labelTypo:N,counterPadding:L,counterBorder:E,counterShadow:P}=e,A={background:{color:o},icon:{class:"fa fa-award",fontSize:50,color:"#fff"},number:{start:0,end:300,prefix:"",suffix:"",color:"#fff"},label:{text:"Awards",color:"#fff"}},B=e=>{const n=Ob(r,(t=>{t.map(((n,o)=>{for(const n of e){const e=n[0],i=n[1];t[o][e]=i}}))}));t({counters:n})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:h=>(0,l.jsxs)(l.Fragment,{children:["general"===h.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:dn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove counters","b-blocks"),children:[(0,l.jsx)(_s,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:i,arrKey:"counters",ItemSettings:Ly,itemLabel:"Counter",newItem:A,design:s?"sortable":"single"}),!s&&(0,l.jsxs)("small",{children:[" ",(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"__blank",children:"Upgrade to Premium"})})," to unlock sorting and more features."]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Theme:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:c,onChange:e=>{t({theme:e}),"default"===e&&t({background:{...b,type:"solid",color:"#0000"},padding:{...f,vertical:"20px",horizontal:"0px"},counterHeight:"250px",counterBorder:{...E,width:"0px",color:"#0000",radius:"50%"},iconPosition:"top",iconSize:50}),"theme1"===e&&t({background:{...b,type:"solid",color:"#0000"},padding:{...f,vertical:"20px",horizontal:"0px"},counterHeight:"175px",counterBorder:{...E,width:"0px",color:"#0000",radius:"5px"},iconPosition:"label",iconSize:N?.fontSize}),"theme2"===e&&t({background:{...b,type:"solid",color:"#0000"},padding:{...f,vertical:"20px",horizontal:"0px"},counterHeight:"175px",counterBorder:{...E,width:"2px",color:o,radius:"5px"},iconPosition:"label",iconSize:N?.fontSize}),"theme3"===e&&t({background:{...b,type:"image",image:{url:"https://i.imgur.com/n8bbzIE.jpeg"},overlayColor:"#000000b3"},padding:{...f,vertical:"140px",horizontal:"0px"},counterHeight:"250px",counterBorder:{...E,width:"0px",color:"#0000",radius:"50%"},iconPosition:"top",iconSize:50}),r?.map((t=>{const{background:n,icon:i,number:s,label:a}=t,r=[["background",{...n,type:"solid",color:o}],["icon",{...i,color:"#fff"}],["number",{...s,color:"#fff"}],["label",{...a,color:"#fff"}]],l=[["background",{...n,type:"solid",color:o}],["icon",{...i,color:"#fff"}],["number",{...s,color:"#fff"}],["label",{...a,color:"#fff"}]],c=[["background",{...n,type:"solid",color:"#0000"}],["icon",{...i,color:o}],["number",{...s,color:o}],["label",{...a,color:o}]],d=[["background",{...n,type:"solid",color:"#0000"}],["icon",{...i,color:"#fff"}],["number",{...s,color:"#fff"}],["label",{...a,color:"#fff"}]];"default"===e&&B(r),"theme1"===e&&B(l),"theme2"===e&&B(c),"theme3"===e&&B(d)}))},options:Ty})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:d[a],onChange:e=>{t({columns:{ |
| 367 |
...d,[a]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({columnGap:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({rowGap:e}),units:[Ee(),Pe(),Ae()]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Counters Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Duration:","b-blocks"),labelPosition:"left",value:g,onChange:e=>t({duration:parseFloat(e)})}),(0,l.jsx)("small",{children:(0,x.__)("Duration in milliseconds:","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Separator","b-blocks"),labelPosition:"left",value:m.char,onChange:e=>t({separator:{...m,char:e}}),options:Ny})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Counter Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:j,onChange:e=>t({isIcon:e})}),(0,l.jsx)(v,{children:(0,x.__)("Icon Size:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:$,onChange:e=>t({iconSize:e}),min:0,max:400,step:1,allowReset:!0,resetFallbackValue:50,initialPosition:50}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Icon Position:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:S,onChange:e=>{t({iconPosition:e}),"top"===e&&t({iconSize:50}),"label"===e&&t({iconSize:N?.fontSize})},options:My})]}),(0,l.jsx)(Os,{className:"mt20",label:(0,x.__)("Number Typography:","b-blocks"),value:T,onChange:e=>t({numberTypo:e}),defaults:{fontSize:{desktop:48,tablet:40,mobile:32}}}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Label","b-blocks"),checked:M,onChange:e=>t({isLabel:e})}),M&&(0,l.jsx)(Os,{label:(0,x.__)("Label Typography:","b-blocks"),value:N,onChange:e=>t({labelTypo:e}),defaults:{fontSize:{desktop:22,tablet:20,mobile:18}}})]})]}),"style"===h.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Counters","b-blocks"),children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:b,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:f,onChange:e=>t({padding:e}),defaults:{vertical:"20px",horizontal:"0px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Single Counter","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:k,onChange:e=>t({counterWidth:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:w,onChange:e=>t({counterHeight:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:L,onChange:e=>t({counterPadding:e}),defaults:{vertical:"20px",horizontal:"20px"}}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:E,onChange:e=>t({counterBorder:e}),defaults:{radius:"50%"}}),(0,l.jsx)(nd,{label:(0,x.__)("Shadow:","b-blocks"),value:P,onChange:e=>t({counterShadow:e})})]})]})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Counter","b-blocks"),onClick:()=>t({counters:[...r,A]}),children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:C,onChange:e=>t({textAlign:e})})]})]})})),Py="bBlocksCounters",Ay=({attributes:e,id:t})=>{const{counters:n=[],columnGap:o,rowGap:i,background:s,padding:a,textAlign:r,counterWidth:c,counterHeight:d,iconSize:u,numberTypo:p,labelTypo:h,counterPadding:g,counterBorder:m,counterShadow:b}=e,f=`#${t}`,x=`${f} .${Py}`,y=`${x} .counter`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",p)?.googleFontLink}\n\t\t${pa("",h)?.googleFontLink}\n\t\t${pa(`${y} .counterNumber`,p)?.styles}\n\t\t${pa(`${y} .counterLabel`,h)?.styles}\n\t\t\n\t\t${x}{\n\t\t\tgrid-gap: ${i} ${o};\n\t\t\t${oa(s)}\n\t\t\tpadding: ${ua(a)};\n\t\t}\n\t\t${y}{\n\t\t\ttext-align: ${r};\n\t\t\twidth: ${"0px"===c||"0%"===c||"0em"===c?"250px":c};\n\t\t\theight: ${"0px"===d||"0%"===d||"0em"===d?"250px":d};\n\t\t\tpadding: ${ua(g)};\n\t\t\t${ia(m)}\n\t\t\tbox-shadow: ${da(b)};\n\t\t}\n\t\t${y} .counterIcon,\n\t\t${y} .counterIconLabel{\n\t\t\tfont-size: ${u||50}px;\n\t\t}\n\n\t\t${n?.map(((e,t)=>{const{background:n,icon:o,number:i,label:s}=e,a=`${f} #counter-${t}`;return`\n\t\t\t\t${a} .counter{\n\t\t\t\t\t${oa(n)}\n\t\t\t\t}\n\t\t\t\t${a} .counterIcon i,\n\t\t\t\t${a} .counterIconLabel i{\n\t\t\t\t\t${ra(o)}\n\t\t\t\t\tfont-size: inherit;\n\t\t\t\t}\n\t\t\t\t${a} .counterNumber{\n\t\t\t\t\tcolor: ${i.color};\n\t\t\t\t}\n\t\t\t\t${a} .counterLabel{\n\t\t\t\t\tcolor: ${s.color};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},By=({attributes:e,counter:t,index:n,labelEl:o,isBackend:i=!1,custom:s={}})=>{const{isIcon:a,iconPosition:r}=e,{icon:c,number:d}=t,{start:u,end:p,prefix:h,suffix:g}=d,m=c?.class&&(0,l.jsx)("i",{className:c.class});return(0,l.jsx)("div",{onClick:()=>i?s.setActiveIndex(n):null,className:i&&n===s.activeIndex?"bPlNowEditing":"",id:`counter-${n}`,children:(0,l.jsxs)("div",{className:"counter",children:[a&&"top"===r&&(0,l.jsx)("div",{className:"counterIcon",children:m}),(0,l.jsxs)("div",{className:"counterNumber",children:[(0,l.jsx)("span",{className:"prefix",children:h}),(0,l.jsx)("span",{className:"number","data-count-start":u,"data-count-end":p,children:u}),(0,l.jsx)("span",{className:"suffix",children:g})]}),"label"===r?(0,l.jsxs)("div",{className:"counterIconLabel",children:[m,o]}):o]})})},Iy=(e,t)=>{const{char:n=""}=t;return n?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,n):e};Nl(Sy.name)&&(0,p.registerBlockType)(Sy,{icon:gr,transforms:{from:[{type:"block",blocks:["ctrb/counters"],transform:e=>(0,p.createBlock)("b-blocks/counters",e)},{type:"prefix",prefix:"counter",transform:()=>(0,p.createBlock)("b-blocks/counters")}],to:[{type:"block",blocks:["ctrb/counters"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("ctrb/counters",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{counters:i=[],columns:s,duration:a,separator:r={},isLabel:c}=t,d=(0,m.useRef)(),[u,p]=(0,m.useState)(0),g=bBlocksPremiumChecker;return(0,m.useEffect)((()=>{d.current&&((e,t,n={})=>{e?.forEach((e=>{const o=parseInt(e.dataset.countStart),i=parseInt(e.dataset.countEnd),s=Date.now(),a=setInterval((()=>{const r=Date.now()-s;r>=t?clearInterval(a):e.innerText=Iy(parseInt(r/(t/(i-o))+o),n)}),20);setTimeout((()=>{e.innerText=Iy(i,n)}),t)}))})(d.current.ownerDocument.querySelectorAll(`.${Py} .counterNumber .number`),a,r)}),[i,a,r,d]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ey,{attributes:t,setAttributes:n,activeIndex:u,setActiveIndex:p,isPremium:g}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({ref:d}),children:[(0,l.jsx)(Ay,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{className:`${Py} columns-${s.desktop} columns-tablet-${s.tablet} columns-mobile-${s.mobile}`,children:i?.map(((e,o)=>{const{text:s}=e.label,a=c&&(0,l.jsx)(h.RichText,{className:"counterLabel",tagName:"p",value:s,onChange:e=>((e,t,o=!1)=>{const s=Ob(i,(n=>{o?n[u][e][o]=t:n[u][e]=t}));n({counters:s})})("label",e,"text"),placeholder:(0,x.__)("Label","b-blocks"),inlineToolbar:!0});return(0,l.jsx)(By,{attributes:t,counter:e,index:o,labelEl:a,isBackend:!0,custom:{activeIndex:u,setActiveIndex:p}},o)}))})]})]})},save:()=>null}) |
| 368 |
;const Oy=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/carousel","title":"Carousel","category":"bBlocks","description":"Modern carousel for showcasing content. Supports unlimited slides with complete block flexibility inside.","keywords":["carousel","slider","swiper","slide","carousel-block","slider","slideshow","gallery","carousel","slide","rotator"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"clientId":{"type":"string","default":""},"pagination":{"type":"object","default":{"pagination":true,"showOnTablet":true,"showOnMobile":true,"type":"bullets","clickable":true,"hideOnClick":false,"dynamicPagination":false,"dynamicBullets":false,"dynamicMainBullets":1}},"navigation":{"type":"object","default":{"navigation":true,"iconType":"library","nextIcon":{"library":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' id=\'chevron-right\'><path fill-rule=\'evenodd\' d=\'M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708\'/></svg>","upload":""},"prevIcon":{"library":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' id=\'chevron-left\'><path fill-rule=\'evenodd\' d=\'M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0\'/></svg>","upload":""}}},"autoplay":{"type":"object","default":{"autoplay":true,"direction":"right","delay":1.5,"isPauseOnHover":false,"easing":""}},"layout":{"type":"object","default":{"slideView":{"desktop":3,"tablet":2,"mobile":1},"space":{"desktop":30,"tablet":25,"mobile":15},"direction":"horizontal"}},"options":{"type":"object","default":{"speed":1,"loop":true,"touchMove":true,"autoHeight":false}},"styles":{"type":"object","default":{"pagination":{"desktop":{"positionY":"","positionX":""},"tablet":{"positionY":"","positionX":""},"mobile":{"positionY":"","positionX":""},"normal":{"color":"","width":"","height":"","border":{},"radius":{"top":"","right":"","bottom":"","left":""}},"active":{"color":"","width":"","height":"","border":{},"radius":{"top":"","right":"","bottom":"","left":""},"transition":0.2}},"navigation":{"desktop":{"arrow":{"size":"","positionX":{"prev":"","next":""},"positionY":{"prev":"","next":""}},"padding":{"top":"6px","right":"6px","bottom":"6px","left":"6px"}},"tablet":{"arrow":{"size":"","positionX":{"prev":"","next":""},"positionY":{"prev":"","next":""}},"padding":{"top":"","bottom":"","left":"","right":""}},"mobile":{"arrow":{"size":"","positionX":{"prev":"","next":""},"positionY":{"prev":"","next":""}},"padding":{"top":"","bottom":"","left":"","right":""}},"normal":{"bg":{},"color":"rgba(140, 140, 140, 1)","border":{"color":"#8c8c8c","style":"solid","width":"2px"},"desktop":{"radius":{"top":"50%","right":"50%","bottom":"50%","left":"50%"}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"bg":{},"color":"","border":{},"desktop":{"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""}},"transition":0.2}},"container":{"desktop":{"height":"","width":"","alignItems":"center"},"tablet":{"height":"","width":"","alignItems":""},"mobile":{"height":"","width":"","alignItems":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"bottom":"","top":"","right":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"x":"","y":"","z":""},"tablet":{"x":"","y":"","z":""},"mobile":{"x":"","y":"","z":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b0","isInset":false}],"border":{"width":"","style":"none"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"visibility":{"zIndex":{"desktop":""},"overflow":""},"responsive":{"desktop":false,"tablet":false,"mobile":false}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","swiper"],"script":"swiper","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Ry=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],zy=[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Step Start","b-blocks"),value:"step-start"},{label:(0,x.__)("Step End","b-blocks"),value:"step-end"}],Dy=({attributes:e,updateObj:t})=>{const{autoplay:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Autoplay","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Autoplay","b-blocks"),value:n.autoplay,checked:n.autoplay,onChange:e=>t("autoplay",e,"autoplay")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Direction","b-blocks"),labelPosition:"edge",value:n.direction,onChange:e=>t("autoplay",e,"direction"),options:[{label:(0,x.__)("Left To Right","b-blocks"),value:"left"},{label:(0,x.__)("Right To Left","b-blocks"),value:"right"}]}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Delay (s)","b-blocks"),value:n.delay,onChange:e=>t("autoplay",e,"delay"),min:0,step:.01,max:10}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pause On Hover","b-blocks"),value:n.isPauseOnHover,checked:n.isPauseOnHover,onChange:e=>t("autoplay",e,"isPauseOnHover")})]})},Fy=({attributes:e,updateObj:t})=>{const{options:n,autoplay:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Basic Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Direction","b-blocks"),value:n?.direction,options:[{label:"Horizontal",value:"horizontal"},{label:"Vertical",value:"vertical"}],labelPosition:"edge",onChange:e=>t("options",e,"direction")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",value:o.easing,options:zy, |
| 369 |
onChange:e=>t("autoplay",e,"easing")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Loop","b-blocks"),value:n.loop,checked:n.loop,onChange:e=>t("options",e,"loop"),help:"This feature will work on frontend only."}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Touch Move","b-blocks"),value:n.touchMove,checked:n.touchMove,onChange:e=>t("options",e,"touchMove"),help:"This feature will work on frontend only."}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Speed (s)","b-blocks"),value:n.speed,onChange:e=>t("options",e,"speed"),min:0,step:.01,max:10}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Auto Height","b-blocks"),value:n.autoHeight,checked:n.autoHeight,onChange:e=>t("options",e,"autoHeight")})]})},Hy=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),Wy=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),Uy=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),Gy=({attributes:e,updateObj:t,device:n})=>{const{layout:o,styles:i}=e,{container:s}=i,{direction:a="horizontal"}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Direction","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a,onChange:e=>t("layout",e,"direction"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"horizontal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"vertical"})]})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Slide View","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o.slideView[n],onChange:e=>t("layout",e,"slideView",n),beforeIcon:"grid-view",min:1,max:12}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Slide Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o.space[n],onChange:e=>t("layout",e,"space",n),min:0,max:250}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Width","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:s[n].width,onChange:e=>t("styles",e,"container",n,"width")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Height","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:s[n].height,onChange:e=>t("styles",e,"container",n,"height")})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Align Items ","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s[n]?.alignItems,onChange:e=>t("styles",e,"container",n,"alignItems"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Hy,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Wy,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Uy,{})})]})]})]})},Vy=({attributes:e,updateObj:t,device:n})=>{const{navigation:o,styles:i}=e,{navigation:s}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Navigation","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Navigation","b-blocks"),value:o.navigation,checked:o.navigation,onChange:e=>t("navigation",e,"navigation")}),o.navigation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Prev Icon","b-blocks"),value:o.prevIcon.library,onChange:e=>t("navigation",e,"prevIcon","library")}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Next Icon","b-blocks"),value:o.nextIcon.library,onChange:e=>t("navigation",e,"nextIcon","library")}),(0,l.jsx)("br",{}),(0,l.jsx)("b",{children:"Position X"}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Prev Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s[n].arrow.positionX.prev,onChange:e=>t("styles",e,"navigation",n,"arrow","positionX","prev")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Next Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s[n].arrow.positionX.next,onChange:e=>t("styles",e,"navigation",n,"arrow","positionX","next")})]}),(0,l.jsx)("b",{children:"Position Y"}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Prev Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s[n].arrow.positionY.prev,onChange:e=>t("styles",e,"navigation",n,"arrow","positionY","prev")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Next Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s[n].arrow.positionY.next,onChange:e=>t("styles",e,"navigation",n,"arrow","positionY","next")})]})]})]})},qy=({attributes:e,updateObj:t,device:n})=>{const{pagination:o,styles:i}=e,{pagination:s}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pagination","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Pagination","b-blocks"),value:o.pagination,checked:o.pagination,onChange:e=>t("pagination",e,"pagination")}),o.pagination&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Clickable","b-blocks"),value:o.clickable,checked:o.clickable,onChange:e=>t("pagination",e,"clickable")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Position X","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s[n].positionX,min:-50,max:150,onChange:e=>t("styles",e,"pagination",n,"positionX")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Position Y","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s[n].positionY,min:-50,max:150,onChange:e=>t("styles",e,"pagination",n,"positionY")})]})]})]})},Yy=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Gy,{...e}),(0,l.jsx)(Fy,{...e}),(0,l.jsx)(Dy,{...e}),(0,l.jsx)(Vy,{...e}),(0,l.jsx)(qy,{...e})]}),Ky=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{navigation:i}=o,[s,a]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Navigation","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex3", |
| 370 |
children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i[n].arrow.size,onChange:e=>t("styles",e,"navigation",n,"arrow","size")})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[n].padding,onChange:e=>t("styles",e,"navigation",n,"padding")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s,onChange:a,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i[s].color,onChange:e=>t("styles",e,"navigation",s,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i[s].bg,onChange:e=>t("styles",e,"navigation",s,"bg"),isImage:!1}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i[s].border,onChange:e=>t("styles",e,"navigation",s,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),values:i[s][n].radius,onChange:e=>t("styles",e,"navigation",s,n,"radius")}),"hover"===s&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:i.hover.transition,onChange:e=>t("styles",e,"navigation","hover","transition"),min:0,max:10,step:.01})]})},Qy=({attributes:e,updateObj:t})=>{const{styles:n}=e,{pagination:o}=n,[i,s]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pagination","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i,onChange:s,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o[i].color,onChange:e=>t("styles",e,"pagination",i,"color")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex3",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o[i].width,onChange:e=>t("styles",e,"pagination",i,"width")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex3",children:(0,x.__)("Height","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o[i].height,onChange:e=>t("styles",e,"pagination",i,"height")})]}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o[i].border,onChange:e=>t("styles",e,"pagination",i,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),value:o[i].radius,onChange:e=>t("styles",e,"pagination",i,"radius")}),"active"===i&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:o.active.transition,onChange:e=>t("styles",e,"pagination","active","transition"),min:0,max:10,step:.01})]})},Zy=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ky,{...e}),(0,l.jsx)(Qy,{...e})]}),Xy=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",initialTabName:"general",tabs:Ry,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Yy,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Zy,{...e})}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})})},Jy=({attributes:e,id:t,isBackend:n=!1})=>{const{styles:o,advanced:i,layout:s}=e,{container:a,navigation:r,pagination:c}=o,d="vertical"===s?.direction,u=`${t} .bBlock-carousel-main-wrapper`,p=`#${t} .bBlocks-carousel-wrapper`,h=`${p} .swiper`,g=`${h} .swiper-wrapper`,m=`${p} .swiper-button-prev`,b=`${p} .swiper-button-next`,f=`${p} .swiper-pagination`,x=`${f} .swiper-pagination-bullet`,y=`${f} .swiper-pagination-bullet-active`,v=(e="normal")=>`\n\t\t${oa(r[e].bg)}\n\t\t${sa(r[e].border)}\n\t\t${"normal"===e?na("transition",jt(r.hover.transition)?`all ${r.hover.transition}s ease-in-out`:""):""}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${h}{\n\t\t\t\t${na("height",a.desktop.height)}\n\t\t\t\t${na("width",a.desktop.width)}\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\t${na("align-items",a.desktop.alignItems)}\n\t\t\t}\n\t\t\t${d?`${g} .swiper-slide{\n\t\t\t\theight: auto;\n\t\t\t}`:""}\n\t\t\t${m}{\n\t\t\t${na("height","unset")}\n\t\t\t\t${na("left",r.desktop.arrow.positionX.prev)}\n\t\t\t\t${na("top",r.desktop.arrow.positionY.prev)}\n\t\t\t\t${na("padding",ha(r.desktop.padding))}\n\t\t\t\t${na("color",r.normal.color)}\n\t\t\t\t${na("border-radius",ha(r.normal.desktop.radius))}\n\t\t\t\t${v("normal")}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t${na("height","unset")}\n\t\t\t\t${na("right",r.desktop.arrow.positionX.next)}\n\t\t\t\t${na("top",r.desktop.arrow.positionY.next)}\n\t\t\t\t${na("padding",ha(r.desktop.padding))}\n\t\t\t\t${na("color",r.normal.color)}\n\t\t\t\t${na("border-radius",ha(r.normal.desktop.radius))}\n\t\t\t\t${v("normal")}\n\t\t\t}\n\t\t\t${m}:hover{\n\t\t\t\t${na("color",r.hover.color)}\n\t\t\t\t${na("border-radius",ha(r.hover.desktop.radius))}\n\t\t\t\t${v("hover")}\n\t\t\t}\n\t\t\t${b}:hover{\n\t\t\t\t${na("color",r.hover.color)}\n\t\t\t\t${na("border-radius",ha(r.hover.desktop.radius))}\n\t\t\t\t${v("hover")}\n\t\t\t}\n\t\t\t${m}:hover>svg{\n\t\t\t\t${na("color",r.hover.color)}\n\t\t\t\t${na("fill",r.hover.color)}\n\t\t\t}\n\t\t\t${b}:hover>svg{\n\t\t\t\t${na("color",r.hover.color)}\n\t\t\t\t${na("fill",r.hover.color)}\n\t\t\t}\n\t\t\t${m}>svg{\n\t\t\t\t${na("height",r.desktop.arrow.size)}\n\t\t\t\t${na("width",r.desktop.arrow.size)}\n\t\t\t\t${na("color",r.normal.color)}\n\t\t\t\t${na("fill",r.normal.color)}\n\t\t\t\t${na("transition",jt(r.hover.transition)?`all ${r.hover.transition}s ease-in-out`:"")}\n\t\t\t}\n\n\t\t\t${b}>svg{\n\t\t\t\t${na("height",r.desktop.arrow.size)}\n\t\t\t\t${na("width",r.desktop.arrow.size)}\n\t\t\t\t${na("color",r.normal.color)}\n\t\t\t\t${na("fill",r.normal.color)}\n\t\t\t\t${na("transition",jt(r.hover.transition)?`all ${r.hover.transition}s ease-in-out`:"")}\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\t${na("bottom",c.desktop.positionY)}\n\t\t\t\t${na("left",c.desktop.positionX)}\n\t\t\t}\n\t\t\t\n\t\t\t${x}{\n\t\t\t\t${na("background-color",c.normal.color)}\n\t\t\t\t${na("width",c.normal.width)}\n\t\t\t\t${na("height",c.normal.height)}\n\t\t\t\t${sa(c.normal.border)}\n\t\t\t\t${na("border-radius",ha(c.normal.radius))}\n\t\t\t\t${na("transition",jt(c.active.transition)?`all ${c.active.transition}s ease-in-out`:"")}\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${na("background-color",c.active.color)}\n\t\t\t\t${na("width",c.active.width)}\n\t\t\t\t${na("height",c.active.height)}\n\t\t\t\t${sa(c.active.border)}\n\t\t\t\t${na("border-radius",ha(c.active.radius))}\n\t\t\t}\n\n\t\t\t${Ca(n?u:t,i,n,!1)}\n\n\t`}})},ev=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o}=e("core/block-editor");return{innerBlocks:o(t),device:n()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{navigation:s,layout:a,options:r,autoplay:c,pagination:d,styles:u}=t,g="vertical"===a?.direction,b=u?.container?.desktop?.height,x=["desktop","tablet","mobile"].includes(i)?i:"desktop",v=a?.slideView?.[x]??a?.slideView?.desktop??1,k=a?.space?.[x]??a?.space?.desktop??0,w=(0,m.useRef)(null),_=(0,m.useRef)(null),C=(0,m.useRef)(null),j="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,$="b-blocks/carousel-slide",S=[[$,{}],[$,{}],[$,{}]],T=(0, |
| 371 |
h.useInnerBlocksProps)({className:"swiper-wrapper"},{template:S,templateLock:!1,renderAppender:!1}),{insertBlock:M,selectBlock:N}=(0,f.useDispatch)("core/block-editor"),L=(0,f.useSelect)((e=>e("core/block-editor").getBlockOrder(o)?.length||0),[o]);(0,m.useLayoutEffect)((()=>{const e=w.current,t=C.current;if(!e||!t)return;const n=e.querySelector(".swiper-wrapper"),o=n?.querySelectorAll(".swiper-slide");if(n&&o&&0!==o.length){if(_.current&&(_.current.destroy(!0,!0),_.current=null),g&&!b){const t=((e,t,n)=>{const o=Array.from(e.querySelectorAll(".swiper-slide"));if(!o.length)return 0;o.forEach((e=>{e.style.height=""}));const i=Math.max(1,Math.min(Math.round(t)||1,o.length)),s=Number(n)||0,a=o.slice(0,i).reduce(((e,t)=>e+t.getBoundingClientRect().height),0);return Math.round(a+s*(i-1))})(e,v,k);e.style.height=t?`${t}px`:""}else e.style.height="";return _.current=new $x(e,{modules:[Af,Bf,Nf,Ef],slidesPerView:g?"auto":v,spaceBetween:k,loop:!1,speed:1e3*r.speed,autoHeight:!g&&r.autoHeight,direction:g?"vertical":"horizontal",autoplay:!1,navigation:{nextEl:t.querySelector(".swiper-button-next"),prevEl:t.querySelector(".swiper-button-prev")},pagination:!!d.pagination&&{el:t.querySelector(".swiper-pagination"),clickable:d.clickable,dynamicBullets:d.dynamicPagination},scrollbar:{el:e.querySelector(".swiper-scrollbar"),draggable:!1},allowTouchMove:!1,simulateTouch:!1,preventClicks:!0,preventClicksPropagation:!1,touchStartPreventDefault:!1,touchStartForcePreventDefault:!1}),_.current.navigation?.init(),_.current.navigation?.update(),()=>{_.current&&(_.current.destroy(!0,!0),_.current=null)}}}),[o,L,v,k,JSON.stringify(r),JSON.stringify(c),JSON.stringify(d),g,b,a?.direction,a?.slideView[i],_?.current]),(0,m.useEffect)((()=>{n({clientId:o})}),[]);const E=fe(t,n),P={"--swiper-wrapper-transition-timing-function":c?.easing};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Xy,{attributes:t,setAttributes:n,updateObj:E,device:i,isPremium:j}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Jy,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{className:"swiper-editor__controls",style:{marginBottom:10},children:(0,l.jsx)(y.Button,{variant:"primary",onClick:()=>{const e=(0,p.createBlock)($,{className:"swiper-slide"});M(e,L,o),N(o)},children:"+ Add Slide"})}),(0,l.jsx)("div",{className:"bBlock-carousel-main-wrapper",children:(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"bBlocks-carousel-wrapper",style:P,ref:C,children:[(0,l.jsx)("div",{className:"swiper",ref:w,children:(0,l.jsx)("div",{...T})}),s.navigation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"swiper-button-prev",dangerouslySetInnerHTML:{__html:s.prevIcon.library}}),(0,l.jsx)("div",{className:"swiper-button-next",dangerouslySetInnerHTML:{__html:s.nextIcon.library}})]}),d.pagination&&(0,l.jsx)("div",{className:"swiper-pagination swiper-pagination-horizontal"})]})})})]})]})}));Nl(Oy.name)&&(0,p.registerBlockType)(Oy,{icon:ll,edit:ev,save:h.InnerBlocks.Content});const tv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/carousel-slide","title":"Carousel Slide","category":"bBlocks","description":"Individual slide for a carousel. Add images, text, buttons, videos — anything you need.","keywords":["slide","carousel-slide","slide-block","carousel-item"],"parent":["b-blocks/carousel"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"type":"flex","padding":{},"desktop":{"direction":"column","justify":"","alignItems":"","wrap":"wrap","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""},"tablet":{"direction":"","justify":"","alignItems":"","wrap":"","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""},"mobile":{"direction":"","justify":"","alignItems":"","wrap":"","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),nv=()=>(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n\t"}}),ov=(0,w.compose)((0,f.withSelect)(((e,{clientId:t})=>{const{getBlocks:n}=e("core/block-editor");return{innerBlocks:n(t)}})),(0,f.withDispatch)((e=>{const{removeBlock:t}=e("core/block-editor");return{removeBlock:t}})))((e=>{const{attributes:t,clientId:n,innerBlocks:o,removeBlock:i}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{...(0,h.useBlockProps)({className:"swiper-slide"}),children:[(0,l.jsx)(nv,{attributes:t,id:`block-${n}`}),(0,l.jsx)("div",{className:"bBlocksRemoveSlideWrapper",onClick:()=>i(n),children:(0,l.jsx)(y.Dashicon,{icon:"no-alt"})}),(0,l.jsx)(h.InnerBlocks,{renderAppender:()=>o?.length?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):(0,l.jsx)(h.InnerBlocks.ButtonBlockAppender,{})})]})})}));Nl("b-blocks/carousel")&&(0,p.registerBlockType)(tv,{icon:ll,edit:ov,save:h.InnerBlocks.Content}) |
| 372 |
;const iv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/code-highlight","title":"Code Highlight","category":"bBlocks","description":"Show a syntax-highlighted code snippet with themes, line numbers and a copy button.","keywords":["code","snippet","syntax","highlight","prism","pre"],"textdomain":"b-blocks","supports":{"html":false,"align":["wide","full"]},"attributes":{"blockId":{"type":"string","default":""},"align":{"type":"string","default":""},"content":{"type":"object","default":{"code":"function greet(name) {\\n\\tconsole.log(`Hello, ${name}!`);\\n}\\n\\ngreet(\'World\');","language":"javascript","filename":"example.js","caption":""}},"options":{"type":"object","default":{"header":true,"showLanguage":false,"windowDots":false,"lineNumbers":true,"startLine":1,"highlightLines":"","wordWrap":false,"tabSize":2,"maxLines":0,"collapsible":false,"expandLabel":"Show all","collapseLabel":"Show less","copyButton":true,"copyPosition":"header","copyLabel":"Copy","copiedLabel":"Copied!","captionPosition":"bottom"}},"theme":{"type":"string","default":"porple"},"box":{"type":"object","default":{"desktop":{"align":"center","width":"100%","height":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"align":"","width":"","height":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"align":"","width":"","height":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"background":{},"border":{},"shadow":{"normal":[],"hover":[]}}},"codeTypo":{"type":"object","default":{"fontSize":{"desktop":15,"tablet":14,"mobile":13}}},"headerStyle":{"type":"object","default":{"background":{},"filenameColor":"","filenameTypo":{"fontSize":{"desktop":12,"tablet":"","mobile":""}},"badgeColor":"","badgeBackground":{}}},"lineNumber":{"type":"object","default":{"color":"","background":{},"borderColor":""}},"highlight":{"type":"object","default":{"background":{},"borderColor":""}},"copyBtn":{"type":"object","default":{"normal":{"color":"","background":{},"border":{}},"hover":{"color":"","background":{},"border":{}},"copied":{"color":"","background":{},"border":{}},"typo":{"fontSize":{"desktop":12,"tablet":"","mobile":""}},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"buttonIcon":{"type":"object","default":{"enable":true,"icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 24 24\' fill=\'none\' stroke=\'currentColor\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-linejoin=\'round\'><rect x=\'9\' y=\'9\' width=\'13\' height=\'13\' rx=\'2\'></rect><path d=\'M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\'></path></svg>","position":"left","size":"13px","spacing":"6px","desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"normal":{"color":"","background":{},"border":{},"rotate":"0deg"},"hover":{"color":"","background":{},"border":{},"rotate":"0deg"}}},"caption":{"type":"object","default":{"color":"","typo":{"fontSize":{"desktop":13,"tablet":"","mobile":""}},"align":"center"}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),sv="b-blocks-code-highlight",av=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],rv=[{name:"normal",title:(0,x.__)("Normal","b-blocks")},{name:"hover",title:(0,x.__)("Hover","b-blocks")}],lv=[...rv,{name:"copied",title:(0,x.__)("Copied","b-blocks")}],cv=[{label:(0,x.__)("Plain Text","b-blocks"),value:"none"},{label:"Bash / Shell",value:"bash"},{label:"C",value:"c"},{label:"C++",value:"cpp"},{label:"C#",value:"csharp"},{label:"CSS",value:"css"},{label:"Dart",value:"dart"},{label:"Diff",value:"diff"},{label:"Go",value:"go"},{label:"GraphQL",value:"graphql"},{label:"Haskell",value:"haskell"},{label:"HTML / XML",value:"markup"},{label:"Java",value:"java"},{label:"JavaScript",value:"javascript"},{label:"JSON",value:"json"},{label:"JSX",value:"jsx"},{label:"Julia",value:"julia"},{label:"Kotlin",value:"kotlin"},{label:"Less",value:"less"},{label:"Markdown",value:"markdown"},{label:"Perl",value:"perl"},{label:"PHP",value:"php"},{label:"Python",value:"python"},{label:"Ruby",value:"ruby"},{label:"Rust",value:"rust"},{label:"SCSS",value:"scss"},{label:"SQL",value:"sql"},{label:"Swift",value:"swift"},{label:"TypeScript",value:"typescript"},{label:"TSX",value:"tsx"},{label:"YAML",value:"yaml"}],dv=[{label:(0,x.__)("Solid","b-blocks"),value:"default"},{label:(0,x.__)("Dark","b-blocks"),value:"dark"},{label:(0,x.__)("Tomorrow","b-blocks"),value:"tomorrow"},{label:(0,x.__)("Solarized Light","b-blocks"),value:"solarized-light"},{label:(0,x.__)("Twilight","b-blocks"),value:"twilight"},{label:(0,x.__)("Porple","b-blocks"),value:"porple"},{label:"Dracula",value:"dracula"},{label:"One Dark",value:"one-dark"},{label:"One Light",value:"one-light"},{label:"Nord",value:"nord"},{label:"Night Owl",value:"night-owl"},{label:"Material Oceanic",value:"material-oceanic"},{label:"VS Code Dark+",value:"vsc-dark-plus"},{label:"Gruvbox Dark",value:"gruvbox-dark"},{label:"Atom Dark",value:"atom-dark"},{label:"Solarized Dark",value:"solarized-dark-atom"},{label:"GitHub Light",value:"ghcolors"},{label:"Coldark Cold", |
| 373 |
value:"coldark-cold"},{label:"Shades of Purple",value:"shades-of-purple"},{label:"Laserwave",value:"laserwave"}],uv=[{label:(0,x.__)("In Header","b-blocks"),value:"header"},{label:(0,x.__)("Top Right","b-blocks"),value:"top-right"},{label:(0,x.__)("Bottom Right","b-blocks"),value:"bottom-right"}],pv=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],hv=(e=0)=>({value:"deg",label:"deg",default:e}),gv=[{label:(0,x.__)("Above","b-blocks"),value:"top"},{label:(0,x.__)("Below","b-blocks"),value:"bottom"}],mv=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],bv=dv.map((({value:e})=>e)),fv=cv.map((({value:e})=>e)),xv=(e={},t,n,o="")=>{const i=t=>{const o=e?.[t]?.[n];return null==o||""===o?void 0:o},s=i("desktop")??o;if("desktop"===t)return s;const a=i("tablet")??s;return"tablet"===t?a:i("mobile")??a},yv=(e,t="")=>{if(null==e||""===e)return t;const n=parseFloat(e);return isNaN(n)?t:/[a-z%]$/i.test(String(e).trim())?String(e).trim():`${n}px`},vv=(e,t)=>"normal"===e?t:`${e.charAt(0).toUpperCase()}${e.slice(1)} ${t.charAt(0).toLowerCase()}${t.slice(1)}`,kv=e=>{const{theme:t,options:n={}}=e,o=0<(parseInt(n.maxLines,10)||0);return[sv,`${sv}-theme-${i=t,bv.includes(i)?i:"porple"}`,n.wordWrap?`${sv}-is-wrapped`:"",n.lineNumbers?`${sv}-has-line-numbers`:"",n.header?`${sv}-has-header`:"",o?`${sv}-is-capped`:"",o&&n.collapsible?`${sv}-is-collapsible`:"",n.copyButton?`${sv}-copy-at-${n.copyPosition||"header"}`:""].filter(Boolean).join(" ");var i},wv=(e="")=>String(e).replace(/\n$/,"").split("\n"),_v=(e="")=>{const t=new Set;return String(e).split(",").forEach((e=>{const n=e.trim();if(!n)return;const[o,i]=n.split("-"),s=parseInt(o,10),a=void 0===i?s:parseInt(i,10);if(!isNaN(s)&&!isNaN(a))for(let e=Math.min(s,a);e<=Math.max(s,a);e++)0<e&&t.add(e)})),[...t].sort(((e,t)=>e-t))},Cv=e=>{const{options:t={},content:n={}}=e;if(t.wordWrap||!t.highlightLines)return[];const o=wv(n.code).length,i=parseInt(t.startLine,10)||1;return _v(t.highlightLines).map((e=>e-i)).filter((e=>0<=e&&e<o))};var jv=a(1983),$v=a.n(jv);a(5624),a(4312),a(1113),a(5723),a(9587),a(5903),a(2769),a(2514),a(7022),a(271),a(2415),a(5651),a(869),a(7839),a(6378),a(4619),a(554),a(6976),a(463),a(9913),a(8713),a(5545),a(2821),a(9700),a(3554),a(2342),a(1648),a(5342),a(4604),a(6966),a(4793),a(83);const Sv=({attributes:e})=>{const{content:t={},options:n={},buttonIcon:o={}}=e,{code:i="",filename:s="",caption:a=""}=t,r=(c=t.language,fv.includes(c)?c:"none");var c;const d=wv(i),u=parseInt(n.startLine,10)||1,p=Cv(e),h=n.copyButton&&"header"===(n.copyPosition||"header"),g=cv.find((({value:e})=>e===r))?.label,b=0<(parseInt(n.maxLines,10)||0),f=(0,m.useRef)(null),[x,y]=(0,m.useState)(!1),[v,k]=(0,m.useState)(!1);(0,m.useEffect)((()=>{f.current&&((e,t)=>{e&&t&&"none"!==t&&$v().languages[t]&&$v().highlightElement(e)})(f.current,r)}),[i,r]),(0,m.useEffect)((()=>{if(!x)return;const e=setTimeout((()=>y(!1)),2e3);return()=>clearTimeout(e)}),[x]);const w=async()=>{try{await navigator.clipboard.writeText(i)}catch(e){const t=document.createElement("textarea");t.value=i,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}y(!0)},_=o.enable&&o.icon,C=e=>(0,l.jsxs)("button",{type:"button",className:["b-blocks-code-highlight-copy",e?"b-blocks-code-highlight-copy-floating":"",_?"b-blocks-code-highlight-has-icon b-blocks-code-highlight-icon-"+("right"===o.position?"right":"left"):"",x?"is-copied":""].filter(Boolean).join(" "),onClick:w,children:[_&&(0,l.jsx)("span",{className:"b-blocks-code-highlight-btn-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:o.icon}}),(0,l.jsx)("span",{className:"b-blocks-code-highlight-copy-text",children:x?n.copiedLabel||"Copied!":n.copyLabel||"Copy"})]}),j=a?(0,l.jsx)("figcaption",{className:"b-blocks-code-highlight-caption",children:a}):null;return(0,l.jsx)("div",{children:(0,l.jsxs)("figure",{className:`${kv(e)}${v?" is-expanded":""}`,children:["top"===n.captionPosition&&j,n.header&&(0,l.jsxs)("div",{className:"b-blocks-code-highlight-header",children:[n.windowDots&&(0,l.jsxs)("span",{className:"b-blocks-code-highlight-dots","aria-hidden":"true",children:[(0,l.jsx)("i",{}),(0,l.jsx)("i",{}),(0,l.jsx)("i",{})]}),(0,l.jsx)("span",{className:"b-blocks-code-highlight-filename",children:s}),n.showLanguage&&"none"!==r&&(0,l.jsx)("span",{className:"b-blocks-code-highlight-badge",children:g}),h&&C(!1)]}),(0,l.jsxs)("div",{className:"b-blocks-code-highlight-body",children:[(0,l.jsxs)("pre",{className:"b-blocks-code-highlight-pre",tabIndex:0,children:[0<p.length&&(0,l.jsx)("span",{className:"b-blocks-code-highlight-marks","aria-hidden":"true",children:p.map((e=>(0,l.jsx)("span",{style:{"--bbChMark":e}},e)))}),n.lineNumbers&&(0,l.jsx)("span",{className:"b-blocks-code-highlight-gutter","aria-hidden":"true",children:d.map(((e,t)=>(0,l.jsx)("span",{children:u+t},t)))}),(0,l.jsx)("code",{ref:f,className:`b-blocks-code-highlight-code language-${r}`,children:i})]}),n.copyButton&&!h&&C(!0)]}),b&&n.collapsible&&(0,l.jsx)("button",{type:"button",className:"b-blocks-code-highlight-toggle",onClick:()=>k((e=>!e)),"aria-expanded":v,children:v?n.collapseLabel||"Show less":n.expandLabel||"Show all"}),"top"!==n.captionPosition&&j]})})},Tv=({attributes:e,id:o,isBackend:i=!1})=>{const{options:s={},box:a={},codeTypo:r={},headerStyle:c={},copyBtn:d={},buttonIcon:u={},lineNumber:p={},highlight:h={},caption:g={},advanced:b={}}=e,f=`#${o} .${sv}`,x=`${f} .${sv}-header`,y=`${f} .${sv}-filename`,v=`${f} .${sv}-copy`,k=`${f} .${sv}-pre`,w=`${f} .${sv}-code`,_=`${f} .${sv}-gutter`,C=`${f} .${sv}-badge`,j=`${f} .${sv}-marks span`,$=`${f} .${sv}-caption`,S=`${f} .${sv}-btn-icon`,T=`${f} .${sv}-toggle`,M=(e,...t)=>{const n=t.filter(Boolean).join(" ").replace(/\s+/g," ").trim();return n?`${e}{ ${n} }`:""},N=e=>Object.keys(e||{}).length?sa(e):"",L=(e,t)=>M(e,na("color",t?.color),oa(t?.background),N(t?.border),na("rotate",t?.rotate)),E=(e,t)=>M(e,na("color",t?.color),oa(t?.background),N(t?.border)),P={left:"margin-left: 0; margin-right: auto;",right:"margin-left: auto; margin-right: 0;",center:"margin-left: auto; margin-right: auto;"},A=e=>`\n\t\t${M(f,P[xv(a,e,"align","center")]||P.center,na("width",yv(xv(a,e,"width","100%"),"100%")),na("height",yv(xv(a,e,"height"))),na("padding",ha(a?.[e]?.padding)),na("border-radius",ha(a?.[e]?.radius)))}\n\t\t${M(S,na("padding",ha(u?.[e]?.padding)),na("margin",ha(u?.[e]?.margin)),na("border-radius",ha(u?.[e]?.radius)))}`,B=(0, |
| 374 |
m.useMemo)((()=>`\n\t\t${pa("",r)?.googleFontLink}\n\t\t${pa("",c.filenameTypo)?.googleFontLink}\n\t\t${pa("",d.typo)?.googleFontLink}\n\t\t${pa("",g.typo)?.googleFontLink}\n\t\t${pa(`${k}, ${w}, ${_}`,r)?.styles}\n\t\t${pa(y,c.filenameTypo)?.styles}\n\t\t${pa(v,d.typo)?.styles}\n\t\t${pa($,g.typo)?.styles}\n\n\t\t${M(f,oa(a.background),N(a.border),na("box-shadow",la(a.shadow?.normal)))}\n\t\t${M(`${f}:hover`,na("box-shadow",la(a.shadow?.hover)))}\n\n\t\t${M(k,na("max-height",0<(parseInt(s.maxLines,10)||0)?`calc(${parseInt(s.maxLines,10)} * var(--bbCodeLine, 1.6em) + 2 * var(--bbChPreY, 14px))`:""))}\n\t\t${0<(parseInt(s.maxLines,10)||0)?M(`${f}.is-expanded .${sv}-pre`,"max-height: none;"):""}\n\t\t${M(w,na("tab-size",parseInt(s.tabSize,10)||""))}\n\n\t\t${M(x,oa(c.background))}\n\t\t${M(y,na("color",c.filenameColor))}\n\t\t${M(C,na("color",c.badgeColor),oa(c.badgeBackground))}\n\n\t\t${M(j,oa(h.background))}\n\t\t${M(`${j}::after`,na("background",h.borderColor))}\n\n\t\t${M($,na("color",g.color),na("text-align",g.align))}\n\t\t${M(T,na("color",d.normal?.color))}\n\n\t\t${M(_,na("color",p.color),oa(p.background),na("border-right-color",p.borderColor))}\n\n\t\t${M(v,na("padding",ha(d.padding)),na("border-radius",ha(d.radius)))}\n\t\t${E(v,d.normal)}\n\t\t${E(`${v}:hover`,d.hover)}\n\t\t${E(`${v}:focus-visible`,d.hover)}\n\t\t${E(`${v}.is-copied`,d.copied)}\n\n\t\t${M(v,na("gap",yv(u.spacing,"")))}\n\t\t${L(S,u.normal)}\n\t\t${L(`${v}:hover .${sv}-btn-icon`,u.hover)}\n\t\t${M(`${S} svg, ${S} img`,na("width",yv(u.size,"")),na("height",yv(u.size,"")))}\n\n\t\t${A("desktop")}\n\n\t\t${t}{\n\t\t\t${A("tablet")}\n\t\t}\n\n\t\t${n}{\n\t\t\t${A("mobile")}\n\t\t}\n\n\t\t${_a(o,b,i,!1)}\n\t\t`),[e,o,i]);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:B}})},Mv=({attributes:e,updateObj:t})=>{const{buttonIcon:n={},options:o={}}=e;return o.copyButton?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:n.enable,onChange:e=>t("buttonIcon",e,"enable"),__nextHasNoMarginBottom:!0}),n.enable&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zn,{className:"mt10",value:n.icon,onChange:e=>t("buttonIcon",e,"icon")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Position","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.position||"left",onChange:e=>t("buttonIcon",e,"position"),children:pv.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]}),(0,l.jsx)("small",{children:(0,x.__)("Which side of the label the icon sits on.","b-blocks")})]})]}):null},Nv=({attributes:e,updateObj:t})=>{const{content:n={},options:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Caption","b-blocks"),value:n.caption||"",onChange:e=>t("content",e,"caption"),help:(0,x.__)("A short line describing the snippet. Left empty, nothing is rendered.","b-blocks"),__nextHasNoMarginBottom:!0}),n.caption&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Position","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.captionPosition||"bottom",onChange:e=>t("options",e,"captionPosition"),children:gv.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]})]})},Lv=({attributes:e,updateObj:t})=>{const{content:n={},options:o={},theme:i}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Code","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextareaControl,{label:(0,x.__)("Snippet","b-blocks"),value:n.code||"",rows:6,onChange:e=>t("content",e,"code"),help:(0,x.__)("Pasted exactly as typed — indentation and blank lines are kept.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Language","b-blocks"),labelPosition:"edge",value:n.language||"none",options:cv,onChange:e=>t("content",e,"language"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Theme","b-blocks"),labelPosition:"edge",value:i||"porple",options:dv,onChange:e=>t("theme",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Word Wrap","b-blocks"),checked:o.wordWrap,onChange:e=>t("options",e,"wordWrap"),help:(0,x.__)("Off, a long line scrolls sideways. On, it folds onto the next line.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Tab Size","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",labelPosition:"edge",min:1,max:8,value:o.tabSize||2,onChange:e=>t("options",parseInt(e,10)||2,"tabSize")})]})]})},Ev=({attributes:e,updateObj:t})=>{const{options:n={}}=e,o=(e,n)=>t("options",e,n);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Copy Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Copy Button","b-blocks"),checked:n.copyButton,onChange:e=>o(e,"copyButton"),__nextHasNoMarginBottom:!0}),n.copyButton&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Position","b-blocks"),labelPosition:"edge",value:n.copyPosition||"header",options:uv,onChange:e=>o(e,"copyPosition"),__nextHasNoMarginBottom:!0}),"header"===(n.copyPosition||"header")&&!n.header&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.__)("The header is switched off, so the button has no bar to sit in. Pick a floating position, or switch the header back on.","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Copy Label","b-blocks"),value:n.copyLabel||"",onChange:e=>o(e,"copyLabel"),placeholder:"Copy",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Copied Label","b-blocks"),value:n.copiedLabel||"",onChange:e=>o(e,"copiedLabel"),placeholder:"Copied!",__nextHasNoMarginBottom:!0})]})]})},Pv=({attributes:e,updateObj:t})=>{const{content:n={},options:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Header","b-blocks"),checked:o.header,onChange:e=>t("options",e,"header"),__nextHasNoMarginBottom:!0}),o.header?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Filename","b-blocks"),value:n.filename||"",onChange:e=>t("content",e,"filename"),placeholder:"example.js",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Language Badge","b-blocks"),checked:o.showLanguage,onChange:e=>t("options",e,"showLanguage"),help:(0,x.__)("Shows the language name on the right of the bar.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Window Dots","b-blocks"),checked:o.windowDots,onChange:e=>t("options",e,"windowDots"),help:(0,x.__)("The three traffic-light dots of a desktop window.","b-blocks"),__nextHasNoMarginBottom:!0})]}):(0,l.jsx)("small",{children:(0,x.__)("With the header off, the filename, badge and dots have nowhere to sit.","b-blocks")})]})},Av=({attributes:e,updateObj:t})=>{const{options:n={}}=e,o=_v(n.highlightLines).length,i=Cv(e).length;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Line Numbers","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Line Numbers","b-blocks"),checked:n.lineNumbers,onChange:e=>t("options",e,"lineNumbers"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{ |
| 375 |
className:"mb0 flex2",children:(0,x.__)("Start At","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",labelPosition:"edge",min:1,value:n.startLine||1,onChange:e=>t("options",parseInt(e,10)||1,"startLine")})]}),(0,l.jsx)("small",{children:(0,x.__)("Numbering starts here — useful when the snippet is an extract.","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Highlight Lines","b-blocks"),value:n.highlightLines||"",onChange:e=>t("options",e,"highlightLines"),placeholder:"2, 5-7",help:(0,x.__)("Single lines and ranges, separated by commas. Counted from Start At.","b-blocks"),__nextHasNoMarginBottom:!0}),n.wordWrap&&0<o&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.__)("Word Wrap is on, so highlighting is switched off — a wrapped line changes the height of every row beneath it and the marks would drift.","b-blocks")}),!n.wordWrap&&o>i&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.__)("Some of those lines fall outside the snippet and are ignored.","b-blocks")})]})},Bv=({attributes:e,updateObj:t})=>{const{options:n={},content:o={}}=e,i=parseInt(n.maxLines,10)||0,s=wv(o.code).length;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Overflow","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Max Lines","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",labelPosition:"edge",min:0,value:i,onChange:e=>t("options",parseInt(e,10)||0,"maxLines")})]}),(0,l.jsx)("small",{children:(0,x.__)("Zero shows the whole snippet. Any other number caps the height.","b-blocks")}),0<i&&i>=s&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.__)("This snippet is shorter than the cap, so nothing is hidden yet.","b-blocks")}),0<i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Expandable","b-blocks"),checked:n.collapsible,onChange:e=>t("options",e,"collapsible"),help:(0,x.__)("Adds a button that opens the snippet to its full height. Off, the rest simply scrolls.","b-blocks"),__nextHasNoMarginBottom:!0}),n.collapsible&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Expand Label","b-blocks"),value:n.expandLabel||"",onChange:e=>t("options",e,"expandLabel"),placeholder:"Show all",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Collapse Label","b-blocks"),value:n.collapseLabel||"",onChange:e=>t("options",e,"collapseLabel"),placeholder:"Show less",__nextHasNoMarginBottom:!0})]})]})]})},Iv=({attributes:e,updateObj:t,device:n="desktop"})=>{const{box:o={}}=e,i=(e,i,s)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.[i]||"",onChange:e=>t("box",e,n,i),units:s})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Box","b-blocks"),initialOpen:!0,children:[i((0,x.__)("Width","b-blocks"),"width",[Ee(),Pe(),Oe()]),i((0,x.__)("Height","b-blocks"),"height",[Ee(),Pe(),Oe()]),(0,l.jsx)("small",{children:(0,x.__)("Leave Height empty to let the snippet set it.","b-blocks")}),(0,l.jsxs)(v,{className:"mb0 mt10 flex1",children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o?.[n]?.align||"",onChange:e=>t("box",e,n,"align"),children:mv.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("box",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("box",e,n,"radius")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o.background,onChange:e=>t("box",e,"background")}),(0,l.jsx)("small",{children:(0,x.__)("Left empty, the theme paints the background.","b-blocks")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("box",e,"border")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:o.shadow,onChange:e=>t("box",e,"shadow")})]})},Ov=({attributes:e,updateObj:t,device:n="desktop"})=>{const{buttonIcon:o={},options:i={}}=e;if(!i.copyButton||!o.enable)return null;const s=(e,n,i)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:e}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o[n]||"",onChange:e=>t("buttonIcon",e,n),units:i})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Icon","b-blocks"),initialOpen:!1,children:[s((0,x.__)("Size","b-blocks"),"size",[Ee(),Ae(),Be()]),s((0,x.__)("Spacing","b-blocks"),"spacing",[Ee(),Ae()]),(0,l.jsx)("small",{children:(0,x.__)("The gap between the icon and the label.","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:rv,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:vv(e.name,(0,x.__)("Color","b-blocks")),value:o?.[e.name]?.color,onChange:n=>t("buttonIcon",n,e.name,"color")}),(0,l.jsx)(An,{className:"mt10",label:vv(e.name,(0,x.__)("Background","b-blocks")),value:o?.[e.name]?.background,onChange:n=>t("buttonIcon",n,e.name,"background")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:vv(e.name,(0,x.__)("Border","b-blocks")),value:o?.[e.name]?.border,onChange:n=>t("buttonIcon",n,e.name,"border")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:vv(e.name,(0,x.__)("Rotate","b-blocks"))}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[e.name]?.rotate||"",onChange:n=>t("buttonIcon",n,e.name,"rotate"),units:[hv()]})]}),"hover"===e.name&&(0,l.jsx)("small",{children:(0,x.__)("A different angle here turns the icon when the pointer is over the button.","b-blocks")})]})}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("buttonIcon",e,n,"radius")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("buttonIcon",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.margin||{},onChange:e=>t("buttonIcon",e,n,"margin")})]})},Rv=({attributes:e,updateObj:t})=>{const{caption:n={},content:o={}}=e;return o.caption?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("caption",e,"color")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("caption",e,"typo"),defaults:{fontSize:{desktop:13}}}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:10,children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.align||"center",onChange:e=>t("caption",e,"align"),children:mv.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{style:{padding:"0px 10px"},label:e,value:t},t)))})]})]}):null},zv=({attributes:e,updateObj:t})=>{const{copyBtn:n={},options:o={}}=e;return o.copyButton?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Copy Button","b-blocks"),initialOpen:!1, |
| 376 |
children:[(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:lv,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:vv(e.name,(0,x.__)("Color","b-blocks")),value:n?.[e.name]?.color,onChange:n=>t("copyBtn",n,e.name,"color")}),(0,l.jsx)(An,{className:"mt10",label:vv(e.name,(0,x.__)("Background","b-blocks")),value:n?.[e.name]?.background,onChange:n=>t("copyBtn",n,e.name,"background")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:vv(e.name,(0,x.__)("Border","b-blocks")),value:n?.[e.name]?.border,onChange:n=>t("copyBtn",n,e.name,"border")}),"copied"===e.name&&(0,l.jsx)("small",{children:(0,x.__)("Shown for two seconds after the button is clicked. Left empty, it keeps the Normal styling.","b-blocks")})]})}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("copyBtn",e,"typo"),defaults:{fontSize:{desktop:12}}}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:n.padding||{},onChange:e=>t("copyBtn",e,"padding")}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:n.radius||{},onChange:e=>t("copyBtn",e,"radius")})]}):null},Dv=({attributes:e,updateObj:t})=>{const{headerStyle:n={},options:o={}}=e;return o.header?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:n.background,onChange:e=>t("headerStyle",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Filename Color","b-blocks"),value:n.filenameColor,onChange:e=>t("headerStyle",e,"filenameColor")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Filename Typography","b-blocks"),value:n.filenameTypo,onChange:e=>t("headerStyle",e,"filenameTypo"),defaults:{fontSize:{desktop:12}}}),o.showLanguage&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Badge Color","b-blocks"),value:n.badgeColor,onChange:e=>t("headerStyle",e,"badgeColor")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Badge Background","b-blocks"),value:n.badgeBackground,onChange:e=>t("headerStyle",e,"badgeBackground")})]})]}):null},Fv=({attributes:e,updateObj:t})=>{const{highlight:n={}}=e;return Cv(e).length?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Highlighted Lines","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:n.background,onChange:e=>t("highlight",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Edge Color","b-blocks"),value:n.borderColor,onChange:e=>t("highlight",e,"borderColor"),help:(0,x.__)("The bar down the left of each highlighted line.","b-blocks")})]}):null},Hv=({attributes:e,updateObj:t})=>{const{lineNumber:n={},options:o={}}=e;return o.lineNumbers?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Line Numbers","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Number Color","b-blocks"),value:n.color,onChange:e=>t("lineNumber",e,"color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Gutter Background","b-blocks"),value:n.background,onChange:e=>t("lineNumber",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Divider Color","b-blocks"),value:n.borderColor,onChange:e=>t("lineNumber",e,"borderColor")})]}):null},Wv=({attributes:e,updateObj:t})=>{const{codeTypo:n={}}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Code Text","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:n,onChange:e=>t("codeTypo",e),defaults:{fontSize:{desktop:15,tablet:14,mobile:13}}})})},Uv=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Iv,{...e}),(0,l.jsx)(Dv,{...e}),(0,l.jsx)(Hv,{...e}),(0,l.jsx)(Wv,{...e}),(0,l.jsx)(Fv,{...e}),(0,l.jsx)(zv,{...e}),(0,l.jsx)(Ov,{...e}),(0,l.jsx)(Rv,{...e})]}),Gv=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:av,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Lv,{...e}),(0,l.jsx)(Pv,{...e}),(0,l.jsx)(Av,{...e}),(0,l.jsx)(Ev,{...e}),(0,l.jsx)(Mv,{...e}),(0,l.jsx)(Bv,{...e}),(0,l.jsx)(Nv,{...e})]}),"style"===t.name&&(0,l.jsx)(Uv,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},Vv=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{blockId:i}=t,s="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,a=fe(t,n),r=o.slice(0,12);(0,m.useEffect)((()=>{i!==r&&n({blockId:r})}),[r]);const c=`block-${o}`,d=(0,h.useBlockProps)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Gv,{...e,updateObj:a,isPremium:s}),(0,l.jsxs)("div",{...d,children:[(0,l.jsx)(Tv,{attributes:t,id:c,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(Sv,{attributes:t})})]})]})}));Nl(iv.name)&&(0,p.registerBlockType)(iv,{icon:gl,edit:Vv,save:()=>null}) |
| 377 |
;const qv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/comparison-table","title":"Comparison Table","category":"bBlocks","description":"Compare plans side by side with check, cross, or text cells and a highlighted featured column.","keywords":["comparison","compare","table","feature matrix","pricing","plan","versus"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"content":{"type":"object","default":{"caption":"Feature comparison across plans","captionPosition":"hidden","captionColor":"","captionTypo":{},"featuredLabel":"Most Popular"}},"table":{"type":"object","default":{"theme":"default","alignment":"center","cellBorderType":"collapse","stackOnMobile":false,"stickyHeader":false,"stickyFirstColumn":true,"showRowStripes":true,"desktop":{"width":"900px","radius":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"iconPosition":"top"},"tablet":{"width":"","radius":{},"iconPosition":""},"mobile":{"width":"","radius":{},"iconPosition":""},"borderColor":"#e2e8f0","border":{},"shadow":[],"bg":{}}},"header":{"type":"object","default":{"normal":{"bg":{"type":"solid","color":"#1e293b"},"color":"#ffffff"},"hover":{"bg":{},"color":""},"typo":{}}},"body":{"type":"object","default":{"bg":{"type":"solid","color":"#ffffff"},"color":"#1f2937","typo":{},"desktop":{"padding":{"top":"12px","right":"16px","bottom":"12px","left":"16px"}},"tablet":{"padding":{}},"mobile":{"padding":{}}}},"rowLabel":{"type":"object","default":{"bg":{"type":"solid","color":"transparent"},"color":"","typo":{}}},"rowColors":{"type":"object","default":{"odd":{"color":"","bg":""},"even":{"color":"","bg":""},"hover":{"color":"","bg":""},"stripe":{"type":"solid","color":"#f8fafc"},"transition":0.2}},"featured":{"type":"object","default":{"bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff","columnBg":{"type":"solid","color":"#eff6ff"},"labelBg":{"type":"solid","color":"#f59e0b"},"labelColor":"#ffffff"}},"icons":{"type":"object","default":{"check":"check","cross":"times","checkSvg":"","crossSvg":"","checkColor":"#16a34a","crossColor":"#dc2626","desktop":{"size":"18px","headerSize":"32px"},"tablet":{"size":"","headerSize":""},"mobile":{"size":"","headerSize":""}}},"tooltip":{"type":"object","default":{"bg":{},"color":"","typo":{},"arrow":true,"underline":true,"shadow":[],"desktop":{"width":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"width":"","padding":{},"radius":{}},"mobile":{"width":"","padding":{},"radius":{}}}},"columns":{"type":"array","default":[{"_key":"col-feature","isFeatureColumn":true,"label":"Features","iconSize":{"desktop":"","tablet":"","mobile":""},"cta":{"normal":{"bg":{},"color":""},"hover":{"bg":{},"color":""},"typo":{},"border":{},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"transition":"","alignment":{"desktop":"","tablet":"","mobile":""}}},{"_key":"col-default-1","label":"Basic","isFeatured":false,"icon":"","iconColor":"","cta":{"normal":{"bg":{},"color":""},"hover":{"bg":{},"color":""},"typo":{},"border":{},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"transition":"","alignment":{"desktop":"","tablet":"","mobile":""}},"iconSize":{"desktop":"","tablet":"","mobile":""}},{"_key":"col-default-2","label":"Pro","isFeatured":true,"icon":"","iconColor":"","cta":{"normal":{"bg":{},"color":""},"hover":{"bg":{},"color":""},"typo":{},"border":{},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"transition":"","alignment":{"desktop":"","tablet":"","mobile":""}},"iconSize":{"desktop":"","tablet":"","mobile":""}},{"_key":"col-default-3","label":"Enterprise","isFeatured":false,"icon":"","iconColor":"","cta":{"normal":{"bg":{},"color":""},"hover":{"bg":{},"color":""},"typo":{},"border":{},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"transition":"","alignment":{"desktop":"","tablet":"","mobile":""}},"iconSize":{"desktop":"","tablet":"","mobile":""}}]},"rows":{"type":"array","default":[{"_key":"row-default-1","label":"Feature One","cells":[{"value":true,"type":"icon","text":""},{"value":true,"type":"icon","text":""},{"value":true,"type":"icon","text":""}]},{"_key":"row-default-2","label":"Feature Two","cells":[{"value":false,"type":"icon","text":""},{"value":true,"type":"icon","text":""},{"value":true,"type":"icon","text":""}]},{"_key":"row-default-3","label":"Feature Three","cells":[{"value":false,"type":"icon","text":""},{"value":false,"type":"icon","text":""},{"value":true,"type":"icon","text":""}]}]},"cta":{"type":"object","default":{"position":"top","normal":{"bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff"},"hover":{"bg":{},"color":""},"typo":{},"border":{},"desktop":{"padding":{"top":"8px","right":"18px","bottom":"8px","left":"18px"},"radius":{"top":"6px","right":"6px","bottom":"6px","left":"6px"},"alignment":"center","margin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{},"radius":{},"alignment":"","margin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{},"radius":{},"alignment":"","margin":{"top":"","right":"","bottom":"","left":""}},"transition":0.2}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"linear","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"angel":90},"img":{"url":""}}}}}},"supports":{"align":["wide","full"],"html":false,"anchor":true,"className":true},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),Yv="b-blocks-comparison-table",Kv=["default","cards","ribbon","stacked"],Qv=["left","center","right"],Zv=(e="ct")=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,Xv=e=>Qv.includes(e)?e:"center",Jv=(e,t="")=>{if(!e)return t;if("string"==typeof e)return e||t;const{type:n="solid",color:o="",gradient:i="",image:s={}}=e;return"gradient"===n?i||t:"image"===n?s?.url?`url('${s.url}') center center / cover no-repeat`:t:o||t},ek=(e,t)=>void 0!==e&&""!==e&&null!==e?e:t,tk=e=>e?{type:"solid",color:e}:void 0,nk=(e,t)=>e||t?{top:e,right:t,bottom:e,left:t}:void 0,ok=e=>e||0===e?`${parseInt(e,10)}px`:"",ik=(e={})=>{const t=e;if(!["headerBg","cellPaddingV","tooltipColor","tableMaxWidth","theme"].some((e=>void 0!==t[e]&&""!==t[e]&&null!==t[e])))return t;const n=t.table||{},o=t.header||{},i=t.body||{};return{...t,columns:ak(t.columns),content:{...t.content||{},caption:ek(t.content?.caption,t.caption),captionPosition:ek(t.content?.captionPosition,t.captionPosition),captionColor:ek(t.content?.captionColor,t.captionColor),captionTypo:t.content?.captionTypo||t.captionTypo,featuredLabel:ek(t.content?.featuredLabel,t.featuredLabel)},table:{...n,theme:ek(n.theme,t.theme),alignment:ek(n.alignment,t.tableAlignment),cellBorderType:ek(n.cellBorderType,t.cellBorderType),stackOnMobile:ek(n.stackOnMobile,t.stackOnMobile),stickyHeader:ek(n.stickyHeader,t.stickyHeader),stickyFirstColumn:ek(n.stickyFirstColumn,t.stickyFirstColumn),showRowStripes:ek(n.showRowStripes,t.showRowStripes),borderColor:ek(n.borderColor,t.borderColor),border:n.border||t.tableBorder,shadow:n.shadow?.length?n.shadow:t.tableShadow,bg:n.bg||t.tableBg,desktop:{...n.desktop||{},iconPosition:ek(n.desktop?.iconPosition,{ |
| 378 |
above:"top",inline:"left",hidden:"hidden"}[t.headerIconPosition]),width:ek(n.desktop?.width,t.tableWidth?.desktop||ok(t.tableMaxWidth)),radius:n.desktop?.radius?.top?n.desktop.radius:t.tableRadius?.desktop||nk(ok(t.borderRadius),ok(t.borderRadius))}},header:{...o,normal:{bg:o.normal?.bg||t.headerBackground||tk(t.headerBg),color:ek(o.normal?.color,t.headerTextColor)},hover:{bg:o.hover?.bg||tk(t.headerHoverBg),color:ek(o.hover?.color,t.headerHoverColor)},typo:o.typo||t.headerTypo},body:{...i,bg:i.bg||t.bodyBackground||tk(t.bodyBg),color:ek(i.color,t.bodyTextColor),typo:i.typo||t.bodyTypo,desktop:{padding:i.desktop?.padding?.top?i.desktop.padding:t.cellPadding?.desktop||nk(ok(t.cellPaddingV),ok(t.cellPaddingH))}},rowLabel:{...t.rowLabel||{},bg:t.rowLabel?.bg||t.rowLabelBackground||tk(t.rowLabelBg),color:ek(t.rowLabel?.color,t.rowLabelColor),typo:t.rowLabel?.typo||t.rowLabelTypo},rowColors:{...t.rowColors||{},odd:t.rowColors?.odd||t.rowOdd,even:t.rowColors?.even||t.rowEven,hover:t.rowColors?.hover||t.rowHover,stripe:t.rowColors?.stripe||t.rowStripeBackground||tk(t.rowStripeBg),transition:ek(t.rowColors?.transition,t.transition)},featured:{...t.featured||{},bg:t.featured?.bg||t.featuredBackground||tk(t.featuredBg),color:ek(t.featured?.color,t.featuredTextColor),columnBg:t.featured?.columnBg||t.featuredColBackground||tk(t.featuredColBg),labelBg:t.featured?.labelBg||t.featuredLabelBackground||tk(t.featuredLabelBg),labelColor:ek(t.featured?.labelColor,t.featuredLabelColor)},icons:{...t.icons||{},check:ek(t.icons?.check,t.checkIcon),cross:ek(t.icons?.cross,t.crossIcon),checkSvg:ek(t.icons?.checkSvg,t.checkIconSvg),crossSvg:ek(t.icons?.crossSvg,t.crossIconSvg),checkColor:ek(t.icons?.checkColor,t.checkColor),crossColor:ek(t.icons?.crossColor,t.crossColor),desktop:{size:ek(t.icons?.desktop?.size,t.iconSizes?.desktop||ok(t.iconSize))}},tooltip:{...t.tooltip||{},bg:t.tooltip?.bg||t.tooltipBackground,color:ek(t.tooltip?.color,t.tooltipColor),typo:t.tooltip?.typo||t.tooltipTypo,arrow:ek(t.tooltip?.arrow,t.tooltipArrow),underline:ek(t.tooltip?.underline,t.tooltipUnderline),shadow:t.tooltip?.shadow?.length?t.tooltip.shadow:t.tooltipShadow,desktop:{width:ek(t.tooltip?.desktop?.width,t.tooltipWidth?.desktop),padding:t.tooltip?.desktop?.padding?.top?t.tooltip.desktop.padding:t.tooltipPadding?.desktop,radius:t.tooltip?.desktop?.radius?.top?t.tooltip.desktop.radius:t.tooltipRadius?.desktop}}}},sk=(e=[])=>({feature:e.find((e=>e?.isFeatureColumn))||null,plans:e.filter((e=>!e?.isFeatureColumn))}),ak=(e=[],t="Features")=>e.some((e=>e?.isFeatureColumn))?e:[{_key:"col-feature",isFeatureColumn:!0,label:t||"Features"},...e],rk=(e={})=>{const t=ik(e).table||{};return[`${Yv}-block`,`${Yv}-theme--${n=t.theme,Kv.includes(n)?n:"default"}`,`${Yv}-align--${Xv(t.alignment)}`,t.showRowStripes?"has-row-stripes":"",t.stickyHeader?"has-sticky-header":"",!1===t.stickyFirstColumn?"":"has-sticky-first-col",t.stackOnMobile?"is-stacked-mobile":""].filter(Boolean).join(" ");var n},lk=({attributes:e,id:o,isBackend:i=!1})=>{const s=ik(e),{feature:a,plans:r}=sk(s.columns||[]),c=[...a?[{column:a,key:"feature"}]:[],...r.map(((e,t)=>({column:e,key:t})))],{advanced:d,content:u={},table:p={},header:h={},body:g={},rowLabel:m={},rowColors:b={},featured:f={},icons:x={},tooltip:y={},cta:v={}}=s,k=p.cellBorderType||"collapse",w=p.border||{},_=p.shadow||[],C=p.bg||{},j=h.typo||{},$=Jv(h.hover?.bg),S=h.hover?.color||"",T=g.typo||{},M=b.odd||{},N=b.even||{},L=b.hover||{},E=b.transition??.2,P=u.captionPosition||"hidden",A=u.captionTypo||{},B=u.captionColor||"",I=y.bg||{},O=y.color||"",R=y.typo||{},z=y.shadow||[],D=y.arrow,F=y.underline,H=m.typo||{},W={top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"},U=`#${o}`,G=`${U} .${Yv}-scroll`,V=`${U} .${Yv}-table`,q=`${V} thead th`,Y=`${V} tbody td, ${V} tbody th, ${V} tfoot td, ${V} tfoot th`,K=`${V} tbody tr`,Q=`${V} caption`,Z=`${V} tbody th.${Yv}-row-label`,X=`${U} .${Yv}-col__cta`,J={left:"margin-left: 0; margin-right: auto;",center:"margin-left: auto; margin-right: auto;",right:"margin-left: auto; margin-right: 0;"},ee=`${U} .${Yv}-tooltip`,te=`${U} .${Yv}-tooltip-bubble`,ne=`${U} .${Yv}-tooltip-arrow`,oe={headerBg:Jv(h.normal?.bg),headerText:h.normal?.color,featuredBg:Jv(f.bg),featuredText:f.color,featuredColBg:Jv(f.columnBg),labelBg:Jv(f.labelBg),labelText:f.labelColor,rowLabelBg:Jv(m.bg),rowLabelText:m.color,stripeBg:Jv(b.stripe),bodyBg:Jv(g.bg),bodyText:g.color,checkColor:x.checkColor,crossColor:x.crossColor,borderColor:p.borderColor},ie=`${U}.${Yv}-theme--${p.theme||"default"}`,se=oe.borderColor||"#e2e8f0",ae=oe.featuredBg||"#2563eb",re=(e,t)=>`color-mix(in srgb, ${e} ${t}%, transparent)`,le=({cards:()=>`\n\t\t\t${ie} ${V} tbody td,\n\t\t\t${ie} ${V} tbody th{\n\t\t\t\tborder-bottom: 1px solid ${se} !important;\n\t\t\t\tborder-bottom-color: ${re(se,70)} !important;\n\t\t\t\tbox-shadow: 0 0 0 1px ${se};\n\t\t\t\tbox-shadow: 0 0 0 1px ${re(se,45)};\n\t\t\t}\n\t\t\t${ie} ${V} thead th.is-featured{ box-shadow: 0 10px 26px ${re(ae,24)} !important; }\n\t\t\t${ie} ${V} td.is-featured{\n\t\t\t\tbox-shadow: 0 0 0 1px ${ae} !important;\n\t\t\t\tbox-shadow: 0 0 0 1px ${re(ae,35)} !important;\n\t\t\t}`}[p.theme]||(()=>""))(),ce=c.map((({column:e,key:t})=>{const n=e?.cta;if(!n)return"";const o=`${U} [data-col="${t}"] .${Yv}-col__cta`,i=n.transition,s=[na("background",Jv(n.normal?.bg||n.bg)),na("color",n.normal?.color||n.color),sa(n.border),na("padding",ha(n.padding)),na("border-radius",ha(n.radius)),""===i||null==i?"":`transition: background ${i}s ease, color ${i}s ease, border-color ${i}s ease;`].filter(Boolean).join(""),a=[na("background",Jv(n.hover?.bg)),na("color",n.hover?.color)].filter(Boolean).join("");return`${s?`${o}{ ${s} }`:""}${a?`${o}:hover, ${o}:focus-visible{ ${a} }`:""}${Object.keys(n.typo||{}).length?pa(o,n.typo).styles:""}`})).join(""),de=c.map((({column:e,key:t})=>e?.iconColor?`${U} [data-col="${t}"] .${Yv}-col__icon{ color: ${e.iconColor}; }`:"")).join(""),ue=e=>`\n\t\t${G}{\n\t\t\t${na("max-width",p?.[e]?.width)}\n\t\t\t${na("border-radius",ha(p?.[e]?.radius))}\n\t\t}\n\n\t\t${q}, ${Y}{ ${na("padding",ha(g?.[e]?.padding))} }\n\n\t\t${U} .${Yv}-cell-icon{\n\t\t\t${na("width",x?.[e]?.size)}\n\t\t\t${na("height",x?.[e]?.size)}\n\t\t}\n\n\t\t${U} .${Yv}-col__icon{\n\t\t\t${na("width",x?.[e]?.headerSize)}\n\t\t\t${na("height",x?.[e]?.headerSize)}\n\t\t\t${"hidden"===p?.[e]?.iconPosition?"display: none;":""}\n\t\t}\n\n\t\t${c.map((({column:t,key:n})=>t?.iconSize?.[e]?`${U} [data-col="${n}"] .${Yv}-col__icon{ width: ${t.iconSize[e]}; height: ${t.iconSize[e]}; }`:"")).join("")}\n\n\t\t${X}{\n\t\t\t${na("padding",ha(v?.[e]?.padding))}\n\t\t\t${na("border-radius",ha(v?.[e]?.radius))}\n\t\t\t${na("margin",ha(v?.[e]?.margin))}\n\t\t\t\n\t\t\t${J[v?.[e]?.alignment]||""}\n\t\t}\n\n\t\t${c.map((({column:t,key:n})=>J[t?.cta?.alignment?.[e]]?`${U} [data-col="${n}"] .${Yv}-col__cta{ ${J[t.cta.alignment[e]]} }`:"")).join("")}\n\n\t\t${U} .${Yv}-col__head{\n\t\t\t${na("flex-direction",W[p?.[e]?.iconPosition])}\n\t\t}\n\n\t\t${te}{\n\t\t\t${na("padding",ha(y?.[e]?.padding))}\n\t\t\t${na("border-radius",ha(y?.[e]?.radius))}\n\t\t\t${na("max-width",y?.[e]?.width)}\n\t\t}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{ |
| 379 |
__html:`\n\t\t\t${pa("",j).googleFontLink}\n\t\t\t${pa("",T).googleFontLink}\n\t\t\t${pa("",A).googleFontLink}\n\t\t\t${pa("",R).googleFontLink}\n\t\t\t${pa("",H).googleFontLink}\n\t\t\t${pa("",v.typo).googleFontLink}\n\n\t\t\t${G}{\n\t\t\t\t${na("border-color",oe.borderColor)}\n\t\t\t\t${na("background",oe.bodyBg)}\n\t\t\t}\n\n\t\t\t${V}{\n\t\t\t\t${na("color",oe.bodyText)}\n\t\t\t\t${na("background",oe.bodyBg)}\n\t\t\t}\n\n\t\t\t${q}{\n\t\t\t\t${na("background",oe.headerBg)}\n\t\t\t\t${na("color",oe.headerText)}\n\t\t\t}\n\n\t\t\t${q}.is-featured{\n\t\t\t\t${na("background",oe.featuredBg)}\n\t\t\t\t${na("color",oe.featuredText)}\n\t\t\t}\n\n\t\t\t${U} .${Yv}-col__featured-badge{\n\t\t\t\t${na("background",oe.labelBg)}\n\t\t\t\t${na("color",oe.labelText)}\n\t\t\t}\n\n\t\t\t${Y}{\n\t\t\t\t${na("border-color",oe.borderColor)}\n\t\t\t}\n\n\t\t\t${V} tbody td.is-featured{ ${na("background",oe.featuredColBg)} }\n\n\t\t\t${Z}{\n\t\t\t\t${na("background",oe.rowLabelBg)}\n\t\t\t\t${na("color",oe.rowLabelText)}\n\t\t\t}\n\t\t\t${pa(Z,H).styles}\n\n\t\t\t${X}{\n\t\t\t\t${na("background",Jv(v.normal?.bg))}\n\t\t\t\t${na("color",v.normal?.color)}\n\t\t\t\t${sa(v.border)}\n\t\t\t\t${na("transition",`background ${v.transition??.2}s ease, color ${v.transition??.2}s ease, border-color ${v.transition??.2}s ease`)}\n\t\t\t}\n\t\t\t${pa(X,v.typo).styles}\n\n\t\t\t${X}:hover, ${X}:focus-visible{\n\t\t\t\t${na("background",Jv(v.hover?.bg))}\n\t\t\t\t${na("color",v.hover?.color)}\n\t\t\t}\n\n\t\t\t${U}.has-sticky-first-col ${V} tbody th.${Yv}-row-label{ ${na("background",oe.bodyBg)} }\n\t\t\t${U}.has-sticky-first-col ${V} thead th:first-child{ ${na("background",oe.headerBg)} }\n\n\t\t\t${U}.has-row-stripes ${V} tbody tr:nth-child(even) td,\n\t\t\t${U}.has-row-stripes ${V} tbody tr:nth-child(even) th{ ${na("background",oe.stripeBg)} }\n\n\t\t\t${U} .${Yv}-cell-icon.is-yes svg{ ${na("color",oe.checkColor)} }\n\t\t\t${U} .${Yv}-cell-icon.is-no svg{ ${na("color",oe.crossColor)} }\n\n\t\t\t${V}{\n\t\t\t\t${na("border-collapse","separate"===k?"separate":"collapse")}\n\t\t\t}\n\n\t\t\t${le}\n\t\t\t${ce}\n\t\t\t${de}\n\n\t\t\t${G}{\n\t\t\t\t${sa(w)}\n\t\t\t\t${na("box-shadow",la(_))}\n\t\t\t\t${oa(C)}\n\t\t\t}\n\n\t\t\t${pa(q,j).styles}\n\t\t\t${pa(Y,T).styles}\n\n\t\t\t${q}:hover{\n\t\t\t\t${na("background",$)}\n\t\t\t\t${na("color",S)}\n\t\t\t}\n\n\t\t\t${K}:nth-child(odd) td, ${K}:nth-child(odd) th{\n\t\t\t\t${na("background",Jv(M?.bg))}\n\t\t\t\t${na("color",M?.color)}\n\t\t\t}\n\n\t\t\t${K}:nth-child(even) td, ${K}:nth-child(even) th{\n\t\t\t\t${na("background",Jv(N?.bg))}\n\t\t\t\t${na("color",N?.color)}\n\t\t\t}\n\n\t\t\t${Jv(L?.bg)||L?.color?`${K}:hover td, ${K}:hover th{\n\t\t\t\t${na("background",Jv(L?.bg))}\n\t\t\t\t${na("color",L?.color)}\n\t\t\t}`:""}\n\n\t\t\t${q}, ${Y}{\n\t\t\t\t${na("transition",`background ${E}s, color ${E}s`)}\n\t\t\t}\n\t\t\t${te}{\n\t\t\t\t${na("background",Jv(I))}\n\t\t\t\t${na("color",O)}\n\t\t\t\t${na("box-shadow",la(z))}\n\t\t\t}\n\t\t\t${pa(te,R).styles}\n\n\t\t\t${ne}{\n\t\t\t\t${na("background",Jv(I))}\n\t\t\t\t${!1===D?"display: none;":""}\n\t\t\t}\n\n\t\t\t${!1===F?`${ee}{ text-decoration: none; }`:""}\n\n\t\t\t${"hidden"!==P?`${Q}{\n\t\t\t\tposition: static;\n\t\t\t\twidth: auto;\n\t\t\t\theight: auto;\n\t\t\t\tmargin: 0;\n\t\t\t\tclip: auto;\n\t\t\t\tclip-path: none;\n\t\t\t\toverflow: visible;\n\t\t\t\tcaption-side: ${"top"===P?"top":"bottom"};\n\t\t\t\tpadding: 8px 0;\n\t\t\t\t${na("color",B)}\n\t\t\t}`:""}\n\t\t\t${pa(Q,A).styles}\n\n\t\t\t${ue("desktop")}\n\t\t\t${t}{ ${ue("tablet")} }\n\t\t\t${n}{ ${ue("mobile")} }\n\n\t\t\t${_a(o,d,i,!1)}\n\t\t\t`}})},ck={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false"},dk={check:(0,l.jsx)("svg",{...ck,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{fill:"currentColor",d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"})}),"check-circle":(0,l.jsx)("svg",{...ck,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{fill:"currentColor",d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm141.6 192.2L235.7 360.6c-3.1 3.1-8.2 3.1-11.3 0L150.4 287c-3.1-3.1-3.1-8.2 0-11.3l24.5-24.5c3.1-3.1 8.2-3.1 11.3 0l43.5 43.5 132.2-131.3c3.1-3.1 8.2-3.1 11.3 0l24.5 24.5c3 3.1 3 8.2-.1 11.3z"})})},uk={times:(0,l.jsx)("svg",{...ck,viewBox:"0 0 352 512",children:(0,l.jsx)("path",{fill:"currentColor",d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"})}),"times-circle":(0,l.jsx)("svg",{...ck,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{fill:"currentColor",d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"})})},pk={stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},hk=e=>(0,l.jsxs)("svg",{...pk,...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),gk=e=>(0,l.jsxs)("svg",{...pk,...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),mk=e=>(0,l.jsxs)("svg",{...pk,...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),bk=({attributes:e,isBackend:t=!1})=>{const{content:n={},icons:o={},cta:i={},columns:s=[],rows:a=[]}=ik(e),{feature:r,plans:c}=sk(s),d=i.position||"top",u=e=>e?.ctaLabel?t||!e.ctaUrl?(0,l.jsx)("span",{className:`${Yv}-col__cta`,"aria-hidden":t?"true":void 0,children:e.ctaLabel}):(0,l.jsx)("a",{className:`${Yv}-col__cta`,href:e.ctaUrl,rel:"noopener",children:e.ctaLabel}):null,p=n.caption,h=n.featuredLabel,g=o.check||"check",b=o.cross||"times",f=o.checkSvg||"",x=o.crossSvg||"",y=e=>{const t=e?f:x;return t?(0,l.jsx)("span",{className:`${Yv}-cell-glyph`,dangerouslySetInnerHTML:{__html:t}}):e?((e="check")=>dk[e]||dk.check)(g):((e="times")=>uk[e]||uk.times)(b)},[v,k]=(0,m.useState)(null),w=(0,m.useCallback)(((e,t)=>{const n=e.currentTarget.getBoundingClientRect(),o=window.innerHeight-n.bottom>140;k({text:t,x:n.left+n.width/2,y:o?n.bottom+8:n.top-8,flipped:!o})}),[]),_=(0,m.useCallback)((()=>k(null)),[]),C=(e,t)=>(0,l.jsxs)(l.Fragment,{children:[t&&(e?.badge||h)?(0,l.jsx)("span",{className:`${Yv}-col__featured-badge`,"aria-hidden":"true",children:e?.badge||h}):null,e?.icon||e?.label?(0,l.jsxs)("span",{className:`${Yv}-col__head`,children:[e?.icon?(0,l.jsx)("span",{className:`${Yv}-col__icon`,dangerouslySetInnerHTML:{__html:e.icon}}):null,e?.label?(0,l.jsx)("span",{className:`${Yv}-col__label`,children:e.label}):null]}):null,e?.subtitle?(0,l.jsx)("span",{className:`${Yv}-col__subtitle`,children:e.subtitle}):null,"top"===d?u(e):null]}),j=c.findIndex((e=>e?.isFeatured)),$=p||"Feature comparison across plans";if(!(c.length>0&&a.length>0))return(0,l.jsx)("p",{className:`${Yv}-empty`,children:"No comparison data to display. Add columns and rows in the block sidebar."});const S=v?(0,l.jsxs)("div",{className:`${Yv}-tooltip-bubble${v.flipped?" is-flipped":""}`,style:{left:`${v.x}px`,top:`${v.y}px`},role:"tooltip", |
| 380 |
children:[v.text,(0,l.jsx)("span",{className:`${Yv}-tooltip-arrow`,"aria-hidden":"true"})]}):null;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:`${Yv}-scroll`,role:"region","aria-label":`${$}. Scroll horizontally to see all columns.`,tabIndex:0,children:(0,l.jsxs)("table",{className:`${Yv}-table`,children:[(0,l.jsx)("caption",{className:`${Yv}-caption screen-reader-text`,children:$}),(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{scope:"col","data-col":"feature",className:`${Yv}-feature-col`,children:r?.label||r?.icon?C(r,!!r?.isFeatured):(0,l.jsx)("span",{className:"screen-reader-text",children:"Feature"})}),c.map(((e,t)=>{const n=!!e?.isFeatured;return(0,l.jsx)("th",{scope:"col","data-col":t,className:`${Yv}-col${n?" is-featured":""}`,children:C(e,n)},e?._key||`col-${t}`)}))]})}),(0,l.jsx)("tbody",{children:a.map(((e,t)=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{scope:"row",className:`${Yv}-row-label`,children:e?.tooltip?(0,l.jsxs)("span",{className:`${Yv}-tooltip`,tabIndex:0,onMouseEnter:t=>w(t,e.tooltip),onMouseLeave:_,onFocus:t=>w(t,e.tooltip),onBlur:_,children:[e?.label||(0,l.jsx)("span",{className:"screen-reader-text",children:"Feature"}),(0,l.jsx)("span",{className:"screen-reader-text",children:e.tooltip})]}):e?.label||(0,l.jsx)("span",{className:"screen-reader-text",children:"Feature"})}),c.map(((t,n)=>{const o=e?.cells?.[n]||{type:"icon",value:!1,text:""},i=`${Yv}-cell${n===j?" is-featured":""}`;return"text"===o.type?(0,l.jsx)("td",{"data-col":n,"data-label":c[n]?.label||"",className:i,children:o.text||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{"aria-hidden":"true",children:"—"}),(0,l.jsx)("span",{className:"screen-reader-text",children:"Not specified"})]})},n):(0,l.jsx)("td",{"data-col":n,"data-label":c[n]?.label||"",className:i,children:(0,l.jsxs)("span",{className:`${Yv}-cell-icon ${o.value?"is-yes":"is-no"}`,children:[y(!!o.value),(0,l.jsx)("span",{className:"screen-reader-text",children:o.value?"Yes":"No"})]})},n)}))]},e?._key||`row-${t}`)))}),"bottom"===d&&c.some((e=>e?.ctaLabel))?(0,l.jsx)("tfoot",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{scope:"row","data-col":"feature",className:`${Yv}-row-label`,children:u(r)}),c.map(((e,t)=>(0,l.jsx)("td",{"data-col":t,className:`${Yv}-cell ${Yv}-cta-cell${t===j?" is-featured":""}`,children:u(e)},e?._key||`cta-${t}`)))]})}):null]})}),S]})},fk=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],xk=[{label:(0,x.__)("Default — classic grid","b-blocks"),value:"default"},{label:(0,x.__)("Cards — columns as cards","b-blocks"),value:"cards"},{label:(0,x.__)("Ribbon — tabbed headers on a panel","b-blocks"),value:"ribbon"},{label:(0,x.__)("Stacked — elevated coloured cards","b-blocks"),value:"stacked"}],yk=((0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Right","b-blocks"),(0,x.__)("Check","b-blocks"),(0,x.__)("Check in circle","b-blocks"),(0,x.__)("Cross","b-blocks"),(0,x.__)("Cross in circle","b-blocks"),(0,x.__)("Icon","b-blocks"),(0,x.__)("Text","b-blocks"),[{label:(0,x.__)("Icon (yes/no)","b-blocks"),value:"icon"},{label:(0,x.__)("Text","b-blocks"),value:"text"}]),vk=e=>({_key:e("col"),label:(0,x.__)("New Plan","b-blocks"),subtitle:"",badge:"",isFeatured:!1,icon:"",iconColor:"",iconSize:{desktop:"",tablet:"",mobile:""},ctaUrl:"",ctaLabel:"",cta:{normal:{bg:{},color:""},hover:{bg:{},color:""},typo:{},border:{},transition:"",alignment:{desktop:"",tablet:"",mobile:""},padding:{top:"",right:"",bottom:"",left:""},radius:{top:"",right:"",bottom:"",left:""}}}),kk=(e,t=0)=>({_key:e("row"),label:(0,x.__)("New feature","b-blocks"),tooltip:"",cells:Array.from({length:t},(()=>({type:"icon",value:!0,text:""})))}),wk={top:"",right:"",bottom:"",left:""},_k=e=>({type:"solid",color:e}),Ck=e=>({desktop:{top:e,right:e,bottom:e,left:e},tablet:{},mobile:{}}),jk=(e,t)=>({desktop:{top:e,right:t,bottom:e,left:t},tablet:{},mobile:{}}),$k={default:{header:{normal:{bg:_k("#1e293b"),color:"#ffffff"},hover:{bg:{},color:""}},body:{bg:_k("#ffffff"),color:"#1f2937"},featured:{bg:_k("#2563eb"),color:"#ffffff",columnBg:_k("#eff6ff"),labelBg:_k("#f59e0b"),labelColor:"#ffffff"},rowLabel:{bg:_k("transparent"),color:""},rowColorsPart:{odd:{color:"",bg:""},even:{color:"",bg:""}},tablePart:{borderColor:"#e2e8f0"},icons:{checkColor:"#16a34a",crossColor:"#dc2626"},radiusPart:Ck("8px"),paddingPart:jk("12px","16px"),shadowPart:[]},cards:{header:{normal:{bg:_k("#1e293b"),color:"#ffffff"},hover:{bg:{},color:""}},body:{bg:_k("#ffffff"),color:"#1f2937"},featured:{bg:_k("#2563eb"),color:"#ffffff",columnBg:_k("#eff6ff"),labelBg:_k("#f59e0b"),labelColor:"#ffffff"},rowLabel:{bg:_k("transparent"),color:"#0f172a"},rowColorsPart:{odd:{color:"",bg:""},even:{color:"",bg:""}},tablePart:{borderColor:"#e2e8f0"},icons:{checkColor:"#16a34a",crossColor:"#dc2626"},tableRadius:Ck("8px"),cellPadding:jk("14px","16px"),tableShadow:[{hOffset:"0px",vOffset:"4px",blur:"18px",spreed:"0px",color:"#0f172a1f",isInset:!1}]},ribbon:{header:{normal:{bg:_k("#2563eb"),color:"#ffffff"},hover:{bg:{},color:""}},body:{bg:_k(""),color:"#0f172a"},featured:{bg:_k("#e0574f"),color:"#ffffff",columnBg:_k("#ffffff"),labelBg:_k("#f59e0b"),labelColor:"#ffffff"},rowLabel:{bg:_k("transparent"),color:"#0f172a"},rowColorsPart:{odd:{color:"",bg:"#ffffff"},even:{color:"",bg:"#f1f5f9"}},tablePart:{borderColor:"transparent"},icons:{checkColor:"#16a34a",crossColor:"#dc2626"},radiusPart:Ck("8px"),paddingPart:jk("12px","16px"),shadowPart:[]},stacked:{header:{normal:{bg:_k("#1e293b"),color:"#ffffff"},hover:{bg:{},color:""}},body:{bg:_k(""),color:"#1f2937"},featured:{bg:_k("#e0574f"),color:"#ffffff",columnBg:_k("#ffffff"),labelBg:_k("#f59e0b"),labelColor:"#ffffff"},rowLabel:{bg:_k("transparent"),color:"#0f172a"},rowColorsPart:{odd:{color:"",bg:"#ffffff"},even:{color:"",bg:"#f3f4f6"}},tablePart:{borderColor:"transparent"},icons:{checkColor:"#16a34a",crossColor:"#dc2626"},radiusPart:Ck("8px"),paddingPart:jk("14px","16px"),shadowPart:[]}},Sk={cards:"separate",ribbon:"separate",stacked:"separate"},Tk=["cards","ribbon","stacked"],Mk=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{table:i={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Visual theme","b-blocks"),value:i.theme||"default",options:xk,onChange:n=>t(((e,t={})=>{const n=$k[e]||{};return{table:{...t.table||{},theme:e,borderColor:n.tablePart?.borderColor,shadow:n.shadowPart||[],desktop:{...t.table?.desktop||{},radius:n.radiusPart?.desktop}},header:n.header,body:{...t.body||{},...n.body||{},desktop:{...t.body?.desktop||{},padding:n.paddingPart?.desktop}},rowLabel:n.rowLabel,rowColors:{...t.rowColors||{},...n.rowColorsPart||{}},featured:n.featured,icons:{...t.icons||{},...n.icons||{}}}})(n,e)),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Table alignment","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.alignment||"center",onChange:e=>n("table",e||"center","alignment"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:(0,l.jsx)(hk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:(0,l.jsx)(gk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:(0,l.jsx)(mk,{style:{rotate:"-90deg"}})})]})]}),(0,l.jsx)(v,{className:"mt10 mb5",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Header icon position","b-blocks")," ",(0,l.jsx)(_,{})]}) |
| 381 |
}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i?.[o]?.iconPosition,onChange:e=>n("table",e,o,"iconPosition"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Top","b-blocks"),value:"top"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Left","b-blocks"),value:"left"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Right","b-blocks"),value:"right"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hide","b-blocks"),value:"hidden"})]}),(0,l.jsx)("small",{className:"mb10",style:{display:"block",opacity:.7},children:(0,x.__)("Set each column’s icon under Columns (Plans). Leave tablet and mobile unset to inherit.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Row stripes","b-blocks"),checked:!!i.showRowStripes,onChange:e=>n("table",e,"showRowStripes")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Sticky header row","b-blocks"),checked:!!i.stickyHeader,onChange:e=>n("table",e,"stickyHeader"),help:(0,x.__)("Pin the header row while the user scrolls vertically.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Sticky first column","b-blocks"),checked:!1!==i.stickyFirstColumn,onChange:e=>n("table",e,"stickyFirstColumn"),help:(0,x.__)("Pin the feature-name column while the user scrolls horizontally.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Stack columns on mobile","b-blocks"),checked:!!i.stackOnMobile,onChange:e=>n("table",e,"stackOnMobile"),help:(0,x.__)("Below 640px each row becomes a card and every value is labelled with its plan name, instead of scrolling sideways.","b-blocks"),__nextHasNoMarginBottom:!0})]})},Nk=({attributes:e,updateObj:t})=>{const{content:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Accessible caption","b-blocks"),value:n.caption||"",onChange:e=>t("content",e,"caption"),help:(0,x.__)("Visually hidden but read by screen readers. Describe what is being compared.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Featured badge text","b-blocks"),value:n.featuredLabel||"",onChange:e=>t("content",e,"featuredLabel"),placeholder:(0,x.__)("e.g. Most Popular","b-blocks"),__nextHasNoMarginBottom:!0})]})},Lk=({value:e=[],onChange:t,index:n,featuredLabel:o="",device:i="desktop"})=>{const[s,a]=(0,m.useState)("normal"),r=e[n];if(!r)return null;const c=(o,i,s)=>t(e.map(((e,t)=>t===n?{...e||{},cta:{...e?.cta||{},[o]:{...e?.cta?.[o]||{},[i]:s}}}:e))),d=(o,i)=>t(e.map(((e,t)=>t===n?{...e||{},cta:{...e?.cta||{},[o]:i}}:e))),u=(o,i)=>{let s=e.map(((e,t)=>t===n?{...e||{},[o]:i}:e));"isFeatured"===o&&!0===i&&(s=s.map(((e,t)=>t===n?e:{...e||{},isFeatured:!1}))),t(s)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Column label","b-blocks"),value:r.label||"",onChange:e=>u("label",e),placeholder:(0,x.__)("e.g. Pro","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Subtitle (optional)","b-blocks"),value:r.subtitle||"",onChange:e=>u("subtitle",e),placeholder:(0,x.__)("e.g. $19/mo","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Header Icon","b-blocks"),value:r.icon,onChange:e=>u("icon",e)}),r.icon?(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Icon Color:","b-blocks"),value:r.iconColor,onChange:e=>u("iconColor",e)}):null,r.icon?(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.iconSize?.[i],onChange:e=>u("iconSize",{...r.iconSize||{},[i]:e}),__next40pxDefaultSize:!0})]}):null,(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("CTA URL (optional)","b-blocks"),value:r.ctaUrl||"",onChange:e=>u("ctaUrl",e),placeholder:"https://",type:"url",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("CTA button label","b-blocks"),value:r.ctaLabel||"",onChange:e=>u("ctaLabel",e),placeholder:(0,x.__)("e.g. Choose Plan","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Featured column (highlight)","b-blocks"),checked:!!r.isFeatured,onChange:e=>u("isFeatured",e),help:(0,x.__)("Only one column can be featured at a time.","b-blocks"),__nextHasNoMarginBottom:!0}),!!r.isFeatured&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Badge text","b-blocks"),value:r.badge||"",onChange:e=>u("badge",e),placeholder:o||(0,x.__)("Most Popular","b-blocks"),help:(0,x.__)("Leave empty to use the Featured Label from the Content panel.","b-blocks"),__nextHasNoMarginBottom:!0}),r.ctaLabel?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{}),(0,l.jsx)(v,{children:(0,x.__)("CTA overrides for this column","b-blocks")}),(0,l.jsx)("small",{style:{display:"block",opacity:.7,marginBottom:8},children:(0,x.__)("Anything left empty inherits Style → CTA Button.","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:a,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:r.cta?.[s]?.bg||{},onChange:e=>c(s,"bg",e)}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:r.cta?.[s]?.color,onChange:e=>c(s,"color",e)}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:r.cta?.typo||{},onChange:e=>d("typo",e)}),(0,l.jsx)(v,{className:"mt10 mb5",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:r.cta?.alignment?.[i],onChange:e=>d("alignment",{...r.cta?.alignment||{},[i]:e}),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:(0,l.jsx)(hk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:(0,l.jsx)(gk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:(0,l.jsx)(mk,{style:{rotate:"-90deg"}})})]}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:r.cta?.border||{},onChange:e=>d("border",e)}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:r.cta?.padding,onChange:e=>d("padding",e)}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:r.cta?.radius,onChange:e=>d("radius",e)}),"hover"===s&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:""===r.cta?.transition||void 0===r.cta?.transition?"":r.cta.transition,min:0,max:2,step:.05,allowReset:!0,onChange:e=>d("transition",void 0===e?"":e),help:(0,x.__)("Leave unset to inherit Style → CTA Button.","b-blocks"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}):null]})},Ek=({attributes:e,setAttributes:t,device:n="desktop"})=>{const o=ak(e.columns||[]),{plans:i}=sk(o),s=e=>e-(o.findIndex((e=>e?.isFeatureColumn))<e?1:0),a=e.rows||[],r=e=>a.map((t=>({...t||{}, |
| 382 |
cells:e(Array.isArray(t?.cells)?t.cells:[])}))),c=(0,m.useCallback)((e=>{i.length>=6||t({columns:e,rows:r((e=>[...e,{type:"icon",value:!1,text:""}]))})}),[JSON.stringify(o),JSON.stringify(a)]),d=(0,m.useCallback)((e=>{if(o[e]?.isFeatureColumn||i.length>=6)return;const n={...o[e]||{},_key:Zv("col"),isFeatured:!1};t({columns:[...o.slice(0,e+1),n,...o.slice(e+1)],rows:r((t=>{const n=s(e),o=t.slice();return o.splice(n+1,0,{...t[n]||{type:"icon",value:!1,text:""}}),o}))})}),[JSON.stringify(o),JSON.stringify(a)]),u=(0,m.useCallback)((e=>{o[e]?.isFeatureColumn||i.length<=2||t({columns:o.filter(((t,n)=>n!==e)),rows:r((t=>t.filter(((t,n)=>n!==s(e)))))})}),[JSON.stringify(o),JSON.stringify(a)]),p=(0,m.useCallback)((t=>(0,l.jsx)(Lk,{...t,featuredLabel:e.content?.featuredLabel,device:n})),[e.content?.featuredLabel,n]);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Columns (Plans)","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(_s,{value:o,onChange:e=>{const n=o.map((e=>e?._key)),s=e.map((e=>e?._key));if(n.length===s.length&&s.every((e=>n.includes(e)))&&s.join("|")!==n.join("|")){if(0!==e.findIndex((e=>e?.isFeatureColumn)))return void t({columns:o});const n=i.map((e=>e?._key)),s=e.filter((e=>!e?.isFeatureColumn)).map((e=>e?._key)).map((e=>n.indexOf(e)));t({columns:e,rows:r((e=>s.map((t=>e[t]||{type:"icon",value:!1,text:""}))))})}else t({columns:e})},arrKey:"columns",itemLabel:"Column",title:"label",design:"sortable",minItem:3,ItemSettings:p,newItem:vk(Zv),handleAdd:c,handleCopy:d,handleDelete:u}),i.length>=6&&(0,l.jsx)(js,{status:"info",isIcon:!0,children:(0,x.__)("Maximum of 6 columns reached.","b-blocks")})]})},Pk=({value:e=[],onChange:t,index:n,columns:o=[]})=>{const i=e[n];if(!i)return null;const s=(o,i)=>t(e.map(((e,t)=>t===n?{...e||{},[o]:i}:e))),a=(i,s,a)=>t(e.map(((e,t)=>{if(t!==n)return e;const r=Array.isArray(e?.cells)?e.cells.slice():[];for(;r.length<o.length;)r.push({type:"icon",value:!1,text:""});return r[i]={...r[i]||{type:"icon",value:!1,text:""},[s]:a},{...e||{},cells:r}}))),r=Array.isArray(i.cells)?i.cells:[];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Feature name","b-blocks"),value:i.label||"",onChange:e=>s("label",e),placeholder:(0,x.__)("e.g. Unlimited storage","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Tooltip (optional)","b-blocks"),value:i.tooltip||"",onChange:e=>s("tooltip",e),placeholder:(0,x.__)("Extra explanation shown on hover/focus","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.BaseControl,{className:"mt10",label:(0,x.__)("Cells","b-blocks"),__nextHasNoMarginBottom:!0,children:[!o.length&&(0,l.jsx)("p",{style:{marginTop:4,fontSize:12,opacity:.7},children:(0,x.__)("Add at least one column to edit cells.","b-blocks")}),o.map(((e,t)=>{const n=r[t]||{type:"icon",value:!1,text:""};return(0,l.jsxs)("div",{className:"b-blocks-comparison-table-cell-editor",children:[(0,l.jsxs)("div",{className:"b-blocks-comparison-table-cell-editor__head",children:[(0,l.jsx)("span",{children:e?.label||(0,x.__)("Column","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:"text"===n.type?"text":"icon",options:yk,onChange:e=>a(t,"type",e),__nextHasNoMarginBottom:!0})]}),"text"===n.type?(0,l.jsx)(y.TextControl,{label:(0,x.__)("Text value","b-blocks"),hideLabelFromVision:!0,value:n.text||"",onChange:e=>a(t,"text",e),placeholder:(0,x.__)("e.g. 10 GB, Unlimited, $9/mo","b-blocks"),__nextHasNoMarginBottom:!0}):(0,l.jsx)(y.ToggleControl,{className:"mt10",label:n.value?(0,x.__)("Yes (green check)","b-blocks"):(0,x.__)("No (red X)","b-blocks"),checked:!!n.value,onChange:e=>a(t,"value",e),__nextHasNoMarginBottom:!0})]},e?._key||t)}))]})]})},Ak=({attributes:e,setAttributes:t})=>{const n=e.columns||[],o=e.rows||[],i=(0,m.useCallback)((e=>{o.length>=30||t({rows:e})}),[JSON.stringify(o)]),s=(0,m.useCallback)((e=>{if(o.length>=30)return;const n=o[e]||{},i={...n,_key:Zv("row"),cells:(n.cells||[]).map((e=>({...e})))};t({rows:[...o.slice(0,e+1),i,...o.slice(e+1)]})}),[JSON.stringify(o)]),a=(0,m.useCallback)((e=>(0,l.jsx)(Pk,{...e,columns:n})),[JSON.stringify(n)]);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Feature Rows","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(_s,{value:o,onChange:e=>t({rows:e}),arrKey:"rows",itemLabel:"Row",title:"label",design:"sortable",minItem:0,ItemSettings:a,newItem:kk(Zv,n.length),handleAdd:i,handleCopy:s}),o.length>=30&&(0,l.jsx)(js,{status:"info",isIcon:!0,children:(0,x.__)("Maximum of 30 rows reached.","b-blocks")})]})},Bk=({attributes:e,updateObj:t})=>{const{icons:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icons","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Positive (yes) icon","b-blocks"),value:n.check||"check",options:[{label:(0,x.__)("Check mark","b-blocks"),value:"check"},{label:(0,x.__)("Check inside circle","b-blocks"),value:"check-circle"}],onChange:e=>t("icons",e,"check"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Negative (no) icon","b-blocks"),value:n.cross||"times",options:[{label:(0,x.__)("Cross / X","b-blocks"),value:"times"},{label:(0,x.__)("X inside circle","b-blocks"),value:"times-circle"}],onChange:e=>t("icons",e,"cross"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("hr",{}),(0,l.jsx)(Zn,{label:(0,x.__)("Custom “Yes” Icon","b-blocks"),value:n.checkSvg,onChange:e=>t("icons",e,"checkSvg")}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Custom “No” Icon","b-blocks"),value:n.crossSvg,onChange:e=>t("icons",e,"crossSvg")}),(n.checkSvg||n.crossSvg)&&(0,l.jsx)(js,{status:"info",isIcon:!0,children:(0,x.__)("A library icon overrides the built-in shape above. Clear it to go back.","b-blocks")})]})},Ik=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Mk,{...e}),(0,l.jsx)(Nk,{...e}),(0,l.jsx)(Ek,{...e}),(0,l.jsx)(Ak,{...e}),(0,l.jsx)(Bk,{...e})]}),Ok=({attributes:e,updateObj:t})=>{const{body:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Body","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:n.bg||{},onChange:e=>t("body",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:n.color,onChange:e=>t("body",e,"color")})]})},Rk=({attributes:e,updateObj:t})=>{const{content:n={}}=e,o=n.captionPosition||"hidden";return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Position","b-blocks"),value:o,options:[{label:(0,x.__)("Screen readers only","b-blocks"),value:"hidden"},{label:(0,x.__)("Above the table","b-blocks"),value:"top"},{label:(0,x.__)("Below the table","b-blocks"),value:"bottom"}],onChange:e=>t("content",e,"captionPosition"),__nextHasNoMarginBottom:!0}),"hidden"===o&&(0,l.jsx)(js,{status:"info",isIcon:!0,children:(0,x.__)("The caption is still read by screen readers — set a position to show it on the page too.","b-blocks")}),"hidden"!==o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color:","b-blocks"),value:n.captionColor,onChange:e=>t("content",e,"captionColor")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.captionTypo||{},onChange:e=>t("content",e,"captionTypo")})]})]})},zk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{body:o={},rowColors:i={}}=e,[s,a]=(0,m.useState)("normal"),r="hover"===s;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Cells","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding,resetValues:wk,onChange:e=>t("body",e,n,"padding")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:o.typo||{},onChange:e=>t("body",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10", |
| 383 |
__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:a,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Row Text Color:","b-blocks"),value:i.hover?.color,onChange:e=>t("rowColors",e,"hover","color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Row Background","b-blocks"),value:i.hover?.bg,onChange:e=>t("rowColors",e,"hover","bg")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:i.transition??.2,min:0,max:5,step:.05,onChange:e=>t("rowColors",e,"transition"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Odd Row Text:","b-blocks"),value:i.odd?.color,onChange:e=>t("rowColors",e,"odd","color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Odd Row Background","b-blocks"),value:i.odd?.bg,onChange:e=>t("rowColors",e,"odd","bg")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Stripe Background","b-blocks"),value:i.stripe||{},onChange:e=>t("rowColors",e,"stripe")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Even Row Text:","b-blocks"),value:i.even?.color,onChange:e=>t("rowColors",e,"even","color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Even Row Background","b-blocks"),value:i.even?.bg,onChange:e=>t("rowColors",e,"even","bg")})]})]})},Dk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{cta:o={},columns:i=[]}=e,[s,a]=(0,m.useState)("normal"),r=i.some((e=>e?.ctaLabel));return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("CTA Button","b-blocks"),initialOpen:!1,children:[!r&&(0,l.jsx)(js,{status:"info",isIcon:!0,children:(0,x.__)("No column has a CTA yet — add a button label under Columns (Plans) to see these styles.","b-blocks")}),(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Position","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.position||"top",onChange:e=>t("cta",e||"top","position"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("In header","b-blocks"),value:"top"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Column bottom","b-blocks"),value:"bottom"})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:o?.[n]?.alignment,onChange:e=>t("cta",e,n,"alignment"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:(0,l.jsx)(hk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:(0,l.jsx)(gk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:(0,l.jsx)(mk,{style:{rotate:"-90deg"}})})]})]}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:o.typo||{},onChange:e=>t("cta",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:a,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o?.[s]?.bg||{},onChange:e=>t("cta",e,s,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:o?.[s]?.color,onChange:e=>t("cta",e,s,"color")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border||{},onChange:e=>t("cta",e,"border")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.margin,resetValues:wk,onChange:e=>t("cta",e,n,"margin")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding,resetValues:wk,onChange:e=>t("cta",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius,resetValues:wk,onChange:e=>t("cta",e,n,"radius")}),"hover"===s&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:o.transition??.2,min:0,max:2,step:.05,onChange:e=>t("cta",e,"transition"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})},Fk=({attributes:e,updateObj:t})=>{const{featured:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Featured Column","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Header Background","b-blocks"),value:n.bg||{},onChange:e=>t("featured",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Header Text:","b-blocks"),value:n.color,onChange:e=>t("featured",e,"color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Column Background","b-blocks"),value:n.columnBg||{},onChange:e=>t("featured",e,"columnBg")}),(0,l.jsx)("hr",{}),(0,l.jsx)(An,{label:(0,x.__)("Badge Background","b-blocks"),value:n.labelBg||{},onChange:e=>t("featured",e,"labelBg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Badge Text:","b-blocks"),value:n.labelColor,onChange:e=>t("featured",e,"labelColor")})]})},Hk=({attributes:e,updateObj:t})=>{const{header:n={}}=e,[o,i]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:n.typo||{},onChange:e=>t("header",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:i,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:n[o]?.color,onChange:e=>t("header",e,o,"color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:n[o]?.bg||{},onChange:e=>t("header",e,o,"bg")})]})},Wk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{icons:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icons","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("“Yes” Color:","b-blocks"),value:o.checkColor,onChange:e=>t("icons",e,"checkColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("“No” Color:","b-blocks"),value:o.crossColor,onChange:e=>t("icons",e,"crossColor")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o?.[n]?.size,onChange:e=>t("icons",e,n,"size"),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Header Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o?.[n]?.headerSize, |
| 384 |
onChange:e=>t("icons",e,n,"headerSize"),__next40pxDefaultSize:!0})]})]})},Uk=({attributes:e,updateObj:t})=>{const{rowLabel:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Row Labels","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:n.bg||{},onChange:e=>t("rowLabel",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:n.color,onChange:e=>t("rowLabel",e,"color")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo||{},onChange:e=>t("rowLabel",e,"typo")})]})},Gk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{table:o={}}=e,i=Sk[o.theme],s=Tk.includes(o.theme);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table Style","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o?.[n]?.width,onChange:e=>t("table",e,n,"width"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Cell Border Type","b-blocks"),value:i||o.cellBorderType||"collapse",labelPosition:"edge",disabled:!!i,options:[{label:(0,x.__)("Collapse","b-blocks"),value:"collapse"},{label:(0,x.__)("Separate","b-blocks"),value:"separate"}],onChange:e=>t("table",e,"cellBorderType"),__nextHasNoMarginBottom:!0}),i&&(0,l.jsxs)(js,{status:"info",isIcon:!0,children:[(0,x.__)("The selected theme needs this set to","b-blocks")," ",(0,l.jsx)("b",{children:i})," ",(0,x.__)("for its layout, so this control is inactive. Switch to Default or Striped to change it.","b-blocks")]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Grid Line Color:","b-blocks"),value:o.borderColor,onChange:e=>t("table",e,"borderColor")}),s&&(0,l.jsx)(js,{status:"info",isIcon:!0,children:(0,x.__)("This theme removes the outer frame so its cards stand free, so the border below has no effect. Grid Line Color still applies to the cells.","b-blocks")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border||{},onChange:e=>t("table",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius,resetValues:wk,onChange:e=>t("table",e,n,"radius")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o.bg||{},onChange:e=>t("table",e,"bg")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:o.shadow||[],onChange:e=>t("table",e,"shadow")})]})},Vk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{rows:o=[],tooltip:i={}}=e,s=o.some((e=>e?.tooltip));return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tooltip","b-blocks"),initialOpen:!1,children:[!s&&(0,l.jsx)(js,{status:"info",isIcon:!0,children:(0,x.__)("No row has a tooltip yet — add one under General → Feature Rows to see these styles.","b-blocks")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:i.bg||{},onChange:e=>t("tooltip",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:i.color,onChange:e=>t("tooltip",e,"color")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typo||{},onChange:e=>t("tooltip",e,"typo")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i?.[n]?.width,onChange:e=>t("tooltip",e,n,"width"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:void 0,values:i?.[n]?.padding,resetValues:wk,onChange:e=>t("tooltip",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i?.[n]?.radius,resetValues:wk,onChange:e=>t("tooltip",e,n,"radius")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:i.shadow||[],onChange:e=>t("tooltip",e,"shadow")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show arrow","b-blocks"),checked:!1!==i.arrow,onChange:e=>t("tooltip",!!e,"arrow"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Underline the label","b-blocks"),checked:!1!==i.underline,onChange:e=>t("tooltip",!!e,"underline"),help:(0,x.__)("The dotted underline is the only cue that a tooltip exists.","b-blocks"),__nextHasNoMarginBottom:!0})]})},qk=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Gk,{...e}),(0,l.jsx)(Hk,{...e}),(0,l.jsx)(Ok,{...e}),(0,l.jsx)(zk,{...e}),(0,l.jsx)(Uk,{...e}),(0,l.jsx)(Fk,{...e}),(0,l.jsx)(Dk,{...e}),(0,l.jsx)(Wk,{...e}),(0,l.jsx)(Vk,{...e}),(0,l.jsx)(Rk,{...e})]}),Yk=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:fk,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(Ik,{...e}),"style"===t.name&&(0,l.jsx)(qk,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},Kk=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,s=fe(t,n),a=(0,h.useBlockProps)({id:`block-${o}`,className:rk(t)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Yk,{...e,updateObj:s,isPremium:i}),(0,l.jsxs)("div",{...a,children:[(0,l.jsx)(lk,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(bk,{attributes:t,isBackend:!0})})]})]})}));Nl(qv.name)&&(0,p.registerBlockType)(qv,{icon:xl,edit:Kk}) |
| 385 |
;const Qk=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table","version":"1.0.0","title":"Table","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","keywords":["table","b-blocks","b-table"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"content":{"type":"object","default":{"cellBorderType":"collapse"}},"options":{"type":"object","default":{"isEnableHeader":true,"isEnableFooter":true,"isEnableCaption":true,"isStickyHeader":false}},"styles":{"type":"object","default":{"content":{"width":{"desktop":"","tablet":"","mobile":""},"align":{"desktop":"","tablet":"","mobile":""},"normal":{"border":{"color":"#acacac","style":"solid","width":"1px"},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"transition":0.2},"hover":{"border":{},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"header":{"typography":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"normal":{"color":"","bg":{"color":"#d4d4d4"},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"transition":0.2},"hover":{"color":"","bg":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"body":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"normal":{"bg":{},"oddBg":{},"evenBg":{},"transition":0.2},"hover":{"bg":{},"oddBg":{},"evenBg":{}}},"column":[{"type":"","color":"","bg":{}}],"cells":{"typography":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"border":{},"desktop":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""}},"oddCell":{"normal":{"color":"","bg":{},"transition":0.2},"hover":{"color":"","bg":{}}},"evenCell":{"normal":{"color":"","bg":{},"transition":0.2},"hover":{"color":"","bg":{}}}},"footer":{"typography":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"normal":{"bg":{"color":"#d4d4d4"},"color":"","transition":0.2},"hover":{"bg":{},"color":""}},"caption":{"position":"bottom","typography":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"color":"","bg":{},"border":{},"desktop":{"alignment":"right","radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"alignment":"right","radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"alignment":"right","radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}}}},"datatables":{"type":"object","default":{"enabled":false,"paging":{"enabled":true,"pageLength":10,"pagingType":"simple_numbers"},"searching":{"enabled":true,"smart":true,"regex":false,"caseInsensitive":true},"ordering":{"enabled":true,"multiColumn":false},"info":true,"layout":{"topStart":"pageLength","topEnd":"search","bottomStart":"info","bottomEnd":"paging"},"stateSave":false,"autoWidth":true,"searchDelay":400,"responsive":true,"fixedHeader":false,"select":{"enabled":false,"style":"single"},"buttons":{"enabled":false,"copy":false,"csv":false,"excel":false,"pdf":false,"print":false,"colvis":false},"serverSide":{"enabled":false,"endpoint":""},"language":{"search":"Search:","lengthMenu":"Show _MENU_ entries","info":"Showing _START_ to _END_ of _TOTAL_ entries","emptyTable":"No data available in table","zeroRecords":"No matching records found","paginate":{"first":"First","last":"Last","next":"Next","previous":"Previous"}}}},"datatableStyles":{"type":"object","default":{"search":{"label":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"color":"","bg":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"input":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"normal":{"color":"","bg":{},"transition":0.2,"border":{},"radius":{"top":"","right":"","bottom":"","left":""}},"hover":{"color":"","bg":{},"transition":0.2,"border":{},"radius":{"top":"","right":"","bottom":"","left":""}},"focus":{"color":"","bg":{},"transition":0.2,"border":{},"radius":{"top":"","right":"","bottom":"","left":""}}}},"recordInfo":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"color":"","bg":{},"desktop":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}},"tablet":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}},"mobile":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}}},"pageLength":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"color":"","bg":{},"desktop":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}},"tablet":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}},"mobile":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}}},"column":[{"typo":"","color":"","bg":{}}],"pagination":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""}},"normal":{"color":"","bg":{},"border":{},"radius":{"top":"","right":"","bottom":"","left":""},"transition":0.2},"hover":{"color":"","bg":{},"border":{},"radius":{"top":"","right":"","bottom":"","left":""}},"active":{"color":"","bg":{},"border":{},"radius":{"top":"","right":"","bottom":"","left":""}}},"buttons":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"desktop":{"padding":{"top":"","left":"","bottom":"","right":""}},"tablet":{"padding":{"top":"","left":"","bottom":"","right":""}},"mobile":{"padding":{"top":"","left":"","bottom":"","right":""}},"normal":{"bg":{},"color":"","border":{},"radius":{},"transition":0.2},"hover":{"bg":{},"color":"","border":{},"radius":{}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Zk=window.wp.primitives |
| 386 |
;var Xk=(0,l.jsx)(Zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Zk.Path,{d:"M21 5c0-1.1-.9-2-2-2H5c-1 0-1.9.8-2 1.8V19.2c.1.9.9 1.7 1.8 1.8H19c1.1 0 2-.9 2-2V5ZM4.5 14V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v9h-15Zm4 5.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm5.5 0h-4v-4h4v4Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19ZM11.2 10h-3V8.5h3v-3h1.5v3h3V10h-3v3h-1.5v-3Z"})}),Jk=(0,l.jsx)(Zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Zk.Path,{d:"M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm-9 1.5h4v4h-4v-4ZM4.5 5c0-.3.2-.5.5-.5h3.5v4h-4V5Zm15 14c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-8.3 10h1.5v-3h3V14h-3v-3h-1.5v3h-3v1.5h3v3Z"})}),ew=(0,l.jsx)(Zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Zk.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1 .8 1.9 1.8 2H19.2c.9-.1 1.7-.9 1.8-1.8V5c0-1.1-.9-2-2-2Zm-5 16.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h9v15Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19Zm0-5h-4v-4h4v4Zm0-5.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-11 7.3H10v-3h3v-1.5h-3v-3H8.5v3h-3v1.5h3v3Z"})}),tw=(0,l.jsx)(Zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Zk.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm0-5.5h-4v-4h4v4Zm0-5.5h-4V5c0-.3.2-.5.5-.5h3.5v4Zm11 10.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14Zm-4-10.8H14v3h-3v1.5h3v3h1.5v-3h3v-1.5h-3v-3Z"})}),nw=(0,l.jsx)(Zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Zk.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})}),ow=(0,l.jsx)(Zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Zk.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})});const iw=[{value:"none",label:(0,x.__)("None","b-blocks")},{value:"pageLength",label:(0,x.__)("Page Length","b-blocks")},{value:"search",label:(0,x.__)("Search","b-blocks")},{value:"info",label:(0,x.__)("Info","b-blocks")},{value:"paging",label:(0,x.__)("Paging","b-blocks")}],sw=[{value:"simple",label:"Simple"},{value:"simple_numbers",label:"Simple Numbers"},{value:"full",label:"Full"},{value:"full_numbers",label:"Full Numbers"},{value:"first_last_numbers",label:"First Last Numbers"}],aw=[{value:"single",label:(0,x.__)("Single row","b-blocks")},{value:"multi",label:(0,x.__)("Multi row","b-blocks")},{value:"os",label:(0,x.__)("OS-style (Ctrl/Shift)","b-blocks")}],rw=({attributes:e,setAttributes:t})=>{const{datatables:n}=e,o=e=>t({datatables:{...n,...e}}),i=e=>o({paging:{...n.paging,...e}}),s=e=>o({searching:{...n.searching,...e}}),a=e=>o({ordering:{...n.ordering,...e}}),r=e=>o({layout:{...n.layout,...e}}),c=e=>o({buttons:{...n.buttons,...e}}),d=e=>o({select:{...n.select,...e}}),u=e=>o({serverSide:{...n.serverSide,...e}}),p=e=>o({language:{...n.language,...e}}),h=e=>p({paginate:{...n.language.paginate,...e}}),g=n.buttons.copy||n.buttons.csv||n.buttons.excel||n.buttons.pdf||n.buttons.print||n.buttons.colvis;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("DataTables","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable DataTables","b-blocks"),checked:n.enabled,onChange:e=>o({enabled:e}),help:(0,x.__)("Turn this on to enable DataTables library features for the table.","b-blocks")}),n.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"mt10",title:(0,x.__)("Core Features","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pagination","b-blocks"),checked:n.paging.enabled,onChange:e=>i({enabled:e})}),n.paging.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Default Page Length","b-blocks"),value:n.paging.pageLength,onChange:e=>i({pageLength:Math.max(1,Number(e)||10)}),min:1,max:500}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Pagination Style","b-blocks"),value:n.paging.pagingType,onChange:e=>i({pagingType:e}),options:sw})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Search","b-blocks"),checked:n.searching.enabled,onChange:e=>s({enabled:e})}),n.searching.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Smart Search","b-blocks"),checked:n.searching.smart,onChange:e=>s({smart:e}),help:(0,x.__)("Matches keywords in any order across the row.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Case Insensitive","b-blocks"),checked:n.searching.caseInsensitive,onChange:e=>s({caseInsensitive:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Regex Search","b-blocks"),checked:n.searching.regex,onChange:e=>s({regex:e}),help:(0,x.__)("Let visitors enter regular expressions in the search box.","b-blocks")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Column Sorting","b-blocks"),checked:n.ordering.enabled,onChange:e=>a({enabled:e})}),n.ordering.enabled&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Multi-Column Sort","b-blocks"),checked:n.ordering.multiColumn,onChange:e=>a({multiColumn:e}),help:(0,x.__)("Shift+click column headers to sort by multiple columns simultaneously.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Record Info","b-blocks"),checked:n.info,onChange:e=>o({info:e}),help:(0,x.__)('Shows "Showing X to Y of Z entries" text.',"b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Layout & Toolbar","b-blocks"),initialOpen:!1,children:[(0,l.jsx)("p",{style:{fontSize:11,color:"#757575",marginBottom:8},children:(0,x.__)("Choose which control appears in each toolbar position.","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Top Left","b-blocks"),value:n.layout.topStart,onChange:e=>r({topStart:e}),options:iw}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Top Right","b-blocks"),value:n.layout.topEnd,onChange:e=>r({topEnd:e}),options:iw}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Bottom Left","b-blocks"),value:n.layout.bottomStart, |
| 387 |
onChange:e=>r({bottomStart:e}),options:iw}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Bottom Right","b-blocks"),value:n.layout.bottomEnd,onChange:e=>r({bottomEnd:e}),options:iw}),n.buttons.enabled&&g&&(0,l.jsx)(y.Notice,{status:"info",isDismissible:!1,style:{marginTop:8},children:(0,x.__)("Export buttons are placed in an additional row above the toolbar automatically.","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Extensions","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Responsive","b-blocks"),checked:n.responsive,onChange:e=>o({responsive:e}),help:(0,x.__)("Collapses overflow columns on small screens with expandable child rows.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Fixed Header","b-blocks"),checked:n.fixedHeader,onChange:e=>o({fixedHeader:e}),help:(0,x.__)("Keeps the header row visible when the user scrolls down.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Row Selection","b-blocks"),checked:n.select.enabled,onChange:e=>d({enabled:e})}),n.select.enabled&&(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Selection Style","b-blocks"),value:n.select.style,onChange:e=>d({style:e}),options:aw}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Export Buttons","b-blocks"),checked:n.buttons.enabled,onChange:e=>c({enabled:e})}),n.buttons.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{style:{fontSize:11,color:"#757575",margin:"4px 0 6px"},children:(0,x.__)("Select which export actions to display:","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Copy","b-blocks"),checked:n.buttons.copy,onChange:e=>c({copy:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("CSV","b-blocks"),checked:n.buttons.csv,onChange:e=>c({csv:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Excel","b-blocks"),checked:n.buttons.excel,onChange:e=>c({excel:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("PDF","b-blocks"),checked:n.buttons.pdf,onChange:e=>c({pdf:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Print","b-blocks"),checked:n.buttons.print,onChange:e=>c({print:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Column Visibility","b-blocks"),checked:n.buttons.colvis,onChange:e=>c({colvis:e})})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Performance","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Save Table State","b-blocks"),checked:n.stateSave,onChange:e=>o({stateSave:e}),help:(0,x.__)("Persists the user's search, sort, and page in localStorage between visits.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Auto Column Width","b-blocks"),checked:n.autoWidth,onChange:e=>o({autoWidth:e})}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Search Delay (ms)","b-blocks"),value:n.searchDelay,onChange:e=>o({searchDelay:Math.max(0,Number(e)||400)}),min:0,max:2e3,help:(0,x.__)("Milliseconds to wait after the user types before triggering a search redraw.","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Server-Side Processing","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Server-Side Processing","b-blocks"),checked:n.serverSide.enabled,onChange:e=>u({enabled:e}),help:(0,x.__)("Sends search, sort, and page requests to a server endpoint. Required for very large datasets.","b-blocks")}),n.serverSide.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("API Endpoint URL","b-blocks"),value:n.serverSide.endpoint,onChange:e=>u({endpoint:e}),placeholder:"https://your-site.com/wp-json/b-blocks/v1/table-data",help:(0,x.__)("Must return the DataTables server-side JSON contract: draw, recordsTotal, recordsFiltered, data.","b-blocks")}),(0,l.jsx)(y.Notice,{status:"warning",isDismissible:!1,children:(0,x.__)("When server-side mode is active, the table's HTML content is ignored — data comes entirely from the endpoint.","b-blocks")})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Language / Labels","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Search Label","b-blocks"),value:n.language.search,onChange:e=>p({search:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Length Menu Label","b-blocks"),value:n.language.lengthMenu,onChange:e=>p({lengthMenu:e}),help:(0,x.__)("Use _MENU_ as placeholder for the page-size dropdown.","b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Info Label","b-blocks"),value:n.language.info,onChange:e=>p({info:e}),help:(0,x.__)("Placeholders: _START_, _END_, _TOTAL_","b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Empty Table","b-blocks"),value:n.language.emptyTable,onChange:e=>p({emptyTable:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("No Results","b-blocks"),value:n.language.zeroRecords,onChange:e=>p({zeroRecords:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Previous Button","b-blocks"),value:n.language.paginate.previous,onChange:e=>h({previous:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Next Button","b-blocks"),value:n.language.paginate.next,onChange:e=>h({next:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("First Button","b-blocks"),value:n.language.paginate.first,onChange:e=>h({first:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Last Button","b-blocks"),value:n.language.paginate.last,onChange:e=>h({last:e})})]})]})]})},lw=e=>{const{attributes:t,setAttributes:n,updateObj:o,handleToggleHeader:i,handleToggleFooter:s}=e,{content:a,options:r}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table","b-blocks"),children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Cell Border Type","b-blocks"),labelPosition:"edge",value:a?.cellBorderType,onChange:e=>o("content",e,"cellBorderType"),options:[{label:(0,x.__)("Collapse","b-blocks"),value:"collapse"},{label:(0,x.__)("Separate","b-blocks"),value:"separate"}]})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Header","b-blocks"),checked:r?.isEnableHeader,onChange:i}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Footer","b-blocks"),checked:r?.isEnableFooter,onChange:s})]}),(0,l.jsx)(rw,{attributes:t,setAttributes:n})]})},cw=({attributes:e,updateObj:t})=>{const[n,o]=(0,m.useState)("normal"),{styles:i}=e,{body:s}=i;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Body","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n,onChange:e=>{o(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:s[n].bg,onChange:e=>t("styles",e,"body",n,"bg")}),"hover"===n&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:s.normal.transition,onChange:e=>t("styles",e,"body","normal","transition"),step:.05,min:0,max:5})]})})},dw=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("normal"),{styles:s}=e,{cells:a}=s;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Cells","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:a[n].padding,onChange:e=>t("styles",e,"cells",n,"padding")}),(0,l.jsx)(Os,{value:a.typography,onChange:e=>t("styles",e,"cells","typography")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),onChange:e=>t("styles",e,"cells","border"),values:a.border}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0, |
| 388 |
x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),values:a[n].radius,onChange:e=>t("styles",e,"cells",n,"radius")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Odd Row Text Color","b-blocks"),value:a.oddCell[o].color,onChange:e=>t("styles",e,"cells","oddCell",o,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Odd Row Background","b-blocks"),value:a.oddCell[o].bg,onChange:e=>t("styles",e,"cells","oddCell",o,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Even Row Text Color","b-blocks"),value:a.evenCell[o].color,onChange:e=>t("styles",e,"cells","evenCell",o,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Even Row Background","b-blocks"),value:a.evenCell[o].bg,onChange:e=>t("styles",e,"cells","evenCell",o,"bg")}),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:a.oddCell.normal.transition,step:.05,min:0,max:5,onChange:e=>t("styles",e,"cells","oddCell","normal","transition")})]})},uw=({value:e,index:t,updateObj:n})=>{const o=e[t];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o.color,onChange:e=>n("datatableStyles",e,"column",t,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:o.bg,onChange:e=>n("datatableStyles",e,"column",t,"bg")})]})},pw=({attributes:e,setAttributes:t,updateObj:n,device:o})=>{const[i,s]=(0,m.useState)("normal"),[a,r]=(0,m.useState)("normal"),[c,d]=(0,m.useState)("normal"),{datatableStyles:u}=e,{search:p,recordInfo:h,pageLength:g,pagination:b,buttons:f,column:v}=u,w={typo:"",color:"",bg:{}};return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Data Table Styles","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Column Styles","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_s,{value:u.column,handleAdd:()=>{t({datatableStyles:{...u,column:[...v,w]}})},handleDelete:e=>{t({datatableStyles:{...u,column:v.filter(((t,n)=>n!==e))}})},newItem:w,design:"sortable",itemLabel:"Column",arrKey:"column",title:"title",ItemSettings:uw,handleCopy:e=>{t({datatableStyles:{...u,column:[...v,v[e]]}})},minItem:0,updateObj:n})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Search","b-blocks"),initialOpen:!1,children:[(0,l.jsx)("b",{className:"mt10 mb10",children:(0,x.__)("Label","b-blocks")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p.label[o].padding,onChange:e=>n("datatableStyles",e,"search","label",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p.label[o].margin,onChange:e=>n("datatableStyles",e,"search","label",o,"margin")}),(0,l.jsx)(Os,{value:p.label.typo,onChange:e=>n("datatableStyles",e,"search","label","typo")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:p.label.color,onChange:e=>n("datatableStyles",e,"search","label","color")}),(0,l.jsx)(An,{className:"mt10",value:p.label.bg,onChange:e=>n("datatableStyles",e,"search","label","bg")}),(0,l.jsx)("b",{className:"mt10 mb10",children:(0,x.__)("Input Field","b-blocks")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p.input[o].padding,onChange:e=>n("datatableStyles",e,"search","input",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p.input[o].margin,onChange:e=>n("datatableStyles",e,"search","input",o,"margin")}),(0,l.jsx)(Os,{value:p.input.typo,onChange:e=>n("datatableStyles",e,"search","input","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i,onChange:e=>{s(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Focus",value:"focus"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:p.input[i].color,onChange:e=>n("datatableStyles",e,"search","input",i,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:p.input[i].bg,onChange:e=>n("datatableStyles",e,"search","input",i,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),value:p.input[i].border,onChange:e=>n("datatableStyles",e,"search","input",i,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:p.input[i].radius,onChange:e=>n("datatableStyles",e,"search","input",i,"radius")}),"hover"===i&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:p.input.normal.transition,onChange:e=>n("datatableStyles",e,"search","input","normal","transition")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Record Info","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:h[o].padding,onChange:e=>n("datatableStyles",e,"recordInfo",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:h[o].margin,onChange:e=>n("datatableStyles",e,"recordInfo",o,"margin")}),(0,l.jsx)(Os,{value:h.typo,onChange:e=>n("datatableStyles",e,"recordInfo","typo")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:h.color,onChange:e=>n("datatableStyles",e,"recordInfo","color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:h.bg,onChange:e=>n("datatableStyles",e,"recordInfo","bg")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Page Length","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:g[o].padding,onChange:e=>n("datatableStyles",e,"pageLength",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:g[o].margin,onChange:e=>n("datatableStyles",e,"pageLength",o,"margin")}),(0,l.jsx)(Os,{value:g.typo,onChange:e=>n("datatableStyles",e,"pageLength","typo")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:g.color,onChange:e=>n("datatableStyles",e,"pageLength","color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:g.bg,onChange:e=>n("datatableStyles",e,"pageLength","bg")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pagination","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:b[o].padding,onChange:e=>n("datatableStyles",e,"pagination",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:b[o].margin,onChange:e=>n("datatableStyles",e,"pagination",o,"margin")}),(0,l.jsx)(Os,{value:b.typo,onChange:e=>n("datatableStyles",e,"pagination","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:c,onChange:e=>{d(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})] |
| 389 |
}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:b[c].color,onChange:e=>n("datatableStyles",e,"pagination",c,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:b[c].bg,onChange:e=>n("datatableStyles",e,"pagination",c,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),value:b[c].border,onChange:e=>n("datatableStyles",e,"pagination",c,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:b[c].radius,onChange:e=>n("datatableStyles",e,"pagination",c,"radius")}),"hover"===c&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:b.normal.transition,onChange:e=>n("datatableStyles",e,"pagination","normal","transition")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Export Buttons","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:f[o].padding,onChange:e=>n("datatableStyles",e,"buttons",o,"padding")}),(0,l.jsx)(Os,{value:f.typo,onChange:e=>n("datatableStyles",e,"buttons","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>{r(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:f[a].color,onChange:e=>n("datatableStyles",e,"buttons",a,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:f[a].bg,onChange:e=>n("datatableStyles",e,"buttons",a,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),value:f[a].border,onChange:e=>n("datatableStyles",e,"buttons",a,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:f[a].radius,onChange:e=>n("datatableStyles",e,"buttons",a,"radius")}),"hover"===a&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:f.normal.transition,onChange:e=>n("datatableStyles",e,"buttons","normal","transition")})]})]})})},hw=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("normal"),{styles:s}=e,{footer:a}=s;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Footer","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:a.typography,onChange:e=>t("styles",e,"footer","typography")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),value:a.padding[n],onChange:e=>t("styles",e,"footer","padding",n)}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:a[o].color,onChange:e=>t("styles",e,"footer",o,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:a[o].bg,onChange:e=>t("styles",e,"footer",o,"bg")}),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:a.normal.transition,step:.05,min:0,max:5,onChange:e=>t("styles",e,"footer","normal","transition")})]})},gw=e=>{const{attributes:t,device:n,updateObj:o}=e,[i,s]=(0,m.useState)("normal"),{styles:a}=t,{header:r}=a;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:r.typography,onChange:e=>o("styles",e,"header","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i,onChange:e=>{s(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r[i].color,onChange:e=>o("styles",e,"header",i,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:r[i].bg,onChange:e=>o("styles",e,"header",i,"bg")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[i].padding[n],onChange:e=>o("styles",e,"header",i,"padding",n)}),"hover"===i&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:r.normal.transition,step:.05,min:0,max:5,onChange:e=>o("styles",e,"header","transition")})]})},mw=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),bw=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),fw=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),xw=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",children:(0,l.jsx)("path",{d:"M20 3H4C2.9 3 2 3.9 2 5v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H4V5h16zM8 19H4v-3h4v3zm0-5H4v-3h4v3zm6 5h-4v-3h4v3zm0-5h-4v-3h4v3zm6 5h-4v-3h4v3zm0-5h-4v-3h4v3z"})}),yw=e=>{const[t,n]=(0,m.useState)("normal"),{attributes:o,updateObj:i,device:s}=e,{styles:a}=o,{content:r}=a;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table Style","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.width[s],onChange:e=>i("styles",e,"content","width",s)})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Alignment ","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:r.align[s],onChange:e=>i("styles",e,"content","align",s),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(mw,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(bw,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(fw,{style:{rotate:"-90deg"}})})]})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:t,onChange:e=>{n(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","border"),value:r[t].border,onChange:e=>i("styles",e,"content",t,"border")}),(0,l.jsx)(k,{className:"mt10", |
| 390 |
label:(0,x.__)("Border Radius","b-blocks"),values:r[t].radius[s],onChange:e=>i("styles",e,"content",t,"radius",s)}),"hover"===t&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:r.normal.transition,step:.05,min:0,max:5,onChange:e=>i("styles",e,"content","normal","transition")})]})},vw=e=>{const{attributes:t}=e,{datatables:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(yw,{...e}),(0,l.jsx)(gw,{...e}),(0,l.jsx)(cw,{...e}),(0,l.jsx)(dw,{...e}),(0,l.jsx)(hw,{...e}),n.enabled&&(0,l.jsx)(pw,{...e})]})},kw=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],ww=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bblockswp.com/docs/"}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",initialTabName:"general",tabs:kw,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(lw,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(vw,{...e})})]})})]})}),_w=({attributes:e,id:t})=>{const{content:n,styles:o,datatableStyles:i}=e,{content:s,header:a,body:r,cells:c,footer:d}=o,{column:u,search:p,recordInfo:h,pageLength:g,pagination:m,buttons:b}=i,f=`#${t}`,x=`${f} .b-blocks-table-main-container`,y=`${x} :where(.wp-block-b-blocks-table-head)`,v=`${x} .wp-block-b-blocks-table-body`,k=`${x} :where(.wp-block-b-blocks-table-footer)`,w=`${v} .wp-block-b-blocks-table-row`,_=`${w} .wp-block-b-blocks-table-cell`,C=`${x} :where(.b-blocks-table-head-cell)`,j=`${x} :where(.b-blocks-table-footer-cell)`,$=`${f} .dt-container .dt-layout-row .dt-layout-cell`,S=`${$} .dt-search`,T=`${$} .dt-length`,M=`${$} .dt-info`,N=`${$}>.dt-paging>nav>.dt-paging-button`,L=`${$} .dt-buttons .dt-button`,E=`${x}>colgroup>col`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${pa("",c.typography).googleFontLink}\n\t\t${pa("",a.typography).googleFontLink}\n\t\t${pa("",p.label.typo).googleFontLink}\n\t\t${pa("",p.input.typo).googleFontLink}\n\t\t${pa("",h.typo).googleFontLink}\n\t\t${pa("",g.typo).googleFontLink}\n\t\t${pa("",m.typo).googleFontLink}\n\t\t${pa("",b.typo).googleFontLink}\n\n\t\t${pa(_,c.typography).styles}\n\t\t${pa(`${C} .wp-block-paragraph`,a.typography).styles}\n\t\t${pa(`${S}>label`,p.label.typo).styles}\n\t\t${pa(`${S}>.dt-input`,p.input.typo).styles}\n\t\t${pa(`${M}`,h.typo).styles}\n\t\t${pa(`${T}>label`,g.typo).styles}\n\t\t${pa(`${N}`,m.typo).styles}\n\t\t${pa(`${L}`,b.typo).styles}\n\n\t\t${f}{\n\t\t\t${na("justify-content",s.align.desktop)}\n\t\t}\n\n\t\t${x}{\n\t\t\t${na("width",s.width.desktop)}\n\t\t\t${na("border-radius",ha(s.normal.radius.desktop))}\n\t\t}\n\t\t\t\n\t\t${x}, ${x} .wp-block-b-blocks-table-cell{\n\t\t\tborder-collapse: ${n.cellBorderType};\n\t\t\t${"separate"===n.cellBorderType?"border-spacing: 2px;":""}\n\t\t\t${sa(s.normal.border)}\n\t\t}\n\n\t\t${x}:hover,\n\t\t${x}:hover .wp-block-b-blocks-table-cell{\n\t\t\t${sa(s.hover.border)}\n\t\t\tborder-collapse: ${n.cellBorderType};\n\t\t\t${"separate"===n.cellBorderType?"border-spacing: 2px;":""}\n\t\t}\n\n\t\t${y}>.wp-block-b-blocks-table-row {\n\t\t\t${oa(a.normal.bg)}\n\t\t\ttransition:all ${a.normal.transition}s ease-in-out;\n\t\t}\n\t\t${y}>.wp-block-b-blocks-table-row:hover{\n\t\t\t${oa(a.hover.bg)}\n\t\t}\n\n\t\t${C}{\n\t\t\t${na("color",a.normal.color)}\n\t\t\t${na("padding",ha(a.normal.padding.desktop))}\n\t\t}\n\n\t\t${C}:hover{\n\t\t\t${na("color",a.hover.color)}\n\t\t\t${na("padding",ha(a.hover.padding.desktop))}\n\t\t}\n\n\t\t${v}{\n\t\t\t${oa(r.normal.bg)}\n\t\t\ttransition:all ${r.normal.transition}s ease-in-out;\n\t\t}\n\n\t\t${v}:hover{\n\t\t\t${oa(r.hover.bg)}\n\t\t}\n\n\t\t${_}{\n\t\t\t${sa(_.border)}\n\t\t\t${na("padding",ha(c.desktop.padding))}\n\t\t\t${na("border-radius",ha(c.desktop.radius))}\n\t\t\ttransition: all ${c.evenCell.normal.transition}s ease-in-out;\n\t\t\t\n\t\t}\n\n\t\t${w}:nth-of-type(even){\n\t\t\t${oa(c.evenCell.normal.bg)}\n\t\t}\n\t\t\n\t\t${w}:nth-of-type(even):hover{\n\t\t\t${oa(c.evenCell.hover.bg)}\n\t\t}\n\n\t\t${w}:nth-of-type(odd){\n\t\t\t${oa(c.oddCell.normal.bg)}\n\t\t}\n\t\t${w}:nth-of-type(odd):hover{\n\t\t\t${oa(c.oddCell.hover.bg)}\n\t\t}\n\n\t\t${w}:nth-of-type(even) .wp-block-b-blocks-table-cell{\n\t\t\t${na("color",c.evenCell.normal.color)}\n\t\t}\n\t\t\n\t\t${w}:nth-of-type(even):hover .wp-block-b-blocks-table-cell{\n\t\t\t${na("color",c.evenCell.hover.color)}\n\t\t}\n\n\t\t${w}:nth-of-type(odd) .wp-block-b-blocks-table-cell{\n\t\t\t${na("color",c.oddCell.normal.color)}\n\t\t}\n\t\t${w}:nth-of-type(odd):hover .wp-block-b-blocks-table-cell{\n\t\t\t${na("color",c.oddCell.hover.color)}\n\t\t}\n\n\t\t${k}>.wp-block-b-blocks-table-row{\n\t\t\t${oa(d.normal.bg)}\n\t\t}\n\t\t${k}>.wp-block-b-blocks-table-row:hover{\n\t\t\t${oa(d.hover.bg)}\n\t\t}\n\t\t${j}{\n\t\t\t${na("padding",ha(d.padding.desktop))}\n\t\t\t${na("color",d.normal.color)}\n\t\t}\n\t\t${j}:hover{\n\t\t\t${na("color",d.hover.color)}\n\t\t}\n\n\t\t${S}>label{\n\t\t\t${na("color",p.label.color)}\n\t\t\t${oa(p.label.bg)}\n\t\t\t${na("padding",ha(p.label.desktop.padding))}\n\t\t\t${na("margin",ha(p.label.desktop.margin))}\n\t\t}\n\n\t\t${S}>.dt-input{\n\t\t\t\t${na("padding",ha(p.input.desktop.padding))}\n\t\t\t\t${na("margin",ha(p.input.desktop.margin))}\n\t\t\t\t${na("color",p.input.normal.color)}\n\t\t\t\t${oa(p.input.normal.bg)}\n\t\t\t\t${sa(p.input.normal.border)}\n\t\t\t\t${na("border-radius",ha(p.input.normal.radius))}\n\t\t\t\ttransition: all ${p.input.normal.transition}s ease-in-out;\n\t\t\t\t\n\t\t}\n\n\t\t${S}>.dt-input:hover{\n\t\t\t${na("color",p.input.hover.color)}\n\t\t\t${oa(p.input.hover.bg)}\n\t\t\t${sa(p.input.hover.border)}\n\t\t\t${na("border-radius",ha(p.input.hover.radius))}\n\t\t}\n\n\t\t${S}>.dt-input:focus{\n\t\t\t${na("color",p.input.focus.color)}\n\t\t\t${oa(p.input.focus.bg)}\n\t\t\t${sa(p.input.focus.border)}\n\t\t\t${na("border-radius",ha(p.input.focus.radius))}\n\t\t}\n\n\t\t${M}{\n\t\t\t${na("padding",ha(h.desktop.padding))}\n\t\t\t${na("margin",ha(h.desktop.margin))}\n\t\t\t${na("color",h.color)}\n\t\t\t${oa(h.bg)}\n\t\t}\n\n\t\t${T}>label{\n\t\t\t${na("color",g.color)}\n\t\t\t${oa(g.bg)}\n\t\t\t${na("padding",ha(g.desktop.padding))}\n\t\t\t${na("margin",ha(g.desktop.margin))}\n\t\t}\n\n\t\t${N}{\n\t\t\t${na("padding",ha(m.desktop.padding))}\n\t\t\t${na("margin",ha(m.desktop.margin))}\n\t\t\t${na("color",m.normal.color)}\n\t\t\t${oa(m.normal.bg)}\n\t\t\t${sa(m.normal.border)}\n\t\t\t${na("border-radius",ha(m.normal.radius))}\n\t\t\ttransition: all ${m.normal.transition}s ease-in-out;\n\t\t}\n\t\t${N}:hover{\n\t\t\t${na("color",m.hover.color)}\n\t\t\t${oa(m.hover.bg)}\n\t\t\t${sa(m.hover.border)}\n\t\t\t${na("border-radius",ha(m.hover.radius))}\n\t\t}\n\t\t${N}.current{\n\t\t\t${na("color",m.active.color)}\n\t\t\t${oa(m.active.bg)}\n\t\t\t${sa(m.active.border)}\n\t\t\t${na("border-radius",ha(m.active.radius))}\n\t\t}\n\n\t\t${L}{\n\t\t\t${na("padding",ha(b.desktop.padding))}\n\t\t\t${na("color",b.normal.color)}\n\t\t\t${oa(b.normal.bg)}\n\t\t\t${sa(b.normal.border)}\n\t\t\t${na("border-radius",ha(b.normal.radius))}\n\t\t\ttransition: all ${b.normal.transition}s ease-in-out;\n\t\t}\n\t\t${L}:hover{\n\t\t\t${na("color",b.hover.color)}\n\t\t\t${oa(b.hover.bg)}\n\t\t\t${sa(b.hover.border)}\n\t\t\t${na("border-radius",ha(b.hover.radius))}\n\t\t}\n\n\t\t${u.map(((e,t)=>`\n\t\t\t${E}[data-dt-column="${t}"]{\n\t\t\t\t${na("color",e.color)}\n\t\t\t\t${oa(e.bg)}\n\t\t\t}\n\t\t`)).join("")}\n\n\t`}})},Cw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o}=e("core/block-editor");return{device:n()?.toLowerCase(),innerBlocks:o(t)}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,innerBlocks:s}=e,[r,c]=(0,m.useState)(3),[d,u]=(0,m.useState)(3),[g,b]=(0,m.useState)(!1),x=(0,m.useRef)(null),v=(0,m.useRef)(null),k=(0,m.useRef)(null);(0,m.useEffect)((()=>{ |
| 391 |
if(!g)return;let e=!1;return(async()=>{const n=t.datatables,o=[a.e(5668).then(a.bind(a,5668))];let i=-1,s=-1,r=-1;n?.responsive&&o.push(Promise.all([a.e(5668),a.e(417)]).then(a.bind(a,417))),n?.fixedHeader&&o.push(Promise.all([a.e(5668),a.e(7917)]).then(a.bind(a,7917))),n?.buttons?.enabled&&(o.push(Promise.all([a.e(5668),a.e(2967)]).then(a.t.bind(a,2967,23))),(n.buttons.csv||n.buttons.excel||n.buttons.pdf)&&o.push(Promise.all([a.e(5668),a.e(7837),a.e(8486)]).then(a.t.bind(a,8486,23))),n.buttons.print&&o.push(Promise.all([a.e(5668),a.e(7837),a.e(897)]).then(a.t.bind(a,897,23))),n.buttons.colvis&&o.push(Promise.all([a.e(5668),a.e(7837),a.e(9908)]).then(a.t.bind(a,9908,23))),n.buttons.excel&&(i=o.length,o.push(a.e(1710).then(a.t.bind(a,1710,23)))),n.buttons.pdf&&(s=o.length,o.push(a.e(7164).then(a.t.bind(a,7164,23))),r=o.length,o.push(a.e(7108).then(a.t.bind(a,7108,23))))),n?.select?.enabled&&o.push(Promise.all([a.e(5668),a.e(2877)]).then(a.bind(a,2877)));const l=await Promise.all(o);if(e)return;const[{default:c}]=l;if(i>=0&&c.Buttons.jszip(l[i].default),s>=0){const e=l[s].default,t=l[r];e.vfs=t?.pdfMake?.vfs??t?.default?.pdfMake?.vfs??t?.default??t,c.Buttons.pdfMake(e)}const d=(()=>{const e=x.current?.querySelector("table");if(!e)return null;const t=e.cloneNode(!0);t.className="b-blocks-table-main-container",t.querySelectorAll('style, .block-list-appender, .block-editor-block-appender, [class*="open-parent-settings"], .components-popover').forEach((e=>e.remove())),t.querySelectorAll("td, th").forEach((e=>{const t=e.querySelector(".block-editor-block-list__layout");t&&(t.querySelectorAll(".block-list-appender, .block-editor-block-appender").forEach((e=>e.remove())),e.innerHTML=t.innerHTML)}));const n=["contenteditable","data-block","data-type","data-title","tabindex","aria-label","aria-multiline","aria-autocomplete"];return t.querySelectorAll("*").forEach((e=>{n.forEach((t=>e.removeAttribute(t)));const t=e.getAttribute("class");t&&e.setAttribute("class",t.split(/\s+/).filter((e=>e&&"wp-block"!==e&&!e.startsWith("block-editor")&&!e.startsWith("is-selected")&&!e.startsWith("is-hovered")&&!e.startsWith("is-highlighted")&&!e.startsWith("has-child-selected"))).join(" "))})),t})();if(!d||e)return;v.current.innerHTML="",v.current.appendChild(d);const u=((e,t=!1)=>{if(!e?.enabled)return null;const n={paging:e.paging.enabled,searching:e.searching.enabled,ordering:e.ordering.enabled,info:e.info,autoWidth:e.autoWidth,stateSave:!t&&e.stateSave,searchDelay:e.searchDelay};e.paging.enabled&&(n.pageLength=e.paging.pageLength,n.pagingType=e.paging.pagingType,n.lengthMenu=[[5,10,25,50,100,-1],["5","10","25","50","100","All"]]),e.searching.enabled&&(n.search={smart:e.searching.smart,regex:e.searching.regex,caseInsensitive:e.searching.caseInsensitive}),e.ordering.enabled&&(n.orderMulti=e.ordering.multiColumn),e.responsive&&(n.responsive=!0),e.fixedHeader&&(n.fixedHeader=!0),e.select?.enabled&&(n.select={style:e.select.style}),e.language&&(n.language={...e.language});const o={};if(["topStart","topEnd","bottomStart","bottomEnd"].forEach((t=>{const n=e.layout[t];o[t]=n&&"none"!==n?n:null})),e.buttons?.enabled){const t=(i=e.buttons,["copy","csv","excel","pdf","print","colvis"].filter((e=>i[e])));t.length&&(o.top2Start={buttons:t})}var i;return n.layout=o,e.serverSide?.enabled&&e.serverSide?.endpoint&&(n.serverSide=!0,n.ajax=e.serverSide.endpoint),n})(n,!0);u&&(k.current=new c(d,u),d.style.setProperty("border-collapse",t?.content?.cellBorderType||"collapse","important"))})().catch((e=>console.warn("b-blocks/table preview:",e))),()=>{e=!0,k.current&&(k.current.destroy(),k.current=null),v.current&&(v.current.innerHTML="")}}),[g,t.datatables]);const{options:w}=t,_=(e="td",t="")=>Array.from({length:d},(()=>["b-blocks/table-cell",{tagName:e,className:t}])),C=Array.from({length:r},(()=>["b-blocks/table-row",{},_("td")])),j=[w.isEnableHeader?["b-blocks/table-head",{},[["b-blocks/table-row",{},_("th","b-blocks-table-head-cell")]]]:null,["b-blocks/table-body",{},C],w.isEnableFooter?["b-blocks/table-footer",{},[["b-blocks/table-row",{},_("td","b-blocks-table-footer-cell")]]]:null].filter(Boolean),$=(0,h.useBlockProps)(),S=(0,h.useInnerBlocksProps)({tagName:"table",className:"b-blocks-table-main-container"},{template:j,templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-body","b-blocks/table-head","b-blocks/table-footer"]}),T=(0,f.useSelect)((e=>e("core/block-editor").getBlocks(o)),[o]),{insertBlock:M,removeBlock:N,replaceInnerBlocks:L}=(0,f.useDispatch)("core/block-editor"),E=T.find((e=>"b-blocks/table-body"===e.name)),P=T.find((e=>"b-blocks/table-head"===e.name)),A=T.find((e=>"b-blocks/table-footer"===e.name)),B=E?.innerBlocks[0]?.innerBlocks?.length||d,I=(e="td",t="")=>{const n=Array.from({length:B},(()=>(0,p.createBlock)("b-blocks/table-cell",{tagName:e,className:t})));return(0,p.createBlock)("b-blocks/table-row",{},n)},O=[{title:"Add Top Row",icon:Xk,onClick:()=>{E&&M(I("td"),0,E.clientId,!1)}},{title:"Insert Bottom Row",icon:Jk,onClick:()=>{E&&M(I("td"),E.innerBlocks.length,E.clientId,!1)}},{title:"Insert Left Column",icon:ew,onClick:()=>{T.forEach((e=>{e.innerBlocks.forEach((e=>{const t=e.innerBlocks[0]?.attributes?.tagName||"td";M((0,p.createBlock)("b-blocks/table-cell",{tagName:t}),0,e.clientId,!1)}))}))}},{title:"Add Right Column",icon:tw,onClick:()=>{T.forEach((e=>{e.innerBlocks.forEach((e=>{const t=e.innerBlocks[e.innerBlocks.length-1],n=t?.attributes?.tagName||"td";M((0,p.createBlock)("b-blocks/table-cell",{tagName:n}),e.innerBlocks.length,e.clientId,!1)}))}))}}],R=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ww,{attributes:t,setAttributes:n,updateObj:R,device:i,handleToggleHeader:e=>{R("options",e,"isEnableHeader"),!e&&P?N(P.clientId,!1):e&&!P&&M((0,p.createBlock)("b-blocks/table-head",{},[I("th","b-blocks-table-head-cell")]),0,o,!1)},handleToggleFooter:e=>{R("options",e,"isEnableFooter"),!e&&A?N(A.clientId,!1):e&&!A&&M((0,p.createBlock)("b-blocks/table-footer",{},[I("td","b-blocks-table-footer-cell")]),T.length,o,!1)}}),(0,l.jsx)(_w,{attributes:t,id:`block-${o}`}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsxs)(y.ToolbarGroup,{children:[(0,l.jsx)(y.DropdownMenu,{icon:(0,l.jsx)(xw,{}),label:"Table Actions",controls:O,className:"b-blocks-table-action-menu"}),(0,l.jsx)(y.ToolbarButton,{icon:g?nw:ow,label:g?"Exit Preview":"Preview DataTables",onClick:()=>b((e=>!e)),isActive:g,disabled:!t.datatables?.enabled||0===s.length})]})}),(0,l.jsxs)("div",{...$,children:[0===s.length&&(0,l.jsxs)("div",{className:"b-blocks-table-input-form-wrapper",children:[(0,l.jsxs)("div",{className:"b-blocks-table-input-form-title-wrapper",children:[Sl,(0,l.jsx)("h2",{children:"Table"})]}),(0,l.jsx)("p",{className:"b-blocks-table-input-form-description",children:"Start creating a custom table for your content"}),(0,l.jsxs)("div",{className:"b-blocks-table-input-field-wrapper",children:[(0,l.jsxs)("div",{className:"b-blocks-table-row-column-field",children:[(0,l.jsx)("span",{children:"Rows"}),(0,l.jsx)(y.__experimentalNumberControl,{value:r,onChange:e=>c(e)})]}),(0,l.jsxs)("div",{className:"b-blocks-table-row-column-field",children:[(0,l.jsx)("span",{children:"Columns"}),(0,l.jsx)(y.__experimentalNumberControl,{value:d,onChange:e=>u(e)})]})]}),(0,l.jsxs)("div",{className:"b-blocks-table-input-field-checkbox-wrapper",children:[(0,l.jsx)(y.CheckboxControl,{label:"Include Header",checked:w.isEnableHeader,onChange:e=>R("options",e,"isEnableHeader")}),(0,l.jsx)(y.CheckboxControl,{label:"Include Footer",checked:w.isEnableFooter,onChange:e=>R("options",e,"isEnableFooter")})]}),(0,l.jsx)(Bn,{onClick:()=>{const e=Number(d)||1,t=Number(r)||1,n=(t,n="")=>Array.from({length:e},(()=>(0,p.createBlock)("b-blocks/table-cell",{tagName:t,...n&&{className:n}}))),i=[w.isEnableHeader?(0,p.createBlock)("b-blocks/table-head",{},[(0,p.createBlock)("b-blocks/table-row",{},n("th","b-blocks-table-head-cell"))]):null,(0,p.createBlock)("b-blocks/table-body",{},Array.from({length:t},(()=>(0, |
| 392 |
p.createBlock)("b-blocks/table-row",{},n("td"))))),w.isEnableFooter?(0,p.createBlock)("b-blocks/table-footer",{},[(0,p.createBlock)("b-blocks/table-row",{},n("td","b-blocks-table-footer-cell"))]):null].filter(Boolean);L(o,i,!1)},children:"Generate Table"})]}),s.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{ref:x,style:{display:g?"none":void 0},children:(0,l.jsx)("table",{...S})}),g&&(0,l.jsx)("div",{ref:v,className:"b-blocks-dt-editor-preview"})]})]})]})}));Nl(Qk.name)&&(0,p.registerBlockType)(Qk,{icon:Sl,edit:Cw,save:h.InnerBlocks.Content});const jw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-head","version":"1.0.0","title":"Table Head","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table"],"keywords":["key1","key2","key3","key4","key5"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"settings":{"type":"object","default":{"rowSpan":1,"colSpan":1}},"styles":{"type":"object","default":{"alignment":{"desktop":"","tablet":"","mobile":""},"normal":{"bg":""},"hover":{"bg":"","transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),$w=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})})})})},Sw=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${o} {\n\t\t\t${na("text-align",n.alignment.desktop)}\n\t\t\t${oa(n.normal.bg)}\n\t\t\ttransition: background ${n.hover.transition}s ease-in-out;\n\t\t}\n\t\t${o}:hover {\n\t\t\t${oa(n.hover.bg)}\n\t\t}\n\t`}})},Tw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o,getBlockRootClientId:i}=e("core/block-editor"),s=i(t);return{device:n()?.toLowerCase(),innerBlocks:o(t),parentClientId:s}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,parentClientId:s}=e,{settings:a}=t,r=(0,h.useInnerBlocksProps)((0,h.useBlockProps)({tagName:"thead"}),{template:[["b-blocks/table-row",{},[["b-blocks/table-cell",{}],["b-blocks/table-cell",{}],["b-blocks/table-cell",{}],["b-blocks/table-cell",{}]]]],templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-row"]}),c=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)($w,{attributes:t,setAttributes:n,device:i,updateObj:c,parentClientId:s}),(0,l.jsx)(Sw,{attributes:t,id:`block-${o}`}),(0,l.jsx)("thead",{...r,colSpan:a.colSpan,rowSpan:a.rowSpan})]})}));Nl("b-blocks/table")&&(0,p.registerBlockType)(jw,{icon:Sl,edit:Tw,save:h.InnerBlocks.Content});const Mw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-body","version":"1.0.0","title":"Table Body","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table"],"keywords":["table","body","table-body","b-blocks","b-table-body"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"styles":{"type":"object","default":{"normal":{"bg":{}},"hover":{"bg":{},"transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Nw=e=>{const[t,n]=(0,m.useState)("normal"),{attributes:o,updateObj:i}=e,{styles:s}=o;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Style","b-blocks"),children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:t,onChange:e=>{n(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:s[t].bg,onChange:e=>i("styles",e,t,"bg")}),"hover"===t&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:s.hover.transition,step:.05,min:0,max:5,onChange:e=>i("styles",e,"hover","transition")})]})]})},Lw=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})}),(0,l.jsx)(Nw,{...e})]})})},Ew=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${o}{\n\t\t\t\t${oa(n.normal.bg)}\n\t\t\t\ttransition:background ${n.hover.transition}s ease-in-out;\n\t\t\t}\n\n\t\t\t${o}:hover{\n\t\t\t\t${oa(n.hover.bg)}\n\t\t\t}\n\n\t`}})},Pw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o,getBlockRootClientId:i}=e("core/block-editor"),s=i(t);return{device:n()?.toLowerCase(),innerBlocks:o(t),parentClientId:s}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,parentClientId:s}=e,a=(0,h.useInnerBlocksProps)((0,h.useBlockProps)({tagName:"tbody"}),{template:[["b-blocks/table-row",{}],["b-blocks/table-row",{}],["b-blocks/table-row",{}]],templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-row"]}),r=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Lw,{attributes:t,setAttributes:n,updateObj:r,device:i,parentClientId:s}),(0,l.jsx)(Ew,{attributes:t,id:`block-${o}`}),(0,l.jsx)("tbody",{...a})]})}));Nl("b-blocks/table")&&(0,p.registerBlockType)(Mw,{icon:Sl,edit:Pw,save:h.InnerBlocks.Content});const Aw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-row","version":"1.0.0","title":"Table Row","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table-body"],"keywords":["table","row","table-row","b-blocks","b-table-row"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"styles":{"type":"object","default":{"normal":{"bg":{}},"hover":{"bg":{},"transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Bw=e=>{const[t,n]=(0,m.useState)("normal"),{attributes:o,updateObj:i}=e,{styles:s}=o;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Style","b-blocks"),children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:t,onChange:e=>{n(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:s[t].bg,onChange:e=>i("styles",e,t,"bg")}),"hover"===t&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:s.hover.transition,step:.05,min:0, |
| 393 |
max:5,onChange:e=>i("styles",e,"hover","transition")})]})]})},Iw=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})}),(0,l.jsx)(Bw,{...e})]})})},Ow=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${o}{\n\t\t\t\t${oa(n.normal.bg)}\n\t\t\t\ttransition:background ${n.hover.transition}s ease-in-out;\n\t\t\t}\n\n\t\t\t${o}:hover{\n\t\t\t\t${oa(n.hover.bg)}\n\t\t\t}\n\n\t`}})},Rw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o}=e("core/block-editor");return{device:n()?.toLowerCase(),innerBlocks:o(t)}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,s=(0,Qs.useRef)(null),[a,r]=(0,Qs.useState)(!1);(0,Qs.useEffect)((()=>{r(!0)}),[]);const{insertBlock:c,removeBlock:d}=(0,f.useDispatch)("core/block-editor"),{blockIndex:u,parentClientId:g,parentBlockName:m,columnCount:b}=(0,f.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:n,getBlock:i,getBlockName:s}=e("core/block-editor"),a=n(o),r=i(o);return{blockIndex:t(o),parentClientId:a,parentBlockName:s(a),columnCount:r?.innerBlocks?.length||4}}),[o]),x="b-blocks/table-body"===m,v=()=>{const e=Array.from({length:b},(()=>(0,p.createBlock)("b-blocks/table-cell",{})));return(0,p.createBlock)("b-blocks/table-row",{},e)},k=(0,h.useBlockProps)({tagName:"tr"}),_=(0,h.useInnerBlocksProps)(k,{template:[["b-blocks/table-cell",{}],["b-blocks/table-cell",{}],["b-blocks/table-cell",{}]],templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-cell"]}),C=(0,w.useMergeRefs)([s,_.ref]),j=[{title:"Add Row Above",icon:"table-row-before",onClick:()=>c(v(),u,g,!0)},{title:"Add Row Below",icon:"table-row-after",onClick:()=>c(v(),u+1,g,!0)},{title:"Delete Row",icon:"trash",onClick:()=>d(o)}],$=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Iw,{attributes:t,setAttributes:n,updateObj:$,device:i,parentClientId:g}),(0,l.jsx)(Ow,{attributes:t,id:`block-${o}`}),(0,l.jsx)("tr",{..._,ref:C}),a&&s.current&&x&&(0,l.jsx)(y.Popover,{anchor:s.current,placement:"right",noArrow:!0,animate:!1,flip:!1,resize:!1,focusOnMount:!1,className:"b-blocks-row-action-popover",children:(0,l.jsx)(y.DropdownMenu,{icon:"ellipsis",label:"Row Actions",controls:j,className:"b-blocks-row-action-menu"})})]})}));Nl(Aw.name)&&(0,p.registerBlockType)(Aw,{icon:Sl,edit:Rw,save:h.InnerBlocks.Content});const zw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-cell","version":"1.0.0","title":"Table Cell","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table-row"],"keywords":["key1","key2","key3","key4","key5"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"tagName":{"type":"string","default":"td"},"settings":{"type":"object","default":{"rowSpan":1,"colSpan":1}},"styles":{"type":"object","default":{"alignment":{"desktop":"","tablet":"","mobile":""},"normal":{"bg":""},"hover":{"bg":"","transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Dw=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Fw=[{label:"Left",value:"left",icon:"align-left"},{label:"Center",value:"center",icon:"align-center"},{label:"Right",value:"right",icon:"align-right"}],Hw=e=>{const{attributes:t,updateObj:n,device:o}=e,{settings:i,styles:s}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table Cell","b-blocks"),children:[(0,l.jsxs)(y.Flex,{align:"center",justify:"space-between",children:[(0,l.jsx)(v,{className:"",children:"Alignment"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{className:"mt10",value:s.alignment[o],onChange:e=>n("styles",e,"alignment",o),options:Fw,isIcon:!0,size:"default"}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Row Span","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i.rowSpan,onChange:e=>n("settings",e,"rowSpan")}),(0,l.jsx)(y.RangeControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Column Span","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i.colSpan,onChange:e=>n("settings",e,"colSpan")})]})]})},Ww=e=>{const[t,n]=(0,m.useState)("normal"),{attributes:o,updateObj:i}=e,{styles:s}=o;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Style","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:t,onChange:e=>{n(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:s[t].bg,onChange:e=>i("styles",e,t,"bg")}),"hover"===t&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:s.hover.transition,step:.05,min:0,max:5,onChange:e=>i("styles",e,"hover","transition")})]})})},Uw=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Dw,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Hw,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ww,{...e})})]})})]})})},Gw=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${o} {\n\t\t\t${na("display","table-cell")}\n\t\t\t${na("text-align",n.alignment.desktop)}\n\t\t\t${oa(n.normal.bg)}\n\t\t\ttransition: background ${n.hover.transition}s ease-in-out;\n\t\t}\n\t\t${o}:hover {\n\t\t\t${oa(n.hover.bg)}\n\t\t}\n\t`}})},Vw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o,getBlockRootClientId:i}=e("core/block-editor"),s=i(t);return{device:n()?.toLowerCase(),innerBlocks:o(t),parentClientId:s}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,innerBlocks:s,parentClientId:a}=e,{settings:r,tagName:c="td",className:d}=t,u=(0,h.useInnerBlocksProps)((0,h.useBlockProps)({tagName:c,className:d}),{template:[["core/paragraph",{placeholder:"Type / to choose a block"}]],templateLock:!1,renderAppender:s?.length>0?void 0:h.InnerBlocks.ButtonBlockAppender,__experimentalDirectInsert:!1}),p=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Uw,{attributes:t,setAttributes:n,device:i,updateObj:p,clientId:o,parentClientId:a}),(0,l.jsx)(Gw,{attributes:t,id:`block-${o}`}),(0,l.jsx)(c,{...u,colSpan:r?.colSpan,rowSpan:r.rowSpan})]})}));Nl("b-blocks/table")&&(0,p.registerBlockType)(zw,{icon:Sl,edit:Vw,save:h.InnerBlocks.Content}) |
| 394 |
;const qw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-footer","version":"1.0.0","title":"Table Footer","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table"],"keywords":["key1","key2","key3","key4","key5"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"settings":{"type":"object","default":{"rowSpan":1,"colSpan":1}},"styles":{"type":"object","default":{"alignment":{"desktop":"","tablet":"","mobile":""},"normal":{"bg":""},"hover":{"bg":"","transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Yw=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})})})})},Kw=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${o} {\n\t\t\t${na("text-align",n.alignment.desktop)}\n\t\t\t${oa(n.normal.bg)}\n\t\t\ttransition: background ${n.hover.transition}s ease-in-out;\n\t\t}\n\t\t${o}:hover {\n\t\t\t${oa(n.hover.bg)}\n\t\t}\n\t`}})},Qw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o,getBlockRootClientId:i}=e("core/block-editor"),s=i(t);return{device:n()?.toLowerCase(),innerBlocks:o(t),parentClientId:s}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,parentClientId:s}=e,{settings:a}=t,r=(0,h.useInnerBlocksProps)((0,h.useBlockProps)({tagName:"tfoot"}),{template:[],templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-row"]}),c=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Yw,{attributes:t,setAttributes:n,device:i,updateObj:c,parentClientId:s}),(0,l.jsx)(Kw,{attributes:t,id:`block-${o}`}),(0,l.jsx)("tfoot",{...r,colSpan:a.colSpan,rowSpan:a.rowSpan})]})}));Nl("b-blocks/table")&&(0,p.registerBlockType)(qw,{icon:Sl,edit:Qw,save:h.InnerBlocks.Content});const Zw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/divider","title":"Divider","category":"bBlocks","description":"Add a customizable inline divider between paragraphs and sections. Choose a plain line, centered icon, or text label, with options for line style, color, thickness, width, alignment, and spacing.","keywords":["divider","separator","hr","line","rule","horizontal rule","or","section divider"],"textdomain":"b-blocks","attributes":{"type":{"type":"string","default":"line"},"layout":{"type":"object","default":{"alignment":"center","width":"100%"}},"line":{"type":"object","default":{"style":"solid","color":"#cccccc","width":"2px"}},"icon":{"type":"object","default":{"svg":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 576 512\\" fill=\\"currentColor\\"><path d=\\"M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z\\"/></svg>","size":"16px","color":"","bg":{"type":"solid","color":""},"padding":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"borderRadius":{"top":"50px","right":"50px","bottom":"50px","left":"50px"}}},"text":{"type":"object","default":{"content":"OR","color":"","bg":{"type":"solid","color":""},"typography":{"fontSize":{"desktop":"14px","tablet":"","mobile":""},"fontWeight":600,"textTransform":"none"},"padding":{"top":"4px","right":"12px","bottom":"4px","left":"12px"}}},"spacing":{"type":"object","default":{"top":"24px","right":"","bottom":"24px","left":""}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false,"anchor":true,"className":true,"customClassName":true,"spacing":{"margin":false,"padding":false}},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css"],"viewScript":"file:./view.js","render":"file:./render.php"}'),Xw=({attributes:e,id:t,isBackend:n=!1})=>{const{layout:o={},line:i={},icon:s={},text:a={},spacing:r={},advanced:c}=e,d=i.color||"#cccccc",u=s.color||d,p=a.color||d,h=`${i.width||"2px"} ${i.style||"solid"} ${d}`,g=`#${t} .b-blocks-divider`,m=`${g} .b-blocks-divider-inner`,b=`${g} .b-blocks-divider-line`,f=`${g} .b-blocks-divider-icon`,x=`${g} .b-blocks-divider-text`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${pa("",a.typography).googleFontLink}\n\t\t\t${g}{\n\t\t\t\t${na("margin",ha(r))}\n\t\t\t}\n\t\t\t${m}{\n\t\t\t\tmax-width: ${o.width||"100%"};\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\tborder-top: ${h};\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\tcolor: ${u};\n\t\t\t\tfont-size: ${s.size||"16px"};\n\t\t\t\t${na("padding",ha(s.padding))}\n\t\t\t\t${na("border-radius",ha(s.borderRadius))}\n\t\t\t\t${oa(s.bg)}\n\t\t\t}\n\t\t\t${f}>svg{\n\t\t\t\tfill: ${u};\n\t\t\t\t${na("height",s.size)}\n\t\t\t\t${na("width",s.size)}\n\t\t\t}\n\t\t\t${pa(x,a.typography).styles}\n\t\t\t${x}{\n\t\t\t\tcolor: ${p};\n\t\t\t\t${na("padding",ha(a.padding))}\n\t\t\t\t${oa(a.bg)}\n\t\t\t}\n\t\t\t${_a(t,c,n,!1)}\n\t\t\t`}})},Jw=["line","icon","text"],e_=["solid","dashed","dotted","double"],t_=["left","center","right"],n_=({attributes:e,textSlot:t=null})=>{ |
| 395 |
const{type:n="line",layout:o={},line:i={},icon:s={},text:a={}}=e,r=Jw.includes(n)?n:"line",c=["b-blocks-divider",`b-blocks-divider--${r}`,`b-blocks-divider-style--${e_.includes(i.style)?i.style:"solid"}`,`b-blocks-divider-align--${t_.includes(o.alignment)?o.alignment:"center"}`].join(" ");return(0,l.jsxs)("div",{className:c,children:["line"===r&&(0,l.jsx)("div",{className:"b-blocks-divider-inner",role:"separator",children:(0,l.jsx)("hr",{className:"b-blocks-divider-line","aria-hidden":"true"})}),"icon"===r&&(0,l.jsxs)("div",{className:"b-blocks-divider-inner",role:"separator",children:[(0,l.jsx)("span",{className:"b-blocks-divider-line","aria-hidden":"true"}),(0,l.jsx)("span",{className:"b-blocks-divider-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:s.svg||""}}),(0,l.jsx)("span",{className:"b-blocks-divider-line","aria-hidden":"true"})]}),"text"===r&&(0,l.jsxs)("div",{className:"b-blocks-divider-inner",role:"separator","aria-label":a.content||(0,x.__)("Section divider","b-blocks"),children:[(0,l.jsx)("span",{className:"b-blocks-divider-line","aria-hidden":"true"}),t||(0,l.jsx)("span",{className:"b-blocks-divider-text",children:a.content||""}),(0,l.jsx)("span",{className:"b-blocks-divider-line","aria-hidden":"true"})]})]})},o_=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],i_=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],s_=[{label:(0,x.__)("Plain Line","b-blocks"),value:"line"},{label:(0,x.__)("Line with Icon","b-blocks"),value:"icon"},{label:(0,x.__)("Line with Text Label","b-blocks"),value:"text"}],a_=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"},{label:(0,x.__)("Double","b-blocks"),value:"double"}],r_=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],l_=({attributes:e,updateObj:t})=>{const{type:n="line",layout:o={},icon:i={},text:s={}}=e,a="icon"===n,r="text"===n;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Type","b-blocks"),labelPosition:"edge",value:n||"line",options:s_,onChange:e=>t("type",e),help:(0,x.__)("Icon and Text place a centered element between two line segments.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Alignment","b-blocks"),labelPosition:"edge",className:"mt10",value:o.alignment||"center",options:r_,onChange:e=>t("layout",e,"alignment"),help:(0,x.__)("Only visible when Width is less than 100%.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Divider Width","b-blocks"),labelPosition:"edge",units:o_,isUnitSelectTabbable:!0,value:o.width||"100%",onChange:e=>t("layout",e,"width")})]}),a&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:i.svg,onChange:e=>t("icon",e,"svg")})}),r&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Text Label","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Label Text","b-blocks"),value:s.content||"",onChange:e=>t("text",(e||"").slice(0,40),"content"),placeholder:(0,x.__)("OR","b-blocks"),help:(0,x.__)("Short text shown centered on the line (max 40 chars). Also editable inline in the canvas.","b-blocks"),__nextHasNoMarginBottom:!0})})]})},c_=({attributes:e,updateObj:t})=>{const{type:n="line",line:o={},icon:i={},text:s={},spacing:a={}}=e,r="icon"===n,c="text"===n;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Line","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Line Style","b-blocks"),labelPosition:"edge",value:o.style||"solid",options:a_,onChange:e=>t("line",e,"style"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ue,{label:(0,x.__)("Line Color","b-blocks"),value:o.color||"#cccccc",onChange:e=>t("line",e||"#cccccc","color"),defaultColor:"#cccccc"}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Line Thickness","b-blocks"),labelPosition:"edge",units:o_,isUnitSelectTabbable:!0,value:o.width||"2px",onChange:e=>t("line",e,"width")})]}),r&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Icon Size","b-blocks"),labelPosition:"edge",units:o_,isUnitSelectTabbable:!0,value:i.size||"16px",onChange:e=>t("icon",e,"size")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:i.color||"",onChange:e=>t("icon",e||"","color"),defaultColor:o.color||"#cccccc"}),(0,l.jsx)(An,{label:(0,x.__)("Icon Background ","b-blocks"),value:i.bg,onChange:e=>t("icon",e,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Icon Padding","b-blocks"),units:o_,values:i.padding,resetValues:{top:"8px",right:"8px",bottom:"8px",left:"8px"},onChange:e=>t("icon",e,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Icon Border Radius","b-blocks"),units:o_,values:i.borderRadius,resetValues:{top:"50px",right:"50px",bottom:"50px",left:"50px"},onChange:e=>t("icon",e,"borderRadius")})]}),c&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Text Label","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:s.typography,onChange:e=>t("text",e,"typography")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:s.color||"",onChange:e=>t("text",e||"","color"),defaultColor:o.color||"#cccccc"}),(0,l.jsx)(An,{label:(0,x.__)("Text Background","b-blocks"),value:s.bg,onChange:e=>t("text",e,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),units:o_,values:s.padding,resetValues:{top:"4px",right:"12px",bottom:"4px",left:"12px"},onChange:e=>t("text",e,"padding")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Spacing","b-blocks"),initialOpen:!1,children:(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),units:o_,values:a,resetValues:{top:"24px",right:"",bottom:"24px",left:""},onChange:e=>t("spacing",e)})})]})},d_=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:i_,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(l_,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(c_,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})},u_=["left","center","right"],p_=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{type:s="line",layout:a={},text:r={}}=t,c=bBlocksPremiumChecker,d=fe(t,n),u=u_.includes(a.alignment)?a.alignment:"center",p="text"===s?(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-divider-text",value:r.content||"",onChange:e=>d("text",e,"content"),placeholder:(0,x.__)("OR","b-blocks"),allowedFormats:[]}):null;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:u,onChange:e=>d("layout",e||"center","alignment")})}),(0,l.jsx)(d_,{attributes:t,setAttributes:n,updateObj:d,isPremium:c,device:i}),(0,l.jsx)("div",{...(0,h.useBlockProps)(),children:(0,l.jsxs)("div",{children:[(0,l.jsx)(Xw,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)(n_,{attributes:t,textSlot:p})]})})]})}));Nl(Zw.name)&&(0,p.registerBlockType)(Zw,{icon:yl,edit:p_,save:()=>null}) |
| 396 |
;const h_=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/dual-color-heading","version":"1.0.0","title":"Dual Color Heading","category":"bBlocks","description":"Highlight content heading with different colors.","keywords":["dual","color","heading","dual-color-heading"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"sortElements":{"type":"array","default":["heading","separator","subHeading","icon"]},"heading":{"type":"object","default":{"tag":"h2","colorType":"solid","first":{"text":"Dual Heading","colorType":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)"},"last":{"text":"Example","colorType":"solid","color":"#FA52CA","gradient":"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)"},"typography":{"fontFamily":"Default","fontCategory":"sans-serif","fontVariant":"700","fontWeight":700,"isUploadFont":true,"fontSize":{"desktop":"40px","tablet":"36px","mobile":"32px"},"fontStyle":"normal","textTransform":"none","textDecoration":"auto","lineHeight":"135%","letterSpace":"0px"},"align":""}},"separator":{"type":"object","default":{"show":true,"type":"line","iconType":"upload","icon":{"upload":"","library":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'> <path d=\'M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z\'></path></svg>"},"iconSize":36,"iconColor":"#1e1e1e","alignment":"center","distance":"0px","left":{"color":"#146EF5","width":"100px","height":"5px","bRadius":{}},"right":{"color":"#00ffff","width":"100px","height":"5px","bRadius":{}},"margin":{"top":"14px","right":"0px","bottom":"14px","left":"0px"}}},"subHeading":{"type":"object","default":{"text":"Insert a meaningful line to evaluate the headline.","color":"#333","typography":{"fontSize":{"desktop":"16px","tablet":"15px","mobile":"15px"}}}},"icon":{"type":"object","default":{"show":true,"iconType":"upload","icon":{"upload":"","library":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' id=\'emoji-heart-eyes-fill\'><path d=\'M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0M4.756 4.566c.763-1.424 4.02-.12.952 3.434-4.496-1.596-2.35-4.298-.952-3.434m6.559 5.448a.5.5 0 0 1 .548.736A4.5 4.5 0 0 1 7.965 13a4.5 4.5 0 0 1-3.898-2.25.5.5 0 0 1 .548-.736h.005l.017.005.067.015.252.055c.215.046.515.108.857.169.693.124 1.522.242 2.152.242s1.46-.118 2.152-.242a27 27 0 0 0 1.109-.224l.067-.015.017-.004.005-.002zm-.07-5.448c1.397-.864 3.543 1.838-.953 3.434-3.067-3.554.19-4.858.952-3.434z\'></path></svg>"},"img":{"url":"","alt":"","title":""},"size":36,"color":"#000"}},"alignment":{"type":"object","default":{"desktop":"center","tablet":"center","mobile":"center"}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"16px","right":"16px","bottom":"16px","left":"16px"},"tablet":{"top":"16px","right":"16px","bottom":"16px","left":"16px"},"mobile":{"top":"16px","right":"16px","bottom":"16px","left":"16px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":["file:./view.css","aos"],"render":"file:./render.php","viewScript":["file:./view.js","aos"]}'),g_="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTIyLjg4IDExNy4wMyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIyLjg4IDExNy4wMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PGc+PHBhdGggZD0iTTYzLjA5LDEuMTFsMTYsMzkuMWw0Mi4xNCwzLjEzYzAuOTgsMC4wNywxLjcyLDAuOTIsMS42NSwxLjljLTAuMDQsMC41Mi0wLjMsMC45OC0wLjY4LDEuMjhMOTAsNzMuNzlsMTAuMDQsNDEuMDUgYzAuMjMsMC45NS0wLjM2LDEuOTItMS4zMSwyLjE1Yy0wLjUsMC4xMi0xLDAuMDItMS4zOS0wLjI0bC0zNS45LTIyLjIxTDI1LjUsMTE2Ljc3Yy0wLjg0LDAuNTItMS45MywwLjI2LTIuNDUtMC41OCBjLTAuMjYtMC40Mi0wLjMyLTAuOTEtMC4yMi0xLjM1bDAsMGwxMC4wNC00MS4wNUwwLjYzLDQ2LjQ4Yy0wLjc1LTAuNjMtMC44NC0xLjc2LTAuMjEtMi41MWMwLjMyLTAuMzgsMC43Ny0wLjU5LDEuMjMtMC42M3YwIGw0Mi4xNC0zLjEzbDE2LTM5LjFjMC4zNy0wLjkxLDEuNDEtMS4zNSwyLjMxLTAuOThDNjIuNTcsMC4zMiw2Mi45MSwwLjY4LDYzLjA5LDEuMTFMNjMuMDksMS4xMUw2My4wOSwxLjExeiBNNjQuMSwzOS42NiBsNS43MSwxMy45NmwxNS4wNSwxLjEyYzAuMjcsMC4wMiwwLjUyLDAuMDgsMC43NiwwLjE3bDI5LjczLTguNDNsLTM3LjYyLTIuOGwwLTAuMDFjLTAuNjUtMC4wNS0xLjI2LTAuNDUtMS41Mi0xLjFMNjMuMTYsMTAuNjYgbDAuMywyOC4wOEM2My43NCwzOSw2My45NiwzOS4zMSw2NC4xLDM5LjY2TDY0LjEsMzkuNjZMNjQuMSwzOS42NnogTTExMS4xLDUxLjI1bC0yMy45NSw2Ljc5Yy0wLjE1LDAuNTItMC40NywwLjk3LTAuODgsMS4yOSBsLTExLjQ1LDkuN2wzLjU5LDE0LjY3YzAuMDcsMC4yOSwwLjA5LDAuNTgsMC4wNiwwLjg2bDE1Ljg2LDIxLjlMODYuMyw3My42NWMtMC4yLTAuNjYsMC0xLjQsMC41Ni0xLjg3TDExMS4xLDUxLjI1TDExMS4xLDUxLjI1eiBNOTIuMjEsMTA5LjM5bC0xNi4zLTIyLjUxYy0wLjUxLDAtMC45OS0wLjE1LTEuNC0wLjQyTDYzLjYsNzkuN3YxMS4xN2MwLDAuMjUtMC4wNSwwLjQ5LTAuMTUsMC43MUw5Mi4yMSwxMDkuMzlMOTIuMjEsMTA5LjM5eiBNNjAuMTgsOTEuMTNjLTAuMDEtMC4wOC0wLjAyLTAuMTctMC4wMi0wLjI1Vjc5LjUxbC0xMS4yOCw2Ljk4Yy0wLjM0LDAuMjEtMC43MSwwLjMzLTEuMDksMC4zN0wzMC42NSwxMDkuNEw2MC4xOCw5MS4xMyBMNjAuMTgsOTEuMTN6IE0yOC41MywxMDYuNTRsMTYuNDktMjEuNjhjLTAuMDgtMC4zOC0wLjA4LTAuNzgsMC4wMS0xLjE1bDAsMGwzLjU5LTE0LjY3TDM3LjEsNTkuMjdjLTAuNDMtMC4zNi0wLjctMC44My0wLjgzLTEuMzMgTDguNzEsNDguNjZsMjcuMzEsMjMuMTJsMCwwYzAuNSwwLjQyLDAuNzQsMS4xLDAuNTgsMS43OEwyOC41MywxMDYuNTRMMjguNTMsMTA2LjU0eiBNMTIsNDYuMTVsMjUuNjUsOC42NSBjMC4wOCwwLjAzLDAuMTYsMC4wNiwwLjIzLDAuMWMwLjIyLTAuMDgsMC40Ni0wLjEzLDAuNy0wLjE1bDAsMGwxNS4wNi0xLjEybDUuNzEtMTMuOTZjMC4xNi0wLjM5LDAuNC0wLjcxLDAuNjktMC45N2wtMC4zLTI4LjA1IGwtMTMuMDEsMzEuOGMtMC4yMSwwLjY4LTAuODIsMS4xOS0xLjU4LDEuMjVMMTIsNDYuMTVMMTIsNDYuMTV6IE02MC4xLDQ0LjU5bC00LjcsMTEuNDhsLTE2LjY0LDEuMjRsMTIuNzQsMTAuNzlsLTMuOTcsMTYuMjEgbDAuNjEtMC4zOGwyLjg4LTEuNzhsMTAuNy02LjYybDQuNzEsMi45Mmw5LjExLDUuNjRsMC4zNywwLjIzbC0zLjk3LTE2LjIxbDEyLjc0LTEwLjc5bC0wLjI2LTAuMDJ2MGwtMTYuMzgtMS4yMmwtNC41MS0xMS4wM3YwIGwtMS44MS00LjQyTDYwLjEsNDQuNTlMNjAuMSw0NC41OXoiLz48L2c+PC9zdmc+",m_="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI1NnB4IiBoZWlnaHQ9IjI1NnB4IiB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+DQogICAgPHRpdGxlPm9rdGE8L3RpdGxlPg0KICAgIDxnPg0KICAgICAgICA8cGF0aCBkPSJNMTQwLjg0NDI4LDEuNzc3Nzc3NzggTDEzNS41Nzg0ODEsNjYuNjMxMTExMSBDMTMzLjA4NzksNjYuMzQ2NjY2NyAxMzAuNTk3MzIsNjYuMjA0NDQ0NCAxMjguMDM1NTgsNjYuMjA0NDQ0NCBDMTI0LjgzMzQwNSw2Ni4yMDQ0NDQ0IDEyMS43MDIzODksNjYuNDE3Nzc3OCAxMTguNjQyNTMzLDY2LjkxNTU1NTYgTDExNS42NTM4MzcsMzUuNDg0NDQ0NCBDMTE1LjU4MjY3NywzNC40ODg4ODg5IDExNi4zNjU0MzEsMzMuNjM1NTU1NiAxMTcuMzYxNjYzLDMzLjYzNTU1NTYgTDEyMi42OTg2MjEsMzMuNjM1NTU1NiBMMTIwLjEzNjg4MSwxLjg0ODg4ODg5IEMxMjAuMDY1NzIyLDAuODUzMzMzMzMzIDEyMC44NDg0NzYsMCAxMjEuNzczNTQ5LDAgTDEzOS4yMDc2MTIsMCBDMTQwLjIwMzg0NSwwIDE0MC45ODY1OTgsMC44NTMzMzMzMzMgMTQwLjg0NDI4LDEuODQ4ODg4ODkgTDE0MC44NDQyOCwxLjg0ODg4ODg5IEwxNDAuODQ0MjgsMS43Nzc3Nzc3OCBaIE05Ni44Njc3NDM0LDQuOTc3Nzc3NzggQzk2LjU4MzEwNTYsNC4wNTMzMzMzMyA5NS41ODY4NzM0LDMuNDg0NDQ0NDQgOTQuNjYxODAwNiwzLjg0IEw3OC4yOTUxMjg2LDkuODEzMzMzMzMgQzc3LjM3MDA1NTgsMTAuMTY4ODg4OSA3Ni45NDMwOTkxLDExLjIzNTU1NTYgNzcuMzcwMDU1OCwxMi4wODg4ODg5IEw5MC42NzY4NzE4LDQxLjEwMjIyMjIgTDg1LjYyNDU1MTMsNDIuOTUxMTExMSBDODQuNjk5NDc4NSw0My4zMDY2NjY3IDg0LjI3MjUyMTgsNDQuMzczMzMzMyA4NC42OTk0Nzg1LDQ1LjIyNjY2NjcgTDk4LjI5MDkzMjIsNzMuNzQyMjIyMiBDMTAzLjIwMDkzNCw3MS4wNCAxMDguNTM3ODkyLDY4Ljk3Nzc3NzggMTE0LjE1OTQ4OCw2Ny42OTc3Nzc4IEw5Ni45Mzg5MDI4LDQuOTc3Nzc3NzggTDk2Ljg2Nzc0MzQsNC45Nzc3Nzc3OCBaIE01Ni43MzM4MTcxLDIzLjA0IEw5NC4zNzcxNjI4LDc2LjA4ODg4ODkgQzg5LjYwOTQ4MDEsNzkuMjE3Nzc3OCA4NS4yNjg3NTQsODIuOTE1NTU1NiA4MS41Njg0NjMsODcuMTgyMjIyMiBMNTkuMDEwOTE5Myw2NC45OTU1NTU2IEM1OC4yOTkzMjQ5LDY0LjI4NDQ0NDQgNTguMzcwNDg0Myw2My4xNDY2NjY3IDU5LjA4MjA3ODgsNjIuNTA2NjY2NyBMNjMuMjA5MzI2NSw1OS4wOTMzMzMzIEw0MC43OTQxMDE3LDM2LjQwODg4ODkgQzQwLjA4MjUwNzMsMzUuNjk3Nzc3OCA0MC4xNTM2NjY3LDM0LjU2IDQwLjkzNjQyMDYsMzMuOTIgTDU0LjI0MzIzNjYsMjIuNzU1NTU1NiBDNTUuMDI1OTkwNSwyMi4xMTU1NTU2IDU2LjA5MzM4MjEsMjIuMjU3Nzc3OCA1Ni42NjI2NTc3LDIzLjA0IEw1Ni43MzM4MTcxLDIzLjA0IFogTTI1LjEzOTAyNDEsNTMuNzYgQzI0LjM1NjI3MDIsNTMuMTkxMTExMSAyMy4yMTc3MTkxLDUzLjQ3NTU1NTYgMjIuNzE5NjAzLDU0LjMyODg4ODkgTDE0LjAzODE1MDksNjkuNDA0NDQ0NCBDMTMuNTQwMDM0OCw3MC4yNTc3Nzc4IDEzLjg5NTgzMiw3MS4zMjQ0NDQ0IDE0Ljc0OTc0NTMsNzEuNzUxMTExMSBMNDMuNjQwNDc5NSw4NS40MDQ0NDQ0IEw0MC45MzY0MjA2LDkwLjAyNjY2NjcgQzQwLjQzODMwNDUsOTAuODggNDAuNzk0MTAxNyw5Mi4wMTc3Nzc4IDQxLjcxOTE3NDUsOTIuMzczMzMzMyBMNzAuNDY3NTg5NywxMDUuNTI4ODg5IEM3Mi41MzEyMTM2LDEwMC4xOTU1NTYgNzUuMzA2NDMxOSw5NS4yMTc3Nzc4IDc4LjcyMjA4NTIsOTAuNzM3Nzc3OCBMMjUuMTM5MDI0MSw1My43NiBaIE0zLjg2MjM1MDQyLDk0LjcyIEM0LjAwNDY2OTMxLDkzLjcyNDQ0NDQgNS4wMDA5MDE1Miw5My4xNTU1NTU2IDUuOTI1OTc0MjksOTMuMzY4ODg4OSBMNjguOTAyMDgyLDEwOS43OTU1NTYgQzY3LjI2NTQxNDgsMTE1LjEyODg4OSA2Ni4zNDAzNDIsMTIwLjc0NjY2NyA2Ni4xOTgwMjMxLDEyNi41Nzc3NzggTDM0LjY3NDM4OTYsMTI0LjAxNzc3OCBDMzMuNjc4MTU3MywxMjMuOTQ2NjY3IDMyLjk2NjU2MjksMTIzLjAyMjIyMiAzMy4xODAwNDEyLDEyMi4wMjY2NjcgTDM0LjEwNTExNCwxMTYuNzY0NDQ0IEwyLjI5Njg0MjY2LDExMy43Nzc3NzggQzEuMzAwNjEwNDQsMTEzLjcwNjY2NyAwLjY2MDE3NTQ1MSwxMTIuNzgyMjIyIDAuODAyNDk0MzM5LDExMS43ODY2NjcgTDMuNzkxMTkwOTgsOTQuNjQ4ODg4OSBMMy43OTExOTA5OCw5NC42NDg4ODg5IEwzLjg2MjM1MDQyLDk0LjcyIFogTTEuNTE0MDg4NzgsMTM3LjI0NDQ0NCBDMC41MTc4NTY1NjQsMTM3LjMxNTU1NiAtMC4xMjI1Nzg0MywxMzguMjQgMC4wMTk3NDA0NTc4LDEzOS4yMzU1NTYgTDMuMDc5NTk2NTQsMTU2LjM3MzMzMyBDMy4yMjE5MTU0MywxNTcuMzY4ODg5IDQuMjE4MTQ3NjQsMTU3LjkzNzc3OCA1LjE0MzIyMDQxLDE1Ny43MjQ0NDQgTDM2LjAyNjQxOSwxNDkuNjg4ODg5IEwzNi45NTE0OTE4LDE1NC45NTExMTEgQzM3LjA5MzgxMDYsMTU1Ljk0NjY2NyAzOC4wOTAwNDI5LDE1Ni41MTU1NTYgMzkuMDE1MTE1NiwxNTYuMzAyMjIyIEw2OS40NzEzNTc1LDE0Ny45MTExMTEgQzY3LjY5MjM3MTQsMTQyLjY0ODg4OSA2Ni41NTM4MjAzLDEzNy4wMzExMTEgNjYuMjY5MTgyNiwxMzEuMjcxMTExIEwxLjQ0MjkyOTMzLDEzNy4yNDQ0NDQgTDEuNTE0MDg4NzgsMTM3LjI0NDQ0NCBaIE0xMS42MTg3Mjk4LDE4Mi4zMjg4ODkgQzExLjEyMDYxMzcsMTgxLjQ3NTU1NiAxMS40NzY0MTA5LDE4MC40MDg4ODkgMTIuMzMwMzI0MiwxNzkuOTgyMjIyIEw3MS4xMDgwMjQ3LDE1Mi4xMDY2NjcgQzczLjMxMzk2NzUsMTU3LjM2ODg4OSA3Ni4zMDI2NjQxLDE2Mi4yNzU1NTYgNzkuODYwNjM2MywxNjYuNjg0NDQ0IEw1NC4xMDA5MTc3LDE4NS4wMzExMTEgQzUzLjMxODE2MzgsMTg1LjYgNTIuMTc5NjEyNywxODUuMzg2NjY3IDUxLjY4MTQ5NjYsMTg0LjUzMzMzMyBMNDguOTc3NDM3NywxNzkuODQgTDIyLjcxOTYwMywxOTcuOTczMzMzIEMyMS45MzY4NDkxLDE5OC41NDIyMjIgMjAuNzk4Mjk4LDE5OC4yNTc3NzggMjAuMzAwMTgxOSwxOTcuNDA0NDQ0IEwxMS41NDc1NzAzLDE4Mi4zMjg4ODkgTDExLjYxODcyOTgsMTgyLjMyODg4OSBaIE04Mi44NDkzMzMsMTcwLjA5Nzc3OCBMMzcuMDkzODEwNiwyMTYuMzkxMTExIEMzNi4zODIyMTYyLDIxNy4xMDIyMjIgMzYuNDUzMzc1NiwyMTguMjQgMzcuMjM2MTI5NSwyMTguODggTDUwLjYxNDEwNDksMjMwLjA0NDQ0NCBDNTEuMzk2ODU4OCwyMzAuNjg0NDQ0IDUyLjQ2NDI1MDUsMjMwLjU0MjIyMiA1My4wMzM1MjYsMjI5Ljc2IEw3MS41MzQ5ODE0LDIwMy43MzMzMzMgTDc1LjY2MjIyOTEsMjA3LjIxNzc3OCBDNzYuNDQ0OTgzLDIwNy44NTc3NzggNzcuNTgzNTM0MSwyMDcuNzE1NTU2IDc4LjE1MjgwOTcsMjA2Ljg2MjIyMiBMOTYuMDg0OTg5NSwxODAuODM1NTU2IEM5MS4yNDYxNDczLDE3Ny44NDg4ODkgODYuNzYzMTAyNCwxNzQuMjIyMjIyIDgyLjkyMDQ5MjQsMTcwLjA5Nzc3OCBMODIuODQ5MzMzLDE3MC4wOTc3NzggWiBNNzMuODEyMDgzNiwyNDQuNDA4ODg5IEM3Mi44ODcwMTA4LDI0NC4wNTMzMzMgNzIuNDYwMDU0MiwyNDIuOTg2NjY3IDcyLjg4NzAxMDgsMjQyLjEzMzMzMyBMOTkuOTk4NzU4OSwxODIuOTY4ODg5IEMxMDQuOTc5OTIsMTg1LjUyODg4OSAxMTAuMzg4MDM4LDE4Ny40NDg4ODkgMTE2LjAwOTYzNCwxODguNTE1NTU2IEwxMDguMDM5Nzc2LDIxOS4wOTMzMzMgQzEwNy44MjYyOTgsMjIwLjAxNzc3OCAxMDYuNzU4OTA2LDIyMC41ODY2NjcgMTA1LjgzMzgzMywyMjAuMjMxMTExIEwxMDAuNzgxNTEzLDIxOC4zODIyMjIgTDkyLjMxMzUzOSwyNDkuMTczMzMzIEM5Mi4wMjg5MDEyLDI1MC4wOTc3NzggOTEuMDMyNjY5LDI1MC42NjY2NjcgOTAuMTA3NTk2MiwyNTAuMzExMTExIEw3My43NDA5MjQyLDI0NC4zMzc3NzggTDczLjc0MDkyNDIsMjQ0LjMzNzc3OCBMNzMuODEyMDgzNiwyNDQuNDA4ODg5IFogTTEyMC40OTI2NzksMTg5LjI5Nzc3OCBMMTE1LjIyNjg4LDI1NC4xNTExMTEgQzExNS4xNTU3MiwyNTUuMTQ2NjY3IDExNS45Mzg0NzQsMjU2IDExNi44NjM1NDcsMjU2IEwxMzQuMjk3NjExLDI1NiBDMTM1LjI5Mzg0MywyNTYgMTM2LjA3NjU5NywyNTUuMTQ2NjY3IDEzNS45MzQyNzgsMjU0LjE1MTExMSBMMTMzLjM3MjUzOCwyMjIuMzY0NDQ0IEwxMzguNzA5NDk2LDIyMi4zNjQ0NDQgQzEzOS43MDU3MjgsMjIyLjM2NDQ0NCAxNDAuNDg4NDgyLDIyMS41MTExMTEgMTQwLjQxNzMyMywyMjAuNTE1NTU2IEwxMzcuNDI4NjI2LDE4OS4wODQ0NDQgQzEzNC4zNjg3NywxODkuNTgyMjIyIDEzMS4yMzc3NTUsMTg5Ljc5NTU1NiAxMjguMDM1NTgsMTg5Ljc5NTU1NiBDMTI1LjQ3Mzg0LDE4OS43OTU1NTYgMTIyLjk4MzI1OSwxODkuNjUzMzMzIDEyMC40OTI2NzksMTg5LjI5Nzc3OCBMMTIwLjQ5MjY3OSwxODkuMjk3Nzc4IFogTTE4My4yNTUzMDgsMTMuNzI0NDQ0NCBDMTgzLjY4MjI2NSwxMi44IDE4My4yNTUzMDgsMTEuODA0NDQ0NCAxODIuMzMwMjM1LDExLjQ0ODg4ODkgTDE2NS45NjM1NjMsNS40NzU1NTU1NiBDMTY1LjAzODQ5LDUuMTIgMTY0LjA0MjI1OCw1LjY4ODg4ODg5IDE2My43NTc2Miw2LjYxMzMzMzMzIEwxNTUuMjg5NjQ3LDM3LjQwNDQ0NDQgTDE1MC4yMzczMjYsMzUuNTU1NTU1NiBDMTQ5LjMxMjI1MywzNS4yIDE0OC4zMTYwMjEsMzUuNzY4ODg4OSAxNDguMDMxMzgzLDM2LjY5MzMzMzMgTDE0MC4wNjE1MjYsNjcuMjcxMTExMSBDMTQ1Ljc1NDI4MSw2OC40MDg4ODg5IDE1MS4wOTEyMzksNzAuMzI4ODg4OSAxNTYuMDcyNDAxLDcyLjgxNzc3NzggTDE4My4yNTUzMDgsMTMuNzI0NDQ0NCBMMTgzLjI1NTMwOCwxMy43MjQ0NDQ0IFogTTIxOC45NzczNDksMzkuNTM3Nzc3OCBMMTczLjIyMTgyNiw4NS44MzExMTExIEMxNjkuMzc5MjE3LDgxLjcwNjY2NjcgMTY0Ljk2NzMzMSw3OC4wOCAxNjAuMDU3MzI5LDc1LjA5MzMzMzMgTDE3Ny45ODk1MDksNDkuMDY2NjY2NyBDMTc4LjU1ODc4NSw0OC4yODQ0NDQ0IDE3OS42OTczMzYsNDguMDcxMTExMSAxODAuNDgwMDksNDguNzExMTExMSBMMTg0LjYwNzMzNyw1Mi4xOTU1NTU2IEwyMDMuMTA4NzkzLDI2LjE2ODg4ODkgQzIwMy42NzgwNjgsMjUuMzg2NjY2NyAyMDQuODE2NjIsMjUuMjQ0NDQ0NCAyMDUuNTI4MjE0LDI1Ljg4NDQ0NDQgTDIxOC45MDYxODksMzcuMDQ4ODg4OSBDMjE5LjY4ODk0MywzNy42ODg4ODg5IDIxOS42ODg5NDMsMzguODI2NjY2NyAyMTkuMDQ4NTA4LDM5LjUzNzc3NzggTDIxOC45NzczNDksMzkuNTM3Nzc3OCBaIE0yNDMuNzQwODM1LDc1Ljk0NjY2NjcgQzI0NC42NjU5MDgsNzUuNTIgMjQ0Ljk1MDU0Niw3NC40NTMzMzMzIDI0NC40NTI0Myw3My42IEwyMzUuNjk5ODE4LDU4LjUyNDQ0NDQgQzIzNS4yMDE3MDIsNTcuNjcxMTExMSAyMzQuMDYzMTUxLDU3LjQ1Nzc3NzggMjMzLjI4MDM5Nyw1Ny45NTU1NTU2IEwyMDcuMDIyNTYyLDc2LjA4ODg4ODkgTDIwNC4zMTg1MDMsNzEuNDY2NjY2NyBDMjAzLjgyMDM4Nyw3MC42MTMzMzMzIDIwMi42ODE4MzYsNzAuMzI4ODg4OSAyMDEuODk5MDgyLDcwLjk2ODg4ODkgTDE3Ni4xMzkzNjQsODkuMzE1NTU1NiBDMTc5LjY5NzMzNiw5My43MjQ0NDQ0IDE4Mi42MTQ4NzMsOTguNjMxMTExMSAxODQuODkxOTc1LDEwMy44OTMzMzMgTDI0My42Njk2NzYsNzYuMDE3Nzc3OCBMMjQzLjc0MDgzNSw3NS45NDY2NjY3IFogTTI1Mi45OTE1NjMsOTkuNTU1NTU1NiBMMjU1Ljk4MDI2LDExNi42OTMzMzMgQzI1Ni4xMjI1NzgsMTE3LjY4ODg4OSAyNTUuNDgyMTQzLDExOC41NDIyMjIgMjU0LjQ4NTkxMSwxMTguNjg0NDQ0IEwxODkuNjU5NjU4LDEyNC43Mjg4ODkgQzE4OS4zNzUwMiwxMTguODk3Nzc4IDE4OC4yMzY0NjksMTEzLjM1MTExMSAxODYuNDU3NDgzLDEwOC4wODg4ODkgTDIxNi45MTM3MjUsOTkuNjk3Nzc3OCBDMjE3LjgzODc5OCw5OS40MTMzMzMzIDIxOC44MzUwMywxMDAuMDUzMzMzIDIxOC45NzczNDksMTAxLjA0ODg4OSBMMjE5LjkwMjQyMiwxMDYuMzExMTExIEwyNTAuNzg1NjIsOTguMjc1NTU1NiBDMjUxLjcxMDY5Myw5OC4wNjIyMjIyIDI1Mi43MDY5MjUsOTguNjMxMTExMSAyNTIuODQ5MjQ0LDk5LjYyNjY2NjcgTDI1Mi44NDkyNDQsOTkuNjI2NjY2NyBMMjUyLjk5MTU2Myw5OS41NTU1NTU2IFogTTI1MC4wNzQwMjYsMTYyLjQ4ODg4OSBDMjUwLjk5OTA5OCwxNjIuNzAyMjIyIDI1MS45OTUzMzEsMTYyLjEzMzMzMyAyNTIuMTM3NjUsMTYxLjEzNzc3OCBMMjU1LjEyNjM0NiwxNDQgQzI1NS4yNjg2NjUsMTQzLjAwNDQ0NCAyNTQuNjI4MjMsMTQyLjE1MTExMSAyNTMuNjMxOTk4LDE0Mi4wMDg4ODkgTDIyMS44MjM3MjcsMTM5LjAyMjIyMiBMMjIyLjc0ODc5OSwxMzMuNzYgQzIyMi44OTExMTgsMTMyLjc2NDQ0NCAyMjIuMjUwNjgzLDEzMS45MTExMTEgMjIxLjI1NDQ1MSwxMzEuNzY4ODg5IEwxODkuNzMwODE3LDEyOS4yMDg4ODkgQzE4OS41ODg0OTksMTM1LjA0IDE4OC42NjM0MjYsMTQwLjY1Nzc3OCAxODcuMDI2NzU5LDE0NS45OTExMTEgTDI1MC4wMDI4NjYsMTYyLjQxNzc3OCBMMjUwLjAwMjg2NiwxNjIuNDE3Nzc4IEwyNTAuMDc0MDI2LDE2Mi40ODg4ODkgWiBNMjMzLjI4MDM5NywyMDEuNiBDMjMyLjc4MjI4MSwyMDIuNDUzMzMzIDIzMS42NDM3MywyMDIuNjY2NjY3IDIzMC44NjA5NzYsMjAyLjE2ODg4OSBMMTc3LjI3NzkxNSwxNjUuMTkxMTExIEMxODAuNjkzNTY4LDE2MC43MTExMTEgMTgzLjQ2ODc4NiwxNTUuNzMzMzMzIDE4NS41MzI0MSwxNTAuNCBMMjE0LjI4MDgyNiwxNjMuNTU1NTU2IEMyMTUuMjA1ODk4LDE2My45ODIyMjIgMjE1LjU2MTY5NiwxNjUuMDQ4ODg5IDIxNS4wNjM1NzksMTY1LjkwMjIyMiBMMjEyLjM1OTUyMSwxNzAuNTI0NDQ0IEwyNDEuMjUwMjU1LDE4NC4xNzc3NzggQzI0Mi4xMDQxNjgsMTg0LjYwNDQ0NCAyNDIuNDU5OTY1LDE4NS42NzExMTEgMjQxLjk2MTg0OSwxODYuNTI0NDQ0IEwyMzMuMjgwMzk3LDIwMS42IEwyMzMuMjgwMzk3LDIwMS42IEwyMzMuMjgwMzk3LDIwMS42IFogTTE2MS42MjI4MzcsMTc5Ljc2ODg4OSBMMTk5LjI2NjE4MywyMzIuODE3Nzc4IEMxOTkuODM1NDU4LDIzMy42IDIwMC45NzQwMSwyMzMuNzQyMjIyIDIwMS42ODU2MDQsMjMzLjEwMjIyMiBMMjE0Ljk5MjQyLDIyMS45Mzc3NzggQzIxNS43NzUxNzQsMjIxLjI5Nzc3OCAyMTUuNzc1MTc0LDIyMC4xNiAyMTUuMTM0NzM5LDIxOS40NDg4ODkgTDE5Mi43MTk1MTQsMTk2Ljc2NDQ0NCBMMTk2Ljg0Njc2MiwxOTMuMzUxMTExIEMxOTcuNjI5NTE2LDE5Mi43MTExMTEgMTk3LjYyOTUxNiwxOTEuNTczMzMzIDE5Ni45MTc5MjEsMTkwLjg2MjIyMiBMMTc0LjM2MDM3OCwxNjguNjc1NTU2IEMxNzAuNTg4OTI3LDE3Mi45NDIyMjIgMTY2LjMxOTM2LDE3Ni43MTExMTEgMTYxLjU1MTY3OCwxNzkuNzY4ODg5IEwxNjEuNTUxNjc4LDE3OS43Njg4ODkgTDE2MS42MjI4MzcsMTc5Ljc2ODg4OSBaIE0xNjEuMjY3MDQsMjUyLjAxNzc3OCBDMTYwLjM0MTk2NywyNTIuMzczMzMzIDE1OS4zNDU3MzUsMjUxLjgwNDQ0NCAxNTkuMDYxMDk3LDI1MC44OCBMMTQxLjg0MDUxMiwxODguMTYgQzE0Ny40NjIxMDgsMTg2Ljg4IDE1Mi43OTkwNjYsMTg0LjgxNzc3OCAxNTcuNzA5MDY4LDE4Mi4xMTU1NTYgTDE3MS4zMDA1MjIsMjEwLjYzMTExMSBDMTcxLjcyNzQ3OCwyMTEuNTU1NTU2IDE3MS4zMDA1MjIsMjEyLjYyMjIyMiAxNzAuMzc1NDQ5LDIxMi45MDY2NjcgTDE2NS4zMjMxMjgsMjE0Ljc1NTU1NiBMMTc4LjYyOTk0NCwyNDMuNzY4ODg5IEMxNzkuMDU2OTAxLDI0NC42OTMzMzMgMTc4LjYyOTk0NCwyNDUuNjg4ODg5IDE3Ny43MDQ4NzEsMjQ2LjA0NDQ0NCBMMTYxLjMzODE5OSwyNTIuMDE3Nzc4IEwxNjEuMzM4MTk5LDI1Mi4wMTc3NzggTDE2MS4yNjcwNCwyNTIuMDE3Nzc4IFoiPjwvcGF0aD4NCiAgICA8L2c+DQo8L3N2Zz4NCg==",b_=e=>"image/svg+xml"===(e&&(e.type||("string"==typeof e&&"svg"===e.split(".").pop().toLowerCase()?"image/svg+xml":null))),f_=({attributes:e})=>{ |
| 397 |
const{sortElements:t,heading:n,icon:o,separator:i,subHeading:s}=e,a=(0,m.useRef)(null);return(0,l.jsx)("div",{className:"dch-dual-color-container",ref:a,children:t.map(((e,t)=>{switch(e){case"heading":return(0,l.jsxs)(zn,{tagName:n.tag,className:"dch-dual-color-title",children:[(0,l.jsxs)("span",{className:"heading-first",children:[n.first.text," "]}),(0,l.jsx)("span",{className:"heading-last",children:n.last.text})]},t);case"separator":return i.show&&(0,l.jsxs)("div",{className:"dch-separator-wrapper",children:["line"===i.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"separator-left"}),(0,l.jsx)("span",{className:"separator-right"})]}),"icon"===i.type&&(0,l.jsxs)(m.Fragment,{children:["upload"===i.iconType&&(0,l.jsx)("span",{className:"dch-separator-icon",children:b_(i.icon.upload)?(0,l.jsx)(qa,{src:i.icon?.upload?i.icon.upload:g_}):jt(i.icon.upload)?(0,l.jsx)("img",{src:i.icon?.upload,alt:""}):(0,l.jsx)(qa,{src:i.icon?.upload?i.icon.upload:g_})}),"library"===i.iconType&&(0,l.jsx)("span",{className:"dch-separator-icon",dangerouslySetInnerHTML:{__html:i.icon?.library}})]},t)]},t);case"subHeading":return(0,l.jsx)("div",{className:"dch-dual-color-subcontent",dangerouslySetInnerHTML:{__html:s.text}},t);case"icon":return o.show&&(0,l.jsxs)(m.Fragment,{children:["upload"===o.iconType&&(0,l.jsx)("span",{className:"dch-dual-color-icon-svg",children:b_(o.icon?.upload.url)?(0,l.jsx)(qa,{src:o.icon?.upload.url||m_}):jt(o.icon?.upload.url)?(0,l.jsx)("img",{src:o.icon?.upload.url,alt:""}):(0,l.jsx)(qa,{src:o.icon?.upload.url||m_})}),"library"===o.iconType&&(0,l.jsx)("span",{className:"dch-dual-color-icon-svg",dangerouslySetInnerHTML:{__html:o.icon.library}})]},t)}}))})},x_=({attributes:e,id:o,isBackend:i=!1})=>{const{heading:s,alignment:a,icon:r,subHeading:c,separator:d,advanced:u}=e,p=`#${o}`,h=`${p} .dch-dual-color-container`,g=`${h} .dch-dual-color-title`,m=`${h} .dch-dual-color-subcontent`,b=`${p} .dch-separator-wrapper`,f=`${b} .dch-separator-icon`,x=`${h} .dch-dual-color-icon-svg`,y=e=>"justify-items: "+("left"===a[e]?"start":"right"===a[e]?"end":"center");return(0,l.jsx)("style",{children:`\n\t\t\t${pa("",s.typography)?.googleFontLink}\n\t\t\t${pa("",c.typography)?.googleFontLink}\n\t\t\t${h}{\n\t\t\t\t${y("desktop")};\n\t\t\t}\n\t\t\t${pa(g,s.typography).styles}\n\n\t\t\t${b}{\n\t\t\t\tgap: ${d.distance};\n\t\t\t\tjustify-content:${"left"===d.alignment?"flex-start":"center"===d.alignment?"center":"flex-end"};\n\t\t\t\tmargin: ${ha(d.margin)};\n\t}\n\n ${["left","right"].map((e=>`${p} .separator-${e}{\n ${na("width",d[e].width)}\n ${na("height",d[e].height)}\n ${na("background",d[e].color)}\n ${na("border-radius",d[e].bRadius)}\n }`)).join("")}\n\n\t\t\t${g}{\n\t\t\t\t${na("width",s?.align?"100%":"")}\n\t\t\t\t${na("text-align",s?.align)}\n\t\t\t}\n\n\t\t\t${f}> svg{\n ${na("height",jt(d.iconSize)?d.iconSize+"px":"")}\n ${na("width",jt(d.iconSize)?d.iconSize+"px":"")}\n ${na("color",d.iconColor)}\n ${na("fill",d.iconColor)}\n\t\t\t}\n\t\t\t${f}> img{\n ${na("height",jt(d.iconSize)?d.iconSize+"px":"")}\n ${na("width",jt(d.iconSize)?d.iconSize+"px":"")}\n\t\t\t}\n\t\t\t${f} svg path{\n ${na("color",d.iconColor)}\n\t\t\t}\n\t\t\t${x}>svg{\n ${na("height",jt(r.size)?r.size+"px":"")}\n ${na("width",jt(r.size)?r.size+"px":"")}\n ${na("color",r.color)}\n ${na("fill",r.color)}\n\t\t\t}\n\n\t\t\t${x}>img{\n ${na("height",jt(r.size)?r.size+"px":"")}\n ${na("width",jt(r.size)?r.size+"px":"")}\n ${na("color",r.color)}\n\t\t\t}\n\n\t\t\t${x}>svg path{\n ${na("color",r.color)}\n\t\t\t}\n\t\t\t${m}{\n ${na("color",jt(c.color)?`${c.color} !important`:"")}\n\t\t\t\tdisplay:grid;\n\t\t\t\t${y("desktop")};\n\t\t\t}\n\t\t\t${pa(`${m}>*`,c.typography).styles}\n\n\t\t\t${["first","last"].map((e=>`${g} .heading-${e}{\n\t\t\t\t\t\t${s[e].color?`color:${"solid"===s[e].colorType&&s[e].color};`:`background:${s[e].gradient};`}\n\t\t\t\t\t\tbackground:${"gradient"===s[e].colorType&&s[e].gradient};\n\t\t\t${"gradient"===s[e].colorType||0===s[e].color.length?"\n\t\t\t\t\t-webkit-background-clip: text;\n\t\t\t\t\t-webkit-text-fill-color: transparent; \n\t\t\t\t\t":""}\n\t\t\t}`)).join("")}\n\t\t\t${t} {\n\t\t\t\t${h}{\n\t\t\t\t\t${y("tablet")};\n\t\t\t\t}\n\t\t\t\t${m}{\n\t\t\t\t\t${y("tablet")};\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t${n} {\n\t\t\t\t${h}{\n\t\t\t\t\t${y("mobile")};\n\t\t\t\t}\n\t\t\t\t${m}{\n\t\t\t\t\t${y("mobile")};\n\t\t\t\t}\n\t\t\t}\n\t\t\t${Ca(o,u,i)}\n\t`})},y_=[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"span",value:"span"},{label:"P",value:"p"},{label:"div",value:"div"}],v_={top:"14px",right:"14px",bottom:"14px",left:"14px"},k_={top:"0px",right:"0px",bottom:"0px",left:"0px"},w_=[{label:(0,x.__)("Left","b-blocks"),value:"left",icon:"editor-alignleft"},{label:(0,x.__)("Center","b-blocks"),value:"center",icon:"editor-aligncenter"},{label:(0,x.__)("Right","b-blocks"),value:"right",icon:"editor-alignright"}],C_=[{title:(0,x.__)("Left","b-blocks"),name:"left"},{title:(0,x.__)("Right","b-blocks"),name:"right"}],j_=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],$_=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),S_=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),T_=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),M_=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{ |
| 398 |
d:"M448 64c0-17.7-14.3-32-32-32L32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32zm0 256c0-17.7-14.3-32-32-32L32 288c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 192c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32zM448 448c0-17.7-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32z"})}),N_=e=>{const{attributes:t,setAttributes:n,updateObj:o}=e,{sortElements:i,heading:s,icon:a,separator:r,subHeading:c}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Elements","b-blocks"),children:(0,l.jsx)(Ns,{label:(0,x.__)("Sort Elements:"),value:i,onChange:e=>o("sortElements",e)})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Heading","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("HTML Tag","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:s.tag,onChange:e=>o("heading",e,"tag"),options:y_})]}),["first","last"].map((e=>(0,l.jsx)(y.__experimentalInputControl,{className:"mt20",label:(0,x.__)(("first"===e?"First":"Last")+" Part","b-blocks"),value:s[e].text,onChange:t=>n({heading:{...s,[e]:{...s[e],text:t}}})},e))),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s?.align,onChange:e=>o("heading",e,"align"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:$_}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:S_}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:T_}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Justify",value:"justify",icon:M_})]})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Separator","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:r.show,onChange:e=>o("separator",e,"show")}),r.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:"Type"}),(0,l.jsx)(y.SelectControl,{value:r.type,options:[{label:"Line",value:"line"},{label:"Icon",value:"icon"}],onChange:e=>o("separator",e,"type")})]}),"icon"===r.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{className:"mt10",options:[{label:"Library",value:"library"},{label:"Upload",value:"upload"}],value:r.iconType,label:(0,x.__)("Icon Type","b-blocks"),onChange:e=>o("separator",e,"iconType")}),"library"===r.iconType&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:r.icon.library,onChange:e=>o("separator",e,"icon","library")}),"upload"===r.iconType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:"Icon"}),(0,l.jsx)(we,{types:["image/*"],value:{url:r.icon.upload},default:g_,label:(0,x.__)("Choose Icon","b-blocks"),className:"dual-color-heading-icon",onChange:e=>o("separator",e?.url,"icon","upload")})]})]})]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Sub Heading","b-blocks"),children:(0,l.jsx)(Ls,{height:220,value:c.text,onChange:e=>n({subHeading:{...c,text:e}})})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Icon","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:a.show,onChange:e=>n({icon:{...a,show:e}})}),a.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{options:[{label:"Library",value:"library"},{label:"Upload",value:"upload"}],value:a.iconType,label:(0,x.__)("Icon Type","b-blocks"),onChange:e=>n({icon:be(a,e,"iconType")})}),"library"===a.iconType&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:a.icon.library,onChange:e=>n({icon:be(a,e,"icon","library")})}),"upload"===a.iconType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon","b-blocks")}),(0,l.jsx)(we,{default:m_,value:a.icon.upload,label:(0,x.__)("Choose Icon","b-blocks"),onChange:e=>n({icon:be(a,e,"icon","upload")})})]})]})]})]})},L_=(0,w.compose)((0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor"),{gradients:n}=e("core/block-editor").getSettings();return{device:t()?.toLowerCase(),gradients:n.length>12?n.slice(0,12):n}})))((({attributes:e,setAttributes:t,updateObj:n,device:i,gradients:s})=>{const{alignment:a,icon:r,heading:c,subHeading:d,separator:u}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{initialOpen:!0,title:(0,x.__)("Wrapper/Container","dual-color-heading"),className:"bPlPanelBody",children:(0,l.jsx)(Tn,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","dual-color-heading"),(0,l.jsx)(_,{})]}),value:a[i],onChange:e=>n("alignment",e,i),options:w_,isIcon:!0})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Heading","dual-color-heading"),children:[(0,l.jsx)(Os,{className:"mb10",value:c.typography,onChange:e=>n("heading",e,"typography")}),["first","last"].map(((e,n)=>(0,l.jsxs)("div",{children:[(0,l.jsx)(y.PanelRow,{className:"mt20",children:(0,l.jsx)(Tn,{label:(0,x.__)(`${e[0].toUpperCase()+e.substring(1)} Color Type:`,"dual-color-heading"),value:c[e].colorType,onChange:n=>t({heading:{...c,[e]:{...c[e],colorType:n}}}),options:ze,size:"small"})}),"gradient"===c[e].colorType?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.GradientPicker,{value:c[e].gradient,onChange:n=>t({heading:{...c,[e]:{...c[e],gradient:n}}}),gradients:s})}):(0,l.jsx)(Ue,{label:(0,x.__)(`${e[0].toUpperCase()+e.substring(1)} Color:`,"dual-color-heading"),value:c[e].color,onChange:n=>t({heading:{...c,[e]:{...c[e],color:n}}}),defaultColor:"first"===e?o:""})]},n)))]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Sub Heading","dual-color-heading"),children:[(0,l.jsx)(Os,{className:"mb10",value:d.typography,onChange:e=>n("subHeading",e,"typography")}),(0,l.jsx)(Ue,{color:d.color,value:d.color,label:(0,x.__)("Color","dual-color-heading"),onChange:e=>n("subHeading",e,"color")})]}),u.show&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Separator","dual-color-heading"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Alignment:","dual-color-heading")}),(0,l.jsx)(Tn,{value:u.alignment,onChange:e=>n("separator",e,"alignment"),options:w_,isIcon:!0})]}),(0,l.jsx)(k,{className:"mt20",label:"Margin",resetValues:v_,values:u.margin,onChange:e=>n("separator",e,"margin")}),"line"===u.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Distance Between Lines","dual-color-heading"),labelPosition:"left",min:0,max:1e3,step:5,value:u.distance,onChange:e=>n("separator",e,"distance")}),(0,l.jsx)("br",{}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:C_,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Width","dual-color-heading"),labelPosition:"left",min:0,max:u[e.name].width.includes("%")?100:1e3,step:1,value:u[e.name].width,onChange:t=>n("separator",t,e.name,"width")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height","dual-color-heading"),labelPosition:"left",min:0,max:u[e.name].height.includes("%")?100:1e3,step:1,value:u[e.name].height,onChange:t=>n("separator",t,e.name,"height")}),(0,l.jsx)(Ye,{className:"mt20",label:"Color",value:u[e.name].color,onChange:t=>n("separator",t,e.name,"color")}),(0,l.jsx)(k,{className:"mt20",label:(0,x.__)("Border Radius","dual-color-heading"),values:u[e.name].bRadius,resetValues:k_,onChange:t=>n("separator",t,e.name,"bRadius")})]})})]}),"icon"===u.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{className:"mt20",value:u.iconSize, |
| 399 |
label:(0,x.__)("Icon Size","dual-color-heading"),min:0,max:300,step:1,onChange:e=>n("separator",e,"iconSize")}),(0,l.jsx)(Ue,{label:"Icon Color",color:u.iconColor,value:u.iconColor,onChange:e=>n("separator",e,"iconColor")})]})]}),r.show&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Icon Style","dual-color-heading"),children:[(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Icon Size","dual-color-heading"),value:r.size,min:10,max:550,onChange:e=>n("icon",e,"size")}),(0,l.jsx)(Ue,{label:"Icon Color",color:r.color,value:r.color,onChange:e=>n("icon",e,"color")})]})]})})),E_=e=>{const{attributes:t,setAttributes:n}=e,{advanced:o}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:"bBlocks"})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:j_,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(N_,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(L_,{...e})}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:o,onChange:e=>n({advanced:e}),isPremium:e.isPremium})]})})]})};Nl(h_.name)&&(0,p.registerBlockType)(h_,{icon:mr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i=fe(t,n),s=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(E_,{attributes:t,setAttributes:n,updateObj:i,isPremium:s}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(x_,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(f_,{attributes:t})})]})]})}});const P_=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/emoji-stack-separator","version":"0.1.0","title":"Emoji Stack Separator","category":"bBlocks","textdomain":"b-blocks","description":"A full-width emoji stack separator with customizable emoji and height","example":{"attributes":{"emoji":"🤗","height":192,"align":"full","emojiSize":"medium","density":"normal","animationStyle":"none"}},"attributes":{"emoji":{"type":"string","default":"🤗"},"height":{"type":"string","default":"192px"},"align":{"type":"string","default":"full"},"emojiSize":{"type":"string","default":"medium"},"density":{"type":"string","default":"normal"},"animationStyle":{"type":"string","default":"none"},"margin":{"type":"object","default":{}},"padding":{"type":"object","default":{}},"background":{"type":"object","default":{}},"border":{"type":"object","default":{}},"borderRadius":{"type":"object","default":{}}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),A_=({attributes:e})=>{const{emoji:t,height:n,align:o,emojiSize:i,density:s,animationStyle:a}=e,r=(0,m.useRef)(null);(0,m.useEffect)((()=>{if(r.current){const e=setTimeout((()=>{c(r.current,t,n,i,s)}),50);return()=>clearTimeout(e)}}),[t,n,o,i,s]);const c=(e,t,n,o,i)=>{e.innerHTML="";const s=(e=>{const t={small:{fontSize:2.5,overlap:-1},medium:{fontSize:3.75,overlap:-1.4},large:{fontSize:5,overlap:-1.8},xlarge:{fontSize:6.5,overlap:-2.3}};return t[e]||t.medium})(o),a=(e=>{const t={sparse:{overlapFactor:.5,rowMargin:-2,emojisExtra:2},normal:{overlapFactor:.65,rowMargin:-3,emojisExtra:4},dense:{overlapFactor:.75,rowMargin:-3.5,emojisExtra:6}};return t[e]||t.normal})(i),r=e.offsetWidth,l=Math.ceil(r/(60*a.overlapFactor))+a.emojisExtra;for(let n=0;n<4;n++){const o=document.createElement("div");o.className="b-blocks-emoji-stack-iemoji-row",n>0&&(o.style.marginTop=`${a.rowMargin}rem`);for(let e=0;e<l;e++){const n=document.createElement("span");n.textContent=t,n.className="b-blocks-emoji-stack-item";const i=60*Math.random()-30,a=20*Math.random()-10;n.style.fontSize=`${s.fontSize}rem`,n.style.marginRight=`${s.overlap}rem`,n.style.setProperty("--b-blocks-emoji-stack-separator-rotation",`${i}deg`),n.style.setProperty("--b-blocks-emoji-stack-separator-index",e),n.style.transform=`rotate(${i}deg) translateY(${a}px)`,o.appendChild(n)}e.appendChild(o)}};return(0,l.jsx)("div",{className:"b-blocks-emoji-stack-separator-container "+(a?`b-blocks-emoji-stack-separator-animation-${a}`:""),children:(0,l.jsx)("div",{ref:r,className:"b-blocks-emoji-stack-container"})})},B_=({attributes:e,setAttributes:t})=>{const{emoji:n,emojiSize:o,density:i,animationStyle:s}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Emoji Stack Settings","b-blocks"),children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Emoji","b-blocks"),value:n,onChange:e=>{const n=Array.from(e)[0];t({emoji:n})},help:(0,x.__)("Enter any emoji character","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Emoji Size","b-blocks"),value:o,options:[{label:(0,x.__)("Small","b-blocks"),value:"small"},{label:(0,x.__)("Medium","b-blocks"),value:"medium"},{label:(0,x.__)("Large","b-blocks"),value:"large"},{label:(0,x.__)("Extra Large","b-blocks"),value:"xlarge"}],onChange:e=>t({emojiSize:e}),help:(0,x.__)("Adjust the size of each emoji","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Stack Density","b-blocks"),value:i,options:[{label:(0,x.__)("Sparse","b-blocks"),value:"sparse"},{label:(0,x.__)("Normal","b-blocks"),value:"normal"},{label:(0,x.__)("Dense","b-blocks"),value:"dense"}],onChange:e=>t({density:e}),help:(0,x.__)("Control how tightly packed the emojis are","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Hover Animation","b-blocks"),value:s,options:[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce"},{label:(0,x.__)("Rotate","b-blocks"),value:"rotate"},{label:(0,x.__)("Wave","b-blocks"),value:"wave"}],onChange:e=>t({animationStyle:e}),help:(0,x.__)("Add interactive hover effects to emojis","b-blocks")})]})})},I_=({attributes:e,setAttributes:t})=>{const{padding:n,margin:o,background:i,height:s,border:a,borderRadius:r}=e;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Emoji Container","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height","b-blocks"),value:s,onChange:e=>t({height:e}),step:8}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:n,onChange:e=>t({padding:e})}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Margin","b-blocks"),values:o,onChange:e=>t({margin:e})}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i,onChange:e=>t({background:e})}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:a,onChange:e=>t({border:e})}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:r,onChange:e=>t({borderRadius:e})})]})},O_=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],R_=e=>(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:O_,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(B_,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(I_,{...e})})]})})}),z_=({attributes:e,id:t})=>{const{background:n,height:o,padding:i,margin:s,border:a,borderRadius:r}=e,c=`#${t} .b-blocks-emoji-stack-separator-container`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n ${c}{\n ${oa(n)}\n ${na("height",o)}\n ${na("padding",ha(i))}\n ${na("margin",ha(s))}\n ${sa(a)}\n ${na("border-radius",ha(r))}\n }\n `}})};Nl(P_.name)&&(0,p.registerBlockType)(P_,{icon:Yr,edit:e=>{const{attributes:t,clientId:n}=e,{align:o}=t,i=(0,h.useBlockProps)({className:`align${o}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(R_,{...e}),(0, |
| 400 |
l.jsx)(z_,{attributes:t,id:`block-${n}`}),(0,l.jsx)("div",{...i,children:(0,l.jsx)(A_,{attributes:t})})]})}}) |
| 401 |
;const D_=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/event-card","title":"Event Card","category":"bBlocks","description":"A single event announcement card with title, date/time, location, description, and a ticket CTA. Optionally outputs schema.org Event JSON-LD for Google rich results.","keywords":["event","schema","jsonld","calendar","webinar","workshop","rich results","tickets"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"content":{"type":"object","default":{"eventName":"Event Name","eventDescription":"","titleTag":"h3"}},"image":{"type":"object","default":{"id":0,"url":"","alt":"","border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"datetime":{"type":"object","default":{"startDate":"","startTime":"","endDate":"","endTime":"","timezone":"UTC","status":"EventScheduled"}},"location":{"type":"object","default":{"isVirtual":false,"virtualUrl":"","venueName":"","venueAddress":"","venueCity":"","venueCountry":"US","color":"","iconColor":"","typo":{}}},"organizer":{"type":"object","default":{"name":"","url":"","show":true,"color":"","iconColor":"","typo":{}}},"link":{"type":"object","default":{"label":"Get Tickets","url":"","newTab":true}},"cta":{"type":"object","default":{"showButton":true,"bg":"#146EF5","text":"#ffffff","hoverBg":"#0040E3","fontSize":"15px","borderRadius":6,"transition":0.3,"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"schema":{"type":"object","default":{"show":true}},"status":{"type":"object","default":{"show":true,"color":"","bg":{"type":"solid","color":""},"typo":{},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"card":{"type":"object","default":{"style":"default","alignment":"left","bg":"#ffffff","maxWidth":"640px","showDateBadge":true}},"badge":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"typo":{},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"title":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"22px"},"fontWeight":"700"},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"meta":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"14px"}},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"description":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"15px"}},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"24px","right":"28px","bottom":"24px","left":"28px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"10px","right":"10px","bottom":"10px","left":"10px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"7px","spreed":"","color":"rgba(0, 0, 0, 0.08)","isInset":false},{"hOffset":"0px","vOffset":"8px","blur":"24px","spreed":"0px","color":"rgba(0, 0, 0, 0.06)","isInset":false}],"border":{"top":{"color":"#146ef5","style":"solid","width":"5px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),F_=(e,t)=>e?"object"==typeof e&&e[t]?ha(e[t]):"desktop"===t&&"object"==typeof e&&("top"in e||"right"in e||"bottom"in e||"left"in e)?ha(e):"":"",H_=(e,t)=>e?"object"==typeof e&&e[t]?ia(e[t]):"desktop"===t?ia(e):"":"",W_=({attributes:e,id:o,isBackend:i=!1})=>{ |
| 402 |
const{card:s={},badge:a={},cta:r={},title:c={},meta:d={},description:u={},location:p={},organizer:h={},status:g={},image:m={},advanced:b={}}=e,{bg:f,maxWidth:x}=s,{color:y,iconColor:v,typo:k={}}=p,{color:w,iconColor:_,typo:C={}}=h,j=r.color||r.text,$=r.hoverColor||r.hoverText||j,S="object"==typeof r.bg?oa(r.bg):na("background-color",r.bg||"#146EF5"),T="object"==typeof r.hoverBg?oa(r.hoverBg):na("background-color",r.hoverBg||"#0040E3"),M=sa(r.border)||(r.border?H_(r.border,"desktop"):r.borderRadius?`border-radius: ${parseInt(r.borderRadius,10)||0}px;`:""),N=na("padding",F_(r.padding,"desktop")),L=na("margin",F_(r.margin,"desktop")),E=na("border-radius",F_(r.bRadius,"desktop")),P="0px"===x?"100%":x||"640px",A=`#${o} .b-blocks-event-card`,B=`#${o} .b-blocks-event-card-inner`,I=`#${o} .b-blocks-event-card-badge`,O=`#${o} .b-blocks-event-card-title`,R=`#${o} .b-blocks-event-card-meta`,z=`#${o} .b-blocks-event-card-description`,D=`#${o} .b-blocks-event-card-status`,F=`#${o} .b-blocks-event-card-cover img`,H=`#${o} .b-blocks-event-card-meta-location`,W=`#${o} .b-blocks-event-card-meta-organizer`,U=`#${o} .b-blocks-event-card-btn`,G=(e,t={})=>`\n\t\t${e}{\n\t\t\t${na("color",t.color)}\n\t\t\t${oa(t.bg)}\n\t\t\t${sa(t.border)||H_(t.border,"desktop")}\n\t\t\t${na("border-radius",F_(t.bRadius,"desktop"))}\n\t\t\t${na("padding",F_(t.padding,"desktop"))}\n\t\t\t${na("margin",F_(t.margin,"desktop"))}\n\t\t}\n\t\t${pa(e,t.typo||{}).styles}\n\t`,V=(e,t={},n="desktop")=>{const o=F_(t.padding,n),i=F_(t.margin,n),s=F_(t.bRadius,n),a=H_(t.border,n);return o||i||s||a?`\n\t\t\t${e}{\n\t\t\t\t${na("padding",o)}\n\t\t\t\t${na("margin",i)}\n\t\t\t\t${na("border-radius",s)}\n\t\t\t\t${a}\n\t\t\t}\n\t\t`:""};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${pa("",a.typo).googleFontLink}\n\t\t\t${pa("",c.typo).googleFontLink}\n\t\t\t${pa("",d.typo).googleFontLink}\n\t\t\t${pa("",u.typo).googleFontLink}\n\t\t\t${pa("",g.typo).googleFontLink}\n\t\t\t${pa("",r.typo).googleFontLink}\n\t\t\t${A}{ max-width: ${P}; }\n\t\t\t${B}{ ${na("background-color",f)} }\n\t\t\t${G(I,a)}\n\t\t\t${U}{\n\t\t\t\t${na("color",j)}\n\t\t\t\t${S}\n\t\t\t\t${M}\n\t\t\t\t${E}\n\t\t\t\t${N}\n\t\t\t\t${L}\n\t\t\t\ttransition: all ${r.transition??.3}s ease-in-out;\n\t\t\t\t${!r.typo?.fontSize&&r.fontSize?na("font-size",r.fontSize):""}\n\t\t\t}\n\t\t\t${pa(U,r.typo||{}).styles}\n\t\t\t${U}:hover, ${U}:focus{\n\t\t\t\t${T}\n\t\t\t\t${na("color",$)}\n\t\t\t}\n\t\t\t${G(O,c)}\n\t\t\t${G(R,d)}\n\t\t\t${G(z,u)}\n\t\t\t${G(D,g)}\n\t\t\t${G(F,m)}\n\t\t\t${pa("",k).googleFontLink}\n\t\t\t${pa(H,k).styles}\n\t\t\t${H}{ ${na("color",y)} }\n\t\t\t${H} .b-blocks-event-card-meta-icon{ ${na("color",v)} }\n\t\t\t${pa("",C).googleFontLink}\n\t\t\t${pa(W,C).styles}\n\t\t\t${W}{ ${na("color",w)} }\n\t\t\t${W} .b-blocks-event-card-meta-icon{ ${na("color",_)} }\n\t\t\t${t}{\n\t\t\t\t${V(I,a,"tablet")}\n\t\t\t\t${V(O,c,"tablet")}\n\t\t\t\t${V(R,d,"tablet")}\n\t\t\t\t${V(z,u,"tablet")}\n\t\t\t\t${V(D,g,"tablet")}\n\t\t\t\t${V(F,m,"tablet")}\n\t\t\t\t${V(U,r,"tablet")}\n\t\t\t}\n\t\t\t${n}{\n\t\t\t\t${V(I,a,"mobile")}\n\t\t\t\t${V(O,c,"mobile")}\n\t\t\t\t${V(R,d,"mobile")}\n\t\t\t\t${V(z,u,"mobile")}\n\t\t\t\t${V(D,g,"mobile")}\n\t\t\t\t${V(F,m,"mobile")}\n\t\t\t\t${V(U,r,"mobile")}\n\t\t\t}\n\t\t\t${_a(o,b,i)}\n\t\t\t`.replace(/\s+/g," ").trim()}})},U_=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],G_=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],V_={top:"",right:"",bottom:"",left:""},q_=["UTC","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","America/Toronto","America/Sao_Paulo","America/Mexico_City","Europe/London","Europe/Paris","Europe/Berlin","Europe/Madrid","Europe/Rome","Europe/Amsterdam","Europe/Moscow","Africa/Cairo","Africa/Johannesburg","Asia/Dubai","Asia/Kolkata","Asia/Bangkok","Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Tokyo","Asia/Seoul","Australia/Sydney","Australia/Perth","Pacific/Auckland"],Y_=({attributes:e,setAttributes:t,updateObj:n})=>{const{image:o={},datetime:i={},location:s={},organizer:a={},link:r={},cta:c={}}=e,{id:d,url:u,alt:p}=o,{startDate:h,startTime:g,endDate:m,endTime:b,timezone:f,status:k}=i,{isVirtual:w,virtualUrl:_,venueName:C,venueAddress:j,venueCity:$,venueCountry:S}=s,{label:T,url:M,newTab:N}=r,{showButton:L=!0}=c,E="_custom"===f||f&&!q_.includes(f),P=E?"_custom":f||"UTC";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Event Details","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("p",{style:{marginTop:0,fontStyle:"italic",opacity:.75},children:(0,x.__)("Edit the event name and description directly on the card. Set the heading level (H2–H4) from the block toolbar.","b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Start Date","b-blocks"),type:"date",value:h||"",onChange:e=>n("datetime",e,"startDate"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Start Time","b-blocks"),type:"time",value:g||"",onChange:e=>n("datetime",e,"startTime"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("End Date (optional)","b-blocks"),type:"date",value:m||"",onChange:e=>n("datetime",e,"endDate"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("End Time (optional)","b-blocks"),type:"time",value:b||"",onChange:e=>n("datetime",e,"endTime"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Timezone","b-blocks"),value:P,options:[...q_.map((e=>({label:e,value:e}))),{label:(0,x.__)("Custom…","b-blocks"),value:"_custom"}],onChange:e=>n("datetime","_custom"===e?"":e,"timezone"),__nextHasNoMarginBottom:!0}),E&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Custom timezone","b-blocks"),value:"_custom"===f?"":f||"",onChange:e=>n("datetime",e,"timezone"),placeholder:"Continent/City",help:(0,x.__)("Use a valid IANA timezone name, e.g. America/New_York.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Event Status","b-blocks"),value:k||"EventScheduled",options:[{label:(0,x.__)("Scheduled","b-blocks"),value:"EventScheduled"},{label:(0,x.__)("Cancelled","b-blocks"),value:"EventCancelled"},{label:(0,x.__)("Postponed","b-blocks"),value:"EventPostponed"},{label:(0,x.__)("Moved Online","b-blocks"),value:"EventMovedOnline"}],onChange:e=>n("datetime",e,"status"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Virtual / Online event","b-blocks"),checked:!!w,onChange:e=>n("location",e,"isVirtual")}),w&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Virtual Event URL","b-blocks"),type:"url",value:_||"",onChange:e=>n("location",e,"virtualUrl"),placeholder:"https://example.com/webinar",__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{children:(0,x.__)("Cover Image:","b-blocks")}),(0,l.jsx)(we,{label:u?(0,x.__)("Replace Image","b-blocks"):(0,x.__)("Select Image","b-blocks"),value:{id:d,url:u,alt:p},types:["image"],height:"100%",width:"100%",onChange:e=>t({image:{...o,id:e?.id||0,url:e?.url||"",alt:e?.alt||p||""}})}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Alt Text","b-blocks"),value:p||"",onChange:e=>n("image",e,"alt"),help:(0,x.__)("Describes the image; leave empty for a decorative image.","b-blocks"),__nextHasNoMarginBottom:!0})]}),!w&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Location","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Venue Name","b-blocks"),value:C||"",onChange:e=>n("location",e,"venueName"),placeholder:(0,x.__)("e.g. City Hall Auditorium","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Address","b-blocks"),value:j||"",onChange:e=>n("location",e,"venueAddress"),__nextHasNoMarginBottom:!0 |
| 403 |
}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("City","b-blocks"),value:$||"",onChange:e=>n("location",e,"venueCity"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Country (ISO 2-letter)","b-blocks"),value:S||"",onChange:e=>n("location",e,"venueCountry"),placeholder:"US",help:(0,x.__)("Two-letter ISO country code used in schema markup.","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Organizer","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Organizer Name","b-blocks"),value:a.name||"",onChange:e=>n("organizer",e,"name"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Organizer URL","b-blocks"),type:"url",value:a.url||"",onChange:e=>n("organizer",e,"url"),placeholder:"https://example.com",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show organizer on card","b-blocks"),checked:!!a.show,onChange:e=>n("organizer",e,"show")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("CTA Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Button","b-blocks"),checked:!1!==L,onChange:e=>n("cta",e,"showButton")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Button Label","b-blocks"),value:T||"",onChange:e=>n("link",e,"label"),placeholder:(0,x.__)("Get Tickets","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Button URL","b-blocks"),type:"url",value:M||"",onChange:e=>n("link",e,"url"),placeholder:"https://example.com/register",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Open in new tab","b-blocks"),checked:!!N,onChange:e=>n("link",e,"newTab")})]})]})},K_=(e,t="desktop")=>e?"object"==typeof e&&e[t]?e[t]:"object"==typeof e&&("top"in e||"right"in e||"bottom"in e||"left"in e)&&"desktop"===t?e:V_:V_,Q_=({attributes:e,updateObj:t,device:n="desktop"})=>{const[o,i]=(0,Qs.useState)("normal"),{card:s={},badge:a={},cta:r={},title:c={},meta:d={},description:u={},location:p={},organizer:h={},status:g={},image:m={}}=e,{showDateBadge:b}=s,{color:f,iconColor:v,typo:w={}}=p,{color:C,iconColor:j,typo:$={}}=h,S=(e,o,i,s="")=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:e,initialOpen:!1,children:[s&&(0,l.jsx)(y.ToggleControl,{label:s,checked:!1!==i.show,onChange:e=>t(o,e,"show")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i.color||"",onChange:e=>t(o,e,"color"),defaultColor:""}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:i.bg,onChange:e=>t(o,e,"bg")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typo||{},onChange:e=>t(o,e,"typo")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:i.border,onChange:e=>t(o,e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:G_,values:K_(i.bRadius,n),resetValues:V_,onChange:e=>t(o,e,"bRadius",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:G_,values:K_(i.padding,n),resetValues:V_,onChange:e=>t(o,e,"padding",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:G_,values:K_(i.margin,n),resetValues:V_,onChange:e=>t(o,e,"margin",n)})]});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Badge","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show date badge","b-blocks"),checked:!!b,onChange:e=>t("card",e,"showDateBadge")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:a.color||"",onChange:e=>t("badge",e,"color"),defaultColor:""}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:a.bg,onChange:e=>t("badge",e,"bg")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:a.typo||{},onChange:e=>t("badge",e,"typo")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>t("badge",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:G_,values:K_(a.bRadius,n),resetValues:V_,onChange:e=>t("badge",e,"bRadius",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:G_,values:K_(a.padding,n),resetValues:V_,onChange:e=>t("badge",e,"padding",n)})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:m.border,onChange:e=>t("image",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:G_,values:K_(m.bRadius,n),resetValues:V_,onChange:e=>t("image",e,"bRadius",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:G_,values:K_(m.padding,n),resetValues:V_,onChange:e=>t("image",e,"padding",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:G_,values:K_(m.margin,n),resetValues:V_,onChange:e=>t("image",e,"margin",n)})]}),S((0,x.__)("Title","b-blocks"),"title",c),S((0,x.__)("Meta","b-blocks"),"meta",d),S((0,x.__)("Description","b-blocks"),"description",u),S((0,x.__)("Event Status","b-blocks"),"status",g,(0,x.__)("Show event status","b-blocks")),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Location","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:f||"",onChange:e=>t("location",e,"color"),defaultColor:""}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:v||"",onChange:e=>t("location",e,"iconColor"),defaultColor:""}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:w,onChange:e=>t("location",e,"typo")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Organizer","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:C||"",onChange:e=>t("organizer",e,"color"),defaultColor:""}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:j||"",onChange:e=>t("organizer",e,"iconColor"),defaultColor:""}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:$,onChange:e=>t("organizer",e,"typo")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("CTA Button Style","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:r.typo||{},onChange:e=>t("cta",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),"normal"===o?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:r.color||r.text||"",onChange:e=>t("cta",e,"color"),defaultColor:""}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:r.bg,onChange:e=>t("cta",e,"bg")})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Hover Color","b-blocks"),value:r.hoverColor||r.hoverText||"",onChange:e=>t("cta",e,"hoverColor"),defaultColor:""}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Hover Background","b-blocks"),value:r.hoverBg,onChange:e=>t("cta",e,"hoverBg")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (s)","b-blocks"),value:r.transition??.3,min:0,max:5,step:.05, |
| 404 |
onChange:e=>t("cta",e,"transition")})]}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:r.border,onChange:e=>t("cta",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:G_,values:K_(r.bRadius,n),resetValues:V_,onChange:e=>t("cta",e,"bRadius",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:G_,values:K_(r.padding,n),resetValues:V_,onChange:e=>t("cta",e,"padding",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:G_,values:K_(r.margin,n),resetValues:V_,onChange:e=>t("cta",e,"margin",n)})]})]})},Z_=e=>{const{attributes:t,setAttributes:n}=e;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:U_,onSelect:me,children:o=>(0,l.jsxs)(l.Fragment,{children:["general"===o.name&&(0,l.jsx)(Y_,{...e}),"style"===o.name&&(0,l.jsx)(Q_,{...e}),"advanced"===o.name&&(0,l.jsx)(Qt,{advanced:t.advanced,onChange:e=>n({advanced:e})})]})})})},X_=()=>[(0,x.__)("Jan","b-blocks"),(0,x.__)("Feb","b-blocks"),(0,x.__)("Mar","b-blocks"),(0,x.__)("Apr","b-blocks"),(0,x.__)("May","b-blocks"),(0,x.__)("Jun","b-blocks"),(0,x.__)("Jul","b-blocks"),(0,x.__)("Aug","b-blocks"),(0,x.__)("Sep","b-blocks"),(0,x.__)("Oct","b-blocks"),(0,x.__)("Nov","b-blocks"),(0,x.__)("Dec","b-blocks")],J_=(e,t)=>{if(!e)return"";const n=e.split("-");if(3!==n.length)return e;const o=parseInt(n[1],10)-1,i=parseInt(n[2],10);let s=`${X_()[o]||""} ${i}, ${n[0]}`;return t&&(s+=` · ${t}`),s.trim()},eC=[{tag:"h2",label:(0,x.__)("Heading 2","b-blocks")},{tag:"h3",label:(0,x.__)("Heading 3","b-blocks")},{tag:"h4",label:(0,x.__)("Heading 4","b-blocks")}];Nl(D_.name)&&(0,p.registerBlockType)(D_,{icon:$l,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{content:i={},image:s={},datetime:a={},location:r={},organizer:c={},link:d={},card:u={},cta:p={},status:g={}}=t,m=(0,f.useSelect)((e=>e("core/editor")?.getDeviceType()?.toLowerCase()||"desktop"),[]),{url:b,alt:v}=s,{eventName:k,eventDescription:w,titleTag:_}=i,{startDate:C,startTime:j,endDate:$,endTime:S,status:T}=a,{isVirtual:M,venueName:N,venueAddress:L,venueCity:E,venueCountry:P}=r,{label:A}=d,{showButton:B=!0}=p,{style:I,alignment:O,showDateBadge:R=!0}=u,{show:z=!0}=g,D=fe(t,n),F=["h2","h3","h4"].includes(_)?_:"h3",H=["left","center","right"].includes(O)?O:"left",W=["default","outlined","flat"].includes(I)?I:"default",U=(e=>({EventCancelled:{label:(0,x.__)("Cancelled","b-blocks"),cls:"is-cancelled"},EventPostponed:{label:(0,x.__)("Postponed","b-blocks"),cls:"is-postponed"},EventMovedOnline:{label:(0,x.__)("Moved Online","b-blocks"),cls:"is-moved-online"}}[e]||null))(T),G=["b-blocks-event-card",`b-blocks-event-card--${W}`,`b-blocks-event-card--align-${H}`,M?"is-virtual":"",U?U.cls:""].filter(Boolean).join(" "),V=(0,h.useBlockProps)({id:`block-${o}`}),q=(e=>{const t=(e||(new Date).toISOString().split("T")[0]).split("-");if(3!==t.length)return{month:"JAN",day:"1"};const n=parseInt(t[1],10)-1,o=String(parseInt(t[2],10));return{month:X_()[n]||"JAN",day:o}})(C),Y=J_(C,j),K=J_($,S),Q=(({isVirtual:e,venueName:t,venueAddress:n,venueCity:o})=>e?(0,x.__)("Online / Virtual","b-blocks"):[t,n,o].filter(Boolean).join(", "))({isVirtual:M,venueName:N,venueAddress:L,venueCity:E}),Z=F;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Z_,{...e,updateObj:D,device:m}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.AlignmentControl,{value:H,onChange:e=>D("card",e||"left","alignment")}),(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(y.ToolbarDropdownMenu,{icon:"heading",label:(0,x.__)("Title heading level","b-blocks"),controls:eC.map((e=>({title:e.label,isActive:F===e.tag,onClick:()=>D("content",e.tag,"titleTag")})))})})]}),(0,l.jsxs)("div",{...V,children:[(0,l.jsx)(W_,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:G,children:(0,l.jsxs)("article",{className:"b-blocks-event-card-inner",children:[b&&(0,l.jsx)("div",{className:"b-blocks-event-card-cover",children:(0,l.jsx)("img",{src:b,alt:v||""})}),(0,l.jsxs)("div",{className:"b-blocks-event-card-header",children:[R&&q.day&&(0,l.jsxs)("div",{className:"b-blocks-event-card-badge","aria-hidden":"true",children:[(0,l.jsx)("span",{className:"b-blocks-event-card-badge-month",children:q.month}),(0,l.jsx)("span",{className:"b-blocks-event-card-badge-day",children:q.day})]}),(0,l.jsxs)("div",{className:"b-blocks-event-card-heading",children:[(0,l.jsxs)(Z,{className:"b-blocks-event-card-title",children:[(0,l.jsx)(h.RichText,{tagName:"span",value:k||"",onChange:e=>D("content",e,"eventName"),placeholder:(0,x.__)("Event Name","b-blocks"),allowedFormats:[]}),!1!==z&&U&&(0,l.jsx)("span",{className:"b-blocks-event-card-status",contentEditable:!1,children:U.label})]}),Y&&(0,l.jsxs)("p",{className:"b-blocks-event-card-meta b-blocks-event-card-meta-date",children:[(0,l.jsx)("svg",{className:"b-blocks-event-card-meta-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{fill:"currentColor",d:"M7 2v2H5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2H7Zm12 7v10H5V9h14Z"})}),(0,l.jsx)("time",{children:Y}),K&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"b-blocks-event-card-dash","aria-hidden":"true",children:" – "}),(0,l.jsx)("time",{children:K})]})]})]})]}),Q&&(0,l.jsxs)("address",{className:"b-blocks-event-card-meta b-blocks-event-card-meta-location",children:[(0,l.jsx)("svg",{className:"b-blocks-event-card-meta-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{fill:"currentColor",d:"M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5Z"})}),Q,!M&&P&&(0,l.jsx)("span",{className:"b-blocks-event-card-country",children:P})]}),c.show&&c.name&&(0,l.jsxs)("p",{className:"b-blocks-event-card-meta b-blocks-event-card-meta-organizer",children:[(0,l.jsx)("svg",{className:"b-blocks-event-card-meta-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{fill:"currentColor",d:"M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-5 0-9 2.5-9 5.5V22h18v-2.5c0-3-4-5.5-9-5.5Z"})}),(0,l.jsx)("span",{className:"b-blocks-event-card-organizer-label",children:(0,x.__)("By","b-blocks")})," ",c.name]}),(0,l.jsx)(h.RichText,{tagName:"div",className:"b-blocks-event-card-description",value:w||"",onChange:e=>D("content",e,"eventDescription"),placeholder:(0,x.__)("Optional event description…","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"]}),B&&(0,l.jsx)("div",{className:"b-blocks-event-card-cta",children:(0,l.jsx)("span",{className:"b-blocks-event-card-btn",children:A||(0,x.__)("Get Tickets","b-blocks")})})]})})})]})]})},save:()=>null}) |
| 405 |
;const tC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/expand-content","title":"Expand Content","description":"Wrap any inner blocks in a collapsible reveal. The first portion is visible behind a fade overlay and a Show More / Show Less button toggles the rest. Accessible and reduced-motion aware.","category":"bBlocks","keywords":["expand","read more","show more","collapse","truncate"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"buttons":{"type":"object","default":{"showMore":"Show More","showLess":"Show Less","isShowCollapse":true,"persistState":false,"alignment":"center"}},"layout":{"type":"object","default":{"previewHeight":"200px","fadeHeight":"80px","fadeColor":"#ffffff"}},"styles":{"type":"object","default":{"buttons":{"showMore":{"padding":{"top":"","right":"","bottom":"","left":""},"border":{},"radius":{},"color":"#ffffff","bg":{"color":"#0073aa"},"typo":{"fontSize":{"desktop":"","tablet":"","mobile":""}}},"showLess":{"padding":{"top":"","right":"","bottom":"","left":""},"border":{},"radius":{},"color":"#ffffff","bg":{"color":"#0073aa"},"typo":{"fontSize":{"desktop":"","tablet":"","mobile":""}}}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b000","isInset":false}],"border":{"color":"#dddddd","style":"solid","width":"1px"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}},"animationDuration":{"type":"number","default":300}},"supports":{"align":["wide","full"],"html":false,"className":true,"customClassName":true},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),nC=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],oC=[{label:"Left",value:"left",icon:"align-left"},{label:"Center",value:"center",icon:"align-center"},{label:"Right",value:"right",icon:"align-right"}],iC=e=>{const{attributes:t,updateObj:n}=e,{buttons:o}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Content","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Show More Label","b-blocks"),value:o?.showMore,onChange:e=>n("buttons",e,"showMore"),placeholder:(0,x.__)("Show More","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Show Less Label","b-blocks"),value:o?.showLess,onChange:e=>n("buttons",e,"showLess"),placeholder:(0,x.__)("Show Less","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show collapse button after expanding","b-blocks"),checked:o.isShowCollapse,onChange:e=>n("buttons",e,"isShowCollapse"),help:(0,x.__)("When disabled, visitors can expand once and the content stays open.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Remember state for the visitor","b-blocks"),checked:o.persistState,onChange:e=>n("buttons",e,"persistState"),help:(0,x.__)("Saves the open / closed state in sessionStorage so it persists across page navigation in the same tab.","b-blocks")})]})},sC=e=>{const{attributes:t,updateObj:n}=e,{layout:o,buttons:i}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Collapsed Preview Height (px)","b-blocks"),value:o?.previewHeight,onChange:e=>n("layout",e,"previewHeight"),help:(0,x.__)("How much of the content stays visible before the Show More button.","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Fade Overlay Height (px)","b-blocks"),value:o?.fadeHeight,onChange:e=>n("layout",e,"fadeHeight"),help:(0,x.__)("Set to 0 to hide the fade overlay entirely.","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Fade Color:","b-blocks"),value:o?.fadeColor,onChange:e=>n("layout",e,"fadeColor"),defaultColor:"#ffffff"}),(0,l.jsx)("p",{className:"components-base-control__help",style:{marginTop:"-8px"},children:(0,x.__)("Match your page background color so the fade blends seamlessly.","b-blocks")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Align","b-blocks")}),(0,l.jsx)(Tn,{value:i.alignment,onChange:e=>n("buttons",e,"alignment"),options:oC,isIcon:!0,size:"default"})]})]})},aC=e=>{const{attributes:t,setAttributes:n}=e,{animationDuration:o}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(sC,{...e}),(0,l.jsx)(iC,{...e}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Behavior","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Animation Duration (ms)","b-blocks"),value:o,onChange:e=>n({animationDuration:e}),min:0,max:1e3,step:50,help:(0,x.__)("Set to 0 to snap instantly. The animation is also disabled automatically when the visitor has prefers-reduced-motion enabled.","b-blocks")})})]})},rC=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{buttons:i}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Button Style","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsx)("p",{className:"mb10",children:(0,l.jsx)("b",{children:"Show More Button"})}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i.showMore.padding,onChange:e=>n("styles",e,"buttons","showMore","padding")}),(0,l.jsx)(An,{value:i.showMore.bg,onChange:e=>n("styles",e,"buttons","showMore","bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.showMore.color,onChange:e=>n("styles",e,"buttons","showMore","color")}),(0,l.jsx)(Os,{value:i.showMore.typo,onChange:e=>n("styles",e,"buttons","showMore","typo")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i.showMore.border,onChange:e=>n("styles",e,"buttons","showMore","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i.showMore.radius,onChange:e=>n("styles",e,"buttons","showMore","radius")}),(0,l.jsx)("p",{className:"mb10 mt10",children:(0,l.jsx)("b",{children:"Show Less Button"})}),(0, |
| 406 |
l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i.showLess.padding,onChange:e=>n("styles",e,"buttons","showLess","padding")}),(0,l.jsx)(An,{value:i.showLess.bg,onChange:e=>n("styles",e,"buttons","showLess","bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.showLess.color,onChange:e=>n("styles",e,"buttons","showLess","color")}),(0,l.jsx)(Os,{value:i.showLess.typo,onChange:e=>n("styles",e,"buttons","showLess","typo")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i.showLess.border,onChange:e=>n("styles",e,"buttons","showLess","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i.showLess.radius,onChange:e=>n("styles",e,"buttons","showLess","radius")})]})},lC=e=>{const{attributes:t,updateObj:n}=e,{advanced:o}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:nC,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(aC,{...e}),"style"===t.name&&(0,l.jsx)(rC,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:o,onChange:e=>n("advanced",e)})]})})})},cC=({attributes:e,id:t,isBackend:n=!1})=>{const{styles:o,layout:i,buttons:s,advanced:a,animationDuration:r}=e,{buttons:c}=o,d=Number.isFinite(r)?r:300,u=i.fadeColor||"#ffffff",p=`#${t} .b-blocks-expand-content-wrapper`,h=`${p} .b-blocks-expand-content-innerBlocks`,g=`${p} .b-blocks-expand-content-toggle-button-container`,m=`${g} .b-blocks-expand-content-toggle-button`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n ${pa("",c.showMore.typo).googleFontLink}\n ${pa(`${m}.is-showMore`,c.showMore.typo).styles}\n\n ${pa("",c.showLess.typo).googleFontLink}\n ${pa(`${m}.is-showLess`,c.showLess.typo).styles}\n\n ${h}{\n transition: max-height ${d}ms ease-in-out;\n }\n\n ${h}.is-clamped{\n ${na("max-height",i.previewHeight)}\n }\n\n ${h}.is-clamped::after{\n height: ${i.fadeHeight||"80px"};\n background: linear-gradient(to bottom, ${(e=>{const t=(e||"").trim(),n=t.match(/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i);if(n)return`rgba(${n[1]}, ${n[2]}, ${n[3]}, 0)`;let o=t.replace("#","");return/^[0-9a-fA-F]{3,4}$/.test(o)&&(o=o.split("").map((e=>e+e)).join("")),/^[0-9a-fA-F]{6,8}$/.test(o)?`rgba(${parseInt(o.slice(0,2),16)}, ${parseInt(o.slice(2,4),16)}, ${parseInt(o.slice(4,6),16)}, 0)`:"rgba(0, 0, 0, 0)"})(u)} 0%, ${u} 100%);\n }\n\n ${m}.is-showMore{\n ${na("padding",ha(c.showMore.padding))}\n ${oa(c.showMore.bg)}\n ${sa(c.showMore.border)}\n ${na("border-radius",ha(c.showMore.radius))}\n ${na("color",c.showMore.color)}\n }\n\n ${m}.is-showLess{\n ${na("padding",ha(c.showLess.padding))}\n ${oa(c.showLess.bg)}\n ${sa(c.showLess.border)}\n ${na("border-radius",ha(c.showLess.radius))}\n ${na("color",c.showLess.color)}\n }\n\n ${g}{\n ${na("justify-content",s.alignment)}\n }\n\n ${_a(t,a,n,!1)}\n\n `}})},dC=[["core/heading",{level:3,placeholder:(0,x.__)("Section heading...","b-blocks")}],["core/paragraph",{placeholder:(0,x.__)("Add the content that should always be visible here, then keep writing — anything past the preview height will be hidden behind a Show More button on the frontend.","b-blocks")}]];Nl(tC.name)&&(0,p.registerBlockType)(tC,{icon:hl,edit:({attributes:e,setAttributes:t,clientId:n})=>{const{buttons:o}=e,[i,s]=(0,Qs.useState)(!1),a=`block-${n}`,r=fe(e,t);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(lC,{attributes:e,setAttributes:t,updateObj:r}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(cC,{attributes:e,id:a,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"b-blocks-expand-content-wrapper",children:[(0,l.jsx)("div",{className:"b-blocks-expand-content-innerBlocks "+(i?"":"is-clamped"),children:(0,l.jsx)(h.InnerBlocks,{template:dC,templateLock:!1})}),(0,l.jsx)("div",{className:"b-blocks-expand-content-toggle-button-container",children:(0,l.jsx)("button",{type:"button",className:"b-blocks-expand-content-toggle-button "+(i?"is-showLess":"is-showMore"),"aria-disabled":"true",tabIndex:-1,onClick:()=>s((e=>!e)),children:i?o.showLess:o.showMore})})]})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})});const uC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/facebook-embed","version":"1.0.0","title":"Facebook Embed","category":"bBlocks","description":"Facebook Embed allows you to facebook posts, videos on your website or blog.","keywords":["facebook","embed","post"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"facebook":{"type":"object","default":{"alignment":"center","type":"post","url":{"post":"https://www.facebook.com/photo/?fbid=1113142977483877&set=a.520898976708283","video":"https://www.facebook.com/bPluginsLLC/videos/281067148325015"},"fullScreen":false,"autoPlay":false,"height":"100%","width":500,"caption":false,"fullPost":true}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","facebookEmbbed","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","facebookEmbbed"]}'),pC=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{ |
| 407 |
d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),hC=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),gC=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),mC=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],bC=[{label:"Post",value:"post"},{label:"Video",value:"video"}],fC=[{label:"Left",value:"left",icon:pC},{label:"Center",value:"center",icon:hC},{label:"Right",value:"right",icon:gC}],xC=({attributes:e,updateObj:t,facebookKey:n})=>{const{facebook:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Embed","b-blocks"),initialOpen:!0,children:[!n&&(0,l.jsxs)(y.Notice,{className:"mb10",status:"warning",isDismissible:!1,children:["Set your Facebook App ID in the ",(0,l.jsx)("a",{href:`${location.origin}/wp-admin/admin.php?page=b-blocks#/settings`,target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)("em",{children:"Settings"})})," to use this block."]}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Type","b-blocks"),labelPosition:"edge",value:o.type,onChange:e=>t("facebook",e,"type"),options:bC}),(0,l.jsx)(y.__experimentalInputControl,{className:"mt10",label:(0,x.__)("URL","b-blocks"),labelPosition:"edge",value:o.url[o.type],onChange:e=>t("facebook",e,"url",o.type)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Full Post","b-blocks"),checked:o.fullPost,onChange:e=>t("facebook",e,"fullPost")}),"video"===o.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Caption","b-blocks"),checked:o.caption,onChange:e=>t("facebook",e,"caption")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Full Screen","b-blocks"),checked:o.fullScreen,onChange:e=>t("facebook",e,"fullScreen")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Auto Play","b-blocks"),checked:o.autoPlay,onChange:e=>t("facebook",e,"autoPlay")})]}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Width","b-blocks"),labelPosition:"edge",value:o.width,onChange:e=>t("facebook",e,"width"),min:1,max:1200,step:5}),(0,l.jsx)(Tn,{className:"mt10",value:o.alignment,isIcon:!0,label:(0,x.__)("Alignment","b-blocks"),options:fC,onChange:e=>t("facebook",e,"alignment")})]})},yC=({attributes:e,updateObj:t,isPremium:n,facebookKey:o})=>{const{advanced:i}=e;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:mC,onSelect:me,children:s=>(0,l.jsxs)(l.Fragment,{children:["general"===s.name&&(0,l.jsx)(xC,{attributes:e,updateObj:t,facebookKey:o}),"advanced"===s.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>t("advanced",e),isPremium:n})]})})})},vC=({attributes:e,id:t})=>{const{advanced:n}=e;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${Ca(t,n)}\n\t`}})},kC=({attributes:e,facebookKey:t})=>{const{facebook:n}=e,o=`https://www.facebook.com/plugins/video.php?href=${encodeURIComponent(n.url?.video||"")}&width=${n.width||"500"}&show_text=${n.fullPost}&show_captions=${n.caption}&autoplay=${n.autoPlay}&appId=${t}`,i=`https://www.facebook.com/plugins/post.php?href=${encodeURIComponent(n.url?.post||"")}&width=${n.width||"500"}&show_text=${n.fullPost}&appId=${t}`;return(0,l.jsxs)("div",{className:`b-blocks-facebookEmbed-wrapper ${n.alignment}`,children:["video"===n.type&&(0,l.jsx)("div",{className:"fb-video-container",children:(0,l.jsx)("iframe",{src:o,width:n.width||"500",height:"auto",style:{border:"none",overflow:"hidden",width:"100%",minHeight:"315px"},scrolling:"no",frameBorder:"0",allowFullScreen:n.fullScreen,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"})}),"post"===n.type&&(0,l.jsx)("div",{className:"fb-post-container",children:(0,l.jsx)("iframe",{src:i,width:n.width||"500",height:"auto",style:{border:"none",overflow:"hidden",width:"100%",minHeight:"500px"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"})})]})};Nl(uC.name)&&(0,p.registerBlockType)(uC,{icon:br,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,[i,s]=(0,m.useState)(""),a=window.bBlocksCursorDataConfig?.nonce,{data:r,isLoading:c}=_d("bblocks_api_keys",{_wpnonce:a},!0),d=bBlocksPremiumChecker;(0,m.useEffect)((()=>{s(r?.facebook?.key)}),[r,c]);const u=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(yC,{attributes:t,updateObj:u,isPremium:d,facebookKey:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(vC,{attributes:t,id:`block-${o}`}),(0,l.jsx)(kC,{attributes:t,facebookKey:i})]})]})}}) |
| 408 |
;const wC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/facebook-page","version":"1.0.0","title":"Facebook Page","category":"bBlocks","description":"The Facebook Page Block allows you to embed your Social Media on your WordPress website.","keywords":["facebook","page","embed"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"facebook":{"type":"object","default":{"appId":"","link":"https://www.facebook.com/bPluginsLLC","layout":["timeline"],"smallHeader":false,"coverPhoto":true,"profilePhotos":true,"ctaButton":true,"width":340,"height":500,"align":"center"}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","facebookPage","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","facebookPage"]}'),_C=({attributes:e,facebookKey:t})=>{const{facebook:n}=e,o=`https://www.facebook.com/plugins/page.php?href=${encodeURIComponent(n.link)}&tabs=${n.layout?.join(",")||"timeline"}&width=${n.width}&height=${n.height}&small_header=${n.smallHeader}&adapt_container_width=true&hide_cover=${!n.coverPhoto}&show_facepile=${n.profilePhotos}&hide_cta=${n.ctaButton}&appId=${t}`;return(0,l.jsx)("div",{className:`bBlocks-fbPage-wrapper ${n.align}`,children:(0,l.jsx)("div",{children:(0,l.jsx)("iframe",{src:o,width:n.width,height:n.height,scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share",title:"Facebook Page"})})})},CC=({attributes:e,id:t})=>{const{advanced:n}=e;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:` \n\t\t\t${_a(t,n)}\n\t\t`}})},jC=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],$C=[{label:"Left",value:"left",icon:pC},{label:"Center",value:"center",icon:hC},{label:"Right",value:"right",icon:gC}],SC=e=>{const{attributes:t,updateObj:n,facebookKey:o}=e,{facebook:i}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Items","b-blocks"),children:[!o&&(0,l.jsxs)(y.Notice,{className:"mb10",status:"warning",isDismissible:!1,children:["Set your Facebook App ID in the ",(0,l.jsx)("a",{href:`${location.origin}/wp-admin/admin.php?page=b-blocks#/settings`,target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)("em",{children:"Settings"})})," to use this block."]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Link","social-media-page-block"),value:i.link,onChange:e=>n("facebook",e,"link")}),(0,l.jsx)(v,{children:(0,x.__)("Layout","social-media-page-block")}),(0,l.jsx)(Ft,{value:i.layout,options:[{label:"Timeline",value:"timeline"},{label:"Events",value:"events"},{label:"Messages",value:"messages"}],onChange:e=>n("facebook",e,"layout")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Small Header","social-media-page-block"),checked:i.smallHeader,value:i.smallHeader,onChange:e=>n("facebook",e,"smallHeader")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Cover Photo","social-media-page-block"),checked:i.coverPhoto,value:i.coverPhoto,onChange:e=>n("facebook",e,"coverPhoto")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Profile Photos","social-media-page-block"),checked:i.profilePhotos,value:i.profilePhotos,onChange:e=>n("facebook",e,"profilePhotos")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Width","social-media-page-block"),value:i.width,onChange:e=>n("facebook",e,"width"),min:0,max:1e3}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Height","social-media-page-block"),value:i.height,onChange:e=>n("facebook",e,"height"),min:0,max:1e3}),(0,l.jsx)(Tn,{className:"mt10",value:i.align,isIcon:!0,label:(0,x.__)("Alignment","b-blocks"),options:$C,onChange:e=>n("facebook",e,"align")})]})]})},TC=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:jC,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(SC,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})})};Nl(wC.name)&&(0,p.registerBlockType)(wC,{icon:fr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,[i,s]=(0,m.useState)(""),a=window.bBlocksCursorDataConfig?.nonce,{data:r,isLoading:c}=_d("bblocks_api_keys",{_wpnonce:a},!0),d=fe(t,n),u=bBlocksPremiumChecker;return(0,m.useEffect)((()=>{s(r?.facebook?.key)}),[r,c]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(TC,{attributes:t,setAttributes:n,updateObj:d,isPremium:u,facebookKey:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(CC,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)(_C,{attributes:t,facebookKey:i},JSON.stringify(t.facebook))]})]})}}) |
| 409 |
;const MC=JSON.parse('{"apiVersion":3,"name":"b-blocks/feature-boxes","title":"Feature Boxes","description":"Display Feature boxes section.","category":"bBlocks","keywords":["features","feature boxes","features section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"features":{"type":"array","default":[{"background":{"color":"#0000"},"isUpIcon":false,"icon":{"class":"fa-brands fa-wordpress","fontSize":120},"upIcon":{"id":null,"url":"","alt":"","title":""},"iconWidth":"120px","title":"Feature 1","titleColor":"#333","separator":{"width":"20%","height":"2px","style":"solid","color":"#bbb"},"desc":"This content area describes feature 1 descriptions or details.","descColor":"#333"},{"background":{"color":"#0000"},"isUpIcon":false,"icon":{"class":"fa-brands fa-wordpress","fontSize":120},"upIcon":{"id":null,"url":"","alt":"","title":""},"iconWidth":"120px","title":"Feature 2","titleColor":"#333","separator":{"width":"20%","height":"2px","style":"solid","color":"#bbb"},"desc":"This content area describes feature 2 descriptions or details.","descColor":"#333"},{"background":{"color":"#0000"},"isUpIcon":false,"icon":{"class":"fa-brands fa-wordpress","fontSize":120},"upIcon":{"id":null,"url":"","alt":"","title":""},"iconWidth":"120px","title":"Feature 3","titleColor":"#333","separator":{"width":"20%","height":"2px","style":"solid","color":"#bbb"},"desc":"This content area describes feature 3 descriptions or details.","descColor":"#333"}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"30px"},"rowGap":{"type":"string","default":"30px"},"textAlign":{"type":"string","default":"center"},"padding":{"type":"object","default":{"vertical":"50px","horizontal":"20px"}},"isIcon":{"type":"boolean","default":true},"iconMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"isTitle":{"type":"boolean","default":true},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"20px","tablet":"18px","mobile":"16px"},"fontWeight":600}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isSep":{"type":"boolean","default":true},"sepMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px","tablet":"15px","mobile":"15px"}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),NC=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updateFeature:n,activeIndex:o,setActiveIndex:i,device:s})=>{const{features:a=[],columns:r,columnGap:c,rowGap:d,textAlign:u,padding:p,isIcon:g,iconMargin:m,isTitle:b,titleTypo:f,titleMargin:k,isSep:w,sepMargin:C,isDesc:j,descTypo:$}=e,S=()=>{t({features:[...a,{background:{color:"#0000"},isUpIcon:!1,icon:{class:"fa fa-wordpress",fontSize:120},upIcon:{id:null,url:"",alt:"",title:""},iconWidth:"120px",title:`Feature ${a.length+1}`,titleColor:"#333",separator:{width:"20%",height:"2px",style:"solid",color:"#bbb"},desc:`This content area describes feature ${a.length+1} description/details.`,descColor:"#333"}]}),i(a.length)},{background:T={},isUpIcon:M=!1,icon:N={},upIcon:L={},iconWidth:E="",titleColor:P="",separator:A={},descColor:B=""}=a[o]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove Features","b-blocks"),children:[null!==o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:"bplItemTitle",children:(0,x.__)(`Feature No ${o+1}:`,"b-blocks")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:T,onChange:e=>n("background",e)}),g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Upload Icon?","b-blocks"),checked:M,onChange:e=>n("isUpIcon",e)}),M?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{value:L,onChange:e=>n("upIcon",e),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Icon Width:","b-blocks"),labelPosition:"left",value:E,onChange:e=>n("iconWidth",e),units:[Ee(),Pe(),Ae()]})]}):(0,l.jsx)(Un,{value:N,onChange:e=>n("icon",e),defaults:{class:"fa fa-wordpress",fontSize:120}})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:P,onChange:e=>n("titleColor",e),defaultColor:"#333"}),(0,l.jsx)(Ts,{value:A,onChange:e=>n("separator",e),defaults:{width:"20%"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:B,onChange:e=>n("descColor",e),defaultColor:"#333"}),(0,l.jsxs)(y.PanelRow,{className:"itemAction mt20 mb15",children:[1<a?.length&&(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:e=>{e.preventDefault(),t({features:[...a.slice(0,o),...a.slice(o+1)]}),i(0===o?0:o-1)},children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:e=>{e.preventDefault(),t({features:[...a.slice(0,o),{...a[o]},...a.slice(o)]}),i(o+1)},children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]}),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Feature","b-blocks"),onClick:S,children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Feature","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:r[s],onChange:e=>{t({columns:{...r,[s]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({columnGap:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({rowGap:e}),units:[Ee(),Pe(),Ae()]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(od,{label:(0,x.__)("Padding:","b-blocks"),value:p,onChange:e=>t({padding:e}),defaults:{vertical:"50px",horizontal:"20px"}})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:g,onChange:e=>t({isIcon:e})}),g&&(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:m,onChange:e=>t({iconMargin:e}),defaults:{side:4,bottom:"20px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:b,onChange:e=>t({isTitle:e})}),b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Os,{value:f,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:20,tablet:18,mobile:16},fontWeight:600}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:k,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:w,onChange:e=>t({isSep:e})}),w&&(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:C,onChange:e=>t({sepMargin:e}),defaults:{side:4,bottom:"10px"}})]}),(0,l.jsxs)(y.PanelBody,{ |
| 410 |
className:"bPlPanelBody",title:(0,x.__)("Description Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:j,onChange:e=>t({isDesc:e})}),j&&(0,l.jsx)(Os,{value:$,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}})]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Feature","b-blocks"),onClick:S,children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:u,onChange:e=>t({textAlign:e})})]})]})})),LC="bBlocksFeatureBoxes",EC=({attributes:e,id:t})=>{const{features:n=[],columnGap:o,rowGap:i,textAlign:s,padding:a,iconMargin:r,titleTypo:c,titleMargin:d,sepMargin:u,descTypo:p}=e,h=`#${t}`,g=`${h} .${LC}`,m=`${g} .feature`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",c)?.googleFontLink}\n\t\t${pa("",p)?.googleFontLink}\n\t\t${pa(`${m} .featureTitle`,c)?.styles}\n\t\t${pa(`${m} .featureDescription`,p)?.styles}\n\n\t\t${g}{\n\t\t\tgrid-gap: ${i} ${o};\n\t\t}\n\t\t${m}{\n\t\t\ttext-align: ${s};\n\t\t\tpadding: ${ua(a)};\n\t\t}\n\t\t${m} .featureIcon{\n\t\t\tmargin: ${ua(r)};\n\t\t}\n\t\t${m} .featureTitle{\n\t\t\tmargin: ${ua(d)};\n\t\t}\n\t\t${m} .featureSeparator{\n\t\t\tmargin: ${ua(u)};\n\t\t}\n\n\t\t${n.map(((e,t)=>{const{background:n,icon:o,iconWidth:i,titleColor:s,separator:a,descColor:r}=e,l=`${h} #feature-${t}`;return`\n\t\t\t\t${l}{\n\t\t\t\t\t${oa(n)}\n\t\t\t\t}\n\t\t\t\t${l} .featureIcon i{\n\t\t\t\t\t${ra(o)}\n\t\t\t\t}\n\t\t\t\t${l} .featureIcon img{\n\t\t\t\t\twidth: ${i};\n\t\t\t\t}\n\t\t\t\t${l} .featureTitle{\n\t\t\t\t\tcolor: ${s};\n\t\t\t\t}\n\t\t\t\t${l} .featureSeparator{\n\t\t\t\t\t${ca(a)}\n\t\t\t\t}\n\t\t\t\t${l} .featureDescription{\n\t\t\t\t\tcolor: ${r};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})};Nl(MC.name)&&(0,p.registerBlockType)(MC,{icon:xr,edit:({attributes:e,setAttributes:t,clientId:n})=>{const{features:o=[],columns:i,isIcon:s,isTitle:a,isSep:r,isDesc:c}=e,[d,u]=(0,m.useState)(0),p=(e,n)=>{const i=Ob(o,(t=>{t[d][e]=n}));t({features:i})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(NC,{attributes:e,setAttributes:t,updateFeature:p,activeIndex:d,setActiveIndex:u}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(EC,{attributes:e,id:`block-${n}`}),(0,l.jsx)("div",{className:`${LC} columns-${i.desktop} columns-tablet-${i.tablet} columns-mobile-${i.mobile}`,children:o.map(((e,t)=>{const{isUpIcon:n,icon:o,upIcon:i,title:g,desc:m}=e;return(0,l.jsxs)("div",{onClick:()=>u(t),className:"feature "+(t===d?"bPlNowEditing":""),id:`feature-${t}`,children:[s&&(0,l.jsx)("div",{className:"featureIcon",children:n?(0,l.jsx)("img",{className:i?.id?`wp-image-${i?.id}`:null,src:i?.url,alt:i?.alt}):o?.class&&(0,l.jsx)("i",{className:o?.class})}),(0,l.jsxs)("div",{className:"featureDetails",children:[a&&(0,l.jsx)(h.RichText,{className:"featureTitle",tagName:"h4",value:g,onChange:e=>p("title",e),placeholder:(0,x.__)("Feature title","b-blocks"),inlineToolbar:!0}),r&&(0,l.jsx)("span",{className:"featureSeparator"}),c&&(0,l.jsx)(h.RichText,{className:"featureDescription",tagName:"p",value:m,onChange:e=>p("desc",e),placeholder:(0,x.__)("Description of the feature","b-blocks"),inlineToolbar:!0})]})]},t)}))})]})]})},save:()=>null}) |
| 411 |
;const PC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/file-download-card","title":"File Download Card","category":"bBlocks","description":"A single-file download card with a file-type badge, title, size, and download button.","keywords":["download","file","pdf","ebook","zip","document","attachment","button"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"file":{"type":"object","default":{"id":0,"url":"","name":"","type":"","size":"","buttonLabel":"Download","openNewTab":false,"showFileType":true,"showFileSize":true}},"content":{"type":"object","default":{"title":"","description":""}},"layout":{"type":"object","default":{"type":"horizontal"}},"icon":{"type":"object","default":{"style":"filled","bg":{},"color":"#2563eb","border":{"color":"#2563eb","style":"solid","width":"2px"},"size":48,"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"title":{"type":"object","default":{"color":"#111827","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":"600"},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"description":{"type":"object","default":{"color":"#6b7280","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"14px","tablet":"","mobile":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"meta":{"type":"object","default":{"color":"#9ca3af","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"12px","tablet":"","mobile":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"button":{"type":"object","default":{"normal":{"bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff","border":{},"padding":{"desktop":{"top":"10px","right":"20px","bottom":"10px","left":"20px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"6px","right":"6px","bottom":"6px","left":"6px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"hover":{"bg":{"type":"solid","color":""},"color":"","border":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"typo":{"fontSize":{"desktop":"14px","tablet":"","mobile":""},"fontWeight":"600"},"transition":0.2}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"20px","right":"25px","bottom":"20px","left":"25px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"5px","right":"5px","bottom":"5px","left":"5px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"5px","spreed":"0px","color":"rgba(113, 144, 176, 0.43)","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 0)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),AC=({attributes:e,id:o,isBackend:i=!1})=>{ |
| 412 |
const{icon:s={},title:a={},description:r={},meta:c={},button:d={},advanced:u}=e,p=parseInt(s.size,10)||48,h=`#${o} .b-blocks-file-download-card`,g=`${h} .b-blocks-file-download-card-badge`,m=`${h} .b-blocks-file-download-card-title`,b=`${h} .b-blocks-file-download-card-desc`,f=`${h} .b-blocks-file-download-card-meta`,x=`${h} .b-blocks-file-download-card-btn`,y=(e,t,n)=>na(e,ha(t?.[n])),v=e=>`\n\t\t${g}{ ${y("padding",s.padding,e)} ${y("margin",s.margin,e)} ${y("border-radius",s.radius,e)} }\n\t\t${m}{ ${y("padding",a.padding,e)} ${y("margin",a.margin,e)} ${y("border-radius",a.borderRadius,e)} }\n\t\t${b}{ ${y("padding",r.padding,e)} ${y("margin",r.margin,e)} ${y("border-radius",r.borderRadius,e)} }\n\t\t${f}{ ${y("padding",c.padding,e)} ${y("margin",c.margin,e)} ${y("border-radius",c.borderRadius,e)} }\n\t\t${x}{ ${y("padding",d.normal?.padding,e)} ${y("margin",d.normal?.margin,e)} ${y("border-radius",d.normal?.radius,e)} }\n\t\t${x}:hover, ${x}:focus-visible{ ${y("padding",d.hover?.padding,e)} ${y("margin",d.hover?.margin,e)} ${y("border-radius",d.hover?.radius,e)} }\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${pa("",a.typo).googleFontLink}\n\t\t\t${pa("",r.typo).googleFontLink}\n\t\t\t${pa("",c.typo).googleFontLink}\n\t\t\t${pa("",d.typo).googleFontLink}\n\t\t\t${g}{\n\t\t\t\twidth:${p}px;\n\t\t\t\theight:${p}px;\n\t\t\t\tfont-size:${Math.round(.28*p)}px;\n\t\t\t\t${oa(s.bg)}\n\t\t\t\t${na("color",s.color)}\n\t\t\t\t${ia(s.border)}\n\t\t\t}\n\t\t\t${m}{\n\t\t\t\t${na("color",a.color)}\n\t\t\t\t${oa(a.bg)}\n\t\t\t\t${ia(a.border)}\n\t\t\t}\n\t\t\t${pa(m,a.typo).styles}\n\t\t\t${b}{\n\t\t\t\t${na("color",r.color)}\n\t\t\t\t${oa(r.bg)}\n\t\t\t\t${ia(r.border)}\n\t\t\t}\n\t\t\t${pa(b,r.typo).styles}\n\t\t\t${f}{\n\t\t\t\t${na("color",c.color)}\n\t\t\t\t${oa(c.bg)}\n\t\t\t\t${ia(c.border)}\n\t\t\t}\n\t\t\t${pa(f,c.typo).styles}\n\t\t\t${x}{\n\t\t\t\t${oa(d.normal?.bg)}\n\t\t\t\t${na("color",d.normal?.color)}\n\t\t\t\t${ia(d.normal?.border)}\n\t\t\t\ttransition:all ${d.transition??.2}s ease;\n\t\t\t}\n\t\t\t${pa(x,d.typo).styles}\n\t\t\t${x}:hover, ${x}:focus-visible{\n\t\t\t\t${oa(d.hover?.bg)}\n\t\t\t\t${na("color",d.hover?.color)}\n\t\t\t\t${ia(d.hover?.border)}\n\t\t\t}\n\t\t\t${v("desktop")}\n\t\t\t${t}{ ${v("tablet")} }\n\t\t\t${n}{ ${v("mobile")} }\n\t\t\t${_a(o,u,i,!1)}\n\t\t\t`}})},BC=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],IC={top:"",right:"",bottom:"",left:""},OC=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],RC=[{label:(0,x.__)("Horizontal (icon left)","b-blocks"),value:"horizontal"},{label:(0,x.__)("Vertical (icon top)","b-blocks"),value:"vertical"}],zC=[{label:(0,x.__)("Filled","b-blocks"),value:"filled"},{label:(0,x.__)("Outline","b-blocks"),value:"outline"}],DC={"application/pdf":"PDF","application/zip":"ZIP","application/x-zip-compressed":"ZIP","application/x-rar-compressed":"RAR","application/x-7z-compressed":"7Z","application/gzip":"GZ","application/msword":"DOC","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"DOC","application/vnd.ms-excel":"XLS","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"XLS","application/vnd.ms-powerpoint":"PPT","application/vnd.openxmlformats-officedocument.presentationml.presentation":"PPT","application/json":"JSON","application/rtf":"RTF","application/epub+zip":"EPUB","text/plain":"TXT","text/csv":"CSV","text/html":"HTML","image/png":"PNG","image/jpeg":"JPG","image/gif":"GIF","image/webp":"WEBP","image/svg+xml":"SVG","audio/mpeg":"MP3","audio/wav":"WAV","audio/ogg":"OGG","video/mp4":"MP4","video/quicktime":"MOV","video/webm":"WEBM"},FC=(e,t)=>{const n=(e||"").toLowerCase().trim();if(n&&DC[n])return DC[n];const o=(t||"").split("?")[0].split("#")[0],i=o.lastIndexOf(".");if(i>-1){const e=o.slice(i+1).toUpperCase();if(/^[A-Z0-9]{1,5}$/.test(e))return e}return"FILE"},HC=({attributes:e,updateObj:t,setAttributes:n})=>{const{file:o={},content:i={},layout:s={},icon:a={}}=e,{id:r,url:c,name:d,type:u,size:p,buttonLabel:g,openNewTab:m,showFileType:b=!0,showFileSize:f=!0}=o,v=c?FC(u,c):"";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("File","b-blocks"),initialOpen:!0,children:[c?(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:10,padding:"8px 10px",background:"#f0f0f1",borderRadius:6},children:[(0,l.jsx)("strong",{style:{fontSize:11},children:v}),(0,l.jsx)("span",{style:{fontSize:12,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d||c})]}):null,(0,l.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginBottom:12},children:[(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{value:r||0,onSelect:e=>{n({file:{...o,id:e?.id||0,url:e?.url||"",name:e?.title||e?.filename||"",type:e?.mime||"",size:e?.filesizeHumanReadable||""}})},render:({open:e})=>(0,l.jsx)(y.Button,{variant:"secondary",onClick:e,children:c?(0,x.__)("Replace File","b-blocks"):(0,x.__)("Select File","b-blocks")})})}),c&&(0,l.jsx)(y.Button,{variant:"link",isDestructive:!0,onClick:()=>n({file:{...o,id:0,url:"",name:"",type:"",size:""}}),children:(0,x.__)("Remove","b-blocks")})]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Or enter file URL","b-blocks"),value:r?"":c||"",onChange:e=>n({file:{...o,url:e,id:0}}),type:"url",placeholder:"https://",help:r?(0,x.__)("Using a media-library file. Remove it to enter an external URL.","b-blocks"):(0,x.__)("Use for files hosted outside the media library.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt20",label:(0,x.__)("Card title","b-blocks"),value:i.title||"",onChange:e=>t("content",e,"title"),placeholder:d||(0,x.__)("Auto-uses file name","b-blocks"),help:(0,x.__)("Also editable inline on the block canvas.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Description","b-blocks"),value:i.description||"",onChange:e=>t("content",e,"description"),placeholder:(0,x.__)("Optional short description","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Button label","b-blocks"),value:g||"",onChange:e=>t("file",e,"buttonLabel"),placeholder:(0,x.__)("Download","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("File size (override)","b-blocks"),value:p||"",onChange:e=>t("file",e,"size"),placeholder:"e.g. 2.4 MB",help:r?(0,x.__)("Auto-detected from the media library on the front end.","b-blocks"):(0,x.__)("Shown for external URLs (not auto-detected).","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Open in new tab","b-blocks"),checked:!!m,onChange:e=>t("file",!!e,"openNewTab")}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show file type badge","b-blocks"),checked:!!b,onChange:e=>t("file",!!e,"showFileType")}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show file size","b-blocks"),checked:!!f,onChange:e=>t("file",!!e,"showFileSize")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Layout","b-blocks"),labelPosition:"edge",value:s.type||"horizontal",options:RC,onChange:e=>t("layout",e,"type"),__nextHasNoMarginBottom:!0})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Badge","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Style","b-blocks"),value:a.style||"filled",options:zC,onChange:e=>t("icon",e,"style"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Badge Size","b-blocks"),value:parseInt(a.size,10)||48,onChange:e=>t("icon",e,"size"),min:32,max:96,__nextHasNoMarginBottom:!0})]})]})},WC=({attributes:e,updateObj:t,device:n="desktop"})=>{const[o,i]=(0, |
| 413 |
m.useState)("normal"),{icon:s={},title:a={},description:r={},meta:c={},button:d={}}=e,u=d[o]||{},p=(e,o,i,s,a)=>(0,l.jsx)(k,{className:a,label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[e," ",(0,l.jsx)(_,{})]}),units:BC,values:s?.[n],resetValues:IC,onChange:e=>t(o,e,i,n)}),h=(e,i,s,a)=>(0,l.jsx)(k,{className:a,label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[e," ",(0,l.jsx)(_,{})]}),units:BC,values:s?.[n],resetValues:IC,onChange:e=>t("button",e,o,i,n)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Badge","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:s.bg,onChange:e=>t("icon",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Icon / Text Color:","b-blocks"),value:s.color,onChange:e=>t("icon",e,"color"),defaultColor:"#2563eb"}),p((0,x.__)("Padding","b-blocks"),"icon","padding",s.padding,"mt10"),p((0,x.__)("Margin","b-blocks"),"icon","margin",s.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>t("icon",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),p((0,x.__)("Corner Radius","b-blocks"),"icon","radius",s.radius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:a.color||"#111827",onChange:e=>t("title",e,"color"),defaultColor:"#111827"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:a.bg,onChange:e=>t("title",e,"bg")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:a.typo,onChange:e=>t("title",e,"typo")}),p((0,x.__)("Padding","b-blocks"),"title","padding",a.padding,"mt10"),p((0,x.__)("Margin","b-blocks"),"title","margin",a.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>t("title",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),p((0,x.__)("Border Radius","b-blocks"),"title","borderRadius",a.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:r.color||"#6b7280",onChange:e=>t("description",e,"color"),defaultColor:"#6b7280"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:r.bg,onChange:e=>t("description",e,"bg")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:r.typo,onChange:e=>t("description",e,"typo")}),p((0,x.__)("Padding","b-blocks"),"description","padding",r.padding,"mt10"),p((0,x.__)("Margin","b-blocks"),"description","margin",r.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:r.border,onChange:e=>t("description",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),p((0,x.__)("Border Radius","b-blocks"),"description","borderRadius",r.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Meta","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:c.color||"#9ca3af",onChange:e=>t("meta",e,"color"),defaultColor:"#9ca3af"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:c.bg,onChange:e=>t("meta",e,"bg")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:c.typo,onChange:e=>t("meta",e,"typo")}),p((0,x.__)("Padding","b-blocks"),"meta","padding",c.padding,"mt10"),p((0,x.__)("Margin","b-blocks"),"meta","margin",c.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:c.border,onChange:e=>t("meta",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),p((0,x.__)("Border Radius","b-blocks"),"meta","borderRadius",c.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:d.typo,onChange:e=>t("button",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10 flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:u.bg,onChange:e=>t("button",e,o,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:u.color||"",onChange:e=>t("button",e,o,"color"),defaultColor:"#ffffff"}),h((0,x.__)("Padding","b-blocks"),"padding",u.padding,"mt10"),h((0,x.__)("Margin","b-blocks"),"margin",u.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:u.border,onChange:e=>t("button",e||{},o,"border"),withSlider:!0,__next40pxDefaultSize:!0}),h((0,x.__)("Border Radius","b-blocks"),"radius",u.radius),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (s)","b-blocks"),value:d.transition??.2,onChange:e=>t("button",e,"transition"),min:0,max:5,step:.01,__nextHasNoMarginBottom:!0})]})]})},UC=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:OC,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(HC,{...e}),"style"===t.name&&(0,l.jsx)(WC,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},GC=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{file:i={},content:s={},layout:a={},icon:r={}}=t,c="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,d=fe(t,n),{url:u,id:p,name:g,type:m,size:b,buttonLabel:f,showFileType:v=!0,showFileSize:k=!0}=i,w=e=>{n({file:{...i,id:e?.id||0,url:e?.url||"",name:e?.title||e?.filename||"",type:e?.mime||"",size:e?.filesizeHumanReadable||""}})},_=u?FC(m,u):"FILE",C=!(!b||!String(b).trim()),j=v&&_||k&&C,$=["b-blocks-file-download-card",`b-blocks-file-download-card--${a.type||"horizontal"}`,`b-blocks-file-download-card--icon-${r.style||"filled"}`].join(" "),S=(0,h.useBlockProps)({id:`block-${o}`});return u?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(UC,{...e,updateObj:d,isPremium:c}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(h.MediaUpload,{value:p||0,onSelect:w,render:({open:e})=>(0,l.jsx)(y.ToolbarButton,{icon:"media-document",label:(0,x.__)("Replace file","b-blocks"),onClick:e})})})}),(0,l.jsxs)(y.ToolbarGroup,{children:[(0,l.jsx)(y.ToolbarButton,{icon:"align-pull-left",label:(0,x.__)("Horizontal layout","b-blocks"),isPressed:"horizontal"===(a.type||"horizontal"),onClick:()=>d("layout","horizontal","type")}),(0,l.jsx)(y.ToolbarButton,{icon:"editor-insertmore",label:(0,x.__)("Vertical layout","b-blocks"),isPressed:"vertical"===a.type,onClick:()=>d("layout","vertical","type")})]})]}),(0,l.jsxs)("div",{...S,children:[(0,l.jsx)(AC,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:$,children:(0,l.jsxs)("article",{className:"b-blocks-file-download-card-card",children:[(0,l.jsx)("span",{className:"b-blocks-file-download-card-badge","aria-hidden":"true",children:_}),(0,l.jsxs)("div",{className:"b-blocks-file-download-card-body",children:[(0,l.jsx)(h.RichText,{tagName:"h3",className:"b-blocks-file-download-card-title",value:s.title,onChange:e=>d("content",e,"title"),placeholder:g||(0,x.__)("Card title…","b-blocks"),allowedFormats:[]}),(0,l.jsx)(h.RichText,{tagName:"p",className:"b-blocks-file-download-card-desc",value:s.description,onChange:e=>d("content",e,"description"),placeholder:(0,x.__)("Optional short description","b-blocks"),allowedFormats:[]}),j?(0, |
| 414 |
l.jsxs)("p",{className:"b-blocks-file-download-card-meta",children:[v&&_?(0,l.jsx)("span",{className:"b-blocks-file-download-card-meta-type",children:_}):null,v&&_&&k&&C?(0,l.jsx)("span",{className:"b-blocks-file-download-card-meta-sep",children:"·"}):null,k&&C?(0,l.jsx)("span",{className:"b-blocks-file-download-card-meta-size",children:b}):null]}):null]}),(0,l.jsx)("div",{className:"b-blocks-file-download-card-action",children:(0,l.jsxs)("span",{className:"b-blocks-file-download-card-btn",children:[(0,l.jsx)("svg",{className:"b-blocks-file-download-card-btn-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M12 3v12m0 0l-4-4m4 4l4-4M5 21h14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,l.jsx)("span",{className:"b-blocks-file-download-card-btn-label",children:f||(0,x.__)("Download","b-blocks")})]})})]})})})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(UC,{...e,updateObj:d,isPremium:c}),(0,l.jsx)("div",{...S,children:(0,l.jsx)("div",{children:(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{value:p||0,onSelect:w,render:({open:e})=>(0,l.jsxs)("button",{type:"button",className:"b-blocks-file-download-card-placeholder",onClick:e,children:[(0,l.jsx)("span",{className:"b-blocks-file-download-card-placeholder-icon",children:(0,x.__)("FILE","b-blocks")}),(0,l.jsx)("span",{children:(0,x.__)("Select a file from the media library to create a download card.","b-blocks")})]})})})})})]})}));Nl(PC.name)&&(0,p.registerBlockType)(PC,{icon:jl,edit:GC,save:()=>null});const VC=JSON.parse('{"apiVersion":3,"name":"b-blocks/flip-boxes","title":"Flip Boxes","description":"Display Flip boxes section.","category":"bBlocks","keywords":["flip","flip boxes","flip boxes section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"boxes":{"type":"array","default":[{"frontBG":{"type":"solid","color":"#000000b3"},"backBG":{"type":"solid","color":"#000000b3"},"border":{"solid":"solid"},"shadow":{"type":"box"},"isFrontUpIcon":false,"frontIcon":{"class":"fa fa-sync-alt","fontSize":70,"color":"#fff"},"upFrontIcon":{"id":null,"url":"","alt":"","title":""},"frontIconWidth":"70px","isBackUpIcon":false,"backIcon":{"class":"fa-brands fa-wordpress","fontSize":70,"color":"#fff"},"upBackIcon":{"id":null,"url":"","alt":"","title":""},"backIconWidth":"70px","frontTitle":"Front Title 1","frontTitleColor":"#fff","backTitle":"Back Title 1","backTitleColor":"#fff","desc":"This content area describes flip box 1 descriptions/details.","descColor":"#fff","btn":"Button 1","btnLink":"#","btnBorder":{"radius":"3px"},"btnColors":{"color":"#fff","bg":"#ff4500"},"btnHovColors":{"color":"#fff","bg":"#ff7500"},"direction":"right"},{"frontBG":{"type":"solid","color":"#000000b3"},"backBG":{"type":"solid","color":"#000000b3"},"border":{"solid":"solid"},"shadow":{"type":"box"},"isFrontUpIcon":false,"frontIcon":{"class":"fa fa-sync-alt","fontSize":70,"color":"#fff"},"upFrontIcon":{"id":null,"url":"","alt":"","title":""},"frontIconWidth":"70px","isBackUpIcon":false,"backIcon":{"class":"fa-brands fa-wordpress","fontSize":70,"color":"#fff"},"upBackIcon":{"id":null,"url":"","alt":"","title":""},"backIconWidth":"70px","frontTitle":"Front Title 2","frontTitleColor":"#fff","backTitle":"Back Title 2","backTitleColor":"#fff","desc":"This content area describes flip box 2 descriptions/details.","descColor":"#fff","btn":"Button 2","btnLink":"#","btnBorder":{"radius":"3px"},"btnColors":{"color":"#fff","bg":"#ff4500"},"btnHovColors":{"color":"#fff","bg":"#ff7500"},"direction":"right"},{"frontBG":{"type":"solid","color":"#000000b3"},"backBG":{"type":"solid","color":"#000000b3"},"border":{"solid":"solid"},"shadow":{"type":"box"},"isFrontUpIcon":false,"frontIcon":{"class":"fa fa-sync-alt","fontSize":70,"color":"#fff"},"upFrontIcon":{"id":null,"url":"","alt":"","title":""},"frontIconWidth":"70px","isBackUpIcon":false,"backIcon":{"class":"fa-brands fa-wordpress","fontSize":70,"color":"#fff"},"upBackIcon":{"id":null,"url":"","alt":"","title":""},"backIconWidth":"70px","frontTitle":"Front Title 3","frontTitleColor":"#fff","backTitle":"Back Title 3","backTitleColor":"#fff","desc":"This content area describes flip box 3 descriptions/details.","descColor":"#fff","btn":"Button 3","btnLink":"#","btnBorder":{"radius":"3px"},"btnColors":{"color":"#fff","bg":"#ff4500"},"btnHovColors":{"color":"#fff","bg":"#ff7500"},"direction":"right"}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"40px"},"rowGap":{"type":"string","default":"30px"},"boxHeight":{"type":"string","default":"400px"},"textAlign":{"type":"string","default":"center"},"boxPadding":{"type":"object","default":{"vertical":"30px","horizontal":"25px"}},"isIcon":{"type":"boolean","default":true},"iconMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"}}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"isBtn":{"type":"boolean","default":true},"isLinkNewTab":{"type":"boolean","default":true},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"btnPadding":{"type":"object","default":{"vertical":"15px","horizontal":"25px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),qC=[{name:"front",title:(0,x.__)("Front","b-blocks")},{name:"back",title:(0,x.__)("Back","b-blocks")}],YC=e=>{const{attributes:t,setAttributes:n,index:o}=e,{boxes:i=[],isIcon:s}=t,{frontBG:a={},backBG:r={},border:c={},shadow:d={},isFrontUpIcon:u=!1,frontIcon:p={},upFrontIcon:h={},frontIconWidth:g="70px",isBackUpIcon:m=!1,backIcon:b={},upBackIcon:f={},backIconWidth:k="70px",frontTitle:w="",frontTitleColor:_="",backTitle:C="",backTitleColor:j="",desc:$="",descColor:S="",btn:T="",btnLink:M="",btnBorder:N={},btnColors:L={},btnHovColors:E={}}=i?.[o]||{},P=(e,i)=>{fe(t,n)("boxes",i,o,e)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",gap:10,children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Direction","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o].direction,onChange:e=>P("direction",e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:"arrow-right-alt"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Bottom",value:"bottom",icon:"arrow-down-alt"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:"arrow-left-alt"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Top",value:"top",icon:"arrow-up-alt"})]})]}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:c,onChange:e=>P("border",e)}),(0,l.jsx)(nd,{label:(0,x.__)("Shadow:","b-blocks"),value:d,onChange:e=>P("shadow",e)}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:qC,children:e=>(0,l.jsxs)(l.Fragment,{children:["front"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Front Box","b-blocks"),children:(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:a,onChange:e=>P("frontBG",e)})}),s&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Front Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Upload Icon?","b-blocks"),checked:u,onChange:e=>P("isFrontUpIcon",e)}),u?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0, |
| 415 |
x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{value:h,onChange:e=>P("upFrontIcon",e),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Icon Width:","b-blocks"),labelPosition:"left",value:g,onChange:e=>P("frontIconWidth",e),units:[Ee(),Pe(),Ae()]})]}):(0,l.jsx)(Un,{value:p,onChange:e=>P("frontIcon",e),defaults:{class:"fa fa-sync-alt",fontSize:70,color:"#fff"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Front Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:w,onChange:e=>P("frontTitle",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:_,onChange:e=>P("frontTitleColor",e),defaultColor:"#fff"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextareaControl,{value:$,onChange:e=>P("desc",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:S,onChange:e=>P("descColor",e),defaultColor:"#fff"})]})]}),"back"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Back Box","b-blocks"),children:(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:r,onChange:e=>P("backBG",e)})}),s&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Back Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Upload Icon?","b-blocks"),checked:m,onChange:e=>P("isBackUpIcon",e)}),m?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{value:f,onChange:e=>P("upBackIcon",e),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Icon Width:","b-blocks"),labelPosition:"left",value:k,onChange:e=>P("backIconWidth",e),units:[Ee(),Pe(),Ae()]})]}):(0,l.jsx)(Un,{value:b,onChange:e=>P("backIcon",e),defaults:{class:"fa fa-wordpress",fontSize:70,color:"#fff"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Back Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:C,onChange:e=>P("backTitle",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:j,onChange:e=>P("backTitleColor",e),defaultColor:"#fff"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:T,onChange:e=>P("btn",e)}),(0,l.jsx)(v,{children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:M,onChange:e=>P("btnLink",e)}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:N,onChange:e=>P("btnBorder",e),defaults:{radius:"3px"}}),(0,l.jsx)(On,{value:L,onChange:e=>P("btnColors",e),defaults:{color:"#fff",bg:"#ff4500"}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:E,onChange:e=>P("btnHovColors",e),defaults:{color:"#fff",bg:"#ff7500"}})]})]})]})})]})},KC=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,isPremium:i,device:s})=>{const{boxes:a=[],columns:r,columnGap:c,rowGap:d,boxHeight:u,textAlign:p,boxPadding:g,isIcon:m,iconMargin:b,titleTypo:f,titleMargin:k,isDesc:w,descTypo:C,isBtn:j,isLinkNewTab:$,btnTypo:S,btnPadding:T}=e,M={frontBG:{type:"solid",color:"#000000b3"},backBG:{type:"solid",color:"#000000b3"},border:{},shadow:{},frontIcon:{class:"fa fa-sync-alt",fontSize:70,color:"#fff"},backIcon:{class:"fa-brands fa-wordpress",fontSize:70,color:"#fff"},frontTitle:`Front Title ${a.length+1}`,frontTitleColor:"#fff",backTitle:`Back Title ${a.length+1}`,backTitleColor:"#fff",desc:`This content area describes flip box ${a.length+1} descriptions/details.`,descColor:"#fff",btn:`Button ${a.length+1}`,btnLink:"#",btnBorder:{radius:"3px"},btnColors:{color:"#fff",bg:"#ff4500"},btnHovColors:{color:"#fff",bg:"#ff7500"}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:a=>(0,l.jsxs)(l.Fragment,{children:["general"==a.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove Boxes","b-blocks"),children:[(0,l.jsx)(_s,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,arrKey:"boxes",minItem:1,ItemSettings:YC,itemLabel:"Flip Box",newItem:M,title:"frontTitle",design:i?"sortable":"single"}),!i&&(0,l.jsxs)("small",{children:[" ",(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"__blank",children:"Upgrade to Premium"})})," to unlock sorting and more features."]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:r[s],onChange:e=>{t({columns:{...r,[s]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({columnGap:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({rowGap:e}),units:[Ee(),Pe(),Ae()]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:m,onChange:e=>t({isIcon:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Description","b-blocks"),checked:w,onChange:e=>t({isDesc:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Button","b-blocks"),checked:j,onChange:e=>t({isBtn:e})}),j&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Link in New Tab","b-blocks"),checked:$,onChange:e=>t({isLinkNewTab:e})})]})]}),"style"==a.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Box","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({boxHeight:e}),units:[Ee(),Ae()]}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:g,onChange:e=>t({boxPadding:e}),defaults:{vertical:"30px",horizontal:"25px"}})]}),m&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:(0,l.jsx)(od,{label:(0,x.__)("Margin:","b-blocks"),value:b,onChange:e=>t({iconMargin:e}),defaults:{side:4,bottom:"20px"}})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:f,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20}}}),f&&(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:k,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"20px"}})]}),w&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Os,{value:C,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}})}),j&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:S,onChange:e=>t({btnTypo:e}),defaults:{fontSize:{desktop:20,tablet:18,mobile:16}}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:T,onChange:e=>t({btnPadding:e}),defaults:{vertical:"15px",horizontal:"25px"}})]})]})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0, |
| 416 |
l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Box","b-blocks"),onClick:()=>t({boxes:[...a,M]}),children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:p,onChange:e=>t({textAlign:e})})]})]})})),QC="bBlocksFlipBoxes",ZC=({attributes:e,id:t})=>{const{boxes:n,columnGap:o,rowGap:i,boxHeight:s,textAlign:a,boxPadding:r,iconMargin:c,titleTypo:d,titleMargin:u,descTypo:p,btnTypo:h,btnPadding:g}=e,m=`#${t}`,b=`${m} .flipBox`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",d)?.googleFontLink}\n\t\t${pa("",p)?.googleFontLink}\n\t\t${pa("",h)?.googleFontLink}\n\t\t${pa(`${b} .flipTitle`,d)?.styles}\n\t\t${pa(`${b} .flipDescription`,p)?.styles}\n\t\t${pa(`${b} .flipBtn`,h)?.styles}\n\n\t\t${m} .${QC}{ grid-gap: ${i} ${o}; }\n\t\t${b}{\n\t\t\theight: ${s};\n\t\t}\n\t\t${b} .box{\n\t\t\ttext-align: ${a};\n\t\t\tpadding: ${ua(r)};\n\t\t}\n\t\t${b} i.flipIcon{\n\t\t\tmargin: ${ua(c)};\n\t\t}\n\t\t${b} .flipTitle{\n\t\t\tmargin: ${ua(u)};\n\t\t}\n\t\t${b} .flipBtn{\n\t\t\tpadding: ${ua(g)};\n\t\t}\n\t\t\t\n\t\t${n.map(((e,t)=>{const{frontBG:n,backBG:o,border:i,shadow:s,frontIcon:a={},frontIconWidth:r="70px",backIcon:l={},backIconWidth:c="70px",frontTitleColor:d,backTitleColor:u,descColor:p,btnBorder:h,btnColors:g,btnHovColors:b}=e,f=`${m} #flipBox-${t}`;return`\n\t\t\t\t${f} .box{\n\t\t\t\t\t${ia(i)}\n\t\t\t\t\tbox-shadow: ${da(s)};\n\t\t\t\t}\n\t\t\t\t${f} .box.front{\n\t\t\t\t\t${oa(n)}\n\t\t\t\t}\n\t\t\t\t${f} .box.back{\n\t\t\t\t\t${oa(o)}\n\t\t\t\t}\n\t\t\t\t${f} img.flipIcon.frontIcon{\n\t\t\t\t\twidth: ${r};\n\t\t\t\t}\n\t\t\t\t${f} i.flipIcon.frontIcon{\n\t\t\t\t\t${ra(a)}\n\t\t\t\t}\n\t\t\t\t${f} img.flipIcon.backIcon{\n\t\t\t\t\twidth: ${c};\n\t\t\t\t}\n\t\t\t\t${f} i.flipIcon.backIcon{\n\t\t\t\t\t${ra(l)}\n\t\t\t\t}\n\t\t\t\t${f} .flipTitle.flipFrontTitle{\n\t\t\t\t\tcolor: ${d};\n\t\t\t\t}\n\t\t\t\t${f} .flipTitle.flipBackTitle{\n\t\t\t\t\tcolor: ${u};\n\t\t\t\t}\n\t\t\t\t${f} .flipDescription{\n\t\t\t\t\tcolor: ${p};\n\t\t\t\t}\n\t\t\t\t${f} .flipBtn{\n\t\t\t\t\t${aa(g)}\n\t\t\t\t\t${ia(h)}\n\t\t\t\t}\n\t\t\t\t${f} .flipBtn:hover{\n\t\t\t\t\t${aa(b)}\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},XC=({attributes:e,isBackend:t=!1,custom:n})=>{const{boxes:o,columns:i,isIcon:s,isDesc:a,isBtn:r,isLinkNewTab:c}=e;return(0,l.jsx)("div",{className:`${QC} columns-${i.desktop} columns-tablet-${i.tablet} columns-mobile-${i.mobile}`,children:o.map(((e,o)=>{const{isFrontUpIcon:i=!1,frontIcon:d={},upFrontIcon:u={},isBackUpIcon:p=!1,backIcon:h={},upBackIcon:g={},frontTitle:m,backTitle:b,desc:f,btn:x,btnLink:y,direction:v="right"}=e;return(0,l.jsxs)("div",{onClick:()=>t&&n.setActiveIndex(o),className:"flipBox "+(t&&o===n.activeIndex?"bPlNowEditing":""),id:`flipBox-${o}`,"data-direction":v,children:[(0,l.jsx)("div",{className:"box front",children:(0,l.jsxs)("div",{className:"frontContent",children:[s&&(0,l.jsx)(l.Fragment,{children:i?(0,l.jsx)("img",{className:u?.id?"flipIcon frontIcon":null,src:u?.url,alt:u?.alt}):d?.class&&(0,l.jsx)("i",{className:`flipIcon frontIcon ${d?.class}`})}),m&&(0,l.jsx)("h3",{className:"flipTitle flipFrontTitle",children:m}),a&&f&&(0,l.jsx)("p",{className:"flipDescription",children:f})]})}),(0,l.jsx)("div",{className:"box back",children:(0,l.jsxs)("div",{className:"backContent",children:[s&&(0,l.jsx)(l.Fragment,{children:p?(0,l.jsx)("img",{className:g?.id?"flipIcon backIcon":null,src:g?.url,alt:g?.alt}):h?.class&&(0,l.jsx)("i",{className:`flipIcon backIcon ${h?.class}`})}),b&&(0,l.jsx)("h3",{className:"flipTitle flipBackTitle",children:b}),r&&x&&(0,l.jsx)("a",{href:$t(y),className:"flipBtn",target:c?"_blank":"_self",rel:"noreferrer noopener",children:x})]})})]},o)}))})};Nl(VC.name)&&(0,p.registerBlockType)(VC,{icon:yr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,[i,s]=(0,m.useState)(0),a=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(KC,{attributes:t,setAttributes:n,activeIndex:i,setActiveIndex:s,isPremium:a}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(ZC,{attributes:t,id:`block-${o}`}),(0,l.jsx)(XC,{attributes:t,isBackend:!0,custom:{activeIndex:i,setActiveIndex:s}})]})]})},save:()=>null}) |
| 417 |
;const JC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/form-builder","version":"1.0.0","title":"Form","category":"bBlocks","description":"Create Beautiful and Professional Login, Register or any other custom Forms easily with a few clicks.","keywords":["form","register","login","sign in","sign up"],"textdomain":"b-blocks","attributes":{"formId":{"type":"string","default":""},"postId":{"type":"number","default":""},"clientId":{"type":"string","default":""},"form":{"type":"object","default":{"formType":""}},"align":{"type":"string","default":""},"weakPassword":{"type":"object","default":{"option":"default","validation":{"length":8,"uppercase":true,"lowercase":true,"number":true,"specialChar":true}}},"password":{"type":"object","default":{"container":{"desktop":{"width":"","height":"","margin":{},"padding":{}},"tablet":{"width":"","height":"","margin":{},"padding":{}},"mobile":{"width":"","height":"","margin":{},"padding":{}},"border":{},"radius":{},"bg":{"color":"#0000"}},"meter":{"desktop":{"width":"","height":"","margin":{},"padding":{}},"tablet":{"width":"","height":"","margin":{},"padding":{}},"mobile":{"width":"","height":"","margin":{},"padding":{}},"border":{},"radius":{}},"passStrengthTxt":{"veryWeak":"Very Weak","weak":"Weak Password","medium":"Medium Password","strong":"Strong Password","desktop":{"margin":{},"padding":{}},"tablet":{"margin":{},"padding":{}},"mobile":{"margin":{},"padding":{}},"typography":{}},"colors":{"veryWeak":"","weak":"","medium":"","strong":"","bg":{}}}},"button":{"type":"object","default":{"button":{"text":"Submit"},"navigation":{"isNavigation":true,"first":{"text":"Already have an account?"},"second":{"text":"Sign In","url":""}},"spinner":{"show":false},"signup":{"text":"Register","desktop":{"margin":{},"padding":{"top":"12px","left":"25px","bottom":"12px","right":"25px"},"justify":"space-between","displayAs":"row","alignment":"left","width":"","height":""},"tablet":{"margin":{},"padding":{"top":"12px","left":"25px","bottom":"12px","right":"25px"},"justify":"space-between","displayAs":"row","alignment":"left","width":"","height":""},"mobile":{"margin":{},"padding":{"top":"12px","left":"25px","bottom":"12px","right":"25px"},"justify":"space-between","displayAs":"row","alignment":"left","width":"","height":""},"typography":{},"normal":{"color":"#fff","bg":{"color":"#146EF5"},"border":{},"radius":{}},"hover":{"color":"#fff","bg":{"color":"#146EF5"},"border":{},"radius":{}},"animation":"none","spinner":{"show":false,"position":0,"color":""}},"signin":{"text":{"first":"","second":"Sign In","link":""},"desktop":{"margin":{},"padding":{},"displayAs":"row","justify":"start","alignment":"baseline","containerWidth":"","width":"","height":""},"tablet":{"margin":{},"padding":{},"displayAs":"row","justify":"start","alignment":"baseline","containerWidth":"","width":"","height":""},"mobile":{"margin":{},"padding":{},"displayAs":"row","justify":"start","alignment":"baseline","containerWidth":"","width":"","height":""},"typography":{"fontSize":{"desktop":"16px"}},"normal":{"color":"","bg":{},"border":{},"radius":{}},"hover":{"color":"","bg":{},"border":{},"radius":{}}},"signout":{"text":{"first":"You are already loggedin.","second":"Logout"}}}},"formOptions":{"type":"object","default":{"isRedirect":true,"customUrl":"","redirectPrevious":false,"userRole":"subscriber"}},"emailOptions":{"type":"object","default":{"user":{"type":"default","messageType":"HTML","mail":{"subject":"Thank you for registering","message":"<p>Thank you for registering on gutenberg plugin development!</p> \\n <p>Username: [username]</p> \\n <p>Password: [password]</p> \\n<p>Please click the following address to login to your account:</p> \\n<p>http://localhost/my-site/wp-admin/post.php/ </p>"}},"admin":{"type":"default","messageType":"HTML","email":"","mail":{"subject":"New User Registration","message":"<p>New user registration on your site gutenberg plugin development</p>\\n<p>Username: [username]</p>\\n<p>Email: [email]</p>"}}}},"termsConditions":{"type":"object","default":{"show":false,"label":{"first":"I Accept","second":"the Terms and Conditions."},"url":"","margin":{"desktop":{},"tablet":{},"mobile":{}},"padding":{"desktop":{},"tablet":{},"mobile":{}},"checkboxMargin":{"desktop":{},"tablet":{},"mobile":{}},"color":{"text":"","link":"","bg":"","checkbox":""},"typography":{"fontSize":{"desktop":"15px"}}}},"validation":{"type":"object","default":{"error":{"email":{"invalid":"You have used an invalid email","missing":"Email is missing","alreadyUsed":"Email is already registered with other account."},"username":{"invalid":"You have used an invalid username","alreadyUsed":"The username already registered.","missing":"Username is missing"},"password":{"invalid":"Your password is invalid","confirmedPass":"Your confirmed password did not match","missing":"Password is missing","custom":""},"styles":{"typo":{"fontSize":{"desktop":"11px"}},"color":"","margin":{}}},"success":{"text":"Form submitted successfully!","styles":{"isShow":false,"typo":{"fontSize":{"desktop":"14px"}},"color":{"text":"","bg":{}},"margin":{},"padding":{},"border":{"left":{"color":"#00F","style":"solid","width":"2px"}},"radius":{}}}}},"message":{"type":"object","default":{"isShowDemoSuccess":false,"isShowDemoError":false,"success":{"successFulRegistration":"Registration completed successfully!"},"error":{"default":"Something went wrong!"}}},"styles":{"type":"object","default":{"form":{"bg":{},"width":{"type":"full","desktop":"100%","tablet":"","mobile":""},"align":"center","border":{},"shadow":[],"desktop":{"margin":{},"padding":{},"radius":{},"fieldGap":10},"tablet":{"margin":{},"padding":{},"radius":{},"fieldGap":""},"mobile":{"margin":{},"padding":{},"radius":{},"fieldGap":""}},"buttonStyle":{"container":{"desktop":{"display":"row","margin":{},"padding":{},"justify":"space-between","align":"flex-start","gap":"10px"},"tablet":{"display":"row","margin":{},"padding":{},"justify":"","align":"","gap":""},"mobile":{"display":"row","margin":{},"padding":{},"justify":"","align":"","gap":""}},"button":{"typography":{"fontSize":{"desktop":"15px"}},"desktop":{"position":"","margin":{},"padding":{}},"tablet":{"position":"","margin":{},"padding":{}},"mobile":{"position":"","margin":{},"padding":{}},"normal":{"color":"","bg":{},"desktop":{"border":{},"shadow":[],"radius":{}},"tablet":{"border":{},"shadow":[],"radius":{}},"mobile":{"border":{},"shadow":[],"radius":{}}},"hover":{"animation":"","transition":"","color":"","bg":{},"desktop":{"border":{},"shadow":[],"radius":{}},"tablet":{"border":{},"shadow":[],"radius":{}},"mobile":{"border":{},"shadow":[],"radius":{}}}},"spinner":{"isDemo":false,"margin":{"left":"10px","right":"","top":"","bottom":""},"color":"#fff","size":"16px"},"navigation":{"first":{"typography":{},"color":"","desktop":{"margin":{}},"tablet":{"margin":{}},"mobile":{"margin":{}}},"second":{"typography":{},"color":"","desktop":{"margin":{}},"tablet":{"margin":{}},"mobile":{"margin":{}}}}},"message":{"success":{"typo":{"fontSize":{"desktop":"14px"}},"color":{"text":"","bg":{}},"margin":{},"padding":{},"border":{"left":{"color":"#00F","style":"solid","width":"2px"}},"radius":{}},"error":{"typo":{"fontSize":{"desktop":"14px"}},"color":{"text":"","bg":{}},"margin":{},"padding":{},"border":{"left":{"color":"#ff2c2c","style":"solid","width":"2px"}},"radius":{}}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"60px","right":"60px","bottom":"60px","left":"60px"},"tablet":{"top":"50px","right":"50px","bottom":"50px","left":"50px"},"mobile":{"top":"40px","right":"40px","bottom":"40px","left":"40px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"usesContext":["b-blocks/inputClientId"],"example":{"attributes":{}},"editorScript":"file:../index.js","render":"file:./render.php","style":"file:./view.css","viewScript":["file:./view.js","wp-util"]}'),ej=({handleReplaceForm:e})=>(0, |
| 418 |
l.jsxs)("div",{className:"b-blocks-b-form-preselectFormSkeleton-wrapper",children:[(0,l.jsxs)("div",{className:"b-blocks-b-form-skeleton-wrapper",children:[(0,l.jsxs)("div",{onClick:()=>e("register"),children:[(0,l.jsxs)("div",{className:"b-blocks-b-form-skeleton",children:[(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsxs)("div",{className:"b-blocks-b-form-skeleton-button-wrapper",children:[(0,l.jsx)("div",{}),(0,l.jsx)("div",{})]})]}),(0,l.jsx)("p",{className:"b-blocks-b-form-skeleton-form-title",children:"Register Form"})]}),(0,l.jsxs)("div",{onClick:()=>e("login"),children:[(0,l.jsxs)("div",{className:"b-blocks-b-form-skeleton",children:[(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-button-wrapper",children:(0,l.jsx)("div",{})})]}),(0,l.jsx)("p",{className:"b-blocks-b-form-skeleton-form-title",children:"Login Form"})]})]}),(0,l.jsx)("div",{})]}),tj={register:[{clientId:"49f6ed66-21bd-479f-a38d-df2c86fa87db",name:"b-blocks/input-field",isValid:!0,originalContent:"",validationIssues:[],attributes:{align:"",inputField:{type:"text",placeholder:"Username",value:"",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z'/></svg>",name:"username"},label:{text:"User Name"},options:{isLabel:!0,isRequired:!0,isIcon:!0,isShowRequiredIcon:!1},password:{options:{isWeek:!0,isStrengthMeter:!1,isStrengthText:!1,isVisibilityIcon:!0,passStrengthText:"default",validationText:"default",isUpperCase:!0,isLowerCase:!0,isNumber:!0,isSpecialChar:!0,minLength:8},strengthText:{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}},validation:{errorMessage:{text:{missing:"This field is required."},email:{missing:"This field is required.",invalid:""},password:{missing:"This field is required.",invalid:"",customValidation:""},url:{missing:"This Field is required."}}},styles:{inputField:{typo:{fontSize:{desktop:"16px"}},colors:{text:"",placeholder:""},desktop:{padding:{left:"33px",bottom:"10px",top:"10px"}},tablet:{padding:[]},mobile:{padding:[]},normal:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},focus:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},hover:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]}},label:{typo:{fontSize:{desktop:"16px"}},colors:{required:"",text:""},desktop:{margin:[]},tablet:{margin:[]},mobile:{margin:[]},position:"top"},icon:{field:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}},password:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}}},error:{text:{typo:{fontSize:{desktop:"14px"}},color:"#f5222d",bg:[],desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}},input:{desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}}},password:{strength:{container:{desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[],bg:{color:""}},meter:{gap:"",desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[]},text:{desktop:{margin:[],padding:[]},tablet:{margin:[],padding:[]},mobile:{margin:[],padding:[]},typography:{fontSize:{desktop:"15px"}}},colors:{veryWeak:"#f5222d",weak:"#fa8c16",medium:"#fadb14",strong:"#7cb305"}}}},clientId:"49f6ed66-21bd-479f-a38d-df2c86fa87db"},innerBlocks:[]},{clientId:"3aad4b69-888a-415e-bd89-ae47dbca7f4a",name:"b-blocks/input-field",isValid:!0,originalContent:"",validationIssues:[],attributes:{align:"",inputField:{type:"email",placeholder:"Email",value:"",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z'/></svg>",name:"email"},label:{text:"Email"},options:{isLabel:!0,isRequired:!0,isIcon:!0,isShowRequiredIcon:!1},password:{options:{isWeek:!0,isStrengthMeter:!1,isStrengthText:!1,isVisibilityIcon:!0,passStrengthText:"default",validationText:"default",isUpperCase:!0,isLowerCase:!0,isNumber:!0,isSpecialChar:!0,minLength:8},strengthText:{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}},validation:{errorMessage:{text:{missing:"This field is required."},email:{missing:"This field is required.",invalid:""},password:{missing:"This field is required.",invalid:"",customValidation:""},url:{missing:"This Field is required."}}},styles:{inputField:{typo:{fontSize:{desktop:"16px"}},colors:{text:"",placeholder:""},desktop:{padding:{top:"10px",bottom:"10px",left:"33px"}},tablet:{padding:[]},mobile:{padding:[]},normal:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},focus:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},hover:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]}},label:{typo:{fontSize:{desktop:"16px"}},colors:{required:"",text:""},desktop:{margin:[]},tablet:{margin:[]},mobile:{margin:[]},position:"top"},icon:{field:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}},password:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}}},error:{text:{typo:{fontSize:{desktop:"14px"}},color:"#f5222d",bg:[],desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}},input:{desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}}},password:{strength:{container:{desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[],bg:{color:""}},meter:{gap:"",desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[]},text:{desktop:{margin:[],padding:[]},tablet:{margin:[],padding:[]},mobile:{margin:[],padding:[]},typography:{fontSize:{desktop:"15px"}}},colors:{veryWeak:"#f5222d",weak:"#fa8c16",medium:"#fadb14",strong:"#7cb305"}}}},clientId:"3aad4b69-888a-415e-bd89-ae47dbca7f4a"},innerBlocks:[]},{clientId:"de949083-6ecf-4d44-9ce6-95ae2cfa39e9",name:"b-blocks/input-field",isValid:!0,originalContent:"",validationIssues:[],attributes:{align:"",inputField:{type:"password",placeholder:"Password",value:"",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z'/></svg>",name:"password"},label:{text:"Password"},options:{isLabel:!0,isRequired:!0,isIcon:!0,isShowRequiredIcon:!1},password:{options:{isWeek:!0,isStrengthMeter:!1,isStrengthText:!1,isVisibilityIcon:!0,passStrengthText:"default", |
| 419 |
validationText:"default",isUpperCase:!0,isLowerCase:!0,isNumber:!0,isSpecialChar:!0,minLength:8},strengthText:{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}},validation:{errorMessage:{text:{missing:"This field is required."},email:{missing:"This field is required.",invalid:""},password:{missing:"This field is required.",invalid:"",customValidation:""},url:{missing:"This Field is required."}}},styles:{inputField:{typo:{fontSize:{desktop:"16px"}},colors:{text:"",placeholder:""},desktop:{padding:{left:"33px",top:"10px",bottom:"10px"}},tablet:{padding:[]},mobile:{padding:[]},normal:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},focus:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},hover:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]}},label:{typo:{fontSize:{desktop:"16px"}},colors:{required:"",text:""},desktop:{margin:[]},tablet:{margin:[]},mobile:{margin:[]},position:"top"},icon:{field:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}},password:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}}},error:{text:{typo:{fontSize:{desktop:"14px"}},color:"#f5222d",bg:[],desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}},input:{desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}}},password:{strength:{container:{desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[],bg:{color:""}},meter:{gap:"",desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[]},text:{desktop:{margin:[],padding:[]},tablet:{margin:[],padding:[]},mobile:{margin:[],padding:[]},typography:{fontSize:{desktop:"15px"}}},colors:{veryWeak:"#f5222d",weak:"#fa8c16",medium:"#fadb14",strong:"#7cb305"}}}},clientId:"de949083-6ecf-4d44-9ce6-95ae2cfa39e9"},innerBlocks:[]}],login:[{clientId:"d9ad798f-b8ef-4834-a770-f176959b8348",name:"b-blocks/input-field",isValid:!0,originalContent:"",validationIssues:[],attributes:{align:"",inputField:{type:"text",placeholder:"Username or Email",value:"",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z'/></svg>",name:"username"},label:{text:"Username or Email"},options:{isLabel:!0,isRequired:!0,isIcon:!0},password:{options:{isWeek:!0,isStrengthMeter:!1,isStrengthText:!1,isVisibilityIcon:!0,passStrengthText:"default",validationText:"default",isUpperCase:!0,isLowerCase:!0,isNumber:!0,isSpecialChar:!0,minLength:8},strengthText:{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}},validation:{errorMessage:{text:{missing:"This field is required."},email:{missing:"This field is required.",invalid:""},password:{missing:"This field is required.",invalid:"",customValidation:""},url:{missing:"This Field is required."}}},styles:{inputField:{typo:{fontSize:{desktop:"16px"}},colors:{text:"",placeholder:""},desktop:{padding:{top:"10px",bottom:"10px",left:"33px"}},tablet:{padding:[]},mobile:{padding:[]},normal:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},focus:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},hover:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]}},label:{typo:{fontSize:{desktop:"16px"}},colors:{required:"",text:""},desktop:{margin:[]},tablet:{margin:[]},mobile:{margin:[]},position:"top"},icon:{field:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}},password:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}}},error:{text:{typo:{fontSize:{desktop:"14px"}},color:"#f5222d",bg:[],desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}},input:{desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}}},password:{strength:{container:{desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[],bg:{color:""}},meter:{gap:"",desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[]},text:{desktop:{margin:[],padding:[]},tablet:{margin:[],padding:[]},mobile:{margin:[],padding:[]},typography:{fontSize:{desktop:"15px"}}},colors:{veryWeak:"#f5222d",weak:"#fa8c16",medium:"#fadb14",strong:"#7cb305"}}}},clientId:"d9ad798f-b8ef-4834-a770-f176959b8348"},innerBlocks:[]},{clientId:"5cd7d62b-b34e-45c7-8142-625e376e012f",name:"b-blocks/input-field",isValid:!0,originalContent:"",validationIssues:[],attributes:{align:"",inputField:{type:"password",placeholder:"Password",value:"",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z'/></svg>",name:"password"},label:{text:"Password"},options:{isLabel:!0,isRequired:!0,isIcon:!0},password:{options:{isWeek:!0,isStrengthMeter:!1,isStrengthText:!1,isVisibilityIcon:!0,passStrengthText:"default",validationText:"default",isUpperCase:!0,isLowerCase:!0,isNumber:!0,isSpecialChar:!0,minLength:8},strengthText:{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}},validation:{errorMessage:{text:{missing:"This field is required."},email:{missing:"This field is required.",invalid:""},password:{missing:"This field is required.",invalid:"",customValidation:""},url:{missing:"This Field is required."}}},styles:{inputField:{typo:{fontSize:{desktop:"16px"}},colors:{text:"",placeholder:""},desktop:{padding:{left:"33px",top:"10px",bottom:"10px"}},tablet:{padding:[]},mobile:{padding:[]},normal:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},focus:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},hover:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]}},label:{typo:{fontSize:{desktop:"16px"}},colors:{required:"",text:""},desktop:{margin:[]},tablet:{margin:[]},mobile:{margin:[]},position:"top"},icon:{field:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}},password:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}}},error:{text:{typo:{fontSize:{desktop:"14px"}},color:"#f5222d",bg:[],desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}},input:{desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}}},password:{strength:{container:{desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[],bg:{color:""}},meter:{gap:"",desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"", |
| 420 |
height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[]},text:{desktop:{margin:[],padding:[]},tablet:{margin:[],padding:[]},mobile:{margin:[],padding:[]},typography:{fontSize:{desktop:"15px"}}},colors:{veryWeak:"#f5222d",weak:"#fa8c16",medium:"#fadb14",strong:"#7cb305"}}}},clientId:"5cd7d62b-b34e-45c7-8142-625e376e012f"},innerBlocks:[]}]},nj=({attributes:e,id:t,isBackend:n=!1})=>{const{styles:o,termsConditions:i}=e,{form:s,buttonStyle:a,message:r}=o,{container:c,button:d,navigation:u}=a,{first:p,second:h}=u,{success:g,error:m}=r,b=`#${t}`,f=`${b} .b-blocks-b-form-wrapper`,x=`${f} .b-blocks-b-form-container`,y=`${x} .b-blocks-form-button-wrapper`,v=`${y} .b-blocks-form-submitBtn`,k=`${y} .b-blocks-form-button-navigation-wrapper`,w=`${k} .b-blocks-form-button-navigation-text`,_=`${k} .b-blocks-form-button-navigation-link`,C=`${x} .b-blocks-b-form-termsConditionWrapper`,j=`${f} .b-blocks-b-form-success-message`,$=`${f} .b-blocks-b-form-error-message`,S=n?".block-editor-inner-blocks .block-editor-block-list__layout":`${b} .b-blocks-b-form-child-field-wrapper`,T=` ${"left"===s.align?"justify-content: flex-start":"center"===s.align?"justify-content: center":"right"===s.align?"justify-content: flex-end":""}\n\t`;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${pa("",d.typography).googleFontLink}\n\t\t\t${pa("",p.typography).googleFontLink}\n\t\t\t${pa("",h.typography).googleFontLink}\n\t\t\t${pa("",i.typography).googleFontLink}\n\t\t\t${pa("",g.typo).googleFontLink}\n\t\t\t${pa("",m.typo).googleFontLink}\n\n\t\t\t${pa(w,p.typography).styles}\n\t\t\t${pa(_,h.typography).styles}\n\t\t\t${pa(v,d.typography).styles}\n\t\t\t${pa(C,i.typography).styles}\n\t\t\t${pa(j,g.typo).styles}\n\t\t\t${pa($,m.typo).styles}\n\n\t\t\t${b}{\n\t\t\t\t${"custom"===s.width.type?T:""}\n\t\t\t}\n\n\t\t\t${f}{\n\t\t\t\t${oa(s.bg)}\n\t\t\t\t${"custom"===s.width.type?na("width",s.width.desktop):""}\n\t\t\t\t${na("margin",ha(s.desktop.margin))}\n\t\t\t\t${na("padding",ha(s.desktop.padding))}\n\t\t\t\t${sa(s.border)}\n\t\t\t\t${na("border-radius",ha(s.desktop.radius))}\n\t\t\t\t${na("box-shadow",la(s.shadow))}\n\t\t\t}\n\n\t\t\t${S}{\n\t\t\t\tdisplay:grid;\n\t\t\t\t${na("gap",s.desktop.fieldGap?s.desktop.fieldGap+"px":"")}\n\t\t\t}\n\t\t\t\n\t\t\t${y}{\n\t\t\t\t${na("margin",ha(c.desktop.margin))}\n\t\t\t\tflex-direction:${c.desktop.display};\n\t\t\t\t${"row"===c.desktop.display?"align-items: center;":`align-items:${c.desktop.align};`}\n\t\t\t\t${na("justify-content",c.desktop.justify)}\n\t\t\t\t${"row"===c.desktop.display?"":na("gap",c.desktop.gap)}\n\t\t\t}\n\n\t\t\t${v}{\n\t\t\t\t\t${na("margin",ha(d.desktop.margin))}\n\t\t\t\t\t${na("padding",ha(d.desktop.padding))}\n\t\t\t\t\t${na("color",d.normal.color)}\n\t\t\t\t\t${oa(d.normal.bg)}\n\t\t\t\t\t${sa(d.normal.desktop.border)}\n\t\t\t\t\t${na("border-radius",ha(d.normal.desktop.radius))}\n\t\t\t\t\t${na("box-shadow",la(d.normal.desktop.shadow))}\n\t\t\t}\n\n\t\t\t${v}:hover{\n\t\t\t\t\t${na("color",d.hover.color)}\n\t\t\t\t\t${oa(d.hover.bg)}\n\t\t\t\t\t${sa(d.hover.desktop.border)}\n\t\t\t\t\t${na("border-radius",ha(d.hover.desktop.radius))}\n\t\t\t\t\t${na("box-shadow",la(d.hover.desktop.shadow))}\n\t\t\t}\n\t\t\t${v}>.b-form-button-loading-spinner{\n\t\t\t\t${na("color",ha(a.spinner.color))}\n\t\t\t\t${na("fill",ha(a.spinner.color))}\n\t\t\t\t${na("margin",ha(a.spinner.margin))}\n\t\t\t\t${na("width",a.spinner.size)}\n\t\t\t\t${na("height",a.spinner.size)}\n\t\t\t}\n\n\t\t\t${w}{\n\t\t\t\t${na("color",p.color)}\n\t\t\t\t${na("margin",ha(p.desktop.margin))}\n\t\t\t}\n\n\t\t\t${_}{\n\t\t\t\t${na("color",h.color)}\n\t\t\t\t${na("margin",ha(h.desktop.margin))}\n\t\t\t}\n\n\t\t\t${C}{\n\t\t\t\t${na("margin",ha(i.margin.desktop))}\n\t\t\t\t${na("padding",ha(i.padding.desktop))}\n\t\t\t\t${na("color",ha(i.color.text))}\n\t\t\t\t${na("background",ha(i.color.bg))}\n\t\t\t}\n\n\t\t\t${C} .b-blocks-b-form-checkbox-container{\n\t\t\t\t${na("margin",ha(i.checkboxMargin.desktop))}\n\t\t\t}\n\n\t\t\t${C} .b-blocks-b-blocks-termsConditionWrapper-link{\n\t\t\t\t${na("color",i.color.link)}\n\t\t\t}\n\n\t\t\t${C} .b-blocks-b-form-checkbox-container>input:checked ~ .b-blocks-b-form-checkmark {\n\t\t\t\t${na("background",i.color.checkbox)}\n\t\t\t}\n\n\t\t\t${j}{\n\t\t\t\t${na("margin",ha(g.margin))}\n\t\t\t\t${na("padding",ha(g.padding))}\n\t\t\t\t${na("color",g.color.text)}\n\t\t\t\t${oa(g.color.bg)}\n\t\t\t\t${sa(g.border)}\n\t\t\t\t${na("border-radius",ha(g.radius))}\n\t\t\t}\n\t\t\t${$}{\n\t\t\t\t${na("margin",ha(m.margin))}\n\t\t\t\t${na("padding",ha(m.padding))}\n\t\t\t\t${na("color",m.color.text)}\n\t\t\t\t${oa(m.color.bg)}\n\t\t\t\t${sa(m.border)}\n\t\t\t\t${na("border-radius",ha(m.radius))}\n\t\t\t}\n\n\t`.replace(/\s+/g," ").trim()}})})},oj=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M12.83 352h262.34A12.82 12.82 0 0 0 288 339.17v-38.34A12.82 12.82 0 0 0 275.17 288H12.83A12.82 12.82 0 0 0 0 300.83v38.34A12.82 12.82 0 0 0 12.83 352zm0-256h262.34A12.82 12.82 0 0 0 288 83.17V44.83A12.82 12.82 0 0 0 275.17 32H12.83A12.82 12.82 0 0 0 0 44.83v38.34A12.82 12.82 0 0 0 12.83 96zM432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"})}),ij=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),sj=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M16 224h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm416 192H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm3.17-384H172.83A12.82 12.82 0 0 0 160 44.83v38.34A12.82 12.82 0 0 0 172.83 96h262.34A12.82 12.82 0 0 0 448 83.17V44.83A12.82 12.82 0 0 0 435.17 32zm0 256H172.83A12.82 12.82 0 0 0 160 300.83v38.34A12.82 12.82 0 0 0 172.83 352h262.34A12.82 12.82 0 0 0 448 339.17v-38.34A12.82 12.82 0 0 0 435.17 288z"})}),aj=e=>(0,l.jsx)("svg",{fill:"hsl(228, 97%, 42%)",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsxs)("g",{children:[(0,l.jsx)("circle",{cx:"12",cy:"2.5",r:"1.5",opacity:".14"}),(0,l.jsx)("circle",{cx:"16.75",cy:"3.77",r:"1.5",opacity:".29"}),(0,l.jsx)("circle",{cx:"20.23",cy:"7.25",r:"1.5",opacity:".43"}),(0,l.jsx)("circle",{cx:"21.50",cy:"12.00",r:"1.5",opacity:".57"}),(0,l.jsx)("circle",{cx:"20.23",cy:"16.75",r:"1.5",opacity:".71"}),(0,l.jsx)("circle",{cx:"16.75",cy:"20.23",r:"1.5",opacity:".86"}),(0,l.jsx)("circle",{cx:"12",cy:"21.5",r:"1.5"}),(0,l.jsx)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"discrete",dur:"0.75s",values:"0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12",repeatCount:"indefinite"})]})}),rj=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],lj=[{label:"Default",value:"default"},{label:"Administrator",value:"administrator"},{label:"Editor",value:"editor"},{label:"Author",value:"author"},{label:"Contributor",value:"contributor"},{label:"Subscriber",value:"subscriber" |
| 421 |
}],cj=((0,x.__)("Container","b-blocks"),(0,x.__)("Form Wrapper","b-blocks"),(0,x.__)("Form","b-blocks"),(0,x.__)("Header Content","b-blocks"),(0,x.__)("Logo","b-blocks"),(0,x.__)("Image","b-blocks"),(0,x.__)("Title","b-blocks"),(0,x.__)("Subtitle","b-blocks"),[{label:"Start",value:"start"},{label:"End",value:"end"},{label:"Center",value:"center"},{label:"Space Between",value:"space-between"},{label:"Space Around",value:"space-around"},{label:"Space Evenly",value:"space-evenly"}]),dj=({attributes:e,updateObj:t})=>{const{button:n}=e,{navigation:o}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Button","b-blocks"),children:[(0,l.jsx)(v,{className:"mt0 mb10",children:(0,l.jsx)("strong",{children:"Submit Button"})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Button Text","b-blocks"),value:n.button.text,onChange:e=>t("button",e,"button","text")}),(0,l.jsx)("hr",{}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Navigation","b-blocks"),checked:o.isNavigation,value:o.isNavigation,onChange:e=>t("button",e,"navigation","isNavigation")}),o.isNavigation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10 mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Navigate Button","b-blocks")})}),(0,l.jsxs)(y.Flex,{align:"normal",gap:3,children:[(0,l.jsx)(y.TextControl,{value:n.navigation.first.text,onChange:e=>t("button",e,"navigation","first","text")}),(0,l.jsxs)("div",{children:[(0,l.jsx)(y.TextControl,{className:"mb0",value:n.navigation.second.text,onChange:e=>t("button",e,"navigation","second","text")}),(0,l.jsx)("small",{children:(0,x.__)("Second option is linkable","b-blocks")})]})]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Sign In URL","b-blocks"),value:n.navigation.second.url,placeholder:`${window.location.origin}/login`,onChange:e=>t("button",e,"navigation","second","url")})]})]})},uj=(0,f.withSelect)((e=>{const{getUsers:t}=e("core");return{users:(t()||[]).filter((e=>Array.isArray(e.roles)&&e.roles.includes("administrator")))}}))((({attributes:e,updateObj:t,users:n})=>{const{emailOptions:o}=e,i=n.map((e=>({label:e?.username,value:e?.email})));return(0,m.useEffect)((()=>{""===o.admin.email&&i.length>0&&t("emailOptions",i[0]?.value,"admin","email")}),[i]),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Email Options","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:[{title:"User",name:"user"},{title:"Admin",name:"admin"}],onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Email Template Type","b-blocks")}),(0,l.jsx)(y.SelectControl,{options:[{label:"WordPress Default",value:"default"},{label:"Custom",value:"custom"}],value:o[e.name].type,onChange:n=>t("emailOptions",n,e.name,"type")}),"custom"===o[e.name].type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Email Subject","b-blocks"),value:o[e.name].mail.subject,onChange:n=>t("emailOptions",n,e.name,"mail","subject")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("From (administrator)","b-blocks"),options:i,value:o.admin.email,onChange:e=>t("emailOptions",e,"admin","email")}),(0,l.jsx)(v,{children:(0,x.__)("Email Message","b-blocks")}),(0,l.jsx)(Ls,{value:o[e.name].mail.message,onChange:n=>t("emailOptions",n,e.name,"mail","message")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Email Content Type","b-blocks"),labelPosition:"edge",options:[{label:"HTML",value:"html"},{label:"Plain",value:"plain"}],value:o[e.name].messageType,onChange:n=>t("emailOptions",n,e.name,"messageType")})]})]})})})})),pj=({attributes:e,handleReplaceForm:t})=>{const{form:n}=e;return(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Form","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Form Type","b-blocks"),labelPosition:"edge",options:[{label:"Register",value:"register"},{label:"Login",value:"login"}],value:n.formType,onChange:e=>t(e)})})},hj=({attributes:e,setAttributes:t,updateObj:n})=>{const{formOptions:o,form:i}=e,{formType:s}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Form Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Redirect","b-blocks"),checked:o.isRedirect,value:o.isRedirect,onChange:e=>t({formOptions:be(o,e,"isRedirect")})}),o.isRedirect&&(0,l.jsxs)(l.Fragment,{children:[!o.redirectPrevious&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Custom Redirect URL","b-blocks"),value:o.customUrl,placeholder:location,onChange:e=>n("formOptions",e,"customUrl")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Redirect to Previous Page","b-blocks"),checked:o.redirectPrevious,value:o.redirectPrevious,onChange:e=>n("formOptions",e,"redirectPrevious")})]}),"register"===s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("New User Role","b-blocks"),value:o.userRole,onChange:e=>n("formOptions",e,"userRole"),options:lj})]})]})},gj=({attributes:e,updateObj:t})=>{const{message:n}=e;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Message","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Demo Success message"),value:n.isShowDemoSuccess,checked:n.isShowDemoSuccess,onChange:e=>t("message",e,"isShowDemoSuccess")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Demo Error message"),value:n.isShowDemoError,checked:n.isShowDemoError,onChange:e=>t("message",e,"isShowDemoError")}),(0,l.jsx)("div",{className:"mt10",children:(0,l.jsx)("strong",{children:"Success"})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Success Message","b-blocks"),value:n.success.successFulRegistration,onChange:e=>t("message",e,"success","successFulRegistration")}),(0,l.jsx)("p",{className:"mt10 mb0",children:(0,l.jsx)("strong",{children:"Error"})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Default Message","b-blocks"),value:n.error.default,onChange:e=>t("message",e,"error","default")})]})},mj=({attributes:e,setAttributes:t})=>{const{button:n}=e;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Sign Out","b-blocks"),className:"bPlPanelBody",children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Sign Out Label Text","b-blocks"),value:n?.signout?.text?.first,onChange:e=>t({button:{...n,signout:{...n?.signout,text:{...n?.signout?.text,first:e}}}})}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Sign Out Button Text","b-blocks"),value:n?.signout?.text?.second,onChange:e=>t({button:{...n,signout:{...n?.signout,text:{...n?.signout?.text,second:e}}}})})]})},bj=window.location.origin;window.location.origin,window.location.pathname;const fj=({attributes:e,updateObj:t})=>{const{termsConditions:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Terms & Conditions","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enforce Terms & Conditions","b-blocks"),checked:n.show,value:n.show,onChange:e=>t("termsConditions",e,"show")}),n.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("First label","b-blocks"),value:n.label.first,onChange:e=>t("termsConditions",e,"label","first")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Second label (Second Label is linkable)","b-blocks"),value:n.label.second,onChange:e=>t("termsConditions",e,"label","second")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Terms & Conditions URL","b-blocks"),value:n.url,placeholder:bj,onChange:e=>t("termsConditions",e,"url")})]})]})},xj=e=>{const{attributes:t}=e,{form:n}=t,{formType:o}=n;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(pj,{...e}),(0,l.jsx)(dj,{...e}),"contact"!==o&&(0,l.jsx)(hj,{...e}),"register"===o&&(0,l.jsx)(uj,{...e}),"register"===o&&(0,l.jsx)(fj,{...e}),(0,l.jsx)(gj,{...e}),"contact"!==o&&(0,l.jsx)(mj,{...e})]})},yj=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0, |
| 422 |
m.useState)("container"),[s,a]=(0,m.useState)("normal"),{styles:r}=e,{buttonStyle:c}=r,{container:d,navigation:u}=c,{first:p,second:h}=u;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e)},className:"mt10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Container",value:"container"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Button",value:"button"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Navigation",value:"navigation"})]}),"container"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:d[n].margin,onChange:e=>t("styles",e,"buttonStyle","container",n,"margin")}),(0,l.jsx)(Ve,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Display As","b-blocks")," ",(0,l.jsx)(_,{})]}),options:[{label:"Inline",value:"row"},{label:"Block",value:"column"}],value:d[n].display,onChange:e=>t("styles",e,"buttonStyle","container",n,"display")}),"row"===d[n].display&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.SelectControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Justify Content","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",options:cj,value:d[n].justify,onChange:e=>t("styles",e,"buttonStyle","container",n,"justify")})}),"column"===d[n].display&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isDeselectable:!0,value:d[n].align,onChange:e=>t("styles",e,"buttonStyle","container",n,"align"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:(0,l.jsx)(oj,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(ij,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:(0,l.jsx)(sj,{})})]})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Gap","b-blocks"),(0,l.jsx)(_,{})]}),labelPosition:"edge",value:d[n].gap,onChange:e=>t("styles",e,"buttonStyle","container",n,"gap")})]})]}),"button"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:c.button[n].margin,onChange:e=>t("styles",e,"buttonStyle","button",n,"margin")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:c.button[n].padding,onChange:e=>t("styles",e,"buttonStyle","button",n,"padding")}),(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:c.button.typography,onChange:e=>t("styles",e,"buttonStyle","button","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>{a(e)},className:"mt10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:c.button[s].color,onChange:e=>t("styles",e,"buttonStyle","button",s,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:c.button[s].bg,onChange:e=>t("styles",e,"buttonStyle","button",s,"bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c.button[s][n].border,onChange:e=>t("styles",e,"buttonStyle","button",s,n,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c.button[s][n].radius,onChange:e=>t("styles",e,"buttonStyle","button",s,n,"radius")}),(0,l.jsx)(yt,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Shadow","b-blocks")," ",(0,l.jsx)(_,{})]}),value:c.button[s][n].shadow,onChange:e=>t("styles",e,"buttonStyle","button",s,n,"shadow")})]}),"navigation"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"mt10",children:(0,l.jsx)("strong",{children:"First Text"})}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:p.color,onChange:e=>t("styles",e,"buttonStyle","navigation","first","color")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p[n].margin,onChange:e=>t("styles",e,"buttonStyle","navigation","first",n,"margin")}),(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:p.typography,onChange:e=>t("styles",e,"buttonStyle","navigation","first","typography")}),(0,l.jsx)("hr",{}),(0,l.jsx)("strong",{children:"Second Linkable Text"}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:h.color,onChange:e=>t("styles",e,"buttonStyle","navigation","second","color")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:h[n].margin,onChange:e=>t("styles",e,"buttonStyle","navigation","second",n,"margin")}),(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:h.typography,onChange:e=>t("styles",e,"buttonStyle","navigation","second","typography")})]}),(0,l.jsx)("hr",{className:"mt10 mb10"}),(0,l.jsx)("strong",{children:"Spinner"}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Demo spinner","b-blocks"),checked:c.spinner.isDemo,value:c.spinner.isDemo,onChange:e=>t("styles",e,"buttonStyle","spinner","isDemo")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Size","b-blocks"),value:c.spinner.size,onChange:e=>t("styles",e,"buttonStyle","spinner","size")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:c.spinner.color,onChange:e=>t("styles",e,"buttonStyle","spinner","color")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c.spinner.margin,onChange:e=>t("styles",e,"buttonStyle","spinner","margin")})]})},vj=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{form:i}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Form","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Form Width","b-blocks"),labelPosition:"edge",options:[{label:"Full Width (100%)",value:"full"},{label:"Custom",value:"custom"}],value:i.width.type,onChange:e=>t("styles",e,"form","width","type")}),"custom"===i.width.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks"),(0,l.jsx)(_,{})]}),labelPosition:"edge",value:i.width[n],onChange:e=>t("styles",e,"form","width",n),isUnitSelectTabbable:!0}),(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isDeselectable:!0,value:i.align,onChange:e=>t("styles",e,"form","align"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:(0,l.jsx)(oj,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(ij,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:(0,l.jsx)(sj,{})})]})]})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i.bg,onChange:e=>t("styles",e,"form","bg")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),values:i[n].margin,onChange:e=>t("styles",e,"form",n,"margin")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i[n].padding, |
| 423 |
onChange:e=>t("styles",e,"form",n,"padding")}),(0,l.jsx)(y.RangeControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Field Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i[n].fieldGap,onChange:e=>t("styles",e,"form",n,"fieldGap")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i.border,onChange:e=>t("styles",e,"form","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[n].radius,onChange:e=>t("styles",e,"form",n,"radius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:i.shadow,onChange:e=>t("styles",e,"form","shadow")})]})},kj=({attributes:e,updateObj:t})=>{const{styles:n}=e,{message:o}=n;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Messages","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:[{title:"Success",name:"success"},{title:"Error",name:"error"}],onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Padding","b-blocks"),values:o[e.name].padding,onChange:n=>t("styles",n,"message",e.name,"padding")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),values:o[e.name].margin,onChange:n=>t("styles",n,"message",e.name,"margin")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o[e.name].color.text,onChange:n=>t("styles",n,"message",e.name,"color","text")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),isImage:!1,value:o[e.name].color.bg,onChange:n=>t("styles",n,"message",e.name,"color","bg")}),(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:o[e.name].typo,onChange:n=>t("styles",n,"message",e.name,"typo")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o[e.name].border,onChange:n=>t("styles",n,"message",e.name,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius"),values:o[e.name].radius,onChange:n=>t("styles",n,"message",e.name,"radius")})]})})})},wj=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n})=>{const{termsConditions:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Terms & Conditions","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o.margin[n],onChange:e=>t("termsConditions",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o.padding[n],onChange:e=>t("termsConditions",e,"padding",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Checkbox Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o.checkboxMargin[n],onChange:e=>t("termsConditions",e,"checkboxMargin",n)}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:o.color.text,onChange:e=>t("termsConditions",e,"color","text")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Link Color","b-blocks"),value:o.color.link,onChange:e=>t("termsConditions",e,"color","link")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Background Color","b-blocks"),value:o.color.bg,onChange:e=>t("termsConditions",e,"color","bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Checkbox","b-blocks"),value:o.color.checkbox,onChange:e=>t("termsConditions",e,"color","checkbox")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:o.typography,onChange:e=>t("termsConditions",e,"typography")})]})})),_j=e=>{const{attributes:t}=e,{termsConditions:n,form:o}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(vj,{...e}),(0,l.jsx)(yj,{...e}),n.show&&"register"===o.formType&&(0,l.jsx)(wj,{...e}),(0,l.jsx)(kj,{...e})]})},Cj=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:rj,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(xj,{...e}),"style"===t.name&&(0,l.jsx)(_j,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},jj="b-blocks-input-field-error-container",$j={invalid_email:{name:"email",message:"Incorrect email"},invalid_username:{name:"username",message:"Incorrect username"},incorrect_password:{name:"password",message:"Incorrect password"}},Sj=(e,t)=>{if(!e)return{container:null,messageEl:null};const n=e.querySelector(`.b-blocks-input-field-validation-${t}`),o=n?.querySelector(".b-blocks-input-field-error-message");return{container:n,messageEl:o}},Tj=(e,t,n)=>{const{container:o,messageEl:i}=Sj(e,t);o&&i&&(i.style.display="unset",i.textContent=n,o.classList.add(jj))},Mj=(e,t)=>{const{container:n,messageEl:o}=Sj(e,t);n&&o&&(o.style.display="none",n.classList.remove(jj))},Nj=({children:e,attributes:t,isFrontend:n=!1})=>{const{form:o,button:i,termsConditions:s,message:a,formId:r,postId:c,formOptions:d,styles:u}=t,{navigation:p}=i,h=!n&&a.isShowDemoSuccess,g=!n&&a.isShowDemoError,[b,f]=(0,m.useState)(!1),[x,y]=(0,m.useState)(!1),v=window.bBlocksCursorDataConfig?.nonce,{data:k,saveData:w,error:_,isLoading:C,isError:j}=_d("b_form_submit",{_nonce:v},!1),$=(0,m.useRef)("");return((e,t,n,o)=>{(0,m.useEffect)((()=>{const t=n?.current;if(t&&e){if("register"===o){const n=(e=>{if(!e)return[];const t=new FormData(e);return Array.from(t.keys())})(t),o=e?.message||"";n.forEach((e=>{"string"==typeof o&&o.toLowerCase().includes(e.toLowerCase())?Tj(t,e,o):Mj(t,e)}))}if("login"===o){const n=e?.errorCode;(e=>{["email","username","password"].forEach((t=>Mj(e,t)))})(t);const o=$j[n];o&&Tj(t,o.name,o.message)}}}),[e,t,n,o])})(_,j,$,o.formType),(0,m.useEffect)((()=>{_&&_?.message?.includes("Something went wrong")&&y(!0),k&&(f(!0),$.current.reset(),d.isRedirect&&(d.redirectUrl&&!d.redirectPrevious?setTimeout((()=>{window.location.href=d.redirectUrl}),500):d.redirectPrevious?setTimeout((()=>{window.history.back()}),1e3):window.location.href="/"))}),[_,C,k]),(0,l.jsxs)("div",{className:"b-blocks-b-form-wrapper",children:[(0,l.jsxs)("form",{onSubmit:e=>{e.preventDefault();const t=e.target;let n=[];const i=new FormData(e.target),s=Object.fromEntries(i);Object.keys(s).forEach((e=>{const o=(e=>{const n=t.querySelector(`.b-blocks-input-field-validation-${e}`);if(n)return JSON.parse(n.dataset.iserror)?(n.classList.add("b-blocks-input-field-error-container"),e):void(_||n.classList.remove("b-blocks-input-field-error-container"))})(e);o&&n.push(o)})),n.length>0?y(!0):w({...s,type:o.formType,current_post_id:c,formId:r})},className:"b-blocks-b-form-container",ref:$,children:[e,s.show&&"register"===o.formType&&(0,l.jsxs)("div",{className:"b-blocks-b-form-termsConditionWrapper",children:[(0,l.jsxs)("label",{className:"b-blocks-b-form-checkbox-container",children:[(0,l.jsx)("input",{type:"checkbox",required:!0}),(0,l.jsx)("span",{className:"b-blocks-b-form-checkmark"})]}),(0,l.jsx)("label",{className:"b-blocks-b-blocks-termsConditionWrapper-first",children:s.label.first}),(0,l.jsx)("a",{className:"b-blocks-b-blocks-termsConditionWrapper-link",href:s.url,children:s.label.second})]}),(0,l.jsxs)("div",{className:"b-blocks-form-button-wrapper",children:[(0,l.jsxs)("button",{className:"b-blocks-form-submitBtn",type:"submit",children:[i.button.text," ",C&&n&&(0,l.jsx)(aj,{className:"b-form-button-loading-spinner"})," ",!n&&u.buttonStyle.spinner.isDemo&&(0,l.jsx)(aj,{className:"b-form-button-loading-spinner"})," "]}),p.isNavigation&&(p.first.text||p.second.text)&&(0,l.jsxs)("div",{className:"b-blocks-form-button-navigation-wrapper",children:[(0,l.jsx)("p",{ |
| 424 |
className:"b-blocks-form-button-navigation-text",children:p.first.text})," ",(0,l.jsx)("a",{className:"b-blocks-form-button-navigation-link",href:p.second.url,children:p.second.text})," "]})]})]}),b&&a.success.successFulRegistration&&(0,l.jsx)("div",{className:"b-blocks-b-form-success-message",children:(0,l.jsx)("span",{children:a.success.successFulRegistration})}),h&&(0,l.jsx)("div",{className:"b-blocks-b-form-success-message",children:(0,l.jsx)("span",{children:a.success.successFulRegistration})}),x&&a.error.default&&(0,l.jsx)("div",{className:"b-blocks-b-form-error-message",children:(0,l.jsx)("span",{children:a.error.default})}),g&&(0,l.jsx)("div",{className:"b-blocks-b-form-error-message",children:(0,l.jsx)("span",{children:a.error.default})})]})},Lj=(0,f.withSelect)((e=>{const{getDeviceType:t,getCurrentPostId:n}=e("core/editor");return{device:t()?.toLowerCase(),postId:n()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,postId:s}=e,{form:a,button:r,formId:c,message:d}=t,{replaceInnerBlocks:u}=(0,f.useDispatch)("core/block-editor"),g=fe(t,n);(0,m.useEffect)((()=>{n({clientId:o})}),[o]);const b=(0,f.useSelect)((e=>e("core/block-editor").getBlocks(o)),[o]),x=e=>{(e=>{const t={form:{...a,formType:"login"},button:{...r,navigation:{...r.navigation,first:{...r.navigation.first,text:"Not registered yet?"},second:{...r.navigation.second,text:"Create an Account"}}},message:{...d,success:{...d.success,successFulRegistration:"Login completed successfully!"}}},o={form:{...a,formType:"register"},button:{...r,navigation:{...r.navigation,first:{...r.navigation.first,text:"Already have an account?"},second:{...r.navigation.second,text:"Sign In"}}},message:{...d,success:{...d.success,successFulRegistration:"Registration completed successfully!"}}};"register"===e?n(o):"login"===e&&n(t)})(e);const t=tj[e].map((e=>(0,p.createBlock)(e.name,e.attributes||{})));u(o,t,!1)};return(0,m.useEffect)((()=>{const e="b_form_"+Math.floor(1e9*Math.random()).toString();c||""!==c||n({formId:e}),jt(s)&&n({postId:s})}),[s]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Cj,{attributes:t,setAttributes:n,updateObj:g,isPremium:!1,device:i,clientId:o,handleReplaceForm:x}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(nj,{attributes:t,id:`block-${o}`,isBackend:!0}),""===a.formType&&(0,l.jsx)(ej,{updateObj:g,clientId:o,handleReplaceForm:x}),""!==a.formType&&(0,l.jsx)(Nj,{attributes:t,isFrontend:!1,children:(0,l.jsx)("div",{className:"b-blocks-b-form-child-field-wrapper",children:(0,l.jsx)(h.InnerBlocks,{allowedBlocks:["b-blocks/input-field","b-blocks/row","b-blocks/dual-color-heading","b-blocks/icon-box","b-blocks/advanced-image","core/paragraph"],templateLock:!1,renderAppender:()=>b?.length>0?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):(0,l.jsx)(h.InnerBlocks.ButtonBlockAppender,{})})})})]})]})}));Nl(JC.name)&&(0,p.registerBlockType)(JC,{icon:Jr,edit:Lj,save:h.InnerBlocks.Content});const Ej=JSON.parse('{"apiVersion":3,"name":"b-blocks/gif","title":"Gif Image","description":"Embed gif image.","category":"bBlocks","keywords":["video image","embed gif image","animated image"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"cId":{"type":"string","default":""},"gif":{"type":"object","default":null},"gifAlign":{"type":"string","default":"center"},"gifWidth":{"type":"string","default":"0px"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Pj="bBlocksGif";Nl(Ej.name)&&(0,p.registerBlockType)(Ej,{icon:vr,edit:e=>{const{attributes:{gif:t,gifAlign:n,gifWidth:o},setAttributes:i,clientId:s}=e;(0,m.useEffect)((()=>{s&&i({cId:s.substring(0,10)})}),[s]);const a=(0,m.useRef)(null),[r,c]=(0,m.useState)(""),[d,u]=(0,m.useState)([]),p=`block-${s}`,g="dM3iQq13qK0Mls9ygR2zjxxPDQVlw1Ql";""===r&&(0,m.useEffect)((()=>{fetch(`https://api.giphy.com/v1/gifs/trending?api_key=${g}&limit=25`).then((e=>e.json())).then((e=>{u(e.data)})).catch((e=>alert(e.message)))}),[r]),r&&""!==r&&(0,m.useEffect)((()=>{fetch(`https://api.giphy.com/v1/gifs/search?api_key=${g}&limit=25&q=${r}`).then((e=>e.json())).then((e=>{u(e.data)})).catch((e=>alert(e.message)))}),[r]);const b=e=>{const t=a.current?.ownerDocument;if(!t)return;const n=t.getElementById(p),o=t.getElementById(`gifModal-${s}`);n&&o&&(n.style.minHeight=e?"720px":"auto",o.style.display=e?"block":"none")},f=()=>b(!0),v=()=>b(!1);return(0,m.useEffect)((()=>{const e=a.current?.ownerDocument,t=e?.defaultView;if(!t)return;const n=t=>{const n=e.getElementById(p),o=e.getElementById(`gifModal-${s}`);n&&o&&t.target===o&&(n.style.minHeight="auto",o.style.display="none")};return t.addEventListener("click",n),()=>t.removeEventListener("click",n)}),[p,s]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:un}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Gif Settings","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:o,onChange:e=>i({gifWidth:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)("small",{children:(0,x.__)("Keep width 0, to auto width.","b-blocks")})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>i({gifAlign:e}),describedBy:(0,x.__)("GIF Alignment"),alignmentControls:[{title:(0,x.__)("GIF in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("GIF in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("GIF in right","b-blocks"),align:"right",icon:"align-right"}]})}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({ref:a}),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t#${p} .${Pj}{\n\t\t\t\t\ttext-align: ${n};\n\t\t\t\t}\n\t\t\t\t#${p} .${Pj} figure{\n\t\t\t\t\twidth: ${"0px"===o||"0%"===o||"0em"===o?"auto":o};\n\t\t\t\t}\n\t\t\t`.replace(/\s+/g," ")}}),(0,l.jsxs)("div",{className:Pj,children:[(0,l.jsxs)("figure",{className:"editImageHolder",children:[t&&(0,l.jsx)("img",{src:t?.images?.original?.url,alt:t?.title}),(0,l.jsx)("div",{className:"mediaControl",children:t?(0,l.jsxs)("div",{className:"btnControl",children:[(0,l.jsx)(y.Button,{icon:"controls-repeat",onClick:f,children:(0,x.__)("Replace","b-blocks")}),(0,l.jsx)(y.Button,{icon:"exit",onClick:()=>i({gif:null}),className:"btnRed",children:(0,x.__)("Remove","b-blocks")})]}):(0,l.jsx)("div",{className:"btnControl",children:(0,l.jsx)(y.Button,{icon:"upload",onClick:f,children:(0,x.__)("Insert GIF","b-blocks")})})})]}),(0,l.jsxs)("div",{className:"gifModal",id:`gifModal-${s}`,children:[(0,l.jsxs)("div",{className:"gifModalContent",children:[(0,l.jsx)("span",{className:"close",onClick:v,children:"×"}),(0,l.jsxs)("div",{className:"gifModalHeader",children:[(0,l.jsx)("label",{htmlFor:`gifSrcBox-${s}`,children:"Search Gif:"}),(0,l.jsx)(y.TextControl,{className:"gifSearchField",value:r,id:`gifSrcBox-${s}`,onChange:e=>c(e),placeholder:(0,x.__)("Search gif here","b-blocks")})]}),(0,l.jsx)("div",{className:"gifModalBody",children:(0,l.jsx)("div",{className:"gifData",children:0!==d.length&&d.map((e=>(0,l.jsxs)("figure",{onClick:()=>{i({gif:e,width:`${parseInt(e.images.original.width)}px`}),v()},children:[(0,l.jsx)("img",{src:e.images.downsized.url,alt:e.title}),(0,l.jsx)("figcaption",{children:e.title})]},e.id)))})})," "]})," "]})," "]})]})]})},save:()=>null}) |
| 425 |
;const Aj=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/google-map","title":"Google Map","category":"bBlocks","description":"A fully interactive Google Map: custom markers with rich info windows, clustering, category filtering, map themes, traffic/transit/KML/GeoJSON layers, shapes, directions, search and geolocation — plus the classic embed-URL mode.","keywords":["google map","map","marker","location","directions","store locator","embed","contact"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"source":{"type":"object","default":{"type":"interactive","embedUrl":"","center":{"lat":"","lng":"","address":""},"mapId":"","language":"","region":""}},"map":{"type":"object","default":{"zoom":12,"minZoom":"","maxZoom":"","mapType":"roadmap","allowTypeSwitch":true,"gestureHandling":"cooperative","draggable":true,"scrollwheel":false,"fitBounds":false,"desktop":{"height":"450px","maxWidth":"","align":"center"},"tablet":{"height":"350px","maxWidth":"","align":""},"mobile":{"height":"250px","maxWidth":"","align":""},"useAspectRatio":false,"aspectRatio":{"desktop":"16/9","tablet":"","mobile":""},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{},"mobile":{}},"shadow":[]}},"controls":{"type":"object","default":{"disableDefaultUI":false,"zoom":true,"zoomPosition":"RIGHT_BOTTOM","mapType":true,"streetView":true,"fullscreen":true,"scale":false,"rotate":false,"keyboardShortcuts":true}},"markers":{"type":"array","default":[{"id":"marker-1","title":"Our Office","content":"<p>Drop by any weekday between 9am and 5pm.</p>","address":"","lat":23.8103,"lng":90.4125,"category":"","icon":{"type":"default","url":{"library":"","upload":""}},"image":{"url":"","alt":""},"pinColor":"","glyphColor":"","animation":"","draggable":true,"openByDefault":false}]},"marker":{"type":"object","default":{"pinColor":"#8a2be2","glyphColor":"#ffffff","borderColor":"#ffffff","scale":1,"animation":"none","desktop":{"size":"40px"},"tablet":{"size":""},"mobile":{"size":""}}},"infoWindow":{"type":"object","default":{"trigger":"click","singleOpen":true,"bgColor":"#ffffff","textColor":"#1e1e1e","typo":{"fontSize":{"desktop":"14px"}},"border":{"width":"0px"},"shadow":[],"desktop":{"maxWidth":"280px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"maxWidth":"","padding":{},"radius":{}},"mobile":{"maxWidth":"","padding":{},"radius":{}}}},"clustering":{"type":"object","default":{"enabled":false,"background":{"type":"solid","color":"#8a2be2"},"color":"#8a2be2","size":"40px","textColor":"#ffffff","clickToZoom":true}},"categories":{"type":"array","default":[]},"filterBar":{"type":"object","default":{"show":false,"align":"left","showAll":true,"allLabel":"All","activeColor":"#8a2be2","color":"#1e1e1e","bgColor":"#f0f0f0","activeTextColor":"#ffffff","typo":{"fontSize":{"desktop":"13px"}},"desktop":{"gap":"8px","padding":{"top":"6px","right":"14px","bottom":"6px","left":"14px"},"radius":{"top":"999px","right":"999px","bottom":"999px","left":"999px"}},"tablet":{"gap":"","padding":{},"radius":{}},"mobile":{"gap":"","padding":{},"radius":{}}}},"theme":{"type":"object","default":{"preset":"default","customJson":"","grayscale":0,"saturation":0,"hue":""}},"layers":{"type":"object","default":{"traffic":false,"transit":false,"bicycling":false,"kmlUrl":"","geoJson":"","fitGeoJson":true,"heatmap":{"enabled":false,"radius":20,"opacity":0.6}}},"shapes":{"type":"array","default":[]},"directions":{"type":"object","default":{"enabled":false,"mode":"DRIVING","origin":{"address":"","lat":"","lng":""},"destination":{"address":"","lat":"","lng":""},"waypoints":[],"showPanel":false,"routeColor":"#2A6DF0"}},"tools":{"type":"object","default":{"searchBox":false,"geolocation":false,"nearbyRadius":0}},"performance":{"type":"object","default":{"lazyLoad":"onView"}},"caption":{"type":"object","default":{"text":"","align":"center","color":"","typo":{"fontSize":{"desktop":"14px"}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"linear","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"angel":90},"img":{"url":""}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),Bj="b-blocks-google-map",Ij={lat:23.8103,lng:90.4125},Oj=[{label:(0,x.__)("16:9 (Widescreen)","b-blocks"),value:"16/9"},{label:(0,x.__)("4:3 (Standard)","b-blocks"),value:"4/3"},{label:(0,x.__)("1:1 (Square)","b-blocks"),value:"1/1"},{label:(0,x.__)("3:4 (Portrait)","b-blocks"),value:"3/4"}],Rj=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],zj=/^(www\.|maps\.)?google\.(com|co\.[a-z]{2}|com\.[a-z]{2}|[a-z]{2,3})$/i,Dj=e=>{if(!e||"string"!=typeof e)return!1;try{const t=new URL(e);return"https:"===t.protocol&&!!zj.test(t.hostname)&&!!t.pathname.startsWith("/maps/embed")}catch(e){return!1}},Fj=e=>{const t=String(e?.message||e?.code||"");return/REQUEST_DENIED|PERMISSION|BILLING/i.test(t)?(0,x.__)("Google denied the lookup. The Geocoding API is probably not enabled for this key, or the project has no billing account. Enter the coordinates manually below.","b-blocks"):/OVER_QUERY_LIMIT|OVER_DAILY/i.test(t)?(0,x.__)("This API key is over its request quota. Try again later, or enter the coordinates manually below.","b-blocks"):(0,x.__)("No result for that address. Check the spelling, or enter the coordinates manually below.","b-blocks")},Hj=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","GeometryCollection"],Wj=e=>e&&"Feature"===e.type?e:e&&Hj.includes(e.type)?{type:"Feature",geometry:e,properties:{}}:null,Uj=e=>!(!e||"object"!=typeof e||Array.isArray(e)||void 0===e.stylers&&void 0===e.featureType&&void 0===e.elementType),Gj=e=>Array.isArray(e)?e.length>0&&e.every(Uj):Uj(e),Vj=e=>{if(!e||!String(e).trim())return{data:null,error:""};let t;try{t=JSON.parse(e)}catch(e){return{data:null,error:(0,x.__)("This is not valid JSON, so it will be skipped.","b-blocks")}}if(Array.isArray(t)){const e=t.map(Wj).filter(Boolean);return e.length?{data:{type:"FeatureCollection",features:e},error:""}:{data:null,error:Gj(t)?(0,x.__)("This is a Google Maps style, not GeoJSON. Paste it into Theme → Custom JSON to recolour the map.","b-blocks"):(0,x.__)('This array holds no recognisable GeoJSON features. GeoJSON describes places — each entry needs a "geometry" with coordinates.',"b-blocks")}}if(!t||"object"!=typeof t)return{data:null,error:(0,x.__)("GeoJSON must be an object or an array of features.","b-blocks")};if("FeatureCollection"===t.type||"Feature"===t.type)return{data:t,error:""};const n=Wj(t);return n?{data:n,error:""}:Gj(t)?{data:null,error:(0,x.__)("This is a Google Maps style, not GeoJSON. Paste it into Theme → Custom JSON to recolour the map.","b-blocks")}:{data:null, |
| 426 |
/* translators: %s: the "type" value found in the pasted GeoJSON */ |
| 427 |
error:t.type?(0,x.sprintf)((0,x.__)('Unrecognised GeoJSON type "%s". Expected a Feature, a FeatureCollection, or a geometry.',"b-blocks"),String(t.type)):(0,x.__)('This GeoJSON has no "type" property.',"b-blocks")}},qj=e=>{if(!e||"string"!=typeof e)return!1;try{const{hostname:t}=new URL(e);return/^(localhost|127\.0\.0\.1|\[::1\])$/i.test(t)||/\.(local|test|localhost|internal|invalid)$/i.test(t)||/^(10\.|192\.168\.|172\.(1[6-9]|2\d|3[01])\.)/.test(t)}catch(e){return!1}},Yj=(e,t=null)=>{const n=parseFloat(e);return Number.isFinite(n)?n:t},Kj=(e={})=>{const t=e.source||{},n=t.type||(t.embedUrl?"embed":"interactive");return{...e,source:{...t,type:n,center:{...Ij,...t.center||{}}}}},Qj=(e,t,n)=>{if(!e)return;const o=t=>{const o=e?.[t]?.[n];if(void 0!==o&&""!==o)return o;const i=e?.[n]?.[t];return void 0!==i&&""!==i?i:void 0};return"mobile"===t?o("mobile")??o("tablet")??o("desktop"):"tablet"===t?o("tablet")??o("desktop"):o("desktop")},Zj=(e,t,n)=>e?.[t]?.[n]??e?.[n]?.[t]??"",Xj={default:[],silver:[{elementType:"geometry",stylers:[{color:"#f5f5f5"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#dadada"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#c9c9c9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],retro:[{elementType:"geometry",stylers:[{color:"#ebe3cd"}]},{elementType:"labels.text.fill",stylers:[{color:"#523735"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f1e6"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#c9b2a6"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#a5b076"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#f5f1e6"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#f8c967"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#e9bc62"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#b9d3c2"}]}],dark:[{elementType:"geometry",stylers:[{color:"#212121"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#212121"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#757575"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}],night:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]}],aubergine:[{elementType:"geometry",stylers:[{color:"#1d2c4d"}]},{elementType:"labels.text.fill",stylers:[{color:"#8ec3b9"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a3646"}]},{featureType:"administrative.country",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"landscape.man_made",elementType:"geometry.stroke",stylers:[{color:"#334e87"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#283d6a"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#023e58"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#304a7d"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#2c6675"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0e1626"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#4e6d70"}]}]},Jj=(e={})=>{const{preset:t="default",customJson:n="",grayscale:o=0,saturation:i=0,hue:s=""}=e;let a=[];if("custom"===t)try{const e=JSON.parse(n||"[]");Array.isArray(e)&&(a=e)}catch(e){a=[]}else a=Xj[t]||[];const r=[];return Yj(o,0)&&r.push({saturation:-Math.abs(Yj(o,0))}),Yj(i,0)&&r.push({saturation:Yj(i,0)}),s&&r.push({hue:s}),r.length?[...a,{elementType:"all",stylers:r}]:a},e$=e=>{if(!e||!e.trim())return!0;try{return Array.isArray(JSON.parse(e))}catch(e){return!1}},t$=({attributes:e,id:o,isBackend:i=!1})=>{const{map:s={},marker:a={},infoWindow:r={},clustering:c={},categories:d=[],filterBar:u={},caption:p={},advanced:h}=e,g=`#${o}`,m=`${g} .${Bj}-wrapper`,b=`${g} .${Bj}-canvas`,f=`${g} .${Bj}-iframe`,x=`${g} .${Bj}-caption`,y=`${g} .${Bj}-pin`,v=`${g} .${Bj}-cluster`,k=`${g} .${Bj}-filter-chip`,w=`${g} .${Bj}-filter-bar`,_=`${g} .gm-style-iw-c`,C=`${g} .gm-style-iw-d`,j=`${g} .${Bj}-figure, ${g} .${Bj}-placeholder`,$=(d||[]).filter((e=>e?.id&&e?.color)).map((e=>{const t=String(e.id).replace(/["'\\\]]/g,"");return`\n\t\t\t\t${k}[data-category="${t}"] .${Bj}-filter-dot{ background: ${e.color}; }\n\t\t\t\t${k}[data-category="${t}"].active{ background: ${e.color}; }\n\t\t\t`})).join(""),S=e=>{return`\n\t\t${g}{ ${na("text-align",Qj(s,e,"align"))} }\n\n\t\t${j}{\n\t\t\tmargin: ${t=Qj(s,e,"align"), |
| 428 |
"left"===t?"0 auto 0 0":"right"===t?"0 0 0 auto":"0 auto"};\n\t\t\t${na("max-width",Qj(s,e,"maxWidth"))}\n\t\t}\n\n\t\t${m}{\n\t\t\t${((e,t,n)=>na("border-radius",ha(t?.[n])))(0,s.borderRadius,e)}\n\t\t\t${s.useAspectRatio?na("aspect-ratio",((e,t)=>"string"==typeof e?e:e?"mobile"===t?e.mobile||e.tablet||e.desktop:"tablet"===t&&e.tablet||e.desktop:void 0)(s.aspectRatio,e)||"16/9"):na("height",Qj(s,e,"height"))}\n\t\t}\n\n\t\t${y}{\n\t\t\t${na("width",a?.[e]?.size)}\n\t\t\t${na("height",a?.[e]?.size)}\n\t\t}\n\n\t\t${_}{\n\t\t\t${na("max-width",r?.[e]?.maxWidth)}\n\t\t\t${na("border-radius",ha(r?.[e]?.radius))}\n\t\t}\n\n\t\t${C}{ ${na("padding",ha(r?.[e]?.padding))} }\n\n\t\t${w}{ ${na("gap",u?.[e]?.gap)} }\n\n\t\t${k}{\n\t\t\t${na("padding",ha(u?.[e]?.padding))}\n\t\t\t${na("border-radius",ha(u?.[e]?.radius))}\n\t\t}\n\t`;var t};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${pa("",p.typo).googleFontLink}\n\t\t\t${pa("",u.typo).googleFontLink}\n\t\t\t${pa("",r.typo).googleFontLink}\n\n\t\t\t${g}{ display: block; }\n\n\t\t\t${j}{ width: 100%; }\n\n\t\t\t${m}{\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n\t\t\t\t${na("box-shadow",la(s.shadow||[]))}\n\t\t\t\t${s.useAspectRatio?"height: auto;":""}\n\t\t\t}\n\n\t\t\t${b}, ${f}{\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tborder: 0;\n\t\t\t\tdisplay: block;\n\t\t\t\t${s.useAspectRatio?"position: absolute; inset: 0;":""}\n\t\t\t}\n\n\t\t\t${v}{\n\t\t\t\t${c.background?oa(c.background):na("background",c.color)}\n\t\t\t\t${na("color",c.textColor)}\n\t\t\t\t${na("width",c.size)}\n\t\t\t\t${na("height",c.size)}\n\t\t\t}\n\n\t\t\t${w}{ ${na("justify-content","right"===u.align?"flex-end":"center"===u.align?"center":"flex-start")} }\n\n\t\t\t${k}{\n\t\t\t\t${na("color",u.color)}\n\t\t\t\t${na("background",u.bgColor)}\n\t\t\t}\n\t\t\t${pa(k,u.typo).styles}\n\n\t\t\t${k}.active{\n\t\t\t\t${na("background",u.activeColor)}\n\t\t\t\t${na("color",u.activeTextColor)}\n\t\t\t}\n\n\t\t\t/* After the generic .active rule so a category colour wins. */\n\t\t\t${$}\n\n\t\t\t${_}{\n\t\t\t\t${na("background",r.bgColor)}\n\t\t\t\t${ia(r.border)}\n\t\t\t\t${na("box-shadow",la(r.shadow||[]))}\n\t\t\t}\n\n\t\t\t/* The tail is a separate rotated box; without this a recoloured\n\t\t\t info window keeps a white arrow. Both class names are emitted —\n\t\t\t Google renamed it from -t to -tc. */\n\t\t\t${g} .gm-style-iw-t::after,\n\t\t\t${g} .gm-style-iw-tc::after{\n\t\t\t\t${na("background",r.bgColor)}\n\t\t\t}\n\n\t\t\t${C}, ${g} .${Bj}-info{\n\t\t\t\t${na("color",r.textColor)}\n\t\t\t}\n\t\t\t${pa(`${g} .${Bj}-info`,r.typo).styles}\n\n\t\t\t${x}{\n\t\t\t\t${na("text-align",p.align)}\n\t\t\t\t${na("color",p.color)}\n\t\t\t}\n\t\t\t${pa(x,p.typo).styles}\n\n\t\t\t${S("desktop")}\n\t\t\t${t}{ ${S("tablet")} }\n\t\t\t${n}{ ${S("mobile")} }\n\n\t\t\t${_a(o,h,i,!1)}\n\t\t\t`}})},{getOwnPropertyNames:n$,getOwnPropertySymbols:o$}=Object,{hasOwnProperty:i$}=Object.prototype;function s$(e,t){return function(n,o,i){return e(n,o,i)&&t(n,o,i)}}function a$(e){return function(t,n,o){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,o);const{cache:i}=o,s=i.get(t),a=i.get(n);if(s&&a)return s===n&&a===t;i.set(t,n),i.set(n,t);const r=e(t,n,o);return i.delete(t),i.delete(n),r}}function r$(e){return n$(e).concat(o$(e))}const l$=Object.hasOwn||((e,t)=>i$.call(e,t));function c$(e,t){return e===t||!e&&!t&&e!=e&&t!=t}const{getOwnPropertyDescriptor:d$,keys:u$}=Object;function p$(e,t){return e.byteLength===t.byteLength&&j$(new Uint8Array(e),new Uint8Array(t))}function h$(e,t,n){let o=e.length;if(t.length!==o)return!1;for(;o-- >0;)if(!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function g$(e,t){return e.byteLength===t.byteLength&&j$(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function m$(e,t){return c$(e.getTime(),t.getTime())}function b$(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function f$(e,t){return e===t}function x$(e,t,n){const o=e.size;if(o!==t.size)return!1;if(!o)return!0;const i=new Array(o),s=e.entries();let a,r,l=0;for(;(a=s.next())&&!a.done;){const o=t.entries();let s=!1,c=0;for(;(r=o.next())&&!r.done;){if(i[c]){c++;continue}const o=a.value,d=r.value;if(n.equals(o[0],d[0],l,c,e,t,n)&&n.equals(o[1],d[1],o[0],d[0],e,t,n)){s=i[c]=!0;break}c++}if(!s)return!1;l++}return!0}const y$=c$;function v$(e,t,n){const o=u$(e);let i=o.length;if(u$(t).length!==i)return!1;for(;i-- >0;)if(!S$(e,t,n,o[i]))return!1;return!0}function k$(e,t,n){const o=r$(e);let i,s,a,r=o.length;if(r$(t).length!==r)return!1;for(;r-- >0;){if(i=o[r],!S$(e,t,n,i))return!1;if(s=d$(e,i),a=d$(t,i),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable))return!1}return!0}function w$(e,t){return c$(e.valueOf(),t.valueOf())}function _$(e,t){return e.source===t.source&&e.flags===t.flags}function C$(e,t,n){const o=e.size;if(o!==t.size)return!1;if(!o)return!0;const i=new Array(o),s=e.values();let a,r;for(;(a=s.next())&&!a.done;){const o=t.values();let s=!1,l=0;for(;(r=o.next())&&!r.done;){if(!i[l]&&n.equals(a.value,r.value,a.value,r.value,e,t,n)){s=i[l]=!0;break}l++}if(!s)return!1}return!0}function j$(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function $$(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function S$(e,t,n,o){return!("_owner"!==o&&"__o"!==o&&"__v"!==o||!e.$$typeof&&!t.$$typeof)||l$(t,o)&&n.equals(e[o],t[o],o,o,e,t,n)}const T$={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},M$=Object.prototype.toString;const N$=L$();function L$(e={}){const{circular:t=!1,createInternalComparator:n,createState:o,strict:i=!1}=e,s=function({circular:e,createCustomConfig:t,strict:n}){let o={areArrayBuffersEqual:p$,areArraysEqual:n?k$:h$,areDataViewsEqual:g$,areDatesEqual:m$,areErrorsEqual:b$,areFunctionsEqual:f$,areMapsEqual:n?s$(x$,k$):x$,areNumbersEqual:y$,areObjectsEqual:n?k$:v$,arePrimitiveWrappersEqual:w$,areRegExpsEqual:_$,areSetsEqual:n?s$(C$,k$):C$,areTypedArraysEqual:n?s$(j$,k$):j$,areUrlsEqual:$$,unknownTagComparators:void 0};if(t&&(o=Object.assign({},o,t(o))),e){const e=a$(o.areArraysEqual),t=a$(o.areMapsEqual),n=a$(o.areObjectsEqual),i=a$(o.areSetsEqual);o=Object.assign({},o,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return o}(e),a=function({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:o,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:a,areNumbersEqual:r,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:d,areSetsEqual:u,areTypedArraysEqual:p,areUrlsEqual:h,unknownTagComparators:g}){return function(m,b,f){if(m===b)return!0;if(null==m||null==b)return!1;const x=typeof m;if(x!==typeof b)return!1;if("object"!==x)return"number"===x?r(m,b,f):"function"===x&&s(m,b,f);const y=m.constructor;if(y!==b.constructor)return!1;if(y===Object)return l(m,b,f);if(Array.isArray(m))return t(m,b,f);if(y===Date)return o(m,b,f);if(y===RegExp)return d(m,b,f);if(y===Map)return a(m,b,f);if(y===Set)return u(m,b,f);const v=M$.call(m);if("[object Date]"===v)return o(m,b,f);if("[object RegExp]"===v)return d(m,b,f);if("[object Map]"===v)return a(m,b,f);if("[object Set]"===v)return u(m,b,f);if("[object Object]"===v)return"function"!=typeof m.then&&"function"!=typeof b.then&&l(m,b,f);if("[object URL]"===v)return h(m,b,f);if("[object Error]"===v)return i(m,b,f);if("[object Arguments]"===v)return l(m,b,f);if(T$[v])return p(m,b,f) |
| 429 |
;if("[object ArrayBuffer]"===v)return e(m,b,f);if("[object DataView]"===v)return n(m,b,f);if("[object Boolean]"===v||"[object Number]"===v||"[object String]"===v)return c(m,b,f);if(g){let e=g[v];if(!e){const t=null!=(k=m)?k[Symbol.toStringTag]:void 0;t&&(e=g[t])}if(e)return e(m,b,f)}var k;return!1}}(s);var r;return function({circular:e,comparator:t,createState:n,equals:o,strict:i}){if(n)return function(s,a){const{cache:r=(e?new WeakMap:void 0),meta:l}=n();return t(s,a,{cache:r,equals:o,meta:l,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};const s={cache:void 0,equals:o,meta:void 0,strict:i};return function(e,n){return t(e,n,s)}}({circular:t,comparator:a,createState:o,equals:n?n(a):(r=a,function(e,t,n,o,i,s,a){return r(e,t,a)}),strict:i})}L$({strict:!0}),L$({circular:!0}),L$({circular:!0,strict:!0}),L$({createInternalComparator:()=>c$}),L$({strict:!0,createInternalComparator:()=>c$}),L$({circular:!0,createInternalComparator:()=>c$}),L$({circular:!0,createInternalComparator:()=>c$,strict:!0});const E$=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],P$=new Uint32Array(96);class A${static from(e){if(!e||void 0===e.byteLength||e.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[t,n]=new Uint8Array(e,0,2);if(219!==t)throw new Error("Data does not appear to be in a KDBush format.");const o=n>>4;if(1!==o)throw new Error(`Got v${o} data when expected v1.`);const i=E$[15&n];if(!i)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new A$(a,s,i,void 0,e)}constructor(e,t=64,n=Float64Array,o=ArrayBuffer,i){if(isNaN(e)||e<0)throw new Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const s=E$.indexOf(this.ArrayType),a=2*e*this.ArrayType.BYTES_PER_ELEMENT,r=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-r%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${n}.`);if(i)this.data=i,this.ids=new this.IndexArrayType(i,8,e),this.coords=new n(i,8+r+l,2*e),this._pos=2*e,this._finished=!0;else{const i=this.data=new o(8+a+r+l);this.ids=new this.IndexArrayType(i,8,e),this.coords=new n(i,8+r+l,2*e),this._pos=0,this._finished=!1,new Uint8Array(i,0,2).set([219,16+s]),new Uint16Array(i,2,1)[0]=t,new Uint32Array(i,4,1)[0]=e}}add(e,t){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=t,n}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return B$(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:s,nodeSize:a}=this;P$[0]=0,P$[1]=i.length-1,P$[2]=0;let r=3;const l=[];for(;r>0;){const c=P$[--r],d=P$[--r],u=P$[--r];if(d-u<=a){for(let a=u;a<=d;a++){const r=s[2*a],c=s[2*a+1];r>=e&&r<=n&&c>=t&&c<=o&&l.push(i[a])}continue}const p=u+d>>1,h=s[2*p],g=s[2*p+1];h>=e&&h<=n&&g>=t&&g<=o&&l.push(i[p]),(0===c?e<=h:t<=g)&&(P$[r++]=u,P$[r++]=p-1,P$[r++]=1-c),(0===c?n>=h:o>=g)&&(P$[r++]=p+1,P$[r++]=d,P$[r++]=1-c)}return l}within(e,t,n){const o=[];return this.withinInto(e,t,n,o),o}withinInto(e,t,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:s,nodeSize:a}=this;P$[0]=0,P$[1]=i.length-1,P$[2]=0;let r=3,l=0;const c=n*n;for(;r>0;){const d=P$[--r],u=P$[--r],p=P$[--r];if(u-p<=a){for(let n=p;n<=u;n++)z$(s[2*n],s[2*n+1],e,t)<=c&&(o[l++]=i[n]);continue}const h=p+u>>1,g=s[2*h],m=s[2*h+1];z$(g,m,e,t)<=c&&(o[l++]=i[h]),(0===d?e-n<=g:t-n<=m)&&(P$[r++]=p,P$[r++]=h-1,P$[r++]=1-d),(0===d?e+n>=g:t+n>=m)&&(P$[r++]=h+1,P$[r++]=u,P$[r++]=1-d)}return l}}function B$(e,t,n,o,i,s){if(i-o<=n)return;const a=o+i>>1;I$(e,t,a,o,i,s),B$(e,t,n,o,a-1,1-s),B$(e,t,n,a+1,i,1-s)}function I$(e,t,n,o,i,s){for(;i>o;){if(i-o>600){const a=i-o+1,r=n-o+1,l=Math.log(a),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(a-c)/a)*(r-a/2<0?-1:1);I$(e,t,n,Math.max(o,Math.floor(n-r*c/a+d)),Math.min(i,Math.floor(n+(a-r)*c/a+d)),s)}const a=t[2*n+s];let r=o,l=i;for(O$(e,t,o,n),t[2*i+s]>a&&O$(e,t,o,i);r<l;){for(O$(e,t,r,l),r++,l--;t[2*r+s]<a;)r++;for(;t[2*l+s]>a;)l--}t[2*o+s]===a?O$(e,t,o,l):(l++,O$(e,t,l,i)),l<=n&&(o=l+1),n<=l&&(i=l-1)}}function O$(e,t,n,o){R$(e,n,o),R$(t,2*n,2*o),R$(t,2*n+1,2*o+1)}function R$(e,t,n){const o=e[t];e[t]=e[n],e[n]=o}function z$(e,t,n,o){const i=e-n,s=t-o;return i*i+s*s}const D$={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},F$=Math.fround||(H$=new Float32Array(1),e=>(H$[0]=+e,H$[0]));var H$;class W${constructor(e){this.options=Object.assign(Object.create(D$),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:n,maxZoom:o}=this.options;t&&console.time("total time");const i=`prepare ${e.length} points`;t&&console.time(i),this.points=e;const s=[];for(let t=0;t<e.length;t++){const n=e[t];if(!n.geometry)continue;const[o,i]=n.geometry.coordinates,a=F$(V$(o)),r=F$(q$(i));s.push(a,r,1/0,t,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[o+1]=this._createTree(s);t&&console.timeEnd(i);for(let e=o;e>=n;e--){const n=+Date.now();a=this.trees[e]=this._createTree(this._cluster(a,e)),t&&console.log("z%d: %d clusters in %dms",e,a.numItems,+Date.now()-n)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let n=((e[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[1]));let i=180===e[2]?180:((e[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,i=180;else if(n>i){const e=this.getClusters([n,o,180,s],t),a=this.getClusters([-180,o,i,s],t);return e.concat(a)}const a=this.trees[this._limitZoom(t)],r=a.range(V$(n),q$(s),V$(i),q$(o)),l=a.data,c=[];for(const e of r){const t=this.stride*e;c.push(l[t+5]>1?U$(l,t,this.clusterProps):this.points[l[t+3]])}return c}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),o="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(o);const s=i.data;if(t*this.stride>=s.length)throw new Error(o);const a=this.options.radius/(this.options.extent*Math.pow(2,n-1)),r=s[t*this.stride],l=s[t*this.stride+1],c=i.within(r,l,a),d=[];for(const t of c){const n=t*this.stride;s[n+4]===e&&d.push(s[n+5]>1?U$(s,n,this.clusterProps):this.points[s[n+3]])}if(0===d.length)throw new Error(o);return d}getLeaves(e,t,n){t=t||10,n=n||0;const o=[];return this._appendLeaves(o,e,t,n,0),o}getTile(e,t,n){const o=this.trees[this._limitZoom(e)],i=Math.pow(2,e),{extent:s,radius:a}=this.options,r=a/s,l=(n-r)/i,c=(n+1+r)/i,d={features:[]};return this._addTileFeatures(o.range((t-r)/i,l,(t+1+r)/i,c),o.data,t,n,i,d),0===t&&this._addTileFeatures(o.range(1-r/i,l,1,c),o.data,i,n,i,d),t===i-1&&this._addTileFeatures(o.range(0,l,r/i,c),o.data,-1,n,i,d),d.features.length?d:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,o,i){const s=this.getChildren(t);for(const t of s){const s=t.properties;if(s&&s.cluster?i+s.point_count<=o?i+=s.point_count:i=this._appendLeaves(e,s.cluster_id,n,o,i):i<o?i++:e.push(t),e.length===n)break}return i}_createTree(e){const t=new A$(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<e.length;n+=this.stride)t.add(e[n],e[n+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,n,o,i,s){for(const a of e){const e=a*this.stride,r=t[e+5]>1;let l,c,d;if(r)l=G$(t,e,this.clusterProps),c=t[e],d=t[e+1];else{const n=this.points[t[e+3]];l=n.properties;const[o,i]=n.geometry.coordinates;c=V$(o),d=q$(i)}const u={type:1, |
| 430 |
geometry:[[Math.round(this.options.extent*(c*i-n)),Math.round(this.options.extent*(d*i-o))]],tags:l};let p;p=r||this.options.generateId?t[e+3]:this.points[t[e+3]].id,void 0!==p&&(u.id=p),s.features.push(u)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:n,extent:o,reduce:i,minPoints:s}=this.options,a=n/(o*Math.pow(2,t)),r=e.data,l=[],c=this.stride;for(let n=0;n<r.length;n+=c){if(r[n+2]<=t)continue;r[n+2]=t;const o=r[n],d=r[n+1],u=e.within(r[n],r[n+1],a),p=r[n+5];let h=p;for(const e of u){const n=e*c;r[n+2]>t&&(h+=r[n+5])}if(h>p&&h>=s){let e,s=o*p,a=d*p,g=-1;const m=(n/c<<5)+(t+1)+this.points.length;for(const o of u){const l=o*c;if(r[l+2]<=t)continue;r[l+2]=t;const d=r[l+5];s+=r[l]*d,a+=r[l+1]*d,r[l+4]=m,i&&(e||(e=this._map(r,n,!0),g=this.clusterProps.length,this.clusterProps.push(e)),i(e,this._map(r,l)))}r[n+4]=m,l.push(s/h,a/h,1/0,m,-1,h),i&&l.push(g)}else{for(let e=0;e<c;e++)l.push(r[n+e]);if(h>1)for(const e of u){const n=e*c;if(!(r[n+2]<=t)){r[n+2]=t;for(let e=0;e<c;e++)l.push(r[n+e])}}}}return l}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,n){if(e[t+5]>1){const o=this.clusterProps[e[t+6]];return n?Object.assign({},o):o}const o=this.points[e[t+3]].properties,i=this.options.map(o);return n&&i===o?Object.assign({},i):i}}function U$(e,t,n){return{type:"Feature",id:e[t+3],properties:G$(e,t,n),geometry:{type:"Point",coordinates:[(o=e[t],360*(o-.5)),Y$(e[t+1])]}};var o}function G$(e,t,n){const o=e[t+5],i=o>=1e4?`${Math.round(o/1e3)}k`:o>=1e3?Math.round(o/100)/10+"k":o,s=e[t+6],a=-1===s?{}:Object.assign({},n[s]);return Object.assign(a,{cluster:!0,cluster_id:e[t+3],point_count:o,point_count_abbreviated:i})}function V$(e){return e/360+.5}function q$(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Y$(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}"function"==typeof SuppressedError&&SuppressedError;class K${static isAdvancedMarkerAvailable(e){return google.maps.marker&&!0===e.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,t){this.isAdvancedMarker(e)?e.map=t:e.setMap(t)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(Number.isFinite(e.position.lat)&&Number.isFinite(e.position.lng))return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return!!this.isAdvancedMarker(e)||e.getVisible()}}class Q${constructor({markers:e,position:t}){this.markers=[],e&&(this.markers=e),t&&(t instanceof google.maps.LatLng?this._position=t:this._position=new google.maps.LatLng(t))}get bounds(){if(0===this.markers.length&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const t of this.markers)e.extend(K$.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter((e=>K$.getVisible(e))).length}push(e){this.markers.push(e)}delete(){this.marker&&(K$.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function Z$(e,t="assertion failed"){if(null==e)throw Error(t)}class X${constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return J$(e)}}const J$=e=>e.map((e=>new Q$({position:K$.getPosition(e),markers:[e]})));class eS extends X${constructor(e){var{maxZoom:t,radius:n=60}=e,o=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["maxZoom","radius"]);super({maxZoom:t}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new W$(Object.assign({maxZoom:this.maxZoom,radius:n},o))}calculate(e){let t=!1,n=e.map.getZoom();Z$(n),n=Math.round(n);const o={zoom:n};if(!N$(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const n=this.markers.map((e=>{const t=K$.getPosition(e);return{type:"Feature",geometry:{type:"Point",coordinates:[t.lng(),t.lat()]},properties:{marker:e}}}));this.superCluster.load(n)}return t||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(t=!N$(this.state,o)),this.state=o,0===e.markers.length?(this.clusters=[],{clusters:this.clusters,changed:t}):(t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t})}cluster({map:e}){const t=e.getZoom();return Z$(t),this.superCluster.getClusters([-180,-90,180,90],Math.round(t)).map((e=>this.transformCluster(e)))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new Q$({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map((e=>e.properties.marker)),position:{lat:t,lng:e}});const o=n.marker;return new Q$({markers:[o],position:K$.getPosition(o)})}}class tS{constructor(e,t){this.markers={sum:e.length};const n=t.map((e=>e.count)),o=n.reduce(((e,t)=>e+t),0);this.clusters={count:t.length,markers:{mean:o/t.length,sum:o,min:Math.min(...n),max:Math.max(...n)}}}}class nS{render({count:e,position:t},n,o){const i=`<svg fill="${e>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">\n<circle cx="120" cy="120" opacity=".6" r="70" />\n<circle cx="120" cy="120" opacity=".3" r="90" />\n<circle cx="120" cy="120" opacity=".2" r="110" />\n<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>\n</svg>`,s=`Cluster of ${e} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+e;if(K$.isAdvancedMarkerAvailable(o)){const e=(new DOMParser).parseFromString(i,"image/svg+xml").documentElement;e.setAttribute("transform","translate(0 25)");const n={map:o,position:t,zIndex:a,title:s,content:e};return new google.maps.marker.AdvancedMarkerElement(n)}const r={position:t,zIndex:a,title:s,icon:{url:`data:image/svg+xml;base64,${btoa(i)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(r)}}class oS{constructor(){!function(e,t){for(let n in t.prototype)e.prototype[n]=t.prototype[n]}(oS,google.maps.OverlayView)}}var iS;!function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click",e.GMP_CLICK="gmp-click"}(iS||(iS={}));const sS=(e,t,n)=>{t.bounds&&n.fitBounds(t.bounds)};class aS extends oS{constructor({map:e,markers:t=[],algorithmOptions:n={},algorithm:o=new eS(n),renderer:i=new nS,onClusterClick:s=sS}){super(),this.map=null,this.idleListener=null,this.markers=[...t],this.clusters=[],this.algorithm=o,this.renderer=i,this.onClusterClick=s,e&&this.setMap(e)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach((e=>{this.addMarker(e,!0)})),t||this.render()}removeMarker(e,t){const n=this.markers.indexOf(e);return-1!==n&&(K$.setMap(e,null),this.markers.splice(n,1),t||this.render(),!0)}removeMarkers(e,t){let n=!1;return e.forEach((e=>{n=this.removeMarker(e,!0)||n})),n&&!t&&this.render(),n}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,iS.CLUSTERING_BEGIN,this);const{clusters:t,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||null==n){const e=new Set;for(const n of t)1==n.markers.length&&e.add(n.markers[0]);const n=[];for(const t of this.clusters)null!=t.marker&&(1==t.markers.length?e.has(t.marker)||K$.setMap(t.marker,null):n.push(t.marker));this.clusters=t,this.renderClusters(), |
| 431 |
requestAnimationFrame((()=>n.forEach((e=>K$.setMap(e,null)))))}google.maps.event.trigger(this,iS.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();Z$(e),this.idleListener=e.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach((e=>K$.setMap(e,null))),this.clusters.forEach((e=>e.delete())),this.clusters=[]}renderClusters(){const e=new tS(this.markers,this.clusters),t=this.getMap();this.clusters.forEach((n=>{if(1===n.markers.length)n.marker=n.markers[0];else if(n.marker=this.renderer.render(n,e,t),n.markers.forEach((e=>K$.setMap(e,null))),this.onClusterClick){const e=K$.isAdvancedMarker(n.marker)?iS.GMP_CLICK:iS.CLUSTER_CLICK;n.marker.addListener(e,(e=>{google.maps.event.trigger(this,iS.CLUSTER_CLICK,n),this.onClusterClick(e,n,t)}))}K$.setMap(n.marker,t)}))}}const rS="b-blocks-google-map-heat",lS=[[0,[0,0,255,0]],[.2,[0,0,255,255]],[.4,[0,255,255,255]],[.6,[0,255,0,255]],[.8,[255,255,0,255]],[1,[255,0,0,255]]],cS=({OverlayView:e,LatLng:t})=>class extends e{constructor({points:e=[],radius:t=20,opacity:n=.6}={}){super();const o=(e,t)=>Number.isFinite(Number(e))?Number(e):t;this.points=e,this.radius=Math.max(4,o(t,20)),this.opacity=Math.min(1,Math.max(0,o(n,.6))),this.blur=Math.max(4,.65*this.radius),this.canvas=null,this.ctx=null,this.stamp=null,this.stampRadius=null,this.gradient=null,this.idleListener=null}setOptions({points:e,radius:t,opacity:n}={}){const o=(e,t)=>Number.isFinite(Number(e))?Number(e):t;Array.isArray(e)&&(this.points=e),void 0!==t&&(this.radius=Math.max(4,o(t,this.radius)),this.blur=Math.max(4,.65*this.radius)),void 0!==n&&(this.opacity=Math.min(1,Math.max(0,o(n,this.opacity)))),this.draw()}onAdd(){const e=document.createElement("canvas");e.className=rS,e.style.position="absolute",e.style.left="0",e.style.top="0",e.style.zIndex="1",e.style.pointerEvents="none",this.canvas=e,this.ctx=e.getContext("2d"),this.gradient=(()=>{const e=document.createElement("canvas");e.width=1,e.height=256;const t=e.getContext("2d"),n=t.createLinearGradient(0,0,0,256);return lS.forEach((([e,[t,o,i,s]])=>{n.addColorStop(e,`rgba(${t},${o},${i},${s/255})`)})),t.fillStyle=n,t.fillRect(0,0,1,256),t.getImageData(0,0,1,256).data})();const t=this.getMap()?.getDiv();t?.querySelectorAll(`.${rS}`).forEach((e=>e.remove())),t?.appendChild(e),this.idleListener=this.getMap()?.addListener("idle",(()=>this.draw()))}draw(){const e=this.getProjection(),n=this.getMap()?.getDiv();if(!(e&&n&&this.canvas&&this.ctx))return;const o=Math.min(n.clientWidth||0,4096),i=Math.min(n.clientHeight||0,4096);if(o<=0||i<=0)return;this.canvas.width!==o&&(this.canvas.width=o),this.canvas.height!==i&&(this.canvas.height=i),this.canvas.style.width=`${o}px`,this.canvas.style.height=`${i}px`,this.canvas.style.opacity=String(this.opacity),this.stamp&&this.stampRadius===this.radius||(this.stamp=((e,t)=>{const n=e+t,o=document.createElement("canvas");o.width=2*n,o.height=2*n;const i=o.getContext("2d");return i.shadowOffsetX=2*n,i.shadowOffsetY=2*n,i.shadowBlur=t,i.shadowColor="#000",i.beginPath(),i.arc(-n,-n,e,0,2*Math.PI,!0),i.closePath(),i.fill(),o})(this.radius,this.blur),this.stampRadius=this.radius);const s=this.ctx,a=this.radius+this.blur;s.clearRect(0,0,o,i),s.globalAlpha=.55;let r=0;if(this.points.forEach((n=>{const l=e.fromLatLngToContainerPixel(new t(n.lat,n.lng));l&&(l.x<-a||l.y<-a||l.x>o+a||l.y>i+a||(s.drawImage(this.stamp,l.x-a,l.y-a),r++))})),s.globalAlpha=1,!r)return;const l=s.getImageData(0,0,o,i),c=l.data;for(let e=3;e<c.length;e+=4){const t=c[e];if(!t)continue;const n=4*t;c[e-3]=this.gradient[n],c[e-2]=this.gradient[n+1],c[e-1]=this.gradient[n+2]}s.putImageData(l,0,0)}onRemove(){this.idleListener?.remove(),this.idleListener=null,this.canvas?.parentNode?.removeChild(this.canvas),this.canvas=null,this.ctx=null,this.stamp=null,this.stampRadius=null,this.gradient=null}},dS="__bBlocksMapsCb__",uS=new Map;let pS=!1,hS="",gS=!1,mS=!1;const bS=new Set,fS=e=>(uS.has(e)||uS.set(e,window.google.maps.importLibrary(e).catch((t=>{throw uS.delete(e),t}))),uS.get(e)),xS=(e={})=>{const{markers:t=[],shapes:n=[],directions:o={},tools:i={},clustering:s={},source:a={}}=e,r=new Set(["core","maps"]);return a.mapId&&(t.length||s.enabled)&&r.add("marker"),i.searchBox&&r.add("places"),o.enabled&&r.add("routes"),n.length&&r.add("geometry"),[...r]},yS=(e,t=["maps"],n={})=>e?(pS&&hS&&hS!==e&&!gS&&(gS=!0,console.warn("[b-blocks] The Google Maps API is already loaded with a different API key; the first key wins.")),((e,{version:t="weekly",language:n="",region:o=""}={})=>{const i=window.google=window.google||{},s=i.maps=i.maps||{};if((()=>{const e=window.gm_authFailure;if(e?.bBlocksHooked)return;const t=()=>{mS=!0,bS.forEach((e=>e())),"function"==typeof e&&e()};t.bBlocksHooked=!0,window.gm_authFailure=t})(),s.importLibrary)return pS=!0,void(hS=hS||e);const a=new Set;let r=null;s.importLibrary=(i,...l)=>(a.add(i),(r||(r=Promise.resolve().then((()=>new Promise(((i,l)=>{const c=new URLSearchParams;c.set("key",e),c.set("v",t),c.set("loading","async"),c.set("libraries",[...a].join(",")),c.set("callback",`google.maps.${dS}`),n&&c.set("language",n),o&&c.set("region",o);const d=document.createElement("script");d.src=`https://maps.googleapis.com/maps/api/js?${c.toString()}`,d.async=!0,d.nonce=document.querySelector("script[nonce]")?.nonce||"",d.onerror=()=>{r=null,l(new Error("google-maps-load-failed"))},s[dS]=i,document.head.append(d)})))))).then((()=>s.importLibrary(i,...l)))),pS=!0,hS=e})(e,n),Promise.all(t.map(fS)).then((e=>Object.assign({},...e)))):Promise.reject(new Error("missing-key")),vS=(e="")=>{if(!e||"string"!=typeof e)return"";const t=(new DOMParser).parseFromString(e,"text/html");return t.body.querySelectorAll("script, style, iframe, object, embed, form, link, meta").forEach((e=>e.remove())),t.body.querySelectorAll("*").forEach((e=>{[...e.attributes].forEach((({name:t,value:n})=>{const o=/^on/i.test(t),i=/^\s*javascript:/i.test(n||"");(o||i&&("href"===t||"src"===t))&&e.removeAttribute(t)}))})),t.body.innerHTML},kS=(e={})=>{const t=Yj(e.lat),n=Yj(e.lng);return null===t||null===n?null:{lat:t,lng:n}},wS=(e="")=>{if(!e||"string"!=typeof e)return[];const t=e.trim();if(!t)return[];if(t.startsWith("["))try{const e=JSON.parse(t);return Array.isArray(e)?e.map((e=>({lat:Yj(e?.lat??e?.[0]),lng:Yj(e?.lng??e?.[1])}))).filter((e=>null!==e.lat&&null!==e.lng)):[]}catch(e){return[]}return t.split(/[\n;|]+/).map((e=>{const[t,n]=e.split(",").map((e=>Yj(e)));return{lat:t,lng:n}})).filter((e=>null!==e.lat&&null!==e.lng))},_S=(e,t=[])=>t.find((t=>t.id===e?.category))||null,CS=({address:e="",message:t="",status:n="info",onActivate:o=null,actionLabel:i=""})=>{return(0,l.jsxs)("div",{className:`${Bj}-fallback ${Bj}-fallback-${n}`,role:"note",children:[t?(0,l.jsx)("p",{className:`${Bj}-fallback-message`,children:t}):null,e?(0,l.jsx)("p",{className:`${Bj}-fallback-address`,children:e}):null,o?(0,l.jsx)("button",{type:"button",className:`${Bj}-fallback-button`,onClick:o,children:i||(0,x.__)("Load map","b-blocks")}):(0,l.jsx)("a",{className:`${Bj}-fallback-link`,href:(s=e,`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(s||"")}`),target:"_blank",rel:"noopener noreferrer",children:(0,x.__)("Open in Google Maps","b-blocks")})]});var s},jS=({categories:e=[],filterBar:t={},active:n="",onChange:o=()=>{}})=>{if(!e.length)return null;const{showAll:i=!0,allLabel:s=""}=t,a=i?[{id:"",label:s||(0,x.__)("All","b-blocks")},...e]:e;return(0,l.jsx)("div",{className:`${Bj}-filter-bar`,role:"group","aria-label":(0,x.__)("Filter map locations by category","b-blocks"),children:a.map((e=>{const t=n===e.id;return(0,l.jsxs)("button",{type:"button",className:`${Bj}-filter-chip${t?" active":""}`,"data-category":e.id||"","aria-pressed":t,onClick:()=>o(e.id),children:[e.id?(0,l.jsx)("span",{className:`${Bj}-filter-dot`,"aria-hidden":"true"}):null,e.label]},e.id||"all")}))})},$S=({embedUrl:e,captionText:t})=>{ |
| 432 |
if(!Dj(e))return(0,l.jsx)("div",{className:`${Bj}-placeholder`,role:"note",children:(0,x.__)("Paste a valid Google Maps embed URL from Google Maps → Share → Embed a map.","b-blocks")});const n=t |
| 433 |
/* translators: %s: caption text describing the map location */?(0,x.sprintf)((0,x.__)("Google Map of %s","b-blocks"),t):(0,x.__)("Google Map","b-blocks");return(0,l.jsx)("div",{className:`${Bj}-wrapper`,children:(0,l.jsx)("iframe",{className:`${Bj}-iframe`,src:e,title:n,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",allowFullScreen:!0})})},SS=({attributes:e,apiKey:t="",isBackend:n=!1,device:o="desktop",onMarkerDrag:i=null})=>{const s=(0,m.useMemo)((()=>Kj(e)),[e]),{source:a={},map:r={},controls:c={},markers:d=[],marker:u={},infoWindow:p={},clustering:h={},categories:g=[],filterBar:b={},theme:f={},layers:y={},shapes:v=[],directions:k={},tools:w={},performance:_={},caption:C={}}=s,j="embed"===a.type,$=C.text||"",S=(0,m.useRef)(null),T=(0,m.useRef)(null),M=(0,m.useRef)(null),N=(0,m.useRef)(null),L=(0,m.useRef)(null),E=(0,m.useRef)([]),P=(0,m.useRef)(null),A=(0,m.useRef)(null),B=(0,m.useRef)([]),I=(0,m.useRef)([]),O=(0,m.useRef)(""),R=(0,m.useRef)(null),[z,D]=(0,m.useState)(null),[F,H]=(0,m.useState)(""),[W,U]=(0,m.useState)(0),[G,V]=(0,m.useState)(""),[q,Y]=(0,m.useState)(!1),K=_.lazyLoad||"onView",[Q,Z]=(0,m.useState)(n||j||"none"===K),X=(0,m.useMemo)((()=>Jj(f)),[JSON.stringify(f)]),J=a.mapId||"",ee=e=>z?.[e]||window.google?.maps?.[e],te=JSON.stringify([a.center,r,c,X]),ne=JSON.stringify([d,u,p,g,h,G,o]),oe=JSON.stringify(y),ie=!!y.heatmap?.enabled,se=(0,m.useMemo)((()=>d.map((e=>kS(e))).filter(Boolean)),[JSON.stringify(d)]),ae=JSON.stringify(se),re=JSON.stringify([y.heatmap?.radius,y.heatmap?.opacity]),le=JSON.stringify(v),ce=JSON.stringify(k);if((0,m.useEffect)((()=>{if(Q||"onView"!==K||!S.current)return;if(!("IntersectionObserver"in window))return void Z(!0);const e=new IntersectionObserver((t=>{t.some((e=>e.isIntersecting))&&(Z(!0),e.disconnect())}),{rootMargin:"200px"});return e.observe(S.current),()=>e.disconnect()}),[Q,K]),(0,m.useEffect)((()=>{if(j||!Q)return;let e=!1;if(t)return H(""),yS(t,xS(s),{language:a.language,region:a.region}).then((t=>{e||D(t)})).catch((t=>{e||H(t?.message||"google-maps-load-failed")})),()=>{e=!0};H("missing-key")}),[j,Q,t,a.language,a.region,JSON.stringify(xS(s))]),(0,m.useEffect)((()=>{return e=()=>H("auth"),mS&&e(),bS.add(e),()=>bS.delete(e);var e}),[]),(0,m.useEffect)((()=>{if(!z?.Map||!T.current)return;const e=new z.Map(T.current,{center:{lat:Yj(a.center?.lat,23.8103),lng:Yj(a.center?.lng,90.4125)},zoom:Yj(r.zoom,12),mapTypeId:r.mapType||"roadmap",mapId:J||void 0,styles:J?void 0:X});L.current=e,U((e=>e+1));const t=new MutationObserver((()=>{const e=T.current;if(!e)return;const t=e.querySelector(".gm-err-container, .gm-err-content"),n=e.querySelector(".gm-style-moc"),o=!!n&&n.textContent.trim().length>0&&"0"!==(window.getComputedStyle(n)?.opacity||"0");(t||o)&&H("auth")}));return t.observe(T.current,{childList:!0,subtree:!0}),()=>{t.disconnect(),I.current.forEach((e=>e?.remove?.())),I.current=[],A.current?.close(),A.current=null,P.current?.clearMarkers(),P.current=null,E.current.forEach((e=>{e.map=null})),E.current=[],B.current.forEach((e=>{e?.setMap?.(null)})),B.current=[],L.current=null,T.current&&(T.current.innerHTML="")}}),[z,J]),(0,m.useEffect)((()=>{const e=L.current;if(!e)return;const t=(o=c.zoomPosition||"RIGHT_BOTTOM",window.google?.maps?.ControlPosition?.[o]??void 0);var o;const i=Yj(r.minZoom),s=Yj(r.maxZoom),l=null!==i&&null!==s,d=l?Math.min(i,s):i,u=l?Math.max(i,s):s;try{e.setOptions({center:{lat:Yj(a.center?.lat,23.8103),lng:Yj(a.center?.lng,90.4125)},zoom:Yj(r.zoom,12),minZoom:d??void 0,maxZoom:u??void 0,mapTypeId:r.mapType||"roadmap",gestureHandling:n?"none":r.gestureHandling||"cooperative",draggable:!1!==r.draggable,scrollwheel:!!r.scrollwheel,keyboardShortcuts:!1!==c.keyboardShortcuts,disableDefaultUI:!!c.disableDefaultUI,zoomControl:!!c.zoom,zoomControlOptions:t?{position:t}:void 0,mapTypeControl:!!c.mapType&&!1!==r.allowTypeSwitch,streetViewControl:!!c.streetView,fullscreenControl:!!c.fullscreen,scaleControl:!!c.scale,rotateControl:!!c.rotate,styles:J?void 0:X})}catch(e){console.warn("[b-blocks] Google Maps rejected a map option:",e?.message||e)}}),[W,te,J,n]),(0,m.useEffect)((()=>{const e=L.current;if(!e||!J||!z?.AdvancedMarkerElement)return;const{AdvancedMarkerElement:t,PinElement:s,InfoWindow:a}=z,l=[],c=[],m=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1,b=parseInt(p.desktop?.maxWidth,10)||280,f=[],x=()=>f.forEach((e=>e?.close()));A.current={close:x},d.forEach(((r,d)=>{if(G&&r.category!==G)return;const h=kS(r);if(!h)return;let y=((e={},t={},n="desktop",o=[])=>{const{type:i="default",url:s={}}=e.icon||{},a=t?.[n]?.size||t?.desktop?.size||"40px",r=e.pinColor||_S(e,o)?.color||t.pinColor||"#8a2be2";if("library"===i||"upload"===i){const e="library"===i?s.library:s.upload;if(!e)return;const t=document.createElement("div");return t.className="b-blocks-google-map-pin b-blocks-google-map-pin-svg",t.style.width=a,t.style.height=a,t.style.color=r,t.innerHTML=vS(e),t}if("image"===i){const t=e.image?.url;if(!t)return;const n=document.createElement("div");n.className="b-blocks-google-map-pin b-blocks-google-map-pin-image",n.style.width=a,n.style.height=a;const o=document.createElement("img");return o.src=t,o.alt=e.image?.alt||e.title||"",n.append(o),n}})(r,u,o,g);!y&&s&&(y=new s(((e={},t={},n=[])=>{const o=_S(e,n);return{background:e.pinColor||o?.color||t.pinColor||"#8a2be2",borderColor:t.borderColor||"#ffffff",glyphColor:e.glyphColor||t.glyphColor||"#ffffff",scale:Yj(t.scale,1)??1}})(r,u,g)).element);const v=r.animation||u.animation||"none";y&&"none"!==v&&!m&&y.classList.add(`${Bj}-anim-${v}`);const k=new t({map:e,position:h,title:r.title||"",content:y||void 0,gmpClickable:!0,gmpDraggable:n&&!1!==r.draggable,zIndex:d+1}),w=p.trigger||"click",_="always"===w,C=a?new a({maxWidth:b}):null;f.push(C);const j=()=>{C&&(_||!1===p.singleOpen||x(),C.setContent(((e={})=>{const t=document.createElement("div");if(t.className="b-blocks-google-map-info",e.image?.url&&"image"!==e.icon?.type){const n=document.createElement("img");n.className="b-blocks-google-map-info-image",n.src=e.image.url,n.alt=e.image.alt||e.title||"",n.loading="lazy",t.append(n)}if(e.title){const n=document.createElement("h4");n.className="b-blocks-google-map-info-title",n.textContent=e.title,t.append(n)}const n=document.createElement("div");if(n.className="b-blocks-google-map-info-body",n.innerHTML=vS(e.content||""),t.append(n),e.address){const n=document.createElement("p");n.className="b-blocks-google-map-info-address",n.textContent=e.address,t.append(n)}return t})(r)),C.open({map:e,anchor:k}))};"hover"===w&&k.content?(k.content.addEventListener("mouseenter",j),k.content.addEventListener("mouseleave",(()=>C?.close()))):"click"===w&&l.push(k.addListener("gmp-click",j)),n&&i&&!1!==r.draggable&&l.push(k.addListener("dragend",(e=>{const t=e?.latLng;t&&i(d,{lat:t.lat(),lng:t.lng()})}))),(_||r.openByDefault)&&j(),c.push(k)})),E.current=c,I.current=[...I.current,...l],h.enabled&&c.length&&(P.current=new aS({map:e,markers:c,onClusterClick:!1===h.clickToZoom?()=>{}:void 0,renderer:{render:({count:e,position:n})=>{const o=document.createElement("div");return o.className=`${Bj}-cluster`,o.textContent=String(e),new t({position:n,content:o,zIndex:9999})}}}));const y=ee("LatLngBounds");if(r.fitBounds&&c.length>1&&y){const t=new y;c.forEach((e=>t.extend(e.position))),e.fitBounds(t)}return()=>{l.forEach((e=>e?.remove?.())),I.current=I.current.filter((e=>!l.includes(e))),x(),A.current=null,P.current?.clearMarkers(),P.current=null,c.forEach((e=>{e.map=null})),E.current=[]}}),[W,ne,J,n]),(0,m.useEffect)((()=>{const e=L.current;if(!e)return;const t=ee("TrafficLayer"),n=ee("TransitLayer"),o=ee("BicyclingLayer"),i=ee("KmlLayer"),s=[];y.traffic&&t&&s.push(new t),y.transit&&n&&s.push(new n),y.bicycling&&o&&s.push(new o),y.kmlUrl&&i&&s.push(new i({url:y.kmlUrl,preserveViewport:!0})),s.forEach((t=>t.setMap(e)));const a=[],r=Vj(y.geoJson);if(r.data&&e.data)try{a.push(...e.data.addGeoJson(r.data))}catch(e){ |
| 434 |
console.warn("[b-blocks] Google rejected this GeoJSON:",e?.message||e)}const l=ee("LatLngBounds");if(!1===y.fitGeoJson&&(O.current=""),a.length&&!1!==y.fitGeoJson&&l&&O.current!==y.geoJson){const t=new l;a.forEach((e=>{const n=e?.getGeometry?.();"function"==typeof n?.forEachLatLng&&n.forEachLatLng((e=>t.extend(e)))})),t.isEmpty()||(e.fitBounds(t),O.current=y.geoJson)}return B.current=s.filter(Boolean),()=>{s.forEach((e=>e.setMap(null))),a.forEach((t=>e.data.remove(t))),B.current=[]}}),[W,oe,ne,z]),(0,m.useEffect)((()=>{const e=L.current;if(!e||!ie)return;const t=ee("OverlayView"),n=ee("LatLng");if(!t||!n)return void console.warn("[b-blocks] Heatmap needs google.maps.OverlayView and LatLng; neither the imported library nor the namespace provided them.");const o=new(cS({OverlayView:t,LatLng:n}))({points:se,radius:Yj(y.heatmap?.radius,20),opacity:Yj(y.heatmap?.opacity,.6)});return o.setMap(e),R.current=o,()=>{o.setMap(null),R.current===o&&(R.current=null)}}),[W,ie,z]),(0,m.useEffect)((()=>{ie&&(se.length?R.current?.setOptions({points:se,radius:Yj(y.heatmap?.radius,20),opacity:Yj(y.heatmap?.opacity,.6)}):console.warn(`[b-blocks] Heatmap is on but none of the ${d.length} marker(s) have coordinates, so there is nothing to draw.`))}),[ie,re,ae]),(0,m.useEffect)((()=>{const e=L.current;if(!e||!v.length)return;const t=ee("Circle"),n=ee("Rectangle"),o=ee("Polygon"),i=ee("Polyline");if(!i)return;const s=v.map((e=>{const s={strokeColor:e.strokeColor||"#2A6DF0",strokeOpacity:Yj(e.strokeOpacity,.9),strokeWeight:Yj(e.strokeWeight,3)},a={fillColor:e.fillColor||"#2A6DF0",fillOpacity:Yj(e.fillOpacity,.25)};if("circle"===e.type){const n=kS(e.center||{});return n&&t?new t({...s,...a,center:n,radius:Yj(e.radius,1e3)}):null}if("rectangle"===e.type){const{north:t,south:o,east:i,west:r}=e.bounds||{},l={north:Yj(t),south:Yj(o),east:Yj(i),west:Yj(r)};return Object.values(l).some((e=>null===e))?null:n?new n({...s,...a,bounds:l}):null}const r=wS(e.path);return r.length<2?null:"polygon"===e.type&&o?new o({...s,...a,paths:r}):new i({...s,path:r})})).filter(Boolean);return s.forEach((t=>t.setMap(e))),()=>s.forEach((e=>e.setMap(null)))}),[W,le,z]),(0,m.useEffect)((()=>{const e=L.current;if(!(e&&k.enabled&&z?.DirectionsService&&z?.DirectionsRenderer))return;const t=k.origin?.address||kS(k.origin||{}),n=k.destination?.address||kS(k.destination||{});if(!t||!n)return;const o=new z.DirectionsRenderer({map:e,panel:k.showPanel&&N.current?N.current:null,polylineOptions:{strokeColor:k.routeColor||"#2A6DF0",strokeWeight:5}});let i=!1;return(new z.DirectionsService).route({origin:t,destination:n,travelMode:k.mode||"DRIVING",waypoints:(k.waypoints||[]).map((e=>e?.address||kS(e||{}))).filter(Boolean).map((e=>({location:e,stopover:!0})))}).then((e=>{i||o.setDirections(e)})).catch((()=>{})),()=>{i=!0,o.setMap(null),N.current&&(N.current.innerHTML="")}}),[W,ce,z]),(0,m.useEffect)((()=>{const e=L.current;if(!(e&&w.searchBox&&z?.PlaceAutocompleteElement&&M.current))return;let t;try{t=new z.PlaceAutocompleteElement}catch(e){return}t.className=`${Bj}-search-input`,M.current.append(t);const n=async({placePrediction:t})=>{try{const n=t.toPlace();await n.fetchFields({fields:["location","formattedAddress"]}),n.location&&(e.setCenter(n.location),e.setZoom(Math.max(Yj(r.zoom,12),14)))}catch(e){}};return t.addEventListener("gmp-select",n),()=>{t.removeEventListener("gmp-select",n),t.remove()}}),[W,w.searchBox,z]),j)return(0,l.jsx)("div",{className:`${Bj}-container`,ref:S,children:(0,l.jsxs)("figure",{className:`${Bj}-figure`,children:[(0,l.jsx)($S,{embedUrl:a.embedUrl,captionText:$}),$?(0,l.jsx)("figcaption",{className:`${Bj}-caption`,children:$}):null]})});const de=a.center?.address||d[0]?.address||$,ue=Q||"onClick"!==K?"auth"===F?(0,l.jsx)(CS,{address:de,status:"warning",message:n?(0,x.__)("Google rejected this API key. Check that billing is enabled on the Google Cloud project, that the Maps JavaScript API is turned on, and that the key’s HTTP referrer restriction allows this site.","b-blocks"):(0,x.__)("This map is temporarily unavailable.","b-blocks")}):"missing-key"===F?(0,l.jsx)(CS,{address:de,status:"warning",message:(0,x.__)("A Google Maps API key is required to show this map.","b-blocks")}):F?(0,l.jsx)(CS,{address:de,status:"warning",message:(0,x.__)("The Google Maps API could not be loaded.","b-blocks")}):null:(0,l.jsx)(CS,{address:de,status:"idle",message:(0,x.__)("Map ready to load.","b-blocks"),onActivate:()=>Z(!0),actionLabel:(0,x.__)("Load map","b-blocks")});return(0,l.jsx)("div",{className:`${Bj}-container`,ref:S,children:(0,l.jsxs)("figure",{className:`${Bj}-figure`,children:[!ue&&b.show&&g.length?(0,l.jsx)(jS,{categories:g,filterBar:b,active:G,onChange:V}):null,ue||!w.searchBox&&!w.geolocation?null:(0,l.jsxs)("div",{className:`${Bj}-tools`,children:[w.searchBox?(0,l.jsx)("div",{className:`${Bj}-search`,ref:M}):null,w.geolocation?(0,l.jsx)("button",{type:"button",className:`${Bj}-locate`,onClick:()=>{const e=L.current;e&&navigator.geolocation&&(Y(!0),navigator.geolocation.getCurrentPosition((({coords:t})=>{Y(!1);const n={lat:t.latitude,lng:t.longitude};e.panTo(n),e.setZoom(14);const o=Yj(w.nearbyRadius,0),i=ee("Circle");if(o>0&&i){const t=new i({map:e,center:n,radius:o,strokeColor:"#2A6DF0",strokeOpacity:.6,fillColor:"#2A6DF0",fillOpacity:.12});B.current.push(t)}}),(()=>Y(!1)),{enableHighAccuracy:!0,timeout:1e4}))},disabled:q,children:q?(0,x.__)("Locating…","b-blocks"):(0,x.__)("Find my location","b-blocks")}):null]}),(0,l.jsx)("div",{className:`${Bj}-wrapper`,children:ue||(0,l.jsx)("div",{className:`${Bj}-canvas`,ref:T,role:"region","aria-label":$ |
| 435 |
/* translators: %s: caption text describing the map location */?(0,x.sprintf)((0,x.__)("Interactive map of %s","b-blocks"),$):(0,x.__)("Interactive Google Map","b-blocks")})}),!ue&&k.enabled&&k.showPanel?(0,l.jsx)("div",{className:`${Bj}-directions-panel`,ref:N}):null,$?(0,l.jsx)("figcaption",{className:`${Bj}-caption`,children:$}):null]})})},TS=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"},{label:"vh",value:"vh"}],MS={top:"",right:"",bottom:"",left:""},NS=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],LS=[{label:(0,x.__)("Interactive","b-blocks"),value:"interactive"},{label:(0,x.__)("Embed URL","b-blocks"),value:"embed"}],ES=[{label:(0,x.__)("Roadmap","b-blocks"),value:"roadmap"},{label:(0,x.__)("Satellite","b-blocks"),value:"satellite"},{label:(0,x.__)("Hybrid","b-blocks"),value:"hybrid"},{label:(0,x.__)("Terrain","b-blocks"),value:"terrain"}],PS=[{label:(0,x.__)("Cooperative (Ctrl + scroll)","b-blocks"),value:"cooperative"},{label:(0,x.__)("Greedy (always pans)","b-blocks"),value:"greedy"},{label:(0,x.__)("None (locked)","b-blocks"),value:"none"},{label:(0,x.__)("Auto","b-blocks"),value:"auto"}],AS=[{label:(0,x.__)("Top Left","b-blocks"),value:"TOP_LEFT"},{label:(0,x.__)("Top Center","b-blocks"),value:"TOP_CENTER"},{label:(0,x.__)("Top Right","b-blocks"),value:"TOP_RIGHT"},{label:(0,x.__)("Left Top","b-blocks"),value:"LEFT_TOP"},{label:(0,x.__)("Left Center","b-blocks"),value:"LEFT_CENTER"},{label:(0,x.__)("Left Bottom","b-blocks"),value:"LEFT_BOTTOM"},{label:(0,x.__)("Right Top","b-blocks"),value:"RIGHT_TOP"},{label:(0,x.__)("Right Center","b-blocks"),value:"RIGHT_CENTER"},{label:(0,x.__)("Right Bottom","b-blocks"),value:"RIGHT_BOTTOM"},{label:(0,x.__)("Bottom Left","b-blocks"),value:"BOTTOM_LEFT"},{label:(0,x.__)("Bottom Center","b-blocks"),value:"BOTTOM_CENTER"},{label:(0,x.__)("Bottom Right","b-blocks"),value:"BOTTOM_RIGHT"}],BS=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Drop","b-blocks"),value:"drop"},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce"}],IS=[{label:(0,x.__)("Click","b-blocks"),value:"click"},{label:(0,x.__)("Hover","b-blocks"),value:"hover"},{label:(0,x.__)("Always open","b-blocks"),value:"always"},{label:(0,x.__)("Never","b-blocks"),value:"none"}],OS=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Silver","b-blocks"),value:"silver"},{label:(0,x.__)("Retro","b-blocks"),value:"retro"},{label:(0,x.__)("Dark","b-blocks"),value:"dark"},{label:(0,x.__)("Night","b-blocks"),value:"night"},{label:(0,x.__)("Aubergine","b-blocks"),value:"aubergine"},{label:(0,x.__)("Custom JSON","b-blocks"),value:"custom"}],RS=[{label:(0,x.__)("Driving","b-blocks"),value:"DRIVING"},{label:(0,x.__)("Walking","b-blocks"),value:"WALKING"},{label:(0,x.__)("Bicycling","b-blocks"),value:"BICYCLING"},{label:(0,x.__)("Transit","b-blocks"),value:"TRANSIT"}],zS=[{label:(0,x.__)("Polyline","b-blocks"),value:"polyline"},{label:(0,x.__)("Polygon","b-blocks"),value:"polygon"},{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Rectangle","b-blocks"),value:"rectangle"}],DS=[{label:(0,x.__)("When scrolled into view","b-blocks"),value:"onView"},{label:(0,x.__)("On click","b-blocks"),value:"onClick"},{label:(0,x.__)("Load immediately","b-blocks"),value:"none"}],FS=[{label:(0,x.__)("Default Pin","b-blocks"),value:"default"},{label:(0,x.__)("Icon Library","b-blocks"),value:"library"},{label:(0,x.__)("Upload SVG","b-blocks"),value:"upload"},{label:(0,x.__)("Image","b-blocks"),value:"image"}],HS=[{name:"location",title:(0,x.__)("Location","b-blocks")},{name:"content",title:(0,x.__)("Content","b-blocks")},{name:"icon",title:(0,x.__)("Icon","b-blocks")}],WS=(e,t={})=>{const n=.004*Math.max(0,Number(e)-1);return{id:`marker-${e}`,title:(0,x.__)("New Location","b-blocks"),content:"<p>Describe this location.</p>",address:"",lat:Number((Yj(t.lat,Ij.lat)+n).toFixed(6)),lng:Number((Yj(t.lng,Ij.lng)+n).toFixed(6)),category:"",icon:{type:"default",url:{library:"",upload:""}},image:{url:"",alt:""},pinColor:"",glyphColor:"",animation:"",draggable:!0,openByDefault:!1}},US=(e={},t=0)=>{const n=.006*Math.max(0,t),o=Yj(e.lat,Ij.lat)+n,i=Yj(e.lng,Ij.lng)+n,s=e=>Number(e.toFixed(6)),a=.012;return{path:`${s(o-a)},${s(i-a)}\n${s(o+a)},${s(i+a)}`,center:{lat:s(o),lng:s(i)},radius:1e3,bounds:{north:s(o+a),south:s(o-a),east:s(i+a),west:s(i-a)}}},GS=(e,t={})=>({id:`shape-${e}`,type:"polyline",label:(0,x.__)("New Shape","b-blocks"),...US(t,Number(e)-1),strokeColor:"#2A6DF0",strokeOpacity:.9,strokeWeight:3,fillColor:"#2A6DF0",fillOpacity:.25}),VS=({caption:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Caption Text","b-blocks"),value:e.text||"",onChange:e=>t("caption",e,"text"),placeholder:(0,x.__)("e.g. 123 Main St, Anytown","b-blocks"),help:(0,x.__)("Optional. Shown below the map and used as the map’s accessible name.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Caption Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:e.align||"center",onChange:e=>t("caption",e||"center","align"),children:Rj.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),qS=({attributes:e,setAttributes:t,updateObj:n})=>{const{categories:o=[],filterBar:i={}}=e,s=(e,n,i)=>t({categories:Ob(o,(t=>{t[e][n]=i}))});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Categories & Filter Bar","b-blocks"),initialOpen:!1,children:[o.map(((e,n)=>(0,l.jsxs)(y.Flex,{className:"mt10",align:"flex-end",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex2",value:e.label,onChange:e=>s(n,"label",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ge,{label:"",value:e.color,onChange:e=>s(n,"color",e)}),(0,l.jsx)(y.Button,{isDestructive:!0,label:(0,x.__)("Remove","b-blocks"),onClick:()=>(e=>t({categories:o.filter(((t,n)=>n!==e))}))(n),children:(0,l.jsx)(y.Dashicon,{icon:"no"})})]},e.id))),(0,l.jsx)(y.Flex,{justify:"center",className:"addItem mt15",children:(0,l.jsxs)(y.Button,{variant:"primary",onClick:()=>{return t({categories:[...o,(e=o.length+1,{id:`cat-${e}`,label:(0,x.__)("Category","b-blocks"),color:"#8a2be2"})]});var e},children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Category","b-blocks")]})}),(0,l.jsx)("hr",{}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Filter Bar","b-blocks"),checked:!!i.show,onChange:e=>n("filterBar",!!e,"show"),help:(0,x.__)("Lets visitors show only the markers in one category.","b-blocks"),__nextHasNoMarginBottom:!0}),i.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Include an “All” chip","b-blocks"),checked:!1!==i.showAll,onChange:e=>n("filterBar",!!e,"showAll"),__nextHasNoMarginBottom:!0}),!1!==i.showAll&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("“All” Label","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"flex1",value:i.allLabel||"",onChange:e=>n("filterBar",e,"allLabel"),placeholder:(0,x.__)("All","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Filter Bar Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.align||"left",onChange:e=>n("filterBar",e||"left","align"),children:Rj.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]})]})},YS=({clustering:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Clustering","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0, |
| 436 |
x.__)("Group nearby markers","b-blocks"),checked:!!e.enabled,onChange:e=>t("clustering",!!e,"enabled"),help:(0,x.__)("Collapses dense marker groups into a single counted bubble as the visitor zooms out.","b-blocks"),__nextHasNoMarginBottom:!0}),e.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Bubble Background","b-blocks"),value:e.background,onChange:e=>t("clustering",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Count Color:","b-blocks"),value:e.textColor,onChange:e=>t("clustering",e,"textColor")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Bubble Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:TS,value:e.size,onChange:e=>t("clustering",e,"size"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Zoom in on cluster click","b-blocks"),checked:!1!==e.clickToZoom,onChange:e=>t("clustering",!!e,"clickToZoom"),__nextHasNoMarginBottom:!0})]})]}),KS=({controls:e={},updateObj:t})=>{const n=!!e.disableDefaultUI;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map Controls","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Hide all default controls","b-blocks"),checked:n,onChange:e=>t("controls",!!e,"disableDefaultUI"),__nextHasNoMarginBottom:!0}),n&&(0,l.jsx)(js,{status:"info",isIcon:!0,children:(0,x.__)("All built-in controls are hidden. Turn this off to pick them individually.","b-blocks")}),!n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Zoom Buttons","b-blocks"),checked:!!e.zoom,onChange:e=>t("controls",!!e,"zoom"),__nextHasNoMarginBottom:!0}),e.zoom&&(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Zoom Control Position","b-blocks"),value:e.zoomPosition||"RIGHT_BOTTOM",options:AS,onChange:e=>t("controls",e,"zoomPosition"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Map Type Switcher","b-blocks"),checked:!!e.mapType,onChange:e=>t("controls",!!e,"mapType"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Street View (Pegman)","b-blocks"),checked:!!e.streetView,onChange:e=>t("controls",!!e,"streetView"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Fullscreen","b-blocks"),checked:!!e.fullscreen,onChange:e=>t("controls",!!e,"fullscreen"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Scale","b-blocks"),checked:!!e.scale,onChange:e=>t("controls",!!e,"scale"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Rotate / Tilt","b-blocks"),checked:!!e.rotate,onChange:e=>t("controls",!!e,"rotate"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Keyboard Shortcuts","b-blocks"),checked:!1!==e.keyboardShortcuts,onChange:e=>t("controls",!!e,"keyboardShortcuts"),help:(0,x.__)("Lets keyboard users pan and zoom the map. Keep this on for accessibility.","b-blocks"),__nextHasNoMarginBottom:!0})]})},QS=({directions:e={},updateObj:t})=>{const n=e.waypoints||[];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Directions","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show a route","b-blocks"),checked:!!e.enabled,onChange:e=>t("directions",!!e,"enabled"),__nextHasNoMarginBottom:!0}),e.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Travel Mode","b-blocks"),value:e.mode||"DRIVING",options:RS,onChange:e=>t("directions",e,"mode"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Origin","b-blocks"),value:e.origin?.address||"",onChange:e=>t("directions",e,"origin","address"),placeholder:(0,x.__)("Address or place name","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Destination","b-blocks"),value:e.destination?.address||"",onChange:e=>t("directions",e,"destination","address"),placeholder:(0,x.__)("Address or place name","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt15",children:(0,x.__)("Waypoints","b-blocks")}),n.map(((e,o)=>(0,l.jsxs)(y.Flex,{align:"flex-end",gap:2,className:"mt5",children:[(0,l.jsx)(y.TextControl,{className:"flex2",value:e.address||"",onChange:e=>((e,o)=>t("directions",Ob(n,(t=>{t[e].address=o})),"waypoints"))(o,e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.Button,{isDestructive:!0,label:(0,x.__)("Remove","b-blocks"),onClick:()=>t("directions",n.filter(((e,t)=>t!==o)),"waypoints"),children:(0,l.jsx)(y.Dashicon,{icon:"no"})})]},o))),(0,l.jsx)(y.Flex,{justify:"center",className:"addItem mt10",children:(0,l.jsxs)(y.Button,{variant:"secondary",onClick:()=>t("directions",[...n,{address:""}],"waypoints"),children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add Waypoint","b-blocks")]})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show turn-by-turn panel","b-blocks"),checked:!!e.showPanel,onChange:e=>t("directions",!!e,"showPanel"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Route Color:","b-blocks"),value:e.routeColor,onChange:e=>t("directions",e,"routeColor")})]})]})},ZS=({layers:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layers","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Traffic","b-blocks"),checked:!!e.traffic,onChange:e=>t("layers",!!e,"traffic"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Transit","b-blocks"),checked:!!e.transit,onChange:e=>t("layers",!!e,"transit"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Bicycling","b-blocks"),checked:!!e.bicycling,onChange:e=>t("layers",!!e,"bicycling"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("KML / KMZ URL","b-blocks"),value:e.kmlUrl||"",onChange:e=>t("layers",e.trim(),"kmlUrl"),placeholder:"https://example.com/route.kml",help:(0,x.__)("Must be a publicly reachable URL — Google fetches it from their servers, not the visitor’s browser. Note that Google has deprecated KML layers; the GeoJSON field below is the supported route.","b-blocks"),__nextHasNoMarginBottom:!0}),qj(e.kmlUrl)&&(0,l.jsx)(js,{status:"warning",isIcon:!0,children:(0,x.__)("This URL only resolves on your own machine. Google fetches KML server-side, so a local address can never load — host the file publicly, or use GeoJSON below, which is parsed in the browser.","b-blocks")}),(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("GeoJSON","b-blocks"),value:e.geoJson||"",onChange:e=>t("layers",e,"geoJson"),rows:5,placeholder:'{ "type": "FeatureCollection", "features": [] }',__nextHasNoMarginBottom:!0}),Vj(e.geoJson).error&&(0,l.jsx)(js,{status:"danger",isIcon:!0,children:Vj(e.geoJson).error})]}),XS=({map:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Zoom","b-blocks"),value:Yj(e.zoom,12),min:1,max:22,onChange:e=>t("map",Yj(e,12),"zoom"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Min Zoom","b-blocks"),min:1,max:Yj(e.maxZoom)??22,value:e.minZoom??"",onChange:e=>t("map",e,"minZoom"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Max Zoom","b-blocks"),min:Yj(e.minZoom)??1,max:22,value:e.maxZoom??"",onChange:e=>t("map",e,"maxZoom"),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Map Type","b-blocks")}),(0,l.jsx)(y.SelectControl,{ |
| 437 |
className:"flex1",value:e.mapType||"roadmap",options:ES,onChange:e=>t("map",e,"mapType"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Let visitors switch map type","b-blocks"),checked:!1!==e.allowTypeSwitch,onChange:e=>t("map",!!e,"allowTypeSwitch"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Gesture Handling","b-blocks"),value:e.gestureHandling||"cooperative",options:PS,onChange:e=>t("map",e,"gestureHandling"),help:(0,x.__)("Cooperative requires Ctrl/⌘ + scroll to zoom, so the page never traps the visitor’s scroll.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Draggable","b-blocks"),checked:!1!==e.draggable,onChange:e=>t("map",!!e,"draggable"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Zoom on scroll wheel","b-blocks"),checked:!!e.scrollwheel,onChange:e=>t("map",!!e,"scrollwheel"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Fit map to all markers","b-blocks"),checked:!!e.fitBounds,onChange:e=>t("map",!!e,"fitBounds"),help:(0,x.__)("Overrides the center and zoom above when two or more markers have coordinates.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("hr",{}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Use Aspect Ratio","b-blocks"),checked:!!e.useAspectRatio,onChange:e=>t("map",!!e,"useAspectRatio"),help:(0,x.__)("When on, the map sizes by a fixed aspect ratio (fluid). When off, fixed heights per breakpoint.","b-blocks"),__nextHasNoMarginBottom:!0}),e.useAspectRatio?(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Aspect Ratio","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:e.aspectRatio?.[n]||"",options:[{label:(0,x.__)("Inherit","b-blocks"),value:""},...Oj],onChange:e=>t("map",e,"aspectRatio",n),__nextHasNoMarginBottom:!0})]}):(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:Zj(e,n,"height"),units:TS,onChange:e=>t("map",e,n,"height"),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:Zj(e,n,"maxWidth"),units:TS,onChange:e=>t("map",e,n,"maxWidth"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(v,{className:"mt10",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Map Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:Zj(e,n,"align"),onChange:e=>t("map",e,n,"align"),children:Rj.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),JS=e=>{const{attributes:t,setAttributes:n,arrKey:o="markers",index:i,setActiveIndex:s,apiKey:a=""}=e,r=t[o]||[],c=r[i],{data:d}=Cd("bBlocksUtils"),{refetch:u}=_d("b-blocks-enable-svg-mime-type",{_wpnonce:d?.nonce},!1),p=new Tt,[h,g]=(0,m.useState)(""),[b,f]=(0,m.useState)(""),k=(0,m.useRef)(null),w=(0,m.useMemo)((()=>xe((e=>k.current?.("content",e)),600)),[]),[_,C]=(0,m.useState)(""),j=(0,m.useRef)(!1),$=(0,m.useMemo)((()=>xe((e=>{k.current?.("image",e,"alt"),j.current=!1}),600)),[]),S=r[i]?.image?.alt||"";if((0,m.useEffect)((()=>{j.current||C(S)}),[i,S]),!c)return null;const T=t.categories||[],M=(e,t,a=null,l=null)=>{n({[o]:Ob(r,(n=>{null!==l?n[i][e][a][l]=t:null!==a?n[i][e][a]=t:n[i][e]=t}))}),s&&s(i)};k.current=M;const N=async()=>{const e=(c.address||"").trim();if(e&&a){g("loading");try{const{Geocoder:t}=await yS(a,["geocoding"]),{results:s}=await(new t).geocode({address:e}),l=s?.[0]?.geometry?.location;if(!l)throw new Error("not-found");n({[o]:Ob(r,(e=>{e[i].address=s[0].formatted_address,e[i].lat=Number(l.lat().toFixed(6)),e[i].lng=Number(l.lng().toFixed(6))}))}),g("done")}catch(e){f(Fj(e)),g("error")}}};return(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small markerItemSettingsTabPanel",activeClass:"activeTab",tabs:HS,initialTabName:"icon",children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:["location"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Address","b-blocks")}),(0,l.jsxs)(y.Flex,{align:"flex-end",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex2",value:c.address||"",onChange:e=>M("address",e),placeholder:(0,x.__)("Search an address","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.Button,{variant:"secondary",onClick:N,disabled:!a||!c.address||"loading"===h,children:"loading"===h?(0,x.__)("Locating…","b-blocks"):(0,x.__)("Locate","b-blocks")})]}),"error"===h&&(0,l.jsx)(js,{status:"danger",isIcon:!0,children:b}),(null===Yj(c.lat)||null===Yj(c.lng))&&(0,l.jsx)(js,{status:"warning",isIcon:!0,children:(0,x.__)("This marker has no coordinates, so it will not appear on the map. Use Locate above, or type a latitude and longitude below.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Latitude","b-blocks"),step:1e-6,value:c.lat??"",onChange:e=>M("lat",Yj(e,0)),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Longitude","b-blocks"),step:1e-6,value:c.lng??"",onChange:e=>M("lng",Yj(e,0)),__next40pxDefaultSize:!0})]}),(0,l.jsx)("br",{}),(0,l.jsxs)(y.Flex,{className:"m10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Category","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:c.category||"",options:[{label:(0,x.__)("None","b-blocks"),value:""},...T.map((e=>({label:e.label,value:e.id})))],onChange:e=>M("category",e),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.CheckboxControl,{className:"mt10",label:(0,x.__)("Draggable in the editor","b-blocks"),checked:!1!==c.draggable,onChange:e=>M("draggable",!!e)}),(0,l.jsx)("br",{}),(0,l.jsx)(y.CheckboxControl,{className:"m10",label:(0,x.__)("Open its info window by default","b-blocks"),checked:!!c.openByDefault,onChange:e=>M("openByDefault",!!e)})]}),"content"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Title","b-blocks"),value:c.title||"",onChange:e=>M("title",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Info Window Content","b-blocks")}),(0,l.jsx)(Ls,{value:c.content,onChange:w}),(0,l.jsx)("div",{className:"mt15",children:(0,l.jsx)(we,{label:(0,x.__)("Image","b-blocks"),width:"90%",height:"90%",value:{url:c.image?.url},onChange:e=>M("image",e?.url||"","url")})}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Image Alt Text","b-blocks"),value:_,onChange:e=>{j.current=!0,C(e),$(e)},__nextHasNoMarginBottom:!0})]}),"icon"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Pin Type","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",options:FS,value:c.icon?.type||"default",onChange:e=>M("icon",e,"type")})]}),(0,l.jsxs)("div",{className:"mt15",children:["library"===c.icon?.type&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:c.icon.url.library,onChange:e=>M("icon",e,"url","library")}),"upload"===c.icon?.type&&(0,l.jsx)(we,{label:(0,x.__)("Upload SVG","b-blocks"),types:["image/svg+xml"],value:{url:c?.icon?.url?.upload},onClick:async()=>(jd(),await u()),onChange:async e=>{const t=e?.url?await p.sanitizeFile(e.url):"";M("icon",t,"url","upload")},isSvgEnabled:!0}),"image"===c.icon?.type&&(0,l.jsx)(we,{label:(0,x.__)("Pin Image","b-blocks"), |
| 438 |
value:{url:c.image?.url},onChange:e=>M("image",e?.url||"","url")})]}),"default"===(c.icon?.type||"default")&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Pin Color:","b-blocks"),value:c.pinColor,onChange:e=>M("pinColor",e)}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Glyph Color:","b-blocks"),value:c.glyphColor,onChange:e=>M("glyphColor",e)})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Animation","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex2",value:c.animation||"",options:[{label:(0,x.__)("Inherit","b-blocks"),value:""},...BS],onChange:e=>M("animation",e),__nextHasNoMarginBottom:!0})]})]})]})})},eT=({attributes:e,setAttributes:t,updateObj:n,activeIdx:o,setActiveIdx:i,device:s,isPremium:a,apiKey:r})=>{const{source:c={},infoWindow:d={}}=e,u=(e.markers?.length||0)+1,p=Jj(e.theme||{}).length>0,h=(0,m.useCallback)((e=>(0,l.jsx)(JS,{...e,apiKey:r,device:s})),[r,s]);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Markers","b-blocks"),initialOpen:!1,children:[!c.mapId&&(0,l.jsx)(js,{status:"warning",isIcon:!0,children:(0,x.__)("Markers stay hidden until you add a Map ID. Google Advanced Markers cannot render without one — create a Map ID in the Google Cloud console and paste it into Map Source → Map ID.","b-blocks")}),c.mapId&&p&&(0,l.jsx)(js,{status:"info",isIcon:!0,children:(0,x.__)("Your Map ID is active, so markers work but the Style tab’s themes are ignored. Style this map in the Google Cloud console instead.","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Info Window Opens On","b-blocks"),help:(0,x.__)("Always open shows every marker’s info window as soon as the map loads.","b-blocks"),value:d.trigger||"click",options:IS,onChange:e=>n("infoWindow",e,"trigger"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),"always"!==(d.trigger||"click")&&"none"!==d.trigger&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Only one open at a time","b-blocks"),checked:!1!==d.singleOpen,onChange:e=>n("infoWindow",!!e,"singleOpen"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(_s,{attributes:e,setAttributes:t,arrKey:"markers",itemLabel:"Marker",design:a?"sortable":"single",ItemSettings:h,newItem:WS(u,c.center),activeIndex:o,setActiveIndex:i,minItem:0}),!a&&(0,l.jsxs)("small",{children:[(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"_blank",rel:"noopener noreferrer",children:(0,x.__)("Upgrade to Premium","b-blocks")})})," ",(0,x.__)("to unlock sorting and more features.","b-blocks")]})]})},tT=({performance:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Performance","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Load the map","b-blocks"),value:e.lazyLoad||"onView",options:DS,onChange:e=>t("performance",e,"lazyLoad"),help:(0,x.__)("Deferring the load keeps Google’s scripts off the page until the visitor actually needs them.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(js,{status:"info",isIcon:!0,children:(0,x.__)("The editor always loads the map immediately so you can see your changes.","b-blocks")})]}),nT=({tools:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Search & Location","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Search Box","b-blocks"),checked:!!e.searchBox,onChange:e=>t("tools",!!e,"searchBox"),help:(0,x.__)("Adds a Places autocomplete field above the map. Requires the Places API (New) on your key.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Find my location button","b-blocks"),checked:!!e.geolocation,onChange:e=>t("tools",!!e,"geolocation"),__nextHasNoMarginBottom:!0}),e.geolocation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Nearby Radius (metres)","b-blocks"),min:0,step:100,value:e.nearbyRadius??0,onChange:e=>t("tools",Yj(e,0),"nearbyRadius"),__next40pxDefaultSize:!0}),(0,l.jsx)(js,{status:"info",isIcon:!0,children:(0,x.__)("Browsers only allow location access on HTTPS, and the visitor must approve the prompt.","b-blocks")})]})]}),oT=e=>{const{attributes:t,setAttributes:n,arrKey:o="shapes",index:i}=e,s=t[o]||[],a=s[i];if(!a)return null;const r=(e,t,a=null)=>n({[o]:Ob(s,(n=>{null!==a?n[i][e][a]=t:n[i][e]=t}))}),c="polyline"===a.type||"polygon"===a.type,d="polyline"!==a.type,u=c?wS(a.path).length<2:"circle"===a.type?null===Yj(a.center?.lat)||null===Yj(a.center?.lng)||!Yj(a.radius):["north","south","east","west"].some((e=>null===Yj(a.bounds?.[e])));return(0,l.jsxs)(l.Fragment,{children:[u&&(0,l.jsx)(js,{status:"warning",isIcon:!0,children:c?(0,x.__)('This shape needs at least two "latitude,longitude" points before it appears on the map.',"b-blocks"):"circle"===a.type?(0,x.__)("This circle needs a centre latitude, longitude and radius before it appears on the map.","b-blocks"):(0,x.__)("This rectangle needs all four bounds before it appears on the map.","b-blocks")}),u&&(0,l.jsx)(y.Button,{className:"mt10",variant:"secondary",onClick:()=>n({[o]:Ob(s,(e=>{Object.assign(e[i],US(t.source?.center,i))}))}),children:(0,x.__)("Fill from map centre","b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Label","b-blocks"),value:a.label||"",onChange:e=>r("label",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Type","b-blocks"),value:a.type,options:zS,onChange:e=>r("type",e),__nextHasNoMarginBottom:!0}),c&&(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Path","b-blocks"),value:a.path||"",onChange:e=>r("path",e),rows:4,placeholder:"23.8103,90.4125\n23.7900,90.4000",help:(0,x.__)('One "latitude,longitude" pair per line — or paste a JSON array of {lat, lng} objects.',"b-blocks"),__nextHasNoMarginBottom:!0}),"circle"===a.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Center Latitude","b-blocks"),step:1e-6,value:a.center?.lat??"",onChange:e=>r("center",Yj(e,0),"lat"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Center Longitude","b-blocks"),step:1e-6,value:a.center?.lng??"",onChange:e=>r("center",Yj(e,0),"lng"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Radius (metres)","b-blocks"),min:1,step:50,value:a.radius??1e3,onChange:e=>r("radius",Yj(e,1e3)),__next40pxDefaultSize:!0})]}),"rectangle"===a.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Bounds","b-blocks")}),(0,l.jsxs)(y.Flex,{gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("North","b-blocks"),step:1e-6,value:a.bounds?.north??"",onChange:e=>r("bounds",Yj(e,0),"north"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("South","b-blocks"),step:1e-6,value:a.bounds?.south??"",onChange:e=>r("bounds",Yj(e,0),"south"),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt5",gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("East","b-blocks"),step:1e-6,value:a.bounds?.east??"",onChange:e=>r("bounds",Yj(e,0),"east"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("West","b-blocks"),step:1e-6,value:a.bounds?.west??"",onChange:e=>r("bounds",Yj(e,0),"west"),__next40pxDefaultSize:!0})]})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Stroke Color:","b-blocks"),value:a.strokeColor,onChange:e=>r("strokeColor",e)}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Stroke Opacity","b-blocks"),value:Yj(a.strokeOpacity,.9),min:0,max:1,step:.05,onChange:e=>r("strokeOpacity",Yj(e,.9)),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0, |
| 439 |
x.__)("Stroke Weight","b-blocks"),value:Yj(a.strokeWeight,3),min:1,max:20,onChange:e=>r("strokeWeight",Yj(e,3)),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Fill Color:","b-blocks"),value:a.fillColor,onChange:e=>r("fillColor",e)}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Fill Opacity","b-blocks"),value:Yj(a.fillOpacity,.25),min:0,max:1,step:.05,onChange:e=>r("fillOpacity",Yj(e,.25)),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})]})},iT=({attributes:e,setAttributes:t})=>(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Shapes","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_s,{attributes:e,setAttributes:t,arrKey:"shapes",itemLabel:"Shape",design:"sortable",minItem:0,ItemSettings:oT,newItem:GS((e.shapes?.length||0)+1,e.source?.center)})}),sT=({source:e={},updateObj:t,apiKey:n=""})=>{const o=e.type||(e.embedUrl?"embed":"interactive"),i=e.center||{},s=e.embedUrl||"",a=s&&!Dj(s),[r,c]=(0,m.useState)(i.address||""),[d,u]=(0,m.useState)(""),[p,h]=(0,m.useState)(""),g=(0,m.useRef)(i.address||"");(0,m.useEffect)((()=>{c(i.address||""),g.current=i.address||""}),[i.address]);const b=async e=>{const o=(e??r).trim();if(o&&n){u("loading");try{const{Geocoder:e}=await yS(n,["geocoding"]),{results:i}=await(new e).geocode({address:o}),s=i?.[0]?.geometry?.location;if(!s)throw new Error("not-found");g.current=i[0].formatted_address,t("source",{lat:Number(s.lat().toFixed(6)),lng:Number(s.lng().toFixed(6)),address:i[0].formatted_address},"center"),u("done")}catch(e){h(Fj(e)),u("error")}}};return(0,m.useEffect)((()=>{if("interactive"!==o||!n)return;const e=r.trim();if(!e||e===g.current)return;const t=setTimeout((()=>b(e)),900);return()=>clearTimeout(t)}),[r,o,n]),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map Source","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Tn,{label:(0,x.__)("Mode","b-blocks"),options:LS,value:o,onChange:e=>t("source",e,"type")}),"embed"===o?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Google Maps Embed","b-blocks"),value:s,onChange:e=>t("source",(e=>{if(!e||"string"!=typeof e)return"";const t=e.trim();if(!t)return"";if(/<iframe\b/i.test(t)){const e=t.match(/\bsrc\s*=\s*["']([^"']+)["']/i);return e&&e[1]?e[1].trim():""}return t})(e),"embedUrl"),placeholder:"https://www.google.com/maps/embed?pb=...",help:(0,x.__)("In Google Maps, click Share → Embed a map → Copy HTML. Paste the full iframe code OR just the src URL — we will extract it for you.","b-blocks"),rows:4,__nextHasNoMarginBottom:!0}),a&&(0,l.jsx)(js,{status:"warning",isIcon:!0,children:(0,x.__)("This does not look like a Google Maps embed URL. Only https://www.google.com/maps/embed URLs are allowed.","b-blocks")})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt15",children:(0,x.__)("Center Address","b-blocks")}),(0,l.jsxs)(y.Flex,{align:"flex-end",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex2",value:r,onChange:c,placeholder:(0,x.__)("e.g. 1600 Amphitheatre Parkway, Mountain View","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.Button,{variant:"secondary",onClick:()=>b(),disabled:!n||!r.trim()||"loading"===d,children:"loading"===d?(0,x.__)("Locating…","b-blocks"):(0,x.__)("Locate","b-blocks")})]}),!n&&(0,l.jsx)(js,{status:"warning",isIcon:!0,children:(0,x.__)("Add a Google Maps API key to look up addresses.","b-blocks")}),"error"===d&&(0,l.jsx)(js,{status:"danger",isIcon:!0,children:p}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex1",label:(0,x.__)("Latitude","b-blocks"),value:i.lat??"",step:1e-6,onChange:e=>t("source",e,"center","lat"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.TextControl,{className:"flex1",label:(0,x.__)("Longitude","b-blocks"),value:i.lng??"",step:1e-6,onChange:e=>t("source",e,"center","lng"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Map ID","b-blocks"),value:e.mapId||"",onChange:e=>t("source",e,"mapId"),help:(0,x.__)("Optional. A Map ID from Google Cloud console enables cloud-based styling. Leave empty to use the JSON themes in the Style tab.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex1",label:(0,x.__)("Language","b-blocks"),value:e.language||"",onChange:e=>t("source",e.trim(),"language"),placeholder:"en",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"flex1",label:(0,x.__)("Region","b-blocks"),value:e.region||"",onChange:e=>t("source",e.trim(),"region"),placeholder:"US",__nextHasNoMarginBottom:!0})]})]})]})},aT=({attributes:e,updateObj:t})=>{const{theme:n={},source:o={},markers:i=[],clustering:s={}}=e,a=n.preset||"default",r=Jj(n).length>0,c=i.length>0||!!s.enabled;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map Theme","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Theme","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:a,options:OS,onChange:e=>t("theme",e,"preset"),__nextHasNoMarginBottom:!0})]}),r&&o.mapId&&(0,l.jsx)(js,{status:"warning",isIcon:!0,children:(0,x.__)("Your Map ID overrides these themes — Google applies the map’s cloud styling instead. Style it in the Google Cloud console, or clear the Map ID under Map Source to use the themes here.","b-blocks")}),!o.mapId&&c&&(0,l.jsx)(js,{status:"info",isIcon:!0,children:(0,x.__)("Themes apply because no Map ID is set — which is also why markers stay hidden. Google cannot combine JSON themes with Advanced Markers; add a Map ID under Map Source for markers, and style that map in the Google Cloud console.","b-blocks")}),"custom"===a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Custom Style JSON","b-blocks")}),(0,l.jsx)(wt,{value:n.customJson||"",onChange:e=>t("theme",e,"customJson"),height:"220px"}),!e$(n.customJson)&&(0,l.jsx)(js,{status:"danger",isIcon:!0,children:(0,x.__)("This is not a valid style array. Paste the JSON from the Google Maps Styling Wizard.","b-blocks")})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Grayscale","b-blocks"),value:Yj(n.grayscale,0),min:0,max:100,onChange:e=>t("theme",Yj(e,0),"grayscale"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Saturation","b-blocks"),value:Yj(n.saturation,0),min:-100,max:100,onChange:e=>t("theme",Yj(e,0),"saturation"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ge,{className:"mt10",label:(0,x.__)("Hue:","b-blocks"),value:n.hue,onChange:e=>t("theme",e,"hue")})]})},rT=e=>{const{attributes:t,updateObj:n,device:o="desktop"}=e,{map:i={},controls:s={},clustering:a={},layers:r={},directions:c={},tools:d={},performance:u={},caption:p={}}=t,h=Kj(t).source,g="embed"!==h.type;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(sT,{source:h,updateObj:n,apiKey:e.apiKey}),g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(XS,{map:i,updateObj:n,device:o}),(0,l.jsx)(KS,{controls:s,updateObj:n}),(0,l.jsx)(aT,{attributes:t,updateObj:n}),(0,l.jsx)(eT,{...e}),(0,l.jsx)(YS,{clustering:a,updateObj:n}),(0,l.jsx)(qS,{...e}),(0,l.jsx)(ZS,{layers:r,updateObj:n,markerCount:t.markers?.length||0,plottableCount:(t.markers||[]).filter((e=>null!==kS(e))).length}),(0,l.jsx)(iT,{...e}),(0,l.jsx)(QS,{directions:c,updateObj:n}),(0,l.jsx)(nT,{tools:d,updateObj:n}),(0,l.jsx)(tT,{performance:u,updateObj:n})]}),!g&&(0,l.jsx)(XS,{map:i,updateObj:n,device:o}),(0,l.jsx)(VS,{caption:p,updateObj:n})]})},lT=({caption:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:e.color,onChange:e=>t("caption",e,"color")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo, |
| 440 |
onChange:e=>t("caption",e,"typo")})]}),cT=({filterBar:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Filter Bar","b-blocks"),initialOpen:!1,children:[!e.show&&(0,l.jsx)(js,{status:"info",isIcon:!0,children:(0,x.__)("Turn the filter bar on under General → Categories & Filter Bar to see these styles.","b-blocks")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Chip Color:","b-blocks"),value:e.color,onChange:e=>t("filterBar",e,"color")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Chip Background:","b-blocks"),value:e.bgColor,onChange:e=>t("filterBar",e,"bgColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Active Background:","b-blocks"),value:e.activeColor,onChange:e=>t("filterBar",e,"activeColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Active Text:","b-blocks"),value:e.activeTextColor,onChange:e=>t("filterBar",e,"activeTextColor")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("filterBar",e,"typo")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:TS,value:e?.[n]?.gap,onChange:e=>t("filterBar",e,n,"gap"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Chip Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:TS,values:e?.[n]?.padding,resetValues:MS,onChange:e=>t("filterBar",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Chip Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:TS,values:e?.[n]?.radius,resetValues:MS,onChange:e=>t("filterBar",e,n,"radius")})]}),dT=({infoWindow:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Info Window","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:e.bgColor,onChange:e=>t("infoWindow",e,"bgColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:e.textColor,onChange:e=>t("infoWindow",e,"textColor")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("infoWindow",e,"typo")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:TS,value:e?.[n]?.maxWidth,onChange:e=>t("infoWindow",e,n,"maxWidth"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:TS,values:e?.[n]?.padding,resetValues:MS,onChange:e=>t("infoWindow",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:TS,values:e?.[n]?.radius,resetValues:MS,onChange:e=>t("infoWindow",e,n,"radius")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:e.shadow,onChange:e=>t("infoWindow",e,"shadow")})]}),uT=({map:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:TS,values:e.borderRadius?.[n],resetValues:MS,onChange:e=>t("map",e,"borderRadius",n)}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:e.shadow,onChange:e=>t("map",e,"shadow")})]}),pT=({marker:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Markers","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Pin Color:","b-blocks"),value:e.pinColor,onChange:e=>t("marker",e,"pinColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Glyph Color:","b-blocks"),value:e.glyphColor,onChange:e=>t("marker",e,"glyphColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Border Color:","b-blocks"),value:e.borderColor,onChange:e=>t("marker",e,"borderColor")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Pin Scale","b-blocks"),value:Yj(e.scale,1),min:.5,max:3,step:.1,onChange:e=>t("marker",Yj(e,1),"scale"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Custom Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:TS,value:e?.[n]?.size,onChange:e=>t("marker",e,n,"size"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Default Animation","b-blocks"),value:e.animation||"none",options:BS,onChange:e=>t("marker",e,"animation"),help:(0,x.__)("Skipped automatically for visitors who prefer reduced motion.","b-blocks"),__nextHasNoMarginBottom:!0})]}),hT=e=>{const{attributes:t,updateObj:n,device:o="desktop"}=e,{map:i={},marker:s={},infoWindow:a={},filterBar:r={},caption:c={}}=t,d="embed"!==Kj(t).source.type;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(uT,{map:i,updateObj:n,device:o}),d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(pT,{marker:s,updateObj:n,device:o}),(0,l.jsx)(dT,{infoWindow:a,updateObj:n,device:o}),(0,l.jsx)(cT,{filterBar:r,updateObj:n,device:o})]}),(0,l.jsx)(lT,{caption:c,updateObj:n})]})},gT=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,[s,a]=(0,m.useState)(0);return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:NS,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(rT,{...e,activeIdx:s,setActiveIdx:a}),"style"===t.name&&(0,l.jsx)(hT,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},mT=(0,w.compose)((0,f.withDispatch)(((e,t)=>({selectBlock:()=>{e("core/block-editor").selectBlock(t.clientId)}}))),(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}})))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i="desktop",selectBlock:s}=e,a="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,r=fe(t,n),c=(0,h.useBlockProps)({id:`block-${o}`}),d=window.bBlocksCursorDataConfig?.nonce,{data:u,isLoading:p}=_d("bblocks_api_keys",{_wpnonce:d},!0),[g,b]=(0,m.useState)("");(0,m.useEffect)((()=>{b(u?.googleMaps?.key||"")}),[u,p]);const f="embed"!==Kj(t).source.type;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(gT,{...e,updateObj:r,isPremium:a,apiKey:g}),(0,l.jsxs)("div",{...c,onClick:()=>s(o),onDragStart:e=>e.stopPropagation(),draggable:!1,children:[(0,l.jsx)(t$,{attributes:t,id:`block-${o}`,isBackend:!0}),f&&!p&&!g&&(0,l.jsxs)(js,{status:"warning",isIcon:!1,className:"mb10",children:[(0,x.__)("Add your Google Maps API key in","b-blocks")," ",(0,l.jsx)("a",{href:vn,target:"_blank",rel:"noopener noreferrer",children:(0,x.__)("bBlocks → Settings","b-blocks")})," ",(0,x.__)("to show an interactive map.","b-blocks")]}),(0,l.jsx)("div",{children:(0,l.jsx)(SS,{attributes:t,apiKey:g,isBackend:!0,device:i,onMarkerDrag:(e,{lat:o,lng:i})=>{n({markers:Ob(t.markers||[],(t=>{t[e]&&(t[e].lat=Number(o.toFixed(6)),t[e].lng=Number(i.toFixed(6)))}))})}})})]})]})}));Nl(Aj.name)&&(0,p.registerBlockType)(Aj,{icon:bl,edit:mT,save:()=>null}) |
| 441 |
;const bT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/hero-section","version":"2.0.71","title":"Hero Section","category":"bBlocks","description":"Landing-page hero with an eyebrow, headline, sub-headline, and a CTA button.","keywords":["hero","hero section","landing page","banner","jumbotron","masthead","page header","cta"],"textdomain":"b-blocks","attributes":{"layout":{"type":"object","default":{"minHeight":"60vh","verticalAlign":{"desktop":"middle","tablet":"","mobile":""},"contentAlign":{"desktop":"center","tablet":"","mobile":""},"btnGap":{"desktop":"16px","tablet":"","mobile":""}}},"eyebrow":{"type":"object","default":{"show":false,"text":"New — Summer 2026","color":"#ffffff","bg":{"type":"solid","color":"rgba(255,255,255,0.14)"},"typo":{"fontSize":{"desktop":"13px","tablet":"","mobile":""},"fontWeight":"600","letterSpace":"2px","textTransform":"uppercase"},"padding":{"desktop":{"top":"6px","right":"14px","bottom":"6px","left":"14px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"50px","right":"50px","bottom":"50px","left":"50px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"heading":{"type":"object","default":{"text":"Build Something Amazing","tag":"h1","color":"#ffffff","typo":{"fontSize":{"desktop":"56px","tablet":"40px","mobile":"28px"},"fontWeight":"700","lineHeight":"1.2"},"bg":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"subHeading":{"type":"object","default":{"show":true,"text":"The easiest way to launch your next big idea — no code required.","color":"rgba(255,255,255,0.85)","typo":{"fontSize":{"desktop":"18px","tablet":"","mobile":"15px"},"lineHeight":"1.55"},"bg":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"button":{"type":"object","default":{"show":true,"text":"Get Started","url":"","newTab":false,"normal":{"bg":{"type":"solid","color":"#ffffff"},"color":"#1a1a2e","border":{}},"hover":{"bg":{},"color":"","border":{}},"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":"600"},"padding":{"desktop":{"top":"14px","right":"28px","bottom":"14px","left":"28px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"6px","right":"6px","bottom":"6px","left":"6px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"transition":0.2}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"30px","right":"","bottom":"30px","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"#1A1A2E","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),fT={top:"flex-start",middle:"center",bottom:"flex-end"},xT={left:"flex-start",center:"center",right:"flex-end"},yT={left:"flex-start",center:"center",right:"flex-end"},vT=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,kT=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:s={},eyebrow:a={},heading:r={},subHeading:c={},button:d={},advanced:u}=e,{minHeight:p="60vh",verticalAlign:h={},contentAlign:g={},btnGap:m={}}=s,b=`#${o} .b-blocks-hero-section`,f=`${b} .b-blocks-hero-section-container`,x=`${b} .b-blocks-hero-section-eyebrow`,y=`${b} .b-blocks-hero-section-heading`,v=`${b} .b-blocks-hero-section-subheading`,k=`${b} .b-blocks-hero-section-actions`,w=`${b} .b-blocks-hero-section-cta--primary`,_=(e,t,n)=>na(e,ha(t?.[n])),C=e=>{const t=vT(h,e)||"middle",n=vT(g,e)||"center",o=null==(i=vT(m,e))||""===i?"":"number"==typeof i?`${i}px`:i;var i;return`\n\t\t\t${b}{ align-items:${fT[t]||"center"}; }\n\t\t\t${f}{ ${na("text-align",n)} align-items:${xT[n]||"center"}; }\n\t\t\t${v}{ ${"center"===n?"margin-left:auto;margin-right:auto;":"margin-left:0;margin-right:0;"} }\n\t\t\t${k}{ ${na("gap",o)} justify-content:${yT[n]||"center"}; }\n\t\t`},j=e=>`\n\t\t${x}{ ${_("padding",a.padding,e)} ${_("margin",a.margin,e)} ${_("border-radius",a.borderRadius,e)} }\n\t\t${y}{ ${_("padding",r.padding,e)} ${_("margin",r.margin,e)} ${_("border-radius",r.borderRadius,e)} }\n\t\t${v}{ ${_("padding",c.padding,e)} ${_("margin",c.margin,e)} ${_("border-radius",c.borderRadius,e)} }\n\t\t${w}{ ${_("padding",d.padding,e)} ${_("margin",d.margin,e)} ${_("border-radius",d.radius,e)} }\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{ |
| 442 |
__html:`\n\t\t\t${pa("",a.typo).googleFontLink}\n\t\t\t${pa("",r.typo).googleFontLink}\n\t\t\t${pa("",c.typo).googleFontLink}\n\t\t\t${pa("",d.typo).googleFontLink}\n\t\t\t${b}{\n\t\t\t\t${"auto"===p?"min-height:auto;":`min-height:${p};`}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${na("color",a.color)}\n\t\t\t\t${oa(a.bg)}\n\t\t\t\t${ia(a.border)}\n\t\t\t}\n\t\t\t${pa(x,a.typo).styles}\n\t\t\t${y}{\n\t\t\t\t${na("color",r.color)}\n\t\t\t\t${oa(r.bg)}\n\t\t\t\t${ia(r.border)}\n\t\t\t}\n\t\t\t${pa(y,r.typo).styles}\n\t\t\t${v}{\n\t\t\t\t${na("color",c.color)}\n\t\t\t\t${oa(c.bg)}\n\t\t\t\t${ia(c.border)}\n\t\t\t}\n\t\t\t${pa(v,c.typo).styles}\n\t\t\t${w}{\n\t\t\t\t${oa(d.normal?.bg)}\n\t\t\t\t${na("color",d.normal?.color)}\n\t\t\t\t${ia(d.normal?.border)}\n\t\t\t\ttransition:all ${d.transition??.2}s ease;\n\t\t\t}\n\t\t\t${pa(w,d.typo).styles}\n\t\t\t${w}:hover, ${w}:focus-visible{\n\t\t\t\t${oa(d.hover?.bg)}\n\t\t\t\t${na("color",d.hover?.color)}\n\t\t\t\t${ia(d.hover?.border)}\n\t\t\t}\n\t\t\t${C("desktop")}\n\t\t\t${j("desktop")}\n\t\t\t${t}{ ${C("tablet")} ${j("tablet")} }\n\t\t\t${n}{ ${C("mobile")} ${j("mobile")} }\n\t\t\t${_a(o,u,i,!1)}\n\t\t\t`}})},wT=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],_T={top:"",right:"",bottom:"",left:""},CT=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],jT=[{label:(0,x.__)("Full viewport (100vh)","b-blocks"),value:"100vh"},{label:(0,x.__)("Almost full (90vh)","b-blocks"),value:"90vh"},{label:(0,x.__)("Three-quarter (75vh)","b-blocks"),value:"75vh"},{label:(0,x.__)("Default (60vh)","b-blocks"),value:"60vh"},{label:(0,x.__)("Half viewport (50vh)","b-blocks"),value:"50vh"},{label:(0,x.__)("Auto (fits content)","b-blocks"),value:"auto"},{label:(0,x.__)("Custom","b-blocks"),value:"custom"}],$T=["100vh","90vh","75vh","60vh","50vh","auto"],ST=[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Middle","b-blocks"),value:"middle"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}],TT=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],MT=[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"}],NT=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{layout:i={},eyebrow:s={},heading:a={},subHeading:r={},button:c={}}=e,{minHeight:d="60vh",verticalAlign:u={},contentAlign:p={},btnGap:h={}}=i,g=!$T.includes(d),m=e=>e&&"object"==typeof e?e[o]||"":"desktop"===o&&e||"",b=(e,n)=>{const s=i[e],a=s&&"object"==typeof s?s:{};t({layout:{...i,[e]:{...a,[o]:n}}})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Section min-height","b-blocks"),value:g?"custom":d,options:jT,onChange:e=>n("layout","custom"===e?"600px":e,"minHeight"),__nextHasNoMarginBottom:!0}),g&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Custom min-height","b-blocks"),value:d,units:[{label:"px",value:"px"},{label:"vh",value:"vh"},{label:"%",value:"%"},{label:"rem",value:"rem"},{label:"em",value:"em"}],onChange:e=>n("layout",e||"600px","minHeight"),__next40pxDefaultSize:!0}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Vertical Align","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:m(u),onChange:e=>b("verticalAlign",e||""),children:ST.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e.label,value:e.value,icon:"top"===e.value?"arrow-up-alt2":"bottom"===e.value?"arrow-down-alt2":"minus"},e.value)))})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Text Align","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:m(p),onChange:e=>b("contentAlign",e||""),children:TT.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e.label,value:e.value,icon:`editor-align${e.value}`},e.value)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Gap between buttons","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:m(h),units:wT,onChange:e=>b("btnGap",e),__next40pxDefaultSize:!0})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Eyebrow","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show eyebrow label","b-blocks"),checked:!!s.show,onChange:e=>n("eyebrow",!!e,"show")}),!!s.show&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Eyebrow text","b-blocks"),value:s.text||"",onChange:e=>n("eyebrow",e,"text"),placeholder:(0,x.__)("NEW — SUMMER 2026","b-blocks"),help:(0,x.__)("Also editable inline on the block canvas.","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Headline","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Headline text","b-blocks"),value:a.text||"",onChange:e=>n("heading",e,"text"),placeholder:(0,x.__)("Build Something Amazing","b-blocks"),help:(0,x.__)("Also editable inline on the block canvas.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Heading HTML tag","b-blocks"),labelPosition:"edge",value:a.tag||"h1",options:MT,onChange:e=>n("heading",e,"tag"),help:(0,x.__)("Use H1 only once per page. Other instances should be H2 or H3.","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Sub-headline","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show sub-headline","b-blocks"),checked:!!r.show,onChange:e=>n("subHeading",!!e,"show")}),!!r.show&&(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Sub-headline text","b-blocks"),value:r.text||"",onChange:e=>n("subHeading",e,"text"),placeholder:(0,x.__)("The easiest way to launch your next big idea…","b-blocks"),help:(0,x.__)("Also editable inline on the block canvas.","b-blocks"),rows:3,__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Buttons","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show primary button","b-blocks"),checked:!!c.show,onChange:e=>n("button",!!e,"show")}),!!c.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Primary button label","b-blocks"),value:c.text||"",onChange:e=>n("button",e,"text"),placeholder:(0,x.__)("Get Started","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Primary button URL","b-blocks"),type:"url",value:c.url||"",onChange:e=>n("button",e,"url"),placeholder:"https://…",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open primary in new tab","b-blocks"),checked:!!c.newTab,onChange:e=>n("button",!!e,"newTab")})]})]})]})},LT=({attributes:e,updateObj:t,device:n="desktop"})=>{const[o,i]=(0,m.useState)("normal"),{eyebrow:s={},heading:a={},subHeading:r={},button:c={}}=e,d=c[o]||{},u=(e,o,i,s,a)=>(0,l.jsx)(k,{className:a,label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[e," ",(0,l.jsx)(_,{})]}),units:wT,values:s?.[n],resetValues:_T,onChange:e=>t(o,e,i,n)}) |
| 443 |
;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Eyebrow","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:s.color||"#ffffff",onChange:e=>t("eyebrow",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:s.bg,onChange:e=>t("eyebrow",e,"bg")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:s.typo,onChange:e=>t("eyebrow",e,"typo")}),u((0,x.__)("Padding","b-blocks"),"eyebrow","padding",s.padding,"mt10"),u((0,x.__)("Margin","b-blocks"),"eyebrow","margin",s.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>t("eyebrow",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),u((0,x.__)("Border Radius","b-blocks"),"eyebrow","borderRadius",s.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Headline","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:a.color||"#ffffff",onChange:e=>t("heading",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:a.bg,onChange:e=>t("heading",e,"bg")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:a.typo,onChange:e=>t("heading",e,"typo")}),u((0,x.__)("Padding","b-blocks"),"heading","padding",a.padding,"mt10"),u((0,x.__)("Margin","b-blocks"),"heading","margin",a.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>t("heading",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),u((0,x.__)("Border Radius","b-blocks"),"heading","borderRadius",a.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Sub-headline","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:r.color||"rgba(255,255,255,0.85)",onChange:e=>t("subHeading",e,"color"),defaultColor:"rgba(255,255,255,0.85)"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:r.bg,onChange:e=>t("subHeading",e,"bg")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:r.typo,onChange:e=>t("subHeading",e,"typo")}),u((0,x.__)("Padding","b-blocks"),"subHeading","padding",r.padding,"mt10"),u((0,x.__)("Margin","b-blocks"),"subHeading","margin",r.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:r.border,onChange:e=>t("subHeading",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),u((0,x.__)("Border Radius","b-blocks"),"subHeading","borderRadius",r.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:c.typo,onChange:e=>t("button",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10 flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:d.bg,onChange:e=>t("button",e,o,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:d.color,onChange:e=>t("button",e,o,"color"),defaultColor:"#1a1a2e"}),u((0,x.__)("Padding","b-blocks"),"button","padding",c.padding,"mt10"),u((0,x.__)("Margin","b-blocks"),"button","margin",c.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:d.border,onChange:e=>t("button",e||{},o,"border"),withSlider:!0,__next40pxDefaultSize:!0}),u((0,x.__)("Border Radius","b-blocks"),"button","radius",c.radius),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (s)","b-blocks"),value:c.transition??.2,onChange:e=>t("button",e,"transition"),min:0,max:5,step:.01,__nextHasNoMarginBottom:!0})]})]})},ET=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:"b-blocks"}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:CT,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(NT,{...e}),"style"===t.name&&(0,l.jsx)(LT,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},PT=["left","center","right"],AT=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i="desktop"}=e,{layout:s={},eyebrow:a={},heading:r={},subHeading:c={},button:d={}}=t,u="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,p=fe(t,n),{contentAlign:g={}}=s,m=g&&"object"==typeof g?g[i]||"":"desktop"===i&&g||"",b=["h1","h2","h3"].includes(r.tag)?r.tag:"h1",f=(0,h.useBlockProps)({id:`block-${o}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ET,{...e,updateObj:p,isPremium:u}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:m,onChange:e=>(e=>{const t=g&&"object"==typeof g?g:{};n({layout:{...s,contentAlign:{...t,[i]:e}}})})(PT.includes(e)?e:"")})}),(0,l.jsxs)("div",{...f,children:[(0,l.jsx)(kT,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:"b-blocks-hero-section",children:(0,l.jsxs)("div",{className:"b-blocks-hero-section-container",children:[!!a.show&&(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-hero-section-eyebrow",value:a.text,onChange:e=>p("eyebrow",e,"text"),placeholder:(0,x.__)("Eyebrow label","b-blocks"),allowedFormats:["core/bold","core/italic"],inlineToolbar:!0}),(0,l.jsx)(h.RichText,{tagName:b,className:"b-blocks-hero-section-heading",value:r.text,onChange:e=>p("heading",e,"text"),placeholder:(0,x.__)("Add a powerful headline…","b-blocks"),allowedFormats:["core/bold","core/italic"],inlineToolbar:!0}),!!c.show&&(0,l.jsx)(h.RichText,{tagName:"p",className:"b-blocks-hero-section-subheading",value:c.text,onChange:e=>p("subHeading",e,"text"),placeholder:(0,x.__)("Add supporting copy…","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"],inlineToolbar:!0}),!!d.show&&(0,l.jsx)("div",{className:"b-blocks-hero-section-actions",children:(0,l.jsx)(h.RichText,{tagName:"a",className:"b-blocks-hero-section-cta b-blocks-hero-section-cta--primary",value:d.text,onChange:e=>p("button",e,"text"),placeholder:(0,x.__)("Primary CTA","b-blocks"),allowedFormats:[],withoutInteractiveFormatting:!0,onClick:e=>e.preventDefault()})})]})})})]})]})}));Nl(bT.name)&&(0,p.registerBlockType)(bT,{icon:vl,edit:AT}) |
| 444 |
;const BT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/html","version":"1.0.0","title":"HTML","category":"bBlocks","description":"Use the HTML block to add and preview HTML code in your posts or pages, enhancing your website\'s content and functionality.","keywords":["html","custom code","js","css"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"htmlCode":{"type":"string","default":""},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),IT=function(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 16 16",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M4.854 4.146a.5.5 0 010 .708L1.707 8l3.147 3.146a.5.5 0 01-.708.708l-3.5-3.5a.5.5 0 010-.708l3.5-3.5a.5.5 0 01.708 0zm6.292 0a.5.5 0 000 .708L14.293 8l-3.147 3.146a.5.5 0 00.708.708l3.5-3.5a.5.5 0 000-.708l-3.5-3.5a.5.5 0 00-.708 0zm-.999-3.124a.5.5 0 01.33.625l-4 13a.5.5 0 01-.955-.294l4-13a.5.5 0 01.625-.33z",clipRule:"evenodd"})})},OT=["script","object","embed","link","meta","base"],RT=["href","src","action","formaction","data","poster","background"],zT=/^(?:javascript:|vbscript:|data:text\/html)/i,DT=({attributes:e,id:t,isBackend:n=!1})=>{const{advanced:o}=e;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${Ca(t,o,n)}\n\t`}})},FT=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}];var HT=a(470);a(47),a(3158),a(1289),a(9072),a(9289);const WT=e=>{const{value:t,onChange:n,height:o="300px",width:i="100%"}=e,s=Math.floor(99999999*Math.random()),a=(0,m.useRef)(null),r=(0,m.useCallback)((e=>{clearTimeout(a.current),a.current=setTimeout((()=>{n(e)}),600)}),[n]);return(0,l.jsx)("div",{children:(0,l.jsx)(HT.Ay,{mode:"html",theme:"monokai",name:`advEditor-${s}`,onChange:r,fontSize:12,lineHeight:19,height:o,width:i,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,value:t,setOptions:{useWorker:!1,enableBasicAutocompletion:!0,enableLiveAutocompletion:!1,enableSnippets:!0,enableMobileMenu:!0,showLineNumbers:!0,tabSize:2}})})},UT=e=>{const{attributes:t,setAttributes:n}=e,{htmlCode:o}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("HTML Code","b-blocks"),initialOpen:!0,children:(0,l.jsx)(WT,{value:o,onChange:e=>n({htmlCode:e})})})]})},GT=e=>{const{attributes:t,setAttributes:n}=e,{advanced:o}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Rs,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:FT,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(UT,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:o,onChange:e=>n({advanced:e})})})]})})]})})},VT=/^(?:text|application)\/(?:x-)?(?:java|ecma)script$/i;Nl(BT.name)&&(0,p.registerBlockType)(BT,{icon:kr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{htmlCode:i}=t,s=Boolean(window?.bBlocksGlobal?.canUnfilteredHtml),a=(0,m.useMemo)((()=>s?i:(e=>{if("string"!=typeof e||""===e.trim())return"";const t=(new DOMParser).parseFromString(e,"text/html");return Array.from(t.body.querySelectorAll("*")).forEach((e=>{OT.includes(e.localName.toLowerCase())?e.remove():Array.from(e.attributes).forEach((({name:t,value:n})=>{const o=t.toLowerCase();(o.startsWith("on")||"srcdoc"===o||RT.includes(o)&&zT.test((e=>[...String(e||"")].filter((e=>e.charCodeAt(0)>32)).join(""))(n)))&&e.removeAttribute(t)}))})),t.body.innerHTML})(i)),[i,s]),r=((e,t=300,n=!0)=>{const o=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const i=o?.current;if(!n||!e||!i)return;const s=[],a=setTimeout((()=>{i?.querySelectorAll("script")?.forEach((e=>{if(!(e=>{const t=(e||"").trim();return!t||"module"===t.toLowerCase()||VT.test(t)})(e.getAttribute("type")))return;const t=document?.createElement("script");Array.from(e?.attributes)?.forEach((({name:e,value:n})=>t?.setAttribute(e,n))),e.src||(t.textContent=e?.textContent),e?.replaceWith(t),s.push(t)}))}),t);return()=>{clearTimeout(a),s?.forEach((e=>e?.remove()))}}),[e,t,n]),o})(a,1e3,s);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(GT,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),id:`html-block-${o}`,children:[(0,l.jsx)(DT,{attributes:t,id:`html-block-${o}`,isBackend:!0}),i?(0,l.jsx)("div",{ref:r,dangerouslySetInnerHTML:{__html:a}}):(0,l.jsx)("div",{children:(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:"html-placeholder",children:(0,l.jsx)(IT,{})})})})]})]})}}) |
| 445 |
;const qT=JSON.parse('{"apiVersion":3,"name":"b-blocks/icon-box","title":"Icon Box","description":"Display awesome icon in a box.","category":"bBlocks","keywords":["icon","box","library","icon library"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"wrapper":{"type":"object","default":{"width":"","height":"","alignment":{"desktop":"flex-start","tablet":"","mobile":""},"wrapperLink":{"url":"","linkText":"","openInNewTab":false,"nofollow":false}}},"icon":{"type":"object","default":{"svg":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' id=\'info-circle-fill\'><path d=\'M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2\'/></svg>","color":"#fff","size":"30px","shadow":{"type":"text"},"hover":{"color":"","shadow":{}}}},"animation":{"type":"object","default":{"type":"none","duration":1000,"delay":0,"iteration":"infinite","iterationCount":1,"hover":{"type":"none","duration":1000,"delay":0,"iteration":"initial","iterationCount":1}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"15px","right":"15px","bottom":"15px","left":"15px"}}},"background":{"normal":{"type":"color","color":"#111"}},"borderShadow":{"normal":{"radius":"50%"}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),YT=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Bounce","b-blocks"),value:"nBounce"},{label:(0,x.__)("Pulse","b-blocks"),value:"nPulse"},{label:(0,x.__)("Spin","b-blocks"),value:"nSpin"},{label:(0,x.__)("Shake","b-blocks"),value:"nShake"},{label:(0,x.__)("Wiggle","b-blocks"),value:"nWiggle"},{label:(0,x.__)("Ping","b-blocks"),value:"nPing"},{label:(0,x.__)("Float","b-blocks"),value:"nFloat"}],KT=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Bounce","b-blocks"),value:"hBounce"},{label:(0,x.__)("Pulse","b-blocks"),value:"hPulse"},{label:(0,x.__)("Spin","b-blocks"),value:"hSpin"},{label:(0,x.__)("Shake","b-blocks"),value:"hShake"},{label:(0,x.__)("Wiggle","b-blocks"),value:"hWiggle"},{label:(0,x.__)("Ping","b-blocks"),value:"hPing"},{label:(0,x.__)("Float","b-blocks"),value:"hFloat"}],QT=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Infinite","b-blocks"),value:"infinite"},{label:(0,x.__)("Number","b-blocks"),value:"number"}],ZT=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),XT=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),JT=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),eM=e=>{const{attributes:t,setAttributes:n,updateObj:o,device:i}=e,{icon:s,wrapper:a,animation:r}=t,{svg:c,size:d,color:u,shadow:p,hover:h}=s,{width:g,height:m,alignment:b={}}=a;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Zn,{value:c,onChange:e=>n({icon:{...s,svg:e}})}),(0,l.jsxs)(y.Flex,{className:"mt20",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"left",value:d,onChange:e=>n({icon:{...s,size:e}})})]}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:5,children:[(0,l.jsxs)(y.Flex,{gap:2,className:"flex1",children:[(0,l.jsx)(v,{className:"mb0",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:b?.[i],onChange:e=>o("wrapper",e,"alignment",i),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:ZT}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:XT}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:JT})]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini mt20",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color","b-blocks"),value:u,onChange:e=>n({icon:{...s,color:e}})}),(0,l.jsx)(nd,{className:"mt20",label:(0,x.__)("Shadow","b-blocks"),value:p,onChange:e=>n({icon:{...s,shadow:e}}),type:"text"})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color","b-blocks"),value:h?.color,onChange:e=>o("icon",e,"hover","color")}),(0,l.jsx)(nd,{className:"mt20",label:(0,x.__)("Shadow","b-blocks"),value:h?.shadow,onChange:e=>o("icon",e,"hover","shadow"),type:"text"})]})]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Wrapper / Box","b-blocks"),initialOpen:!1,children:[(0,l.jsx)("small",{children:(0,x.__)(`Minimum width and height must be greater then ${d}`,"b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt15",label:(0,x.__)("Width","b-blocks"),labelPosition:"left",value:g,onChange:e=>n({wrapper:{...a,width:e}})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height","b-blocks"),labelPosition:"left",value:m,onChange:e=>n({wrapper:{...a,height:e}})})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation","b-blocks"),options:YT,value:r.type,onChange:e=>o("animation",e,"type")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Iteration","b-blocks"),options:QT,value:r.iteration,onChange:e=>o("animation",e,"iteration")}),"number"==r.iteration&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Iteration Count","b-blocks"),min:0,max:10,step:1,value:r.iterationCount,onChange:e=>o("animation",e,"iterationCount")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"), |
| 446 |
min:0,max:2e4,step:50,value:r.duration,onChange:e=>o("animation",e,"duration")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Delay (ms)","b-blocks"),min:0,max:2e4,step:50,value:r.delay,onChange:e=>o("animation",e,"delay")})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation","b-blocks"),options:KT,value:r.hover.type,onChange:e=>o("animation",e,"hover","type")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Iteration","b-blocks"),options:QT,value:r.hover.iteration,onChange:e=>o("animation",e,"hover","iteration")}),"number"===r.hover.iteration&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Iteration Count","b-blocks"),min:0,max:10,step:1,value:r.hover.iterationCount,onChange:e=>o("animation",e,"hover","iterationCount")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"),min:0,max:2e4,step:50,value:r.hover.duration,onChange:e=>o("animation",e,"hover","duration")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Delay (ms)","b-blocks"),min:0,max:2e4,step:50,value:r.hover.delay,onChange:e=>o("animation",e,"hover","delay")})]})]})})})]})},tM=e=>{const{attributes:t,setAttributes:n,device:o}=e,{advanced:i}=t,s=fe(t,n);return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(eM,{attributes:t,setAttributes:n,updateObj:s,device:o})]}),"style"===e.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),enabled:{dimension:["padding","margin"],background:["normal","hover"],borderShadow:["normal","hover","border","shadow"],visibility:["zIndex"]}})]})})})},nM="bBlocksIconBox",oM=({attributes:e,id:o,isBackend:i=!1})=>{const{wrapper:s,icon:a,animation:r,advanced:c}=e,{size:d,color:u,shadow:p}=a,{width:h,height:g}=s,{duration:m,delay:b,type:f,iteration:x,iterationCount:y,hover:v}=r,k=`#${o} .${nM}`,w=`${k} svg`,_=(e,t,n,o,i)=>`${t} ${n}ms ${t==e+"Spin"?"linear":t===e+"Ping"?"cubic-bezier(0, 0, 0.2, 1)":"ease-in-out"} ${o}ms ${i};`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${k}{\n\t\t\t\twidth: ${h&&0!==parseInt(h)?h:"auto"};\n\t\t\t\theight: ${g&&0!==parseInt(g)?g:"auto"};\n\t\t\t}\n\t\t\t#${o}{\n\t\t\t\t${na("justify-content",s?.alignment?.desktop)}\n\t\t\t}\n\t\t\t${w}{\n\t\t\t\tfill: ${u};\n\t\t\t\theight: ${d};\n\t\t\t\twidth: ${d};\n\t\t\t\tfilter: drop-shadow(${da(p,"text")});\n\t\t\t}\n\n\t\t\t${k}:hover svg {\n\t\t\t\t${na("fill",a?.hover?.color)}\n\t\t\t\t${na("filter",jt(a?.hover?.shadow)?`drop-shadow(${da(a?.hover?.shadow,"text")})`:"")}\n\t\t\t}\n\n\t\t\t${k}.${f} {\n\t\t\t\tanimation: ${_("n",f,m,b,"number"===x?y:x)}\n\t\t\t}\n\t\t\t\t\n\t\t\t${k}.${v?.type}:hover{\n\t\t\t\tanimation: ${_("h",v?.type,v?.duration,v?.delay,"number"===v?.iteration?v?.iterationCount:v?.iteration)}\n\t\t\t}\n\n\t\t\t${t}{\n\t\t\t\t#${o}{\n\t\t\t\t\t${na("justify-content",s?.alignment?.tablet)}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t${n}{\n\t\t\t\t#${o}{\n\t\t\t\t\t${na("justify-content",s?.alignment?.mobile)}\n\t\t\t\t}\n\t\t\t}\n\t\t\t${Ca(o,c,i)}\n\n`.replace(/\s+/g," ")}})},iM=({attributes:e})=>{const{icon:t,animation:n}=e,{type:o,hover:i={}}=n,s=(0,m.useMemo)((()=>(e=>Mt.sanitize(e))(t?.svg)),[t?.svg]);return(0,l.jsx)("div",{className:`${nM} b-blocks-icon-box-animation ${o} ${i?.type}`,dangerouslySetInnerHTML:{__html:s}})},sM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,s=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tM,{attributes:t,setAttributes:n,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(oM,{attributes:t,id:s,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(iM,{attributes:t})})]})]})}));Nl(qT.name)&&(0,p.registerBlockType)(qT,{icon:wr,edit:sM}) |
| 447 |
;const aM=JSON.parse('{"apiVersion":3,"name":"b-blocks/image-comparison","title":"Image Comparison","description":"Compare between two images.","category":"bBlocks","keywords":["image comparison","image compare","image filter","visual comparison","before and after image","beaf","before after","before after image"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"alignment":{"type":"string","default":"center"},"theme":{"type":"string","default":"default"},"width":{"type":"string","default":"100%"},"border":{"type":"object","default":{}},"beforeImg":{"type":"object","default":{"id":null,"url":"","alt":"","title":""}},"afterImg":{"type":"object","default":{"id":null,"url":"","alt":"","title":""}},"orientation":{"type":"string","default":"horizontal"},"isSwap":{"type":"boolean","default":false},"isLabel":{"type":"boolean","default":true},"label":{"type":"object","default":{"hAlign":"bottom","vAlign":"center","isShowHover":false}},"beforeLabel":{"type":"string","selector":".beforeLabel","default":""},"afterLabel":{"type":"string","selector":".afterLabel","default":""},"labelTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"labelColors":{"type":"object","default":{"color":"#fff","bg":"#00000080"}},"labelPadding":{"type":"object","default":{"vertical":"10px","horizontal":"15px"}},"isCap":{"type":"boolean","default":true},"cap":{"type":"string","selector":".caption","default":""},"capAlign":{"type":"string","default":"center"},"capTypo":{"type":"object","default":{"fontSize":{"desktop":"14px"}}},"capColors":{"type":"object","default":{"color":"#333","bg":"#f4f4f4"}},"capPadding":{"type":"object","default":{"vertical":"10px","horizontal":"15px"}},"dragg":{"type":"object","default":{"handleType":"default","shapeType":"default"}},"styles":{"type":"object","default":{"container":{"height":{"desktop":"","tablet":"","mobile":""}},"dragg":{"line":{"bg":{"color":"#fff"},"size":2},"icon":{"color":""},"handler":{"color":""}}}},"options":{"type":"object","default":{"defaultOffset":0.5,"moveMouseOver":false,"isMoveClick":false,"autoSlide":{"isAutoSlide":false,"speed":5,"isHoverStop":true}}},"sliderOptions":{"type":"object","default":{"arrowType":"style1","height":{"desktop":"400px","tablet":"400px","mobile":"400px"},"autoplay":true,"dots":false,"speed":500,"autoplaySpeed":2500,"pauseOnHover":true,"infinite":true,"arrows":true,"slidesView":{"desktop":1,"tablet":1,"mobile":1}}},"sliderStyle":{"type":"object","default":{"pagination":{"active":"#146EF5"},"navigation":{"icon":{"normal":{"color":"#000","size":"22px"},"hover":{"color":"","size":"22px"}},"container":{"height":"","width":"","normal":{"bg":{"color":"#fff"},"border":{},"radius":{"left":"30px","right":"30px","top":"30px","bottom":"30px"}},"hover":{"bg":{"color":"#fff"},"border":{},"radius":{}}}}}},"slider":{"type":"array","default":[{"beforeImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg.jpg"},"beforeLabel":"Before Label"},"afterImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg2.jpg"},"afterLabel":"After Label"},"caption":"Before After Image Caption"},{"beforeImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg.jpg"},"beforeLabel":"Before Label"},"afterImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg2.jpg"},"afterLabel":"After Label"},"caption":"Before After Image Caption"},{"beforeImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg.jpg"},"beforeLabel":"Before Label"},"afterImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg2.jpg"},"afterLabel":"After Label"},"caption":"Before After Image Caption"}]}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","jquery"]}'),rM="b-blocks-ImageCompare",lM=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),cM=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),dM=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),uM=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 24 24",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M15 19L15 5 7 12z"})}),pM=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 24 24",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M9 19L17 12 9 5z"})}),hM=e=>({defaulthorizontal:`inset(0 0 0 ${e}%)`,defaultvertical:`inset(${e}% 0 0 0)`,zigzaghorizontal:`polygon(0% 0%, ${e}% 0%, ${e-6}% 9%, ${e}% 18%, ${e-6}% 27%, ${e}% 36%, ${e-6}% 45%, ${e}% 54%, ${e-6}% 63%, ${e}% 72%, ${e-6}% 81%, ${e}% 90%, ${e-6}% 100%, 0% 100%)`,zigzagvertical:`polygon(0% 0%,0% ${e}%,9% ${e+6}% ,18% ${e}%,27% ${e+6}%,36% ${e}%,45% ${e+6}%, 54% ${e}%,63% ${e+6}%,72% ${e}%, 81% ${e+6}%,90% ${e}%, 100% ${e+6}%,100% 0% )`, |
| 448 |
wavehorizontal:`polygon(\n ${e+7.778-8.8}% 0%,\n ${e+7.5-8.8}% 2.383%,\n ${e+7.5-8.8}% 2.383%,\n ${e+7.407-8.8}% 3.172%,\n ${e+7.292-8.8}% 4.088%,\n ${e+7.15-8.8}% 5.118%,\n ${e+6.973-8.8}% 6.247%,\n ${e+6.757-8.8}% 7.46%,\n ${e+6.496-8.8}% 8.745%,\n ${e+6.184-8.8}% 10.085%,\n ${e+5.816-8.8}% 11.467%,\n ${e+5.387-8.8}% 12.877%,\n ${e+4.889-8.8}% 14.3%,\n ${e+4.889-8.8}% 14.3%,\n ${e+4.324-8.8}% 15.725%,\n ${e+3.718-8.8}% 17.148%,\n ${e+3.102-8.8}% 18.571%,\n ${e+2.508-8.8}% 19.994%,\n ${e+1.968-8.8}% 21.417%,\n ${e+1.514-8.8}% 22.839%,\n ${e+1.177-8.8}% 24.262%,\n ${e+.989-8.8}% 25.685%,\n ${e+.983-8.8}% 27.109%,\n ${e+1.189-8.8}% 28.533%,\n ${e+1.189-8.8}% 28.533%,\n ${e+1.624-8.8}% 29.959%,\n ${e+2.256-8.8}% 31.385%,\n ${e+3.039-8.8}% 32.813%,\n ${e+3.925-8.8}% 34.241%,\n ${e+4.867-8.8}% 35.671%,\n ${e+5.816-8.8}% 37.101%,\n ${e+6.726-8.8}% 38.533%,\n ${e+7.549-8.8}% 39.965%,\n ${e+8.238-8.8}% 41.399%,\n ${e+8.744-8.8}% 42.833%,\n ${e+8.744-8.8}% 42.833%,\n ${e+9.034-8.8}% 44.268%,\n ${e+9.119-8.8}% 45.702%,\n ${e+9.024-8.8}% 47.135%,\n ${e+8.775-8.8}% 48.567%,\n ${e+8.396-8.8}% 50%,\n ${e+7.912-8.8}% 51.433%,\n ${e+7.347-8.8}% 52.865%,\n ${e+6.728-8.8}% 54.298%,\n ${e+6.078-8.8}% 55.732%,\n ${e+5.422-8.8}% 57.167%,\n ${e+5.422-8.8}% 57.167%,\n ${e+4.785-8.8}% 58.601%,\n ${e+4.186-8.8}% 60.035%,\n ${e+3.645-8.8}% 61.467%,\n ${e+3.181-8.8}% 62.899%,\n ${e+2.813-8.8}% 64.329%,\n ${e+2.559-8.8}% 65.759%,\n ${e+2.44-8.8}% 67.187%,\n ${e+2.474-8.8}% 68.615%,\n ${e+2.68-8.8}% 70.041%,\n ${e+3.078-8.8}% 71.467%,\n ${e+3.078-8.8}% 71.467%,\n ${e+3.676-8.8}% 72.891%,\n ${e+4.443-8.8}% 74.315%,\n ${e+5.338-8.8}% 75.738%,\n ${e+6.317-8.8}% 77.161%,\n ${e+7.34-8.8}% 78.583%,\n ${e+8.365-8.8}% 80.006%,\n ${e+9.35-8.8}% 81.429%,\n ${e+10.252-8.8}% 82.852%,\n ${e+11.031-8.8}% 84.275%,\n ${e+11.644-8.8}% 85.7%,\n ${e+11.644-8.8}% 85.7%,\n ${e+12.062-8.8}% 87.123%,\n ${e+12.298-8.8}% 88.533%,\n ${e+12.378-8.8}% 89.915%,\n ${e+12.328-8.8}% 91.255%,\n ${e+12.175-8.8}% 92.54%,\n ${e+11.944-8.8}% 93.753%,\n ${e+11.66-8.8}% 94.882%,\n ${e+11.35-8.8}% 95.912%,\n ${e+11.04-8.8}% 96.828%,\n ${e+10.756-8.8}% 97.617%,\n ${e+9.889-8.8}% 100%,\n 0% 100%,0% 97.617%,0% 97.617%,0% 96.828%,0% 95.912%,0% 94.882%,0% 93.753%,0% 92.54%,0% 91.255%,0% 89.915%,0% 88.533%,0% 87.123%,0% 85.7%,0% 85.7%,0% 84.275%,0% 82.852%,0% 81.429%,0% 80.006%,0% 78.583%,0% 77.161%,0% 75.738%,0% 74.315%,0% 72.891%,0% 71.467%,0% 71.467%,0% 70.041%,0% 68.615%,0% 67.187%,0% 65.759%,0% 64.329%,0% 62.899%,0% 61.467%,0% 60.035%,0% 58.601%,0% 57.167%,0% 57.167%,0% 55.732%,0% 54.298%,0% 52.865%,0% 51.433%,0% 50%,0% 48.567%,0% 47.135%,0% 45.702%,0% 44.268%,0% 42.833%,0% 42.833%,0% 41.399%,0% 39.965%,0% 38.533%,0% 37.101%,0% 35.671%,0% 34.241%,0% 32.813%,0% 31.385%,0% 29.959%,0% 28.533%,0% 28.533%,0% 27.109%,0% 25.685%,0% 24.262%,0% 22.839%,0% 21.417%,0% 19.994%,0% 18.571%,0% 17.148%,0% 15.725%,0% 14.3%,0% 14.3%,0% 12.877%,0% 11.467%,0% 10.085%,0% 8.745%,0% 7.46%,0% 6.247%,0% 5.118%,0% 4.088%,0% 3.172%,0% 2.383%,0% 0%,57.778% 0% )`, |
| 449 |
wavevertical:`polygon(\n 0% ${42.167+e-41}%,\n 2.389% ${42.45+e-41}%,\n 2.389% ${42.45+e-41}%,\n 3.175% ${42.54+e-41}%,\n 4.09% ${42.653+e-41}%,\n 5.119% ${42.795+e-41}%,\n 6.248% ${42.972+e-41}%,\n 7.463% ${43.188+e-41}%,\n 8.748% ${43.448+e-41}%,\n 10.09% ${43.76+e-41}%,\n 11.474% ${44.127+e-41}%,\n 12.886% ${44.555+e-41}%,\n 14.311% ${45.05+e-41}%,\n 14.311% ${45.05+e-41}%,\n 15.74% ${45.616+e-41}%,\n 17.168% ${46.224+e-41}%,\n 18.594% ${46.84+e-41}%,\n 20.019% ${47.435+e-41}%,\n 21.444% ${47.975+e-41}%,\n 22.87% ${48.429+e-41}%,\n 24.295% ${48.766+e-41}%,\n 25.721% ${48.952+e-41}%,\n 27.149% ${48.958+e-41}%,\n 28.578% ${48.75+e-41}%,\n 28.578% ${48.75+e-41}%,\n 30.005% ${48.31+e-41}%,\n 31.433% ${47.673+e-41}%,\n 32.863% ${46.886+e-41}%,\n 34.292% ${45.997+e-41}%,\n 35.722% ${45.052+e-41}%,\n 37.152% ${44.1+e-41}%,\n 38.582% ${43.188+e-41}%,\n 40.011% ${42.363+e-41}%,\n 41.439% ${41.674+e-41}%,\n 42.867% ${41.167+e-41}%,\n 42.867% ${41.167+e-41}%,\n 44.296% ${40.878+e-41}%,\n 45.723% ${40.793+e-41}%,\n 47.149% ${40.889+e-41}%,\n 48.575% ${41.14+e-41}%,\n 50% ${41.521+e-41}%,\n 51.425% ${42.007+e-41}%,\n 52.851% ${42.573+e-41}%,\n 54.277% ${43.193+e-41}%,\n 55.704% ${43.844+e-41}%,\n 57.133% ${44.5+e-41}%,\n 57.133% ${44.5+e-41}%,\n 58.561% ${45.137+e-41}%,\n 59.989% ${45.735+e-41}%,\n 61.418% ${46.275+e-41}%,\n 62.848% ${46.737+e-41}%,\n 64.278% ${47.104+e-41}%,\n 65.708% ${47.356+e-41}%,\n 67.137% ${47.474+e-41}%,\n 68.567% ${47.439+e-41}%,\n 69.995% ${47.232+e-41}%,\n 71.422% ${46.833+e-41}%,\n 71.422% ${46.833+e-41}%,\n 72.851% ${46.235+e-41}%,\n 74.279% ${45.469+e-41}%,\n 75.705% ${44.576+e-41}%,\n 77.13% ${43.598+e-41}%,\n 78.556% ${42.577+e-41}%,\n 79.981% ${41.555+e-41}%,\n 81.406% ${40.572+e-41}%,\n 82.832% ${39.672+e-41}%,\n 84.26% ${38.895+e-41}%,\n 85.689% ${38.283+e-41}%,\n 85.689% ${38.283+e-41}%,\n 87.114% ${37.863+e-41}%,\n 88.526% ${37.625+e-41}%,\n 89.91% ${37.542+e-41}%,\n 91.252% ${37.589+e-41}%,\n 92.538% ${37.74+e-41}%,\n 93.752% ${37.968+e-41}%,\n 94.881% ${38.247+e-41}%,\n 95.91% ${38.552+e-41}%,\n 96.825% ${38.856+e-41}%,\n 97.611% ${39.133+e-41}%,\n 100% ${40+e-41}%,\n 100% 100.167%,\n 97.611% 100.167%,\n 97.611% 100.167%,\n 96.825% 100.167%,\n 95.91% 100.167%,\n 94.881% 100.167%,\n 93.752% 100.167%,\n 92.538% 100.167%,\n 91.252% 100.167%,\n 89.91% 100.167%,\n 88.526% 100.167%,\n 87.114% 100.167%,\n 85.689% 100.167%,\n 85.689% 100.167%,\n 84.26% 100.167%,\n 82.832% 100.167%,\n 81.406% 100.167%,\n 79.981% 100.167%,\n 78.556% 100.167%,\n 77.13% 100.167%,\n 75.705% 100.167%,\n 74.279% 100.167%,\n 72.851% 100.167%,\n 71.422% 100.167%,\n 71.422% 100.167%,\n 69.995% 100.167%,\n 68.567% 100.167%,\n 67.137% 100.167%,\n 65.708% 100.167%,\n 64.278% 100.167%,\n 62.848% 100.167%,\n 61.418% 100.167%,\n 59.989% 100.167%,\n 58.561% 100.167%,\n 57.133% 100.167%,\n 57.133% 100.167%,\n 55.704% 100.167%,\n 54.277% 100.167%,\n 52.851% 100.167%,\n 51.425% 100.167%,\n 50% 100.167%,\n 48.575% 100.167%,\n 47.149% 100.167%,\n 45.723% 100.167%,\n 44.296% 100.167%,\n 42.867% 100.167%,\n 42.867% 100.167%,\n 41.439% 100.167%,\n 40.011% 100.167%,\n 38.582% 100.167%,\n 37.152% 100.167%,\n 35.722% 100.167%,\n 34.292% 100.167%,\n 32.863% 100.167%,\n 31.433% 100.167%,\n 30.005% 100.167%,\n 28.578% 100.167%,\n 28.578% 100.167%,\n 27.149% 100.167%,\n 25.721% 100.167%,\n 24.295% 100.167%,\n 22.87% 100.167%,\n 21.444% 100.167%,\n 20.019% 100.167%,\n 18.594% 100.167%,\n 17.168% 100.167%,\n 15.74% 100.167%,\n 14.311% 100.167%,\n 14.311% 100.167%,\n 12.886% 100.167%,\n 11.474% 100.167%,\n 10.09% 100.167%,\n 8.748% 100.167%,\n 7.463% 100.167%,\n 6.248% 100.167%,\n 5.119% 100.167%,\n 4.09% 100.167%,\n 3.175% 100.167%,\n 2.389% 100.167%,\n 0% 100.167%\n )`}),gM=({beforeLabelEl:e,height:t,afterLabelEl:n,beforeImg:o,afterImg:i,orientation:s,options:a,dragg:r,label:c,captionEl:d,...u})=>{const{defaultOffset:p,isMoveClick:h,autoSlide:g,moveMouseOver:b}=a,{isAutoSlide:f,isHoverStop:x,speed:y}=g,[v,k]=(0,m.useState)(100*p),[w,_]=(0,m.useState)(!1),C=(0,m.useRef)(null),{handleClick:j}=((e,t,n,o,i,s=!1,a,r=50,l=!1)=>{const[c,d]=(0,m.useState)(!0),u=(0,m.useRef)(),p=(0,m.useRef)(1),h=o=>{if(!e||!t.current)return;const s=t.current.getBoundingClientRect(),a="touches"in o?o.touches[0]:o,r=("horizontal"===i?a.clientX-s.left:a.clientY-s.top)/("horizontal"===i?s.width:s.height)*100;n(Math.min(Math.max(r,0),100))};return(0,m.useEffect)((()=>{if(!e)return;const t=()=>o(!1),n=e=>h(e),i=e=>h(e);return window.addEventListener("mousemove",n),window.addEventListener("mouseup",t),window.addEventListener("touchmove",i),window.addEventListener("touchend",t),()=>{window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",t),window.removeEventListener("touchmove",i),window.removeEventListener("touchend",t)}}),[e]),(0,m.useEffect)((()=>{if(!s||!c||e)return;let t;const o=e=>{t||(t=e);const i=(e-t)/1e3;t=e,n((e=>{let t=e+p.current*(10*r)*i;return t>=100&&(p.current=-1,t=100),t<=0&&(p.current=1,t=0),t})),u.current=requestAnimationFrame(o)};return u.current=requestAnimationFrame(o),()=>cancelAnimationFrame(u.current)}),[s,c,e,a,r]),(0,m.useEffect)((()=>{if(!t.current)return;const e=()=>d(!a),n=()=>d(!0);return t?.current?.addEventListener("mouseenter",e),t?.current?.addEventListener("mouseleave",n),()=>{t?.current?.removeEventListener("mouseenter",e),t?.current?.removeEventListener("mouseleave",n)}}),[t.current,a]),{handleClick:o=>{if(e||!t.current||!l)return;const s=t.current.getBoundingClientRect(),a=("horizontal"===i?o.clientX-s.left:o.clientY-s.top)/("horizontal"===i?s.width:s.height)*100;n(Math.min(Math.max(a,0),100))}}})(w,C,k,_,s,f,x,y,h),$=()=>{const e=C.current;if(!e)return;const n=Array.from(e.querySelectorAll("img"));if(!n.length)return;const o=parseInt(t,10);let i;if(!isNaN(o)&&o>0)i=o;else{const e=n.map((e=>e.getBoundingClientRect().height)).filter((e=>e>0));if(!e.length)return;i=Math.max(...e)}e.style.height=`${i}px`,n.forEach((e=>{e.style.height=`${i}px`}))};return(0,m.useEffect)((()=>{const e=C.current;if(!e)return;const t=new ResizeObserver($);return t.observe(e),()=>t.disconnect()}),[]),(0,l.jsxs)("div",{...u,className:rM,children:[(0,l.jsxs)("div",{ref:C,className:"b-blocks-comparison-wrapper "+(c.isShowHover?"b-blocks-label-hover":""),onMouseDown:()=>_(!0),onTouchStart:()=>_(!0),...b?{onMouseMove:()=>_(!0),onMouseLeave:()=>_(!1)}:{},onClick:j,children:[(0,l.jsxs)("div",{className:"b-blocks-image-wrapper",children:[(0,l.jsx)("img",{src:o?.url,alt:o?.alt||o?.title,onLoad:$}),e]}),(0,l.jsxs)("div",{className:"b-blocks-image-wrapper",style:{clipPath:hM(v)[r.shapeType+s]},children:[(0,l.jsx)("img",{src:i?.url,alt:i?.alt||i?.title,onLoad:$}),n]}),(0,l.jsx)("div",{className:`b-blocks-comparison-slider-handle b-blocks-slider-${s} ${r.handleType} ${"default"!==r.shapeType?"circle-outline-line-none":""} `,style:{left:"horizontal"===s?`${v}%`:"", |
| 450 |
top:"vertical"===s?`${v}%`:""},children:"default"===r.handleType?(0,l.jsx)("div",{className:"b-blocks-default-icon"},r.handleType):(0,l.jsx)("div",{className:`b-blocks-${r.handleType}-icon`,children:(0,l.jsxs)("div",{children:[(0,l.jsx)(uM,{}),(0,l.jsx)(pM,{})]})},r.handleType)})]}),d]})};var mM=a(4589);const bM={style1:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5303 18.5303C14.2374 18.8232 13.7626 18.8232 13.4697 18.5303L7.46967 12.5303C7.17678 12.2374 7.17678 11.7626 7.46967 11.4697L13.4697 5.46967C13.7626 5.17678 14.2374 5.17678 14.5303 5.46967C14.8232 5.76256 14.8232 6.23744 14.5303 6.53033L9.06066 12L14.5303 17.4697C14.8232 17.7626 14.8232 18.2374 14.5303 18.5303Z"})}),right:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.46967 5.46967C9.76256 5.17678 10.2374 5.17678 10.5303 5.46967L16.5303 11.4697C16.8232 11.7626 16.8232 12.2374 16.5303 12.5303L10.5303 18.5303C10.2374 18.8232 9.76256 18.8232 9.46967 18.5303C9.17678 18.2374 9.17678 17.7626 9.46967 17.4697L14.9393 12L9.46967 6.53033C9.17678 6.23744 9.17678 5.76256 9.46967 5.46967Z"})})},style2:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4939 20.5644C11.1821 20.8372 10.7083 20.8056 10.4356 20.4939L3.43557 12.4939C3.18814 12.2111 3.18814 11.7889 3.43557 11.5061L10.4356 3.50613C10.7083 3.1944 11.1822 3.16281 11.4939 3.43557C11.8056 3.70834 11.8372 4.18216 11.5644 4.49388L5.65283 11.25L20 11.25C20.4142 11.25 20.75 11.5858 20.75 12C20.75 12.4142 20.4142 12.75 20 12.75L5.65283 12.75L11.5644 19.5061C11.8372 19.8179 11.8056 20.2917 11.4939 20.5644Z"})}),right:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5061 3.43557C12.8178 3.16281 13.2917 3.19439 13.5644 3.50612L20.5644 11.5061C20.8119 11.7889 20.8119 12.2111 20.5644 12.4939L13.5644 20.4939C13.2917 20.8056 12.8178 20.8372 12.5061 20.5644C12.1944 20.2917 12.1628 19.8178 12.4356 19.5061L18.3472 12.75H4C3.58579 12.75 3.25 12.4142 3.25 12C3.25 11.5858 3.58579 11.25 4 11.25H18.3472L12.4356 4.49388C12.1628 4.18215 12.1944 3.70833 12.5061 3.43557Z"})})},style3:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M11 20.74C10.9012 20.7423 10.803 20.7238 10.7118 20.686C10.6205 20.6481 10.5382 20.5916 10.47 20.52L2.47 12.52C2.32955 12.3794 2.25066 12.1888 2.25066 11.99C2.25066 11.7913 2.32955 11.6007 2.47 11.46L10.47 3.46003C10.576 3.35806 10.7096 3.2895 10.8542 3.26288C10.9989 3.23626 11.1481 3.25274 11.2835 3.31029C11.4188 3.36783 11.5342 3.4639 11.6154 3.58653C11.6966 3.70917 11.7399 3.85296 11.74 4.00003V7.30003H21C21.1981 7.30262 21.3874 7.38247 21.5275 7.52256C21.6676 7.66265 21.7474 7.85192 21.75 8.05003V16.05C21.7474 16.2481 21.6676 16.4374 21.5275 16.5775C21.3874 16.7176 21.1981 16.7974 21 16.8H11.74V19.99C11.7402 20.139 11.6954 20.2845 11.6116 20.4076C11.5277 20.5307 11.4087 20.6257 11.27 20.68C11.1848 20.7175 11.0931 20.7379 11 20.74ZM4.07 12L10.25 18.18V16.05C10.25 15.8511 10.329 15.6603 10.4697 15.5197C10.6103 15.379 10.8011 15.3 11 15.3H20.25V8.80003H11C10.8019 8.79744 10.6126 8.71759 10.4725 8.57749C10.3324 8.4374 10.2526 8.24813 10.25 8.05003V5.82003L4.07 12Z"})}),right:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M13 20.74C12.9039 20.7541 12.8062 20.7541 12.71 20.74C12.5724 20.6823 12.4551 20.5849 12.3732 20.4602C12.2912 20.3355 12.2484 20.1892 12.25 20.04V16.7H3.00001C2.81189 16.6956 2.63208 16.6216 2.49538 16.4923C2.35868 16.363 2.27481 16.1876 2.26001 16V8.00002C2.25463 7.89856 2.26965 7.79706 2.30417 7.7015C2.3387 7.60595 2.39204 7.51829 2.46103 7.44371C2.53002 7.36913 2.61326 7.30913 2.70584 7.26727C2.79841 7.22542 2.89844 7.20255 3.00001 7.20002H12.25V4.01002C12.2498 3.86106 12.2946 3.71551 12.3784 3.59241C12.4623 3.4693 12.5813 3.37436 12.72 3.32002C12.8551 3.26039 13.0053 3.24376 13.1502 3.27238C13.2951 3.301 13.4277 3.37349 13.53 3.48002L21.53 11.48C21.6705 11.6206 21.7493 11.8113 21.7493 12.01C21.7493 12.2088 21.6705 12.3994 21.53 12.54L13.53 20.54C13.4601 20.6079 13.377 20.6608 13.2858 20.6952C13.1946 20.7296 13.0973 20.7448 13 20.74ZM3.76001 15.2H13C13.1981 15.2026 13.3874 15.2825 13.5275 15.4226C13.6676 15.5626 13.7474 15.7519 13.75 15.95V18.18L19.93 12L13.75 5.83002V8.00002C13.7477 8.19843 13.6689 8.3883 13.53 8.53002C13.3817 8.65257 13.1919 8.71343 13 8.70002H3.76001V15.2Z"})})},style4:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:'${\r direction === "vertical" ? "rotate(90, 13, 12)" : ""\r }',d:"M1.02698 11.9929L5.26242 16.2426L6.67902 14.8308L4.85766 13.0033L22.9731 13.0012L22.9728 11.0012L4.85309 11.0033L6.6886 9.17398L5.27677 7.75739L1.02698 11.9929Z"})}),right:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:'${\r direction === "vertical" ? "rotate(90, 13, 12)" : ""\r }',d:"M23.0677 11.9929L18.818 7.75739L17.4061 9.17398L19.2415 11.0032L0.932469 11.0012L0.932251 13.0012L19.2369 13.0032L17.4155 14.8308L18.8321 16.2426L23.0677 11.9929Z"})})},style5:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:'${\r direction === "vertical" ? "rotate(90, 13, 12)" : ""\r }',d:"m4.431 12.822 13 9A1 1 0 0 0 19 21V3a1 1 0 0 0-1.569-.823l-13 9a1.003 1.003 0 0 0 0 1.645z"})}),right:(0,l.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{transform:'${\r direction === "vertical" ? "rotate(90, 13, 12)" : ""\r }',d:"M5.536 21.886a1.004 1.004 0 0 0 1.033-.064l13-9a1 1 0 0 0 0-1.644l-13-9A1 1 0 0 0 5 3v18a1 1 0 0 0 .536.886z"})})},style6:{left:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",children:[(0,l.jsx)("path",{d:"M16.5 8L13 11.5L16.5 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M10.5 8L7 11.5L10.5 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),right:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",children:[(0,l.jsx)("path",{d:"M7 8L10.5 11.5L7 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M13 8L16.5 11.5L13 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},fM=({icon:e,...t})=>(0,l.jsx)("div",{...t,children:e}),xM=({attributes:e,device:t,setActiveIndex:n})=>{const{orientation:o,options:i,dragg:s,label:a,slider:r,sliderOptions:c,isLabel:d,isCap:u,align:p}=e,h=(0,m.useRef)(),{hAlign:g,vAlign:b}=a,{height:f,autoplay:x,speed:y,autoplaySpeed:v,pauseOnHover:k,infinite:w,dots:_,arrows:C,slidesView:j,arrowType:$}=c;(0,m.useEffect)((()=>{h.current&&r.length<2&&h.current.innerSlider.list.querySelectorAll(".slick-cloned").forEach((e=>{e.style.display="none"}))}),[h.current]);const S={className:"center",centerMode:!0,arrows:C,dots:_,infinite:w,centerPadding:"15%",draggable:!1,autoplay:x,slidesToShow:j[t],speed:y,autoplaySpeed:v,pauseOnHover:k,nextArrow:(0,l.jsx)(fM,{className:"slick-arrow slick-prev",icon:bM[$].right}), |
| 451 |
prevArrow:(0,l.jsx)(fM,{className:"slick-arrow slick-next",icon:bM[$].left})};return(0,l.jsx)(mM.A,{...S,className:"b-blocks-image-compare-slider-wrapper",ref:h,children:r.map(((e,c)=>{const{beforeImg:h,afterImg:m,caption:x}=e,y={beforeLabelEl:d&&h.beforeLabel&&(0,l.jsx)("div",{className:`b-blocks-label b-blocks-before-label b-blocks-${o} ${"horizontal"===o?g:b}`,dangerouslySetInnerHTML:{__html:h.beforeLabel}}),afterLabelEl:d&&m.afterLabel&&(0,l.jsx)("div",{className:`b-blocks-label b-blocks-after-label b-blocks-${o} ${"horizontal"===o?g:b}`,dangerouslySetInnerHTML:{__html:m.afterLabel}}),captionEl:u&&x&&(0,l.jsx)("div",{className:"b-blocks-caption",dangerouslySetInnerHTML:{__html:x}}),orientation:o,options:i,dragg:s,label:a},v=`${t}-${h?.img?.url}-${m?.img?.url}-${r.length}-${JSON.stringify(f)}-${p}-${i.autoSlide.isMouseOver}`;return(0,l.jsx)(gM,{...y,height:f[t],beforeImg:h.img,afterImg:m.img,onClick:()=>n(c)},v)}))})},yM=({attributes:e,afterLabelEl:t,beforeLabelEl:n,captionEl:o,isBackend:i=!1,backDevice:s="desktop",activeIndex:a,setActiveIndex:r=()=>{}})=>{const{beforeImg:c,afterImg:d,orientation:u,styles:p,options:h,dragg:g,label:m,align:b,theme:f,slider:x,sliderOptions:y}=e,{device:v}=wd(),k=i?s:v,w=`${c?.url}-${d?.url}-${JSON.stringify(p.container.height)}-${b}-${h.autoSlide.isMouseOver}-${k}`;return(0,l.jsxs)(l.Fragment,{children:["default"===f&&(0,l.jsx)(gM,{beforeLabelEl:n,afterLabelEl:t,captionEl:o,beforeImg:c,afterImg:d,orientation:u,options:h,dragg:g,label:m,device:k,height:p.container.height[k]},w),"slider"===f&&(0,l.jsx)(xM,{attributes:e,device:k,activeIndex:a,setActiveIndex:r},`${x.length}-${JSON.stringify(y)}`)]})},vM=[{name:"before-img",title:(0,x.__)("Before Img","image-compare")},{name:"after-img",title:(0,x.__)("After Img","image-compare")}],kM=[{label:"Horizontal",value:"horizontal",icon:"image-flip-horizontal"},{label:"Vertical",value:"vertical",icon:"image-flip-vertical"}],wM=[{label:"Top",value:"top",icon:lM},{label:"Middle",value:"middle",icon:cM},{label:"Bottom",value:"bottom",icon:dM}],_M=[{label:"Left",value:"left",icon:"editor-alignleft"},{label:"Center",value:"center",icon:"editor-aligncenter"},{label:"Right",value:"right",icon:"editor-alignright"}],CM=[{name:"general",title:(0,x.__)("General","textdomain")},{name:"style",title:(0,x.__)("Style","textdomain")}],jM=[{label:"Default",value:"default",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-default.png"},{label:"Rectangle Stroke",value:"rectangle-caret",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-rectangle-stroke.png",isPro:!0},{label:"Circle Small",value:"circle-caret",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-circle-small.png",isPro:!0},{label:"Circle Big",value:"circle-big-caret",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-circle-big.png",isPro:!0},{label:"Circle Outline",value:"circle-outline",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-circle-outline.png",isPro:!0},{label:"Circle Outline Line None",value:"circle-outline-line-none",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-circle-outline-line-none.png",isPro:!0},{label:"Capsule Fill",value:"capsule-fill",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-fill.png",isPro:!0},{label:"Capsule Stroke",value:"capsule-stroke",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-stroke.png",isPro:!0},{label:"Capsule Tiny Fill Big",value:"capsule-tiny-fill-big",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-tiny-fill-big.png",isPro:!0},{label:"Capsule Tiny Stroke Big",value:"capsule-tiny-stroke-big",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-tiny-stroke-big.png",isPro:!0},{label:"Capsule Tiny Fill Small",value:"capsule-tiny-fill-small",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-tiny-fill-small.png",isPro:!0},{label:"Capsule Tiny Stroke Small",value:"capsule-tiny-stroke-small",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-tiny-stroke-small.png",isPro:!0}],$M=["rectangle-caret","circle-caret","circle-big-caret","capsule-stroke","capsule-tiny-stroke-big","capsule-tiny-stroke-small"],SM=[{label:(0,x.__)("Style 1","b-blocks"),value:"style1",icon:bM.style1.right},{label:(0,x.__)("Style 2","b-blocks"),value:"style2",icon:bM.style2.right},{label:(0,x.__)("Style 3","b-blocks"),value:"style3",icon:bM.style3.right},{label:(0,x.__)("Style 4","b-blocks"),value:"style4",icon:bM.style4.right},{label:(0,x.__)("Style 5","b-blocks"),value:"style5",icon:bM.style5.right},{label:(0,x.__)("Style 6","b-blocks"),value:"style6",icon:bM.style6.right}],TM=[{name:"navigation",title:(0,x.__)("Navigation","textdomain")},{name:"pagination",title:(0,x.__)("Pagination","textdomain")}],MM=({attributes:e,id:t})=>{const{alignment:n,width:o,border:i,dragg:s,labelTypo:a,labelColors:r,labelPadding:c,capTypo:d,capColors:u,capPadding:p,styles:h,theme:g,sliderStyle:m}=e,{dragg:b}=h,{pagination:f,navigation:x}=m,{icon:y,container:v}=x,k=`#${t}`,w=`${k} .${rM}`,_=`${w} .b-blocks-comparison-wrapper`,C=`${_} .b-blocks-label`,j=`${w} .b-blocks-caption`,$=`${_} .b-blocks-comparison-slider-handle`,S=`${k} .b-blocks-image-compare-slider-wrapper`,T=`${S} .slick-arrow`,M=`${S} .slick-dots`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",a)?.googleFontLink}\n\t\t${pa("",d)?.googleFontLink}\n\t\t${pa(C,a)?.styles}\n\t\t${pa(j,d)?.styles}\n\n\t\t${k}{\n\t\t\ttext-align: ${n};\n\t\t}\n\t\t${w}{\n\t\t\twidth: ${o};\n\t\t\t${ia(i)}\n\t\t}\n\n\t\t${C}{\n\t\t\t${aa(r)}\n\t\t\tpadding: ${ua(c)};\n\t\t}\n\t\t${j}{\n\t\t\t${aa(u)}\n\t\t\tpadding: ${ua(p)};\n\t\t}\n\n\t\t${N=s.handleType,$M.includes(N)?`${$} .b-blocks-${s.handleType}-icon{\n\t\t${na("border-color",b.handler.color)}\n\t\t${na("border-width",jt(b.line.size)?b.line.size+"px":"")}\n\t\t\t}`:`${$} .b-blocks-${s.handleType}-icon{\n\t\t\t\t${na("background-color",b.handler.color)}\n\t\t\t\t${na("border-color",b.handler.color)}\n\t\t\t}`}\n\n\t\t${$} :where(svg){\n\t\t\t${na("color",b.icon.color)}\n\t\t\t${na("fill",b.icon.color)}\n\t\t}\n\t\t${$}::before{\n\t\t\tcontent:"";\n\t\t\t${na("width",jt(b.line.size)?b.line.size+"px":"")}\n\t\t\t${oa(b.line.bg)}\n\t\t}\n\t\t${$}::after{\n\t\t\tcontent:"";\n\t\t\t${na("width",jt(b.line.size)?b.line.size+"px":"")}\n\t\t\t${oa(b.line.bg)}\n\t\t}\n\t\t${"slider"===g?`\n\t\t\t\t${T}{\n\t\t\t\t\t${na("height",v.height)}\n\t\t\t\t\t${na("width",v.width)}\n\t\t\t\t\t${oa(v.normal.bg)}\n\t\t\t\t\t${sa(v.normal.border)}\n\t\t\t\t\t${na("border-radius",ha(v.normal.radius))}\n\t\t\t\t}\n\n\t\t\t\t${T}:hover{\n\t\t\t\t\t${oa(v.hover.bg)}\n\t\t\t\t\t${sa(v.hover.border)}\n\t\t\t\t\t${na("border-radius",ha(v.hover.radius))}\n\t\t\t\t}\n\n\t\t\t\t${T} > svg{\n\t\t\t\t\t${na("width",y.normal.size)}\n\t\t\t\t\t${na("fill",y.normal.color)}\n\t\t\t\t}\n\t\t\t\t${T}:hover svg{\n\t\t\t\t\t${na("fill",y.hover.color)}\n\t\t\t\t\t${na("width",y.hover.size)}\n\t\t\t\t}\n\t\t\t\t${M}>li>button::before{\n\t\t\t\t\t${na("background-color",f.active)}\n\t\t\t\t}\n\t\t\t\t${M}>li.slick-active>button::before{\n\t\t\t\t\t${na("background-color",f.active)}\n\t\t\t\t}\n\t\t\t\t`:""}\n\t\t`.replace(/\s+/g," ")}});var N},NM=({attributes:e,updateObj:t,index:n,setIsProModalOpen:o,premiumProps:i})=>{const{slider:s}=e,a=s[n],{beforeImg:r,afterImg:c,caption:d}=a;return(0,l.jsx)("div",{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:vM,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["before-img"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{isPremium:i,setIsProModalOpen:o,className:"mt10",label:(0,x.__)("Label","image-compare"),value:r.beforeLabel,onChange:e=>t("slider",e,n,"beforeImg","beforeLabel"),Component:y.TextControl}),(0,l.jsx)(Ys,{ |
| 452 |
isPremium:i,setIsProModalOpen:o,className:"mt10",value:r.img,onChange:e=>t("slider",e,n,"beforeImg","img"),placeholder:(0,x.__)("Enter Image URL","image-compare"),Component:ke})]}),"after-img"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{isPremium:i,setIsProModalOpen:o,className:"mt10",label:(0,x.__)("Label","image-compare"),value:c.afterLabel,onChange:e=>t("slider",e,n,"afterImg","afterLabel"),Component:y.TextControl}),(0,l.jsx)(Ys,{isPremium:i,setIsProModalOpen:o,className:"mt10",value:c.img,onChange:e=>t("slider",e,n,"afterImg","img"),placeholder:(0,x.__)("Enter Image URL","image-compare"),Component:ke})]}),(0,l.jsx)(Ys,{isPremium:i,setIsProModalOpen:o,className:"mt10",label:(0,x.__)("Caption","image-compare"),value:d,onChange:e=>t("slider",e,n,"caption"),Component:y.TextControl})]})})})},LM=({value:e,options:t,onChange:n,isPremium:o=!1,setIsProModalOpen:i})=>(0,l.jsx)("div",{className:"icb-preset-items-wrapper",children:t.map(((t,s)=>(0,l.jsx)(y.Tooltip,{position:"top",text:`${t.label}`,delay:100,children:(0,l.jsxs)("div",{onClick:()=>"default"!==t.value&&!o&&t.isPro?i(!0):n(t.value),className:`icb-preset-item ${e===t.value?"active":""} ${"default"!==t.value&&!o&&t.isPro?"icb-premium":""}`,children:[(0,l.jsx)("img",{src:t.img}),(0,l.jsx)("div",{className:"icb-preset-badge",children:"Pro"})]})},s)))}),EM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n,isPremium:o,setIsProModalOpen:i})=>{const{sliderOptions:s}=e,{autoplay:a,speed:r,autoplaySpeed:c,pauseOnHover:d,infinite:u,dots:p,arrows:h,slidesView:g,arrowType:m}=s;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Settings","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Enable Autoplay","image-compare"),checked:a,value:a,onChange:e=>t("sliderOptions",e,"autoplay"),Component:y.ToggleControl}),(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Stop Slider On Mouse Over"),checked:d,value:d,onChange:e=>t("sliderOptions",e,"pauseOnHover"),Component:y.ToggleControl}),(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Enable Infinite Loop"),checked:u,value:u,onChange:e=>t("sliderOptions",e,"infinite"),Component:y.ToggleControl}),(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Enable Pagination"),checked:p,value:p,onChange:e=>t("sliderOptions",e,"dots"),Component:y.ToggleControl}),(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Enable Navigation"),checked:h,value:h,onChange:e=>t("sliderOptions",e,"arrows"),Component:y.ToggleControl}),(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Slides To Show")," ",(0,l.jsx)(_,{})," "]}),step:1,min:1,max:10,value:g[n],onChange:e=>t("sliderOptions",e,"slidesView",n),Component:y.RangeControl}),a?(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Slider Speed (ms)"),step:50,min:0,max:1e4,value:c,onChange:e=>t("sliderOptions",e,"autoplaySpeed"),Component:y.RangeControl}):null,(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Slider Delay (ms)"),step:50,min:0,max:1e4,value:r,onChange:e=>t("sliderOptions",e,"speed"),Component:y.RangeControl})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Arrow","image-compare"),initialOpen:!1,children:[(0,l.jsx)(v,{children:(0,x.__)("Arrow Style","image-compare")}),(0,l.jsx)(Ks,{isPremium:o,setIsProModalOpen:i,isIcon:!0,value:m,onChange:e=>t("sliderOptions",e,"arrowType"),options:SM,proValues:["style1","style2","style3","style4","style5","style6"],size:"default"})]})]})})),PM=({attributes:e,setAttributes:t,updateObj:n,isPremium:o,setIsProModalOpen:i,activeIndex:s,setActiveIndex:a})=>{const{beforeImg:r,afterImg:c,orientation:d,isSwap:u,isLabel:p,label:h,beforeLabel:g,afterLabel:m,isCap:b,cap:f,options:v,dragg:k,styles:w,theme:_}=e,C=["default","rectangle-caret","circle-caret"];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"before-after-image-compare",docsLink:"https://bblockswp.com/docs/image-compare"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image Comparison","image-compare"),initialOpen:!0,children:[(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,labelPosition:"edge",label:(0,x.__)("Theme","image-compare"),value:_,options:[{label:"Default",value:"default"},{label:"Slider",value:"slider"}],onChange:e=>t({theme:e}),Component:y.SelectControl}),(0,l.jsx)(Tn,{className:"mb10",label:(0,x.__)("Orientation","image-compare"),options:kM,value:d,onChange:e=>n("orientation",e),isIcon:!0}),"slider"===_&&(0,l.jsx)(_s,{premiumProps:o,attributes:e,setAttributes:t,activeIndex:s,setActiveIndex:a,updateObj:n,setIsProModalOpen:i,newItem:{beforeImg:{img:{url:"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg.jpg"},beforeLabel:"Before Label"},afterImg:{img:{url:"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg2.jpg"},afterLabel:"After Label"},caption:"Before After Image Caption"},itemLabel:"Slide",arrKey:"slider",design:"sortable",ItemSettings:NM}),"default"===_&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:vM,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["before-img"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ke,{className:"mt10",value:r,onChange:e=>n("beforeImg",e),placeholder:(0,x.__)("Enter Image URL","image-compare")}),(0,l.jsx)(ed,{className:"mt20",value:r,onChange:e=>n("beforeImg",e)})]}),"after-img"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ke,{className:"mt10",value:c,onChange:e=>n("afterImg",e),placeholder:(0,x.__)("Enter Image URL","image-compare")}),(0,l.jsx)(ed,{className:"mt20",value:c,onChange:e=>n("afterImg",e)})]})]})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Swap Images","image-compare"),checked:u,onChange:e=>t({isSwap:e,beforeImg:{...c},afterImg:{...r}})})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Labels","image-compare"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Labels","image-compare"),checked:p,onChange:e=>n("isLabel",e)}),p&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show labels on hover","image-compare"),checked:h.isShowHover,onChange:e=>n("label",e,"isShowHover")}),"horizontal"===d&&(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Label Position","image-compare"),options:wM,value:h.hAlign,onChange:e=>n("label",{...h,hAlign:e}),isIcon:!0,Component:Tn}),"vertical"===d&&(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Label Position","image-compare"),options:_M,value:h.vAlign,onChange:e=>n("label",{...h,vAlign:e}),isIcon:!0,Component:Tn}),"default"===_&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Before Label","image-compare"),value:g,onChange:e=>n("beforeLabel",e),placeholder:(0,x.__)("Before image label","image-compare")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("After Label","image-compare"),value:m,onChange:e=>n("afterLabel",e),placeholder:(0,x.__)("After image label","image-compare")})]})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","image-compare"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Caption","image-compare"),checked:b,onChange:e=>n("isCap",e)}),"default"===_?b&&(0,l.jsx)(y.__experimentalInputControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Caption","image-compare"),value:f,onChange:e=>n("cap",e)}):""]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Default Offset","image-compare"),step:.1,max:1,min:0,value:v.defaultOffset, |
| 453 |
onChange:e=>n("options",e,"defaultOffset"),Component:y.RangeControl}),(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Move Slider On Click","image-compare"),checked:v.isMoveClick,onChange:e=>n("options",e,"isMoveClick"),Component:y.ToggleControl}),(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Move Slider On Mouse Over","image-compare"),checked:v.moveMouseOver,onChange:e=>n("options",e,"moveMouseOver"),Component:y.ToggleControl}),(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Auto Slide","image-compare"),checked:v.autoSlide.isAutoSlide,onChange:e=>n("options",e,"autoSlide","isAutoSlide"),Component:y.ToggleControl}),v.autoSlide.isAutoSlide&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Auto Slide Speed","image-compare"),step:1,max:20,maxLength:20,minLength:0,min:0,value:v.autoSlide.speed,onChange:e=>n("options",e,"autoSlide","speed"),Component:y.RangeControl}),(0,l.jsx)(Ys,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Stop Slider On Mouse Over","image-compare"),checked:v.autoSlide.isHoverStop,onChange:e=>n("options",e,"autoSlide","isHoverStop"),Component:y.ToggleControl})]})]}),"slider"===_&&(0,l.jsx)(EM,{attributes:e,updateObj:n,isPremium:o,setIsProModalOpen:i}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Presets","image-compare"),initialOpen:!1,children:(0,l.jsx)(LM,{value:k.handleType,setIsProModalOpen:i,options:jM,onChange:e=>C.includes(e)?t({dragg:{...k,handleType:e},styles:{...w,dragg:{...w.dragg,line:{...w.dragg.line,size:2}}}}):t({dragg:{...k,handleType:e},styles:{...w,dragg:{...w.dragg,line:{...w.dragg.line,size:3}}}}),isPremium:o})})]})},AM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,isPremium:t,setIsProModalOpen:n,updateObj:o,device:i})=>{const{styles:s,width:a,isLabel:r,labelTypo:c,labelColors:d,labelPadding:u,isCap:p,capTypo:h,capColors:g,capPadding:m,theme:b,sliderOptions:f,sliderStyle:v}=e,{container:w,dragg:C}=s,{height:j}=f,{pagination:$,navigation:S}=v;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Container","image-compare"),className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","image-compare"),labelPosition:"left",value:a,onChange:e=>o("width",e),units:[Ee(),Pe(),Ae(),Ie()]}),"default"===b&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height:","image-compare"),(0,l.jsx)(_,{})]}),value:w.height[i],onChange:e=>o("styles",e,"container","height",i),units:[Ee(),Ae(),Ie()]}),"slider"===b&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height:","image-compare"),(0,l.jsx)(_,{})]}),value:j[i],onChange:e=>o("sliderOptions",e,"height",i),units:[Ee(),Ae(),Ie()]})]}),r&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Labels","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:c,onChange:e=>o("labelTypo",e),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(On,{value:d,onChange:e=>o("labelColors",e),defaults:{color:"#fff",bg:"#00000080"}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","image-compare"),value:u,onChange:e=>o("labelPadding",e),defaults:{vertical:"10px",horizontal:"15px"}})]})}),p&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:h,onChange:e=>o("capTypo",e),defaults:{fontSize:{desktop:14,tablet:14,mobile:14}}}),(0,l.jsx)(On,{value:g,onChange:e=>o("capColors",e),defaults:{color:"#333",bg:"#f4f4f4"}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","image-compare"),value:m,onChange:e=>o("capPadding",e),defaults:{vertical:"10px",horizontal:"15px"}})]})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Divider","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Ys,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Line Size","image-compare"),min:1,max:10,step:1,value:C.line.size,onChange:e=>o("styles",e,"dragg","line","size"),Component:y.RangeControl}),(0,l.jsx)(Ys,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Line Color","image-compare"),value:C.line.bg,onChange:e=>o("styles",e,"dragg","line","bg"),isImage:!1,Component:An}),(0,l.jsx)(Ys,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Handler Color","image-compare"),value:C.handler.color,onChange:e=>o("styles",e,"dragg","handler","color"),Component:Ue}),(0,l.jsx)(Ys,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Icon Color","image-compare"),value:C.icon.color,onChange:e=>o("styles",e,"dragg","icon","color"),isImage:!1,Component:Ue})]}),"slider"===b&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Styles","image-compare"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:TM,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["navigation"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini mt10",activeClass:"activeTab",tabs:Ne,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{isPremium:t,setIsProModalOpen:n,className:"mt10",labelPosition:"edge",label:(0,x.__)("Container Width","image-compare"),value:S.container.width,onChange:e=>o("sliderStyle",e,"navigation","container","width"),Component:y.__experimentalUnitControl}),(0,l.jsx)(Ys,{isPremium:t,setIsProModalOpen:n,className:"mt10",labelPosition:"edge",label:(0,x.__)("Container Height","image-compare"),value:S.container.height,onChange:e=>o("sliderStyle",e,"navigation","container","height"),Component:y.__experimentalUnitControl})]}),(0,l.jsx)(Ys,{isPremium:t,setIsProModalOpen:n,className:"mt10",labelPosition:"edge",label:(0,x.__)("Icon Size","image-compare"),value:S.icon[e.name].size,onChange:t=>o("sliderStyle",t,"navigation","icon",e.name,"size"),Component:y.__experimentalUnitControl}),(0,l.jsx)(Ys,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Icon Color","image-compare"),value:S.icon[e.name].color,onChange:t=>o("sliderStyle",t,"navigation","icon",e.name,"color"),Component:Ue}),(0,l.jsx)(Ys,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Background","image-compare"),value:S.container[e.name].bg,onChange:t=>o("sliderStyle",t,"navigation","container",e.name,"bg"),Component:An}),(0,l.jsx)(Ys,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Border","image-compare"),value:S.container[e.name].border,onChange:t=>o("sliderStyle",t,"navigation","container",e.name,"border"),Component:y.__experimentalBorderBoxControl}),(0,l.jsx)(Ys,{isPremium:t,setIsProModalOpen:n,className:"mt10",label:(0,x.__)("Border Radius","image-compare"),values:S.container[e.name].radius,onChange:t=>o("sliderStyle",t,"navigation","container",e.name,"radius"),Component:k})]})})}),"pagination"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ys,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Active Color","image-compare"),value:$.active,onChange:e=>o("sliderStyle",e,"pagination","active"),Component:Ue})})]})})})]})})),BM=({attributes:e,setAttributes:t,isPremium:n,activeIndex:o,setActiveIndex:i})=>{const{alignment:s,beforeImg:a,afterImg:r,theme:c}=e,[d,u]=(0,m.useState)(!1),p=(n,o,...i)=>{t({[n]:be(e[n],o,...i)})},g={isPremium:n,setIsProModalOpen:u};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Rs,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:CM,onSelect:me,children:n=>(0,l.jsxs)(l.Fragment,{children:["general"===n.name&&(0,l.jsx)(PM,{...g,attributes:e,setAttributes:t,updateObj:p,activeIndex:o,setActiveIndex:i}),"style"===n.name&&(0,l.jsx)(AM,{...g,attributes:e,setAttributes:t,updateObj:p})]})})]}),(0,l.jsxs)(jn,{isProModalOpen:d, |
| 454 |
setIsProModalOpen:u,block:"Image Comparison",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Theme: ","b-blocks")}),(0,x.__)("Create stunning before & after image comparisons in both single view and slider formats.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Label Position: ","b-blocks")}),(0,x.__)("Customize the label position to suit your needs.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Default Offset: ","b-blocks")}),(0,x.__)("Adjusts the initial position of the slider.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Move Slider On Click: ","b-blocks")}),(0,x.__)("Enable the option to move the slider when the user clicks on it.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Move Slider On Mouse Over: ","b-blocks")}),(0,x.__)("Enable the option to move the slider when the mouse hover over it.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Auto Slide: ","b-blocks")}),(0,x.__)("Activate automatic sliding on the compare images.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Auto Slide Speed: ","b-blocks")}),(0,x.__)("Set the speed of the auto moving slider.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Stop Slider On Mouse Over: ","b-blocks")}),(0,x.__)("Pause the sliding movement when the mouse is over the images.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Line Size: ","b-blocks")}),(0,x.__)("Adjust the line size to your preferred thickness.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Line Color: ","b-blocks")}),(0,x.__)("Choose a desired color for the line.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Handler Color: ","b-blocks")}),(0,x.__)("Choose a desired color for the handler.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Icon Color: ","b-blocks")}),(0,x.__)("Select the icon color from the options provided to match your design.","b-blocks")]})]}),"default"===c&&(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(Ce,{label:(0,x.__)("Edit Before Image:","b-blocks"),value:a,onChange:e=>t({beforeImg:e})}),(0,l.jsx)(Ce,{label:(0,x.__)("Edit After Image:","b-blocks"),value:r,onChange:e=>t({afterImg:e})}),(0,l.jsx)(h.AlignmentToolbar,{value:s,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Image Comparison Alignment"),alignmentControls:[{title:(0,x.__)("Image Comparison in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Image Comparison in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Image Comparison in right","b-blocks"),align:"right",icon:"align-right"}]})]})]})},IM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{beforeImg:s,afterImg:a,isLabel:r,label:c,beforeLabel:d,afterLabel:u,isCap:p,cap:g,orientation:b,theme:f}=t,{url:y,alt:v,title:k}=s||{},{url:w,alt:_,title:C}=a||{},{hAlign:j,vAlign:$}=c,S=bBlocksPremiumChecker,[T,M]=(0,m.useState)(0),N=r&&(0,l.jsx)(h.RichText,{className:`b-blocks-label b-blocks-before-label b-blocks-${b} ${"horizontal"===b?j:$}`,tagName:"div",value:d,onChange:e=>n({beforeLabel:e}),placeholder:(0,x.__)("Before image label","image-compare"),inlineToolbar:!0}),L=r&&(0,l.jsx)(h.RichText,{className:`b-blocks-label b-blocks-after-label b-blocks-${b} ${"horizontal"===b?j:$}`,tagName:"div",value:u,onChange:e=>n({afterLabel:e}),placeholder:(0,x.__)("After image label","image-compare"),inlineToolbar:!0}),E=p&&(0,l.jsx)(h.RichText,{className:"b-blocks-caption",tagName:"div",value:g,onChange:e=>n({cap:e}),placeholder:(0,x.__)("Caption of the image comparison","image-compare"),inlineToolbar:!0});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(BM,{attributes:t,setAttributes:n,isPremium:S,attributes:t,setAttributes:n,isPremium:S,activeIndex:T,setActiveIndex:M}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({draggable:!1}),children:[(0,l.jsx)(MM,{attributes:t,id:`block-${o}`}),(()=>{switch(f){case"default":return y&&w?(0,l.jsx)(yM,{afterLabelEl:L,beforeLabelEl:N,captionEl:E,activeIndex:T,setActiveIndex:M,attributes:t,isBackend:!0,backDevice:i}):(0,l.jsxs)("div",{className:"imgPlaceholder",children:[(0,l.jsx)("div",{className:"beforeImg",children:y?(0,l.jsx)("img",{src:y,alt:v||k}):(0,l.jsx)(_e,{label:(0,x.__)("Before Image:","image-compare"),value:s,onChange:({id:e,url:t,alt:o,title:i,caption:s})=>n({beforeImg:{id:e,url:t,alt:o,title:i,caption:s}})})}),(0,l.jsx)("div",{className:"afterImg",children:w?(0,l.jsx)("img",{src:w,alt:_||C}):(0,l.jsx)(_e,{label:(0,x.__)("After Image:","image-compare"),value:a,onChange:({id:e,url:t,alt:o,title:i,caption:s})=>n({afterImg:{id:e,url:t,alt:o,title:i,caption:s}})})})]});case"slider":return(0,l.jsx)(yM,{afterLabelEl:L,beforeLabelEl:N,captionEl:E,activeIndex:T,setActiveIndex:M,attributes:t,isBackend:!0,backDevice:i})}})()]})]})}));Nl(aM.name)&&(0,p.registerBlockType)(aM,{icon:_r,transforms:{from:[{type:"block",blocks:["icb/image-compare"],transform:e=>(0,p.createBlock)("b-blocks/image-comparison",e)},{type:"prefix",prefix:"image-compare",transform:()=>(0,p.createBlock)("b-blocks/image-comparison")}],to:[{type:"block",blocks:["icb/image-compare"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("icb/image-compare",e)}]},edit:IM,save:()=>null});const OM=JSON.parse('{"apiVersion":3,"name":"b-blocks/image-gallery","title":"Image Gallery","description":"Display Multiple Images as Gallery.","category":"bBlocks","keywords":["images","photos","gallery"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"images":{"type":"array","default":[]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"imgPadding":{"type":"object","default":{}},"imgBorder":{"type":"object","default":{}},"imgShadow":{"type":"object","default":{}},"isPreview":{"type":"boolean","default":true},"isCap":{"type":"boolean","default":true},"capAlign":{"type":"string","default":"left"},"capColor":{"type":"string","default":"#333"},"capTitleTypo":{"type":"object","default":{"fontSize":{"desktop":"18px","tablet":"17px","mobile":"16px"}}},"capDescTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fancybox"],"render":"file:./render.php","viewScript":["file:./view.js","fancybox"]}'),RM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({settings:e,filterImages:t,device:n})=>{const{attributes:{images:o,columns:i,imgPadding:s,imgBorder:a,imgShadow:r,isPreview:c,isCap:d,capAlign:u,capColor:p,capTitleTypo:g,capDescTypo:m},setAttributes:b}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layouts Settings"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:i[n],onChange:e=>{b({columns:{...i,[n]:e}})},min:1,max:9,step:1})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(od,{label:(0,x.__)("Padding:","b-blocks"),value:s,onChange:e=>b({imgPadding:e})}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:a,onChange:e=>b({imgBorder:e})}),(0,l.jsx)(nd,{label:(0,x.__)("Shadow:","b-blocks"),value:r,onChange:e=>b({imgShadow:e}),defaults:{type:"text"},type:"text"}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Preview Image?","b-blocks"),checked:c, |
| 455 |
onChange:e=>b({isPreview:e})}),(0,l.jsx)("small",{children:(0,x.__)("Preview will only for frontend!","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Caption","b-blocks"),checked:d,onChange:e=>b({isCap:e})}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align:","b-blocks")}),(0,l.jsx)(Tn,{value:u,onChange:e=>b({capAlign:e}),options:Jt,isIcon:!0})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:p,onChange:e=>b({capColor:e}),defaultColor:"#333"}),(0,l.jsx)(Os,{label:(0,x.__)("Title Typography:","b-blocks"),value:g,onChange:e=>b({capTitleTypo:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16}}}),(0,l.jsx)(Os,{label:(0,x.__)("Description Typography:","b-blocks"),value:m,onChange:e=>b({capDescTypo:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16}}})]})]}),0<o.length&&(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(Ce,{label:(0,x.__)("Edit Gallery","b-blocks"),icon:"format-gallery",value:o,onChange:e=>b({images:t(e)}),isMultiple:!0})})]})})),zM=(0,y.withNotices)((e=>{const{attributes:{images:t,columns:n,imgPadding:o,imgBorder:i,imgShadow:s,isCap:a,capAlign:r,capColor:c,capTitleTypo:d,capDescTypo:u},setAttributes:p,clientId:g,isSelected:m,noticeUI:b}=e;let f=[];t.map((e=>f.push(e.url)));const v=e=>e||0!==e.length?e.map((e=>({id:e?.id,url:e?.url,alt:e?.alt,name:e?.name,title:e?.title,sizes:e?.sizes,caption:e?.caption,description:e?.description,link:e?.link}))):[],k=`#block-${g} .imgGalleryWrapper .imgGalleryImgLink`,w=`${k} .imgGalleryImgCaption`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(RM,{settings:e,filterImages:v}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${pa("",d)?.googleFontLink}\n\t\t\t\t${pa("",u)?.googleFontLink}\n\t\t\t\t${pa(`${w} h4`,d)?.styles}\n\t\t\t\t${pa(`${w} p`,u)?.styles}\n\n\t\t\t\t${k} .imgGalleryImg{\n\t\t\t\t\tpadding: ${ua(o)};\n\t\t\t\t\t${ia(i)}\n\t\t\t\t\tfilter: drop-shadow(${da(s,"text")})\n\t\t\t\t}\n\t\t\t\t${w}{\n\t\t\t\t\ttext-align: ${r};\n\t\t\t\t\tcolor: ${c};\n\t\t\t\t\tmargin: ${ua(o)};\n\t\t\t\t\twidth: calc((100% - 10px) - (${o?.horizontal||"0px"} * 2));\n\t\t\t\t\theight: calc((100% - 10px) - (${o?.vertical||"0px"} * 2));\n\t\t\t\t\tborder-radius: ${i?.radius||"0px"};\n\t\t\t\t}\n\t\t\t`}}),0===t.length?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.Placeholder,{className:"bBlocksImageGalleryUpload",label:(0,x.__)(" Gallery Images","b-blocks"),instructions:(0,x.__)("Select image files from your library.","b-blocks"),icon:"format-gallery",notices:b,children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],accept:"image/*",multiple:!0,value:Array.isArray(t)?t.map((({id:e})=>e)):t.id,onSelect:e=>p({images:v(e)}),render:({open:e})=>(0,l.jsx)(y.Button,{className:"components-button is-primary",label:(0,x.__)("Media Library","b-blocks"),onClick:e,children:(0,x.__)("Media Library","b-blocks")})})})}):(0,l.jsx)("div",{className:`imgGalleryWrapper columns-${n.desktop} columns-tablet-${n.tablet} columns-mobile-${n.mobile}`,children:t.length>0?t.map(((e,n)=>(0,l.jsxs)("a",{className:"imgGalleryImgLink",children:[(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],accept:"image/*",value:e.id,onSelect:e=>{const o=structuredClone(t);o[n]=e,p({images:v(o)})},render:({open:e})=>(0,l.jsx)(y.Dashicon,{className:"imgGalleryEditButton",icon:"plus-alt",onClick:e})}),(0,l.jsx)(y.Dashicon,{className:"imgGalleryImgDeleteButton",onClick:()=>{const e=t.filter(((e,t)=>n!==t));p({images:v(e)})},icon:"trash"}),(0,l.jsx)("img",{src:e.url,alt:e.alt||e.title,className:"imgGalleryImg"}),a&&e.caption&&(0,l.jsx)("div",{className:"imgGalleryImgCaption",children:(0,l.jsxs)("div",{className:"captionContent",children:[(0,l.jsx)("h4",{children:e.caption}),(0,l.jsx)("p",{children:e.description})]})})]},e.id))):null}),m&&0<t.length&&(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],accept:"image/*",multiple:!0,value:t[t.length-1].id,onSelect:e=>{let n=[...t,...e];p({images:v(n)})},render:({open:e})=>(0,l.jsx)(y.Button,{className:"imgGalleryUploadButton",label:(0,x.__)("Add Images","b-blocks"),icon:"plus-alt",onClick:e,children:" Add Images"})})]})]})}));Nl(OM.name)&&(0,p.registerBlockType)(OM,{icon:Cr,edit:zM,save:()=>null}) |
| 456 |
;const DM=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/image-hotspot","version":"1.0.0","title":"Image Hotspot","category":"bBlocks","description":"Image Hotspot allows you to add interactive hotspots to your images.","keywords":["image hotspot","hotspot","image"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"image":{"type":"object","default":{"url":"","desktop":{"height":"400px","width":"100%"},"tablet":{"height":"400px","width":"100%"},"mobile":{"height":"400px","width":"100%"},"objectFit":"fill"}},"options":{"type":"object","default":{"speed":400,"delay":200}},"preset":{"type":"string","default":"default"},"spots":{"type":"object","default":{"normal":{"color":{"bg":"#8a2be2","icon":"#fff"},"border":{}},"hover":{"color":{"bg":"#8a2be2","icon":"#fff"},"border":{}},"desktop":{"height":"40px","width":"40px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"50px","right":"50px","top":"50px","bottom":"50px"},"iconSize":"12px"},"tablet":{"height":"40px","width":"40px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"50px","right":"50px","top":"50px","bottom":"50px"},"iconSize":"12px"},"mobile":{"height":"40px","width":"40px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"50px","right":"50px","top":"50px","bottom":"50px"},"iconSize":"12px"}}},"tooltip":{"type":"object","default":{"desktop":{"width":"200px","padding":{"left":"5px","right":"5px","top":"5px","bottom":"5px"},"radius":{"left":"3px","right":"3px","top":"3px","bottom":"3px"}},"tablet":{"width":"","padding":{},"radius":{}},"mobile":{"width":"","padding":{},"radius":{}},"typo":{"fontSize":{"desktop":"15px"}},"textColor":"#fff","bgColor":"#8a2be2","border":{"width":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"hotspot":{"type":"array","default":[{"borderColor":"","bgColor":"","spotsSize":"","option":"spot","spotOption":"text","spotText":"+","icon":{"url":{"upload":"","library":""},"type":"library"},"image":"","tooltip":"<p>Tooltip contents</p>","tooltipPosition":"left","position":{"desktop":{"x":0,"y":0},"tablet":{},"mobile":{}},"iconColor":"","iconSize":"12px","spotLink":"","newWindow":false},{"borderColor":"","bgColor":"","spotsSize":"","option":"spot","spotOption":"text","spotText":"+","icon":{"url":{"upload":"","library":""},"type":"library"},"image":"","tooltip":"<p>Tooltip contents</p>","tooltipPosition":"left","position":{"desktop":{"x":30,"y":40},"tablet":{},"mobile":{}},"iconColor":"","iconSize":"12px","spotLink":"","newWindow":false}]},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),FM=({attributes:e,id:o,isBackend:i=!1})=>{const{image:s,options:a,spots:r,tooltip:c,advanced:d,hotspot:u}=e,p=`#${o} .b-blocks-hotspot-image-wrapper`,h=`${p} .b-blocks-hotspot-image`,g=`${p} .b-blocks-bphb-hotspot-container`,m=`${g} .b-blocks-bphb-hotspot`,b=`${m} .b-blocks-imghp-upload-icon`,f=`${m} .b-blocks-imghp-text-icon`,x=`${m} .b-blocks-tooltip-reader`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{ |
| 457 |
__html:`\n\t\t${pa("",c.typo).googleFontLink}\n\t\t${pa(x,c.typo).styles}\n\t\t${p}{\n\t\t\t${na("width",s.desktop.width)}\n\t\t\t${na("height",s.desktop.height)}\n\t\t}\n\t\t${u?.map(((e,t)=>`${g}#b-blocks-bphb-hotspot-container-${t}{\n\t\t\t\t${na("left",`${e.position.desktop.x}%`)}\n\t\t\t\t${na("top",`${e.position.desktop.y}%`)}\n\t\t\t}`)).join(" ")}\n\t\t${m} .b-blocks-imghp-library-icon>svg{\n\t\t\t${na("fill",r.normal.color.icon)}\n\t\t\t${na("color",r.iconColor)}\n\t\t\t${na("height",r.desktop.iconSize)}\n\t\t\t${na("width",r.desktop.iconSize)}\n\t\t}\n\t\t${m}{\n\t\t\t${na("height",r.desktop.height)}\n\t\t\t${na("width",r.desktop.width)}\n\t\t\t${na("border-radius",ha(r.desktop.radius))}\n\t\t\t${na("background-color",r.normal.color.bg)}\n\t\t\t${na("padding",ha(r.desktop.padding))}\n\t\t\t${sa(r.normal.border)}\n\t\t}\n ${b}{\n ${na("fill",r.normal.color.icon)}\n\t\t\t${na("color",r.iconColor)}\n\t\t\t${na("height",r.desktop.iconSize)}\n\t\t\t${na("width",r.desktop.iconSize)}\n }\n ${f}{\n ${na("color",r.normal.color.icon)}\n\t\t\t${na("font-size",r.desktop.iconSize)}\n }\n\t\t\t${m}.three{\n\t\t\tborder:unset;\n\t\t\t}\n\t\t\t${m}.three>span{\n\t\t\t${sa(r.normal.border)}\n\t\t\t}\n\n\t\t\t${m}>svg{\n\t\t\t${na("color",r.normal.color.icon)}\n\t\t\t${na("height",r.desktop.iconSize)}\n\t\t\t${na("width",r.desktop.iconSize)}\n\t\t}\n\t\t${m}>svg path{\n\t\t\t${na("fill",r.normal.color.icon)}\n\t\t}\n\t\t${m}:hover{\n\t\t\t${na("background-color",r.hover.color.bg)}\n\t\t\t${sa(r.hover.border)}\n\t\t}\n\t\t${m}:hover>span{\n\t\t\t${na("color",r.hover.color.icon)}\n\t\t}\n\t\t${m}:hover>svg{\n\t\t\t${na("color",r.hover.color.icon)}\n\t\t}\n\t\t${m}:hover>svg path{\n\t\t\t${na("fill",r.hover.color.icon)}\n\t\t}\n\t\t${m}:where(span,img){\n\t\t\t${na("color",r.normal.color.icon)}\n\t\t\t${na("font-size",r.desktop.iconSize)}\n\t\t\t${sa(r.normal.border)}\n\t\t}\n\n\t\t${x}{\n\t\t\ttransition-duration: ${a.speed}ms;\n\t\t\ttransition-delay: ${a.delay}ms;\n\t\t\t${sa(c.border)}\n\t\t\t${na("box-shadow",la(c?.shadow||[]))}\n\t\t\t${na("width",c.desktop.width)}\n\t\t\t${na("background-color",c.bgColor)}\n\t\t\t${na("padding",ha(c.desktop.padding))}\n\t\t\t${na("border-radius",ha(c.desktop.radius))}\n\t\t}\n\t\t${x} .b-blocks-bphb-tooltip-content>*{\n\t\t\t\tcolor: ${c.textColor} !important;\n\t\t\t\tmargin:0px;\n\t\t\t}\n\t\t\t${h}{\n\t\t\t${na("width",s.desktop.width)};\n\t\t\t${na("height",s.desktop.height)};\n\t\t\t${na("object-fit",s.objectFit)}\n\t\t\t}\n\t\t${t} {\n\n\t\t${m} .b-blocks-imghp-library-icon>svg{\n\t\t\t${na("height",r.tablet.iconSize)}\n\t\t\t${na("width",r.tablet.iconSize)}\n\t\t}\n\t\t${m}{\n\t\t\t${na("height",r.tablet.height)}\n\t\t\t${na("width",r.tablet.width)}\n\t\t\t${na("border-radius",ha(r.tablet.radius))}\n\t\t\t${na("padding",ha(r.tablet.padding))}\n\t\t}\n ${f}{\n\t\t\t${na("font-size",r.tablet.iconSize)}\n }\n\t\t${m}>span{\n\t\t\t${na("font-size",r.tablet.iconSize)}\n\t\t}\n\n\t\t${x}{\n\t\t\t${na("width",c.tablet.width)}\n\t\t\t${na("padding",ha(c.tablet.padding))}\n\t\t\t${na("border-radius",ha(c.tablet.radius))}\n\t\t}\n }\n\t\t${n} {\n\t\t${m} .b-blocks-imghp-library-icon>svg{\n\t\t\t${na("height",r.mobile.iconSize)}\n\t\t\t${na("width",r.mobile.iconSize)}\n\t\t}\n\t\t${m}{\n\t\t\t${na("height",r.mobile.height)}\n\t\t\t${na("width",r.mobile.width)}\n\t\t\t${na("border-radius",r.mobile.radius)}\n\t\t\t${na("padding",ha(r.mobile.padding))}\n\t\t}\n\t\t${m}>span{\n\t\t\t${na("font-size",r.mobile.iconSize)}\n\t\t\t}\n\t\t\t${f}{\n\t\t\t${na("font-size",r.mobile.iconSize)}\n\t\t\t}\n\n\t\t${x}{\n\t\t\t${na("width",c.mobile.width)}\n\t\t\t${na("padding",ha(c.mobile.padding))}\n\t\t\t${na("border-radius",ha(c.mobile.radius))}\n\t\t}\n\t}\n\t\t${_a(o,d,i,!1)}\n\t\t`}})},HM=({value:e,onChange:t=()=>{},preset:n,element:o,setActiveIdx:i,index:s,wrapperEl:a,align:r,isSelected:c,...d})=>{const[u,p]=(0,m.useState)(e||{x:0,y:0}),[h,g]=(0,m.useState)({x:0,y:0}),[b,f]=(0,m.useState)(!1),x=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const e=x.current;if(!e||!a)return;const t=(e,t)=>{const n=a.getBoundingClientRect(),o=(e-n.left)/n.width*100,i=(t-n.top)/n.height*100;return{x:Math.min(Math.max(o,0),100),y:Math.min(Math.max(i,0),100)}},n=e=>{f(!0);const n=t(e.clientX,e.clientY);g({x:n.x-u.x,y:n.y-u.y})},o=e=>{if(b){const n=t(e.clientX,e.clientY);p({x:n.x-h.x,y:n.y-h.y})}},i=()=>{f(!1)};return a.addEventListener("mouseup",i),a.addEventListener("mousemove",o),e.addEventListener("mousedown",n),document.addEventListener("mouseup",i),()=>{e.removeEventListener("mousedown",n),a.removeEventListener("mousemove",o),a.removeEventListener("mouseup",i),document.removeEventListener("mouseup",i)}}),[c,b,a,u,o.spotOption,o.tooltipPosition,r]),(0,m.useEffect)((()=>{p(e)}),[e,o.spotOption]),(0,m.useEffect)((()=>{t(u)}),[u,o.spotOption]),(0,l.jsxs)(l.Fragment,{children:["text"===o.spotOption&&(0,l.jsx)("div",{onClick:()=>i(s),onMouseDown:()=>i(s),...d,ref:x,style:{position:"absolute",cursor:"move"},className:"b-blocks-bphb-hotspot-container",id:`b-blocks-bphb-hotspot-container-${s}`,children:(0,l.jsxs)("div",{className:"b-blocks-bphb-hotspot "+("default"===n?"circle":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"),children:[o.tooltip&&(0,l.jsx)("div",{className:`b-blocks-tooltip-reader ${"default"===n?"one":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"} b-blocks-tooltip-${o.tooltipPosition}`,children:(0,l.jsx)("div",{className:"b-blocks-bphb-tooltip-content",dangerouslySetInnerHTML:{__html:o.tooltip}})}),(0,l.jsx)("span",{className:"b-blocks-imghp-text-icon",children:o.spotText})]})}),"icon"===o.spotOption&&(0,l.jsx)("div",{...d,ref:x,onClick:()=>i(s),onMouseDown:()=>i(s),style:{position:"absolute",cursor:"move"},className:"b-blocks-bphb-hotspot-container",id:`b-blocks-bphb-hotspot-container-${s}`,children:(0,l.jsxs)("div",{className:"b-blocks-bphb-hotspot "+("default"===n?"circle":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"),children:[o.tooltip&&(0,l.jsx)("div",{className:`b-blocks-tooltip-reader ${"default"===n?"one":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"} b-blocks-tooltip-${o.tooltipPosition}`,children:(0,l.jsx)("div",{className:"b-blocks-bphb-tooltip-content",dangerouslySetInnerHTML:{__html:o.tooltip}})}),"upload"===o.icon.type&&(0,l.jsx)("span",{className:"b-blocks-imghp-upload-icon",dangerouslySetInnerHTML:{__html:o.icon.url.upload}}),"library"===o.icon.type&&(0,l.jsx)("span",{className:"b-blocks-imghp-library-icon",dangerouslySetInnerHTML:{__html:o.icon.url.library}})]})}),"image"===o.spotOption&&(0,l.jsx)("div",{...d,ref:x,onClick:()=>i(s),onMouseDown:()=>i(s),style:{position:"absolute",cursor:"move"},className:"b-blocks-bphb-hotspot-container",id:`b-blocks-bphb-hotspot-container-${s}`,children:(0,l.jsxs)("div",{className:"b-blocks-bphb-hotspot "+("default"===n?"circle":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"),children:[o.tooltip&&(0,l.jsx)("div",{className:`b-blocks-tooltip-reader ${"default"===n?"one":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"} b-blocks-tooltip-${o.tooltipPosition}`,children:(0,l.jsx)("div",{className:"b-blocks-bphb-tooltip-content",dangerouslySetInnerHTML:{__html:o.tooltip}})}),o.image&&(0,l.jsx)("img",{src:o.image,style:{width:"100%",height:"100%",borderRadius:"inherit",objectFit:"cover"},alt:""})]})})]})},WM=({attributes:e,setAttributes:t,setActiveIdx:n,isSelected:o})=>{const{hotspot:i,image:s,preset:a,align:r}=e,[c,d]=(0,m.useState)(null),u=(0,m.useCallback)((e=>d(e)),[]);return(0,l.jsxs)("div",{ref:u,className:"b-blocks-hotspot-image-wrapper",children:[(0,l.jsx)("img",{src:s?.url||kn,alt:s?.alt||"Hotspot Image",className:"b-blocks-hotspot-image"}),i.map(((e,s)=>(0,l.jsx)(HM,{setActiveIdx:n,preset:a,align:r,isSelected:o, |
| 458 |
value:e.position.desktop,wrapperEl:c,element:e,index:s,onChange:e=>t({hotspot:Ob(i,(t=>{t[s].position.desktop=e}))})},s)))]})},UM=[{label:"Default",value:"left"},{label:"Left",value:"left"},{label:"Top",value:"top"},{label:"Right",value:"right"},{label:"Bottom",value:"bottom"},{label:"Top Left",value:"topleft"},{label:"Top Right",value:"topright"},{label:"Bottom Left",value:"bottomleft"},{label:"Bottom Right",value:"bottomright"}],GM={desktop:{height:"40px",width:"40px",padding:{left:"0px",right:"0px",top:"0px",bottom:"0px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"50px"},iconSize:"12px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"#8a2be2",icon:"#fff"},border:{width:"0px"}},hover:{color:{bg:"",icon:"#fff"},border:{}}},VM={desktop:{height:"40px",width:"40px",padding:{left:"0px",right:"0px",top:"0px",bottom:"0px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"5px"},iconSize:"12px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"#cd7418",icon:"#fff"},border:{width:"0px"}},hover:{color:{bg:"",icon:"#fff"},border:{}}},qM={desktop:{height:"40px",width:"40px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"50px"},iconSize:"12px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"#cd18bf",icon:"#fff"},border:{color:"#fff",style:"solid",width:"1px"}},hover:{color:{bg:"",icon:"#fff"},border:{}}},YM={desktop:{height:"40px",width:"40px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"50px"},iconSize:"16px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"",icon:"#77cd18"},border:{color:"#77cd18",style:"solid",width:"2px"}},hover:{color:{bg:"",icon:"#77cd18"},border:{color:"#77cd18",style:"solid",width:"2px"}}},KM={desktop:{height:"40px",width:"100px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"50px"},iconSize:"25px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"#3cbcd1a3",icon:"#fff"},border:{width:"0px"}},hover:{color:{bg:"",icon:"#fff"},border:{width:"0px"}}},QM=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],ZM=[{label:"None",value:""},{label:"Cover",value:"cover"},{label:"Contain",value:"contain"},{label:"Fill",value:"fill"}],XM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,device:n,updateObj:o})=>{const{image:i}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Image","b-blocks"),children:[(0,l.jsx)(we,{label:(0,x.__)("Choose Image","b-blocks"),height:"100%",width:"100%",value:i?.url?{url:i.url}:{url:kn},default:kn,onChange:e=>t({image:{...i,url:e.url}})}),(0,l.jsx)(v,{children:(0,x.__)("Image Fit","b-blocks")}),(0,l.jsx)(Tn,{options:ZM,size:"small",value:i.objectFit,onChange:e=>o("image",e,"objectFit")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",isUnitSelectTabbable:!0,value:i[n].height,min:1,max:1e3,onChange:e=>o("image",e,n,"height")})]})})),JM={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},bgColor:"#8a2be2",boxShadow:"0px 0px 0px 0px #707070"},eN={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},textColor:"#fff",bgColor:"#cd7418",boxShadow:"0px 0px 0px 0px #707070"},tN={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},textColor:"#fff",bgColor:"#cd18bf",boxShadow:"0px 0px 0px 0px #707070"},nN={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},textColor:"#fff",bgColor:"#77cd18",boxShadow:"0px 0px 0px 0px #707070"},oN={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},textColor:"#fff",bgColor:"#3cbcd1",boxShadow:"0px 0px 0px 0px #707070"},iN=({attributes:e,setAttributes:t})=>{const{preset:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Presets","b-blocks"),children:[(0,l.jsx)("span",{children:"Templates"}),(0,l.jsx)("div",{className:"presets-container",children:[{value:"default",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/default.png"},{value:"themetwo",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-160416.png"},{value:"themethree",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-160945.png"},{value:"themefour",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-161051.png"},{value:"themefive",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-161736.png"}].map(((e,o)=>(0,l.jsxs)("div",{onClick:()=>{const n=e.value;t({preset:n,spots:"default"===n?GM:"themetwo"===n?VM:"themethree"===n?qM:"themefour"===n?YM:KM,tooltip:"default"===n?JM:"themetwo"===n?eN:"themethree"===n?tN:"themefour"===n?nN:oN})},className:"single-preset "+(n===e.value?"active":""),children:[(0,l.jsx)("div",{className:"preset-tooltip-container",children:(0,l.jsxs)("div",{className:"preset-tooltip",children:[(0,l.jsx)("i",{className:"fa-solid fa-caret-down"}),(0,l.jsxs)("span",{children:["Design ",o+1]})]})}),(0,l.jsx)("img",{src:e.img,alt:""})]},o)))})]})},sN=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M292.6 407.78l-120-320a22 22 0 00-41.2 0l-120 320a22 22 0 0041.2 15.44l36.16-96.42a2 2 0 011.87-1.3h122.74a2 2 0 011.87 1.3l36.16 96.42a22 22 0 0041.2-15.44zm-185.84-129l43.37-115.65a2 2 0 013.74 0l43.37 115.67a2 2 0 01-1.87 2.7h-86.74a2 2 0 01-1.87-2.7zM400.77 169.5c-41.72-.3-79.08 23.87-95 61.4a22 22 0 0040.5 17.2c8.88-20.89 29.77-34.44 53.32-34.6 32.32-.22 58.41 26.5 58.41 58.85a1.5 1.5 0 01-1.45 1.5c-21.92.61-47.92 2.07-71.12 4.8-54.75 6.44-87.43 36.29-87.43 79.85 0 23.19 8.76 44 24.67 58.68C337.6 430.93 358 438.5 380 438.5c31 0 57.69-8 77.94-23.22h.06a22 22 0 1044 .19v-143c0-56.18-45-102.56-101.23-102.97zM380 394.5c-17.53 0-38-9.43-38-36 0-10.67 3.83-18.14 12.43-24.23 8.37-5.93 21.2-10.16 36.14-11.92 21.12-2.49 44.82-3.86 65.14-4.47a2 2 0 012 2.1C455 370.1 429.46 394.5 380 394.5z"})}),aN=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 576 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{ |
| 459 |
d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"})}),rN=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"})}),lN=e=>{const{attributes:t,setAttributes:n,arrKey:o,index:i,setActiveIndex:s}=e,a=t[o],r=a[i],{data:c}=Cd("bBlocksUtils"),{refetch:d}=_d("b-blocks-enable-svg-mime-type",{_wpnonce:c?.nonce},!1),u=async()=>{jd(),await d()},p=new Tt,h=(e,t,o=null,r=null)=>{const l=Ob(a,(n=>{null!==r?n[i][e][o][r]=t:null!==o?n[i][e][o]=t:n[i][e]=t}));n({hotspot:l}),s&&s(i)};return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",initialTabName:r.option,tabs:[{title:"Spot",name:"spot"},{title:"Tooltip",name:"tooltip"}],onSelect:e=>h("option",e),children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:["spot"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Tn,{options:[{label:"Text",icon:(0,l.jsx)(sN,{}),value:"text"},{label:"Icon",icon:(0,l.jsx)(aN,{}),value:"icon"},{label:"Image",icon:(0,l.jsx)(rN,{}),value:"image"}],value:r?.spotOption,label:"Type",onChange:e=>h("spotOption",e),isIcon:!0}),"text"===r.spotOption&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)("p",{style:{margin:0},children:"Text"}),(0,l.jsx)(y.__experimentalInputControl,{className:"bpl-bphb-hostpot-block",value:r?.spotText,onChange:e=>h("spotText",e)})]}),(0,l.jsx)(v,{children:(0,x.__)("Spot Link","b-blocks")}),(0,l.jsx)(y.__experimentalInputControl,{className:"bpl-bphb-hostpot-block",placeholder:"https://example.com",value:r?.spotLink,onChange:e=>h("spotLink",e)}),(0,l.jsx)(y.CheckboxControl,{label:"Open in new window",className:"mt10",checked:r.newWindow,onChange:e=>h("newWindow",e)})]}),"icon"===r.spotOption&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{label:(0,x.__)("Icon Type","b-blocks"),className:"mt10",options:[{label:"Library",value:"library"},{label:"Upload",value:"upload"}],value:r.icon.type,onChange:e=>h("icon",e,"type")}),(0,l.jsxs)("div",{className:"mt15",children:["library"===r.icon.type&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:r.icon.url.library,onChange:e=>h("icon",e,"url","library")}),"upload"===r.icon.type&&(0,l.jsx)(we,{onClick:u,types:["image/svg+xml"],value:{url:r.icon.url.upload},label:"Upload SVG",onChange:async e=>{const t=e?.url?await p.sanitizeFile(e?.url):"";h("icon",t,"url","upload")},isSvgEnabled:!0})]})]}),"image"===r.spotOption&&(0,l.jsx)("div",{className:"mt15",children:(0,l.jsx)(we,{value:{url:r.image},label:(0,x.__)("Choose Image","b-blocks"),onChange:e=>h("image",e.url)})}),(0,l.jsx)("hr",{}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("X Position","b-blocks"),value:r.position.desktop.x,onChange:e=>h("position",e,"x"),min:0,max:100}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Y Position","b-blocks"),value:r.position.desktop.y,onChange:e=>h("position",e,"y"),min:0,max:100})]}),"tooltip"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ls,{value:r.tooltip,onChange:e=>h("tooltip",e),className:"mt10"}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Position","b-blocks"),className:"mt10",labelPosition:"edge",value:r.tooltipPosition,options:UM,onChange:e=>h("tooltipPosition",e)})]})]})})})},cN=({attributes:e,setAttributes:t,activeIdx:n,setActiveIdx:o,device:i})=>{const s={attributes:e,setAttributes:t,arrKey:"hotspot",activeIndex:n,setActiveIndex:o,device:i},a=Math.floor(91*Math.random()),r=Math.floor(91*Math.random());return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Spots","b-blocks"),children:[(0,l.jsx)(_s,{...s,newItem:(c=a,d=r,{borderColor:"",bgColor:"",spotsSize:"",option:"spot",spotOption:"text",spotText:"+",icon:{url:{upload:"",library:""},type:"library"},image:"",tooltip:"<p>Tooltip contents</p>",tooltipPosition:"left",position:{desktop:{x:c,y:d},tablet:{},mobile:{}},iconColor:"",iconSize:"12px",spotLink:"",newWindow:!1}),itemLabel:"Spot",design:"sortable",ItemSettings:lN}),!1]});var c,d},dN=({attributes:e,updateObj:t})=>{const{options:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tooltip Options","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)("span",{children:(0,x.__)("Speed (ms)","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{onChange:e=>t("options",e,"speed"),isDragEnabled:!0,isShiftStepEnabled:!0,shiftStep:10,step:1,min:100,value:Number(n.speed)})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)("span",{children:(0,x.__)("Delay (ms)","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{onChange:e=>t("options",e,"delay"),isDragEnabled:!0,isShiftStepEnabled:!0,shiftStep:10,step:1,min:100,value:Number(n.delay)})]})]})},uN=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(XM,{...e}),(0,l.jsx)(cN,{...e}),(0,l.jsx)(dN,{...e}),(0,l.jsx)(iN,{...e})]}),pN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,device:t,updateObj:n})=>{const{image:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Image","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",isUnitSelectTabbable:!0,value:o[t].width,min:1,max:100,onChange:e=>n("image",e,t,"width")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",isUnitSelectTabbable:!0,value:o[t].height,min:1,max:1e3,onChange:e=>n("image",e,t,"height")})]})})),hN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,device:t,updateObj:n})=>{const{spots:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Spots","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:[{label:"PX",value:"px"}],isUnitSelectTabbable:!0,value:o[t].width,min:1,max:700,onChange:e=>n("spots",e,t,"width")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks"),(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[{label:"PX",value:"px"}],isUnitSelectTabbable:!0,value:o[t].height,min:1,max:700,onChange:e=>n("spots",e,t,"height")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[{label:"PX",value:"px"}],isUnitSelectTabbable:!0,value:o[t].iconSize,min:1,max:200,onChange:e=>n("spots",e,t,"iconSize")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].padding,resetValues:{left:"0px",right:"0px",top:"0px",bottom:"0px"},onChange:e=>n("spots",e,t,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].radius,resetValues:{left:"5px",right:"5px",top:"5px",bottom:"5px"},onChange:e=>n("spots",e,t,"radius")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:Ne,children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:"Text/Icon Color", |
| 460 |
value:o[e].color.icon,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:t=>n("spots",t,e,"color","icon")}),(0,l.jsx)(Ue,{label:"Background Color",value:o[e].color.bg,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:t=>n("spots",t,e,"color","bg")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o[e].border,onChange:t=>n("spots",t,e,"border")})]})})]})})),gN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,device:t,updateObj:n})=>{const{tooltip:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Tooltip","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:[{label:"px",value:"px"}],isUnitSelectTabbable:!0,value:o[t].width,min:1,max:800,onChange:e=>n("tooltip",e,t,"width")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[t].padding,resetValues:{left:"5px",right:"5px",top:"5px",bottom:"5px"},onChange:e=>n("tooltip",e,t,"padding")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:o.textColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>n("tooltip",e,"textColor")}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color","b-blocks"),value:o.bgColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>n("tooltip",e,"bgColor")}),(0,l.jsx)(Os,{value:o.typo,onChange:e=>n("tooltip",e,"typo")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>n("tooltip",e,"border")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].radius,resetValues:{left:"3px",right:"3px",top:"3px",bottom:"3px"},onChange:e=>n("tooltip",e,t,"radius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:o.shadow,onChange:e=>n("tooltip",e,"shadow")})]})})),mN=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(pN,{...e}),(0,l.jsx)(hN,{...e}),(0,l.jsx)(gN,{...e})]}),bN=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:QM,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(uN,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(mN,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]})},fN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,device:s}=e,{image:a}=t,[r,c]=(0,m.useState)(0),d=(0,m.useRef)(null),u=bBlocksPremiumChecker,p=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(bN,{attributes:t,setAttributes:n,activeIdx:r,setActiveIdx:c,updateObj:p,isPremium:u,device:s}),(0,l.jsx)("div",{ref:d,...(0,h.useBlockProps)(),onDragStart:e=>e.stopPropagation(),draggable:!1,children:(0,l.jsxs)("div",{children:[(0,l.jsx)(FM,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)(WM,{attributes:t,setAttributes:n,activeIdx:r,setActiveIdx:c,isSelected:i,device:s},`${JSON.stringify(a.width)}-${s}`)]})})]})}));Nl(DM.name)&&(0,p.registerBlockType)(DM,{icon:jr,edit:fN});const xN=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/image-scroller","version":"1.0.0","title":"Image Scroller","category":"bBlocks","description":"A dynamic image scroller that smoothly scrolls images on hover, featuring customizable speed, easing, and options for vertical or horizontal scrolling.","keywords":["scroll","image","image scroller"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"image":{"type":"object","default":{"img":{},"height":{"desktop":"200px","tablet":"","mobile":""}}},"options":{"type":"object","default":{"direction":"vertical","isScrollAuto":true,"duration":1000,"easing":"ease-in-out"}},"style":{"type":"object","default":{}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"mask":{"isMask":false,"shape":{"type":"circle","url":""},"size":{"type":"center center","scale":"100%"},"position":{"type":"center center","x":50,"y":50},"repeat":"no-repeat"},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),yN=({attributes:e,device:t})=>{const{image:n,options:o}=e,{direction:i,isScrollAuto:s}=o,a=(0,m.useRef)(null),r=(0,m.useRef)(null),{device:c}=wd(),d=t||c;(0,m.useEffect)((()=>{a.current&&r.current&&s&&(a.current?.addEventListener("mouseover",(()=>{"vertical"===i&&Number(r.current.clientHeight)>parseInt(n.height[d])&&(r.current.style.transform=`translateY(-${Number(r.current.clientHeight)-parseInt(n.height[d])}px)`),"horizontal"===i&&Number(r.current.clientWidth)>Number(a.current.clientWidth)&&(r.current.style.transform=`translateX(-${Number(r.current.clientWidth)-Number(a.current.clientWidth)}px)`)})),a.current?.addEventListener("mouseout",(()=>{"vertical"===i&&(r.current.style.transform="translateY(0px)"),"horizontal"===i&&(r.current.style.transform="translateX(0px)")}))) |
| 461 |
}),[s,r.current]);const u=()=>(0,l.jsx)("div",{ref:a,className:`b-blocks-image-scroller-wrapper ${i} ${s?"":"scrollable"}`,children:(0,l.jsx)("img",{ref:r,className:"b-blocks-image-scroller",src:n.img.url,alt:n.img.alt})});return(0,l.jsx)(u,{})},vN=({attributes:e,id:o,isBackend:i=!1})=>{const{image:s,options:a,advanced:r}=e,{easing:c,duration:d}=a,u=`#${o} .b-blocks-image-scroller-wrapper`,p=`${u} .b-blocks-image-scroller`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${u}{\n\t\t\t${na("height",s.height.desktop)}\n\t\t}\n\t\t${p}{\n\t\t\ttransition: transform ${d}ms ${c};\n\t\t}\n\t\t${t}{\n\t\t\t${na("height",s.height.tablet)}\n\t\t}\n\t\t${n}{\n\t\t\t${na("height",s.height.mobile)}\n\t\t}\n\t\t${_a(o,r,i)}\n\t\t`}})},kN=[{label:(0,x.__)("Vertical","b-blocks"),value:"vertical"},{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal"}],wN=[{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"}],_N=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],CN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,device:o}=e,{image:i,options:s}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(we,{value:i.img,height:"100%",width:"100%",onChange:e=>n({image:be(i,e,"img")})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Container Height","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i.height[o],onChange:e=>n({image:be(i,e,"height",o)})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Scroll Direction","b-blocks"),labelPosition:"edge",className:"mt10",options:kN,value:s.direction,onChange:e=>n({options:be(s,e,"direction")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Auto Scroll","b-blocks"),className:"mt10",value:s.isScrollAuto,checked:s.isScrollAuto,onChange:e=>n({options:be(s,e,"isScrollAuto")})}),s.isScrollAuto&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Scroll Duration (ms)","b-blocks"),className:"mt10",step:50,max:1e4,value:s.duration,onChange:e=>n({options:be(s,e,"duration")})}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",className:"mt10",options:wN,value:s.easing,onChange:e=>n({options:be(s,e,"easing")})})]})]})]})})),jN=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Rs,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:_N,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(CN,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]})})},$N=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{image:s}=t,a=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(jN,{attributes:t,setAttributes:n,isPremium:a}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(vN,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{children:s.img.url?(0,l.jsx)(yN,{attributes:t,device:i}):(0,l.jsx)(h.MediaPlaceholder,{allowedTypes:["image"],multiple:!1,labels:{title:"Upload Image"},accept:"image/*",addToGallery:!0,onSelect:e=>{n({image:be(s,e,"img")})}})})})]})]})}));Nl(xN.name)&&(0,p.registerBlockType)(xN,{icon:$r,edit:$N});const SN=JSON.parse('{"apiVersion":3,"name":"b-blocks/info-box","title":"Info Box","description":"Display information in box style.","category":"bBlocks","keywords":["information box","info box","message"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"infoBoxAlign":{"type":"string","default":"center"},"textAlign":{"type":"string","default":"center"},"width":{"type":"string","default":"100%"},"background":{"type":"object","default":{"color":"#f1f7ff"}},"padding":{"type":"object","default":{"vertical":"50px","horizontal":"50px"}},"border":{"type":"object","default":{"width":"10px","color":"#fff","radius":"5px"}},"shadow":{"type":"object","default":{"blur":"15px"}},"isIcon":{"type":"boolean","default":true},"icon":{"type":"object","default":{"class":"fa fa-info-circle","fontSize":70,"color":"#146EF5"}},"iconMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"title":{"type":"string","selector":"h3.infoBoxTitle","default":"Info Box Title"},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"},"fontWeight":600}},"titleColor":{"type":"string","default":"#333"},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isDesc":{"type":"boolean","default":true},"desc":{"type":"string","selector":"p.infoBoxDescription","default":"This content area describes info box descriptions or details."},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"descColor":{"type":"string","default":"#333"},"descMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isBtn":{"type":"boolean","default":false},"btn":{"type":"string","selector":"a.infoBoxButton","default":"Click Me"},"btnLink":{"type":"string","default":"#"},"isLinkNewTab":{"type":"boolean","default":true},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"btnColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"btnHovColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"btnPadding":{"type":"object","default":{"vertical":"8px","horizontal":"15px"}},"btnBorder":{"type":"object","default":{"radius":"5px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),TN=({settings:e})=>{const{attributes:{infoBoxAlign:t,textAlign:n,width:i,background:a,padding:r,border:c,shadow:d,isIcon:u,icon:p,iconMargin:g,titleTypo:m,titleColor:b,titleMargin:f,isDesc:k,descTypo:w,descColor:_,descMargin:C,isBtn:j,btnLink:$,isLinkNewTab:S,btnTypo:T,btnColors:M,btnHovColors:N,btnPadding:L,btnBorder:E},setAttributes:P}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Info Box Settings","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:i,onChange:e=>P({width:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:a,onChange:e=>P({background:e})}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:r,onChange:e=>P({padding:e}),defaults:{vertical:"50px",horizontal:"50px"}}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:c,onChange:e=>P({border:e}),defaults:{width:"10px",color:"#fff",radius:"5px"}}),(0,l.jsx)(nd,{label:(0,x.__)("Shadow:","b-blocks"),value:d,onChange:e=>P({shadow:e}),defaults:{blur:"15px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:u,onChange:e=>P({ |
| 462 |
isIcon:e})}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Un,{value:p,onChange:e=>P({icon:e}),defaults:{class:"fa fa-info-circle",fontSize:70,color:o}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:g,onChange:e=>P({iconMargin:e}),defaults:{side:4,bottom:"20px"}})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:m,onChange:e=>P({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20},fontWeight:600}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:b,onChange:e=>P({titleColor:e}),defaultColor:"#333"}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:f,onChange:e=>P({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:k,onChange:e=>P({isDesc:e})}),k&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Os,{value:w,onChange:e=>P({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:_,onChange:e=>P({descColor:e}),defaultColor:"#333"}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:C,onChange:e=>P({descMargin:e}),defaults:{side:4,bottom:"15px"}})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Button","b-blocks"),checked:j,onChange:e=>P({isBtn:e})}),j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:$,onChange:e=>P({btnLink:e}),placeholder:(0,x.__)("Button link","b-blocks")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open link in new tab","b-blocks"),checked:S,onChange:e=>P({isLinkNewTab:e})}),(0,l.jsx)(Os,{value:T,onChange:e=>P({btnTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(On,{value:M,onChange:e=>P({btnColors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:N,onChange:e=>P({btnHovColors:e}),defaults:{color:"#fff",bg:s}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:L,onChange:e=>P({btnPadding:e}),defaults:{vertical:"8px",horizontal:"15px"}}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:E,onChange:e=>P({btnBorder:e}),defaults:{radius:"5px"}})]})]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.AlignmentToolbar,{value:t,onChange:e=>P({infoBoxAlign:e}),describedBy:(0,x.__)("Info Box Alignment"),alignmentControls:[{title:(0,x.__)("Info Box in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Info Box in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Info Box in right","b-blocks"),align:"right",icon:"align-right"}]}),(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>P({textAlign:e})})]})]})},MN="bBlocksInfoBox";Nl(SN.name)&&(0,p.registerBlockType)(SN,{icon:Sr,edit:e=>{const{attributes:{infoBoxAlign:t,textAlign:n,width:o,background:i,padding:s,border:a,shadow:r,isIcon:c,icon:d,iconMargin:u,title:p,titleTypo:g,titleColor:m,titleMargin:b,isDesc:f,desc:y,descTypo:v,descColor:k,descMargin:w,isBtn:_,btn:C,btnLink:j,isLinkNewTab:$,btnTypo:S,btnColors:T,btnHovColors:M,btnPadding:N,btnBorder:L},setAttributes:E,clientId:P}=e,A=`#block-${P}`,B=`${A} .${MN}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(TN,{settings:e}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${pa("",g)?.googleFontLink}\n\t\t\t\t${pa("",v)?.googleFontLink}\n\t\t\t\t${pa("",S)?.googleFontLink}\n\t\t\t\t${pa(`${B} .infoBoxTitle`,g)?.styles}\n\t\t\t\t${pa(`${B} .infoBoxDescription`,v)?.styles}\n\t\t\t\t${pa(`${B} .infoBoxButton`,S)?.styles}\n\n\t\t\t\t${A}{\n\t\t\t\t\ttext-align: ${t};\n\t\t\t\t}\n\t\t\t\t${B}{\n\t\t\t\t\ttext-align: ${n};\n\t\t\t\t\twidth: ${["0px","0%","0em"].includes(o)?"auto":o};\n\t\t\t\t\t${oa(i)}\n\t\t\t\t\tpadding: ${ua(s)};\n\t\t\t\t\t${ia(a)}\n\t\t\t\t\tbox-shadow: ${da(r)};\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxIcon{\n\t\t\t\t\tmargin: ${ua(u)};\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxIcon i{\n\t\t\t\t\t${ra(d)}\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxTitle{\n\t\t\t\t\tcolor: ${m};\n\t\t\t\t\tmargin: ${ua(b)};\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxDescription{\n\t\t\t\t\tcolor: ${k};\n\t\t\t\t\tmargin: ${ua(w)};\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxButton{\n\t\t\t\t\t${aa(T)}\n\t\t\t\t\tpadding: ${ua(N)};\n\t\t\t\t\t${ia(L)}\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxButton:hover{\n\t\t\t\t\t${aa(M)}\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsxs)("div",{className:MN,children:[c&&d?.class&&(0,l.jsx)("div",{className:"infoBoxIcon",children:(0,l.jsx)("i",{className:d?.class})}),(0,l.jsx)(h.RichText,{className:"infoBoxTitle",tagName:"h3",value:p,onChange:e=>E({title:e}),placeholder:(0,x.__)("Info box title","b-blocks"),inlineToolbar:!0}),f&&(0,l.jsx)(h.RichText,{className:"infoBoxDescription",tagName:"p",value:y,onChange:e=>E({desc:e}),placeholder:(0,x.__)("Info box description","b-blocks"),inlineToolbar:!0}),_&&(0,l.jsx)(h.RichText,{className:"infoBoxButton",tagName:"a",value:C,href:$t(j),target:$?"_blank":"",rel:"noreferrer noopener",onChange:e=>E({btn:e}),placeholder:(0,x.__)("Click Me","b-blocks"),inlineToolbar:!0})]})]})]})},save:()=>null}) |
| 463 |
;const NN=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/infographic","version":"1.0.0","title":"Infographic Block","category":"bBlocks","description":"Build a circular infographic. Segment circles sit evenly around two decorative rings and reveal their title, divider, text and image inside the center disc on click or hover.","keywords":["infographic","circle","circular","segments","diagram","process","wheel"],"textdomain":"b-blocks","attributes":{"blockId":{"type":"string","default":""},"general":{"type":"object","default":{"desktop":{"alignment":"center"},"tablet":{"alignment":""},"mobile":{"alignment":""},"itemTriggerType":"click"}},"defaults":{"type":"object","default":{"item":"Title 1","itemTitle":"Info Title","itemText":"Select any segment around the circle to reveal its details right here.","image":{"id":null,"url":"","alt":""}}},"button":{"type":"object","default":{"showIcon":true,"showText":true}},"wheel":{"type":"object","default":{"startAngle":"0deg","direction":"clockwise","sweep":"360deg","radiusOffset":"0px","rotateLabels":false,"enableSegmentsType":false,"wedgeGap":"3deg"}},"animation":{"type":"object","default":{"enable":false,"trigger":"load","delay":"0ms","type":"spread","easing":"ease","speed":"500ms","stagger":"","order":"clockwise","rotate":false,"rotateSpeed":"20s","rotateDirection":"clockwise","pauseOnHover":true,"hoverMotion":"none","activePulse":false,"contentType":"fade","contentSpeed":"300ms"}},"elements":{"type":"object","default":{"title":true,"divider":true,"text":true,"image":false}},"items":{"type":"array","default":[{"id":"bBlocksInfographic-item-1","enable":true,"buttonLabel":"Title 1","position":"","buttonIcon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM232 120v136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z\'/></svg>","url":""},"title":"Info Title 1","description":"Describe the first part of your process, service or story in a sentence or two.","image":{"id":null,"url":"","alt":""},"imageHeight":"","imagePosition":"top","link":{"url":"","target":false,"nofollow":false,"title":""},"styles":{"normal":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"hover":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"active":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}}}},{"id":"bBlocksInfographic-item-2","enable":true,"buttonLabel":"Title 2","position":"","buttonIcon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\'/></svg>","url":""},"title":"Info Title 2","description":"Describe the second part of your process, service or story in a sentence or two.","image":{"id":null,"url":"","alt":""},"imageHeight":"","imagePosition":"top","link":{"url":"","target":false,"nofollow":false,"title":""},"styles":{"normal":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"hover":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"active":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}}}},{"id":"bBlocksInfographic-item-3","enable":true,"buttonLabel":"Title 3","position":"","buttonIcon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM169.8 165.3c-7.9 22.3 3.7 46.8 26 54.6l9.9 3.5c11.1 3.9 18.5 14.4 18.5 26.2s-7.4 22.3-18.5 26.2l-9.9 3.5c-22.3 7.9-33.9 32.3-26 54.6s32.3 33.9 54.6 26l9.9-3.5c11.1-3.9 23.4-.6 31.1 8.3l6.8 7.9c15.4 17.9 42.5 19.9 60.4 4.5s19.9-42.5 4.5-60.4l-6.8-7.9c-7.7-8.9-9.4-21.6-4.2-32.2l4.6-9.4c10.4-21.2 1.6-46.8-19.6-57.2s-46.8-1.6-57.2 19.6l-4.6 9.4c-5.2 10.6-16 17.3-27.8 17.3H209.6c-16.4 0-31-10.4-36.4-25.9l-3.4-9.1z\'/></svg>","url":""},"title":"Info Title 3","description":"Describe the third part of your process, service or story in a sentence or two.","image":{"id":null,"url":"","alt":""},"imageHeight":"","imagePosition":"top","link":{"url":"","target":false,"nofollow":false,"title":""},"styles":{"normal":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"hover":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"active":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}}}},{"id":"bBlocksInfographic-item-4","enable":true,"buttonLabel":"Title 4","position":"","buttonIcon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm-24-136V232c0-13.3 10.7-24 24-24s24 10.7 24 24v144c0 13.3-10.7 24-24 24s-24-10.7-24-24zm24-224a32 32 0 1 1 0-64 32 32 0 1 1 0 64z\'/></svg>","url":""},"title":"Info Title 4","description":"Describe the fourth part of your process, service or story in a sentence or two.","image":{"id":null,"url":"","alt":""},"imageHeight":"","imagePosition":"top","link":{"url":"","target":false,"nofollow":false,"title":""},"styles":{"normal":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"hover":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"active":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}}}}]},"icon":{"type":"object","default":{"view":"framed","shape":"circle","desktop":{"size":"20px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"size":"18px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"size":"16px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"color":"","border":{"normal":{},"hover":{}},"transition":"300ms","background":{"type":"solid","color":""},"position":"top","plateColor":"rgba(255, 255, 255, 0.22)"}},"segment":{"type":"object","default":{"normal":{"background":{"type":"solid","color":"#BFA83B"},"color":"#FFFFFF","border":{},"shadow":[]},"hover":{"background":{},"color":"","border":{},"shadow":[]},"active":{"background":{},"color":"","border":{},"shadow":[]},"desktop":{"size":"118px","padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"size":"96px","padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"size":"76px","padding":{"top":"","right":"","bottom":"","left":""}},"spacing":"6px","margin":{"top":"","right":"","bottom":"","left":""},"transition":"300ms","shape":"circle","radius":{"top":"","right":"","bottom":"","left":""},"labelTypo":{"fontSize":{"desktop":13,"tablet":12,"mobile":11},"fontWeight":"600"}}},"outerDisc":{"type":"object","default":{"desktop":{"size":"560px","ringGap":"0px"},"tablet":{"size":"460px","ringGap":"0px"},"mobile":{"size":"330px","ringGap":"0px"},"background":{"type":"solid","color":""},"borderColor":"#7E57C2","borderWidth":"2px","borderStyle":"solid","transition":"300ms","shadow":{"normal":[],"hover":[]}}},"innerDisc":{"type":"object","default":{"desktop":{"size":"276px","padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"size":"220px","padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"size":"130px","padding":{"top":"","right":"","bottom":"","left":""}},"background":{"type":"solid","color":"#F2F0E4"},"borderColor":"#3F8F4B","borderWidth":"2px","borderStyle":"solid","contentWidth":"78%","contentGap":"10px","contentAlign":"center","transition":"300ms","shadow":{"normal":[],"hover":[]}}},"content":{"type":"object","default":{"title":{"color":"#1F2937","typo":{"fontSize":{"desktop":34,"tablet":28,"mobile":22},"fontWeight":"700","lineHeight":"1.2"},"tag":"h3"},"text":{"color":"#4B5563","typo":{"fontSize":{"desktop":14,"tablet":13,"mobile":12},"lineHeight":"1.6"}},"divider":{"color":"#BFA83B","width":"60px","height":"3px","style":"solid"},"image":{"desktop":{"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":"107px"},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":""},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":""},"fit":"cover"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),LN="b-blocks-infographic",EN=(0, |
| 464 |
l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),PN=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),AN=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),BN=[{label:(0,x.__)("Left","b-blocks"),value:"left",icon:EN},{label:(0,x.__)("Center","b-blocks"),value:"center",icon:PN},{label:(0,x.__)("Right","b-blocks"),value:"right",icon:AN}],IN=[{label:(0,x.__)("Click","b-blocks"),value:"click"},{label:(0,x.__)("Hover","b-blocks"),value:"hover"}],ON=[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}],RN=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Stacked","b-blocks"),value:"stacked"},{label:(0,x.__)("Framed","b-blocks"),value:"framed"}],zN=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Square","b-blocks"),value:"square"},{label:(0,x.__)("Rounded","b-blocks"),value:"rounded"}],DN=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"},{label:(0,x.__)("Double","b-blocks"),value:"double"}],FN=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Square","b-blocks"),value:"square"},{label:(0,x.__)("Rounded","b-blocks"),value:"rounded"}],HN=[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"},{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],WN=[{label:(0,x.__)("Clockwise","b-blocks"),value:"clockwise"},{label:(0,x.__)("Anti-clockwise","b-blocks"),value:"anticlockwise"}],UN=[{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Back Out","b-blocks"),value:"back-out"},{label:(0,x.__)("Back In Out","b-blocks"),value:"back-in-out"},{label:(0,x.__)("Elastic","b-blocks"),value:"elastic"}],GN={"back-out":"cubic-bezier(0.34, 1.56, 0.64, 1)","back-in-out":"cubic-bezier(0.68, -0.55, 0.27, 1.55)",elastic:"cubic-bezier(0.5, -0.6, 0.35, 1.7)"},VN=(e="ease")=>GN[e]||e||"ease",qN=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"},{label:(0,x.__)("Double","b-blocks"),value:"double"}],YN=[{label:(0,x.__)("Cover","b-blocks"),value:"cover"},{label:(0,x.__)("Contain","b-blocks"),value:"contain"}],KN=(e,t=[])=>{const n=gL(e,0);return 0<n?`transition: ${t.map((e=>`${e} ${n}ms ease`)).join(", ")};`:""},QN=[{name:"normal",title:(0,x.__)("Normal","b-blocks")},{name:"hover",title:(0,x.__)("Hover","b-blocks")},{name:"active",title:(0,x.__)("Active","b-blocks")}],ZN=["h1","h2","h3","h4","h5","h6","div","p","span"],XN=ZN.map((e=>({label:e.toUpperCase(),value:e}))),JN=(e,t)=>{if("normal"===e)return t;const n=[...QN,...en].find((t=>t.name===e))?.title;return n?`${n} ${t}`:t},eL=[{name:"content",title:(0,x.__)("Content","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],tL=[{label:(0,x.__)("Icon","b-blocks"),value:"icon"},{label:(0,x.__)("Image","b-blocks"),value:"image"}],nL=[{label:(0,x.__)("Spread","b-blocks"),value:"spread"},{label:(0,x.__)("Fade In","b-blocks"),value:"fade"},{label:(0,x.__)("Zoom In","b-blocks"),value:"zoom"},{label:(0,x.__)("Spin In","b-blocks"),value:"spin"},{label:(0,x.__)("Drop In","b-blocks"),value:"drop"},{label:(0,x.__)("Bounce In","b-blocks"),value:"bounce"},{label:(0,x.__)("Flip In","b-blocks"),value:"flip"},{label:(0,x.__)("Blur In","b-blocks"),value:"blur"},{label:(0,x.__)("Swing In","b-blocks"),value:"swing"},{label:(0,x.__)("Roll In","b-blocks"),value:"roll"},{label:(0,x.__)("Unfold","b-blocks"),value:"unfold"}],oL=["fade","blur"],iL=e=>oL.includes(e),sL={spread:"bBlocksInfographicSpread",fade:"bBlocksInfographicFade",zoom:"bBlocksInfographicZoom",spin:"bBlocksInfographicSpin",drop:"bBlocksInfographicDrop",bounce:"bBlocksInfographicBounce",flip:"bBlocksInfographicFlip",blur:"bBlocksInfographicBlur",swing:"bBlocksInfographicSwing",roll:"bBlocksInfographicRoll",unfold:"bBlocksInfographicUnfold"},aL=[{label:(0,x.__)("On page load","b-blocks"),value:"load"},{label:(0,x.__)("When scrolled into view","b-blocks"),value:"scroll"},{label:(0,x.__)("Every time it scrolls into view","b-blocks"),value:"scrollRepeat"}],rL=e=>"scroll"===e||"scrollRepeat"===e,lL=[{label:(0,x.__)("Clockwise","b-blocks"),value:"clockwise"},{label:(0,x.__)("Anti-clockwise","b-blocks"),value:"anticlockwise"},{label:(0,x.__)("From Top Both Ways","b-blocks"),value:"fromTop"},{label:(0,x.__)("From Bottom Both Ways","b-blocks"),value:"fromBottom"},{label:(0,x.__)("Random","b-blocks"),value:"random"}],cL=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Fade","b-blocks"),value:"fade"},{label:(0,x.__)("Slide Up","b-blocks"),value:"slide-up"},{label:(0,x.__)("Slide Sideways","b-blocks"),value:"slide-side"},{label:(0,x.__)("Zoom","b-blocks"),value:"zoom"},{label:(0,x.__)("Flip","b-blocks"),value:"flip"}],dL=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Grow","b-blocks"),value:"grow"},{label:(0,x.__)("Lift","b-blocks"),value:"lift"},{label:(0,x.__)("Pulse","b-blocks"),value:"pulse"},{label:(0,x.__)("Wobble","b-blocks"),value:"wobble"},{label:(0,x.__)("Rotate","b-blocks"),value:"rotate"}],uL=e=>{let t=2654435761*(e+1)%4294967296;return t^=t>>>15,t},pL=(e=0)=>({value:"ms",label:"ms",default:e}),hL=(e=0)=>({value:"s",label:"s",default:e}),gL=(e,t=500)=>{const n=parseFloat(e);if(isNaN(n))return t;const o=String(e).trim();return/s$/i.test(o)&&!/ms$/i.test(o)?1e3*n:n},mL=(e={},t,n,o)=>{const i=t=>{const o=e?.[t]?.[n];return null==o||""===o?void 0:o},s=i("desktop")??o;if("desktop"===t)return s;const a=i("tablet")??s;return"tablet"===t?a:i("mobile")??a},bL=(e,t="0px")=>{if(null==e||""===e)return t;const n=parseFloat(e);return isNaN(n)?t:/[a-z%]$/i.test(String(e).trim())?String(e).trim():`${n}px`},fL=(e,t)=>`calc(${e/2}px + ${bL(t)} / 2)`,xL=e=>Math.max(Math.floor(e/2),40),yL=(e=0)=>({value:"deg",label:"deg",default:e}),vL=(e=[])=>e.map(((e,t)=>({item:e,index:t}))).filter((({item:e})=>!1!==e?.enable)),kL=(e,t,n={})=>{if(0>=t)return 0 |
| 465 |
;const o=parseFloat(n.startAngle)||0,i="anticlockwise"===n.direction?-1:1,s=Math.min(Math.abs(parseFloat(n.sweep??360))||360,360);return o+e*(360<=s?s/t:s/Math.max(t-1,1))*i},wL=(e,t,n,o={})=>{const i=parseFloat(e?.position);return isNaN(i)?kL(t,n,o):i},_L=(e=[],t={})=>{const n=Math.max(parseFloat(t.wedgeGap??3)||0,0),o=((e=[],t={})=>vL(e).map((({item:e,index:n},o,i)=>({index:n,angle:wL(e,o,i.length,t)}))))(e,t).map((({index:e,angle:t})=>({index:e,angle:(t%360+360)%360}))),i=o.length;if(!i)return[];const s=[...o].sort(((e,t)=>e.angle-t.angle)),a=s.map(((e,t)=>e.angle-(e=>{if(1===i)return 360;const t=s[e].angle-s[(e-1+i)%i].angle;return 0>=t?t+360:t})(t)/2)),r=[];return s.forEach(((e,t)=>{let o=a[(t+1)%i]-a[t];for(;0>=o;)o+=360;r[e.index]={index:e.index,start:a[t]+n/2,span:Math.max(o-n,0),mid:a[t]+o/2}})),r},CL=(e=[],t)=>e.find((e=>e?.id===t))||null,jL=(e={},t={})=>{const{type:n="spread"}=e,o=sL[n]?n:"spread";return e.enable?t.enableSegmentsType?iL(o)?o:"fade":o:""},$L=(e,t={})=>{const{general:n={},wheel:o={},animation:i={},icon:s={},segment:a={}}=e,r=jL(i,o),l=i.enable&&(!rL(i.trigger)||t.inView),c=l&&!o.enableSegmentsType&&i.rotate;return[LN,"b-blocks-infographic-trigger-"+("hover"===n.itemTriggerType?"hover":"click"),`b-blocks-infographic-icon-view-${s.view||"default"}`,`b-blocks-infographic-icon-shape-${s.shape||"circle"}`,`b-blocks-infographic-segment-shape-${a.shape||"circle"}`,`b-blocks-infographic-icon-pos-${s.position||"top"}`,o.enableSegmentsType?"b-blocks-infographic-has-segments":"",i.enable&&rL(i.trigger)&&!t.inView?"b-blocks-infographic-awaiting-view":"",l?"b-blocks-infographic-has-animation":"",l?`b-blocks-infographic-anim-${r}`:"",c?"b-blocks-infographic-has-rotation":"",c&&"anticlockwise"===i.rotateDirection?"b-blocks-infographic-rotate-reverse":"",c&&i.pauseOnHover?"b-blocks-infographic-pause-on-hover":"",i.enable&&i.hoverMotion&&"none"!==i.hoverMotion?`b-blocks-infographic-hover-motion-${i.hoverMotion}`:"",i.enable&&i.activePulse?"b-blocks-infographic-has-active-pulse":"",i.enable&&i.contentType&&"none"!==i.contentType?`b-blocks-infographic-content-anim-${i.contentType}`:""].filter(Boolean).join(" ")},SL=({buttonIcon:e={},label:t})=>{const{type:n="icon",icon:o="",url:i=""}=e;return"image"===n?i?(0,l.jsx)("span",{className:"b-blocks-infographic-segment-icon",children:(0,l.jsx)("img",{src:i,alt:t||""})}):null:o?(0,l.jsx)("span",{className:"b-blocks-infographic-segment-icon",dangerouslySetInnerHTML:{__html:o}}):null},TL=({image:e={},height:t})=>e?.url?(0,l.jsx)("div",{className:"b-blocks-infographic-center-image",children:(0,l.jsx)("img",{src:e.url,alt:e.alt||"",style:t?{height:bL(t)}:void 0})}):null,ML=({attributes:e,isBackend:t=!1,custom:n={}})=>{const{general:o={},defaults:i={},button:s={},wheel:a={},animation:r={},elements:c={},content:d={}}=e,u=Array.isArray(e?.items)?e.items:[],p=(0,m.useMemo)((()=>vL(u).map((({item:e})=>e))),[u]),{item:h,itemTitle:g,itemText:b,image:f={}}=i,{showIcon:x,showText:y}=s,{itemTriggerType:v}=o,k=jL(r,a),w=r.enable?r.stagger?gL(r.stagger,0):Math.round(.25*gL(r.speed)):0,_=r.enable?gL(r.delay,0):0,C=r.enable&&!a.enableSegmentsType&&r.rotate,j=C?_+Math.max(0,p.length-1)*w+gL(r.speed):0,{title:$,divider:S,text:T,image:M}=c,N=((e=[],t)=>{const n=e.find((e=>e?.buttonLabel===t));return(n||e[0])?.id||""})(p,h),[L,E]=(0,m.useState)(N);(0,m.useEffect)((()=>E(N)),[N]);const P=t?n?.activeIndex:void 0;(0,m.useEffect)((()=>{const e=u[P];e?.id&&E(e.id)}),[P]);const A=e=>{if(!a.rotateLabels)return-e;const t=(e%360+360)%360;return 90<t&&270>t?180:0},B=t&&r.enable?`${k}-${r.easing}-${r.speed}-${r.order}-${r.stagger}-${r.delay}-${r.rotate}`:"",I=(0,m.useRef)(null),[O,R]=(0,m.useState)(t||!rL(r.trigger));(0,m.useEffect)((()=>{if(t||!rL(r.trigger))return void R(!0);const e=I.current;if(!e||"undefined"==typeof IntersectionObserver)return void R(!0);R(!1);const n="scrollRepeat"===r.trigger,o=new IntersectionObserver((([e])=>{e.isIntersecting?(R(!0),!n&&o.disconnect()):n&&R(!1)}),{threshold:.2});return o.observe(e),()=>o.disconnect()}),[t,r.trigger,r.enable]);const z="scrollRepeat"===r.trigger&&O?"in":"out",D=(0,m.useMemo)((()=>((e,t="clockwise")=>{const n=Array.from({length:e},((e,t)=>t));if("anticlockwise"===t)return n.map((t=>e-1-t));if("fromTop"===t)return n.map((t=>Math.min(t,e-t)));if("fromBottom"===t)return n.map((t=>Math.ceil(e/2)-Math.min(t,e-t)));if("random"===t){const e=[...n].sort(((e,t)=>uL(e)-uL(t)));return n.map((t=>e.indexOf(t)))}return n})(p.length,r.order)),[p.length,r.order]),F=(0,m.useMemo)((()=>a.enableSegmentsType?_L(u,a):[]),[a,u]),H=(0,m.useMemo)((()=>vL(u)),[u]),W=CL(u,L)||CL(u,N),U=W?.title||g,G=W?.description||b,V=W?.image?.url?W.image:f,q=u.findIndex((e=>e?.id===W?.id)),Y=W?.image?.url?W?.imageHeight:"",K=W?.imagePosition||"top",Q=e=>{const t=_+(D[e]??e)*w;return C?`${t}ms, ${j}ms`:t?`${t}ms`:""},Z=(e,o)=>{E(e?.id),t&&n?.setActiveIndex&&n.setActiveIndex(o)},X=ZN.includes(d?.title?.tag)?d.title.tag:"h3",J=`${r.contentType||"none"}-${r.contentSpeed||""}`,ee=(0,l.jsxs)(l.Fragment,{children:[$&&U&&(0,l.jsx)(X,{className:"b-blocks-infographic-center-title",children:U}),S&&(0,l.jsx)("span",{className:"b-blocks-infographic-center-divider"}),T&&G&&(0,l.jsx)("p",{className:"b-blocks-infographic-center-text",children:G})]});return(0,l.jsx)("div",{className:$L(e,{inView:O}),ref:I,children:(0,l.jsxs)("div",{className:"b-blocks-infographic-circle",children:[(0,l.jsx)("div",{className:"b-blocks-infographic-center-disc","data-item-index":-1<q?q:void 0,children:(0,l.jsxs)("div",{className:"b-blocks-infographic-center-content",children:[M&&"top"===K&&(0,l.jsx)(TL,{image:V,height:Y}),ee,M&&"bottom"===K&&(0,l.jsx)(TL,{image:V,height:Y})]},`${W?.id||"none"}-${J}`)}),H.map((({item:e,index:o},i)=>{const s=!!W&&e?.id===W.id,{url:r="",target:c=!1,nofollow:d=!1,title:u=""}=e?.link||{},p=F[o]||{start:0,span:0,mid:0},h=wL(e,i,H.length,a),g=A(h),m={className:["b-blocks-infographic-segment",s?"active":"",t&&o===n?.activeIndex?"bPlNowEditing":""].filter(Boolean).join(" "),"data-index":o,"data-item-id":e?.id,"aria-pressed":s,style:{"--bbInfographicAngle":`${h}deg`,"--bbInfographicCounter":`${g}deg`,"--bbInfographicCounterEnd":`${a.rotateLabels?g:g-360}deg`,"--bbInfographicMid":`${p.mid}deg`,"--bbInfographicMidCounter":`${A(p.mid)}deg`,...Q(i)?{animationDelay:Q(i)}:{}},onMouseEnter:"hover"===v?()=>Z(e,o):void 0,onFocus:"hover"===v?()=>Z(e,o):void 0,onClick:()=>Z(e,o)},b=(0,l.jsxs)("span",{className:"b-blocks-infographic-segment-inner",children:[x&&(0,l.jsx)(SL,{buttonIcon:e?.buttonIcon,label:e?.buttonLabel}),y&&e?.buttonLabel&&(0,l.jsx)("span",{className:"b-blocks-infographic-segment-label",children:e.buttonLabel})]});return r&&!t?(0,l.jsx)("a",{href:r,title:u||void 0,"aria-label":u||void 0,target:c?"_blank":"_self",rel:"noreferrer noopener"+(d?" nofollow":""),...m,children:b},`${e?.id||o}${B}${z}`):(0,l.jsx)("button",{type:"button",...m,children:b},`${e?.id||o}${B}${z}`)}))]})})},NL=e=>Array.isArray(e)?e.map(NL):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,NL(t)]))):(e=>{if("string"!=typeof e)return e;const t=e.replace(/\/\*|\*\//g,"").replace(/[{};<>\\]/g,"").replace(/[\r\n\t]+/g," "),n=e=>(t.split(e).length-1)%2;return n('"')||n("'")?t.replace(/["']/g,""):t})(e),LL=({attributes:e,id:o,isBackend:i=!1})=>{const{advanced:s={}}=e,a=(0,m.useMemo)((()=>NL({...e,advanced:void 0 |
| 466 |
})),[e]),{general:r={},wheel:c={},animation:d={},icon:u={},segment:p={},outerDisc:h={},innerDisc:g={},content:b={}}=a,f=Array.isArray(a?.items)?a.items:[],{normal:x={},hover:y={},active:v={}}=p,{title:k={},text:w={},divider:_={},image:C={}}=b,j=`#${o} .${LN}`,$=`${j} .b-blocks-infographic-circle`,S=`${$} .b-blocks-infographic-segment`,T=`${$} .b-blocks-infographic-center-disc`,M=`${T} .b-blocks-infographic-center-title`,N=`${T} .b-blocks-infographic-center-text`,L=`${T} .b-blocks-infographic-center-divider`,E=`${S} .b-blocks-infographic-segment-label`,P=`${S} .b-blocks-infographic-segment-inner`,A=`${S} .b-blocks-infographic-segment-icon`,B=`${T} .b-blocks-infographic-center-image img`,I=`${j}:not(.b-blocks-infographic-has-segments) .b-blocks-infographic-circle .b-blocks-infographic-segment`,O=`${j}.b-blocks-infographic-has-segments .b-blocks-infographic-circle .b-blocks-infographic-segment`,R=(e,t)=>bL(e.borderWidth??t),z=R(g,"2px"),D=R(h,"2px"),F=e=>Object.keys(e||{}).length?sa(e):"",H=(e,...t)=>{const n=t.filter(Boolean).join(" ").replace(/\s+/g," ").trim();return n?`${e}{ ${n} }`:""},W=g.borderColor||"#3F8F4B",U=h.borderColor||"#7E57C2",G="left: 50%; right: auto;",V=e=>{const{circle:t,outerGap:n,segmentSize:o,iconSize:i,radius:s,disc:a}=(e=>{const t=parseFloat(mL(h,e,"size",560))||560,n=bL(mL(u,e,"size","20px"),"20px"),o=parseFloat(mL(g,e,"size",276))||276,i=parseFloat(h?.[e]?.ringGap)||0,s=t+2*i;return{circle:t,outerGap:i,segmentSize:Math.min(parseFloat(mL(p,e,"size",118))||118,xL(t)),iconSize:n,radius:`calc(${fL(s,D)} + ${bL(c.radiusOffset,"0px")})`,disc:o}})(e),l={tablet:"desktop",mobile:"tablet"}[e],d=mL(r,e,"alignment","center");return`${H(j,l&&d===mL(r,l,"alignment","center")?"":`text-align: ${d};`)}\n\t\t${H($,`width: ${t}px;`,`height: ${t}px;`,`padding: ${n?bL(h[e].ringGap,"0px"):"0px"};`,`background-clip: ${n?"content-box":"border-box"};`)}\n\t\t${H(S,na("padding",ha(p?.[e]?.padding)))}\n\t\t${c.enableSegmentsType?`${O}{\n\t\t\twidth: ${t}px;\n\t\t\theight: ${t}px;\n\t\t\t${G}\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\t--bbInfographicContentRadius: ${(a/2+t/2)/2}px;\n\t\t}`:`${I}{\n\t\t\twidth: ${o}px;\n\t\t\theight: ${o}px;\n\t\t\t${G}\n\t\t\t--bbInfographicRadius: ${s};\n\t\t\ttransform: translate(-50%, -50%) rotate(var(--bbInfographicAngle, 0deg)) translateY(calc(var(--bbInfographicRadius, 0px) * -1)) rotate(var(--bbInfographicCounter, 0deg));\n\t\t}`}\n\t\t${S} .b-blocks-infographic-segment-icon>svg,\n\t\t${S} .b-blocks-infographic-segment-icon>img{\n\t\t\twidth: ${i};\n\t\t\theight: ${i};\n\t\t}\n\t\t${H(A,na("padding",ha(u?.[e]?.padding)),na("border-radius",ha(u?.[e]?.radius)))}\n\t\t${H(B,na("border-radius",ha(C?.[e]?.radius)),na("width",bL(C?.[e]?.width,"")),na("height",bL(C?.[e]?.height,"")))}\n\t\t${H(T,`width: ${a}px;`,`height: ${a}px;`,na("padding",ha(g?.[e]?.padding)))}`},q=(e,t)=>{const n=oa(t?.background),o=F(t?.border),i=na("box-shadow",la(t?.shadow)),s=t?.color;return[H(e,n,na("color",s),o,i),s?`${e} .b-blocks-infographic-segment-icon>svg{ ${na("fill",s)} }`:""].filter(Boolean).join("\n")},Y=(e,t)=>{const{label:n,icon:o}=t?.color||{},i=oa(t?.background),s=F(t?.border);return[i||s?`${e}{ ${i} ${s} }`:"",n?`${e} .b-blocks-infographic-segment-label{ color: ${n}; }`:"",o?`${e} .b-blocks-infographic-segment-icon{ color: ${o}; } ${e} .b-blocks-infographic-segment-icon>svg{ fill: ${o}; }`:""].filter(Boolean).join("\n")},K=(e,t)=>{const{title:n,divider:o,desc:i}=t?.color||{};return[H(`${e} .b-blocks-infographic-center-title`,na("color",n)),H(`${e} .b-blocks-infographic-center-divider`,na("border-top-color",o)),H(`${e} .b-blocks-infographic-center-text`,na("color",i))].filter(Boolean).join("\n")},Q=(0,m.useMemo)((()=>`\n\t\t${pa("",k.typo)?.googleFontLink}\n\t\t${pa("",w.typo)?.googleFontLink}\n\t\t${pa("",p.labelTypo)?.googleFontLink}\n\t\t${pa(M,k.typo)?.styles}\n\t\t${pa(N,w.typo)?.styles}\n\t\t${pa(E,p.labelTypo)?.styles}\n\n\t\t${H(j,...(()=>{const e=jL(d,c);return[`--bbInfographicSpeed: ${gL(d.speed)}ms;`,`--bbInfographicEasing: ${VN(d.easing)};`,na("--bbInfographicContentSpeed",bL(d.contentSpeed,"")),d.rotate?`--bbInfographicEntranceName: ${sL[e]||"none"};`:"",d.rotate?`--bbInfographicRotateSpeed: ${bL(d.rotateSpeed,"")};`:""]})())}\n\t\t${H(S,KN(p.transition,["background","color","border-color","box-shadow"]),na("border-radius",ha(p.radius)))}\n\t\t${q(S,x)}\n\t\t${q(`${S}.active`,v)}\n\t\t${q(`${S}:hover`,y)}\n\t\t${q(`${S}:focus-visible`,y)}\n\t\t${f.map(((e,t)=>{const{normal:n,hover:o,active:i}=e?.styles||{},s=`${S}[data-index='${t}']`,a=`${T}[data-item-index='${t}']`;return[Y(s,n),Y(`${s}.active`,i),Y(`${s}:hover`,o),Y(`${s}:focus-visible`,o),K(a,n),K(`${a}:hover`,o),K(`${a}:active`,i)].filter(Boolean).join("\n")})).filter(Boolean).join("\n")}\n\t\t${H(T,KN(g.transition,["background","box-shadow"]),oa(g.background),`border: ${z} ${g.borderStyle||"solid"} ${W};`,na("box-shadow",la(g.shadow?.normal)))}\n\t\t${H(`${T}:hover`,na("box-shadow",la(g.shadow?.hover)))}\n\t\t${H(`${T} .b-blocks-infographic-center-content`,na("width",bL(g.contentWidth,"")),na("gap",bL(g.contentGap,"")),na("text-align",g.contentAlign),na("align-items","left"===g.contentAlign?"flex-start":"right"===g.contentAlign?"flex-end":"center"))}\n\t\t${H($,KN(h.transition,["background","border-color","box-shadow"]),oa(h.background),`border: ${D} ${h.borderStyle||"solid"} ${U};`,na("box-shadow",la(h.shadow?.normal)))}\n\t\t${H(`${$}:hover`,na("box-shadow",la(h.shadow?.hover)))}\n\t\t${H(M,na("color",k.color))}\n\t\t${H(N,na("color",w.color))}\n\t\t${H(L,`width: ${bL(_.width)};`,"height: 0;","background: none;",`border-top: ${bL(_.height)} ${_.style||"solid"} ${_.color||"currentColor"};`)}\n\t\t${H(P,na("gap",bL(p.spacing,"")),na("margin",ha(p.margin)))}\n\t\t${H(j,na("--bbInfographicIconPlate",u.plateColor))}\n\t\t${H(A,KN(u.transition,["background","color","border-color"]),na("color",u.color),oa(u.background),F(u.border?.normal))}\n\t\t${H(`${S}:hover .b-blocks-infographic-segment-icon`,F(u.border?.hover))}\n\t\t${H(`${A}>svg`,na("fill",u.color))}\n\t\t${H(B,na("object-fit",C.fit))}\n\n\t\t${c.enableSegmentsType?_L(f,c).map((e=>`${O}[data-index='${e.index}']{ clip-path: ${(({start:e,span:t})=>{if(0>=t)return"none";const n=Math.max(Math.ceil(t/4),2),o=["50% 50%"];for(let i=0;i<=n;i++){const s=(e+t*i/n)*Math.PI/180;o.push(`${(50+50*Math.sin(s)).toFixed(2)}% ${(50-50*Math.cos(s)).toFixed(2)}%`)}return`polygon(${o.join(", ")})`})(e)}; }`)).join("\n"):""}\n\n\t\t${V("desktop")}\n\n\t\t${t}{\n\t\t\t${V("tablet")}\n\t\t}\n\n\t\t${n}{\n\t\t\t${V("mobile")}\n\t\t}\n\n\t\t${_a(o,s,i,!1)}\n\t\t`),[e,o,i]);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:Q}})},EL=({attributes:e,updateObj:t})=>{const{animation:n={},wheel:o={}}=e,i=(e,n)=>t("animation",e,n),s=o.enableSegmentsType;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Animation","b-blocks"),checked:n.enable,onChange:e=>i(e,"enable"),__nextHasNoMarginBottom:!0}),n.enable&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Trigger","b-blocks"),labelPosition:"edge",value:n.trigger||"load",options:aL,onChange:e=>i(e,"trigger"),help:(0,x.__)("Waiting for the scroll keeps a block below the fold from finishing before anyone reaches it.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Delay","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.delay||"",onChange:e=>i(e,"delay"),units:[pL(),hL()]})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Type","b-blocks"),labelPosition:"edge",value:n.type||"spread",options:(a=s,a?nL.filter((({value:e})=>iL(e))):nL),onChange:e=>i(e,"type"),__nextHasNoMarginBottom:!0}),s&&(0,l.jsx)("small",{children:(0, |
| 467 |
x.__)("Segments are placed by a clip-path, which the moving entrances cannot work around — so only the two that fade rather than travel are offered here.","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",value:n.easing||"ease",options:UN,onChange:e=>i(e,"easing"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Speed","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.speed||"",onChange:e=>i(e,"speed"),units:[pL(),hL()]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Stagger","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.stagger||"",onChange:e=>i(e,"stagger"),units:[pL(),hL()],placeholder:`${Math.round(.25*gL(n.speed))}`})]}),(0,l.jsx)("small",{children:(0,x.__)("The gap between one segment arriving and the next. Zero brings them in together; left empty it scales with the speed.","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Order","b-blocks"),labelPosition:"edge",value:n.order||"clockwise",options:lL,onChange:e=>i(e,"order"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Content Transition","b-blocks"),labelPosition:"edge",value:n.contentType||"none",options:cL,onChange:e=>i(e,"contentType"),help:(0,x.__)("How the centre swaps its title, text and image when a new segment is selected.","b-blocks"),__nextHasNoMarginBottom:!0}),"none"!==n.contentType&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition Speed","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.contentSpeed||"",onChange:e=>i(e,"contentSpeed"),units:[pL(),hL()]})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Hover Motion","b-blocks"),labelPosition:"edge",value:n.hoverMotion||"none",options:dL,onChange:e=>i(e,"hoverMotion"),help:(0,x.__)("Movement on hover, separate from the hover colours in the Style tab.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Pulse Active Segment","b-blocks"),checked:n.activePulse,onChange:e=>i(e,"activePulse"),help:(0,x.__)("A soft, continuous pulse on whichever segment is driving the centre.","b-blocks"),__nextHasNoMarginBottom:!0}),!s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Rotate Ring","b-blocks"),checked:n.rotate,onChange:e=>i(e,"rotate"),help:(0,x.__)("Keeps the ring turning once the entrance has finished. Combines with any type above.","b-blocks"),__nextHasNoMarginBottom:!0}),n.rotate&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Rotation Speed","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.rotateSpeed||"",onChange:e=>i(e,"rotateSpeed"),units:[hL(),pL()]})]}),(0,l.jsx)("small",{children:(0,x.__)("One full turn. Seconds rather than milliseconds — anything quick reads as a spin.","b-blocks")}),(0,l.jsx)(v,{className:"mb0 mt10 flex1",children:(0,x.__)("Direction","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.rotateDirection||"clockwise",onChange:e=>i(e,"rotateDirection"),children:WN.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Pause On Hover","b-blocks"),checked:n.pauseOnHover,onChange:e=>i(e,"pauseOnHover"),help:(0,x.__)("A turning segment travels away from the pointer, which makes it hard to click.","b-blocks"),__nextHasNoMarginBottom:!0})]})]})]})]});var a},PL=({attributes:e,updateObj:t})=>{const{button:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Icon","b-blocks"),checked:n.showIcon,onChange:e=>t("button",e,"showIcon"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Text","b-blocks"),checked:n.showText,onChange:e=>t("button",e,"showText"),__nextHasNoMarginBottom:!0})]})},AL=({attributes:e,updateObj:t})=>{const{items:n=[],defaults:o={}}=e,i=n.map((e=>({label:e?.buttonLabel||(0,x.__)("(untitled)","b-blocks"),value:e?.buttonLabel||""})));return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Default Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Default Item","b-blocks"),labelPosition:"edge",value:o.item,options:i,onChange:e=>t("defaults",e,"item"),help:(0,x.__)("The item shown in the centre before anything is selected.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Default Title","b-blocks"),value:o.itemTitle,onChange:e=>t("defaults",e,"itemTitle"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Default Text","b-blocks"),value:o.itemText,onChange:e=>t("defaults",e,"itemText"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{children:(0,x.__)("Default Image","b-blocks")}),(0,l.jsx)(we,{value:o.image,height:"90%",width:"90%",onChange:e=>t("defaults",e,"image")}),(0,l.jsx)("small",{children:(0,x.__)("Each is a fallback: it shows only when the active item leaves that field empty.","b-blocks")})]})},BL=({attributes:e,updateObj:t})=>{const{elements:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Title","b-blocks"),checked:n.title,onChange:e=>t("elements",e,"title"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Divider","b-blocks"),checked:n.divider,onChange:e=>t("elements",e,"divider"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Text","b-blocks"),checked:n.text,onChange:e=>t("elements",e,"text"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Image","b-blocks"),checked:n.image,onChange:e=>t("elements",e,"image"),__nextHasNoMarginBottom:!0})]})},IL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{general:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("General","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(v,{className:"mb0 flex1",children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1 small mt5",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o?.[n]?.alignment||"",size:"small",onChange:e=>t("general",e,n,"alignment"),isDeselectable:!0,style:{padding:"2px"},children:BN.map((({label:e,value:t,icon:n})=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e,value:t,icon:n},t)))}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Item Trigger Type","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.itemTriggerType,onChange:e=>t("general",e,"itemTriggerType"),children:IN.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]})]})},OL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{icon:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0, |
| 468 |
x.__)("View","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.view,onChange:e=>t("icon",e,"view"),children:RN.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(v,{className:"mt10 flex1",children:(0,x.__)("Shape","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.shape,onChange:e=>t("icon",e,"shape"),children:zN.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(v,{className:"mt10 flex1",children:(0,x.__)("Position","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.position||"top",onChange:e=>t("icon",e,"position"),children:HN.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.size||"",onChange:e=>t("icon",e,n,"size"),units:[Ee(),Ae(),Be()]})]})]})},RL=({attributes:e,setAttributes:t,index:n})=>{const{items:o=[],elements:i={},wheel:s={}}=e,{enable:a=!0,buttonLabel:r="",position:c="",buttonIcon:d={},title:u="",description:p="",image:h={},imageHeight:g="107px",imagePosition:m="top",link:b={},styles:f={}}=o?.[n]||{},k=fe(e,t),w=(e,t,...o)=>k("items",t,n,e,...o),_=vL(o),C=_.findIndex((e=>e.index===n)),j=Math.round(kL(-1===C?n:C,_.length||o.length,s));return(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small bBlocksSettingInfographicSettings",activeClass:"activeTab",tabs:eL,children:e=>(0,l.jsxs)(l.Fragment,{children:["content"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Item","b-blocks"),checked:!1!==a,onChange:e=>w("enable",e),help:(0,x.__)("Switched off, the item leaves the ring and the rest re-space themselves.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Button Label","b-blocks"),value:r,onChange:e=>w("buttonLabel",e),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Position","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:c||"",onChange:e=>w("position",e),units:[yL()],placeholder:`${j}`})]}),(0,l.jsx)("small",{children:(0,x.__)("Clockwise from the top. Leave empty to keep this item evenly spaced with the rest.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Button Icon","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:d?.type||"icon",onChange:e=>w("buttonIcon",e,"type"),children:tL.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]}),"image"===d?.type?(0,l.jsx)(we,{className:"mt10",value:{url:d?.url},height:"90%",width:"90%",onChange:e=>w("buttonIcon",e?.url||"","url")}):(0,l.jsx)(Zn,{className:"mt10",value:d?.icon,onChange:e=>w("buttonIcon",e,"icon")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Title","b-blocks"),value:u,onChange:e=>w("title",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Description","b-blocks"),value:p,onChange:e=>w("description",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{children:(0,x.__)("Image","b-blocks")}),(0,l.jsx)(we,{height:"90%",width:"90%",value:h,onChange:e=>w("image",e)}),!i.image&&(0,l.jsx)("small",{children:(0,x.__)("Nothing will show until Enable Image is switched on in the Elements panel.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Image Height","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:g||"",onChange:e=>w("imageHeight",e)})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Image Position","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:m,onChange:e=>w("imagePosition",e),children:ON.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Link","b-blocks"),value:b?.url||"",onChange:e=>w("link",e,"url"),placeholder:(0,x.__)("https://example.com","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Link Title","b-blocks"),value:b?.title||"",onChange:e=>w("link",e,"title"),help:(0,x.__)("Accessible name for the link.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open In New Tab","b-blocks"),checked:!!b?.target,onChange:e=>w("link",e,"target"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Add Nofollow","b-blocks"),checked:!!b?.nofollow,onChange:e=>w("link",e,"nofollow"),__nextHasNoMarginBottom:!0})]}),"style"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10 infographicItemsPanelTabPanel",activeClass:"activeTab",tabs:QN,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:JN(e.name,(0,x.__)("Button label color","b-blocks")),value:f?.[e.name]?.color?.label,onChange:t=>w("styles",t,e.name,"color","label")}),(0,l.jsx)(Ue,{className:"mt10",label:JN(e.name,(0,x.__)("Button Icon color","b-blocks")),value:f?.[e.name]?.color?.icon,onChange:t=>w("styles",t,e.name,"color","icon")}),(0,l.jsx)(An,{className:"mt10",label:JN(e.name,(0,x.__)("Button BG Color","b-blocks")),value:f?.[e.name]?.background,onChange:t=>w("styles",t,e.name,"background")}),(0,l.jsx)(y.BorderBoxControl,{label:JN(e.name,(0,x.__)("Border","b-blocks")),value:f?.[e.name]?.border,onChange:t=>w("styles",t,e.name,"border")}),(0,l.jsx)(Ue,{className:"mt10",label:JN(e.name,(0,x.__)("Title color","b-blocks")),value:f?.[e.name]?.color?.title,onChange:t=>w("styles",t,e.name,"color","title")}),(0,l.jsx)(Ue,{className:"mt10",label:JN(e.name,(0,x.__)("Divider color","b-blocks")),value:f?.[e.name]?.color?.divider,onChange:t=>w("styles",t,e.name,"color","divider")}),(0,l.jsx)(Ue,{className:"mt10",label:JN(e.name,(0,x.__)("Description color","b-blocks")),value:f?.[e.name]?.color?.desc,onChange:t=>w("styles",t,e.name,"color","desc")})]})}),(0,l.jsx)("small",{children:(0,x.__)("Button colours follow the segment. Title, Divider and Description colours apply to the centre while this item is the one showing there — hover and active track the centre disc being hovered and pressed.","b-blocks")})]})]})})},zL=({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o})=>{const{items:i=[]}=e,s=(0,m.useMemo)((()=>((e=[])=>{const t=e.length+1;return{enable:!0,id:`${LN}-item-${Date.now().toString(36)}${Math.random().toString(36).slice(2,7)}`,buttonLabel:`Title ${t}`,position:"",buttonIcon:{type:"icon",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm-24-136V232c0-13.3 10.7-24 24-24s24 10.7 24 24v144c0 13.3-10.7 24-24 24s-24-10.7-24-24zm24-224a32 32 0 1 1 0-64 32 32 0 1 1 0 64z'/></svg>",url:""},title:`Info Title ${t}`,description:"Describe this part of your process, service or story in a sentence or two.",image:{id:null,url:"",alt:""},imageHeight:"107px",imagePosition:"top",link:{url:"",target:!1,nofollow:!1,title:""},styles:{normal:{color:{ |
| 469 |
label:"",icon:""},background:{},border:{}},hover:{color:{label:"",icon:""},background:{},border:{}},active:{color:{label:"",icon:""},background:{},border:{}},titleColor:"",dividerColor:"",descColor:""}}})(i)),[i.length]);return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Segment Items","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_s,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,arrKey:"items",minItem:1,ItemSettings:RL,itemLabel:(0,x.__)("Segment","b-blocks"),newItem:s,title:"buttonLabel",design:"sortable"})})},DL=({attributes:e,updateObj:t})=>{const{wheel:n={},items:o=[]}=e,i=vL(o).filter((({item:e})=>!isNaN(parseFloat(e?.position)))),s=(e,o,i,s)=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:e}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n[o]||"",onChange:e=>t("wheel",e,o),units:i})]}),s&&(0,l.jsx)("small",{children:s})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Arrangement","b-blocks"),initialOpen:!1,children:[s((0,x.__)("Start Angle","b-blocks"),"startAngle",[yL()]),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Direction","b-blocks"),labelPosition:"edge",value:n.direction||"clockwise",options:WN,onChange:e=>t("wheel",e,"direction"),__nextHasNoMarginBottom:!0}),s((0,x.__)("Sweep","b-blocks"),"sweep",[yL()],(0,x.__)("360° spreads all the way round. Less than that lays the items along an arc — 180° gives a half circle, with the first and last on the two ends.","b-blocks")),!n.enableSegmentsType&&s((0,x.__)("Radius Offset","b-blocks"),"radiusOffset",[Ee()],(0,x.__)("Moves the segments in or out from the ring they sit on. Negative pulls them inward.","b-blocks")),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Rotate Labels","b-blocks"),checked:!!n.rotateLabels,onChange:e=>t("wheel",e,"rotateLabels"),help:(0,x.__)("Off, every label stays upright. On, each one turns to face outward from the centre.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Segments Type","b-blocks"),checked:n.enableSegmentsType,onChange:e=>t("wheel",e,"enableSegmentsType"),help:(0,x.__)("Draws the segments as pie wedges filling the ring instead of circles on it.","b-blocks"),__nextHasNoMarginBottom:!0}),n.enableSegmentsType&&s((0,x.__)("Wedge Gap","b-blocks"),"wedgeGap",[yL()],(0,x.__)("White space between neighbouring wedges.","b-blocks")),0<i.length&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.sprintf)(/* translators: %d: how many segments have their own Position set. */ /* translators: %d: how many segments have their own Position set. */ |
| 470 |
(0,x._n)("%d segment has its own Position, so Start Angle, Direction and Sweep will not move it. Clear that field to put it back on auto spacing.","%d segments have their own Position, so Start Angle, Direction and Sweep will not move them. Clear those fields to put them back on auto spacing.",i.length,"b-blocks"),i.length)}),(0,l.jsx)("small",{children:(0,x.__)("Start Angle, Direction and Sweep only move items left on auto spacing — an item with its own Position stays put.","b-blocks")})]})},FL=({attributes:e,updateObj:t})=>{const{divider:n={}}=e.content||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Divider","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Style","b-blocks"),labelPosition:"edge",value:n.style||"solid",options:qN,onChange:e=>t("content",e,"divider","style"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Weight","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.height||"",onChange:e=>t("content",e,"divider","height"),units:[Ee(),Ae()]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.width||"",onChange:e=>t("content",e,"divider","width"),units:[Ee(),Pe(),Ae()]})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("content",e,"divider","color"),defaultColor:"#BFA83B"})]})},HL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{icon:o={}}=e,{color:i,background:s={},border:a={}}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i,onChange:e=>t("icon",e,"color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background Color","b-blocks"),value:s,onChange:e=>t("icon",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Stacked Plate Color","b-blocks"),value:o.plateColor,onChange:e=>t("icon",e,"plateColor"),help:(0,x.__)("Backdrop behind the icon when View is set to Stacked.","b-blocks")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("icon",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("icon",e,n,"radius")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.transition||"",onChange:e=>t("icon",e,"transition"),units:[pL(),hL()]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:JN(e.name,(0,x.__)("Border","b-blocks")),value:a?.[e.name],onChange:n=>t("icon",n,"border",e.name)})})]})},WL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{image:o={}}=e.content||{},i=(e,i)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.[i]||"",onChange:e=>t("content",e,"image",n,i),units:[Ee(),Pe()]})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("content",e,"image",n,"radius")}),i((0,x.__)("Width","b-blocks"),"width"),i((0,x.__)("Height","b-blocks"),"height"),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Type","b-blocks"),labelPosition:"edge",value:o.fit||"cover",options:YN,onChange:e=>t("content",e,"image","fit"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("small",{children:(0,x.__)("Height here is the fallback — an item with its own Image Height wins.","b-blocks")})]})},UL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{innerDisc:o={},outerDisc:i={}}=e,s=parseFloat(i?.[n]?.size)||560;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Inner Disc","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.size||"",onChange:e=>t("innerDisc",e,n,"size"),units:[Ee()],max:s})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o.background,onChange:e=>t("innerDisc",e,"background"),defaults:{color:"#F2F0E4"}}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("innerDisc",e,n,"padding")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Border Color","b-blocks"),value:o.borderColor,onChange:e=>t("innerDisc",e,"borderColor"),defaultColor:"#3F8F4B"}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Border Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.borderWidth||"",onChange:e=>t("innerDisc",e,"borderWidth"),units:[Ee()],max:20})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Border Style","b-blocks"),labelPosition:"edge",value:o.borderStyle||"solid",options:DN,onChange:e=>t("innerDisc",e,"borderStyle"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("small",{children:(0,x.__)("This border is the inner ring.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Content Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.contentWidth||"",onChange:e=>t("innerDisc",e,"contentWidth")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Content Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.contentGap||"",onChange:e=>t("innerDisc",e,"contentGap")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Content Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.contentAlign||"center",onChange:e=>t("innerDisc",e,"contentAlign"),children:BN.map((({label:e,value:t,icon:n})=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e,value:t,icon:n},t)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.transition||"",onChange:e=>t("innerDisc",e,"transition"),units:[pL(),hL()]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsx)(yt,{label:JN(e.name,(0,x.__)("Box Shadow","b-blocks")),value:o.shadow?.[e.name],onChange:n=>t("innerDisc",n,"shadow",e.name)})})]})},GL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{outerDisc:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Outer Disc","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0, |
| 471 |
l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.size||"",onChange:e=>t("outerDisc",e,n,"size"),units:[Ee()],max:1e3})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o.background,onChange:e=>t("outerDisc",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Border Color","b-blocks"),value:o.borderColor,onChange:e=>t("outerDisc",e,"borderColor"),defaultColor:"#7E57C2"}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Border Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.borderWidth||"",onChange:e=>t("outerDisc",e,"borderWidth"),units:[Ee()],max:20})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Border Style","b-blocks"),labelPosition:"edge",value:o.borderStyle,options:DN,onChange:e=>t("outerDisc",e,"borderStyle"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("small",{children:(0,x.__)("This border is the outer ring — the segments sit centred on it.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Ring Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.ringGap||"",onChange:e=>t("outerDisc",e,n,"ringGap"),units:[Ee()]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.transition||"",onChange:e=>t("outerDisc",e,"transition"),units:[pL(),hL()]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsx)(yt,{label:JN(e.name,(0,x.__)("Box Shadow","b-blocks")),value:o.shadow?.[e.name],onChange:n=>t("outerDisc",n,"shadow",e.name)})})]})},VL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{segment:o={},wheel:i={}}=e,s=!!i.enableSegmentsType,a=parseFloat(mL(e.outerDisc,n,"size",560))||560;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Segment","b-blocks"),initialOpen:!1,children:[!s&&(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Shape","b-blocks"),labelPosition:"edge",value:o.shape||"circle",options:FN,onChange:e=>t("segment",e,"shape"),__nextHasNoMarginBottom:!0}),!s&&(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:o.radius||{},onChange:e=>t("segment",e,"radius")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("segment",e,n,"padding")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Content Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.spacing||"",onChange:e=>t("segment",e,"spacing"),units:[Ee(),Ae()]})]}),(0,l.jsx)("small",{children:(0,x.__)("Space between the icon and the label inside a segment.","b-blocks")}),(0,l.jsx)(k,{label:(0,x.__)("Content Margin","b-blocks"),values:o.margin||{},onChange:e=>t("segment",e,"margin")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.transition||"",onChange:e=>t("segment",e,"transition"),units:[pL(),hL()]})]}),!s&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.size||"",onChange:e=>t("segment",e,n,"size"),units:[Ee()],max:xL(a)})]})}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Label Typography","b-blocks"),value:o.labelTypo,onChange:e=>t("segment",e,"labelTypo"),defaults:{fontSize:{desktop:13,tablet:12,mobile:11}}}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:QN,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:JN(e.name,(0,x.__)("Background","b-blocks")),value:o?.[e.name]?.background,onChange:n=>t("segment",n,e.name,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:JN(e.name,(0,x.__)("Text Color","b-blocks")),value:o?.[e.name]?.color,onChange:n=>t("segment",n,e.name,"color"),defaultColor:"#FFFFFF"}),(0,l.jsx)(y.BorderBoxControl,{label:JN(e.name,(0,x.__)("Border","b-blocks")),value:o?.[e.name]?.border,onChange:n=>t("segment",n,e.name,"border")}),(0,l.jsx)(yt,{label:JN(e.name,(0,x.__)("Box Shadow","b-blocks")),value:o?.[e.name]?.shadow,onChange:n=>t("segment",n,e.name,"shadow")})]})})]})},qL=({attributes:e,updateObj:t})=>{const{text:n={}}=e.content||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Text","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("content",e,"text","color"),defaultColor:"#4B5563"}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("content",e,"text","typo"),defaults:{fontSize:{desktop:14,tablet:13,mobile:12}}})]})},YL=({attributes:e,updateObj:t})=>{const{title:n={}}=e.content||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Heading Tag","b-blocks"),labelPosition:"edge",value:n.tag,options:XN,onChange:e=>t("content",e,"title","tag"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("content",e,"title","color"),defaultColor:"#1F2937"}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("content",e,"title","typo"),defaults:{fontSize:{desktop:34,tablet:28,mobile:22}}})]})},KL=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(GL,{...e}),(0,l.jsx)(VL,{...e}),(0,l.jsx)(HL,{...e}),(0,l.jsx)(UL,{...e}),(0,l.jsx)(YL,{...e}),(0,l.jsx)(FL,{...e}),(0,l.jsx)(qL,{...e}),(0,l.jsx)(WL,{...e})]}),QL=e=>{const{attributes:t,setAttributes:n,updateObj:o,isPremium:i,device:s="desktop"}=e,{general:a={},advanced:r}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:a?.[s]?.alignment,onChange:e=>o("general",e||"",s,"alignment")})}),(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Xt,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(IL,{...e}),(0,l.jsx)(AL,{...e}),(0,l.jsx)(zL,{...e}),(0,l.jsx)(DL,{...e}),(0,l.jsx)(PL,{...e}),(0,l.jsx)(BL,{...e}),(0,l.jsx)(EL,{...e}),(0,l.jsx)(OL,{...e})]}),"style"===t.name&&(0,l.jsx)(KL,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:r,onChange:e=>n({advanced:e}),isPremium:i})]})})})]})},ZL=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{blockId:i}=t,[s,a]=(0,m.useState)(0),r="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,c=fe(t,n),d=o.slice(0,12);(0,m.useEffect)((()=>{i!==d&&n({blockId:d})}),[d]);const u=`block-${o}`,p=(0,h.useBlockProps)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(QL,{...e,updateObj:c,isPremium:r,activeIndex:s,setActiveIndex:a}),(0,l.jsxs)("div",{...p,children:[(0,l.jsx)(LL,{attributes:t,id:u,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(ML,{attributes:t,isBackend:!0,custom:{activeIndex:s,setActiveIndex:a}})})]})]})}));Nl(NN.name)&&(0,p.registerBlockType)(NN,{icon:Tr,edit:ZL,save:()=>null}) |
| 472 |
;const XL=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/input-field","version":"1.0.0","title":"Input Field","category":"bBlocks","description":"Form Input Field","keywords":["input field","text field","input","form field","field"],"ancestor":["b-blocks/form-builder"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"inputField":{"type":"object","default":{"type":"text","placeholder":"Placeholder...","value":"","icon":"","name":"input"}},"label":{"type":"object","default":{"text":"Input Field Label"}},"options":{"type":"object","default":{"isLabel":true,"isRequired":true,"isIcon":true,"isShowRequiredIcon":true}},"password":{"type":"object","default":{"options":{"isWeek":true,"isStrengthMeter":false,"isStrengthText":false,"isVisibilityIcon":true,"passStrengthText":"default","validationText":"default","isUpperCase":true,"isLowerCase":true,"isNumber":true,"isSpecialChar":true,"minLength":8},"strengthText":{"veryWeak":"Very Weak","weak":"Weak Password","medium":"Medium Password","strong":"Strong Password"}}},"validation":{"type":"object","default":{"errorMessage":{"text":{"missing":"This field is required."},"email":{"missing":"This field is required.","invalid":""},"password":{"missing":"This field is required.","invalid":"","customValidation":""},"url":{"missing":"This Field is required."}}}},"styles":{"type":"object","default":{"inputField":{"typo":{"fontSize":{"desktop":"16px"}},"colors":{"text":"","placeholder":""},"desktop":{"padding":{}},"tablet":{"padding":{}},"mobile":{"padding":{}},"normal":{"border":{},"bg":{},"radius":{"desktop":{},"tablet":{},"mobile":{}},"shadow":{}},"focus":{"border":{},"bg":{},"radius":{"desktop":{},"tablet":{},"mobile":{}},"shadow":{}},"hover":{"border":{},"bg":{},"radius":{"desktop":{},"tablet":{},"mobile":{}},"shadow":{}}},"label":{"typo":{"fontSize":{"desktop":"16px"}},"colors":{"required":"","text":""},"desktop":{"margin":{}},"tablet":{"margin":{}},"mobile":{"margin":{}},"position":"top"},"icon":{"field":{"color":"","desktop":{"size":"","position":{"x":"","y":""}},"tablet":{"size":"","position":{"x":"","y":""}},"mobile":{"size":"","position":{"x":"","y":""}}},"password":{"color":"","desktop":{"size":"","position":{"x":"","y":""}},"tablet":{"size":"","position":{"x":"","y":""}},"mobile":{"size":"","position":{"x":"","y":""}}}},"error":{"text":{"typo":{"fontSize":{"desktop":"14px"}},"color":"#f5222d","bg":{},"desktop":{"margin":{},"padding":{},"border":{},"radius":{}},"tablet":{"margin":{},"padding":{},"border":{},"radius":{}},"mobile":{"margin":{},"padding":{},"border":{},"radius":{}}},"input":{"desktop":{"margin":{},"padding":{},"border":{},"radius":{}},"tablet":{"margin":{},"padding":{},"border":{},"radius":{}},"mobile":{"margin":{},"padding":{},"border":{},"radius":{}}}},"password":{"strength":{"container":{"desktop":{"width":"","height":"","margin":{},"padding":{}},"tablet":{"width":"","height":"","margin":{},"padding":{}},"mobile":{"width":"","height":"","margin":{},"padding":{}},"border":{},"radius":{},"bg":{"color":""}},"meter":{"gap":"","desktop":{"width":"","height":"","margin":{},"padding":{}},"tablet":{"width":"","height":"","margin":{},"padding":{}},"mobile":{"width":"","height":"","margin":{},"padding":{}},"border":{},"radius":{}},"text":{"desktop":{"margin":{},"padding":{}},"tablet":{"margin":{},"padding":{}},"mobile":{"margin":{},"padding":{}},"typography":{"fontSize":{"desktop":"15px"}}},"colors":{"veryWeak":"#f5222d","weak":"#fa8c16","medium":"#fadb14","strong":"#7cb305"}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"providesContext":{"b-blocks/inputClientId":"clientId"},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","react","react-dom"]}'),JL=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],eE=[{label:(0,x.__)("Text","b-blocks"),value:"text"},{label:(0,x.__)("Email","b-blocks"),value:"email"},{label:(0,x.__)("Password","b-blocks"),value:"password"},{label:(0,x.__)("URL","b-blocks"),value:"url"}],tE=e=>{const{attributes:t,updateObj:n}=e,{options:o}=t,{isLabel:i,isRequired:s,isIcon:a,isShowRequiredIcon:r}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Settings","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Label","b-blocks"),value:i,checked:i,onChange:e=>{n("options",e,"isLabel")}}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Field Required","b-blocks"),value:s,checked:s,onChange:e=>{n("options",e,"isRequired")}}),s&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Required Icon","b-blocks"),value:r,checked:r,onChange:e=>{n("options",e,"isShowRequiredIcon")}}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Icon","b-blocks"),value:a,checked:a,onChange:e=>{n("options",e,"isIcon")}})]})},nE=e=>{const{attributes:t,updateObj:n}=e,{inputField:o,label:i}=t,{type:s,placeholder:a,value:r,icon:c,name:d}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Field","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Label","b-blocks"),value:i.text,onChange:e=>{n("label",e,"text")}}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Type","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",labelPosition:"edge",value:s,options:eE,onChange:e=>{n("inputField",e,"type")}})]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Placeholder","b-blocks"),value:a,onChange:e=>{n("inputField",e,"placeholder")}}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Default Value","b-blocks"),value:r,onChange:e=>{n("inputField",e,"value")}}),(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:c,onChange:e=>{n("inputField",e,"icon")}}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Input Custom name attribute","b-blocks"),value:d,onChange:e=>{n("inputField",e,"name")},help:(0,x.__)("This is for the name attributes which is used to submit form data, Name must be unique.","b-blocks")})]})},oE=({attributes:e,updateObj:t})=>{const{validation:n,inputField:o}=e,{type:i}=o,{errorMessage:s}=n;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Validation Message","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Missing Message","b-blocks"),value:s[i].missing,onChange:e=>t("validation",e,"errorMessage",i,"missing"),help:(0,x.__)("","b-blocks")}),["email"].includes(i)&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Invalid Message","b-blocks"),value:s[i].invalid,onChange:e=>t("validation",e,"errorMessage",i,"invalid"),help:(0,x.__)("","b-blocks")})]})},iE=({attributes:e,updateObj:t})=>{const{password:n,validation:o}=e,{options:i,strengthText:s}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Password Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Password Visibility Icon","b-blocks"),value:i.isVisibilityIcon,checked:i.isVisibilityIcon,onChange:e=>{t("password",e,"options","isVisibilityIcon")}}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Password Strength Meter","b-blocks"),value:i.isStrengthMeter,checked:i.isStrengthMeter,onChange:e=>{t("password",e,"options","isStrengthMeter")}}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Password Strength Text","b-blocks"),value:i.isStrengthText,checked:i.isStrengthText,onChange:e=>{t("password",e,"options","isStrengthText")}}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Password Strength Text","b-blocks"),labelPosition:"edge",options:[{label:"Default",value:"default"},{label:"Custom",value:"custom"}],value:i.passStrengthText,onChange:e=>{t("password",e,"options","passStrengthText")}}),"custom"===i.passStrengthText&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0, |
| 473 |
x.__)("Very Weak Password","b-blocks"),value:s.veryWeak,onChange:e=>t("password",e,"strengthText","veryWeak")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Weak Password","b-blocks"),value:s.weak,onChange:e=>t("password",e,"strengthText","weak")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Medium Password","b-blocks"),value:s.medium,onChange:e=>t("password",e,"strengthText","medium")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Strong Password","b-blocks"),value:s.strong,onChange:e=>t("password",e,"strengthText","strong")})]}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable use of week Password","b-blocks"),value:i.isWeek,checked:i.isWeek,onChange:e=>t("password",e,"options","isWeek")}),!i.isWeek&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Validation Text","b-blocks"),options:[{label:"Default",value:"default"},{label:"Custom",value:"custom"}],labelPosition:"edge",value:i.validationText,onChange:e=>t("password",e,"options","validationText")}),"custom"===i.validationText&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Custom Validation Text","b-blocks"),value:o.errorMessage.password.customValidation,onChange:e=>t("validation",e,"errorMessage","password","customValidation")}),(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Minimum Password Length","b-blocks"),labelPosition:"edge",value:i.minLength,onChange:e=>t("password",e,"options","minLength")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("One Uppercase Letter","b-blocks"),value:i.isUpperCase,checked:i.isUpperCase,onChange:e=>t("password",e,"options","isUpperCase")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("One Lowercase Letter","b-blocks"),value:i.isLowerCase,checked:i.isLowerCase,onChange:e=>t("password",e,"options","isLowerCase")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("One Number","b-blocks"),value:i.isNumber,checked:i.isNumber,onChange:e=>t("password",e,"options","isNumber")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("One Special Character","b-blocks"),value:i.isSpecialChar,checked:i.isSpecialChar,onChange:e=>t("password",e,"options","isSpecialChar")})]})]})},sE=e=>{const{attributes:t}=e,{inputField:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(nE,{...e}),(0,l.jsx)(tE,{...e}),(0,l.jsx)(oE,{...e}),"password"===n.type&&(0,l.jsx)(iE,{...e})]})},aE=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{error:i}=o,[s,a]=(0,m.useState)("text");return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Error Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>{a(e)},className:"mt10 mb10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Error Text",value:"text"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Error Input",value:"input"})]}),"text"===s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i.text.color,onChange:e=>t("styles",e,"error","text","color"),defaultColor:"#f5222d"}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i.text.bg,onChange:e=>t("styles",e,"error","text","bg"),isImage:!1}),(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:i.text.typo,onChange:e=>t("styles",e,"error","text","typo")})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[s][n].margin,onChange:e=>t("styles",e,"error",s,n,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[s][n].padding,onChange:e=>t("styles",e,"error",s,n,"padding")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i[s][n].border,onChange:e=>t("styles",e,"error",s,n,"border"),defaultValue:{}}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[s][n].radius,onChange:e=>t("styles",e,"error",s,n,"radius")})]})},rE=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{inputField:i}=o,[s,a]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Field Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.colors.text,onChange:e=>t("styles",e,"inputField","colors","text")}),(0,l.jsx)(Ue,{label:(0,x.__)("Placeholder Color","b-blocks"),value:i.colors.placeholder,onChange:e=>t("styles",e,"inputField","colors","placeholder")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[n].padding,onChange:e=>t("styles",e,"inputField",n,"padding")}),(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:i.typo,onChange:e=>t("styles",e,"inputField","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>{a(e)},className:"mt10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Focus",value:"focus"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i[s].bg,onChange:e=>t("styles",e,"inputField",s,"bg"),isImage:!1}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:i[s].border,onChange:e=>t("styles",e,"inputField",s,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),values:i[s].radius[n],onChange:e=>t("styles",e,"inputField",s,"radius",n)}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:i[s].shadow,onChange:e=>t("styles",e,"inputField",s,"shadow")})]})},lE=({attributes:e,updateObj:t,device:n})=>{const{styles:o,inputField:i,password:s}=e,{icon:a}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)("strong",{children:(0,x.__)("Field Icon","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:a.field.color,onChange:e=>t("styles",e,"icon","field","color")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Icon Size","b-blocks"),value:a.field[n].size,onChange:e=>t("styles",e,"icon","field",n,"size"),defaultValue:""}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Position X","b-blocks"),value:a.field[n].position.x,onChange:e=>t("styles",e,"icon","field",n,"position","x"),min:-100,max:100,defaultValue:""}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Position Y","b-blocks"),value:a.field[n].position.y,onChange:e=>t("styles",e,"icon","field",n,"position","y"),min:-100,max:100,defaultValue:""}),"password"===i.type&&s.options.isVisibilityIcon&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("strong",{children:(0,x.__)("Password Visibility Icon","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:a.password.color,onChange:e=>t("styles",e,"icon","password","color")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Icon Size","b-blocks"),value:a.password[n].size,onChange:e=>t("styles",e,"icon","password",n,"size"),defaultValue:""}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Position X","b-blocks"),value:a.password[n].position.x,onChange:e=>t("styles",e,"icon","password",n,"position","x"),min:-100,max:100,defaultValue:""}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Position Y","b-blocks"),value:a.password[n].position.y,onChange:e=>t("styles",e,"icon","password",n,"position","y"),min:-100,max:100,defaultValue:""})]})]})},cE=(0,l.jsxs)("svg",{id:"Layer_1",height:"512", |
| 474 |
viewBox:"0 0 32 32",width:"512",xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",children:[(0,l.jsx)("path",{d:"m27 8h-5v-1a2 2 0 0 1 2-2 1 1 0 0 0 0-2 4 4 0 0 0 -3 1.36 4 4 0 0 0 -3-1.36 1 1 0 0 0 0 2 2 2 0 0 1 2 2v1h-15a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h15v1a2 2 0 0 1 -2 2 1 1 0 1 0 0 2 4 4 0 0 0 3-1.36 4 4 0 0 0 3 1.36 1 1 0 0 0 0-2 2 2 0 0 1 -2-2v-1h5a3 3 0 0 0 3-3v-10a3 3 0 0 0 -3-3zm-22 14a1 1 0 0 1 -1-1v-10a1 1 0 0 1 1-1h15v12zm23-1a1 1 0 0 1 -1 1h-5v-12h5a1 1 0 0 1 1 1z"}),(0,l.jsx)("path",{d:"m11 12h-4a1 1 0 0 0 0 2h1v5a1 1 0 0 0 2 0v-5h1a1 1 0 0 0 0-2z"})]}),dE=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"0",viewBox:"0 0 15 15",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 0C1.22386 0 1 0.223858 1 0.5C1 0.776142 1.22386 1 1.5 1H6V12C6 12.5523 6.44772 13 7 13H8C8.55228 13 9 12.5523 9 12V1H13.5C13.7761 1 14 0.776142 14 0.5C14 0.223858 13.7761 0 13.5 0H9H6H1.5Z",fill:"currentColor"})}),uE=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"0",viewBox:"0 0 15 15",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 3C9 2.44772 8.55229 2 8 2H7C6.44772 2 6 2.44772 6 3L6 14H1.5C1.22386 14 1 14.2239 1 14.5C1 14.7761 1.22386 15 1.5 15L6 15H9H13.5C13.7761 15 14 14.7761 14 14.5C14 14.2239 13.7761 14 13.5 14H9V3Z",fill:"currentColor"})}),pE=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"0",viewBox:"0 0 15 15",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.499995 0.999995C0.223855 0.999995 -5.58458e-07 1.22385 -5.46388e-07 1.49999L-2.18554e-08 13.4999C-9.78492e-09 13.776 0.223855 13.9999 0.499995 13.9999C0.776136 13.9999 0.999991 13.776 0.999991 13.4999L0.999991 8.99993L12 8.99993C12.5523 8.99993 13 8.55222 13 7.99993L13 6.99994C13 6.44766 12.5523 5.99995 12 5.99995L0.999991 5.99995L0.999991 1.49999C0.999991 1.22385 0.776135 0.999995 0.499995 0.999995Z",fill:"currentColor"})}),hE=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"0",viewBox:"0 0 15 15",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.4999 1C14.2237 1 13.9999 1.22386 13.9999 1.5L13.9999 6L2.99988 6C2.44759 6 1.99988 6.44772 1.99988 7L1.99988 8C1.99988 8.55228 2.44759 9 2.99988 9L13.9999 9L13.9999 13.5C13.9999 13.7761 14.2237 14 14.4999 14C14.776 14 14.9999 13.7761 14.9999 13.5L14.9999 9L14.9999 6L14.9999 1.5C14.9999 1.22386 14.776 1 14.4999 1Z",fill:"currentColor"})});function gE(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",version:"1.1",viewBox:"0 0 16 16",...e,xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M8 3c-3.489 0-6.514 2.032-8 5 1.486 2.968 4.511 5 8 5s6.514-2.032 8-5c-1.486-2.968-4.511-5-8-5zM11.945 5.652c0.94 0.6 1.737 1.403 2.335 2.348-0.598 0.946-1.395 1.749-2.335 2.348-1.181 0.753-2.545 1.152-3.944 1.152s-2.763-0.398-3.945-1.152c-0.94-0.6-1.737-1.403-2.335-2.348 0.598-0.946 1.395-1.749 2.335-2.348 0.061-0.039 0.123-0.077 0.185-0.114-0.156 0.427-0.241 0.888-0.241 1.369 0 2.209 1.791 4 4 4s4-1.791 4-4c0-0.481-0.085-0.942-0.241-1.369 0.062 0.037 0.124 0.075 0.185 0.114v0zM8 6.5c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5 0.672-1.5 1.5-1.5 1.5 0.672 1.5 1.5z"})})}function mE(e){return(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",version:"1.1",viewBox:"0 0 16 16",...e,height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M14.78 0.22c-0.293-0.293-0.768-0.293-1.061 0l-3.159 3.159c-0.812-0.246-1.671-0.378-2.561-0.378-3.489 0-6.514 2.032-8 5 0.643 1.283 1.573 2.391 2.703 3.236l-2.484 2.484c-0.293 0.293-0.293 0.768 0 1.061 0.146 0.146 0.338 0.22 0.53 0.22s0.384-0.073 0.53-0.22l13.5-13.5c0.293-0.293 0.293-0.768 0-1.061zM6.5 5c0.66 0 1.22 0.426 1.421 1.019l-1.902 1.902c-0.592-0.201-1.019-0.761-1.019-1.421 0-0.828 0.672-1.5 1.5-1.5zM1.721 8c0.598-0.946 1.395-1.749 2.335-2.348 0.061-0.039 0.123-0.077 0.185-0.114-0.156 0.427-0.241 0.888-0.241 1.369 0 0.858 0.27 1.652 0.73 2.303l-0.952 0.952c-0.819-0.576-1.519-1.311-2.057-2.162z"}),(0,l.jsx)("path",{d:"M12 6.906c0-0.424-0.066-0.833-0.189-1.217l-5.028 5.028c0.384 0.123 0.793 0.189 1.217 0.189 2.209 0 4-1.791 4-4z"}),(0,l.jsx)("path",{d:"M12.969 4.531l-1.084 1.084c0.020 0.012 0.040 0.024 0.059 0.037 0.94 0.6 1.737 1.403 2.335 2.348-0.598 0.946-1.395 1.749-2.335 2.348-1.181 0.753-2.545 1.152-3.944 1.152-0.604 0-1.202-0.074-1.781-0.219l-1.201 1.201c0.933 0.335 1.937 0.518 2.982 0.518 3.489 0 6.514-2.032 8-5-0.703-1.405-1.752-2.6-3.031-3.469z"})]})}const bE=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{label:i}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Label Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Label Position","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.position,onChange:e=>t("styles",e,"label","position"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Top",value:"top",icon:(0,l.jsx)(dE,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Bottom",value:"bottom",icon:(0,l.jsx)(uE,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:(0,l.jsx)(pE,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:(0,l.jsx)(hE,{})})]})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Label Color","b-blocks"),value:i.colors.text,onChange:e=>t("styles",e,"label","colors","text")}),(0,l.jsx)(Ue,{label:(0,x.__)("Required Color","b-blocks"),value:i.colors.required,onChange:e=>t("styles",e,"label","colors","required")}),(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:i.typo,onChange:e=>t("styles",e,"label","typo")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),values:i[n].margin,onChange:e=>t("styles",e,"label",n,"margin")})]})},fE=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("container"),{styles:s}=e,{password:a}=s,{strength:r}=a;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Password Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)("strong",{children:(0,x.__)("Colors","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Very Weak Password","b-blocks"),value:r.colors.veryWeak,onChange:e=>t("styles",e,"password","strength","colors","veryWeak"),defaultColor:"#f5222d"}),(0,l.jsx)(Ue,{label:(0,x.__)("Weak Password","b-blocks"),value:r.colors.weak,onChange:e=>t("styles",e,"password","strength","colors","weak"),defaultColor:"#fa8c16"}),(0,l.jsx)(Ue,{label:(0,x.__)("Medium Password","b-blocks"),value:r.colors.medium,onChange:e=>t("styles",e,"password","strength","colors","medium"),defaultColor:"#fadb14"}),(0,l.jsx)(Ue,{label:(0,x.__)("Strong Password","b-blocks"),value:r.colors.strong,onChange:e=>t("styles",e,"password","strength","colors","strong"),defaultColor:"#7cb305"}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e)},className:"mt10 mb10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Container",value:"container"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Meter",value:"meter"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Text",value:"text"})]}),"meter"===o&&(0,l.jsxs)(y.Flex,{className:"mb10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Meter Gap","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:r.meter.gap, |
| 475 |
onChange:e=>t("styles",e,"password","strength","meter","gap")})]}),("meter"===o||"container"===o)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:r[o][n].width,onChange:e=>t("styles",e,"password","strength",o,n,"width")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:r[o][n].height,onChange:e=>t("styles",e,"password","strength",o,n,"height")})]})]}),"container"===o&&(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:r.container.bg,onChange:e=>t("styles",e,"password","strength","container","bg"),isImage:!1}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[o][n].margin,onChange:e=>t("styles",e,"password","strength",o,n,"margin")}),("meter"===o||"container"===o)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[o][n].padding,onChange:e=>t("styles",e,"password","strength",o,n,"padding")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:r[o].border,onChange:e=>t("styles",e,"password","strength",o,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:r[o].radius,onChange:e=>t("styles",e,"password","strength",o,"radius")})]}),"text"===o&&(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:r.text.typography,onChange:e=>t("styles",e,"password","strength","text","typography")})]})},xE=e=>{const{attributes:t}=e,{inputField:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(rE,{...e}),(0,l.jsx)(bE,{...e}),(0,l.jsx)(lE,{...e}),"password"===n.type&&(0,l.jsx)(fE,{...e}),(0,l.jsx)(aE,{...e})]})},yE=e=>{const{isPremium:t}=e,[n,o]=(0,m.useState)(!1),i={isPremium:t,setIsProModalOpen:o};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Rs,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:JL,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(sE,{...e,premiumProps:i})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(xE,{...e})})]})})]}),(0,l.jsx)(qs,{isProModalOpen:n,setIsProModalOpen:o,link:"https://bplugins.com/products/advanced-post-block/#pricing",children:(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Feature: ","b-blocks")}),(0,x.__)("Feature details.","b-blocks")]})})]})},vE=({attributes:e,id:t})=>{const{styles:n}=e,{inputField:o,label:i,icon:s,error:a,password:r}=n,{colors:c,normal:d,hover:u,focus:p}=o,{strength:h}=r,{container:g,meter:m,text:b}=h,f=`#${t}`,x=`${f} .b-blocks-input-field-container`,y=`${x} .b-blocks-input-field-label`,v=`${y} .b-blocks-input-field-required`,k=`${x} .b-blocks-input-field`,w=`${x} .b-blocks-input-field-passStrength-container`,_=`${w} .b-blocks-input-field-passStrengthMeter-container`,C=`${w} .b-blocks-input-field-passStrengthMeterText-container`,j=`${k} .b-blocks-input-field-passVisibilityIcon`,$=`${f} .b-blocks-input-field-error-container .b-blocks-input-field`,S=`${x} .b-blocks-input-field-error-message`,T=`${k} input`,M=`${k} .b-blocks-input-field-icon`,N=e=>{const{bg:t,border:n,shadow:o}=e;return`\n\t\t\t${oa(t)}\n\t\t\t${sa(n)}\n\t\t\t${na("box-shadow",la(o))}\n\t`},L=(e,t="desktop")=>`\n\t\t${na("width",e[t].width)}\n\t\t${na("height",e[t].height)}\n\t\t${na("margin",ha(e[t].margin))}\n\t\t${na("padding",ha(e[t].padding))}\n\t\t${sa(e.border)}\n\t\t${na("border-radius",ha(e.radius))}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${pa("",o.typo).googleFontLink}\n\t\t\t${pa("",i.typo).googleFontLink}\n\t\t\t${pa("",b.typography).googleFontLink}\n\t\t\t${pa("",a.text.typo).googleFontLink}\n\t\t\t\n\t\t\t${pa(T,o.typo).styles}\n\t\t\t${pa(y,i.typo).styles}\n\t\t\t${pa(S,a.text.typo).styles}\n\t\t\t${pa(C,b.typography).styles}\n\n\t\t\t${T}{\n\t\t\t\t${na("color",c.text)}\n\t\t\t\t${N(d)}\n\t\t\t\t${na("padding",ha(o.desktop.padding))}\n\t\t\t\t${na("border-radius",ha(d.radius.desktop))}\n\t\t\t}\n\t\t\t${T}::placeholder{\n\t\t\t\t${na("color",c.placeholder)}\n\t\t\t}\n\t\t\t${T}:hover{\n\t\t\t\t${N(u)}\n\t\t\t\t${na("border-radius",ha(u.radius.desktop))}\n\t\t\t}\n\t\t\t${T}:focus{\n\t\t\t\t${N(p)}\n\t\t\t\t${na("border-radius",ha(p.radius.desktop))}\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${na("color",i.colors.text)}\n\t\t\t\t${na("margin",ha(i.desktop.margin))}\n\t\t\t}\n\t\t\t${v}{\n\t\t\t\t${na("color",i.colors.required)}\n\t\t\t}\n\t\t\t${M}{\n\t\t\t\t${na("left",jt(s.field.desktop.position.x)?s.field.desktop.position.x+"px":"")}\n\t\t\t\t${na("top",jt(s.field.desktop.position.y)?s.field.desktop.position.y+"px":"")}\n\t\t\t}\n\t\t\t${M}>svg{\n\t\t\t\t${na("fill",s.field.color)}\n\t\t\t\t${na("height",jt(s.field.desktop.size)?s.field.desktop.size+"px":"")}\n\t\t\t\t${na("width",jt(s.field.desktop.size)?s.field.desktop.size+"px":"")}\n\t\t\t}\n\t\t\t${j}{\n\t\t\t\t${na("fill",s.password.color)}\n\t\t\t\t${na("height",jt(s.password.desktop.size)?s.password.desktop.size+"px":"")}\n\t\t\t\t${na("width",jt(s.password.desktop.size)?s.password.desktop.size+"px":"")}\n\t\t\t\t${na("right",jt(s.password.desktop.position.x)?s.password.desktop.position.x+"px":"")}\n\t\t\t\t${na("top",jt(s.password.desktop.position.y)?s.password.desktop.position.y+"px":"")}\n\t\t\t}\n\n\t\t\t${$}>input{\n\t\t\t\t\t${na("margin",ha(a.input.desktop.margin))}\n\t\t\t\t\t${na("padding",ha(a.input.desktop.padding))}\n\t\t\t\t\t${sa(a.input.desktop.border)}\n\t\t\t\t\t${na("border-radius",ha(a.input.desktop.radius))}\n\t\t\t}\n\t\t\t\n\t\t\t${S}{\n\t\t\t\t\t${na("color",a.text.color)}\n\t\t\t\t\t${na("margin",ha(a.text.desktop.margin))}\n\t\t\t\t\t${na("padding",ha(a.text.desktop.padding))}\n\t\t\t\t\t${sa(a.text.desktop.border)}\n\t\t\t\t\t${na("border-radius",ha(a.text.desktop.radius))}\n\t\t\t\t\t${oa(a.text.bg)}\n\t\t\t}\n\n\t\t\t${w}{\n\t\t\t\t${L(g,"desktop")}\n\t\t\t\t${oa(g.bg)}\n\t\t\t}\n\n\t\t\t${_}{\n\t\t\t\t${na("gap",m.gap)}\n\t\t\t}\n\n\t\t\t${_} .b-blocks-input-field-passStrengthMeter{\n\t\t\t\t${L(m,"desktop")}\n\t\t\t}\n\t\t\t\n\t\t\t${_}>.veryWeakPass{\n\t\t\t\t\t${na("background-color",r.strength.colors.veryWeak)}\n\t\t\t}\n\t\t\t${_}>.weakPass{\n\t\t\t\t\t${na("background-color",r.strength.colors.weak)}\n\t\t\t}\n\t\t\t${_}>.mediumPass{\n\t\t\t\t\t${na("background-color",r.strength.colors.medium)}\n\t\t\t}\n\t\t\t${_}>.strongPass{\n\t\t\t\t\t${na("background-color",r.strength.colors.strong)}\n\t\t\t}\n\n\t\t\t${C}{\n\t\t\t\t\t${na("margin",ha(b.desktop.margin))}\n\t\t\t}\n\n\t\t\t${C}>.veryWeakPass{\n\t\t\t\t\t${na("color",r.strength.colors.veryWeak)}\n\t\t\t}\n\t\t\t${C}>.weakPass{\n\t\t\t\t\t${na("color",r.strength.colors.weak)}\n\t\t\t}\n\t\t\t${C}>.mediumPass{\n\t\t\t\t\t${na("color",r.strength.colors.medium)}\n\t\t\t}\n\t\t\t${C}>.strongPass{\n\t\t\t\t\t${na("color",r.strength.colors.strong)}\n\t\t\t}\n\n\n\t`}})},kE=e=>{let t=0;return e.length>=6&&(t+=1),/[A-Z]/.test(e)&&(t+=1),/[0-9]/.test(e)&&(t+=1),/[^a-zA-Z0-9]/.test(e)&&(t+=1),t},wE=({value:e})=>{const t=kE(e),n=()=>{switch(t){case 1:return"veryWeakPass";case 2:return"weakPass";case 3:return"mediumPass";case 4:return"strongPass";default:return""}};return(0,l.jsxs)("div",{className:"b-blocks-input-field-passStrengthMeter-container",children:[(0,l.jsx)("div",{className:`b-blocks-input-field-passStrengthMeter ${n()}`}),(0,l.jsx)("div",{className:`b-blocks-input-field-passStrengthMeter ${t>1?n():""}`}),(0,l.jsx)("div",{ |
| 476 |
className:`b-blocks-input-field-passStrengthMeter ${t>2?n():""}`}),(0,l.jsx)("div",{className:`b-blocks-input-field-passStrengthMeter ${t>3?n():""}`})]})},_E=({value:e,validationText:t,strengthText:n})=>{const o=kE(e),i=["veryWeak","weak","medium","strong"];return o>0&&(0,l.jsx)("div",{className:"b-blocks-input-field-passStrengthMeterText-container",children:(0,l.jsx)("div",{className:`b-blocks-input-field-passStrengthMeterText ${i[o-1]}Pass`,children:(s=o-1,("default"===t?{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}:n)[i[s]])})});var s},CE=({attributes:e})=>{const[t,n]=(0,m.useState)(!1),[o,i]=(0,m.useState)(""),{inputField:s,label:a,styles:r,options:c,validation:d,password:u}=e,{type:p,placeholder:h,value:g,icon:b,name:f}=s,{text:x}=a,{label:y}=r,{position:v}=y,{isLabel:k,isRequired:w,isIcon:_,isShowRequiredIcon:C}=c,{errorMessage:j}=d,{options:$,strengthText:S}=u,{isValid:T,message:M}=((e,t,n={},o,i={},s={})=>{const{options:a={}}=i,{errorMessage:r}=s,[l,c]=(0,m.useState)(""),[d,u]=(0,m.useState)(!1),p=function(e,t=12,n=!1,o=!1,i=!1,s=!1){return!(!e?.length>=t||o&&!/[a-z]/.test(e)&&o||n&&!/[A-Z]/.test(e)&&n||i&&!/[0-9]/.test(e)&&i||s&&!/[^a-zA-Z0-9]/.test(e)&&s)}(e,a?.minLength,a?.isUpperCase,a?.isLowerCase,a?.isNumber,a?.isSpecialChar);return(0,m.useEffect)((()=>{!e&&o?(c(n[t].missing),u(!0)):"email"===t?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e)?(c(""),u(!1)):(c(n.email.invalid),u(!0),e||u(!1)):"password"===t?p||a.isWeek?(c(""),u(!1)):("default"===a.validationText?c(`${a.minLength} characters, Number, Uppercase, Lowercase, Special character`):c(r.password.customValidation),u(!0)):(c(""),u(!1))}),[p,o,t,e]),{message:l,isValid:d}})(o,p,j,w,u,d);return(0,l.jsxs)("div",{"data-iserror":T,className:`b-blocks-input-field-container label-position-${v} b-blocks-input-field-validation-${f}`,children:[x&&k&&(0,l.jsxs)("label",{htmlFor:f,className:"b-blocks-input-field-label",children:[x," ",w&&C&&(0,l.jsx)("span",{className:"b-blocks-input-field-required",children:"*"})," "]}),(0,l.jsxs)("div",{className:"b-blocks-input-field",children:[b&&_&&(0,l.jsx)("span",{className:"b-blocks-input-field-icon",dangerouslySetInnerHTML:{__html:b}}),(0,l.jsx)("input",{onChange:e=>i(e.target.value),type:(e=>"password"===e?t?"text":"password":e)(p),name:f,id:f,placeholder:h,...g&&{value:g},..."email"===p?{noValidate:!0}:{},..."password"===p?{autoComplete:"current-password"}:{}}),"password"===p&&$.isVisibilityIcon&&(t?(0,l.jsx)(gE,{onClick:()=>n(!t),className:"b-blocks-input-field-passVisibilityIcon"}):(0,l.jsx)(mE,{onClick:()=>n(!t),className:"b-blocks-input-field-passVisibilityIcon"}))]}),(0,l.jsx)("span",{className:`b-blocks-input-field-error-message b-blocks-input-field-error-${f}`,children:M}),"password"===p&&($.isStrengthMeter||$.isStrengthText)&&(0,l.jsxs)("div",{className:"b-blocks-input-field-passStrength-container",children:[$.isStrengthMeter&&(0,l.jsx)(wE,{value:o}),$.isStrengthText&&(0,l.jsx)(_E,{value:o,validationText:$.passStrengthText,strengthText:S})]})]})},jE=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,s=fe(t,n);return(0,m.useEffect)((()=>{n({clientId:o})}),[o]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(yE,{attributes:t,setAttributes:n,isPremium:!1,updateObj:s,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(vE,{attributes:t,id:`block-${o}`}),(0,l.jsx)(CE,{attributes:t})]})]})}));(0,p.registerBlockType)(XL,{icon:cE,edit:jE}) |
| 477 |
;const $E=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/instagram","title":"Instagram Feed","category":"bBlocks","description":"Show an Instagram feed as a responsive gallery, with profile header, captions and a lightbox.","keywords":["instagram","feed","social","gallery","photos"],"textdomain":"b-blocks","supports":{"html":false,"align":["wide","full"]},"attributes":{"blockId":{"type":"string","default":""},"align":{"type":"string","default":""},"source":{"type":"object","default":{"account":"","limit":24,"perPage":12,"cacheMinutes":30}},"elements":{"type":"object","default":{"profile":true,"profilePhoto":true,"profileName":false,"profileBio":false,"followButton":true,"followInFooter":false,"followLabel":"Follow On Instagram","caption":true,"stripHashtags":false,"linkHashtags":true,"captionLength":65,"mediaIcon":true,"loadMore":true,"loadMoreLabel":"Load More","lightbox":true,"linkPosts":true,"openInNewTab":true}},"grid":{"type":"object","default":{"desktop":{"columns":4,"columnGap":"15px","rowGap":"15px","ratio":"1/1"},"tablet":{"columns":2,"columnGap":"","rowGap":"","ratio":""},"mobile":{"columns":1,"columnGap":"","rowGap":"","ratio":""}}},"item":{"type":"object","default":{"hoverEffect":"zoom-in","desktop":{"radius":{"top":"","right":"","bottom":"","left":""},"iconSize":"22px"},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""},"iconSize":""},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""},"iconSize":""},"border":{},"shadow":[],"overlayColor":"","iconColor":"#ffffff","iconSize":"22px"}},"caption":{"type":"object","default":{"style":"overlay-center","align":"center","color":"#ffffff","linkColor":"#ffffff","onHover":false,"background":{"color":"#00000099"},"padding":{"desktop":{"top":"12px","right":"12px","bottom":"12px","left":"12px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"typo":{"fontSize":{"desktop":15,"tablet":14,"mobile":13}}}},"profile":{"type":"object","default":{"desktop":{"photoSize":"55px","gap":"12px"},"tablet":{"photoSize":"","gap":""},"mobile":{"photoSize":"","gap":""},"photo":"","photoSize":"55px","gap":"12px","usernameColor":"#146ef5","nameColor":"","nameText":"","bioColor":"","bioText":"","usernameTypo":{"fontSize":{"desktop":18,"tablet":"","mobile":""}},"metaTypo":{"fontSize":{"desktop":14,"tablet":"","mobile":""}}}},"followBtn":{"type":"object","default":{"normal":{"color":"#ffffff","background":{"color":"#146ef5"},"border":{},"padding":{"desktop":{"top":"10px","right":"18px","bottom":"10px","left":"18px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[]},"hover":{"color":"#ffffff","background":{"color":"#146ef5"},"border":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[]},"typo":{"fontSize":{"desktop":13,"tablet":"","mobile":""}},"padding":{"desktop":{"top":"10px","right":"18px","bottom":"10px","left":"18px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"loadMoreBtn":{"type":"object","default":{"normal":{"color":"#ffffff","background":{"color":"#146ef5"},"border":{},"padding":{"desktop":{"top":"10px","right":"22px","bottom":"10px","left":"22px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[]},"hover":{"color":"#ffffff","background":{"color":"#146ef5"},"border":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[]},"typo":{"fontSize":{"desktop":14,"tablet":"","mobile":""}},"padding":{"desktop":{"top":"10px","right":"22px","bottom":"10px","left":"22px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"lightbox":{"type":"object","default":{"backdrop":"#000000e6","showCaption":true,"showProfile":true,"showLink":true,"closeColor":"","closeBg":"","closeHoverColor":"","closeHoverBg":"","navColor":"","navBg":"","navHoverColor":"","navHoverBg":""}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"position":{}}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),SE="b-blocks-instagram",TE=e=>e?`https://www.instagram.com/${encodeURIComponent(e)}/`:"https://www.instagram.com/",ME=e=>`https://www.instagram.com/explore/tags/${encodeURIComponent(e)}/`,NE=async(e,t={})=>{const n=window?.bBlocksInstagram||null;if(!n?.ajaxUrl)throw new Error("Instagram endpoint is unavailable.");const o=new FormData;o.append("action",e),o.append("nonce",n.nonce),Object.entries(t).forEach((([e,t])=>o.append(e,t)));const i=await fetch(n.ajaxUrl,{method:"POST",body:o,credentials:"same-origin"}),s=await i.json();if(!s?.success)throw new Error(s?.data||"Could not load the feed.");return s.data},LE=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],EE=[{name:"normal",title:(0,x.__)("Normal","b-blocks")},{name:"hover",title:(0,x.__)("Hover","b-blocks")}],PE=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Zoom In","b-blocks"),value:"zoom-in"},{label:(0,x.__)("Zoom Out","b-blocks"),value:"zoom-out"},{label:(0,x.__)("Rotate","b-blocks"),value:"rotate"},{label:(0,x.__)("Grayscale","b-blocks"),value:"grayscale"},{label:(0,x.__)("Blur","b-blocks"),value:"blur"},{label:(0, |
| 478 |
x.__)("Lift","b-blocks"),value:"lift"},{label:(0,x.__)("Shine","b-blocks"),value:"shine"}],AE=[{label:(0,x.__)("Overlay Top","b-blocks"),value:"overlay-top"},{label:(0,x.__)("Overlay Center","b-blocks"),value:"overlay-center"},{label:(0,x.__)("Overlay Bottom","b-blocks"),value:"overlay-bottom"},{label:(0,x.__)("Below Image","b-blocks"),value:"below"}],BE=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],IE=[{label:(0,x.__)("Square","b-blocks"),value:"1/1"},{label:(0,x.__)("Portrait","b-blocks"),value:"4/5"},{label:(0,x.__)("Landscape","b-blocks"),value:"16/9"},{label:(0,x.__)("Original","b-blocks"),value:"auto"}],OE=(e,t)=>"normal"===e?t:`${e.charAt(0).toUpperCase()}${e.slice(1)} ${t.charAt(0).toLowerCase()}${t.slice(1)}`,RE=(e={},t,n,o="")=>{const i=t=>{const o=e?.[t]?.[n];return null==o||""===o?void 0:o},s=i("desktop")??o;if("desktop"===t)return s;const a=i("tablet")??s;return"tablet"===t?a:i("mobile")??a},zE=(e,t="")=>{if(null==e||""===e)return t;const n=parseFloat(e);return isNaN(n)?t:/[a-z%]$/i.test(String(e).trim())?String(e).trim():`${n}px`},DE=(e="",{stripHashtags:t=!1,captionLength:n=0}={})=>{let o=String(e||"");t&&(o=o.replace(/#[\p{L}\p{N}_]+/gu,"").replace(/\s{2,}/g," ").trim());const i=parseInt(n,10)||0;return 0<i&&o.length>i?`${o.slice(0,i).trimEnd()}…`:o},FE=(e="",t=!0)=>String(e||"").split(/(#[\p{L}\p{N}_]+)/gu).filter((e=>""!==e)).map(((e,n)=>{const o=t&&/^#[\p{L}\p{N}_]+$/u.test(e)?e.slice(1):"";return o?(0,l.jsx)("a",{className:`${SE}-tag`,href:ME(o),target:"_blank",rel:"noreferrer nofollow noopener",children:e},n):(0,l.jsx)("span",{children:e},n)})),HE=(e={})=>e.thumbnail_url||e.media_url||"",WE=({attributes:e,username:t="",isBackend:n=!1})=>{const{elements:o={}}=e;return o.followButton?(0,l.jsx)("a",{className:`${SE}-follow`,href:n?"#":TE(t),target:n?"_self":"_blank",rel:"noreferrer noopener",onClick:e=>{n&&e.preventDefault()},children:o.followLabel||(0,x.__)("Follow On Instagram","b-blocks")}):null},UE=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"18",height:"18",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"})}),GE=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M34.8 29.7V11c0-2.9-2.3-5.2-5.2-5.2H11c-2.9 0-5.2 2.3-5.2 5.2v18.7c0 2.9 2.3 5.2 5.2 5.2h18.7c2.8-.1 5.1-2.4 5.1-5.2zM39.2 15v16.1c0 4.5-3.7 8.2-8.2 8.2H14.9c-.6 0-.9.7-.5 1.1 1 1.1 2.4 1.8 4.1 1.8h13.4c5.7 0 10.3-4.6 10.3-10.3V18.5c0-1.6-.7-3.1-1.8-4.1-.5-.4-1.2 0-1.2.6z"})}),VE=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M5.888 22.5a3.46 3.46 0 0 1-1.721-.46l-.003-.002a3.451 3.451 0 0 1-1.72-2.982V4.943a3.445 3.445 0 0 1 5.163-2.987l12.226 7.059a3.444 3.444 0 0 1-.001 5.967l-12.22 7.056a3.462 3.462 0 0 1-1.724.462Z"})}),qE=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"22",height:"22",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),YE=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M14.71 15.88 10.83 12l3.88-3.88a.996.996 0 1 0-1.41-1.41L8.71 11.3a.996.996 0 0 0 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0 .38-.39.39-1.03 0-1.42z"})}),KE=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M9.29 15.88 13.17 12 9.29 8.12a.996.996 0 1 1 1.41-1.41l4.59 4.59c.39.39.39 1.02 0 1.41L10.7 17.3a.996.996 0 0 1-1.41 0c-.38-.39-.39-1.03 0-1.42z"})}),QE=({attributes:e,feed:t={},index:n,isBackend:o=!1,onOpen:i})=>{const{elements:s={},caption:a={}}=e,{media_type:r="IMAGE",caption:c=""}=t,d=a.style||"overlay-center",u=o?(0,x.__)("Instagram caption preview text with #hashtags","b-blocks"):"",p=c||u,h=s.caption&&p?DE(p,s):"",g=()=>h?(0,l.jsx)("div",{className:`${SE}-caption`,children:(0,l.jsx)("p",{children:FE(h,s.linkHashtags)})}):null,m=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("figure",{className:`${SE}-figure`,children:[(0,l.jsx)("img",{className:`${SE}-image`,src:HE(t),alt:DE(p,{stripHashtags:!0,captionLength:120}),loading:"lazy"}),(0,l.jsx)("span",{className:`${SE}-overlay`}),s.mediaIcon&&"IMAGE"!==r&&(0,l.jsx)("span",{className:`${SE}-type`,children:"VIDEO"===r?VE:GE}),d.startsWith("overlay")&&(0,l.jsx)(g,{})]}),"below"===d&&(0,l.jsx)(g,{})]});return s.lightbox?(0,l.jsx)("div",{className:`${SE}-item`,children:(0,l.jsx)("button",{type:"button",className:`${SE}-open`,onClick:()=>i(n),children:m})}):s.linkPosts&&t.permalink?(0,l.jsx)("div",{className:`${SE}-item`,children:(0,l.jsx)("a",{className:`${SE}-open`,href:t.permalink,target:s.openInNewTab?"_blank":"_self",rel:"noreferrer noopener",children:m})}):(0,l.jsx)("div",{className:`${SE}-item`,children:m})},ZE=({attributes:e,user:t={},compact:n=!1})=>{const{elements:o={},profile:i={}}=e,{username:s="",profile_picture_url:a="",name:r="",biography:c=""}=t,d=TE(s),u=r||i.nameText||"",p=c||i.bioText||"",h=a||i.photo||"";return(0,l.jsxs)("div",{className:`${SE}-profile${n?` ${SE}-profile-compact`:""}`,children:[o.profilePhoto&&h&&(0,l.jsx)("a",{className:`${SE}-photo`,href:d,target:"_blank",rel:"noreferrer noopener",children:(0,l.jsx)("img",{src:h,alt:s,loading:"lazy"})}),(0,l.jsxs)("div",{className:`${SE}-identity`,children:[(0,l.jsxs)("a",{className:`${SE}-username`,href:d,target:"_blank",rel:"noreferrer noopener",children:["@",s]}),!n&&o.profileName&&u&&(0,l.jsx)("p",{className:`${SE}-name`,children:u}),!n&&o.profileBio&&p&&(0,l.jsx)("p",{className:`${SE}-bio`,children:p})]})]})},XE=({feed:e})=>{const t=(0,m.useRef)(null),n=e?.children?.data||[],o=e=>{const n=t.current;n&&n.scrollBy({left:e*n.clientWidth,behavior:"smooth"})};return(0,l.jsxs)("div",{className:`${SE}-carousel`,children:[(0,l.jsx)("div",{className:`${SE}-slides`,ref:t,children:n.map((e=>(0,l.jsx)("div",{className:`${SE}-slide`,children:e.thumbnail_url?(0,l.jsx)("video",{controls:!0,poster:e.thumbnail_url,src:e.media_url}):(0,l.jsx)("img",{src:e.media_url,alt:""})},e.id)))}),1<n.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{type:"button",className:`${SE}-nav ${SE}-nav-prev`,onClick:e=>{e.stopPropagation(),o(-1)},"aria-label":(0,x.__)("Previous slide","b-blocks"),children:YE}),(0,l.jsx)("button",{type:"button",className:`${SE}-nav ${SE}-nav-next`,onClick:e=>{e.stopPropagation(),o(1)},"aria-label":(0,x.__)("Next slide","b-blocks"),children:KE})]})]})},JE=({attributes:e,user:t,feeds:n=[],index:o,blockId:i="",container:s,isBackend:a=!1,onClose:r,onMove:c})=>{const{lightbox:d={},elements:u={}}=e,p=(0,m.useRef)(null),[h,g]=(0,m.useState)(!1),b=n[o],f=(0, |
| 479 |
m.useCallback)((e=>{"Escape"===e.key&&r(),"ArrowRight"===e.key&&c(1),"ArrowLeft"===e.key&&c(-1)}),[r,c]);if((0,m.useEffect)((()=>{const e=s?.ownerDocument||document;e.addEventListener("keydown",f);const t=e.body?.style?.overflow;return e.body&&(e.body.style.overflow="hidden"),p.current?.focus(),g(!0),()=>{e.removeEventListener("keydown",f),e.body&&void 0!==t&&(e.body.style.overflow=t)}}),[f,s]),!b)return null;const{media_type:y="IMAGE",media_url:v="",thumbnail_url:k="",caption:w="",permalink:_=""}=b,C=i||"default",j=`\n\t\t.${SE}-lightbox[data-bb-id="${C}"] {\n\t\t\t${d.backdrop?`background: ${d.backdrop} !important;`:""}\n\t\t}\n\t\t.${SE}-lightbox[data-bb-id="${C}"] .${SE}-close {\n\t\t\t${d.closeColor?`color: ${d.closeColor} !important;`:""}\n\t\t\t${d.closeBg?`background: ${d.closeBg} !important;`:""}\n\t\t}\n\t\t.${SE}-lightbox[data-bb-id="${C}"] .${SE}-close svg {\n\t\t\t${d.closeColor?"fill: currentColor !important;":""}\n\t\t}\n\t\t.${SE}-lightbox[data-bb-id="${C}"] .${SE}-close:hover {\n\t\t\t${d.closeHoverColor?`color: ${d.closeHoverColor} !important;`:""}\n\t\t\t${d.closeHoverBg?`background: ${d.closeHoverBg} !important;`:""}\n\t\t}\n\t\t.${SE}-lightbox[data-bb-id="${C}"] .${SE}-nav {\n\t\t\t${d.navColor?`color: ${d.navColor} !important;`:""}\n\t\t\t${d.navBg?`background: ${d.navBg} !important;`:""}\n\t\t}\n\t\t.${SE}-lightbox[data-bb-id="${C}"] .${SE}-nav svg {\n\t\t\t${d.navColor?"fill: currentColor !important;":""}\n\t\t}\n\t\t.${SE}-lightbox[data-bb-id="${C}"] .${SE}-nav:hover {\n\t\t\t${d.navHoverColor?`color: ${d.navHoverColor} !important;`:""}\n\t\t\t${d.navHoverBg?`background: ${d.navHoverBg} !important;`:""}\n\t\t}\n\t`,$=(0,l.jsxs)("div",{className:`${SE}-lightbox${h?" is-open":""}`,"data-bb-id":C,role:"dialog","aria-modal":"true","aria-label":(0,x.__)("Instagram post","b-blocks"),ref:p,tabIndex:-1,onMouseDown:e=>e.stopPropagation(),onClick:e=>{e.stopPropagation(),e.target===e.currentTarget&&r()},children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:j}}),(0,l.jsx)("button",{type:"button",className:`${SE}-close`,onClick:e=>{e.stopPropagation(),r()},"aria-label":(0,x.__)("Close","b-blocks"),children:qE}),1<n.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{type:"button",className:`${SE}-nav ${SE}-nav-prev`,onClick:e=>{e.stopPropagation(),c(-1)},"aria-label":(0,x.__)("Previous post","b-blocks"),children:YE}),(0,l.jsx)("button",{type:"button",className:`${SE}-nav ${SE}-nav-next`,onClick:e=>{e.stopPropagation(),c(1)},"aria-label":(0,x.__)("Next post","b-blocks"),children:KE})]}),(0,l.jsxs)("div",{className:`${SE}-dialog`,onClick:e=>e.stopPropagation(),children:[(0,l.jsxs)("div",{className:`${SE}-media`,children:["VIDEO"===y&&(0,l.jsx)("video",{controls:!0,autoPlay:!0,poster:k,src:v}),"CAROUSEL_ALBUM"===y&&(0,l.jsx)(XE,{feed:b}),"IMAGE"===y&&(0,l.jsx)("img",{src:v,alt:""})]}),(0,l.jsxs)("div",{className:`${SE}-details`,children:[d.showProfile&&(0,l.jsx)(ZE,{attributes:e,user:t,compact:!0}),d.showCaption&&(w||a)&&(0,l.jsx)("div",{className:`${SE}-full-caption`,children:FE(w||(a?(0,x.__)("Instagram caption preview text with #hashtags","b-blocks"):""),u.linkHashtags)}),d.showLink&&_&&(0,l.jsxs)("a",{className:`${SE}-permalink`,href:_,target:"_blank",rel:"noreferrer nofollow noopener",children:[UE," ",(0,x.__)("View on Instagram","b-blocks")]})]})]})]}),S=s?.ownerDocument?.body||("undefined"!=typeof document?document.body:null);return S?(0,Xn.createPortal)($,S):$},eP=({count:e=12})=>(0,l.jsx)("div",{className:`${SE}-grid`,children:Array.from({length:e},((e,t)=>(0,l.jsx)("div",{className:`${SE}-item ${SE}-skeleton`},t)))}),tP=({attributes:e,id:t="",isBackend:n=!1})=>{const o=(0,m.useRef)(null),{source:i={},elements:s={}}=e,[a,r]=(0,m.useState)({status:"loading",user:{},media:[],error:""}),[c,d]=(0,m.useState)(1),[u,p]=(0,m.useState)(-1),{account:h="",limit:g=24,perPage:b=12,cacheMinutes:f=30}=i;(0,m.useEffect)((()=>{let e=!0;return r((e=>({...e,status:"loading",error:""}))),(({account:e="",limit:t=12,cacheMinutes:n=30})=>NE("bBlocksInstagramFeed",{account:e,limit:t,cache:n}))({account:h,limit:g,cacheMinutes:f}).then((t=>e&&r({status:"ready",user:t?.user||{},media:t?.media||[],error:""}))).catch((t=>e&&r({status:"error",user:{},media:[],error:t.message}))),()=>{e=!1}}),[h,g,f]),(0,m.useEffect)((()=>d(1)),[h,b]);const y={user:a.user,media:a.media},v=parseInt(b,10)||12,k=(0,m.useMemo)((()=>y.media.slice(0,v*c)),[y.media,v,c]),w=y.media.length>k.length,_=(e=>{const{elements:t={},item:n={},caption:o={}}=e;return[SE,`${SE}-hover-${n.hoverEffect||"none"}`,`${SE}-caption-${o.style||"overlay-center"}`,o.onHover&&"below"!==o.style?`${SE}-caption-on-hover`:"",t.caption?`${SE}-has-caption`:"",t.profile?`${SE}-has-profile`:""].filter(Boolean).join(" ")})(e);if("loading"===a.status&&!n)return(0,l.jsx)("div",{className:_,children:(0,l.jsx)(eP,{count:v})});if("error"===a.status&&!n&&!y.media.length)return null;if(!y.media.length)return(0,l.jsx)("div",{className:_,children:(0,l.jsx)("p",{className:`${SE}-notice`,children:a.error||(0,x.__)("No posts to show yet.","b-blocks")})});const C=s.profile||s.followButton&&!s.followInFooter,j=s.loadMore&&w||s.followButton&&s.followInFooter;return(0,l.jsxs)("div",{className:_,ref:o,children:[C&&(0,l.jsxs)("div",{className:`${SE}-header`,children:[s.profile&&(0,l.jsx)(ZE,{attributes:e,user:y.user}),!s.followInFooter&&(0,l.jsx)(WE,{attributes:e,username:y.user?.username,isBackend:n})]}),(0,l.jsx)("div",{className:`${SE}-grid`,children:k.map(((t,o)=>(0,l.jsx)(QE,{attributes:e,feed:t,index:o,isBackend:n,onOpen:p},t.id)))}),j&&(0,l.jsxs)("div",{className:`${SE}-footer`,children:[s.loadMore&&w&&(0,l.jsx)("button",{type:"button",className:`${SE}-load-more`,onClick:()=>n?{}:d(c+1),children:s.loadMoreLabel||(0,x.__)("Load More","b-blocks")}),s.followInFooter&&(0,l.jsx)(WE,{attributes:e,username:y.user?.username,isBackend:n})]}),s.lightbox&&-1<u&&(0,l.jsx)(JE,{attributes:e,user:y.user,feeds:k,index:u,blockId:t,container:o.current,isBackend:n,onClose:()=>p(-1),onMove:e=>p((t=>(t+e+k.length)%k.length))})]})},nP=({attributes:e,id:o,isBackend:i=!1})=>{const{advanced:s={}}=e,{grid:a={},item:r={},caption:c={},profile:d={},followBtn:u={},loadMoreBtn:p={},lightbox:h={}}=e,g=`#${o} .${SE}`,b=`${g} .${SE}-header`,f=`${g} .${SE}-grid`,x=`${g} .${SE}-item`,y=`${g} .${SE}-figure`,v=`${g} .${SE}-overlay`,k=`${g} .${SE}-type`,w=`${g} .${SE}-caption`,_=`${g} .${SE}-photo`,C=`${g} .${SE}-username`,j=`${g} .${SE}-name, ${g} .${SE}-bio`,$=`${g} .${SE}-follow`,S=`${g} .${SE}-load-more`,T=`.${SE}-lightbox[data-bb-id="${(e=>{if("string"!=typeof e)return e;const t=e.replace(/\/\*|\*\//g,"").replace(/[{};<>\\]/g,"").replace(/[\r\n\t]+/g," "),n=e=>(t.split(e).length-1)%2;return n('"')||n("'")?t.replace(/["']/g,""):t})(o)}"]`,M=(e,...t)=>{const n=t.filter(Boolean).join(" ").replace(/\s+/g," ").trim();return n?`${e}{ ${n} }`:""},N=e=>Object.keys(e||{}).length?sa(e):"",L=(e,t)=>e?e.desktop||e.tablet||e.mobile?e[t]||null:"desktop"!==t||void 0===e.top&&void 0===e.right?null:e:null,E=(e,t={},n)=>{const o=L(t.normal?.padding,n)||("desktop"===n?L(t.padding,n):null),i=L(t.normal?.radius,n)||("desktop"===n?L(t.radius,n):null),s=L(t.hover?.padding,n),a=L(t.hover?.radius,n);return`\n\t\t\t${M(e,na("padding",ha(o)),na("border-radius",ha(i)))}\n\t\t\t${M(`${e}:hover, ${e}:focus-visible`,na("padding",ha(s)),na("border-radius",ha(a)))}\n\t\t` |
| 480 |
},P=(e,t={})=>`\n\t\t${M(e,na("color",t.normal?.color),oa(t.normal?.background),N(t.normal?.border),na("box-shadow",la(Array.isArray(t.normal?.shadow)?t.normal.shadow:t.shadow||[])))}\n\t\t${M(`${e}:hover, ${e}:focus-visible`,na("color",t.hover?.color),oa(t.hover?.background),N(t.hover?.border),na("box-shadow",la(Array.isArray(t.hover?.shadow)?t.hover.shadow:[])))}\n\t\t${E(e,t,"desktop")}\n\t`,A=e=>M(f,na("grid-template-columns",`repeat(${parseInt(RE(a,e,"columns",4),10)||1}, minmax(0, 1fr))`),na("column-gap",zE(RE(a,e,"columnGap","15px"),"15px")),na("row-gap",zE(RE(a,e,"rowGap","15px"),"15px"))),B=e=>`\n\t\t\t${M(x,na("border-radius",ha(r?.[e]?.radius)))}\n\n\t\t${M(y,na("aspect-ratio",RE(a,e,"ratio","1/1")))}\n\n\t\t${M(k,na("font-size",zE(RE(r,e,"iconSize","desktop"===e?r.iconSize||"22px":""),"")))}`,I=e=>`\n\t\t\t${M(b,na("gap",zE(RE(d,e,"gap","desktop"===e?d.gap||"12px":""),"")))}\n\n\t\t${M(`${_}, ${_} img`,na("width",zE(RE(d,e,"photoSize","desktop"===e?d.photoSize||"55px":""),"")),na("height",zE(RE(d,e,"photoSize","desktop"===e?d.photoSize||"55px":""),"")))}`,O=e=>M(w,na("padding",ha(L(c.padding,e)))),R=(0,m.useMemo)((()=>`\n\t\t${pa("",c.typo)?.googleFontLink}\n\t\t${pa("",d.usernameTypo)?.googleFontLink}\n\t\t${pa("",d.metaTypo)?.googleFontLink}\n\t\t${pa("",u.typo)?.googleFontLink}\n\t\t${pa("",p.typo)?.googleFontLink}\n\t\t${pa(w,c.typo)?.styles}\n\t\t${pa(C,d.usernameTypo)?.styles}\n\t\t${pa(j,d.metaTypo)?.styles}\n\t\t${pa($,u.typo)?.styles}\n\t\t${pa(S,p.typo)?.styles}\n\n\t\t${M(x,N(r.border),na("box-shadow",la(Array.isArray(r.shadow)?r.shadow:r.shadow?.normal)))}\n\t\t${r.shadow?.hover?M(`${x}:hover`,na("box-shadow",la(r.shadow.hover))):""}\n\n\t\t${M(v,na("background",r.overlayColor))}\n\t\t${M(k,na("color",r.iconColor))}\n\n\t\t${M(w,na("color",c.color),na("text-align",c.align),na("padding",ha(L(c.padding,"desktop"))),oa(c.background))}\n\t\t${M(`${w} a`,na("color",c.linkColor))}\n\n\t\t${M(C,na("color",d.usernameColor))}\n\t\t${M(`${g} .${SE}-name`,na("color",d.nameColor))}\n\t\t${M(`${g} .${SE}-bio`,na("color",d.bioColor))}\n\n\t\t${P($,u)}\n\t\t${P(S,p)}\n\n\t\t${M(T,na("background",h.backdrop))}\n\t\t${M(`${T} .${SE}-close`,na("color",h.closeColor),na("background",h.closeBg))}\n\t\t${M(`${T} .${SE}-close svg`,na("fill",h.closeColor))}\n\t\t${M(`${T} .${SE}-close:hover`,na("color",h.closeHoverColor),na("background",h.closeHoverBg))}\n\t\t${M(`${T} .${SE}-close:hover svg`,na("fill",h.closeHoverColor))}\n\t\t${M(`${T} .${SE}-nav`,na("color",h.navColor),na("background",h.navBg))}\n\t\t${M(`${T} .${SE}-nav svg`,na("fill",h.navColor))}\n\t\t${M(`${T} .${SE}-nav:hover`,na("color",h.navHoverColor),na("background",h.navHoverBg))}\n\t\t${M(`${T} .${SE}-nav:hover svg`,na("fill",h.navHoverColor))}\n\n\t\t${A("desktop")}\n\t\t${B("desktop")}\n\t\t${I("desktop")}\n\n\t\t${t}{\n\t\t\t${A("tablet")}\n\t\t\t${B("tablet")}\n\t\t\t${I("tablet")}\n\t\t\t${O("tablet")}\n\t\t\t${E($,u,"tablet")}\n\t\t\t${E(S,p,"tablet")}\n\t\t}\n\n\t\t${n}{\n\t\t\t${A("mobile")}\n\t\t\t${B("mobile")}\n\t\t\t${I("mobile")}\n\t\t\t${O("mobile")}\n\t\t\t${E($,u,"mobile")}\n\t\t\t${E(S,p,"mobile")}\n\t\t}\n\n\t\t${_a(o,s,i,!1)}\n\t\t`),[e,o,i]);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:R}})},oP=({attributes:e,updateObj:t,instagramKey:n=""})=>{const{source:o={}}=e,[i,s]=(0,m.useState)(Boolean(n)),[a,r]=(0,m.useState)(n?"":"loading");return(0,m.useEffect)((()=>{let e=!0;return n?(s(!0),void r("")):(NE("bBlocksInstagramGetAccount").then((t=>e&&(s(Boolean(t?.hasToken)),r("")))).catch((t=>e&&r(t.message))),()=>{e=!1})}),[n]),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Account","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Posts To Fetch","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{value:o.limit,onChange:e=>t("source",parseInt(e,10)||1,"limit"),min:1,max:100})]}),(0,l.jsx)("small",{children:(0,x.__)("How many posts are pulled from Instagram and cached. The grid shows them a page at a time.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Cache (minutes)","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{value:o.cacheMinutes,onChange:e=>t("source",parseInt(e,10)||0,"cacheMinutes"),min:0,max:10080})]}),(0,l.jsx)("small",{children:(0,x.__)("Zero fetches on every page load, which Instagram rate-limits. Thirty minutes suits most feeds.","b-blocks")}),(0,l.jsx)(y.Button,{className:"mt10",variant:"secondary",onClick:()=>{r("clearing"),NE("bBlocksInstagramClearCache").then((()=>r("cleared"))).catch((e=>r(e.message)))},disabled:"clearing"===a,children:"clearing"===a?(0,x.__)("Clearing…","b-blocks"):(0,x.__)("Clear Cached Feed","b-blocks")}),"cleared"===a&&(0,l.jsx)("small",{children:(0,x.__)("Cache cleared. Reload the editor to see the new posts.","b-blocks")})]})},iP=({attributes:e,updateObj:t})=>{const{elements:n={},source:o={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Follow Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Follow Button","b-blocks"),checked:n.followButton,onChange:e=>t("elements",e,"followButton")}),n.followButton&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Label","b-blocks"),value:n.followLabel||"",onChange:e=>t("elements",e,"followLabel")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Place Below The Grid","b-blocks"),checked:n.followInFooter,onChange:e=>t("elements",e,"followInFooter"),help:(0,x.__)("Off, it sits beside the profile above the grid.","b-blocks")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Load More","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Load More","b-blocks"),checked:n.loadMore,onChange:e=>t("elements",e,"loadMore")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Posts Per Page","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",value:o.perPage,onChange:e=>t("source",parseInt(e,10)||1,"perPage"),min:1,max:100})]}),(0,l.jsx)("small",{children:(0,x.__)("With Load More off, only this many posts are ever shown.","b-blocks")}),n.loadMore&&(0,l.jsx)(y.TextControl,{className:"mt20",label:(0,x.__)("Label","b-blocks"),value:n.loadMoreLabel||"",onChange:e=>t("elements",e,"loadMoreLabel")})]})]})},sP=({attributes:e,updateObj:t})=>{const{elements:n={},caption:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Caption","b-blocks"),checked:n.caption,onChange:e=>t("elements",e,"caption")}),n.caption&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0 mt10",children:(0,x.__)("Placement","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.style||"overlay-center",onChange:e=>t("caption",e,"style"),children:AE.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),"below"!==o.style&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show on Hover Only","b-blocks"),checked:o.onHover,onChange:e=>t("caption",e,"onHover")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Caption Length","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",value:n.captionLength,onChange:e=>t("elements",parseInt(e,10)||0,"captionLength"),min:0})]}),(0,l.jsx)("small",{children:(0,x.__)("Zero shows the whole caption.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Remove Hashtags","b-blocks"),checked:n.stripHashtags,onChange:e=>t("elements",e,"stripHashtags")}),!n.stripHashtags&&(0, |
| 481 |
l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Link Hashtags","b-blocks"),checked:n.linkHashtags,onChange:e=>t("elements",e,"linkHashtags"),help:(0,x.__)("Each hashtag opens its Instagram tag page.","b-blocks")})]})]})},aP=({attributes:e,updateObj:t,device:n="desktop"})=>{const{grid:o={}}=e,i=(e,i)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.[i]||"",onChange:e=>t("grid",e,n,i),units:[Ee(),Pe(),Ae(),Be()]})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Grid","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(v,{className:"mb0",children:[(0,x.__)("Columns","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:parseInt(o?.[n]?.columns,10)||1,onChange:e=>t("grid",e,n,"columns"),min:1,max:8}),i((0,x.__)("Column Gap","b-blocks"),"columnGap"),i((0,x.__)("Row Gap","b-blocks"),"rowGap"),(0,l.jsxs)(v,{className:"mb0 mt20",children:[(0,x.__)("Tile Shape","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.SelectControl,{value:o?.[n]?.ratio??("desktop"===n?"1/1":""),options:"desktop"===n?IE:[{label:(0,x.__)("Inherit","b-blocks"),value:""},...IE],onChange:e=>t("grid",e,n,"ratio")}),(0,l.jsx)("small",{children:(0,x.__)("Original keeps each post at its own proportions, so rows will not line up.","b-blocks")})]})},rP=({attributes:e,updateObj:t})=>{const{elements:n={},lightbox:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Interaction","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open In Lightbox","b-blocks"),checked:n.lightbox,onChange:e=>t("elements",e,"lightbox"),help:(0,x.__)("Off, a tile links straight to the post on Instagram.","b-blocks")}),n.lightbox?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Profile In Lightbox","b-blocks"),checked:o.showProfile,onChange:e=>t("lightbox",e,"showProfile")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Caption In Lightbox","b-blocks"),checked:o.showCaption,onChange:e=>t("lightbox",e,"showCaption")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Instagram Link","b-blocks"),checked:o.showLink,onChange:e=>t("lightbox",e,"showLink")})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Link To Instagram","b-blocks"),checked:n.linkPosts,onChange:e=>t("elements",e,"linkPosts")}),n.linkPosts&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open In New Tab","b-blocks"),checked:n.openInNewTab,onChange:e=>t("elements",e,"openInNewTab")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Video & Album Icon","b-blocks"),checked:n.mediaIcon,onChange:e=>t("elements",e,"mediaIcon"),help:(0,x.__)("Marks which tiles are reels or multi-photo posts.","b-blocks")})]})},lP=({attributes:e,updateObj:t})=>{const{elements:n={},profile:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Profile","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Profile","b-blocks"),checked:n.profile,onChange:e=>t("elements",e,"profile")}),n.profile&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Photo","b-blocks"),checked:n.profilePhoto,onChange:e=>t("elements",e,"profilePhoto")}),n.profilePhoto&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Fallback Photo","b-blocks")}),(0,l.jsx)(ve,{value:o.photo,types:["image"],onChange:e=>t("profile",e,"photo"),placeholder:(0,x.__)("Upload Profile Picture","b-blocks")}),(0,l.jsx)("small",{children:(0,x.__)("Used only when Instagram returns no picture for the account.","b-blocks")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Name","b-blocks"),checked:n.profileName,onChange:e=>t("elements",e,"profileName")}),n.profileName&&(0,l.jsx)(y.TextControl,{className:"mt10",value:o.nameText||"",onChange:e=>t("profile",e,"nameText"),placeholder:(0,x.__)("Display name","b-blocks"),help:(0,x.__)("Shown only when the account itself returns no name.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Biography","b-blocks"),checked:n.profileBio,onChange:e=>t("elements",e,"profileBio")}),n.profileBio&&(0,l.jsx)(y.TextControl,{className:"mt10",value:o.bioText||"",onChange:e=>t("profile",e,"bioText"),placeholder:(0,x.__)("Short bio","b-blocks"),help:(0,x.__)("Shown only when the account itself returns no biography.","b-blocks")})]})]})},cP=({attributes:e,updateObj:t,group:n,title:o,size:i=14,device:s="desktop"})=>{const a=e?.[n]||{},r=(e,t)=>{const n=a?.[e]||{},o=n?.[t]??("normal"===e?a?.[t]:void 0);return void 0!==o?.[s]?o[s]:"desktop"!==s||!o||void 0===o.top&&void 0===o.right?{}:o},c=(e,o,i)=>{const r=a?.[e]?.[o]||("normal"===e?a?.[o]:void 0);!r||void 0!==r.desktop||void 0===r.top&&void 0===r.right?t(n,i,e,o,s):t(n,{desktop:"desktop"===s?i:r,tablet:"tablet"===s?i:{top:"",right:"",bottom:"",left:""},mobile:"mobile"===s?i:{top:"",right:"",bottom:"",left:""}},e,o)};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:o,initialOpen:!1,children:[(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:a.typo,onChange:e=>t(n,e,"typo"),defaults:{fontSize:{desktop:i}}}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:EE,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:OE(e.name,(0,x.__)("Color","b-blocks")),value:a?.[e.name]?.color,onChange:o=>t(n,o,e.name,"color")}),(0,l.jsx)(An,{className:"mt10",label:OE(e.name,(0,x.__)("Background","b-blocks")),value:a?.[e.name]?.background,onChange:o=>t(n,o,e.name,"background")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:OE(e.name,(0,x.__)("Border","b-blocks")),value:a?.[e.name]?.border,onChange:o=>t(n,o,e.name,"border")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[OE(e.name,(0,x.__)("Padding","b-blocks"))," ",(0,l.jsx)(_,{})]}),values:r(e.name,"padding"),onChange:t=>c(e.name,"padding",t)}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[OE(e.name,(0,x.__)("Border Radius","b-blocks"))," ",(0,l.jsx)(_,{})]}),values:r(e.name,"radius"),onChange:t=>c(e.name,"radius",t)}),(0,l.jsx)(yt,{className:"mt10",label:OE(e.name,(0,x.__)("Box Shadow","b-blocks")),value:a?.[e.name]?.shadow||("normal"===e.name?a?.shadow:[])||[],onChange:o=>t(n,o,e.name,"shadow")})]})})]})},dP=({attributes:e,updateObj:t,device:n="desktop"})=>{const{elements:o={},caption:i={}}=e;return o.caption?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i.color,onChange:e=>t("caption",e,"color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hashtag Color","b-blocks"),value:i.linkColor,onChange:e=>t("caption",e,"linkColor")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:i.background,onChange:e=>t("caption",e,"background")}),(0,l.jsx)(v,{className:"mb0 mt20",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.align||"",onChange:e=>t("caption",e,"align"),children:BE.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:(()=>{const e=i?.padding;return void 0!==e?.[n]?e[n]:"desktop"!==n||!e||void 0===e.top&&void 0===e.right?{}:e})(),onChange:e=>{const o=i?.padding;!o||void 0!==o.desktop||void 0===o.top&&void 0===o.right?t("caption",e,"padding",n):t("caption",{desktop:"desktop"===n?e:o,tablet:"tablet"===n?e:{top:"",right:"",bottom:"",left:""},mobile:"mobile"===n?e:{top:"", |
| 482 |
right:"",bottom:"",left:""}},"padding")}}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typo,onChange:e=>t("caption",e,"typo"),defaults:{fontSize:{desktop:15}}})]}):null},uP=({attributes:e,updateObj:t,device:n="desktop"})=>{const{item:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Item","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Hover Effect","b-blocks"),labelPosition:"edge",value:o.hoverEffect||"none",options:PE,onChange:e=>t("item",e,"hoverEffect")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("item",e,n,"radius")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Overlay","b-blocks"),value:o.overlayColor,onChange:e=>t("item",e,"overlayColor")}),(0,l.jsx)("small",{children:(0,x.__)("A tint drawn over the photo while the pointer is on it.","b-blocks")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("item",e,"border")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:o.shadow,onChange:e=>t("item",e,"shadow")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Media Icon Color","b-blocks"),value:o.iconColor,onChange:e=>t("item",e,"iconColor")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Media Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.iconSize??("desktop"===n&&o.iconSize||""),onChange:e=>t("item",e,n,"iconSize"),units:[Ee(),Ae(),Be()]})]})]})},pP=({attributes:e,updateObj:t})=>{const{elements:n={},lightbox:o={}}=e;return n.lightbox?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Lightbox","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Backdrop","b-blocks"),value:o.backdrop,onChange:e=>t("lightbox",e,"backdrop")}),(0,l.jsx)("small",{children:(0,x.__)("A translucent colour keeps the page visible behind the post.","b-blocks")}),(0,l.jsx)(v,{className:"mb0 mt20",children:(0,x.__)("Close Button","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:EE,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:OE(e.name,(0,x.__)("Icon Color","b-blocks")),value:"normal"===e.name?o.closeColor:o.closeHoverColor,onChange:n=>t("lightbox",n,"normal"===e.name?"closeColor":"closeHoverColor")}),(0,l.jsx)(Ue,{className:"mt10",label:OE(e.name,(0,x.__)("Background Color","b-blocks")),value:"normal"===e.name?o.closeBg:o.closeHoverBg,onChange:n=>t("lightbox",n,"normal"===e.name?"closeBg":"closeHoverBg")})]})}),(0,l.jsx)(v,{className:"mb0 mt20",children:(0,x.__)("Navigation Buttons (Prev / Next)","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:EE,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:OE(e.name,(0,x.__)("Icon Color","b-blocks")),value:"normal"===e.name?o.navColor:o.navHoverColor,onChange:n=>t("lightbox",n,"normal"===e.name?"navColor":"navHoverColor")}),(0,l.jsx)(Ue,{className:"mt10",label:OE(e.name,(0,x.__)("Background Color","b-blocks")),value:"normal"===e.name?o.navBg:o.navHoverBg,onChange:n=>t("lightbox",n,"normal"===e.name?"navBg":"navHoverBg")})]})})]}):null},hP=({attributes:e,updateObj:t,device:n="desktop"})=>{const{elements:o={},profile:i={}}=e;return o.profile?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Profile","b-blocks"),initialOpen:!1,children:[o.profilePhoto&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Photo Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",isUnitSelectTabbable:!0,value:i?.[n]?.photoSize??("desktop"===n&&i.photoSize||""),onChange:e=>t("profile",e,n,"photoSize"),units:[Ee(),Ae(),Be()]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Header Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",isUnitSelectTabbable:!0,value:i?.[n]?.gap??("desktop"===n&&i.gap||""),onChange:e=>t("profile",e,n,"gap"),units:[Ee(),Pe(),Ae(),Be()]})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Username Color","b-blocks"),value:i.usernameColor,onChange:e=>t("profile",e,"usernameColor")}),o.profileName&&(0,l.jsx)(Ue,{label:(0,x.__)("Name Color","b-blocks"),value:i.nameColor,onChange:e=>t("profile",e,"nameColor")}),o.profileBio&&(0,l.jsx)(Ue,{label:(0,x.__)("Biography Color","b-blocks"),value:i.bioColor,onChange:e=>t("profile",e,"bioColor")}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Username Typography","b-blocks"),value:i.usernameTypo,onChange:e=>t("profile",e,"usernameTypo"),defaults:{fontSize:{desktop:18}}}),(o.profileName||o.profileBio)&&(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Name & Bio Typography","b-blocks"),value:i.metaTypo,onChange:e=>t("profile",e,"metaTypo"),defaults:{fontSize:{desktop:14}}})]}):null},gP=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(uP,{...e}),(0,l.jsx)(dP,{...e}),(0,l.jsx)(hP,{...e}),e.attributes?.elements?.followButton&&(0,l.jsx)(cP,{...e,group:"followBtn",title:(0,x.__)("Follow Button","b-blocks"),size:13}),e.attributes?.elements?.loadMore&&(0,l.jsx)(cP,{...e,group:"loadMoreBtn",title:(0,x.__)("Load More Button","b-blocks"),size:14}),(0,l.jsx)(pP,{...e})]}),mP=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:LE,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(oP,{...e}),(0,l.jsx)(aP,{...e}),(0,l.jsx)(lP,{...e}),(0,l.jsx)(sP,{...e}),(0,l.jsx)(iP,{...e}),(0,l.jsx)(rP,{...e})]}),"style"===t.name&&(0,l.jsx)(gP,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},bP=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{blockId:i}=t,s="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,a=fe(t,n),r=window.bBlocksCursorDataConfig?.nonce,{data:c,isLoading:d}=_d("bblocks_api_keys",{_wpnonce:r},!0),[u,p]=(0,m.useState)("");(0,m.useEffect)((()=>{p(c?.instagram?.key||"")}),[c,d]);const g=o.slice(0,12);(0,m.useEffect)((()=>{i!==g&&n({blockId:g})}),[g]);const b=`block-${o}`,f=(0,h.useBlockProps)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(mP,{...e,updateObj:a,isPremium:s,instagramKey:u}),(0,l.jsxs)("div",{...f,children:[(0,l.jsx)(nP,{attributes:t,id:b,isBackend:!0}),!d&&!u&&(0,l.jsxs)(js,{status:"warning",isIcon:!1,className:"mb10",children:[(0,x.__)("Add your Instagram Access Token in ","b-blocks"),(0,l.jsx)("a",{href:vn,target:"_blank",rel:"noopener noreferrer",children:(0,x.__)("Dashboard → Settings → API Integrations","b-blocks")}),(0,x.__)(" to load your feed.","b-blocks")]}),(0,l.jsx)("div",{children:(0,l.jsx)(tP,{attributes:t,id:b,isBackend:!0})})]})]})}));(0,p.registerBlockType)($E,{icon:ml,edit:bP,save:()=>null}) |
| 483 |
;const fP=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/interactive-checklist","title":"Interactive Checklist","category":"bBlocks","description":"A titled checklist of tickable items that visitors can check off, with their progress remembered in the browser via localStorage, an optional live completion indicator, and a reset button. Works without JavaScript using native checkbox inputs.","keywords":["checklist","todo","to-do","task list","tick list","interactive checklist","progress checklist","setup checklist","steps","tasks"],"textdomain":"b-blocks","attributes":{"heading":{"type":"object","default":{"text":"Your Checklist","tag":"h3","color":"#1a1a1a","typography":{"fontSize":{"desktop":"20px","tablet":"","mobile":""},"fontWeight":700},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""}}},"items":{"type":"array","default":[{"id":"item-1","label":"First item","checked":false},{"id":"item-2","label":"Second item","checked":false},{"id":"item-3","label":"Third item","checked":false}]},"checkbox":{"type":"object","default":{"style":"square","size":"20px","accent":"#4f46e5","checkColor":"#ffffff"}},"item":{"type":"object","default":{"color":"#1a1a1a","typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":400},"gap":"12px","strike":false}},"progress":{"type":"object","default":{"show":true,"typography":{"fontSize":{"desktop":"12px","tablet":"","mobile":""},"fontWeight":600},"height":"6px","trackBg":{"type":"solid","color":""},"fillBg":{"type":"solid","color":""}}},"reset":{"type":"object","default":{"show":true}},"persistKey":{"type":"string","default":""},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"24px","right":"28px","bottom":"24px","left":"28px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"12px","right":"12px","bottom":"12px","left":"12px"},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"color":"#e5e7eb","style":"solid","width":"1px"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),xP=({attributes:e,id:t,isBackend:n=!1})=>{const{heading:o={},checkbox:i={},item:s={},progress:a={},advanced:r}=e,c=i.accent||"#4f46e5",d=i.size||"20px",u=a.typography?.fontSize?.desktop||"12px",p=`#${t} .bBlocks-interactive-checklist-wrapper`,h=`${p} .bBlocks-interactive-checklist-heading`,g=`${p} .bBlocks-interactive-checklist-progress-text`,m=`${p} .bBlocks-interactive-checklist-progress-track`,b=`${p} .bBlocks-interactive-checklist-progress-fill`,f=`${p} .bBlocks-interactive-checklist-list`,x=`${p} .bBlocks-interactive-checklist-item`,y=`${p} .bBlocks-interactive-checklist-label`,v=`${p} .bBlocks-interactive-checklist-checkbox`,k=`${p} .bBlocks-interactive-checklist-box`,w=`${p} .bBlocks-interactive-checklist-reset`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${pa("",o.typography).googleFontLink}\n\t\t\t${pa("",s.typography).googleFontLink}\n\t\t\t${p}{\n\t\t\t\t${na("color",s.color)}\n\t\t\t}\n\t\t\t${pa(h,o.typography).styles}\n\t\t\t${h}{\n\t\t\t\t${na("color",o.color)}\n\t\t\t\t${oa(o.bg)}\n\t\t\t\t${sa(o.border)}\n\t\t\t\t${na("border-radius",ha(o.borderRadius))}\n\t\t\t\t${na("padding",ha(o.padding))}\n\t\t\t}\n\t\t\t${pa("",a.typography).googleFontLink}\n\t\t\t${pa(g,a.typography).styles}\n\t\t\t${m}{\n\t\t\t\t${na("height",a.height)}\n\t\t\t\t${oa(a.trackBg)}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\t${a.fillBg?.color||a.fillBg?.gradient||a.fillBg?.image?.url?oa(a.fillBg):`background: ${c};`}\n\t\t\t}\n\t\t\t${f}{ gap: ${s.gap||"12px"}; }\n\t\t\t${pa(y,s.typography).styles}\n\t\t\t${y}{\n\t\t\t\t${na("color",s.color)}\n\t\t\t\tpadding-left: calc(${d} + 12px);\n\t\t\t}\n\t\t\t${v}{ width: ${d}; height: ${d}; }\n\t\t\t${k}{\n\t\t\t\twidth: ${d};\n\t\t\t\theight: ${d};\n\t\t\t\tborder-color: ${c};\n\t\t\t}\n\t\t\t${k}::after{\n\t\t\t\t${na("background-color",i.checkColor)}\n\t\t\t}\n\t\t\t${v}:checked + .bBlocks-interactive-checklist-box,\n\t\t\t${x}.is-checked .bBlocks-interactive-checklist-box{\n\t\t\t\tbackground: ${c};\n\t\t\t\tborder-color: ${c};\n\t\t\t}\n\t\t\t${v}:focus-visible + .bBlocks-interactive-checklist-box{\n\t\t\t\toutline: 2px solid ${c};\n\t\t\t\toutline-offset: 2px;\n\t\t\t}\n\t\t\t${w}{\n\t\t\t\tcolor: ${c};\n\t\t\t\tfont-size: ${u};\n\t\t\t}\n\t\t\t${w}:focus-visible{ outline: 2px solid ${c}; }\n\t\t\t${_a(t,r,n,!1)}\n\t\t\t`}})},yP=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],vP=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],kP=[{label:(0,x.__)("H2","b-blocks"),value:"h2"},{label:(0,x.__)("H3","b-blocks"),value:"h3"},{label:(0,x.__)("H4","b-blocks"),value:"h4"}],wP=[{label:(0,x.__)("Square","b-blocks"),value:"square"},{label:(0,x.__)("Round","b-blocks"),value:"round"}],_P=((0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Right","b-blocks"),e=>{const{attributes:t,updateObj:n,index:o}=e,i=t.items[o]||{};return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Label","b-blocks"),value:i.label||"",onChange:e=>n("items",e,o,"label"),placeholder:(0,x.__)("Checklist item","b-blocks"),__nextHasNoMarginBottom:!0})})}),CP=({attributes:e,setAttributes:t,updateObj:n})=>{const{heading:o={},progress:i={},reset:s={},item:a={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Heading text","b-blocks"),value:o.text||"",onChange:e=>n("heading",e,"text"),placeholder:(0,x.__)("Your Checklist","b-blocks"),help:(0,x.__)("Leave empty to hide the heading.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{ |
| 484 |
className:"flex2",children:(0,x.__)("Heading tag","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:o.tag||"h3",options:kP,onChange:e=>n("heading",e,"tag"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show progress line","b-blocks"),checked:!1!==i.show,onChange:e=>n("progress",e,"show"),help:(0,x.__)('Live "N of M complete" indicator and progress bar.',"b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show reset button","b-blocks"),checked:!1!==s.show,onChange:e=>n("reset",e,"show"),help:(0,x.__)("Lets visitors clear their saved progress.","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Checklist items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mb10",label:(0,x.__)("Strike checked items","b-blocks"),checked:!!a.strike,onChange:e=>n("item",e,"strike"),help:(0,x.__)("Line-through and dim items once checked.","b-blocks")}),(0,l.jsx)(_s,{attributes:e,setAttributes:t,updateObj:n,newItem:{id:`item-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,label:(0,x.__)("New item","b-blocks"),checked:!1},design:"sortable",itemLabel:"Item",arrKey:"items",title:"label",ItemSettings:_P})]})]})},jP={top:"",right:"",bottom:"",left:""},$P=({attributes:e,updateObj:t})=>{const{heading:n={},checkbox:o={},item:i={},progress:s={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Heading","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:n.color||"#1a1a1a",onChange:e=>t("heading",e,"color"),defaultColor:"#1a1a1a"}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typography||{},onChange:e=>t("heading",e,"typography")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:n.bg,onChange:e=>t("heading",e,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:n.border,onChange:e=>t("heading",e||{},"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),units:yP,values:n.borderRadius,resetValues:jP,onChange:e=>t("heading",e,"borderRadius")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Padding","b-blocks"),units:yP,values:n.padding,resetValues:jP,onChange:e=>t("heading",e,"padding")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Checkbox","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Style:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:o.style||"square",options:wP,onChange:e=>t("checkbox",e,"style")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",units:yP,isUnitSelectTabbable:!0,value:o.size||"20px",onChange:e=>t("checkbox",e,"size")})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Accent color:","b-blocks"),value:o.accent,onChange:e=>t("checkbox",e,"accent"),defaultColor:"#4f46e5"}),(0,l.jsx)(Ue,{label:(0,x.__)("Check mark color:","b-blocks"),value:o.checkColor,onChange:e=>t("checkbox",e,"checkColor"),defaultColor:"#ffffff"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text color:","b-blocks"),value:i.color||"#1a1a1a",onChange:e=>t("item",e,"color"),defaultColor:"#1a1a1a"}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typography||{},onChange:e=>t("item",e,"typography")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Gap between items","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",units:yP,isUnitSelectTabbable:!0,value:i.gap,onChange:e=>t("item",e,"gap")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Progress","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:s.typography||{},defaults:{fontSize:{desktop:"12px"}},onChange:e=>t("progress",e,"typography")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Track Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",units:yP,isUnitSelectTabbable:!0,value:s.height||"6px",onChange:e=>t("progress",e,"height")})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Track Background","b-blocks"),value:s.trackBg,onChange:e=>t("progress",e,"trackBg")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Progress Fill Background","b-blocks"),value:s.fillBg,onChange:e=>t("progress",e,"fillBg")})]})]})},SP=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:vP,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(CP,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)($P,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})},TP="bBlocks-interactive-checklist",MP=["h2","h3","h4"],NP=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{heading:s={},items:a=[],checkbox:r={},item:c={},progress:d={},reset:u={},persistKey:p}=t,g=bBlocksPremiumChecker,b=fe(t,n),[f,v]=(0,m.useState)({});(0,m.useEffect)((()=>{p||n({persistKey:`cl-${o.slice(0,8)}`})}),[p,o,n]);const k="round"===r.style?"round":"square",w=!0===c.strike,_=MP.includes(s.tag)?s.tag:"h3",C=a.length,j=a.filter((e=>e&&f[e.id])).length,$=C>0?Math.round(j/C*100):0,S=[`${TP}-wrapper`,`${TP}-checkbox-${k}`,w?`${TP}-has-strike`:""].filter(Boolean).join(" "),T=(e,t)=>{if(t<0||t>=a.length)return;const o=a.slice(),[i]=o.splice(e,1);o.splice(t,0,i),n({items:o})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(SP,{attributes:t,setAttributes:n,updateObj:b,isPremium:g,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(xP,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:S,children:[(0,l.jsx)(h.RichText,{tagName:_,className:`${TP}-heading`,value:s.text||"",onChange:e=>b("heading",e,"text"),placeholder:(0,x.__)("Your Checklist","b-blocks"),allowedFormats:["core/bold","core/italic"]}),!1!==d.show&&C>0&&(0,l.jsxs)("div",{className:`${TP}-progress`,children:[(0,l.jsx)("p",{className:`${TP}-progress-text`,children:(0,x.sprintf)(/* translators: 1: done, 2: total */ /* translators: 1: done, 2: total */(0,x.__)("%1$s of %2$s complete","b-blocks"),j,C)}),(0,l.jsx)("div",{className:`${TP}-progress-track`,"aria-hidden":"true",children:(0,l.jsx)("span",{className:`${TP}-progress-fill`,style:{width:`${$}%`}})})]}),0===C?(0,l.jsx)("p",{className:`${TP}-empty`,children:(0,x.__)("No checklist items yet. Add the first one from the sidebar.","b-blocks")}):(0,l.jsx)("ul",{className:`${TP}-list`,children:a.map(((e,t)=>{const o=!(!e||!f[e.id]);return(0,l.jsx)("li",{className:`${TP}-item ${o?"is-checked":""}`,children:(0,l.jsxs)("div",{className:`${TP}-label`,children:[(0,l.jsx)("input",{type:"checkbox",className:`${TP}-checkbox`,checked:o,onChange:()=>{},onClick:t=>{var n;t.stopPropagation(),n=e.id,v((e=>({...e,[n]:!e[n]})))}}),(0,l.jsx)("span",{className:`${TP}-box`,"aria-hidden":"true"}),(0,l.jsx)(h.RichText,{tagName:"span",className:`${TP}-text`,value:e&&e.label||"",onChange:e=>{return o=t,i="label",s=e,void n({items:a.map(((e,t)=>t===o?{...e||{},[i]:s}:e))});var o,i,s},placeholder:(0,x.__)("Checklist item","b-blocks"),allowedFormats:[]}),(0,l.jsxs)("div",{className:`${TP}-editor-item-actions`,children:[(0,l.jsx)(y.Button,{variant:"tertiary", |
| 485 |
size:"small",icon:"arrow-up-alt2",label:(0,x.__)("Move item up","b-blocks"),onClick:()=>T(t,t-1),disabled:0===t}),(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-down-alt2",label:(0,x.__)("Move item down","b-blocks"),onClick:()=>T(t,t+1),disabled:t===a.length-1}),(0,l.jsx)(y.Button,{variant:"tertiary",isDestructive:!0,size:"small",icon:"trash",label:(0,x.__)("Remove item","b-blocks"),onClick:()=>{return e=t,n({items:a.filter(((t,n)=>n!==e))});var e}})]})]})},e&&e.id||t)}))}),!1!==u.show&&C>0&&(0,l.jsx)("button",{type:"button",className:`${TP}-reset`,disabled:!0,children:(0,x.__)("Reset progress","b-blocks")})]})})]})]})}));Nl(fP.name)&&(0,p.registerBlockType)(fP,{icon:nl,edit:NP,save:()=>null});const LP=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/key-takeaways","title":"Key Takeaways","category":"bBlocks","description":"A titled summary card listing the most important points of an article as a checkmark, numbered, or bullet list. Built for the blog \\"Key Takeaways\\" / \\"TL;DR\\" pattern with heading, accent color, icon, and full typography controls.","keywords":["key takeaways","takeaways","summary","tldr","tl;dr","highlights","key points","summary box","styled box","notification box"],"textdomain":"b-blocks","attributes":{"heading":{"type":"object","default":{"text":"Key Takeaways","tag":"h3","color":"#F4F7FF","bg":{"type":"solid","color":"#0d6efd"},"typography":{"fontSize":{"desktop":"18px","tablet":"","mobile":""},"fontWeight":700},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"border":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}}}},"list":{"type":"object","default":{"style":"check","showIcon":true,"gap":"10px"}},"items":{"type":"array","default":[{"text":"Summarize your first key point here.","icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\\"/></svg>"},{"text":"Add the second takeaway readers should remember.","icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\\"/></svg>"},{"text":"Close with a final actionable insight.","icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\\"/></svg>"}]},"icon":{"type":"object","default":{"color":"#000000","size":"18px","border":{},"bg":{"type":"solid","color":""},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}}}},"item":{"type":"object","default":{"color":"#1e293b","bg":{"type":"solid","color":""},"typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":400},"border":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),EP=(e,t,n)=>{if(e){if(e[t]&&void 0!==e[t][n])return e[t][n];if("radius"===n){if(e[t]&&void 0!==e[t].borderRadius)return e[t].borderRadius;if(void 0!==e.radius)return e.radius;if(void 0!==e.borderRadius)return e.borderRadius}return void 0!==e[n]?e[n]:void 0}},PP=({attributes:e,id:o,isBackend:i=!1})=>{const{heading:s={},list:a={},icon:r={},item:c={},advanced:d}=e,u=r.color||"#ffffff",p=r.size||"18px",h=c.typography?.fontSize?.desktop||"16px",g=`#${o} .bBlocks-key-takeaways-wrapper`,m=`${g} .bBlocks-key-takeaways-heading`,b=`${g} .bBlocks-key-takeaways-list`,f=`${g} .bBlocks-key-takeaways-item`,x=`${g} .bBlocks-key-takeaways-icon`,y=`${g} .bBlocks-key-takeaways-num`,v=`${g} .bBlocks-key-takeaways-bullet`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{ |
| 486 |
__html:`\n\t\t\t${pa("",s.typography).googleFontLink}\n\t\t\t${pa("",c.typography).googleFontLink}\n\t\t\t${pa(m,s.typography).styles}\n\t\t\t${m}{\n\t\t\t\t${na("color",s.color)}\n\t\t\t\t${oa(s.bg)}\n\t\t\t\t${na("padding",ha(EP(s,"desktop","padding")))}\n\t\t\t\t${na("margin",ha(EP(s,"desktop","margin")))}\n\t\t\t\t${sa(s.border)}\n\t\t\t\t${na("border-radius",ha(EP(s,"desktop","radius")))}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\t${na("gap","number"==typeof a.gap?`${a.gap}px`:a.gap||"10px")}\n\t\t\t}\n\t\t\t${pa(f,c.typography).styles}\n\t\t\t${f}{\n\t\t\t\t${na("color",c.color)}\n\t\t\t\t${oa(c.bg)}\n\t\t\t\t${na("padding",ha(EP(c,"desktop","padding")))}\n\t\t\t\t${na("margin",ha(EP(c,"desktop","margin")))}\n\t\t\t\t${sa(c.border)}\n\t\t\t\t${na("border-radius",ha(EP(c,"desktop","radius")))}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\tcolor: ${u};\n\t\t\t\tfont-size: ${p};\n\t\t\t\tmin-height: calc(${h} * 1.5);\n\t\t\t\t${oa(r.bg)}\n\t\t\t\t${na("padding",ha(EP(r,"desktop","padding")))}\n\t\t\t\t${na("margin",ha(EP(r,"desktop","margin")))}\n\t\t\t\t${sa(r.border)}\n\t\t\t\t${na("border-radius",ha(EP(r,"desktop","radius")))}\n\t\t\t}\n\t\t\t${x}>svg{\n\t\t\t\t${na("height",r.size)}\n\t\t\t\t${na("width",r.size)}\n\t\t\t\t${na("fill",u)}\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\twidth: calc(${p} + 10px);\n\t\t\t\theight: calc(${p} + 10px);\n\t\t\t\tcolor: ${u};\n\t\t\t\tfont-size: calc(${p} * 0.8);\n\t\t\t\t${oa(r.bg)}\n\t\t\t\t${sa(r.border)}\n\t\t\t\t${na("border-radius",ha(EP(r,"desktop","radius")))}\n\t\t\t}\n\t\t\t${v}{\n\t\t\t\twidth: calc(${p} * 0.45);\n\t\t\t\theight: calc(${p} * 0.45);\n\t\t\t\t${oa(r.bg)}\n\t\t\t\t${sa(r.border)}\n\t\t\t\t${na("border-radius",ha(EP(r,"desktop","radius")))}\n\t\t\t}\n\t\t\t${t}{\n\t\t\t\t${m}{\n\t\t\t\t\t${na("padding",ha(EP(s,"tablet","padding")))}\n\t\t\t\t\t${na("margin",ha(EP(s,"tablet","margin")))}\n\t\t\t\t\t${na("border-radius",ha(EP(s,"tablet","radius")))}\n\t\t\t\t}\n\t\t\t\t${f}{\n\t\t\t\t\t${na("padding",ha(EP(c,"tablet","padding")))}\n\t\t\t\t\t${na("margin",ha(EP(c,"tablet","margin")))}\n\t\t\t\t\t${na("border-radius",ha(EP(c,"tablet","radius")))}\n\t\t\t\t}\n\t\t\t\t${x}{\n\t\t\t\t\t${na("padding",ha(EP(r,"tablet","padding")))}\n\t\t\t\t\t${na("margin",ha(EP(r,"tablet","margin")))}\n\t\t\t\t\t${na("border-radius",ha(EP(r,"tablet","radius")))}\n\t\t\t\t}\n\t\t\t}\n\t\t\t${n}{\n\t\t\t\t${m}{\n\t\t\t\t\t${na("padding",ha(EP(s,"mobile","padding")))}\n\t\t\t\t\t${na("margin",ha(EP(s,"mobile","margin")))}\n\t\t\t\t\t${na("border-radius",ha(EP(s,"mobile","radius")))}\n\t\t\t\t}\n\t\t\t\t${f}{\n\t\t\t\t\t${na("padding",ha(EP(c,"mobile","padding")))}\n\t\t\t\t\t${na("margin",ha(EP(c,"mobile","margin")))}\n\t\t\t\t\t${na("border-radius",ha(EP(c,"mobile","radius")))}\n\t\t\t\t}\n\t\t\t\t${x}{\n\t\t\t\t\t${na("padding",ha(EP(r,"mobile","padding")))}\n\t\t\t\t\t${na("margin",ha(EP(r,"mobile","margin")))}\n\t\t\t\t\t${na("border-radius",ha(EP(r,"mobile","radius")))}\n\t\t\t\t}\n\t\t\t}\n\t\t\t${_a(o,d,i,!1)}\n\t\t\t`}})},AP=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],BP=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],IP=[{label:(0,x.__)("H2","b-blocks"),value:"h2"},{label:(0,x.__)("H3","b-blocks"),value:"h3"},{label:(0,x.__)("H4","b-blocks"),value:"h4"}],OP=[{label:(0,x.__)("Checkmark icons","b-blocks"),value:"check"},{label:(0,x.__)("Numbered (1 2 3 …)","b-blocks"),value:"numbered"},{label:(0,x.__)("Plain bullet","b-blocks"),value:"bullet"}],RP=((0,x.__)("Regular (400)","b-blocks"),(0,x.__)("Medium (500)","b-blocks"),(0,x.__)("Semibold (600)","b-blocks"),(0,x.__)("Bold (700)","b-blocks"),(0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),e=>{const{attributes:t,updateObj:n,index:o}=e,i=t.items[o]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextareaControl,{label:(0,x.__)("Takeaway text","b-blocks"),value:i.text||"",onChange:e=>n("items",e,o,"text"),placeholder:(0,x.__)("Summarize a key point…","b-blocks"),rows:2,__nextHasNoMarginBottom:!0}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Icon","b-blocks"),value:i.icon,onChange:e=>n("items",e,o,"icon")})]})}),zP=({attributes:e,setAttributes:t,updateObj:n})=>{const{heading:o={},list:i={}}=e,s=i.style||"check",a=!1!==i.showIcon,r={text:(0,x.__)("New takeaway","b-blocks"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>'};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Heading text","b-blocks"),value:o.text||"",onChange:e=>n("heading",e,"text"),placeholder:(0,x.__)("Key Takeaways","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Heading tag","b-blocks"),value:o.tag||"h3",labelPosition:"edge",options:IP,onChange:e=>n("heading",e,"tag"),help:(0,x.__)("Pick a level that fits the surrounding document outline.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("List style","b-blocks"),value:s,options:OP,onChange:e=>n("list",e,"style"),help:(0,x.__)("Checkmark and bullet render a <ul>; numbered renders a semantic <ol>.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show icon / number prefix","b-blocks"),checked:a,onChange:e=>n("list",e,"showIcon")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Takeaway items","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_s,{attributes:e,setAttributes:t,updateObj:n,newItem:r,design:"sortable",itemLabel:"Takeaway",arrKey:"items",title:"text",ItemSettings:RP})})]})},DP={top:"",right:"",bottom:"",left:""},FP=({attrKey:e,value:t={},updateObj:n,device:o})=>{const{bg:i={},border:s={}}=t,a=o||"desktop",r=t[a]?.padding||t.padding||{},c=t[a]?.margin||t.margin||{},d=t[a]?.radius||t[a]?.borderRadius||t.radius||t.borderRadius||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:i,onChange:t=>n(e,t,"bg")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),units:AP,values:r,resetValues:DP,onChange:t=>n(e,t,a,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),units:AP,values:c,resetValues:DP,onChange:t=>n(e,t,a,"margin")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:s,onChange:t=>n(e,t||{},"border")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),units:AP,values:d,resetValues:DP,onChange:t=>n(e,t,a,"radius")})]})},HP=({attributes:e,updateObj:t,device:n})=>{const{heading:o={},list:i={},icon:s={},item:a={}}=e,r=!1!==i.showIcon;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Heading","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text color:","b-blocks"),value:o.color||"#1e293b",onChange:e=>t("heading",e,"color"),defaultColor:"#1e293b"}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:o.typography,onChange:e=>t("heading",e,"typography")}),(0,l.jsx)(FP,{attrKey:"heading",value:o,updateObj:t,device:n})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Takeaway Items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text color:","b-blocks"),value:a.color||"#1e293b",onChange:e=>t("item",e,"color"),defaultColor:"#1e293b"}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"), |
| 487 |
value:a.typography,onChange:e=>t("item",e,"typography")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Items Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:AP,isUnitSelectTabbable:!0,value:"number"==typeof i.gap?`${i.gap}px`:i.gap||"10px",onChange:e=>t("list",e,"gap")})]}),(0,l.jsx)(FP,{attrKey:"item",value:a,updateObj:t,device:n})]}),r&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / number color:","b-blocks"),value:s.color||"#ffffff",onChange:e=>t("icon",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Icon / number size","b-blocks"),labelPosition:"edge",units:AP,isUnitSelectTabbable:!0,value:s.size||"18px",onChange:e=>t("icon",e,"size")}),(0,l.jsx)(FP,{attrKey:"icon",value:s,updateObj:t,device:n})]})]})},WP=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:BP,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(zP,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(HP,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})},UP=["h2","h3","h4"],GP=["check","numbered","bullet"],VP=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{heading:s={},list:a={},items:r=[]}=t,c=bBlocksPremiumChecker,d=fe(t,n),u=GP.includes(a.style)?a.style:"check",p=UP.includes(s.tag)?s.tag:"h3",g="numbered"===u?"ol":"ul",m=!1!==a.showIcon,b=["bBlocks-key-takeaways-wrapper",`bBlocks-key-takeaways-style-${u}`].filter(Boolean).join(" "),f=(e,t)=>{if(t<0||t>=r.length)return;const o=r.slice(),[i]=o.splice(e,1);o.splice(t,0,i),n({items:o})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(WP,{attributes:t,setAttributes:n,updateObj:d,isPremium:c,device:i}),(0,l.jsx)("div",{...(0,h.useBlockProps)(),children:(0,l.jsxs)("div",{children:[(0,l.jsx)(PP,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsxs)("div",{className:b,role:"region",children:[(0,l.jsx)(h.RichText,{tagName:p,className:"bBlocks-key-takeaways-heading",value:s.text||"",onChange:e=>d("heading",e,"text"),placeholder:(0,x.__)("Key Takeaways","b-blocks"),allowedFormats:["core/bold","core/italic"]}),(0,l.jsx)("div",{className:"bBlocks-key-takeaways-body",children:0===r.length?(0,l.jsx)("p",{className:"bBlocks-key-takeaways-empty",children:(0,x.__)("No takeaways yet. Add the first one from the sidebar.","b-blocks")}):(0,l.jsx)(g,{className:"bBlocks-key-takeaways-list",role:"list",children:r.map(((e,t)=>(0,l.jsxs)("li",{className:"bBlocks-key-takeaways-item",children:[m&&"check"===u&&(0,l.jsx)("span",{className:"bBlocks-key-takeaways-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:e&&e.icon||""}}),m&&"numbered"===u&&(0,l.jsx)("span",{className:"bBlocks-key-takeaways-num","aria-hidden":"true"}),m&&"bullet"===u&&(0,l.jsx)("span",{className:"bBlocks-key-takeaways-bullet","aria-hidden":"true"}),(0,l.jsx)(h.RichText,{tagName:"span",className:"bBlocks-key-takeaways-text",value:e&&e.text||"",onChange:e=>{return o=t,i="text",s=e,void n({items:r.map(((e,t)=>t===o?{...e||{},[i]:s}:e))});var o,i,s},placeholder:(0,x.__)("Takeaway text","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"]}),(0,l.jsxs)("div",{className:"bBlocks-key-takeaways-editor-item-actions",children:[(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-up-alt2",label:(0,x.__)("Move item up","b-blocks"),onClick:()=>f(t,t-1),disabled:0===t}),(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-down-alt2",label:(0,x.__)("Move item down","b-blocks"),onClick:()=>f(t,t+1),disabled:t===r.length-1}),(0,l.jsx)(y.Button,{variant:"tertiary",isDestructive:!0,size:"small",icon:"trash",label:(0,x.__)("Remove item","b-blocks"),onClick:()=>{return e=t,n({items:r.filter(((t,n)=>n!==e))});var e}})]})]},e&&e._key||t)))})})]})]})})]})}));Nl(LP.name)&&(0,p.registerBlockType)(LP,{icon:tl,edit:VP,save:()=>null});const qP=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/logo-slider","version":"1.0.0","title":"Logo Slider","category":"bBlocks","description":"Logo sliders are often used on websites and blogs to showcase a company\'s clients, partners, or sponsors.","keywords":["slider","logo","carousel","logo slider"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"options":{"type":"object","default":{"autoplay":true,"direction":"rightToLeft","speed":1000,"delay":1000,"loop":true,"logoView":{"desktop":4,"tablet":3,"mobile":2},"space":{"desktop":30,"tablet":25,"mobile":15},"navigation":true,"pagination":true,"dynamicPagination":false,"isCaptionVisible":false,"easing":"","isPauseOnHover":false}},"sliderStyles":{"type":"object","default":{"logo":{"hover":"none","border":{"color":"#000","width":"0px","style":"none"},"radius":{},"height":"130px","width":"100%","logoFitOption":"cover","padding":{"top":"","right":"","bottom":"","left":""}},"caption":{"hover":"visible","color":{"text":"#fff","bg":"#000"}}}},"logo":{"type":"array","default":[]},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"25px","right":"30px","bottom":"25px","left":"30px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":["file:./view.css","aos"],"render":"file:./render.php","viewScript":["file:./view.js","aos"]}'),YP=({attributes:e,id:t,isBackend:n=!1})=>{ |
| 488 |
const{sliderStyles:o,advanced:i}=e,{caption:s}=o,a=`#${t} .b-blocks-logo-slider-main-wrapper .b-blocks-logo-slider-wrapper`,r=`${a} .b-blocks-losl-logo`,c=`${a} .b-blocks-logo-slider-block-caption`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n ${a}{\n ${na("height",o.logo.height)}\n ${na("width",o.logo.width)}\n ${sa(o.logo.border)}\n ${na("padding",ha(o?.logo?.padding))}\n ${na("border-radius",ha(o.logo.radius))}\n }\n ${r}{\n ${na("object-fit",o.logo.logoFitOption)}\n ${na("border-radius",ha(o.logo.radius))}\n }\n ${c}{\n ${na("color",s.color.text)}\n ${na("background-color",s.color.bg)}\n }\n ${_a(`${t}>div`,i,n)}\n `}})},KP=function({setAttributes:e,attributes:t,activeIndex:n,setActiveIndex:o}){const{logo:i}=t;return(0,l.jsxs)(h.BlockControls,{children:[i.length>0&&(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{onSelect:t=>e({logo:t}),allowedTypes:["image/*"],value:i?.map((e=>e?.id)),render:({open:e})=>(0,l.jsx)("button",{onClick:e,children:"Add new logo"}),gallery:!0,multiple:!0})}),i?.length>0&&(0,l.jsxs)(y.ToolbarGroup,{children:[(0,l.jsx)(y.ToolbarItem,{disabled:0===n,icon:"arrow-left-alt2",onClick:()=>{const t=[...i],s=t.splice(n,1);t.splice(Number(n)-1,0,s[0]),e({logo:t}),o((e=>--e))},as:y.Button}),(0,l.jsx)(y.ToolbarItem,{disabled:n===i.length-1,icon:"arrow-right-alt2",onClick:()=>{const t=[...i],s=t.splice(n,1);t.splice(Number(n)+1,0,s[0]),e({logo:t}),o((e=>++e))},as:y.Button})]})]})},QP=[{label:"Default",value:""},{label:"Contain",value:"contain"},{label:"Cover",value:"cover"},{label:"Fill",value:"fill"},{label:"Scale Down",value:"scale-down"},{label:"Initial",value:"initial"},{label:"Inherit",value:"inherit"}],ZP=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],XP=[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Step Start","b-blocks"),value:"step-start"},{label:(0,x.__)("Step End","b-blocks"),value:"step-end"}],JP=({attributes:e,setAttributes:t,index:n})=>{const{logo:o}=e,i=o[n],s=(n,o,...i)=>{t({[n]:be(e[n],o,...i)})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(we,{width:"100%",height:"100%",label:(0,x.__)("Choose Logo","b-blocks"),value:i?.url?i:{url:kn},onChange:e=>s("logo",e,n)}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Alt","b-blocks"),value:i?.alt,onChange:e=>s("logo",e,n,"alt")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Caption","b-blocks"),value:i?.caption,onChange:e=>s("logo",e,n,"caption")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Link","b-blocks"),type:"url",value:i?.anchor,onChange:e=>s("logo",e,n,"anchor")})]})},eA=({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o})=>(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Logo","b-blocks"),initialOpen:!0,children:(0,l.jsx)(_s,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,newItem:{url:"",caption:"",alt:""},design:"sortable",itemLabel:"Logo",arrKey:"logo",ItemSettings:JP})}),tA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n})=>{const{options:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Autoplay","b-blocks"),checked:o.autoplay,value:o.autoplay,onChange:e=>t("options",e,"autoplay")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Slide Direction","b-blocks"),labelPosition:"edge",value:o.direction,options:[{value:"rightToLeft",label:"Right to Left"},{value:"leftToRight",label:"Left to Right"}],onChange:e=>t("options",e,"direction")}),o.autoplay&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pause On Hover","b-blocks"),checked:o?.isPauseOnHover,value:o?.isPauseOnHover,onChange:e=>t("options",e,"isPauseOnHover")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",value:o.easing,options:XP,onChange:e=>t("options",e,"easing")}),(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Show Navigation","b-blocks"),checked:o.navigation,onChange:e=>t("options",e,"navigation")}),(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Show Pagination","b-blocks"),checked:o.pagination,onChange:e=>t("options",e,"pagination")}),o.pagination&&(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Dynamic Pagination","b-blocks"),checked:o.dynamicPagination,onChange:e=>t("options",e,"dynamicPagination")}),(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Infinite Loop","b-blocks"),checked:o.loop,onChange:e=>t("options",e,"loop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Show Logo Caption","b-blocks"),checked:o.isCaptionVisible,onChange:e=>t("options",e,"isCaptionVisible")}),(0,l.jsx)(y.RangeControl,{className:"mt10 mb10",label:(0,x.__)("Slider Speed (ms)","b-blocks"),value:o.speed,step:.05,onChange:e=>t("options",e,"speed"),min:0,max:1e4}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Slider Delay Speed (ms)","b-blocks"),value:o.delay,step:.05,onChange:e=>t("options",e,"delay"),min:0,max:1e4}),(0,l.jsx)(y.RangeControl,{className:"mt10 mb10",label:(0,l.jsxs)(y.Flex,{children:["Logos Per View ",(0,l.jsx)(_,{})]}),value:o.logoView[n],onChange:e=>t("options",e,"logoView",n),step:1,min:1,max:20})]})})),nA=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(eA,{...e}),(0,l.jsx)(tA,{...e})]}),oA=function({attributes:e,updateObj:t}){const{sliderStyles:n}=e,{caption:o}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Logo Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Caption Visibility","b-blocks"),value:o.hover,options:[{value:"visible",label:"Always Visible"},{value:"hover",label:"Visible on Hover"}],onChange:e=>t("sliderStyles",e,"caption","hover")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o.color.text,onChange:e=>t("sliderStyles",e,"caption","color","text")}),(0,l.jsx)(Ue,{label:(0,x.__)("Background","b-blocks"),value:o.color.bg,onChange:e=>t("sliderStyles",e,"caption","color","bg")})]})},iA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((function({attributes:e,setAttributes:t,updateObj:n,device:o}){const{sliderStyles:i,options:s}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Logo Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Height","b-blocks"),value:i.logo.height,onChange:e=>n("sliderStyles",e,"logo","height"),max:i.logo.height.includes("%")?100:1e3,min:0}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Width","b-blocks"),value:i.logo.width,onChange:e=>n("sliderStyles",e,"logo","width"),max:i.logo.width.includes("%")?100:1e3,min:0}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:["Column Gap ",(0,l.jsx)(_,{})]}),value:s.space[o],onChange:e=>n("options",e,"space",o),step:1,min:1,max:200}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i?.logo?.padding,onChange:e=>n("sliderStyles",e,"logo","padding")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Logo Fit Options","b-blocks"),value:i.logo.logoFitOption,options:QP, |
| 489 |
onChange:e=>n("sliderStyles",e,"logo","logoFitOption")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Logo Hover Style","b-blocks"),value:i.logo.hover,options:[{value:"",label:"None"},{value:"logo-grayScale",label:"GrayScale"},{value:"zoomIn",label:"Zoom In"},{value:"zoomOut",label:"Zoom Out"}],onChange:e=>n("sliderStyles",e,"logo","hover")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:i.logo.border,onChange:e=>n("sliderStyles",e,"logo","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i.logo.radius,onChange:e=>n("sliderStyles",e,"logo","radius")})]}),s.isCaptionVisible&&(0,l.jsx)(oA,{attributes:e,setAttributes:t,updateObj:n})]})})),sA=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(iA,{...e})}),aA=e=>{const{attributes:t,setAttributes:n,updateObj:o,activeIndex:i,setActiveIndex:s,isPremium:a}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:ZP,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(nA,{attributes:t,setAttributes:n,updateObj:o,activeIndex:i,setActiveIndex:s})}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(sA,{attributes:t,setAttributes:n,updateObj:o})}),"advanced"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:t.advanced,onChange:e=>n({advanced:e}),isPremium:a})})]})})]})})};function rA(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 20 20",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})})}function lA(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 448 512",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"})})}const cA=({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o})=>{const{options:i,logo:s,sliderStyles:a}=e,{caption:r}=a,c={...i.pagination&&{"--b-blocks-logo-slider-slide-margin":"20px"},"--swiper-wrapper-transition-timing-function":i?.easing};return(0,l.jsx)("div",{className:"b-blocks-logo-slider-main-wrapper",style:c,children:(0,l.jsx)(Hx,{effect:i.effect,modules:[Af,Bf,Nf,Ef,Pf],spaceBetween:50,slidesPerView:3,autoplay:!!i.autoplay&&{delay:i.delay,reverseDirection:"rightToLeft"!==i.direction,pauseOnMouseEnter:i?.isPauseOnHover},navigation:!!i.navigation&&{clickable:!0},draggable:!1,loop:Boolean(i.loop),speed:i.speed,autoHeight:!0,pagination:!!i.pagination&&{clickable:!0,dynamicBullets:i.dynamicPagination},breakpoints:{1024:{slidesPerView:i.logoView.desktop,spaceBetween:i.space.desktop},640:{slidesPerView:i.logoView.tablet,spaceBetween:i.space.tablet},0:{slidesPerView:i.logoView.mobile,spaceBetween:i.space.mobile}},children:s&&s.map(((e,c)=>(0,l.jsx)(Wx,{children:(0,l.jsx)("div",{style:{border:n===c?"2px solid #007CBA":"none",borderRadius:n===c?"4px":"none"},children:(0,l.jsx)("div",{className:"b-blocks-logo-slider-wrapper",children:(0,l.jsxs)("div",{className:"b-blocks-slider-logo-wrapper",onClick:()=>o(c),children:[(0,l.jsx)(lA,{onClick:()=>t({logo:s.filter(((e,t)=>t!==c))}),className:"b-blocks-logo-slider-block-delete-btn"}),(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image/*"],value:s[c]?.id?[s[c]?.id]:[],onSelect:e=>t(s.splice(c,1,e)),render:({open:e})=>(0,l.jsx)("div",{onClick:e,className:"b-blocks-b-blocks-losl-replace-plus-icon",children:(0,l.jsx)(rA,{className:"b-blocks-losl-replace-plus-icon"})}),multiple:!1})}),(0,l.jsx)("img",{className:`b-blocks-losl-logo ${a.logo.hover} `,src:e?.url||kn,alt:e?.alt}),e?.url&&(0,l.jsx)("div",{className:`b-blocks-logo-slider-block-caption ${"hover"===r.hover?"b-blocks-caption-hover":""} ${i.isCaptionVisible?"":"hidden"}`,children:(0,l.jsx)(h.RichText,{tagName:"span",value:e?.caption,allowedFormats:["core/bold","core/italic","core/link"],placeholder:"Write caption...",onChange:e=>t({logo:s?.map(((t,n)=>n===c?{...t,caption:e}:t))})})})]})})})},c)))})})},dA=(0,w.compose)((0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}})),(0,f.withDispatch)(((e,t)=>({selectBlock:()=>{e("core/block-editor").selectBlock(t.clientId)}}))))((e=>{const{attributes:t,setAttributes:n,clientId:o,selectBlock:i,device:s}=e,{logo:a,options:r}=t,[c,d]=(0,m.useState)(0),u=fe(t,n),p=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(aA,{attributes:t,setAttributes:n,updateObj:u,activeIndex:c,setActiveIndex:d,isPremium:p}),(0,l.jsx)(KP,{setAttributes:n,attributes:t,activeIndex:c,setActiveIndex:d,updateObj:u}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),onClick:()=>i(o),children:[(0,l.jsx)(YP,{attributes:t,id:`block-${o}`,isBackend:!0}),a.length>0?(0,l.jsx)("div",{children:(0,l.jsx)(cA,{attributes:t,setAttributes:n,activeIndex:c,setActiveIndex:d},`${s}-${JSON.stringify(a?.length)}-${JSON.stringify(r)}-${JSON.stringify(r?.logoView)}`)}):(0,l.jsx)("div",{className:"b-blocks-logo-slider-media-upload-placeholder",children:(0,l.jsxs)(h.MediaUploadCheck,{children:[(0,l.jsx)("h4",{className:"b-blocks-logo-slider-media-upload-title",children:"Upload Logo(s)"}),(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],multiple:!0,gallery:!0,value:a.map((e=>e.id)),onSelect:e=>n({logo:e}),render:({open:e})=>(0,l.jsx)(Bn,{onClick:e,variant:"primary",children:"Media Library"})})]})})]})]})}));Nl(qP.name)&&(0,p.registerBlockType)(qP,{icon:Mr,edit:dA}) |
| 490 |
;const uA=JSON.parse('{"apiVersion":3,"name":"b-blocks/lottie-player","title":"Lottie Player","description":"Lottie player for display lottie files.","category":"bBlocks","keywords":["lottie player","json player","lottie animation"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"playerAlign":{"type":"string","default":"center"},"file":{"type":"string","default":"https://assets4.lottiefiles.com/datafiles/zc3XRzudyWE36ZBJr7PIkkqq0PFIrIBgp4ojqShI/newAnimation.json"},"isControls":{"type":"boolean","default":true},"isAutoplay":{"type":"boolean","default":true},"isLoop":{"type":"boolean","default":true},"isHover":{"type":"boolean","default":false},"mode":{"type":"string","default":"normal"},"direction":{"type":"number","default":1},"count":{"type":"number","default":0},"speed":{"type":"number","default":1},"intermission":{"type":"number","default":0},"link":{"type":"string","default":""},"isLinkInNewTab":{"type":"boolean","default":false},"interactivity":{"type":"string","default":"noInteractivity"},"interactivityMode":{"type":"string","default":""},"interactivityContainer":{"type":"string","default":".wp-block-b-blocks-lottie-player"},"interactivityActions":{"type":"array","default":[]},"width":{"type":"string","default":""},"background":{"type":"string","default":"#0000"},"controlsHeight":{"type":"string","default":"35px"},"controlsBG":{"type":"string","default":"#0000"},"controlsIconColor":{"type":"string","default":"#146EF5"},"controlsIconHoverColor":{"type":"string","default":"#FF7A00"},"controlsIconActiveColor":{"type":"string","default":"#FF7A00"},"controlsTrackColor":{"type":"string","default":"#FF7A00"},"controlsThumbColor":{"type":"string","default":"#146EF5"},"isCap":{"type":"boolean","default":false},"caption":{"type":"string","default":"","selector":".bBlocksLottiePlayer .caption"},"capAlign":{"type":"string","default":"center"},"capColors":{"type":"object","default":{"color":"#333"}},"capTypo":{"type":"object","default":{"fontSize":{"desktop":{"desktop":"14px"}}}},"capPadding":{"type":"object","default":{"vertical":"5px","horizontal":"10px"}},"capMargin":{"type":"object","default":{"side":4,"top":"5px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","dotLottiePlayer","lottieInteractivity"]}'),pA=[{label:(0,x.__)("Normal","b-blocks"),value:"normal",icon:(0,x.__)("Normal","b-blocks")},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce",icon:(0,x.__)("Bounce","b-blocks")}],hA=[{label:(0,x.__)("Forward","b-blocks"),value:1,icon:(0,x.__)("Forward","b-blocks")},{label:(0,x.__)("Backward","b-blocks"),value:-1,icon:(0,x.__)("Backward","b-blocks")}],gA=[{label:(0,x.__)("No Interactivity","b-blocks"),value:"noInteractivity"},{label:(0,x.__)("Sync with scroll","b-blocks"),value:"syncWithScroll"},{label:(0,x.__)("Scroll relative to container","b-blocks"),value:"scrollRelativeToContainer"},{label:(0,x.__)("Scroll with offset","b-blocks"),value:"scrollWithOffset"},{label:(0,x.__)("Sync animation with cursor position","b-blocks"),value:"syncAnimationWithCursorPosition"},{label:(0,x.__)("Sync animation with cursor horizontal movement","b-blocks"),value:"syncAnimationWithCursorHorizontalMovement"},{label:(0,x.__)("Play animation on click","b-blocks"),value:"playAnimationOnClick"},{label:(0,x.__)("Play animation when visible","b-blocks"),value:"playAnimationWhenVisible"}],mA=((0,x.__)("Scroll","b-blocks"),(0,x.__)("Cursor","b-blocks"),(0,x.__)("Chain","b-blocks"),(0,x.__)("Seek","b-blocks"),(0,x.__)("Play","b-blocks"),(0,x.__)("Stop","b-blocks"),(0,x.__)("Loop","b-blocks"),(e,t,n,o)=>{t&&e?.setAttribute(n,o),!t&&e?.removeAttribute(n,o)}),bA=(e,t)=>({noInteractivity:[],syncWithScroll:[{visibility:[0,1],type:"seek",frames:[0,t]}],scrollRelativeToContainer:[{visibility:[0,1],type:"seek",frames:[0,t]}],scrollWithOffset:[{visibility:[0,.3],type:"stop",frames:[0]},{visibility:[.3,1],type:"seek",frames:[0,t]}],syncAnimationWithCursorPosition:[{position:{x:[0,1],y:[0,1]},type:"seek",frames:[0,t]}],syncAnimationWithCursorHorizontalMovement:[{position:{x:[0,1],y:[-1,2]},type:"seek",frames:[0,t]}],playAnimationOnClick:[{type:"click",forceFlag:!1}],toggleAnimation:[{type:"toggle"}],playAnimationWhenVisible:[{visibility:[.5,1],type:"play"}]}[e]),fA=({attributes:e,setAttributes:t,fileFrameSize:n,isPremium:i})=>{const{playerAlign:a,file:r,isControls:c,isAutoplay:d,isLoop:u,isHover:p,mode:g,direction:b=1,count:f,speed:k,intermission:w,link:_,isLinkInNewTab:C=!1,interactivity:j="noInteractivity",interactivityContainer:$=".wp-block-b-blocks-lottie-player",interactivityActions:S=[],width:T,background:M,controlsHeight:N,controlsBG:L,controlsIconColor:E,controlsIconHoverColor:P,controlsIconActiveColor:A,controlsTrackColor:B,controlsThumbColor:I,isCap:O=!1,caption:R="",capAlign:z="center",capTypo:D={},capColors:F={color:"#333"},capPadding:H={},capMargin:W={}}=e,[U,G]=(0,m.useState)(!1),V={isPremium:i,setIsProModalOpen:G},q={className:"bPlPanelBody",initialOpen:!1};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:"https://bplugins.com/docs/lottie-player"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Player","b-blocks"),children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Lottie file url:","b-blocks")}),i?(0,l.jsx)(ve,{value:r,types:["application/json"],onChange:e=>t({file:e}),placeholder:(0,x.__)("Enter lottie file url","b-blocks")}):(0,l.jsx)(y.TextControl,{value:r,onChange:e=>t({file:e})}),(0,l.jsx)("small",{children:(0,x.__)("Support only .json or .lottie file!","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Controls","b-blocks"),checked:c,onChange:e=>t({isControls:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Autoplay","b-blocks"),checked:d,onChange:e=>t({isAutoplay:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Loop","b-blocks"),checked:u,onChange:e=>t({isLoop:e})}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Enable Hover","b-blocks"),checked:p,onChange:e=>t({isHover:e}),...V,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Mode:","b-blocks"),value:g,onChange:e=>t({mode:e}),options:pA,...V,Component:Tn}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Direction:","b-blocks"),value:b,onChange:e=>t({direction:parseInt(e)}),options:hA,...V,Component:Tn}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Count (Set 0 to infinite):","b-blocks"),value:f,onChange:e=>t({count:e}),min:0,max:50,step:1,...V,Component:y.RangeControl}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Speed:","b-blocks"),value:k,onChange:e=>t({speed:e}),min:.01,max:20,step:.01,...V,Component:y.RangeControl}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Interval (s):","b-blocks"),value:w,onChange:e=>t({intermission:e}),min:0,max:20,step:.01,...V,Component:y.RangeControl}),(0,l.jsx)(v,{children:(0,x.__)("Link the player:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:_,onChange:e=>t({link:e})}),(0,l.jsx)("small",{children:(0,x.__)("If you want to link the player, enter the link here. Otherwise, leave as blank.","b-blocks")}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Open link in a new tab","b-blocks"),checked:C,onChange:e=>t({isLinkInNewTab:e}),...V,Component:y.ToggleControl})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Interactivity","b-blocks"),...q,children:[(0,l.jsx)(Ys,{label:(0,x.__)("Interactivity:","b-blocks"),value:j,onChange:e=>t({interactivity:e, |
| 491 |
interactivityMode:["syncWithScroll","scrollRelativeToContainer","scrollWithOffset","playAnimationWhenVisible"].includes(e)?"scroll":["syncAnimationWithCursorPosition","syncAnimationWithCursorHorizontalMovement","playAnimationOnClick","toggleAnimation"].includes(e)?"cursor":"",interactivityContainer:"scrollRelativeToContainer"===e?".wp-block-lpb-lottie-player":$,interactivityActions:bA(e,n)}),options:gA,...V,Component:y.SelectControl}),(0,l.jsx)("small",{children:(0,x.__)("Upload file first then change interactivity option.","b-blocks")}),(0,l.jsx)("br",{}),(0,l.jsx)("small",{children:(0,x.__)("Interactivity will not working in backend(editor).","b-blocks")}),"scrollRelativeToContainer"===j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Container Selector","b-blocks")}),(0,l.jsx)(y.TextControl,{value:$,onChange:e=>t({interactivityContainer:e})}),(0,l.jsx)("small",{children:(0,x.__)("Enter container selector. Ex: if id enter '#id', if class '.class' or if tag 'tag name'","b-blocks")})]}),"scrollWithOffset"===j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt20",label:(0,x.__)("Offset (%)","b-blocks"),labelPosition:"left",value:100*S?.[0]?.visibility?.[1],onChange:e=>t({interactivityActions:Ob(S,(t=>{t[0].visibility[1]=parseFloat(e)/100,t[1].visibility[0]=parseFloat(e)/100}))})}),(0,l.jsx)("small",{children:(0,x.__)(`Scroll animation when lottie player reached at ${100*S?.[0]?.visibility?.[1]} % of viewport`,"b-blocks")})]}),"playAnimationWhenVisible"===j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt20",label:(0,x.__)("Offset (%)","b-blocks"),labelPosition:"left",value:100*S?.[0]?.visibility?.[0],onChange:e=>((e,n,o,i=null)=>{const s=Ob(S,(t=>{null!==i?t[e][n][i]=o:t[e][n]=o}));t({interactivityActions:s})})(0,"visibility",parseFloat(e)/100,0)}),(0,l.jsx)("small",{children:(0,x.__)(`Play animation when lottie player reached at ${100*S?.[0]?.visibility?.[0]} % of viewport`,"b-blocks")})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Caption","b-blocks"),...q,children:[(0,l.jsx)(Ys,{label:(0,x.__)("Show Caption","b-blocks"),checked:O,onChange:e=>t({isCap:e}),...V,Component:y.ToggleControl}),O&&(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Text:","b-blocks"),value:R,onChange:e=>t({caption:e}),...V,Component:y.TextControl})]})]}),"style"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Player","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:T,onChange:e=>t({width:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color:","b-blocks"),value:M,onChange:e=>t({background:e}),defaultColor:"#0000"})]}),c&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Controls","b-blocks"),...q,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:N,onChange:e=>t({controlsHeight:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color:","b-blocks"),value:L,onChange:e=>t({controlsBG:e}),defaultColor:"#0000"}),(0,l.jsx)(Ue,{label:(0,x.__)("Icons Color:","b-blocks"),value:E,onChange:e=>t({controlsIconColor:e}),defaultColor:o}),(0,l.jsx)(Ue,{label:(0,x.__)("Icons Hover Color:","b-blocks"),value:P,onChange:e=>t({controlsIconHoverColor:e}),defaultColor:s}),(0,l.jsx)(Ue,{label:(0,x.__)("Icons Active Color:","b-blocks"),value:A,onChange:e=>t({controlsIconActiveColor:e}),defaultColor:s}),(0,l.jsx)(Ue,{label:(0,x.__)("Track Color:","b-blocks"),value:B,onChange:e=>t({controlsTrackColor:e}),defaultColor:s}),(0,l.jsx)(Ue,{label:(0,x.__)("Thumb Color:","b-blocks"),value:I,onChange:e=>t({controlsThumbColor:e}),defaultColor:o})]}),O&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Caption","b-blocks"),...q,children:[(0,l.jsx)(Ys,{label:(0,x.__)("Text Align:","b-blocks"),value:z,onChange:e=>t({capAlign:e}),options:Jt,isIcon:!0,size:i?"medium":"small",...V,Component:Tn}),(0,l.jsx)(Ys,{label:(0,x.__)("Typography:","b-blocks"),value:D,onChange:e=>t({capTypo:e}),defaults:{fontSize:{desktop:14,tablet:14,mobile:14}},...V,Component:Os}),(0,l.jsx)(Ys,{label:(0,x.__)("Colors:","b-blocks"),value:F,onChange:e=>t({capColors:e}),...V,Component:On}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:H,onChange:e=>t({capPadding:e}),defaults:{vertical:"10px",horizontal:"10px"},...V,Component:od}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:W,onChange:e=>t({capMargin:e}),defaults:{side:4,top:"5px"},...V,Component:od})]})]})]})})}),(0,l.jsxs)(jn,{isProModalOpen:U,setIsProModalOpen:G,block:"Lottie Player",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Upload File ","b-blocks")}),(0,x.__)("Upload Lottie JSON files from the media library.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Hover ","b-blocks")}),(0,x.__)("Play the Lottie animation on mouseover.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Mode ","b-blocks")}),(0,x.__)("Choose between normal and bounce modes.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Direction ","b-blocks")}),(0,x.__)("Set the animation direction to forward or backward.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Count ","b-blocks")}),(0,x.__)("Specify how many times the animation will play.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Speed ","b-blocks")}),(0,x.__)("Adjust the player speed.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Interval ","b-blocks")}),(0,x.__)("Set the autoplay interval.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Link Tab ","b-blocks")}),(0,x.__)("Option to open the link in a new tab.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Interactivity ","b-blocks")}),(0,x.__)("Define interactivity options to determine when and where the animation will play.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Caption ","b-blocks")}),(0,x.__)("Add a caption for the Lottie player.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Caption Style ","b-blocks")}),(0,x.__)("Style the caption, including text alignment, typography, text and background colors, padding, and margin.","b-blocks")]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:a,onChange:e=>t({playerAlign:e}),describedBy:(0,x.__)("Player Alignment"),alignmentControls:[{title:(0,x.__)("Player in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Player in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Player in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},xA="bBlocksLottiePlayer",yA=({attributes:e,id:t})=>{const{playerAlign:n,link:o,width:i,controlsHeight:s,controlsBG:a,controlsIconColor:r,controlsIconHoverColor:c,controlsIconActiveColor:d,controlsTrackColor:u,controlsThumbColor:p,capAlign:h="center",capTypo:g={},capColors:m={color:"#333"},capPadding:b={},capMargin:f={}}=e,x=`#${t} .${xA}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{ |
| 492 |
__html:`\n\t\t${pa("",g)?.googleFontLink}\n\t\t${pa(`${x} .caption`,g)?.styles}\n\n\t\t${x}{\n\t\t\ttext-align: ${n};\n\t\t}\n\t\t${x} dotlottie-player{\n\t\t\twidth: ${i};\n\t\t\tcursor: ${o?"pointer":"auto"};\n\t\t\t--lottie-player-toolbar-height: ${s};\n\t\t\t--lottie-player-toolbar-background-color: ${a};\n\t\t\t--lottie-player-toolbar-icon-color: ${r};\n\t\t\t--lottie-player-toolbar-icon-hover-color: ${c};\n\t\t\t--lottie-player-toolbar-icon-active-color: ${d};\n\t\t\t--lottie-player-seeker-track-color: ${u};\n\t\t\t--lottie-player-seeker-thumb-color: ${p};\n\t\t}\n\t\t${x} .caption{\n\t\t\twidth: ${i};\n\t\t\ttext-align: ${h};\n\t\t\t${aa(m)};\n\t\t\tpadding: ${ua(b)};\n\t\t\tmargin: ${ua(f)};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},vA=(0,m.forwardRef)((({attributes:e},t)=>{const{file:n,isControls:o,isAutoplay:i,isLoop:s,isHover:a,mode:r,direction:c=1,count:d,speed:u,intermission:p,background:h}=e;return(0,m.useEffect)((()=>{if(t?.current){const e=!!s&&(!(0<d)||d);mA(t?.current,o,"controls",""),mA(t?.current,i,"autoplay",""),mA(t?.current,s,"loop",e),mA(t?.current,a,"hover","")}}),[t]),(0,l.jsx)("dotlottie-player",{ref:t,src:n,autoplay:!0,loop:!0,mode:r,speed:u,direction:c,intermission:1e3*p,background:h,debug:!0})}));Nl(uA.name)&&(0,p.registerBlockType)(uA,{icon:Nr,transforms:{from:[{type:"block",blocks:["lpb/lottie-player"],transform:e=>(0,p.createBlock)("b-blocks/lottie-player",e)},{type:"prefix",prefix:"lottie",transform:()=>(0,p.createBlock)("b-blocks/lottie-player")}],to:[{type:"block",blocks:["lpb/lottie-player"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("lpb/lottie-player",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{file:i,isControls:s,isAutoplay:a,isLoop:r,isHover:c,mode:d,direction:u=1,count:p,speed:g,intermission:b,background:f,isCap:x=!1,caption:y=""}=t,v=bBlocksPremiumChecker,k=(0,m.useRef)(null),[w,_]=(0,m.useState)(0),C=e=>{e.addEventListener("ready",(()=>{const{animationData:t}=e.getLottie()||{};_(Math.round(t?.op||100))}))},j=`block-${o}`,$=document.querySelector(`#${j} .${xA} .lottieHolder`);return(0,m.useEffect)((()=>{$&&($.innerHTML="");const e=!!r&&(!(0<p)||p),t=document.createElement("dotlottie-player");mA(t,i,"src",i),mA(t,s,"controls",""),mA(t,a,"autoplay",""),mA(t,r,"loop",e),mA(t,c,"hover",""),mA(t,d,"mode",d),mA(t,g,"speed",g),mA(t,!0,"direction",u),mA(t,b,"intermission",1e3*b),mA(t,f,"background",f),mA(t,!0,"debug"),$&&$.appendChild(t),C(t)}),[i,s,a,r,c,d,u,p,g,b,f]),(0,m.useEffect)((()=>{const e=k?.current;C(e)}),[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(fA,{attributes:t,setAttributes:n,fileFrameSize:w,isPremium:v}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(yA,{attributes:t,id:j}),(0,l.jsxs)("div",{className:xA,children:[(0,l.jsx)("span",{className:"lottieHolder",children:(0,l.jsx)(vA,{ref:k,attributes:t})}),x&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),(0,l.jsx)("span",{className:"caption",children:y})]})]})]})]})},save:()=>null});const kA=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/list","version":"1.0.0","title":"List","category":"bBlocks","description":"A customizable list block with support for icons, custom markers, and flexible layouts.","keywords":["list","list block"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"desktop":{"type":"vertical","verticalAlign":"flex-start","horizontalAlign":"flex-start"},"tablet":{"type":"","verticalAlign":"","horizontalAlign":""},"mobile":{"type":"","verticalAlign":"","horizontalAlign":""}}},"items":{"type":"array","default":[{"text":"List Item","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M448 128l-177.6 0c1 5.2 1.6 10.5 1.6 16l0 16 32 0 144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16zM224 144c0-17.7-14.3-32-32-32c0 0 0 0 0 0l-24 0c-66.3 0-120 53.7-120 120l0 48c0 52.5 33.7 97.1 80.7 113.4c-.5-3.1-.7-6.2-.7-9.4c0-20 9.2-37.9 23.6-49.7c-4.9-9-7.6-19.4-7.6-30.3c0-15.1 5.3-29 14-40c-8.8-11-14-24.9-14-40l0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-40 0-40zM192 64s0 0 0 0c18 0 34.6 6 48 16l208 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-82 0c1.3 5.1 2 10.5 2 16c0 25.3-14.7 47.2-36 57.6c2.6 7 4 14.5 4 22.4c0 20-9.2 37.9-23.6 49.7c4.9 9 7.6 19.4 7.6 30.3c0 35.3-28.7 64-64 64l-64 0-24 0C75.2 448 0 372.8 0 280l0-48C0 139.2 75.2 64 168 64l24 0zm64 336c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0zm16-176c0 5.5-.7 10.9-2 16l2 0 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0 16zm-24 64l-40 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-24 0z\'/></svg>","link":"","newWindow":false,"textColor":"","markerColor":""}]},"marker":{"type":"object","default":{"markerType":"","position":"","align":"","icon":"","emoji":"👉"}},"styles":{"type":"object","default":{"lists":{"color":"","bg":"","typography":{"fontSize":{"desktop":"20px","tablet":"","mobile":""}},"desktop":{"gap":{"horizontal":"","vertical":""}},"tablet":{"gap":{"horizontal":"","vertical":""}},"mobile":{"gap":{"horizontal":"","vertical":""}}},"divider":{"style":"solid","weight":"5px","width":"100px","color":"#000","isEnabled":false},"marker":{"color":"","size":"","iconSize":"","bg":"","gap":"10px","desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"border":{}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","react","react-dom"]}'),wA=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],_A=[{label:"None",value:""},{label:"Icon",value:"icon"},{label:"Disc",value:"disc"},{label:"Square",value:"square"},{label:"Emoji",value:"emoji"}],CA=[{label:"None",value:""},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Dashed",value:"dashed"},{label:"Dotted",value:"dotted"}],jA=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),$A=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),SA=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{ |
| 493 |
d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),TA=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0-17.7-14.3-32-32-32L32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32zm0 256c0-17.7-14.3-32-32-32L32 288c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 192c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32zM448 448c0-17.7-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32z"})}),MA=e=>{const{attributes:t,updateObj:n,index:o}=e,{items:i}=t,s=i[o];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Text","b-blocks"),value:s.text,onChange:e=>n("items",e,o,"text")}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Icon","b-blocks"),value:s.icon,onChange:e=>n("items",e,o,"icon")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Link","b-blocks"),value:s.link,onChange:e=>n("items",e,o,"link")}),(0,l.jsx)(y.CheckboxControl,{label:(0,x.__)("Open in new window","b-blocks"),checked:s.newWindow,onChange:e=>n("items",e,o,"newWindow")})]})},NA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,setAttributes:n,device:o})=>{const{layout:i,items:s}=e,a={text:`List Item ${s.length+1}`,icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M448 128l-177.6 0c1 5.2 1.6 10.5 1.6 16l0 16 32 0 144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16zM224 144c0-17.7-14.3-32-32-32c0 0 0 0 0 0l-24 0c-66.3 0-120 53.7-120 120l0 48c0 52.5 33.7 97.1 80.7 113.4c-.5-3.1-.7-6.2-.7-9.4c0-20 9.2-37.9 23.6-49.7c-4.9-9-7.6-19.4-7.6-30.3c0-15.1 5.3-29 14-40c-8.8-11-14-24.9-14-40l0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-40 0-40zM192 64s0 0 0 0c18 0 34.6 6 48 16l208 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-82 0c1.3 5.1 2 10.5 2 16c0 25.3-14.7 47.2-36 57.6c2.6 7 4 14.5 4 22.4c0 20-9.2 37.9-23.6 49.7c4.9 9 7.6 19.4 7.6 30.3c0 35.3-28.7 64-64 64l-64 0-24 0C75.2 448 0 372.8 0 280l0-48C0 139.2 75.2 64 168 64l24 0zm64 336c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0zm16-176c0 5.5-.7 10.9-2 16l2 0 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0 16zm-24 64l-40 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-24 0z'/></svg>",link:"",newWindow:!1,textColor:"",markerColor:""};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Lists Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(v,{className:"mb0",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Layout","lists")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i[o].type,onChange:e=>{t("layout",e,o,"type")},className:"mt10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"vertical"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"horizontal"})]}),"vertical"===i[o].type&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",gap:5,children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","lists")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i[o].verticalAlign,onChange:e=>t("layout",e,o,"verticalAlign"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:jA}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:$A}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:" flex-end",icon:SA})]})]}),"horizontal"===i[o].type&&(0,l.jsxs)("div",{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","lists")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt5",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i[o].horizontalAlign,onChange:e=>t("layout",e,o,"horizontalAlign"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:jA}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:$A}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:SA}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Justify",value:"space-between",icon:TA})]})]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Lists","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_s,{attributes:e,setAttributes:n,newItem:a,design:"sortable",itemLabel:"List",arrKey:"items",title:"text",ItemSettings:MA,updateObj:t})})]})})),LA=e=>{const{attributes:t,updateObj:n}=e,{marker:o}=t,{markerType:i}=o,s=e=>(0,x.__)(e,"b-blocks");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Marker","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1 mt0",children:s("Marker Type")}),(0,l.jsx)(y.SelectControl,{className:"flex1",options:_A,value:i,onChange:e=>n("marker",e,"markerType")})]}),"emoji"===i&&(0,l.jsx)(y.TextControl,{label:s("Emoji"),value:o.emoji,onChange:e=>n("marker",e,"emoji")})]})},EA=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(NA,{...e}),(0,l.jsx)(LA,{...e})]}),PA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n}=e,{styles:o,layout:i}=t,{divider:s}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Divider","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Divider","b-blocks"),checked:s.isEnabled,onChange:e=>n("styles",e,"divider","isEnabled")}),s.isEnabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Style","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:s.style,options:CA,onChange:e=>n("styles",e,"divider","style")})]}),(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Weight","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s.weight,labelPosition:"edge",onChange:e=>n("styles",e,"divider","weight")})]}),"vertical"===i?.desktop.type&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s.width,labelPosition:"edge",onChange:e=>n("styles",e,"divider","width")})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:s.color,onChange:e=>n("styles",e,"divider","color")})]})]})})),AA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{lists:s}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Lists Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:s.color,onChange:e=>n("styles",e,"lists","color")}),(0,l.jsx)(Os,{value:s.typography,onChange:e=>n("styles",e,"lists","typography")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Space Between","b-blocks")," ",(0,l.jsx)(_,{})]}), |
| 494 |
labelPosition:"edge",value:s[o].gap.horizontal,onChange:e=>n("styles",e,"lists",o,"gap","horizontal")})]})})),BA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i,marker:s}=t,{markerType:a}=s,{marker:r}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Marker Style","b-blocks"),initialOpen:!1,children:["emoji"!==a&&(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r.color,onChange:e=>n("styles",e,"marker","color")}),"icon"!==a&&"emoji"!==a&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Marker Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.size,onChange:e=>n("styles",e,"marker","size")})]}),("icon"===a||"emoji"===a)&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Icon/Emoji Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.iconSize,onChange:e=>n("styles",e,"marker","iconSize")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.gap,onChange:e=>n("styles",e,"marker","gap")})]}),"icon"===a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:r.bg,onChange:e=>n("styles",e,"marker","bg"),isImage:!1}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[o].padding,onChange:e=>n("styles",e,"marker",o,"padding")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:r.border,onChange:e=>n("styles",e,"marker","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[o].radius,onChange:e=>n("styles",e,"marker",o,"radius")})]})]})})),IA=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(AA,{...e}),(0,l.jsx)(PA,{...e}),(0,l.jsx)(BA,{...e})]}),OA=e=>{const{attributes:t,setAttributes:n}=e,{items:o}=t,i={text:`List Item ${o.length+1}`,icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M448 128l-177.6 0c1 5.2 1.6 10.5 1.6 16l0 16 32 0 144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16zM224 144c0-17.7-14.3-32-32-32c0 0 0 0 0 0l-24 0c-66.3 0-120 53.7-120 120l0 48c0 52.5 33.7 97.1 80.7 113.4c-.5-3.1-.7-6.2-.7-9.4c0-20 9.2-37.9 23.6-49.7c-4.9-9-7.6-19.4-7.6-30.3c0-15.1 5.3-29 14-40c-8.8-11-14-24.9-14-40l0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-40 0-40zM192 64s0 0 0 0c18 0 34.6 6 48 16l208 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-82 0c1.3 5.1 2 10.5 2 16c0 25.3-14.7 47.2-36 57.6c2.6 7 4 14.5 4 22.4c0 20-9.2 37.9-23.6 49.7c4.9 9 7.6 19.4 7.6 30.3c0 35.3-28.7 64-64 64l-64 0-24 0C75.2 448 0 372.8 0 280l0-48C0 139.2 75.2 64 168 64l24 0zm64 336c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0zm16-176c0 5.5-.7 10.9-2 16l2 0 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0 16zm-24 64l-40 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-24 0z'/></svg>",link:"",newWindow:!1,textColor:"",markerColor:""};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",initialTabName:"general",activeClass:"activeTab",tabs:wA,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(EA,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(IA,{...e})})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New List","b-blocks"),onClick:()=>n({items:[...o,i]}),children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})})})]})},RA=({attributes:e,id:o})=>{const{layout:i,styles:s}=e,{lists:a,divider:r,marker:c}=s,d=`#${o} .bBlocksListMainWrapper .bBlocksListContainer`,u=`${d} .bBlocksListItem`,p=`${u} .bBlocksListItemText`,h=`${d} .bBlocksListItemDivider`,g=`${u} .bBlocksListMarkerIcon`,m=`${u} .bBlocksListMarkerEmoji`,b=`${u} .bBlocksListMarker`,f=e=>"vertical"===i[e].type?"flex-direction:column;":"horizontal"===i[e].type?"flex-direction:row;":"",x=e=>("vertical"===i[e].type?na("align-items",i[e].verticalAlign):"")+("horizontal"===i[e].type?na("justify-content",i[e].horizontalAlign):""),y=e=>("horizontal"===i[e].type?`${na("border-right-style",r.style)}\n\t\t\t${na("border-right-width",r.weight)}\n\t\t\t${na("border-right-color",r.color)}`:"")+("vertical"===i[e].type?`${na("border-bottom-style",r.style)}\n\t\t\t${na("border-bottom-width",r.weight)}\n\t\t\t${na("border-bottom-color",r.color)} \n\t\t\t${na("width",r.width)}`:"");return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${pa("",a.typography).googleFontLink}\n\t\t${pa(p,a.typography).styles}\n\n\t\t${d}{\n\t\t\t${f("desktop")}\n\t\t\t${x("desktop")}\n\t\t\t${na("gap",a.desktop.gap.horizontal)}\n\t\t}\n\t\t${u}{\n\t\t\t${na("gap",c.gap)}\n\t\t}\n\t\t${p}{\n\t\t\t${na("color",a.color)}\n\t\t}\n\t\t${h}{\n\t\t\t${y("desktop")}\n\t\t}\n\t\t\n\t\t${g}{\n\t\t\t${oa(c.bg)}\n\t\t\t${na("padding",ha(c.desktop.padding))}\n\t\t\t${na("border-radius",ha(c.desktop.radius))}\n\t\t\t${sa(c.border)}\n\t\t}\n\n\t\t${g}>svg{\n\t\t\t${na("fill",c.color)}\n\t\t\t${na("width",c.iconSize)}\n\t\t\t${na("height",c.iconSize)}\n\t\t}\n\n\t\t${m}{\n\t\t\t${na("font-size",c.iconSize)}\n\t\t}\n\n\t\t${b}{\n\t\t\t${na("background",c.color)}\n\t\t\t${na("height",c.size)}\n\t\t\t${na("width",c.size)}\n\t\t}\n\n\t\t${t}{\n\t\t\t${d}{\n\t\t\t\t${f("tablet")}\n\t\t\t\t${x("tablet")}\n\t\t\t\t${na("gap",a.tablet.gap.horizontal)}\n\t\t\t}\n\n\t\t\t${h}{\n\t\t\t\t${y("tablet")}\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\t${na("padding",ha(c.tablet.padding))}\n\t\t\t\t${na("border-radius",ha(c.tablet.radius))}\n\t\t\t}\n\n\t\t}\n\n\t\t${n}{\n\t\t\t${d}{\n\t\t\t\t${f("mobile")}\n\t\t\t\t${x("mobile")}\n\t\t\t\t${na("gap",a.mobile.gap.horizontal)}\n\t\t\t}\n\n\t\t\t${h}{\n\t\t\t\t${y("mobile")}\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\t${na("padding",ha(c.mobile.padding))}\n\t\t\t\t${na("border-radius",ha(c.mobile.radius))}\n\t\t\t}\n\n\t\t}\n\n\t`}})},zA=({attributes:e,updateObj:t})=>{const{items:n=[],marker:o,styles:i}=e,{divider:s}=i,{markerType:a}=o,r=e=>{switch(a){case"emoji":return(0,l.jsx)("span",{className:"bBlocksListMarkerEmoji",children:o.emoji});case"icon":return e?(0,l.jsx)("span",{className:"bBlocksListMarkerIcon",dangerouslySetInnerHTML:{__html:e}}):null;case"disc":return(0,l.jsx)("span",{className:"bBlocksListMarkerDisc bBlocksListMarker"});case"square":return(0,l.jsx)("span",{className:"bBlocksListMarkerSquare bBlocksListMarker"});default:return null}};return(0,l.jsx)("div",{className:"bBlocksListMainWrapper",children:(0,l.jsx)("div",{className:"bBlocksListContainer",children:n.length>0&&n.map(((e,o)=>(0,l.jsxs)(m.Fragment,{children:[(0,l.jsxs)("a",{className:"bBlocksListItem",rel:"noopener noreferrer",children:[r(e.icon),(0,l.jsx)(h.RichText,{className:"bBlocksListItemText",tagName:"span",placeholder:"Write your list text",value:e.text,onChange:e=>t("items",e,o,"text")})," "]}),o<n.length-1&&s.isEnabled&&(0,l.jsx)("div",{className:"bBlocksListItemDivider"})]},o)))})})};Nl(kA.name)&&(0,p.registerBlockType)(kA,{icon:el,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(OA,{attributes:t,setAttributes:n,updateObj:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(RA,{attributes:t,id:`block-${o}`}),(0,l.jsx)(zA,{attributes:t,updateObj:i})]})]})}}) |
| 495 |
;const DA=JSON.parse('{"apiVersion":3,"name":"b-blocks/mailto","title":"Mail To","description":"Mail with a single click.","category":"bBlocks","keywords":["Send mail","Mail us","Email sending"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"mailtoAlign":{"type":"string","default":"center"},"receiverMail":{"type":"string","default":""},"style":{"type":"string","default":"default"},"btn":{"type":"string","selector":"a.mailtoButton span","default":"Send E-mail"},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"22px","tablet":"20px","mobile":"18px"},"fontWeight":600}},"btnColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"btnHovColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"btnPadding":{"type":"object","default":{"vertical":"18px","horizontal":"45px"}},"btnBorder":{"type":"object","default":{"radius":"50px"}},"icon":{"type":"object","default":{"class":"fa fa-paper-plane"}},"iconPosition":{"type":"string","default":"left"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":["file:./view.js","mailtoui"]}'),FA=[{label:"Default",value:"default"},{label:"Style 1",value:"style1"},{label:"Style 2",value:"style2"},{label:"Style 3",value:"style3"}],HA=({settings:e})=>{const{attributes:{mailtoAlign:t,receiverMail:n,style:i,btnTypo:a,btnColors:r,btnHovColors:c,btnPadding:d,btnBorder:u,icon:p,iconPosition:g},setAttributes:m}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:pn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Mail Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("E-mail Address:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:n,onChange:e=>m({receiverMail:e}),placeholder:(0,x.__)("Email Address","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Style:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i,onChange:e=>{m({style:e}),"default"===e&&m({btnColors:{color:"#fff",bg:o,styles:`color: #fff; background: ${o};`},btnHovColors:{color:"#fff",bg:s,styles:`color: #fff; background: ${s};`},iconPosition:"left"}),"style1"===e&&m({btnColors:{color:"#fff",bg:o,styles:`color: #fff; background: ${o};`},btnHovColors:{color:"#fff",bg:s,styles:`color: #fff; background: ${s};`},iconPosition:"right"}),"style2"===e&&m({btnColors:{color:"#fff",bg:"#57d0ff",styles:"color: #fff; background: #57d0ff;"},btnHovColors:{color:"#fff",bg:"#50e38b",styles:"color: #fff; background: #50e38b;"},iconPosition:"left"}),"style3"===e&&m({btnColors:{color:"#fff",bg:"#57d0ff",styles:"color: #fff; background: #57d0ff;"},btnHovColors:{color:"#fff",bg:"#50e38b",styles:"color: #fff; background: #50e38b;"},iconPosition:"right"})},options:FA})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:a,onChange:e=>m({btnTypo:e}),defaults:{fontSize:{desktop:22,tablet:20,mobile:18},fontWeight:600}}),(0,l.jsx)(On,{value:r,onChange:e=>m({btnColors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:c,onChange:e=>m({btnHovColors:e}),defaults:{color:"#fff",bg:s}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:d,onChange:e=>m({btnPadding:e}),defaults:{vertical:"18px",horizontal:"45px"}}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:u,onChange:e=>m({btnBorder:e}),defaults:{radius:"50px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Un,{value:p,onChange:e=>m({icon:e}),defaults:{class:"fa fa-paper-plane"},isSize:!1,isColor:!1}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Position:","b-blocks")}),(0,l.jsx)(Tn,{value:g,onChange:e=>m({iconPosition:e}),options:[{label:"Left",value:"left",icon:"LEFT"},{label:"Right",value:"right",icon:"RIGHT"}]})]})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:t,onChange:e=>m({mailtoAlign:e}),describedBy:(0,x.__)("Mail Button Alignment"),alignmentControls:[{title:(0,x.__)("Mail Button in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Mail Button in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Mail Button in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},WA="bBlocksMailto";Nl(DA.name)&&(0,p.registerBlockType)(DA,{icon:Lr,edit:e=>{const{attributes:{mailtoAlign:t,btn:n,btnTypo:o,btnColors:i,btnHovColors:s,btnPadding:a,btnBorder:r,icon:c,iconPosition:d},setAttributes:u,clientId:p}=e,g=`#block-${p} .${WA}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(HA,{settings:e}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${pa("",o)?.googleFontLink}\n\t\t\t\t${pa(`${g} a.mailtoButton`,o)?.styles}\n\n\t\t\t\t${g}{\n\t\t\t\t\ttext-align: ${t};\n\t\t\t\t}\n\t\t\t\t${g} a.mailtoButton{\n\t\t\t\t\t${aa(i)}\n\t\t\t\t\tpadding: ${ua(a)};\n\t\t\t\t\t${ia(r)}\n\t\t\t\t\tbox-shadow: 0px 5px 20px 0px ${i?.bg};\n\t\t\t\t}\n\t\t\t\t${g} a.mailtoButton:hover{\n\t\t\t\t\t${aa(s)}\n\t\t\t\t\tbox-shadow: 0px 5px 20px 0px ${s?.bg};\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsx)("div",{className:WA,children:(0,l.jsxs)("a",{href:"#",className:"mailtoui mailtoButton",children:["left"===d&&c?.class&&(0,l.jsx)("i",{className:c?.class}),(0,l.jsx)(h.RichText,{tagName:"span",value:n,onChange:e=>u({btn:e}),placeholder:(0,x.__)("Send E-mail","b-blocks"),inlineToolbar:!0}),"right"===d&&c?.class&&(0,l.jsx)("i",{className:c?.class})]})})]})]})},save:()=>null}) |
| 496 |
;const UA=JSON.parse('{"apiVersion":3,"name":"b-blocks/media-text-section","title":"Media & Text Section","description":"A two-panel image/video beside rich content section with sticky media, image effects, per-panel styling, and responsive stacking.","category":"bBlocks","keywords":["media text","image text","split content","feature section","two column"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"full"},"layout":{"type":"object","default":{"desktop":{"direction":"row","alignItems":"center"},"tablet":{"direction":"","alignItems":""},"mobile":{"direction":"","alignItems":""}}},"styles":{"type":"object","default":{"layout":{"desktop":{"ratio":{"media":"50%","content":"50%","splitRatio":"50-50"},"gap":"20px"},"tablet":{"ratio":{"media":"","content":"","splitRatio":""},"gap":""},"mobile":{"ratio":{"media":"","content":"","splitRatio":""},"gap":""}},"media":{"image":{"objFit":"contain"},"video":{"objFit":"contain"},"shadow":{},"overlay":{"bg":{},"opacity":0.5,"isOverlay":false},"bg":{},"border":{},"radius":{"left":"","right":"","top":"","bottom":""},"desktop":{"padding":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"left":"","right":"","top":"","bottom":""}}},"content":{"bg":{},"desktop":{"padding":{"left":"","right":"","top":"","bottom":""},"radius":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"left":"","right":"","top":"","bottom":""},"radius":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"left":"","right":"","top":"","bottom":""},"radius":{"left":"","right":"","top":"","bottom":""}},"border":{},"shadow":{}}}},"media":{"type":"object","default":{"mediaType":"image","image":{},"video":{"url":"","poster":{},"autoplay":false,"loop":true,"muted":true,"controls":true,"allowDownload":false,"allowFullscreen":true,"allowPip":true,"controlsOnHover":false},"stickyMedia":false}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":""},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":""},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":""}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false,"anchor":true,"customClassName":true},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),GA=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),VA=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),qA=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),YA=[{label:"30 / 70",value:"30-70"},{label:"40 / 60",value:"40-60"},{label:"50 / 50",value:"50-50"},{label:"60 / 40",value:"60-40"},{label:"70 / 30",value:"70-30"},{label:"Custom",value:"custom"}],KA=e=>{const{attributes:t,updateObj:n,device:o}=e,{layout:i,styles:s,media:a}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Direction","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o]?.direction,onChange:e=>n("layout",e,o,"direction"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Row",value:"row",icon:(0,l.jsx)(y.Dashicon,{icon:"align-pull-left"})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Row Reverse",value:"row-reverse",icon:(0,l.jsx)(y.Dashicon,{icon:"align-pull-right"})})]})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o]?.alignItems,onChange:e=>n("layout",e,o,"alignItems"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Top",value:"flex-start",icon:(0,l.jsx)(GA,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(VA,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Bottom",value:"flex-end",icon:(0,l.jsx)(qA,{})})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s.layout[o]?.gap,onChange:e=>n("styles",e,"layout",o,"gap")})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Split Ratio","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",help:(0,x.__)("Media / content column widths.","b-blocks"),value:s.layout[o]?.ratio?.splitRatio,options:YA,onChange:e=>{n("styles","30-70"===e?{media:"30%",content:"70%",splitRatio:e}:"40-60"===e?{media:"40%",content:"60%",splitRatio:e}:"50-50"===e?{media:"50%",content:"50%",splitRatio:e}:"60-40"===e?{media:"60%",content:"40%",splitRatio:e}:"70-30"===e?{media:"70%",content:"30%",splitRatio:e}:{...s.layout[o]?.ratio,splitRatio:e |
| 497 |
},"layout",o,"ratio")},__nextHasNoMarginBottom:!0}),"custom"===s.layout[o]?.ratio?.splitRatio&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Media Width","b-blocks"),className:"flex1",value:s.layout[o]?.ratio.media,onChange:e=>n("styles",e,"layout",o,"ratio","media")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Content Width","b-blocks"),className:"flex1",value:s.layout[o]?.ratio.content,onChange:e=>n("styles",e,"layout",o,"ratio","content")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Media","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Media Type","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a.mediaType,onChange:e=>n("media",e,"mediaType"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Image",value:"image"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Video",value:"video"})]})]}),(0,l.jsx)("br",{}),"image"===a.mediaType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(we,{height:"100%",width:"100%",value:a.image,onChange:e=>n("media",e,"image")}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"flex1 mt10",children:(0,x.__)("Object Fit","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s.media.image.objFit,onChange:e=>n("styles",e,"media","image","objFit"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Cover",value:"cover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Contain",value:"contain"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Fill",value:"fill"})]})]})]}),"video"===a.mediaType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ve,{placeholder:(0,x.__)("Enter Video URL","b-blocks"),value:a.video?.url,onChange:e=>n("media",e,"video","url"),types:["video/*"]}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Video Poster","b-blocks")}),(0,l.jsx)(we,{height:"100%",width:"100%",value:a.video?.poster,onChange:e=>n("media",e,"video","poster")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Autoplay","b-blocks"),checked:!!a.video?.autoplay,onChange:e=>n("media",e,"video","autoplay")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Loop","b-blocks"),checked:!1!==a.video?.loop,onChange:e=>n("media",e,"video","loop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Muted","b-blocks"),checked:!1!==a.video?.muted,onChange:e=>n("media",e,"video","muted")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Controls Bar","b-blocks"),checked:!1!==a.video?.controls,onChange:e=>n("media",e,"video","controls")}),!1!==a.video?.controls&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show controls on hover","b-blocks"),checked:!!a.video?.controlsOnHover,onChange:e=>n("media",e,"video","controlsOnHover")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Allow Download","b-blocks"),checked:!!a.video?.allowDownload,onChange:e=>n("media",e,"video","allowDownload")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Allow Fullscreen","b-blocks"),checked:!1!==a.video?.allowFullscreen,onChange:e=>n("media",e,"video","allowFullscreen")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Allow Picture-in-Picture","b-blocks"),checked:!1!==a.video?.allowPip,onChange:e=>n("media",e,"video","allowPip")}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"flex1 mt10",children:(0,x.__)("Object Fit","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s.media.video?.objFit,onChange:e=>n("styles",e,"media","video","objFit"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Cover",value:"cover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Contain",value:"contain"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Fill",value:"fill"})]})]})]})]})]})},QA=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{content:s}=i;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})," "]}),values:s[o].padding,onChange:e=>n("styles",e,"content",o,"padding")}),(0,l.jsx)(An,{value:s.bg,onChange:e=>n("styles",e,"content","bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>n("styles",e,"content","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})," "]}),values:s[o].radius,onChange:e=>n("styles",e,"content",o,"radius")}),(0,l.jsx)(yt,{value:s.shadow,onChange:e=>n("styles",e,"content","shadow")})]})})},ZA=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{media:s}=i;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Media","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:s[o].padding,onChange:e=>n("styles",e,"media",o,"padding")}),(0,l.jsx)(An,{value:s.bg,onChange:e=>n("styles",e,"media","bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>n("styles",e,"media","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:s.radius,onChange:e=>n("styles",e,"media","radius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:s.shadow,onChange:e=>n("styles",e,"media","shadow")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Overlay","b-blocks"),checked:s.overlay.isOverlay,onChange:e=>n("styles",e,"media","overlay","isOverlay")}),s.overlay.isOverlay&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Overlay Color","b-blocks"),value:s.overlay.bg,onChange:e=>n("styles",e,"media","overlay","bg")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Opacity","b-blocks"),value:"number"==typeof s.overlay.opacity?s.overlay.opacity:parseFloat(s.overlay.opacity)||.5,onChange:e=>n("styles",e,"media","overlay","opacity"),min:0,max:1,step:.1})]})]})})},XA=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ZA,{...e}),(0,l.jsx)(QA,{...e})]}),JA=e=>{const{attributes:t,setAttributes:n}=e,{advanced:o}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",initialTabName:"general",tabs:ZP,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(KA,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(XA,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:o,onChange:e=>n({advanced:e})})})]})})})})},eB=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:s,styles:a,media:r,advanced:c}=e,d=`#${o} .b-blocks-media-text-section-wrapper`,u=`${d} .b-blocks-media-text-section-media`,p=`${d} .b-blocks-media-text-section-content`,h=`${u} .b-blocks-media-text-section-media-el`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{ |
| 498 |
__html:`\n ${d}{\n ${na("flex-direction",s.desktop.direction)}\n ${na("align-items",s.desktop.alignItems)}\n ${na("gap",a.layout.desktop.gap)}\n }\n\n ${u}{\n position:relative;\n ${na("width",a.layout.desktop.ratio.media)}\n ${na("padding",ha(a.media.desktop.padding))}\n ${sa(a.media.border)}\n ${na("border-radius",ha(a.media.radius))}\n ${oa(a.media.bg)}\n ${na("box-shadow",la(a.media.shadow))}\n }\n\n ${a.media.overlay.isOverlay?`${u}::before{\n content:'';\n position:absolute;\n inset:0;\n pointer-events:none;\n z-index:2;\n ${oa(a.media.overlay.bg)}\n ${na("opacity",a.media.overlay.opacity)}\n }`:""}\n\n ${p}{\n ${na("width",a.layout.desktop.ratio.content)}\n ${na("padding",ha(a.content.desktop.padding))}\n ${oa(a.content.bg)}\n ${sa(a.content.border)}\n ${na("border-radius",ha(a.content.desktop.radius))}\n ${na("box-shadow",la(a.content.shadow))}\n }\n\n ${h}{\n position:relative;\n z-index:3;\n pointer-events:auto;\n ${na("object-fit","image"===r?.mediaType?a.media.image?.objFit:a.media.video?.objFit)}\n }\n\n ${u}.has-controls-on-hover video::-webkit-media-controls-panel {\n opacity: 0;\n transition: opacity 0.25s ease-in-out;\n }\n ${u}.has-controls-on-hover:hover video::-webkit-media-controls-panel,\n ${u}.has-controls-on-hover:focus-within video::-webkit-media-controls-panel,\n ${u}.has-controls-on-hover video:focus::-webkit-media-controls-panel,\n ${u}.has-controls-on-hover video:active::-webkit-media-controls-panel {\n opacity: 1 !important;\n }\n\n ${t}{\n ${d}{\n ${na("flex-direction",s.tablet.direction)}\n ${na("align-items",s.tablet.alignItems)}\n ${na("gap",a.layout.tablet.gap)}\n }\n\n ${u}{\n ${na("width",a.layout.tablet.ratio.media)}\n ${na("padding",ha(a.media.tablet.padding))}\n }\n\n ${p}{\n ${na("width",a.layout.tablet.ratio.content)}\n ${na("padding",ha(a.content.tablet.padding))}\n }\n }\n\n ${n}{\n ${d}{\n ${na("flex-direction",s.mobile.direction)}\n ${na("align-items",s.mobile.alignItems)}\n ${na("gap",a.layout.mobile.gap)}\n }\n\n ${u}{\n ${na("width",a.layout.mobile.ratio.media)}\n ${na("padding",ha(a.media.mobile.padding))}\n }\n\n ${p}{\n ${na("width",a.layout.mobile.ratio.content)}\n ${na("padding",ha(a.content.mobile.padding))}\n ${na("border-radius",ha(a.content.mobile.radius))}\n }\n }\n\n ${_a(o,c,i)}\n\n `}})},tB=(e={})=>{const t=[];return e.allowDownload||t.push("nodownload"),!1===e.allowFullscreen&&t.push("nofullscreen"),!1===e.allowPip&&t.push("noremoteplayback"),t.length?t.join(" "):void 0},nB=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{media:s}=t,a=(0,f.useSelect)((e=>e("core/block-editor").getBlocks(o).length>0),[o]),r=fe(t,n),c=(0,Qs.useRef)(null),d="video"===s?.mediaType,u=d?!!s?.video?.url:!!s?.image?.url;return(0,Qs.useEffect)((()=>{if(d&&c.current){const e=c.current;e.muted=!1!==s?.video?.muted,s?.video?.autoplay?e.play().catch((()=>{})):e.pause();const t=e=>{e.stopPropagation()};return e.addEventListener("pointerdown",t,!0),e.addEventListener("mousedown",t,!0),e.addEventListener("touchstart",t,!0),()=>{e.removeEventListener("pointerdown",t,!0),e.removeEventListener("mousedown",t,!0),e.removeEventListener("touchstart",t,!0)}}}),[d,s?.video?.url,s?.video?.autoplay,s?.video?.muted]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(JA,{setAttributes:n,attributes:t,updateObj:r,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(eB,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"b-blocks-media-text-section-wrapper",children:[(0,l.jsx)("div",{className:"b-blocks-media-text-section-media "+(s?.video?.controlsOnHover?"has-controls-on-hover":""),children:u?"video"===s?.mediaType?(0,l.jsx)("video",{ref:c,className:"b-blocks-media-text-section-media-el",src:s?.video?.url,poster:s?.video?.poster?.url||"",autoPlay:!!s?.video?.autoplay,loop:!1!==s?.video?.loop,muted:!1!==s?.video?.muted,controls:!1!==s?.video?.controls,controlsList:tB(s?.video),disablePictureInPicture:!1===s?.video?.allowPip,playsInline:!0,onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),onTouchStart:e=>e.stopPropagation()}):(0,l.jsx)("img",{className:"b-blocks-media-text-section-media-el",src:s?.image?.url,alt:s?.image?.alt||""}):(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{onSelect:e=>{d?r("media",{...s?.video,id:e.id,url:e.url},"video"):r("media",{...s?.image,id:e.id,url:e.url,alt:e.alt||""},"image")},allowedTypes:d?["video"]:["image"],value:d?s?.video?.id:s?.image?.id,render:({open:e})=>(0,l.jsxs)("div",{className:"b-blocks-media-text-section-media-el--placeholder",onClick:e,children:[(0,l.jsx)(y.Dashicon,{icon:d?"format-video":"format-image",style:{fontSize:36,width:36,height:36,marginBottom:8}}),(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:d?(0,x.__)("Select or Upload Video","b-blocks"):(0,x.__)("Select or Upload Image","b-blocks")})}),(0,l.jsx)("span",{style:{fontSize:12,opacity:.8,marginTop:4},children:(0,x.__)("Click to open Media Library","b-blocks")})]})})})}),(0,l.jsx)("div",{className:"b-blocks-media-text-section-content",children:(0,l.jsx)(h.InnerBlocks,{allowedBlocks:void 0,template:[["core/heading",{level:2,placeholder:(0,x.__)("Section heading…","b-blocks")}],["core/paragraph",{placeholder:(0,x.__)("Add your content here…","b-blocks")}]],templateLock:!1,renderAppender:a?void 0:h.InnerBlocks.ButtonBlockAppender})})]})})]})]})}));Nl(UA.name)&&(0,p.registerBlockType)(UA,{icon:wl,edit:nB,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})}) |
| 499 |
;const oB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/navigation","version":"1.0.0","title":"bBlocks Navigation","category":"bBlocks","description":"Display navigation in your website with stunning & organized appearance.","keywords":["navbar","navigation","menu","menubar"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"orientation":"is-horizontal","preset":"preset-1","alignment":"left","verticalAlignment":"left","isWrapMultipleLine":true,"isOpenOnClick":true,"isMenuIcon":true}},"hamburger":{"type":"object","default":{"buttonType":"icon","displayMenu":"mobile","button":{"size":{"desktop":30,"tablet":"","mobile":""},"color":"","padding":{"desktop":{"top":"10px","right":"10px","bottom":"10px","left":"10px"},"tablet":{},"mobile":{}}},"container":{"background":{"color":"#fff"},"padding":{"desktop":{"top":"5px","right":"5px","bottom":"5px","left":"5px"},"tablet":{},"mobile":{}}},"items":{"typo":{"fontWeight":600,"fontVariant":"600"},"padding":{"desktop":{"top":"15px","right":"15px","bottom":"15px","left":"15px"},"tablet":{},"mobile":{}},"border":{},"borderRadius":{},"colors":{"normal":{"text":"","bg":""},"hover":{"text":"","bg":""}}},"closeButton":{"color":"","alignment":"right"}}},"styles":{"type":"object","default":{"typo":{"fontWeight":600},"padding":{"desktop":{"top":"20px","right":"20px","bottom":"20px","left":"20px"},"tablet":{},"mobile":{}},"margin":{"desktop":{},"tablet":{},"mobile":{}},"colors":{"normal":{"normal":"#52555d","hover":""},"active":{"normal":"","hover":""}}}},"dropdownStyles":{"type":"object","default":{"container":{"width":{"desktop":200,"tablet":"","mobile":""},"background":{},"padding":{"desktop":{"top":"5px","right":"5px","bottom":"5px","left":"5px"},"tablet":{},"mobile":{}},"border":{},"borderRadius":{},"shadow":{}},"menuItems":{"typo":{"fontWeight":600},"padding":{"desktop":{"top":"10px","right":"10px","bottom":"10px","left":"10px"},"tablet":{},"mobile":{}},"colors":{"transition":"","normal":{"normal":"","hover":""},"active":{"normal":"","hover":""}}}}},"caret":{"type":"object","default":{"size":{"desktop":15,"tablet":"","mobile":""},"color":{"normal":"#475467","hover":"#101828"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"5px","right":"5px","bottom":"5px","left":"5px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"18px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","lodash","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","react","react-dom","lodash"]}'),iB=[{label:"Horizontal",value:"is-horizontal"},{label:"Vertical",value:"is-vertical"}],sB=[{label:"Left",value:"left",icon:Rb},{label:"Center",value:"center",icon:zb},{label:"Right",value:"right",icon:Db},{label:"Justify",value:"justify",icon:Fb}],aB=[{label:"Left",value:"left",icon:Rb},{label:"Center",value:"center",icon:zb},{label:"Right",value:"right",icon:Db}],rB=[{label:"Text",value:"text",icon:"Text"},{label:"Icon",value:"icon",icon:"Icon"}],lB=[{value:"never",label:"OFF",icon:"OFF"},{value:"mobile",label:"MOBILE",icon:"MOBILE"},{value:"always",label:"ALWAYS",icon:"ALWAYS"}],cB=e=>{const{attributes:t,updateObj:n}=e,{layout:o,hamburger:i}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Orientation","b-blocks"),labelPosition:"left",value:o.orientation,onChange:e=>n("layout",e,"orientation"),options:iB}),"is-horizontal"===o.orientation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Allow wrap to multiple lines","b-blocks"),checked:o.isWrapMultipleLine,onChange:e=>n("layout",e,"isWrapMultipleLine")}),(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Alignment","b-blocks"),value:o.alignment,onChange:e=>n("layout",e,"alignment"),options:sB,isIcon:!0,size:"small"})]}),"is-vertical"===o.orientation&&(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Alignment","b-blocks"),value:o.verticalAlignment,onChange:e=>n("layout",e,"verticalAlignment"),options:aB,isIcon:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Dropdown / Sub Menus","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Open on Click","b-blocks"),checked:o.isOpenOnClick,onChange:e=>n("layout",e,"isOpenOnClick")}),!o.isOpenOnClick&&(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show arrow(caret icon)","b-blocks"),checked:o.isMenuIcon,onChange:e=>n("layout",e,"isMenuIcon")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Hamburger Menu","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Tn,{label:(0,x.__)("Button Type","b-blocks"),value:i.buttonType,onChange:e=>n("hamburger",e,"buttonType"),options:rB,isTextIcon:!0}),(0,l.jsx)(v,{children:(0,x.__)("Display Hamburger Menu","b-blocks")}),(0,l.jsx)(Tn,{value:i.displayMenu,onChange:e=>n("hamburger",e,"displayMenu"),isTextIcon:!0,options:lB})]})]})},dB=({attributes:e,updateObj:t,device:n})=>{const{dropdownStyles:o}=e,{container:i,menuItems:s}=o,{width:a,background:r,padding:c,border:d,borderRadius:u,shadow:p}=i||{},{padding:h,typo:g,colors:m}=s;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Dropdown / Sub Menus","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:[{title:"Container",name:"container"},{title:"Items",name:"items"}],children:e=>(0,l.jsxs)(l.Fragment,{children:["container"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.PanelRow,{children:[(0,x.__)("Min Width (PX)","b-blocks"),(0,l.jsx)(_,{})]}),value:a[n],onChange:e=>t("dropdownStyles",e,"container","width",n),min:100,max:600}),(0,l.jsx)(An,{className:"mt20 mb20",isImage:!1,value:r,onChange:e=>t("dropdownStyles",e,"container","background")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:c[n],onChange:e=>t("dropdownStyles",e,"container","padding",n)}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt20 mb20",label:(0,x.__)("Border","b-blocks"),value:d,onChange:e=>t("dropdownStyles",e,"container","border")}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:u,onChange:e=>t("dropdownStyles",e,"container","borderRadius")}),(0,l.jsx)(yt,{className:"mt20",label:(0,x.__)("Shadow","b-blocks"),value:p,onChange:e=>t("dropdownStyles",e,"container","shadow")})]}),"items"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:h[n], |
| 500 |
onChange:e=>t("dropdownStyles",e,"menuItems","padding",n)}),(0,l.jsx)(Os,{className:"mt20",value:g,onChange:e=>t("dropdownStyles",e,"menuItems","typo")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Active",name:"active"}],children:({name:e})=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Hover",name:"hover"}],children:({name:n})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text","b-blocks"),value:m[e][n],onChange:o=>t("dropdownStyles",o,"menuItems","colors",e,n)}),"normal"===e&&"hover"===n&&(0,l.jsx)(y.RangeControl,{className:"mt20",label:(0,x.__)("Transition","b-blocks"),min:0,max:5,step:.1})]})})})})]})]})})})},uB=({attributes:e,updateObj:t,device:n})=>{const{hamburger:o}=e,{button:i,container:s,items:a,closeButton:r}=o;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Hamburger Menu","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:[{title:"Button",name:"button"},{title:"Container",name:"container"},{title:"Items",name:"items"},{title:"Close Icon",name:"close"}],children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:["button"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{className:"mt10 mb20",label:(0,l.jsxs)(y.PanelRow,{children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),value:i.size[n],onChange:e=>t("hamburger",e,"button","size",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:i.padding[n],onChange:e=>t("hamburger",e,"button","padding",n)}),(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color","b-blocks"),value:i.color,onChange:e=>t("hamburger",e,"button","color")})]}),"container"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:s.padding[n],onChange:e=>t("hamburger",e,"container","padding",n)}),(0,l.jsx)(An,{className:"mt20",value:s.background,onChange:e=>t("hamburger",e,"container","background")})]}),"items"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:a.padding[n],onChange:e=>t("hamburger",e,"items","padding",n)}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt20 mb20",label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>t("hamburger",e,"items","border")}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:a.borderRadius,resetValues:{left:"0px",right:"0px",top:"0px",bottom:"0px"},onChange:e=>t("hamburger",e,"items","borderRadius")}),(0,l.jsx)(Os,{className:"mt20",value:a.typo,onChange:e=>t("hamburger",e,"items","typo")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Hover",name:"hover"}],children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color","b-blocks"),value:a.colors[e].text,onChange:n=>t("hamburger",n,"items","colors",e,"text")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Background Color","b-blocks"),value:a.colors[e].bg,onChange:n=>t("hamburger",n,"items","colors",e,"bg")})]})})]}),"close"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:r.color,onChange:e=>t("hamburger",e,"closeButton","color")}),(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Alignment","b-blocks"),options:[{label:"Left",value:"left",icon:Rb},{label:"Center",value:"center",icon:zb},{label:"Right",value:"right",icon:Db}],value:r.alignment,onChange:e=>t("hamburger",e,"closeButton","alignment"),isIcon:!0})]})]})})})},pB=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,device:n,updateObj:o}=e,{styles:i,caret:s}=t,{padding:a,margin:r,typo:c,colors:d}=i;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Navigation Link/Item","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:a[n],onChange:e=>o("styles",e,"padding",n)}),(0,l.jsx)("br",{}),(0,l.jsx)("br",{}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:r[n],onChange:e=>o("styles",e,"margin",n)}),(0,l.jsx)(Os,{className:"mt20",value:c,onChange:e=>o("styles",e,"typo")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Active",name:"active"}],children:({name:e})=>(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Hover",name:"hover"}],children:({name:t})=>(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text","b-blocks"),value:d[e][t],onChange:n=>o("styles",n,"colors",e,t)})})})]}),(0,l.jsx)(dB,{...e}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caret","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.RangeControl,{label:(0,l.jsxs)(y.PanelRow,{children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),value:s.size[n],onChange:e=>o("caret",e,"size",n),min:0,max:100}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Hover",name:"hover"}],children:({name:e})=>(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:s.color[e],onChange:t=>o("caret",t,"color",e)})})]}),(0,l.jsx)(uB,{...e})]})})),hB=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,[s,a]=(0,m.useState)(!1),r={isPremium:o,setIsProModalOpen:a},c=(e,o,...i)=>{n({[e]:be(t[e],o,...i)})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Xt,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(cB,{...e,premiumProps:r,updateObj:c}),"style"===t.name&&(0,l.jsx)(pB,{...e,updateObj:c}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,isPremium:o,onChange:e=>n({advanced:e}),enabled:{dimension:["padding","margin"],background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],visibility:["zIndex","overflow"],responsive:!0,css:!0}})]})})}),(0,l.jsx)(qs,{isProModalOpen:s,setIsProModalOpen:a,link:yn,children:(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Feature: ","b-blocks")}),(0,x.__)("Feature details.","b-blocks")]})})]})},gB="bBlocksNavigation",mB=(e,t,n=!1)=>{const{styles:o,dropdownStyles:i,caret:s,hamburger:a,advanced:r}=e,{padding:l,margin:c,typo:d,colors:u}=o,{container:p,menuItems:h}=i,g=`#${t} .${gB} .wp-block-navigation`,m=` ${g} .wp-block-navigation__container .wp-block-navigation-item`,b=`${m} .wp-block-navigation__submenu-container`,f=`${b} .wp-block-navigation-item`,x=`${m} .wp-block-navigation__submenu-icon`,y=`${g} .wp-block-navigation__responsive-container-open`,v=`${g} .is-menu-open`,k=`${v} .wp-block-navigation__container .wp-block-navigation-item .wp-block-navigation-item__content`,w=`${v} .components-button.wp-block-navigation__responsive-container-close`,_=`${m}.current-menu-item`,C=`${f} a[aria-current='page']` |
| 501 |
;return`\n\t\t${Ca(t,r,n)}\n\t\t${pa("",d)?.googleFontLink}\n\t\t${pa("",h.typo)?.googleFontLink}\n\t\t${pa("",a.items.typo)?.googleFontLink}\n\n\t\t${pa(m,d)?.styles}\n\t\t${m}{\n\t\t\tpadding:${ha(l?.desktop)};\n\t\t\tmargin:${ha(c?.desktop)};\n\t\t\tcolor:${u.normal.normal};\n\t\t\ttransition:all 0.3s ease-in-out;\n\t\t}\n\t\t${m}:hover{\n\t\t\tcolor: ${u.normal.hover};\n\t\t}\n\t\t${b}{\n\t\t\t${na("min-width",jt(p.width.desktop)?`${p.width.desktop}px !important`:"")}\n\t\t\t${oa(p.background)}\n\t\t\tpadding:${ha(p.padding.desktop)};\n\t\t\t${sa(p.border)}\n\t\t\tborder-radius:${ha(p.borderRadius)};\n\t\t\tbox-shadow:${la(p.shadow)};\n\t\t}\n\t\t${pa(f,h.typo).styles}\n\t\t${f}{\n\t\t\t${na("padding",ha(h.padding.desktop))}\n\t\t\t${na("color",h.colors.normal.normal)}\n\t\t\ttransition:all ${h.colors.transition||.3}s;\n\t\t}\n\t\t${f}:hover{\n\t\t\t${na("color",h.colors.normal.hover)}\n\t\t}\n\t\t${x}{\n\t\t\t${na("width",jt(s.size.desktop)?s.size.desktop+"px !important":"")}\n\t\t\t${na("height",jt(s.size.desktop)?s.size.desktop+"px !important":"")}\n\t\t\t${na("color",s.color.normal)}\n\t\t\ttransition: all ${h.colors.transition||.3}s ease-in-out;\n\t\t}\n\t\t${m}:hover .wp-block-navigation__submenu-icon{\n\t\t\tcolor: ${s.color.hover} !important;\n\t\t}\n\t\t${_}{\n\t\t\t${na("color",u.active.normal)}\n\t\t\ttransition:all 0.2s ease-in-out;\n\t\t}\n\t\t${_}:hover{\n\t\t\t${na("color",u.active.hover)}\n\t\t}\n\t\t${C}{\n\t\t\t${na("color",h.colors.active.normal)}\n\t\t\ttransition:all ${h.colors.transition||.2}s ease-in-out;\n\t\t}\n\t\t${C}:hover{\n\t\t\t${na("color",h.colors.active.hover)}\n\t\t}\n\t\t${y} svg{\n\t\t\theight: ${a.button.size.desktop}px;\n\t\t\twidth: ${a.button.size.desktop}px;\n\t\t\tfill: ${a.button.color};\n\t\t}\n\t\t${y}{\n\t\t\t${na("padding",ha(a.button.padding.desktop))}\n\t\t}\n\t\t${v}{\n\t\t\t${na("padding",ha(a.container.padding.desktop))}\n\t\t\t${oa(a.container.background)}\n\t\t}\n\n\t\t${pa(k,a.items.typo).styles}\n\t\t${k}{\n\t\t\t${na("background",a.items.colors.normal.bg)}\n\t\t\t${na("color",a.items.colors.normal.text)}\n\t\t\t${na("padding",ha(a.items.padding.desktop))}\n\t\t\t${sa(a.items.border)}\n\t\t\t${na("border-radius",ha(a.items.borderRadius))}\n\t\t\ttransition: all 0.3s ease-in-out;\n\t\t}\n\t\t${k}:hover{\n\t\t\tbackground:${a.items.colors.hover.bg} !important;\n\t\t\tcolor:${a.items.colors.hover.text} !important;\n\t\t}\n\t\t${w}{\n\t\t\tcolor:${a.closeButton?.color};\n\t\t\t${"right"===a.closeButton.alignment?"right:0;":"left"===a.closeButton.alignment?"left:0px;":"left:50%;"}\n\t\t}\n\t\t@media only screen and (min-width:641px) and (max-width: 1024px){\n\t\t\t${m}{\n\t\t\t\t${na("padding",ha(l?.tablet))}\n\t\t\t\t${na("margin",ha(c?.tablet))}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\tmin-width:${p.width.tablet}px !important;\n\t\t\t\t${na("padding",ha(p.padding.tablet))}\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\t${na("padding",ha(h.padding.tablet))}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${na("width",jt(s.size.tablet)?s.size.tablet+"px !important":"")}\n\t\t\t\t${na("height",jt(s.size.tablet)?s.size.tablet+"px !important":"")}\n\t\t\t}\n\t\t\t${y} svg{\n\t\t\t\theight:${a.button.size.tablet}px;\n\t\t\t\twidth:${a.button.size.tablet}px;\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${na("padding",ha(a.button.padding.tablet))}\n\t\t\t}\n\t\t\t${v}{\n\t\t\t\t${na("padding",ha(a.container.padding.tablet))}\n\t\t\t}\n\t\t\t${k}{\n\t\t\t\t${na("padding",ha(a.items.padding.tablet))}\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px){\n\t\t\t${m}{\n\t\t\t\t${na("padding",ha(l?.mobile))}\n\t\t\t\t${na("margin",ha(c?.mobile))}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\tmin-width:${p.width.mobile}px !important;\n\t\t\t\t${na("padding",ha(p.padding.mobile))}\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\t${na("padding",ha(h.padding.mobile))}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${na("width",jt(s.size.mobile)?s.size.mobile+"px !important":"")}\n\t\t\t\t${na("height",jt(s.size.mobile)?s.size.mobile+"px !important":"")}\n\t\t\t}\n\t\t\t${y} svg{\n\t\t\t\theight:${a.button.size.mobile}px;\n\t\t\t\twidth:${a.button.size.mobile}px;\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${na("padding",ha(a.button.padding.mobile))}\n\t\t\t}\n\t\t\t${v}{\n\t\t\t\t${na("padding",ha(a.container.padding.mobile))}\n\t\t\t}\n\t\t\t${k}{\n\t\t\t\t${na("padding",ha(a.items.padding.mobile))}\n\t\t\t}\n\t\t}\n\t`},bB=(0,w.createHigherOrderComponent)((e=>t=>{const{name:n,clientId:o,isSelected:i}=t;if(n&&"core/navigation"!=n)return(0,l.jsx)(e,{...t});const s=(0,f.select)("core/block-editor").getBlockParents(o);let a,r=!1;return s.map((e=>{const t=(0,f.select)("core/block-editor").getBlock(e);t&&"b-blocks/navigation"==t.name&&(r=!0)})),r&&i?(setTimeout((()=>{if(a=document.querySelector(".block-editor-block-inspector"),a){let e=a.querySelector(".block-editor-block-inspector__tabs");if(e){let t=e.querySelectorAll("[aria-label='Settings'], [aria-label='Styles']");t&&t.forEach((e=>{e.style.display="none"}))}}}),200),a?(setTimeout((()=>{let e=a.children;a.querySelector(".block-editor-block-inspector__tabs").querySelectorAll("[aria-label='Settings'], [aria-label='Styles']").forEach((e=>{e.style.display="none"}));for(let t=0;t<=e.length-1;t++){let n=e[t].classList.contains("block-editor-block-card"),o=e[t].classList.contains("block-editor-block-inspector__tabs"),i=e[t].children;if(!n&&!o)for(let e=0;e<=i.length-1;e++)i[e].querySelector(".wp-block-navigation__navigation-selector")||(i[e].style.display="none")}}),200),(0,l.jsx)(e,{...t})):(0,l.jsx)(e,{...t})):(a=document.querySelector(".block-editor-block-inspector"),a&&setTimeout((()=>{const e=a.querySelector(".block-editor-block-card");e&&(e.style.display="block");let t=a.children;for(let e=0;e<=t.length-1;e++){let n=t[e].children;for(let e=0;e<=n.length-1;e++)n[e].style.display="block"}}),200),(0,l.jsx)(e,{...t}))}),"withInspectorControl");wp.hooks.addFilter("editor.BlockEdit","b-blocks/navigation",bB);const fB=({attributes:e,clientId:t})=>{const{layout:n,hamburger:o}=e,{orientation:i,isWrapMultipleLine:s}=n,{displayMenu:a}=o,r=(0,m.useRef)(),c=(0,f.select)("core/block-editor").getBlocksByClientId(t)[0],{updateBlockAttributes:d}=(0,f.dispatch)("core/block-editor");(0,m.useEffect)((()=>{c?.innerBlocks&&c?.innerBlocks.forEach((e=>{d(e.clientId,{openSubmenusOnClick:n.isOpenOnClick,showSubmenuIcon:n.isMenuIcon,overlayMenu:o.displayMenu,hasIcon:"icon"===o.buttonType,icon:"icon"===o.buttonType?"handle":"text"})}))}),[n.isOpenOnClick,n.isMenuIcon,o.displayMenu,o.buttonType,c]);const u=`${i} ${a} ${s?"":"no-wrap"} ${"is-vertical"===n.orientation?"vertical-align-"+n.verticalAlignment:"horizontal-align-"+n.alignment}`;return(0,l.jsx)("div",{className:`${gB} ${u}`,children:(0,l.jsx)(h.InnerBlocks,{templateLock:!1,ref:r,template:[["core/navigation",{className:"bPl-navigation"}]],allowedBlocks:["core/navigation"],renderAppender:(0,f.select)("core/block-editor").getBlock(t)?.innerBlocks.length<1&&h.InnerBlocks.ButtonBlockAppender})})};Nl(oB.name)&&(0,p.registerBlockType)(oB,{icon:Pr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,[i,s]=(0,m.useState)(0),a=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(hB,{attributes:t,setAttributes:n,isPremium:a,activeIndex:i,setActiveIndex:s,clientId:o}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{children:mB(t,`block-${o}`,!0)}),(0,l.jsx)("div",{children:(0,l.jsx)(fB,{...e})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})}) |
| 502 |
;const xB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/news-ticker","version":"0.1.0","title":"News Ticker","category":"bBlocks","textdomain":"b-blocks","description":"Display a scrolling news ticker with posts from any post type","example":{},"attributes":{"postType":{"type":"string","default":"post"},"selectedCategories":{"type":"array","default":[]},"selectedPosts":{"type":"array","default":[]},"selectAllCategories":{"type":"boolean","default":false},"speed":{"type":"number","default":50},"enableClick":{"type":"boolean","default":true},"textColor":{"type":"string","default":"#ffffff"},"backgroundColor":{"type":"string","default":"#667eea"},"fontSize":{"type":"number","default":15},"fontWeight":{"type":"string","default":"400"},"fontFamily":{"type":"string","default":""},"headingText":{"type":"string","default":"News:"}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}');Nl(xB.name)&&(0,p.registerBlockType)(xB,{icon:Kr,edit:function({attributes:e,setAttributes:t}){const{postType:n,selectedCategories:o,selectedPosts:i,selectAllCategories:s,speed:a,enableClick:r,textColor:c,backgroundColor:d,fontSize:u,fontWeight:p,fontFamily:g,headingText:m}=e,[b,v]=(0,Qs.useState)([]),[k,w]=(0,Qs.useState)(!1),_=(0,f.useSelect)((e=>{const{getPostTypes:t}=e(wp.coreData.store),n=t({per_page:-1});return n?.filter((e=>e.viewable))||[]}),[]),C=(0,f.useSelect)((e=>{if(!n)return[];const{getTaxonomies:t}=e(wp.coreData.store);return(t({per_page:-1})||[]).filter((e=>e.types.includes(n)&&e.visibility.publicly_queryable))}),[n]),j=(0,f.useSelect)((e=>{if(!n||0===C.length)return[];const{getEntityRecords:t}=e(wp.coreData.store);return t("taxonomy",C[0].slug,{per_page:-1})||[]}),[n,C]),{posts:$,isResolving:S}=(0,f.useSelect)((e=>{if(!n)return{posts:[],isResolving:!1};const{getEntityRecords:t,isResolving:i}=e(wp.coreData.store),s={per_page:-1,status:"publish",orderby:"date",order:"desc"};return o.length>0&&C.length>0&&(s[C[0].rest_base]=o),{posts:t("postType",n,s)||[],isResolving:i("getEntityRecords",["postType",n,s])}}),[n,o,C]);(0,Qs.useEffect)((()=>{S?w(!0):(v($),w(!1))}),[$,S]);const T=s&&o.length>0?b:b.filter((e=>i.includes(e.id))),M=_.map((e=>({label:e.name,value:e.slug}))),N=[{name:(0,x.__)("Small","b-blocks"),size:12,slug:"small"},{name:(0,x.__)("Normal","b-blocks"),size:15,slug:"normal"},{name:(0,x.__)("Medium","b-blocks"),size:18,slug:"medium"},{name:(0,x.__)("Large","b-blocks"),size:22,slug:"large"},{name:(0,x.__)("Extra Large","b-blocks"),size:28,slug:"extra-large"}],L={backgroundColor:d,color:c,fontSize:u+"px",fontWeight:p,fontFamily:g||void 0},E="page"===n,P=j.length>0&&!E;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Ticker Settings","b-blocks"),children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Ticker Heading Text","b-blocks"),value:m,onChange:e=>t({headingText:e}),help:(0,x.__)("Customize the heading text that appears on the ticker label","b-blocks"),placeholder:(0,x.__)("News:","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Post Type","b-blocks"),value:n,options:M,onChange:e=>{t({postType:e,selectedCategories:[],selectedPosts:[],selectAllCategories:!1})}}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Scrolling Speed","b-blocks"),value:a,onChange:e=>t({speed:e}),min:10,max:100,help:(0,x.__)("Lower values are slower, higher values are faster","b-blocks")}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Click to Post","b-blocks"),checked:r,onChange:e=>t({enableClick:e}),help:(0,x.__)("Allow users to click on ticker items to visit the post","b-blocks")})]}),(0,l.jsx)(h.PanelColorSettings,{title:(0,x.__)("Color Settings","b-blocks"),colorSettings:[{value:c,onChange:e=>t({textColor:e||"#ffffff"}),label:(0,x.__)("Text Color","b-blocks")},{value:d,onChange:e=>t({backgroundColor:e||"#667eea"}),label:(0,x.__)("Background Color","b-blocks")}]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Typography","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.FontSizePicker,{fontSizes:N,value:u,onChange:e=>t({fontSize:e||15})}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Font Weight","b-blocks"),value:p,options:[{label:(0,x.__)("Thin (100)","b-blocks"),value:"100"},{label:(0,x.__)("Extra Light (200)","b-blocks"),value:"200"},{label:(0,x.__)("Light (300)","b-blocks"),value:"300"},{label:(0,x.__)("Normal (400)","b-blocks"),value:"400"},{label:(0,x.__)("Medium (500)","b-blocks"),value:"500"},{label:(0,x.__)("Semi Bold (600)","b-blocks"),value:"600"},{label:(0,x.__)("Bold (700)","b-blocks"),value:"700"},{label:(0,x.__)("Extra Bold (800)","b-blocks"),value:"800"},{label:(0,x.__)("Black (900)","b-blocks"),value:"900"}],onChange:e=>t({fontWeight:e})}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Font Family","b-blocks"),value:g,options:[{label:(0,x.__)("Default","b-blocks"),value:""},{label:"Arial",value:"Arial, sans-serif"},{label:"Helvetica",value:"Helvetica, sans-serif"},{label:"Georgia",value:"Georgia, serif"},{label:"Times New Roman",value:'"Times New Roman", serif'},{label:"Courier New",value:'"Courier New", monospace'},{label:"Verdana",value:"Verdana, sans-serif"},{label:"Trebuchet MS",value:'"Trebuchet MS", sans-serif'}],onChange:e=>t({fontFamily:e})})]}),P&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Filter by Category","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Select all entry of the following Category","b-blocks"),checked:s,onChange:e=>{t({selectAllCategories:e,selectedPosts:e?[]:i})},help:s?(0,x.__)("All posts from selected categories will be shown. Individual post selection is disabled.","b-blocks"):(0,x.__)("Select categories to filter posts, then choose individual posts below.","b-blocks")}),(0,l.jsx)("div",{style:{maxHeight:"200px",overflowY:"auto",marginTop:"16px",paddingTop:"8px",borderTop:"1px solid #ddd"},children:j.map((e=>(0,l.jsx)(y.CheckboxControl,{label:e.name,checked:o.includes(e.id),onChange:()=>(e=>{const n=o.includes(e)?o.filter((t=>t!==e)):[...o,e];t({selectedCategories:n,selectedPosts:s?[]:i})})(e.id)},e.id)))})]}),!s&&(0,l.jsx)(y.PanelBody,{title:E?(0,x.__)("Select Pages","b-blocks"):(0,x.__)("Select Posts","b-blocks"),initialOpen:!0,children:k?(0,l.jsx)(y.Spinner,{}):0===b.length?(0,l.jsx)("p",{children:E?(0,x.__)("No pages found.","b-blocks"):(0,x.__)("No posts found for this post type and category selection.","b-blocks")}):(0,l.jsx)("div",{style:{maxHeight:"400px",overflowY:"auto"},children:b.map((e=>(0,l.jsx)(y.CheckboxControl,{label:e.title.rendered||(0,x.__)("(no title)","b-blocks"),checked:i.includes(e.id),onChange:()=>(e=>{const n=i.includes(e)?i.filter((t=>t!==e)):[...i,e];t({selectedPosts:n})})(e.id)},e.id)))})}),s&&o.length>0&&(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Preview","b-blocks"),initialOpen:!1,children:(0,l.jsxs)("p",{className:"components-base-control__help",children:[(0,x.__)("All posts from the selected categories will be displayed in the ticker.","b-blocks")," ",b.length>0&&(0,l.jsxs)("strong",{children:[b.length," ",1===b.length?(0,x.__)("post found","b-blocks"):(0,x.__)("posts found","b-blocks")]})]})})]}),(0,l.jsx)("div",{...(0,h.useBlockProps)({style:L}),children:0===T.length?(0,l.jsx)(y.Placeholder,{icon:"slides",label:(0,x.__)("News Ticker","b-blocks"),instructions:E?(0,x.__)("Select pages from the sidebar to display in the ticker.","b-blocks"):s?(0,x.__)("Select categories from the sidebar to display all posts in the ticker.","b-blocks"):(0,x.__)("Select posts from the sidebar to display in the ticker.","b-blocks")}):(0,l.jsxs)("div",{className:"news-ticker-wrapper",children:[(0,l.jsx)("div",{className:"news-ticker-label",style:{backgroundColor:"rgba(0, 0, 0, 0.2)",color:c},children:m||(0,x.__)("News:","b-blocks")}),(0,l.jsx)("div",{className:"news-ticker-content",children:(0,l.jsx)("div",{className:"news-ticker-items",children:T.map((e=>(0, |
| 503 |
l.jsx)("span",{className:"news-ticker-item",style:{color:c,fontSize:u+"px",fontWeight:p,fontFamily:g||void 0},children:e.title.rendered||(0,x.__)("(no title)","b-blocks")},e.id)))})})]})})]})}});const yB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/off-canvas","title":"Off-Canvas Drawer","description":"A slide-in drawer panel triggered by a button. Compose any blocks inside. Accessible focus trap, Escape to close, backdrop dismissal, and reduced-motion aware.","category":"bBlocks","keywords":["off-canvas","drawer","side panel","mobile menu","slide-in"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"trigger":{"type":"object","default":{"label":"Open Menu","showIcon":true,"iconPosition":"left","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 24 24\'><path fill=\'currentColor\' d=\'M3 6h18v2H3V6zm0 5h18v2H3v-2zm0 5h18v2H3v-2z\' /></svg>","iconStyle":{"color":"","size":{"desktop":"18px","tablet":"","mobile":""},"gap":"8px"},"align":"left","typo":{"fontSize":{"desktop":"15px","tablet":null,"mobile":null}},"transition":200,"normal":{"bg":{"type":"solid","color":"#1e1e1e"},"color":"#ffffff","border":{},"padding":{"desktop":{"top":"10px","right":"18px","bottom":"10px","left":"18px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"hover":{"bg":{},"color":"","border":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}}},"drawer":{"type":"object","default":{"side":"left","width":{"desktop":"320px","tablet":"","mobile":"85vw"},"height":{"desktop":"","tablet":"","mobile":""},"bg":{"type":"solid","color":"#ffffff"},"padding":{"desktop":{"top":"24px","right":"24px","bottom":"24px","left":"24px"},"tablet":{},"mobile":{}},"border":{},"borderRadius":{"desktop":{},"tablet":{},"mobile":{}}}},"overlay":{"type":"object","default":{"show":true,"color":"rgba(0,0,0,0.5)"}},"options":{"type":"object","default":{"closeLabel":"Close","triggerEvent":"click"}},"transition":{"type":"object","default":{"type":"default","duration":400,"easing":"ease"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),vB=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,kB=({attributes:e,id:o,isBackend:i=!1})=>{const{trigger:s={},drawer:a={},overlay:r={},transition:c={}}=e,d=`#${o}`,u=`${d} .b-blocks-off-canvas-trigger`,p=`${d} .b-blocks-off-canvas-icon`,h=`${d} .b-blocks-off-canvas-panel, ${d} .b-blocks-off-canvas-editor-preview`,g=`${d} .b-blocks-off-canvas-overlay`,m=s.iconStyle||{},b=(e,t,n)=>na(e,ha(t?.[n])),f=!1===r.show?"transparent":r.color||"rgba(0,0,0,0.5)",x=e=>`\n\t\t${d}{\n\t\t\t${na("text-align",s.align)}\n\t\t\t--b-blocks-off-canvas-duration: ${parseInt(c.duration,10)||0}ms;\n\t\t\t--b-blocks-off-canvas-easing: ${c.easing||"ease"};\n\t\t\t${na("--b-blocks-off-canvas-width",vB(a.width,e))}\n\t\t}\n\t\t${u}{\n\t\t\t${b("padding",s.normal?.padding,e)}\n\t\t\t${b("border-radius",s.normal?.borderRadius,e)}\n\t\t}\n\t\t${u}:hover{\n\t\t\t${b("padding",s.hover?.padding,e)}\n\t\t\t${b("border-radius",s.hover?.borderRadius,e)}\n\t\t}\n\t\t${p}{\n\t\t\t${na("width",vB(m.size,e))}\n\t\t\t${na("height",vB(m.size,e))}\n\t\t}\n\t\t${h}{\n\t\t\t${b("padding",a.padding,e)}\n\t\t\t${b("border-radius",a.borderRadius,e)}\n\t\t\t${vB(a.height,e)?`${na("height",vB(a.height,e))} bottom: auto;`:""}\n\t\t}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${pa("",s.typo).googleFontLink}\n\n\t\t\t${d}{\n\t\t\t\t--b-blocks-off-canvas-overlay: ${f};\n\t\t\t}\n\n\t\t\t${p}{\n\t\t\t\t${na("color",m.color)}\n\t\t\t}\n\t\t\t${p} svg{\n\t\t\t\t${na("fill",m.color)}\n\t\t\t}\n\n\t\t\t${u}{\n\t\t\t\t${na("gap",m.gap)}\n\t\t\t\t${oa(s.normal?.bg)}\n\t\t\t\t${na("color",s.normal?.color)}\n\t\t\t\t${ia(s.normal?.border)}\n\t\t\t\ttransition: all ${parseInt(s.transition,10)||0}ms ease;\n\t\t\t}\n\t\t\t${u}:hover{\n\t\t\t\t${oa(s.hover?.bg)}\n\t\t\t\t${na("color",s.hover?.color)}\n\t\t\t\t${ia(s.hover?.border)}\n\t\t\t}\n\t\t\t${pa(u,s.typo).styles}\n\n\t\t\t${h}{\n\t\t\t\t${oa(a.bg)}\n\t\t\t\t${ia(a.border)}\n\t\t\t}\n\n\t\t\t${g}.is-open{\n\t\t\t\t${na("background-color",f)}\n\t\t\t}\n\n\t\t\t${i?`${d} .b-blocks-off-canvas-editor-preview{ ${na("width",vB(a.width,"desktop"))} max-width: 100%; }`:""}\n\n\t\t\t${x("desktop")}\n\t\t\t${t}{ ${x("tablet")} }\n\t\t\t${n}{ ${x("mobile")} }\n\n\t\t\t@media (prefers-reduced-motion: reduce){ ${d}{ --b-blocks-off-canvas-duration: 0ms; } }\n\t\t\t`}})},wB=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"},{label:"vw",value:"vw"}],_B={top:"",right:"",bottom:"",left:""},CB=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],jB=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],$B=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],SB=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Slide","b-blocks"),value:"slide"},{label:(0,x.__)("Fade","b-blocks"),value:"fade"},{label:(0,x.__)("Push","b-blocks"),value:"push"},{label:(0,x.__)("Reveal","b-blocks"),value:"reveal"},{label:(0,x.__)("Zoom","b-blocks"),value:"zoom"},{label:(0,x.__)("Flip","b-blocks"),value:"flip"},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce"}],TB=[{label:(0,x.__)("Click","b-blocks"),value:"click"},{label:(0,x.__)("Hover","b-blocks"),value:"hover"},{label:(0,x.__)("Page Load","b-blocks"),value:"load"}],MB=[{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Linear","b-blocks"),value:"linear"}],NB=({drawer:e={},overlay:t={},updateObj:n,device:o="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Drawer","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Drawer Side","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:e.side||"left",onChange:e=>n("drawer",e,"side"),children:jB.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Drawer Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.width?.[o],units:wB,onChange:e=>n("drawer",e,"width",o),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Drawer Height","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.height?.[o],units:wB,onChange:e=>n("drawer",e,"height",o),placeholder:(0,x.__)("Full","b-blocks"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Overlay","b-blocks"),checked:!1!==t.show, |
| 504 |
onChange:e=>n("overlay",!!e,"show")})]}),LB=({trigger:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Trigger Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Trigger Label","b-blocks"),value:e.label||"",onChange:e=>t("trigger",e,"label"),placeholder:(0,x.__)("Open Menu","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Trigger Icon","b-blocks"),checked:e.showIcon,onChange:e=>t("trigger",e,"showIcon")}),!1!==e.showIcon&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:e.icon,onChange:e=>t("trigger",e,"icon")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Icon Position","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:e.iconPosition,onChange:e=>t("trigger",e,"iconPosition"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Left","b-blocks"),value:"left"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Right","b-blocks"),value:"right"})]})]})]}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Trigger Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:e.align,onChange:e=>t("trigger",e,"align"),children:$B.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),EB=({transition:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Transition","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Transition Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:e.type||"default",options:SB,onChange:e=>t("transition",e,"type"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"),value:e.duration,onChange:e=>t("transition",e,"duration"),min:0,max:2e3,step:50,__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Easing:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:e.easing||"ease",options:MB,onChange:e=>t("transition",e,"easing"),__nextHasNoMarginBottom:!0})]})]}),PB=({options:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Behavior","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{children:(0,x.__)("Trigger Event","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:e.triggerEvent||"click",onChange:e=>t("options",e||"click","triggerEvent"),children:TB.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Close Button Label","b-blocks"),help:(0,x.__)("Used as the close button’s screen-reader label.","b-blocks"),value:e.closeLabel||"",onChange:e=>t("options",e,"closeLabel"),placeholder:(0,x.__)("Close","b-blocks"),__nextHasNoMarginBottom:!0})]}),AB=({attributes:e,updateObj:t,device:n="desktop"})=>{const{trigger:o={},drawer:i={},overlay:s={},options:a={},transition:r={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(NB,{drawer:i,overlay:s,updateObj:t,device:n}),(0,l.jsx)(LB,{trigger:o,updateObj:t}),(0,l.jsx)(EB,{transition:r,updateObj:t}),(0,l.jsx)(PB,{options:a,updateObj:t})]})},BB=({trigger:e={},updateObj:t,device:n="desktop"})=>{const[o,i]=(0,m.useState)("normal"),s="hover"===o,a=e[o]||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Trigger Button","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("trigger",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10 flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:a.bg,onChange:e=>t("trigger",e,o,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text / Icon Color:","b-blocks"),value:a.color,onChange:e=>t("trigger",e,o,"color"),defaultColor:s?"":"#ffffff"}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>t("trigger",e,o,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:wB,values:a.padding?.[n],resetValues:_B,onChange:e=>t("trigger",e,o,"padding",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:wB,values:a.borderRadius?.[n],resetValues:_B,onChange:e=>t("trigger",e,o,"borderRadius",n)}),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (ms)","b-blocks"),value:e.transition,onChange:e=>t("trigger",e,"transition"),min:0,max:2e3,step:50,help:(0,x.__)("Hover animation speed.","b-blocks"),__nextHasNoMarginBottom:!0})]})},IB=({trigger:e={},updateObj:t,device:n="desktop"})=>{const o=e.iconStyle||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Trigger Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:o.color,onChange:e=>t("trigger",e,"iconStyle","color")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o.size?.[n],units:wB,onChange:e=>t("trigger",e,"iconStyle","size",n),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Icon / Label Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o.gap,units:wB,onChange:e=>t("trigger",e,"iconStyle","gap"),__next40pxDefaultSize:!0})]})]})},OB=({drawer:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Drawer Panel","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:e.bg,onChange:e=>t("drawer",e,"bg")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:wB,values:e.padding?.[n],resetValues:_B,onChange:e=>t("drawer",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("drawer",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:wB,values:e.borderRadius?.[n],resetValues:_B,onChange:e=>t("drawer",e,"borderRadius",n)})]}),RB=({overlay:e={},updateObj:t})=>!1===e.show?null:(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Overlay","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Ue,{label:(0,x.__)("Overlay Color:","b-blocks"),value:e.color,onChange:e=>t("overlay",e,"color"),defaultColor:"rgba(0,0,0,0.5)"})}),zB=({attributes:e,updateObj:t,device:n="desktop"})=>{const{trigger:o={},drawer:i={},overlay:s={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(BB,{trigger:o,updateObj:t,device:n}),!1!==o.showIcon&&(0,l.jsx)(IB,{trigger:o,updateObj:t,device:n}),(0,l.jsx)(OB,{drawer:i,updateObj:t,device:n}),(0, |
| 505 |
l.jsx)(RB,{overlay:s,updateObj:t})]})},DB=e=>(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:CB,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(AB,{...e}),"style"===t.name&&(0,l.jsx)(zB,{...e})]})})]}),FB=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o}=e("core/block-editor");return{device:n()?.toLowerCase(),innerBlocks:o(t)}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,innerBlocks:i}=e,{trigger:s={},drawer:a={},options:r={}}=t,c="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,d=fe(t,n),u=(0,h.useBlockProps)({id:`block-${o}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(DB,{...e,updateObj:d,isPremium:c}),(0,l.jsxs)("div",{...u,children:[(0,l.jsx)(kB,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsxs)("button",{type:"button",className:"b-blocks-off-canvas-trigger","aria-disabled":"true",tabIndex:-1,children:[!1!==s.showIcon&&s.icon&&"right"!==s.iconPosition&&(0,l.jsx)("span",{className:"b-blocks-off-canvas-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:s.icon}}),s.label&&(0,l.jsx)("span",{className:"b-blocks-off-canvas-trigger-label",children:s.label}),!1!==s.showIcon&&s.icon&&"right"===s.iconPosition&&(0,l.jsx)("span",{className:"b-blocks-off-canvas-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:s.icon}})]}),(0,l.jsxs)("div",{className:"b-blocks-off-canvas-editor-preview-wrap","data-side":a.side,children:[(0,l.jsxs)("div",{className:"b-blocks-off-canvas-editor-preview-header",children:[(0,l.jsx)("span",{className:"b-blocks-off-canvas-editor-preview-label",children:(0,x.__)("Drawer content (editor preview)","b-blocks")}),(0,l.jsx)("span",{className:"b-blocks-off-canvas-editor-preview-hint",children:(0,x.__)("Hidden until the trigger is clicked on the frontend.","b-blocks")})]}),(0,l.jsxs)("div",{className:"b-blocks-off-canvas-editor-preview",children:[(0,l.jsx)("button",{type:"button",className:"b-blocks-off-canvas-editor-close","aria-label":r.closeLabel,tabIndex:-1,children:(0,l.jsx)("span",{"aria-hidden":"true",children:"×"})}),(0,l.jsx)("div",{className:"b-blocks-off-canvas-editor-content bBlocksOffCanvasInnerBlocksContent",children:(0,l.jsx)(h.InnerBlocks,{renderAppender:()=>i?.length?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):(0,l.jsx)(h.InnerBlocks.ButtonBlockAppender,{})})})]})]})]})]})}));Nl(yB.name)&&(0,p.registerBlockType)(yB,{icon:dl,edit:FB,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})}) |
| 506 |
;const HB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/one-page-navigation","title":"One Page Navigation","category":"bBlocks","description":"A floating scroll-spy navigation for one-page sites: links to on-page sections, highlights the one in view and smooth-scrolls to it.","keywords":["navigation","scroll spy","one page","anchor","menu"],"textdomain":"b-blocks","supports":{"html":false,"align":false,"multiple":true},"attributes":{"blockId":{"type":"string","default":""},"layout":{"type":"object","default":{"preset":"glassBullseye","desktop":{"position":"right","verticalAlign":"center","offsetX":"","offsetY":""},"tablet":{"position":"","verticalAlign":"","offsetX":"","offsetY":""},"mobile":{"position":"","verticalAlign":"","offsetX":"","offsetY":""}}},"items":{"type":"array","default":[{"id":"opn-overview","label":"Overview","sectionId":"overview","icon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 576 512\'><path d=\'M575 236.9 308.5 26.6a33 33 0 0 0-41 0L1 236.9a12 12 0 0 0-2 16.9l21 26.6a12 12 0 0 0 16.9 2L64 260.5V464a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V352h64v112a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V260.5l27.1 21.9a12 12 0 0 0 16.9-2l21-26.6a12 12 0 0 0-2-16.9z\'/></svg>","img":{"url":"","id":""},"svg":""}},{"id":"opn-features","label":"Features","sectionId":"features","icon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M264.5 5.2a24 24 0 0 0-17 0L28.7 84.5a16 16 0 0 0 0 30l218.8 79.3a24 24 0 0 0 17 0l218.8-79.3a16 16 0 0 0 0-30zm219 175.1-58.3-21.1-140.4 50.9a56 56 0 0 1-39.6 0L104.8 159.2l-58.3 21.1a16 16 0 0 0 0 30l218.8 79.3a24 24 0 0 0 17 0l218.8-79.3a16 16 0 0 0 0-30zm0 116.6-58.1-21-140.6 51a56 56 0 0 1-39.6 0l-140.6-51-58.1 21a16 16 0 0 0 0 30l218.8 79.3a24 24 0 0 0 17 0l218.8-79.3a16 16 0 0 0 0-30z\'/></svg>","img":{"url":"","id":""},"svg":""}},{"id":"opn-pricing","label":"Pricing","sectionId":"pricing","icon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M0 80v149.5a48 48 0 0 0 14 33.9l195 195a48 48 0 0 0 67.9 0l131-131a48 48 0 0 0 0-67.9l-195-195A48 48 0 0 0 179.5 32H48A48 48 0 0 0 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 0 1 0-64z\'/></svg>","img":{"url":"","id":""},"svg":""}},{"id":"opn-faq","label":"FAQ","sectionId":"faq","icon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 8a248 248 0 1 0 0 496 248 248 0 0 0 0-496zm0 400a32 32 0 1 1 0-64 32 32 0 0 1 0 64zm53.9-197.2-29.9 19v18.2a16 16 0 0 1-16 16h-16a16 16 0 0 1-16-16v-27.3a16 16 0 0 1 7.4-13.5l40.9-26c5.6-3.5 8.9-9.5 8.9-16 0-10.5-8.5-19-19-19h-35.6c-7.4 0-14.2 4.2-17.5 10.9l-3.5 7a16 16 0 0 1-21.5 7.2l-14.3-7.2a16 16 0 0 1-7.2-21.5l3.5-7A83 83 0 0 1 234.6 96h35.6c37.1 0 67.3 30.2 67.3 67.3 0 23-11.7 44.1-31.1 56.5z\'/></svg>","img":{"url":"","id":""},"svg":""}}]},"behavior":{"type":"object","default":{"scrollSpy":true,"smoothScroll":true,"hideMissingSections":true,"scrollSpeed":600,"desktop":{"scrollOffset":"80px"},"tablet":{"scrollOffset":""},"mobile":{"scrollOffset":""}}},"item":{"type":"object","default":{"normal":{"color":"","background":{},"markerColor":"","ringColor":"","border":{},"shadow":[]},"hover":{"color":"","background":{},"markerColor":"","ringColor":"","border":{},"shadow":[]},"active":{"color":"","background":{},"markerColor":"","ringColor":"","border":{},"shadow":[]},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":"","ringSize":"","spacing":"18px"},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":"","ringSize":"","spacing":""},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":"","ringSize":"","spacing":""}}},"marker":{"type":"object","default":{"desktop":{"size":""},"tablet":{"size":""},"mobile":{"size":""}}},"media":{"type":"object","default":{"showIcon":false,"color":"","hoverColor":"","activeColor":"","desktop":{"size":"","width":"","height":"","radius":{"top":"","right":"","bottom":"","left":""},"objectFit":"cover"},"tablet":{"size":"","width":"","height":"","radius":{"top":"","right":"","bottom":"","left":""},"objectFit":""},"mobile":{"size":"","width":"","height":"","radius":{"top":"","right":"","bottom":"","left":""},"objectFit":""}}},"label":{"type":"object","default":{"tooltipBackground":{},"tooltipText":"","border":{},"typo":{"fontSize":{"desktop":13,"tablet":"","mobile":""}},"desktop":{"gap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"gap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"gap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}}},"line":{"type":"object","default":{"color":"","progressColor":"","desktop":{"thickness":""},"tablet":{"thickness":""},"mobile":{"thickness":""}}},"number":{"type":"object","default":{"normal":{"color":""},"hover":{"color":""},"active":{"color":""},"typo":{"fontSize":{"desktop":15,"tablet":"","mobile":""}}}},"bubble":{"type":"object","default":{"desktop":{"iconPosition":"auto","x":"32px","y":"0px"},"tablet":{"iconPosition":"","x":"","y":""},"mobile":{"iconPosition":"","x":"","y":""}}},"animation":{"type":"object","default":{"pulse":false,"style":"pulseRing","speed":""}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"position":{}}}},"example":{"attributes":{"layout":{"preset":"glassBullseye","desktop":{"position":"right","verticalAlign":"center"}}}},"editorScript":"file:../index.js","viewScript":"file:./view.js","render":"file:./render.php","style":"file:./view.css","version":"1.0.41"}'),WB="b-blocks-one-page-navigation",UB=()=>`opn-${Math.random().toString(36).slice(2,9)}`,GB=[{name:"general",title:"General"},{name:"style",title:"Style"},{name:"advanced",title:"Advanced"}],VB=[{label:"Glass Bullseye",value:"glassBullseye"},{label:"Magnetic Bubble",value:"magneticBubble"},{label:"Numbered Steps",value:"numberedSteps"},{label:"Expandable Pills",value:"expandablePills"},{label:"Stacked Cards",value:"stackedCards"},{label:"Side Rail",value:"sideRail"}],qB=[{label:"Left",value:"left"},{label:"Right",value:"right"}],YB=[{label:"Top",value:"top"},{label:"Center",value:"center"},{label:"Bottom",value:"bottom"}],KB=[{label:"Pulse Ring",value:"pulseRing"},{label:"Radar",value:"radar"},{label:"Breathing Glow",value:"breathingGlow"},{label:"Heartbeat",value:"heartbeat"}],QB=[{label:"None",value:"none"},{label:"Library", |
| 507 |
value:"icon"},{label:"Image",value:"image"},{label:"SVG",value:"svg"}],ZB=["image"],XB=["image/svg+xml"],JB=[{label:"Contain",value:"contain"},{label:"Cover",value:"cover"},{label:"Fill",value:"fill"},{label:"None",value:"none"}],eI=[{label:"Auto",value:"auto"},{label:"Left",value:"left"},{label:"Center",value:"center"},{label:"Right",value:"right"}],tI=(e={},t="desktop")=>{const n=e?.bubble||{},o=uI(n,t,"iconPosition",n.iconPosition||"auto");if("inside"===o||"center"===o)return"center";const i="outside"===o?n.side||"auto":o;return"left"===i||"right"===i?i:"left"===gI(e.layout||{},t,"position","right")?"right":"left"},nI={glassBullseye:["marker","item","media","animation","label","line"],magneticBubble:["marker","item","media","animation","label","line","bubble"],numberedSteps:["marker","item","number","media","line","label"],expandablePills:["marker","item","media","label"],stackedCards:["marker","item","media","label","line"],sideRail:["marker","item","media","label","line"]},oI=["magneticBubble","expandablePills","stackedCards"],iI=e=>!oI.includes(e),sI=["expandablePills","stackedCards"],aI=e=>!sI.includes(e),rI=(e={})=>"numberedSteps"===(e?.layout?.preset||"glassBullseye")&&!e?.media?.showIcon,lI=["sideRail"],cI=(e={})=>!iI(e?.layout?.preset||"glassBullseye")||!!e?.media?.showIcon,dI=(e,t)=>(nI[e]||nI.glassBullseye).includes(t),uI=(e={},t,n,o="")=>{const i=t=>{const o=e?.[t]?.[n];return null==o||""===o?void 0:o},s=i("desktop")??o;if("desktop"===t)return s;const a=i("tablet")??s;return"tablet"===t?a:i("mobile")??a},pI=(e="")=>String(e||"").trim().replace(/^#+/,""),hI=e=>String(e+1).padStart(2,"0"),gI=(e={},t,n,o)=>uI(e,t,n,e[n]||o),mI=e=>{const{layout:t={}}=e;return`${WB}-pos-${gI(t,"desktop","position","right")} ${WB}-align-${gI(t,"desktop","verticalAlign","center")}`},bI=e=>{const{layout:t={},animation:n={}}=e,o=t.preset||"glassBullseye",i=n.pulse&&dI(o,"animation"),s=iI(o)&&e?.media?.showIcon;return[WB,`${WB}-preset-${o}`,i?`${WB}-pulse-${n.style||"pulseRing"}`:"","magneticBubble"===o&&"center"!==tI(e)?`${WB}-bubble-outside ${WB}-bubble-${tI(e)}`:"",s?"is-icon-visible":""].filter(Boolean).join(" ")},fI={expandablePills:"link",stackedCards:"link"},xI=e=>"link"===fI[e],yI=e=>xI(e),vI=["magneticBubble","numberedSteps","stackedCards"],kI=e=>vI.includes(e),wI=e=>"glassBullseye"===(e||"glassBullseye"),_I={glassBullseye:{normal:{color:"#9aa0ae"},hover:{color:"#4b33f5"},active:{color:"#4b33f5"}},magneticBubble:{normal:{color:"#9aa0ae",background:"#ffffff",border:{width:"2px",style:"solid",color:"#e3e6ef"}},hover:{color:"#4b33f5",background:"#4b33f51a",markerColor:"#ffffff"},active:{color:"#4b33f5",background:"#4b33f5",markerColor:"#ffffff"}},numberedSteps:{normal:{color:"#9aa0ae",background:"#ffffff",border:{width:"2px",style:"solid",color:"#e3e6ef"}},hover:{color:"#4b33f5",background:"#4b33f51a",border:{width:"2px",style:"solid",color:"#4b33f5"}},active:{color:"#4b33f5",background:"#4b33f5",markerColor:"#ffffff",border:{width:"2px",style:"solid",color:"#4b33f5"}}},expandablePills:{normal:{color:"#1e2230"},hover:{color:"#4b33f5",background:"#4b33f51a"},active:{color:"#ffffff",background:"#4b33f5"}},stackedCards:{normal:{color:"#1e2230",background:"#ffffff",border:{width:"1px",style:"solid",color:"#e3e6ef"}},hover:{color:"#4b33f5",background:"#f4f5fa"},active:{color:"#ffffff",background:"#4b33f5",border:{width:"1px",style:"solid",color:"#4b33f5"}}},sideRail:{normal:{color:"#9aa0ae",background:"#9aa0ae"},hover:{background:"#4b33f5"},active:{background:"#4b33f5"}}},CI=(e={},t,n=!1)=>{const{item:o={},line:i={},layout:s={}}=e,a=s.preset||"glassBullseye",r=o?.[t]||{},l=n&&(_I[a]||{})[t]||{},c=e=>e&&("object"!=typeof e||Object.keys(e).length),d=(e,t)=>c(r[e])?r[e]:(n?l[e]:null)||t;return{color:d("color",""),background:d("background",{}),markerColor:d("markerColor",""),border:(()=>{if(c(r.border))return r.border;const e=i.color||i?.desktop?.thickness;return n&&e?{width:i?.desktop?.thickness||l.border?.width||"",style:"solid",color:i.color||l.border?.color||""}:(n?l.border:null)||{}})()}},jI=(e={},t)=>e?.[t]?.color||"",$I=(e={},t,n)=>{const o=t=>{const o=e?.[t]?.[n];return"string"==typeof o?o?{top:o,right:o,bottom:o,left:o}:void 0:o&&Object.values(o).some((e=>""!==e&&null!=e))?o:void 0},i=o("desktop")??{};if("desktop"===t)return i;const s=o("tablet")??i;return"tablet"===t?s:o("mobile")??s},SI=e=>"string"==typeof e?{type:"solid",color:e}:e||{},TI=(e="")=>String(e).replace(/<[^>]*>/g," ").replace(/ | /g," ").replace(/&/g,"&").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),MI='h1, h2, h3, h4, h5, h6, .sectionHeadingTitle, [role="heading"]',NI=e=>{const t=new Map;return e?(e.querySelectorAll(MI).forEach((e=>{const n=TI(e.textContent);n&&!t.has(n)&&t.set(n,(e=>{const t=e.closest('section, article, .wp-block-group, .wp-block-cover, [id^="bBlocks"], [data-block]');return t&&1===t.querySelectorAll(MI).length?t:e})(e))})),t):t},LI=(e,t,n)=>{const o=pI(t);if(!e||!o)return null;const i=e.getElementById(o);if(i)return i;const s=TI(o);return s&&(n||NI(e)).get(s)||null};class EI{constructor(e,{updateHash:t=!0,manageFocus:n=!0,preview:o=!1}={}){this.nav=e,this.doc=e.ownerDocument,this.win=this.doc.defaultView||window,this.updateHash=t,this.manageFocus=n,this.preview=o,this.items=Array.from(e.querySelectorAll(`.${WB}-item`)),this.bubble=e.querySelector(`.${WB}-bubble`),this.offset=parseInt(e.dataset.offset,10)||0,this.speed=parseInt(e.dataset.speed,10)||0,this.smooth="1"===e.dataset.smooth,this.spy="1"===e.dataset.spy,this.hideMissing="1"===e.dataset.hideMissing,this.scroller=null,this.active=-1,this.raf=0,this.scrollRaf=0,this.resizeRaf=0,this.listeners=[],this.targets=new Map,this.headings=new Map,this.sync(),this.bindClicks(),this.observe(),this.watchDOM(),this.onScroll()}findScroller(){const e=this.items.map((e=>this.target(e))).find(Boolean)||this.nav;let t=e?.parentElement,n=null;for(;t&&t!==this.doc.body&&t!==this.doc.documentElement;){const e=this.win.getComputedStyle(t);/(auto|scroll|overlay)/.test(e.overflowY)&&t.scrollHeight>t.clientHeight+1&&(n=t),t=t.parentElement}return n}view(){const e=this.scroller;return e?{top:e.scrollTop,height:e.clientHeight,edge:e.getBoundingClientRect().top,extent:e.scrollHeight}:{top:this.win.scrollY,height:this.win.innerHeight,edge:0,extent:Math.max(this.doc.documentElement?.scrollHeight||0,this.doc.body?.scrollHeight||0)}}topOf(e){return e.getBoundingClientRect().top-this.view().edge}scrollToY(e){this.scroller?this.scroller.scrollTop=e:this.win.scrollTo(this.win.scrollX,e)}currentOffset(){const e=this.win.innerWidth||0,t=e=>{const t=parseFloat(this.nav.dataset[e]);return isNaN(t)?null:t},n=640>=e?t("offsetMobile"):null,o=1024>=e?t("offsetTablet"):null;return n??o??this.offset}target(e){if(this.targets.has(e))return this.targets.get(e);const t=LI(this.doc,e.dataset.target,this.headings);return this.targets.set(e,t),t}sync(){this.targets=new Map,this.headings=NI(this.doc),this.scroller=this.findScroller();const e=this.items.filter((e=>!this.target(e))),t=e.length===this.items.length,n=this.hideMissing&&!t;this.items.forEach((t=>{const o=n&&e.includes(t);t.hidden=o;const i=t.querySelector(`.${WB}-link`);i&&(i.tabIndex=o?-1:0)})),t&&e.length&&!this.warned&&(this.warned=!0)}bindClicks(){this.items.forEach(((e,t)=>{const n=e.querySelector(`.${WB}-link`);if(!n)return;const o=n=>{this.boxOf(e)&&(n.preventDefault(),this.scrollTo(this.target(e),t))};n.addEventListener("click",o),this.listeners.push((()=>n.removeEventListener("click",o)))}))}scrollTo(e,t){const n=this.currentOffset(),o=Math.max(0,this.view().top+this.topOf(e)-n),i=()=>{if(!this.manageFocus)return;const t=e.hasAttribute("tabindex"),n=e.style.outline;t||(e.setAttribute("tabindex","-1"),e.style.outline="none"),e.focus({preventScroll:!0}),t||e.addEventListener("blur",(()=>{e.removeAttribute("tabindex"),e.style.outline=n}),{once:!0})};if(this.setActive(t), |
| 508 |
this.updateHash&&e.id&&this.win.history?.replaceState&&this.win.history.replaceState(null,"",`#${e.id}`),!this.smooth||(s=this.win,s.matchMedia?.("(prefers-reduced-motion: reduce)").matches)||!this.speed)return this.scrollToY(o),void i();var s;this.win.cancelAnimationFrame(this.raf);const a=this.view().top,r=this.win.performance.now(),l=e=>{const t=Math.min(1,(e-r)/this.speed);var n;this.scrollToY(a+(o-a)*(.5>(n=t)?4*n*n*n:1-Math.pow(-2*n+2,3)/2)),1>t?this.raf=this.win.requestAnimationFrame(l):i()};this.raf=this.win.requestAnimationFrame(l)}setActive(e){e!==this.active&&(this.active=e,this.paint(),this.items.forEach(((t,n)=>{const o=t.querySelector(`.${WB}-link`);t.classList.toggle("is-active",n===e),o&&(n===e?o.setAttribute("aria-current","true"):o.removeAttribute("aria-current"))})),this.moveBubble())}moveBubble(){if(!this.bubble)return;const e=this.items[this.active];if(!e||e.hidden)return void(this.bubble.style.opacity="0");this.bubble.style.opacity="0.2";const t=this.nav.querySelector(`.${WB}-list`),n=t&&"row"===this.win.getComputedStyle(t).flexDirection;this.bubble.style.transform=n?`translateX(${e.offsetLeft+e.offsetWidth/2}px)`:`translateY(${e.offsetTop+e.offsetHeight/2}px)`}rootMargin(){const e=this.currentOffset();return`-${e}px 0px -${Math.max(0,this.view().height-e-1)}px 0px`}boxOf(e){if(e.hidden)return null;const t=this.target(e);return t&&t.getClientRects().length?{top:this.topOf(t)}:null}currentIndex(){const e=this.currentOffset();let t=-1,n=-1/0;if(this.items.forEach(((o,i)=>{const s=this.boxOf(o);s&&s.top<=e&&s.top>n&&(n=s.top,t=i)})),-1===t){const e=this.view().height/2;return this.items.some(((n,o)=>{const i=this.boxOf(n);return!(!i||i.top>=e||(t=o,0))})),-1===t?this.firstIndex():t}if(!this.atEnd())return t;let o=t;return this.items.forEach(((e,n)=>{if(n<=t)return;const i=this.boxOf(e);i&&i.top<this.view().height&&(o=n)})),o}firstIndex(){if(!this.preview)return-1;const e=this.items.findIndex((e=>!e.hidden));return 0>e?-1:e}atEnd(){const{top:e,height:t,extent:n}=this.view();return n>t+1&&e+t>=n-2}observe(){this.spy&&this.win.IntersectionObserver&&(this.margin=this.rootMargin(),this.observer=new this.win.IntersectionObserver((()=>this.setActive(this.currentIndex())),{root:this.scroller,rootMargin:this.margin,threshold:0}),this.items.forEach((e=>{const t=this.target(e);t&&this.observer.observe(t)})))}paint(){const e=this.currentOffset();this.items.forEach(((t,n)=>{const o=-1!==this.active&&n<this.active;t.classList.toggle("is-passed",o);const i=t.querySelector(`.${WB}-ring-bar`);if(!i)return;if(n!==this.active)return i.style.strokeDashoffset=o?"0":"100",void(i.style.opacity=o?"1":"0");const s=this.target(t);if(!s)return;const a=e-this.topOf(s),r=Math.min(1,Math.max(0,a/(s.offsetHeight||1)));i.style.strokeDashoffset=String(100-100*r),i.style.opacity=0<r?"1":"0"}))}onScroll(){const e=()=>{this.scrollRaf=0,this.spy&&this.setActive(this.currentIndex()),this.paint()},t=()=>{this.scrollRaf||(this.scrollRaf=this.win.requestAnimationFrame(e))},n=()=>{this.resizeRaf||(this.resizeRaf=this.win.requestAnimationFrame((()=>{this.resizeRaf=0,this.relayout()})))},o=this.scroller||this.win;o.addEventListener("scroll",t,{passive:!0}),this.win.addEventListener("resize",n,{passive:!0}),this.listeners.push((()=>{o.removeEventListener("scroll",t),this.win.removeEventListener("resize",n)})),e()}relayout(){this.observer&&this.margin!==this.rootMargin()&&(this.observer.disconnect(),this.observe()),this.moveBubble(),this.paint()}watchDOM(){if(!this.win.MutationObserver)return;let e=0;this.mutation=new this.win.MutationObserver((()=>{this.win.cancelAnimationFrame(e),e=this.win.requestAnimationFrame((()=>{this.sync(),this.observer?.disconnect(),this.observe(),this.moveBubble()}))})),this.mutation.observe(this.doc.body,{childList:!0,subtree:!0,characterData:!0})}destroy(){this.win.cancelAnimationFrame(this.raf),this.win.cancelAnimationFrame(this.scrollRaf),this.win.cancelAnimationFrame(this.resizeRaf),this.observer?.disconnect(),this.mutation?.disconnect(),this.listeners.forEach((e=>e())),this.listeners=[]}}const PI=({icon:e={},label:t})=>{const{type:n="icon",icon:o="",img:i={},url:s="",alt:a="",svg:r=""}=e;if("none"===n)return null;if("image"===n){const e="string"==typeof i?{url:i}:i||{},n=e.url||s;return n?(0,l.jsx)("span",{className:`${WB}-icon is-image`,children:(0,l.jsx)("img",{src:n,alt:e.alt||a||t||""})}):null}const c="svg"===n?r:o;return c?(0,l.jsx)("span",{className:`${WB}-icon is-${"svg"===n?"svg":"icon"}`,dangerouslySetInnerHTML:{__html:c}}):null},AI=()=>(0,l.jsxs)("svg",{className:`${WB}-ring`,viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,l.jsx)("circle",{className:`${WB}-ring-track`,cx:"12",cy:"12",r:"9"}),(0,l.jsx)("circle",{className:`${WB}-ring-bar`,cx:"12",cy:"12",r:"9",pathLength:"100"})]}),BI=(0,m.forwardRef)((({attributes:e,isBackend:t=!1},n=null)=>{const{items:o=[],layout:i={},behavior:s={},media:a={}}=e,r=i.preset||"glassBullseye",c=!aI(r),d="numberedSteps"===r&&!a.showIcon;return(0,l.jsxs)("div",{ref:n,className:bI(e),role:"navigation","aria-label":"Page sections","data-preset":r,"data-spy":s.scrollSpy?"1":"0","data-smooth":s.smoothScroll?"1":"0","data-hide-missing":s.hideMissingSections?"1":"0","data-speed":parseInt(s.scrollSpeed,10)||0,"data-offset":parseInt(s?.desktop?.scrollOffset,10)||0,"data-offset-tablet":s?.tablet?.scrollOffset??"","data-offset-mobile":s?.mobile?.scrollOffset??"",children:["magneticBubble"===r&&(0,l.jsx)("span",{className:`${WB}-bubble`,"aria-hidden":"true"}),(0,l.jsx)("ul",{className:`${WB}-list`,children:o.map(((e,n)=>{const o=pI(e.sectionId),i=o?`#${o}`:void 0,s=t?"button":"a";return(0,l.jsxs)("li",{className:`${WB}-item${o?"":" is-unlinked"}`,"data-target":o,children:[(0,l.jsxs)(s,{className:`${WB}-link`,...t?{type:"button"}:{href:i},"aria-label":e.label||void 0,children:[(0,l.jsxs)("span",{className:`${WB}-marker`,children:[d&&(0,l.jsx)("span",{className:`${WB}-number`,children:hI(n)}),!d&&(0,l.jsx)(PI,{icon:e.icon,label:e.label}),"glassBullseye"===r&&(0,l.jsx)(AI,{})]}),(0,l.jsx)("span",{className:c?`${WB}-label`:`${WB}-label ${WB}-tooltip`,children:e.label})]}),t&&!o&&(0,l.jsx)("span",{className:`${WB}-warning`,children:"No section chosen — this item is hidden on the front end."})]},e.id||n)}))})]})}));BI.displayName="OnePageNavigation";const II=BI,OI=(e,t)=>e?`calc(${e} * ${t})`:"",RI=({attributes:e,id:o,isBackend:i=!1})=>{const{advanced:s={},layout:a={},marker:r={},item:c={},media:d={},label:u={},line:p={},bubble:h={},number:g={},animation:m={}}=e,b=a.preset||"glassBullseye",f=`#${o}`,x=`${f} .${WB}`,y=`${x} .${WB}-list`,v=`${x} .${WB}-link`,k=`${x} .is-active .${WB}-link`,w=`${x} .${WB}-marker`,_=`${x} .is-active .${WB}-marker`,C=`${v}:hover .${WB}-marker`,j=`${x} .${WB}-label`,$=`${x} .${WB}-tooltip`,S=`${x} .${WB}-number`,T=`${x} .${WB}-icon`,M=iI(b)&&d.showIcon?"::before":"",N=`${T}.is-icon, ${T}.is-svg`,L=`${T}.is-image`,E=`${x} .${WB}-bubble`,P=`${x} .${WB}-ring circle`,A=`${x} .${WB}-ring-track`,B=(e,t)=>t.replace(/\s+/g," ").trim()?`${e}{ ${t} }`:"",I=xI(b),O=I?v:w,R=I?`${v}:hover`:C,z=I?k:`${_}${"magneticBubble"===b?"::before":""}`,D={item:c,line:p,layout:a},F={normal:CI(D,"normal"),hover:CI(D,"hover"),active:CI(D,"active")},H=e=>!!(e?.width||e?.top||e?.right||e?.bottom||e?.left),W=e=>kI(b)&&H(e)?sa(e):"",U=e=>Array.isArray(e)&&e.length?e.map((e=>da(e))).join(", "):"",G=e=>e?.color||("string"==typeof e?e:""),V=e=>oa(SI(e)).trim(),q={glassBullseye:`\n\t\t\t${B(`${x} .${WB}-ring-bar`,na("stroke",p.progressColor))}\n\t\t\t${B(`${x} .is-passed .${WB}-link`,na("color",F.active.color))}\n\t\t`,magneticBubble:`\n\t\t\t${B(`${y}::before`,na("background",p.color))}\n\t\t\t${B(w,na("border-color",p.color))}\n\t\t\t${B(_,"background: none; border-color: transparent;")}\n\t\t\t${B(E,na("background",G(F.active.background)))}\n\t\t`, |
| 509 |
numberedSteps:`\n\t\t\t${B(`${y}::before`,na("background",p.color))}\n\t\t\t${B(w,na("border-color",p.color))}\n\t\t\t${B(C,na("border-color",F.hover.color))}\n\t\t\t${B(_,na("border-color",G(F.active.background)))}\n\t\t`,expandablePills:"",stackedCards:`\n\t\t\t${B(v,na("border-color",p.color))}\n\t\t\t${B(k,na("border-color",G(F.active.background)))}\n\t\t`,sideRail:`\n\t\t\t${B(`${y}::before`,na("background",p.color))}\n\t\t`},Y=I?"":M,K=`\n\t\t${B(v,na("color",F.normal.color))}\n\t\t${B(`${O}${Y}`,V(F.normal.background))}\n\t\t${B(w,na("color",F.normal.markerColor))}\n\n\t\t${B(`${v}:hover`,na("color",F.hover.color))}\n\t\t${B(`${R}${Y}`,V(F.hover.background))}\n\t\t${B(C,na("color",F.hover.markerColor))}\n\n\t\t${B(k,na("color",F.active.color))}\n\t\t${B(`${z}${Y}`,V(F.active.background))}\n\t\t${B(_,na("color",F.active.markerColor))}\n\t\t${B(`${x} .is-active .${WB}-number, ${x} .is-active .${WB}-icon`,na("color",F.active.markerColor))}\n\n\t\t${wI(b)?`\n\t\t\t${B(A,na("stroke",c?.normal?.ringColor))}\n\t\t\t${B(`${v}:hover .${WB}-ring-track`,na("stroke",c?.hover?.ringColor))}\n\t\t\t${B(`${x} .is-active .${WB}-ring-track`,na("stroke",c?.active?.ringColor))}\n\t\t`:""}\n\n\t\t${B(`${O}${Y}`,na("box-shadow",U(c?.normal?.shadow)))}\n\t\t${B(`${R}${Y}`,na("box-shadow",U(c?.hover?.shadow)))}\n\t\t${B(`${z}${Y}`,na("box-shadow",U(c?.active?.shadow)))}\n\t`,Q=G(F.active.background)||F.active.color,Z={pulseRing:B(`${_}::after`,na("border-color",Q)),radar:B(`${_}::after`,na("background",Q)),breathingGlow:B(`${_}::after`,na("color",Q)),heartbeat:""},X=e=>{const t="mobile"===e?"12px":"24px",n=uI(a,e,"offsetX","")||t,o=uI(a,e,"offsetY","")||t,i=gI(a,e,"position","right"),s=gI(a,e,"verticalAlign","center"),r="left"===i?"left: calc(100% + 12px); right: auto;":"right: calc(100% + 12px); left: auto;";return`\n\t\t\t${B(f,`${"left"===i?`left: ${n}; right: auto;`:`right: ${n}; left: auto;`} ${"top"===s?`top: ${o}; bottom: auto; transform: none;`:"bottom"===s?`bottom: ${o}; top: auto; transform: none;`:"top: 50%; bottom: auto; transform: translateY(-50%);"}`)}\n\t\t\t${B($,r)}\n\t\t`},J=t=>{const n=r?.[t]?.size,o=p?.[t]?.thickness,i=c?.[t]?.spacing,s=c?.[t]?.width||n,a={glassBullseye:`\n\t\t\t\t${B(w,`\n\t\t\t\t\t${na("width",n)}\n\t\t\t\t\t${na("height",n)}\n\t\t\t\t`)}\n\t\t\t`,magneticBubble:`\n\t\t\t\t${B(`${y}::before`,`\n\t\t\t\t\t${na("left",OI(s,.5))}\n\t\t\t\t\t${na("width",o)}\n\t\t\t\t`)}\n\t\t\t\t${B(w,`\n\t\t\t\t\t${na("width",n)}\n\t\t\t\t\t${na("height",n)}\n\t\t\t\t\t${na("border-width",o)}\n\t\t\t\t`)}\n\t\t\t\t${B(`${_}::before`,na("inset",OI(n,-.285)))}\n\t\t\t\t${B(E,`\n\t\t\t\t\t${na("left",OI(s,.5))}\n\t\t\t\t\t${na("width",OI(n,2))}\n\t\t\t\t\t${na("height",OI(n,2))}\n\t\t\t\t\t${n?`margin: ${OI(n,-1)} 0 0 ${OI(n,-1)};`:""}\n\t\t\t\t`)}\n\t\t\t\t${(()=>{const n=h?.[t]||{};if("desktop"!==t&&!n.iconPosition&&!n.x&&!n.y)return"";const o=tI(e,t),i=uI(h,t,"x","0px"),s=uI(h,t,"y","0px");return`\n\t\t\t\t${B(`${x} .${WB}-icon`,"center"===o?"transform: none;":`transform: translate(${"left"===o?`calc(${i} * -1)`:i}, ${s});`)}\n\t\t\t\t${B(`${x} .is-active .${WB}-icon`,na("color","center"===o?F.active.markerColor:F.active.color))}\n\t\t\t`})()}\n\t\t\t`,numberedSteps:`\n\t\t\t\t${B(`${y}::before`,`\n\t\t\t\t\t${na("left",OI(s,.5))}\n\t\t\t\t\t${na("width",o)}\n\t\t\t\t`)}\n\t\t\t\t${B(w,`\n\t\t\t\t\t${na("width",n)}\n\t\t\t\t\t${na("border-width",o)}\n\t\t\t\t`)}\n\t\t\t`,expandablePills:B(w,`\n\t\t\t\t${na("width",n)}\n\t\t\t\t${na("height",n)}\n\t\t\t`),stackedCards:`\n\t\t\t\t${B(w,`\n\t\t\t\t\t${na("width",n)}\n\t\t\t\t\t${na("height",n)}\n\t\t\t\t`)}\n\t\t\t\t${B(v,na("border-width",o))}\n\t\t\t`,sideRail:`\n\t\t\t\t${B(`${y}::before`,na("width",o))}\n\t\t\t\t${B(`${w}${M}`,`\n\t\t\t\t\t${na("width",n)}\n\t\t\t\t\t${na("height",o)}\n\t\t\t\t`)}\n\t\t\t\t${B(`${C}${M}`,na("width",OI(n,1.25)))}\n\t\t\t\t${B(`${_}${M}`,na("width",OI(n,1.5)))}\n\t\t\t`};return`\n\t\t\t${B(y,na("gap",i))}\n\t\t\t${B(v,aI(b)?"":na("gap",u?.[t]?.gap))}\n\t\t\t${B($,aI(b)?na("border-radius",ha(u?.[t]?.radius)):"")}\n\t\t\t${B(j,na("padding",ha(u?.[t]?.padding)))}\n\t\t\t${a[b]||""}\n\t\t`},ee=`\n\t\t${B(N,na("color",d.color))}\n\t\t${B(`${N} svg, ${N} svg path`,na("fill",d.color))}\n\t\t${B(`${v}:hover .${WB}-icon.is-icon, ${v}:hover .${WB}-icon.is-svg`,na("color",d.hoverColor))}\n\t\t${B(`${v}:hover .${WB}-icon.is-icon svg path, ${v}:hover .${WB}-icon.is-svg svg path`,na("fill",d.hoverColor))}\n\t\t${B(`${x} .is-active .${WB}-icon.is-icon, ${x} .is-active .${WB}-icon.is-svg`,na("color",d.activeColor))}\n\t\t${B(`${x} .is-active .${WB}-icon.is-icon svg path, ${x} .is-active .${WB}-icon.is-svg svg path`,na("fill",d.activeColor))}\n\t`,te=e=>{const t=c?.[e]||{},n=t.width;return`\n\t\t\t${B(O,`\n\t\t\t\t${yI(b)?na("padding",ha(t.padding)):""}\n\t\t\t\t${na("border-radius",ha(t.radius))}\n\t\t\t\t${na("width",n)}\n\t\t\t\t${na("min-width",n)}\n\t\t\t\t${na("height",t.height)}\n\t\t\t`)}\n\t\t\t${wI(b)?B(P,na("stroke-width",t.ringSize)):""}\n\t\t`},ne=e=>{const t=d?.[e]?.size,n=d?.[e]?.width,o=d?.[e]?.height,i=ha(d?.[e]?.radius),s=d?.[e]?.objectFit||("desktop"===e?d.objectFit:"");return`\n\t\t\t${B(N,`\n\t\t\t\t${na("width",t)}\n\t\t\t\t${na("height",t)}\n\t\t\t`)}\n\t\t\t${B(L,`\n\t\t\t\t${na("width",n)}\n\t\t\t\t${na("height",o)}\n\t\t\t\t${na("border-radius",i)}\n\t\t\t`)}\n\t\t\t${B(`${L} img`,(e=>"contain"===e?"width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain;":e?`width: 100%; height: 100%; ${na("object-fit",e)}`:"")(s))}\n\t\t`},oe=m.pulse&&dI(b,"animation"),ie=oe?B(`${_}::after`,na("animation-duration",m.speed)):"",se=`\n\t\t${pa("",u.typo)?.googleFontLink}\n\t\t${pa("",g.typo)?.googleFontLink}\n\t\t${pa(j,u.typo)?.styles}\n\t\t${pa(S,g.typo)?.styles}\n\n\t\t${B($,`\n\t\t\t${V(u.tooltipBackground)}\n\t\t\t${na("color",u.tooltipText)}\n\t\t\t${ae=u.border,aI(b)&&H(ae)?sa(ae):""}\n\t\t`)}\n\t\t${q[b]||""}\n\t\t${K}\n\t\t${rI(e)?`\n\t\t${B(S,na("color",jI(g,"normal")))}\n\t\t${B(`${v}:hover .${WB}-number`,na("color",jI(g,"hover")))}\n\t\t${B(`${x} .is-active .${WB}-number`,na("color",jI(g,"active")))}\n\t`:""}\n\t\t${cI(e)?ee:""}\n\t\t${oe?Z[m.style]??Z.pulseRing:""}\n\t\t${ie}\n\n\t\t${X("desktop")}\n\t\t${J("desktop")}\n\t\t${te("desktop")}\n\t\t${cI(e)?ne("desktop"):""}\n\n\t\t${t}{\n\t\t\t${X("tablet")}\n\t\t\t${J("tablet")}\n\t\t\t${te("tablet")}\n\t\t\t\t${cI(e)?ne("tablet"):""}\n\t\t}\n\n\t\t${n}{\n\t\t\t${X("mobile")}\n\t\t\t${J("mobile")}\n\t\t\t${te("mobile")}\n\t\t\t\t${cI(e)?ne("mobile"):""}\n\t\t}\n\n\t\t${B(O,W(F.normal.border))}\n\t\t${B(R,W(F.hover.border))}\n\t\t${B(z,W(F.active.border))}\n\n\t\t${_a(o,s,i,!1)}\n\n\t\t`;var ae,re;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:(re=se,re.replace(/[^{}]+\{\s*\}/g,"").replace(/[^{}]+\{\s*\}/g,""))}})},zI=({attributes:e,updateObj:t})=>{const{animation:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Active Pulse","b-blocks"),checked:n.pulse,onChange:e=>t("animation",e,"pulse")}),n.pulse&&(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Pulse Style","b-blocks"),value:n.style||"pulseRing",options:KB,onChange:e=>t("animation",e,"style"),__nextHasNoMarginBottom:!0}),n.pulse&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0 mt10",children:(0,x.__)("Speed","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{value:n.speed,onChange:e=>t("animation",void 0===e?"":e,"speed"),units:[{label:"s",value:"s"},{label:"ms",value:"ms"}],__next40pxDefaultSize:!0})]})]})},DI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{layout:o={},behavior:i={}}=e,s=gI(o,n,"verticalAlign","center"),a=(e,i)=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(v,{className:"mb0 mt10",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:uI(o,n,i,""),onChange:e=>t("layout",void 0===e?"":e,n,i),__next40pxDefaultSize:!0})]});return(0, |
| 510 |
l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Behavior","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Scroll Spy","b-blocks"),checked:i.scrollSpy,onChange:e=>t("behavior",e,"scrollSpy"),help:(0,x.__)("Highlights the item whose section is currently in view.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Smooth Scroll","b-blocks"),checked:i.smoothScroll,onChange:e=>t("behavior",e,"smoothScroll"),help:(0,x.__)("Off, a click jumps straight to the section.","b-blocks")}),(0,l.jsxs)(v,{className:"mb0 mt20",children:[(0,x.__)("Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:gI(o,n,"position","right"),onChange:e=>t("layout",e,n,"position"),children:qB.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsxs)(v,{className:"mb0 mt20",children:[(0,x.__)("Vertical Align","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:gI(o,n,"verticalAlign","center"),onChange:e=>t("layout",e,n,"verticalAlign"),children:YB.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),a((0,x.__)("Horizontal Offset","b-blocks"),"offsetX"),"center"!==s&&a((0,x.__)("Vertical Offset","b-blocks"),"offsetY"),((e,o,{units:s,help:a}={})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(v,{className:"mb0 mt10",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:uI(i,n,o,""),onChange:e=>t("behavior",void 0===e?"":e,n,o),units:s,help:a,__next40pxDefaultSize:!0})]}))((0,x.__)("Scroll Offset","b-blocks"),"scrollOffset",{units:[{label:"px",value:"px"}],help:(0,x.__)("Keeps the target clear of a sticky header.","b-blocks")}),(0,l.jsx)(v,{className:"mb0 mt10",children:(0,x.__)("Scroll Speed","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:parseInt(i.scrollSpeed,10)||0,onChange:e=>t("behavior",void 0===e?600:e,"scrollSpeed"),min:0,max:2e3,step:50,allowReset:!0,resetFallbackValue:600,help:(0,x.__)("How long the scroll takes. Higher = slower.","b-blocks"),__nextHasNoMarginBottom:!0})]})},FI=({attributes:e,setAttributes:t,index:n})=>{const{items:o=[]}=e,i=o[n]||{},s=i.icon||{},{data:a}=Cd("bBlocksUtils"),{refetch:r}=_d("b-blocks-enable-svg-mime-type",{_wpnonce:a?.nonce},!1),c=new Tt,d=(e,...i)=>t({items:be(o,e,n,...i)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0",children:(0,x.__)("Icon Type","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s.type||"icon",onChange:e=>d(e,"icon","type"),children:QB.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),"icon"===(s.type||"icon")&&(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Icon Library","b-blocks"),value:s.icon,onChange:e=>d(e,"icon","icon")}),"image"===s.type&&(0,l.jsx)(we,{height:"90%",width:"90%",className:"mt10",label:(0,x.__)("Upload Image","b-blocks"),types:ZB,value:s.img,onChange:e=>d(e||{},"icon","img")}),"image"===s.type&&(0,l.jsx)("small",{children:(0,x.__)("Recommended: PNG, JPEG, WebP, GIF or AVIF.","b-blocks")}),"svg"===s.type&&(0,l.jsx)(we,{className:"mt10",label:(0,x.__)("Upload SVG","b-blocks"),types:XB,onClick:async()=>(jd(),r()),value:{url:s.svg},onChange:async e=>d(e?.url?await c.sanitizeFile(e.url):"","icon","svg"),isSvgEnabled:!0}),"svg"===s.type&&(0,l.jsx)("small",{children:(0,x.__)("Recommended: image/svg+xml. The file is sanitised on upload.","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Label","b-blocks"),value:i.label||"",onChange:e=>d(e,"label"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Section ID","b-blocks"),value:i.sectionId||"",onChange:e=>d(pI(e),"sectionId"),help:(0,x.__)("The section's ID, or the heading of the section to scroll to. Without the # symbol.","b-blocks"),__nextHasNoMarginBottom:!0})]})},HI=e=>{const{attributes:t,setAttributes:n,updateObj:o}=e,{behavior:i={},items:s=[]}=t,[a,r]=(0,m.useState)(0),c=(0,m.useCallback)((e=>{const t=s[e]||{};n({items:[...s.slice(0,e+1),{...t,id:UB()},...s.slice(e+1)]}),r(e+1)}),[JSON.stringify(s)]),d={id:UB(),label:(0,x.__)("New Section","b-blocks"),sectionId:"",icon:{type:"icon",icon:"",img:{url:"",id:""},svg:""}};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Navigation Items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(_s,{attributes:t,setAttributes:n,activeIndex:a,setActiveIndex:r,arrKey:"items",minItem:1,ItemSettings:FI,itemLabel:(0,x.__)("Item","b-blocks"),newItem:d,handleCopy:c,title:"label",design:"sortable"}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Hide items with missing sections","b-blocks"),checked:i.hideMissingSections,onChange:e=>o("behavior",e,"hideMissingSections"),help:(0,x.__)("Auto-hide items whose section is not on the page.","b-blocks")})]})},WI=({attributes:e,setAttributes:t})=>{const{layout:n={},animation:o={}}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Choose A Style","b-blocks"),value:n.preset||"glassBullseye",options:VB,onChange:e=>t({layout:{...n,preset:e},animation:{...o,pulse:"magneticBubble"===e}}),help:(0,x.__)("Pick how the navigation menu looks on your page.","b-blocks"),__nextHasNoMarginBottom:!0})})},UI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{bubble:o={}}=e,i="center"!==tI(e,n),s=(e,i)=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(v,{className:"mb0 mt10",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:uI(o,n,i,""),onChange:e=>t("bubble",void 0===e?"":e,n,i),__next40pxDefaultSize:!0})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Bubble","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(v,{className:"mb0",children:[(0,x.__)("Icon Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:uI(o,n,"iconPosition",o.iconPosition||"auto"),onChange:e=>t("bubble",e,n,"iconPosition"),children:eI.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)("small",{children:(0,x.__)("Center keeps the icon in the node. Auto lifts it out away from the edge the block sits on.","b-blocks")}),i&&(0,l.jsxs)(l.Fragment,{children:[s((0,x.__)("Icon Horizontal Offset","b-blocks"),"x"),s((0,x.__)("Icon Vertical Offset","b-blocks"),"y")]})]})},GI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{item:o={},number:i={},layout:s={}}=e,[a,r]=(0,m.useState)("normal"),c=CI(e,a,!0),d=kI(s.preset||"glassBullseye"),u=((e={})=>!rI(e)&&(!lI.includes(e?.layout?.preset||"glassBullseye")||cI(e)))(e),p=wI(s.preset),h=yI(s.preset||"glassBullseye"),g=rI(e),b=(e,i)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:uI(o,n,i,""),onChange:e=>t("item",void 0===e?"":e,n,i),__next40pxDefaultSize:!0})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Item","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>r(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Active","b-blocks"),value:"active"})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:c.color,onChange:e=>t("item",e,a,"color") |
| 511 |
}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:SI(c.background),onChange:e=>t("item",e,a,"background")}),u&&(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Marker Color","b-blocks"),value:c.markerColor,onChange:e=>t("item",e,a,"markerColor"),help:(0,x.__)("The icon or number inside the marker. Icon / Image sets a drawn icon on its own.","b-blocks")}),g&&(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Number Color","b-blocks"),value:jI(i,a),onChange:e=>t("number",e,a,"color")}),p&&(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Ring Color","b-blocks"),value:o?.[a]?.ringColor,onChange:e=>t("item",e,a,"ringColor"),help:(0,x.__)("The circle around the marker. Its filled part is Line / Track ▸ Progress Color.","b-blocks")}),d&&(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt20",label:(0,x.__)("Border","b-blocks"),value:c.border,onChange:e=>t("item",e,a,"border"),__next40pxDefaultSize:!0}),(0,l.jsx)(yt,{className:"mt20",label:(0,x.__)("Shadow","b-blocks"),value:o?.[a]?.shadow,onChange:e=>t("item",e,a,"shadow")}),h&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(v,{className:"mb0 mt20",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:$I(o,n,"padding"),onChange:e=>t("item",e,n,"padding")})]}),(0,l.jsxs)(v,{className:"mb0 mt10",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:$I(o,n,"radius"),onChange:e=>t("item",e,n,"radius")}),p&&b((0,x.__)("Ring Size","b-blocks"),"ringSize"),b((0,x.__)("Spacing","b-blocks"),"spacing"),b((0,x.__)("Width","b-blocks"),"width"),b((0,x.__)("Height","b-blocks"),"height")]})},VI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{label:o={},layout:i={}}=e,s=aI(i.preset||"glassBullseye");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:s?(0,x.__)("Label / Tooltip","b-blocks"):(0,x.__)("Label","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:o.typo,onChange:e=>t("label",e,"typo"),defaults:{fontSize:{desktop:13}}}),(0,l.jsxs)(v,{className:"mb0 mt10",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:$I(o,n,"padding"),onChange:e=>t("label",e,n,"padding")}),!s&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:uI(o,n,"gap",""),onChange:e=>t("label",void 0===e?"":e,n,"gap"),__next40pxDefaultSize:!0})]}),s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Tooltip Background","b-blocks"),value:SI(o.tooltipBackground),onChange:e=>t("label",e,"tooltipBackground")}),(0,l.jsx)(Ue,{label:(0,x.__)("Tooltip Text","b-blocks"),value:o.tooltipText,onChange:e=>t("label",e,"tooltipText")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("label",e,"border"),__next40pxDefaultSize:!0}),(0,l.jsxs)(v,{className:"mb0 mt10",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:$I(o,n,"radius"),onChange:e=>t("label",e,n,"radius")})]})]})},qI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{line:o={},layout:i={}}=e,s=wI(i.preset);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Line / Track","b-blocks"),initialOpen:!1,children:[!s&&(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o.color,onChange:e=>t("line",e,"color")}),s&&(0,l.jsx)(Ue,{label:(0,x.__)("Progress Color","b-blocks"),value:o.progressColor,onChange:e=>t("line",e,"progressColor")}),!s&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Thickness","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:uI(o,n,"thickness",""),onChange:e=>t("line",void 0===e?"":e,n,"thickness"),__next40pxDefaultSize:!0})]})]})},YI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{marker:o={}}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Marker","b-blocks"),initialOpen:!1,children:(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:uI(o,n,"size",""),onChange:e=>t("marker",void 0===e?"":e,n,"size"),__next40pxDefaultSize:!0})]})})},KI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{media:o={},layout:i={},items:s=[]}=e,a=iI(i.preset||"glassBullseye"),r=cI(e),c=((e=[])=>e.some((e=>"image"===e?.icon?.type)))(s),d=(e,i,{help:s}={})=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:uI(o,n,i,""),onChange:e=>t("media",void 0===e?"":e,n,i),help:s,__next40pxDefaultSize:!0})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon / Image","b-blocks"),initialOpen:!1,children:[a&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:!!o.showIcon,onChange:e=>t("media",e,"showIcon")}),r&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0",children:(0,x.__)("Icon","b-blocks")}),d((0,x.__)("Size","b-blocks"),"size"),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:o.color,onChange:e=>t("media",e,"color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color","b-blocks"),value:o.hoverColor,onChange:e=>t("media",e,"hoverColor")}),(0,l.jsx)(Ue,{label:(0,x.__)("Active Color","b-blocks"),value:o.activeColor,onChange:e=>t("media",e,"activeColor")})]}),c&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0 mt20",children:(0,x.__)("Image","b-blocks")}),d((0,x.__)("Width","b-blocks"),"width"),d((0,x.__)("Height","b-blocks"),"height"),(0,l.jsxs)(v,{className:"mb0 mt10",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:$I(o,n,"radius"),onChange:e=>t("media",e,n,"radius")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2",children:[(0,x.__)("Object Fit","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:uI(o,n,"objectFit","contain"),options:JB,onChange:e=>t("media",e,n,"objectFit"),__nextHasNoMarginBottom:!0})]})]})]})},QI=({attributes:e,updateObj:t})=>{const{number:n={}}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Number","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("number",e,"typo"),defaults:{fontSize:{desktop:15}}})})},ZI=e=>{const t=e.attributes?.layout?.preset||"glassBullseye",n=e=>dI(t,e);return(0,l.jsxs)(l.Fragment,{children:[n("marker")&&(0,l.jsx)(YI,{...e}),n("item")&&(0,l.jsx)(GI,{...e}),(0,l.jsx)(KI,{...e}),n("number")&&rI(e.attributes)&&(0,l.jsx)(QI,{...e}),n("label")&&(0,l.jsx)(VI,{...e}),n("line")&&(0,l.jsx)(qI,{...e}),n("bubble")&&(0,l.jsx)(UI,{...e})]})},XI=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i,layout:s={}}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:GB,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(WI,{...e}),(0,l.jsx)(HI,{...e}),(0,l.jsx)(DI,{...e}),dI(s.preset||"glassBullseye","animation")&&(0,l.jsx)(zI,{...e})]}),"style"===t.name&&(0,l.jsx)(ZI,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},JI=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{blockId:i,layout:s={},items:a=[]}=t,r="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,c=fe(t,n),d=(0,m.useRef)(null),u=((e=[],t)=>{const[n,o]=(0,m.useState)(""),i=e.map((e=>pI(e.sectionId))).join("|");return(0,m.useEffect)((()=>{ |
| 512 |
const e=t?.current?.ownerDocument;if(!e)return;const n=e.defaultView||window;let s=0;const a=()=>{const t=NI(e),n=i.split("|").reduce(((n,o,i)=>(o&&!LI(e,o,t)&&n.push(i),n)),[]).join(",");o((e=>e===n?e:n))};a();const r=new n.MutationObserver((()=>{s||(s=setTimeout((()=>{s=0,a()}),500))}));return r.observe(e.body,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["id"]}),()=>{clearTimeout(s),r.disconnect()}}),[i,t]),(0,m.useMemo)((()=>n?n.split(",").map(Number):[]),[n])})(a,d),p=o.slice(0,12);var g,b;(0,m.useEffect)((()=>{i!==p&&n({blockId:p})}),[p]),g=d,b=JSON.stringify([a.map((e=>e.sectionId)),s.preset,s.desktop,t.behavior]),(0,m.useEffect)((()=>{const e=g?.current;if(!e)return;const t=new EI(e,{updateHash:!1,manageFocus:!1,preview:!0});return()=>t.destroy()}),[g,b]);const f=`block-${o}`,x=(0,h.useBlockProps)({className:mI(t)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(XI,{...e,updateObj:c,isPremium:r,unresolved:u}),(0,l.jsxs)("div",{...x,children:[(0,l.jsx)(RI,{attributes:t,id:f,isBackend:!0}),(0,l.jsx)(II,{ref:d,attributes:t,isBackend:!0})]})]})}));Nl(HB.name)&&(0,p.registerBlockType)(HB,{icon:Er,edit:JI,save:()=>null});const eO=JSON.parse('{"apiVersion":3,"name":"b-blocks/posts","title":"Posts","description":"Display blog posts.","category":"bBlocks","keywords":["Show Posts","Blog Posts","Category Posts"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"layout":{"type":"string","default":"grid"},"subLayout":{"type":"string","default":"default"},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"number","default":15},"rowGap":{"type":"number","default":15},"isContentEqualHight":{"type":"boolean","default":true},"sliderHeight":{"type":"string","default":"350px"},"content":{"type":"object","default":{"height":"auto"}},"postType":{"type":"string","default":"post"},"selectedTaxonomies":{"type":"object","default":{}},"selectedCategories":{"type":"array","default":[]},"selectedTags":{"type":"array","default":[]},"isPostsPerPageAll":{"type":"boolean","default":false},"postsPerPage":{"type":"number","default":12},"postsOrderBy":{"type":"string","default":"date"},"postsOrder":{"type":"string","default":"desc"},"postsOffset":{"type":"number","default":0},"postsInclude":{"type":"array","default":[]},"postsExclude":{"type":"array","default":[]},"isExcludeCurrent":{"type":"boolean","default":false},"isPagination":{"type":"boolean","default":false},"paginationCurrentPage":{"type":"number","default":1},"paginationPrevLabel":{"type":"string","default":"Prev"},"paginationNextLabel":{"type":"string","default":"Next"},"paginationColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"paginationHovColors":{"type":"object","default":{"color":"#fff","bg":"#070127"}},"paginationPadding":{"type":"object","default":{"vertical":"8px","horizontal":"15px"}},"paginationSpacing":{"type":"string","default":"15px"},"contentAlign":{"type":"string","default":"left"},"contentBG":{"type":"object","default":{"color":""}},"contentPadding":{"type":"object","default":{"vertical":"20px","horizontal":"25px"}},"border":{"type":"object","default":{"width":"1px","color":"#0c0d3c1a","radius":"5px"}},"sliderIsLoop":{"type":"boolean","default":true},"sliderIsTouchMove":{"type":"boolean","default":false},"sliderIsAutoplay":{"type":"boolean","default":true},"sliderAutoplayOptions":{"type":"object","default":{"delay":1.5}},"sliderSpeed":{"type":"number","default":1.5},"sliderEffect":{"type":"string","default":"slide"},"sliderIsPage":{"type":"boolean","default":true},"sliderIsPageClickable":{"type":"boolean","default":true},"sliderIsPageDynamic":{"type":"boolean","default":true},"sliderPageColor":{"type":"string","default":"#146EF5"},"sliderPageWidth":{"type":"string","default":"15px"},"sliderPageHeight":{"type":"string","default":"15px"},"sliderPageBorder":{"type":"object","default":{"radius":"50%"}},"sliderIsPrevNext":{"type":"boolean","default":true},"sliderPrevNextColor":{"type":"string","default":"#146EF5"},"tickerDirection":{"type":"string","default":"up"},"tickerSpeed":{"type":"string","default":"slow"},"tickerInterval":{"type":"number","default":2000},"tickerHeight":{"type":"string","default":"0px"},"tickerVisible":{"type":"number","default":3},"tickerIsMousePause":{"type":"boolean","default":true},"elementsSort":{"type":"array","default":["title","meta"]},"isFImg":{"type":"boolean","default":true},"fImgSize":{"type":"string","default":"full"},"fImgFitting":{"type":"string","default":"cover"},"isFImgLink":{"type":"boolean","default":false},"isTitle":{"type":"boolean","default":true},"isTitleLink":{"type":"boolean","default":true},"titleTypo":{"type":"object","default":{"fontFamily":"Roboto","fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"},"googleFontLink":"https://fonts.googleapis.com/css2?family=Roboto&display=swap"}},"titleColor":{"type":"string","default":""},"titleMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isMeta":{"type":"boolean","default":true},"isMetaAuthor":{"type":"boolean","default":true},"isMetaAuthorLink":{"type":"boolean","default":true},"metaAuthorIcon":{"type":"string","default":""},"isMetaDate":{"type":"boolean","default":true},"metaDateFormat":{"type":"string","default":"M j, Y"},"metaDateIcon":{"type":"string","default":""},"isMetaCategory":{"type":"boolean","default":true},"metaCategoryIn":{"type":"string","default":"content"},"metaCategoryIcon":{"type":"string","default":""},"metaTaxonomies":{"type":"object","default":{"selected":[]}},"isMetaReadTime":{"type":"boolean","default":false},"metaReadTimeIcon":{"type":"string","default":""},"isMetaReadTimeSec":{"type":"boolean","default":false},"metaReadTimeLabel":{"type":"string","default":"Min read"},"isMetaComment":{"type":"boolean","default":false},"metaCommentIcon":{"type":"string","default":""},"metaTypo":{"type":"object","default":{"fontSize":{"desktop":"13px"},"textTransform":"uppercase"}},"metaTextColor":{"type":"string","default":""},"metaLinkColor":{"type":"string","default":"#146EF5"},"metaIconColor":{"type":"string","default":""},"metaColorsOnImage":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"metaMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isExcerpt":{"type":"boolean","default":true},"isExcerptFromContent":{"type":"boolean","default":false},"isEllipsisOnExcerpt":{"type":"boolean","default":false},"excerptLength":{"type":"number","default":25},"excerptAlign":{"type":"string","default":"justify"},"excerptTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"excerptColor":{"type":"string","default":""},"excerptMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isReadMore":{"type":"boolean","default":true},"readMorePosition":{"type":"string","default":"auto"},"readMoreLabel":{"type":"string","default":"Read More"},"isLinkNewTab":{"type":"boolean","default":false},"readMoreAlign":{"type":"string","default":"left"},"readMoreTypo":{"type":"object","default":{"fontSize":{"desktop":"14px"},"textTransform":"uppercase","fontWeight":600}},"readMoreColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"readMoreHovColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"readMorePadding":{"type":"object","default":{"vertical":"12px","horizontal":"35px"}},"readMoreBorder":{"type":"object","default":{"radius":"3px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","dashicons"],"render":"file:./render.php","viewScript":["file:./view.js","wp-util"]}'),tO=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 271.673 271.673",children:[(0,l.jsx)("path",{ |
| 513 |
d:"M114.939,0H10.449C4.678,0,0,4.678,0,10.449v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449V10.449C125.388,4.678,120.71,0,114.939,0z"}),(0,l.jsx)("path",{d:"M261.224,0h-104.49c-5.771,0-10.449,4.678-10.449,10.449v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449V10.449C271.673,4.678,266.995,0,261.224,0z"}),(0,l.jsx)("path",{d:"M114.939,146.286H10.449C4.678,146.286,0,150.964,0,156.735v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449v-104.49C125.388,150.964,120.71,146.286,114.939,146.286z"}),(0,l.jsx)("path",{d:"M261.224,146.286h-104.49c-5.771,0-10.449,4.678-10.449,10.449v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449v-104.49C271.673,150.964,266.995,146.286,261.224,146.286z"})]}),nO=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 500 500",children:[(0,l.jsx)("path",{d:"M0 0L220 0L220 500L0 500L0 0Z"}),(0,l.jsx)("path",{d:"M280 280L500 280L500 500L280 500L280 280Z"}),(0,l.jsx)("path",{d:"M280 0L370 0L370 220L280 220L280 0Z"}),(0,l.jsx)("path",{d:"M410 0L500 0L500 220L410 220L410 0Z"})]}),oO=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 48 48",children:[(0,l.jsx)("rect",{height:"29.498",width:"21.07",y:"-0.033"}),(0,l.jsx)("rect",{height:"29.498",width:"21.07",x:"26.93",y:"18.535"}),(0,l.jsx)("rect",{height:"13.695",width:"21.07",x:"26.93",y:"-0.033"}),(0,l.jsx)("rect",{height:"13.695",width:"21.07",y:"34.338"})]}),iO=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:[(0,l.jsx)("circle",{cx:"7",cy:"18",r:"1"}),(0,l.jsx)("path",{d:"m7.707 12.293c.391.391.391 1.023 0 1.414-.195.195-.451.293-.707.293s-.512-.098-.707-.293l-3-3c-.391-.391-.391-1.023 0-1.414l3-3c.391-.391 1.023-.391 1.414 0s.391 1.023 0 1.414l-2.293 2.293z"}),(0,l.jsx)("circle",{cx:"12",cy:"18",r:"1"}),(0,l.jsx)("circle",{cx:"17",cy:"18",r:"1"}),(0,l.jsx)("path",{d:"m20.707 10.707-3 3c-.195.195-.451.293-.707.293s-.512-.098-.707-.293c-.391-.391-.391-1.023 0-1.414l2.293-2.293-2.293-2.293c-.391-.391-.391-1.023 0-1.414s1.023-.391 1.414 0l3 3c.391.391.391 1.023 0 1.414z"}),(0,l.jsx)("path",{d:"m21 24h-18c-1.654 0-3-1.346-3-3v-18c0-1.654 1.346-3 3-3h18c1.654 0 3 1.346 3 3v18c0 1.654-1.346 3-3 3zm-18-22c-.552 0-1 .449-1 1v18c0 .551.448 1 1 1h18c.552 0 1-.449 1-1v-18c0-.551-.448-1-1-1z"})]}),sO=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 512 512",style:{transform:"rotate(90deg)"},children:(0,l.jsx)("path",{d:"M0,45.3v421.4h512V45.3H0z M482.1,436.8H29.9V76h452.1V436.8z M140.2,327.3l-70.9-70.9l70.9-70.9l21.3,21.3 l-49.6,49.6l49.6,49.6L140.2,327.3z M350.5,306l49.6-49.6l-49.6-49.6l21.3-21.3l70.9,70.9l-70.9,70.9L350.5,306z"})}),aO=[{label:(0,x.__)("Grid","b-blocks"),value:"grid",icon:tO},{label:(0,x.__)("Grid 1","b-blocks"),value:"grid1",icon:nO},{label:(0,x.__)("Masonry","b-blocks"),value:"masonry",icon:oO},{label:(0,x.__)("Slider","b-blocks"),value:"slider",icon:iO},{label:(0,x.__)("Ticker","b-blocks"),value:"ticker",icon:sO}],rO=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Title Meta","b-blocks"),value:"title-meta"},{label:(0,x.__)("Left Image","b-blocks"),value:"left-image"},{label:(0,x.__)("Right Image","b-blocks"),value:"right-image"},{label:(0,x.__)("Overlay Content","b-blocks"),value:"overlay-content"},{label:(0,x.__)("Overlay Content Hover","b-blocks"),value:"overlay-content-hover"},{label:(0,x.__)("Overlay Box","b-blocks"),value:"overlay-box"},{label:(0,x.__)("Overlay Content Box","b-blocks"),value:"overlay-content-box"},{label:(0,x.__)("Overlay Half Content","b-blocks"),value:"overlay-half-content"}],lO=[{label:(0,x.__)("Auto","b-blocks"),value:"auto"},{label:(0,x.__)("Fill Available Space","b-blocks"),value:"fill"}],cO=[{label:(0,x.__)("Content","b-blocks"),value:"content"},{label:(0,x.__)("Image","b-blocks"),value:"image"}],dO=[{label:(0,x.__)("Slide","b-blocks"),value:"slide"},{label:(0,x.__)("Fade","b-blocks"),value:"fade"},{label:(0,x.__)("Creative","b-blocks"),value:"creative"}],uO=[{label:(0,x.__)("Up","b-blocks"),value:"up"},{label:(0,x.__)("Down","b-blocks"),value:"down"}],pO=[{label:(0,x.__)("Author","b-blocks"),value:"author"},{label:(0,x.__)("Title","b-blocks"),value:"title"},{label:(0,x.__)("Date","b-blocks"),value:"date"},{label:(0,x.__)("Last Modified","b-blocks"),value:"modified"}],hO=[{label:(0,x.__)("Ascending","b-blocks"),value:"asc"},{label:(0,x.__)("Descending","b-blocks"),value:"desc"}],gO=[{label:(0,x.__)("Cover","b-blocks"),value:"cover"},{label:(0,x.__)("Contain","b-blocks"),value:"contain"}],mO=((0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Right","b-blocks"),(0,x.__)("Justify","b-blocks"),[{label:(0,x.__)("01/15/2022","b-blocks"),value:"m/d/Y"},{label:(0,x.__)("15/01/2022","b-blocks"),value:"d/m/Y"},{label:(0,x.__)("January 15, 2022","b-blocks"),value:"F d, Y"},{label:(0,x.__)("Jan 15, 2022","b-blocks"),value:"M d, Y"},{label:(0,x.__)("15th Jan, 2022","b-blocks"),value:"dS M, Y"},{label:(0,x.__)("15th January, 2022","b-blocks"),value:"dS F, Y"},{label:(0,x.__)("Custom","b-blocks"),value:"custom"}]),bO=[{label:(0,x.__)("Auto","b-blocks"),value:"auto"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}],fO=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"elements",title:(0,x.__)("Elements","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],xO=e=>e?.trim().split(",").map((e=>e?parseInt(e):e)),yO=e=>e?.filter((e=>e&&!isNaN(e))),vO=e=>e?(e?.replace(/(<([^>]+)>)/gi,"").split(/\s+/)||[]).length:0,kO=e=>(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:e}}),wO=({[t]:__,...e},t)=>e,_O=(e,t)=>e?.map((e=>e.id))?.filter((e=>-1!==t.indexOf(e))),CO=(...e)=>e.reduce(((e,t)=>("string"==typeof t?e.push(t):"object"==typeof t&&Object.entries(t).forEach((([t,n])=>{n&&e.push(t)})),e)),[]).join(" "),jO=(e=[],t)=>{switch(t){case"true":return e?.filter((e=>e.password));case"false":return e?.filter((e=>!e.password));default:return e}},$O=({attributes:e,setAttributes:t,premiumProps:n})=>{const{tickerDirection:o,tickerSpeed:i,tickerInterval:s,tickerHeight:a,tickerVisible:r,tickerIsMousePause:c}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Ticker Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ys,{label:(0,x.__)("Direction:","b-blocks"),value:o,onChange:e=>t({tickerDirection:e}),options:uO,...n,Component:Tn}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Speed:","b-blocks"),value:i,onChange:e=>t({tickerSpeed:e}),...n,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Values: slow, medium, fast or any value in milliseconds.","b-blocks")}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Interval:","b-blocks"),labelPosition:"left",value:s,onChange:e=>t({tickerInterval:parseInt(e)}),...n,Component:y.__experimentalNumberControl}),(0,l.jsx)("small",{children:(0,x.__)("Values: time in milliseconds.","b-blocks")}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:a,onChange:e=>t({tickerHeight:e}),units:[Ee(),Ae()],...n,Component:y.__experimentalUnitControl}),(0,l.jsx)("small",{children:(0,x.__)("Keep height 0, to auto height.","b-blocks")}),"0px"===a||"0em"===a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Post Visible:","b-blocks"),value:r,onChange:e=>t({tickerVisible:e}),min:0,max:12,step:1,beforeIcon:"visibility",...n,Component:y.RangeControl}),(0,l.jsx)("small",{children:(0,x.__)("0 to display all","b-blocks")})]}):"",(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Ticker Mouse Pause","b-blocks"),checked:c,onChange:e=>t({tickerIsMousePause:e}),...n,Component:y.ToggleControl})]})},SO=({attributes:e,setAttributes:t})=>{ |
| 514 |
const{sliderIsLoop:n,sliderIsTouchMove:o,sliderIsAutoplay:i,sliderAutoplayOptions:s,sliderSpeed:a,sliderEffect:r,sliderIsPage:c,sliderIsPageClickable:d,sliderIsPageDynamic:u,sliderIsPrevNext:p}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Loop","b-blocks"),checked:n,onChange:e=>t({sliderIsLoop:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Touch Move","b-blocks"),checked:o,onChange:e=>t({sliderIsTouchMove:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Autoplay","b-blocks"),checked:i,onChange:e=>t({sliderIsAutoplay:e})}),i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Autoplay Delay (s):","content-slider-block")}),(0,l.jsx)(y.RangeControl,{value:s.delay,onChange:e=>t({sliderAutoplayOptions:{...s,delay:e}}),min:0,max:10,step:.05}),(0,l.jsx)("small",{children:(0,x.__)("Smaller delay value will be autoplay faster","content-slider-block")})]}),(0,l.jsx)(v,{children:(0,x.__)("Speed (s):","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:a,onChange:e=>t({sliderSpeed:e}),min:0,max:10,step:.05}),(0,l.jsx)("small",{children:(0,x.__)("Smaller speed & delay value will be slide faster","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Effect:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:r,onChange:e=>t({sliderEffect:e}),options:dO})]}),(0,l.jsx)("small",{children:(0,x.__)("To work fade & creative effects properly, set single column per view","b-blocks")}),(0,l.jsx)(v,{children:(0,l.jsx)("strong",{children:(0,x.__)("Pagination:","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Pagination","b-blocks"),checked:c,onChange:e=>t({sliderIsPage:e})}),c&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Clickable","b-blocks"),checked:d,onChange:e=>t({sliderIsPageClickable:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Dynamic Bullets","b-blocks"),checked:u,onChange:e=>t({sliderIsPageDynamic:e})})]}),(0,l.jsx)(v,{children:(0,l.jsx)("strong",{children:(0,x.__)("Preview Next Button:","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Preview Next Button","b-blocks"),checked:p,onChange:e=>t({sliderIsPrevNext:e})})]})},TO=({attributes:e,setAttributes:t,premiumProps:n})=>{const{isPagination:i,paginationPrevLabel:s,paginationNextLabel:a,paginationColors:r,paginationHovColors:c,paginationPadding:d,paginationSpacing:u}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pagination","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ys,{label:(0,x.__)("Show Pagination","b-blocks"),checked:i,onChange:e=>t({isPagination:e}),...n,Component:y.ToggleControl}),(0,l.jsx)("small",{children:(0,x.__)("Pagination will not work if, 'Show All Posts' is enable","b-blocks")}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Previous Label:","b-blocks"),value:s,onChange:e=>t({paginationPrevLabel:e}),...n,Component:y.TextControl}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Next Label:","b-blocks"),value:a,onChange:e=>t({paginationNextLabel:e}),...n,Component:y.TextControl}),(0,l.jsx)(Ys,{label:(0,x.__)("Colors:","b-blocks"),value:r,onChange:e=>t({paginationColors:e}),defaults:{color:"#fff",bg:o},...n,Component:On}),(0,l.jsx)(Ys,{label:(0,x.__)("Active & Hover Colors:","b-blocks"),value:c,onChange:e=>t({paginationHovColors:e}),defaults:{color:"#fff",bg:"#070127"},...n,Component:On}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:d,onChange:e=>t({paginationPadding:e}),defaults:{vertical:"8px",horizontal:"15px"},...n,Component:od}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Space Between:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({paginationSpacing:e}),units:[Ee(),Ae()],...n,Component:y.__experimentalUnitControl})]})},MO=(0,f.withSelect)(((e,{attributes:t})=>{const{getPostTypes:n,getTaxonomies:o,getEntityRecords:i}=e("core"),{getDeviceType:s,getCurrentPostType:a,getCurrentPostId:r}=e("core/editor"),{postType:l}=t,c=o({per_page:-1});return{device:s()?.toLowerCase(),postTypes:n({per_page:-1})?.filter((e=>!["apb","attachment","nav_menu_item"].includes(e.slug)&&!e.slug.startsWith("wp_")))?.map((({name:e,slug:t})=>({label:e,value:t}))),currentPostType:a(),currentPostId:r(),allTaxonomies:"post"===l?c?.filter((e=>e.types.includes("post"))).filter((e=>"category"!==e.slug&&"post_tag"!==e.slug)):c?.filter((e=>e.types.includes(l))),getTaxonomy:e=>i("taxonomy",e,{per_page:-1})}}))((({attributes:e,setAttributes:t,premiumProps:n,postTypes:i,currentPostType:a,allTaxonomies:r,getTaxonomy:c,device:d})=>{const{layout:u,subLayout:p,columns:h,columnGap:g,rowGap:m,isContentEqualHight:b,sliderHeight:f,content:k,postType:w,selectedTaxonomies:C,selectedCategories:j,selectedTags:$,isPostsPerPageAll:S,postsPerPage:T,postsOrderBy:M,postsOrder:N,postsOffset:L,postsInclude:E,postsExclude:P,isExcludeCurrent:A}=e,B="grid"===u,I="grid1"===u,O="slider"===u,R="ticker"===u,z={attributes:e,setAttributes:t,premiumProps:n};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:"https://bplugins.com/docs/advanced-post-block"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(Ks,{value:u,onChange:e=>{t({layout:e,subLayout:["slider","ticker"].includes(e)&&["default","title-meta"].includes(p)||"ticker"===e&&"overlay-half-content"===p?"left-image":p,columns:["slider","ticker"].includes(e)?{...h,desktop:2}:h})},options:aO,isTextIcon:!0,proValues:["grid1"],...n}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Sub Layout:","b-blocks")}),(0,l.jsx)(Zs,{value:p,onChange:e=>{t({subLayout:e}),"default"===e||"title-meta"===e||"left-image"===e||"right-image"===e?t({contentBG:{color:""},titleColor:o,metaCategoryIn:"image",metaTextColor:"",metaLinkColor:s,metaIconColor:o,excerptColor:""}):"overlay-content"===e||"overlay-content-hover"===e||"overlay-box"===e||"overlay-content-box"===e?t({contentBG:{color:"#000000b3"},titleColor:"#e7f0fe",metaCategoryIn:"content",metaTextColor:"#fff",metaLinkColor:"#b6d2fc",metaIconColor:"#e7f0fe",excerptColor:"#fff"}):"overlay-half-content"===e&&t({contentBG:{type:"gradient",gradient:"linear-gradient(0deg, #000000bf 0%, #0000 100%)"},titleColor:"#fff",metaCategoryIn:"content",metaTextColor:"#fff",metaLinkColor:"#b6d2fc",metaIconColor:"#e7f0fe",excerptColor:"#fff"}),t("left-image"===e||"right-image"===e?{columns:{...h,desktop:2}}:{columns:{...h,desktop:3}}),t("overlay-box"===e||"overlay-content-box"===e?{contentAlign:"center"}:{contentAlign:"left"})},options:I?rO.filter((e=>!["left-image","right-image"].includes(e.value))):O?rO.filter((e=>!["default","title-meta"].includes(e.value))):R?rO.filter((e=>!["overlay-half-content"].includes(e.value))):rO,proValues:["overlay-content-box","overlay-half-content"],...n})]}),(0,l.jsx)("small",{children:(0,x.__)("Some settings may change when sub layout will be changed.","b-blocks")}),!I&&!R&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:h[d],onChange:e=>{t({columns:{...h,[d]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"})]}),!R&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Column Gap:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:g,onChange:e=>t({columnGap:e}),min:0,max:100,step:1,beforeIcon:"arrow-right-alt"})]}),!O&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Row Gap:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:m,onChange:e=>t({rowGap:e}),min:0,max:150,step:1,beforeIcon:"arrow-down-alt"})]}),(B||I)&&(0, |
| 515 |
l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Post Equal Height","b-blocks"),checked:b,onChange:e=>t({isContentEqualHight:e})}),O&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Slider Min Height:","b-blocks"),labelPosition:"left",value:f,onChange:e=>t({sliderHeight:e}),units:[Ee(),Ae(),Oe()]}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Content/Texts Height:","b-blocks"),labelPosition:"left",value:k?.height,onChange:e=>t({content:{...k,height:e}}),options:lO,...n,Component:y.SelectControl})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Posts Query","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Post Type:","b-blocks")}),(0,l.jsx)(Zs,{value:w,onChange:e=>t({postType:e,selectedTaxonomies:[]}),options:i,proValues:["page"],...n})]}),"post"===w&&c("category")?.length?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Select Categories:","b-blocks")}),(0,l.jsx)(Ss,{value:_O(c("category"),j).map((e=>e.toString())),onChange:e=>t({selectedCategories:e.map((e=>parseInt(e)))}),options:c("category").map((e=>({label:e.name,value:e.id.toString()})))})]}):null,"post"===w&&c("post_tag")?.length?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Select Tags:","b-blocks"),value:_O(c("post_tag"),$).map((e=>e.toString())),onChange:e=>t({selectedTags:e.map((e=>parseInt(e)))}),options:c("post_tag").map((e=>({label:e.name,value:e.id.toString()}))),...n,Component:Ss})}):null,r?.length?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Select Taxonomies for filter:","b-blocks")}),r.map((e=>{const o=Object.keys(C).includes(e.slug);return(0,l.jsx)(Ys,{label:e.name,checked:o,onChange:n=>t({selectedTaxonomies:n?{...C,[e.slug]:[]}:wO(C,e.slug)}),...n,Component:y.CheckboxControl},e.slug)}))]}):null,r?.length&&Object.keys(C)?.length?Object.keys(C).map((e=>c(e)?.length?(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)(`Select ${r?.find((t=>t.slug===e))?.name}:`,"b-blocks"),value:_O(c(e),C[e]).map((e=>e.toString())),onChange:n=>t({selectedTaxonomies:{...C,[e]:n.map((e=>parseInt(e)))}}),options:c(e).map((e=>({label:e.name,value:e.id.toString()}))),...n,Component:Ss},e):null)):null,(0,l.jsx)(v,{children:(0,x.__)("Post Per Page:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:T,onChange:e=>t({postsPerPage:e,isPostsPerPageAll:-1===e}),min:-1,max:36,step:1}),(0,l.jsx)("small",{children:(0,x.__)("To show all posts set -1","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Post Order By:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:M,onChange:e=>t({postsOrderBy:e}),options:pO})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Post Order:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:N,onChange:e=>t({postsOrder:e}),options:hO})]}),!S&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Post Offset:","b-blocks"),labelPosition:"left",value:L,onChange:e=>t({postsOffset:parseInt(e)}),min:0,...n,Component:y.__experimentalNumberControl}),(0,l.jsx)("small",{children:(0,x.__)("`Post Offset` will not work if `Post Per Page` is -1","b-blocks")})]}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Include Posts:","b-blocks"),value:E?.join(","),onChange:e=>t({postsInclude:xO(e)}),...n,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Enter the posts id by coma separated Ex: `23,45,16`","b-blocks")}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Exclude Posts:","b-blocks"),value:P?.join(","),onChange:e=>t({postsExclude:xO(e)}),...n,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Enter the posts id by coma separated Ex: `23,45,16`","b-blocks")}),a===w&&(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Exclude Current Post","b-blocks"),checked:A,onChange:e=>t({isExcludeCurrent:e}),...n,Component:y.ToggleControl})]}),O||R||S?"":(0,l.jsx)(TO,{...z}),O&&(0,l.jsx)(SO,{...z}),R&&(0,l.jsx)($O,{...z})]})})),NO=(0,f.withSelect)((e=>({imageSizes:e("core/block-editor")?.getSettings()?.imageSizes?.map((e=>({label:e.name,value:e.slug})))})))((({attributes:e,setAttributes:t,premiumProps:n,taxOfPostType:o,updateObj:i,imageSizes:s})=>{const{elementsSort:a,isFImg:r,fImgSize:c,fImgFitting:d,isFImgLink:u,isTitle:p,isTitleLink:h,isMeta:g,isMetaAuthor:b,isMetaAuthorLink:f,metaAuthorIcon:k,isMetaDate:w,metaDateFormat:_,metaDateIcon:C,isMetaCategory:j,metaCategoryIn:$,metaCategoryIcon:S,metaTaxonomies:T={},isMetaReadTime:M,metaReadTimeIcon:N,isMetaReadTimeSec:L,metaReadTimeLabel:E,isMetaComment:P,metaCommentIcon:A,isExcerpt:B,isExcerptFromContent:I,isEllipsisOnExcerpt:O,excerptLength:R,isReadMore:z,readMorePosition:D,readMoreLabel:F,isLinkNewTab:H}=e,[W,U]=(0,m.useState)(mO.find((e=>e.value===_))?.value||"custom");return(0,l.jsxs)(l.Fragment,{children:[p&&g&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),children:(0,l.jsx)(Ys,{label:(0,x.__)("Sort Element:"),value:a,onChange:e=>t({elementsSort:e}),...n,Component:Ns})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Feature Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Feature Image","b-blocks"),checked:r,onChange:e=>t({isFImg:e})}),r&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Size:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({fImgSize:e}),options:s,...n,Component:y.SelectControl}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Fitting:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({fImgFitting:e}),options:gO}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Link","b-blocks"),checked:u,onChange:e=>t({isFImgLink:e})})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:p,onChange:e=>t({isTitle:e})}),p&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Title Link","b-blocks"),checked:h,onChange:e=>t({isTitleLink:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Meta Data","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Meta Data","b-blocks"),checked:g,onChange:e=>t({isMeta:e})}),g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Author","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Author","b-blocks"),checked:b,onChange:e=>t({isMetaAuthor:e})}),b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Author Link","b-blocks"),checked:f,onChange:e=>t({isMetaAuthorLink:e}),...n,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Author Icon:","b-blocks"),value:k,types:["image"],onChange:e=>t({metaAuthorIcon:e}),placeholder:(0,x.__)("Enter Author Icon URL","b-blocks"),...n,Component:ve})]}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Date","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Date","b-blocks"),checked:w,onChange:e=>t({isMetaDate:e})}),w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Date Format:","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"gap15",children:[(0,l.jsx)(Ys,{value:W,onChange:e=>{U(e),t({metaDateFormat:"custom"==e?"Y-m-d":e})},options:mO,...n,Component:y.SelectControl}),"custom"===W&&(0,l.jsx)(Ys,{value:_,onChange:e=>t({metaDateFormat:e}),...n,Component:y.TextControl})]}),"custom"===W&&(0,l.jsxs)("small",{children:[(0,x.__)("Documentation on date formatting in ","b-blocks")," ",(0,l.jsx)("a",{href:"https://wordpress.org/support/article/formatting-date-and-time/",target:"_blank",rel:"noreferrer","aria-label":"Documentation on Date Formatting",children:"here"}),"."] |
| 516 |
}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Date Icon:","b-blocks"),value:C,types:["image"],onChange:e=>t({metaDateIcon:e}),placeholder:(0,x.__)("Enter Date Icon URL","b-blocks"),...n,Component:ve})]}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Category","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Category","b-blocks"),checked:j,onChange:e=>t({isMetaCategory:e})}),j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Tn,{label:(0,x.__)("Category In:","b-blocks"),value:$,onChange:e=>t({metaCategoryIn:e}),options:cO}),"content"===$&&(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Category Icon:","b-blocks"),value:S,types:["image"],onChange:e=>t({metaCategoryIcon:e}),placeholder:(0,x.__)("Enter Category Icon URL","b-blocks"),...n,Component:ve})]}),(0,l.jsx)("hr",{}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Taxonomies","b-blocks")})}),o?.map(((e,o)=>{const{selected:s=[]}=T,{name:a,slug:r}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{className:o?"mt20":"",label:(0,x.__)(`Show ${a} Taxonomy`,"b-blocks"),checked:s?.includes(r),onChange:e=>{const n={...T};e?n[r]={}:delete n[r],n.selected=e?[...s,r]:s?.filter((e=>e!==r)),t({metaTaxonomies:n})},...n,Component:y.ToggleControl},r),s?.includes(r)&&(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)(`${a} Icon:`,"b-blocks"),value:T?.[r]?.icon,types:["image"],onChange:e=>i("metaTaxonomies",r,e,"icon"),placeholder:(0,x.__)(`Enter ${a} Icon URL`,"b-blocks"),...n,Component:ve})]})})),(0,l.jsx)("hr",{}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Reading Time","b-blocks")})}),(0,l.jsx)(Ys,{label:(0,x.__)("Show Reading Time","b-blocks"),checked:M,onChange:e=>t({isMetaReadTime:e}),...n,Component:y.ToggleControl}),(M||!n?.isPremium)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("small",{children:(0,x.__)("Reading Time will be displayed if the post has content!","b-blocks")}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Show Reading Time Seconds","b-blocks"),checked:L,onChange:e=>t({isMetaReadTimeSec:e}),...n,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Reading Time Label:","b-blocks"),value:E,onChange:e=>t({metaReadTimeLabel:e}),placeholder:(0,x.__)("Reading Time Label"),...n,Component:y.TextControl}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Reading Time Icon:","b-blocks"),value:N,types:["image"],onChange:e=>t({metaReadTimeIcon:e}),placeholder:(0,x.__)("Enter Reading Time Icon URL","b-blocks"),...n,Component:ve})]}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Comment","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Comment","b-blocks"),checked:P,onChange:e=>t({isMetaComment:e})}),P&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("small",{children:(0,x.__)("Comment Count will be displayed if the comment status is open!","b-blocks")}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Comment Icon:","b-blocks"),value:A,types:["image"],onChange:e=>t({metaCommentIcon:e}),placeholder:(0,x.__)("Enter Comment Icon URL","b-blocks"),...n,Component:ve})]})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Excerpt","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Excerpt","b-blocks"),checked:B,onChange:e=>t({isExcerpt:e})}),B&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt15",label:(0,x.__)("Show Excerpt from Content","b-blocks"),checked:I,onChange:e=>t({isExcerptFromContent:e})}),(0,l.jsx)(Ys,{className:"mt15",label:(0,x.__)("Show Ellipsis","b-blocks"),checked:O,onChange:e=>t({isEllipsisOnExcerpt:e}),...n,Component:y.ToggleControl}),(0,l.jsx)(v,{className:"mt15",children:(0,x.__)("Excerpt Length:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:R,onChange:e=>t({excerptLength:e}),min:-1,max:120,step:1}),(0,l.jsx)("small",{children:(0,x.__)("Set -1 to show all the "+(I?"content":"excerpt"),"b-blocks")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Read More","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Read More","b-blocks"),checked:z,onChange:e=>t({isReadMore:e})}),z&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Position:","b-blocks"),labelPosition:"left",value:D,onChange:e=>t({readMorePosition:e}),options:bO,...n,Component:y.SelectControl}),(0,l.jsx)("small",{children:(0,x.__)("For the bottom position, select 'Fill Available Space' option for the 'Content/Texts Height' from General->Layout","b-blocks")}),(0,l.jsx)(v,{children:(0,x.__)("Read More Label:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:F,onChange:e=>t({readMoreLabel:""===e?"Read More":e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Open link in new tab","b-blocks"),checked:H,onChange:e=>t({isLinkNewTab:e})})]})]})]})})),LO=({attributes:e,setAttributes:t})=>{const{layout:n,contentAlign:i,contentBG:a,contentPadding:r,border:c,sliderIsPage:d,sliderPageColor:u,sliderPageWidth:p,sliderPageHeight:h,sliderPageBorder:g,sliderIsPrevNext:m,sliderPrevNextColor:b,isTitle:f,titleTypo:k,titleColor:w,titleMargin:_,isMeta:C,metaCategoryIn:j,metaTypo:$,metaTextColor:S,metaLinkColor:T,metaIconColor:M,metaColorsOnImage:N,metaMargin:L,isExcerpt:E,excerptAlign:P,excerptTypo:A,excerptColor:B,excerptMargin:I,isReadMore:O,readMoreAlign:R,readMoreTypo:z,readMoreColors:D,readMoreHovColors:F,readMorePadding:H,readMoreBorder:W}=e,U="slider"===n;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align:","b-blocks")}),(0,l.jsx)(Tn,{value:i,onChange:e=>t({contentAlign:e}),options:Jt,isIcon:!0})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:a,onChange:e=>t({contentBG:e}),defaults:{color:""}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:r,onChange:e=>t({contentPadding:e}),defaults:{vertical:"20px",horizontal:"25px"}}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:c,onChange:e=>t({border:e}),defaults:{width:"1px",color:"#0c0d3c1a",radius:"5px"}})]}),U&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Options","b-blocks"),initialOpen:!1,children:[d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Pagination Bullets Color:","b-blocks"),value:u,onChange:e=>t({sliderPageColor:e}),defaultColor:o}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Pagination Width:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({sliderPageWidth:e}),units:[Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Pagination Height:","b-blocks"),labelPosition:"left",value:h,onChange:e=>t({sliderPageHeight:e}),units:[Ee(),Ae()]}),(0,l.jsx)(Xc,{label:(0,x.__)("Pagination Border:","b-blocks"),value:g,onChange:e=>t({sliderPageBorder:e}),defaults:{radius:"50%"}})]}),m&&(0,l.jsx)(Ue,{label:(0,x.__)("Preview Next Button Color:","b-blocks"),value:b,onChange:e=>t({sliderPrevNextColor:e}),defaultColor:o})]}),f&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:k,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:w,onChange:e=>t({titleColor:e}),defaultColor:o}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:_,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"15px"}})]}),C&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Meta Data","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:$,onChange:e=>t({metaTypo:e}),defaults:{fontSize:{desktop:13,tablet:13,mobile:13},textTransform:"uppercase"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"), |
| 517 |
value:S,onChange:e=>t({metaTextColor:e}),defaultColor:""}),(0,l.jsx)(Ue,{label:(0,x.__)("Link Color:","b-blocks"),value:T,onChange:e=>t({metaLinkColor:e}),defaultColor:o}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:M,onChange:e=>t({metaIconColor:e}),defaultColor:""}),"image"===j&&(0,l.jsx)(On,{label:(0,x.__)("Category Colors On Image:","b-blocks"),value:N,onChange:e=>t({metaColorsOnImage:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:L,onChange:e=>t({metaMargin:e}),defaults:{side:4,bottom:"15px"}})]}),E&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Excerpt","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align:","b-blocks")}),(0,l.jsx)(Tn,{value:P,onChange:e=>t({excerptAlign:e}),options:Jt,isIcon:!0})]}),(0,l.jsx)(Os,{value:A,onChange:e=>t({excerptTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:B,onChange:e=>t({excerptColor:e}),defaultColor:""}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:I,onChange:e=>t({excerptMargin:e}),defaults:{side:4,bottom:"10px"}})]}),O&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Read More","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Align:","b-blocks")}),(0,l.jsx)(Tn,{value:R,onChange:e=>t({readMoreAlign:e}),options:Jt.filter((e=>"justify"!==e.value)),isIcon:!0})]}),(0,l.jsx)(Os,{value:z,onChange:e=>t({readMoreTypo:e}),defaults:{fontSize:{desktop:14,tablet:14,mobile:14},textTransform:"uppercase",fontWeight:600}}),(0,l.jsx)(On,{value:D,onChange:e=>t({readMoreColors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:F,onChange:e=>t({readMoreHovColors:e}),defaults:{color:"#fff",bg:s}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:H,onChange:e=>t({readMorePadding:e}),defaults:{vertical:"12px",horizontal:"35px"}}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:W,onChange:e=>t({readMoreBorder:e}),defaults:{radius:"3px"}})]})]})},EO=({attributes:e,setAttributes:t,isPremium:n,posts:o,taxOfPostType:i})=>{const{contentAlign:s}=e,[a,r]=(0,m.useState)(!1),c=o?.length,d=(n,o,i,s)=>{const a=Ob(e[n],(e=>{s?e[o][s]=i:e[o]=i}));t({[n]:a})},u={attributes:e,setAttributes:t,premiumProps:{isPremium:n,setIsProModalOpen:r}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:fO,onSelect:()=>me(),children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsx)(MO,{...u}),"elements"===e.name&&(0,l.jsx)(NO,{...u,taxOfPostType:i,updateObj:d}),"style"===e.name&&c&&(0,l.jsx)(LO,{...u})]})})}),(0,l.jsxs)(jn,{isProModalOpen:a,setIsProModalOpen:r,block:"Posts",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Layouts: ","b-blocks")}),(0,x.__)("Checkout more layouts and sub layouts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Display Pages: ","b-blocks")}),(0,x.__)("Effortlessly showcase pages, just like you do with posts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Tag Filter: ","b-blocks")}),(0,x.__)("Post filter by tags (only for default post).","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Custom Taxonomy Filter: ","b-blocks")}),(0,x.__)("Custom Taxonomy filter for post and custom posts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Post Offset: ","b-blocks")}),(0,x.__)("Offset to exclude first N posts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Include or Exclude Posts: ","b-blocks")}),(0,x.__)("Include or Exclude the posts by ids.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Exclude Current Post: ","b-blocks")}),(0,x.__)("If you use this block in a post and that post type is selected post then you can exclude the post.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Pagination: ","b-blocks")}),(0,x.__)("Add custom pagination bottom of the posts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Sort Elements: ","b-blocks")}),(0,x.__)("Sort the title and meta elements.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Meta Data Icon: ","b-blocks")}),(0,x.__)("Custom icon for meta data.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Meta Author Link Toggle: ","b-blocks")}),(0,x.__)("Show meta author with or without link.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Taxonomies in Meta: ","b-blocks")}),(0,x.__)("Display taxonomies within the meta data, including tags.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Reading Time: ","b-blocks")}),(0,x.__)("Show post reading time in meta area.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Excerpt from Content: ","b-blocks")}),(0,x.__)("Show excerpt from main content.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Ticker Layout Options: ","b-blocks")}),(0,x.__)("Options for ticker post layout.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Feature Image Size: ","b-blocks")}),(0,x.__)("Options to set feature image size.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Read More Position: ","b-blocks")}),(0,x.__)("Options to set the position fo Read More button.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Shortcode: ","b-blocks")}),(0,x.__)("Shortcode option to use anywhere.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Update Post Query: ","b-blocks")}),(0,x.__)("Update Post Query using b_blocks_posts_query filter.","b-blocks")]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:s,onChange:e=>t({contentAlign:e})})})]})},PO="bBlocksPosts",AO=()=>(0,l.jsxs)("h3",{className:`${PO}Loading`,children:[(0,l.jsx)(y.Spinner,{})," ",(0,x.__)("Loading...","b-blocks")]}),BO=()=>(0,l.jsx)("h3",{className:`${PO}NotFound`,children:(0,x.__)("No posts found!! Please update the query or add some posts","b-blocks")}),IO=({attributes:e,id:t})=>{const{columnGap:n,rowGap:o,isContentEqualHight:i,sliderHeight:s,paginationColors:a,paginationHovColors:r,paginationPadding:c,paginationSpacing:d,fImgFitting:u="cover",contentAlign:p,contentBG:h,contentPadding:g,border:m,sliderPageColor:b,sliderPageWidth:f,sliderPageHeight:x,sliderPageBorder:y,sliderPrevNextColor:v,titleTypo:k,titleColor:w,titleMargin:_,metaTypo:C,metaTextColor:j,metaLinkColor:$,metaIconColor:S,metaColorsOnImage:T,metaMargin:M,excerptAlign:N,excerptTypo:L,excerptColor:E,excerptMargin:P,readMoreAlign:A,readMoreTypo:B,readMoreColors:I,readMoreHovColors:O,readMorePadding:R,readMoreBorder:z}=e,D=`#${t}`,F=`${D} .${PO}Article`,H=`${D} .${PO}LayoutSlider`,W=`${F} .${PO}ElReadMore`,U=`${F} .${PO}ElTitle`,G=`${F} .${PO}ElMeta`,V=`${D} .${PO}Pagination`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{ |
| 518 |
__html:`\n\t\t${pa("",k)?.googleFontLink}\n\t\t${pa("",C)?.googleFontLink}\n\t\t${pa("",L)?.googleFontLink}\n\t\t${pa("",B)?.googleFontLink}\n\t\t${pa(`${U}, ${U} a`,k)?.styles}\n\t\t${pa(`${G}, ${G} *, ${F} .${PO}ElThumbCats`,C)?.styles}\n\t\t${pa(`${F} .${PO}ElExcerpt`,L)?.styles}\n\t\t${pa(`${W} a`,B)?.styles}\n\n\t\t${V} .${PO}PagePrev,\n\t\t${V} .${PO}PageNumber,\n\t\t${V} .${PO}PageNext{\n\t\t\tfont-size: 15px;\n\t\t\t${aa(a)}\n\t\t\tpadding: ${ua(c)};\n\t\t\tmargin: 0 calc( ${d} / 2 );\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${V} .${PO}PagePrev,\n\t\t\t${V} .${PO}PageNumber,\n\t\t\t${V} .${PO}PageNext{\n\t\t\t\tfont-size: 12px;\n\t\t\t\tpadding: ${ua(c)?.split(" ").map((e=>`calc( ${e} / 2 )`)).join(" ")};\n\t\t\t\tmargin: 0 calc( ${d} / 4 );\n\t\t\t}\n\t\t}\n\t\t${V} .${PO}PagePrev:hover,\n\t\t${V} .${PO}PageNumber:hover,\n\t\t${V} .${PO}PageNext:hover,\n\t\t${V} .${PO}PageActive{\n\t\t\t${aa(r)}\n\t\t}\n\n\t\t${F}{\n\t\t\t${ia(m)}\n\t\t}\n\t\t${D} .${PO}SLDefault,\n\t\t${D} .${PO}SLSideImage{\n\t\t\ttext-align: ${p};\n\t\t\t${oa(h)}\n\t\t}\n\n\t\t${F} .${PO}ElTexts{\n\t\t\tpadding: ${ua(g)};\n\t\t}\n\t\t${D} .${PO}SLOverlay .${PO}ElTexts{\n\t\t\t${oa(h)}\n\t\t\talign-items: ${"left"===p?"flex-start":"right"===p?"flex-end":"center"===p?"center":""}\n\t\t}\n\n\t\t${U}, ${U} a{\n\t\t\ttext-align: ${p};\n\t\t\tcolor: ${w};\n\t\t}\n\t\t${U}{\n\t\t\tmargin: ${ua(_)};\n\t\t}\n\t\t${G}{\n\t\t\tjustify-content: ${"left"===p?"flex-start":"right"===p?"flex-end":"center"};\n\t\t\tcolor: ${j};\n\t\t\tmargin: ${ua(M)};\n\t\t}\n\t\t${G} a{\n\t\t\tcolor: ${$};\n\t\t}\n\t\t${G} .dashicons{\n\t\t\tcolor: ${S};\n\t\t}\n\t\t${F} .${PO}ElThumb img, ${F}.${PO}SLOverlay img{\n\t\t\tobject-fit: ${u};\n\t\t}\n\t\t${F} .${PO}ElThumbCats a{\n\t\t\t${aa(T)}\n\t\t}\n\t\t${F} .${PO}ElExcerpt{\n\t\t\ttext-align: ${N};\n\t\t\tcolor: ${E};\n\t\t\tmargin: ${ua(P)};\n\t\t}\n\t\t${W}{\n\t\t\ttext-align: ${A};\n\t\t}\n\t\t${W} a{\n\t\t\t${aa(I)}\n\t\t\tpadding: ${ua(R)};\n\t\t\t${ia(z)}\n\t\t}\n\t\t${W} a:hover{\n\t\t\t${aa(O)}\n\t\t}\n\n\t\t${D} .${PO}LayoutGrid,\n\t\t${D} .${PO}LayoutGrid1{\n\t\t\tgrid-gap: ${o}px ${n}px;\n\t\t\talign-items: ${!1===i?"start":"initial"};\n\t\t}\n\n\t\t${H},\n\t\t${H} .swiper-slide article{\n\t\t\tmin-height: ${s};\n\t\t}\n\t\t${H} .swiper-pagination .swiper-pagination-bullet{\n\t\t\tbackground: ${b};\n\t\t\twidth: ${f};\n\t\t\theight: ${x};\n\t\t\t${ia(y)}\n\t\t}\n\t\t${H} .swiper-button-prev,\n\t\t${H} .swiper-button-next{\n\t\t\tcolor: ${v};\n\t\t}\n\t`.replace(/\s+/g," ")}})},OO=({post:e,attributes:t})=>{const{link:n,thumbnail:{url:o,alt:i},categories:s}=e,{isFImg:a,isFImgLink:r,isMeta:c,isMetaCategory:d,metaCategoryIn:u,isLinkNewTab:p}=t;return a&&o?(0,l.jsxs)("figure",{className:`${PO}ElThumb`,children:[r?(0,l.jsx)("a",{href:n,target:p?"_blank":"_self",rel:"noreferrer","aria-label":i,children:(0,l.jsx)("img",{src:o,alt:i})}):(0,l.jsx)("img",{src:o,alt:i}),c&&d&&"image"===u&&s.space&&(0,l.jsx)("div",{className:`${PO}ElThumbCats`,dangerouslySetInnerHTML:{__html:s.space}})]}):null},RO=({post:e,attributes:t})=>{const{author:n}=e,{name:o,link:i}=n||{},{isMetaAuthor:s,isMetaAuthorLink:a=!0,metaAuthorIcon:r}=t;return s&&o?(0,l.jsxs)("span",{children:[r?(0,l.jsx)("img",{src:r,alt:"Author"}):(0,l.jsx)("span",{className:"dashicons dashicons-admin-users"}),a?(0,l.jsx)("a",{href:i,target:"_blank",rel:"noreferrer","aria-label":o,children:o}):(0,l.jsx)("span",{children:o})]}):null},zO=({post:e,attributes:t})=>{const{date:n}=e,{isMetaDate:o,metaDateIcon:i}=t;return o&&n?(0,l.jsxs)("span",{children:[i?(0,l.jsx)("img",{src:i,alt:"Date"}):(0,l.jsx)("span",{className:"dashicons dashicons-calendar-alt"}),(0,l.jsx)("span",{children:n})]}):null},DO=({post:e,attributes:t})=>{const{categories:n}=e,{isMetaCategory:o,metaCategoryIn:i,metaCategoryIcon:s}=t;return o&&"content"===i&&n.coma?(0,l.jsxs)("span",{children:[s?(0,l.jsx)("img",{src:s,alt:"Author"}):(0,l.jsx)("span",{className:"dashicons dashicons-category"}),kO(n.coma)]}):null},FO=({post:e,attributes:t})=>{const{taxonomies:n={}}=e,{metaTaxonomies:o={}}=t,{selected:i=[]}=o;return i.map((e=>{const t=n[e],i=o[e]?.icon,s=i?(0,l.jsx)("img",{src:i,alt:e}):(0,l.jsx)("span",{className:"dashicons "+("post_tag"===e?"dashicons-tag":"dashicons-category")});return t?(0,l.jsxs)("span",{children:[s,kO(t?.split("a><a")?.join("a>, <a"))]},e):null}))},HO=({post:e,attributes:t})=>{const{readTime:n,content:o}=e,{isMetaReadTime:i,metaReadTimeIcon:s,isMetaReadTimeSec:a,metaReadTimeLabel:r}=t,c=a?`${n?.min}:${n?.sec}`:n?.min;return i&&o?(0,l.jsxs)("span",{children:[s?(0,l.jsx)("img",{src:s,alt:"Author"}):(0,l.jsx)("span",{className:"dashicons dashicons-clock"}),(0,l.jsxs)("span",{children:[c," ",r]})]}):null},WO=({post:e,attributes:t})=>{const{link:n,title:o,commentCount:i,commentStatus:s}=e,{isMetaComment:a,metaCommentIcon:r}=t;return a&&"open"===s?(0,l.jsxs)("span",{children:[r?(0,l.jsx)("img",{src:r,alt:"Author"}):(0,l.jsx)("span",{className:"dashicons dashicons-admin-comments"}),(0,l.jsx)("a",{href:`${n}/#comments`,target:"_blank",rel:"noreferrer","aria-label":`Comments of ${o}`,children:i})]}):null},UO=({post:e,attributes:t})=>{const{isMeta:n}=t;return n&&(0,l.jsxs)("div",{className:`${PO}ElMeta`,children:[(0,l.jsx)(RO,{post:e,attributes:t}),(0,l.jsx)(zO,{post:e,attributes:t}),(0,l.jsx)(DO,{post:e,attributes:t}),(0,l.jsx)(FO,{post:e,attributes:t}),(0,l.jsx)(HO,{post:e,attributes:t}),(0,l.jsx)(WO,{post:e,attributes:t})]})},GO=({post:e,attributes:t})=>{const{link:n,title:o}=e,{isTitle:i,isTitleLink:s,isLinkNewTab:a}=t;return i?(0,l.jsx)(l.Fragment,{children:s?(0,l.jsx)("h3",{className:`${PO}ElTitle`,children:(0,l.jsx)("a",{href:n,target:a?"_blank":"_self",rel:"noreferrer",dangerouslySetInnerHTML:{__html:o},"aria-label":o})}):(0,l.jsx)("h3",{className:`${PO}ElTitle`,dangerouslySetInnerHTML:{__html:o}})}):null},VO=({post:e,attributes:t})=>{const{elementsSort:n=["title","meta"]}=t;return n.map(((n,o)=>"title"===n?(0,l.jsx)(GO,{post:e,attributes:t},o):(0,l.jsx)(UO,{post:e,attributes:t},o)))},qO=({post:e,attributes:t})=>{const{excerpt:n,content:o}=e,{isExcerpt:i,isExcerptFromContent:s,isEllipsisOnExcerpt:a,excerptLength:r}=t,c=!s&&n?n:o,d=a&&((u=c)?u.split(" ").length:0)>r?"...":"";var u;const p=-1===r?c:`${((e,t)=>e?e.split(/\s+/).slice(0,t).join(" "):"")(c,r)}${d}`;return i&&c?(0,l.jsx)("div",{className:`${PO}ElExcerpt ${PO}InnerContent`,dangerouslySetInnerHTML:{__html:p}}):null},YO=({post:e,attributes:t})=>{const{link:n}=e,{isReadMore:o,readMorePosition:i="auto",readMoreLabel:s,isLinkNewTab:a}=t;return o?(0,l.jsx)("div",{className:`${PO}ElReadMore ${i}`,children:(0,l.jsx)("a",{href:n,target:a?"_blank":"_self",rel:"noreferrer",dangerouslySetInnerHTML:{__html:St(s)},"aria-label":s})}):null},KO=({post:e,attributes:t,postClass:n})=>{const{subLayout:o}=t,i=CO(n,`${PO}SLDefault`);return(0,l.jsxs)("article",{className:i,children:[(0,l.jsx)(OO,{post:e,attributes:t}),(0,l.jsxs)("div",{className:`${PO}ElTexts`,children:[(0,l.jsx)(VO,{post:e,attributes:t}),"title-meta"!==o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(qO,{post:e,attributes:t}),(0,l.jsx)(YO,{post:e,attributes:t})]})]})]})},QO=({post:e,attributes:t,postClass:n})=>{const{thumbnail:o}=e,{subLayout:i,isFImg:s}=t,a="left-image"===i,r="right-image"===i,c=CO(n,`${PO}SLSideImage`,{grid:s&&o.url,leftImage:a,rightImage:r});return(0,l.jsxs)("article",{className:c,children:[a&&(0,l.jsx)(OO,{post:e,attributes:t}),(0,l.jsxs)("div",{className:`${PO}ElTexts`,children:[(0,l.jsx)(VO,{post:e,attributes:t}),(0,l.jsx)(qO,{post:e,attributes:t}),(0,l.jsx)(YO,{post:e,attributes:t})]}),r&&(0,l.jsx)(OO,{post:e,attributes:t})]})},ZO=({post:e,attributes:t,postClass:n})=>{const{title:o,thumbnail:{url:i}}=e,{subLayout:s}=t,a=CO(n,`${PO}SLOverlay`,{[`${PO}SLOverlayHover`]:"overlay-content-hover"===s&&i,[`${PO}SLOverlayBox`]:"overlay-box"===s||"overlay-content-box"===s,[`${PO}SLOverlayHalfContent`]:"overlay-half-content"===s});return(0,l.jsxs)("article",{className:a,children:[i&&(0, |
| 519 |
l.jsx)("img",{src:i,alt:o}),(0,l.jsxs)("div",{className:`${PO}ElTexts`,children:[(0,l.jsx)(VO,{post:e,attributes:t}),"overlay-box"!==s&&"overlay-half-content"!==s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(qO,{post:e,attributes:t}),(0,l.jsx)(YO,{post:e,attributes:t})]})]})]})},XO=({post:e,attributes:t})=>{const{subLayout:n,content:o={height:"auto"}}=t,{id:i,thumbnail:s}=e,a=CO(`${PO}Article`,`${PO}Article-${i}`,`${o?.height}ContentHeight`,{hasThumbnail:s.url});switch(n){case"default":case"title-meta":return(0,l.jsx)(KO,{post:e,attributes:t,postClass:a});case"left-image":case"right-image":return(0,l.jsx)(QO,{post:e,attributes:t,postClass:a});case"overlay-content":case"overlay-content-hover":case"overlay-box":case"overlay-content-box":case"overlay-half-content":return(0,l.jsx)(ZO,{post:e,attributes:t,postClass:a});default:return null}};function JO(){return JO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},JO.apply(this,arguments)}function eR(e,t){return eR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},eR(e,t)}var tR=function(e){var t,n;function o(){var t;return(t=e.call(this)||this).state={columns:[],childRefs:[],hasDistributed:!1},t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,eR(t,n);var i=o.prototype;return i.componentDidUpdate=function(){this.state.hasDistributed||this.props.sequential||this.distributeChildren()},o.getDerivedStateFromProps=function(e,t){var n=e.children,i=e.columnsCount,s=i!==t.columns.length;return t&&n===t.children&&!s?null:JO({},o.getEqualCountColumns(n,i),{children:n,hasDistributed:!1})},i.shouldComponentUpdate=function(e){return e.children!==this.state.children||e.columnsCount!==this.props.columnsCount},i.distributeChildren=function(){var e=this,t=this.props,n=t.children,o=t.columnsCount,i=Array(o).fill(0);if(this.state.childRefs.every((function(e){return e.current.getBoundingClientRect().height}))){var s=Array.from({length:o},(function(){return[]})),a=0;b().Children.forEach(n,(function(t){if(t&&b().isValidElement(t)){var n=e.state.childRefs[a].current.getBoundingClientRect().height,o=i.indexOf(Math.min.apply(Math,i));i[o]+=n,s[o].push(t),a++}})),this.setState((function(e){return JO({},e,{columns:s,hasDistributed:!0})}))}},o.getEqualCountColumns=function(e,t){var n=Array.from({length:t},(function(){return[]})),o=0,i=[];return b().Children.forEach(e,(function(e){if(e&&b().isValidElement(e)){var s=b().createRef();i.push(s),n[o%t].push(b().createElement("div",{style:{display:"flex",justifyContent:"stretch"},key:o,ref:s},e)),o++}})),{columns:n,childRefs:i}},i.renderColumns=function(){var e=this.props,t=e.gutter,n=e.itemTag,o=e.itemStyle;return this.state.columns.map((function(e,i){return b().createElement(n,{key:i,style:JO({display:"flex",flexDirection:"column",justifyContent:"flex-start",alignContent:"stretch",flex:1,width:0,gap:t},o)},e.map((function(e){return e})))}))},i.render=function(){var e=this.props,t=e.gutter,n=e.className,o=e.style,i=e.containerTag;return b().createElement(i,{style:JO({display:"flex",flexDirection:"row",justifyContent:"center",alignContent:"stretch",boxSizing:"border-box",width:"100%",gap:t},o),className:n},this.renderColumns())},o}(b().Component);tR.propTypes={},tR.defaultProps={columnsCount:3,gutter:"0",className:null,style:{},containerTag:"div",itemTag:"div",itemStyle:{},sequential:!1};const nR=tR;var oR="undefined"!=typeof window?m.useLayoutEffect:m.useEffect,iR=function(e){var t,n,o,i,s,a=e.columnsCountBreakPoints,r=void 0===a?{350:1,750:2,900:3}:a,l=e.gutterBreakPoints,c=void 0===l?{}:l,d=e.children,u=e.className,p=void 0===u?null:u,h=e.style,g=void 0===h?null:h,f=(t=function(){var e=(0,m.useState)(!1),t=e[0],n=e[1];return oR((function(){n(!0)}),[]),t}(),n=(0,m.useState)("undefined"!=typeof window?window.innerWidth:0),o=n[0],i=n[1],s=(0,m.useCallback)((function(){t&&i(window.innerWidth)}),[t]),oR((function(){if(t)return window.addEventListener("resize",s),s(),function(){return window.removeEventListener("resize",s)}}),[t,s]),o),x=(0,m.useCallback)((function(e,t){var n=Object.keys(e).sort((function(e,t){return e-t})),o=n.length>0?e[n[0]]:t;return n.forEach((function(t){t<f&&(o=e[t])})),o}),[f]),y=(0,m.useMemo)((function(){return x(r,1)}),[x,r]),v=(0,m.useMemo)((function(){return x(c,"10px")}),[x,c]);return b().createElement("div",{className:p,style:g},b().Children.map(d,(function(e,t){return b().cloneElement(e,{key:t,columnsCount:y,gutter:v})})))};iR.propTypes={};const sR=iR,aR=nR,rR=({posts:e,attributes:t})=>{const{columns:n,columnGap:o,rowGap:i}=t,{desktop:s=3,tablet:a=2,mobile:r=1}=n;return(0,l.jsx)(sR,{className:`${PO}LayoutMasonry`,columnsCountBreakPoints:{0:r,576:a,768:s},children:(0,l.jsx)(aR,{gutter:`${i}px ${o}px`,children:e.map((e=>(0,l.jsx)(XO,{post:e,attributes:t},e.id)))})})},lR=({posts:e,attributes:t,id:n,Slider:o,Ticker:i})=>{const{layout:s,columns:a}=t,{desktop:r=3,tablet:c=2,mobile:d=1}=a,u=()=>e.map((e=>(0,l.jsx)(XO,{post:e,attributes:t},e.id)));switch(s){case"grid":return(0,l.jsx)("div",{className:`${PO}LayoutGrid columns-${r} columns-tablet-${c} columns-mobile-${d}`,children:(0,l.jsx)(u,{})});case"grid1":return(0,l.jsx)("div",{className:`${PO}LayoutGrid1`,children:(0,l.jsx)(u,{})});case"masonry":return(0,l.jsx)(rR,{posts:e,attributes:t});case"slider":return(0,l.jsx)(o,{posts:e,attributes:t,id:n});case"ticker":return(0,l.jsx)(i,{posts:e,attributes:t,id:n});default:return null}},cR="·",dR=(e,t)=>{let n=t-e+1;return Array.from({length:n},((t,n)=>n+e))},uR=({attributes:e,totalCount:t,onChange:n})=>{const{layout:o,isPostsPerPageAll:i,postsPerPage:s,isPagination:a,paginationPrevLabel:r,paginationNextLabel:c}=e,[d,u]=(0,m.useState)(1),p=(({currentPage:e,totalCount:t,pageSize:n,siblingCount:o=1})=>(0,m.useMemo)((()=>{const i=Math.ceil(t/n);if(o+5>=i)return dR(1,i);const s=Math.max(e-o,1),a=Math.min(e+o,i),r=s>2,l=a<i-2,c=i;if(!r&&l)return[...dR(1,3+2*o),cR,i];if(r&&!l){let e=dR(i-(3+2*o)+1,i);return[1,cR,...e]}if(r&&l){let e=dR(s,a);return[1,cR,...e,cR,c]}}),[e,t,n,o]))({currentPage:d,totalCount:t,pageSize:s,siblingCount:1});if(0===d||p.length<2)return null;let h=p[p.length-1];const g=e=>{n(e),u(e)};return a&&!i&&"slider"!==o&&"ticker"!==o?(0,l.jsxs)("ul",{className:`${PO}Pagination`,children:[(0,l.jsx)("li",{className:`${PO}PageNumber ${1===d?"disabled":""}`,onClick:()=>g(d-1),children:r}),p.map(((e,t)=>e===cR?(0,l.jsx)("li",{className:"dots",children:"·····"},t):(0,l.jsxs)("li",{className:`${PO}PageNumber ${e===d?`${PO}PageActive`:""}`,onClick:()=>g(e),children:[" ",e]},t))),(0,l.jsx)("li",{className:`${PO}PageNumber ${d===h?"disabled":""}`,onClick:()=>g(d+1),children:c})]}):null},pR=({posts:e,attributes:t,id:n})=>{const{columns:o,columnGap:i,sliderIsLoop:s,sliderIsTouchMove:a,sliderIsAutoplay:r,sliderAutoplayOptions:c={delay:1.5},sliderSpeed:d,sliderEffect:u,sliderIsPage:p,sliderIsPageClickable:h,sliderIsPageDynamic:g,sliderIsPrevNext:b}=t;return(0,m.useEffect)((()=>{(e=>{const t=[],n=document.querySelectorAll(`#${e} .swiper .swiper-slide`),o=document.querySelectorAll(`#${e} .swiper .swiper-slide .${PO}ElTexts`);o?.forEach((e=>{t.push(e?.clientHeight)})),n?.length&&n.forEach((e=>{e.querySelector("article").style.height=`${Math.max(...t)}px`}))})(n)}),[e?.length]),(0,l.jsx)(Hx,{className:`${PO}LayoutSlider`,spaceBetween:i,slidesPerView:o.mobile,breakpoints:{576:{slidesPerView:o.tablet},768:{slidesPerView:o.desktop}},modules:[Bf,zf,Uf,Nf,Ef],loop:s,allowTouchMove:a,grabCursor:a,autoplay:!!r&&{delay:1e3*c?.delay},speed:1e3*d,effect:u,fadeEffect:{crossFade:!0},creativeEffect:{prev:{shadow:!0,translate:["-120%",0,-500]},next:{shadow:!0,translate:["120%",0,-500]}},pagination:!!p&&{clickable:h,dynamicBullets:g},navigation:b,allowSlideNext:!0,allowSlidePrev:!0,autoHeight:!1,children:e.map((e=>(0,l.jsx)(Wx,{children:(0,l.jsx)(XO,{post:e,attributes:t})},e.id)))})},hR=({posts:e,attributes:t,id:n})=>{ |
| 520 |
const{columns:o,columnGap:i,sliderIsLoop:s,sliderIsTouchMove:a,sliderIsAutoplay:r,sliderAutoplayOptions:c={delay:1.5},sliderSpeed:d,sliderEffect:u,sliderIsPage:p,sliderIsPageClickable:h,sliderIsPageDynamic:g,sliderIsPrevNext:b}=t,[f,x]=(0,m.useState)(!0),y=()=>(0,l.jsx)(pR,{posts:e,attributes:t,id:n});return(0,m.useEffect)((()=>{x(!f)}),[o,i,s,a,r,c,d,u,p,h,g,b]),(0,l.jsx)(y,{})},gR=jQuery,mR=({posts:e,attributes:t,id:n})=>{const{rowGap:o,tickerDirection:i,tickerSpeed:s,tickerInterval:a,tickerHeight:r,tickerVisible:c,tickerIsMousePause:d}=t,u=(0,m.useRef)(null),p=(0,m.useRef)(null),h=`#${n}`;return(0,m.useEffect)((()=>{const e=p.current;e&&(e.innerHTML="",e.innerHTML=u.current.outerHTML,gR(`${h} .${PO}LayoutTickerWrapper .${PO}LayoutTicker`).easyTicker((e=>{const{rowGap:t,tickerDirection:n="up",tickerSpeed:o="slow",tickerInterval:i=2e3,tickerHeight:s="0px",tickerVisible:a=3,tickerIsMousePause:r=!0}=e;return{direction:n,easing:"swing",speed:isNaN(o)?o:parseInt(o),interval:i,height:"0px"===s||"0em"===s?"auto":s,gap:t,visible:a,mousePause:r}})(t)))}),[o,i,s,a,r,c,d]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:`${PO}LayoutTickerWrapper`,ref:p}),(0,l.jsx)("div",{className:`${PO}LayoutTicker`,ref:u,children:(0,l.jsx)("div",{children:e.map((e=>(0,l.jsx)(XO,{post:e,attributes:t},e.id)))})})]})},bR=({posts:e,totalPosts:t,attributes:n,setAttributes:o,id:i,isPremium:s})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(IO,{attributes:n,id:i}),(0,l.jsx)(lR,{posts:e,attributes:n,id:i,Slider:hR,Ticker:mR}),s&&(0,l.jsx)(uR,{attributes:n,totalCount:t,onChange:e=>o({paginationCurrentPage:e})})]}),{dateI18n:fR}=wp.date,xR=(0,f.withSelect)(((e,{attributes:t})=>{const{getUsers:n,getEntityRecords:o,getTaxonomies:i,getMedia:s,getComments:a}=e("core"),{postType:r,selectedTaxonomies:l={},selectedCategories:c=[],selectedTags:d=[],isPostsPerPageAll:u,postsPerPage:p,postsOrderBy:h,postsOrder:g,postsOffset:m=0,postsInclude:b=[],postsExclude:f=[],isExcludeCurrent:x,isPagination:y,paginationCurrentPage:v,fImgSize:k="full",metaDateFormat:w="M j, Y"}=t,_="post"===r?{categories:c}:{},C="post"===r?{tags:d}:{};var j,$;const S={...Object.assign({},l?.category?{categories:l.category}:{},l?.post_tag?{tags:l.post_tag}:{},(j=l,$=e=>"category"!==e&&"post_tag"!==e,Object.fromEntries(Object.entries(j).filter((([e,t])=>$(e)))))),..._,...C,per_page:u?-1:p,orderby:h,order:g,offset:u?0:m,...yO(b)?.length?{include:yO(b)}:{},exclude:x?[e("core/editor").getCurrentPostId(),...yO(f)]:yO(f),status:"publish"},T=jO(o("postType",r,{...S,per_page:-1}),"false"),M=p*(v-1),N=M+p,L=T?.slice(M,N),E=e=>o("taxonomy",e,{per_page:-1}),P=e=>a({per_page:-1})?.filter((({post:t})=>e===t)),A=i({per_page:-1})?.filter((e=>e.types.includes(r)&&"category"!==e.slug))?.map((({name:e,slug:t,rest_base:n})=>({name:e,slug:t,rest_base:n}))),B=y&&!u?L:jO(o("postType",r,S),"false");return{totalPosts:T?.length,posts:(e=>e?.map((e=>{const{id:t,link:o,slug:i,featured_media:a,title:r,excerpt:l,author:c,categories:d,content:u,date:p,date_gmt:h,modified:g,modified_gmt:m,comment_status:b,status:f}=e,x=((e,t)=>{const n=s(e),o=n?.media_details?.sizes?.[t]?.source_url||n?.source_url;return{url:o?.replace(/<[^>]+>/g,""),alt:n?.alt_text}})(a,k),y={};A?.map((t=>{const n=E(t.slug)?.filter((n=>e[t.rest_base]?.includes(n.id)))?.map((e=>`<a href='${e.link}' rel='${t.slug}'>${e.name}</a>`));y[t.slug]=n?.join("")}));const v=u?.raw?.replace(/(<([^>]+)>)/gi,""),_=d?.length?E("category")?.filter((e=>d?.includes(e.id)))?.map((e=>`<a href='${e.link}' rel='category tag'>${e.name}</a>`)):[],C=n({who:"authors"})?.map((({id:e,name:t,link:n})=>({id:e,name:t,link:n})))?.find((e=>e.id===c));return{id:t,link:o,name:i,thumbnail:x,title:r?.rendered,excerpt:l?.raw?.replace(/(<([^>]+)>)/gi,"")?.trim(),content:v,author:C,date:fR(w,new Date(p)),dateGMT:h,modifiedDate:g,modifiedDateGMT:m,commentCount:P(t)?.length,commentStatus:b,categories:{coma:_?.join(", "),space:_?.join(" ")},taxonomies:y,readTime:{min:Math.floor(vO(v)/200),sec:Math.floor(vO(v)%200/(200/60))},status:f}})))(B),taxOfPostType:A,media:e=>s(e)}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,totalPosts:s,posts:a,taxOfPostType:r}=e,c=(0,h.useBlockProps)(),d=bBlocksPremiumChecker;(0,m.useEffect)((()=>me()),[i]),(0,m.useEffect)((()=>n({paginationCurrentPage:1})),[]);const u=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(EO,{attributes:t,setAttributes:n,isPremium:d,posts:a,taxOfPostType:r}),a?a?.length?(0,l.jsx)("div",{...c,children:(0,l.jsx)(bR,{posts:a,totalPosts:s,attributes:t,setAttributes:n,id:u,isPremium:d})}):(0,l.jsx)(BO,{}):(0,l.jsx)(AO,{})]})}));Nl(eO.name)&&(0,p.registerBlockType)(eO,{icon:Ar,transforms:{from:[{type:"block",blocks:["ap-block/posts"],transform:e=>(0,p.createBlock)("b-blocks/posts",e)},{type:"prefix",prefix:"apb",transform:()=>(0,p.createBlock)("b-blocks/posts")},{type:"prefix",prefix:"posts",transform:()=>(0,p.createBlock)("b-blocks/posts")}],to:[{type:"block",blocks:["ap-block/posts"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("ap-block/posts",e)}]},edit:xR,save:()=>null});const yR=JSON.parse('{"apiVersion":3,"name":"b-blocks/price-lists","title":"Price Lists","description":"Display Price lists section.","category":"bBlocks","keywords":["price","lists","price lists section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"products":{"type":"array","default":[{"background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{},"name":"Product 1 Name","nameColor":"#333","desc":"This content area describes product 1 descriptions or details.","descColor":"#333","price":"$99.99","priceColor":"#146EF5","separator":{"width":"40%","height":"1px","color":"#bbb"}},{"background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{},"name":"Product 2 Name","nameColor":"#333","desc":"This content area describes product 2 descriptions or details.","descColor":"#333","price":"$99.99","priceColor":"#146EF5","separator":{"width":"40%","height":"1px","color":"#bbb"}},{"background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{},"name":"Product 3 Name","nameColor":"#333","desc":"This content area describes product 3 descriptions or details.","descColor":"#333","price":"$99.99","priceColor":"#146EF5","separator":{"width":"40%","height":"1px","color":"#bbb"}}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"40px"},"rowGap":{"type":"string","default":"30px"},"layout":{"type":"string","default":"vertical"},"textAlign":{"type":"string","default":"center"},"padding":{"type":"object","default":{"vertical":"50px","horizontal":"20px"}},"imgMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"nameTypo":{"type":"object","default":{"fontSize":{"desktop":"18px","tablet":"17px","mobile":"16px"},"fontWeight":600}},"nameMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"},"fontStyle":"italic"}},"descMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"priceTypo":{"type":"object","default":{"fontSize":{"desktop":"24px","tablet":"22px","mobile":"20px"},"fontStyle":"italic"}},"isSep":{"type":"boolean","default":true}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),vR=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updateProduct:n,activeIndex:i,setActiveIndex:s,device:a})=>{const{products:r=[],columns:c,columnGap:p,rowGap:g,layout:m,textAlign:b,padding:f,imgMargin:k,nameTypo:w,nameMargin:C,isDesc:j,descTypo:$,descMargin:S,priceTypo:T,isSep:M}=e,N=()=>{t({ |
| 521 |
products:[...r,{background:{color:"#0000"},img:{id:null,url:"",alt:"",title:""},imgBorder:{},name:`Product ${r.length+1} Name`,nameColor:"#333",desc:`This content area describes product ${r.length+1} descriptions or details.`,descColor:"#333",price:"$99.99",priceColor:o,separator:{width:"40%",height:"1px",color:"#bbb"}}]}),s(r.length)},{background:L={},img:E={},imgBorder:P={},nameColor:A="",descColor:B="",priceColor:I="",separator:O={}}=r[i]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove Product","b-blocks"),children:[null!==i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:"bplItemTitle",children:(0,x.__)(`Product No ${i+1}:`,"b-blocks")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:L,onChange:e=>n("background",e)}),(0,l.jsx)(v,{children:(0,x.__)("Image:","b-blocks")}),(0,l.jsx)(ke,{value:E,onChange:e=>n("img",e),placeholder:(0,x.__)("Enter Image URL","b-blocks")}),(0,l.jsx)(ed,{className:"mt20",value:E,onChange:e=>n("img",e)}),(0,l.jsx)(Xc,{label:(0,x.__)("Image Border:","b-blocks"),value:P,onChange:e=>n("imgBorder",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Name Color:","b-blocks"),value:A,onChange:e=>n("nameColor",e),defaultColor:"#333"}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:B,onChange:e=>n("descColor",e),defaultColor:"#333"}),(0,l.jsx)(Ue,{label:(0,x.__)("Price Color:","b-blocks"),value:I,onChange:e=>n("priceColor",e),defaultColor:o}),(0,l.jsx)(Ts,{value:O,onChange:e=>n("separator",e),defaults:{width:"40%",height:"1px",color:"#bbb"}}),(0,l.jsxs)(y.PanelRow,{className:"itemAction mt20 mb15",children:[1<r?.length&&(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:e=>{e.preventDefault(),t({products:[...r.slice(0,i),...r.slice(i+1)]}),s(0===i?0:i-1)},children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:e=>{e.preventDefault(),t({products:[...r.slice(0,i),{...r[i]},...r.slice(i)]}),s(i+1)},children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]}),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Product","b-blocks"),onClick:N,children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Product","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsxs)(y.ButtonGroup,{className:"bPlBtnGroup",children:[(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Vertical","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(y.Button,{icon:d,isPrimary:"vertical"===m,"aria-pressed":"vertical"===m,onClick:()=>{t({layout:"vertical",columns:{...c,desktop:3},textAlign:"center",padding:{...f,vertical:"50px",horizontal:"20px",styles:"50px 20px"},imgMargin:{...k,right:"0px",bottom:"20px",styles:"0px 0px 20px 0px"}})}})}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Horizontal","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(y.Button,{icon:u,isPrimary:"horizontal"===m,"aria-pressed":"horizontal"===m,onClick:()=>{t({layout:"horizontal",columns:{...c,desktop:2},textAlign:"left",padding:{...f,vertical:"20px",horizontal:"20px",styles:"20px 20px"},imgMargin:{...k,right:"20px",bottom:"0px",styles:"0px 20px 0px 0px"}})}})})]})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:c[a],onChange:e=>{t({columns:{...c,[a]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({columnGap:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:g,onChange:e=>t({rowGap:e}),units:[Ee(),Pe(),Ae()]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(od,{label:(0,x.__)("Padding:","b-blocks"),value:f,onChange:e=>t({padding:e}),defaults:{vertical:"50px",horizontal:"20px"}})}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(od,{label:(0,x.__)("Margin:","b-blocks"),value:k,onChange:e=>t({imgMargin:e}),defaults:{side:4,bottom:"20px"}})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Name Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:w,onChange:e=>t({nameTypo:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16},fontWeight:600}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:C,onChange:e=>t({nameMargin:e}),defaults:{side:4,bottom:"10px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:j,onChange:e=>t({isDesc:e})}),(0,l.jsx)(Os,{value:$,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15},fontStyle:"italic"}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:S,onChange:e=>t({descMargin:e}),defaults:{side:4,bottom:"15px"}})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Price Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Os,{value:T,onChange:e=>t({priceTypo:e}),defaults:{fontSize:{desktop:24,tablet:22,mobile:20},fontStyle:"italic"}})}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:M,onChange:e=>t({isSep:e})})})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Product","b-blocks"),onClick:N,children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:b,onChange:e=>t({textAlign:e})})]})]})})),kR="bBlocksPriceLists";Nl(yR.name)&&(0,p.registerBlockType)(yR,{icon:Br,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{products:i=[],columns:s,columnGap:a,rowGap:r,layout:c,textAlign:d,padding:u,imgMargin:p,nameTypo:g,nameMargin:b,isDesc:f,descTypo:v,descMargin:k,priceTypo:w,isSep:_}=t,[C,j]=(0,m.useState)(0),$=(e,t)=>{const o=Ob(i,(n=>{n[C][e]=t}));n({products:o})},S=`#block-${o}`,T=`${S} .${kR}`,M=`${T} .priceItem`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(vR,{attributes:t,setAttributes:n,updateProduct:$,activeIndex:C,setActiveIndex:j}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${pa("",g)?.googleFontLink}\n\t\t\t\t${pa("",v)?.googleFontLink}\n\t\t\t\t${pa("",w)?.googleFontLink}\n\t\t\t\t${pa(`${M} .productName`,g)?.styles}\n\t\t\t\t${pa(`${M} .productDescription`,v)?.styles}\n\t\t\t\t${pa(`${M} .productPrice`,w)?.styles}\n\n\t\t\t\t${T}{\n\t\t\t\t\tgrid-gap: ${r} ${a};\n\t\t\t\t}\n\t\t\t\t${M}{\n\t\t\t\t\ttext-align: ${d};\n\t\t\t\t\tpadding: ${ua(u)};\n\t\t\t\t}\n\t\t\t\t${M} .productImage{\n\t\t\t\t\tmargin: ${ua(p)};\n\t\t\t\t}\n\t\t\t\t${M} .productName{\n\t\t\t\t\tmargin: ${ua(b)};\n\t\t\t\t}\n\t\t\t\t${M} .productDescription{\n\t\t\t\t\tmargin: ${ua(k)};\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsx)("div",{className:`${kR} ${c||"vertical"} columns-${s?.desktop} columns-tablet-${s?.tablet} columns-mobile-${s?.mobile}`,children:i?.map(((e,t)=>{const{background:n,img:o,imgBorder:i,name:s,nameColor:a,desc:r,descColor:c,price:d,priceColor:u,separator:p}=e,g=`${S} #priceItem-${t}`;return(0,l.jsxs)("div",{onClick:()=>j(t), |
| 522 |
className:"priceItem "+(t===C?"bPlNowEditing":""),id:`priceItem-${t}`,children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t\t\t\t${g}{\n\t\t\t\t\t\t\t\t${oa(n)}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productImage{\n\t\t\t\t\t\t\t\t${ia(i)}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productName{\n\t\t\t\t\t\t\t\tcolor: ${a};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productDescription{\n\t\t\t\t\t\t\t\tcolor: ${c};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productPrice{\n\t\t\t\t\t\t\t\tcolor: ${u};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productSeparator{\n\t\t\t\t\t\t\t\t${ca(p)}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t`}}),o?.url?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("img",{className:`productImage ${o?.id?`wp-image-${o?.id}`:null}`,src:o?.url,alt:o?.alt}),(0,Jc.isBlobURL)(o?.url)&&(0,l.jsx)(y.Spinner,{})]}):(0,l.jsx)(td,{label:(0,x.__)(" Product Image:","b-blocks"),value:o,onChange:e=>$("img",e)}),(0,l.jsxs)("div",{className:"productDetails",children:[(0,l.jsx)(h.RichText,{className:"productName",tagName:"h4",value:s,onChange:e=>$("name",e),placeholder:(0,x.__)("Product name","b-blocks"),inlineToolbar:!0}),f&&(0,l.jsx)(h.RichText,{className:"productDescription",tagName:"p",value:r,onChange:e=>$("desc",e),placeholder:(0,x.__)("Description of the product","b-blocks"),inlineToolbar:!0}),(0,l.jsx)(h.RichText,{className:"productPrice",tagName:"span",value:d,onChange:e=>$("price",e),placeholder:(0,x.__)("$99.99","b-blocks"),inlineToolbar:!0})]}),_&&(0,l.jsx)("span",{className:"productSeparator"})]},t)}))})]})]})},save:()=>null});const wR=JSON.parse('{"apiVersion":3,"name":"b-blocks/pricing-table","title":"Pricing Table","description":"Display product prices as a table.","category":"bBlocks","keywords":["pricing","price list","table"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"pricingTables":{"type":"array","default":[{"name":"Basic","price":2.99,"priceCurrency":"$","period":"Month","link":"#","linkLabel":"Enroll Now","color":"#f00025","features":[{"isEnable":true,"label":"25GB Disk Space"},{"isEnable":true,"label":"25 Email Accounts"},{"isEnable":true,"label":"50GB Bandwidth"},{"isEnable":true,"label":"25 Subdomains"},{"isEnable":false,"label":"Maintenance"}]},{"name":"Standard","price":5.99,"priceCurrency":"$","period":"Month","link":"#","linkLabel":"Enroll Now","color":"#001645","features":[{"isEnable":true,"label":"50GB Disk Space"},{"isEnable":true,"label":"50 Email Accounts"},{"isEnable":true,"label":"100GB Bandwidth"},{"isEnable":true,"label":"50 Subdomains"},{"isEnable":false,"label":"Maintenance"}]},{"name":"Premium","price":9.99,"priceCurrency":"$","period":"Month","link":"#","linkLabel":"Enroll Now","color":"#01944e","features":[{"isEnable":true,"label":"100GB Disk Space"},{"isEnable":true,"label":"100 Email Accounts"},{"isEnable":true,"label":"Unlimited Bandwidth"},{"isEnable":true,"label":"100 Subdomains"},{"isEnable":true,"label":"Maintenance"}]}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"20px"},"rowGap":{"type":"string","default":"30px"},"textAlign":{"type":"string","default":"center"},"padding":{"type":"object","default":{"vertical":"35px","horizontal":"25px"}},"shadow":{"type":"object","default":{"blur":"30px","color":"#6e8faf4d"}}},"supports":{"align":["wide","full"],"html":false},"styles":[{"name":"basic","label":"Basic","isDefault":true},{"name":"standard","label":"Standard"},{"name":"ultimate","label":"Ultimate"}],"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),_R=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updatePriceTable:n,activeIndex:i,setActiveIndex:s,device:a})=>{const{pricingTables:r,columns:c,columnGap:d,rowGap:u,textAlign:p,padding:g,shadow:m}=e,b=()=>{t({pricingTables:[...r,{name:"Ultimate",price:14.99,priceCurrency:"$",period:"Month",link:"#",linkLabel:"Enroll Now",color:o,features:[{isEnable:!0,label:"Unlimited Disk Space"},{isEnable:!0,label:"Unlimited Website"},{isEnable:!0,label:"Unlimited Email Accounts"},{isEnable:!0,label:"Unlimited Bandwidth"},{isEnable:!0,label:"Unlimited Subdomains"},{isEnable:!0,label:"Maintenance"}]}]}),s(n.length)},f=e=>{e.preventDefault(),t({pricingTables:[...r.slice(0,i),{...r[i]},...r.slice(i)]}),s(i+1)},k=e=>{e.preventDefault(),t({pricingTables:[...r.slice(0,i),...r.slice(i+1)]}),s(0===i?0:i-1)},{name:w="",price:C=0,priceCurrency:j="",period:$="",features:S=[],linkLabel:T="",link:M="",color:N=""}=r[i]||{},L=e=>{e.preventDefault(),n("features",[...S,{isEnable:"#",label:"New Feature of Price"}])};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:hn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove Prices","b-blocks"),children:[null!==i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:"bplItemTitle",children:(0,x.__)(`Price No ${i+1}:`,"b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Plan Name:","b-blocks"),value:w,onChange:e=>n("name",e)}),(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Price:","b-blocks"),labelPosition:"left",value:C,onChange:e=>n("price",parseFloat(e))}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Currency:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:j,onChange:e=>n("priceCurrency",e)})]}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Period:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:$,onChange:e=>n("period",e)})]}),(0,l.jsx)(v,{children:(0,x.__)("Features:","b-blocks")}),S?.map(((e,t)=>{const{isEnable:o,label:i}=e;return(0,l.jsxs)(y.PanelRow,{className:"editPriceFeature",children:[(0,l.jsx)(y.CheckboxControl,{className:"priceFeatureIsEnable",checked:o,onChange:e=>n("features",e,t,"isEnable")}),(0,l.jsx)(y.TextControl,{value:i,onChange:e=>n("features",e,t,"label")}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Remove the feature","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)("a",{className:"removeItem",onClick:e=>{e.preventDefault(),n("features",[...S.slice(0,t),...S.slice(t+1)])},children:(0,l.jsx)(y.Dashicon,{icon:"no"})})})]},t)})),(0,l.jsx)("div",{className:"addItem addFeature mt5",children:(0,l.jsxs)(y.Button,{className:"addItem",label:(0,x.__)("Add New Feature","b-blocks"),onClick:L,children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Feature","b-blocks")]})}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Label:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:T,onChange:e=>n("linkLabel",e)})]}),(0,l.jsx)(v,{children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:M,onChange:e=>n("link",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:N,onChange:e=>n("color",e),defaultColor:o}),(0,l.jsxs)(y.PanelRow,{className:"itemAction mt20 mb15",children:[1<r?.length&&(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:k,children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:f,children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]}),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Price","b-blocks"),onClick:b,children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Price","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0, |
| 523 |
l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:c[a],onChange:e=>{t({columns:{...c,[a]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({columnGap:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({rowGap:e}),units:[Ee(),Pe(),Ae()]})]})]}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pricing Table","b-blocks"),children:[(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:g,onChange:e=>t({padding:e}),defaults:{vertical:"35px",horizontal:"25px"}}),(0,l.jsx)(nd,{className:"mt20",label:(0,x.__)("Shadow:","b-blocks"),value:m,onChange:e=>t({shadow:e}),defaults:{blur:"30px",color:"#6e8faf4d"}})]})})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Price","b-blocks"),onClick:b,children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:p,onChange:e=>t({textAlign:e})})]})]})})),CR="bBlocksPricingTable",jR=({attributes:e,id:t,isStandard:n})=>{const{pricingTables:o,columnGap:i,rowGap:s,textAlign:a,padding:r,shadow:c}=e,d=`#${t}`,u=`${d} .${CR}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${u}{\n\t\t\tgrid-gap: ${s} ${i};\n\t\t\ttext-align: ${a};\n\t\t\tpadding: ${n?"30px 0":"0"}\n\t\t}\n\t\t${u} .priceItem{\n\t\t\tpadding: ${ua(r)};\n\t\t\tbox-shadow: ${da(c)};\n\t\t}\n\n\t\t${o?.map(((e,t)=>{const{color:n}=e,o=`${u} #priceItem-${t} .priceItem`,i=e=>`${d}.is-style-${e} .${CR} #priceItem-${t} .priceItem`;return`\n\t\t\t\t${o} .priceName,\n\t\t\t\t${i("basic")} .priceAmountWrap,\n\t\t\t\t${i("standard")} .priceAmountWrap{\n\t\t\t\t\tcolor: ${n};\n\t\t\t\t}\n\t\t\t\t${o} .priceLink,\n\t\t\t\t${i("basic")} .priceName,\n\t\t\t\t${i("standard")}::before,\n\t\t\t\t${i("ultimate")} .priceAmountWrap{\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t\tbackground-color: ${n};\n\t\t\t\t}\n\t\t\t\t${i("basic")} .priceName::before{\n\t\t\t\t\tborder-top-color: ${n};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},$R=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureEnabled",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{fill:"#01944e",d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"})}),SR=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureDisabled",viewBox:"0 0 352 512",children:(0,l.jsx)("path",{fill:"#f00025",d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"})}),TR=({features:e})=>(0,l.jsx)("div",{className:"priceFeatures",children:e?.map(((e,t)=>{const{isEnable:n,label:o}=e;return(0,l.jsxs)("div",{className:"priceFeature",children:[n?$R:SR,(0,l.jsx)("span",{className:"priceFeatureLabel",dangerouslySetInnerHTML:{__html:St(o)}})]},t)}))}),MR=({priceTable:e,index:t,className:n,activeIndex:o,setActiveIndex:i,updatePriceTable:s})=>{const{name:a,price:r,priceCurrency:c,period:d,link:u,linkLabel:p,features:g}=e,b=n.includes("basic"),f=n.includes("standard"),y=n.includes("ultimate"),v=(0,m.useRef)(null),k=(0,m.useRef)(null);(0,m.useEffect)((()=>{if(y){const e=v?.current?.clientHeight/100*82;k.current.style.width=`${e}px`,k.current.style.top=e/2+"px",k.current.style.left=-e/2+60+"px"}}),[n,v,k]);const w=(0,l.jsxs)("span",{className:"priceAmount",children:[c,r]}),_=(0,l.jsx)(h.RichText,{className:"pricePeriod",tagName:"span",value:d,onChange:e=>s("period",e),placeholder:(0,x.__)("Period","b-blocks"),inlineToolbar:!0});return(0,l.jsx)("div",{onClick:()=>i(t),className:t===o?"bPlNowEditing":"",id:`priceItem-${t}`,children:(0,l.jsxs)("div",{className:"priceItem",ref:v,children:[(0,l.jsx)(h.RichText,{className:"priceName",tagName:"h3",value:a,onChange:e=>s("name",e),placeholder:(0,x.__)("Plan Name","b-blocks"),inlineToolbar:!0}),f||y?(0,l.jsxs)("div",{className:"priceAmountWrap",ref:k,children:[w,d?" / ":"",_]}):"",(0,l.jsx)(TR,{features:g}),f||y?"":(0,l.jsx)("div",{className:"priceAmountWrap",children:w}),!b&&(0,l.jsx)("br",{}),p&&(0,l.jsx)(h.RichText,{className:"priceLink",tagName:"a",value:p,href:$t(u),onChange:e=>s("linkLabel",e),placeholder:(0,x.__)("Link Label","b-blocks"),inlineToolbar:!0})]})},t)};Nl(wR.name)&&(0,p.registerBlockType)(wR,{icon:Ir,transforms:{from:[{type:"block",blocks:["bptb/pricing-table"],transform:e=>(0,p.createBlock)("b-blocks/pricing-table",e)},{type:"prefix",prefix:"count",transform:()=>(0,p.createBlock)("b-blocks/pricing-table")}],to:[{type:"block",blocks:["bptb/pricing-table"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("bptb/pricing-table",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{pricingTables:i,columns:s}=t,a=(0,h.useBlockProps)(),{className:r}=a,[c,d]=(0,m.useState)(0),u=(e,t,o=!1,s=!1)=>{const a=Ob(i,(n=>{!1!==o&&s?n[c][e][o][s]=t:n[c][e]=t}));n({pricingTables:a})},p=r.includes("standard"),g=r.includes("ultimate");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(_R,{attributes:t,setAttributes:n,updatePriceTable:u,activeIndex:c,setActiveIndex:d}),(0,l.jsxs)("div",{...a,className:`${r} ${p||g?"":"is-style-basic"}`,children:[(0,l.jsx)(jR,{attributes:t,id:`block-${o}`,isStandard:p}),(0,l.jsx)("div",{className:`${CR} columns-${s.desktop} columns-tablet-${s.tablet} columns-mobile-${s.mobile}`,children:i?.map(((e,t)=>(0,l.jsx)(MR,{priceTable:e,index:t,className:r,activeIndex:c,setActiveIndex:d,updatePriceTable:u},t)))})]})]})},save:()=>null}) |
| 524 |
;const NR=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/process-steps","title":"Process Steps","category":"bBlocks","description":"Build a numbered \\"How it works\\" section. Drop in 3–6 steps with title, description, icon or number badge, and a connector line. Horizontal or vertical layout, fully responsive, accessible <ol> semantics.","keywords":["process","steps","how it works","how we work","numbered","timeline","workflow"],"textdomain":"b-blocks","attributes":{"layout":{"type":"object","default":{"type":"horizontal","theme":"classic","alignment":"center","columnCount":{"desktop":3,"tablet":2,"mobile":1},"gap":{"desktop":"32px","tablet":"24px","mobile":"16px"}}},"steps":{"type":"array","default":[{"_key":"ps-default-1","title":"Discovery","description":"We learn about your goals and challenges.","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M156.6 384.9L125.7 354c-8.5-8.5-11.5-20.8-7.7-32.2c3-8.9 7-20.5 11.8-33.8L24 288c-8.6 0-16.6-4.6-20.9-12.1s-4.2-16.7 .2-24.1l52.5-88.5c13-21.9 36.5-35.3 61.9-35.3l82.3 0c2.4-4 4.8-7.7 7.2-11.3C289.1-4.1 411.1-8.1 483.9 5.3c11.6 2.1 20.6 11.2 22.8 22.8c13.4 72.9 9.3 194.8-111.4 276.7c-3.5 2.4-7.3 4.8-11.3 7.2v82.3c0 25.4-13.4 49-35.3 61.9l-88.5 52.5c-7.4 4.4-16.6 4.5-24.1 .2s-12.1-12.2-12.1-20.9V380.8c-14.1 4.9-26.4 8.9-35.7 11.9c-11.2 3.6-23.4 .5-31.8-7.8zM384 168a40 40 0 1 0 0-80 40 40 0 1 0 0 80z\'/></svg>"},{"_key":"ps-default-2","title":"Strategy","description":"We craft a tailored plan to meet your needs.","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 384 512\'><path d=\'M272 384c9.6-31.9 29.5-59.1 49.2-86.2l0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4l0 0c19.8 27.1 39.7 54.4 49.2 86.2H272zM192 512c44.2 0 80-35.8 80-80V416H112v16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z\'/></svg>"},{"_key":"ps-default-3","title":"Delivery","description":"We execute and iterate until you are thrilled.","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z\'/></svg>"}]},"connector":{"type":"object","default":{"show":true,"color":"#CBD5E1","width":"2px","style":"solid"}},"badge":{"type":"object","default":{"type":"number","size":"56px","bg":{"color":"#2563EB"},"color":"#FFFFFF","typo":{"fontSize":{"desktop":"20px","tablet":null,"mobile":null}},"border":{},"borderRadius":{"top":"50%","bottom":"50%","left":"50%","right":"50%"},"shadow":[]}},"content":{"type":"object","default":{"titleTag":"h3","titleColor":"","typo":{"fontSize":{"desktop":"18px","tablet":null,"mobile":null}},"descColor":"","descTypo":{"fontSize":{"desktop":"15px","tablet":null,"mobile":null}}}},"card":{"type":"object","default":{"bg":{"color":""},"padding":{"top":"16px","right":"16px","bottom":"16px","left":"16px"},"border":{},"borderRadius":{"top":"8px","right":"8px","bottom":"8px","left":"8px"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),LR=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],ER=["h2","h3","h4","p"],PR=[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:(0,x.__)("Paragraph","b-blocks"),value:"p"}],AR=[{label:(0,x.__)("Classic — clean cards, blue accent","b-blocks"),value:"classic"},{label:(0,x.__)("Modern — gradient badges, soft shadow","b-blocks"),value:"modern"},{label:(0,x.__)("Minimal — borderless, dotted connectors","b-blocks"),value:"minimal"},{label:(0,x.__)("Bold — high-contrast dark badges","b-blocks"),value:"bold"}],BR=e=>({top:e,right:e,bottom:e,left:e}),IR={classic:{badge:{bg:{type:"solid",color:"#2563EB"},color:"#FFFFFF",border:{},borderRadius:BR("50%"),shadow:[],typo:{fontWeight:"700"}},card:{bg:{type:"solid",color:""},border:{},borderRadius:BR("8px"),shadow:[]},content:{titleColor:"",descColor:"",typo:{fontWeight:"600",textTransform:"",letterSpace:""}},connector:{style:"solid",color:"#CBD5E1",width:"2px"}},modern:{badge:{bg:{type:"gradient",gradient:"linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%)"},color:"#FFFFFF",border:{},borderRadius:BR("50%"),shadow:[{hOffset:"0px",vOffset:"8px",blur:"20px",spreed:"-6px",color:"rgba(236, 72, 153, 0.45)",isInset:!1}],typo:{fontWeight:"700"}},card:{bg:{type:"gradient",gradient:"linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)"},border:{},borderRadius:BR("16px"),shadow:[{hOffset:"0px",vOffset:"14px",blur:"32px",spreed:"-16px",color:"rgba(15, 23, 42, 0.18)",isInset:!1},{hOffset:"0px",vOffset:"2px",blur:"6px",spreed:"-2px",color:"rgba(15, 23, 42, 0.06)",isInset:!1}]},content:{titleColor:"#0f172a",descColor:"#475569",typo:{fontWeight:"700",textTransform:"",letterSpace:""}},connector:{style:"solid",color:"#C4B5FD",width:"2px"}},minimal:{badge:{bg:{type:"solid",color:""},color:"#475569",border:{width:"1px",style:"solid",color:"#475569"},borderRadius:BR("50%"),shadow:[],typo:{fontWeight:"500"}},card:{bg:{type:"solid",color:""},border:{},borderRadius:BR("8px"),shadow:[]},content:{titleColor:"",descColor:"#64748B",typo:{fontWeight:"500",textTransform:"",letterSpace:"-0.01em"}},connector:{style:"dotted",color:"#CBD5E1",width:"2px"}},bold:{badge:{bg:{type:"solid",color:"#0F172A"},color:"#FACC15",border:{},borderRadius:BR("0px"),shadow:[{hOffset:"3px",vOffset:"3px",blur:"0px",spreed:"0px", |
| 525 |
color:"#FACC15",isInset:!1}],typo:{fontWeight:"800"}},card:{bg:{type:"solid",color:"#FFFFFF"},border:{width:"2px",style:"solid",color:"#0F172A"},borderRadius:BR("0px"),shadow:[{hOffset:"6px",vOffset:"6px",blur:"0px",spreed:"0px",color:"#0F172A",isInset:!1}]},content:{titleColor:"#0f172a",descColor:"#1e293b",typo:{fontWeight:"800",textTransform:"uppercase",letterSpace:"0.02em"}},connector:{style:"solid",color:"#0F172A",width:"3px"}}},OR=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],RR=[{label:(0,x.__)("Number","b-blocks"),value:"number"},{label:(0,x.__)("Icon","b-blocks"),value:"icon"}],zR=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"}],DR=(e,t)=>(e??"").toString().trim()||t,FR=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",HR=e=>{const{layout:t={},badge:n={},connector:o={}}=e,{type:i,alignment:s}=t,a="vertical"===i?"vertical":"horizontal",r=["left","center","right"].includes(s)?s:"center",l="icon"===n.type?"icon":"number",c=o.show;return["bBlocksProcessSteps",`bBlocksProcessStepsLayout${FR(a)}`,`bBlocksProcessStepsAlign${FR(r)}`,`bBlocksProcessStepsBadge${FR(l)}`,c?"has-connector":"no-connector"].join(" ")},WR=(e,t)=>parseInt(e,10)||t,UR=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:s={},connector:a={},badge:r={},content:c={},card:d={},advanced:u={}}=e,p=`#${o} .bBlocksProcessSteps`,h=`${p} .bBlocksProcessStepsList`,g=`${p}.bBlocksProcessStepsLayoutHorizontal .bBlocksProcessStepsList`,m=`${h} .bBlocksProcessStepsItem`,b=`${m} .bBlocksProcessStepsBadge`,f=`${m} .bBlocksProcessStepsTitle`,x=`${p} .bBlocksProcessStepsDescription`,y=`${p}.bBlocksProcessStepsLayoutVertical.has-connector .bBlocksProcessStepsItem:not(:last-child)::before`,v=`${p}.bBlocksProcessStepsLayoutHorizontal.has-connector .bBlocksProcessStepsItem:not(:first-child)::before`,k=DR(r.size,"56px"),w=.42*(e=>{const t=(e??"").toString().trim();if(!t)return 56;const n=t.match(/^(-?\d+(?:\.\d+)?)/);return n?parseFloat(n[1]):56})(k)+"px",_=a.color||"#CBD5E1",C=DR(a.width,"2px"),j=(e=>["solid","dashed","dotted"].includes(e)?e:"solid")(a.style),$=!!a.show,S=DR(d?.padding?.top,"0px"),T=DR(d?.padding?.left,"0px"),{gap:M={},columnCount:N={}}=s,L=DR(M?.desktop,"32px"),E=DR(M?.tablet,L),P=DR(M?.mobile,E),A=WR(N?.desktop,3),B=WR(N?.tablet,2),I=WR(N?.mobile,1),O=e=>`${y}{\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttop: calc(${S} + ${k} + 8px);\n\t\tleft: calc(${T} + ${k} / 2);\n\t\twidth: 0;\n\t\theight: calc(100% + ${e} - ${k} - 8px);\n\t\tborder-left: ${C} ${j} ${_};\n\t\ttransform: translateX(calc(${C} / -2));\n\t\tpointer-events: none;\n\t\tz-index: 0;\n\t}`,R=e=>`${v}{\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttop: calc(${S} + (${k} / 2));\n\t\tright: calc(100% - ${e} / 2 - 1px);\n\t\twidth: ${e};\n\t\theight: 0;\n\t\tborder-top: ${C} ${j} ${_};\n\t\tpointer-events: none;\n\t\tz-index: 0;\n\t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t\t${pa("",r.typo).googleFontLink}\n\t\t\t${pa(b,r.typo).styles}\n\n\t\t\t${pa("",c.typo).googleFontLink}\n\t\t\t${pa(f,c.typo).styles}\n\n\t\t\t${pa("",c.descTypo).googleFontLink}\n\t\t\t${pa(x,c.descTypo).styles}\n\n\t\t\t${h}{\n\t\t\t\tgap: ${L};\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\tgrid-template-columns: repeat(${A}, minmax(0, 1fr));\n\t\t\t}\n\t\t\t${m}{\n\t\t\t\t${na("padding",ha(d.padding))}\n\t\t\t\t${oa(d.bg)}\n\t\t\t\t${na("border-radius",ha(d?.borderRadius))}\n\t\t\t\t${sa(d.border)}\n\t\t\t\t${na("box-shadow",la(d?.shadow))}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\twidth: ${k};\n\t\t\t\theight: ${k};\n\t\t\t\t${oa(r.bg)}\n\t\t\t\t${na("color",r.color)}\n\t\t\t\t${na("border-radius",ha(r?.borderRadius))}\n\t\t\t\t${sa(r.border)}\n\t\t\t\t${na("box-shadow",la(r?.shadow))}\n\t\t\t}\n\t\t\t${b} .bBlocksProcessStepsIcon>svg{\n\t\t\t\twidth: ${w};\n\t\t\t\theight: ${w};\n\t\t\t\tfill: ${r.color};\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\t${na("color",c.titleColor)}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${na("color",c.descColor)}\n\t\t\t}\n\t\t\t${$?O(L):""}\n\t\t\t${$?R(L):""}\n\n\t\t\t${t}{\n\t\t\t\t${h}{\n\t\t\t\t\tgap: ${E};\n\t\t\t\t}\n\t\t\t\t${g}{\n\t\t\t\t\tgrid-template-columns: repeat(${B}, minmax(0, 1fr));\n\t\t\t\t}\n\t\t\t\t${$?O(E):""}\n\t\t\t\t${$?R(E):""}\n\t\t\t}\n\n\t\t\t${n}{\n\t\t\t\t${h}{\n\t\t\t\t\tgap: ${P};\n\t\t\t\t}\n\t\t\t\t${g}{\n\t\t\t\t\tgrid-template-columns: repeat(${I}, minmax(0, 1fr));\n\t\t\t\t}\n\t\t\t\t${$?O(P):""}\n\t\t\t\t${$?`${v}{ display: none; }`:""}\n\t\t\t}\n\n\t\t\t${_a(o,u,i,!1)}\n\t\t\t`}})},GR=({attributes:e,updateObj:t})=>{const{connector:n={}}=e,{show:o,color:i,width:s,style:a}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Connector","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show connector line","b-blocks"),checked:!!o,onChange:e=>t("connector",e,"show")}),o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Connector color","b-blocks"),value:i,onChange:e=>t("connector",e,"color"),defaultColor:"#CBD5E1"}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Connector width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:s,onChange:e=>t("connector",e,"width"),min:1,max:8})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Connector style","b-blocks"),labelPosition:"edge",value:a,options:zR,onChange:e=>t("connector",e,"style"),__nextHasNoMarginBottom:!0})]})]})},VR={desktop:3,tablet:2,mobile:1},qR=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{layout:i={}}=e,{type:s,theme:a,alignment:r,columnCount:c={},gap:d={}}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>n("layout",e,"type"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"horizontal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"vertical"})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Theme","b-blocks"),value:a||"classic",options:AR,onChange:n=>t(((e,t)=>{const n=IR[t]||IR.classic,{layout:o={},badge:i={},card:s={},content:a={},connector:r={}}=e;return{layout:{...o,theme:t},badge:{...i,...n.badge,typo:{...i.typo||{},...n.badge.typo||{}}},card:{...s,...n.card},content:{...a,...n.content,typo:{...a.typo||{},...n.content.typo||{}}},connector:{...r,...n.connector}}})(e,n)),help:(0,x.__)("Applies a preset color & feel to the badge, card, connector and text. You can still fine-tune each in the Style tab afterwards.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Text alignment","b-blocks"),value:r||"center",options:OR,labelPosition:"edge",onChange:e=>n("layout",e,"alignment"),__nextHasNoMarginBottom:!0}),"vertical"!==s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Columns","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.RangeControl,{value:parseInt(c?.[o],10)||VR[o],onChange:e=>n("layout",parseInt(e,10)||1,"columnCount",o),min:1,max:6,step:1,__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:d?.[o]||"",onChange:e=>n("layout",e,"gap",o)})]})]})},YR=({attributes:e,setAttributes:t,index:n})=>{const{steps:o=[],badge:i={}}=e,s=o[n]||{},a=(e,i)=>t({steps:be(o,i,n,e)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Title","b-blocks"),value:s.title||"", |
| 526 |
onChange:e=>a("title",e),placeholder:(0,x.__)("Short title for this step","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextareaControl,{label:(0,x.__)("Description","b-blocks"),value:s.description||"",onChange:e=>a("description",e),placeholder:(0,x.__)("Explain what happens in this step","b-blocks"),rows:3,__nextHasNoMarginBottom:!0}),"icon"===i?.type&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),className:"mt10",icon:s.icon||"",onChange:e=>a("icon",e)})})]})},KR=({attributes:e,setAttributes:t})=>{const n={_key:`ps-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,title:"",description:"",icon:""};return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Steps","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_s,{attributes:e,setAttributes:t,newItem:n,design:"sortable",itemLabel:"Step",arrKey:"steps",title:"title",ItemSettings:YR,minItem:0})})},QR=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(qR,{...e}),(0,l.jsx)(KR,{...e}),(0,l.jsx)(GR,{...e})]}),ZR=({attributes:e,updateObj:t})=>{const{badge:n={}}=e,{type:o,size:i,bg:s,color:a}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Badge","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Badge type","b-blocks"),labelPosition:"edge",value:o,options:RR,onChange:e=>t("badge",e,"type"),help:"icon"===o?(0,x.__)("Add a Font Awesome class on each step in the Steps panel.","b-blocks"):(0,x.__)("Numbers are auto-incremented starting at 1.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Badge size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",isUnitSelectTabbable:!0,value:i,onChange:e=>t("badge",e,"size")})]}),(0,l.jsx)(An,{label:(0,x.__)("Badge background","b-blocks"),value:s,onChange:e=>t("badge",e,"bg"),defaults:{color:"#2563EB"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Badge text/icon color","b-blocks"),value:a,onChange:e=>t("badge",e,"color"),defaultColor:"#FFFFFF"}),"icon"!==o&&(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("badge",e,"typo")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:n.border,onChange:e=>t("badge",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:n.borderRadius,onChange:e=>t("badge",e,"borderRadius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:n.shadow,onChange:e=>t("badge",e,"shadow")})]})},XR=({attributes:e,updateObj:t})=>{const{card:n={}}=e,{bg:o,padding:i={},borderRadius:s={},border:a={}}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Card Style","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:o,onChange:e=>t("card",e,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i,onChange:e=>t("card",e,"padding")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:a,onChange:e=>t("card",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:s,onChange:e=>t("card",e,"borderRadius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:n.shadow,onChange:e=>t("card",e,"shadow")})]})},JR=({attributes:e,updateObj:t})=>{const{content:n={}}=e,{titleTag:o,titleColor:i,descColor:s}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title & Description","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Heading tag","b-blocks"),value:o||"h3",options:PR,onChange:e=>t("content",e,"titleTag"),help:(0,x.__)("Use H3 for pages that already have an H2 section heading.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ue,{label:(0,x.__)("Title color","b-blocks"),value:i||"",onChange:e=>t("content",e||"","titleColor"),defaultColor:""}),(0,l.jsx)(Os,{label:(0,x.__)("Title Typography","b-blocks"),value:n.typo,onChange:e=>t("content",e,"typo")}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color","b-blocks"),value:s||"",onChange:e=>t("content",e||"","descColor"),defaultColor:""}),(0,l.jsx)(Os,{label:(0,x.__)("Description Typography","b-blocks"),value:n.descTypo,onChange:e=>t("content",e,"descTypo")})]})},ez=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ZR,{...e}),(0,l.jsx)(JR,{...e}),(0,l.jsx)(XR,{...e})]}),tz=e=>{const{attributes:t,setAttributes:n,updateObj:o,isPremium:i}=e,{layout:s={},advanced:a}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:s.alignment,onChange:e=>o("layout",e||"center","alignment")})}),(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:LR,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(QR,{...e}),"style"===t.name&&(0,l.jsx)(ez,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:a,onChange:e=>n({advanced:e}),isPremium:i})]})})})]})},nz=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{steps:s=[],badge:a={},content:r={}}=t,c="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,d=fe(t,n),u=ER.includes(r.titleTag)?r.titleTag:"h3",p="icon"===a.type?"icon":"number",g=(e,t,o)=>{n({steps:s.map(((n,i)=>i===e?{...n||{},[t]:o}:n))})},m=(e,t)=>{if(t<0||t>=s.length)return;const o=s.slice(),[i]=o.splice(e,1);o.splice(t,0,i),n({steps:o})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tz,{attributes:t,setAttributes:n,updateObj:d,isPremium:c,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(UR,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{className:HR(t),children:0===s.length?(0,l.jsx)("p",{className:"bBlocksProcessStepsEmpty",children:(0,x.__)("No steps yet. Add the first one from the sidebar.","b-blocks")}):(0,l.jsx)("ol",{className:"bBlocksProcessStepsList","aria-label":(0,x.__)("Process steps","b-blocks"),children:s.map(((e,t)=>{const o=u;return(0,l.jsxs)("li",{className:"bBlocksProcessStepsItem",children:[(0,l.jsx)("div",{className:"bBlocksProcessStepsBadge","aria-hidden":"true",children:"icon"===p&&e&&e.icon?(0,l.jsx)("span",{className:"bBlocksProcessStepsIcon",dangerouslySetInnerHTML:{__html:e.icon}}):(0,l.jsx)("span",{className:"bBlocksProcessStepsNumber",children:t+1})}),(0,l.jsxs)("div",{className:"bBlocksProcessStepsBody",children:[(0,l.jsx)(h.RichText,{tagName:o,className:"bBlocksProcessStepsTitle",value:e&&e.title||"",onChange:e=>g(t,"title",e),placeholder:(0,x.__)("Step title","b-blocks"),allowedFormats:[]}),(0,l.jsx)(h.RichText,{tagName:"div",className:"bBlocksProcessStepsDescription",value:e&&e.description||"",onChange:e=>g(t,"description",e),placeholder:(0,x.__)("Describe this step…","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"]}),(0,l.jsxs)("div",{className:"bBlocksProcessStepsEditorActions",style:{display:"flex",justifyContent:"center",gap:4,marginTop:8},children:[(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-up-alt2",label:(0,x.__)("Move step up","b-blocks"),onClick:()=>m(t,t-1),disabled:0===t}),(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-down-alt2",label:(0,x.__)("Move step down","b-blocks"),onClick:()=>m(t,t+1),disabled:t===s.length-1}),(0,l.jsx)(y.Button,{variant:"tertiary",isDestructive:!0,size:"small",icon:"trash",label:(0,x.__)("Remove step","b-blocks"),onClick:()=>{return e=t,void n({steps:s.filter(((t,n)=>n!==e))});var e}})]})]})]},e&&e._key||t)}))})})]})]})}));Nl(NR.name)&&(0,p.registerBlockType)(NR,{icon:ul,edit:nz}) |
| 527 |
;const oz=JSON.parse('{"apiVersion":3,"name":"b-blocks/qr-code","title":"QR Code","description":"Show QR Code in posts and pages.","category":"bBlocks","keywords":["QR scanner","QR code","Code"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"qrAlign":{"type":"string","default":"center"},"url":{"type":"string","default":""},"dimension":{"type":"number","default":180},"color":{"type":"string","default":"#000"},"bgColor":{"type":"string","default":"#fff"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),iz=({attributes:e,setAttributes:t})=>{const{qrAlign:n,url:o,dimension:i,color:s,bgColor:a}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:gn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("QR Code Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Website URL:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:o,onChange:e=>t({url:e}),placeholder:(0,x.__)("Website URL:","b-blocks")}),(0,l.jsx)(v,{children:(0,x.__)("Dimension:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:i,onChange:e=>t({dimension:e}),min:50,max:1e3,step:1}),(0,l.jsx)(Ge,{label:(0,x.__)("Color:","b-blocks"),value:s,onChange:e=>t({color:e}),defaultColor:"#000",disableAlpha:!0}),(0,l.jsx)(Ge,{label:(0,x.__)("Background Color:","b-blocks"),value:a,onChange:e=>t({bgColor:e}),defaultColor:"#fff",disableAlpha:!0})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>t({qrAlign:e}),describedBy:(0,x.__)("QR Code Alignment"),alignmentControls:[{title:(0,x.__)("QR Code in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("QR Code in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("QR Code in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},sz="bBlocksQRCode";Nl(oz.name)&&(0,p.registerBlockType)(oz,{icon:Or,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{qrAlign:i,url:s,dimension:a,color:r,bgColor:c}=t,d=`https://api.qrserver.com/v1/create-qr-code/?size=${a}x${a}&color=${r.replace("#","")}&bgcolor=${c.replace("#","")}&ecc=L&qzone=1&data=${s||"http://bplugins.com"}`,u=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(iz,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t#${u} .${sz}{\n\t\t\t\t\ttext-align: ${i};\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsx)("div",{className:sz,children:(0,l.jsx)("img",{src:d,alt:s})})]})]})},save:()=>null});const az=JSON.parse('{"apiVersion":3,"name":"b-blocks/section-heading","title":"Section Heading","description":"Display heading before section.","category":"bBlocks","keywords":["headline","section headline","heading description"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"textAlign":{"type":"string","default":"left"},"title":{"type":"string","default":"Section Heading"},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"},"fontWeight":600}},"titleColor":{"type":"string","default":""},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isSep":{"type":"boolean","default":true},"separator":{"type":"object","default":{"width":"150px","height":"3px","color":"#0c0d3c1a"}},"sepMargin":{"type":"object","default":{"side":4,"bottom":"5px"}},"isDesc":{"type":"boolean","default":true},"desc":{"type":"string","default":"This content area describes section heading descriptions or details."},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"descColor":{"type":"string","default":""},"descMargin":{"type":"object","default":{"side":4,"bottom":"15px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":["file:./view.js","mailtoui"]}'),rz=({attributes:e,setAttributes:t})=>{const{textAlign:n,titleTypo:i,titleColor:a,titleMargin:r,isSep:c,separator:d,sepMargin:u,isDesc:p,descTypo:g,descColor:m,descMargin:b}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title Settings","b-blocks"),children:[(0,l.jsx)(Os,{value:i,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20},fontWeight:600}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:a,onChange:e=>t({titleColor:e}),defaultColor:o}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:r,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:c,onChange:e=>t({isSep:e})}),(0,l.jsx)(Ts,{value:d,onChange:e=>t({separator:e}),defaults:{width:"150px",height:"3px",color:s}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:u,onChange:e=>t({sepMargin:e}),defaults:{side:4,bottom:"5px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:p,onChange:e=>t({isDesc:e})}),(0,l.jsx)(Os,{value:g,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:m,onChange:e=>t({descColor:e}),defaultColor:"#333"}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:b,onChange:e=>t({descMargin:e}),defaults:{side:4,bottom:"15px"}})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>t({textAlign:e})})})]})},lz="bBlocksSectionHeading";Nl(az.name)&&(0,p.registerBlockType)(az,{icon:Rr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{textAlign:i,title:s,titleTypo:a,titleColor:r,titleMargin:c,isSep:d,separator:u,sepMargin:p,isDesc:g,desc:m,descTypo:b,descColor:f,descMargin:y}=t,v=`#block-${o} .${lz}`,k=`${v} .sectionHeadingTitle`,w=`${v} .sectionHeadingDescription`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(rz,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${pa("",a)?.googleFontLink}\n\t\t\t\t${pa("",b)?.googleFontLink}\n\t\t\t\t${pa(k,a)?.styles}\n\t\t\t\t${pa(w,b)?.styles}\n\n\t\t\t\t${v}{\n\t\t\t\t\t${na("text-align",i)}\n\t\t\t\t}\n\t\t\t\t${k}{\n\t\t\t\t\t${na("color",r)}\n\t\t\t\t\tmargin: ${ua(c)};\n\t\t\t\t}\n\t\t\t\t${v} .sectionHeadingSeparator{\n\t\t\t\t\t${ca(u)}\n\t\t\t\t\tmargin: ${ua(p)};\n\t\t\t\t}\n\t\t\t\t${w}{\n\t\t\t\t\t${na("color",f)}\n\t\t\t\t\tmargin: ${ua(y)};\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsxs)("div",{className:lz,children:[(0,l.jsx)(h.RichText,{className:"sectionHeadingTitle",tagName:"h2",value:s,onChange:e=>n({title:e}),placeholder:(0,x.__)("Section heading title","b-blocks")}),d&&(0,l.jsx)("span",{className:"sectionHeadingSeparator"}),g&&(0,l.jsx)(h.RichText,{className:"sectionHeadingDescription",tagName:"p",value:m,onChange:e=>n({desc:e}),placeholder:(0,x.__)("Section heading description","b-blocks")})]})]})]})},save:()=>null});var cz=(0,l.jsx)(Zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Zk.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}) |
| 528 |
;const dz=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/skill-bar","version":"0.1.0","title":"Skill Bar","category":"bBlocks","icon":"chart-bar","textdomain":"b-blocks","description":"Display skills with customizable progress bars, multiple themes and templates.","attributes":{"skills":{"type":"array","default":[{"title":"JavaScript","percentage":90,"color":"#f7df1e"},{"title":"React","percentage":85,"color":"#61dafb"},{"title":"WordPress","percentage":95,"color":"#21759b"}]},"theme":{"type":"string","default":"modern"},"template":{"type":"string","default":"standard"},"columns":{"type":"number","default":2},"customBackgroundColor":{"type":"string","default":""},"customTitleColor":{"type":"string","default":""},"customPercentageColor":{"type":"string","default":""},"customBarBackgroundColor":{"type":"string","default":""},"customBarProgressColor":{"type":"string","default":""},"customBarRemainingColor":{"type":"string","default":""}},"supports":{"html":false,"align":["wide","full"],"spacing":{"margin":true,"padding":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}');Nl(dz.name)&&(0,p.registerBlockType)(dz,{icon:Zr,edit:function({attributes:e,setAttributes:t}){const{skills:n,theme:o,template:i,columns:s,customBackgroundColor:a,customTitleColor:r,customPercentageColor:c,customBarProgressColor:d,customBarRemainingColor:u}=e,[p,g]=(0,Qs.useState)(0),m="customizable"===o,b={};m&&a&&(b.background=a);const f={};m&&r&&(f.color=r);const v={};m&&c&&(v.color=c);const k=(0,h.useBlockProps)({className:`skill-bar-block theme-${o} template-${i} columns-${s}`}),w=()=>{const e=[...n,{title:"New Skill",percentage:50,color:"#0073aa"}];t({skills:e}),g(e.length-1)},_=(e,o,i)=>{const s=[...n];s[e]={...s[e],[o]:i},t({skills:s})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(y.ToolbarButton,{icon:cz,label:(0,x.__)("Add Skill","b-blocks"),onClick:w})})}),(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Theme & Layout","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Theme","b-blocks"),value:o,options:[{label:(0,x.__)("Modern","b-blocks"),value:"modern"},{label:(0,x.__)("Classic","b-blocks"),value:"classic"},{label:(0,x.__)("Gradient","b-blocks"),value:"gradient"},{label:(0,x.__)("Customizable","b-blocks"),value:"customizable"}],onChange:e=>t({theme:e})}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Template","b-blocks"),value:i,options:[{label:(0,x.__)("Standard","b-blocks"),value:"standard"},{label:(0,x.__)("Circular","b-blocks"),value:"circular"},{label:(0,x.__)("Striped","b-blocks"),value:"striped"}],onChange:e=>t({template:e})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Columns","b-blocks"),value:s,onChange:e=>t({columns:e}),min:1,max:4})]}),m&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Customizable Theme Colors","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("p",{style:{marginBottom:"20px",color:"#757575",fontSize:"13px",lineHeight:"1.5"},children:(0,x.__)('Customize all color aspects of your skill bars. These settings only apply when "Customizable" theme is selected.',"b-blocks")}),(0,l.jsx)("h3",{style:{margin:"20px 0 12px",fontSize:"13px",fontWeight:600,textTransform:"uppercase",color:"#1e1e1e"},children:(0,x.__)("Card Styling","b-blocks")}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Background Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:a||"#ffffff",onChange:e=>t({customBackgroundColor:e}),enableAlpha:!0}),a&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customBackgroundColor:""}),children:(0,x.__)("Reset","b-blocks")})]}),(0,l.jsx)("h3",{style:{margin:"24px 0 12px",fontSize:"13px",fontWeight:600,textTransform:"uppercase",color:"#1e1e1e"},children:(0,x.__)("Text Colors","b-blocks")}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Skill Title Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:r||"#333333",onChange:e=>t({customTitleColor:e}),enableAlpha:!0}),r&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customTitleColor:""}),children:(0,x.__)("Reset","b-blocks")})]}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Percentage Number Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:c||"#666666",onChange:e=>t({customPercentageColor:e}),enableAlpha:!0}),c&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customPercentageColor:""}),children:(0,x.__)("Reset","b-blocks")})]}),(0,l.jsx)("h3",{style:{margin:"24px 0 12px",fontSize:"13px",fontWeight:600,textTransform:"uppercase",color:"#1e1e1e"},children:(0,x.__)("Progress Bar Colors","b-blocks")}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Bar Progress Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:d||"#0073aa",onChange:e=>t({customBarProgressColor:e}),enableAlpha:!0}),d&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customBarProgressColor:""}),children:(0,x.__)("Reset","b-blocks")})]}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Bar Remaining/Background Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:u||"#f0f0f0",onChange:e=>t({customBarRemainingColor:e}),enableAlpha:!0}),u&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customBarRemainingColor:""}),children:(0,x.__)("Reset","b-blocks")})]})]}),n.length>0&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Individual Skill Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Select Skill","b-blocks"),value:p,options:n.map(((e,t)=>({label:e.title||`Skill ${t+1}`,value:t}))),onChange:e=>g(parseInt(e,10))}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Skill Title","b-blocks"),value:n[p].title,onChange:e=>_(p,"title",e)}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Percentage","b-blocks"),value:n[p].percentage,onChange:e=>_(p,"percentage",e),min:0,max:100}),!m&&(0,l.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Progress Bar Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:n[p].color,onChange:e=>_(p,"color",e),enableAlpha:!0})]}),m&&(0,l.jsx)("p",{style:{fontSize:"12px",color:"#757575",fontStyle:"italic"},children:(0,x.__)("Individual skill colors are overridden by the Customizable theme settings above.","b-blocks")}),n.length>1&&(0,l.jsx)(y.Button,{isDestructive:!0,variant:"secondary",onClick:()=>(e=>{const o=n.filter(((t,n)=>n!==e));t({skills:o}),p>=o.length&&g(Math.max(0,o.length-1))})(p),children:(0,x.__)("Remove This Skill","b-blocks")})]})]}),(0,l.jsxs)("div",{...k,children:[(0,l.jsx)("div",{className:"b-blocks-skill-bar-skills-grid",children:n.map(((e,t)=>((e,t)=>{const n="b-blocks-skill-bar-skill-item",o=p===t?`${n} is-selected`:n,s={};m&&u&&(s.backgroundColor=u);const a={width:`${e.percentage}%`};a.background=m&&d?d:e.color;const r=m&&d?d:e.color,c=m&&u?u:"#e0e0e0";return(0,l.jsxs)("div",{className:o,style:b,onClick:()=>g(t),role:"button",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||g(t)},children:[(0,l.jsxs)("div",{className:"skill-header",children:[(0,l.jsx)("span",{className:"skill-title",style:f,children:e.title}),(0,l.jsxs)("span",{ |
| 529 |
className:"skill-percentage",style:v,children:[e.percentage,"%"]})]}),"circular"===i?(0,l.jsxs)("div",{className:"skill-circular",children:[(0,l.jsxs)("svg",{viewBox:"0 0 100 100",children:[(0,l.jsx)("circle",{className:"skill-circular-bg",cx:"50",cy:"50",r:"45",fill:"none",stroke:c,strokeWidth:"10"}),(0,l.jsx)("circle",{className:"b-blocks-skill-bar-skill-circular-progress",cx:"50",cy:"50",r:"45",fill:"none",stroke:r,strokeWidth:"10",strokeDasharray:""+2*Math.PI*45,strokeDashoffset:""+2*Math.PI*45*(1-e.percentage/100),transform:"rotate(-90 50 50)"})]}),(0,l.jsxs)("div",{className:"b-blocks-skill-bar-skill-circular-text",style:v,children:[e.percentage,"%"]})]}):(0,l.jsx)("div",{className:"skill-bar-wrapper",children:(0,l.jsx)("div",{className:"skill-bar-bg",style:s,children:(0,l.jsx)("div",{className:"b-blocks-skill-bar-skill-bar-fill",style:a})})})]},t)})(e,t)))}),(0,l.jsx)("div",{className:"b-blocks-skill-bar-skill-bar-actions",children:(0,l.jsx)(y.Button,{variant:"secondary",onClick:w,icon:cz,children:(0,x.__)("Add Skill","b-blocks")})})]})]})},save:function({attributes:e}){const{skills:t,theme:n,template:o,columns:i,customBackgroundColor:s,customTitleColor:a,customPercentageColor:r,customBarProgressColor:c,customBarRemainingColor:d}=e,u="customizable"===n,p={};u&&s&&(p.backgroundColor=s);const g={};u&&a&&(g.color=a);const m={};u&&r&&(m.color=r);const b=h.useBlockProps.save({className:`skill-bar-block theme-${n} template-${o} columns-${i}`});return(0,l.jsx)("div",{...b,children:(0,l.jsx)("div",{className:"b-blocks-skill-bar-skills-grid",children:t.map(((e,t)=>{const n={};u&&d&&(n.backgroundColor=d);const i=u&&c?c:e.color,s=u&&c?c:e.color,a=u&&d?d:"#e0e0e0";return(0,l.jsxs)("div",{className:"b-blocks-skill-bar-skill-item","data-percentage":e.percentage,style:p,children:[(0,l.jsxs)("div",{className:"skill-header",children:[(0,l.jsx)("span",{className:"skill-title",style:g,children:e.title}),(0,l.jsxs)("span",{className:"skill-percentage",style:m,children:[e.percentage,"%"]})]}),"circular"===o?(0,l.jsxs)("div",{className:"skill-circular",children:[(0,l.jsxs)("svg",{viewBox:"0 0 100 100",children:[(0,l.jsx)("circle",{className:"skill-circular-bg",cx:"50",cy:"50",r:"45",fill:"none",stroke:a,strokeWidth:"10"}),(0,l.jsx)("circle",{className:"b-blocks-skill-bar-skill-circular-progress",cx:"50",cy:"50",r:"45",fill:"none",stroke:s,strokeWidth:"10",strokeDasharray:""+2*Math.PI*45,strokeDashoffset:""+2*Math.PI*45,transform:"rotate(-90 50 50)","data-color":s})]}),(0,l.jsxs)("div",{className:"b-blocks-skill-bar-skill-circular-text",style:m,children:[e.percentage,"%"]})]}):(0,l.jsx)("div",{className:"skill-bar-wrapper",children:(0,l.jsx)("div",{className:"skill-bar-bg",style:n,children:(0,l.jsx)("div",{className:"b-blocks-skill-bar-skill-bar-fill",style:{backgroundColor:i},"data-percentage":e.percentage,"data-color":i})})})]},t)}))})})}});const uz=JSON.parse('{"apiVersion":3,"name":"b-blocks/service","title":"Service","description":"Service item for services section.","parent":["b-blocks/services"],"category":"bBlocks","keywords":["our service","service item","service card"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"background":{"type":"object","default":{"color":"#0000"}},"hoverBG":{"type":"object","default":{"type":"image","image":{"url":"https://i.imgur.com/i6qCSdM.png"},"overlayColor":"#0000","position":"bottom left","repeat":"no-repeat","size":"auto"}},"isIcon":{"type":"boolean","default":true},"isUpIcon":{"type":"boolean","default":false},"icon":{"type":"object","default":{"class":"fa-brands fa-wordpress","fontSize":70}},"upIcon":{"type":"object","default":{"id":null,"url":"","alt":"","title":""}},"iconWidth":{"type":"string","default":"70px"},"iconBorder":{"type":"object","default":{}},"isTitle":{"type":"boolean","default":true},"title":{"type":"string","selector":".bBlocksService h3.title","default":"Service title"},"titleColor":{"type":"string","default":"#222"},"isDesc":{"type":"boolean","default":true},"desc":{"type":"string","selector":".bBlocksService h3.description","default":"Lorem ipsum dolor sit, amet consectetur adipisicing elit. Accusamus, fuga."},"descColor":{"type":"string","default":"#333"},"isLink":{"type":"boolean","default":true},"link":{"type":"string","default":"#"},"linkIn":{"type":"string","default":"button"},"linkIconColor":{"type":"string","default":"#fff"},"linkBGColor":{"type":"string","default":"#d2d2d2"},"linkBGHovColor":{"type":"string","default":"#146EF5"}},"supports":{"align":false,"reusable":false,"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","render":"file:./render.php","viewScript":"file:./view.js"}'),pz=({attributes:e,setAttributes:t})=>{const{background:n,hoverBG:i,isIcon:s,isUpIcon:a,icon:r,upIcon:c,iconWidth:d,iconBorder:u,isTitle:p,titleColor:g,isDesc:m,descColor:b,isLink:f,link:k,linkIn:w,linkIconColor:_,linkBGColor:C,linkBGHovColor:j}=e;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:bn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Service Settings","b-blocks"),children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:n,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:i,onChange:e=>t({hoverBG:e}),defaults:{type:"image",image:{url:"https://i.imgur.com/i6qCSdM.png"},overlayColor:"#0000",position:"bottom left",size:"auto"}})]}),s&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:"Upload Icon?",checked:a,onChange:e=>t({isUpIcon:e})}),a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{value:c,onChange:e=>t({upIcon:e}),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Icon Width:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({iconWidth:e}),units:[Ee(),Pe(),Ae()]})]}):(0,l.jsx)(Un,{value:r,onChange:e=>t({icon:e}),defaults:{class:"fa-brands fa-wordpress",fontSize:70}}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:u,onChange:e=>t({iconBorder:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Colors Settings","b-blocks"),initialOpen:!1,children:[p&&(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:g,onChange:e=>t({titleColor:e}),defaultColor:"#222"}),m&&(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:b,onChange:e=>t({descColor:e}),defaultColor:"#333"})]}),f&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Link Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:k,onChange:e=>t({link:e})}),"button"===w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:_,onChange:e=>t({linkIconColor:e}),defaultColor:"#fff"}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color:","b-blocks"),value:C,onChange:e=>t({linkBGColor:e}),defaultColor:"#d2d2d2"}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Hover Color:","b-blocks"),value:j,onChange:e=>t({linkBGHovColor:e}),defaultColor:o})]})]})]})},hz="bBlocksServices",gz="bBlocksService",mz=({attributes:e,id:t})=>{const{background:n,hoverBG:o,icon:i,iconWidth:s,iconBorder:a,titleColor:r,descColor:c,linkIconColor:d,linkBGColor:u,linkBGHovColor:p}=e,h=`#${t}`,g=`${h} .${gz}`,m=`${g} .icon`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{ |
| 530 |
__html:`\n\t\t${g}{\n\t\t\t${oa(n)}\n\t\t}\n\t\t${g} .bgLayer{\n\t\t\t${oa(o)}\n\t\t}\n\n\t\t${g} .title{\n\t\t\tcolor: ${r};\n\t\t}\n\t\t${m}{\n\t\t\t${ia(a)}\n\t\t}\n\t\t${m} i{\n\t\t\t${ra(i)}\n\t\t}\n\t\t${m} img{\n\t\t\twidth: ${s};\n\t\t}\n\t\t${g} .description{\n\t\t\tcolor: ${c};\n\t\t}\n\t\t${g} .link a{\n\t\t\tbackground-color: ${u};\n\t\t}\n\t\t${h}:hover .ssbService .link a{\n\t\t\tbackground-color: ${p};\n\t\t}\n\t\t${g} .link a svg{\n\t\t\tfill: ${d};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},bz=(e="Service")=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 493.356 493.356",role:"img","aria-label":e.replace(/(<([^>]+)>)/gi,""),children:(0,l.jsx)("path",{d:"M490.498,239.278l-109.632-99.929c-3.046-2.474-6.376-2.95-9.993-1.427c-3.613,1.525-5.427,4.283-5.427,8.282v63.954H9.136 c-2.666,0-4.856,0.855-6.567,2.568C0.859,214.438,0,216.628,0,219.292v54.816c0,2.663,0.855,4.853,2.568,6.563 c1.715,1.712,3.905,2.567,6.567,2.567h356.313v63.953c0,3.812,1.817,6.57,5.428,8.278c3.62,1.529,6.95,0.951,9.996-1.708 l109.632-101.077c1.903-1.902,2.852-4.182,2.852-6.849C493.356,243.367,492.401,241.181,490.498,239.278z"})}),fz=({attributes:e,children:t})=>{const{title:n,isIcon:o,isUpIcon:i,icon:s,upIcon:a,isLink:r,link:c,linkIn:d}=e;return(0,l.jsxs)("div",{className:gz,children:["service"===d&&(0,l.jsx)("a",{className:"serviceLink",href:$t(c)}),(0,l.jsx)("div",{className:"bgLayer"}),o&&(0,l.jsx)("div",{className:"icon",children:i?(0,l.jsx)("img",{src:a?.url,alt:a?.alt}):s?.class&&(0,l.jsx)("i",{className:s?.class})}),t,r&&"button"===d&&(0,l.jsx)("div",{className:"link",children:c?(0,l.jsx)("a",{href:$t(c),children:bz(n)}):(0,l.jsx)("a",{children:bz(n)})})]})};Nl("b-blocks/services")&&(0,p.registerBlockType)(uz,{icon:zr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{isTitle:i,title:s,isDesc:a,desc:r}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(pz,{attributes:e.attributes,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(mz,{attributes:t,id:`block-${o}`}),(0,l.jsxs)(fz,{attributes:t,isBackend:!0,custom:{setAttributes:n},children:[i&&(0,l.jsx)(h.RichText,{className:"title",tagName:"h3",value:s,onChange:e=>n({title:e}),placeholder:(0,x.__)("Service Title","b-blocks"),inlineToolbar:!0}),a&&(0,l.jsx)(h.RichText,{className:"description",tagName:"p",value:r,onChange:e=>n({desc:e}),placeholder:(0,x.__)("Service Description","b-blocks"),inlineToolbar:!0})]})]})]})},save:()=>null});const xz=JSON.parse('{"apiVersion":3,"name":"b-blocks/services","title":"Services","description":"Services section for web page.","category":"bBlocks","keywords":["our services","services template","services section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"cId":{"type":"string","default":""},"layout":{"type":"string","default":"default"},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"30px"},"rowGap":{"type":"string","default":"30px"},"background":{"type":"object","default":{"color":"#0000"}},"textAlign":{"type":"string","default":"left"},"itemHeight":{"type":"string","default":"375px"},"itemPadding":{"type":"object","default":{"side":4,"top":"50px","right":"30px","bottom":"50px","left":"50px"}},"itemBorder":{"type":"object","default":{"radius":"15px"}},"itemShadow":{"type":"object","default":{"blur":"20px","color":"#0000001a"}},"iconPadding":{"type":"object","default":{"side":4,"bottom":"10px"}},"iconMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"23px","tablet":"20px","mobile":"18px"}}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"30px"}},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),yz=[{label:(0,x.__)("Default","services-section"),value:"default"},{label:(0,x.__)("Layout 1","services-section"),value:"layout1"}],vz=[{label:(0,x.__)("Service Element","services-section"),value:"service"},{label:(0,x.__)("Title","services-section"),value:"title"},{label:(0,x.__)("Button","services-section"),value:"button"}],kz=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,clientId:n,device:o})=>{const{layout:i,columns:s,columnGap:a,rowGap:c,background:d,textAlign:u,itemHeight:p,itemPadding:g,itemBorder:b,itemShadow:k,iconPadding:w,iconMargin:C,titleTypo:j,titleMargin:$,descTypo:S}=e,T=(0,f.select)("core/block-editor").getBlocksByClientId(n)[0]?.innerBlocks,M=T&&T[0]?.attributes,[N,L]=(0,m.useState)(M?.isIcon),[E,P]=(0,m.useState)(M?.isTitle),[A,B]=(0,m.useState)(M?.isDesc),[I,O]=(0,m.useState)(M?.linkIn),R=e=>T.forEach((t=>{(0,f.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,e)}));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:bn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i,onChange:e=>{t({layout:e}),"default"===e&&t({background:{...d,type:"solid",color:"#0000"},itemShadow:{...k,blur:"20px",color:"#0000001a"}}),"layout1"===e&&t({background:{...d,type:"solid",color:"#121212"},itemShadow:{...k,blur:"0",color:"#0000"}}),T.forEach((t=>{const{hoverBG:n,icon:o,iconBorder:i}=t?.attributes;"default"===e&&(0,f.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,{hoverBG:{...n,type:"image",image:{url:"https://i.imgur.com/i6qCSdM.png"},overlayColor:"#0000",position:"bottom left",size:"auto"},icon:{...o,colorType:"solid",gradient:r},iconBorder:{...i,width:"0px",color:"#0000",side:"all"},titleColor:"#222",descColor:"#333",linkIn:"button"}),"layout1"===e&&(0,f.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,{hoverBG:{...n,type:"solid",color:"#0000"},icon:{...o,colorType:"gradient",gradient:"linear-gradient(135deg, #7f246b, #c70d2b)"},iconBorder:{...i,width:"1px",color:"#777",side:"bottom"},titleColor:"#fff",descColor:"#777",linkIn:"title"})}))},options:yz})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:s[o],onChange:e=>{t({columns:{...s,[o]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:a,onChange:e=>t({columnGap:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({rowGap:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:d,onChange:e=>t({background:e}),defaults:{color:"#0000"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Item Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Min Height:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({itemHeight:e}),units:[Ee(),Ae()]}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:g,onChange:e=>t({itemPadding:e}),defaults:{side:4,top:"50px",right:"30px",bottom:"50px",left:"50px"}}),(0,l.jsx)(Xc,{label:(0,x.__)("Border","b-blocks"),value:b,onChange:e=>t({itemBorder:e}),defaults:{radius:"15px"}}),(0,l.jsx)(nd,{label:(0,x.__)("Shadow:","b-blocks"),value:k,onChange:e=>t({itemShadow:e}),defaults:{blur:"20px",color:"#0000001a"}}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0, |
| 531 |
x.__)("Link In:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:I,onChange:e=>{R({linkIn:e}),O(e)},options:vz})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:N||M?.isIcon,onChange:e=>{R({isIcon:e}),L(e)}}),N||M?.isIcon?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Icon Padding:","b-blocks"),value:w,onChange:e=>t({iconPadding:e}),defaults:{side:4,bottom:"10px"}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Icon Margin:","b-blocks"),value:C,onChange:e=>t({iconMargin:e}),defaults:{side:4,bottom:"20px"}})]}):"",(0,l.jsx)(y.ToggleControl,{className:"mt35",label:(0,x.__)("Show Title","b-blocks"),checked:E||M?.isTitle,onChange:e=>{R({isTitle:e}),P(e)}}),E||M?.isTitle?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Os,{label:(0,x.__)("Title Typography:","b-blocks"),value:j,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:23,tablet:20,mobile:18}}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Title Margin:","b-blocks"),value:$,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"30px"}})]}):"",(0,l.jsx)(y.ToggleControl,{className:"mt35",label:(0,x.__)("Show Description","b-blocks"),checked:A||M?.isDesc,onChange:e=>{R({isDesc:e}),B(e)}}),A||M?.isDesc?(0,l.jsx)(Os,{label:(0,x.__)("Description Typography:","b-blocks"),value:S,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}}):""]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:u,onChange:e=>t({textAlign:e})})})]})})),wz=({attributes:e,id:t,isBackend:n=!1})=>{const{columnGap:o,rowGap:i,background:s,textAlign:a,itemHeight:r,itemPadding:c,itemBorder:d,itemShadow:u,iconPadding:p,iconMargin:h,titleTypo:g,titleMargin:m,descTypo:b}=e,f=`#${t} .${hz}`,x=`${f} .${gz}`,y=n?`${f} .block-editor-inner-blocks .block-editor-block-list__layout{\n\t\tgrid-gap: ${i} ${o};\n\t}`:`${f}{\n\t\tgrid-gap: ${i} ${o};\n\t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",g)?.googleFontLink}\n\t\t${pa("",b)?.googleFontLink}\n\t\t${pa(`${x} .title`,g)?.styles}\n\t\t${pa(`${x} .description`,b)?.styles}\n\n\t\t${f}{\n\t\t\t${oa(s)}\n\t\t}\n\t\t${y}\n\n\t\t${x}{\n\t\t\ttext-align: ${a};\n\t\t\tmin-height: ${r};\n\t\t\tpadding: ${ua(c)};\n\t\t\t${ia(d)||"border-radius: 15px;"}\n\t\t\tbox-shadow: ${da(u)};\n\t\t}\n\t\t${x} .bgLayer{\n\t\t\tborder-radius: ${d?.radius||"15px"}\n\t\t}\n\t\t${x} .icon{\n\t\t\tpadding: ${ua(p)};\n\t\t\tmargin: ${ua(h)};\n\t\t}\n\t\t${x} .title{\n\t\t\tmargin: ${ua(m)};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})};Nl(xz.name)&&(0,p.registerBlockType)(xz,{icon:zr,transforms:{from:[{type:"block",blocks:["services-section/services"],transform:e=>(0,p.createBlock)("b-blocks/services",e)},{type:"prefix",prefix:"slider",transform:()=>(0,p.createBlock)("b-blocks/services")}],to:[{type:"block",blocks:["services-section/services"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("services-section/services",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{layout:i,columns:s}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(kz,{attributes:t,setAttributes:n,clientId:o}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(wz,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{className:`${hz} ${i} columns-${s.desktop} columns-tablet-${s.tablet} columns-mobile-${s.mobile}`,children:(0,l.jsx)(h.InnerBlocks,{allowedBlocks:["b-blocks/service"],template:[["b-blocks/service"],["b-blocks/service"],["b-blocks/service"]]})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})});const _z=JSON.parse('{"apiVersion":3,"name":"b-blocks/shape-divider","title":"Shape Divider","description":"Create unique and visually appealing dividers.","category":"bBlocks","keywords":["shape divider","svg shape","dynamic divider"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"full"},"background":{"type":"object","default":{"type":"gradient","gradient":"linear-gradient(135deg, #74E2D5, #7BCACF);"}},"padding":{"type":"object","default":{"top":"100px","right":"0px","bottom":"100px","left":"0px"}},"height":{"type":"object","default":{"desktop":"100vh","tablet":"100vh","mobile":"100vh"}},"shape":{"type":"string","default":"waves-opacity"},"shapePosition":{"type":"string","default":"bottom"},"isShapeSplite":{"type":"boolean","default":false},"shapeHeight":{"type":"object","default":{"desktop":"150px","tablet":"150px","mobile":"150px"}},"shapeWidth":{"type":"number","default":100},"shapeColor":{"type":"string","default":"#fff"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Cz=[{label:(0,x.__)("Curve","b-blocks"),value:"curve"},{label:(0,x.__)("Tilt","b-blocks"),value:"tilt"},{label:(0,x.__)("Curve Acymmetrical","b-blocks"),value:"curve-acymmetrical"},{label:(0,x.__)("Waves","b-blocks"),value:"waves"},{label:(0,x.__)("Waves Opacity","b-blocks"),value:"waves-opacity"}],jz=({attributes:e,setAttributes:t})=>{const{height:n,shape:o,shapePosition:i,isShapeSplite:s,shapeWidth:a,shapeHeight:r,shapeColor:c,background:d,padding:u}=e;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Section","b-blocks"),children:(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:n.desktop,onChange:e=>t({height:{desktop:e,tablet:e,mobile:e}}),units:[Ee(1080),Ae(67),Oe(100)],isResetValueOnUnitChange:!0})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Shape","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:o,onChange:e=>t({shape:e}),options:Cz})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Position:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i,options:[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}],onChange:e=>t({shapePosition:e})})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Shape Splite","b-blocks"),checked:s,value:s,onChange:e=>t({isShapeSplite:e})}),(0,l.jsx)(v,{children:(0,x.__)("Width:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:a,onChange:e=>t({shapeWidth:e}),min:100,max:300}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:r.desktop,onChange:e=>t({shapeHeight:{desktop:e,tablet:e,mobile:e}}),units:[Ee(150),Ae(10)],isResetValueOnUnitChange:!0})]})]}),"style"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Section","b-blocks"),children:[(0,l.jsx)(An,{className:"mb20",label:(0,x.__)("Background","b-blocks"),value:d,onChange:e=>t({background:e})}),(0,l.jsx)(y.__experimentalBoxControl,{label:(0,x.__)("Padding:","b-blocks"),values:u,resetValues:{top:"100px",right:"0px",bottom:"100px",left:"0px"},onChange:e=>t({padding:e})})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Shape","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:c,onChange:e=>t({shapeColor:e}),defaultColor:"#fff"})})]})]})})})},$z=({attributes:e,id:t})=>{const{shapeColor:n,shapePosition:o,shapeWidth:i,shapeHeight:s,isShapeSplite:a,padding:r,background:c,height:d}=e,u=`#${t}`,p="top"===o?"rotate(0deg)":"rotate(180deg)",h=a?"scaleX(1)":"scaleX(-1)";return(0,l.jsx)("style",{dangerouslySetInnerHTML:{ |
| 532 |
__html:`\n\t\t${u}{\n\t\t\tmin-height: ${d.desktop};\n\t\t\t${oa(c)}\n\t\t\tpadding: ${ha(r)};\n\t\t}\n\n\t\t${u} svg{\n\t\t\twidth: calc(${i}% + 1.3px);\n\t\t\theight: ${s.desktop};\n\t\t\tfill: ${n};\n\t\t\ttop: ${"top"===o?0:"auto"};\n\t\t\tbottom: ${"bottom"===o?0:"auto"};\n\t\t\ttransform: ${p+" "+h};\n\t\t}\n\t`}})},Sz=({attributes:e})=>{const{shape:t}=e;return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1200 120",preserveAspectRatio:"none",children:(0,l.jsx)(Tz,{shape:t})})},Tz=({shape:e})=>{switch(e){case"curve":default:return(0,l.jsx)("path",{d:"M0,0V7.23C0,65.52,268.63,112.77,600,112.77S1200,65.52,1200,7.23V0Z"});case"tilt":return(0,l.jsx)("path",{d:"M1200 120L0 16.48 0 0 1200 0 1200 120z"});case"curve-acymmetrical":return(0,l.jsx)("path",{d:"M0,0V6c0,21.6,291,111.46,741,110.26,445.39,3.6,459-88.3,459-110.26V0Z"});case"waves":return(0,l.jsx)("path",{d:"M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z"});case"waves-opacity":return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z",opacity:".25"}),(0,l.jsx)("path",{d:"M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z",opacity:".5"}),(0,l.jsx)("path",{d:"M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z"})]})}},Mz=[["core/heading",{content:"Creative Shape Divider",textAlign:"center",style:{typography:{fontSize:"52px"}},textColor:"white"}],["core/paragraph",{content:"The Gutenberg Shape Divider plugin is an innovative tool designed to enhance the visual appeal and creativity of websites built using the WordPress Gutenberg editor. With its intuitive interface and powerful features, this plugin empowers users to create unique and captivating designs by adding customizable shape dividers to their web pages.",align:"center",style:{typography:{fontSize:"18px"}},textColor:"white"}]];Nl(_z.name)&&(0,p.registerBlockType)(_z,{icon:Dr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(jz,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)($z,{attributes:t,id:`block-${o}`}),(0,l.jsx)(Sz,{attributes:t}),(0,l.jsx)("div",{className:"shapeContent",children:(0,l.jsx)(h.InnerBlocks,{template:Mz,renderAppender:()=>(0,l.jsx)(h.Inserter,{rootClientId:o,isAppender:!0,renderToggle:({onToggle:e,disabled:t})=>(0,l.jsx)(y.Button,{onClick:e,disabled:t,icon:"plus-alt",children:" "})})})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})});const Nz=JSON.parse('{"apiVersion":3,"name":"b-blocks/slider","title":"Slider","description":"Display image and content slider.","category":"bBlocks","keywords":["content slider","image slider","image carousel"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"slides":{"type":"array","default":[{"background":{"color":"#00000080"},"border":{},"position":"center center","childPositions":[{"top":36,"right":44.71,"bottom":44.5,"left":44.71},{"top":47.5,"right":34.67,"bottom":52.5,"left":34.67},{"top":55.5,"right":44.54,"bottom":67,"left":44.54}],"title":"Slide Title 1","titleColor":"#fff","description":"This content area describes slider 1 descriptions/details.","descColor":"#fff","btnText":"Button 1","btnLink":"#","btnColors":{"color":"#fff","bg":"#146EF5"},"btnHovColors":{"color":"#fff","bg":"#FF7A00"}},{"background":{"color":"#00000080"},"border":{},"position":"center center","childPositions":[{"top":36,"right":44.71,"bottom":44.5,"left":44.71},{"top":47.5,"right":34.67,"bottom":52.5,"left":34.67},{"top":55.5,"right":44.54,"bottom":67,"left":44.54}],"title":"Slide Title 2","titleColor":"#fff","description":"This content area describes slider 2 descriptions/details.","descColor":"#fff","btnText":"Button 2","btnLink":"#","btnColors":{"color":"#fff","bg":"#146EF5"},"btnHovColors":{"color":"#fff","bg":"#FF7A00"}}]},"columns":{"type":"object","default":{"desktop":1,"tablet":1,"mobile":1}},"columnGap":{"type":"number","default":15},"sliderWidth":{"type":"string","default":"100%"},"sliderHeight":{"type":"string","default":"400px"},"sliderAlign":{"type":"string","default":"center"},"isLoop":{"type":"boolean","default":true},"isTouchMove":{"type":"boolean","default":true},"speed":{"type":"number","default":1.5},"isAutoplay":{"type":"boolean","default":true},"autoplayOptions":{"type":"object","default":{"delay":1.5,"disableOnInteraction":false,"reverseDirection":false,"pauseOnMouseEnter":false,"stopOnLastSlide":false}},"freeModeOptions":{"type":"object","default":{"enabled":false,"sticky":false}},"effect":{"type":"string","default":"slide"},"keyboardOptions":{"type":"object","default":{"enabled":false}},"isMousewheel":{"type":"boolean","default":false},"isPage":{"type":"boolean","default":true},"pageOnDevice":{"type":"object","default":{"tablet":true,"mobile":true}},"isPageClickable":{"type":"boolean","default":true},"isPageDynamic":{"type":"boolean","default":true},"isPrevNext":{"type":"boolean","default":true},"prevNextOnDevice":{"type":"object","default":{"tablet":true,"mobile":true}},"sliderBG":{"type":"object","default":{"color":"#0000"}},"sliderPadding":{"type":"object","default":{"vertical":"0px","horizontal":"0px"}},"pageColor":{"type":"string","default":"#fff"},"pageWidth":{"type":"string","default":"15px"},"pageHeight":{"type":"string","default":"15px"},"pageBorder":{"type":"object","default":{"radius":"50%"}},"prevNextColor":{"type":"string","default":"#fff"},"isTitle":{"type":"boolean","default":true},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"}}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"descColor":{"type":"string","default":""},"isBtn":{"type":"boolean","default":true},"linkTarget":{"type":"string","default":"_blank"},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"btnPadding":{"type":"object","default":{"vertical":"12px","horizontal":"35px"}},"btnBorder":{"type":"object","default":{"radius":"3px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","wp-util"]}'),Lz=[{label:(0,x.__)("Slide","content-slider-block"),value:"slide"},{label:(0,x.__)("Fade","content-slider-block"),value:"fade"},{label:(0,x.__)("Cube","content-slider-block"),value:"cube"},{label:(0,x.__)("Creative","content-slider-block"),value:"creative"},{label:(0,x.__)("Coverflow","content-slider-block"),value:"coverflow"},{label:(0,x.__)("Flip","content-slider-block"),value:"flip"},{label:(0,x.__)("Cards","content-slider-block"),value:"cards"}],Ez=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"options",title:(0,x.__)("Options","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Pz=(e,t)=>100*parseFloat(e/t),Az=e=>parseInt(e?.clientWidth),Bz=e=>parseInt(e?.clientHeight),Iz=({attributes:e,setAttributes:t,clientId:n,arrKey:i,index:a,setActiveIndex:r=!1,premiumProps:c})=>{ |
| 533 |
const d=e[i],{background:u,border:p={},title:h,titleColor:g,description:m,descColor:b,btnText:f,btnLink:k,btnColors:w,btnHovColors:_}=d[a],C=(n,o,s)=>{const a=Ob(e[i],(e=>{e[n][o]=s}));t({[i]:a}),r&&r(n)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:u,onChange:e=>C(a,"background",e),defaults:{color:"#00000080"}}),(0,l.jsx)(Ys,{label:(0,x.__)("Border:","b-blocks"),value:p,onChange:e=>C(a,"border",e),...c,Component:Xc}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Content Position","b-blocks")}),(0,l.jsx)(y.__experimentalAlignmentMatrixControl,{onChange:e=>{t({slides:Ob(d,(t=>{t[a].position=e,t[a].childPositions=((e,t,n)=>{const o=document.querySelector(`#${e} .swiper-wrapper .slide-${t} .slideContent`),i=o?.children||[];if(i?.length){const e=i.length,t=[];for(let s=0;s<e;s++){const a=(e=s)=>Pz(Bz(i[e]),Bz(o)),r=((e=s)=>Pz(Az(i[e]),Az(o)))(s),l=a(s);if(0<r&&0<l&&isFinite(r)&&isFinite(l)){const o=e=>e>=0?a(e)+3:0,i=11,c=5.8;let d=0;for(let e=0;e<s;e++)d+=o(e);let u=0;for(let t=e-1;t>s;t--)u+=o(t);const p=i+d,h=100-(i+l+d),g=100-(i+l+u),m=i+u,b=100-(r+c),f=50-r/2,x=3===e?1===s?50-l/2:2===s?50+a(1)/2+3:50-a(1)/2-3-l:2===e?1===s?51.5:48.5-l:50-l/2,y=3===e?1===s?50+l/2:2===s?50+a(1)/2+3+l:50-a(1)/2-3:2===e?1===s?51.5+l:48.5:50+l/2,v={top:p,right:b,bottom:h,left:c},k={top:p,right:f,bottom:h,left:f},w={top:p,right:c,bottom:h,left:b},_={top:x,right:b,bottom:y,left:c},C={top:x,right:f,bottom:y,left:f},j={top:x,right:c,bottom:y,left:b},$={top:g,right:b,bottom:m,left:c},S={top:g,right:f,bottom:m,left:f},T={top:g,right:c,bottom:m,left:b};switch(n){case"top left":t.push(v);break;case"top center":t.push(k);break;case"top right":t.push(w);break;case"center left":t.push(_);break;case"center center":t.push(C);break;case"center right":t.push(j);break;case"bottom left":t.push($);break;case"bottom center":t.push(S);break;case"bottom right":t.push(T)}}}return t}})(`block-${n}`,a,e)}))})}})]}),(0,l.jsx)("small",{children:(0,x.__)("You can also change the content position by dragging element.","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Title:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:h,onChange:e=>C(a,"title",e),placeholder:(0,x.__)("Slide title","b-blocks")})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:g,onChange:e=>C(a,"titleColor",e),defaultColor:"#fff"}),(0,l.jsx)(v,{children:(0,x.__)("Description:","b-blocks")}),(0,l.jsx)(y.TextareaControl,{value:m,onChange:e=>C(a,"description",e),placeholder:(0,x.__)("Description of the slider","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:b,onChange:e=>C(a,"descColor",e),defaultColor:"#fff"}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:f,onChange:e=>C(a,"btnText",e),placeholder:(0,x.__)("Button label","b-blocks")})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:k,onChange:e=>C(a,"btnLink",e),placeholder:(0,x.__)("Button link","b-blocks")})]}),(0,l.jsx)(On,{label:(0,x.__)("Button Colors:","b-blocks"),value:w,onChange:e=>C(a,"btnColors",e),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Button Hover Colors:","b-blocks"),value:_,onChange:e=>C(a,"btnHovColors",e),defaults:{color:"#fff",bg:s}})]})},Oz=[{top:36,right:44.71,bottom:44.5,left:44.71},{top:47.5,right:34.67,bottom:52.5,left:34.67},{top:55.5,right:44.54,bottom:67,left:44.54}],Rz=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,clientId:n,activeIndex:i,setActiveIndex:a,isPremium:r,device:c})=>{const{slides:d=[],columns:u,columnGap:p,sliderWidth:g,sliderHeight:b,isLoop:f,isTouchMove:k,speed:w,isAutoplay:C,autoplayOptions:j={},freeModeOptions:$={},effect:S,keyboardOptions:T={},isMousewheel:M=!1,isPage:N,pageOnDevice:L={},isPageClickable:E,isPageDynamic:P,isPrevNext:A,prevNextOnDevice:B={},sliderBG:I={},sliderPadding:O={},pageColor:R,pageWidth:z,pageHeight:D,pageBorder:F,prevNextColor:H,sliderAlign:W,isTitle:U,titleTypo:G,isDesc:V,descTypo:q,isBtn:Y,linkTarget:K,btnTypo:Q,btnPadding:Z,btnBorder:X}=e,[J,ee]=(0,m.useState)(!1),te={background:{color:"#00000080"},border:{},position:"center center",childPositions:Oz,title:`Slide Title ${d.length+1}`,titleColor:"#fff",description:`This content area describes slider ${d.length+1} descriptions/details.`,descColor:"#fff",btnText:`Button ${d.length+1}`,btnLink:"#",btnColors:{color:"#fff",bg:o},btnHovColors:{color:"#fff",bg:s}},ne={isPremium:r,setIsProModalOpen:ee},oe={className:"bPlPanelBody",initialOpen:!1},ie={attributes:e,setAttributes:t,clientId:n,arrKey:"slides",activeIndex:i,setActiveIndex:a,premiumProps:ne};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Ez,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slides","b-blocks"),children:(0,l.jsx)(_s,{...ie,newItem:te,ItemSettings:Iz,itemLabel:"Slide",design:r?"sortable":"all"})}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Layout Settings","b-blocks"),...oe,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:u[c],onChange:e=>t({columns:{...u,[c]:e}}),min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(v,{children:(0,x.__)("Column Gap:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:p,onChange:e=>t({columnGap:e}),min:0,max:250,step:1,beforeIcon:"arrow-right-alt"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:g,onChange:e=>t({sliderWidth:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:b,onChange:e=>t({sliderHeight:e}),units:[Ee(),Ae(),Oe()]})]})]}),"options"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Basic Options","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Loop","b-blocks"),checked:f,onChange:e=>t({isLoop:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Touch Move","b-blocks"),checked:k,onChange:e=>t({isTouchMove:e})}),(0,l.jsx)("small",{children:(0,x.__)("Switch slide with grab in anywhere in slide","b-blocks")}),(0,l.jsx)("small",{children:(0,x.__)("Touch Move will not work in backend","b-blocks")}),(0,l.jsx)(v,{children:(0,x.__)("Speed (s):","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:w,onChange:e=>t({speed:e}),min:0,max:10,step:.05}),(0,l.jsx)("small",{children:(0,x.__)("Smaller speed value will be slide faster","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Autoplay","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Autoplay","b-blocks"),checked:C,onChange:e=>t({isAutoplay:e})}),(0,l.jsx)("small",{children:(0,x.__)("Autoplay will not work in backend","b-blocks")}),C&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Delay (s):","b-blocks"),value:j.delay,onChange:e=>t({autoplayOptions:{...j,delay:e}}),min:0,max:10,step:.05,beforeIcon:"visibility",...ne,Component:y.RangeControl}),(0,l.jsx)("small",{children:(0,x.__)("Smaller delay value will be autoplay faster","b-blocks")}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Disable on Interaction","b-blocks"),checked:j.disableOnInteraction,onChange:e=>t({autoplayOptions:{...j,disableOnInteraction:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(Ys,{ |
| 534 |
className:"mt10",label:(0,x.__)("Pause on Mouse Enter","b-blocks"),checked:j.pauseOnMouseEnter,onChange:e=>t({autoplayOptions:{...j,pauseOnMouseEnter:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)("small",{children:(0,x.__)("If 'Disable on Interaction' is also enabled, it will stop autoplay instead of pause","b-blocks")}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Reverse Direction","b-blocks"),checked:j.reverseDirection,onChange:e=>t({autoplayOptions:{...j,reverseDirection:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Stop on Last Slide","b-blocks"),checked:j.stopOnLastSlide,onChange:e=>t({autoplayOptions:{...j,stopOnLastSlide:e}}),...ne,Component:y.ToggleControl})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Free Mode","b-blocks"),...oe,children:[(0,l.jsx)(Ys,{label:(0,x.__)("Enable Free Mode","b-blocks"),checked:$.enabled,onChange:e=>t({freeModeOptions:{...$,enabled:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)("small",{children:(0,x.__)("Smooth Scrolling with dragging the slide","b-blocks")}),(0,l.jsx)("br",{}),(0,l.jsx)("small",{children:(0,x.__)("Enable Touch Move to use Free Mode","b-blocks")}),$.enabled&&(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Sticky","b-blocks"),checked:$.sticky,onChange:e=>t({freeModeOptions:{...$,sticky:e}}),...ne,Component:y.ToggleControl})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Effects","b-blocks"),...oe,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Effect:","b-blocks")}),(0,l.jsx)(Zs,{value:S,onChange:e=>{t({effect:e}),"slide"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"100%",sliderHeight:"400px",sliderPadding:{vertical:"0px",horizontal:"0px"}}),"fade"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"100%",sliderHeight:"400px",sliderPadding:{vertical:"0px",horizontal:"0px"}}),"cube"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"450px",sliderHeight:"500px",sliderPadding:{vertical:"50px",horizontal:"50px"}}),"creative"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"100%",sliderHeight:"400px",sliderPadding:{vertical:"0px",horizontal:"0px"}}),"coverflow"===e&&t({columns:{desktop:3,tablet:2,mobile:1},sliderWidth:"100%",sliderHeight:"400px",sliderPadding:{vertical:"0px",horizontal:"0px"}}),"flip"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"450px",sliderHeight:"500px",sliderPadding:{vertical:"50px",horizontal:"50px"}}),"cards"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"400px",sliderHeight:"500px",sliderPadding:{vertical:"50px",horizontal:"50px"}})},options:Lz,proValues:["cube","coverflow","flip","cards"],...ne})]}),(0,l.jsx)("small",{children:(0,x.__)("To work fade, cube, creative, flip & cards effects properly, set single column per view.","b-blocks")}),(0,l.jsx)("br",{}),(0,l.jsx)("small",{children:(0,x.__)("Some settings may change when effect will be changed.","b-blocks")})]}),(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Keyboard Control","b-blocks"),...oe,children:(0,l.jsx)(Ys,{label:(0,x.__)("Enable Keyboard Control","b-blocks"),checked:T.enabled,onChange:e=>t({keyboardOptions:{...T,enabled:e}}),...ne,Component:y.ToggleControl})}),(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Mousewheel","b-blocks"),...oe,children:(0,l.jsx)(Ys,{label:(0,x.__)("Enable Slide on Mousewheel","b-blocks"),checked:M,onChange:e=>t({isMousewheel:e}),...ne,Component:y.ToggleControl})}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Pagination","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Pagination","b-blocks"),checked:N,onChange:e=>t({isPage:e})}),N&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Show On Tablet","b-blocks"),checked:L?.tablet,onChange:e=>t({pageOnDevice:{...L,tablet:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Show On Mobile","b-blocks"),checked:L?.mobile,onChange:e=>t({pageOnDevice:{...L,mobile:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Clickable","b-blocks"),checked:E,onChange:e=>t({isPageClickable:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Dynamic Bullets","b-blocks"),checked:P,onChange:e=>t({isPageDynamic:e})})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Navigation","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Preview Next Button","b-blocks"),checked:A,onChange:e=>t({isPrevNext:e})}),A&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Show On Tablet","b-blocks"),checked:B?.tablet,onChange:e=>t({prevNextOnDevice:{...B,tablet:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(Ys,{className:"mt10",label:(0,x.__)("Show On Mobile","b-blocks"),checked:B?.mobile,onChange:e=>t({prevNextOnDevice:{...B,mobile:e}}),...ne,Component:y.ToggleControl})]})]})]}),"style"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider","b-blocks"),children:[(0,l.jsx)(Ys,{label:(0,x.__)("Background","b-blocks"),value:I,onChange:e=>t({sliderBG:e}),defaults:{color:"#0000"},...ne,Component:An}),(0,l.jsx)(Ys,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:O,onChange:e=>t({sliderPadding:e}),defaults:{vertical:"0px",horizontal:"0px"},...ne,Component:od})]}),N||A?(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Options","b-blocks"),...oe,children:[N&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Pagination Bullets Color:","b-blocks"),value:R,onChange:e=>t({pageColor:e}),defaultColor:"#fff"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Pagination Width:","b-blocks"),labelPosition:"left",value:z,onChange:e=>t({pageWidth:e}),units:[Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Pagination Height:","b-blocks"),labelPosition:"left",value:D,onChange:e=>t({pageHeight:e}),units:[Ee(),Ae()]}),(0,l.jsx)(Xc,{label:(0,x.__)("Pagination Border:","b-blocks"),value:F,onChange:e=>t({pageBorder:e}),defaults:{radius:"50%"}})]}),A&&(0,l.jsx)(Ue,{label:(0,x.__)("Preview Next Button Color:","b-blocks"),value:H,onChange:e=>t({prevNextColor:e}),defaultColor:"#fff"})]}):"",(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Slide Title","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:U,onChange:e=>t({isTitle:e})}),U&&(0,l.jsx)(Os,{value:G,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20}}})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Slide Description","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:V,onChange:e=>t({isDesc:e})}),V&&(0,l.jsx)(Os,{value:q,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Slide Button","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Button","b-blocks"),checked:Y,onChange:e=>t({isBtn:e})}),Y&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open link in new tab","b-blocks"),checked:"_blank"===K,onChange:e=>t({linkTarget:e?"_blank":""})}),(0,l.jsx)(Os,{value:Q,onChange:e=>t({btnTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:Z,onChange:e=>t({btnPadding:e}),defaults:{vertical:"12px",horizontal:"35px"}}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:X,onChange:e=>t({btnBorder:e}),defaults:{radius:"3px"}})]})]})]})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Slide","b-blocks"),onClick:()=>{t({slides:[...d,te]}),a(d.length)},children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:W,onChange:e=>t({sliderAlign:e}),describedBy:(0,x.__)("Slider Alignment"), |
| 535 |
alignmentControls:[{title:(0,x.__)("Slider in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Slider in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Slider in right","b-blocks"),align:"right",icon:"align-right"}]})]}),(0,l.jsxs)(jn,{isProModalOpen:J,setIsProModalOpen:ee,block:"Slider",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Border: ","b-blocks")}),(0,x.__)("Border style options in every single slide.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Delay time: ","b-blocks")}),(0,x.__)("Delay time option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Disable on Interaction: ","b-blocks")}),(0,x.__)("Disable on Interaction option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Reverse Direction: ","b-blocks")}),(0,x.__)("Reverse Direction option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Pause on Mouse Enter: ","b-blocks")}),(0,x.__)("Pause on Mouse Enter option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Stop on Last Slide: ","b-blocks")}),(0,x.__)("Stop on Last Slide option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Free Mode: ","b-blocks")}),(0,x.__)("Free Mode option on drag slide.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Sticky: ","b-blocks")}),(0,x.__)("Sticky option in free mode.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Effects: ","b-blocks")}),(0,x.__)("Explore more effects such as Cube, Coverflow, Flip, and Cards.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Keyboard Control: ","b-blocks")}),(0,x.__)("Slide with Keyboard control.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Slide on Mousewheel: ","b-blocks")}),(0,x.__)("Slide on Mousewheel option.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Pagination Device: ","b-blocks")}),(0,x.__)("Show/Hide pagination in different devices(tablet and mobile).","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Navigation Device: ","b-blocks")}),(0,x.__)("Show/Hide navigation in different devices(tablet and mobile).","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Background: ","b-blocks")}),(0,x.__)("Background style option for slider wrapper.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Padding: ","b-blocks")}),(0,x.__)("Padding style option for slider wrapper.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Shortcode: ","b-blocks")}),(0,x.__)("Shortcode option to use anywhere.","b-blocks")]})]})]})})),zz="bBlocksSlider",Dz=({attributes:e,initialSlide:t=0,isBackend:n=!1})=>{const{slides:o=[],columns:i,columnGap:s,isLoop:a,isTouchMove:r,speed:c,isAutoplay:d,autoplayOptions:u,freeModeOptions:p={},effect:h,keyboardOptions:g={},isMousewheel:m=!1,isPage:b,isPageClickable:f,isPageDynamic:x,isPrevNext:y,isTitle:v,isDesc:k,isBtn:w}=e;return(0,l.jsx)(Hx,{className:zz,direction:"horizontal",initialSlide:t,slidesPerView:i.mobile,breakpoints:{576:{slidesPerView:i.tablet},768:{slidesPerView:i.desktop}},spaceBetween:s,modules:[Bf,Nf,Ef,zf,Df,Uf,Wf,Hf,Gf],loop:a,allowTouchMove:r,grabCursor:r,speed:1e3*c,autoplay:!!d&&{...u,delay:1e3*u.delay},freeMode:p,effect:h,fadeEffect:{crossFade:!1},cubeEffect:{shadow:!1},creativeEffect:{prev:{shadow:!0,translate:["-120%",0,-500]},next:{shadow:!0,translate:["120%",0,-500]}},keyboard:g,mousewheel:m,pagination:!!b&&{clickable:f,dynamicBullets:x,forceClass:!0},navigation:y,allowSlidePrev:!0,allowSlideNext:!0,autoHeight:!1,children:o?.map(((e,t)=>{const{position:o,title:i,description:s,btnText:a,btnLink:r}=e;return(0,l.jsx)(Wx,{className:`slide-${t}`,children:(0,l.jsxs)("div",{className:`slideContent ${o?.split(" ")?.join("-")||"center-center"}`,children:[v&&i&&(0,l.jsx)("h2",{className:"slideTitle",dangerouslySetInnerHTML:{__html:St(i)}}),k&&s&&(0,l.jsx)("p",{className:"slideDesc",dangerouslySetInnerHTML:{__html:St(s)}}),w&&a&&(0,l.jsx)("a",{href:n?"#":$t(r),className:"slideBtn",dangerouslySetInnerHTML:{__html:St(a)}})]})},t)}))})},Fz=[{top:36,right:44.71,bottom:44.5,left:44.71},{top:47.5,right:34.67,bottom:52.5,left:34.67},{top:55.5,right:44.54,bottom:67,left:44.54}],Hz=({attributes:e,id:t})=>{const{slides:n=[],sliderWidth:i,sliderHeight:a,pageOnDevice:r={},prevNextOnDevice:c={},sliderBG:d={},sliderPadding:u={},pageColor:p,pageWidth:h,pageHeight:g,pageBorder:m,prevNextColor:b,sliderAlign:f,isTitle:x,titleTypo:y,isDesc:v,descTypo:k,isBtn:w,btnTypo:_,btnPadding:C,btnBorder:j}=e,$=`#${t}`,S=`${$} .${zz}`,T=`${S} .swiper-slide`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",y)?.googleFontLink}\n\t\t${pa("",k)?.googleFontLink}\n\t\t${pa("",_)?.googleFontLink}\n\t\t${pa(`${T} .slideTitle`,y)?.styles}\n\t\t${pa(`${T} .slideDesc`,k)?.styles}\n\t\t${pa(`${T} .slideBtn`,_)?.styles}\n\n\t\t${$}{\n\t\t\ttext-align: ${f};\n\t\t\theight: ${a};\n\t\t}\n\t\t${S}{\n\t\t\twidth: ${i};\n\t\t\theight: ${a};\n\t\t\t${oa(d)};\n\t\t\tpadding: ${ua(u)};\n\t\t}\n\n\t\t${T} .slideBtn{\n\t\t\tpadding: ${ua(C)};\n\t\t\t${ia(j)}\n\t\t}\n\n\t\t${S} .swiper-pagination .swiper-pagination-bullet{\n\t\t\tbackground: ${p};\n\t\t\twidth: ${h};\n\t\t\theight: ${g};\n\t\t\t${ia(m)}\n\t\t}\n\t\t\n\t\t${S} .swiper-button-prev, ${S} .swiper-button-next{\n\t\t\tcolor: ${b};\n\t\t}\n\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${S} .swiper-pagination{\n\t\t\t\tdisplay: ${r?.tablet?"block":"none"};\n\t\t\t}\n\t\t\t${S} .swiper-button-prev, ${S} .swiper-button-next{\n\t\t\t\tdisplay: ${c?.tablet?"flex":"none"};\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) { \n\t\t\t${S} .swiper-pagination{\n\t\t\t\tdisplay: ${r?.mobile?"block":"none"};\n\t\t\t}\n\t\t\t${S} .swiper-button-prev, ${S} .swiper-button-next{\n\t\t\t\tdisplay: ${c?.mobile?"flex":"none"};\n\t\t\t}\n\t\t}\n\n\t\t${n.map(((e,t)=>{const{background:n,border:i={},childPositions:a=Fz,title:r,titleColor:l,description:c,descColor:d,btnText:u,btnColors:p,btnHovColors:h}=e,g=(x&&r?1:0)+(v&&c?1:0)+(w&&u?1:0),m=`${$} .swiper-wrapper .slide-${t}`,b=`${m} .slideContent`;let f="";for(let e=0;e<g;e++){const{top:t,right:n,bottom:o,left:i}=a[e]||{};f+=`${b} > *:nth-child(${e+1}){${t>o?`bottom: ${o}%;`:`top: ${t}%;`}${i>n?`right: ${n}%;`:`left: ${i}%;`}}`}return`\n\t\t\t\t${m}{\n\t\t\t\t\t${oa(n)}\n\t\t\t\t\t${ia(i)||""}\n\t\t\t\t}\n\t\t\t\t${m} .slideTitle{\n\t\t\t\t\tcolor: ${l||"#fff"};\n\t\t\t\t}\n\t\t\t\t${m} .slideDesc{\n\t\t\t\t\tcolor: ${d||"#fff"};\n\t\t\t\t}\n\t\t\t\t${m} .slideBtn{\n\t\t\t\t\t${aa(p)||`color: #fff; background: ${o};`}\n\t\t\t\t}\n\t\t\t\t${m} .slideBtn:hover{\n\t\t\t\t\t${aa(h)||`color: #fff; background: ${s};`}\n\t\t\t\t}\n\t\t\t\t${f}\n\t\t\t`})).join("")}\n\t\t`.replace(/\s+/g," ")}})},Wz=jQuery,Uz=(0,f.withSelect)((e=>({isEditorSidebarOpened:!!e("core/edit-post")?.isEditorSidebarOpened()})))((e=>{const{attributes:t,setAttributes:n,clientId:o,isEditorSidebarOpened:i}=e,{slides:s=[],columns:a,columnGap:r,isLoop:c,speed:d,freeModeOptions:u,effect:p,keyboardOptions:g,isMousewheel:b,isPage:f,isPageClickable:x,isPageDynamic:y,isPrevNext:v,isTitle:k,isDesc:w,isBtn:_}=t,C=bBlocksPremiumChecker,[j,$]=(0,m.useState)(0),[S,T]=(0,m.useState)(!0),M=`block-${o}`;(0,m.useEffect)((()=>{T(!S)}),[s,a,r,c,u,d,p,g,b,f,x,y,v,k,w,_,i]);const N=(e,t,o,i=!1,a=!1)=>{const r=Ob(s,(n=>{!1!==i&&a?n[e][t][i][a]=o:!1!==i&&!1===a?n[e][t][i]=o:n[e][t]=o}));n({slides:r}),$(e)};Wz(document).ready((function(){s?.length&&s.map(((e,t)=>{ |
| 536 |
const n=document.querySelector(`#${M} .${zz} .slide-${t}:not(.swiper-slide-duplicate) .slideContent`),o=n?.children||[];for(let e=0;e<o?.length;e++)Wz(o[e]).draggable({containment:"parent",cursor:"dragging",stop(n,o){const{top:i,left:s}=o.position,{clientWidth:a,clientHeight:r}=n.target||{},{clientWidth:l,clientHeight:c}=n.target?.parentElement||{};N(t,"childPositions",{top:i/c*100,right:(l-(s+a))/l*100,bottom:(c-(i+r))/c*100,left:s/l*100},e)}})}))}));const L=()=>(0,l.jsx)(Dz,{attributes:t,initialSlide:j,isBackend:!0});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Rz,{attributes:t,setAttributes:n,clientId:o,activeIndex:j,isPremium:C,setActiveIndex:$}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Hz,{attributes:t,id:M}),(0,l.jsx)(L,{})]})]})}));Nl(Nz.name)&&(0,p.registerBlockType)(Nz,{icon:Fr,transforms:{from:[{type:"block",blocks:["csb/content-slider-block"],transform:e=>(0,p.createBlock)("b-blocks/slider",e)},{type:"prefix",prefix:"slider",transform:()=>(0,p.createBlock)("b-blocks/slider")}],to:[{type:"block",blocks:["csb/content-slider-block"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("csb/content-slider-block",e)}]},edit:Uz,save:()=>null});const Gz=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/scroll-to-top","version":"1.0.0","title":"Scroll To Top","category":"bBlocks","description":"Enhance user experience with a fully customizable Scroll To Top button for smooth navigation.","keywords":["scroll to top","scroll to top button","scroll to top widget"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"scroll":{"type":"object","default":{"scrollType":"progress","position":"","desktop":{"position":{"right":"10px","bottom":"10px","left":"10px"},"align":""},"tablet":{"position":{"right":"","bottom":"","left":""},"align":""},"mobile":{"position":{"right":"","bottom":"","left":""},"align":""}}},"icon":{"type":"object","default":{"svg":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 384 512\'><path d=\'M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z\'/></svg>","text":"Top"}},"styles":{"type":"object","default":{"icon":{"size":"40px","color":"#000","bg":{},"normal":{"rotate":0},"hover":{"rotate":0,"transition":0.3},"radius":{"top":"","left":"","bottom":"","right":""}},"progress":{"size":"60px","strokeSize":6,"color":"#ff0000","strokeBg":"#efefef","bg":"#fff"},"text":{"typography":{"fontSize":{"desktop":"24px"}},"normal":{"color":"","bg":{},"shadow":[],"padding":{"top":"","left":"","bottom":"","right":""},"border":{},"radius":{"top":"","left":"","bottom":"","right":""}},"hover":{"color":"","bg":{},"shadow":[],"padding":{"top":"","left":"","bottom":"","right":""},"border":{},"radius":{"top":"","left":"","bottom":"","right":""}}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}},"margin":{"desktop":{"bottom":"0px","top":"0px","right":"0px","left":"0px"}}},"transform":{"normal":{"rotate":{"desktop":{"x":"","y":"","z":""},"tablet":{"x":"","y":"","z":""},"mobile":{"x":"","y":"","z":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}],"border":{"width":"0px","style":"none"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"mask":{"isMask":false,"shape":{"type":"circle"},"repeat":"no-repeat"},"animation":{"type":"","duration":1},"visibility":{"zIndex":{"desktop":""},"overflow":""},"responsive":{"desktop":false,"tablet":false,"mobile":false}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":["file:./view.css","aos"],"render":"file:./render.php","viewScript":["file:./view.js","aos"]}'),Vz=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],qz=[{label:(0,x.__)("Icon","b-blocks"),value:"icon"},{label:(0,x.__)("Text","b-blocks"),value:"text"},{label:(0,x.__)("Progress","b-blocks"),value:"progress"}],Yz=e=>{const{attributes:t,updateObj:n}=e,{icon:o,styles:i}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:o.svg,onChange:e=>n("icon",e,"svg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Icon Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i.icon.size,onChange:e=>n("styles",e,"icon","size")})]})]})},Kz=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n,device:o}=e,{scroll:i}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Position","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.position,onChange:e=>n("scroll",e,"position"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Bottom Left",value:"left"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Bottom Right",value:"right"})]}),"right"===i.position&&(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex2 mt10",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Right","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10 flex1",value:i[o].position.right,onChange:e=>n("scroll",e,o,"position","right")})]}),"left"===i.position&&(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex2 mt10",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Left","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10 flex1",value:i[o].position.left,onChange:e=>n("scroll",e,o,"position","left")})]}),("left"===i.position||"right"===i.position)&&(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex2 mt10",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Bottom","b-blocks")," ",(0, |
| 537 |
l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10 flex1",value:i[o].position.bottom,onChange:e=>n("scroll",e,o,"position","bottom")})]})]})})),Qz=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Zz=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),Xz=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Jz=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n,device:o}=e,{scroll:i,icon:s}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Scroll To Top","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","lists")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o].align,onChange:e=>n("scroll",e,o,"align"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:Qz}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:Zz}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:Xz})]})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Scroll Type","b-blocks"),labelPosition:"edge",options:qz,value:i.scrollType,onChange:e=>n("scroll",e,"scrollType")}),"text"===i.scrollType&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Scroll Text","b-blocks"),value:s.text,onChange:e=>n("icon",e,"text")})]})})),eD=e=>{const{attributes:t}=e,{scroll:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Jz,{...e}),"text"!==n.scrollType&&(0,l.jsx)(Yz,{...e}),(0,l.jsx)(Kz,{...e})]})},tD=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{icon:i}=o,[s,a]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon Style","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:i.color,onChange:e=>n("styles",e,"icon","color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i.bg,onChange:e=>n("styles",e,"icon","bg")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>a(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Rotate","b-blocks"),value:i[s].rotate,onChange:e=>n("styles",e,"icon",s,"rotate"),max:360}),"hover"===s&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:i.hover.transition,onChange:e=>n("styles",e,"icon","hover","transition"),step:.05,max:10})]})},nD=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{progress:i}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Progress Style","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Progress Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i.size,onChange:e=>n("styles",e,"progress","size")})]}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Stroke Size","b-blocks"),value:i.strokeSize,onChange:e=>n("styles",e,"progress","strokeSize")}),(0,l.jsx)(Ue,{label:(0,x.__)("Stroke Color","b-blocks"),value:i.color,onChange:e=>n("styles",e,"progress","color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Stroke Background","b-blocks"),value:i.strokeBg,onChange:e=>n("styles",e,"progress","strokeBg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Background","b-blocks"),value:i.bg,onChange:e=>n("styles",e,"progress","bg")})]})},oD=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{text:i}=o,[s,a]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Text Style","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:i.typography,onChange:e=>n("styles",e,"text","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>a(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i[s].color,onChange:e=>n("styles",e,"text",s,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i[s].bg,onChange:e=>n("styles",e,"text",s,"bg"),isImage:!0}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i[s].padding,onChange:e=>n("styles",e,"text",s,"padding")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:i[s].shadow,onChange:e=>n("styles",e,"text",s,"shadow")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i[s].border,onChange:e=>n("styles",e,"text",s,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i[s].radius,onChange:e=>n("styles",e,"text",s,"radius")})]})},iD=e=>{const{attributes:t}=e,{scroll:n}=t;return(0,l.jsxs)(l.Fragment,{children:["text"!==n.scrollType&&(0,l.jsx)(tD,{...e}),"text"===n.scrollType&&(0,l.jsx)(oD,{...e}),"progress"===n.scrollType&&(0,l.jsx)(nD,{...e})]})},sD={dimension:["padding","margin","width","height"],transform:!0,background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],mask:!0,animation:!0,visibility:["zIndex","overflow"],responsive:!0,css:!0},aD=e=>{const{attributes:t,setAttributes:n}=e,{advanced:o}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Vz,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(eD,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(iD,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:o,onChange:e=>n({advanced:e}),enabled:sD,isPremium:!0})})]})})})})},rD=({attributes:e,id:t})=>{ |
| 538 |
const{scroll:n,styles:o,advanced:i}=e,{icon:s,text:a,progress:r}=o,c=`#${t}`,d=`${c} .b-blocks-scroll-to-top-wrapper`,u=`${d} .b-blocks-scroll-to-top-icon`,p=`${d} .b-blocks-scroll-to-top-text`,h={icon:`\n\t\t\t${oa(s.bg)}\n\t\t`,text:`\n\t\t\t\t${oa(a.normal.bg)}\n\t\t\t\t${na("box-shadow",la(a.normal.shadow))}\n\t\t\t\t${na("padding",ha(a.normal.padding))}\n\t\t\t\t${sa(a.normal.border)}\n\t\t\t\t${na("border-radius",ha(a.normal.radius))}\n\t\t`,progress:` \n\t\t\t${na("width",r.size)}\n\t\t\t${na("height",r.size)}\n\t\t`};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${pa("",a.typography).googleFontLink}\n\t\t${pa(p,a.typography).styles}\n\n\t\t\t${c}{\n\t\t\t\t${na("justify-content",n.desktop.align)}\n\t\t\t\t${g="desktop",n.position?`\n\t\t\tposition:fixed;\n\t\t\t${na(n.position,n[g].position?.[n.position])}\n\t\t\t${na("bottom",n[g].position.bottom)}\n\t`:""}\n\t\t\t}\n\n\t\t\t${d}{\n\t\t\t\t${h[n.scrollType]}\n\t\t\t}\n\n\t\t\t${d}:hover .b-blocks-scroll-to-top-icon>svg{\n\t\t\t\t${na("rotate",s.hover.rotate>=0?s.hover.rotate+"deg":"")}\n\t\t\t}\n\n\t\t\t${p}{\n\t\t\t\t${na("color",a.normal.color)}\n\t\t\t}\n\t\t\t\n\t\t\t${u}>svg{\n\t\t\t\t${na("width",s.size)}\n\t\t\t\t${na("height",s.size)}\n\t\t\t\t${na("fill",s.color)}\n\t\t\t\t${na("transition",s.hover.transition?`all ${s.hover.transition}s ease-in-out`:"")}\n\t\t\t\t${na("rotate",s.normal.rotate>=0?s.normal.rotate+"deg":"")}\n\t\t\t}\n\n\t\t\t${_a(t,i,!0,!1)}\n\t`}});var g},lD=e=>{const{attributes:t,doc:n=document,win:o=window,isBackend:i=!1}=e,{scroll:s,icon:a,styles:r}=t,{scrollType:c}=s,{progress:d}=r,[u,p]=(0,m.useState)(0),[h,g]=(0,m.useState)(!1),b={strokeWidth:d.strokeSize,color:d.color,bgColor:d.strokeBg,bg:d.bg},f=(0,m.useMemo)((()=>50-b.strokeWidth/2),[b.strokeWidth]),x=(0,m.useMemo)((()=>2*Math.PI*f),[f]);(0,m.useEffect)((()=>{const e=()=>{const e=o?.pageYOffset||n?.documentElement?.scrollTop||n?.body?.scrollTop||0,t=n?.documentElement?.scrollHeight-n?.documentElement?.clientHeight,s=0===t?0:e/t*100;p(Math.min(100,Math.max(0,s))),g(!i&&e>80)};return o?.addEventListener("scroll",e,{passive:!0}),e(),()=>o?.removeEventListener("scroll",e)}),[n,o]);const y=x-u/100*x;return(0,l.jsx)("div",{className:"b-blocks-scroll-to-top-main-wrapper",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},style:{...i?{}:{opacity:h?1:0}},children:(0,l.jsxs)("div",{className:"b-blocks-scroll-to-top-wrapper "+("progress"===c?"b-blocks-scroll-to-top-progress-wrapper":""),children:[("icon"===c||"progress"===c)&&(0,l.jsx)("div",{className:"b-blocks-scroll-to-top-icon",dangerouslySetInnerHTML:{__html:a.svg}}),"progress"===c&&(0,l.jsxs)("svg",{viewBox:"0 0 100 100",children:[(0,l.jsx)("circle",{cx:"50",cy:"50",r:f,fill:b.bg,stroke:b.bgColor,strokeWidth:b.strokeWidth}),(0,l.jsx)("circle",{cx:"50",cy:"50",r:f,fill:"transparent",stroke:b.color,strokeWidth:b.strokeWidth,strokeDasharray:x,strokeDashoffset:y,strokeLinecap:"round",className:"b-blocks-scroll-to-top-progress-circle"})]}),"text"===c&&(0,l.jsx)("div",{className:"b-blocks-scroll-to-top-text",dangerouslySetInnerHTML:{__html:a.text}})]})})};Nl(Gz.name)&&(0,p.registerBlockType)(Gz,{icon:ol,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i=fe(t,n),s=(0,m.useRef)(null),a=s.current?.ownerDocument,r=a?.defaultView;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(aD,{attributes:t,setAttributes:n,updateObj:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({ref:s}),children:[(0,l.jsx)(rD,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{children:(0,l.jsx)(lD,{attributes:t,doc:a,win:r,isBackend:!0})})]})]})}});const cD=JSON.parse('{"apiVersion":3,"name":"b-blocks/social-share","title":"Social Share","description":"Share your website/website-page link.","category":"bBlocks","keywords":["share","social share","page share"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"socials":{"type":"array","default":[{"networkType":"socialNetworks","network":"facebook","isUpIcon":false,"icon":{"class":"fab fa-facebook-f","color":"#1877f2"},"upIcon":{"id":null,"url":"","alt":"","title":""}},{"networkType":"socialNetworks","network":"twitter","isUpIcon":false,"icon":{"class":"fab fa-twitter","color":"#1da1f2"},"upIcon":{"id":null,"url":"","alt":"","title":""}},{"networkType":"socialNetworks","network":"linkedin","isUpIcon":false,"icon":{"class":"fab fa-linkedin-in","color":"#0a66c2"},"upIcon":{"id":null,"url":"","alt":"","title":""}},{"networkType":"mobileMessenger","network":"whatsapp","isUpIcon":false,"icon":{"class":"fab fa-whatsapp","color":"#25d366"},"upIcon":{"id":null,"url":"","alt":"","title":""}}]},"alignment":{"type":"string","default":"left"},"theme":{"type":"string","default":"default"},"background":{"type":"object","default":{"color":"#0000"}},"size":{"type":"string","default":"28px"},"padding":{"type":"string","default":"10px"},"margin":{"type":"string","default":"10px"},"border":{"type":"object","default":{"radius":"50%"}},"shadow":{"type":"object","default":{}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":["file:./view.js","goodShare"]}'),dD=(e,t)=>{for(const n of t)if(e===n[0])return n[1]},uD=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Theme 1","b-blocks"),value:"theme1"},{label:(0,x.__)("Theme 2","b-blocks"),value:"theme2"}],pD=[{label:(0,x.__)("Social Networks","b-blocks"),value:"socialNetworks"},{label:(0,x.__)("Mobile Messenger","b-blocks"),value:"mobileMessenger"}],hD=[{label:(0,x.__)("Facebook","b-blocks"),value:"facebook"},{label:(0,x.__)("Twitter","b-blocks"),value:"twitter"},{label:(0,x.__)("LinkedIn","b-blocks"),value:"linkedin"},{label:(0,x.__)("Pinterest","b-blocks"),value:"pinterest"},{label:(0,x.__)("Blogger","b-blocks"),value:"blogger"},{label:(0,x.__)("WordPress","b-blocks"),value:"wordpress"},{label:(0,x.__)("Tumblr","b-blocks"),value:"tumblr"},{label:(0,x.__)("Reddit","b-blocks"),value:"reddit"},{label:(0,x.__)("Digg","b-blocks"),value:"digg"},{label:(0,x.__)("LiveJournal","b-blocks"),value:"livejournal"},{label:(0,x.__)("Evernote","b-blocks"),value:"evernote"},{label:(0,x.__)("Flipboard","b-blocks"),value:"flipboard"},{label:(0,x.__)("Mix","b-blocks"),value:"mix"},{label:(0,x.__)("Pocket","b-blocks"),value:"pocket"},{label:(0,x.__)("Buffer","b-blocks"),value:"buffer"},{label:(0,x.__)("Instapaper","b-blocks"),value:"instapaper"},{label:(0,x.__)("Meneame","b-blocks"),value:"meneame"},{label:(0,x.__)("Baidu","b-blocks"),value:"baidu"},{label:(0,x.__)("Weibo","b-blocks"),value:"weibo"},{label:(0,x.__)("Xing","b-blocks"),value:"xing"},{label:(0,x.__)("RenRen","b-blocks"),value:"renren"},{label:(0,x.__)("Vkontakte (VK)","b-blocks"),value:"vkontakte"},{label:(0,x.__)("Odnoklassniki","b-blocks"),value:"odnoklassniki"},{label:(0,x.__)("My [email protected]","b-blocks"),value:"moimir"},{label:(0,x.__)("Surfingbird","b-blocks"),value:"surfingbird"},{label:(0,x.__)("LiveInternet","b-blocks"),value:"liveinternet"}],gD=[{label:(0,x.__)("SMS","b-blocks"),value:"sms"},{label:(0,x.__)("Skype","b-blocks"),value:"skype"},{label:(0,x.__)("Telegram","b-blocks"),value:"telegram"},{label:(0,x.__)("Viber","b-blocks"),value:"viber"},{label:(0,x.__)("WhatsApp","b-blocks"),value:"whatsapp"},{label:(0,x.__)("WeChat","b-blocks"),value:"wechat"},{label:(0,x.__)("LINE","b-blocks"),value:"line" |
| 539 |
}],mD=[["facebook","fab fa-facebook-f"],["twitter","fab fa-twitter"],["linkedin","fab fa-linkedin-in"],["pinterest","fab fa-pinterest-p"],["blogger","fab fa-blogger-b"],["wordpress","fa-brands fa-wordpress"],["tumblr","fab fa-tumblr"],["reddit","fab fa-reddit-alien"],["digg","fab fa-digg"],["evernote","fab fa-evernote"],["flipboard","fab fa-flipboard"],["mix","fab fa-mix"],["buffer","fab fa-buffer"],["weibo","fab fa-weibo"],["xing","fab fa-xing"],["renren","fab fa-renren"],["odnoklassniki","fab fa-odnoklassniki"],["sms","fas fa-sms"],["skype","fab fa-skype"],["telegram","fab fa-telegram-plane"],["viber","fab fa-viber"],["whatsapp","fab fa-whatsapp"],["wechat","fab fa-weixin"],["line","fab fa-line"]],bD=[["facebook","#1877f2"],["twitter","#1da1f2"],["linkedin","#0a66c2"],["pinterest","#bd081c"],["blogger","#fc4f08"],["wordpress","#0073aa"],["tumblr","#35465d"],["reddit","#ff4500"],["digg","#1b1a19"],["evernote","#00aa0f"],["flipboard","#f52828"],["mix","#ff8226"],["buffer","#000"],["weibo","#df152c"],["xing","#00a82d"],["renren","#0259a0"],["odnoklassniki","#f68b25"],["sms","#000"],["skype","#00aff0"],["telegram","#0088cc"],["viber","#794f9b"],["whatsapp","#25d366"],["wechat","#09b83e"],["line","#06c755"]],fD=[["facebook",!1],["twitter",!1],["linkedin",!1],["pinterest",!1],["blogger",!1],["wordpress",!1],["tumblr",!1],["reddit",!1],["digg",!1],["evernote",!1],["flipboard",!1],["mix",!1],["buffer",!1],["weibo",!1],["xing",!1],["renren",!1],["odnoklassniki",!1],["sms",!1],["skype",!1],["telegram",!1],["viber",!1],["whatsapp",!1],["line",!1],["livejournal",!0],["pocket",!0],["instapaper",!0],["meneame",!0],["baidu",!0],["vkontakte",!0],["moimir",!0],["surfingbird",!0],["liveinternet",!0]],xD=({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:i})=>{const{socials:s,alignment:a,theme:c,background:d,size:u,padding:p,margin:g,border:m,shadow:b}=e,f=(e,o)=>{const i=Ob(s,(t=>{t[n][e]=o}));t({socials:i})},k=e=>{const o=Ob(s,(t=>{for(const o of e){const e=o[0],i=o[1],s=o?.[2];s?t[n][e][s]=i:t[n][e]=i}}));t({socials:o})},w=(e,n,o=!1)=>{const i=[...s];i.map(((t,s)=>{o?i[s][e][o]=n:i[s][e]=n})),t({socials:i})},{networkType:_="",network:C="",isUpIcon:j=!1,icon:$={},upIcon:S={}}=s[n]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:fn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove socials","b-blocks"),children:[null!==n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:"bplItemTitle",children:(0,x.__)(`Social No ${n+1}:`,"b-blocks")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Network Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:_,onChange:e=>{k([["networkType",e],["network","mobileMessenger"===e?"sms":"facebook"],["isUpIcon",!1],["icon","mobileMessenger"===e?"fas fa-sms":"fab fa-facebook-f","class"],["icon","mobileMessenger"===e?"#000":"#1877f2","color"]])},options:pD})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Network:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:C,onChange:e=>{const t=[["network",e],["icon",dD(e,mD),"class"],["icon",dD(e,bD),"color"],["isUpIcon",dD(e,fD)]];k(t)},options:"mobileMessenger"===_?gD:hD})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Upload Icon?","b-blocks"),checked:j,onChange:e=>f("isUpIcon",e)}),j?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{className:"mt10",value:S,onChange:e=>f("upIcon",e),placeholder:(0,x.__)("Enter Icon URL","b-blocks")})]}):(0,l.jsx)(Un,{label:(0,x.__)("Icon:","b-blocks"),value:$,onChange:e=>f("icon",e),defaults:{class:"fab fa-facebook-f",color:o},isSize:!1}),(0,l.jsxs)(y.PanelRow,{className:"itemAction mt20 mb15",children:[1<s?.length&&(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:e=>{e.preventDefault(),t({socials:[...s.slice(0,n),...s.slice(n+1)]}),i(0===n?0:n-1)},children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:e=>{e.preventDefault(),t({socials:[...s.slice(0,n),{...s[n]},...s.slice(n)]}),i(n+1)},children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]}),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Social","b-blocks"),onClick:()=>{t({socials:[...s,{networkType:"socialNetworks",network:"facebook",isUpIcon:!1,icon:{class:"fab fa-facebook-f",color:"#1877f2"},upIcon:{id:null,url:"",alt:"",title:""}}]}),i(s.length)},children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Social","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Social Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Theme:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:c,onChange:e=>{t({theme:e}),"default"===e&&(t({background:{type:"solid",color:"#0000"},border:{width:"0",color:"#0000"}}),w("icon",o,"color")),"theme1"===e&&(t({background:{type:"gradient",gradient:r},border:{width:"0",color:"#0000"}}),w("icon","#fff","color")),"theme2"===e&&(t({background:{type:"solid",color:"#0000"},border:{width:"2px",color:o}}),w("icon",o,"color"))},options:uD})]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:d,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Size:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({size:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({padding:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Space Between:","b-blocks"),labelPosition:"left",value:g,onChange:e=>t({margin:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:m,onChange:e=>t({border:e}),defaults:{radius:"50%"}}),(0,l.jsx)(nd,{label:(0,x.__)("Shadow:","b-blocks"),value:b,onChange:e=>t({shadow:e})})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:a,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Social Icons Alignment"),alignmentControls:[{title:(0,x.__)("Social Icons in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Social Icons in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Social Icons in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},yD="bBlocksSocialShare",vD=({attributes:e,id:t})=>{const{socials:n,alignment:o,background:i,size:s,padding:a,margin:r,border:c,shadow:d}=e,u=`#${t}`,p=`${u} ul.${yD}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${u}{\n\t\t\ttext-align: ${o};\n\t\t}\n\t\t${p} li.icon{\n\t\t\tfont-size: ${s};\n\t\t\t${oa(i)}\n\t\t\twidth: calc( ${s} + ${a} + ${a} );\n\t\t\theight: calc( ${s} + ${a} + ${a} );\n\t\t\tmargin: 0 calc( ${r} / 2 );\n\t\t\t${ia(c)}\n\t\t\tbox-shadow: ${da(d)||"none"};\n\t\t}\n\t\t${p} li.icon img{\n\t\t\twidth: ${s};\n\t\t}\n\n\t\t${n?.map(((e,t)=>`\n\t\t\t${p} li.icon-${t} i{\n\t\t\t\t${ra(e?.icon)}\n\t\t\t\tfont-size: inherit;\n\t\t\t}`)).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},kD=({attributes:e,isBackend:t=!1,custom:n})=>(0,l.jsx)("ul",{className:yD,children:e.socials?.map(((e,o)=>{const{network:i,isUpIcon:s,icon:a,upIcon:r}=e;return(0,l.jsx)("li",{onClick:()=>t&&n.setActiveIndex(o),className:`icon icon-${o} ${t&&o===n.activeIndex?"bPlNowEditing":""}`,"data-social":i,children:s?(0,l.jsx)("img",{className:r?.id?`wp-image-${r?.id}`:null,src:r?.url,alt:r?.alt}):a?.class&&(0,l.jsx)("i",{className:a?.class})},o)}))});Nl(cD.name)&&(0,p.registerBlockType)(cD,{icon:Hr,transforms:{from:[{type:"block",blocks:["bssb/social-share"],transform:e=>(0,p.createBlock)("b-blocks/social-share",e)},{ |
| 540 |
type:"prefix",prefix:"share",transform:()=>(0,p.createBlock)("b-blocks/social-share")}],to:[{type:"block",blocks:["bssb/social-share"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("bssb/social-share",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e;(0,m.useEffect)((()=>me()),[i]);const[s,a]=(0,m.useState)(0);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(xD,{attributes:t,setAttributes:n,activeIndex:s,setActiveIndex:a}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(vD,{attributes:t,id:`block-${o}`}),(0,l.jsx)(kD,{attributes:t,isBackend:!0,custom:{activeIndex:s,setActiveIndex:a}})]})]})},save:()=>null});const wD=JSON.parse('{"UU":"b-blocks/whatsapp-chat"}'),_D=()=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),CD=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),jD=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),$D=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),SD=({attributes:e,setAttributes:t})=>{const{phoneNumber:n,buttonText:o,prefillMessage:i,showIcon:s,showStatusDot:a,tooltipText:r,buttonSize:c,hoverAnimation:d,openInNewTab:u,fullWidth:p,alignment:h,iconPosition:g,pulseAnimation:m}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("WhatsApp Settings","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:h,onChange:e=>t({alignment:e}),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:CD}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:jD}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:$D})]})]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Phone Number","b-blocks"),help:(0,x.__)("Full international format without + or spaces, e.g. 15551234567","b-blocks"),value:n,onChange:e=>t({phoneNumber:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Button Text","b-blocks"),value:o,onChange:e=>t({buttonText:e})}),(0,l.jsx)(y.TextareaControl,{label:(0,x.__)("Pre-filled Message","b-blocks"),help:(0,x.__)("This message will be pre-filled when the user opens WhatsApp.","b-blocks"),value:i,onChange:e=>t({prefillMessage:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Tooltip Text","b-blocks"),help:(0,x.__)("Shown on hover. Leave empty to disable.","b-blocks"),value:r,onChange:e=>t({tooltipText:e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Open in New Tab","b-blocks"),checked:u,onChange:e=>t({openInNewTab:e})})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Appearance","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Button Size","b-blocks"),value:c,options:[{label:(0,x.__)("Small","b-blocks"),value:"small"},{label:(0,x.__)("Medium","b-blocks"),value:"medium"},{label:(0,x.__)("Large","b-blocks"),value:"large"}],onChange:e=>t({buttonSize:e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Full Width","b-blocks"),checked:p,onChange:e=>t({fullWidth:e})})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon & Status","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show WhatsApp Icon","b-blocks"),checked:s,onChange:e=>t({showIcon:e})}),s&&(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Icon Position","b-blocks"),value:g,options:[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],onChange:e=>t({iconPosition:e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Online Status Dot","b-blocks"),help:(0,x.__)("Show a pulsing green dot to indicate availability.","b-blocks"),checked:a,onChange:e=>t({showStatusDot:e})})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Animations","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Hover Scale Animation","b-blocks"),checked:d,onChange:e=>t({hoverAnimation:e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pulse Attention Animation","b-blocks"),help:(0,x.__)("Adds a subtle pulse to draw attention.","b-blocks"),checked:m,onChange:e=>t({pulseAnimation:e})})]})]})},TD=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i,pulseAnimation:s,showIcon:a,showStatusDot:r}=t,[c,d]=(0,m.useState)("normal"),[u,p]=(0,m.useState)("normal");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{title:"Style",initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:i[o].margin,onChange:e=>n("styles",e,o,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:i[o].padding,onChange:e=>n("styles",e,o,"padding")}),s&&(0,l.jsx)(Ue,{label:(0,x.__)("Pulse Color","b-blocks"),value:i.pulseColor,onChange:e=>n("styles",e,"pulseColor")}),(0,l.jsx)(Os,{value:i.typo,onChange:e=>n("styles",e,"typo")}),(0, |
| 541 |
l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:c,onChange:e=>d(e),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{value:i[c].bg,onChange:e=>n("styles",e,c,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i[c].color,onChange:e=>n("styles",e,c,"color")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),values:i[c].border,onChange:e=>n("styles",e,c,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i[c].radius,onChange:e=>n("styles",e,c,"radius")}),(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),values:i[c].shadow,onChange:e=>n("styles",e,c,"shadow")}),"hover"===c&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),min:0,max:5e3,step:.01,value:i.hover.transition,onChange:e=>n("styles",e,"hover","transition")})]}),a&&(0,l.jsxs)(y.PanelBody,{title:"Icon",initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Icon Size","b-blocks"),value:i.icon.size,onChange:e=>n("styles",e,"icon","size")}),(0,l.jsx)("br",{}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:u,onChange:e=>p(e),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:i.icon[u].color,onChange:e=>n("styles",e,"icon",u,"color")})]}),r&&(0,l.jsxs)(y.PanelBody,{title:"Status",initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Status Size","b-blocks"),value:i.status.size,onChange:e=>n("styles",e,"status","size")}),(0,l.jsx)(An,{isImage:!1,label:(0,x.__)("Status Color","b-blocks"),value:i.status.color,onChange:e=>n("styles",e,"status","color")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Position X","b-blocks"),value:i.status.position.x,onChange:e=>n("styles",e,"status","position","x")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Position Y","b-blocks"),value:i.status.position.y,onChange:e=>n("styles",e,"status","position","y")})]})]})},MD=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(SD,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(TD,{...e})})]})})})}),ND=({attributes:e,id:o})=>{const{alignment:i,styles:s}=e,{normal:a,hover:r,desktop:c,tablet:d,mobile:u,typo:p}=s,h=`#${o}.wp-block-b-blocks-whatsapp-chat`,g=`${h} .bBlocks-whatsapp-block-wrapper`,m=`${h} .bBlocks-whatsapp-block-btn`,b=`${m}.bBlocks-whatsapp-block-btn--pulse`,f=`${m} .bBlocks-whatsapp-block-btn__text`,x=`${m} .bBlocks-whatsapp-block-btn__icon`,y=`${m} .bBlocks-whatsapp-block-btn__status-dot`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${pa("",p).googleFontLink}\n\t\t${pa(f,p).styles}\n\n\t\t${g}{\n\t\t\t${na("align-items",i)}\n\t\t}\n\n\t\t${b} {\n\t\t\tanimation: bBlocks-whatsapp-block-pulse 2s infinite;\n\t\t}\n\n\t\t@keyframes bBlocks-whatsapp-block-pulse {\n\t\t\t0% {\n\t\t\t\tbox-shadow: 0 0 0 0 ${s.pulseColor};\n\t\t\t}\n\n\t\t\t70% {\n\t\t\t\tbox-shadow: 0 0 0 12px rgba(37, 211, 102, 0);\n\t\t\t}\n\n\t\t\t100% {\n\t\t\t\tbox-shadow: 0 0 0 0 rgba(37, 211, 102, 0);\n\t\t\t}\n\t\t}\n\n\t\t${m}{\n\t\t\t${na("margin",ha(c.margin))}\n\t\t\t${na("padding",ha(c.padding))}\n\t\t\t${oa(a.bg)}\n\t\t\t${na("color",a.color)}\n\t\t\t${sa(a.border)}\n\t\t\t${na("border-radius",ha(a.radius))}\n\t\t\t${da(a.shadow)}\n\t\t\ttransition: all ${r.transition}s ease-in-out;\n\t\t}\n\t\t${m}:hover{\n\t\t\t${oa(r.bg)}\n\t\t\t${sa(r.border)}\n\t\t\t${na("color",r.color)}\n\t\t\t${na("border-radius",ha(r.radius))}\n\t\t\t${da(r.shadow)}\n\t\t}\n\n\t\t${f}{\n\t\t\t${na("color",a.color)}\n\t\t}\n\n\t\t${m}:hover .bBlocks-whatsapp-block-btn__text{\n\t\t\t${na("color",r.color)}\n\t\t}\n\n\t\t${x}>svg{\n\t\t\t${na("width",s.icon.size)}\n\t\t\t${na("fill",s.icon.normal.color)}\n\t\t}\n\n\t\t${m}:hover .bBlocks-whatsapp-block-btn__icon>svg{\n\t\t\t${na("fill",s.icon.hover.color)}\n\t\t}\n\t\t\n\t\t${y}{\n\t\t\t${oa(s.status.color)}\n\t\t\t${na("width",s.status.size)}\n\t\t\t${na("height",s.status.size)}\n\t\t\t${na("left",s.status.position.x)}\n\t\t\t${na("top",s.status.position.y)}\n\t\t}\n\t\t\n\t\t${t}{\n\t\t\t${m}{\n\t\t\t\t${na("margin",ha(d.margin))}\n\t\t\t\t${na("padding",ha(d.padding))}\n\t\t\t}\n\t\t}\n\t\t${n}{\n\t\t\t${m}{\n\t\t\t\t${na("margin",ha(u.margin))}\n\t\t\t\t${na("padding",ha(u.padding))}\n\t\t\t}\n\t\t}\n\t\t\n\t\t`.replace(/\s+/g," ")}})},LD=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{phoneNumber:s,buttonText:a,showIcon:r,showStatusDot:c,tooltipText:d,buttonSize:u,hoverAnimation:p,fullWidth:g,iconPosition:m,shadow:b,pulseAnimation:f}=t,y={small:"bBlocks-whatsapp-block-btn--small",medium:"bBlocks-whatsapp-block-btn--medium",large:"bBlocks-whatsapp-block-btn--large"},v=["bBlocks-whatsapp-block-btn",y[u]||y.medium,g?"bBlocks-whatsapp-block-btn--full":"",p?"bBlocks-whatsapp-block-btn--hover-anim":"",b?"bBlocks-whatsapp-block-btn--shadow":"",f?"bBlocks-whatsapp-block-btn--pulse":""].filter(Boolean).join(" "),k=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(MD,{attributes:t,setAttributes:n,updateObj:k,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(ND,{attributes:t,id:`block-${o}`}),!s&&(0,l.jsx)("p",{className:"bBlocks-whatsapp-block-notice",children:(0,x.__)("Please enter a WhatsApp phone number in the block settings.","bBlocks-whatsapp-block-whatsapp-chat")}),(0,l.jsxs)("div",{className:"bBlocks-whatsapp-block-wrapper",children:[(0,l.jsxs)("button",{className:v,type:"button","aria-label":a,children:[r&&"left"===m&&(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-btn__icon",children:(0,l.jsx)(_D,{})}),(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-btn__text",children:a}),r&&"right"===m&&(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-btn__icon",children:(0,l.jsx)(_D,{})}),c&&(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-btn__status-dot"})]}),d&&(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-tooltip",children:d})]})]})]})}));(0,p.registerBlockType)(wD.UU,{icon:kl,edit:LD}) |
| 542 |
;const ED=JSON.parse('{"apiVersion":3,"name":"b-blocks/star-rating","title":"Star Rating","description":"Gutenberg editing with easy-to-use, responsive star-rating more.","category":"bBlocks","keywords":["star-rating","Rating","Gutenberg"],"textdomain":"star-rating","attributes":{"align":{"type":"string","default":""},"ratingScale":{"type":"number","default":5},"rating":{"type":"number","default":4.3},"iconStyle":{"type":"string","default":"solid"},"iconColor":{"type":"string","default":"#f0ad4e"},"prefix":{"type":"string","default":""},"gap":{"type":"string","default":"0px"},"alignment":{"type":"string","default":"center"},"margin":{"type":"object","default":{"top":"","right":"","bottom":"","left":""}},"textTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"textColor":{"type":"string","default":"#7a7a7a"},"textShadow":{"type":"array","default":[]},"iconSize":{"type":"string","default":"20px"},"unmarkedColor":{"type":"string","default":"#ccd6df"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),PD=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:(0,l.jsx)("path",{d:"M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"})}),AD=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:(0,l.jsx)("path",{d:"M287.9 0c9.2 0 17.6 5.2 21.6 13.5l68.6 141.3 153.2 22.6c9 1.3 16.5 7.6 19.3 16.3s.5 18.1-5.9 24.5L433.6 328.4l26.2 155.6c1.5 9-2.2 18.1-9.6 23.5s-17.3 6-25.3 1.7l-137-73.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.2c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5C270.4 5.2 278.7 0 287.9 0zm0 79L235.4 187.2c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l105.2-56.2c7.1-3.8 15.6-3.8 22.6 0l105.2 56.2L384.2 324.1c-1.3-7.7 1.2-15.5 6.8-21l85.9-85.1L358.6 200.5c-7.8-1.2-14.6-6.1-18.1-13.3L287.9 79z"})}),BD=[{label:"0-5",value:5},{label:"0-10",value:10}],ID=[{label:(0,x.__)("Solid","b-blocks"),value:"solid",icon:PD},{label:(0,x.__)("Outline","b-blocks"),value:"outline",icon:AD}],OD=[{label:(0,x.__)("left","b-blocks"),value:"left",icon:"editor-alignleft"},{label:(0,x.__)("center","b-blocks"),value:"center",icon:"editor-aligncenter"},{label:(0,x.__)("right","b-blocks"),value:"right",icon:"editor-alignright"}],RD=({attributes:e,setAttributes:t})=>{const{ratingScale:n,rating:o,iconStyle:i,prefix:s,gap:a,alignment:r,margin:c,textTypo:d,textColor:u,textShadow:p,iconColor:g="#f0ad4e",iconSize:m="20px",unmarkedColor:b="#ccd6df"}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Star Rating","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Rating Scale","b-blocks"),labelPosition:"left",value:n,onChange:e=>t({ratingScale:parseInt(e),rating:5===parseInt(e)?parseFloat((o/2).toFixed(1)):parseFloat((2*o).toFixed(1))}),options:BD}),(0,l.jsx)(y.TextControl,{className:"mt20",label:(0,x.__)("Prefix","b-blocks"),value:s,onChange:e=>t({prefix:e})}),(0,l.jsx)(y.RangeControl,{className:"mt20",label:(0,x.__)("Rating","b-blocks"),labelPosition:"left",value:o,onChange:e=>t({rating:e}),min:1,max:n,step:.1}),(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Icon Style","b-blocks"),value:i,onChange:e=>t({iconStyle:e}),options:ID,isIcon:!0})]}),"style"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Star Rating","b-blocks"),children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Icon Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:m,onChange:e=>t({iconSize:e}),units:[Ee(10),Ae(1)],isResetValueOnUnitChange:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a,onChange:e=>t({gap:e}),units:[Ee(10),Ae(1)],isResetValueOnUnitChange:!0})]}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),values:c,onChange:e=>t({margin:e})}),(0,l.jsx)(Tn,{label:(0,x.__)("Alignment","b-blocks"),value:r,onChange:e=>t({alignment:e}),options:OD,isIcon:!0}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:g,onChange:e=>t({iconColor:e})}),(0,l.jsx)(Ue,{label:(0,x.__)("Unmarked Icon Color","b-blocks"),value:b,onChange:e=>t({unmarkedColor:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Gap","b-blocks"),labelPosition:"left",value:a,onChange:e=>t({gap:e}),units:[Ee(10),Ae(1)],isResetValueOnUnitChange:!0}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:u,onChange:e=>t({textColor:e}),defaultColor:"#7a7a7a"}),(0,l.jsx)(Os,{label:(0,x.__)("Text Typography","b-blocks"),value:d,onChange:e=>t({textTypo:e}),defaults:{fontSize:16}}),(0,l.jsx)(yt,{label:(0,x.__)("Text Shadow","b-blocks"),value:p,onChange:e=>t({textShadow:e}),type:"text"})]})]})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:r,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Rating Alignment"),alignmentControls:[{title:(0,x.__)("Rating in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Rating in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Rating in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},zD=e=>Array.from({length:e},((e,t)=>t+1)),DD="bBlocksRating",FD=({attributes:e,id:t})=>{const{rating:n,gap:o,alignment:i,margin:s,textTypo:a,textColor:r,textShadow:c,iconColor:d="#f0ad4e",iconSize:u="20px",unmarkedColor:p="#ccd6df"}=e,h=`#${t} .${DD}`,g=`${h} .stars .star`,m=(n+"").split("."),b=parseInt(m[0]),f=parseInt(m[1]||0);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",a)?.googleFontLink}\n\t\t${pa(`${h} .ratingPrefix`,a)?.styles}\n\n\t\t${h} {\n\t\t\tjustify-content: ${i};\n\t\t\tgap: ${o};\n\t\t\tcolor: ${r};\n\t\t\t${na("margin",ha(s))}\n\t\t}\n\n\t\t${h} .ratingPrefix{\n\t\t\ttext-shadow: ${la(c,"text")}\n\t\t}\n\n\t\t${h} .stars{\n\t\t\t${na("gap",o)}\n\t\t}\n\n\t\t${g}>.starFill>svg{\n\t\t\t${na("fill",d)}\n\t\t\t${na("width",u)}\n\t\t\t${na("height",u)}\n\t\t}\n\n\t\t${g}>svg{\n\t\t\t${na("fill",p)}\n\t\t\t${na("width",u)}\n\t\t\t${na("height",u)}\n\t\t}\n\n\t\t${g}{\n\t\t\t${na("width",u)}\n\t\t\t${na("height",u)}\n\t\t}\n\n\t\t${zD(b).map((e=>`${g}:nth-child(${e}) .starFill`)).join(", ")}{\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t${g}:nth-child(${b+1}) .starFill{\n\t\t\twidth: ${(()=>{switch(f){case 1:return 25;case 2:return 30;case 3:return 35;case 4:return 42.5;case 5:return 50;case 6:return 57.5;case 7:return 65;case 8:return 70;case 9:return 75;default:return 0}})()}%;\n\t\t}\n\t`}})},HD=({attributes:e})=>{const{ratingScale:t,iconStyle:n,prefix:o}=e;return(0,l.jsxs)("div",{className:DD,children:[(0,l.jsx)("span",{className:"ratingPrefix",children:o}),(0,l.jsx)("div",{className:"stars",children:zD(t).map((e=>(0,l.jsxs)("span",{className:"star",children:["solid"===n?PD:AD,(0,l.jsx)("span",{className:"starFill",children:PD})]},e)))})]})};Nl(ED.name)&&(0,p.registerBlockType)(ED,{icon:Wr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(RD,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0, |
| 543 |
l.jsx)(FD,{attributes:t,id:`block-${o}`}),(0,l.jsx)(HD,{attributes:t})]})]})},save:()=>null});const WD=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/stacked-cards","title":"Stacked Cards","category":"bBlocks","description":"Create interactive stacked card layouts that stay sticky while scrolling. The Stacked Cards block helps you present content in a layered, engaging format that enhances the user experience as visitors navigate your page.","keywords":["stacked","cards","stack","cards"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"options":{"type":"object","default":{"effect":"default","responsive":{"desktop":false,"tablet":true,"mobile":true}}},"styles":{"type":"object","default":{"stickyTop":30,"cardGaps":30,"desktop":{"height":""},"tablet":{"height":""},"mobile":{"height":""}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"bottom":"","top":"","right":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"x":"","y":"","z":""},"tablet":{"x":"","y":"","z":""},"mobile":{"x":"","y":"","z":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b0","isInset":false}],"border":{"width":"","style":"none"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"visibility":{"zIndex":{"desktop":""},"overflow":""},"responsive":{"desktop":false,"tablet":false,"mobile":false}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),UD=((0,x.__)("Simple"),(0,x.__)("Minimal"),(0,x.__)("Small"),(0,x.__)("Short"),(0,x.__)("Vertical","b-blocks"),(0,x.__)("Horizontal","b-blocks"),[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}]),GD=e=>{const{attributes:t,updateObj:n,device:o="desktop"}=e,{styles:i,options:s}=t,{stickyTop:a}=i,{responsive:r}=s;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",children:[(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Sticky Top Value","b-blocks"),value:a,onChange:e=>n("styles",e,"stickyTop"),min:0,max:1e3}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Card Height","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i[o].height,onChange:e=>n("styles",e,o,"height")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Disable On Desktop","b-blocks"),checked:r.desktop,value:r.desktop,onChange:e=>n("options",e,"responsive","desktop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Disable On Tablet","b-blocks"),checked:r.tablet,value:r.tablet,onChange:e=>n("options",e,"responsive","tablet")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Disable On Mobile","b-blocks"),checked:r.mobile,value:r.mobile,onChange:e=>n("options",e,"responsive","mobile")})]})]})},VD=e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{advanced:i}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:UD,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(GD,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e})})})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(y.Button,{onClick:()=>{const e=[...(0,f.select)("core/block-editor").getBlocks(o)],t=(0,p.createBlock)("b-blocks/container",{className:"bBlocksStackedSingleCard"});e.push(t),(0,f.dispatch)("core/block-editor").replaceInnerBlocks(o,e,!1)},style:{height:"100%"},children:"Add Card"})})]})},qD=({attributes:e,id:o,isBackend:i=!1})=>{const{styles:s,options:a,advanced:r}=e,{responsive:c}=a,d=`#${o} .b-blocks-stackedCardsMainWrapper .bBlocksStackedSingleCard`,u=`${d} .bBlocksContainer .bBlocksContainerContent`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${d}{\n\t\t\t${i?"":na("top",s.stickyTop+"px")}\n\t\t\t${i?"":na("position",c.desktop?"unset":"sticky")}\n\t\t\t${c.desktop?"transform: scale(1) !important;":""}\n\n\t\t}\n\t\t${d}:last-child{\n\t\t\t${na("margin-bottom","0px")}\n\t\t}\n\t\t${u}{\n\t\t\t${i?"":na("height",s.desktop.height)}\n\t\t}\n\t\t${t}{\n\t\t\t${d}{\n\t\t\t\t${i?"":na("position",c.tablet?"unset":"sticky")}\n\t\t\t\t${c.tablet?"transform: scale(1) !important;":""}\n\t\t\t}\n\t\t\t${u}{\n\t\t\t\t${i?"":na("height",s.tablet.height)}\n\t\t\t}\n\t\t}\n\n\t\t${n}{\n\t\t\t${d}{\n\t\t\t\t${i?"":na("position",c.mobile?"unset":"sticky")}\n\t\t\t\t${c.desktop?"transform: scale(1) !important;":""}\n\t\t\t}\n\t\t\t${u}{\n\t\t\t\t${i?"":na("height",s.mobile.height)}\n\t\t\t}\n\t\t}\n\n\t\t${Ca(o,r,i)}\n\t`}})},YD=["rgba(230, 244, 255, 1)","rgba(230, 227, 255, 1)","rgba(230, 252, 255, 1)"].map(((e,t)=>["b-blocks/container",{advanced:{dimension:{padding:{desktop:{top:"45px",right:"45px",bottom:"45px",left:"45px"}}},background:{normal:{type:"color",color:e}},borderShadow:{normal:{radius:{top:"15px",right:"15px",bottom:"15px",left:"15px"}}}},className:"bBlocksStackedSingleCard"},[["b-blocks/section-heading",{textAlign:"center",title:`Card Item #${t+1}`,titleTypo:{fontSize:{desktop:"40px",tablet:"",mobile:""},fontWeight:600},titleMargin:{side:4,bottom:"20px"},isSep:!1,desc:"Insert your own content to showcase or highlight<br> the feature you want to represent. Add any <br>blocks you want to customize it as per<br> your preference.",descTypo:{fontSize:{desktop:"20px"},fontWeight:500,fontVariant:"500"},descColor:"rgba(0, 0, 0, 1)"}]]])),KD=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,[s,a]=(0,m.useState)(0),r=fe(t,n),c=(0,h.useInnerBlocksProps)({className:"b-blocksStackedCards"},{template:YD,templateLock:!1,renderAppender:!1});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(VD,{attributes:t,setAttributes:n,updateObj:r,activeIndex:s,setActiveIndex:a,clientId:o,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0, |
| 544 |
l.jsx)(qD,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:"b-blocks-stackedCardsMainWrapper",children:(0,l.jsx)("div",{className:"b-blocksStackedCardsWrapper",...c})})})]})]})}));Nl(WD.name)&&(0,p.registerBlockType)(WD,{icon:cl,edit:KD,save:h.InnerBlocks.Content});const QD=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/stat-cards","title":"Stat Cards","category":"bBlocks","description":"Display a static, responsive grid of impact stat cards — a big number with prefix/suffix, label, optional trend badge, description, and per-card link. No JavaScript.","keywords":["stats","statistics","kpi","numbers","metrics","counter","impact"],"textdomain":"b-blocks","attributes":{"layout":{"type":"object","default":{"align":"center","columnGap":{"desktop":"24px","tablet":"24px","mobile":"24px"},"rowGap":{"desktop":"24px","tablet":"24px","mobile":"24px"},"columns":{"desktop":3,"tablet":2,"mobile":1}}},"card":{"type":"object","default":{"style":"flat","orientation":"vertical","shadow":[],"accentColor":"#146EF5","accentWidth":4,"bg":{"type":"solid","color":""},"border":{"color":"#e2e8f0","style":"solid","width":"1px"},"borderRadius":{"desktop":{"top":"12px","right":"12px","bottom":"12px","left":"12px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"28px","right":"24px","bottom":"28px","left":"24px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"number":{"type":"object","default":{"color":"#111827","typography":{"fontSize":{"desktop":"48px","tablet":"40px","mobile":"32px"},"fontWeight":700},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"label":{"type":"object","default":{"color":"#374151","typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":400},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"description":{"type":"object","default":{"show":true,"color":"#6B7280","typography":{"fontSize":{"desktop":"14px","tablet":"","mobile":""}},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"icon":{"type":"object","default":{"show":true,"color":"#146EF5","size":"32px","bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"trend":{"type":"object","default":{"show":true}},"items":{"type":"array","default":[{"icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z\\"/></svg>","orientation":"","number":"500","prefix":"","suffix":"+","label":"Customers","description":"","trendValue":"","trendDirection":"up","trendColor":"","linkUrl":"","linkTarget":false},{"icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z\\"/></svg>","orientation":"","number":"98","prefix":"","suffix":"%","label":"Satisfaction","description":"","trendValue":"","trendDirection":"up","trendColor":"","linkUrl":"","linkTarget":false},{"icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z\\"/></svg>","orientation":"","number":"4.9","prefix":"","suffix":"","label":"Average Rating","description":"","trendValue":"","trendDirection":"up","trendColor":"","linkUrl":"","linkTarget":false}]},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),ZD=(e,t)=>Number.isFinite(parseInt(e,10))?parseInt(e,10):t,XD=(e={})=>`\n\t${oa(e.bg)}\n\t${sa(e.border)}\n\t${na("border-radius",ha(e.borderRadius))}\n\t${na("padding",ha(e.padding))}\n\t${na("margin",ha(e.margin))}\n`,JD=({attributes:e,id:o,isBackend:i=!1})=>{ |
| 545 |
const{layout:s={},card:a={},number:r={},label:c={},description:d={},icon:u={},advanced:p}=e,h=s.columns||{},g=s.columnGap||{},m=s.rowGap||{},b=["left","center","right"].includes(s.align)?s.align:"center",f="left"===b?"flex-start":"right"===b?"flex-end":"center",x=a.style||"flat",y="outlined"===x||"accent-top"===x,v=a.padding||{},k=a.borderRadius||{},w=a.margin||{},_=r.typography||{},C=_.fontSize?.tablet,j=_.fontSize?.mobile,$=`#${o} .bBlocks-stat-cards-wrapper`,S=`${$} .bBlocks-stat-cards-grid`,T=`${$} .bBlocks-stat-cards-item`,M=`${$} .bBlocks-stat-cards-icon`,N=`${$} .bBlocks-stat-cards-number`,L=`${$} .bBlocks-stat-cards-label`,E=`${$} .bBlocks-stat-cards-desc`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${pa("",_).googleFontLink}\n\t\t\t${pa("",c.typography).googleFontLink}\n\t\t\t${pa("",d.typography).googleFontLink}\n\t\t\t${S}{\n\t\t\t\tgrid-template-columns: repeat(${ZD(h.desktop,3)}, minmax(0, 1fr));\n\t\t\t\tcolumn-gap: ${g.desktop||"24px"};\n\t\t\t\trow-gap: ${m.desktop||"24px"};\n\t\t\t}\n\t\t\t${T}{\n\t\t\t\talign-items: ${f};\n\t\t\t\ttext-align: ${b};\n\t\t\t\t${na("padding",ha(v.desktop))}\n\t\t\t\t${na("margin",ha(w.desktop))}\n\t\t\t\t${na("border-radius",ha(k.desktop))}\n\t\t\t\t${oa(a.bg)}\n\t\t\t\t${na("box-shadow",la(a.shadow))}\n\t\t\t\t${y?sa(a.border):""}\n\t\t\t\t${"accent-top"===x?`border-top: ${ZD(a.accentWidth,4)}px solid ${a.accentColor};`:""}\n\t\t\t}\n\t\t\t${M}{\n\t\t\t\t${na("color",u.color)}\n\t\t\t\tfont-size: ${u.size};\n\t\t\t\t${XD(u)}\n\t\t\t}\n\t\t\t${pa(N,_).styles}\n\t\t\t${N}{\n\t\t\t\t${na("color",r.color)}\n\t\t\t\tjustify-content: ${f};\n\t\t\t\t${XD(r)}\n\t\t\t}\n\t\t\t${pa(L,c.typography).styles}\n\t\t\t${L}{\n\t\t\t\t${na("color",c.color)}\n\t\t\t\t${XD(c)}\n\t\t\t}\n\t\t\t${pa(E,d.typography).styles}\n\t\t\t${E}{\n\t\t\t\t${na("color",d.color)}\n\t\t\t\t${XD(d)}\n\t\t\t}\n\t\t\t${t}{\n\t\t\t\t${S}{\n\t\t\t\t\tgrid-template-columns: repeat(${ZD(h.tablet,2)}, minmax(0, 1fr));\n\t\t\t\t\tcolumn-gap: ${g.tablet||g.desktop||"24px"};\n\t\t\t\t\trow-gap: ${m.tablet||m.desktop||"24px"};\n\t\t\t\t}\n\t\t\t\t${T}{\n\t\t\t\t\t${na("padding",ha(v.tablet))}\n\t\t\t\t\t${na("margin",ha(w.tablet))}\n\t\t\t\t\t${na("border-radius",ha(k.tablet))}\n\t\t\t\t}\n\t\t\t\t${C?`${N}{ font-size: ${C}; }`:""}\n\t\t\t}\n\t\t\t${n}{\n\t\t\t\t${S}{\n\t\t\t\t\tgrid-template-columns: repeat(${ZD(h.mobile,1)}, minmax(0, 1fr));\n\t\t\t\t\tcolumn-gap: ${g.mobile||g.tablet||g.desktop||"24px"};\n\t\t\t\t\trow-gap: ${m.mobile||m.tablet||m.desktop||"24px"};\n\t\t\t\t}\n\t\t\t\t${T}{\n\t\t\t\t\t${na("padding",ha(v.mobile))}\n\t\t\t\t\t${na("margin",ha(w.mobile))}\n\t\t\t\t\t${na("border-radius",ha(k.mobile))}\n\t\t\t\t}\n\t\t\t\t${j?`${N}{ font-size: ${j}; }`:""}\n\t\t\t}\n\t\t\t${_a(o,p,i,!1)}\n\t\t\t`}})},eF=({direction:e})=>{let t="M18 15l-6-6-6 6";return"down"===e?t="M6 9l6 6 6-6":"neutral"===e&&(t="M5 12h14"),(0,l.jsx)("svg",{className:"bBlocks-stat-cards-trend-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:t,fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})},tF=["left","center","right"],nF=["flat","outlined","accent-top"],oF=({attributes:e})=>{const{layout:t={},card:n={},icon:o={},description:i={},trend:s={},items:a=[]}=e,r=tF.includes(t.align)?t.align:"center",c=nF.includes(n.style)?n.style:"flat",d=n.orientation||"vertical",u=!1!==o.show,p=!1!==i.show,h=!1!==s.show,g=(Array.isArray(a)?a:[]).filter((e=>{const t=e||{};return t.number||t.label||t.prefix||t.suffix||""})),m=["bBlocks-stat-cards-wrapper",`bBlocks-stat-cards-style-${c}`,`bBlocks-stat-cards-align-${r}`].join(" ");return 0===g.length?(0,l.jsx)("div",{className:m,children:(0,l.jsx)("p",{className:"bBlocks-stat-cards-empty",children:(0,x.__)("Add stat cards from the block settings.","b-blocks")})}):(0,l.jsx)("div",{className:m,children:(0,l.jsx)("dl",{className:"bBlocks-stat-cards-grid","aria-label":(0,x.__)("Key statistics","b-blocks"),children:g.map(((e,t)=>{const n=e||{},o=`${n.prefix||""}${n.number||""}${n.suffix||""}`,i=h&&n.trendValue,s=n.trendDirection||"up",a=n.trendColor?{backgroundColor:n.trendColor,color:"#ffffff"}:void 0,r=n.label?(0,x.sprintf)(/* translators: 1: label, 2: value */ /* translators: 1: label, 2: value */(0,x.__)("%1$s: %2$s","b-blocks"),n.label,o):o,c=(0,l.jsxs)(l.Fragment,{children:[n.prefix&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-prefix",children:n.prefix}),(0,l.jsx)("span",{className:"bBlocks-stat-cards-value",children:n.number}),n.suffix&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-suffix",children:n.suffix})]}),g=n.orientation||d;return(0,l.jsxs)("div",{className:`bBlocks-stat-cards-item bBlocks-stat-cards-item-${g}`,children:[u&&n.icon&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:n.icon}}),n.linkUrl?(0,l.jsxs)("a",{className:"bBlocks-stat-cards-link",href:n.linkUrl,"aria-label":r,...n.linkTarget?{target:"_blank",rel:"noopener noreferrer"}:{},children:[""!==o&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-number",children:c}),n.label&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-label",children:n.label})]}):(0,l.jsxs)(l.Fragment,{children:[""!==o&&(0,l.jsx)("dd",{className:"bBlocks-stat-cards-number",children:c}),n.label&&(0,l.jsx)("dt",{className:"bBlocks-stat-cards-label",children:n.label})]}),i&&(0,l.jsxs)("span",{className:`bBlocks-stat-cards-trend bBlocks-stat-cards-trend-${s}`,style:a,"aria-label":(0,x.sprintf)(/* translators: 1: direction, 2: value */ /* translators: 1: direction, 2: value */(0,x.__)("Trend: %1$s %2$s","b-blocks"),s,n.trendValue),children:[(0,l.jsx)(eF,{direction:s}),(0,l.jsx)("span",{className:"bBlocks-stat-cards-trend-text",children:n.trendValue})]}),p&&n.description&&(0,l.jsx)("p",{className:"bBlocks-stat-cards-desc",children:n.description})]},n._key||t)}))})})},iF=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],sF=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],aF=[{label:(0,x.__)("Flat","b-blocks"),value:"flat"},{label:(0,x.__)("Outlined","b-blocks"),value:"outlined"},{label:(0,x.__)("Accent top","b-blocks"),value:"accent-top"}],rF=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],lF=((0,x.__)("Normal","b-blocks"),(0,x.__)("Medium","b-blocks"),(0,x.__)("Semi-bold","b-blocks"),(0,x.__)("Bold","b-blocks"),(0,x.__)("Extra-bold","b-blocks"),(0,x.__)("Black","b-blocks"),[{label:(0,x.__)("Vertical","b-blocks"),value:"vertical"},{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal"}]),cF=[{label:(0,x.__)("Default (inherit)","b-blocks"),value:""},...lF],dF=[{label:(0,x.__)("Up","b-blocks"),value:"up"},{label:(0,x.__)("Down","b-blocks"),value:"down"},{label:(0,x.__)("Neutral","b-blocks"),value:"neutral"}],uF=e=>{const{attributes:t,updateObj:n,index:o}=e,i=t.items[o]||{},s=(e,t)=>n("items",t,o,e);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:i.icon,onChange:e=>s("icon",e)}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Orientation:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i.orientation||"",options:cF,onChange:e=>s("orientation",e)})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(y.FlexItem,{children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Prefix","b-blocks"),value:i.prefix||"",onChange:e=>s("prefix",e),placeholder:"$",__nextHasNoMarginBottom:!0})}),(0,l.jsx)(y.FlexItem,{children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Number","b-blocks"),value:i.number||"",onChange:e=>s("number",e),placeholder:"500",__nextHasNoMarginBottom:!0})}),(0,l.jsx)(y.FlexItem,{children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Suffix","b-blocks"),value:i.suffix||"", |
| 546 |
onChange:e=>s("suffix",e),placeholder:"+",__nextHasNoMarginBottom:!0})})]}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Label","b-blocks"),value:i.label||"",onChange:e=>s("label",e),placeholder:(0,x.__)("e.g. Customers","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Description","b-blocks"),value:i.description||"",onChange:e=>s("description",e),help:(0,x.__)("Optional one-line supporting text.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Trend value","b-blocks"),value:i.trendValue||"",onChange:e=>s("trendValue",e),placeholder:(0,x.__)("e.g. 34%","b-blocks"),help:(0,x.__)("Leave blank to hide the trend badge.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Trend direction:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i.trendDirection||"up",options:dF,onChange:e=>s("trendDirection",e)})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Trend color override:","b-blocks"),value:i.trendColor||"",onChange:e=>s("trendColor",e)}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Link URL","b-blocks"),type:"url",value:i.linkUrl||"",onChange:e=>s("linkUrl",e),placeholder:"https://",__nextHasNoMarginBottom:!0}),i.linkUrl&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Open link in new tab","b-blocks"),checked:!!i.linkTarget,onChange:e=>s("linkTarget",e)})]})},pF={desktop:3,tablet:2,mobile:1},hF=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{layout:i={},card:s={},icon:a={},description:r={},trend:c={}}=e,d=i.columns||{},u=i.columnGap||{},p=i.rowGap||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Card alignment:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.align||"center",onChange:e=>n("layout",e||"center","align"),children:rF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Card orientation:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s.orientation||"vertical",onChange:e=>n("card",e||"vertical","orientation"),children:lF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Columns","b-blocks")," ",(0,l.jsx)(_,{})]}),value:parseInt(d[o],10)||pF[o],onChange:e=>n("layout",e,"columns",o),min:1,max:6,step:1}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Column Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:iF,isUnitSelectTabbable:!0,value:u[o],onChange:e=>n("layout",e,"columnGap",o)}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Row Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:iF,isUnitSelectTabbable:!0,value:p[o],onChange:e=>n("layout",e,"rowGap",o)})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Icon","b-blocks"),checked:!1!==a.show,onChange:e=>n("icon",e,"show")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Description","b-blocks"),checked:!1!==r.show,onChange:e=>n("description",e,"show")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Trend Badge","b-blocks"),checked:!1!==c.show,onChange:e=>n("trend",e,"show")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Stat cards","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_s,{attributes:e,setAttributes:t,updateObj:n,newItem:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path d="M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z"/></svg>',orientation:"",number:"",prefix:"",suffix:"",label:"",description:"",trendValue:"",trendDirection:"up",trendColor:"",linkUrl:"",linkTarget:!1},design:"sortable",itemLabel:"Stat",arrKey:"items",title:"label",ItemSettings:uF})})]})},gF={top:"",right:"",bottom:"",left:""},mF=({attrKey:e,value:t={},updateObj:n})=>{const{bg:o={},border:i={},borderRadius:s={},padding:a={},margin:r={}}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:o,onChange:t=>n(e,t,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:i,onChange:t=>n(e,t||{},"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),units:iF,values:s,resetValues:gF,onChange:t=>n(e,t,"borderRadius")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Padding","b-blocks"),units:iF,values:a,resetValues:gF,onChange:t=>n(e,t,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Margin","b-blocks"),units:iF,values:r,resetValues:gF,onChange:t=>n(e,t,"margin")})]})},bF=({attributes:e,updateObj:t,device:n="desktop"})=>{const{card:o={},number:i={},label:s={},description:a={},icon:r={}}=e,c=o.style||"flat",d="outlined"===c||"accent-top"===c,u=o.borderRadius||{},p=o.padding||{},h=o.margin||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Card","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Card style:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:c,options:aF,onChange:e=>t("card",e,"style")})]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:o.bg,onChange:e=>t("card",e,"bg")}),"accent-top"===c&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Accent line height (px)","b-blocks"),value:o.accentWidth??4,onChange:e=>t("card",e,"accentWidth"),min:2,max:12,step:1}),d&&(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("card",e||{},"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:iF,values:u[n],resetValues:gF,onChange:e=>t("card",e,"borderRadius",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:iF,values:p[n],resetValues:gF,onChange:e=>t("card",e,"padding",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:iF,values:h[n],resetValues:gF,onChange:e=>t("card",e,"margin",n)}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Shadow:","b-blocks"),value:o.shadow||[],onChange:e=>t("card",e,"shadow")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Number","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:i.color||"#111827",onChange:e=>t("number",e,"color"),defaultColor:"#111827"}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typography,onChange:e=>t("number",e,"typography")}),(0,l.jsx)(mF,{attrKey:"number",value:i,updateObj:t})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Label","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0, |
| 547 |
x.__)("Color:","b-blocks"),value:s.color||"#374151",onChange:e=>t("label",e,"color"),defaultColor:"#374151"}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:s.typography,onChange:e=>t("label",e,"typography")}),(0,l.jsx)(mF,{attrKey:"label",value:s,updateObj:t})]}),!1!==a.show&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:a.color||"#6B7280",onChange:e=>t("description",e,"color"),defaultColor:"#6B7280"}),(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:a.typography,onChange:e=>t("description",e,"typography")}),(0,l.jsx)(mF,{attrKey:"description",value:a,updateObj:t})]}),!1!==r.show&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r.color||"#146EF5",onChange:e=>t("icon",e,"color"),defaultColor:"#146EF5"}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:iF,isUnitSelectTabbable:!0,value:r.size||"32px",onChange:e=>t("icon",e,"size")})]}),(0,l.jsx)(mF,{attrKey:"icon",value:r,updateObj:t})]})]})},fF=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:sF,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(hF,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(bF,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})},xF=["left","center","right"],yF=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{layout:s={}}=t,a=bBlocksPremiumChecker,r=fe(t,n),c=xF.includes(s.align)?s.align:"center";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:c,onChange:e=>r("layout",e||"center","align"),alignmentControls:[{icon:"editor-alignleft",title:(0,x.__)("Align left","b-blocks"),align:"left"},{icon:"editor-aligncenter",title:(0,x.__)("Align center","b-blocks"),align:"center"},{icon:"editor-alignright",title:(0,x.__)("Align right","b-blocks"),align:"right"}]})}),(0,l.jsx)(fF,{attributes:t,setAttributes:n,updateObj:r,isPremium:a,device:i}),(0,l.jsx)("div",{...(0,h.useBlockProps)(),children:(0,l.jsxs)("div",{children:[(0,l.jsx)(JD,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)(oF,{attributes:t})]})})]})}));Nl(QD.name)&&(0,p.registerBlockType)(QD,{icon:_l,edit:yF,save:()=>null}) |
| 548 |
;const vF=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/svg-draw","version":"1.0.0","title":"SVG Draw","category":"bBlocks","description":"Add animated SVG drawings to your content with customizable paths, timing, and effects.","keywords":["svg","draw","icon","draw svg","animated icon"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"icon":{"type":"object","default":{"upload":"","library":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 448 512\\"><path d=\\"M103.3 344.3c-6.5-14.2-6.9-18.3 7.4-23.1 25.6-8 8 9.2 43.2 49.2h.3v-93.9c1.2-50.2 44-92.2 97.7-92.2 53.9 0 97.7 43.5 97.7 96.8 0 63.4-60.8 113.2-128.5 93.3-10.5-4.2-2.1-31.7 8.5-28.6 53 0 89.4-10.1 89.4-64.4 0-61-77.1-89.6-116.9-44.6-23.5 26.4-17.6 42.1-17.6 157.6 50.7 31 118.3 22 160.4-20.1 24.8-24.8 38.5-58 38.5-93 0-35.2-13.8-68.2-38.8-93.3-24.8-24.8-57.8-38.5-93.3-38.5s-68.8 13.8-93.5 38.5c-.3.3-16 16.5-21.2 23.9l-.5.6c-3.3 4.7-6.3 9.1-20.1 6.1-6.9-1.7-14.3-5.8-14.3-11.8V20c0-5 3.9-10.5 10.5-10.5h241.3c8.3 0 8.3 11.6 8.3 15.1 0 3.9 0 15.1-8.3 15.1H130.3v132.9h.3c104.2-109.8 282.8-36 282.8 108.9 0 178.1-244.8 220.3-310.1 62.8zm63.3-260.8c-.5 4.2 4.6 24.5 14.6 20.6C306 56.6 384 144.5 390.6 144.5c4.8 0 22.8-15.3 14.3-22.8-93.2-89-234.5-57-238.3-38.2zM393 414.7C283 524.6 94 475.5 61 310.5c0-12.2-30.4-7.4-28.9 3.3 24 173.4 246 256.9 381.6 121.3 6.9-7.8-12.6-28.4-20.7-20.4zM213.6 306.6c0 4 4.3 7.3 5.5 8.5 3 3 6.1 4.4 8.5 4.4 3.8 0 2.6.2 22.3-19.5 19.6 19.3 19.1 19.5 22.3 19.5 5.4 0 18.5-10.4 10.7-18.2L265.6 284l18.2-18.2c6.3-6.8-10.1-21.8-16.2-15.7L249.7 268c-18.6-18.8-18.4-19.5-21.5-19.5-5 0-18 11.7-12.4 17.3L234 284c-18.1 17.9-20.4 19.2-20.4 22.6z\\" stroke-dasharray=\\"5371.4248046875\\" style=\\"stroke-dashoffset: 699.897px;\\"></path></svg>","custom":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 448 512\\"><path d=\\"M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z\\"/></svg>","type":{"svgType":"icon","iconType":"library"}}},"options":{"type":"object","default":{"duration":3000,"repeat":true,"direction":"normal","delay":250,"easing":"linear"}},"style":{"type":"object","default":{"height":"200px","width":"200px","align":"center","strokeWidth":2,"colors":{"normal":{"strokeColor":"#146EF5","fill":"#0000","shadow":{"color":"#000"}},"hover":{"strokeColor":"","fill":"","shadow":{"color":"#000"},"transition":200}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos","wp-util","wp-api"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),kF=({attributes:e,id:t,isBackend:n=!1})=>{const{style:o,advanced:i}=e,{height:s,width:a,align:r,margin:c,padding:d,background:u,border:p,borderRadius:h,colors:g}=o,{normal:m,hover:b}=g,f=`#${t} .svdr-icon-draw-wrapper`,x=`${f} .svdr-svg-wrapper`,y=`${x} svg`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${f}{\n\t\t\t\t${na("justify-content",r)}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${na("height",s)}\n\t\t\t\t${na("width",a)}\n\t\t\t\t${na("margin",ha(c))}\n\t\t\t\t${na("padding",ha(d))}\n\t\t\t\t${oa(u)}\n\t\t\t\t${sa(p)}\n\t\t\t\t${na("border-radius",ha(h))}\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${na("fill",m.fill)}\n\t\t\t\t${na("stroke",m.strokeColor)}\n\t\t\t\tfilter:drop-shadow(${da(m.shadow,"text")});\n\t\t\t\ttransition:${b.transition}ms ease-in-out;\n\t\t\t}\n\t\t\t${y}:hover{\n\t\t\t\t${na("fill",b.fill)}\n\t\t\t\t${na("stroke",b.strokeColor)}\n\t\t\t\tfilter:drop-shadow(${da(b.shadow,"text")});\n\t\t\t}\n\t\t\t${Ca(t,i,n)}\n\t`}})},wF=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],_F=[{name:"normal",title:(0,x.__)("Normal","b-blocks")},{name:"hover",title:(0,x.__)("Hover","b-blocks")}],CF=["easeInSine","easeInExpo","easeInCirc","easeInBack","easeInElastic","easeOutQuad","easeOutCubic","easeOutQuart","easeOutQuint","easeOutSine","easeOutExpo","easeOutCirc","easeOutBack","easeOutElastic","easeInOutQuad","easeInOutCubic","easeInOutQuart","easeInOutQuint","easeInOutSine","easeInOutExpo","easeInOutCirc","easeInCubic","easeInQuart","easeInQuint"],jF=[{label:"Linear",value:"linear"},{label:"EaseInOutElastic",value:"easeInOutElastic"},{label:"EaseInQuad",value:"easeInQuad"},{label:"EaseInQuart",value:"easeInQuart"},{label:"EaseInSine",value:"easeInSine"},{label:"EaseInExpo",value:"easeInExpo"},{label:"EaseInCirc",value:"easeInCirc"},{label:"EaseInBack",value:"easeInBack"},{label:"EaseInElastic",value:"easeInElastic"},{label:"EaseOutQuad",value:"easeOutQuad"},{label:"EaseOutCubic",value:"easeOutCubic"},{label:"EaseOutQuart",value:"easeOutQuart"},{label:"EaseOutQuint",value:"easeOutQuint"},{label:"EaseOutSine",value:"easeOutSine"},{label:"EaseOutExpo",value:"easeOutExpo"},{label:"EaseOutCirc",value:"easeOutCirc"},{label:"EaseOutBack",value:"easeOutBack"},{label:"EaseOutElastic",value:"easeOutElastic"},{label:"EaseInOutQuad",value:"easeInOutQuad"},{label:"EaseInOutCubic",value:"easeInOutCubic"},{label:"EaseInOutQuart",value:"easeInOutQuart"},{label:"EaseInOutQuint",value:"easeInOutQuint"},{label:"EaseInOutSine",value:"easeInOutSine"},{label:"EaseInOutExpo",value:"easeInOutExpo"},{label:"EaseInOutCirc",value:"easeInOutCirc"},{label:"EaseInCubic",value:"easeInCubic"},{label:"EaseInQuart",value:"easeInQuart"},{ |
| 549 |
label:"EaseInQuint",value:"easeInQuint"}];function $F(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})})}function SF(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})})}function TF(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})})}const MF=' <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M0 336c0 79.5 64.5 144 144 144l368 0c70.7 0 128-57.3 128-128c0-61.9-44-113.6-102.4-125.4c4.1-10.7 6.4-22.4 6.4-34.6c0-53-43-96-96-96c-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32C167.6 32 96 103.6 96 192c0 2.7 .1 5.4 .2 8.1C40.2 219.8 0 273.2 0 336z"/></svg>',NF=e=>{const{attributes:t,setAttributes:n,isPremium:o,setIsProModalOpen:i}=e,{icon:s,options:a}=t,{data:r}=Cd("bBlocksUtils"),{refetch:c}=_d("b-blocks-enable-svg-mime-type",{_wpnonce:r?.nonce},!1),d=new Tt;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("SVG Type","b-blocks"),labelPosition:"left",options:[{label:"Icon",value:"icon"},{label:"Custom SVG",value:"custom"}],value:s.type.svgType,onChange:e=>n({icon:be(s,e,"type","svgType")})}),"custom"===s.type.svgType&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TextareaControl,{value:s.custom,onChange:e=>n({icon:be(s,e,"custom")}),rows:8})}),"icon"===s.type.svgType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{label:(0,x.__)("Icon Type","b-blocks"),options:[{label:"Upload "+(o?"":"(Pro)"),value:"upload"},{label:"Library",value:"library"}],value:s.type.iconType,onChange:e=>{o?n({icon:be(s,e,"type","iconType")}):i(!0)}}),"upload"===s.type.iconType&&(0,l.jsx)(we,{types:["image/svg+xml"],onClick:async()=>{jd(),await c()},label:(0,x.__)("Upload SVG","b-blocks"),value:{url:s.upload},default:MF,onChange:async e=>{const t=e?.url?await d.sanitizeFile(e?.url):"";n({icon:be(s,t,"upload")})},isSvgEnabled:!0}),"library"===s.type.iconType&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:s.library,onChange:e=>n({icon:be(s,e,"library")})})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Fill Duration","b-blocks"),labelPosition:"edge",value:a.duration,onChange:e=>n({options:be(a,e,"duration")})}),(0,l.jsx)("small",{children:"Duration on SVG files (in ms)"}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Delay","b-blocks"),labelPosition:"edge",value:a.delay,onChange:e=>n({options:be(a,e,"delay")})}),(0,l.jsx)("small",{children:"Duration on SVG draws (in ms)"}),(0,l.jsx)(y.SelectControl,{className:"mt10 mb10",label:(0,x.__)("Direction","b-blocks"),labelPosition:"edge",options:[{label:"Normal",value:"normal"},{label:"Reverse",value:"reverse"},{label:"Alternate",value:"alternate"}],value:a.direction,onChange:e=>n({options:be(a,e,"direction")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Repeat Drawing","b-blocks"),checked:a.repeat,value:a.repeat,onChange:e=>n({options:be(a,e,"repeat")})}),(0,l.jsx)(Zs,{className:"mt10",label:(0,x.__)("Animation Easing","b-blocks"),labelPosition:"edge",options:jF,value:a.easing,onChange:e=>n({options:be(a,e,"easing")}),isPremium:o,proValues:CF,setIsProModalOpen:i})]})]})},LF=e=>{const{attributes:t,setAttributes:n}=e,{style:o}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height","b-blocks"),labelPosition:"edge",value:t.style.height,onChange:e=>n({style:be(t.style,e,"height")})}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width","b-blocks"),labelPosition:"edge",className:"mt10",value:t.style.width,onChange:e=>n({style:be(t.style,e,"width")})}),(0,l.jsx)(Tn,{label:(0,x.__)("Alignment","b-blocks"),className:"mt10",options:[{label:"Left",value:"left",icon:(0,l.jsx)($F,{})},{label:"Center",value:"center",icon:(0,l.jsx)(SF,{})},{label:"Right",value:"right",icon:(0,l.jsx)(TF,{})}],value:o.align,onChange:e=>n({style:be(o,e,"align")}),isIcon:!0}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Path Thickness","b-blocks"),className:"mt10",value:o.strokeWidth,onChange:e=>n({style:be(o,e,"strokeWidth")}),step:.1,min:0,max:100}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:_F,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Stroke Color","b-blocks"),value:o.colors[e.name].strokeColor,onChange:t=>n({style:be(o,t,"colors",e.name,"strokeColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Fill Color","b-blocks"),value:o.colors[e.name].fill,onChange:t=>n({style:be(o,t,"colors",e.name,"fill")})}),(0,l.jsx)(nd,{label:(0,x.__)("Shadow","b-blocks"),value:o.colors[e.name].shadow,onChange:t=>n({style:be(o,t,"colors",e.name,"shadow")}),type:"text"}),"hover"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition (ms)","b-blocks"),value:o.colors.hover.transition,step:50,max:1e4,onChange:e=>n({style:be(o,e,"colors","hover","transition")})})})]})})]})})},EF=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,[s,a]=(0,m.useState)(!1),r={isProModalOpen:s,setIsProModalOpen:a,...e};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Rs,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:wF,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(NF,{...r})}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(LF,{...r})}),"advanced"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]}),(0,l.jsxs)(jn,{isProModalOpen:s,setIsProModalOpen:a,block:"SVG Draw",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("SVG Upload: ","b-blocks")}),(0,x.__)("Upload custom SVG files from your device.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Animation Easing: ","b-blocks")}),(0,x.__)("Advanced easing families (Quart, Quint, Elastic, Back, Circ, Expo, Bounce, and many variations) that create richer, more natural or stylized motion.","b-blocks")]})]})]})};var PF={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},AF={duration:1e3,delay:0,endDelay:0, |
| 550 |
easing:"easeOutElastic(1, .5)",round:0},BF=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],IF={CSS:{},springs:{}};function OF(e,t,n){return Math.min(Math.max(e,t),n)}function RF(e,t){return e.indexOf(t)>-1}function zF(e,t){return e.apply(null,t)}var DF={arr:function(e){return Array.isArray(e)},obj:function(e){return RF(Object.prototype.toString.call(e),"Object")},pth:function(e){return DF.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||DF.svg(e)},str:function(e){return"string"==typeof e},fnc:function(e){return"function"==typeof e},und:function(e){return void 0===e},nil:function(e){return DF.und(e)||null===e},hex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},rgb:function(e){return/^rgb/.test(e)},hsl:function(e){return/^hsl/.test(e)},col:function(e){return DF.hex(e)||DF.rgb(e)||DF.hsl(e)},key:function(e){return!PF.hasOwnProperty(e)&&!AF.hasOwnProperty(e)&&"targets"!==e&&"keyframes"!==e}};function FF(e){var t=/\(([^)]+)\)/.exec(e);return t?t[1].split(",").map((function(e){return parseFloat(e)})):[]}function HF(e,t){var n=FF(e),o=OF(DF.und(n[0])?1:n[0],.1,100),i=OF(DF.und(n[1])?100:n[1],.1,100),s=OF(DF.und(n[2])?10:n[2],.1,100),a=OF(DF.und(n[3])?0:n[3],.1,100),r=Math.sqrt(i/o),l=s/(2*Math.sqrt(i*o)),c=l<1?r*Math.sqrt(1-l*l):0,d=l<1?(l*r-a)/c:-a+r;function u(e){var n=t?t*e/1e3:e;return n=l<1?Math.exp(-n*l*r)*(1*Math.cos(c*n)+d*Math.sin(c*n)):(1+d*n)*Math.exp(-n*r),0===e||1===e?e:1-n}return t?u:function(){var t=IF.springs[e];if(t)return t;for(var n=1/6,o=0,i=0;;)if(1===u(o+=n)){if(++i>=16)break}else i=0;var s=o*n*1e3;return IF.springs[e]=s,s}}function WF(e){return void 0===e&&(e=10),function(t){return Math.ceil(OF(t,1e-6,1)*e)*(1/e)}}var UF,GF,VF=function(){var e=.1;function t(e,t){return 1-3*t+3*e}function n(e,t){return 3*t-6*e}function o(e){return 3*e}function i(e,i,s){return((t(i,s)*e+n(i,s))*e+o(i))*e}function s(e,i,s){return 3*t(i,s)*e*e+2*n(i,s)*e+o(i)}return function(t,n,o,a){if(0<=t&&t<=1&&0<=o&&o<=1){var r=new Float32Array(11);if(t!==n||o!==a)for(var l=0;l<11;++l)r[l]=i(l*e,t,o);return function(l){return t===n&&o===a||0===l||1===l?l:i(function(n){for(var a=0,l=1;10!==l&&r[l]<=n;++l)a+=e;--l;var c=a+(n-r[l])/(r[l+1]-r[l])*e,d=s(c,t,o);return d>=.001?function(e,t,n,o){for(var a=0;a<4;++a){var r=s(t,n,o);if(0===r)return t;t-=(i(t,n,o)-e)/r}return t}(n,c,t,o):0===d?c:function(e,t,n,o,s){var a,r,l=0;do{(a=i(r=t+(n-t)/2,o,s)-e)>0?n=r:t=r}while(Math.abs(a)>1e-7&&++l<10);return r}(n,a,a+e,t,o)}(l),n,a)}}}}(),qF=(UF={linear:function(){return function(e){return e}}},GF={Sine:function(){return function(e){return 1-Math.cos(e*Math.PI/2)}},Expo:function(){return function(e){return e?Math.pow(2,10*e-10):0}},Circ:function(){return function(e){return 1-Math.sqrt(1-e*e)}},Back:function(){return function(e){return e*e*(3*e-2)}},Bounce:function(){return function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}},Elastic:function(e,t){void 0===e&&(e=1),void 0===t&&(t=.5);var n=OF(e,1,10),o=OF(t,.1,2);return function(e){return 0===e||1===e?e:-n*Math.pow(2,10*(e-1))*Math.sin((e-1-o/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/o)}}},["Quad","Cubic","Quart","Quint"].forEach((function(e,t){GF[e]=function(){return function(e){return Math.pow(e,t+2)}}})),Object.keys(GF).forEach((function(e){var t=GF[e];UF["easeIn"+e]=t,UF["easeOut"+e]=function(e,n){return function(o){return 1-t(e,n)(1-o)}},UF["easeInOut"+e]=function(e,n){return function(o){return o<.5?t(e,n)(2*o)/2:1-t(e,n)(-2*o+2)/2}},UF["easeOutIn"+e]=function(e,n){return function(o){return o<.5?(1-t(e,n)(1-2*o))/2:(t(e,n)(2*o-1)+1)/2}}})),UF);function YF(e,t){if(DF.fnc(e))return e;var n=e.split("(")[0],o=qF[n],i=FF(e);switch(n){case"spring":return HF(e,t);case"cubicBezier":return zF(VF,i);case"steps":return zF(WF,i);default:return zF(o,i)}}function KF(e){try{return document.querySelectorAll(e)}catch(e){return}}function QF(e,t){for(var n=e.length,o=arguments.length>=2?arguments[1]:void 0,i=[],s=0;s<n;s++)if(s in e){var a=e[s];t.call(o,a,s,e)&&i.push(a)}return i}function ZF(e){return e.reduce((function(e,t){return e.concat(DF.arr(t)?ZF(t):t)}),[])}function XF(e){return DF.arr(e)?e:(DF.str(e)&&(e=KF(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function JF(e,t){return e.some((function(e){return e===t}))}function eH(e){var t={};for(var n in e)t[n]=e[n];return t}function tH(e,t){var n=eH(e);for(var o in e)n[o]=t.hasOwnProperty(o)?t[o]:e[o];return n}function nH(e,t){var n=eH(e);for(var o in t)n[o]=DF.und(e[o])?t[o]:e[o];return n}function oH(e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);if(t)return t[1]}function iH(e,t){return DF.fnc(e)?e(t.target,t.id,t.total):e}function sH(e,t){return e.getAttribute(t)}function aH(e,t,n){if(JF([n,"deg","rad","turn"],oH(t)))return t;var o=IF.CSS[t+n];if(!DF.und(o))return o;var i=document.createElement(e.tagName),s=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;s.appendChild(i),i.style.position="absolute",i.style.width=100+n;var a=100/i.offsetWidth;s.removeChild(i);var r=a*parseFloat(t);return IF.CSS[t+n]=r,r}function rH(e,t,n){if(t in e.style){var o=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=e.style[t]||getComputedStyle(e).getPropertyValue(o)||"0";return n?aH(e,i,n):i}}function lH(e,t){return DF.dom(e)&&!DF.inp(e)&&(!DF.nil(sH(e,t))||DF.svg(e)&&e[t])?"attribute":DF.dom(e)&&JF(BF,t)?"transform":DF.dom(e)&&"transform"!==t&&rH(e,t)?"css":null!=e[t]?"object":void 0}function cH(e){if(DF.dom(e)){for(var t,n=e.style.transform||"",o=/(\w+)\(([^)]*)\)/g,i=new Map;t=o.exec(n);)i.set(t[1],t[2]);return i}}function dH(e,t,n,o){switch(lH(e,t)){case"transform":return function(e,t,n,o){var i=RF(t,"scale")?1:0+function(e){return RF(e,"translate")||"perspective"===e?"px":RF(e,"rotate")||RF(e,"skew")?"deg":void 0}(t),s=cH(e).get(t)||i;return n&&(n.transforms.list.set(t,s),n.transforms.last=t),o?aH(e,s,o):s}(e,t,o,n);case"css":return rH(e,t,n);case"attribute":return sH(e,t);default:return e[t]||0}}function uH(e,t){var n=/^(\*=|\+=|-=)/.exec(e);if(!n)return e;var o=oH(e)||0,i=parseFloat(t),s=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return i+s+o;case"-":return i-s+o;case"*":return i*s+o}}function pH(e,t){if(DF.col(e))return function(e){return DF.rgb(e)?(n=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(t=e))?"rgba("+n[1]+",1)":t:DF.hex(e)?function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,o){return t+t+n+n+o+o})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return"rgba("+parseInt(n[1],16)+","+parseInt(n[2],16)+","+parseInt(n[3],16)+",1)"}(e):DF.hsl(e)?function(e){var t,n,o,i=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e),s=parseInt(i[1],10)/360,a=parseInt(i[2],10)/100,r=parseInt(i[3],10)/100,l=i[4]||1;function c(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(0==a)t=n=o=r;else{var d=r<.5?r*(1+a):r+a-r*a,u=2*r-d;t=c(u,d,s+1/3),n=c(u,d,s),o=c(u,d,s-1/3)}return"rgba("+255*t+","+255*n+","+255*o+","+l+")"}(e):void 0;var t,n}(e);if(/\s/g.test(e))return e;var n=oH(e),o=n?e.substr(0,e.length-n.length):e;return t?o+t:o}function hH(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function gH(e){for(var t,n=e.points,o=0,i=0;i<n.numberOfItems;i++){var s=n.getItem(i);i>0&&(o+=hH(t,s)),t=s}return o}function mH(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return function(e){return 2*Math.PI*sH(e,"r")}(e);case"rect":return function(e){return 2*sH(e,"width")+2*sH(e,"height")}(e);case"line":return function(e){return hH({x:sH(e,"x1"),y:sH(e,"y1")},{x:sH(e,"x2"), |
| 551 |
y:sH(e,"y2")})}(e);case"polyline":return gH(e);case"polygon":return function(e){var t=e.points;return gH(e)+hH(t.getItem(t.numberOfItems-1),t.getItem(0))}(e)}}function bH(e,t){var n=t||{},o=n.el||function(e){for(var t=e.parentNode;DF.svg(t)&&DF.svg(t.parentNode);)t=t.parentNode;return t}(e),i=o.getBoundingClientRect(),s=sH(o,"viewBox"),a=i.width,r=i.height,l=n.viewBox||(s?s.split(" "):[0,0,a,r]);return{el:o,viewBox:l,x:l[0]/1,y:l[1]/1,w:a,h:r,vW:l[2],vH:l[3]}}function fH(e,t,n){function o(n){void 0===n&&(n=0);var o=t+n>=1?t+n:0;return e.el.getPointAtLength(o)}var i=bH(e.el,e.svg),s=o(),a=o(-1),r=o(1),l=n?1:i.w/i.vW,c=n?1:i.h/i.vH;switch(e.property){case"x":return(s.x-i.x)*l;case"y":return(s.y-i.y)*c;case"angle":return 180*Math.atan2(r.y-a.y,r.x-a.x)/Math.PI}}function xH(e,t){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,o=pH(DF.pth(e)?e.totalLength:e,t)+"";return{original:o,numbers:o.match(n)?o.match(n).map(Number):[0],strings:DF.str(e)||t?o.split(n):[]}}function yH(e){return QF(e?ZF(DF.arr(e)?e.map(XF):XF(e)):[],(function(e,t,n){return n.indexOf(e)===t}))}function vH(e){var t=yH(e);return t.map((function(e,n){return{target:e,id:n,total:t.length,transforms:{list:cH(e)}}}))}function kH(e,t){var n=eH(t);if(/^spring/.test(n.easing)&&(n.duration=HF(n.easing)),DF.arr(e)){var o=e.length;2!==o||DF.obj(e[0])?DF.fnc(t.duration)||(n.duration=t.duration/o):e={value:e}}var i=DF.arr(e)?e:[e];return i.map((function(e,n){var o=DF.obj(e)&&!DF.pth(e)?e:{value:e};return DF.und(o.delay)&&(o.delay=n?0:t.delay),DF.und(o.endDelay)&&(o.endDelay=n===i.length-1?t.endDelay:0),o})).map((function(e){return nH(e,n)}))}var wH={css:function(e,t,n){return e.style[t]=n},attribute:function(e,t,n){return e.setAttribute(t,n)},object:function(e,t,n){return e[t]=n},transform:function(e,t,n,o,i){if(o.list.set(t,n),t===o.last||i){var s="";o.list.forEach((function(e,t){s+=t+"("+e+") "})),e.style.transform=s}}};function _H(e,t){vH(e).forEach((function(e){for(var n in t){var o=iH(t[n],e),i=e.target,s=oH(o),a=dH(i,n,s,e),r=uH(pH(o,s||oH(a)),a),l=lH(i,n);wH[l](i,n,r,e.transforms,!0)}}))}function CH(e,t){return QF(ZF(e.map((function(e){return t.map((function(t){return function(e,t){var n=lH(e.target,t.name);if(n){var o=function(e,t){var n;return e.tweens.map((function(o){var i=function(e,t){var n={};for(var o in e){var i=iH(e[o],t);DF.arr(i)&&1===(i=i.map((function(e){return iH(e,t)}))).length&&(i=i[0]),n[o]=i}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}(o,t),s=i.value,a=DF.arr(s)?s[1]:s,r=oH(a),l=dH(t.target,e.name,r,t),c=n?n.to.original:l,d=DF.arr(s)?s[0]:c,u=oH(d)||oH(l),p=r||u;return DF.und(a)&&(a=c),i.from=xH(d,p),i.to=xH(uH(a,d),p),i.start=n?n.end:0,i.end=i.start+i.delay+i.duration+i.endDelay,i.easing=YF(i.easing,i.duration),i.isPath=DF.pth(s),i.isPathTargetInsideSVG=i.isPath&&DF.svg(t.target),i.isColor=DF.col(i.from.original),i.isColor&&(i.round=1),n=i,i}))}(t,e),i=o[o.length-1];return{type:n,property:t.name,animatable:e,tweens:o,duration:i.end,delay:o[0].delay,endDelay:i.endDelay}}}(e,t)}))}))),(function(e){return!DF.und(e)}))}function jH(e,t){var n=e.length,o=function(e){return e.timelineOffset?e.timelineOffset:0},i={};return i.duration=n?Math.max.apply(Math,e.map((function(e){return o(e)+e.duration}))):t.duration,i.delay=n?Math.min.apply(Math,e.map((function(e){return o(e)+e.delay}))):t.delay,i.endDelay=n?i.duration-Math.max.apply(Math,e.map((function(e){return o(e)+e.duration-e.endDelay}))):t.endDelay,i}var $H=0,SH=[],TH=function(){var e;function t(n){for(var o=SH.length,i=0;i<o;){var s=SH[i];s.paused?(SH.splice(i,1),o--):(s.tick(n),i++)}e=i>0?requestAnimationFrame(t):void 0}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",(function(){NH.suspendWhenDocumentHidden&&(MH()?e=cancelAnimationFrame(e):(SH.forEach((function(e){return e._onDocumentVisibility()})),TH()))})),function(){e||MH()&&NH.suspendWhenDocumentHidden||!(SH.length>0)||(e=requestAnimationFrame(t))}}();function MH(){return!!document&&document.hidden}function NH(e){void 0===e&&(e={});var t,n=0,o=0,i=0,s=0,a=null;function r(e){var t=window.Promise&&new Promise((function(e){return a=e}));return e.finished=t,t}var l=function(e){var t=tH(PF,e),n=tH(AF,e),o=function(e,t){var n=[],o=t.keyframes;for(var i in o&&(t=nH(function(e){for(var t=QF(ZF(e.map((function(e){return Object.keys(e)}))),(function(e){return DF.key(e)})).reduce((function(e,t){return e.indexOf(t)<0&&e.push(t),e}),[]),n={},o=function(o){var i=t[o];n[i]=e.map((function(e){var t={};for(var n in e)DF.key(n)?n==i&&(t.value=e[n]):t[n]=e[n];return t}))},i=0;i<t.length;i++)o(i);return n}(o),t)),t)DF.key(i)&&n.push({name:i,tweens:kH(t[i],e)});return n}(n,e),i=vH(e.targets),s=CH(i,o),a=jH(s,n),r=$H;return $H++,nH(t,{id:r,children:[],animatables:i,animations:s,duration:a.duration,delay:a.delay,endDelay:a.endDelay})}(e);function c(){var e=l.direction;"alternate"!==e&&(l.direction="normal"!==e?"normal":"reverse"),l.reversed=!l.reversed,t.forEach((function(e){return e.reversed=l.reversed}))}function d(e){return l.reversed?l.duration-e:e}function u(){n=0,o=d(l.currentTime)*(1/NH.speed)}function p(e,t){t&&t.seek(e-t.timelineOffset)}function h(e){for(var t=0,n=l.animations,o=n.length;t<o;){var i=n[t],s=i.animatable,a=i.tweens,r=a.length-1,c=a[r];r&&(c=QF(a,(function(t){return e<t.end}))[0]||c);for(var d=OF(e-c.start-c.delay,0,c.duration)/c.duration,u=isNaN(d)?1:c.easing(d),p=c.to.strings,h=c.round,g=[],m=c.to.numbers.length,b=void 0,f=0;f<m;f++){var x=void 0,y=c.to.numbers[f],v=c.from.numbers[f]||0;x=c.isPath?fH(c.value,u*y,c.isPathTargetInsideSVG):v+u*(y-v),h&&(c.isColor&&f>2||(x=Math.round(x*h)/h)),g.push(x)}var k=p.length;if(k){b=p[0];for(var w=0;w<k;w++){p[w];var _=p[w+1],C=g[w];isNaN(C)||(b+=_?C+_:C+" ")}}else b=g[0];wH[i.type](s.target,i.property,b,s.transforms),i.currentValue=b,t++}}function g(e){l[e]&&!l.passThrough&&l[e](l)}function m(e){var u=l.duration,m=l.delay,b=u-l.endDelay,f=d(e);l.progress=OF(f/u*100,0,100),l.reversePlayback=f<l.currentTime,t&&function(e){if(l.reversePlayback)for(var n=s;n--;)p(e,t[n]);else for(var o=0;o<s;o++)p(e,t[o])}(f),!l.began&&l.currentTime>0&&(l.began=!0,g("begin")),!l.loopBegan&&l.currentTime>0&&(l.loopBegan=!0,g("loopBegin")),f<=m&&0!==l.currentTime&&h(0),(f>=b&&l.currentTime!==u||!u)&&h(u),f>m&&f<b?(l.changeBegan||(l.changeBegan=!0,l.changeCompleted=!1,g("changeBegin")),g("change"),h(f)):l.changeBegan&&(l.changeCompleted=!0,l.changeBegan=!1,g("changeComplete")),l.currentTime=OF(f,0,u),l.began&&g("update"),e>=u&&(o=0,l.remaining&&!0!==l.remaining&&l.remaining--,l.remaining?(n=i,g("loopComplete"),l.loopBegan=!1,"alternate"===l.direction&&c()):(l.paused=!0,l.completed||(l.completed=!0,g("loopComplete"),g("complete"),!l.passThrough&&"Promise"in window&&(a(),r(l)))))}return r(l),l.reset=function(){var e=l.direction;l.passThrough=!1,l.currentTime=0,l.progress=0,l.paused=!0,l.began=!1,l.loopBegan=!1,l.changeBegan=!1,l.completed=!1,l.changeCompleted=!1,l.reversePlayback=!1,l.reversed="reverse"===e,l.remaining=l.loop,t=l.children;for(var n=s=t.length;n--;)l.children[n].reset();(l.reversed&&!0!==l.loop||"alternate"===e&&1===l.loop)&&l.remaining++,h(l.reversed?l.duration:0)},l._onDocumentVisibility=u,l.set=function(e,t){return _H(e,t),l},l.tick=function(e){i=e,n||(n=i),m((i+(o-n))*NH.speed)},l.seek=function(e){m(d(e))},l.pause=function(){l.paused=!0,u()},l.play=function(){l.paused&&(l.completed&&l.reset(),l.paused=!1,SH.push(l),u(),TH())},l.reverse=function(){c(),l.completed=!l.reversed,u()},l.restart=function(){l.reset(),l.play()},l.remove=function(e){EH(yH(e),l)},l.reset(),l.autoplay&&l.play(),l}function LH(e,t){for(var n=t.length;n--;)JF(e,t[n].animatable.target)&&t.splice(n,1)}function EH(e,t){var n=t.animations,o=t.children;LH(e,n);for(var i=o.length;i--;){var s=o[i],a=s.animations;LH(e,a),a.length||s.children.length||o.splice(i,1)}n.length||o.length||t.pause()}NH.version="3.2.1",NH.speed=1,NH.suspendWhenDocumentHidden=!0,NH.running=SH,NH.remove=function(e){ |
| 552 |
for(var t=yH(e),n=SH.length;n--;)EH(t,SH[n])},NH.get=dH,NH.set=_H,NH.convertPx=aH,NH.path=function(e,t){var n=DF.str(e)?KF(e)[0]:e,o=t||100;return function(e){return{property:e,el:n,svg:bH(n),totalLength:mH(n)*(o/100)}}},NH.setDashoffset=function(e){var t=mH(e);return e.setAttribute("stroke-dasharray",t),t},NH.stagger=function(e,t){void 0===t&&(t={});var n=t.direction||"normal",o=t.easing?YF(t.easing):null,i=t.grid,s=t.axis,a=t.from||0,r="first"===a,l="center"===a,c="last"===a,d=DF.arr(e),u=d?parseFloat(e[0]):parseFloat(e),p=d?parseFloat(e[1]):0,h=oH(d?e[1]:e)||0,g=t.start||0+(d?u:0),m=[],b=0;return function(e,t,f){if(r&&(a=0),l&&(a=(f-1)/2),c&&(a=f-1),!m.length){for(var x=0;x<f;x++){if(i){var y=l?(i[0]-1)/2:a%i[0],v=l?(i[1]-1)/2:Math.floor(a/i[0]),k=y-x%i[0],w=v-Math.floor(x/i[0]),_=Math.sqrt(k*k+w*w);"x"===s&&(_=-k),"y"===s&&(_=-w),m.push(_)}else m.push(Math.abs(a-x));b=Math.max.apply(Math,m)}o&&(m=m.map((function(e){return o(e/b)*b}))),"reverse"===n&&(m=m.map((function(e){return s?e<0?-1*e:-e:Math.abs(b-e)})))}return g+(d?(p-u)/b:u)*(Math.round(100*m[t])/100)+h}},NH.timeline=function(e){void 0===e&&(e={});var t=NH(e);return t.duration=0,t.add=function(n,o){var i=SH.indexOf(t),s=t.children;function a(e){e.passThrough=!0}i>-1&&SH.splice(i,1);for(var r=0;r<s.length;r++)a(s[r]);var l=nH(n,tH(AF,e));l.targets=l.targets||e.targets;var c=t.duration;l.autoplay=!1,l.direction=t.direction,l.timelineOffset=DF.und(o)?c:uH(o,c),a(t),t.seek(l.timelineOffset);var d=NH(l);a(d),s.push(d);var u=jH(s,e);return t.delay=u.delay,t.endDelay=u.endDelay,t.duration=u.duration,t.seek(0),t.reset(),t.autoplay&&t.play(),t},t},NH.easing=YF,NH.penner=qF,NH.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e};const PH=NH,AH=({attributes:e})=>{const{icon:t,options:n,style:o}=e,{type:i}=t,{strokeWidth:s}=o,a=(0,m.useRef)(null),[r,c]=(0,m.useState)(n),{duration:d,repeat:u,direction:p,delay:h,easing:g}=n;(0,m.useEffect)((()=>{PH({targets:a.current?.querySelectorAll("svg path"),strokeDashoffset:[PH.setDashoffset,0],easing:g,duration:d,delay:(e,t)=>t*Number(h),loop:u,autoplay:!0,direction:p})}),[a.current?.querySelectorAll("svg"),n,r]);const b={strokeWidth:s};return(0,l.jsxs)("div",{className:"svdr-icon-draw-wrapper",children:["icon"===i.svgType&&"library"===i.iconType&&t.library&&(0,l.jsx)("div",{ref:a,className:"react-svg-drawing svdr-svg-wrapper",style:b,dangerouslySetInnerHTML:{__html:t.library}}),"icon"===i.svgType&&"upload"===i.iconType&&(0,l.jsx)("div",{ref:a,className:"react-svg-drawing svdr-svg-wrapper",style:b,dangerouslySetInnerHTML:{__html:t.upload||MF}}),"custom"===i.svgType&&(0,l.jsx)("div",{ref:a,className:"react-svg-drawing svdr-svg-wrapper",style:b,dangerouslySetInnerHTML:{__html:t.custom}})]})};Nl(vF.name)&&(0,p.registerBlockType)(vF,{icon:Ur,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i=`svg-draw-${o}`,s=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(EF,{attributes:t,setAttributes:n,isPremium:s}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),id:i,children:[(0,l.jsx)(kF,{attributes:t,id:i,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(AH,{attributes:t})})]})]})}}) |
| 553 |
;const BH=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-of-content","title":"Table of Contents","category":"bBlocks","description":"The Table of Contents block automatically generates a table of contents for your WordPress post or page.","keywords":["table","content","table of contents","heading"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"isNested":{"type":"boolean","default":false},"rendered":{"type":"boolean","default":true},"header":{"type":"object","default":{"bgColor":"","textColor":"#444","iconColor":"#000","separatorWidth":1,"separatorColor":"#ccc"}},"headings":{"type":"array","default":[]},"boxList":{"type":"object","default":{"txtStyle":"normal","nTxtColor":"#2e2e2e","nBarColor":"#b0aeb1","hTxtColor":"#ec1e75","hBarColor":"#ec1e75","nTxtDecoration":false,"hTxtDecoration":false,"dotSize":15,"panelHeight":0,"treeColor":"blueviolet","dotShadow":[{"hOffset":"1px","vOffset":"1px","blur":"5px","spreed":"1px","color":"#b3b3b3","isInset":false}],"maxHeight":{"desktop":0,"tablet":0,"mobile":0},"padding":{"desktop":{"top":"0px","bottom":"0px","left":"20px","right":"0px"},"tablet":{"top":"0px","bottom":"0px","left":"20px","right":"0px"},"mobile":{"top":"0px","bottom":"0px","left":"20px","right":"0px"}}}},"tagName":{"type":"array","default":["h1","h2","h3"]},"title":{"type":"object","default":{"text":"Table of Contents","tag":"h3"}},"markup":{"type":"object","default":{"view":"decimal","icon":"fa-solid fa-circle","color":"#000","markupSize":{"desktop":"16px","tablet":"16px","mobile":"16px"}}},"minimize":{"type":"object","default":{"toggle":true,"expandIcon":"fa-solid fa-chevron-down","collapseIcon":"fa-solid fa-chevron-up"}},"theme":{"type":"string","default":"default"},"sticky":{"type":"object","default":{"toggle":false,"device":["Desktop"],"width":{"desktop":"617px","tablet":"90%","mobile":"100%"},"horizonAlign":"left","verticalAlign":"top","right":{"desktop":"0px","tablet":"0px","mobile":"0px"},"left":{"desktop":"0px","tablet":"0px","mobile":"0px"},"top":{"desktop":"0px","tablet":"0px","mobile":"0px"},"bottom":{"desktop":"0px","tablet":"0px","mobile":"0px"},"zIndex":{"desktop":100,"tablet":100,"mobile":100}}},"slideTitle":{"type":"object","default":{"titleColor":"#2e2e2e","slideBarColor":"#abababbf","spaceDevice":"desktop","space":{"desktop":"15px","tablet":"15px","mobile":"15px"},"spaceBottomDevice":"desktop","spaceBottom":{"desktop":"15px","tablet":"15px","mobile":"15px"},"spaceBottomUnit":{"desktop":"px","tablet":"px","mobile":"px"}}},"slideList":{"type":"object","default":{"spaceDevice":"desktop","space":{"desktop":"15px","tablet":"15px","mobile":"15px"},"fontSize":{"desktop":"16px"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"#fff","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":["file:./view.css"],"render":"file:./render.php","viewScript":["file:./view.js","react","react-dom"]}'),IH=()=>document.querySelectorAll('a[href^="#"]')?.forEach((e=>{e.addEventListener("click",(function(e){e.preventDefault(),document.querySelector(this.getAttribute("href"))?.scrollIntoView({behavior:"smooth"})}))})),OH=[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"div",value:"div"}],RH=[{label:"Numbers",value:"decimal"},{label:"Bullets",value:"disc"}],zH=[{name:"Orange",color:"#F57C00"},{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Cyan",color:"#00BCD4"},{name:"Pink",color:"#E91E63"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],DH=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],FH=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",...e,children:(0,l.jsx)("path",{d:"M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"})}),HH=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",...e,children:(0,l.jsx)("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})}),WH=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",...e,children:(0,l.jsx)("path",{d:"M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM135 241c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l87 87 87-87c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 345c-9.4 9.4-24.6 9.4-33.9 0L135 241z"})}),UH=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",...e,children:(0,l.jsx)("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"})}),GH=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",...e,children:(0,l.jsx)("path",{d:"M246.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-160-160c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L224 402.7 361.4 265.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-160 160zm160-352l-160 160c-12.5 12.5-32.8 12.5-45.3 0l-160-160c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L224 210.7 361.4 73.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3z"})}),VH=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",...e,children:(0,l.jsx)("path",{ |
| 554 |
d:"M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"})}),qH=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",...e,children:(0,l.jsx)("path",{d:"M384 480c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0zM224 352c-6.7 0-13-2.8-17.6-7.7l-104-112c-6.5-7-8.2-17.2-4.4-25.9s12.5-14.4 22-14.4l208 0c9.5 0 18.2 5.7 22 14.4s2.1 18.9-4.4 25.9l-104 112c-4.5 4.9-10.9 7.7-17.6 7.7z"})}),YH=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",...e,children:(0,l.jsx)("path",{d:"M384 432c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0zm64-16c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320zM224 352c-6.7 0-13-2.8-17.6-7.7l-104-112c-6.5-7-8.2-17.2-4.4-25.9s12.5-14.4 22-14.4l208 0c9.5 0 18.2 5.7 22 14.4s2.1 18.9-4.4 25.9l-104 112c-4.5 4.9-10.9 7.7-17.6 7.7z"})}),KH=[{label:"Circle",value:"fa-solid fa-circle",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"})})},{label:"Dot Circle",value:"fa-solid fa-circle-dot",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"})})},{label:"Squire",value:"fa-solid fa-square-full",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M0 0H512V512H0V0z"})})},{label:"Circle",value:"fa-regular fa-circle",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"})})},{label:"Dot Circle",value:"fa-regular fa-circle-dot",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"})})}],QH=[{label:"Chevron Down",value:"fa-solid fa-chevron-down",icon:(0,l.jsx)(HH,{})},{label:"Circle Chevron Down",value:"fa-solid fa-circle-chevron-down",icon:(0,l.jsx)(WH,{})},{label:"Angel Down",value:"fa-solid fa-angle-down",icon:(0,l.jsx)(UH,{})},{label:"Angel Double Down",value:"fa-solid fa-angles-down",icon:(0,l.jsx)(GH,{})},{label:"Caret Down",value:"fa-solid fa-caret-down",icon:(0,l.jsx)(VH,{})},{label:"Squire Caret Down",value:"fa-solid fa-square-caret-down",icon:(0,l.jsx)(qH,{})},{label:"Squire Caret Down",value:"fa-regular fa-square-caret-down",icon:(0,l.jsx)(YH,{})}],ZH=[{label:"Chevron Up",value:"fa-solid fa-chevron-up",icon:(0,l.jsx)(HH,{className:"tbcnb-rotate180deg"})},{label:"Circle Chevron Up",value:"fa-solid fa-circle-chevron-up",icon:(0,l.jsx)(WH,{className:"tbcnb-rotate180deg"})},{label:"Angel Up",value:"fa-solid fa-angle-up",icon:(0,l.jsx)(UH,{className:"tbcnb-rotate180deg"})},{label:"Angel Double Up",value:"fa-solid fa-angles-up",icon:(0,l.jsx)(GH,{className:"tbcnb-rotate180deg"})},{label:"Caret Up",value:"fa-solid fa-caret-up",icon:(0,l.jsx)(VH,{className:"tbcnb-rotate180deg"})},{label:"Squire Caret Up",value:"fa-solid fa-square-caret-up",icon:(0,l.jsx)(qH,{className:"tbcnb-rotate180deg"})},{label:"Squire Caret Up",value:"fa-regular fa-square-caret-up",icon:(0,l.jsx)(YH,{className:"tbcnb-rotate180deg"})}],XH=({icons:e,label:t,default:n,renderFunction:o,value:i})=>{const[s,a]=(0,m.useState)(!1),r=(0,m.useRef)(),c=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const e=e=>{c?.current?.contains(e.target)||r?.current?.contains(e.target)||a(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}})),(0,l.jsxs)("div",{className:"bblocks-tbcn-iconPicker-main-wrapper",children:[(0,l.jsxs)("div",{className:"bblocks-tbcn-iconPicker-wrapper",children:[(0,l.jsx)("p",{style:{width:"50%",margin:"0"},children:t}),(0,l.jsxs)("div",{className:"bblocks-tbcn-iconPicker",children:[(0,l.jsx)("div",{onClick:()=>o(n),className:"single-icon-admin-panel",children:(0,l.jsx)(FH,{})}),(0,l.jsx)("div",{ref:c,onClick:()=>a(!s),className:"single-icon-admin-panel selectIcon",children:e.map((({value:e,icon:t})=>e===i&&t))})]})]}),s&&(0,l.jsx)("div",{ref:r,className:"bblocks-tbcn-iconPicker-popover-icons",children:e&&e.map(((e,t)=>(0,l.jsxs)("div",{onClick:()=>o(e.value),className:"bblocks-tbcn-single-icon-picker-admin "+(e.value===i?"selectIcon":""),children:[(0,l.jsx)("div",{className:"bblocks-tbcn-icon-picker-tooltip-container",children:(0,l.jsxs)("div",{className:"bblocks-tbcn-icon-picker-tooltip",children:[(0,l.jsx)("span",{children:e.label}),(0,l.jsx)(VH,{})]})}),e.icon]},t)))})]})},JH=({attributes:e,setAttributes:t})=>{const{minimize:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Minimize Box","b-blocks"),checked:n.toggle,onChange:e=>t({minimize:{...n,toggle:e}})}),n.toggle&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(XH,{icons:QH,default:"fa-solid fa-chevron-down",label:(0,x.__)("Expand Icon","b-blocks"),value:n.expandIcon,renderFunction:e=>t({minimize:{...n,expandIcon:e}})}),(0,l.jsx)("div",{className:"mt10",children:(0,l.jsx)(XH,{icons:ZH,default:"fa-solid fa-chevron-up",label:(0,x.__)("Collapse Icon","b-blocks"),value:n.collapseIcon,renderFunction:e=>t({minimize:{...n,collapseIcon:e}})})})]})]})},eW=({attributes:e,setAttributes:t})=>{const{title:n,theme:o,markup:i,tagName:s,isNested:a=!1}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table of Contents","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Title","b-blocks"),value:n.text,onChange:e=>((e,o)=>{const i=Ob(n,(e=>{e.text=o}));t({title:i})})(0,e)}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Title Tag","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:n.tag,onChange:e=>t({title:{...n,tag:e}}),options:OH})]}),(0,l.jsx)(v,{children:(0,x.__)("Anchors By Tags","b-blocks")}),(0,l.jsx)(Ft,{options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],value:s,onChange:e=>t({tagName:e})}),(0,l.jsx)("br",{}),(0,l.jsx)(y.ToggleControl,{help:"Headings are displayed in a hierarchical structure.",label:(0,x.__)("Enable Nesting","b-blocks"),checked:a,onChange:e=>t({isNested:e})}),"default"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:"Markup view"}),(0,l.jsx)(y.SelectControl,{value:i.view,options:RH,onChange:e=>t({markup:{...i,view:e,icon:"disc"===e&&"fa-solid fa-circle"}})})]}),"disc"===i.view&&(0,l.jsx)(XH,{icons:KH,label:"Icon",renderFunction:e=>t({markup:{...i,icon:e,view:"decimal"===e?"decimal":"disc"}}),value:i.icon,default:"decimal"})]})]})},tW=e=>{const{attributes:t,setAttributes:n}=e,{theme:o}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(eW,{attributes:t,setAttributes:n}),"default"===o&&(0,l.jsx)(JH,{attributes:t,setAttributes:n})]})},nW=({label:e,units:t,className:n,style:o,value:i="0px",onChange:s=()=>{},...a})=>{const r=(0,m.useRef)(),[c,d]=(0,m.useState)(!1),u=[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"vh",value:"vh"}]||t,p=i.split("").filter((e=>!isNaN(e)&&"%"!==e)).join(""),h=i.split("").filter((e=>isNaN(e)||"%"===e)).join(""),[g,b]=(0,m.useState)(p),[f,x]=(0,m.useState)(h) |
| 555 |
;(0,m.useEffect)((()=>{s(`${g}${f}`)}),[g,f]),(0,m.useEffect)((()=>{const e=e=>{r?.current?.contains(e.target)||d(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}));const v=Math.floor(999999*Math.random());return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("style",{children:"\n .labelWrapper {\n display: flex;\n justify-content: space-between;\n }\n .rangeControlWrapper {\n display: flex;\n }\n\n .unitControlBtn {\n font-size: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 9999;\n border: 1px solid rgb(168, 168, 168);\n border-left: none;\n cursor: pointer;\n font-weight: 600;\n background-color: #0000;\n height: 32px;\n width: 21px;\n border-radius: 0 2px 2px 0;\n text-transform: uppercase;\n margin-left: -1px;\n }\n\n .unitControlBtn:focus {\n border-color: #3858e9;\n border-left: 1px solid #3858e9;\n }\n .unitControlWrapper {\n position: relative;\n }\n .unitListWrapper {\n position: absolute;\n right: 0px;\n z-index: 9999 !important;\n background: #fff;\n font-weight: 600;\n border: 1px solid rgb(168, 168, 168);\n width: 19px;\n text-align: center;\n border-radius: 0 0 2px 2px;\n }\n .unitList {\n margin: 0;\n cursor: default;\n font-size: 10px;\n }\n .unitList:hover {\n background-color: #3858e9;\n color: aliceblue;\n }\n .hoverBgColor {\n background-color: #3858e9;\n color: aliceblue;\n }\n "}),(0,l.jsxs)("div",{id:`unitId-${v}`,className:`unitRangeWrapper ${n}`,style:o,children:[(0,l.jsx)("div",{className:"labelWrapper",children:(0,l.jsx)("label",{htmlFor:"",children:e})}),(0,l.jsxs)("div",{className:"rangeControlWrapper",children:[(0,l.jsx)("div",{style:{width:"100%"},children:(0,l.jsx)(y.RangeControl,{value:Number(p),onChange:e=>b(e),...a})}),(0,l.jsxs)("div",{ref:r,className:"unitControlWrapper",children:[(0,l.jsx)("button",{onClick:()=>d(!c),className:"unitControlBtn",children:h}),c&&(0,l.jsx)("div",{className:"unitListWrapper",children:u?.map(((e,t)=>(0,l.jsx)("p",{onClick:()=>{x(e.value),d(!1)},className:`unitList ${e.value===f?"hoverBgColor":""} `,children:e.label},t)))})]})]})]})]})},oW=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,device:n})=>{const{header:o,boxList:i,markup:s}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Background Color","b-blocks"),value:o.bgColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({header:be(o,e,"bgColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:o.txtColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({header:be(o,e,"txtColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:o.iconColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({header:be(o,e,"iconColor")})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Separator Width","b-blocks"),value:o.separatorWidth,onChange:e=>t({header:be(o,e,"separatorWidth")}),min:0,max:100,step:1}),(0,l.jsx)(Ue,{label:(0,x.__)("Separator Color","b-blocks"),value:o.separatorColor,defaults:"#ccc",colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({header:be(o,e,"separatorColor")})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("List Item","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"60px",top:"0px"}}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i.padding[n],resetValues:{top:"0px",left:"20px",right:"0px",bottom:"0px"},onChange:e=>t({boxList:be(i,e,"padding",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"80px",top:"0px"}}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Max Height","b-blocks"),value:i.maxHeight[n],onChange:e=>t({boxList:be(i,e,"maxHeight",n)}),min:0,max:1e3,step:1})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Ne,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.nTxtColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({boxList:{...i,nTxtColor:e}})}),(0,l.jsx)("div",{style:{marginTop:"10px"},children:(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Underline","b-blocks"),checked:i.nTxtDecoration,onChange:e=>t({boxList:{...i,nTxtDecoration:e}})})})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.hTxtColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({boxList:{...i,hTxtColor:e}})}),(0,l.jsx)("div",{style:{marginTop:"10px"},children:(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Underline","b-blocks"),checked:i.hTxtDecoration,onChange:e=>t({boxList:{...i,hTxtDecoration:e}})})})]})]})}),(0,l.jsx)("div",{style:{borderTop:"1px solid #ccc",margin:"15px 0",paddingTop:"10px"},children:(0,l.jsx)("strong",{children:"Marker"})}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:s.color,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({markup:be(s,e,"color")})}),(0,l.jsx)("div",{style:{marginTop:"10px"},children:(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition"}),(0,l.jsx)(nW,{label:(0,x.__)("Size","b-blocks"),value:s.markupSize[n],min:0,step:1,max:s.markupSize[n].includes("px")?50:100,onChange:e=>t({markup:be(s,e,"markupSize",n)})})]})})]})]})})),iW=(0,f.withSelect)((e=>({device:e("core/edit-post").__experimentalGetPreviewDeviceType()?.toLowerCase()})))((({attributes:e,setAttributes:t,device:n})=>{const{slideTitle:o,slideList:i,boxList:s}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("List","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"Heading"}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color","b-blocks"),value:o.titleColor,colors:[{name:"Orange",color:"#F57C00"},{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Cyan",color:"#00BCD4"},{name:"Pink",color:"#E91E63"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({slideTitle:{...o,titleColor:e}})}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(nW,{label:(0,x.__)("Space Top","b-blocks"),value:o.space[n],min:0,max:o.space[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(nW,{label:(0,x.__)("Space Bottom","b-blocks"),value:o.spaceBottom[n],min:0,max:o.spaceBottom[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"spaceBottom",n)})})]}),(0,l.jsxs)("div",{style:{ |
| 556 |
marginTop:"10px",borderTop:"1px solid #ccc",paddingTop:"10px"},children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"List Item"}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(nW,{label:(0,x.__)("List Space Bottom","b-blocks"),value:i.space[n],min:0,max:i.space[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(nW,{label:(0,x.__)("List Font Size","b-blocks"),value:i.fontSize[n],min:0,max:i.fontSize[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"fontSize",n)})})]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Ne,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:s.nTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...s,nTxtColor:e}})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:s.nbarColor,defaults:"#b0aeb1",colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...s,nbarColor:e}})})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:s.hTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...s,hTxtColor:e}})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:s.hBarColor,defaults:"#b0aeb1",colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...s,hBarColor:e}})})]})]})})]})})})),sW=(0,f.withSelect)((e=>({device:e("core/edit-post").__experimentalGetPreviewDeviceType()?.toLowerCase()})))((({attributes:e,setAttributes:t,device:n})=>{const{slideTitle:o,slideList:i,boxList:s}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slide","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"Heading"}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color","b-blocks"),value:o.titleColor,colors:zH,onChange:e=>t({slideTitle:{...o,titleColor:e}})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:o.slideBarColor,colors:zH,onChange:e=>t({slideTitle:{...o,slideBarColor:e}})}),(0,l.jsxs)("div",{style:{marginTop:"10px"},children:[(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"70px"}}),(0,l.jsx)(nW,{label:(0,x.__)("Space Top","b-blocks"),value:o.space[n],min:0,step:1,max:o.space[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"90px"}}),(0,l.jsx)(nW,{label:(0,x.__)("Space Bottom","b-blocks"),value:o.spaceBottom[n],min:0,step:1,max:o.spaceBottom[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"spaceBottom",n)})})]})]}),(0,l.jsxs)("div",{style:{marginTop:"10px",borderTop:"1px solid #ccc",paddingTop:"10px"},children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"List Item"}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(nW,{label:(0,x.__)("List Space Bottom","b-blocks"),value:i.space[n],min:0,max:i.space[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"90px"}}),(0,l.jsx)(nW,{label:(0,x.__)("List Font Size","b-blocks"),value:i.fontSize[n],min:0,max:i.fontSize[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"fontSize",n)})})]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Ne,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:s.nTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:be(s,e,"nTxtColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:s.nBarColor,defaults:"#b0aeb1",colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:be(s,e,"nBarColor")})})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:s.hTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:be(s,e,"hTxtColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:s.hBarColor,defaults:"#b0aeb1",colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:be(s,e,"hBarColor")})})]})]})})]})})})),aW=(0,f.withSelect)((e=>({device:e("core/edit-post").__experimentalGetPreviewDeviceType()?.toLowerCase()})))((({attributes:e,setAttributes:t,device:n})=>{const{slideTitle:o,slideList:i,boxList:s}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Timeline","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"Heading"}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color","b-blocks"),value:o.titleColor,colors:[{name:"Orange",color:"#F57C00"},{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Cyan",color:"#00BCD4"},{name:"Pink",color:"#E91E63"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({slideTitle:{...o,titleColor:e}})}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(nW,{label:(0,x.__)("Space Top","b-blocks"),value:o.space[n],min:0,max:o.space[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(nW,{label:(0,x.__)("Space Bottom","b-blocks"),value:o.spaceBottom[n],min:0,max:o.spaceBottom[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"spaceBottom",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px",borderTop:"1px solid #ccc",paddingTop:"10px"},children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"List Item"}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(nW,{label:(0,x.__)("List Space Bottom","b-blocks"),value:i.space[n],min:0,max:i.space[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"space",n)})})] |
| 557 |
}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(nW,{label:(0,x.__)("List Font Size","b-blocks"),value:i.fontSize[n],min:0,max:i.fontSize[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"fontSize",n)})})]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Ne,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:s.nTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...s,nTxtColor:e}})})}),"hover"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:s.hTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...s,hTxtColor:e}})})})]})}),(0,l.jsxs)("div",{style:{borderTop:"1px solid #ccc",marginTop:"10px",paddingTop:"10px"},children:[(0,l.jsx)("p",{style:{marginBottom:"10px"},children:(0,l.jsx)("strong",{children:"Dots"})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Size","b-blocks"),value:s.dotSize,min:0,step:1,max:70,onChange:e=>t({boxList:{...s,dotSize:e}})}),(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),value:s.dotShadow,onChange:e=>t({boxList:{...s,dotShadow:e}}),defaults:[{hOffset:"1px",vOffset:"1px",blur:"5px",spread:"1px",color:"#b3b3b3"}]}),(0,l.jsx)(Ue,{label:(0,x.__)("Tree Color","b-blocks"),value:s.treeColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],defaults:"blueviolet",onChange:e=>t({boxList:{...s,treeColor:e}})})]})]})})})),rW=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,device:n})=>{const{theme:o,sticky:i}=e;return(0,l.jsxs)(l.Fragment,{children:[i.toggle&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Container","b-blocks"),children:(0,l.jsx)(y.__experimentalUnitControl,{value:i.width[n],label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),onChange:e=>t({sticky:be(i,e,"width",n)})})}),"default"===o&&(0,l.jsx)(oW,{attributes:e,setAttributes:t}),"slide"===o&&(0,l.jsx)(sW,{attributes:e,setAttributes:t}),"timeline"===o&&(0,l.jsx)(aW,{attributes:e,setAttributes:t}),"list"===o&&(0,l.jsx)(iW,{attributes:e,setAttributes:t})]})})),lW=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,s={dimension:["padding","margin"],transform:!0,background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],mask:!0,visibility:["zIndex","overflow"],responsive:!0,css:!0};return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:DH,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(tW,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(rW,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),enabled:s,isPremium:o})})]})})})})},cW=()=>(0,l.jsx)("div",{style:{padding:"14px"},children:(0,l.jsx)("p",{style:{margin:"0px"},children:"No headings were found on this page!"})}),dW=({attributes:e,id:t})=>{const{header:n,boxList:o,markup:i,sticky:s}=e,a=`#${t}`,r=`${a} .bblocks-tbcn-accordion`,c=`${r} .bblocks-tbcn-accordion-title`,d=`${r} .bblocks-tbcn-panel`,u=`${d} .bblocks-tbcn-panel-table-container-order-list`,p=`${u} .bblocks-tbcn-panel-table-list-items`,h=`${a} ol li a.bblocks-tbcn-table-content-anchor-list`;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("style",{ |
| 558 |
children:`\n ${h}:hover{\n color:${o.hTxtColor} !important; \n text-decoration:${o.hTxtDecoration?"underline":"none"} !important;\n }\n ${d} :where(ol){\n list-style:none !important;\n }\n ${h}{\n color:${o.nTxtColor} !important;\n text-decoration:${o.nTxtDecoration?"underline":"none"};\n\n }\n ${r}.sticky {\n ${na("width",s.width.desktop)}\n z-index: ${s.zIndex.desktop} !important;\n position:fixed;\n }\n ${["left","right"].map((e=>`${r}.sticky.${e}{\n ${e}:${s[e].desktop};\n }`)).join("")}\n ${u} .bblocks-tbcn-list-item-content{\n display:flex;\n align-items:center;\n gap:5px;\n }\n ${["top","bottom"].map((e=>`${r}.sticky.${e}{\n ${e}:${s[e]?.desktop}\n }`)).join("")}\n ${"center"===s.verticalAlign?`${r}.sticky.center{top:50%; transform: translateY(-50%)}`:null}\n ${"decimal"===i.view?`\n \n ${u}{\n list-style-type:none;\n margin:0px;\n }\n ${p}::marker{\n color:${i.color};\n font-size:${i.markupSize.desktop};\n }\n ${p} .bblocks-tbcn-list-item-content>span{\n color:${i.color};\n font-size:${i.markupSize.desktop};\n }\n ${p} .bblocks-tbcn-list-item-content{\n gap:0px;\n }\n `:`\n ${u}{\n list-style-type:none;\n }\n ${p} .bblocks-tbcn-list-item-content>span>svg{\n color:${i.color};\n fill:${i.color};\n height:${i.markupSize.desktop} !important;\n }\n `}\n ${c}{\n background:${n.bgColor};\n border-bottom: ${n.separatorWidth}px solid ${n.separatorColor};\n margin-bottom:-2px;\n }\n ${c}>svg{\n fill:${n.iconColor}\n }\n ${r}>.panel{\n ${o.maxHeight.desktop>0?"max-height:"+o.maxHeight.desktop+"px;":""}\n ${o.maxHeight.desktop>0?"overflow-y:auto;":""}\n \n \n }\n ${h}.item-active{\n color:${o.hTxtColor} !important;\n }\n ${p}{\n padding-top:${o.padding.desktop?.top};\n padding-bottom:${o.padding.desktop?.bottom};\n padding-right:${o.padding.desktop?.right};\n }\n ${u}{\n padding-left:${o.padding.desktop?.left};\n }\n @media screen and (min-width: 1024px) {\n ${r}.sticky {\n z-index: ${s.zIndex.desktop} !important;\n position:${s?.device.includes("Desktop")?"fixed":"initial"};\n }\n ${["left","right"].map((e=>`${r}.sticky.${e}{\n ${e}:${s[e].desktop};\n }`)).join("")}\n ${["top","bottom"].map((e=>`${r}.sticky.${e}{\n ${e}:${s[e].desktop}\n }`)).join("")}\n ${"center"===s.verticalAlign?`${r}.sticky.center{top:50%; transform: translateY(-50%)}`:null}\n ${d}{\n ${o.maxHeight.desktop>0?"max-height:"+o.maxHeight.desktop+"px;":""}\n ${o.maxHeight.desktop>0?"overflow-y:auto;":""}\n }\n ${p}{\n padding-top:${o.padding.desktop?.top};\n padding-bottom:${o.padding.desktop?.bottom};\n padding-right:${o.padding.desktop?.right};\n }\n ${u}{\n padding-left:${o.padding.desktop?.left};\n }\n ${"decimal"===i.view?`\n ${p}::marker{\n font-size:${i.markupSize.desktop};\n }\n `:`\n ${u}{\n list-style-type:none;\n }\n\n ${p} .bblocks-tbcn-list-item-content>span>svg{\n color:${i.color};\n fill:${i.color};\n height:${i.markupSize.desktop} !important;\n }\n `}\n }\n @media only screen and (min-width:641px) and (max-width: 1024px){\n ${r}.sticky {\n ${na("width",s.width.tablet)}\n z-index: ${s.zIndex.tablet} !important;\n position:${s.device.includes("Tablet")?"fixed":"initial"};\n }\n ${["left","right"].map((e=>`${r}.sticky.${e}{\n ${e}:${s[e].tablet};\n }`)).join("")}\n ${["top","bottom"].map((e=>`${r}.sticky.${e}{\n ${e}:${s[e].tablet}\n }`)).join("")}\n ${"center"===s.verticalAlign?`${r}.sticky.center{top:50%; transform: translateY(-50%)}`:null}\n ${d}{\n ${o.maxHeight.tablet>0?"max-height:"+o.maxHeight.tablet+"px;":""}\n ${o.maxHeight.tablet>0?"overflow-y:auto;":""}\n }\n ${p}{\n padding-top:${o.padding.tablet?.top};\n padding-bottom:${o.padding.tablet?.bottom};\n padding-right:${o.padding.tablet?.right};\n }\n ${u}{\n padding-left:${o.padding.tablet?.left};\n }\n ${"decimal"===i.view?`\n ${p}::marker{\n font-size:${i.markupSize.tablet};\n }\n `:`\n ${u}{\n list-style-type:none;\n }\n ${p}>span>svg{\n color:${i.color};\n fill:${i.color};\n height:${i.markupSize.tablet} !important;\n }\n `}\n\n }\n @media only screen and (max-width: 640px) {\n ${r}.sticky {\n ${na("width",s.width.mobile)}\n z-index: ${s.zIndex.mobile} !important;\n position:${s.device.includes("Mobile")?"fixed":"initial"};\n }\n ${["left","right"].map((e=>`${r}.sticky.${e}{\n ${e}:${s[e].mobile};\n }`)).join("")}\n ${["top","bottom"].map((e=>`${r}.sticky.${e}{\n ${e}:${s[e].mobile}\n }`)).join("")}\n ${"center"===s.verticalAlign?`${r}.sticky.center{top:50%; transform: translateY(-50%)}`:null}\n ${d}{\n ${o.maxHeight.mobile>0?"max-height:"+o.maxHeight.mobile+"px;":""}\n ${o.maxHeight.mobile>0?"overflow-y:auto;":""}\n }\n ${p}{\n padding-top:${o.padding.mobile?.top};\n padding-bottom:${o.padding.mobile?.bottom};\n padding-right:${o.padding.mobile?.right};\n }\n ${u}{\n padding-left:${o.padding.mobile?.left};\n }\n ${"decimal"===i.view?`\n ${p}::marker{\n font-size:${i.markupSize.mobile};\n }\n `:`\n ${u}{\n list-style-type:none;\n }\n ${p} .bblocks-tbcn-list-item-content>span>svg{\n color:${i.color};\n fill:${i.color};\n height:${i.markupSize.mobile} !important;\n }\n `}\n }\n `})})},uW=({items:e,markup:t,bullets:n,contentsAttr:o,setContentsAttr:i,className:s="",prefix:a=""})=>e&&0!==e.length?(0,l.jsx)("ol",{className:`bblocks-tbcn-panel-table-container-order-list ${s}`,children:e.map(((e,s)=>{const r=a?`${a}.${s+1}`:`${s+1}`;return"bblocks-tbcn-content-table-title"!==e.className&&(0,l.jsxs)("li",{className:"bblocks-tbcn-panel-table-list-items",children:[(0,l.jsxs)("div",{className:"bblocks-tbcn-list-item-content",children:["decimal"===t.view?(0,l.jsxs)("span",{className:"bblocks-tbcn-decimal-number",children:[r,"."]}):(0,l.jsx)("span",{children:n.map((({value:e,icon:n},o)=>e===t.icon&&(0,l.jsx)(m.Fragment,{children:n},`bullet-${o}`)))}),(0,l.jsx)("a",{className:"bblocks-tbcn-table-content-anchor-list "+(e.id===o?"item-active":""),href:`#${e.id}`,onClick:()=>i(e.id),children:e.contents})]}),e.children&&e.children.length>0&&(0,l.jsx)(uW,{items:e.children,markup:t,bullets:n,contentsAttr:o,setContentsAttr:i,className:"bblocks-tbcn-nested-list",prefix:r})]},e.id+e.contents+a)}))}):null,pW=uW,hW=({attributes:e,setAttributes:t,id:n})=>{const[o,i]=(0,m.useState)(!0),[s,a]=(0,m.useState)(),{boxList:r,header:c,title:d,tagName:u,minimize:p,markup:h,sticky:g,isNested:b=!1}=e,f=(0,m.useRef)(),x=(0,m.useRef)(),y=(0,m.useRef)(),{content:v,savedElements:k}=((e,t,n,o,i,s)=>{const[a,r]=(0,m.useState)([]),[l,c]=(0,m.useState)([]),d=(0,m.useCallback)((e=>e.className===i?null:(Array.from(e.children).slice(1).forEach((e=>e.remove())),{contents:e.textContent,tag:e.tagName,id:e.children[0]?.getAttribute("id") |
| 559 |
})),[]),u=(0,m.useCallback)((e=>{Array.from(e).forEach(((e,t)=>{if(e.className!=i&&e?.children&&!Array.from(e?.children).some((e=>e.getAttribute("id")?.startsWith("bppb-heading-anchor-")))){const n=document.createElement("span");n.setAttribute("id",`bppb-heading-anchor-${t}`),e.insertAdjacentElement("afterbegin",n)}}))}),[]),p=(0,m.useCallback)(((e,t)=>{if(e){if("div"!==e.tagName.toLowerCase()){const t=e.querySelector("span");t?.remove()}e.innerHTML=t}}),[]);return(0,m.useEffect)((()=>{(()=>{const i=s?.ownerDocument||s||document,a=i?.querySelector(".wp-block-post-content");if(!a&&!s)return;const l=e.join(", "),h=a?.querySelectorAll(l);if(!h?.length)return;const g=Array.from(h).map(d).filter(Boolean);c(g),u(h);const m=document.querySelector(o),b=m?.querySelector(t);p(b,n),r(h)})()}),[e,t,n,o,d,u,p,s]),{savedElements:l,content:a}})(u,d.tag,d.text,".bblocks-tbcn-accordion-title","bblocks-tbcn-content-table-title",f?.current);(0,m.useEffect)((()=>{k&&t({headings:k})}),[k]),(0,m.useEffect)((()=>{const e=y.current,t=()=>{const t="0px"!==e.style.height,n=t?"0px":`${e.scrollHeight}px`;e.style.height=n,i(!t)};return p.toggle&&x.current.addEventListener("click",t),()=>x.current?.removeEventListener("click",t)}),[JSON.stringify(r),r.maxHeight,d.tag,u,h.view,p.toggle]);const w=b?(e=>{const t=[],n=[{level:0,children:t}];return e.forEach((e=>{const t=parseInt(e.tag.replace("H",""),10),o={...e,children:[]};for(;n.length>1&&n[n.length-1].level>=t;)n.pop();n[n.length-1].children.push(o),n.push({level:t,children:o.children})})),t})(e.headings):e.headings;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(dW,{attributes:e,id:n}),(0,l.jsxs)("div",{ref:f,className:`bblocks-tbcn-accordion ${g.toggle?"sticky":""} ${g.horizonAlign} ${g.verticalAlign} `,children:[(0,l.jsxs)("div",{ref:x,className:"bblocks-tbcn-accordion-title",children:[(0,l.jsx)(zn,{className:"bblocks-tbcn-content-table-title",style:{margin:"0",color:c.txtColor},tagName:d?.tag,dangerouslySetInnerHTML:{__html:d?.text}}),p.toggle&&(0,l.jsx)(l.Fragment,{children:o?ZH.map((({value:e,icon:t},n)=>e===p.collapseIcon&&(0,l.jsx)("span",{children:t},`expand-${n}`))):QH.map((({value:e,icon:t},n)=>e===p.expandIcon&&(0,l.jsx)("span",{children:t},`expand-${n}`)))})]}),(0,l.jsx)("div",{ref:y,className:"bblocks-tbcn-panel",children:v?.length>1?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(pW,{items:w,markup:h,bullets:KH,contentsAttr:s,setContentsAttr:a})}):(0,l.jsx)(cW,{})})]})]})};Nl(BH.name)&&(0,p.registerBlockType)(BH,{icon:Gr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{minimize:i}=t,{advanced:s}=t,{headingContent:a,headingTags:r}=(()=>{const[e,t]=(0,m.useState)(null),[n,o]=(0,m.useState)([]),i=(0,m.useRef)([]),s=(0,f.useSelect)((e=>e("core/block-editor").getBlocks()),[]);return(0,m.useEffect)((()=>{const e=s,n=i.current,a=e.filter((e=>"core/heading"===e.name)),r=n.filter((e=>"core/heading"===e.name));a.forEach((e=>{const n=r.find((t=>t.clientId===e.clientId));n&&n.attributes.content!==e.attributes.content&&t(e.attributes.content)}));const l=a.map((e=>({level:e.attributes.level,content:e.attributes.content})));o(l),i.current=e}),[s]),{headingContent:e,headingTags:n}})(),c=bBlocksPremiumChecker,d=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(lW,{attributes:t,setAttributes:n,isPremium:c}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`${_a(d,s,!1)}`}}),(0,l.jsxs)("div",{children:[(0,l.jsx)(IH,{}),(0,l.jsx)(hW,{setAttributes:n,attributes:t,id:d},i.toggle+a+r+s?.animation?.type)]})]})]})}});const gW=JSON.parse('{"apiVersion":3,"name":"b-blocks/team-members","title":"Team Members","description":"Display Team members section.","category":"bBlocks","keywords":["team","members","team members section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"members":{"type":"array","default":[{"background":{"color":"#0000"},"border":{"radius":"3px"},"shadow":[],"photo":{"id":null,"url":"","alt":"","title":""},"photoBorder":{"radius":"50%"},"name":"Martin","nameColor":"#333","title":"Founder","titleColor":"#333","separator":{"width":"20%","height":"3px","color":"#777"},"bio":"I am a self-motivated and self-taught professional who likes to solve problems.","bioColor":"#333","social":[{"link":"#","icon":{"class":"fab fa-facebook-f"}},{"link":"#","icon":{"class":"fab fa-twitter"}},{"link":"#","icon":{"class":"fab fa-linkedin-in"}}],"socialIconColors":{"color":"#fff","bg":"#146EF5"},"iconStyle":{"hover":{"socialIconColors":{"color":"#fff","bg":"#146EF5"},"border":{},"shadow":{}},"normal":{"border":{},"shadow":[]}}},{"background":{"color":"#0000"},"border":{"radius":"3px"},"shadow":[],"photo":{"id":null,"url":"","alt":"","title":""},"photoBorder":{"radius":"50%"},"name":"Mary","nameColor":"#333","title":"Co-Founder","titleColor":"#333","separator":{"width":"20%","height":"3px","color":"#777"},"bio":"I am a self-motivated and self-taught professional who likes to solve problems.","bioColor":"#333","social":[{"link":"#","icon":{"class":"fab fa-facebook-f"}},{"link":"#","icon":{"class":"fab fa-twitter"}},{"link":"#","icon":{"class":"fab fa-linkedin-in"}}],"socialIconColors":{"color":"#fff","bg":"#146EF5"},"iconStyle":{"hover":{"socialIconColors":{"color":"#fff","bg":"#146EF5"},"border":{},"shadow":{}},"normal":{"border":{},"shadow":[]}}},{"background":{"color":"#0000"},"border":{"radius":"3px"},"shadow":[],"photo":{"id":null,"url":"","alt":"","title":""},"photoBorder":{"radius":"50%"},"name":"John Doe","nameColor":"#333","title":"CEO","titleColor":"#333","separator":{"width":"20%","height":"3px","color":"#777"},"bio":"I am a self-motivated and self-taught professional who likes to solve problems.","bioColor":"#333","social":[{"link":"#","icon":{"class":"fab fa-facebook-f"}},{"link":"#","icon":{"class":"fab fa-twitter"}},{"link":"#","icon":{"class":"fab fa-linkedin-in"}}],"socialIconColors":{"color":"#fff","bg":"#146EF5"},"iconStyle":{"hover":{"socialIconColors":{"color":"#fff","bg":"#146EF5"},"border":{},"shadow":{}},"normal":{"border":{},"shadow":[]}}}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"30px"},"rowGap":{"type":"string","default":"30px"},"layout":{"type":"string","default":"vertical"},"theme":{"type":"string","default":"default"},"isLinkNewTab":{"type":"boolean","default":false},"textAlign":{"type":"string","default":"center"},"padding":{"type":"object","default":{"vertical":"50px","horizontal":"20px"}},"photoWidth":{"type":"string","default":"170px"},"photoMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"nameTypo":{"type":"object","default":{"fontSize":{"desktop":"20px","tablet":"18px","mobile":"16px"},"fontWeight":600}},"nameMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isTitle":{"type":"boolean","default":true},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isSep":{"type":"boolean","default":true},"sepMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isBio":{"type":"boolean","default":true},"bioTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"bioMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isSocial":{"type":"boolean","default":true},"socialSize":{"type":"string","default":"22px"},"socialIconMargin":{"type":"object","default":{"side":2,"vertical":"10px","horizontal":"10px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),mW=({attributes:e,index:t,updateMember:n})=>{ |
| 560 |
const{members:i}=e,{background:s={},border:a={},shadow:r={},photo:c,photoBorder:d={},nameColor:u="",titleColor:p="",separator:h={},bioColor:g="",socialIconColors:m={},iconStyle:b={}}=i[t]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:s,onChange:e=>n(t,"background",e)}),(0,l.jsx)(Xc,{label:(0,x.__)("Border:","b-blocks"),value:a,onChange:e=>n(t,"border",e),defaults:{radius:"3px"}}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow:","b-blocks"),value:r?.shadow||r,onChange:e=>n(t,"shadow",e)}),(0,l.jsx)(v,{children:(0,x.__)("Photo:","b-blocks")}),(0,l.jsx)(ke,{value:c,onChange:e=>n(t,"photo",e),placeholder:(0,x.__)("Enter Image URL","b-blocks")}),(0,l.jsx)(ed,{className:"mt20",value:c,onChange:e=>n(t,"photo",e)}),(0,l.jsx)(Xc,{label:(0,x.__)("Photo Border:","b-blocks"),value:d,onChange:e=>n(t,"photoBorder",e),defaults:{radius:"50%"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Name Color:","b-blocks"),value:u,onChange:e=>n(t,"nameColor",e),defaultColor:"#333"}),(0,l.jsx)(Ue,{label:(0,x.__)("Designation/Title Color:","b-blocks"),value:p,onChange:e=>n(t,"titleColor",e),defaultColor:"#333"}),(0,l.jsx)(Ts,{value:h,onChange:e=>n(t,"separator",e),defaults:{width:"20%",height:"3px",color:"#777"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Bio Color:","b-blocks"),value:g,onChange:e=>n(t,"bioColor",e),defaultColor:"#333"}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(On,{label:(0,x.__)("Social Icon Colors:","b-blocks"),value:m,onChange:e=>n(t,"socialIconColors",e),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(Xc,{label:(0,x.__)("Icon Border","b-blocks"),value:b?.normal?.border,onChange:e=>n(t,"iconStyle",e,"normal","border")}),(0,l.jsx)(yt,{label:(0,x.__)("Icon Shadow","b-blocks"),value:b?.normal?.shadow,onChange:e=>n(t,"iconStyle",e,"normal","shadow")})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(On,{label:(0,x.__)("Social Icon Colors:","b-blocks"),value:b?.hover?.socialIconColors,onChange:e=>n(t,"iconStyle",e,"hover","socialIconColors")}),(0,l.jsx)(Xc,{label:(0,x.__)("Icon Border","b-blocks"),value:b?.hover?.border,onChange:e=>n(t,"iconStyle",e,"hover","border")}),(0,l.jsx)(yt,{label:(0,x.__)("Icon Shadow","b-blocks"),value:b?.hover?.border,onChange:e=>n(t,"iconStyle",e,"hover","shadow")})]})]})})]})},bW=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Theme 1","b-blocks"),value:"theme1"},{label:(0,x.__)("Theme 2","b-blocks"),value:"theme2"},{label:(0,x.__)("Theme 3","b-blocks"),value:"theme3"},{label:(0,x.__)("Theme 4","b-blocks"),value:"theme4"}],fW=[{label:(0,x.__)("Vertical","b-blocks"),value:"vertical",icon:d},{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal",icon:u}],xW=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updateMember:n,activeIndex:i,setActiveIndex:s,isPremium:a,device:r})=>{const{members:c=[],columns:d,columnGap:u,rowGap:p,layout:g,theme:m,isLinkNewTab:b,textAlign:f,padding:k,photoWidth:w,photoMargin:C,nameTypo:j,nameMargin:$,isTitle:S,titleTypo:T,titleMargin:M,isSep:N,sepMargin:L,isBio:E,bioTypo:P,bioMargin:A,isSocial:B,socialSize:I,socialIconMargin:O}=e,R=()=>({background:{color:"#0000"},border:{radius:"3px"},shadow:[],photo:{id:null,url:"",alt:"",title:""},photoBorder:{radius:"50%"},name:"John Smith",nameColor:"#333",title:"Manager",titleColor:"#333",separator:{width:"20%",height:"3px",style:"solid",color:"#777"},bio:"I am a self-motivated and self-taught professional who likes to solve problems.",bioColor:"#333",social:[{link:"#",icon:{class:"fab fa-facebook-f",fontSize:22,color:"#fff"}},{link:"#",icon:{class:"fab fa-twitter",fontSize:22,color:"#fff"}},{link:"#",icon:{class:"fab fa-linkedin-in",fontSize:22,color:"#fff"}}],socialIconColors:{color:"#fff",bg:o}}),z=e=>{const n=Ob(c,(t=>{t.map(((n,o)=>{for(const n of e){const e=n[0],i=n[1];t[o][e]=i}}))}));t({members:n})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:h=>(0,l.jsxs)(l.Fragment,{children:["general"===h.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:xn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Add or Remove Members","b-blocks"),children:[(0,l.jsx)(_s,{attributes:e,setAttributes:t,activeIndex:i,setActiveIndex:s,updateMember:n,arrKey:"members",ItemSettings:mW,itemLabel:"Team Member",newItem:R(),design:a?"sortable":"single"}),!a&&(0,l.jsxs)("small",{children:[" ",(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"__blank",children:"Upgrade to Premium"})})," to unlock sorting and more features."]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:d[r],onChange:e=>{t({columns:{...d,[r]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({columnGap:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({rowGap:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(Tn,{value:g,onChange:e=>{t({layout:e}),"vertical"===e&&t({columns:{...d,desktop:3,tablet:2},textAlign:"center",padding:{...k,vertical:"50px"}}),"horizontal"===e&&t({columns:{...d,desktop:2,tablet:1},textAlign:"left",padding:{...k,vertical:"30px"}})},options:fW,isIcon:!0})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Theme:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:m,onChange:e=>{t({theme:e}),"default"===e&&t({padding:{...k,vertical:"50px",horizontal:"20px"},photoWidth:"170px",nameTypo:{...j,fontSize:20,textTransform:"none"},titleTypo:{...T,fontSize:16,textTransform:"none"},isSep:!0,isBio:!0,socialSize:"22px"}),"theme1"===e&&t({padding:{...k,vertical:"50px",horizontal:"20px"},photoWidth:"190px",nameTypo:{...j,fontSize:20,textTransform:"none"},titleTypo:{...T,fontSize:14,textTransform:"uppercase"},isSep:!0,isBio:!0,socialSize:"22px"}),"theme2"===e&&t({padding:{...k,vertical:"50px",horizontal:"20px"},photoWidth:"190px",nameTypo:{...j,fontSize:20,textTransform:"none"},titleTypo:{...T,fontSize:14,textTransform:"uppercase"},isSep:!0,isBio:!1,socialSize:"22px"}),"theme3"===e&&t({padding:{...k,vertical:"50px",horizontal:"20px"},photoWidth:"170px",nameTypo:{...j,fontSize:24,textTransform:"none"},titleTypo:{...T,fontSize:18,textTransform:"none"},isSep:!1,isBio:!1,socialSize:"28px"}),"theme4"===e&&t({padding:{...k,vertical:"15px",horizontal:"15px"},photoWidth:"100%",nameTypo:{...j,fontSize:20,textTransform:"uppercase"},titleTypo:{...T,fontSize:15,textTransform:"none"},isSep:!1,isBio:!1,socialSize:"22px"}),c.map((t=>{const{background:n,border:i,photoBorder:s,separator:a,socialIconColors:r}=t,l=[["background",{...n,color:"#0000"}],["border",{...i,radius:"3px"}],["shadow",[{hOffset:"",vOffset:"",blur:"0px",color:"#7090b0"}]],["photoBorder",{...s,width:"0px",color:"#0000",radius:"50%"}],["nameColor","#333"],["titleColor","#333"],["separator",{...a,color:"#777"}],["bioColor","#333"],["socialIconColors",{...r,color:"#fff",bg:o}]],c=[["background",{...n,color:"#0000"}],["border",{...i,radius:"3px"}],["shadow",[{hOffset:"",vOffset:"",blur:"20px",color:"#e8edfb"}]],["photoBorder",{...s,width:"10px",color:"#e8edfb",radius:"50%"}],["nameColor","#333"],["titleColor","#7a7a7a"],["separator",{...a,color:o}],["bioColor","#7a7a7a"],["socialIconColors",{...r,color:"#fff",bg:o |
| 561 |
}]],d=[["background",{...n,color:"#0000"}],["border",{...i,radius:"3px"}],["shadow",[{hOffset:"",vOffset:"",blur:"0px",color:"#7090b0"}]],["photoBorder",{...s,width:"0px",color:"#0000",radius:"50%"}],["nameColor","#333"],["titleColor","#7a7a7a"],["separator",{...a,color:"#999"}],["bioColor","#7a7a7a"],["socialIconColors",{...r,color:o,bg:"#0000"}]],u=[["background",{...n,color:"#f2f3f7"}],["border",{...i,radius:"10px"}],["shadow",[{hOffset:"-10px",vOffset:"-10px",blur:"20px",color:"#f7f7f7"},{hOffset:"10px",vOffset:"10px",blur:"20px",color:"#d7e0e8"}]],["photoBorder",{...s,width:"0px",color:"#0000",radius:"50%"}],["nameColor","#32285C"],["titleColor","#677592"],["separator",{...a,color:"#777"}],["bioColor","#333"],["socialIconColors",{...r,color:"#677592",bg:"#0000"}]],p=[["background",{...n,color:o}],["border",{...i,radius:"0px"}],["shadow",[{hOffset:"",vOffset:"",blur:"0px",color:"#7090b0"}]],["photoBorder",{...s,width:"0px",color:"#0000",radius:"0px"}],["nameColor","#fff"],["titleColor","#fff"],["separator",{...a,color:"#777"}],["bioColor","#fff"],["socialIconColors",{...r,color:o,bg:"#fff"}]];"default"===e&&z(l),"theme1"===e&&z(c),"theme2"===e&&z(d),"theme3"===e&&z(u),"theme4"===e&&z(p)}))},options:bW})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:S,onChange:e=>t({isTitle:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Separator","b-blocks"),checked:N,onChange:e=>t({isSep:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Bio","b-blocks"),checked:E,onChange:e=>t({isBio:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Social","b-blocks"),checked:B,onChange:e=>t({isSocial:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open Link in New Tab","b-blocks"),checked:b,onChange:e=>t({isLinkNewTab:e})})]})]}),"style"===h.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align:","b-blocks")}),(0,l.jsx)(Tn,{value:f,onChange:e=>t({textAlign:e}),options:Jt.filter((e=>"justify"!==e.value)),isIcon:!0})]}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:k,onChange:e=>t({padding:e}),defaults:{vertical:"50px",horizontal:"20px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member Photo","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:w,onChange:e=>t({photoWidth:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:C,onChange:e=>t({photoMargin:e}),defaults:{side:4,bottom:"20px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member Name","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:j,onChange:e=>t({nameTypo:e}),defaults:{fontSize:{desktop:20,tablet:18,mobile:16},fontWeight:600}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:$,onChange:e=>t({nameMargin:e}),defaults:{side:4,bottom:"10px"}})]}),S&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Designation/Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:T,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:M,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]}),N&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator","b-blocks"),initialOpen:!1,children:(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:L,onChange:e=>t({sepMargin:e}),defaults:{side:4,bottom:"15px"}})}),E&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member Bio","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:P,onChange:e=>t({bioTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:A,onChange:e=>t({bioMargin:e}),defaults:{side:4,bottom:"15px"}})]}),B&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member Social","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Icon Size:","b-blocks"),labelPosition:"left",value:I,onChange:e=>t({socialSize:e}),units:[Ee(),Pe(),Ae()]}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Icon Margin:","b-blocks"),value:O,onChange:e=>t({socialIconMargin:e}),defaults:{vertical:"10px",horizontal:"10px"}})]})]})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Member","b-blocks"),onClick:()=>{const e=[...c,R()];t({members:e}),s(c.length)},children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:f,onChange:e=>t({textAlign:e})})]})]})})),yW="bBlocksTeamMembers",vW=({attributes:e,id:t})=>{const{members:n=[],columnGap:o,rowGap:i,layout:s,textAlign:a,padding:r,photoWidth:c,photoMargin:d,nameTypo:u,nameMargin:p,titleTypo:h,titleMargin:g,sepMargin:m,bioTypo:b,bioMargin:f,socialSize:x,socialIconMargin:y}=e,v=`#${t}`,k=`${v} .${yW}`,w=`${k} .teamMember`,_=`${w} .memberDetails`,C=`${_} .memberSocial`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${pa("",u)?.googleFontLink}\n\t\t${pa("",h)?.googleFontLink}\n\t\t${pa("",b)?.googleFontLink}\n\t\t${pa(`${_} .memberName`,u)?.styles}\n\t\t${pa(`${_} .memberTitle`,h)?.styles}\n\t\t${pa(`${_} .memberBio`,b)?.styles}\n\n\t\t${k}{\n\t\t\tgrid-gap: ${i} ${o};\n\t\t}\n\t\t${w}{\n\t\t\ttext-align: ${a};\n\t\t\tpadding: ${ua(r)};\n\t\t}\n\t\t${w} .memberPhoto{\n\t\t\twidth: ${c};\n\t\t\tmargin: ${"horizontal"===s?"0 20px 0 0":`${ua(d)}`};\n\t\t}\n\t\t${_} .memberName{\n\t\t\tmargin: ${ua(p)};\n\t\t}\n\t\t${_} .memberTitle{\n\t\t\tmargin: ${ua(g)};\n\t\t}\n\t\t${_} .memberSeparator{\n\t\t\tmargin: ${ua(m)};\n\t\t}\n\t\t${_} .memberBio{\n\t\t\tmargin: ${ua(f)};\n\t\t}\n\t\t${C} .icon,\n\t\t${C} .memberSocialAdd{\n\t\t\tmargin: ${ua(y)};\n\t\t}\n\t\t${C} .icon i,\n\t\t${C} .memberSocialAdd i{\n\t\t\tfont-size: ${x};\n\t\t\twidth: ${x};\n\t\t}\n\n\t\t${n.map(((e,t)=>{const{background:n,border:o,shadow:i,photoBorder:s,nameColor:r,titleColor:l,separator:c,bioColor:d,socialIconColors:u,iconStyle:p={}}=e,h=`${v} #teamMember-${t}`,g=`${h} .memberDetails`,m=`${g} .memberSocial`;return`\n\t\t\t\t${h}{\n\t\t\t\t\t${oa(n)}\n\t\t\t\t\t${ia(o)}\n\t\t\t\t\tbox-shadow: ${la(i?.shadow||(i?.color?[i]:i))};\n\t\t\t\t}\n\t\t\t\t${h} .memberPhoto{\n\t\t\t\t\t${ia(s)}\n\t\t\t\t}\n\t\t\t\t${g} .memberName{\n\t\t\t\t\tcolor: ${r};\n\t\t\t\t}\n\t\t\t\t${g} .memberTitle{\n\t\t\t\t\tcolor: ${l};\n\t\t\t\t}\n\t\t\t\t${h} .memberSeparator{\n\t\t\t\t\t${ca(c)}\n\t\t\t\t}\n\t\t\t\t${g} .memberBio{\n\t\t\t\t\tcolor: ${d};\n\t\t\t\t}\n\t\t\t\t${m}{\n\t\t\t\t\tjustify-content: ${"center"===a?"center":"right"===a?"flex-end":"flex-start"}\n\t\t\t\t}\n\t\t\t\t${m} li a{\n\t\t\t\t\t${aa(u)}\n\t\t\t\t\t${ia(p?.normal?.border)}\n\t\t\t\t\t${la(p?.normal?.shadow)}\n\t\t\t\t\ttransition:all 0.2s ease-in-out;\n\t\t\t\t}\n\t\t\t\t${m} li a:hover{\n\t\t\t\t\t${aa(p?.hover?.socialIconColors)}\n\t\t\t\t\t${ia(p?.hover?.border)}\n\t\t\t\t\t${la(p?.hover?.shadow)}\n\t\t\t\t}\n\t\t\t\t${m} li.isSelected{\n\t\t\t\t\tborder: 2px solid ${u?.bg};\n\t\t\t\t}\n\t\t\t\t${m} li.memberSocialAdd button i{\n\t\t\t\t\tcolor: ${u?.bg};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})};Nl(gW.name)&&(0,p.registerBlockType)(gW,{icon:Vr,transforms:{from:[{type:"block",blocks:["tsb/team"],transform:e=>(0,p.createBlock)("b-blocks/team-members",e)},{type:"prefix",prefix:"counter",transform:()=>(0,p.createBlock)("b-blocks/team-members")}],to:[{type:"block",blocks:["tsb/team"],isMatch:e=>!!e,transform:e=>(0, |
| 562 |
p.createBlock)("tsb/team",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e,{members:s=[],columns:a,layout:r,isTitle:c,isSep:d,isBio:u,isSocial:p}=t,{desktop:g,tablet:b,mobile:f}=a||{},[k,w]=(0,m.useState)(0),[_,C]=(0,m.useState)(null),j=bBlocksPremiumChecker;(0,m.useEffect)((()=>{w(i&&s.length?0:null)}),[i]),(0,m.useEffect)((()=>{!i&&C(null)}),[i]);const $=(e,t,o,i=!1,a=!1)=>{const r=Ob(s,(n=>{!1!==i&&a?n[e][t][i][a]=o:n[e][t]=o}));n({members:r}),w(e)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(xW,{attributes:t,setAttributes:n,updateMember:$,activeIndex:k,setActiveIndex:w,isPremium:j}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(vW,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{className:`${yW} ${r||"vertical"} columns-${g} columns-tablet-${b} columns-mobile-${f}`,children:s.map(((e,t)=>{const{photo:n,name:o,title:s,bio:a,social:r=[]}=e;return(0,l.jsxs)("div",{onClick:()=>w(t),className:"teamMember "+(t===k?"bPlNowEditing":""),id:`teamMember-${t}`,children:[n?.url?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("img",{className:`memberPhoto ${n?.id?`wp-image-${n?.id}`:null}`,src:n?.url,alt:n?.alt}),(0,Jc.isBlobURL)(n?.url)&&(0,l.jsx)(y.Spinner,{})]}):(0,l.jsx)(td,{label:(0,x.__)(" Member Photo:","b-blocks"),value:n,onChange:e=>$(t,"photo",e)}),(0,l.jsxs)("div",{className:"memberDetails",children:[(0,l.jsx)(h.RichText,{className:"memberName",tagName:"h4",value:o,onChange:e=>$(t,"name",e),placeholder:(0,x.__)("Member name","b-blocks"),inlineToolbar:!0}),c&&(0,l.jsx)(h.RichText,{className:"memberTitle",tagName:"p",value:s,onChange:e=>$(t,"title",e),placeholder:(0,x.__)("Member designation/title","b-blocks"),inlineToolbar:!0}),d&&(0,l.jsx)("span",{className:"memberSeparator"}),u&&(0,l.jsx)(h.RichText,{className:"memberBio",tagName:"p",value:a,onChange:e=>$(t,"bio",e),placeholder:(0,x.__)("Biography of the member","b-blocks"),inlineToolbar:!0}),p&&(0,l.jsx)("ul",{className:"memberSocial",children:r?.map(((e,n)=>{const{icon:o}=e;return(0,l.jsx)("li",{onClick:()=>C(n),className:`icon icon-${t}-${n} ${i&&t===k&&n===_?"isSelected":null}`,children:(0,l.jsx)("a",{href:"#",children:(0,l.jsx)("i",{className:o?.class})})},n)}))}),null!==_&&t===k&&(0,l.jsxs)("div",{className:"socialAction memberSocialForm",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.__experimentalInputControl,{value:r[_]?.link,onChange:e=>$(t,"social",e,_,"link")}),(0,l.jsx)(Un,{value:r[_]?.icon,onChange:e=>$(t,"social",e,_,"icon"),defaults:{class:"fab fa-facebook-f",fontSize:22},isSize:!1,isColor:!1}),(0,l.jsxs)("a",{className:"memberSocialRemove mt15",onClick:e=>{e.preventDefault(),$(t,"social",[...r.slice(0,_),...r.slice(_+1)]),C(null)},children:[(0,l.jsx)("i",{className:"fa fa-times"}),(0,x.__)("Remove this link","b-blocks")]})]}),i&&p&&t===k&&(0,l.jsx)("div",{className:"socialAction memberSocialAdd mt20",children:(0,l.jsxs)(y.Button,{showTooltip:!0,tooltipPosition:"top enter",label:(0,x.__)("Add Social Link","b-blocks"),onClick:()=>{$(t,"social",[...r,{link:"#",icon:{class:"fab fa-facebook-f"}}]),C(r.length)},children:[(0,l.jsx)("i",{className:"fa fa-plus"})," Add new social"]})})]})]},t)}))}),!s.length&&(0,l.jsx)("h3",{className:"addItemFirst",children:(0,x.__)("Please add a member first!","b-blocks")})]})]})},save:()=>null});const kW=JSON.parse('{"UU":"b-blocks/testimonials"}'),wW=({attributes:e,expanded:t,onChange:n})=>{const{elements:o}=e,{expandBtn:i,expandText:s,collapseText:a}=o;return i&&(0,l.jsx)("span",{className:"expandBtn",type:"button",onClick:n,children:t?a:s})},_W=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#000000",width:"20px",height:"20px",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M232 280L64 280 64 232 232 232 232 64 280 64 280 232 448 232 448 280 280 280 280 448 232 448 232 280Z"})}),CW=(e,t=0)=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:e,width:"15px",height:"15px",viewBox:"0 -32 576 576",children:(0,l.jsx)("path",{d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"})},t),jW=(e,t)=>{let n=[];for(let o=1;o<=5;o++)o<=e?n.push(CW(t,o)):n.push(CW("#ccc",o));return n},$W={padding:{top:"10px",right:"15px",bottom:"10px",left:"15px"},image:{width:"70",height:"70"},imgBorder:{width:"1px",style:"solid",color:"#C6C6C652",radius:"50%"}},SW=(e,t)=>"default"===e?$W:"theme_1"===e?{...$W,image:{width:"70",height:"70"},imgBorder:{width:t?.width,style:t?.style,color:t?.color,side:"all",radius:"50%"}}:"theme_2"===e?{...$W,expandedColors:{bg:"#fbfbfb00"}}:"theme_3"===e?$W:"theme_4"===e?{...$W,padding:{top:"0px",right:"0px",bottom:"0px",left:"0px"},image:{width:"70",height:"70"},quoteIcon:{size:23}}:"theme_5"===e?{...$W,imgBorder:{width:"4px",style:"solid",color:"#C6C6C652",radius:"1px"},quoteIcon:{size:15}}:void 0,TW=[{label:(0,x.__)("Default","b-testimonials-block"),value:"default"},{label:(0,x.__)("Slider","b-testimonials-block"),value:"slider"},{label:(0,x.__)("Masonry","b-testimonials-block"),value:"masonry"}],MW=[{label:(0,x.__)("Default","b-testimonials-block"),value:"default"},{label:(0,x.__)("Theme-1","b-testimonials-block"),value:"theme_1"},{label:(0,x.__)("Theme-2","b-testimonials-block"),value:"theme_2"},{label:(0,x.__)("Theme-3","b-testimonials-block"),value:"theme_3"},{label:(0,x.__)("Theme-4","b-testimonials-block"),value:"theme_4"},{label:(0,x.__)("Theme-5","b-testimonials-block"),value:"theme_5"},{label:(0,x.__)("Theme-6","b-testimonials-block"),value:"theme_6"}],NW=((0,x.__)("Vertical","block-directory"),(0,x.__)("Horizontal","block-directory"),[{name:"general",title:(0,x.__)("General","b-testimonials-block")},{name:"style",title:(0,x.__)("Style","b-testimonials-block")}]),LW={img:{url:"https://templates.bplugins.com/wp-content/uploads/2025/02/p-29.png"},name:"John Doe",deg:"Developer",reviewText:"It is a long-established fact that a reader will be distracted by the readable content of a page when looking at its layout",rating:4},EW=e=>{const{attributes:t,setAttributes:n,index:o}=e,{items:i}=t,{img:s,name:a,reviewText:r,deg:c,rating:d}=i[o]||{},u=(e,t,s=!1)=>{const a=Ob(i,(n=>{s?n[o][e][s]=t:n[o][e]=t}));n({items:a})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Image:","b-testimonials-block")}),(0,l.jsx)(ke,{value:s,type:["image"],onChange:e=>u("img",e),placeholder:(0,x.__)("Enter Image URL","b-testimonials-block")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Name","b-testimonials-block"),value:a,onChange:e=>u("name",e)}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Designation","b-testimonials-block"),value:c,onChange:e=>u("deg",e)}),(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Review","b-testimonials-block"),value:r,onChange:e=>u("reviewText",e)}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Rating:","b-testimonials-block"),labelPosition:"left",value:d,onChange:e=>u("rating",e),min:1,max:5})]})},PW=({attributes:e,setAttributes:t,setActiveIndex:n,activeIndex:o})=>{const{items:i}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Testimonials","b-testimonials-block"),children:(0,l.jsx)(_s,{value:i,onChange:t,attributes:e,setAttributes:t,arrKey:"items",newItem:LW,ItemSettings:EW,itemLabel:"Item",activeIndex:o,setActiveIndex:n,design:"sortable",title:"name"})})})},AW=e=>{const{attributes:t,setAttributes:n,setActiveIndex:o}=e,{columns:i,columnGap:s,rowGap:a,layout:r,theme:c,items:d,elements:u,background:p,padding:g,shadow:b,border:f,image:k,imgBorder:w,nameTypo:_,nameColor:C,degTypo:j,degColor:$,textTypo:S,textColor:T,starIconColor:M,textLength:N,grid2Bg:L,grid2Padding:E,slider:P}=t,[A,B]=(0,m.useState)("desktop"),{autoPlay:I,mouseWheel:O,navigation:R}=P,z=(e,o,i)=>{const s={...t[e]};s[o]=i,n({[e]:s})};return(0, |
| 563 |
l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:NW,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(PW,{...e}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Image","b-testimonials-block"),labelPosition:"left",checked:u?.img,onChange:e=>z("elements","img",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Name","b-testimonials-block"),labelPosition:"left",checked:u?.name,onChange:e=>z("elements","name",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Designation","b-testimonials-block"),labelPosition:"left",checked:u?.deg,onChange:e=>z("elements","deg",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Review Text","b-testimonials-block"),labelPosition:"left",checked:u?.reviewText,onChange:e=>z("elements","reviewText",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Rating","b-testimonials-block"),labelPosition:"left",checked:u?.icon,onChange:e=>z("elements","icon",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Expanded Button","b-testimonials-block"),labelPosition:"left",checked:u?.expandBtn,onChange:e=>z("elements","expandBtn",e)})]}),u?.expandBtn&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{className:"",label:(0,x.__)("Expand Text","b-testimonials-block"),value:u?.expandText,onChange:e=>z("elements","expandText",e)}),(0,l.jsx)(y.TextControl,{className:"",label:(0,x.__)("Collapse Text","b-testimonials-block"),value:u?.collapseText,onChange:e=>z("elements","collapseText",e)})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0 mb0",children:(0,x.__)("Layout:","b-testimonials-block")}),(0,l.jsx)(y.SelectControl,{value:r,onChange:e=>n({layout:e}),options:TW})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0 mb0",children:(0,x.__)("Theme:","b-testimonials-block")}),(0,l.jsx)(y.SelectControl,{value:c,onChange:e=>n({theme:e,...SW(e,f)}),options:MW})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{mt:"0",children:(0,x.__)("Columns:","b-testimonials-block")}),(0,l.jsx)(Es,{device:A,onChange:e=>B(e)})]}),(0,l.jsx)(y.RangeControl,{value:i[A],onChange:e=>{n({columns:{...i,[A]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-testimonials-block"),labelPosition:"left",value:s,onChange:e=>n({columnGap:e}),units:[Ee(30),Pe(3),Ae(2)],isResetValueOnUnitChange:!0}),"slider"!==r&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-testimonials-block"),labelPosition:"left",value:a,onChange:e=>n({rowGap:e}),units:[Ee(40),Pe(3),Ae(2.5)],isResetValueOnUnitChange:!0})]}),"slider"===r&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("AutoPlay","b-testimonials-block"),labelPosition:"left",checked:I,onChange:e=>z("slider","autoPlay",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("MouseWheel","b-testimonials-block"),labelPosition:"left",checked:O,onChange:e=>z("slider","mouseWheel",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Navigation","b-testimonials-block"),labelPosition:"left",checked:R,onChange:e=>z("slider","navigation",e)})]})]}),"style"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Card","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Background Color","b-testimonials-block"),value:p,onChange:e=>n({background:e})}),(0,l.jsx)(y.__experimentalBoxControl,{label:(0,x.__)("Padding","b-testimonials-block"),values:g,onChange:e=>n({padding:e}),resetValues:{top:"5px",right:"10px",bottom:"5px",left:"10px"},units:[Ee(3),Ae(2)]}),(0,l.jsx)(Xc,{className:"",label:(0,x.__)("Border","b-testimonials-block"),value:f,onChange:e=>n({border:e})}),(0,l.jsx)(nd,{label:(0,x.__)("Shadow:","sound-cloud"),value:b,onChange:e=>n({shadow:e}),produce:Ob})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Width:","b-testimonials-block"),labelPosition:"left",value:k?.width,onChange:e=>z("image","width",e)}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Height:","b-testimonials-block"),labelPosition:"left",value:k?.height,onChange:e=>z("image","height",e)})]}),(0,l.jsx)(Xc,{className:"",label:(0,x.__)("Border","b-testimonials-block"),value:w,onChange:e=>n({imgBorder:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Name","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-testimonials-block"),value:_,onChange:e=>n({nameTypo:e}),produce:Ob}),(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Color","b-testimonials-block"),value:C,onChange:e=>n({nameColor:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Designation","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-testimonials-block"),value:j,onChange:e=>n({degTypo:e}),produce:Ob}),(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Color","b-testimonials-block"),value:$,onChange:e=>n({degColor:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Review Text","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Os,{className:"mt10",label:(0,x.__)("Typography","b-testimonials-block"),value:S,onChange:e=>n({textTypo:e}),produce:Ob}),(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Color","b-testimonials-block"),value:T,onChange:e=>n({textColor:e})}),(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Rating Icon Color","b-testimonials-block"),value:M,onChange:e=>n({starIconColor:e})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Excerpt length","b-testimonials-block"),labelPosition:"left",value:N,onChange:e=>{n({textLength:e})},min:10,max:1e3,step:1,beforeIcon:"grid-view"})]}),("theme_2"===r||"masonry"===r)&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Top","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Background Color","b-testimonials-block"),value:L,onChange:e=>n({grid2Bg:e})}),(0,l.jsx)(y.__experimentalBoxControl,{label:(0,x.__)("Padding","b-testimonials-block"),values:E,onChange:e=>n({grid2Padding:e}),resetValues:{top:"10px",right:"10px",bottom:"10px",left:"10px"},units:[Ee(3),Ae(2)]})]})]})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Item","b-blocks"),onClick:()=>{n({items:[...d,{img:{url:"https://templates.bplugins.com/wp-content/uploads/2025/02/p-29.png"},name:"John Doe",deg:"Developer",reviewText:"It is a long-established fact that a reader will be distracted by the readable content of a page when looking at its layout",rating:4}]}),o(d.length)},children:(0,l.jsx)(y.Dashicon,{icon:"plus",size:23})})})})]})},BW=({attributes:e,id:t})=>{const{columnGap:n,rowGap:o,background:i,padding:s,border:a,shadow:r,image:c,imgBorder:d,nameTypo:u,nameColor:p,degTypo:h,degColor:g,textTypo:m,textColor:b,expandedTypo:f,grid2Bg:x,grid2Padding:y}=e,v=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{ |
| 564 |
__html:`\n\t\t${pa("",u)?.googleFontLink}\n\t\t${pa("",h)?.googleFontLink}\n\t\t${pa("",m)?.googleFontLink}\n\t\t${pa("",f)?.googleFontLink}\n\t\t${pa(`${v} .layoutSection .single .name`,u)?.styles}\n\t\t${pa(`${v} .layoutSection .single .deg`,h)?.styles}\n\t\t${pa(`${v} .layoutSection .single .reviewText`,m)?.styles}\n\n\t\t${v} .slider-layout .swiper-slide {\n\t\t\t \n\t\t} \n\n\t\t${v} .layoutSection {\n\t\t\tgrid-gap: ${o} ${n};\n\t\t}\n\n\t\t${v} .theme_2 .single .top, ${v} .masonry .single .top {\n\t\t\tbackground:${x};\n\t\t\tpadding:${he(y)};\n\t\t}\n\n\t\t${v} .masonry .single .top::after {\n\t\t\tborder-right: 27px solid ${x};\n\t\t}\n\n\t\t${v} .theme_4 .single .bottom{\n\t\t\tborder-top:${a?.width} ${a?.style} ${a?.color};\n\t\t}\n\n\t\t${v} .theme_4 .single .info {\n\t\t\tborder-left: ${a?.width} ${a?.style} ${a?.color};\n\t\t}\n\n\t\t${v} .layoutSection .single {\n\t\t\tbackground:${i};\n\t\t\tpadding:${he(s)};\n\t\t\t${ia(a)};\n\t\t\tbox-shadow: ${da(r)};\n\t\t}\n \n\t\t${v} .layoutSection .single .img{\n\t\t\twidth:${c?.width}px;\n\t\t\theight:${c?.height}px;\n\t\t\t${ia(d)};\n\t\t}\n\n\t\t${v} .layoutSection .single .name{\n\t\t\tcolor:${p};\n\t\t}\n\n\t\t${v} .layoutSection .single .deg{\n\t\t\tcolor:${g};\n\t\t}\n\n\t\t${v} .layoutSection .single .reviewText{\n\t\t\tcolor:${b};\n\t\t}\n\n\t`}})},IW=({attributes:e,children:t,img:n})=>{const{elements:o}=e;return o?.img&&(0,l.jsx)("div",{className:"authorImg",children:(0,l.jsxs)("div",{className:"img",children:[(0,l.jsx)("img",{src:n?.url,alt:n?.title}),t]})})},OW=({attributes:e,itemEls:t})=>{const{elements:n}=e;return n.reviewText&&t?.reviewText},RW=({attributes:e,getStar:t,rating:n,starIconColor:o})=>{const{elements:i}=e;return i?.icon&&(0,l.jsx)("div",{className:"rating",children:t(n,o)})},zW=({item:e,index:t,itemEls:n,attributes:o,activeIndex:i,setActiveIndex:s,isBackend:a})=>{const{starIconColor:r}=o,{img:c,reviewText:d,rating:u}=e;return(0,l.jsxs)("div",{className:"single "+(a&&t===i?"btbNowEditing":""),onClick:()=>a&&s(t),children:[(0,l.jsxs)("div",{className:"top",children:[(0,l.jsx)(IW,{attributes:o,img:c,children:n.img}),(0,l.jsxs)("div",{className:"info",children:[n.name,n.deg]})]}),(0,l.jsx)(RW,{attributes:o,getStar:jW,rating:u,starIconColor:r}),(0,l.jsx)("div",{className:"body",children:(0,l.jsx)(OW,{attributes:o,itemEls:n,isBackend:a,reviewText:d})})]},t)},DW=({attributes:e,itemEls:t,item:n,index:o,activeIndex:i,setActiveIndex:s,isBackend:a})=>{const{starIconColor:r}=e,{img:c,reviewText:d,rating:u}=n;return(0,l.jsxs)("div",{className:"single "+(a&&o===i?"btbNowEditing":""),onClick:()=>a&&s(o),children:[(0,l.jsx)("div",{className:"top",children:(0,l.jsx)(IW,{attributes:e,img:c,children:t.img})}),(0,l.jsx)("div",{className:"body",children:(0,l.jsx)(OW,{itemEls:t,attributes:e,isBackend:a,reviewText:d})}),(0,l.jsxs)("div",{className:"footer",children:[(0,l.jsxs)("div",{className:"info",children:[t.name,t.deg]}),(0,l.jsx)(RW,{attributes:e,getStar:jW,rating:u,starIconColor:r})]})]},o)},FW=({attributes:e,itemEls:t,item:n,index:o,activeIndex:i,setActiveIndex:s,isBackend:a})=>{const{starIconColor:r,grid2Bg:c}=e,{img:d,reviewText:u,rating:p}=n;return(0,l.jsxs)("div",{className:"single "+(a&&o===i?"btbNowEditing":""),onClick:()=>a&&s(o),children:[(0,l.jsxs)("div",{className:"top",children:[(0,l.jsx)(RW,{attributes:e,getStar:jW,rating:p,starIconColor:r}),(0,l.jsx)(OW,{attributes:e,itemEls:t,isBackend:a,reviewText:u}),(0,l.jsx)("div",{className:"icon",children:(h=c,(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20px",height:"20px",viewBox:"0 0 19 13",fill:h,style:{left:"24px"},children:(0,l.jsx)("path",{d:"M0.965704 0.000125914H10.3736L19 5.15272e-05C19 5.15272e-05 16.2331 5.15665 10.3736 8.99489C6.68171 11.4132 3.12703 12.3741 1.00222 12.7541C0.488597 12.8459 0.227225 12.1436 0.617463 11.7973C2.03909 10.5355 3.88298 8.3072 3.88294 5.23718C3.88287 9.44134e-05 0.965704 0.000125914 0.965704 0.000125914Z"})}))})]}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsx)(IW,{attributes:e,img:d,children:t.img}),(0,l.jsxs)("div",{className:"info",children:[t.name,t.deg]})]})]},o);var h},HW=({attributes:e,itemEls:t,item:n,index:o,activeIndex:i,setActiveIndex:s,isBackend:a})=>{const{starIconColor:r}=e,{img:c,reviewText:d,rating:u}=n;return(0,l.jsxs)("div",{className:"single "+(a&&o===i?"btbNowEditing":""),onClick:()=>a&&s(o),children:[(0,l.jsxs)("div",{className:"top",children:[(0,l.jsx)(OW,{attributes:e,itemEls:t,isBackend:a,reviewText:d},o),(0,l.jsx)(RW,{attributes:e,getStar:jW,rating:u,starIconColor:r},o)]}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsxs)("div",{className:"info",children:[t.name,t.deg]}),(0,l.jsx)(IW,{attributes:e,img:c,children:t.img})]})]},o)},WW=({itemEls:e,item:t,index:n,attributes:o,activeIndex:i,setActiveIndex:s,isBackend:a})=>{const{nameColor:r,quoteIcon:c}=o,{img:d,reviewText:u}=t;return(0,l.jsxs)("div",{className:"single "+(a&&n===i?"btbNowEditing":""),onClick:()=>a&&s(n),children:[(0,l.jsx)("div",{className:"top",children:(0,l.jsx)(IW,{attributes:o,img:d,children:e.img})}),(0,l.jsx)("div",{className:"body",children:(0,l.jsx)(OW,{attributes:o,itemEls:e,isBackend:a,reviewText:u})}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsx)("div",{className:"rightQuote",children:(p=r,h=c?.size,(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:p,width:h,height:h,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"})}))}),(0,l.jsxs)("div",{className:"info",children:[e.name,e.deg]})]})]},n);var p,h},UW=({itemEls:e,item:t,index:n,attributes:o,activeIndex:i,setActiveIndex:s,isBackend:a})=>{const{starIconColor:r}=o,{img:c,reviewText:d,rating:u}=t;return(0,l.jsxs)("div",{className:"single "+(a&&n===i?"btbNowEditing":""),onClick:()=>a&&s(n),children:[(0,l.jsxs)("div",{className:"top",children:[(0,l.jsx)(IW,{attributes:o,img:c,children:e.img}),(0,l.jsx)("div",{className:"right",children:(0,l.jsx)(OW,{attributes:o,itemEls:e,isBackend:a,reviewText:d})})]}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsxs)("div",{className:"info",children:[e.name,e.deg]}),(0,l.jsx)(RW,{attributes:o,getStar:jW,rating:u,starIconColor:r})]})]},n)},GW=({itemEls:e,item:t,index:n,attributes:o,activeIndex:i,setActiveIndex:s,isBackend:a})=>{const{starIconColor:r}=o,{img:c,reviewText:d,rating:u}=t;return(0,l.jsxs)("div",{className:"single "+(a&&n===i?"btbNowEditing":""),onClick:()=>a&&s(n),children:[(0,l.jsx)("div",{className:"top",children:(0,l.jsx)(OW,{attributes:o,itemEls:e,isBackend:a,reviewText:d})}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsx)(IW,{attributes:o,img:c,children:e.img}),(0,l.jsxs)("div",{className:"info",children:[e.name,e.deg,(0,l.jsx)(RW,{attributes:o,getStar:jW,rating:u,starIconColor:r},n)]})]})]},n)},VW=({attributes:e,itemsEls:t,itemProps:n})=>{const{items:o,slider:i,columnGap:s,theme:a,columns:r}=e,{desktop:c,tablet:d,mobile:u}=r,{autoPlay:p,mouseWheel:h,navigation:g}=i,[b,f]=(0,m.useState)(!0),x=()=>(0,l.jsx)(Hx,{modules:[Nf,Af,Bf,Tf],spaceBetween:s,slidesPerView:u,breakpoints:{576:{slidesPerView:d},768:{slidesPerView:c}},autoplay:p,mousewheel:h,navigation:g,pagination:!0,scrollbar:{draggable:!0},loop:!0,children:o.map(((e,o)=>{const i={item:e,index:o,itemEls:t[o],...n};switch(a){case"default":return(0,l.jsx)(Wx,{children:(0,l.jsx)(zW,{...i})},o);case"theme_1":return(0,l.jsx)(Wx,{children:(0,l.jsx)(DW,{...i})},o);case"theme_2":return(0,l.jsx)(Wx,{children:(0,l.jsx)(FW,{...i})},o);case"theme_3":return(0,l.jsx)(Wx,{children:(0,l.jsx)(HW,{...i})},o);case"theme_4":return(0,l.jsx)(Wx,{children:(0,l.jsx)(WW,{...i})},o);case"theme_5":return(0,l.jsx)(Wx,{children:(0, |
| 565 |
l.jsx)(UW,{...i})},o);case"theme_6":return(0,l.jsx)(Wx,{children:(0,l.jsx)(GW,{...i})},o);default:return null}}))});return(0,m.useEffect)((()=>{f(!b)}),[o,i,s,a,r]),(0,l.jsx)(x,{})},qW=({itemsEls:e,ToolbarButton:t,MediaUpload:n,MediaUploadCheck:o,attributes:i,setActiveIndex:s,activeIndex:a,updateItem:r,isBackend:c=!1,__,RichText:d})=>{const{items:u,columnGap:p,rowGap:h,layout:g,theme:m,columns:b}=i,{desktop:f,tablet:x,mobile:y}=b,v={attributes:i,setActiveIndex:s,activeIndex:a,updateItem:r,isBackend:c,__,RichText:d,MediaUpload:n,MediaUploadCheck:o,ToolbarButton:t},k=(t,n)=>{const o={item:t,index:n,itemEls:e[n],...v};switch(m){case"default":return(0,l.jsx)(zW,{...o});case"theme_1":return(0,l.jsx)(DW,{...o});case"theme_2":return(0,l.jsx)(FW,{...o});case"theme_3":return(0,l.jsx)(HW,{...o});case"theme_4":return(0,l.jsx)(WW,{...o});case"theme_5":return(0,l.jsx)(UW,{...o});case"theme_6":return(0,l.jsx)(GW,{...o});default:return null}};return(0,l.jsx)("div",{className:`layoutSection ${g}-layout ${m} columns-${f} columns-tablet-${x} columns-mobile-${y}`,children:(()=>{switch(g){case"masonry":return(0,l.jsx)(sR,{columnsCountBreakPoints:{0:y,576:x,768:f},children:(0,l.jsx)(aR,{columnsCount:3,gutter:`${h} ${p}`,children:u.map(((e,t)=>k(e,t)))})});case"slider":return(0,l.jsx)(VW,{attributes:i,itemsEls:e,itemProps:v});case"default":return u.map(((e,t)=>k(e,t)));default:return null}})()})},YW=(0,f.withDispatch)(((e,t)=>({selectBlock:()=>{e("core/block-editor").selectBlock(t.clientId)}})))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,selectBlock:s}=e,{items:a,elements:r,textLength:c}=t;(0,m.useEffect)((()=>{o&&n({cId:o.substring(0,10)})}),[o]),(0,m.useEffect)((()=>me()),[i]);const[d,u]=(0,m.useState)(0),p=(e,t,o=!1)=>{const i=Ob(a,(n=>{o?n[d][e][o]=t:n[d][e]=t}));n({items:i})},g=a.map((e=>{const{name:n,deg:o,img:i,reviewText:s}=e,a=(d=s,d.replace(/(<([^>]+)>)/gi,"")).length;var d;return{img:(0,l.jsx)("div",{className:"upload",children:(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],value:i,onSelect:({id:e,url:t,alt:n,title:o})=>p("img",{id:e,url:t,alt:n,title:o}),render:({open:e})=>(0,l.jsx)(y.ToolbarButton,{label:"upload",icon:_W,onClick:e})})})}),name:r?.name&&(0,l.jsx)(h.RichText,{tagName:"h3",className:"name",value:n,onChange:e=>p("name",e),placeholder:(0,x.__)("Enter your name","b-testimonials-block"),inlineToolbar:!0}),deg:r?.deg&&(0,l.jsx)(h.RichText,{tagName:"h5",className:"deg",value:o,onChange:e=>p("deg",e),placeholder:(0,x.__)("Enter your designation","b-testimonials-block"),inlineToolbar:!0}),reviewText:(0,l.jsx)(KW,{attributes:t,elements:r,contentLength:a,textLength:c,reviewText:s,updateItem:p})}}));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(AW,{attributes:t,setAttributes:n,updateItem:p,activeIndex:d,setActiveIndex:u}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),onClick:()=>s(o),children:[(0,l.jsx)(BW,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{className:"btbTestimonialsDir",children:(0,l.jsx)(qW,{itemsEls:g,ToolbarButton:y.ToolbarButton,MediaUpload:h.MediaUpload,MediaUploadCheck:h.MediaUploadCheck,isBackend:!0,attributes:t,activeIndex:d,setActiveIndex:u,updateItem:p,__:x.__,RichText:h.RichText})})]})]})})),KW=({attributes:e,elements:t,contentLength:n,textLength:o,reviewText:i,updateItem:s})=>{const[a,r]=(0,m.useState)(!1);return(0,l.jsxs)(l.Fragment,{children:[t?.reviewText&&(0,l.jsx)(h.RichText,{tagName:"p",className:"reviewText",value:i,onChange:e=>s("reviewText",e),placeholder:(0,x.__)("Enter your review","b-testimonials-block"),inlineToolbar:!0}),n>o&&(0,l.jsx)(wW,{attributes:e,reviewText:i,expanded:a,onChange:()=>r(!a)})]})};Nl(kW.UU)&&(0,p.registerBlockType)(kW.UU,{icon:Xr,edit:YW}) |
| 566 |
;const QW=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/timeline","title":"Timeline","category":"bBlocks","description":"A vertical timeline. Each entry is a Timeline Item child block holding a date, an icon marker and any inner blocks you like.","keywords":["timeline","history","roadmap","events","milestones","steps"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"desktop":{"direction":"vertical","side":"alternate","itemGap":"10px","cardWidth":"100%","cardGap":"0px","markerGap":"10px"},"tablet":{"direction":"","side":"","itemGap":"","cardWidth":"","cardGap":"","markerGap":""},"mobile":{"direction":"","side":"","itemGap":"","cardWidth":"","cardGap":"","markerGap":""}}},"connector":{"type":"object","default":{"line":{"show":true,"style":"solid","bg":{"type":"solid","color":"#d9d9d9"},"progress":false,"activeBg":{"type":"solid","color":"#1e1e1e"},"progressFade":false,"extent":"markers","desktop":{"width":"2px","dash":"8px","gap":"6px"},"tablet":{"width":"","dash":"","gap":""},"mobile":{"width":"","dash":"","gap":""}},"arrow":{"show":true,"align":"center","color":"","desktop":{"size":"14px","offset":"16px"},"tablet":{"size":"","offset":""},"mobile":{"size":"","offset":""}}}},"marker":{"type":"object","default":{"shape":"circle","transition":300,"pulse":{"show":false,"bg":{"type":"solid","color":""},"speed":2400},"normal":{"bg":{"type":"solid","color":"#efefef"},"color":{"icon":"#1e1e1e"},"border":{"width":"0px"},"ring":{"width":"0px","style":"solid","offset":"0px","color":""},"shadow":[]},"hover":{"bg":{"type":"solid","color":""},"color":{"icon":""},"border":{},"ring":{"width":"","style":"","offset":"","color":""},"shadow":[]},"desktop":{"size":"34px","iconSize":"16px","radius":{}},"tablet":{"size":"","iconSize":"","radius":{}},"mobile":{"size":"","iconSize":"","radius":{}}}},"card":{"type":"object","default":{"normal":{"bg":{"type":"solid","color":"#efefef"},"border":{"width":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]},"hover":{"bg":{"type":"solid","color":""},"border":{}},"desktop":{"padding":{"top":"16px","right":"16px","bottom":"16px","left":"16px"},"radius":{"top":"4px","right":"4px","bottom":"4px","left":"4px"}},"tablet":{"padding":{},"radius":{}},"mobile":{"padding":{},"radius":{}}}},"date":{"type":"object","default":{"show":true,"color":"#1e1e1e","typo":{"fontSize":{"desktop":"16px"}},"desktop":{"gap":"16px"},"tablet":{"gap":""},"mobile":{"gap":""}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false,"anchor":true},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),ZW=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],XW=[{label:(0,x.__)("Vertical","b-blocks"),value:"vertical"},{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal"}],JW=XW.map((e=>e.value)),eU=[{label:(0,x.__)("Alternate","b-blocks"),value:"alternate"},{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}].map((e=>e.value)),tU=[{label:(0,x.__)("Between markers","b-blocks"),value:"markers"},{label:(0,x.__)("Full length","b-blocks"),value:"full"}],nU=tU.map((e=>e.value)),oU=["start","center","end"],iU=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Rounded","b-blocks"),value:"rounded"},{label:(0,x.__)("Square","b-blocks"),value:"square"},{label:(0,x.__)("Diamond","b-blocks"),value:"diamond"},{label:(0,x.__)("Hexagon","b-blocks"),value:"hexagon"}],sU=(iU.map((e=>e.value)),{circle:"50%",rounded:"25%",square:"0",diamond:"0",hexagon:"0"}),aU=["hexagon"],rU={diamond:45},lU=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"},{label:(0,x.__)("Double","b-blocks"),value:"double"}],cU=(lU.map((e=>e.value)),(e={})=>{const{width:t,style:n,offset:o,color:i}=e;return[t?`outline-width: ${t};`:"",n?`outline-style: ${n};`:"",i?`outline-color: ${i};`:"",o?`outline-offset: ${o};`:""].filter(Boolean).join(" ")}),dU=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"}],uU=dU.map((e=>e.value)),pU=["dashed","dotted"],hU=((0,x.__)("Auto (follow layout)","b-blocks"),(0,x.__)("Left","b-blocks"),(0,x.__)("Right","b-blocks"),"b-blocks/timeline"),gU="b-blocks/timeline-item",mU=[gU],bU="<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'><path d='M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z'/></svg>",fU=e=>[["core/heading",{level:3,content:e}],["core/paragraph",{content:(0,x.__)("Describe what happened at this point on the timeline.","b-blocks")}]],xU=[[gU,{date:"01-01-2026",icon:bU},fU((0,x.__)("First milestone","b-blocks"))],[gU,{date:"01-01-2026",icon:bU},fU((0,x.__)("Second milestone","b-blocks"))],[gU,{date:"01-01-2026",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z'/></svg>"},fU((0,x.__)("Third milestone","b-blocks"))]],yU=(e,t)=>{if(null==t)return e;if(Array.isArray(t)){ |
| 567 |
const n=e&&"object"==typeof e&&!Array.isArray(e);return 0===t.length&&n?e:t}if("object"!=typeof t)return t;if(!e||"object"!=typeof e||Array.isArray(e))return t;const n={...e};return Object.keys(t).forEach((o=>{n[o]=yU(e[o],t[o])})),n},vU=Object.fromEntries(Object.entries(QW.attributes).map((([e,t])=>[e,t.default]))),kU=(e={})=>yU(vU,e),wU=(e={})=>{const{layout:t={},connector:n={},date:o={}}=e,{line:i={},arrow:s={}}=n,a=(e,n,o,i)=>("desktop"===e?[t.desktop?.[n]]:"tablet"===e?[t.tablet?.[n],t.desktop?.[n]]:[t.mobile?.[n],t.tablet?.[n],t.desktop?.[n]]).find((e=>o.includes(e)))||i,r=e=>a(e,"side",eU,"alternate"),l=e=>a(e,"direction",JW,"vertical"),c=nU.includes(i.extent)?i.extent:"markers",d=uU.includes(i.style)?i.style:"solid",u=oU.includes(s.align)?s.align:"center";return["b-blocks-timeline",`b-blocks-timeline-desktop-${l("desktop")}`,`b-blocks-timeline-tablet-${l("tablet")}`,`b-blocks-timeline-mobile-${l("mobile")}`,`b-blocks-timeline-desktop-${r("desktop")}`,`b-blocks-timeline-tablet-${r("tablet")}`,`b-blocks-timeline-mobile-${r("mobile")}`,!1===i.show?"b-blocks-timeline-no-line":"",`b-blocks-timeline-line-${d}`,i.progress?"b-blocks-timeline-progress":"",i.progress&&i.progressFade?"b-blocks-timeline-progress-fade":"","full"===c?"b-blocks-timeline-line-full":"",!1===s.show?"b-blocks-timeline-no-arrow":"",`b-blocks-timeline-arrow-${u}`,!1===o.show?"b-blocks-timeline-no-date":""].filter(Boolean).join(" ")},_U=(e={})=>["b-blocks-timeline-item",["left","right"].includes(e.side)?`b-blocks-timeline-side-${e.side}`:"",oU.includes(e.arrowAlign)?`b-blocks-timeline-item-arrow-${e.arrowAlign}`:""].filter(Boolean).join(" "),CU=e=>{const t=sU[e];return`${void 0===t?"":`border-radius: ${t};`} ${aU.includes(e)?"clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);":""}`},jU=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:s,connector:a,marker:r,card:c,date:d,advanced:u}=kU(e),{line:p,arrow:h}=a,g=rU[r.shape]||0,m=aU.includes(r.shape),b=oa(r.pulse?.bg,!0,!0,!1)||oa(r.normal.bg,!0,!0,!1),f=`#${o}`,x=`${f} .b-blocks-timeline-items`,y=`${f} .b-blocks-timeline-item`,v=`${f} .b-blocks-timeline-content`,k=`${f} .b-blocks-timeline-card`,w=`${f} .b-blocks-timeline-marker`,_=`${f} .b-blocks-timeline-date`,C=e=>"horizontal"!==(e=>("desktop"===e?s.desktop?.direction:"tablet"===e?s.tablet?.direction||s.desktop?.direction:s.mobile?.direction||s.tablet?.direction||s.desktop?.direction)||"vertical")(e),j=(e,t)=>"desktop"===e?p.desktop[t]:"tablet"===e?p.tablet[t]||p.desktop[t]:p.mobile[t]||p.tablet[t]||p.desktop[t],$=pU.includes(p.style),S=(e,t,n,o)=>`\n\t\t${f} .b-blocks-timeline-item ${t}{ ${n} }\n\t\t${f}.b-blocks-timeline-${e}-right .b-blocks-timeline-item ${t}{ ${o} }\n\t\t${f}.b-blocks-timeline-${e}-alternate .b-blocks-timeline-item:where(:nth-of-type(even)) ${t}{ ${o} }\n\t\t${f} .b-blocks-timeline-item.b-blocks-timeline-side-left ${t}{ ${n} }\n\t\t${f} .b-blocks-timeline-item.b-blocks-timeline-side-right ${t}{ ${o} }\n\t`,T=e=>{const t=C(e),n=r[e].size,o=g&&n?`calc(${n} / 1.4142)`:n,i=j(e,"width"),a=n?`calc(${n} / 2)`:"17px",l="full"===p.extent?"0px":a,u=`var(--bb-tl-line-start, ${l})`,m=`var(--bb-tl-line-end, ${l})`,b=t?`top: ${u}; bottom: ${m}; left: 50%; right: auto; transform: translateX(-50%);`:`left: ${u}; right: ${m}; top: var(--bb-tl-line-cross, 50%); bottom: auto; transform: translateY(-50%);`,_=s[e].cardGap||"0px",T=h[e].size||"14px",M=h[e].offset||"16px",N=d[e].gap||"16px",L="solid"===(c.normal.bg?.type||"solid")?c.normal.bg?.color:"",E=h.color||L||"#efefef",P=!1===h.show?"0px":T,A=(e,n)=>t?`padding-inline: ${e} ${n};`:`padding-block: ${e} ${n};`,B=`\n\t\t\t${S(e,".b-blocks-timeline-content",A("0",`calc(${_} + ${P})`),A(`calc(${_} + ${P})`,"0"))}\n\t\t\t${S(e,".b-blocks-timeline-date",A(N,"0"),A("0",N))}\n\t\t`,I=(n,o)=>{const i=(n=>{const o=`calc((100% - ${((e,t)=>"desktop"===e?s.desktop[t]:"tablet"===e?s.tablet[t]||s.desktop[t]:s.mobile[t]||s.tablet[t]||s.desktop[t])(e,"cardWidth")||"100%"}) / 2)`,i=t?`calc(${M} + ${T})`:`calc(${o} + ${M} + ${T})`,a=(e,n)=>t?`margin-block: ${e} ${n};`:`margin-inline: ${e} ${n};`;return"center"===n?{arrow:"",anchor:`${a("0","0")}`}:{arrow:(r=n,(t?"start"===r?`top: ${M}; bottom: auto;`:`top: auto; bottom: ${M};`:"start"===r?`inset-inline-start: ${M}; inset-inline-end: auto;`:`inset-inline-start: auto; inset-inline-end: ${M};`)+" transform: none;"),anchor:"start"===n?a(i,"0"):a("0",i)};var r})(o);return`\n\t\t\t\t${n} .b-blocks-timeline-card::after{ ${i.arrow} }\n\t\t\t\t${n} .b-blocks-timeline-marker,\n\t\t\t\t${n} .b-blocks-timeline-date{ ${i.anchor} }\n\t\t\t`};return`\n\t\t${B}\n\t\t${k}::after{\n\t\t\t${na("width",t?T:`calc(${T} * 2)`)}\n\t\t\t${na("height",t?`calc(${T} * 2)`:T)}\n\t\t\t${na("background",E)}\n\t\t}\n\t\t${I(`${f} .b-blocks-timeline-item`,h.align||"center")}\n\t\t${["start","center","end"].map((e=>I(`${f} .b-blocks-timeline-item.b-blocks-timeline-item-arrow-${e}`,e))).join("")}\n\n\t\t${x}{\n\t\t\t${na(t?"row-gap":"column-gap",s[e].itemGap)}\n\t\t}\n\t\t${x}::before,\n\t\t${x}::after{\n\t\t\t${(e=>{return $?(t=(e=>{const t=C(e),n=j(e,"gap")||"6px";if("dotted"===p.style){const o=j(e,"width")||"2px";return{image:"radial-gradient(circle closest-side, #000 99%, transparent 100%)",size:t?`${o} calc(${o} + ${n})`:`calc(${o} + ${n}) ${o}`,repeat:t?"repeat-y":"repeat-x"}}const o=j(e,"dash")||"8px";return{image:`repeating-linear-gradient(${t?"to bottom":"to right"}, #000 0 ${o}, transparent ${o} calc(${o} + ${n}))`,size:"auto",repeat:"repeat"}})(e),`\n\t\t\t-webkit-mask-image: ${t.image};\n\t\t\tmask-image: ${t.image};\n\t\t\t-webkit-mask-size: ${t.size};\n\t\t\tmask-size: ${t.size};\n\t\t\t-webkit-mask-repeat: ${t.repeat};\n\t\t\tmask-repeat: ${t.repeat};\n\t\t\t-webkit-mask-position: center;\n\t\t\tmask-position: center;\n\t`):"";var t})(e)}\n\t\t}\n\t\t${x}::before{\n\t\t\t${b}\n\t\t\t${oa(p.bg)}\n\t\t\t${na("width",t?i:"auto")}\n\t\t\t${na("height",t?"auto":i)}\n\t\t}\n\t\t${x}::after{\n\t\t\t${b}\n\t\t\t${oa(p.activeBg)}\n\t\t\t${na("width",t?i:"auto")}\n\t\t\t${na("height",t?"auto":i)}\n\t\t}\n\t\t${y}{\n\t\t\t${na(t?"column-gap":"row-gap",s[e].markerGap)}\n\t\t}\n\t\t${v}{\n\n\t\t}\n\t\t${k}{\n\t\t\t${na("width",s[e].cardWidth)}\n\t\t\t${na("padding",ha(c[e].padding))}\n\t\t\t${na("border-radius",ha(c[e].radius))}\n\t\t}\n\t\t${w}{\n\t\t\t${na("width",o)}\n\t\t\t${na("height",o)}\n\t\t\t${na("font-size",r[e].iconSize)}\n\t\t\t${na("border-radius",ha(r[e].radius))}\n\t\t}\n\n\t\t`};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{ |
| 568 |
__html:`\n\t\t\t${pa("",d.typo).googleFontLink}\n\t\t\t${pa(_,d.typo).styles}\n\n\t\t\t${k}{\n\t\t\t\t${oa(c.normal.bg)}\n\t\t\t\t${sa(c.normal.border)}\n\t\t\t\t${na("box-shadow",la(c.normal.shadow||[]))}\n\t\t\t}\n\t\t\t${k}:hover{\n\t\t\t\t${oa(c.hover.bg)}\n\t\t\t\t${sa(c.hover.border)}\n\t\t\t}\n\t\t\t${w}{\n\t\t\t\t${oa(r.normal.bg)}\n\t\t\t\t${na("color",r.normal.color.icon)}\n\t\t\t\t${sa(r.normal.border)}\n\t\t\t\t${CU(r.shape)}\n\t\t\t\t${m?"":cU(r.normal.ring)}\n\t\t\t\t${na("box-shadow",la(r.normal.shadow||[]))}\n\t\t\t\t${g?`rotate: ${g}deg;`:""}\n\t\t\t\t${r.transition?`transition: background ${r.transition}ms ease, color ${r.transition}ms ease, border-color ${r.transition}ms ease, outline-color ${r.transition}ms ease, outline-offset ${r.transition}ms ease, box-shadow ${r.transition}ms ease;`:""}\n\t\t\t}\n\t\t\t${g?`${w} svg{ rotate: -${g}deg; }`:""}\n\t\t\t${w}:hover{\n\t\t\t\t${oa(r.hover.bg)}\n\t\t\t\t${na("color",r.hover.color.icon)}\n\t\t\t\t${sa(r.hover.border)}\n\t\t\t\t${m?"":cU(r.hover.ring)}\n\t\t\t\t${na("box-shadow",la(r.hover.shadow||[]))}\n\t\t\t}\n\t\t\t${r.pulse?.show&&!m?`\n\t\t\t\t${w}::after{\n\t\t\t\t\t${b}\n\t\t\t\t\tanimation-name: bb-tl-marker-pulse;\n\t\t\t\t\t${na("animation-duration",r.pulse.speed?`${r.pulse.speed}ms`:"")}\n\t\t\t\t}\n\t\t\t`:""}\n\t\t\t${_}{\n\t\t\t\t${na("color",d.color)}\n\t\t\t}\n\n\t\t\t${T("desktop")}\n\n\t\t\t${t}{\n\t\t\t\t${T("tablet")}\n\t\t\t}\n\n\t\t\t${n}{\n\t\t\t\t${T("mobile")}\n\t\t\t}\n\n\t\t\t${_a(o,u,i,!1)}\n\t\t\t`}})},$U=e=>Math.round(1e3*e)/1e3,SU=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{layout:o}=e,i="horizontal"===(e=>("desktop"===e?o.desktop.direction:"tablet"===e?o.tablet.direction||o.desktop.direction:o.mobile.direction||o.tablet.direction||o.desktop.direction)||"vertical")(t),s=[..."desktop"===t?[]:[{label:(0,x.__)("Default","b-blocks"),value:""}],{label:(0,x.__)("Alternate","b-blocks"),value:"alternate"},{label:i?(0,x.__)("Above","b-blocks"):(0,x.__)("Left","b-blocks"),value:"left"},{label:i?(0,x.__)("Below","b-blocks"):(0,x.__)("Right","b-blocks"),value:"right"}];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Layout","b-blocks"),children:[(0,l.jsx)(y.__experimentalToggleGroupControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Direction","b-blocks")," ",(0,l.jsx)(_,{})]}),help:i?(0,x.__)("Entries run left to right along a horizontal line. Set a narrower breakpoint to turn it upright on smaller screens.","b-blocks"):(0,x.__)("Entries run top to bottom along a vertical line.","b-blocks"),value:o[t].direction||"",onChange:e=>n("layout",e,t,"direction"),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:[..."desktop"===t?[]:[{label:(0,x.__)("Default","b-blocks"),value:""}],...XW].map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))}),(0,l.jsx)(y.__experimentalToggleGroupControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Side","b-blocks")," ",(0,l.jsx)(_,{})]}),help:(0,x.__)("Alternate places entries on opposite sides. Set a narrower breakpoint to change it there — one card per row on phones, say. Any single entry can override this from its own settings.","b-blocks"),value:o[t].side||"",onChange:e=>n("layout",e,t,"side"),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:s.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Gap Between Entries","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",units:[Ee(),Ae(),Pe()],isUnitSelectTabbable:!0,value:o[t].itemGap,onChange:e=>n("layout",e,t,"itemGap")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Card Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ee(),Ae()],isUnitSelectTabbable:!0,value:o[t].cardWidth,onChange:e=>n("layout",e,t,"cardWidth")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Card Offset From Line","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",units:[Ee(),Ae(),Pe()],isUnitSelectTabbable:!0,value:o[t].cardGap,onChange:e=>n("layout",e,t,"cardGap")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Marker Spacing","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Ee(),Ae()],isUnitSelectTabbable:!0,value:o[t].markerGap,onChange:e=>n("layout",e,t,"markerGap")})]})})),TU=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{layout:o,connector:i}=e,{line:s,arrow:a}=i,r="horizontal"===(("desktop"===t?o.desktop.direction:"tablet"===t?o.tablet.direction||o.desktop.direction:o.mobile.direction||o.tablet.direction||o.desktop.direction)||"vertical"),c=pU.includes(s.style),d=[{label:r?(0,x.__)("Left","b-blocks"):(0,x.__)("Top","b-blocks"),value:"start"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:r?(0,x.__)("Right","b-blocks"):(0,x.__)("Bottom","b-blocks"),value:"end"}];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Connectors","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Line","b-blocks"),checked:!!s.show,onChange:e=>n("connector",e,"line","show"),__nextHasNoMarginBottom:!0}),s.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Line Style","b-blocks"),value:s.style,options:dU,onChange:e=>n("connector",e,"line","style"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Line Length","b-blocks"),labelPosition:"edge",help:(0,x.__)("Between markers stops the line at the first and last marker; full length runs it edge to edge.","b-blocks"),value:s.extent,options:tU,onChange:e=>n("connector",e,"line","extent"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Line Thickness","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Ee(),Ae()],isUnitSelectTabbable:!0,value:s[t].width,onChange:e=>n("connector",e,"line",t,"width")}),c&&(0,l.jsxs)(l.Fragment,{children:["dashed"===s.style&&(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Dash Length","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Ee(),Ae()],isUnitSelectTabbable:!0,value:s[t].dash,onChange:e=>n("connector",e,"line",t,"dash")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Ee(),Ae()],isUnitSelectTabbable:!0,help:"dotted"===s.style?(0,x.__)("Space between dots. The dot size follows the line thickness.","b-blocks"):(0,x.__)("Space between dashes.","b-blocks"),value:s[t].gap,onChange:e=>n("connector",e,"line",t,"gap")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Progress","b-blocks"),help:(0,x.__)("Fills the line as the reader scrolls down it. Works with any line style — the fill follows the same shape.","b-blocks"),checked:!!s.progress,onChange:e=>n("connector",e,"line","progress"),__nextHasNoMarginBottom:!0}),s.progress&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Fade Trailing End","b-blocks"),help:(0,x.__)("Dissolves the far end of the fill into the track, so it reads as a beam following the reader rather than a filled bar.","b-blocks"),checked:!!s.progressFade,onChange:e=>n("connector",e,"line","progressFade"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Arrow","b-blocks"),help:(0, |
| 569 |
x.__)("The small arrow that points from a card back to the line.","b-blocks"),checked:!!a.show,onChange:e=>n("connector",e,"arrow","show"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("br",{}),a.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalToggleGroupControl,{label:(0,x.__)("Arrow Alignment","b-blocks"),value:a.align,onChange:e=>n("connector",e,"arrow","align"),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:d.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Arrow Size","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Ee(),Ae()],isUnitSelectTabbable:!0,value:a[t].size,onChange:e=>n("connector",e,"arrow",t,"size")}),"center"!==a.align&&(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Arrow Offset","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Ee(),Ae(),Pe()],isUnitSelectTabbable:!0,help:(0,x.__)("Distance from the edge the arrow is aligned to.","b-blocks"),value:a[t].offset,onChange:e=>n("connector",e,"arrow",t,"offset")})]})]})})),MU=({attributes:e,updateObj:t})=>{const{marker:n}=e,o=aU.includes(n.shape);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Marker","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Shape","b-blocks"),labelPosition:"edge",help:o?(0,x.__)("The hexagon is cut to shape, so it cannot carry a ring or a pulse.","b-blocks"):(0,x.__)("Sets the corners. Border Radius in the Style tab takes them over as soon as you set one of them.","b-blocks"),value:n.shape,options:iU,onChange:e=>t("marker",e,"shape"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),!o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Pulse","b-blocks"),help:(0,x.__)("A halo that spreads out from behind every marker. It follows the marker’s shape and stops for readers who ask for reduced motion.","b-blocks"),checked:!!n.pulse.show,onChange:e=>t("marker",e,"pulse","show"),__nextHasNoMarginBottom:!0}),n.pulse.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Pulse Color:","b-blocks"),value:n.pulse.bg,onChange:e=>t("marker",e,"pulse","bg"),isImage:!1}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Pulse Speed (ms)","b-blocks"),value:n.pulse.speed,onChange:e=>t("marker",e,"pulse","speed"),min:600,max:6e3,step:100,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})]})},NU=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{card:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Card","b-blocks"),children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[t].padding,resetValues:{top:"16px",right:"16px",bottom:"16px",left:"16px"},units:[Ee(),Ae(),Pe()],onChange:e=>n("card",e,t,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].radius,resetValues:{top:"4px",right:"4px",bottom:"4px",left:"4px"},units:[Ee(),Pe(),Ae()],onChange:e=>n("card",e,t,"radius")})]})})),LU=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{date:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Date","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Date","b-blocks"),checked:!!o.show,onChange:e=>n("date",e,"show"),__nextHasNoMarginBottom:!0}),o.show&&(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Distance From Marker","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",units:[Ee(),Ae()],isUnitSelectTabbable:!0,value:o[t].gap,onChange:e=>n("date",e,t,"gap")})]})})),EU=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(SU,{...e}),(0,l.jsx)(MU,{...e}),(0,l.jsx)(NU,{...e}),(0,l.jsx)(TU,{...e}),(0,l.jsx)(LU,{...e})]}),PU=({attributes:e,updateObj:t})=>{const{connector:n}=e,{line:o,arrow:i}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Connectors","b-blocks"),children:[o.show&&(0,l.jsx)(An,{label:o.progress?(0,x.__)("Track Color:","b-blocks"):(0,x.__)("Line Color:","b-blocks"),value:o.bg,onChange:e=>t("connector",e,"line","bg"),isImage:!1}),o.show&&o.progress&&(0,l.jsx)(An,{label:(0,x.__)("Progress Color:","b-blocks"),value:o.activeBg,onChange:e=>t("connector",e,"line","activeBg"),isImage:!1}),i.show&&(0,l.jsx)(Ue,{label:(0,x.__)("Arrow Color","b-blocks"),value:i.color,onChange:e=>t("connector",e,"arrow","color")}),i.show&&(0,l.jsx)("p",{className:"description",children:(0,x.__)("Leave the arrow color empty to keep it matching the card background.","b-blocks")})]})},AU=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{marker:o}=e,i=aU.includes(o.shape);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Marker","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:[Ee(),Ae()],isUnitSelectTabbable:!0,value:o[t].size,onChange:e=>n("marker",e,t,"size")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Ee(),Ae()],isUnitSelectTabbable:!0,value:o[t].iconSize,onChange:e=>n("marker",e,t,"iconSize")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].radius,resetValues:{top:"",right:"",bottom:"",left:""},units:[Pe(),Ee(),Ae()],onChange:e=>n("marker",e,t,"radius")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:Ne,children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:o[e].bg,onChange:t=>n("marker",t,e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:o[e].color.icon,onChange:t=>n("marker",t,e,"color","icon")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o[e].border,onChange:t=>n("marker",t,e,"border")}),!i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Ring Width","b-blocks"),labelPosition:"edge",className:"mt10",units:[Ee(),Ae()],isUnitSelectTabbable:!0,help:"normal"===e?(0,x.__)("A halo drawn outside the border. It follows the marker’s shape, takes no space in the layout, and uses the icon colour unless you set one below.","b-blocks"):void 0,value:o[e].ring.width,onChange:t=>n("marker",t,e,"ring","width")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Ring Style","b-blocks"),labelPosition:"edge",value:o[e].ring.style||"",options:"normal"===e?lU:[{label:(0,x.__)("Default","b-blocks"),value:""},...lU],onChange:t=>n("marker",t,e,"ring","style"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Ring Offset","b-blocks"),labelPosition:"edge",className:"mt10",units:[Ee(),Ae()],isUnitSelectTabbable:!0,help:"normal"===e?(0,x.__)("Gap between the marker and its ring.","b-blocks"):void 0,value:o[e].ring.offset,onChange:t=>n("marker",t,e,"ring","offset")}),(0,l.jsx)(Ue,{label:(0,x.__)("Ring Color","b-blocks"),value:o[e].ring.color,onChange:t=>n("marker",t,e,"ring","color")})]}),(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),value:o[e].shadow,onChange:t=>n("marker",t,e,"shadow")})]})}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0, |
| 570 |
x.__)("Transition Speed (ms)","b-blocks"),help:(0,x.__)("How long the marker takes to settle into its hover state.","b-blocks"),value:o.transition,onChange:e=>n("marker",e,"transition"),min:0,max:1200,step:50,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})})),BU=({attributes:e,updateObj:t})=>{const{card:n}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Card","b-blocks"),children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:Ne,children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:n[e].bg,onChange:n=>t("card",n,e,"bg")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:n[e].border,onChange:n=>t("card",n,e,"border")}),"normal"===e&&(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),value:n.normal.shadow,onChange:e=>t("card",e,"normal","shadow")})]})})})},IU=({attributes:e,updateObj:t})=>{const{date:n}=e;return n.show?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Date","b-blocks"),children:[(0,l.jsx)(Os,{label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("date",e,"typo")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("date",e,"color")})]}):null},OU=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(PU,{...e}),(0,l.jsx)(AU,{...e}),(0,l.jsx)(BU,{...e}),(0,l.jsx)(IU,{...e})]}),RU=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:ZW,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(EU,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(OU,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]})},zU=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,s=kU(t),{layout:a,connector:r,marker:c}=s,d=bBlocksPremiumChecker,u=fe(t,n),p=(0,h.useBlockProps)({className:wU(s)}),g=(0,f.useSelect)((e=>{const{getBlockOrder:t,getBlockAttributes:n}=e("core/block-editor");return t(o).map((e=>{const t=n(e)?.item;return`${t?.side||""}.${t?.arrowAlign||""}`})).join("|")}),[o]),m=(0,Qs.useRef)(null);(0,Qs.useEffect)((()=>{if(m.current)return((e,t={})=>{if(!e)return()=>{};let n=null;const o=()=>{null===n&&(n=requestAnimationFrame((()=>{n=null,((e,t={})=>{if(!e)return;const n=getComputedStyle(e),o="grid"===n.display?!n.gridAutoFlow.includes("column"):"row"!==n.flexDirection,i=e.getBoundingClientRect(),s=o?i.height:i.width;if(!s)return;const a=Array.from(e.querySelectorAll(":scope > * > .b-blocks-timeline-marker")),r=a.map((e=>{const t=e.getBoundingClientRect();return o?t.top-i.top+t.height/2:t.left-i.left+t.width/2})).sort(((e,t)=>e-t));if(a.length){const t=a[0].getBoundingClientRect(),n=o?t.left-i.left+t.width/2:t.top-i.top+t.height/2;e.style.setProperty("--bb-tl-line-cross",`${$U(n)}px`)}const l="full"!==t.extent&&r.length>0,c=l?r[0]:0,d=l?r[r.length-1]:s;e.style.setProperty("--bb-tl-line-start",`${$U(c)}px`),e.style.setProperty("--bb-tl-line-end",`${$U(s-d)}px`)})(e,t)})))};o();const i="undefined"!=typeof ResizeObserver?new ResizeObserver(o):null;return i?(i.observe(e),e.querySelectorAll(":scope > *").forEach((e=>i.observe(e)))):window.addEventListener("resize",o),()=>{null!==n&&cancelAnimationFrame(n),i?i.disconnect():window.removeEventListener("resize",o)}})(m.current,{extent:r.line.extent})}),[a,r,c,g]),(0,Qs.useEffect)((()=>{if(r.line.progress&&m.current)return(e=>{const t=e.ownerDocument?.defaultView||window;let n=null,o=!0;const i=()=>{n=null;const o=e.getBoundingClientRect(),i=(t.innerHeight||e.ownerDocument.documentElement.clientHeight)/2-o.top,s=o.height||1,a=Math.min(Math.max(i/s,0),1);e.style.setProperty("--bb-tl-line-progress",a.toFixed(4))},s=()=>{null===n&&o&&(n=requestAnimationFrame(i))},a=void 0!==t.IntersectionObserver?new t.IntersectionObserver((e=>{o=e.some((e=>e.isIntersecting)),s()})):null;return a&&a.observe(e),t.addEventListener("scroll",s,{passive:!0}),t.addEventListener("resize",s,{passive:!0}),i(),()=>{null!==n&&cancelAnimationFrame(n),a&&a.disconnect(),t.removeEventListener("scroll",s),t.removeEventListener("resize",s)}})(m.current)}),[r.line.progress,g]);const b=(0,h.useInnerBlocksProps)({className:"b-blocks-timeline-items"},{allowedBlocks:mU,template:xU,templateLock:!1,orientation:"vertical",renderAppender:h.InnerBlocks.ButtonBlockAppender});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(RU,{attributes:s,setAttributes:n,updateObj:u,isPremium:d,device:i}),(0,l.jsxs)("div",{...p,children:[(0,l.jsx)(jU,{attributes:s,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{...b,ref:m})]})]})}));Nl(QW.name)&&(0,p.registerBlockType)(QW,{icon:Tl,edit:zU,save:h.InnerBlocks.Content}) |
| 571 |
;const DU=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/timeline-item","version":"1.0.0","title":"Timeline Item","category":"bBlocks","description":"A single entry on a Timeline: a date, an icon marker and any inner blocks you want inside its card.","keywords":["timeline item","timeline entry","milestone","event"],"parent":["b-blocks/timeline"],"textdomain":"b-blocks","attributes":{"date":{"type":"string","default":""},"icon":{"type":"string","default":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 384 512\'><path d=\'M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z\'/></svg>"},"item":{"type":"object","default":{"side":"","arrowAlign":"","marker":{"normal":{"bg":{"type":"solid","color":""},"color":{"icon":""},"ring":{"width":"","style":"","offset":"","color":""},"shadow":[]},"hover":{"bg":{"type":"solid","color":""},"color":{"icon":""},"ring":{"width":"","style":"","offset":"","color":""},"shadow":[]}},"pulse":{"show":"","bg":{"type":"solid","color":""},"speed":""},"card":{"normal":{"bg":{"type":"solid","color":""}}},"date":{"color":""},"arrow":{"bg":{"type":"solid","color":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"html":false,"reusable":false,"inserter":true},"example":{"attributes":{}},"editorScript":"file:../index.js","render":"file:./render.php","viewScript":"file:./view.js"}'),FU=Object.fromEntries(Object.entries(DU.attributes).map((([e,t])=>[e,t.default]))),HU=(e={})=>yU(FU,e),WU=({attributes:e,id:t,isBackend:n=!1})=>{const{item:o,advanced:i}=HU(e),{marker:s,pulse:a,card:r,date:c,arrow:d}=o,u=`#${t}`,p=`${u}.b-blocks-timeline-item`,h=`${u} .b-blocks-timeline-card`,g=`${u} .b-blocks-timeline-marker`,m=`${u} .b-blocks-timeline-date`,b=oa(d.bg)||oa(r.normal.bg),f=["on"===a.show?"animation-name: bb-tl-marker-pulse;":"","off"===a.show?"animation-name: none;":"","off"===a.show?"":oa(a.bg,!0,!0,!1),"off"===a.show?"":na("animation-duration",a.speed?`${a.speed}ms`:"")].filter(Boolean).join(" "),x=n?`#${t}>div>div:first-child`:`#${t}>div`,y=_a(t,i,n,!0).split(x).join(`#${t}`);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${h}{\n\t\t\t\t${oa(r.normal.bg)}\n\t\t\t}\n\t\t\t${p} .b-blocks-timeline-card::after{\n\t\t\t\t${b}\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\t${oa(s.normal.bg)}\n\t\t\t\t${na("color",s.normal.color.icon)}\n\t\t\t\t${cU(s.normal.ring)}\n\t\t\t\t${na("box-shadow",la(s.normal.shadow||[]))}\n\t\t\t}\n\t\t\t${g}:hover{\n\t\t\t\t${oa(s.hover.bg)}\n\t\t\t\t${na("color",s.hover.color.icon)}\n\t\t\t\t${cU(s.hover.ring)}\n\t\t\t\t${na("box-shadow",la(s.hover.shadow||[]))}\n\t\t\t}\n\t\t\t${f?`${g}::after{ ${f} }`:""}\n\t\t\t${m}{\n\t\t\t\t${na("color",c.color)}\n\t\t\t}\n\t\t\t${y}\n\t\t\t`}})},UU=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],GU=({attributes:e,setAttributes:t,updateObj:n,clientId:o})=>{const{icon:i,item:s}=e,a="horizontal"===(0,f.useSelect)((e=>{const{getBlockParentsByBlockName:t,getBlock:n}=e("core/block-editor"),i=t(o,hU);return i?.length&&n(i[i.length-1])?.attributes?.layout?.desktop?.direction||"vertical"}),[o]),r=[{label:(0,x.__)("Auto (follow layout)","b-blocks"),value:""},{label:a?(0,x.__)("Above","b-blocks"):(0,x.__)("Left","b-blocks"),value:"left"},{label:a?(0,x.__)("Below","b-blocks"):(0,x.__)("Right","b-blocks"),value:"right"}],c=[{label:(0,x.__)("Auto (follow Timeline)","b-blocks"),value:""},{label:a?(0,x.__)("Left","b-blocks"):(0,x.__)("Top","b-blocks"),value:"start"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:a?(0,x.__)("Right","b-blocks"):(0,x.__)("Bottom","b-blocks"),value:"end"}];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Entry","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Side","b-blocks"),labelPosition:"edge",help:(0,x.__)("Overrides the side this entry would get from the Timeline layout.","b-blocks"),value:s.side||"",options:r,onChange:e=>n("item",e,"side"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Arrow Alignment","b-blocks"),labelPosition:"edge",help:(0,x.__)("Overrides where this entry’s arrow sits along its card edge. Arrow size and offset stay with the Timeline.","b-blocks"),value:s.arrowAlign||"",options:c,onChange:e=>n("item",e,"arrowAlign"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(Zn,{label:(0,x.__)("Marker Icon","b-blocks"),value:i,onChange:e=>t({icon:e})})]})},VU=({attributes:e,updateObj:t,clientId:n})=>{const{item:o}=e,{pulse:i}=o,s=(0,f.useSelect)((e=>{const{getBlockParentsByBlockName:t,getBlock:o}=e("core/block-editor"),i=t(n,hU);return i?.length&&o(i[i.length-1])?.attributes?.marker||{}}),[n]);if(aU.includes(s.shape))return null;const a=[{label:s.pulse?.show?(0,x.__)("Default — on, from the Timeline","b-blocks"):(0,x.__)("Default — off, from the Timeline","b-blocks"),value:""},{label:(0,x.__)("On","b-blocks"),value:"on"},{label:(0,x.__)("Off","b-blocks"),value:"off"}],r=""===i.show?!!s.pulse?.show:"on"===i.show;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Marker","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Pulse","b-blocks"),help:(0,x.__)("A halo that spreads out from behind this entry’s marker.","b-blocks"),value:i.show||"",options:a,onChange:e=>t("item",e,"pulse","show"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),r&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Pulse Color:","b-blocks"),value:i.bg, |
| 572 |
onChange:e=>t("item",e,"pulse","bg"),isImage:!1}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Pulse Speed (ms)","b-blocks"),help:(0,x.__)("Leave unset to follow the Timeline.","b-blocks"),value:i.speed||void 0,onChange:e=>t("item",e||"","pulse","speed"),min:600,max:6e3,step:100,allowReset:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})},qU=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(GU,{...e}),(0,l.jsx)(VU,{...e})]}),YU=({attributes:e,updateObj:t})=>{const{item:n}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Marker","b-blocks"),children:[(0,l.jsx)(y.Notice,{className:"mb10",status:"info",isDismissible:!1,children:(0,x.__)("Empty values follow the Timeline.","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:Ne,children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:n.marker[e].bg,onChange:n=>t("item",n,"marker",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:n.marker[e].color.icon,onChange:n=>t("item",n,"marker",e,"color","icon")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Ring Width","b-blocks"),labelPosition:"edge",className:"mt10",units:[Ee(),Ae()],isUnitSelectTabbable:!0,value:n.marker[e].ring.width,onChange:n=>t("item",n,"marker",e,"ring","width")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Ring Style","b-blocks"),labelPosition:"edge",value:n.marker[e].ring.style||"",options:[{label:(0,x.__)("Default (follow Timeline)","b-blocks"),value:""},...lU],onChange:n=>t("item",n,"marker",e,"ring","style"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Ring Offset","b-blocks"),labelPosition:"edge",className:"mt10",units:[Ee(),Ae()],isUnitSelectTabbable:!0,value:n.marker[e].ring.offset,onChange:n=>t("item",n,"marker",e,"ring","offset")}),(0,l.jsx)(Ue,{label:(0,x.__)("Ring Color","b-blocks"),value:n.marker[e].ring.color,onChange:n=>t("item",n,"marker",e,"ring","color")}),(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),value:n.marker[e].shadow,onChange:n=>t("item",n,"marker",e,"shadow")})]})})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Card","b-blocks"),children:(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:n.card.normal.bg,onChange:e=>t("item",e,"card","normal","bg")})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Arrow","b-blocks"),children:[(0,l.jsx)(An,{label:(0,x.__)("Arrow Color:","b-blocks"),value:n.arrow.bg,onChange:e=>t("item",e,"arrow","bg"),isImage:!1}),(0,l.jsx)("p",{className:"description",children:(0,x.__)("Leave empty to keep the arrow matching this entry’s card background.","b-blocks")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Date","b-blocks"),children:(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:n.date.color,onChange:e=>t("item",e,"date","color")})})]})},KU=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(YU,{...e})}),QU=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:UU,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(qU,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(KU,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]})},ZU=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,s=HU(t),{date:a,icon:r,item:c}=s,d=bBlocksPremiumChecker,u=fe(t,n),p=(0,f.useSelect)((e=>0===e("core/block-editor").getBlockCount(o)),[o]),g=(0,h.useBlockProps)({className:_U(c)}),m=(0,h.useInnerBlocksProps)({className:"b-blocks-timeline-card"},{templateLock:!1,renderAppender:p?h.InnerBlocks.ButtonBlockAppender:h.InnerBlocks.DefaultBlockAppender});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(QU,{attributes:s,setAttributes:n,updateObj:u,isPremium:d,device:i,clientId:o}),(0,l.jsxs)("div",{...g,children:[(0,l.jsx)(WU,{attributes:s,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{className:"b-blocks-timeline-content",children:(0,l.jsx)("div",{...m})}),(0,l.jsx)("div",{className:"b-blocks-timeline-marker",children:r&&(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:r}})}),(0,l.jsx)(h.RichText,{tagName:"div",className:"b-blocks-timeline-date",value:a,onChange:e=>n({date:e}),placeholder:(0,x.__)("Add a date…","b-blocks")})]})]})}));Nl(hU)&&(0,p.registerBlockType)(DU,{icon:Ml,edit:ZU,save:h.InnerBlocks.Content});const XU=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/toggle-content","title":"Toggle Content","category":"bBlocks","description":"A clean toggle switch lets users click to switch between two content sections below the heading.","keywords":["toggle content","toggle switch","toggle content switch","toggle content switcher","toggle content switcher block","toggle"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"toggle":{"type":"object","default":{"contentType":"primary","switchType":"rounded"}},"label":{"type":"object","default":{"left":"First","right":"Second"}},"styles":{"type":"object","default":{"header":{"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"headingGap":"10px"},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"headingGap":""},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"headingGap":""},"normal":{"bg":"","border":{},"desktop":{"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"bg":"","border":{},"desktop":{"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""}},"transition":0.3}},"toggle":{"direction":"row","width":"","height":"","desktop":{"align":"center"},"tablet":{"align":""},"mobile":{"align":""},"active":{"color":{},"bg":{}},"inactive":{"color":{},"bg":{}}},"label":{"gap":"","typo":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"active":{"first":{"color":""},"second":{"color":""}},"inactive":{"first":{"color":""},"second":{"color":""}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),JU=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],eG=[{value:"rounded",label:(0,x.__)("Rounded","b-blocks")},{value:"rectangle",label:(0,x.__)("Rectangle","b-blocks")}],tG=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),nG=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor", |
| 573 |
strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),oG=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),iG=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i,label:s,toggle:a}=t,{toggle:r,header:c,label:d}=i;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Toggle","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Switch Type","b-blocks"),labelPosition:"edge",options:eG,value:a?.switchType,onChange:e=>n("toggle",e,"switchType")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:r?.[o]?.align,onChange:e=>n("styles",e,"toggle",o,"align"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:tG}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:nG}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:oG})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Direction","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:r?.direction,onChange:e=>n("styles",e,"toggle","direction"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"row"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"column"})]})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2 mb0",children:[(0,x.__)("Heading Gap","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:c?.[o]?.headingGap,onChange:e=>n("styles",e,"header",o,"headingGap")})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Label Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:d?.[o]?.gap,onChange:e=>n("styles",e,"label",o,"gap")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Label","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Left Label","b-blocks"),value:s?.left,onChange:e=>n("label",e,"left")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Right Label","b-blocks"),value:s?.right,onChange:e=>n("label",e,"right")})]})]})},sG=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(iG,{...e})}),aG=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{header:s}=i,[a,r]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{values:s[o].padding,label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),onChange:e=>n("styles",e,"header",o,"padding")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>r(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{value:s[a].bg,onChange:e=>n("styles",e,"header",a,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",value:s[a].border,onChange:e=>n("styles",e,"header",a,"border")}),(0,l.jsx)(k,{values:s[a][o].radius,className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Radius","b-blocks"),(0,l.jsx)(_,{})]}),onChange:e=>n("styles",e,"header",a,o,"radius")})]})},rG=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{label:i}=o,[s,a]=(0,m.useState)("inactive");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Label Styles","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Os,{value:i.typo,onChange:e=>n("styles",e,"label","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>a(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"inactive"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Left Label Color","b-blocks"),value:i[s].first.color,onChange:e=>n("styles",e,"label",s,"first","color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Right Label Color","b-blocks"),value:i[s].second.color,onChange:e=>n("styles",e,"label",s,"second","color")})]})},lG=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{toggle:i}=o,[s,a]=(0,m.useState)("inactive");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Switcher","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i?.width,onChange:e=>n("styles",e,"toggle","width")})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Height","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i?.height,onChange:e=>n("styles",e,"toggle","height")})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>a(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"inactive"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsx)(An,{label:(0,x.__)("Color","b-blocks"),value:i[s].color,onChange:e=>n("styles",e,"toggle",s,"color"),isImage:!1}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i[s].bg,onChange:e=>n("styles",e,"toggle",s,"bg")})]})},cG=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(aG,{...e}),(0,l.jsx)(lG,{...e}),(0,l.jsx)(rG,{...e})]}),dG=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",initialTabName:"general",tabs:JU,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(sG,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(cG,{...e})})]})})})}),uG=(e,o)=>{ |
| 574 |
const{styles:i}=e,{toggle:s,header:a,label:r}=i,l=`#${o}`,c=`${l} .b-blocks-toggle-content__wrapper .b-blocks-toggle-content__head`,d=`${c} .b-blocks-toggle-content-switch__wrapper`,u=`${d} .b-blocks-toggle-content__switch`,p=`${l} .is-b .b-blocks-toggle-content__switch`,h=`${l} .is-a .b-blocks-toggle-content__switch`,g=`${u} .b-blocks-toggle-content__knob`,m=`${l} .is-b .b-blocks-toggle-content__knob`,b=`${l} .is-a .b-blocks-toggle-content__knob`,f=`${d} .b-blocks-toggle-content__label`;return`\n\t\t${pa("",r.typo).googleFontLink}\n\t\t${pa(f,r.typo).styles}\n\n\t\t${c}{\n\t\t\t${na("justify-content",s?.desktop?.align)}\n\t\t\t${na("margin-bottom",a?.desktop?.headingGap)}\n\t\t\t${na("padding",ha(a?.desktop?.padding))}\n\t\t\t${oa(a.normal.bg)}\n\t\t\t${sa(a.normal.border)}\n\t\t\t${na("border-radius",ha(a.normal.desktop.radius))}\n\t\t}\n\n\t\t${c}:hover{\n\t\t\t${oa(a.hover.bg)}\n\t\t\t${sa(a.hover.border)}\n\t\t\t${na("border-radius",ha(a.hover.desktop.radius))}\n\t\t}\n\n\t\t${d}{\n\t\t\t${na("flex-direction",s?.direction)}\n\t\t\t${na("gap",r?.desktop?.gap)}\n\t\t}\n\n\t\t${u}{\n\t\t\t${na("width",s.width)}\n\t\t\t${na("height",s.height)}\n\t\t}\n\n\t\t${p}{\n\t\t\t${oa(s.active.bg)}\n\t\t}\n\n\t\t${h}{\n\t\t\t${oa(s.inactive.bg)}\n\t\t}\n\n\t\t${g}{\n\t\t\t${na("width",s.height?`calc(${s.height} - 6px)`:"")}\n\t\t\t${na("height",s.height?`calc(${s.height} - 6px)`:"")}\n\t\t\t\n\t\t}\n\t\t${m}{\n\t\t\t${na("transform",s.width?`translateX(calc(${s.width?s.width:"60px"} - ${s.height?s.height:"30px"}))`:"")}\n\t\t\t${oa(s.active.color)}\n\t\t}\n\t\t${b}{\n\t\t\t${oa(s.inactive.color)}\n\t\t}\n\n\t\t${f}.b-blocks-toggle-content__label--left {\n\t\t\t${na("color",r.inactive.first.color)}\n\t\t}\n\n\t\t${f}.b-blocks-toggle-content__label--right{\n\t\t\t${na("color",r.inactive.second.color)}\n\t\t}\n\t\t${f}.b-blocks-toggle-content__label--left.is-active {\n\t\t\t${na("color",r.active.first.color)}\n\t\t}\n\n\t\t${f}.b-blocks-toggle-content__label--right.is-active{\n\t\t\t${na("color",r.active.second.color)}\n\t\t}\n\n\t\t${t}{\n\t\t\t${c}{\n\t\t\t\t${na("justify-content",s?.tablet?.align)}\n\t\t\t\t${na("margin-bottom",a?.tablet?.headingGap)}\n\t\t\t\t${na("padding",ha(a?.tablet?.padding))}\n\t\t\t\t${na("border-radius",ha(a.normal.tablet.radius))}\n\t\t\t}\n\n\t\t\t${c}:hover{\n\t\t\t\t${na("border-radius",ha(a.hover.tablet.radius))}\n\t\t\t}\n\n\t\t\t${d}{\n\t\t\t\t${na("gap",r?.tablet?.gap)}\n\t\t\t}\n\t\t}\n\t\t${n}{\n\t\t\t${c}{\n\t\t\t\t${na("justify-content",s?.mobile?.align)}\n\t\t\t\t${na("margin-bottom",a?.mobile?.headingGap)}\n\t\t\t\t${na("padding",ha(a?.mobile?.padding))}\n\t\t\t\t${na("border-radius",ha(a.normal.mobile.radius))}\n\t\t\t}\n\n\t\t\t${c}:hover{\n\t\t\t\t${na("border-radius",ha(a.hover.mobile.radius))}\n\t\t\t}\n\n\t\t\t${d}{\n\t\t\t\t${na("gap",r?.mobile?.gap)}\n\t\t\t}\n\t\t}\n\n\t`},pG=[["b-blocks/container",{className:"b-blocks-toggle-content__panel b-blocks-toggle-content__panel--a",lock:{remove:!0,move:!0}},[]],["b-blocks/container",{className:"b-blocks-toggle-content__panel b-blocks-toggle-content__panel--b",lock:{remove:!0,move:!0}},[]]],hG=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,className:n,device:o,clientId:i})=>{const{label:s,toggle:a}=e,[r,c]=(0,Qs.useState)(!0),d=(0,h.useBlockProps)({className:n}),u=fe(e,t);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(dG,{attributes:e,updateObj:u,device:o}),(0,l.jsxs)("div",{...d,children:[(0,l.jsx)("style",{children:uG(e,`block-${i}`)}),(0,l.jsxs)("div",{className:"b-blocks-toggle-content__wrapper "+(r?"is-a":"is-b"),children:[(0,l.jsx)("div",{className:"b-blocks-toggle-content__head",children:(0,l.jsxs)("div",{className:"b-blocks-toggle-content-switch__wrapper",children:[(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-toggle-content__label b-blocks-toggle-content__label--left "+(r?"":"is-active"),value:s.left,onChange:e=>u("label",e,"left"),onClick:()=>c(!0),placeholder:(0,x.__)("First","b-blocks"),allowedFormats:[]}),(0,l.jsx)("div",{className:`b-blocks-toggle-content__switch b-blocks-toggle-content-switch-${a.switchType} ${r?"":"is-b"}`,role:"button",tabIndex:0,"aria-label":(0,x.__)("Toggle content","b-blocks"),onClick:()=>c((e=>!e)),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||c((e=>!e))},children:(0,l.jsx)("div",{className:"b-blocks-toggle-content__knob"})}),(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-toggle-content__label b-blocks-toggle-content__label--right "+(r?"":"is-active"),value:s.right,onChange:e=>u("label",e,"right"),onClick:()=>c(!1),placeholder:(0,x.__)("Second","b-blocks"),allowedFormats:[]})]})}),(0,l.jsx)("div",{className:"b-blocks-toggle-content__content",children:(0,l.jsx)(h.InnerBlocks,{template:pG,renderAppender:!1})})]})]})]})}));Nl(XU.name)&&(0,p.registerBlockType)(XU,{icon:sl,edit:hG,save:h.InnerBlocks.Content});const gG={none:{label:(0,x.__)("None","accordion-block"),items:[]},faq:{label:(0,x.__)("FAQ","accordion-block"),items:[{title:(0,x.__)("What is your return policy?","accordion-block"),content:(0,x.__)("We offer a 30-day money-back guarantee. If you're not satisfied with your purchase, contact our support team for a full refund.","accordion-block"),isOpen:!1},{title:(0,x.__)("How long does shipping take?","accordion-block"),content:(0,x.__)("Standard shipping takes 5-7 business days. Express shipping options are available at checkout for faster delivery.","accordion-block"),isOpen:!1},{title:(0,x.__)("Do you offer customer support?","accordion-block"),content:(0,x.__)("Yes! Our customer support team is available 24/7 via email, phone, and live chat to assist you with any questions.","accordion-block"),isOpen:!1}]},features:{label:(0,x.__)("Product Features","accordion-block"),items:[{title:(0,x.__)("Easy to Use","accordion-block"),content:(0,x.__)("Our intuitive interface makes it simple to get started. No technical knowledge required - just install and start creating.","accordion-block"),isOpen:!1},{title:(0,x.__)("Fully Customizable","accordion-block"),content:(0,x.__)("Customize every aspect of your accordion with our powerful theme editor. Colors, spacing, fonts - it's all under your control.","accordion-block"),isOpen:!1},{title:(0,x.__)("Mobile Responsive","accordion-block"),content:(0,x.__)("Works perfectly on all devices. Your accordions will look great whether viewed on desktop, tablet, or mobile.","accordion-block"),isOpen:!1}]},timeline:{label:(0,x.__)("Timeline","accordion-block"),items:[{title:(0,x.__)("2020 - Foundation","accordion-block"),content:(0,x.__)("Our company was founded with a vision to create innovative solutions that make a difference in people's lives.","accordion-block"),isOpen:!1},{title:(0,x.__)("2021 - Growth","accordion-block"),content:(0,x.__)("Expanded our team and launched three major products that received excellent feedback from customers worldwide.","accordion-block"),isOpen:!1},{title:(0,x.__)("2022 - Innovation","accordion-block"),content:(0,x.__)("Introduced cutting-edge features and won multiple industry awards for innovation and customer satisfaction.","accordion-block"),isOpen:!1},{title:(0,x.__)("2023 - Global Expansion","accordion-block"),content:(0,x.__)("Opened offices in 5 new countries and reached 1 million satisfied customers across the globe.","accordion-block"),isOpen:!1}]},pricing:{label:(0,x.__)("Pricing Details","accordion-block"),items:[{title:(0,x.__)("Basic Plan - $9/month","accordion-block"),content:(0,x.__)("Perfect for individuals and small projects. Includes 10 GB storage, basic support, and access to core features.","accordion-block"),isOpen:!1},{title:(0,x.__)("Pro Plan - $29/month","accordion-block"),content:(0,x.__)("Ideal for professionals and growing businesses. Includes 100 GB storage, priority support, and all premium features.","accordion-block"),isOpen:!1},{title:(0,x.__)("Enterprise Plan - Custom","accordion-block"),content:(0, |
| 575 |
x.__)("For large organizations with specific needs. Unlimited storage, dedicated support team, custom integrations, and SLA guarantees.","accordion-block"),isOpen:!1}]},steps:{label:(0,x.__)("Steps Guide","accordion-block"),items:[{title:(0,x.__)("Step 1: Sign Up","accordion-block"),content:(0,x.__)("Create your free account in seconds. Just enter your email address and choose a secure password to get started.","accordion-block"),isOpen:!1},{title:(0,x.__)("Step 2: Configure Settings","accordion-block"),content:(0,x.__)("Customize your preferences and connect your existing tools. Our setup wizard will guide you through the process.","accordion-block"),isOpen:!1},{title:(0,x.__)("Step 3: Add Content","accordion-block"),content:(0,x.__)("Start adding your content using our intuitive editor. Import existing data or create new content from scratch.","accordion-block"),isOpen:!1},{title:(0,x.__)("Step 4: Publish & Share","accordion-block"),content:(0,x.__)("When you're ready, publish your work and share it with your audience. Track performance with built-in analytics.","accordion-block"),isOpen:!1}]}},mG=[{name:"Black",color:"#000000"},{name:"White",color:"#FFFFFF"},{name:"Light Gray",color:"#f8f9fa"},{name:"Gray",color:"#6c757d"},{name:"Dark Gray",color:"#343a40"},{name:"Blue",color:"#0d6efd"},{name:"Indigo",color:"#6610f2"},{name:"Purple",color:"#6f42c1"},{name:"Pink",color:"#d63384"},{name:"Red",color:"#dc3545"},{name:"Orange",color:"#fd7e14"},{name:"Yellow",color:"#ffc107"},{name:"Green",color:"#198754"},{name:"Teal",color:"#20c997"},{name:"Cyan",color:"#0dcaf0"}],bG=JSON.parse('{"UU":"b-blocks/accordion-block"}');Nl(bG.UU)&&(0,p.registerBlockType)(bG.UU,{icon:Qr,edit:({attributes:e,setAttributes:t})=>{const{items:n,theme:o,template:i,customStyles:s}=e,[a,r]=(0,m.useState)(n.map(((e,t)=>0===t))),c=(0,h.useBlockProps)({className:`accordion-block accordion-theme-${o}`}),d=()=>{const e=[...n,{title:(0,x.__)("New Accordion Item","accordion-block"),content:(0,x.__)("Add your content here.","accordion-block"),isOpen:!1}];t({items:e}),r([...a,!1])},u=(e,o,i)=>{const s=[...n];s[e]={...s[e],[o]:i},t({items:s})},p=(e,n)=>{t({customStyles:{...s,[e]:n}})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Accordion Items","accordion-block"),initialOpen:!0,children:(0,l.jsx)(y.Button,{variant:"primary",onClick:d,style:{width:"100%"},children:(0,x.__)("Add Item","accordion-block")})}),(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Theme Settings","accordion-block"),initialOpen:!1,children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Theme","accordion-block"),value:o,options:[{label:(0,x.__)("Modern","accordion-block"),value:"modern"},{label:(0,x.__)("Classic","accordion-block"),value:"classic"},{label:(0,x.__)("Minimal","accordion-block"),value:"minimal"},{label:(0,x.__)("Custom","accordion-block"),value:"custom"}],onChange:e=>t({theme:e})})}),(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Templates","accordion-block"),initialOpen:!1,children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Apply Template","accordion-block"),value:i,options:Object.keys(gG).map((e=>({label:gG[e].label,value:e}))),onChange:e=>{"none"!==e&&gG[e]&&(t({template:e,items:gG[e].items}),r(gG[e].items.map((()=>!1))))},help:(0,x.__)("Select a pre-built template to get started quickly","accordion-block")})}),"custom"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Header Styles","accordion-block"),initialOpen:!1,children:[(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Background Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:mG,value:s.headerBgColor,onChange:e=>p("headerBgColor",e||"#f8f9fa")}),(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Text Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:mG,value:s.headerTextColor,onChange:e=>p("headerTextColor",e||"#212529")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Font Size","accordion-block"),value:s.headerFontSize,onChange:e=>p("headerFontSize",e),min:12,max:32}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Padding","accordion-block"),value:s.headerPadding,onChange:e=>p("headerPadding",e),min:8,max:40})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Content Styles","accordion-block"),initialOpen:!1,children:[(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Background Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:mG,value:s.contentBgColor,onChange:e=>p("contentBgColor",e||"#ffffff")}),(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Text Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:mG,value:s.contentTextColor,onChange:e=>p("contentTextColor",e||"#495057")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Font Size","accordion-block"),value:s.contentFontSize,onChange:e=>p("contentFontSize",e),min:12,max:24}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Padding","accordion-block"),value:s.contentPadding,onChange:e=>p("contentPadding",e),min:8,max:40})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Border & Spacing","accordion-block"),initialOpen:!1,children:[(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Border Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:mG,value:s.borderColor,onChange:e=>p("borderColor",e||"#dee2e6")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Border Width","accordion-block"),value:s.borderWidth,onChange:e=>p("borderWidth",e),min:0,max:5}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Border Radius","accordion-block"),value:s.borderRadius,onChange:e=>p("borderRadius",e),min:0,max:30})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon & Animation","accordion-block"),initialOpen:!1,children:[(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Icon Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:mG,value:s.iconColor,onChange:e=>p("iconColor",e||"#212529")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Animation Speed (ms)","accordion-block"),value:s.animationSpeed,onChange:e=>p("animationSpeed",e),min:100,max:1e3,step:50})]})]})]}),(0,l.jsxs)("div",{...c,style:"custom"!==o?{}:{"--bBlocks-accordion-header-bg":s.headerBgColor,"--bBlocks-accordion-header-text":s.headerTextColor,"--bBlocks-accordion-content-bg":s.contentBgColor,"--bBlocks-accordion-content-text":s.contentTextColor,"--bBlocks-accordion-border-color":s.borderColor,"--bBlocks-accordion-borderWidth":`${s.borderWidth}px`,"--bBlocks-accordion-borderRadius":`${s.borderRadius}px`,"--bBlocks-accordion-headerPadding":`${s.headerPadding}px`,"--bBlocks-accordion-content-padding":`${s.contentPadding}px`,"--bBlocks-accordion-header-font-size":`${s.headerFontSize}px`,"--bBlocks-accordion-content-font-size":`${s.contentFontSize}px`,"--bBlocks-accordion-icon-color":s.iconColor,"--bBlocks-accordion-animation-speed":`${s.animationSpeed}ms`},children:[(0,l.jsx)("div",{className:"accordion-items",children:n.map(((e,o)=>(0,l.jsxs)("div",{className:"accordion-item "+(a[o]?"is-open":""),children:[(0,l.jsxs)("div",{className:"accordion-header",children:[(0,l.jsxs)("button",{className:"accordion-toggle",onClick:()=>(e=>{const t=[...a];t[e]=!t[e],r(t)})(o),type:"button",children:[(0,l.jsx)(h.RichText,{tagName:"span",value:e.title,onChange:e=>u(o,"title",e),placeholder:(0,x.__)("Accordion title...","accordion-block"),className:"accordion-title"}),(0,l.jsx)("span",{className:"accordion-icon",children:a[o]?"−":"+"})]}),(0,l.jsx)(y.Button,{isDestructive:!0,isSmall:!0,onClick:()=>(e=>{const o=n.filter(((t,n)=>n!==e));t({items:o});const i=a.filter(((t,n)=>n!==e));r(i)})(o),className:"accordion-remove",children:(0,x.__)("Remove Item","accordion-block")})]}),a[o]&&(0,l.jsx)("div",{className:"accordion-content",style:{maxHeight:"unset"},children:(0,l.jsx)(h.RichText,{tagName:"div",value:e.content,onChange:e=>u(o,"content",e),placeholder:(0,x.__)("Accordion content...","accordion-block"),className:"accordion-text"})})]},o)))}),0===n.length&&(0,l.jsxs)("div",{ |
| 576 |
className:"accordion-empty",children:[(0,l.jsx)("p",{children:(0,x.__)('No accordion items yet. Click "Add Item" to get started.',"accordion-block")}),(0,l.jsx)(y.Button,{variant:"primary",onClick:d,children:(0,x.__)("Add Item","accordion-block")})]})]})]})}});const fG=JSON.parse('{"apiVersion":3,"name":"b-blocks/video","title":"Video","description":"A Simple, accessible, Easy to Use & fully Customizable video player.","icon":"video-alt2","category":"bBlocks","keywords":["video embed","mp4 ogg player","any video play"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"source":{"type":"string","default":""},"poster":{"type":"string","default":""},"controls":{"type":"object","default":{"play-large":true,"restart":false,"rewind":true,"play":true,"fast-forward":true,"progress":true,"current-time":true,"duration":false,"mute":true,"volume":true,"pip":false,"airplay":false,"settings":true,"download":false,"fullscreen":true}},"width":{"type":"string","default":"100%"},"radius":{"type":"string","default":"0px"},"repeat":{"type":"boolean","default":false},"autoplay":{"type":"boolean","default":false},"muted":{"type":"boolean","default":false},"resetOnEnd":{"type":"boolean","default":false},"autoHideControl":{"type":"boolean","default":true}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"sourceType":"link"}},"editorScript":["file:../index.js","plyr"],"style":["file:./view.css","plyr"],"render":"file:./render.php","viewScript":["file:./view.js","plyr"]}'),xG=({attributes:e,setAttributes:t})=>{const{source:n,poster:o,controls:i,width:s,radius:a,repeat:r,autoplay:c,muted:d,resetOnEnd:u,autoHideControl:p}=e,{restart:g,rewind:m,play:b,progress:f,duration:v,mute:k,volume:w,pip:_,airplay:C,settings:j,download:$,fullscreen:S}=i,T=(e,n)=>{const o={...i};o[e]=n,t({controls:o})};return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:[{name:"settings",title:(0,x.__)("Settings","b-blocks")},{name:"controls",title:(0,x.__)("Controls","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],children:e=>(0,l.jsxs)(l.Fragment,{children:["settings"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Settings","b-blocks"),children:[(0,l.jsx)(ve,{value:n,types:["video"],onChange:e=>t({source:e}),placeholder:(0,x.__)("Video url","b-blocks")}),(0,l.jsx)(ve,{value:o,types:["image"],onChange:e=>t({poster:e}),placeholder:(0,x.__)("Poster url","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Repeat","b-blocks"),checked:r,onChange:e=>t({repeat:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Autoplay","b-blocks"),checked:c,onChange:e=>t({autoplay:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Muted","b-blocks"),checked:d,onChange:e=>t({muted:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Reset On End","b-blocks"),checked:u,onChange:e=>t({resetOnEnd:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Auto Hide Control","b-blocks"),checked:p,onChange:e=>t({autoHideControl:e})})]})]}),"controls"===e.name&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Play Large","b-blocks"),checked:i["play-large"],onChange:e=>T("play-large",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Restart","b-blocks"),checked:g,onChange:e=>T("restart",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Rewind","b-blocks"),checked:m,onChange:e=>T("rewind",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Play","b-blocks"),checked:b,onChange:e=>T("play",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Fast Forward","b-blocks"),checked:i["fast-forward"],onChange:e=>T("fast-forward",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Progress","b-blocks"),checked:f,onChange:e=>T("progress",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Current Time","b-blocks"),checked:i["current-time"],onChange:e=>T("current-time",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Duration","b-blocks"),checked:v,onChange:e=>T("duration",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Mute","b-blocks"),checked:k,onChange:e=>T("mute",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Volume","b-blocks"),checked:w,onChange:e=>T("volume",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("PIP","b-blocks"),checked:_,onChange:e=>T("pip",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Airplay","b-blocks"),checked:C,onChange:e=>T("airplay",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Settings","b-blocks"),checked:j,onChange:e=>T("settings",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Download","b-blocks"),checked:$,onChange:e=>T("download",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Fullscreen","b-blocks"),checked:S,onChange:e=>T("fullscreen",e)})]}),"style"===e.name&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:s,onChange:e=>t({width:e}),units:[Ee(),Ae(),Pe()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Round Corner:","b-blocks"),labelPosition:"left",value:a,onChange:e=>t({radius:e}),units:[Ee()]})]})]})})})},yG="bBlocksVideo",vG=({attributes:e,id:t})=>{const{width:n,radius:o}=e;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t#${t} .${yG}{\n\t\t\twidth: ${["0px","0%","0em"].includes(n)?"100%":n};\n\t\t\tborder-radius: ${o};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},kG=e=>{const t=[];return Object.keys(e).map((n=>{e[n]&&t.push(n)})),t},wG=({attributes:e})=>{const{source:t,poster:n,controls:o,repeat:i,autoplay:s,muted:a,resetOnEnd:r,autoHideControl:c}=e,d=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const e=window?.bBlocksGlobal?.assetsUrl||"",t=new Plyr(d.current,{controls:kG(o),clickToPlay:!1,loop:{active:i},muted:a,autoplay:s,resetOnEnd:r,hideControls:c,loadSprite:!1,iconUrl:`${e}plyr.svg`});return()=>t?.destroy()}),[]),(0,l.jsx)("div",{className:yG,children:(0,l.jsx)("div",{className:"videoWrapper",children:(0,l.jsxs)("video",{controls:!0,playsinline:!0,"data-poster":n,preload:"metadata",ref:d,children:["Your browser does not support the video tag.",(0,l.jsx)("source",{src:t,type:"video/mp4"})]})})})};Nl(fG.name)&&(0,p.registerBlockType)(fG,{icon:qr,transforms:{from:[{type:"block",blocks:["vpb/video"],transform:e=>(0,p.createBlock)("b-blocks/video",e)},{type:"prefix",prefix:"video",transform:()=>(0,p.createBlock)("b-blocks/video")}],to:[{type:"block",blocks:["vpb/video"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("vpb/video",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{source:i}=t,s=()=>(0,l.jsx)(wG,{attributes:t});return i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(xG,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(vG,{attributes:t,id:`block-${o}`}),(0,l.jsx)(s,{})]})]}):(0,l.jsx)(_e,{type:"video",icon:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",className:"html5-block-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("polygon",{points:"23 7 16 12 23 17 23 7"}),(0,l.jsx)("rect",{x:"1",y:"5",width:"15",height:"14",rx:"2",ry:"2"})]}),onChange:e=>n({source:e.url})})},save:()=>null}) |
| 577 |
;const _G=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/text-path","version":"1.0.0","title":"Text Path","category":"bBlocks","description":"Craft eye-catching text paths with interactive visual effects.","keywords":["path","text path","text on path","svg","svg path","text on svg path"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"icon":{"type":"object","default":{"type":"wave","iconType":"library","library":"","upload":"","title":"Add Your Text Here"}},"styles":{"type":"object","default":{"container":{"desktop":{"alignment":"flex-start"},"tablet":{"alignment":""},"mobile":{"alignment":""}},"path":{"color":"#000","thickness":1,"staringPoint":0,"rotate":0,"size":"250px"},"title":{"typo":{"fontSize":{"desktop":"16px"}},"normal":{"color":"","textShadow":[],"textStroke":{"isStroke":false,"size":0,"color":""}},"hover":{"color":"","textShadow":[],"textStroke":{"isStroke":false,"size":0,"color":""}},"transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),CG=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],jG=[{Label:(0,x.__)("Wave","b-blocks"),value:"wave"},{Label:(0,x.__)("Arc","b-blocks"),value:"arc"},{Label:(0,x.__)("Circle","b-blocks"),value:"circle"},{Label:(0,x.__)("Custom","b-blocks"),value:"custom"}],$G=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),SG=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),TG=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),MG=e=>{const{attributes:t,updateObj:n,device:o}=e,{icon:i,styles:s}=t,{container:a}=s,{data:r}=Cd("bBlocksUtils"),{refetch:c}=_d("b-blocks-enable-svg-mime-type",{_wpnonce:r?.nonce},!1),d=new Tt;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Text Path","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Title","b-blocks"),value:i.title,onChange:e=>n("icon",e,"title")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Path Type","b-blocks"),labelPosition:"edge",options:jG,value:i.type,onChange:e=>n("icon",e,"type")}),"custom"===i.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{label:(0,x.__)("Icon Type","b-blocks"),value:i.iconType,onChange:e=>n("icon",e,"iconType"),options:[{label:(0,x.__)("Library","b-blocks"),value:"library"},{label:(0,x.__)("Upload","b-blocks"),value:"upload"}]}),"library"===i.iconType&&(0,l.jsx)(Zn,{value:i.library,onChange:e=>n("icon",e,"library")}),"upload"===i.iconType&&(0,l.jsx)(we,{types:["image/svg+xml"],onClick:async()=>{jd(),await c()},label:(0,x.__)("Upload SVG","b-blocks"),value:{url:i.upload},onChange:async e=>{const t=e?.url?await d.sanitizeFile(e?.url):"";n("icon",t,"upload")},isSvgEnabled:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a[o]?.alignment,onChange:e=>n("styles",e,"container",o,"alignment"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:$G}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:SG}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:TG})]})]})]})})},NG=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{title:i,path:s}=o,[a,r]=(0,m.useState)("normal");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Os,{value:i.typo,onChange:e=>n("styles",e,"title","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>r(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{value:i[a]?.color,onChange:e=>n("styles",e,"title",a,"color")}),(0,l.jsx)(yt,{value:i[a]?.textShadow,onChange:e=>n("styles",e,"title",a,"textShadow"),type:"text"}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Stroke","b-blocks"),checked:i[a]?.textStroke?.isStroke,value:i[a]?.textStroke?.isStroke,onChange:e=>n("styles",e,"title",a,"textStroke","isStroke")}),i[a]?.textStroke?.isStroke&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{step:.1,className:"mt10",label:(0,x.__)("Stroke Size","b-blocks"),value:i[a]?.textStroke?.size,min:0,max:10,onChange:e=>n("styles",e,"title",a,"textStroke","size")}),(0,l.jsx)(Ue,{label:(0,x.__)("Stroke Color","b-blocks"),value:i[a]?.textStroke?.color,onChange:e=>n("styles",e,"title",a,"textStroke","color")})]}),"hover"===a&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),min:0,max:5,step:.01,value:i.transition,onChange:e=>n("styles",e,"title","transition")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Path","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{value:s.color,onChange:e=>n("styles",e,"path","color")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Size","b-blocks"),value:s.size,onChange:e=>n("styles",e,"path","size")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Thickness","b-blocks"),value:s.thickness,step:.1,min:0,max:20,onChange:e=>n("styles",e,"path","thickness")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Starting Point","b-blocks"),value:s.staringPoint,step:.1,min:0,max:2e3,onChange:e=>n("styles",e,"path","staringPoint")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Rotate","b-blocks"),value:s.rotate,step:.1,min:0,max:360,onChange:e=>n("styles",e,"path","rotate")})]})]})},LG=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:CG,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(MG,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(NG,{...e})})]})}) |
| 578 |
})}),EG=({attributes:e,id:o})=>{const{styles:i}=e,{container:s,title:a,path:r}=i,c=`#${o} .b-blocks-text-path-container`,d=`${c} .b-blocks-text-path-svg`,u=`${d} .b-blocks-text-path-title`,p=(e="normal")=>{const t=a[e],n=t?.textStroke.isStroke?`${na("stroke-width",t.textStroke.size?t.textStroke.size+"px":"")}\n\t\t\t${na("stroke",t.textStroke.color)}`:"";return`\n\t\t\t${na("color",t.color)}\n\t\t\t${na("fill",t.color)}\n\t\t\t${na("text-shadow",la(t.textShadow,"text"))}\n\t\t\t${n}\n\t\t`};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${pa("",a.typo).googleFontLink}\n\n\t\t${pa(u,a.typo).styles}\n\n\t\t${c}{\n\t\t\t${na("justify-content",s.desktop.alignment)}\n\t\t}\n\n\t\t${d}{\n\t\t\t${na("rotate",r.rotate?r.rotate+"deg":"")}\n\t\t\t${na("width",r.size)}\n\t\t\t${na("width",r.size)}\n\t\t}\n\n\t\t${u}{\n\t\t\t${p("normal")}\t\t\n\t\t\ttransition: all ${a.transition}s ease-in-out;\n\t\t}\n\n\t\t${u}:hover{\n\t\t\t${p("hover")}\t\t\n\t\t}\n\t\t\n\t\t${t}{\n\t\t\t\t${c}{\n\t\t\t${na("justify-content",s.tablet.alignment)}\n\t\t\t}\n\t\t}\n\t\t${n}{\n\t\t\t\t${c}{\n\t\t\t${na("justify-content",s.mobile.alignment)}\n\t\t\t}\n\t\t}\n\t\t\n\t`}})};function PG(e,t,n){return Math.max(t,Math.min(n,e))}function AG(e){if("number"==typeof e)return PG(e,0,1);const t=String(e).trim();if(t.endsWith("%"))return PG(parseFloat(t.slice(0,-1))/100,0,1);const n=Number(t);return Number.isFinite(n)?PG(n,0,1):0}const BG=({pathSize:e=300,alignment:t="start",customPath:n="",customSvgPathSelector:o="",showIcon:i=!1,icon:s=null,iconSize:a=24,iconStartOffset:r="5%",iconEndOffset:c="95%",attributes:d})=>{const{icon:u,styles:p}=d,{type:h,iconType:g,title:f}=u,{path:x}=p,y="custom"===h?"library"===g?u.library:u.upload:"",v=(0,m.useMemo)((()=>`textPath-${Math.random().toString(36).slice(2)}`),[]),k=(0,m.useRef)(null),[w,_]=(0,m.useState)(null),[C,j]=(0,m.useState)(null),$=(0,m.useMemo)((()=>y?function(e,t){if(!e||"string"!=typeof e)return null;if("undefined"==typeof window)return null;try{const n=(new DOMParser).parseFromString(e,"image/svg+xml"),o=n.querySelector("svg");if(!o)return null;const i=o.getAttribute("viewBox")||null,s=(t?n.querySelector(t):null)||n.querySelector("path"),a=s?.getAttribute("d")||null;return a?{viewBox:i,d:a}:null}catch{return null}}(y,o||null):null),[y,o]),S="custom"===h&&$?.viewBox||$?.viewBox||`0 0 ${e} ${e}`;(0,m.useEffect)((()=>{if(!i)return;const e=k.current;if(!e)return;let t=0;try{t=e.getTotalLength()}catch{return}if(!t||!Number.isFinite(t))return;const n=AG(r),o=AG(c),s=e.getPointAtLength(t*n),a=e.getPointAtLength(t*o);_({x:s.x,y:s.y}),j({x:a.x,y:a.y})}),[i,r,c,e,h,n,y,$?.d]);const T=()=>s&&b().isValidElement(s)?b().cloneElement(s,{...s.props,width:a,height:a,fill:s.props.fill??"currentColor",stroke:s.props.stroke??"currentColor",style:{display:"block",...s.props.style||{}}}):null;return(0,l.jsx)("div",{className:"b-blocks-text-path-container",children:(0,l.jsxs)("svg",{viewBox:S,style:{transition:"transform 0.3s ease"},className:"b-blocks-text-path-svg",children:[(0,l.jsx)("defs",{children:(0,l.jsx)("path",{ref:k,id:v,d:(()=>{const t=e,o=e,i=t/2,s=o/2;switch(h){case"arc":return`M 50,${s+50} Q ${i},${s-100} ${t-50},${s+50}`;case"wave":{const e=40,n=2;let o=`M 0,${s}`;for(let i=0;i<=t;i+=5)o+=` L ${i},${s+e*Math.sin(i/t*Math.PI*n)}`;return o}case"circle":{const e=Math.min(t,o)/2-20;return`M ${i-e},${s}\n A ${e},${e} 0 1,1 ${i+e},${s}\n A ${e},${e} 0 1,1 ${i-e},${s}`}case"custom":return y&&$?.d?$.d:n||`M 50,${s} L ${t-50},${s}`;case"line":return`M 50,${s} L ${t-50},${s}`}})(),fill:"none",stroke:x.color,strokeWidth:x.thickness,strokeLinecap:"round",style:{transition:"stroke 0.3s ease"}})}),(0,l.jsx)("use",{href:`#${v}`}),i&&w&&(0,l.jsx)("g",{transform:`translate(${w.x}, ${w.y})`,children:(0,l.jsx)("g",{transform:`translate(${-a/2}, ${-a/2})`,fill:x.color,stroke:x.color,children:T()})}),i&&C&&(0,l.jsx)("g",{transform:`translate(${C.x}, ${C.y})`,children:(0,l.jsx)("g",{transform:`translate(${-a/2}, ${-a/2})`,fill:x.color,stroke:x.color,children:T()})}),(0,l.jsx)("text",{className:"b-blocks-text-path-title",textAnchor:t,children:(0,l.jsx)("textPath",{href:`#${v}`,startOffset:x.staringPoint,style:{textAnchor:t},children:f})})]})})},IG=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,s=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(LG,{attributes:t,setAttributes:n,updateObj:s,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(EG,{attributes:t,id:`block-${o}`}),(0,l.jsx)(BG,{attributes:t})]})]})}));Nl(_G.name)&&(0,p.registerBlockType)(_G,{icon:il,edit:IG});const OG=window.wp.richText,RG=(0,x.__)("B Remove All Formats","b-blocks");(0,OG.registerFormatType)("b-blocks/remove-inline-formats",{title:RG,tagName:"none",className:null,edit:({value:e,onChange:t})=>(0,l.jsx)(h.RichTextToolbarButton,{icon:"editor-removeformatting",title:RG,onClick:()=>t({...e,formats:Array(e.formats.length)})})});[{type:"b-blocks/text-highlight",icon:e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,width:24,height:24,viewBox:"0 0 1024 1024",children:(0,l.jsx)("path",{d:"M957.6 507.4L603.2 158.2a7.9 7.9 0 0 0-11.2 0L353.3 393.4a8.03 8.03 0 0 0-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 0 0-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0 0 11.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0 0 11.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2z"})}),title:(0,x.__)("B Text Highlight","b-blocks"),tagName:"mark",className:"bBlocksTextHighlight"},{type:"b-blocks/text-uppercase",icon:e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,width:24,height:24,viewBox:"0 0 32 32",children:(0,l.jsx)("path",{d:"M 1 6 L 1 8 L 7 8 L 7 26 L 9 26 L 9 8 L 15 8 L 15 6 L 1 6 z M 17 6 L 17 8 L 23 8 L 23 26 L 25 26 L 25 8 L 31 8 L 31 6 L 17 6 z"})}),title:(0,x.__)("B Text Uppercase","b-blocks"),tagName:"span",className:"bBlocksTextUppercase"},{type:"b-blocks/text-underline",icon:e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,width:24,height:24,viewBox:"0 0 16 16",children:(0,l.jsx)("path",{d:"M3,13l10,0l0,2l-10,0l0,-2Zm8,-12l2,0l0,6c0,2.76 -2.24,5 -5,5c-2.76,0 -5,-2.24 -5,-5l0,-6l2,0l-0,6c-0,1.656 1.344,3 3,3c1.656,0 3,-1.344 3,-3l0,-6Z"})}),title:(0,x.__)("B Text Underline","b-blocks"),tagName:"span",className:"bBlocksTextUnderline"},{type:"b-blocks/text-overline",icon:e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,width:24,height:24,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M19,3v2H5V3H19z M12,7c-3.87,0-7,3.13-7,7c0,3.87,3.13,7,7,7s7-3.13,7-7C19,10.13,15.87,7,12,7z M12,18.5 c-2.49,0-4.5-2.01-4.5-4.5S9.51,9.5,12,9.5s4.5,2.01,4.5,4.5S14.49,18.5,12,18.5z"})}),title:(0,x.__)("B Text Overline","b-blocks"),tagName:"span",className:"bBlocksTextOverline"}].forEach((e=>{const{type:t,icon:n,title:o,tagName:i,className:s}=e;(0,OG.registerFormatType)(t,{title:o,tagName:i,className:s,edit:({isActive:e,value:i,onChange:s})=>(0,l.jsx)(h.RichTextToolbarButton,{title:o,onClick:()=>{s((0,OG.toggleFormat)(i,{type:t}))},isActive:e,icon:n("bBlocksInlineIcon "+(e?"bBlocksInlineIconActive":""))})})})),wp.blocks.updateCategory("bBlocks",{icon:c})})()})(); |