PageSourceSearch

https://www.matras.pl/build/5410.5457820c.js

js matras.pl collected 2026-10-03 21:42:48 UTC 6,719 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5410],{5901:(t,e,n)=>{n.d(e,{ZP:()=>S});var r=n(3353),o=n(1401),s=n(4585),i=n(3633),a=n(7763),l=n(2047),p=n(1934),u=n(5680);const c={};c.render=function(t){(0,p.elementOpen)("form",null,null,"ref",t.createListForm,"class",void 0!==t.display&&"inline"==t.display?"ds-u-flex ds-u-items-start ds-u-gap-8":"ds-u-grid ds-u-gap-16"),(0,p.component)(u.Z,"comp",{type:"text",value:t.value,name:"name",label:"Nazwa listy",placeholder:"",errorMessage:t.errorMessage,input:t.validate,className:"js-input-new-shopping-list ds-u-flex-1"}),(0,l.ZP)((0,a.O)(t,{type:"submit",variant:"primary",text:void 0!==t.display&&"inline"==t.display?"Dodaj":"Dodaj listę",loading:t.loading})),(0,p.elementClose)("form")};var h=n(254),d=n(8814);const f="SET_ERROR_MESSAGE",m="SET_LOADING",y=t=>({type:m,payload:{loading:t}}),P="CLEAR_FORM",v={errorMessage:"",value:"",loading:!1},g=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case r.RECEIVE_PROPS:return{...t,...e.payload};case f:return{...t,errorMessage:e.payload.isValid?"":"Pole nie może być puste"};case m:return{...t,loading:e.payload.loading};case P:return{...t,value:"",loading:!1}}return t},b=t=>""!=t.trim(),w=(0,o.sQ)({createListForm:{submit:async(t,e)=>{t.preventDefault();const n=t.target.elements[0].value;if(b(n)){e.dispatch(y(!0));try{const t=e.state.fromBasket?await(0,h.K6)(n):await(0,h.Dn)(n);t.hash&&(e.state.redirect?window.location.href=d.Z.parsePath(d.Z.user_shopping_list_details,{hash:t.hash}):(e.props.onSubmit(t),e.dispatch({type:P}),e.el.reset()))}finally{e.dispatch(y(!1))}}else e.props.validate(n)}}});const _=w((0,o.Sx)({componentDidMount(){const t=this.el.querySelector(".js-input-new-shopping-list .js-input");t?.focus()}})((0,r.createComponent)(function(t){return c.render(t)},g))),S=(0,s.JJ)((0,i.xC)({reducer:{stateReducer:g}}),(0,s.$j)(function(t){return{...t.stateReducer}},function(t){return{validate:e=>{return t((n=b(e),{type:f,payload:{isValid:n}}));var n}}})(_))},5410:(t,e,n)=>{n.r(e),n.d(e,{default:()=>i});var r=n(3353),o=n(5901),s=n(3830);class i{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Dodaj nową listę",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"<form id='create-shopping-list-form'></form>",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._header=t,this._content=e,this._fromBasket=n}mount(t){this._modal=new s.Z(this._header,["modal-new-shopping-list"]),this._modal.render(this._content),(0,r.render)(this._modal.element().querySelector("#create-shopping-list-form"),o.ZP,{redirect:!0,fromBasket:this._fromBasket}),this._modal.open(),this._modal.element().addEventListener("close",this.handleCloseModalEvent)}handleCloseModalEvent=()=>{this._modal.element().removeEventListener("close",this.handleCloseModalEvent),this._modal.destroy()};unmount(){this._appEl?.remove(),this._appEl=null}}},4585:(t,e,n)=>{var r=n(1934),o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},l=function(t){return function(){function e(){o(this,e),this.refs=Object.create(null),this.props=null,this.childInstance=new t,r.link(this,this.childInstance)}return s(e,[{key:"el",set:function(t){return this.childInstance.el=t,t},get:function(){return this.childInstance.el}}]),e}()},p=function(t){for(var e=t;e;e=r.getParent(e))if(e.store)return e.store;return null},u={},c=function(){return u},h=function(t){return{dispatch:t}},d=function(t,e,n){return Object.assign({},n,t,e)};var f=Object.prototype.hasOwnProperty;function m(t,e){if(t===e)return!0;
1if(!t||!e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!f.call(e,n[o])||t[n[o]]!==e[n[o]])return!1;return!0}e.$j=function(t,e,n){var r=!!t,s=r&&1!==t.length,u=e||h;if(e&&"function"!=typeof e){var f=e;u=function(t){return Object.keys(f).reduce(function(e,n){return e[n]=function(){return t(f[n].apply(f,arguments))},e},{})}}var y=1!==u.length,P=t||c,v=n||d;return function(t){return function(t){function e(){o(this,e);var n=a(this,t.call(this));return n.store=null,n.storeConnection=null,n.renderProps=null,n.ownProps=null,n.stateProps=null,n.dispatchProps=null,n.mapStateToPropsFn=P,n.mapDispatchToPropsFn=u,n}return i(e,t),e.prototype.apply=function(t){if(r&&!this.storeConnection&&this.subscribeToStore(),!m(this.ownProps,t)){var e=this.store||p(this);this.ownProps===t&&null!==this.renderProps||(this.ownProps=t,!s&&this.stateProps||(this.stateProps=this.mapStateToProps(e.getState(),t)),!y&&this.dispatchProps||(this.dispatchProps=this.mapDispatchToProps(e.dispatch,t)),this.renderProps=v(this.stateProps,this.dispatchProps,t)),this.childInstance.apply(this.renderProps)}},e.prototype.subscribeToStore=function(){var t=this;r&&!this.storeConnection&&(this.store||(this.store=p(this)),this.storeConnection=this.store.subscribe(function(){var e=t.ownProps,n=t.mapStateToProps(t.store.getState(),e);if(n!==t.stateProps){var r=v(n,t.dispatchProps,e);t.stateProps=n;var o=!m(t.renderProps,r);t.renderProps=r,o&&t.childInstance.apply(t.renderProps)}}))},e.prototype.mapStateToProps=function(t,e){var n=this.mapStateToPropsFn.call(null,t,e);return"function"==typeof n&&(this.mapStateToPropsFn=n,n=this.mapStateToPropsFn.call(null,t,e)),n},e.prototype.mapDispatchToProps=function(t,e){var n=this.mapDispatchToPropsFn.call(null,t,e);return"function"==typeof n&&(this.mapDispatchToPropsFn=n,n=this.mapDispatchToPropsFn.call(null,t,e)),n},e.prototype.componentWillUnmount=function(){r&&(this.storeConnection(),this.storeConnection=null,this.store=null),this.mapStateToPropsFn=null,this.mapDispatchToPropsFn=null},e}(l(t))}},e.JJ=function(t,e){return function(e){function n(){o(this,n);var r=a(this,e.call(this));return r.store=t,r}return i(n,e),n.prototype.apply=function(t){m(t,this.props)||this.childInstance.apply(t)},n.prototype.componentWillUnmount=function(){},n}(l(e))}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.