PageSourceSearch

https://www.lokalmat.no/_next/static/chunks/pages/admin-purchaser/mine-produkt-43ebc323c9fd47b0.js

js lokalmat.no collected 2026-10-02 12:51:32 UTC 7,661 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1099],{35823:function(t){t.exports=function(t,o,r,s){var a=new Blob(void 0!==s?[s,t]:[t],{type:r||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(a,o);else{var i=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(a):window.webkitURL.createObjectURL(a),c=document.createElement("a");c.style.display="none",c.href=i,c.setAttribute("download",o),void 0===c.download&&c.setAttribute("target","_blank"),document.body.appendChild(c),c.click(),setTimeout(function(){document.body.removeChild(c),window.URL.revokeObjectURL(i)},200)}}},96245:function(t,o,r){"use strict";function e(t){this.message=t}e.prototype=Error(),e.prototype.name="InvalidCharacterError";var s="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var o=String(t).replace(/=+$/,"");if(o.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,s,a=0,i=0,c="";s=o.charAt(i++);~s&&(r=a%4?64*r+s:s,a++%4)&&(c+=String.fromCharCode(255&r>>(-2*a&6))))s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(s);return c};function n(t){this.message=t}n.prototype=Error(),n.prototype.name="InvalidTokenError",o.Z=function(t,o){if("string"!=typeof t)throw new n("Invalid token specified");var r=!0===(o=o||{}).header?0:1;try{return JSON.parse(function(t){var o,r=t.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw"Illegal base64url string!"}try{return o=r,decodeURIComponent(s(o).replace(/(.)/g,function(t,o){var r=o.charCo
1deAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}catch(t){return s(r)}}(t.split(".")[r]))}catch(t){throw new n("Invalid token specified: "+t.message)}}},41099:function(t,o,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin-purchaser/mine-produkt",function(){return r(53882)}])},88367:function(t,o,r){"use strict";var s=r(94137),a=r(35823),i=r.n(a);let c=[{fileType:"csv",contentType:"text/csv; charset=utf-8",fileName:"Csv.csv"},{fileType:"excel",contentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",fileName:"Excel.xlsx"}];o.Z=new class{async export(t,o,r){try{var a;let l=c.filter(t=>t.fileType==o)[0],d=await (0,s.A)(t,{},{headers:{"Content-Type":null==l?void 0:l.contentType},responseType:"arraybuffer"}),u=new Blob([d],{type:null==l?void 0:l.contentType});i()(u,null!==(a=null!=r?r:null==l?void 0:l.fileName)&&void 0!==a?a:"File."+o)}catch(t){console.log(t)}}}},80446:function(t,o,r){"use strict";var s=r(85893),a=r(88367),i=r(86759),c=r(17385),l=r(80438),d=r(67294);o.Z=t=>{let{url:o,customName:r,className:u}=t,{common:p}=l,[f,h]=(0,d.useState)(!1),handleExport=async()=>{h(!0),await a.Z.export(o,c.t.EXCEL,null!=r?r:"Custom_".concat(Date.now(),".xlsx")),h(!1)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{className:"btn btn-outline-primary btn-lg ".concat(u),onClick:handleExport.bind(void 0),children:p.export_to_excel}),(0,s.jsx)(i.Z,{open:f,setHide:()=>h(!1)})]})}},17385:function(t,o,r){"use strict";var s,a;r.d(o,{t:function(){return s}}),(a=s||(s={})).CSV="csv",a.EXCEL="excel"},53882:function(t,o,r){"use strict";r.r(o);var s=r(85893),a=r(49883),i=r(87378),c=r(1327),l=r(52638),d=r(33805),u=r(67294),p=r(9473),f=r(71153),h=r(14638),m=r(70493),w=r(80446),g=r(86759),v=r(2634),y=r(54064),x=r(68506),b=r(77714),j=r(11163),C=r(1937),N=r(15903),k=r(97019),E=r.n(k),S=r(80438),Z=r(28700),_=r(1570),P=r(70251);o.default=()=>{var t;let[o,r]=(0,u.useState)(1),[k,T]=(0,u.useState)(0),I=JSON.parse(null!==(t=(0,Z.HV)(_.sp))&&void 0!==t?t:"false"),[D,O]=(0,u.useState)({page:o-1,size:6,search:"",categories:[],countyID:[],lokalmatStatus:I?[x.yk.NotApproved,x.yk.Approved]:[x.yk.Approved]}),R=(0,p.v9)(l.tH),[U,F]=(0,u.useState)([]),[L,A]=(0,u.useState)([]),[B,X]=(0,u.useState)(),[z,H]=(0,u.useState)(!1),M=(0,j.useRouter)(),[q,V]=(0,u.useState)(),{common:J,admin_purchaser:G}=S,getProductsFollow=async()=>{if(!q)return;H(!0);let t=await m.Z.getProductsFollowing(q,{...D,page:o-1},!0);if(H(!1),t){let[o,r]=t;X(o),T(r)}},onUnfollowProduct=async t=>{if(!t)return;H(!0);let o=await m.Z.unFollowProduct(t);H(!1),200===o.status&&getProductsFollow()};(0,u.useEffect)(()=>{if(R&&M){if(M.query.purchaserID&&(0,C.tY)(R.user))return V(+M.query.purchaserID);(0,C.Ge)(R.user)&&V(R.user.userTypeID)}},[M,R]),(0,u.useEffect)(()=>{getProductsFollow(),getProductCategories(),getCounties()},[q]),(0,u.useEffect)(()=>{getProductsFollow()},[o]);let getProductCategories=async()=>{let t=await h.Z.getProductCategories();F(t)},getCounties=async()=>{let t=await f.Z.getCounties();A(t)};return(0,b.Z)((0,s.jsxs)(d.o,{meta:(0,s.jsx)(c.h,{title:"Mine produkt"}),children:[(0,s.jsx)(N.Z,{}),(0,s.jsxs)("div",{className:"container",children:[(0,s.jsxs)("div",{className:"row mt-5",children:[(0,s.jsx)("h1",{children:J.my_products}),(0,s.jsx)("p",{className:"py-3",children:G.product_title})]}),(0,s.jsx)("div",{className:"filterSearch pt-5",children:(0,s.jsxs)("div",{className:"row gx-md-5 mb-5",children:[(0,s.jsx)("div",{className:"col-md-6 mb-3 mb-md-0",children:(0,s.jsx)(y.Z,{content:U,selectedCategories:D.categories,handleSelectCategories:t=>{t[0]&&D.categories&&D.categories.includes(t[0])?O({...D,categories:E()(D.categories,...t)}):O({...D,categories:[...D.categories,...t]})}})}),(0,s.jsx)("div",{className:"col-md-6 mb-3 mb-md-0",children:(0,s.jsx)(v.Z,{content:L,selectedCounties:D.countyID,handleSelectCounties:t=>{D.countyID&&(D.countyID.includes(t)?O({...D,countyID:D.countyID.filter(o=>o!==t)}):O({...D,countyID:[...D.countyID,t]}))}})})]})}),(0,s.jsxs)("div",{className:"row justify-content-center align-items-center",children:[(0,s.jsx)("div",{className:"col-md-6 text-start my-4",children:(0,s.jsx)(w.Z,{url:"/purchasers/export/products/follow"+(0,P.XF)({...D,size:9999,page:0}),customName:"ProductFollows_".concat(Date.now(),".xlsx")})}),(0,s.jsx)("div",{className:"col-md-6 d-flex justify-content-end align-items-end",children:(0,s.jsx)("button",{className:"btn btn-primary rounded-0 d-none d-sm-block rounded-5",id:"filter","data-save":"false",onClick:getProductsFollow,children:J.search})})]}),B&&B.length>0&&(0,s.jsxs)("div",{className:"row my-5",children:[B.map((t,o)=>(0,s.jsx)(i.Z,{product:t,followBadgeType:x.DK.RemoveFollow,followAction:onUnfollowProduct},o)),k>6&&(0,s.jsx)(a.Z,{numberOfPage:k/6,handleChange:t=>{r(t)}})]}),(0,s.jsx)(g.Z,{open:z,setHide:()=>H(!1)})]})]}))}},8102:function(t,o,r){"use strict";r.d(o,{Z:function(){return w}});
1var s=r(67294),a=r(45697),i=r.n(a),c=r(6763),l=r(24486),d=r(29100);let u=i().oneOf(["start","end"]),p=i().oneOfType([u,i().shape({sm:u}),i().shape({md:u}),i().shape({lg:u}),i().shape({xl:u}),i().shape({xxl:u}),i().object]);var f=r(85893);let h={id:i().string,href:i().string,onClick:i().func,title:i().node.isRequired,disabled:i().bool,align:p,menuRole:i().string,renderMenuOnMount:i().bool,rootCloseEvent:i().string,menuVariant:i().oneOf(["dark"]),flip:i().bool,bsPrefix:i().string,variant:i().string,size:i().string},m=s.forwardRef(({title:t,children:o,bsPrefix:r,rootCloseEvent:s,variant:a,size:i,menuRole:u,renderMenuOnMount:p,disabled:h,href:m,id:w,menuVariant:g,flip:v,...y},x)=>(0,f.jsxs)(c.Z,{ref:x,...y,children:[(0,f.jsx)(l.Z,{id:w,href:m,size:i,variant:a,disabled:h,childBsPrefix:r,children:t}),(0,f.jsx)(d.Z,{role:u,renderOnMount:p,rootCloseEvent:s,variant:g,flip:v,children:o})]}));m.displayName="DropdownButton",m.propTypes=h;var w=m}},function(t){t.O(0,[3662,2632,2962,3185,3752,1964,9378,5274,8377,9774,2888,179],function(){return t(t.s=41099)}),_N_E=t.O()}]);

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.