PageSourceSearch

https://polipoli-web.com/638.916a5c09c7aaf72dda8d.js

js polipoli-web.com collected 2026-10-02 05:51:54 UTC 33,822 bytes, 1 lines download raw bytes

1(self.webpackChunkcitizen_web=self.webpackChunkcitizen_web||[]).push([[638],{7778:function(pe){pe.exports=function(){"use strict";function ee(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach(function(n){ee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x(e,t){if(null==e)return{};var r,n,a=function(i,s){if(null==i)return{};var c,l,f={},h=Object.keys(i);for(l=0;l<h.length;l++)s.indexOf(c=h[l])>=0||(f[c]=i[c]);return f}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function U(e,t){return function(r){if(Array.isArray(r))return r}(e)||function(r,n){if(Symbol.iterator in Object(r)||"[object Arguments]"===Object.prototype.toString.call(r)){var a=[],o=!0,i=!1,s=void 0;try{for(var c,l=r[Symbol.iterator]();!(o=(c=l.next()).done)&&(a.push(c.value),!n||a.length!==n);o=!0);}catch(f){i=!0,s=f}finally{try{o||null==l.return||l.return()}finally{if(i)throw s}}return a}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function z(e){return function(t){if(Array.isArray(t)){for(var r=0,n=new Array(t.length);r<t.length;r++)n[r]=t[r];return n}}(e)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function Q(e){var t,r="algoliasearch-client-js-".concat(e.key),n=function(){return void 0===t&&(t=e.localStorage||window.localStorage),t},a=function(){return JSON.parse(n().getItem(r)||"{}")};return{get:function(o,i){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){var c=JSON.stringify(o),l=a()[c];return Promise.all([l||i(),void 0!==l])}).then(function(c){var l=U(c,2),f=l[0];return Promise.all([f,l[1]||s.miss(f)])}).then(function(c){return U(c,1)[0]})},set:function(o,i){return Promise.resolve().then(function(){var s=a();return s[JSON.stringify(o)]=i,n().setItem(r,JSON.stringify(s)),i})},delete:function(o){return Promise.resolve().then(function(){var i=a();delete i[JSON.stringify(o)],n().setItem(r,JSON.stringify(i))})},clear:function(){return Promise.resolve().then(function(){n().removeItem(r)})}}}function M(e){var t=z(e.caches),r=t.shift();return void 0===r?{get:function(n,a){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return a().then(function(s){return Promise.all([s,o.miss(s)])}).then(function(s){return U(s,1)[0]})},set:function(n,a){return Promise.resolve(a)},delete:function(n){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(n,a){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(n,a,o).catch(function(){return M({caches:t}).get(n,a,o)})},set:function(n,a){return r.set(n,a).catch(function(){return M({caches:t}).set(n,a)})},delete:function(n){return r.delete(n).catch(function(){return M({caches:t}).delete(n)})},clear:function(){return r.clear().catch(function(){return M({caches:t}).clear()})}}}function W(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},o=JSON.stringify(r);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);var i=n(),s=a&&a.miss||function(){return Promise.resolve()};return i.then(function(c){return s(c)}).then(function(){return i})},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(r){return delete t[JSON.stringify(r)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function F(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===R.WithinHeaders?n:{}},queryParameters:function(){return e===R.WithinQueryParameters?n:{}}}}function K(e){var t=0;return e(function r(){return t++,new Promise(function(n){setTimeout(function(){n(e(r))},Math.min(100*t,1e3))})})}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(r,n){return Promise.resolve()};return Object.assign(e,{wait:function(r){return y(e.then(function(n){return Promise.all([t(n,r),n])}).then(function(n){return n[1]}))}})}function te(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function J(e,t){return t&&Object.keys(t).forEach(function(r){e[r]=t[r](e)}),e}function d(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var a=0;return e.replace(/%s/g,function(){return encodeURIComponent(r[a++]
1)})}var R={WithinQueryParameters:0,WithinHeaders:1};function k(e,t){var r=e||{},n=r.data||{};return Object.keys(r).forEach(function(a){-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(a)&&(n[a]=r[a])}),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var O={Read:1,Write:2,Any:3};function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return u(u({},e),{},{status:t,lastUpdate:Date.now()})}function A(e){return"string"==typeof e?{protocol:"https",url:e,accept:O.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||O.Any}}var C="DELETE",v="GET",m="POST";function he(e,t,r,n){var b,g,P,a=[],o=function(p,b){if(p.method!==v&&(void 0!==p.data||void 0!==b.data)){var g=Array.isArray(p.data)?p.data:u(u({},p.data),b.data);return JSON.stringify(g)}}(r,n),i=(b=n,g=u(u({},e.headers),b.headers),P={},Object.keys(g).forEach(function(I){var _=g[I];P[I.toLowerCase()]=_}),P),s=r.method,c=r.method!==v?{}:u(u({},r.data),n.data),l=u(u(u({"x-algolia-agent":e.userAgent.value},e.queryParameters),c),n.queryParameters),f=0,h=function p(b,g){var P=b.pop();if(void 0===P)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact [email protected].",transporterStackTrace:ye(a)};var I={data:o,headers:i,method:s,url:ke(P,r.path,l),connectTimeout:g(f,e.timeouts.connect),responseTimeout:g(f,n.timeout)},_=function(N){var S={request:I,response:N,host:P,triesLeft:b.length};return a.push(S),S},Y={onSuccess:function(N){return function(S){try{return JSON.parse(S.content)}catch(L){throw{name:"DeserializationError",message:L.message,response:S}}}(N)},onRetry:function(N){var S=_(N);return N.isTimedOut&&f++,Promise.all([e.logger.info("Retryable failure",ge(S)),e.hostsCache.set(P,T(P,N.isTimedOut?3:2))]).then(function(){return p(b,g)})},onFail:function(N){throw _(N),function(S,L){var B=S.content,G=S.status,Z=B;try{Z=JSON.parse(B).message}catch(ne){}return{name:"ApiError",message:Z,status:G,transporterStackTrace:L}}(N,ye(a))}};return e.requester.send(I).then(function(N){return L=Y,G=(B=S=N).status,B.isTimedOut||!(Z=B).isTimedOut&&0==~~Z.status||2!=~~(G/100)&&4!=~~(G/100)?L.onRetry(S):2==~~(S.status/100)?L.onSuccess(S):L.onFail(S);var S,L,B,Z,G})};return function(e,t){return Promise.all(t.map(function(r){return e.get(r,function(){return Promise.resolve(T(r))})})).then(function(r){var n=r.filter(function(i){return 1===(s=i).status||Date.now()-s.lastUpdate>12e4;var s}),a=r.filter(function(i){return 3===(s=i).status&&Date.now()-s.lastUpdate<=12e4;var s}),o=[].concat(z(n),z(a));return{getTimeout:function(i,s){return(0===a.length&&0===i?1:a.length+3+i)*s},statelessHosts:o.length>0?o.map(function(i){return A(i)}):t}})}(e.hostsCache,t).then(function(p){return h(z(p.statelessHosts).reverse(),p.getTimeout)})}function oe(e){var f={hostsCache:e.hostsCache,logger:e.logger,requester:e.requester,requestsCache:e.requestsCache,responsesCache:e.responsesCache,timeouts:e.timeouts,userAgent:e.userAgent,headers:e.headers,queryParameters:e.queryParameters,hosts:e.hosts.map(function(h){return A(h)}),read:function(h,p){var b=k(p,f.timeouts.read),g=function(){return he(f,f.hosts.filter(function(I){return 0!=(I.accept&O.Read)}),h,b)};if(!0!==(void 0!==b.cacheable?b.cacheable:h.cacheable))return g();var P={request:h,mappedRequestOptions:b,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(P,function(){return f.requestsCache.get(P,function(){return f.requestsCache.set(P,g()).then(function(I){return Promise.all([f.requestsCache.delete(P),I])},function(I){return Promise.all([f.requestsCache.delete(P),Promise.reject(I)])}).then(function(I){return U(I,2)[1]})})},{miss:function(I){return f.responsesCache.set(P,I)}})},write:function(h,p){return he(f,f.hosts.filter(function(b){return 0!=(b.accept&O.Write)}),h,k(p,f.timeouts.write))}};return f}function Ne(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(r){var n="; ".concat(r.segment).concat(void 0!==r.version?" (".concat(r.version,")"):"");return-1===t.value.indexOf(n)&&(t.value="".concat(t.value).concat(n)),t}};return t}function ke(e,t,r){var n=me(r),a="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(a+="?".concat(n)),a}function me(e){return Object.keys(e).map(function(t){return d("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r}).join("&")}function ye(e){return e.map(function(t){return ge(t)})}function ge(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return u(u({},e),{},{request:u(u({},e.request),{},{headers:u(u({},e.request.headers),t)})})}var Re=function(e){return function(t,r){return e.transporter.write({method:m,path:"2/abtests",data:t},r)}},_e=function(e){return function(t,r){return e.transporter.write({method:C,path:d("2/abtests/%s",t)},r)}},Ae=function(e){return function(t,r){return e.transporter.read({method:v,path:d("2/abtests/%s",t)},r)}},Ce=function(e){return function(t){return e.transporter.read({method:v,path:"2/abtests"},t)}},Ue=function(e){return function(t,r){return e.transporter.write({method:m,path:d("2/abtests/%s/stop",t)},r)}},Me=function(e){return function(t){return e.transporter.read({method:v,path:"1/strategies/personalization"},t)}},ze=function(e){return function(t,r){return e.transporter.write({method:m,path:"1/strategies/personalization",data:t},r)}};function ie(e){return function t(r){return e.request(r).then(function(n){if(void 0!==e.batch&&e.batch(n.hits),!e.shouldStop(n))return t(n.cursor?{cursor:n.cursor}:{page:(r.page||0)+1})})}({})}var Ke=function(e){return function(t,r){var n=r||{},a=n.queryParameters,o=x(n,["queryParameters"]),i=u({acl:t},void 0!==a?{queryParameters:a}:{});return y(e.transporter.write({method:m,path:"1/keys",data:i},o),function(s,c){return K(function(l){return V(e)(s.key,c).catch(function(f){if(404!==f.status)throw f;return l()})})})}},Be=function(e){return function(t,r,n){var a=k(n);return a.queryParameters["X-Algolia-User-ID"]=t,e.transporter.write({method:m,path:"1/clusters/mapping",data:{cluster:r}},a)}},We=function(e){return function(t,r,n){return e.transporter.write({method:m,path:"1/clusters/mapping/batch",data:{users:t,cluster:r}},n)}},Le=function(e){return function(t,r){return y(e.transporter.write({method:m,path:d("/1/dictionaries/%s/batch",t),data:{clearExistingDictionaryEntries:!0,requests:{action:"addEntry",body:[]}}},r),function(n,a){return $(e)(n.taskID,a)})}},re=function(e){return function(t,r,n){return y(e.transporter.write({method:m,path:d("1/indexes/%s/operation",t),data:{operation:"copy",destination:r}},n),function(a,o){return X(e)(t,{methods:{waitTask:j}}).waitTask(a.taskID,o)})}},Fe=function(e){return function(t,r,n){return re(e)(t,r,u(u({},n),{},{scope:[le.Rules]}))}},Je=function(e){return function(t,r,n){return re(e)(t,r,u(u({},n),{},{scope:[le.Settings]}))}},$e=function(e){return function(t,r,n){return re(e)(t,r,u(u({},n),{},{scope:[le.Synonyms]}))}},He=function(e){return function(t,r){return y(e.transporter.write({method:C,path:d("1/keys/%s",t)},r),function(n,a){return K(function(o){return V(e)(t,a).then(o).catch(function(i){if(404!==i.status)throw i})})})}},Ge=function(e){return function(t,r,n){var a=r.map(function(o){return{action:"deleteEntry",body:{objectID:o}}});return y(e.transporter.write({method:m,path:d("/1/dictionaries/%s/batch",t),data:{clearExistingDictionaryEntries:!1,requests:a}},n),function(o,i){return $(e)(o.taskID,i)})}},V=function(e){return function(t,r){return e.transporter.read({method:v,path:d("1/keys/%s",t)},r)}},Qe=function(e){return function(t){return e.transporter.read({method:v,path:"/1/dictionaries/*/settings"},t)}},Ve=function(e){return function(t){return e.transporter.read({method:v,path:"1/logs"},t)}},Xe=function(e){return function(t){return e.transporter.read({method:v,path:"1/clusters/mapping/top"},t)}},ve=function(e){return function(t,r){return e.transporter.read({method:v,path:d("1/task/%s",t.toString())},r)}},Ye=function(e){return function(t,r){return e.transporter.read({method:v,path:d("1/clusters/mapping/%s",t)},r)}},Ze=function(e){return function(t){var r=t||{},n=r.retrieveMappings,a=x(r,["retrieveMappings"]);return!0===n&&(a.getClusters=!0),e.transporter.read({method:v,path:"1/clusters/mapping/pending"},a)}},X=function(e){return function(t){return J({transporter:e.transporter,appId:e.appId,indexName:t},(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).methods)}},et=function(e){return function(t){return e.transporter.read({method:v,path:"1/keys"},t)}},tt=function(e){return function(t){return e.transporter.read({method:v,path:"1/clusters"},t)}},rt=function(e){return function(t){return e.transporter.read({method:v,path:"1/indexes"},t)}},nt=function(e){return function(t){return e.transporter.read({method:v,path:"1/clusters/mapping"},t)}},at=function(e){return function(t,r,n){return y(e.transporter.write({method:m,path:d("1/indexes/%s/operation",t),data:{operation:"move",destination:r}},n),function(a,o){return X(e)(t,{methods:{waitTask:j}}).waitTask(a.taskID,o)})}},ot=function(e){return function(t,r){return y(e.transporter.write({method:m,path:"1/indexes/*/batch",data:{requests:t}},r),function(n,a){return Promise.all(Object.keys(n.taskID).map(function(o){return X(e)(o,{methods:{waitTask:j}}).waitTask(n.taskID[o],a)}))})}},it=function(e){return function(t,r){return e.transporter.read({method:m,path:"1/indexes/*/objects",data:{requests:t}},r)}},be=function(e){return function(t,r){var n=t.map(function(a){return u(u({},a),{},{params:me(a.params||{})})});return e.transporter.read({method:m,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)}},Pe=function(e){return function(t,r){return Promise.all(t.map(function(n){var a=n.params,o=a.facetName,i=a.facetQuery,s=x(a,["facetName","facetQuery"]);return X(e)(n.indexName,{methods:{searchForFacetValues:we}}).searchForFacetValues(o,i,u(u({},r),s))}))}},st=function(e){return function(t,r){var n=k(r);return n.queryParameters["X-Algolia-User-ID"]=t,e.transporter.write({method:C,path:"1/clusters/mapping"},n)}},ut=function(e){return function(t,r,n){var a=r.map(function(o){return{action:"addEntry",body:o}});return y(e.transporter.write({method:m,path:d("/1/dictionaries/%s/batch",t),data:{clearExistingDictionaryEntries:!0,requests:a}},n),function(o,i){return $(e)(o.taskID,i)})}},ct=function(e){return function(t,r){return y(e.transporter.write({method:m,path:d("1/keys/%s/restore",t)},r),function(n,a){return K(function(o){return V(e)(t,a).catch(function(i){if(404!==i.status)throw i;return o()})})})}},ft=function(e){return function(t,r,n){var a=r.map(function(o){return{action:"addEntry",body:o}});return y(e.transporter.write({method:m,path:d("/1/dictionaries/%s/batch",t),data:{clearExistingDictionaryEntries:!1,requests:a}},n),function(o,i){return $(e)(o.taskID,i)})}},lt=function(e){return function(t,r,n){return e.transporter.read({method:m,path:d("/1/dictionaries/%s/search",t),data:{query:r},cacheable:!0},n)}},dt=function(e){return function(t,r){return e.transporter.read({method:m,path:"1/clusters/mapping/search",data:{query:t}},r)}},pt=function(e){return function(t,r){return y(e.transporter.write({method:"PUT",path:"/1/dictionaries/*/settings",data:t},r),function(n,a){return $(e)(n.taskID,a)})}},ht=function(e){return function(t,r){var n=Object.assign({},r),a=r||{},o=a.queryParameters,i=x(a,["queryParameters"]),s=o?{queryParameters:o}:{},c=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"];return y(e.transporter.write({method:"PUT",path:d("1/keys/%s",t),data:s},i),function(l,f){return K(function(h){return V(e)(t,f).then(function(p){return b=p,Object.keys(n).filter(function(g){return-1!==c.indexOf(g)}).every(function(g){return b[g]===n[g]})?Promise.resolve():h();var b})})})}},$=function(e){return function(t,r){return K(function(n){return ve(e)(t,r).then(function(a){return"published"!==a.status?n():void 0})})}},Oe=function(e){return function(t,r){return y(e.transporter.write({method:m,path:d("1/indexes/%s/batch",e.indexName),data:{requests:t}},r),function(n,a){return j(e)(n.taskID,a)})}},mt=function(e){return function(t){return ie(u(u({shouldStop:function(r){return void 0===r.cursor}},t),{},{request:function(r){return e.transporter.read({method:m,path:d("1/indexes/%s/browse",e.indexName),data:r},t)}}))}},yt=function(e){return function(t){var r=u({hitsPerPage:1e3},t);return ie(u(u({shouldStop:function(n){return n.hits.length<r.hitsPerPage}},r),{},{request:function(n){return Ee(e)("",u(u({},r),n)).then(function(a){return u(u({},a),{},{hits:a.hits.map(function(o){return delete o._highlightResult,o})})})}}))}}
1,gt=function(e){return function(t){var r=u({hitsPerPage:1e3},t);return ie(u(u({shouldStop:function(n){return n.hits.length<r.hitsPerPage}},r),{},{request:function(n){return Te(e)("",u(u({},r),n)).then(function(a){return u(u({},a),{},{hits:a.hits.map(function(o){return delete o._highlightResult,o})})})}}))}},se=function(e){return function(t,r,n){var a=n||{},o=a.batchSize,i=x(a,["batchSize"]),s={taskIDs:[],objectIDs:[]};return y(function c(){var l,h=[];for(l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;l<t.length&&(h.push(t[l]),h.length!==(o||1e3));l++);return 0===h.length?Promise.resolve(s):Oe(e)(h.map(function(p){return{action:r,body:p}}),i).then(function(p){return s.objectIDs=s.objectIDs.concat(p.objectIDs),s.taskIDs.push(p.taskID),l++,c(l)})}(),function(c,l){return Promise.all(c.taskIDs.map(function(f){return j(e)(f,l)}))})}},vt=function(e){return function(t){return y(e.transporter.write({method:m,path:d("1/indexes/%s/clear",e.indexName)},t),function(r,n){return j(e)(r.taskID,n)})}},bt=function(e){return function(t){var r=t||{},n=r.forwardToReplicas,a=k(x(r,["forwardToReplicas"]));return n&&(a.queryParameters.forwardToReplicas=1),y(e.transporter.write({method:m,path:d("1/indexes/%s/rules/clear",e.indexName)},a),function(o,i){return j(e)(o.taskID,i)})}},Pt=function(e){return function(t){var r=t||{},n=r.forwardToReplicas,a=k(x(r,["forwardToReplicas"]));return n&&(a.queryParameters.forwardToReplicas=1),y(e.transporter.write({method:m,path:d("1/indexes/%s/synonyms/clear",e.indexName)},a),function(o,i){return j(e)(o.taskID,i)})}},Ot=function(e){return function(t,r){return y(e.transporter.write({method:m,path:d("1/indexes/%s/deleteByQuery",e.indexName),data:t},r),function(n,a){return j(e)(n.taskID,a)})}},Dt=function(e){return function(t){return y(e.transporter.write({method:C,path:d("1/indexes/%s",e.indexName)},t),function(r,n){return j(e)(r.taskID,n)})}},It=function(e){return function(t,r){return y(De(e)([t],r).then(function(n){return{taskID:n.taskIDs[0]}}),function(n,a){return j(e)(n.taskID,a)})}},De=function(e){return function(t,r){var n=t.map(function(a){return{objectID:a}});return se(e)(n,H.DeleteObject,r)}},jt=function(e){return function(t,r){var n=r||{},a=n.forwardToReplicas,o=k(x(n,["forwardToReplicas"]));return a&&(o.queryParameters.forwardToReplicas=1),y(e.transporter.write({method:C,path:d("1/indexes/%s/rules/%s",e.indexName,t)},o),function(i,s){return j(e)(i.taskID,s)})}},xt=function(e){return function(t,r){var n=r||{},a=n.forwardToReplicas,o=k(x(n,["forwardToReplicas"]));return a&&(o.queryParameters.forwardToReplicas=1),y(e.transporter.write({method:C,path:d("1/indexes/%s/synonyms/%s",e.indexName,t)},o),function(i,s){return j(e)(i.taskID,s)})}},wt=function(e){return function(t){return Ie(e)(t).then(function(){return!0}).catch(function(r){if(404!==r.status)throw r;return!1})}},Et=function(e){return function(t,r,n){return e.transporter.read({method:m,path:d("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},Tt=function(e){return function(t,r){var n=r||{},a=n.query,o=n.paginate,i=x(n,["query","paginate"]),s=0;return function c(){return xe(e)(a||"",u(u({},i),{},{page:s})).then(function(l){for(var f=0,h=Object.entries(l.hits);f<h.length;f++){var p=U(h[f],2),b=p[0],g=p[1];if(t(g))return{object:g,position:parseInt(b,10),page:s}}if(s++,!1===o||s>=l.nbPages)throw{name:"ObjectNotFoundError",message:"Object not found."};return c()})}()}},St=function(e){return function(t,r){return e.transporter.read({method:v,path:d("1/indexes/%s/%s",e.indexName,t)},r)}},qt=function(){return function(e,t){for(var r=0,n=Object.entries(e.hits);r<n.length;r++){var a=U(n[r],2);if(a[1].objectID===t)return parseInt(a[0],10)}return-1}},Nt=function(e){return function(t,r){var n=r||{},a=n.attributesToRetrieve,o=x(n,["attributesToRetrieve"]),i=t.map(function(s){return u({indexName:e.indexName,objectID:s},a?{attributesToRetrieve:a}:{})});return e.transporter.read({method:m,path:"1/indexes/*/objects",data:{requests:i}},o)}},kt=function(e){return function(t,r){return e.transporter.read({method:v,path:d("1/indexes/%s/rules/%s",e.indexName,t)},r)}},Ie=function(e){return function(t){return e.transporter.read({method:v,path:d("1/indexes/%s/settings",e.indexName),data:{getVersion:2}},t)}},Rt=function(e){return function(t,r){return e.transporter.read({method:v,path:d("1/indexes/%s/synonyms/%s",e.indexName,t)},r)}},_t=function(e){return function(t,r){return y(je(e)([t],r).then(function(n){return{objectID:n.objectIDs[0],taskID:n.taskIDs[0]}}),function(n,a){return j(e)(n.taskID,a)})}},je=function(e){return function(t,r){var n=r||{},a=n.createIfNotExists,o=x(n,["createIfNotExists"]),i=a?H.PartialUpdateObject:H.PartialUpdateObjectNoCreate;return se(e)(t,i,o)}},At=function(e){return function(t,r){var n=r||{},a=n.safe,o=n.autoGenerateObjectIDIfNotExist,i=n.batchSize,s=x(n,["safe","autoGenerateObjectIDIfNotExist","batchSize"]),c=function(g,P,I,_){return y(e.transporter.write({method:m,path:d("1/indexes/%s/operation",g),data:{operation:I,destination:P}},_),function(Y,N){return j(e)(Y.taskID,N)})},l=Math.random().toString(36).substring(7),f="".concat(e.indexName,"_tmp_").concat(l),h=ue({appId:e.appId,transporter:e.transporter,indexName:f}),p=[],b=c(e.indexName,f,"copy",u(u({},s),{},{scope:["settings","synonyms","rules"]}));return p.push(b),y((a?b.wait(s):b).then(function(){var g=h(t,u(u({},s),{},{autoGenerateObjectIDIfNotExist:o,batchSize:i}));return p.push(g),a?g.wait(s):g}).then(function(){var g=c(f,e.indexName,"move",s);return p.push(g),a?g.wait(s):g}).then(function(){return Promise.all(p)}).then(function(g){var P=U(g,3),_=P[1],Y=P[2];return{objectIDs:_.objectIDs,taskIDs:[P[0].taskID].concat(z(_.taskIDs),[Y.taskID])}}),function(g,P){return Promise.all(p.map(function(I){return I.wait(P)}))})}},Ct=function(e){return function(t,r){return ce(e)(t,u(u({},r),{},{clearExistingRules:!0}))}},Ut=function(e){return function(t,r){return fe(e)(t,u(u({},r),{},{clearExistingSynonyms:!0}))}},Mt=function(e){return function(t,r){return y(ue(e)([t],r).then(function(n){return{objectID:n.objectIDs[0],taskID:n.taskIDs[0]}}),function(n,a){return j(e)(n.taskID,a)})}},ue=function(e){return function(t,r){var n=r||{},a=n.autoGenerateObjectIDIfNotExist,o=x(n,["autoGenerateObjectIDIfNotExist"]),i=a?H.AddObject:H.UpdateObject;if(i===H.UpdateObject){var s=!0,c=!1,l=void 0;try{for(var f,h=t[Symbol.iterator]();!(s=(f=h.next()).done);s=!0)if(void 0===f.value.objectID)return y(Promise.reject({name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}))}catch(p){c=!0,l=p}finally{try{s||null==h.return||h.return()}finally{if(c)throw l}}}return se(e)(t,i,o)}},zt=function(e){return function(t,r){return ce(e)([t],r)}},ce=function(e){return function(t,r){var n=r||{},a=n.forwardToReplicas,o=n.clearExistingRules,i=k(x(n,["forwardToReplicas","clearExistingRules"]));return a&&(i.queryParameters.forwardToReplicas=1),o&&(i.queryParameters.clearExistingRules=1),y(e.transporter.write({method:m,path:d("1/indexes/%s/rules/batch",e.indexName),data:t},i),function(s,c){return j(e)(s.taskID,c)})}},Kt=function(e){return function(t,r){return fe(e)([t],r)}},fe=function(e){return function(t,r){var n=r||{},a=n.forwardToReplicas,o=n.clearExistingSynonyms,i=n.replaceExistingSynonyms,s=k(x(n,["forwardToReplicas","clearExistingSynonyms","replaceExistingSynonyms"]));return a&&(s.queryParameters.forwardToReplicas=1),(i||o)&&(s.queryParameters.replaceExistingSynonyms=1),y(e.transporter.write({method:m,path:d("1/indexes/%s/synonyms/batch",e.indexName),data:t},s),function(c,l){return j(e)(c.taskID,l)})}},xe=function(e){return function(t,r){return e.transporter.read({method:m,path:d("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},we=function(e){return function(t,r,n){return e.transporter.read({method:m,path:d("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},Ee=function(e){return function(t,r){return e.transporter.read({method:m,path:d("1/indexes/%s/rules/search",e.indexName),data:{query:t}},r)}},Te=function(e){return function(t,r){return e.transporter.read({method:m,path:d("1/indexes/%s/synonyms/search",e.indexName),data:{query:t}},r)}},Bt=function(e){return function(t,r){var n=r||{},a=n.forwardToReplicas,o=k(x(n,["forwardToReplicas"]));return a&&(o.queryParameters.forwardToReplicas=1),y(e.transporter.write({method:"PUT",path:d("1/indexes/%s/settings",e.indexName),data:t},o),function(i,s){return j(e)(i.taskID,s)})}},j=function(e){return function(t,r){return K(function(n){return(a=e,function(o,i){return a.transporter.read({method:v,path:d("1/indexes/%s/task/%s",a.indexName,o.toString())},i)})(t,r).then(function(a){return"published"!==a.status?n():void 0});var a})}}
1,H={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject",DeleteIndex:"delete",ClearIndex:"clear"},le={Settings:"settings",Synonyms:"synonyms",Rules:"rules"};function Se(e,t,r){var o,i,s,c,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(o){return new Promise(function(i){var s=new XMLHttpRequest;s.open(o.method,o.url,!0),Object.keys(o.headers).forEach(function(h){return s.setRequestHeader(h,o.headers[h])});var c,l=function(h,p){return setTimeout(function(){s.abort(),i({status:0,content:p,isTimedOut:!0})},1e3*h)},f=l(o.connectTimeout,"Connection timeout");s.onreadystatechange=function(){s.readyState>s.OPENED&&void 0===c&&(clearTimeout(f),c=l(o.responseTimeout,"Socket timeout"))},s.onerror=function(){0===s.status&&(clearTimeout(f),clearTimeout(c),i({content:s.responseText||"Network request failed",status:s.status,isTimedOut:!1}))},s.onload=function(){clearTimeout(f),clearTimeout(c),i({content:s.responseText,status:s.status,isTimedOut:!1})},s.send(o.data)})}},logger:(3,{debug:function(o,i){return Promise.resolve()},info:function(o,i){return Promise.resolve()},error:function(o,i){return console.error(o,i),Promise.resolve()}}),responsesCache:W(),requestsCache:W({serializable:!1}),hostsCache:M({caches:[Q({key:"".concat("4.9.1","-").concat(e)}),W()]}),userAgent:Ne("4.9.1").add({segment:"Browser"})};return o=u(u(u({},a),r),{},{methods:{search:be,searchForFacetValues:Pe,multipleBatch:ot,multipleGetObjects:it,multipleQueries:be,copyIndex:re,copySettings:Je,copySynonyms:$e,copyRules:Fe,moveIndex:at,listIndices:rt,getLogs:Ve,listClusters:tt,multipleSearchForFacetValues:Pe,getApiKey:V,addApiKey:Ke,listApiKeys:et,updateApiKey:ht,deleteApiKey:He,restoreApiKey:ct,assignUserID:Be,assignUserIDs:We,getUserID:Ye,searchUserIDs:dt,listUserIDs:nt,getTopUserIDs:Xe,removeUserID:st,hasPendingMappings:Ze,clearDictionaryEntries:Le,deleteDictionaryEntries:Ge,getDictionarySettings:Qe,getAppTask:ve,replaceDictionaryEntries:ut,saveDictionaryEntries:ft,searchDictionaryEntries:lt,setDictionarySettings:pt,waitAppTask:$,initIndex:function(o){return function(i){return X(o)(i,{methods:{batch:Oe,delete:Dt,findAnswers:Et,getObject:St,getObjects:Nt,saveObject:Mt,saveObjects:ue,search:xe,searchForFacetValues:we,waitTask:j,setSettings:Bt,getSettings:Ie,partialUpdateObject:_t,partialUpdateObjects:je,deleteObject:It,deleteObjects:De,deleteBy:Ot,clearObjects:vt,browseObjects:mt,getObjectPosition:qt,findObject:Tt,exists:wt,saveSynonym:Kt,saveSynonyms:fe,getSynonym:Rt,searchSynonyms:Te,browseSynonyms:gt,deleteSynonym:xt,clearSynonyms:Pt,replaceAllObjects:At,replaceAllSynonyms:Ut,searchRules:Ee,getRule:kt,deleteRule:jt,saveRule:zt,saveRules:ce,replaceAllRules:Ct,browseRules:yt,clearRules:bt}})}},initAnalytics:function(){return function(o){return s=(i=u(u(u({},a),o),{},{methods:{addABTest:Re,getABTest:Ae,getABTests:Ce,stopABTest:Ue,deleteABTest:_e}})).region||"us",c=F(R.WithinHeaders,i.appId,i.apiKey),l=oe(u(u({hosts:[{url:"analytics.".concat(s,".algolia.com")}]},i),{},{headers:u(u(u({},c.headers()),{"content-type":"application/json"}),i.headers),queryParameters:u(u({},c.queryParameters()),i.queryParameters)})),J({appId:i.appId,transporter:l},i.methods);var i,s,c,l}},initRecommendation:function(){return function(o){return s=(i=u(u(u({},a),o),{},{methods:{getPersonalizationStrategy:Me,setPersonalizationStrategy:ze}})).region||"us",c=F(R.WithinHeaders,i.appId,i.apiKey),l=oe(u(u({hosts:[{url:"recommendation.".concat(s,".algolia.com")}]},i),{},{headers:u(u(u({},c.headers()),{"content-type":"application/json"}),i.headers),queryParameters:u(u({},c.queryParameters()),i.queryParameters)})),J({appId:i.appId,transporter:l},i.methods);var i,s,c,l}}}}),s=F(void 0!==o.authMode?o.authMode:R.WithinHeaders,i=o.appId,o.apiKey),J({transporter:c=oe(u(u({hosts:[{url:"".concat(i,"-dsn.algolia.net"),accept:O.Read},{url:"".concat(i,".algolia.net"),accept:O.Write}].concat(te([{url:"".concat(i,"-1.algolianet.com")},{url:"".concat(i,"-2.algolianet.com")},{url:"".concat(i,"-3.algolianet.com")}]))},o),{},{headers:u(u(u({},s.headers()),{"content-type":"application/x-www-form-urlencoded"}),o.headers),queryParameters:u(u({},s.queryParameters()),o.queryParameters)})),appId:i,addAlgoliaAgent:function(l,f){c.userAgent.add({segment:l,version:f})},clearCache:function(){return Promise.all([c.requestsCache.clear(),c.responsesCache.clear()]).then(function(){})}},o.methods)}return Se.version="4.9.1",Se}()},2638:(pe,ee,E)=>{"use strict";E.d(ee,{U:()=>d});var u=E(4762),x=E(7778),U=E.n(x),z=E(4402),Q=E(5917),M=E(9773),W=E(8002),F=E(2473),K=E(7368),y=E(3850),te=E(8720),J=E(3204);let d=(()=>{class R{constructor(O){this.policy=O;const q=U()(F.N.algolia.app_id,F.N.algolia.search_api_key);this.index=q.initIndex("policies")}timestampConvert(O){return new y.EK(O._seconds,O._nanoseconds)}convert(O){const q=O.hits.map(w=>{const{objectID:D}=w,T=(0,u._T)(w,["objectID"]);return Object.assign({_id:D},T)}).filter(w=>{const D=w.published_at;return D&&this.timestampConvert(D)<(0,K.G)()});if(q.length>0)return q}search(O){return this.index.search(O,{filters:"(NOT politician.politician_type:retired_person)"}).then(q=>this.convert(q))}similarPolicies$(O,q){return 0!==O.length?(0,z.D)(this.index.search("",{filters:`(${O.map(w=>`tags:${w}<score=1>`).join(" OR ")}) AND NOT objectID:${q} AND (NOT politician.politician_type:retired_person)`,hitsPerPage:4,sumOrFiltersScores:!0})).pipe((0,M.zg)(w=>{var D;const T=this.convert(w),A=null!==(D=null==T?void 0:T.length)&&void 0!==D?D:0;
1return A<4?this.policy.listOther$(4-A).pipe((0,W.U)(C=>[].concat(T||[],C))):(0,Q.of)(T)})):this.policy.listOther$(4)}similarPoliciesToRelatedPolicies(O){const q=O.map(w=>w.policy.id);return this.policy.listByPolicyIDs$(q).pipe((0,W.U)(w=>{var D;return null!==(D=null==w?void 0:w.flatMap(T=>T.tags))&&void 0!==D?D:[]}),(0,M.zg)(w=>0===w.length?(0,Q.of)([]):(0,z.D)(this.index.search("",{filters:`(${w.map(D=>`tags:${D}<score=1>`).join(" OR ")}) AND (${q.map(D=>`NOT objectID:${D}`).join(" AND ")}) AND (NOT politician.politician_type:retired_person)`,hitsPerPage:3,sumOrFiltersScores:!0})).pipe((0,M.zg)(D=>{var T;const A=this.convert(D),C=null!==(T=null==A?void 0:A.length)&&void 0!==T?T:0;return C<3?this.policy.listOther$(3-C).pipe((0,W.U)(v=>[].concat(A||[],v))):(0,Q.of)(A)}))))}}return R.\u0275fac=function(O){return new(O||R)(te.LFG(J.g))},R.\u0275prov=te.Yz7({token:R,factory:R.\u0275fac,providedIn:"root"}),R})()}}]);

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.