-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreactcomponentlibrary.umd.js
1 lines (1 loc) · 9.83 KB
/
reactcomponentlibrary.umd.js
1
(function(n,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("preact")):typeof define=="function"&&define.amd?define(["preact"],p):(n=typeof globalThis<"u"?globalThis:n||self,n.reactcomponentlibrary=p(n.preact))})(this,function(n){"use strict";var p,a,y,z,w=0,k=[],d=[],N=n.options.__b,x=n.options.__r,C=n.options.diffed,H=n.options.__c,E=n.options.unmount;function L(o,_){n.options.__h&&n.options.__h(a,o,w||_),w=0;var e=a.__H||(a.__H={__:[],__h:[]});return o>=e.__.length&&e.__.push({__V:d}),e.__[o]}function M(o){return w=1,Z(P,o)}function Z(o,_,e){var t=L(p++,2);if(t.t=o,!t.__c&&(t.__=[e?e(_):P(void 0,_),function(u){var l=t.__N?t.__N[0]:t.__[0],c=t.t(l,u);l!==c&&(t.__N=[c,t.__[1]],t.__c.setState({}))}],t.__c=a,!a.u)){var r=function(u,l,c){if(!t.__c.__H)return!0;var h=t.__c.__H.__.filter(function(f){return f.__c});if(h.every(function(f){return!f.__N}))return!i||i.call(this,u,l,c);var D=!1;return h.forEach(function(f){if(f.__N){var ao=f.__[0];f.__=f.__N,f.__N=void 0,ao!==f.__[0]&&(D=!0)}}),!(!D&&t.__c.props===u)&&(!i||i.call(this,u,l,c))};a.u=!0;var i=a.shouldComponentUpdate,s=a.componentWillUpdate;a.componentWillUpdate=function(u,l,c){if(this.__e){var h=i;i=void 0,r(u,l,c),i=h}s&&s.call(this,u,l,c)},a.shouldComponentUpdate=r}return t.__N||t.__}function I(){for(var o;o=k.shift();)if(o.__P&&o.__H)try{o.__H.__h.forEach(m),o.__H.__h.forEach(b),o.__H.__h=[]}catch(_){o.__H.__h=[],n.options.__e(_,o.__v)}}n.options.__b=function(o){a=null,N&&N(o)},n.options.__r=function(o){x&&x(o),p=0;var _=(a=o.__c).__H;_&&(y===a?(_.__h=[],a.__h=[],_.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=d,e.__N=e.i=void 0})):(_.__h.forEach(m),_.__h.forEach(b),_.__h=[],p=0)),y=a},n.options.diffed=function(o){C&&C(o);var _=o.__c;_&&_.__H&&(_.__H.__h.length&&(k.push(_)!==1&&z===n.options.requestAnimationFrame||((z=n.options.requestAnimationFrame)||K)(I)),_.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==d&&(e.__=e.__V),e.i=void 0,e.__V=d})),y=a=null},n.options.__c=function(o,_){_.some(function(e){try{e.__h.forEach(m),e.__h=e.__h.filter(function(t){return!t.__||b(t)})}catch(t){_.some(function(r){r.__h&&(r.__h=[])}),_=[],n.options.__e(t,e.__v)}}),H&&H(o,_)},n.options.unmount=function(o){E&&E(o);var _,e=o.__c;e&&e.__H&&(e.__H.__.forEach(function(t){try{m(t)}catch(r){_=r}}),e.__H=void 0,_&&n.options.__e(_,e.__v))};var A=typeof requestAnimationFrame=="function";function K(o){var _,e=function(){clearTimeout(t),A&&cancelAnimationFrame(_),setTimeout(o)},t=setTimeout(e,100);A&&(_=requestAnimationFrame(e))}function m(o){var _=a,e=o.__c;typeof e=="function"&&(o.__c=void 0,e()),a=_}function b(o){var _=a;o.__c=o.__(),a=_}function P(o,_){return typeof _=="function"?_(o):_}function Q(o,_){for(var e in _)o[e]=_[e];return o}function U(o,_){for(var e in o)if(e!=="__source"&&!(e in _))return!0;for(var t in _)if(t!=="__source"&&o[t]!==_[t])return!0;return!1}function j(o){this.props=o}(j.prototype=new n.Component).isPureReactComponent=!0,j.prototype.shouldComponentUpdate=function(o,_){return U(this.props,o)||U(this.state,_)};var O=n.options.__b;n.options.__b=function(o){o.type&&o.type.__f&&o.ref&&(o.props.ref=o.ref,o.ref=null),O&&O(o)};var X=n.options.__e;n.options.__e=function(o,_,e,t){if(o.then){for(var r,i=_;i=i.__;)if((r=i.__c)&&r.__c)return _.__e==null&&(_.__e=e.__e,_.__k=e.__k),r.__c(o,_)}X(o,_,e,t)};var S=n.options.unmount;function V(o,_,e){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(t){typeof t.__c=="function"&&t.__c()}),o.__c.__H=null),(o=Q({},o)).__c!=null&&(o.__c.__P===e&&(o.__c.__P=_),o.__c=null),o.__k=o.__k&&o.__k.map(function(t){return V(t,_,e)})),o}function T(o,_,e){return o&&(o.__v=null,o.__k=o.__k&&o.__k.map(function(t){return T(t,_,e)}),o.__c&&o.__c.__P===_&&(o.__e&&e.insertBefore(o.__e,o.__d),o.__c.__e=!0,o.__c.__P=e)),o}function g(){this.__u=0,this.t=null,this.__b=null}function W(o){var _=o.__.__c;return _&&_.__a&&_.__a(o)}function v(){this.u=null,this.o=null}n.options.unmount=function(o){var _=o.__c;_&&_.__R&&_.__R(),_&&o.__h===!0&&(o.type=null),S&&S(o)},(g.prototype=new n.Component).__c=function(o,_){var e=_.__c,t=this;t.t==null&&(t.t=[]),t.t.push(e);var r=W(t.__v),i=!1,s=function(){i||(i=!0,e.__R=null,r?r(u):u())};e.__R=s;var u=function(){if(!--t.__u){if(t.state.__a){var c=t.state.__a;t.__v.__k[0]=T(c,c.__c.__P,c.__c.__O)}var h;for(t.setState({__a:t.__b=null});h=t.t.pop();)h.forceUpdate()}},l=_.__h===!0;t.__u++||l||t.setState({__a:t.__b=t.__v.__k[0]}),o.then(s,s)},g.prototype.componentWillUnmount=function(){this.t=[]},g.prototype.render=function(o,_){if(this.__b){if(this.__v.__k){var e=document.createElement("div"),t=this.__v.__k[0].__c;this.__v.__k[0]=V(this.__b,e,t.__O=t.__P)}this.__b=null}var r=_.__a&&n.createElement(n.Fragment,null,o.fallback);return r&&(r.__h=null),[n.createElement(n.Fragment,null,_.__a?null:o.children),r]};var F=function(o,_,e){if(++e[1]===e[0]&&o.o.delete(_),o.props.revealOrder&&(o.props.revealOrder[0]!=="t"||!o.o.size))for(e=o.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;o.u=e=e[2]}};(v.prototype=new n.Component).__a=function(o){var _=this,e=W(_.__v),t=_.o.get(o);return t[0]++,function(r){var i=function(){_.props.revealOrder?(t.push(r),F(_,o,t)):r()};e?e(i):i()}},v.prototype.render=function(o){this.u=null,this.o=new Map;var _=n.toChildArray(o.children);o.revealOrder&&o.revealOrder[0]==="b"&&_.reverse();for(var e=_.length;e--;)this.o.set(_[e],this.u=[1,0,this.u]);return o.children},v.prototype.componentDidUpdate=v.prototype.componentDidMount=function(){var o=this;this.o.forEach(function(_,e){F(o,e,_)})};var Y=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,G=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,J=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,oo=/[A-Z0-9]/g,eo=typeof document<"u",_o=function(o){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(o)};n.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(o){Object.defineProperty(n.Component.prototype,o,{configurable:!0,get:function(){return this["UNSAFE_"+o]},set:function(_){Object.defineProperty(this,o,{configurable:!0,writable:!0,value:_})}})});var R=n.options.event;function to(){}function no(){return this.cancelBubble}function io(){return this.defaultPrevented}n.options.event=function(o){return R&&(o=R(o)),o.persist=to,o.isPropagationStopped=no,o.isDefaultPrevented=io,o.nativeEvent=o};var ro={enumerable:!1,configurable:!0,get:function(){return this.class}},$=n.options.vnode;n.options.vnode=function(o){typeof o.type=="string"&&function(_){var e=_.props,t=_.type,r={};for(var i in e){var s=e[i];if(!(i==="value"&&"defaultValue"in e&&s==null||eo&&i==="children"&&t==="noscript"||i==="class"||i==="className")){var u=i.toLowerCase();i==="defaultValue"&&"value"in e&&e.value==null?i="value":i==="download"&&s===!0?s="":u==="ondoubleclick"?i="ondblclick":u!=="onchange"||t!=="input"&&t!=="textarea"||_o(e.type)?u==="onfocus"?i="onfocusin":u==="onblur"?i="onfocusout":J.test(i)?i=u:t.indexOf("-")===-1&&G.test(i)?i=i.replace(oo,"-$&").toLowerCase():s===null&&(s=void 0):u=i="oninput",u==="oninput"&&r[i=u]&&(i="oninputCapture"),r[i]=s}}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=n.toChildArray(e.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=n.toChildArray(e.children).forEach(function(l){l.props.selected=r.multiple?r.defaultValue.indexOf(l.props.value)!=-1:r.defaultValue==l.props.value})),e.class&&!e.className?(r.class=e.class,Object.defineProperty(r,"className",ro)):(e.className&&!e.class||e.class&&e.className)&&(r.class=r.className=e.className),_.props=r}(o),o.$$typeof=Y,$&&$(o)};var q=n.options.__r;n.options.__r=function(o){q&&q(o),o.__c};var B=n.options.diffed;return n.options.diffed=function(o){B&&B(o);var _=o.props,e=o.__e;e!=null&&o.type==="textarea"&&"value"in _&&_.value!==e.value&&(e.value=_.value==null?"":_.value)},{Card:({title:o,description:_})=>(M(0),n.h("div",{className:"bg-slate-100 shadow-lg overflow-hidden fixed bottom-0 left-0 right-0 "},n.h("div",{className:"container mx-auto px-6 py-4"},n.h("h2",{className:"text-2xl mb-2"},o),n.h("div",{className:"grid gap-8 grid-cols-[2fr_2fr_1fr]"},n.h("div",null,n.h("div",{className:"text-gray-700 text-sm"},n.h("p",{className:"pb-4"},"Dzięki plikom cookies i technologiom pokrewnym oraz przetwarzaniu Twoich danych, możemy zapewnić, że dopasujemy do Ciebie wyświetlane treści."),n.h("p",{className:"pb-4"},"Wyrażając zgodę na przechowywanie informacji na urządzeniu końcowym lub dostęp do nich i przetwarzanie danych (w tym w obszarze profilowania, analiz rynkowych i statystycznych) sprawiasz, że łatwiej będzie odnaleźć Ci w Allegro dokładnie to, czego szukasz i potrzebujesz."),n.h("p",{className:"pb-4"},"Administratorem Twoich danych będzie Allegro oraz niektórzy partnerzy, z którymi współpracujemy."))),n.h("div",null,n.h("p",{className:"text-gray-700 text-sm"},n.h("p",null,n.h("strong",null,"Przetwarzamy dane w celach:")),n.h("p",{className:"pb-3"},"Ułatwienia korzystania z naszych stron, prezentowania spersonalizowanych treści i reklam oraz ich pomiaru, tworzenia statystyk, poprawy funkcjonalności strony."),"Zgodę wyrażasz dobrowolnie. Możesz ją w każdym momencie wycofać lub ponowić w zakładce Ustawienia plików cookies na stronie głównej. Wycofanie zgody nie wpływa na legalność uprzedniego przetwarzania.")),n.h("div",{className:"flex flex-col gap-4"},n.h("button",{className:"bg-orange-600 w-full py-2 text-white tracking-widest uppercase"},"ok, zgadzam się"),n.h("button",{className:" w-full py-2 text-teal-800 tracking-widest uppercase"},"nie zgadzam się"),n.h("button",{className:" w-full py-2 text-teal-800 tracking-widest uppercase"},"zmieniam zgody"))))))}});