@nextcss/nextcss
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function n(){n=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var a=e&&e.prototype instanceof p?e:p,c=Object.create(a.prototype),i=new N(r||[]);return o(c,"_invoke",{value:$(t,n,i)}),c}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var d={};function p(){}function h(){}function v(){}var m={};l(m,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(E([])));g&&g!==e&&r.call(g,c)&&(m=g);var y=v.prototype=p.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,a,c,i){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,c,i)}),(function(t){n("throw",t,c,i)})):e.resolve(s).then((function(t){l.value=t,c(l)}),(function(t){return n("throw",t,c,i)}))}i(u.arg)}var a;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function $(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return O()}for(n.method=o,n.arg=a;;){var c=n.delegate;if(c){var i=S(c,n);if(i){if(i===d)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function S(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=f(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function E(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=v,o(y,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:h,configurable:!0}),h.displayName=l(v,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var c=new x(s(e,n,r,o),a);return t.isGeneratorFunction(n)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},w(y),l(y,u,"Generator"),l(y,c,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=E,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return c.type="throw",c.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var i=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(i&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var c=a?a.completion:{};return c.type=t,c.arg=e,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(c)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e,n,r,o,a,c){try{var i=t[a](c),u=i.value}catch(t){return void n(t)}i.done?e(u):Promise.resolve(u).then(r,o)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var c=t.apply(e,n);function i(t){o(c,r,a,i,u,"next",t)}function u(t){o(c,r,a,i,u,"throw",t)}i(void 0)}))}}function c(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(t,e)||l(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||l(t)||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 l(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var f="SAVE",d="CLEAN",p=[],h=[],v=[];const m=/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,b=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,g=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,y=t=>(t?.match(m)||t?.match(b)||t?.match(g))?.slice(1).map(((t,e)=>{const n=parseInt(t.padStart(2,t),16);return 3===e?Math.round(n/255*100):n})),w=t=>((t,e,n)=>Math.min(Math.max(e,t),n))(Math.round(t),0,255),x=(t,e=0)=>{const n=y(t),r=e/100;return n?.forEach(((t,e,n)=>{e>=3||(n[e]=w(r<0?t+(255-t)*Math.abs(r):t-t*r))})),(t=>{if(Array.isArray(t)&&[3,4].includes(t.length))return"#"+t.map(((t,e)=>(3===e?Math.round(t/100*255):t).toString(16).padStart(2,"0"))).join("")})(n)},$=[-90,-85,-74,-62,-50,-40,-30,-20,-10,0,10,20,30,40,50,60,70,80,85];var S=function(t){var e={black:"#000000",white:"#ffffff"};return Object.keys(t).forEach((function(n){var r=(t=>$.reduce(((e,n,r)=>{const o=x(t,n);return e[50*r+50]=o,e}),{}))(t[n]);Object.keys(r).forEach((function(t){var o="".concat(n,"-").concat(t);e[o]=r[t]}))})),e},k={material:S({red:"#f44336",pink:"#e91e63",purple:"#9c27b0","deep-purple":"#673ab7",indigo:"#3f51b5",blue:"#2196f3","light-blue":"#03a9f4",cyan:"#00bcd4",teal:"#009688",green:"#4caf50","light-green":"#8bc34a",lime:"#cddc39",yellow:"#ffeb3b",amber:"#ffc107",orange:"#ff9800","deep-orange":"#ff5722",brown:"#795548",grey:"#9e9e9e","dark-grey":"#575757","blue-grey":"#607d8b"}),tailwind:S({slate:"#64748b",grey:"#6b7280",zinc:"#71717a",neutral:"#737373",stone:"#78716c",red:"#ef4444",orange:"#f97316",amber:"#f59e0b",yellow:"#eab308",lime:"#84cc16",green:"#22c55e",emerald:"#10b981",teal:"#14b8a6",cyan:"#06b6d4",sky:"#0ea5e9",blue:"#3b82f6",indigo:"#6366f1",violet:"#8b5cf6",purple:"#a855f7",fuchsia:"#d946ef",pink:"#ec4899",rose:"#f43f5e"})},j={merged:!1,debug:!1,verbose:!1,content:[],css:[],watch:!1,useStyleNode:!1,skipResetStyles:!1,skipRemUnits:!1,palette:"material",breakpoints:{sm:390,md:768,lg:1024,xl:1400},conatiners:{xs:480,sm:640,md:768,lg:1024,xl:1280}},N=e({},j),E=function(){return e({},N)},O=function(t){if(!N.merged&&"object"===r(t)){for(var e in t)e in j&&(N[e]=t[e]);var n=N.palette,o=N.debug;"object"===r(null==t?void 0:t.colors)&&(o&&console.log("Merge color palette...",{palette:n,colors:t.colors}),function(t,e){var n=S(e);Object.keys(n).forEach((function(e){k[t][e]=n[e]}))}(n,t.colors)),N.merged=!0,o&&console.log("Config merged",N)}return N},L=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare,M=function(t){return Math.round(parseFloat(t)/16*1e3)/1e3+"rem"},C=function(t,e){return("-"===t?t+e:e)||""},A=function(t){var e=null==t?void 0:t.toString(),n=/^-?\d+\/\d+$/.test(t);return!(!t||n)&&("-"===e[0]&&(isNaN(e)||0===Math.abs(e)))},P=function(t){return t.replace(/\s+/gm," ").replace(/\s*({|}|:|;|>)\s*/gm,"$1").replace(/\(\s(.*?)\s\)/gm,"($1)").replace(";}","}").replace(/([:\s])(-?0[\w]+)/gm,"$10").trim()},T=function(t){return{w:"width",h:"height",p:"padding",m:"margin",b:"border",r:"border-radius",fg:"color",bg:"background-color"}[t]||""},I=function(t){return{t:"-top",r:"-right",b:"-bottom",l:"-left"}[t]||""},_={reverseBreakpoint:!1},F=function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_,a=t instanceof RegExp,c="function"==typeof n,i=o&&"object"===r(o);a&&c&&i?p.push({pattern:t,fn:n,options:e(e({},_),o)}):console.error("Declared register is not correct!",{pattern:t,fn:n,options:o})},z=function(t,e){var n=t.pattern,r=t.fn;t.options;var o=e.match(n);return!!o&&r(o)},R=function(){var t,e,n,r=h.sort((function(t,e){return t.proc-e.proc||L(t.className,e.className)})).filter((function(t){return t.count})).map((function(t){return t.style})).join(""),o=r.match(/(.*?{+.*?}+)/gm)||[];return e=[],n=[],(t=o).forEach((function(r,o){/:hover\{/.test(r)&&(e.push(r),delete t[o]),/:active\{/.test(r)&&(n.push(r),delete t[o])})),e.concat(n).forEach((function(e){return t.push(e)})),function(t){var e={},n=[];t.forEach((function(n,r){var o=n.match(/(@media.*?){(.*?})}/);if(o){var a,c=i(o,3),u=c[1],l=c[2];(a=e)[u]||(a[u]=[]),e[u].push(l),delete t[r]}})),Object.entries(e).forEach((function(t){var e=i(t,2),r=e[0],o=e[1];return n.push("".concat(r,"{").concat(o.join(""),"}"))})),n.sort(L).forEach((function(e){return t.push(e)})),e=n=[]}(o),o.join("")},D=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=E(),r=n.palette,o=k[r][t]||"";if(e&&7===o.length){var a=y(o),c=i(a,3),u=c[0],l=c[1],s=c[2];return"rgba(".concat(u," ").concat(l," ").concat(s," / ").concat(e,"%)")}return o};F(/^(block|flex|inline|inline-block|inline-flex|table|inline-table|table-caption|table-cell|table-column|table-column-group|table-footer-group|table-header-group|table-row-group|table-row|flow-root|grid|inline-grid|contents|list-item)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { display: ").concat(r," }")})),F(/^(static|relative|absolute|fixed|sticky)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { position: ").concat(r," }")})),F(/^(box)-(border|content)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2];return".".concat(n," { box-sizing: ").concat(o,"-").concat(r," }")})),F(/^(float|clear)-(left|right|both|none)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2];if("float"!==r||"both"!==o)return".".concat(n," { ").concat(r,": ").concat(o," }")})),F(/^container(-auto)?-(\w+)$/,(function(t){var e,n,r=i(t,3),o=r[0],a=r[1],c=r[2],u=(e=c,null===(n=E().conatiners)||void 0===n?void 0:n[e]);if(u){var l=a?"margin-left: auto; margin-right: auto":"";return".".concat(o," { width: 100%; max-width: ").concat(u,"px; ").concat(l," }")}})),F(/^(-)?(top|right|bottom|left)-(auto|\d+|(\d+\/\d+))$/,(function(t){var e=i(t,5),n=e[0],r=e[1],o=e[2],a=e[3],c=e[4],u=C(r,a);if(!A(u)){var l=isNaN(a)?a:u+"px",s=c?"calc( ".concat(u,"*100% )"):l;return".".concat(n.replace(/\//,"\\/")," { ").concat(o,": ").concat(s," }")}})),F(/^(-)?inset-(auto|\d+|(\d+\/\d+))$/,(function(t){var e=i(t,4),n=e[0],r=e[1],o=e[2],a=e[3],c=C(r,o);if(!A(c)){var u=isNaN(o)?o:c+"px",l=a?"calc( ".concat(c,"*100% )"):u;return".".concat(n.replace(/\//,"\\/")," { top: ").concat(l,"; right: ").concat(l,"; bottom: ").concat(l,"; left: ").concat(l,"}")}})),F(/^(-)?inset-([xy])-(auto|\d+|(\d+\/\d+))$/,(function(t){var e=i(t,5),n=e[0],r=e[1],o=e[2],a=e[3],c=e[4],u=C(r,a);if(!A(u)){var l=isNaN(a)?a:u+"px",s=c?"calc( ".concat(u,"*100% )"):l,f="x"===o?"left":"top",d="x"===o?"right":"bottom";return".".concat(n.replace(/\//,"\\/")," { ").concat(f,": ").concat(s,"; ").concat(d,": ").concat(s," }")}})),F(/^(-)?z-(auto|\d+)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],a=C(r,o);if(!A(a))return".".concat(n," { z-index: ").concat(a," }")})),F(/^(ratio|aspect)-(auto|square|video|\d+\/\d+)$/,(function(t){var e=i(t,3),n=e[0];e[1];var r=e[2],o={auto:"auto",square:"1/1",video:"16/9"}[r]||r;return".".concat(n.replace(/\//,"\\/")," { aspect-ratio: ").concat(o," }")})),F(/^(fit|object)-(contain|cover|fill|scale-down|none)$/,(function(t){var e=i(t,3),n=e[0];e[1];var r=e[2];return".".concat(n," { object-fit: ").concat(r," }")})),F(/^object-(center|top|right|bottom|left)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { object-position: ").concat(r," }")})),F(/^(of|overflow)(-[xy])?-(auto|hidden|scroll|visible)$/,(function(t){var e=i(t,4),n=e[0];e[1];var r=e[2],o=e[3],a=r||"";return".".concat(n," { overflow").concat(a,": ").concat(o," }")})),F(/^(of|overflow)(-[xy])?-(overlay)$/,(function(t){var e=i(t,4),n=e[0];e[1];var r=e[2],o=e[3],a=r||"";return".".concat(n," { overflow").concat(a,": auto; overflow").concat(a,": ").concat(o," }")})),F(/^(os|overscroll)(-[xy])?-(auto|contain|none)$/,(function(t){var e=i(t,4),n=e[0];e[1];var r=e[2],o=e[3],a=r||"";return".".concat(n," { overscroll-behavior").concat(a,": ").concat(o," }")})),F(/^(p[trbl]?|r)-(\d+|(\d+\/\d+))$/,(function(t){var e=i(t,4),n=e[0],r=e[1],o=e[2],a=e[3],c=isNaN(o)?o:o+"px",u=a?"calc( ".concat(o,"*100% )"):c,l=T(r[0]),s=I(r[1]);return".".concat(n.replace(/\//,"\\/")," { ").concat(l).concat(s,": ").concat(u," }")})),F(/^(-)?(m[trbl]?)-(auto|\d+|(\d+\/\d+))$/,(function(t){var e=i(t,5),n=e[0],r=e[1],o=e[2],a=e[3],c=e[4],u=C(r,a);if(!A(u)){var l=T(o[0]),s=I(o[1]),f=isNaN(a)?a:u+"px",d=c?"calc( ".concat(u,"*100% )"):f;return".".concat(n.replace(/\//,"\\/")," { ").concat(l).concat(s,": ").concat(d," }")}})),F(/^(-)?([pm][xy])-(auto|\d+|(\d+\/\d+))$/,(function(t){var e=i(t,5),n=e[0],r=e[1],o=e[2],a=e[3],c=e[4],u=C(r,a);if(!A(u)){var l=T(o[0]),s=isNaN(a)?a:u+"px",f=c?"calc( ".concat(u,"*100% )"):s,d="y"===o[1]?"top":"left",p="y"===o[1]?"bottom":"right";if("auto"!==a||"margin"===l)return".".concat(n.replace(/\//,"\\/")," { ").concat(l,"-").concat(d,": ").concat(f,"; ").concat(l,"-").concat(p,": ").concat(f," }")}})),F(/^(-)?(s|space-)([xy])-(\d+)(-reverse)?$/,(function(t){var e=i(t,6),n=e[0],r=e[1];e[2];var o=e[3],a=e[4],c=e[5];if(!A(r+a)){var u=r?-a:a,l="x"===o?c?"right":"left":c?"bottom":"top";return".".concat(n," > :not(:first-child) { margin-").concat(l,": ").concat(u,"px }")}})),F(/^flex-gap-(\d+)$/,(function(t){var e=i(t,2),n=e[0],r=e[1]/2;return".".concat(n," { margin: -").concat(r,"px } .").concat(n," > * { padding: ").concat(r,"px }")})),F(/^(min-|max-)?([wh])-(auto|full|screen|min|max|\d+|(\d+\/\d+))$/,(function(t){var e=i(t,5),n=e[0],r=e[1],o=e[2],a=e[3],c=e[4],u={auto:"max-"===r?"none":"auto",full:"100%",screen:"h"===o?"100vh":"100vw",min:"min-content",max:"max-content"},l=r||"",s=isNaN(a)?u[a]||a:a+"px",f=c?"calc( ".concat(a,"*100% )"):s,d=T(o);return".".concat(n.replace(/\//,"\\/")," { ").concat(l+d,": ").concat(f," }")})),F(/^font-(sans|serif|mono)$/,(function(t){var e=i(t,2),n=e[0],r=e[1],o={sans:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',serif:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',mono:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'}[r]||"";return".".concat(n," { font-family: ").concat(o," }")})),F(/^fs-(\d+)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { font-size: ").concat(r,"px }")})),F(/^fw-([1-9]00|bold|bolder|ligher|normal)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { font-weight: ").concat(r," }")})),F(/^lh-([\d.]+)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n.replace(/\./,"\\.")," { line-height: ").concat(r," }")})),F(/^text-(left|center|right|justify)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { text-align: ").concat(r," }")})),F(/^(uppercase|lowercase|capitalize|no-transform)$/,(function(t){var e=i(t,2),n=e[0],r=e[1],o="no-transform"===r?"none":r;return".".concat(n," { text-transform: ").concat(o," }")})),F(/^(underline|overline|line-through|no-decoration)$/,(function(t){var e=i(t,2),n=e[0],r=e[1],o="no-decoration"===r?"none":r;return".".concat(n," { text-decoration: ").concat(o," }")})),F(/^text-trim(-all)?$/,(function(t){var e=i(t,2),n=e[0],r=e[1]?"":">";return".".concat(n,", .").concat(n," ").concat(r," * { min-width: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden }")})),F(/^pointer-(none|auto|all)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { pointer-events: ").concat(r," }")})),F(/^cursor-(pointer|default|auto)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { cursor: ").concat(r," }")})),F(/^show$/,(function(t){var e=i(t,1)[0];return".".concat(e," { display: none !important }")}),{reverseBreakpoint:!0}),F(/^hide$/,(function(t){var e=i(t,1)[0];return".".concat(e," { display: none !important }")})),F(/^fit$/,(function(t){var e=i(t,1)[0];return".".concat(e," { width: 100%; height: 100% }")})),F(/^fit-([wh])$/,(function(t){var e=i(t,2),n=e[0],r=e[1],o=T(r);return".".concat(n," { ").concat(o,": 100% }")})),F(/^(b[trbl]?)-(\d+)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],a=T(r[0]),c=I(r[1]);return".".concat(n," { ").concat(a).concat(c,"-width: ").concat(o,"px; ").concat(a).concat(c,"-style: solid }")})),F(/^(b[trbl]?)-(solid|dashed|dotted|double|groove|inset|none|outset|ridge)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],a=T(r[0]),c=I(r[1]);return".".concat(n," { ").concat(a).concat(c,"-style: ").concat(o," }")})),F(/^b-(collapse|separate)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { border-collapse: ").concat(r," }")})),F(/^flex-(wrap|wrap-reverse|nowrap)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { flex-wrap: ").concat(r," }")})),F(/^flex-(row|row-reverse|col|col-reverse)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { flex-direction: ").concat(r.replace("col","column")," }")})),F(/^flex-(auto|[01])$/,(function(t){var e=i(t,2),n=e[0],r=e[1],o="auto"===r?"1 1 auto":"0"===r?"0 0 auto":"1 1 0%";return".".concat(n," { flex: ").concat(o," }")})),F(/^flex-(grow|shrink)-([01])$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2];return".".concat(n," { flex-").concat(r,": ").concat(o," }")})),F(/^justify-((center)|(start|end)|(around|between|evenly))$/,(function(t){var e=i(t,5),n=e[0],r=e[2],o=e[3],a=e[4],c=a?"space-"+a:o?"flex-"+o:r;return".".concat(n," { justify-content: ").concat(c," }")})),F(/^align-((center|baseline|stretch)|(start|end))$/,(function(t){var e=i(t,4),n=e[0],r=e[2],o=e[3],a=o?"flex-"+o:r;return".".concat(n," { align-items: ").concat(a," }")})),F(/^align-self-((center|baseline|stretch)|(start|end))$/,(function(t){var e=i(t,4),n=e[0],r=e[2],o=e[3],a=o?"flex-"+o:r;return".".concat(n," { align-self: ").concat(a," }")})),F(/^(-)?order-(\d+)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2];if(!A(r+o)){var a=r?-o:o;return".".concat(n," { order: ").concat(a," }")}})),F(/^shadow-(\d+)$/,(function(t){var e=i(t,2),n=e[0],r=e[1],o=function(t,e,n,r,o){return"".concat(t,"px ").concat(e,"px ").concat(n,"px ").concat(r,"px ").concat(o)},a=function(t){return Math.round(r*t)},c=o(0,a(.35),a(3.5),a(.25),"rgba(0, 0, 0, 0.08)"),u=o(0,a(1),a(1.4),a(-.5),"rgba(0, 0, 0, 0.09)"),l=o(0,a(.5),a(.6),a(-.3),"rgba(0, 0, 0, 0.14)"),s="0"===r?"none":"".concat(c,", ").concat(u,", ").concat(l);if(!(r>24))return".".concat(n," { box-shadow: ").concat(s," }")})),F(/^([fb]g)-(black|white|([\w-]+\d+))(\/(\d+))?$/,(function(t){var e=i(t,6),n=e[0],r=e[1],o=e[2],a=e[5],c=T(r),u=D(o,a);if(c&&u)return".".concat(n.replace(/\//,"\\/")," { ").concat(c,": ").concat(u," }")})),F(/^b-(black|white|([\w-]+\d+))(\/(\d+))?$/,(function(t){var e=i(t,5),n=e[0],r=e[1],o=e[4],a=D(r,o);if(a)return".".concat(n.replace(/\//,"\\/")," { border-color: ").concat(a," }")}));var U,G=function(t){return H(t,f)},B=function(t){return H(t,d)},H=function(t,e){if(t&&e){"object"===r(t)&&(t="baseVal"in t?t.baseVal:"");var n=!1;t.split(" ").forEach((function(t){if(t&&!v.includes(t)){var r=h.find((function(e){return e.className===t}));if(r)e===f&&r.count++,e===d&&r.count--,r.count<0&&(r.count=1,n=!0);else if(e===f){var o=function(t){var e="",n=null;return p.forEach((function(r,o){var a=z(r,t);if(a)return e=P(a),void(n=o)})),{style:e,proc:n}}(t),a=o.style,c=o.proc;a?h.push({className:t,style:a,proc:c,count:1}):v.push(t)}}})),n&&console.warn("Observation anomaly detected. Some nodes were unmounted more than they were mounted.")}},q=["hover","active","focus"],V=[].concat(q,["every","odd","even","first","last"],["dark"]);"function"==typeof(U=function(t,e){var n=t.pattern,r=t.fn,o=t.options.reverseBreakpoint,a=e.split(":"),c=a.pop().match(n);if(!c)return!1;var i=Object.keys(E().breakpoints),u=o?"max-width":"min-width",l=!1,s=!1,f="",d="";if(a.forEach((function(t){if(!V.includes(t)&&!i.includes(t))return B(e),s=!0,!1;var n,r;l||(n=t,l=(null===(r=E().breakpoints)||void 0===r?void 0:r[n])||!1),q.includes(t)&&(d+=":"+t)})),s)return!1;if(!(f=r(c,a)))return!1;if(a.length){var p=a.join("\\:");f=f.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,".".concat(p,"\\:$1$2")).replace(/:\s*\./gm,":")}if(a.forEach((function(t){"every"===t&&(f=f.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > * $2")),"odd"===t&&(f=f.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > :nth-child(odd) $2")),"even"===t&&(f=f.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > :nth-child(even) $2")),"first"===t&&(f=f.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > :first-child $2")),"last"===t&&(f=f.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > :last-child $2"))})),a.includes("dark")&&(f=".dark ".concat(f)),d&&(f=f.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1".concat(d,"$2"))),a.includes("hover")){var h=f.replace(/:hover\{/g,":active{");f="@media (hover: hover) and (pointer: fine) { ".concat(f," }")+h}return l&&(o&&l--,f="@media screen and (".concat(u,": ").concat(l,"px) { ").concat(f," }")),f})&&(z=U);var Y=["head","meta","title","link","script","noscript","style","br","path","g"],J=function(t){return Y.includes(t.nodeName.toLowerCase())||1!==t.nodeType},K=function(t){return W(t,f)},Q=function(t){return W(t,d)},W=function(t,e){if(!J(t)&&e){var n=e===d?B:G;if("svg"===t.nodeName)n(t.className);else n(X(t))}},X=function(t){var e=t.outerHTML.matchAll(/class=["'`](.*?)["'`]/gm),n=[];return Array.from(e).forEach((function(t){return n.push(t[1])})),n.join(" ")},Z=document.createDocumentFragment(),tt=document.createDocumentFragment(),et=document.querySelector("head"),nt=document.createElement("style"),rt=document.createElement("style"),ot=document.createElement("link"),at=document.createElement("link"),ct=function(t){return!!t.isConnected&&et.removeChild(t)},it=function(t){return t?"data:text/css;base64,"+btoa(t):""};ot.rel=at.rel="stylesheet";var ut,lt=function(){var t=E(),e=t.useStyleNode,n=t.skipRemUnits,r=t.debug,o=R()||"",a=!1;if(n||(o=o.replace(/(\d*\.?\d+)px/g,(function(t,e){return M(e)}))),e)nt.innerHTML!==o&&(nt.innerHTML=o,a=!0);else{var c=it(o);ot.href!==c&&(ot.href=c,a=!0)}if(a){!function(){var t,e=E(),n=e.useStyleNode,r=e.skipResetStyles,o=e.skipRemUnits,a=e.debug;if(r?(ct(at),ct(rt)):t||(t=P(":root{line-height:1.4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji';-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;}*,:before,:after{box-sizing:border-box;outline:none;-webkit-user-drag:none;touch-action:pan-x pan-y;}body{margin:0;max-width:100vw;overscroll-behavior:none;}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;}h1,h2,h3,h4,h5,h6,p{margin:0;font:inherit;}small{font-size:85%;}a{color:inherit;text-decoration:none;}button{font:inherit;line-height:1;cursor:pointer;background-color:inherit;border:0;color:inherit;padding:0;}img,svg{display:block;max-width:100%;height:auto;border:none;}input,textarea,select{font:inherit;font-size:16px;border:0;border-radius:0;background-clip:padding-box;color:inherit;background-color:transparent;}textarea{resize:none;}::placeholder{font-size:14px;}label{display:block;}fieldset{border:1px solid;}ul,ol{margin:0;padding:0;list-style-type:none;}hr{height:0;border:0;border-bottom-width:1px;border-style:solid;color:inherit;}table{border-spacing:0;border-collapse:collapse;}th{font-weight:inherit;}iframe{border:0;}menu{margin:0;padding:0;}form,figure,pre,blockquote,dl,dd{margin:0;}address{font:inherit;}"),o&&(t=t.replace(/(\d*\.?\d+)px/g,(function(t,e){return M(e)})))),n){if(ct(Z),r||rt.isConnected||(rt.innerHTML!==t&&(rt.innerHTML=t),tt.appendChild(rt),a&&console.log("Append StyleNode (reset)")),nt.isConnected||(tt.appendChild(nt),a&&console.log("Append StyleNode (main)")),!tt.isConnected){var c=et.querySelector("style");c?et.insertBefore(tt,c):et.appendChild(Z)}}else{if(ct(tt),!r&&!at.isConnected){var i=it(t);(at.href=i)&&(at.href=i),Z.appendChild(at),a&&console.log("Append LinkNode (reset)")}if(ot.isConnected||(Z.appendChild(ot),a&&console.log("Append LinkNode (main)")),!Z.isConnected){var u=et.querySelector("link[rel=stylesheet]")||et.querySelector("style");u?et.insertBefore(Z,u):et.appendChild(Z)}}}();var i=performance.measure("mutation","mutation-start","mutation-end").duration;r&&st(i)}},st=function(t){var e=h.filter((function(t){return t.count>0})).length,n=Math.round(10*t)/10;console.log("Processed (main)",e,"rules in",n,"ms")},ft=function(t){return new Promise((function(e,n){try{e(t())}catch(t){n(t)}}))},dt=function(t,e){return Promise.all(u(t).map(function(){var t=a(n().mark((function t(r){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ft((function(){return e(r)}));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()))},pt=function(t){performance.mark("mutation-start"),O(window.nextcssConfig),dt(t,function(){var t=a(n().mark((function t(e){var r,o;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!J(e.target)){t.next=2;break}return t.abrupt("return");case 2:if("childList"!==e.type){t.next=9;break}if(null===(r=e.addedNodes)||void 0===r||!r.length){t.next=6;break}return t.next=6,dt(e.addedNodes,K).then((function(){return lt()})).catch((function(t){return console.error(t)}));case 6:if(null===(o=e.removedNodes)||void 0===o||!o.length){t.next=9;break}return t.next=9,dt(e.removedNodes,Q).catch((function(t){return console.error(t)}));case 9:if("attributes"!==e.type||"class"!==e.attributeName){t.next=13;break}if(e.target.className===e.oldValue){t.next=13;break}return t.next=13,ft((function(){return B(e.oldValue),G(e.target.className),!0})).then((function(){return"HTML"!==e.target.nodeName&<()})).catch((function(t){return console.error(t)}));case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),performance.mark("mutation-end")},ht=function(){var t=new MutationObserver(pt),e=document.body;pt([{type:"childList",addedNodes:[e],target:e}]),t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"],attributeOldValue:!0,characterData:!1})};document&&document.body?ht():(ut=new MutationObserver((function(t){t.forEach((function(t){var e;null===(e=t.addedNodes)||void 0===e||e.forEach((function(t){"BODY"===t.nodeName&&(ht(),ut.disconnect())}))}))}))).observe(document.documentElement,{childList:!0,characterData:!1})}(); | ||
!function(){"use strict";const e="SAVE",t="CLEAN",r=[],o=[],n=[],a=/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,l=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,s=e=>(e?.match(a)||e?.match(l)||e?.match(i))?.slice(1).map(((e,t)=>{const r=parseInt(e.padStart(2,e),16);return 3===t?Math.round(r/255*100):r})),c=e=>((e,t,r)=>Math.min(Math.max(t,e),r))(Math.round(e),0,255),d=(e,t=0)=>{const r=s(e),o=t/100;return r?.forEach(((e,t,r)=>{t>=3||(r[t]=c(o<0?e+(255-e)*Math.abs(o):e-e*o))})),(e=>{if(Array.isArray(e)&&[3,4].includes(e.length))return"#"+e.map(((e,t)=>(3===t?Math.round(e/100*255):e).toString(16).padStart(2,"0"))).join("")})(r)},u=[-90,-85,-74,-62,-50,-40,-30,-20,-10,0,10,20,30,40,50,60,70,80,85],p=e=>{const t={black:"#000000",white:"#ffffff"};return Object.keys(e).forEach((r=>{const o=(e=>u.reduce(((t,r,o)=>{const n=d(e,r);return t[50*o+50]=n,t}),{}))(e[r]);Object.keys(o).forEach((e=>{t[`${r}-${e}`]=o[e]}))})),t},$={material:p({red:"#f44336",pink:"#e91e63",purple:"#9c27b0","deep-purple":"#673ab7",indigo:"#3f51b5",blue:"#2196f3","light-blue":"#03a9f4",cyan:"#00bcd4",teal:"#009688",green:"#4caf50","light-green":"#8bc34a",lime:"#cddc39",yellow:"#ffeb3b",amber:"#ffc107",orange:"#ff9800","deep-orange":"#ff5722",brown:"#795548",grey:"#9e9e9e","dark-grey":"#575757","blue-grey":"#607d8b"}),tailwind:p({slate:"#64748b",grey:"#6b7280",zinc:"#71717a",neutral:"#737373",stone:"#78716c",red:"#ef4444",orange:"#f97316",amber:"#f59e0b",yellow:"#eab308",lime:"#84cc16",green:"#22c55e",emerald:"#10b981",teal:"#14b8a6",cyan:"#06b6d4",sky:"#0ea5e9",blue:"#3b82f6",indigo:"#6366f1",violet:"#8b5cf6",purple:"#a855f7",fuchsia:"#d946ef",pink:"#ec4899",rose:"#f43f5e"})},f={merged:!1,debug:!1,verbose:!1,content:[],css:[],watch:!1,useStyleNode:!1,skipResetStyles:!1,skipRemUnits:!1,palette:"material",breakpoints:{sm:390,md:768,lg:1024,xl:1400},conatiners:{xs:480,sm:640,md:768,lg:1024,xl:1280}},m={...f},h=()=>({...m}),b=e=>{if(!m.merged&&"object"==typeof e){for(let t in e)t in f&&(m[t]=e[t]);const t=m.palette,r=m.debug;"object"==typeof e?.colors&&(r&&console.log("Merge color palette...",{palette:t,colors:e.colors}),((e,t)=>{const r=p(t);Object.keys(r).forEach((t=>{$[e][t]=r[t]}))})(t,e.colors)),m.merged=!0,r&&console.log("Config merged",m)}return m},g=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare,y=e=>Math.round(parseFloat(e)/16*1e4)/1e4+"rem",x=(e,t)=>("-"===e?e+t:t)||"",w=e=>{const t=e?.toString(),r=/^-?\d+\/\d+$/.test(e);return!(!e||r)&&("-"===t[0]&&(isNaN(t)||0===Math.abs(t)))},v=e=>e.replace(/\s+/gm," ").replace(/\s*({|}|:|;|>)\s*/gm,"$1").replace(/\(\s(.*?)\s\)/gm,"($1)").replace(";}","}").replace(/([:\s])(-?0[\w]+)/gm,"$10").trim(),k=e=>({w:"width",h:"height",p:"padding",m:"margin",b:"border",r:"border-radius",fg:"color",bg:"background-color"}[e]||""),N=e=>({t:"-top",r:"-right",b:"-bottom",l:"-left"}[e]||""),S={reverseBreakpoint:!1},E=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S;e instanceof RegExp&&"function"==typeof t&&(o&&"object"==typeof o)?r.push({pattern:e,fn:t,options:{...S,...o}}):console.error("Declared register is not correct!",{pattern:e,fn:t,options:o})};let j=(e,t)=>{let{pattern:r,fn:o,options:n}=e;const a=t.match(r);return!!a&&o(a)};const M=()=>{const e=o.sort(((e,t)=>e.proc-t.proc||g(e.className,t.className))).filter((e=>e.count)).map((e=>e.style)).join(""),t=e.match(/(.*?{+.*?}+)/gm)||[];return(e=>{const t=[],r=[];e.forEach(((o,n)=>{/:hover\{/.test(o)&&(t.push(o),delete e[n]),/:active\{/.test(o)&&(r.push(o),delete e[n])})),t.concat(r).forEach((t=>e.push(t)))})(t),(e=>{let t={},r=[];e.forEach(((r,o)=>{const n=r.match(/(@media.*?){(.*?})}/);if(n){const[,r,a]=n;t[r]||=[],t[r].push(a),delete e[o]}})),Object.entries(t).forEach((e=>{let[t,o]=e;return r.push(`${t}{${o.join("")}}`)})),r.sort(g).forEach((t=>e.push(t))),t=r=[]})(t),t.join("")},C=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{palette:r}=h(),o=$[r][e]||"";if(t&&7===o.length){const[e,r,n]=s(o);return`rgba(${e} ${r} ${n} / ${t}%)`}return o};E(/^(block|flex|inline|inline-block|inline-flex|table|inline-table|table-caption|table-cell|table-column|table-column-group|table-footer-group|table-header-group|table-row-group|table-row|flow-root|grid|inline-grid|contents|list-item)$/,(e=>{let[t,r]=e;return`.${t} { display: ${r} }`})),E(/^(static|relative|absolute|fixed|sticky)$/,(e=>{let[t,r]=e;return`.${t} { position: ${r} }`})),E(/^(box)-(border|content)$/,(e=>{let[t,r,o]=e;return`.${t} { box-sizing: ${o}-${r} }`})),E(/^(float|clear)-(left|right|both|none)$/,(e=>{let[t,r,o]=e;if("float"!==r||"both"!==o)return`.${t} { ${r}: ${o} }`})),E(/^container(-auto)?-(\w+)$/,(e=>{let[t,r,o]=e;const n=(a=o,h().conatiners?.[a]);var a;if(!n)return;return`.${t} { width: 100%; max-width: ${n}px; ${r?"margin-left: auto; margin-right: auto":""} }`})),E(/^(-)?(top|right|bottom|left)-(auto|\d+|(\d+\/\d+))$/,(e=>{let[t,r,o,n,a]=e;const l=x(r,n);if(w(l))return;const i=isNaN(n)?n:l+"px",s=a?`calc( ${l}*100% )`:i;return`.${t.replace(/\//,"\\/")} { ${o}: ${s} }`})),E(/^(-)?inset-(auto|\d+|(\d+\/\d+))$/,(e=>{let[t,r,o,n]=e;const a=x(r,o);if(w(a))return;const l=isNaN(o)?o:a+"px",i=n?`calc( ${a}*100% )`:l;return`.${t.replace(/\//,"\\/")} { top: ${i}; right: ${i}; bottom: ${i}; left: ${i}}`})),E(/^(-)?inset-([xy])-(auto|\d+|(\d+\/\d+))$/,(e=>{let[t,r,o,n,a]=e;const l=x(r,n);if(w(l))return;const i=isNaN(n)?n:l+"px",s=a?`calc( ${l}*100% )`:i,c="x"===o?"left":"top",d="x"===o?"right":"bottom";return`.${t.replace(/\//,"\\/")} { ${c}: ${s}; ${d}: ${s} }`})),E(/^(-)?z-(auto|\d+)$/,(e=>{let[t,r,o]=e;const n=x(r,o);if(!w(n))return`.${t} { z-index: ${n} }`})),E(/^(ratio|aspect)-(auto|square|video|\d+\/\d+)$/,(e=>{let[t,r,o]=e;const n={auto:"auto",square:"1/1",video:"16/9"}[o]||o;return`.${t.replace(/\//,"\\/")} { aspect-ratio: ${n} }`})),E(/^(fit|object)-(contain|cover|fill|scale-down|none)$/,(e=>{let[t,r,o]=e;return`.${t} { object-fit: ${o} }`})),E(/^object-(center|top|right|bottom|left)$/,(e=>{let[t,r]=e;return`.${t} { object-position: ${r} }`})),E(/^(of|overflow)(-[xy])?-(auto|hidden|scroll|visible)$/,(e=>{let[t,r,o,n]=e;return`.${t} { overflow${o||""}: ${n} }`})),E(/^(of|overflow)(-[xy])?-(overlay)$/,(e=>{let[t,r,o,n]=e;const a=o||"";return`.${t} { overflow${a}: auto; overflow${a}: ${n} }`})),E(/^(os|overscroll)(-[xy])?-(auto|contain|none)$/,(e=>{let[t,r,o,n]=e;return`.${t} { overscroll-behavior${o||""}: ${n} }`})),E(/^(p[trbl]?|r)-(\d+|(\d+\/\d+))$/,(e=>{let[t,r,o,n]=e;const a=isNaN(o)?o:o+"px",l=n?`calc( ${o}*100% )`:a,i=k(r[0]),s=N(r[1]);return`.${t.replace(/\//,"\\/")} { ${i}${s}: ${l} }`})),E(/^(-)?(m[trbl]?)-(auto|\d+|(\d+\/\d+))$/,(e=>{let[t,r,o,n,a]=e;const l=x(r,n);if(w(l))return;const i=k(o[0]),s=N(o[1]),c=isNaN(n)?n:l+"px",d=a?`calc( ${l}*100% )`:c;return`.${t.replace(/\//,"\\/")} { ${i}${s}: ${d} }`})),E(/^(-)?([pm][xy])-(auto|\d+|(\d+\/\d+))$/,(e=>{let[t,r,o,n,a]=e;const l=x(r,n);if(w(l))return;const i=k(o[0]),s=isNaN(n)?n:l+"px",c=a?`calc( ${l}*100% )`:s,d="y"===o[1]?"top":"left",u="y"===o[1]?"bottom":"right";return"auto"!==n||"margin"===i?`.${t.replace(/\//,"\\/")} { ${i}-${d}: ${c}; ${i}-${u}: ${c} }`:void 0})),E(/^(-)?(s|space-)([xy])-(\d+)(-reverse)?$/,(e=>{let[t,r,o,n,a,l]=e;if(w(r+a))return;return`.${t} > :not(:first-child) { margin-${"x"===n?l?"right":"left":l?"bottom":"top"}: ${r?-a:a}px }`})),E(/^flex-gap-(\d+)$/,(e=>{let[t,r]=e;const o=r/2;return`.${t} { margin: -${o}px } .${t} > * { padding: ${o}px }`})),E(/^(min-|max-)?([wh])-(auto|full|screen|min|max|\d+|(\d+\/\d+))$/,(e=>{let[t,r,o,n,a]=e;const l={auto:"max-"===r?"none":"auto",full:"100%",screen:"h"===o?"100vh":"100vw",min:"min-content",max:"max-content"},i=r||"",s=isNaN(n)?l[n]||n:n+"px",c=a?`calc( ${n}*100% )`:s,d=k(o);return`.${t.replace(/\//,"\\/")} { ${i+d}: ${c} }`})),E(/^font-(sans|serif|mono)$/,(e=>{let[t,r]=e;return`.${t} { font-family: ${{sans:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',serif:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',mono:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'}[r]||""} }`})),E(/^fs-(\d+)$/,(e=>{let[t,r]=e;return`.${t} { font-size: ${r}px }`})),E(/^fw-([1-9]00|bold|bolder|ligher|normal)$/,(e=>{let[t,r]=e;return`.${t} { font-weight: ${r} }`})),E(/^lh-([\d.]+)$/,(e=>{let[t,r]=e;return`.${t.replace(/\./,"\\.")} { line-height: ${r} }`})),E(/^text-(left|center|right|justify)$/,(e=>{let[t,r]=e;return`.${t} { text-align: ${r} }`})),E(/^(uppercase|lowercase|capitalize|no-transform)$/,(e=>{let[t,r]=e;return`.${t} { text-transform: ${"no-transform"===r?"none":r} }`})),E(/^(underline|overline|line-through|no-decoration)$/,(e=>{let[t,r]=e;return`.${t} { text-decoration: ${"no-decoration"===r?"none":r} }`})),E(/^text-trim(-all)?$/,(e=>{let[t,r]=e;return`.${t}, .${t} ${r?"":">"} * { min-width: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden }`})),E(/^pointer-(none|auto|all)$/,(e=>{let[t,r]=e;return`.${t} { pointer-events: ${r} }`})),E(/^cursor-(pointer|default|auto)$/,(e=>{let[t,r]=e;return`.${t} { cursor: ${r} }`})),E(/^show$/,(e=>{let[t]=e;return`.${t} { display: none !important }`}),{reverseBreakpoint:!0}),E(/^hide$/,(e=>{let[t]=e;return`.${t} { display: none !important }`})),E(/^fit$/,(e=>{let[t]=e;return`.${t} { width: 100%; height: 100% }`})),E(/^fit-([wh])$/,(e=>{let[t,r]=e;return`.${t} { ${k(r)}: 100% }`})),E(/^(b[trbl]?)-(\d+)$/,(e=>{let[t,r,o]=e;const n=k(r[0]),a=N(r[1]);return`.${t} { ${n}${a}-width: ${o}px; ${n}${a}-style: solid }`})),E(/^(b[trbl]?)-(solid|dashed|dotted|double|groove|inset|none|outset|ridge)$/,(e=>{let[t,r,o]=e;return`.${t} { ${k(r[0])}${N(r[1])}-style: ${o} }`})),E(/^b-(collapse|separate)$/,(e=>{let[t,r]=e;return`.${t} { border-collapse: ${r} }`})),E(/^flex-(wrap|wrap-reverse|nowrap)$/,(e=>{let[t,r]=e;return`.${t} { flex-wrap: ${r} }`})),E(/^flex-(row|row-reverse|col|col-reverse)$/,(e=>{let[t,r]=e;return`.${t} { flex-direction: ${r.replace("col","column")} }`})),E(/^flex-(auto|[01])$/,(e=>{let[t,r]=e;return`.${t} { flex: ${"auto"===r?"1 1 auto":"0"===r?"0 0 auto":"1 1 0%"} }`})),E(/^flex-(grow|shrink)-([01])$/,(e=>{let[t,r,o]=e;return`.${t} { flex-${r}: ${o} }`})),E(/^justify-((center)|(start|end)|(around|between|evenly))$/,(e=>{let[t,,r,o,n]=e;return`.${t} { justify-content: ${n?"space-"+n:o?"flex-"+o:r} }`})),E(/^align-((center|baseline|stretch)|(start|end))$/,(e=>{let[t,,r,o]=e;return`.${t} { align-items: ${o?"flex-"+o:r} }`})),E(/^align-self-((center|baseline|stretch)|(start|end))$/,(e=>{let[t,,r,o]=e;return`.${t} { align-self: ${o?"flex-"+o:r} }`})),E(/^(-)?order-(\d+)$/,(e=>{let[t,r,o]=e;if(w(r+o))return;return`.${t} { order: ${r?-o:o} }`})),E(/^shadow-(\d+)$/,(e=>{let[t,r]=e;const o=(e,t,r,o,n)=>`${e}px ${t}px ${r}px ${o}px ${n}`,n=e=>Math.round(r*e),a=o(0,n(.35),n(3.5),n(.25),"rgba(0, 0, 0, 0.08)"),l=o(0,n(1),n(1.4),n(-.5),"rgba(0, 0, 0, 0.09)"),i=o(0,n(.5),n(.6),n(-.3),"rgba(0, 0, 0, 0.14)");if(!(r>24))return`.${t} { box-shadow: ${"0"===r?"none":`${a}, ${l}, ${i}`} }`})),E(/^([fb]g)-(black|white|([\w-]+\d+))(\/(\d+))?$/,(e=>{let[t,r,o,,,n]=e;const a=k(r),l=C(o,n);if(a&&l)return`.${t.replace(/\//,"\\/")} { ${a}: ${l} }`})),E(/^b-(black|white|([\w-]+\d+))(\/(\d+))?$/,(e=>{let[t,r,,,o]=e;const n=C(r,o);if(n)return`.${t.replace(/\//,"\\/")} { border-color: ${n} }`}));const L=t=>z(t,e),A=e=>z(e,t),z=(a,l)=>{if(!a||!l)return;"object"==typeof a&&(a="baseVal"in a?a.baseVal:"");let i=!1;a.split(" ").forEach((a=>{if(!a||n.includes(a))return;const s=o.find((e=>e.className===a));if(s)l===e&&s.count++,l===t&&s.count--,s.count<0&&(s.count=1,i=!0);else if(l===e){const{style:e,proc:t}=(e=>{let t="",o=null;return r.forEach(((r,n)=>{const a=j(r,e);if(a)return t=v(a),void(o=n)})),{style:t,proc:o}})(a);e?o.push({className:a,style:e,proc:t,count:1}):n.push(a)}})),i&&console.warn("Observation anomaly detected. Some nodes were unmounted more than they were mounted.")},R=["hover","active","focus","focus-within"],O=[...R,"every","odd","even","first","last","dark"];var T;"function"==typeof(T=(e,t)=>{let{pattern:r,fn:o,options:{reverseBreakpoint:n}}=e;const a=t.split(":"),l=a.pop().match(r);if(!l)return!1;const i=Object.keys(h().breakpoints);let s=n?"max-width":"min-width",c=!1,d=!1,u="",p="";if(a.forEach((e=>{if(!O.includes(e)&&!i.includes(e))return A(t),d=!0,!1;var r;c||(r=e,c=h().breakpoints?.[r]||!1),R.includes(e)&&(p+=":"+e)})),d)return!1;if(u=o(l,a),!u)return!1;if(a.length){const e=a.join("\\:");u=u.replace(/(.*?)\s*(\{.*?\})/gms,`.${e}\\:$1$2`).replace(/:\s*\./gms,":")}if(a.forEach((e=>{"every"===e&&(u=u.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > * $2")),"odd"===e&&(u=u.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > :nth-child(odd) $2")),"even"===e&&(u=u.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > :nth-child(even) $2")),"first"===e&&(u=u.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > :first-child $2")),"last"===e&&(u=u.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > :last-child $2"))})),a.includes("dark")&&(u=`.dark ${u}`),p&&(u=u.replace(/(.*?)\s*(\{.*?\})/gms,`$1${p}$2`)),a.includes("hover")){const e=u.replace(/:hover\{/g,":active{");u=`@media (hover: hover) and (pointer: fine) { ${u} }`+e}return c&&(n&&c--,u=`@media screen and (${s}: ${c}px) { ${u} }`),u})&&(j=T);const U=["head","meta","title","link","script","noscript","style","br","path","g"],B=e=>U.includes(e.nodeName.toLowerCase())||1!==e.nodeType,F=t=>I(t,e),H=e=>I(e,t),I=(e,r)=>{if(B(e)||!r)return;const o=r===t?A:L;if("svg"===e.nodeName)o(e.className);else{o(q(e))}},q=e=>{const t=e.outerHTML.matchAll(/class=["'`](.*?)["'`]/gm),r=[];return Array.from(t).forEach((e=>r.push(e[1]))),r.join(" ")};const D=document.createDocumentFragment(),V=document.createDocumentFragment(),P=document.querySelector("head"),G=document.createElement("style"),Y=document.createElement("style"),J=document.createElement("link"),K=document.createElement("link"),Q=e=>!!e.isConnected&&P.removeChild(e),W=e=>e?"data:text/css;base64,"+btoa(e):"";J.rel=K.rel="stylesheet";const X=()=>{const{useStyleNode:e,skipRemUnits:t,debug:r}=h();let o=M()||"",n=!1;if(t||(o=o.replace(/(\d*\.?\d+)px/g,((e,t)=>y(t)))),e)G.innerHTML!==o&&(G.innerHTML=o,n=!0);else{const e=W(o);J.href!==e&&(J.href=e,n=!0)}if(n){(()=>{const{useStyleNode:e,skipResetStyles:t,skipRemUnits:r,debug:o}=h();let n;if(t?(Q(K),Q(Y)):n||(n=v(":root{line-height:1.4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji';-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;}*,:before,:after{box-sizing:border-box;outline:none;-webkit-user-drag:none;touch-action:pan-x pan-y;}body{margin:0;max-width:100vw;overscroll-behavior:none;}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;}h1,h2,h3,h4,h5,h6,p{margin:0;font:inherit;}small{font-size:85%;}a{color:inherit;text-decoration:none;}button{font:inherit;line-height:1;cursor:pointer;background-color:inherit;border:0;color:inherit;padding:0;}img,svg{display:block;max-width:100%;height:auto;border:none;}input,textarea,select{font:inherit;font-size:16px;border:0;border-radius:0;background-clip:padding-box;color:inherit;background-color:transparent;}textarea{resize:none;}::placeholder{font-size:14px;}label{display:block;}fieldset{border:1px solid;}ul,ol{margin:0;padding:0;list-style-type:none;}hr{height:0;border:0;border-bottom-width:1px;border-style:solid;color:inherit;}table{border-spacing:0;border-collapse:collapse;}th{font-weight:inherit;}iframe{border:0;}menu{margin:0;padding:0;}form,figure,pre,blockquote,dl,dd{margin:0;}address{font:inherit;}"),r&&(n=n.replace(/(\d*\.?\d+)px/g,((e,t)=>y(t))))),e){if(Q(D),t||Y.isConnected||(Y.innerHTML!==n&&(Y.innerHTML=n),V.appendChild(Y),o&&console.log("Append StyleNode (reset)")),G.isConnected||(V.appendChild(G),o&&console.log("Append StyleNode (main)")),!V.isConnected){const e=P.querySelector("style");e?P.insertBefore(V,e):P.appendChild(D)}}else{if(Q(V),!t&&!K.isConnected){const e=W(n);(K.href=e)&&(K.href=e),D.appendChild(K),o&&console.log("Append LinkNode (reset)")}if(J.isConnected||(D.appendChild(J),o&&console.log("Append LinkNode (main)")),!D.isConnected){const e=P.querySelector("link[rel=stylesheet]")||P.querySelector("style");e?P.insertBefore(D,e):P.appendChild(D)}}})();const{duration:e}=performance.measure("mutation","mutation-start","mutation-end");r&&Z(e)}},Z=e=>{const t=o.filter((e=>e.count>0)).length,r=Math.round(10*e)/10;console.log("Processed (main)",t,"rules in",r,"ms")},_=e=>new Promise(((t,r)=>{try{t(e())}catch(e){r(e)}})),ee=(e,t)=>Promise.all([...e].map((async e=>{await _((()=>t(e)))}))),te=e=>{performance.mark("mutation-start"),b(window.nextcssConfig),ee(e,(async e=>{B(e.target)||("childList"===e.type&&(e.addedNodes?.length&&await ee(e.addedNodes,F).then((()=>X())).catch((e=>console.error(e))),e.removedNodes?.length&&await ee(e.removedNodes,H).catch((e=>console.error(e)))),"attributes"===e.type&&"class"===e.attributeName&&e.target.className!==e.oldValue&&await _((()=>(A(e.oldValue),L(e.target.className),!0))).then((()=>"HTML"!==e.target.nodeName&&X())).catch((e=>console.error(e))))})),performance.mark("mutation-end")},re=()=>{const e=new MutationObserver(te),t=document.body;te([{type:"childList",addedNodes:[t],target:t}]),e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"],attributeOldValue:!0,characterData:!1})};document&&document.body?re():(()=>{const e=new MutationObserver((t=>{t.forEach((t=>{t.addedNodes?.forEach((t=>{"BODY"===t.nodeName&&(re(),e.disconnect())}))}))}));e.observe(document.documentElement,{childList:!0,characterData:!1})})()}(); |
{ | ||
"name": "@nextcss/nextcss", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "Testing", | ||
@@ -53,3 +53,3 @@ "license": "MIT", | ||
"@nextcss/color-tools": "^1.0.7", | ||
"@rollup/plugin-commonjs": "^24.0.0", | ||
"@rollup/plugin-commonjs": "^25.0.7", | ||
"@rollup/plugin-json": "^6.0.0", | ||
@@ -63,3 +63,3 @@ "@rollup/plugin-node-resolve": "^15.0.1", | ||
"postcss-cli": "^10.1.0", | ||
"rollup": "^3.10.0", | ||
"rollup": "^4.1.4", | ||
"rollup-plugin-babel": "^4.4.0", | ||
@@ -66,0 +66,0 @@ "rollup-plugin-import-css": "^3.1.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
314880
1199