!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,n){"use strict";n.r(t);var r=n(4),o=n.n(r),c=n(5),a=n(6),l=n.n(a),i=n(0),u=n(2),s=n(7),b=n(3),p=n(1),f=function(e){var t=e.attributes,n=e.className,r=e.setAttributes,o="";o=t.language?"language-"+t.language:"",o=t.lineNumbers?o+" line-numbers":o;var c=Object(s.hasBlockSupport)("core/code","lightBlockWrapper",!1),a={value:t.content,onChange:function(e){return r({content:e})},placeholder:Object(p.__)("Write code…"),"aria-label":Object(p.__)("Code")};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.InspectorControls,{key:"controls"},Object(i.createElement)(b.PanelBody,{title:Object(p.__)("Settings")},Object(i.createElement)(b.SelectControl,{label:Object(p.__)("Language"),value:t.language,options:[{label:Object(p.__)("Select code language","code-syntax-block"),value:""}].concat(Object.keys(mkaz_code_syntax_languages).map((function(e){return{label:mkaz_code_syntax_languages[e],value:e}}))),onChange:function(e){return r({language:e})}}),Object(i.createElement)(b.ToggleControl,{label:Object(p.__)("Show line numbers","code-syntax-block"),checked:t.lineNumbers,onChange:function(e){return r({lineNumbers:e})}}),Object(i.createElement)(b.TextControl,{label:Object(p.__)("Title for Code Block","code-syntax-block"),value:t.title,onChange:function(e){return r({title:e})},placeholder:Object(p.__)("Title or File (optional)","code-syntax-block")}))),Object(i.createElement)("div",{key:"editor-wrapper",className:n},c?Object(i.createElement)(u.__experimentalBlock.pre,null,Object(i.createElement)(u.PlainText,l()({__experimentalVersion:2,tagName:"code"},a))):Object(i.createElement)(u.PlainText,a),Object(i.createElement)("div",{style:{fontFamily:"sans-serif",fontSize:".6rem",color:"#999999",margin:"-1.5rem auto 1.0rem auto",paddingRight:"16px",textAlign:"right"},className:"wp-block"},mkaz_code_syntax_languages[t.language])))},g=function(e){var t=e.attributes,n="";return n=t.language?"language-"+t.language:"",n=t.lineNumbers?n+" line-numbers":n,Object(i.createElement)("pre",{title:t.title},Object(i.createElement)("code",{lang:t.language,className:n},t.content))};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(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){o()(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}Object(c.addFilter)("blocks.registerBlockType","mkaz/code-syntax-block",(function(e){return"core/code"!==e.name?e:O(O({},e),{},{attributes:O(O({},e.attributes),{},{language:{type:"string",selector:"code",source:"attribute",attribute:"lang"},lineNumbers:{type:"boolean"},title:{type:"string",source:"attribute",selector:"pre",attribute:"title"}}),edit:f,save:g})}))}]);