1/*! For license information please see 4106.6c5e651730bc806451a8.js.LICENSE.txt */ 2"use strict";(self.webpackChunk_vkmedia_services_frontrobot=self.webpackChunk_vkmedia_services_frontrobot||[]).push([[4106],{31725(e,t,r){r.r(t),r.d(t,{default:()=>U});var n=r(5121),o=r(26745),i=r(62316),a=r(90086),l=r(6211),u=r(77810),c=r(12909),s=r(98903),f=r(2778),d=r(85074),p=r(67600),m=r(95446),y=r(50292),b=r(92574),v=r(82197),h=r(71288),g=r(7092),j=r(22483),x=r(54068),S=r(67781),w=r(8443),T=r(21289),_=r(66974),O=r(66443),F=r(73349),k=r(11734),I=r(30146),C=r(2908),E=r(64922);function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P(e,t):void 0}}(e,t)||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 P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var A=[".png",".apng",".jpg",".jpeg"],N=I.iD===k.OD.Desktop&&480,M=function(e){var t=e.name,r=L((0,u.useState)(),2),n=r[0],o=r[1],i=(0,u.useRef)(null);return(0,E.jsxs)(E.Fragment,{children:[n&&(0,E.jsx)(C.l,{border:!0,width:N,children:(0,E.jsx)(C.l.Image,{file:n,accept:A})}),(0,E.jsxs)(S.FlexHorizontal,{alignItems:"center",paddingBottom:O.Spacing.Base,paddingTop:O.Spacing.Base,children:[(0,E.jsx)("input",{ref:i,className:"file___k2HhG",type:"file",name:t,accept:A.join(","),onChange:function(e){var t,r=null===(t=e.currentTarget.files)||void 0===t?void 0:t[0];o(r||null),(null==r?void 0:r.size)>F.N7?e.currentTarget.setCustomValidity(_.FileError.TooLarge):e.currentTarget.setCustomValidity("")},required:!0}),n&&(0,E.jsx)(x.ButtonIcon,{text:"Ta bort bild",onClick:function(){i.current.value="",i.current.setCustomValidity(""),o(null)},size:T.IconSize.Small,icon:(0,E.jsx)(w.IconClose,{size:T.IconSize.Small,theme:T.IconTheme.Red})})]})]})},B=function(e){var t=e.state,r=(0,j.useFormStatus)().pending?l.LoadState.Loading:t;return(0,E.jsxs)(o.FlexVertical,{children:[(0,E.jsx)(v.Text,{bold:!0,children:"Ladda upp din luciabild*"}),(0,E.jsx)(b.MarginSmall,{}),(0,E.jsx)(M,{name:"image"}),(0,E.jsx)(a.MarginBase,{}),(0,E.jsx)(y.InputText,{name:"name",id:"name",labelText:"Namn och ålder på de i bilden",required:!0}),(0,E.jsx)(y.InputText,{name:"photo",id:"photo",labelText:"Fotograf"}),(0,E.jsx)(y.InputText,{name:"location",id:"location",labelText:"Ort",required:!0}),(0,E.jsx)(y.InputText,{name:"greeting",id:"greeting",labelText:"Hälsning",required:!0}),(0,E.jsx)(m.n,{name:"email",id:"email",labelText:"Din e-post (ifall vi behöver kontakta dig)",required:!0}),(0,E.jsx)(a.MarginBase,{}),(0,E.jsx)(p.ButtonSolid,{width:g.ButtonWidth.Wrap,load:r,dataTrack:"immediate",dataTrackId:"submit",type:"submit",children:"Skicka"}),t===l.LoadState.Failure&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(a.MarginBase,{}),(0,E.jsx)(d.F,{level:h.AlertLevel.Danger,text:"Något gick fel, försök igen. Om det inte fungerar, mejla bilden och samma uppgifter till [email protected]"})]}),t===l.LoadState.Success&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(a.MarginBase,{}),(0,E.jsx)(d.F,{level:h.AlertLevel.Success,text:"Tack för din luciabild. Den dyker upp senare i vårt stora luciabildspel!"})]})]})};function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}
2finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?q(e,t):void 0}}(e,t)||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 q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function V(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof l?n:l,c=Object.create(u.prototype);return G(c,"_invoke",function(r,n,o){var i,l,u,c=0,s=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,u=e,d.n=r,a}};function p(r,n){for(l=r,u=n,t=0;!f&&c&&!o&&t<s.length;t++){var o,i=s[t],p=d.p,m=i[2];r>3?(o=m===n)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<m&&(o=r<3||i[0]>n||n>m)&&(i[4]=r,i[5]=n,d.n=m,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,s,m){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&p(s,m),l=s,u=m;(t=l<2?e:u)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,u)):d.n=u:d.v=u);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?u:r.call(n,d))!==a)break}catch(t){i=e,l=1,u=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function u(){}function c(){}t=Object.getPrototypeOf;var s=[][n]?t(t([][n]())):(G(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(s);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,G(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=c,G(f,"constructor",c),G(c,"constructor",u),u.displayName="GeneratorFunction",G(c,o,"GeneratorFunction"),G(f),G(f,o,"Generator"),G(f,n,function(){return this}),G(f,"toString",function(){return"[object Generator]"}),(V=function(){return{w:i,m:d}})()}function G(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}G=function(e,t,r,n){function i(t,r){G(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},G(e,t,r,n)}function z(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}var D=function(){var e,t=(e=V().m(function e(t,r){return V().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,fetch((0,c.yx)(c.qW),{method:"POST",body:r});case 1:if(e.v.ok){e.n=2;break}return e.a(2,l.LoadState.Failure);case 2:return e.a(2,l.LoadState.Success);case 3:return e.p=3,e.v,e.a(2,l.LoadState.Failure)}},e,null,[[0,3]])}),function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){z(i,n,o,a,l,"next",e)}function l(e){z(i,n,o,a,l,"throw",e)}a(void 0)})});return function(e,r){return t.apply(this,arguments)}}();const U=function(e){var t=e.content,r=e.headline,c=R((0,u.useActionState)(D,l.LoadState.Idle),2),d=c[0],p=c[1];return(0,E.jsx)(s.O,{dataTrackId:"lucia-form",children:(0,E.jsx)(n.ContainerBase,{children:(0,E.jsxs)(o.FlexVertical,{children:[(0,E.jsx)(i.H2,{text:r}),(0,E.jsx)(f.y,{content:t}),(0,E.jsx)(a.MarginBase,{}),(0,E.jsx)(o.FlexVertical,{children:(0,E.jsx)("form",{action:p,children:(0,E.jsx)(B,{state:d})})})]})})})}},2778(e,t,r){r.d(t,{y:()=>l});var n=r(69122),o=r(77810),i=r(64922),a=function(e){var t=e.content,r=e.className;return(0,i.jsx)("div",{className:n("contentWrapper___3Sh5p",r),dangerouslySetInnerHTML:{__html:t}})},l=o.memo(a)},15674(e,t,r){r.d(t,{D_:()=>y,QC:()=>m});var n=r(73349);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function a(e,t,r){return t=s(t),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(u())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&c(o,r.prototype),o}(e,arguments,s(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)},l(e)}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}
2function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}var d=function(e){return e.NoFile="Ingen fil vald",e.TooLarge="Filen är för stor",e.TooMany="För många filer valda",e.NotAllowed="Filtypen är inte tillåten",e}({}),p=function(e){function t(e,r){var n,o,i,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=a(this,t,[r]),o=n,l=void 0,(i=f(i="file"))in o?Object.defineProperty(o,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):o[i]=l,n.file=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,n&&i(r.prototype,n),o&&i(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(l(Error)),m=function(e){var t,r,n=e.type.includes("/")?".".concat(null===(t=e.type.split("/").pop())||void 0===t?void 0:t.toLowerCase()):"",o=e.name.includes(".")?".".concat(null===(r=e.name.split(".").pop())||void 0===r?void 0:r.toLowerCase()):"";return n||o},y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.xJ;return function(r){r.setCustomValidity("");var n=r.files;if(r.required&&(!n||0===n.length))return r.setCustomValidity(d.NoFile),[new p(null,d.NoFile)];if(n.length>e)return r.setCustomValidity("".concat(d.TooMany," Max ").concat(e," filer.")),[new p(null,d.TooMany)];var o=Array.from(n).reduce(function(e,n){return!function(e,t){return e.split(",").map(function(e){return e.trim()}).includes(m(t).toLowerCase())}(r.accept,n)?e.push(new p(n,d.NotAllowed)):n.size>t&&e.push(new p(n,d.TooLarge)),e},[]);return o.length>0&&r.setCustomValidity(o.reduce(function(e,t,r){var n;return e+"".concat(0===r?"":"\n").concat(t.message,": ").concat(null===(n=t.file)||void 0===n?void 0:n.name)},"")),o}}},2908(e,t,r){r.d(t,{l:()=>y});var n=r(72001),o=r(20931),i=r(82197),a=r(21289),l=r(47940),u=r(66443),c=r(69122),s=r(77810),f=r(15674),d=r(64922);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function m(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==p(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var y=function(e){var t=e.width,r=e.height,o=e.border,i=void 0!==o&&o,a=e.children;return(0,d.jsx)("div",{className:"container___kjRQj",style:{width:t||"100%",height:r||"auto"},children:(0,d.jsx)(n.Flex,{direction:"column",justifyContent:"center",alignItems:"center",className:c("preview___wrLaK",m({},"border___h0Yz_",i)),children:a})})};y.Image=function(e){var t=e.file,r=e.accept,c=s.useCallback(function(e){e&&(e.src=window.URL.createObjectURL(t),e.onload=function(){URL.revokeObjectURL(e.src)})},[t]);return r.includes((0,f.QC)(t))?(0,d.jsx)("img",{ref:c}):(0,d.jsxs)(n.Flex,{gap:u.Spacing.Small,direction:"column",alignItems:"center",minWidth:"100%",children:[(0,d.jsx)(o.IconWarning,{theme:a.IconTheme.Grey}),(0,d.jsx)(i.Text,{bold:!0,textCenter:!0,theme:l.TextTheme.Grey,children:"Ogiltig"})]})}},73349(e,t,r){r.d(t,{N7:()=>i,Pj:()=>o,xJ:()=>n});var n=1048576,o=7,i=o*n},95446(e,t,r){t.n=void 0;var n=r(34789),o=r(77810),i=r(66974),a=r(39552),l=r(39467);t.n=function(e){var t=e.placeholder,r=void 0===t?"Ange din e-postadress":t,u=e.labelText,c=void 0===u?"E-post":u,s=e.id,f=e.name,d=e.customError,p=n.__rest(e,["placeholder","labelText","id","name","customError"]),m=p.disabled,y=p.hidden,b=p.required,v=p.theme,h=n.__rest(p,["disabled","hidden","required","theme"]);return o.createElement(a.Field,{disabled:m,hidden:y,required:b,theme:v},o.createElement(a.Field.Label,{htmlFor:s,text:c}),o.createElement(a.Field.Input,n.__assign({},h,{customError:d,type:"email",placeholder:r,autoComplete:i.AutoComplete.Email,name:f||s,id:s})),o.createElement(l.FormErrorLabel,null))},t.n.displayName="InputEmail"}}]);
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.