2 lines
233 KiB
JavaScript
2 lines
233 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["Client~Governance~Reddit"],{"./src/app/models/Draft.ts":function(e,t,r){"use strict";var n;r.d(t,"a",function(){return n}),function(e){e[e.replyToPost=0]="replyToPost",e[e.replyToComment=1]="replyToComment",e[e.edit=2]="edit"}(n||(n={}))},"./src/app/models/StructuredStylesImageUpload.ts":function(e,t,r){"use strict";var n=r("./src/lib/constants/index.ts"),o=r("./src/lib/makeApiRequest/index.ts"),s=r("./src/lib/omitHeaders/index.ts"),i=r("./src/lib/uploadToS3/index.ts");r.d(t,"a",function(){return d}),r.d(t,"b",function(){return c}),r.d(t,"c",function(){return u});const d="reddit-user_id",c=async(e,t,r)=>Object(o.c)(Object(s.a)(e,[d]),{endpoint:`${e.apiUrl}/api/v1/structured_styles/${t}`,method:n.jb.PATCH,data:r}),u=async(e,t,r,c,u)=>{const a=await function(e){return new Promise((t,r)=>{try{const o=new FileReader;o.onloadend=(e=>{try{const o=e.target.result,s=new Uint8Array(o).subarray(0,4);let i="";for(let e=0;e<s.length;e++)i+=s[e].toString(16);const d=function(e){switch(e){case"89504e47":return"image/png";case"47494638":return"image/gif";default:return"ffd8ff"===e.slice(0,6)?"image/jpeg":null}}(i);t(d)}catch(n){r(n)}}),o.readAsArrayBuffer(e)}catch(n){r(n)}})}(c),l=await(async(e,t,r,i,c)=>Object(o.c)(Object(s.a)(e,[d]),{endpoint:`${e.apiUrl}/api/v1/style_asset_upload_s3/${t}`,method:n.jb.POST,data:{filepath:r,imagetype:i,mimetype:c}}))(e,t,c.name,r,a);return l.ok?Object(i.a)(c,l.body,u):l}},"./src/app/reducers/meta/index.ts":function(e,t,r){"use strict";var n=r("./src/lib/makeActionCreator/index.ts");Object(n.a)("META__META_RECEIVED");const o={country:"",domain:"",isBot:!1,isSessionSeo:!1,method:"",protocol:"",sessionReferrerDomain:"",userAgent:"",pageloadServerTime:0};t.a=((e=o,t)=>{switch(t.type){case"META__META_RECEIVED":return t.payload;default:return e}})},"./src/lib/addAllowQuarantinedParam/index.ts":function(e,t,r){"use strict";var n=r("./src/lib/addQueryParams/index.ts");t.a=(e=>Object(n.a)(e,{allow_quarantined:!0}))},"./src/lib/eventTools/index.ts":function(e,t,r){"use strict";r.d(t,"a",function(){return n}),r.d(t,"e",function(){return s}),r.d(t,"c",function(){return i}),r.d(t,"b",function(){return d}),r.d(t,"d",function(){return c});var n,o=r("./src/lib/constants/index.ts");function s(e,t){const r=e*o.Wb,s=t*o.Wb,i=Date.now();return i<r?n.Future:i>=r&&i<=s?n.Live:n.Past}function i(e,t){return s(e,t)===n.Future}function d(e){return function(e,t){const r=e/t;return r>=0?Math.floor(r):Math.ceil(r)}(e*o.Wb-Date.now(),o.y)}function c(e){const t=e*o.Wb,r=new Date,n=new Date(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()&&r.getDate()===n.getDate()}!function(e){e.Future="future",e.Live="live",e.Past="past"}(n||(n={}))},"./src/lib/forceHttps/index.ts":function(e,t,r){"use strict";t.a=function(e){return e.startsWith("http")?e.replace(/^http:\/\//i,"https://"):`https://${e}`}},"./src/lib/formatEmojiName/index.ts":function(e,t,r){"use strict";r.d(t,"a",function(){return s});const n=":",o=/^:[A-Za-z0-9_-]{1,24}:$/;function s(e){return o.test(e)?e:`${n}${e}${n}`}},"./src/lib/getParsedUserAgent/index.ts":function(e,t,r){"use strict";r.d(t,"e",function(){return s}),r.d(t,"c",function(){return i}),r.d(t,"b",function(){return d}),r.d(t,"d",function(){return c}),r.d(t,"f",function(){return u}),r.d(t,"a",function(){return a});var n=r("./node_modules/ua-parser-js/src/ua-parser.js"),o=r.n(n);const s=e=>"mobile"===a(e).device.type,i=e=>"mobile"!==a(e).device.type,d=e=>"Chrome"===a(e).browser.name,c=e=>"Firefox"===a(e).browser.name,u=e=>"Opera"===a(e).browser.name;function a(e){return new o.a(e).getResult()}},"./src/lib/isAdHocMultireddit/index.ts":function(e,t,r){"use strict";const n=/^(all|mod)(\b|$)/;t.a=(e=>{const t=e.toLowerCase();return!n.test(t)&&t.indexOf("+")>-1&&-1===t.indexOf("-")})},"./src/lib/isFakeSubreddit/index.ts":function(e,t,r){"use strict";var n=r("./src/reddit/constants/page.ts");const o=[n.a,n.b,n.j,n.h,n.e.Frontpage,n.e.All,n.e.Mod,n.e.Friends,n.e.Popular].concat(["random","randnsfw","myrandom"]);t.a=(e=>{const t=e.toLowerCase();re
|
||
|
//# sourceMappingURL=Client~Governance~Reddit.cfadfa7b0d06251d4a53.js.map
|