PageSourceSearch

https://www.tax-free.no/chunk-CZMHH2M3.js

js tax-free.no collected 2026-10-06 15:04:05 UTC 7,757 bytes, 1 lines download raw bytes

1import{c}from"./chunk-YMDDGZ5U.js";import{a as it}from"./chunk-U6HR6JGF.js";import{g as W}from"./chunk-3OSB33KW.js";import{a as J}from"./chunk-4Z5MUJO3.js";import{G as ot,b as X,e as Y,j as tt,o as et,p as nt}from"./chunk-LJH5OBMW.js";import{Cb as j,E as R,Eb as m,Gb as f,Ja as z,Jb as q,Jc as h,Ka as B,Kb as U,Kc as b,Lb as y,Mb as d,Md as Z,Mh as P,Nb as p,Nh as T,Ob as _,Pc as x,Sc as Q,Tc as u,V as M,Vb as K,Xb as G,Zb as g,cb as r,ga as k,jc as N,mc as C,nc as v,o as L,ob as w,rb as $,rh as H,u as V,ua as S,ya as E,za as I}from"./chunk-PMSJWPYZ.js";import{a as F,b as A,h as D}from"./chunk-NIF3MU5U.js";var l=D(J());var lt=(e,i)=>i.value;function dt(e,i){e&1&&(d(0,"p"),C(1),h(2,"cxTranslate"),p()),e&2&&(r(),v(b(2,1,"refinement.range.all")))}function st(e,i){if(e&1&&(d(0,"p"),C(1),p()),e&2){let t=g().$implicit;r(),v(t.label)}}function ut(e,i){if(e&1&&(d(0,"div",6)(1,"label",7),_(2,"input",8),m(3,dt,3,3,"p")(4,st,2,1,"p"),p(),d(5,"span",9),C(6),p()()),e&2){let t=i.$implicit,n=g(3);r(2),y("name",n.controlName)("value",t.value)("formControl",n.control),r(),f(t.value===n.allValue?3:4),r(3),v(t.count)}}function mt(e,i){if(e&1&&(d(0,"div",5),q(1,ut,7,5,"div",6,lt),p()),e&2){let t=g(2);N("expanded",t.dropdownActive()),r(),U(t.options())}}function ft(e,i){if(e&1){let t=K();d(0,"div",0)(1,"button",1),G("click",function(){E(t);let o=g();return I(o.toggleDropdown())}),d(2,"h3",2),C(3),p(),_(4,"trn-icon",3),p(),m(5,mt,3,2,"div",4),p()}if(e&2){let t=g();r(),j("aria-expanded",t.dropdownActive()),r(2),v(t.title()),r(),N("expanded",t.dropdownActive()),r(),f(t.dropdownActive()?5:-1)}}var Ot=(()=>{class e{title=u();facetValues=u([],{transform:t=>t??[]});ranges=u([],{transform:t=>t??[]});value=u();refinementChange=Q();allValue=c.ALL;dropdownActive=z(!1);controlName=(0,l.uniqueId)("range_refinement_");control=new tt(c.ALL,{nonNullable:!0});options=x(()=>{let t=this.facetValues(),n={value:c.ALL,count:t.reduce((a,s)=>a+s.count,0)},o=this.ranges().map(a=>({range:a,count:this.bucketCount(t,a)})).filter(({count:a})=>a>0).map(({range:a,count:s})=>({label:a.label,from:a.from??void 0,to:a.to??void 0,count:s,value:this.rangeToValue(a)}));return[n,...o]});visible=x(()=>this.options().some(t=>t.value!==c.ALL&&t.count>0));selectedValue=x(()=>{let t=this.value();return this.options().find(o=>o.from===t?.min&&o.to===t?.max)?.value??c.ALL});constructor(){B(()=>{let t=this.selectedValue();this.control.value!==t&&this.control.setValue(t,{emitEvent:!1})}),this.control.valueChanges.pipe(Z(),M()).subscribe(t=>this.onRadioChange(t))}toggleDropdown(t=!this.dropdownActive()){this.dropdownActive.set(t)}onRadioChange(t){if(t===c.ALL){this.refinementChange.emit({value:c.ALL});return}let n=this.options().find(o=>o.value===t);this.refinementChange.emit({value:t,min:n?.from,max:n?.to})}bucketCount(t,n){return t.reduce((o,a)=>{let s=(0,l.toNumber)(a.name);return Number.isNaN(s)||(0,l.isNumber)(n.from)&&s<n.from||(0,l.isNumber)(n.to)&&s>=n.to?o:o+a.count},0)}rangeToValue(t){let n=(0,l.isNumber)(t.from)?["from",t.from]:[],o=(0,l.isNumber)(t.to)?["to",t.to]:[];return n.concat(o).join("_")}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=w({type:e,selectors:[["trn-range-facet"]],inputs:{title:[1,"title"],facetValues:[1,"facetValues"],ranges:[1,"ranges"],value:[1,"value"]},outputs:{refinementChange:"refinementChange"},decls:1,vars:1,consts:[[1,"refinement-list"],[1,"attribute",3,"click"],[1,"title"],["icon","expand_more",1,"icon"],[1,"items",3,"expanded"],[1,"items"],[1,"wrapper"],[1,"radio-button"],["type","radio",3,"name","value","formControl"],[1,"count"]],template:function(n,o){n&1&&m(0,ft,6,5,"div",0),n&2&&f(o.visible()?0:-1)},dependencies:[W,ot,X,et,Y,nt,T,P],styles:[".refinement-list[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.1);padding:16px 16px 15px}@media all and (min-width:992px){.refinement-list[_ngcontent-%COMP%]{padding:12px 0 11px}}.attribute[_ngcontent-%COMP%]{width:100%;text-align:left;display:flex;justify-content:space-between;align-items:center;cursor:pointer;appearance:none;line-height:inherit;color:inherit}.title[_ngcontent-%COMP%]{font-size:16px;line-height:18px;letter-spacing:normal;padding-top:3px;padding-bottom:3px;font-family:Source Sans Pro,sans-serif;font-weight:600;-webkit-font-smoothing:antialiased;flex:1 0 auto}.icon[_ngcontent-%COMP%]{height:20px;width:auto;font-size:20px}.icon[_ngcontent-%COMP%]     img{height:20px;width:auto}.icon[_ngcontent-%COMP%]{transition:all .15s cubic-bezier(.35,0,0,1)}.icon.expanded[_ngcontent-%COMP%]{transform:rotate(180deg)}.items[_ngcontent-%COMP%]{display:none;padding-top:8px}.items.expanded[_ngcontent-%COMP%]{display:block}.wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.wrapper[_ngcontent-%COMP%]:not(:last-child){margin-bottom:8px}.count[_ngcontent-%COMP%]{font-size:12px;line-height:14px;letter-spacing:normal;padding-top:1px;padding-bottom:1px;color:#0000008c}.radio-button[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;gap:4px;transition:all .15s cubic-bezier(.35,0,0,1);font-size:14px;line-height:20px;letter-spacing:normal;padding-top:2px;padding-bottom:2px}.radio-button[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{appearance:none;background-image:url(/assets/svg/font-icons/radio_button_unchecked.svg);background-position:center;background-repeat:no-repeat;background-size:contain;line-height:inherit;width:16px;min-width:16px;height:16px;width:auto;font-size:16px}.radio-button[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]     img{height:16px;width:auto}.radio-button[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{width:16px;min-width:16px}.radio-button[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:checked{color:#007a48;background-image:url(/assets/svg/font-icons/radio_button_checked.svg)}"],changeDetection:0})}return e})();var O=D(J());var Dt=e=>e.value===c.ALL?{}:{from:e.min,to:e.max};function rt(e){return e.reduce((i,t)=>{if(t.type!=="numeric"||typeof t.value!="number")return i;switch(t.operator){case">=":case">":return A(F({},i),{min:t.value});case"<=":case"<":return A(F({},i),{max:t.value});default:return i}},{})}function Lt(e,i){return e.pipe(k(t=>t?i:R),V(rt),M((t,n)=>(0,O.isEqual)(t,n)))}function Vt(e,i){if(!(i.min===void 0&&i.max===void 0))return e.find(t=>(t.from??void 0)===i.min&&(t.to??void 0)===i.max)}var Rt=e=>"refinements"in e;
1function kt(e,i){let t=o=>o.type==="numeric"&&i(o.attributeName),n=(0,O.groupBy)(e.filter(t),"attributeName");return e.flatMap(o=>{if(!t(o))return[o];let a=n[o.attributeName];return a[0]!==o?[]:[{attributeName:o.attributeName,refinements:a,range:rt(a)}]})}var ct={trnExclusive:"refinement.tre_tooltip",norwegianArrivalQuota:"refinement.norwegian_quota_tooltip"};function gt(e,i){if(e&1&&(_(0,"trn-tooltip",0),h(1,"cxTranslate"),h(2,"cxTranslate")),e&2){let t=i;y("label",b(1,3,t+".title"))("content",b(2,5,t+".description"))("compact",!0)}}var Kt=(()=>{class e{facetId=u.required();tooltipKey=x(()=>ct[this.facetId()]);static \u0275fac=function(n){return new(n||e)};static \u0275cmp=w({type:e,selectors:[["trn-facet-tooltip"]],inputs:{facetId:[1,"facetId"]},decls:1,vars:1,consts:[["iconCode","info",3,"label","content","compact"]],template:function(n,o){if(n&1&&m(0,gt,3,7,"trn-tooltip",0),n&2){let a;f((a=o.tooltipKey())?0:-1,a)}},dependencies:[it,T,P],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return e})();var xt=new Set(["true","false"]),Wt=(()=>{class e{translationService=S(H);transform(t){return xt.has(t)?this.translationService.translate(`refinement.${t}`):L(t)}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=$({name:"trnFacetValueLabel",type:e,pure:!0})}return e})();export{Ot as a,Dt as b,Lt as c,Vt as d,Rt as e,kt as f,Kt as g,xt as h,Wt as i};

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.